- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.inlineString = exports.UnknownProjectError = exports.CLIError = void 0;
|
|
/**
|
|
* A custom Error that creates a single-lined message to match current styling inside CLI.
|
|
* Uses original stack trace when `originalError` is passed or erase the stack if it's not defined.
|
|
*/
|
|
class CLIError extends Error {
|
|
constructor(msg, originalError) {
|
|
super(inlineString(msg));
|
|
if (originalError) {
|
|
this.stack = typeof originalError === 'string' ? originalError : originalError.stack || ''.split('\n').slice(0, 2).join('\n');
|
|
} else {
|
|
// When the "originalError" is not passed, it means that we know exactly
|
|
// what went wrong and provide means to fix it. In such cases showing the
|
|
// stack is an unnecessary clutter to the CLI output, hence removing it.
|
|
delete this.stack;
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Raised when we're unable to find a package.json
|
|
*/
|
|
exports.CLIError = CLIError;
|
|
class UnknownProjectError extends Error {}
|
|
exports.UnknownProjectError = UnknownProjectError;
|
|
const inlineString = (str = '') => str.replace(/(\s{2,})/gm, ' ').trim();
|
|
exports.inlineString = inlineString;
|
|
|
|
//# sourceMappingURL=errors.ts.map
|