@gfean/react-native-bundle-drop 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/lib/CLI/cli.js +9 -2
  3. package/lib/CLI/scripts/aipowered/apply-setup-plan.d.ts +2 -0
  4. package/lib/CLI/scripts/aipowered/apply-setup-plan.js +6 -3
  5. package/lib/CLI/scripts/aipowered/backend-client.d.ts +6 -4
  6. package/lib/CLI/scripts/aipowered/backend-client.js +5 -1
  7. package/lib/CLI/scripts/aipowered/code-push-residue.d.ts +1 -1
  8. package/lib/CLI/scripts/aipowered/code-push-residue.js +11 -5
  9. package/lib/CLI/scripts/aipowered/init-project-config.js +47 -36
  10. package/lib/CLI/scripts/aipowered/native-setup-context.d.ts +20 -0
  11. package/lib/CLI/scripts/aipowered/native-setup-context.js +242 -0
  12. package/lib/CLI/scripts/aipowered/native-setup-metadata.d.ts +16 -0
  13. package/lib/CLI/scripts/aipowered/native-setup-metadata.js +104 -0
  14. package/lib/CLI/scripts/aipowered/scanner.d.ts +7 -3
  15. package/lib/CLI/scripts/aipowered/scanner.js +96 -30
  16. package/lib/CLI/scripts/aipowered/setup-v2.d.ts +3 -0
  17. package/lib/CLI/scripts/aipowered/setup-v2.js +53 -0
  18. package/lib/CLI/scripts/aipowered/types.d.ts +11 -1
  19. package/lib/CLI/scripts/aipowered/validate-plan.d.ts +3 -1
  20. package/lib/CLI/scripts/aipowered/validate-plan.js +10 -4
  21. package/lib/CLI/scripts/doctor.js +18 -6
  22. package/lib/CLI/scripts/expo/eas-build-proof.js +8 -2
  23. package/lib/CLI/scripts/expo/package-manager.d.ts +1 -0
  24. package/lib/CLI/scripts/expo/package-manager.js +7 -3
  25. package/lib/CLI/scripts/ios-scene-target.d.ts +9 -0
  26. package/lib/CLI/scripts/ios-scene-target.js +193 -0
  27. package/lib/CLI/scripts/native-entrypoint-authority.d.ts +1 -0
  28. package/lib/CLI/scripts/native-entrypoint-authority.js +24 -0
  29. package/lib/CLI/scripts/native-setup-contract.d.ts +4 -0
  30. package/lib/CLI/scripts/native-setup-contract.js +28 -14
  31. package/lib/CLI/scripts/native-startup-validator.d.ts +4 -1
  32. package/lib/CLI/scripts/native-startup-validator.js +83 -6
  33. package/lib/CLI/scripts/safe-file-transaction.d.ts +1 -1
  34. package/lib/CLI/scripts/safe-file-transaction.js +3 -3
  35. package/lib/CLI/utils/read-xml-plist.d.ts +2 -1
  36. package/lib/CLI/utils/read-xml-plist.js +7 -3
  37. package/lib/expo/buildIdentity.js +1 -1
  38. package/lib/injectImageResolver.js +7 -2
  39. package/package.json +2 -2
  40. package/third_party/expo-fingerprint/scheme-1-contract.json +1 -1
@@ -1,2 +1,3 @@
1
- /** Read native XML metadata without enabling Plist's binary/OpenStep autodetection. */
1
+ /** Parse native XML metadata without enabling Plist's binary/OpenStep autodetection. */
2
+ export declare function parseXmlPlist(source: string): Promise<Record<string, unknown>>;
2
3
  export declare function readXmlPlist(file: string): Promise<Record<string, unknown>>;
@@ -3,11 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.parseXmlPlist = parseXmlPlist;
6
7
  exports.readXmlPlist = readXmlPlist;
7
8
  const node_fs_1 = __importDefault(require("node:fs"));
