- 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
65 lines
2.6 KiB
JavaScript
65 lines
2.6 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.MetroParser = void 0;
|
|
const Parser_1 = require("./Parser");
|
|
const switchRegex_1 = require("./switchRegex");
|
|
class MetroParser extends Parser_1.Parser {
|
|
constructor(formatter) {
|
|
super(formatter);
|
|
this.formatter = formatter;
|
|
this.isCollectingMetroError = false;
|
|
this.metroError = [];
|
|
}
|
|
parse(text) {
|
|
const results = this.checkMetroError(text);
|
|
if (results) {
|
|
return results;
|
|
}
|
|
return super.parse(text);
|
|
}
|
|
// Error for the build script wrapper in expo-updates that catches metro bundler errors.
|
|
// This can be repro'd by importing a file that doesn't exist, then building.
|
|
// Metro will fail to generate the JS bundle, and throw an error that should be caught here.
|
|
checkMetroError(text) {
|
|
// In expo-updates, we wrap the bundler script and add regex around the error message so we can present it nicely to the user.
|
|
return (0, switchRegex_1.switchRegex)(text, [
|
|
[
|
|
/@build-script-error-begin/m,
|
|
() => {
|
|
this.isCollectingMetroError = true;
|
|
},
|
|
],
|
|
[
|
|
/@build-script-error-end/m,
|
|
() => {
|
|
const results = this.metroError.join('\n');
|
|
// Reset the metro collection error array (should never need this).
|
|
this.isCollectingMetroError = false;
|
|
this.metroError = [];
|
|
if ('formatMetroAssetCollectionError' in this.formatter) {
|
|
return this.formatter.formatMetroAssetCollectionError(results);
|
|
}
|
|
throw new Error('Current `@expo/xcpretty` formatter cannot handle Metro errors');
|
|
},
|
|
],
|
|
[
|
|
null,
|
|
() => {
|
|
// Collect all the lines in the metro build error
|
|
if (this.isCollectingMetroError) {
|
|
let results = text;
|
|
if (!this.metroError.length) {
|
|
const match = text.match(/Error loading assets JSON from Metro.*steps correctly.((.|\n)*)/m);
|
|
if (match && match[1]) {
|
|
results = match[1].trim();
|
|
}
|
|
}
|
|
this.metroError.push(results);
|
|
}
|
|
},
|
|
],
|
|
]);
|
|
}
|
|
}
|
|
exports.MetroParser = MetroParser;
|
|
//# sourceMappingURL=MetroParser.js.map
|