Files
Eric FELIXINE e30ae8ed09 feat(smart-app): implement complete mobile app MVP
- 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
2026-06-01 18:00:35 -04:00

34 lines
1.4 KiB
JavaScript

'use strict';
const md5File = require('md5-file/promise');
module.exports = function hashAssetFiles(asset) {
return Promise.all(asset.files.map(md5File)).then((hashes) => {
asset.fileHashes = hashes;
// Convert the `../` segments of the server URL to `_` to support monorepos.
// This same transformation takes place in `AssetSourceResolver.web` (expo-assets, expo-image) and `persistMetroAssets` of Expo CLI,
// this originally came from the Metro opinion https://github.com/react-native-community/cli/blob/2204d357379e2067cebe2791e90388f7e97fc5f5/packages/cli-plugin-metro/src/commands/bundle/getAssetDestPathIOS.ts#L19C5-L19C10
if (asset.httpServerLocation.includes('?export_path=')) {
asset.httpServerLocation = asset.httpServerLocation
.match(/\?export_path=(.*)/)[1]
.replace(/\.\.\//g, '_');
}
// URL encode asset paths defined as `?export_path` or `?unstable_path` query parameters.
// Decoding should be done automatically when parsing the URL through Node or the browser.
const assetPathQueryParameter = asset.httpServerLocation.match(
/\?(export_path|unstable_path)=(.*)/
);
if (assetPathQueryParameter && assetPathQueryParameter[2]) {
const assetPath = assetPathQueryParameter[2];
asset.httpServerLocation = asset.httpServerLocation.replace(
assetPath,
encodeURIComponent(assetPath)
);
}
return asset;
});
};