8
- /** Read native XML metadata without enabling Plist's binary/OpenStep autodetection. */
9
- async function readXmlPlist(file) {
10
- const xml = node_fs_1.default.readFileSync(file, 'utf8').replace(/^\uFEFF/, '');
9
+ /** Parse native XML metadata without enabling Plist's binary/OpenStep autodetection. */
10
+ async function parseXmlPlist(source) {
11
+ const xml = source.replace(/^\uFEFF/, '');
11
12
  if (!xml.trimStart().startsWith('<')) {
12
13
  throw new Error('Info.plist must be an XML property list.');
13
14
  }
@@ -20,3 +21,6 @@ async function readXmlPlist(file) {
20
21
  }
21
22
  return document;
22
23
  }
24
+ async function readXmlPlist(file) {
25
+ return parseXmlPlist(node_fs_1.default.readFileSync(file, 'utf8'));
26
+ }
@@ -14,7 +14,7 @@ const errors_1 = require("./errors");
14
14
  const localModules_1 = require("./localModules");
15
15
  const runtimeVersion_1 = require("./runtimeVersion");
16
16
  const MIN_SUPPORTED_EXPO_SDK = 54;
17
- const MAX_SUPPORTED_EXPO_SDK = 57;
17
+ const MAX_SUPPORTED_EXPO_SDK = 58;
18
18
  function requirePackageVersion(projectRoot, moduleId) {
19
19
  const manifest = (0, localModules_1.loadProjectModule)(projectRoot, moduleId);
20
20
  if (typeof manifest.version !== 'string' || manifest.version.trim() === '') {
@@ -38,8 +38,13 @@ const ANDROID_RESOURCE_LOCATION_DRIFT_FILE_TYPES = new Set(['heic', 'heif', 'svg
38
38
  function getPackagerAsset(source) {
39
39
  if (typeof source === 'number') {
40
40
  try {
41
- const registry = require('react-native/Libraries/Image/AssetRegistry');
42
- return registry.getAssetByID?.(source);
41
+ const { AssetRegistry: publicRegistry } = require('react-native');
42
+ if (publicRegistry?.getAssetByID) {
43
+ return publicRegistry.getAssetByID(source);
44
+ }
45
+ // Keep this import inside the try block so Metro treats it as optional.
46
+ const legacyRegistry = require('react-native/Libraries/Image/AssetRegistry');
47
+ return legacyRegistry.getAssetByID?.(source);
43
48
  }
44
49
  catch {
45
50
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gfean/react-native-bundle-drop",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "nativeVersion": "0.6.4",
5
5
  "description": "Over-the-air (OTA) updates for Expo and bare React Native with staged rollouts, smaller patch downloads, and rollback.",
6
6
  "main": "lib/index.js",
@@ -146,7 +146,7 @@
146
146
  "bundle-analysis"
147
147
  ],
148
148
  "peerDependencies": {
149
- "expo": ">=54.0.0 <58.0.0",
149
+ "expo": ">=54.0.0 <59.0.0",
150
150
  "react": ">=17.0.0",
151
151
  "react-native": ">=0.71.0"
152
152
  },
@@ -31,7 +31,7 @@
31
31
  "diff@^4.0.1": "4.0.4",
32
32
  "@xmldom/xmldom@^0.8.8": "0.8.13"
33
33
  },
34
- "lockfileSha256": "7eafd7d3c189c7eeba674e7c15e22dd97b58e8d68f3a6445185f19b67c65b50d",
34
+ "lockfileSha256": "2fa9c2beef999a7d8c089f3adb10a5d978000f309ecf271af1048890e337b73e",
35
35
  "sourceFiles": {
36
36
  "scripts/build-fingerprint.cjs": "5f2e6ac05b330e61e81ae5a3919d742e47b547b85ed408e163723d93f979757a",
37
37
  "scripts/check-fingerprint-contract.cjs": "741373a90854cadabfc1d86d3104841a326371ee894f9aa6ac11eeed56638b32",