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
This commit is contained in:
Eric FELIXINE
2026-06-01 18:00:35 -04:00
parent 08ca495bde
commit e30ae8ed09
35578 changed files with 3703534 additions and 43 deletions

View File

@@ -0,0 +1,26 @@
export declare const projectWithPodfileOnly: {
ios: {};
};
export declare const project: {
ios: {
Podfile: string;
'demoProject.xcodeproj': {
'project.pbxproj': any;
};
};
};
export declare const withExamples: {
Examples: {
Podfile: string;
'exampleProject.xcodeproj': {
'project.pbxproj': any;
};
};
ios: {
Podfile: string;
'demoProject.xcodeproj': {
'project.pbxproj': any;
};
};
};
//# sourceMappingURL=projects.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../src/config/__fixtures__/projects.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,sBAAsB;;CAElC,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;CASnB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAUxB,CAAC"}

View File

@@ -0,0 +1,2 @@
export default function findAllPodfilePaths(cwd: string): string[];
//# sourceMappingURL=findAllPodfilePaths.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"findAllPodfilePaths.d.ts","sourceRoot":"","sources":["../../src/config/findAllPodfilePaths.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,GAAG,EAAE,MAAM,YAKtD"}

View File

@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = findAllPodfilePaths;
function _fastGlob() {
const data = _interopRequireDefault(require("fast-glob"));
_fastGlob = function () {
return data;
};
return data;
}
function _cliTools() {
const data = require("@react-native-community/cli-tools");
_cliTools = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// These folders will be excluded from search to speed it up
const GLOB_EXCLUDE_PATTERN = ['**/@(Pods|node_modules|Carthage|vendor)/**'];
function findAllPodfilePaths(cwd) {
return _fastGlob().default.sync('**/Podfile', {
cwd: (0, _cliTools().unixifyPaths)(cwd),
ignore: GLOB_EXCLUDE_PATTERN
});
}
//# sourceMappingURL=findAllPodfilePaths.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["GLOB_EXCLUDE_PATTERN","findAllPodfilePaths","cwd","glob","sync","unixifyPaths","ignore"],"sources":["../../src/config/findAllPodfilePaths.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport glob from 'fast-glob';\nimport {unixifyPaths} from '@react-native-community/cli-tools';\n\n// These folders will be excluded from search to speed it up\nconst GLOB_EXCLUDE_PATTERN = ['**/@(Pods|node_modules|Carthage|vendor)/**'];\n\nexport default function findAllPodfilePaths(cwd: string) {\n return glob.sync('**/Podfile', {\n cwd: unixifyPaths(cwd),\n ignore: GLOB_EXCLUDE_PATTERN,\n });\n}\n"],"mappings":";;;;;;AAOA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA+D;AAR/D;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA,MAAMA,oBAAoB,GAAG,CAAC,4CAA4C,CAAC;AAE5D,SAASC,mBAAmB,CAACC,GAAW,EAAE;EACvD,OAAOC,mBAAI,CAACC,IAAI,CAAC,YAAY,EAAE;IAC7BF,GAAG,EAAE,IAAAG,wBAAY,EAACH,GAAG,CAAC;IACtBI,MAAM,EAAEN;EACV,CAAC,CAAC;AACJ"}

View File

@@ -0,0 +1,10 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { ApplePlatform } from '../types';
export default function findPodfilePath(cwd: string, platformName: ApplePlatform): string | null;
//# sourceMappingURL=findPodfilePath.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"findPodfilePath.d.ts","sourceRoot":"","sources":["../../src/config/findPodfilePath.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AASvC,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,aAAa,iBAkD5B"}

View File

@@ -0,0 +1,77 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = findPodfilePath;
function _cliTools() {
const data = require("@react-native-community/cli-tools");
_cliTools = function () {
return data;
};
return data;
}
function _path() {
const data = _interopRequireDefault(require("path"));
_path = function () {
return data;
};
return data;
}
var _findAllPodfilePaths = _interopRequireDefault(require("./findAllPodfilePaths"));
var _supportedPlatforms = require("./supportedPlatforms");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// Regexp matching all test projects
const TEST_PROJECTS = /test|example|sample/i;
// Podfile in the bundle package
const BUNDLE_VENDORED_PODFILE = 'vendor/bundle/ruby';
function findPodfilePath(cwd, platformName) {
const podfiles = (0, _findAllPodfilePaths.default)(cwd)
/**
* Then, we will run a simple test to rule out most example projects,
* unless they are located in a `platformName` folder
*/.filter(project => {
if (_path().default.dirname(project) === platformName) {
// Pick the Podfile in the default project (in the iOS folder)
return true;
}
if (TEST_PROJECTS.test(project)) {
// Ignore the Podfile in test and example projects
return false;
}
if (project.indexOf(BUNDLE_VENDORED_PODFILE) > -1) {
// Ignore the podfile shipped with Cocoapods in bundle
return false;
}
// Accept all the others
return true;
})
/**
* Podfile from `platformName` folder will be picked up as a first one.
*/.sort(project => _path().default.dirname(project) === platformName ? -1 : 1);
const supportedPlatformsArray = Object.values(_supportedPlatforms.supportedPlatforms);
const containsUnsupportedPodfiles = podfiles.every(podfile => !supportedPlatformsArray.includes(podfile.split('/')[0]));
if (podfiles.length > 0) {
if (podfiles.length > 1 && containsUnsupportedPodfiles) {
_cliTools().logger.warn((0, _cliTools().inlineString)(`
Multiple Podfiles were found: ${podfiles}. Choosing ${podfiles[0]} automatically.
If you would like to select a different one, you can configure it via "project.${platformName}.sourceDir".
You can learn more about it here: https://github.com/react-native-community/cli/blob/main/docs/configuration.md
`));
}
return _path().default.join(cwd, podfiles[0]);
}
return null;
}
//# sourceMappingURL=findPodfilePath.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["TEST_PROJECTS","BUNDLE_VENDORED_PODFILE","findPodfilePath","cwd","platformName","podfiles","findAllPodfilePaths","filter","project","path","dirname","test","indexOf","sort","supportedPlatformsArray","Object","values","supportedPlatforms","containsUnsupportedPodfiles","every","podfile","includes","split","length","logger","warn","inlineString","join"],"sources":["../../src/config/findPodfilePath.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport {inlineString, logger} from '@react-native-community/cli-tools';\nimport path from 'path';\nimport findAllPodfilePaths from './findAllPodfilePaths';\nimport {ApplePlatform} from '../types';\nimport {supportedPlatforms} from './supportedPlatforms';\n\n// Regexp matching all test projects\nconst TEST_PROJECTS = /test|example|sample/i;\n\n// Podfile in the bundle package\nconst BUNDLE_VENDORED_PODFILE = 'vendor/bundle/ruby';\n\nexport default function findPodfilePath(\n cwd: string,\n platformName: ApplePlatform,\n) {\n const podfiles = findAllPodfilePaths(cwd)\n /**\n * Then, we will run a simple test to rule out most example projects,\n * unless they are located in a `platformName` folder\n */\n .filter((project) => {\n if (path.dirname(project) === platformName) {\n // Pick the Podfile in the default project (in the iOS folder)\n return true;\n }\n\n if (TEST_PROJECTS.test(project)) {\n // Ignore the Podfile in test and example projects\n return false;\n }\n\n if (project.indexOf(BUNDLE_VENDORED_PODFILE) > -1) {\n // Ignore the podfile shipped with Cocoapods in bundle\n return false;\n }\n\n // Accept all the others\n return true;\n })\n /**\n * Podfile from `platformName` folder will be picked up as a first one.\n */\n .sort((project) => (path.dirname(project) === platformName ? -1 : 1));\n\n const supportedPlatformsArray: string[] = Object.values(supportedPlatforms);\n const containsUnsupportedPodfiles = podfiles.every(\n (podfile) => !supportedPlatformsArray.includes(podfile.split('/')[0]),\n );\n\n if (podfiles.length > 0) {\n if (podfiles.length > 1 && containsUnsupportedPodfiles) {\n logger.warn(\n inlineString(`\n Multiple Podfiles were found: ${podfiles}. Choosing ${podfiles[0]} automatically.\n If you would like to select a different one, you can configure it via \"project.${platformName}.sourceDir\".\n You can learn more about it here: https://github.com/react-native-community/cli/blob/main/docs/configuration.md\n `),\n );\n }\n return path.join(cwd, podfiles[0]);\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;AAEA;AAAwD;AAZxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA,MAAMA,aAAa,GAAG,sBAAsB;;AAE5C;AACA,MAAMC,uBAAuB,GAAG,oBAAoB;AAErC,SAASC,eAAe,CACrCC,GAAW,EACXC,YAA2B,EAC3B;EACA,MAAMC,QAAQ,GAAG,IAAAC,4BAAmB,EAACH,GAAG;EACtC;AACJ;AACA;AACA,KAHI,CAICI,MAAM,CAAEC,OAAO,IAAK;IACnB,IAAIC,eAAI,CAACC,OAAO,CAACF,OAAO,CAAC,KAAKJ,YAAY,EAAE;MAC1C;MACA,OAAO,IAAI;IACb;IAEA,IAAIJ,aAAa,CAACW,IAAI,CAACH,OAAO,CAAC,EAAE;MAC/B;MACA,OAAO,KAAK;IACd;IAEA,IAAIA,OAAO,CAACI,OAAO,CAACX,uBAAuB,CAAC,GAAG,CAAC,CAAC,EAAE;MACjD;MACA,OAAO,KAAK;IACd;;IAEA;IACA,OAAO,IAAI;EACb,CAAC;EACD;AACJ;AACA,KAFI,CAGCY,IAAI,CAAEL,OAAO,IAAMC,eAAI,CAACC,OAAO,CAACF,OAAO,CAAC,KAAKJ,YAAY,GAAG,CAAC,CAAC,GAAG,CAAE,CAAC;EAEvE,MAAMU,uBAAiC,GAAGC,MAAM,CAACC,MAAM,CAACC,sCAAkB,CAAC;EAC3E,MAAMC,2BAA2B,GAAGb,QAAQ,CAACc,KAAK,CAC/CC,OAAO,IAAK,CAACN,uBAAuB,CAACO,QAAQ,CAACD,OAAO,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CACtE;EAED,IAAIjB,QAAQ,CAACkB,MAAM,GAAG,CAAC,EAAE;IACvB,IAAIlB,QAAQ,CAACkB,MAAM,GAAG,CAAC,IAAIL,2BAA2B,EAAE;MACtDM,kBAAM,CAACC,IAAI,CACT,IAAAC,wBAAY,EAAE;AACtB,0CAA0CrB,QAAS,cAAaA,QAAQ,CAAC,CAAC,CAAE;AAC5E,2FAA2FD,YAAa;AACxG;AACA,SAAS,CAAC,CACH;IACH;IACA,OAAOK,eAAI,CAACkB,IAAI,CAACxB,GAAG,EAAEE,QAAQ,CAAC,CAAC,CAAC,CAAC;EACpC;EAEA,OAAO,IAAI;AACb"}

View File

@@ -0,0 +1,2 @@
export default function findPodspec(folder: string): string | null;
//# sourceMappingURL=findPodspec.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"findPodspec.d.ts","sourceRoot":"","sources":["../../src/config/findPodspec.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAajE"}

View File

@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = findPodspec;
function _fastGlob() {
const data = _interopRequireDefault(require("fast-glob"));
_fastGlob = function () {
return data;
};
return data;
}
function _path() {
const data = _interopRequireDefault(require("path"));
_path = function () {
return data;
};
return data;
}
function _cliTools() {
const data = require("@react-native-community/cli-tools");
_cliTools = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function findPodspec(folder) {
const podspecs = _fastGlob().default.sync('*.podspec', {
cwd: (0, _cliTools().unixifyPaths)(folder)
});
if (podspecs.length === 0) {
return null;
}
const packagePodspec = _path().default.basename(folder) + '.podspec';
const podspecFile = podspecs.includes(packagePodspec) ? packagePodspec : podspecs[0];
return _path().default.join(folder, podspecFile);
}
//# sourceMappingURL=findPodspec.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["findPodspec","folder","podspecs","glob","sync","cwd","unixifyPaths","length","packagePodspec","path","basename","podspecFile","includes","join"],"sources":["../../src/config/findPodspec.ts"],"sourcesContent":["import glob from 'fast-glob';\nimport path from 'path';\nimport {unixifyPaths} from '@react-native-community/cli-tools';\n\nexport default function findPodspec(folder: string): string | null {\n const podspecs = glob.sync('*.podspec', {cwd: unixifyPaths(folder)});\n\n if (podspecs.length === 0) {\n return null;\n }\n\n const packagePodspec = path.basename(folder) + '.podspec';\n const podspecFile = podspecs.includes(packagePodspec)\n ? packagePodspec\n : podspecs[0];\n\n return path.join(folder, podspecFile);\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA+D;AAEhD,SAASA,WAAW,CAACC,MAAc,EAAiB;EACjE,MAAMC,QAAQ,GAAGC,mBAAI,CAACC,IAAI,CAAC,WAAW,EAAE;IAACC,GAAG,EAAE,IAAAC,wBAAY,EAACL,MAAM;EAAC,CAAC,CAAC;EAEpE,IAAIC,QAAQ,CAACK,MAAM,KAAK,CAAC,EAAE;IACzB,OAAO,IAAI;EACb;EAEA,MAAMC,cAAc,GAAGC,eAAI,CAACC,QAAQ,CAACT,MAAM,CAAC,GAAG,UAAU;EACzD,MAAMU,WAAW,GAAGT,QAAQ,CAACU,QAAQ,CAACJ,cAAc,CAAC,GACjDA,cAAc,GACdN,QAAQ,CAAC,CAAC,CAAC;EAEf,OAAOO,eAAI,CAACI,IAAI,CAACZ,MAAM,EAAEU,WAAW,CAAC;AACvC"}

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { IOSProjectInfo } from '@react-native-community/cli-types';
declare function findXcodeProject(files: Array<string>): IOSProjectInfo | null;
export default findXcodeProject;
//# sourceMappingURL=findXcodeProject.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"findXcodeProject.d.ts","sourceRoot":"","sources":["../../src/config/findXcodeProject.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAC,cAAc,EAAC,MAAM,mCAAmC,CAAC;AAEjE,iBAAS,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,cAAc,GAAG,IAAI,CAsBrE;AAED,eAAe,gBAAgB,CAAC"}

View File

@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _path() {
const data = _interopRequireDefault(require("path"));
_path = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function findXcodeProject(files) {
const sortedFiles = files.sort();
for (let i = sortedFiles.length - 1; i >= 0; i--) {
const fileName = files[i];
const ext = _path().default.extname(fileName);
if (ext === '.xcworkspace') {
return {
name: fileName,
isWorkspace: true
};
}
if (ext === '.xcodeproj') {
return {
name: fileName,
isWorkspace: false
};
}
}
return null;
}
var _default = findXcodeProject;
exports.default = _default;
//# sourceMappingURL=findXcodeProject.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["findXcodeProject","files","sortedFiles","sort","i","length","fileName","ext","path","extname","name","isWorkspace"],"sources":["../../src/config/findXcodeProject.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport path from 'path';\nimport {IOSProjectInfo} from '@react-native-community/cli-types';\n\nfunction findXcodeProject(files: Array<string>): IOSProjectInfo | null {\n const sortedFiles = files.sort();\n\n for (let i = sortedFiles.length - 1; i >= 0; i--) {\n const fileName = files[i];\n const ext = path.extname(fileName);\n\n if (ext === '.xcworkspace') {\n return {\n name: fileName,\n isWorkspace: true,\n };\n }\n if (ext === '.xcodeproj') {\n return {\n name: fileName,\n isWorkspace: false,\n };\n }\n }\n\n return null;\n}\n\nexport default findXcodeProject;\n"],"mappings":";;;;;;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAwB;AARxB;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASA,gBAAgB,CAACC,KAAoB,EAAyB;EACrE,MAAMC,WAAW,GAAGD,KAAK,CAACE,IAAI,EAAE;EAEhC,KAAK,IAAIC,CAAC,GAAGF,WAAW,CAACG,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAChD,MAAME,QAAQ,GAAGL,KAAK,CAACG,CAAC,CAAC;IACzB,MAAMG,GAAG,GAAGC,eAAI,CAACC,OAAO,CAACH,QAAQ,CAAC;IAElC,IAAIC,GAAG,KAAK,cAAc,EAAE;MAC1B,OAAO;QACLG,IAAI,EAAEJ,QAAQ;QACdK,WAAW,EAAE;MACf,CAAC;IACH;IACA,IAAIJ,GAAG,KAAK,YAAY,EAAE;MACxB,OAAO;QACLG,IAAI,EAAEJ,QAAQ;QACdK,WAAW,EAAE;MACf,CAAC;IACH;EACF;EAEA,OAAO,IAAI;AACb;AAAC,eAEcX,gBAAgB;AAAA"}

View File

@@ -0,0 +1,14 @@
import findAllPodfilePaths from './findAllPodfilePaths';
import { IOSProjectParams, IOSDependencyParams, IOSProjectConfig, IOSDependencyConfig } from '@react-native-community/cli-types';
import { BuilderCommand } from '../types';
/**
* Returns project config by analyzing given folder and applying some user defaults
* when constructing final object
*/
export declare const getProjectConfig: ({ platformName }: BuilderCommand) => (folder: string, userConfig: IOSProjectParams) => IOSProjectConfig | null;
/**
* Make getDependencyConfig follow the same pattern as getProjectConfig
*/
export declare const getDependencyConfig: ({}: BuilderCommand) => (folder: string, userConfig?: IOSDependencyParams | null) => IOSDependencyConfig | null;
export declare const findPodfilePaths: typeof findAllPodfilePaths;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAaA,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAC,cAAc,EAAC,MAAM,UAAU,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,qBACV,cAAc,cACtB,MAAM,cAAc,gBAAgB,KAAG,gBAAgB,GAAG,IAiClE,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,mBAAmB,OACzB,cAAc,cAET,MAAM,eACF,mBAAmB,GAAG,IAAI,KACrC,mBAAmB,GAAG,IAiCxB,CAAC;AAEJ,eAAO,MAAM,gBAAgB,4BAAsB,CAAC"}

View File

@@ -0,0 +1,115 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getProjectConfig = exports.getDependencyConfig = exports.findPodfilePaths = void 0;
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _path() {
const data = _interopRequireDefault(require("path"));
_path = function () {
return data;
};
return data;
}
function _fs() {
const data = _interopRequireDefault(require("fs"));
_fs = function () {
return data;
};
return data;
}
var _findPodfilePath = _interopRequireDefault(require("./findPodfilePath"));
var _findXcodeProject = _interopRequireDefault(require("./findXcodeProject"));
var _findPodspec = _interopRequireDefault(require("./findPodspec"));
var _findAllPodfilePaths = _interopRequireDefault(require("./findAllPodfilePaths"));
function _cliTools() {
const data = require("@react-native-community/cli-tools");
_cliTools = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Returns project config by analyzing given folder and applying some user defaults
* when constructing final object
*/
const getProjectConfig = ({
platformName
}) => (folder, userConfig) => {
if (!userConfig) {
return null;
}
const src = _path().default.join(folder, userConfig.sourceDir ?? '');
const podfile = (0, _findPodfilePath.default)(src, platformName);
/**
* In certain repos, the Xcode project can be generated by a tool.
* The only file that we can assume to exist on disk is `Podfile`.
*/
if (!podfile) {
return null;
}
const sourceDir = _path().default.dirname(podfile);
const xcodeProject = (0, _findXcodeProject.default)(_fs().default.readdirSync(sourceDir));
// @ts-ignore @todo remove for RN 0.75
if (userConfig.unstable_reactLegacyComponentNames) {
_cliTools().logger.warn('The "project.ios.unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.');
}
return {
sourceDir,
watchModeCommandParams: userConfig.watchModeCommandParams,
xcodeProject,
automaticPodsInstallation: userConfig.automaticPodsInstallation
};
};
/**
* Make getDependencyConfig follow the same pattern as getProjectConfig
*/
exports.getProjectConfig = getProjectConfig;
const getDependencyConfig = ({}) => (folder, userConfig = {}) => {
if (userConfig === null) {
return null;
}
const podspecPath = (0, _findPodspec.default)(folder);
if (!podspecPath) {
return null;
}
let version = 'unresolved';
try {
const packageJson = require(_path().default.join(folder, 'package.json'));
if (packageJson.version) {
version = packageJson.version;
}
} catch {
throw new (_cliTools().CLIError)(`Failed to locate package.json file from ${_chalk().default.underline(folder)}. This is most likely issue with your node_modules folder being corrupted. Please force install dependencies and try again`);
}
return {
podspecPath,
version,
configurations: userConfig.configurations || [],
scriptPhases: userConfig.scriptPhases || []
};
};
exports.getDependencyConfig = getDependencyConfig;
const findPodfilePaths = _findAllPodfilePaths.default;
exports.findPodfilePaths = findPodfilePaths;
//# sourceMappingURL=index.ts.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
export declare const supportedPlatforms: {
readonly ios: "ios";
readonly macos: "macos";
readonly visionos: "visionos";
readonly tvos: "tvos";
};
//# sourceMappingURL=supportedPlatforms.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"supportedPlatforms.d.ts","sourceRoot":"","sources":["../../src/config/supportedPlatforms.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAC"}

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.supportedPlatforms = void 0;
const supportedPlatforms = {
ios: 'ios',
macos: 'macos',
visionos: 'visionos',
tvos: 'tvos'
};
exports.supportedPlatforms = supportedPlatforms;
//# sourceMappingURL=supportedPlatforms.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["supportedPlatforms","ios","macos","visionos","tvos"],"sources":["../../src/config/supportedPlatforms.ts"],"sourcesContent":["export const supportedPlatforms = {\n ios: 'ios',\n macos: 'macos',\n visionos: 'visionos',\n tvos: 'tvos',\n} as const;\n"],"mappings":";;;;;;AAAO,MAAMA,kBAAkB,GAAG;EAChCC,GAAG,EAAE,KAAK;EACVC,KAAK,EAAE,OAAO;EACdC,QAAQ,EAAE,UAAU;EACpBC,IAAI,EAAE;AACR,CAAU;AAAC"}