@expo/repack-app 0.2.16 → 0.4.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.
package/bin/cli.js CHANGED
@@ -14,6 +14,7 @@ const program = new Command('repack-app')
14
14
  .requiredOption('--source-app <path>', 'Path to the source app file')
15
15
  .option('--android-build-tools-dir <path>', 'Path to the Android build tools directory')
16
16
  .option('-w, --working-directory <path>', 'Path to the working directory')
17
+ .option('--skip-working-dir-cleanup', 'Skip cleaning up the working directory')
17
18
  .option('-o, --output <path>', 'Path to the output artifact')
18
19
  // Android signing options
19
20
  .option('--ks <path>', 'Path to the keystore file')
@@ -24,6 +25,8 @@ const program = new Command('repack-app')
24
25
  // iOS signing options
25
26
  .option('--signing-identity <identity>', 'Signing identity')
26
27
  .option('--provisioning-profile <path>', 'Path to the provisioning profile')
28
+ // js-bundle-only mode
29
+ .option('--js-bundle-only', 'Only update the JS bundle, skip native config updates')
27
30
  // export:embed options
28
31
  .option('--embed-bundle-assets', 'Force embedding of bundle assets')
29
32
  .option(
@@ -40,6 +43,8 @@ async function runAsync() {
40
43
  const platform = program.opts().platform;
41
44
  const projectRoot = program.processedArgs[0];
42
45
 
46
+ const jsBundleOnly = !!program.opts().jsBundleOnly;
47
+
43
48
  /** @type Options['exportEmbedOptions']} */
44
49
  const exportEmbedOptions = program.opts().embedBundleAssets
45
50
  ? {
@@ -54,7 +59,9 @@ async function runAsync() {
54
59
  verbose: !!program.opts().verbose,
55
60
  sourceAppPath: program.opts().sourceApp,
56
61
  workingDirectory: program.opts().workingDirectory,
62
+ skipWorkingDirCleanup: program.opts().skipWorkingDirCleanup,
57
63
  outputPath: program.opts().output,
64
+ jsBundleOnly,
58
65
  exportEmbedOptions,
59
66
  androidSigningOptions: {
60
67
  keyStorePath: program.opts().ks,
@@ -67,12 +74,19 @@ async function runAsync() {
67
74
  });
68
75
  logger.info(pico.green(`Updated APK created at ${outputPath}`));
69
76
  } else if (platform === 'ios') {
77
+ /** @type Record<string, any> | string | null */
78
+ let provisioningProfile = null;
79
+ try {
80
+ provisioningProfile = JSON.parse(program.opts().provisioningProfile || 'null');
81
+ } catch {
82
+ provisioningProfile = program.opts().provisioningProfile || null;
83
+ }
70
84
  /** @type Options['iosSigningOptions']} */
71
85
  const iosSigningOptions =
72
- program.opts().signingIdentity && program.opts().provisioningProfile
86
+ program.opts().signingIdentity && provisioningProfile
73
87
  ? {
74
88
  signingIdentity: program.opts().signingIdentity,
75
- provisioningProfile: program.opts().provisioningProfile,
89
+ provisioningProfile,
76
90
  }
77
91
  : undefined;
78
92
  const outputPath = await repackAppIosAsync({
@@ -81,7 +95,9 @@ async function runAsync() {
81
95
  verbose: !!program.opts().verbose,
82
96
  sourceAppPath: program.opts().sourceApp,
83
97
  workingDirectory: program.opts().workingDirectory,
98
+ skipWorkingDirCleanup: program.opts().skipWorkingDirCleanup,
84
99
  outputPath: program.opts().output,
100
+ jsBundleOnly,
85
101
  exportEmbedOptions,
86
102
  iosSigningOptions,
87
103
  logger,
package/dist/index.d.ts CHANGED
@@ -159,6 +159,10 @@ export declare interface Options {
159
159
  * The options for signing the ios app.
160
160
  */
161
161
  iosSigningOptions?: IosSigningOptions;
162
+ /**
163
+ * Only update the JS bundle without modifying native configuration (manifests, plists, resources, icons).
164
+ */
165
+ jsBundleOnly?: boolean;
162
166
  /**
163
167
  * Skip the working directory cleanup.
164
168
  */