Files
smart-city-digital-twin-mar…/smart-app-city/frontend/node_modules/@expo/config-plugins/build/android/BuildProperties.js
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

93 lines
3.7 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createBuildGradlePropsConfigPlugin = createBuildGradlePropsConfigPlugin;
exports.updateAndroidBuildPropertiesFromConfig = updateAndroidBuildPropertiesFromConfig;
exports.updateAndroidBuildProperty = updateAndroidBuildProperty;
exports.withJsEngineGradleProps = void 0;
function _androidPlugins() {
const data = require("../plugins/android-plugins");
_androidPlugins = function () {
return data;
};
return data;
}
/**
* Creates a `withGradleProperties` config-plugin based on given config to property mapping rules.
*
* The factory supports two modes from generic type inference
* ```ts
* // config-plugin without `props`, it will implicitly use the expo config as source config.
* createBuildGradlePropsConfigPlugin<ExpoConfig>(): ConfigPlugin<void>;
*
* // config-plugin with a parameter `props: CustomType`, it will use the `props` as source config.
* createBuildGradlePropsConfigPlugin<CustomType>(): ConfigPlugin<CustomType>;
* ```
*
* @param configToPropertyRules config to property mapping rules
* @param name the config plugin name
*/
function createBuildGradlePropsConfigPlugin(configToPropertyRules, name) {
const withUnknown = (config, sourceConfig) => (0, _androidPlugins().withGradleProperties)(config, config => {
config.modResults = updateAndroidBuildPropertiesFromConfig(sourceConfig ?? config, config.modResults, configToPropertyRules);
return config;
});
if (name) {
Object.defineProperty(withUnknown, 'name', {
value: name
});
}
return withUnknown;
}
/**
* A config-plugin to update `android/gradle.properties` from the `jsEngine` in expo config
*/
const withJsEngineGradleProps = exports.withJsEngineGradleProps = createBuildGradlePropsConfigPlugin([{
propName: 'hermesEnabled',
propValueGetter: config => ((config.android?.jsEngine ?? config.jsEngine ?? 'hermes') === 'hermes').toString()
}], 'withJsEngineGradleProps');
function updateAndroidBuildPropertiesFromConfig(config, gradleProperties, configToPropertyRules) {
for (const configToProperty of configToPropertyRules) {
const value = configToProperty.propValueGetter(config);
updateAndroidBuildProperty(gradleProperties, configToProperty.propName, value);
}
return gradleProperties;
}
function updateAndroidBuildProperty(gradleProperties, name, value, options) {
const oldPropIndex = gradleProperties.findIndex(prop => prop.type === 'property' && prop.key === name);
const oldProp = oldPropIndex >= 0 ? gradleProperties[oldPropIndex] : null;
if (value) {
// found the matched value, add or merge new property
const newProp = {
type: 'property',
key: name,
value
};
if (oldProp && oldProp.type === 'property') {
try {
const prevValue = JSON.parse(oldProp.value);
const newValue = JSON.parse(value);
if (Array.isArray(prevValue) && Array.isArray(newValue)) {
const prevArrayWithStringifiedValues = prevValue.map(v => JSON.stringify(v));
const newArrayWithStringifiedValues = newValue.map(v => JSON.stringify(v));
const mergedValues = [...new Set([...prevArrayWithStringifiedValues, ...newArrayWithStringifiedValues])].map(v => JSON.parse(v));
oldProp.value = JSON.stringify(mergedValues);
return gradleProperties;
}
} catch {}
oldProp.value = value;
return gradleProperties;
}
gradleProperties.push(newProp);
return gradleProperties;
}
if (options?.removePropWhenValueIsNull && oldPropIndex >= 0) {
gradleProperties.splice(oldPropIndex, 1);
return gradleProperties;
}
return gradleProperties;
}
//# sourceMappingURL=BuildProperties.js.map