@expo/repack-app 0.1.0 → 0.1.2
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/build/android/apktool.js +4 -5
- package/build/android/build-tools.js +4 -5
- package/build/android/index.js +2 -4
- package/build/android/resources.js +5 -6
- package/build/expo.d.ts +5 -0
- package/build/expo.js +30 -7
- package/build/ios/build-tools.js +4 -5
- package/build/ios/index.js +3 -5
- package/build/ios/resources.js +4 -5
- package/build/types.d.ts +0 -1
- package/build/utils.js +3 -4
- package/package.json +15 -22
package/build/android/apktool.js
CHANGED
|
@@ -3,7 +3,10 @@ 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.
|
|
6
|
+
exports.decodeApkAsync = decodeApkAsync;
|
|
7
|
+
exports.rebuildApkAsync = rebuildApkAsync;
|
|
8
|
+
exports.addBundleAssetsToDecodedApkAsync = addBundleAssetsToDecodedApkAsync;
|
|
9
|
+
exports.addRenameManifestPackageAsync = addRenameManifestPackageAsync;
|
|
7
10
|
const steps_1 = require("@expo/steps");
|
|
8
11
|
const promises_1 = __importDefault(require("fs/promises"));
|
|
9
12
|
const glob_1 = require("glob");
|
|
@@ -23,7 +26,6 @@ async function decodeApkAsync(apkPath, options) {
|
|
|
23
26
|
: { cwd: workingDirectory });
|
|
24
27
|
return node_path_1.default.join(workingDirectory, outputPath);
|
|
25
28
|
}
|
|
26
|
-
exports.decodeApkAsync = decodeApkAsync;
|
|
27
29
|
/**
|
|
28
30
|
* Rebuild the decoded APK file using APKTool.
|
|
29
31
|
*/
|
|
@@ -35,7 +37,6 @@ async function rebuildApkAsync(decodedApkRoot, options) {
|
|
|
35
37
|
await (0, steps_1.spawnAsync)('java', ['-jar', apktoolPath, 'build', '-o', apktoolPackedApkPath, '--use-aapt2', decodedApkRoot], options.verbose ? { logger: options.logger, stdio: 'pipe' } : undefined);
|
|
36
38
|
return apktoolPackedApkPath;
|
|
37
39
|
}
|
|
38
|
-
exports.rebuildApkAsync = rebuildApkAsync;
|
|
39
40
|
/**
|
|
40
41
|
* Add the bundle assets to the decoded APK.
|
|
41
42
|
*/
|
|
@@ -44,7 +45,6 @@ async function addBundleAssetsToDecodedApkAsync({ decodedApkRoot, assetRoot, bun
|
|
|
44
45
|
const assetSet = await copyAssetsAsync(assetRoot, node_path_1.default.join(decodedApkRoot, 'res'));
|
|
45
46
|
await addApktoolResourceAsync(decodedApkRoot, assetSet);
|
|
46
47
|
}
|
|
47
|
-
exports.addBundleAssetsToDecodedApkAsync = addBundleAssetsToDecodedApkAsync;
|
|
48
48
|
/**
|
|
49
49
|
* Update the apktool.yml `renameManifestPackage`
|
|
50
50
|
*/
|
|
@@ -54,7 +54,6 @@ async function addRenameManifestPackageAsync(decodedApkRoot, packageName) {
|
|
|
54
54
|
apktoolYml = apktoolYml.replace(/^(\s+renameManifestPackage:\s+)(.+)$/gm, `$1${packageName}`);
|
|
55
55
|
await promises_1.default.writeFile(apktoolYmlPath, apktoolYml);
|
|
56
56
|
}
|
|
57
|
-
exports.addRenameManifestPackageAsync = addRenameManifestPackageAsync;
|
|
58
57
|
//#region Internals
|
|
59
58
|
async function getApktoolPathAsync() {
|
|
60
59
|
if (!cachedApktoolPath) {
|
|
@@ -3,7 +3,10 @@ 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.
|
|
6
|
+
exports.getAndroidBuildToolsAsync = getAndroidBuildToolsAsync;
|
|
7
|
+
exports.createResignedApkAsync = createResignedApkAsync;
|
|
8
|
+
exports.findLatestBuildToolsDirAsync = findLatestBuildToolsDirAsync;
|
|
9
|
+
exports.searchDexClassesAsync = searchDexClassesAsync;
|
|
7
10
|
const steps_1 = require("@expo/steps");
|
|
8
11
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
9
12
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
@@ -25,7 +28,6 @@ async function getAndroidBuildToolsAsync(options) {
|
|
|
25
28
|
}
|
|
26
29
|
return cachedAndroidTools;
|
|
27
30
|
}
|
|
28
|
-
exports.getAndroidBuildToolsAsync = getAndroidBuildToolsAsync;
|
|
29
31
|
/**
|
|
30
32
|
* Create a resigned & updated APK.
|
|
31
33
|
* @param unzippedApkRoot The root directory of the unzipped APK working directory.
|
|
@@ -60,7 +62,6 @@ async function createResignedApkAsync(unzippedApkRoot, options, signingOptions)
|
|
|
60
62
|
await (0, steps_1.spawnAsync)(apksignerPath, signerArgs, options.verbose ? { logger: options.logger, stdio: 'pipe' } : undefined);
|
|
61
63
|
return resignedApkPath;
|
|
62
64
|
}
|
|
63
|
-
exports.createResignedApkAsync = createResignedApkAsync;
|
|
64
65
|
/**
|
|
65
66
|
* Find the latest build-tools directory in the `ANDROID_SDK_ROOT` directory.
|
|
66
67
|
*/
|
|
@@ -97,7 +98,6 @@ async function findLatestBuildToolsDirAsync() {
|
|
|
97
98
|
return null;
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
exports.findLatestBuildToolsDirAsync = findLatestBuildToolsDirAsync;
|
|
101
101
|
/**
|
|
102
102
|
* Search for classes in the APK with the given app ID pattern passing to grep.
|
|
103
103
|
*/
|
|
@@ -114,4 +114,3 @@ async function searchDexClassesAsync(unzipApkRoot, grepAppIdPattern) {
|
|
|
114
114
|
.filter(Boolean);
|
|
115
115
|
return new Set(classes);
|
|
116
116
|
}
|
|
117
|
-
exports.searchDexClassesAsync = searchDexClassesAsync;
|
package/build/android/index.js
CHANGED
|
@@ -3,8 +3,7 @@ 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.repackAppAndroidAsync =
|
|
7
|
-
const config_1 = require("@expo/config");
|
|
6
|
+
exports.repackAppAndroidAsync = repackAppAndroidAsync;
|
|
8
7
|
const steps_1 = require("@expo/steps");
|
|
9
8
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
10
9
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
@@ -22,7 +21,7 @@ async function repackAppAndroidAsync(_options) {
|
|
|
22
21
|
const options = await (0, utils_1.normalizeOptionAsync)(_options);
|
|
23
22
|
const { workingDirectory, logger } = options;
|
|
24
23
|
await promises_1.default.mkdir(workingDirectory, { recursive: true });
|
|
25
|
-
const { exp } = (0,
|
|
24
|
+
const { exp } = (0, expo_1.getExpoConfig)(options.projectRoot, {
|
|
26
25
|
isPublicConfig: true,
|
|
27
26
|
skipSDKVersionRequirement: true,
|
|
28
27
|
});
|
|
@@ -89,4 +88,3 @@ async function repackAppAndroidAsync(_options) {
|
|
|
89
88
|
}
|
|
90
89
|
return options.outputPath;
|
|
91
90
|
}
|
|
92
|
-
exports.repackAppAndroidAsync = repackAppAndroidAsync;
|
|
@@ -3,7 +3,11 @@ 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.
|
|
6
|
+
exports.updateResourcesAsync = updateResourcesAsync;
|
|
7
|
+
exports.updateAndroidManifestAsync = updateAndroidManifestAsync;
|
|
8
|
+
exports.parseXmlFileAsync = parseXmlFileAsync;
|
|
9
|
+
exports.buildXmlFileAsync = buildXmlFileAsync;
|
|
10
|
+
exports.queryAppIdFromManifestAsync = queryAppIdFromManifestAsync;
|
|
7
11
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
8
12
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
9
13
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -19,7 +23,6 @@ async function updateResourcesAsync({ config, decodedApkRoot, }) {
|
|
|
19
23
|
stringsXml = stringsXml.replace(/(<string name="app_name">)(.+)(<\/string>)/, `$1${config.name}$3`);
|
|
20
24
|
await promises_1.default.writeFile(stringsXmlPath, stringsXml);
|
|
21
25
|
}
|
|
22
|
-
exports.updateResourcesAsync = updateResourcesAsync;
|
|
23
26
|
/**
|
|
24
27
|
* Update the proto-based AndroidManiest.xml.
|
|
25
28
|
*/
|
|
@@ -53,7 +56,6 @@ async function updateAndroidManifestAsync({ config, androidManiestXml, dexClasse
|
|
|
53
56
|
mutateExpoUpdatesConfigAsync(mainApplicationNode, config, updatesRuntimeVersion);
|
|
54
57
|
}
|
|
55
58
|
}
|
|
56
|
-
exports.updateAndroidManifestAsync = updateAndroidManifestAsync;
|
|
57
59
|
/**
|
|
58
60
|
* Parse the XML file.
|
|
59
61
|
*/
|
|
@@ -63,7 +65,6 @@ async function parseXmlFileAsync(filePath) {
|
|
|
63
65
|
const xmlJs = await parser.parseStringPromise(contents);
|
|
64
66
|
return xmlJs;
|
|
65
67
|
}
|
|
66
|
-
exports.parseXmlFileAsync = parseXmlFileAsync;
|
|
67
68
|
/**
|
|
68
69
|
* Build the XML file from the given node.
|
|
69
70
|
*/
|
|
@@ -72,7 +73,6 @@ async function buildXmlFileAsync(rootNode, filePath) {
|
|
|
72
73
|
const xmlString = builder.buildObject(rootNode);
|
|
73
74
|
await promises_1.default.writeFile(filePath, xmlString);
|
|
74
75
|
}
|
|
75
|
-
exports.buildXmlFileAsync = buildXmlFileAsync;
|
|
76
76
|
/**
|
|
77
77
|
* Query the app ID from the AndroidManiest.xml.
|
|
78
78
|
*/
|
|
@@ -81,7 +81,6 @@ async function queryAppIdFromManifestAsync(androidManiestXml) {
|
|
|
81
81
|
(0, node_assert_1.default)(packageAttr != null, 'Expected package attribute to be present in AndroidManifest.xml');
|
|
82
82
|
return packageAttr;
|
|
83
83
|
}
|
|
84
|
-
exports.queryAppIdFromManifestAsync = queryAppIdFromManifestAsync;
|
|
85
84
|
//#region Internals
|
|
86
85
|
/**
|
|
87
86
|
* Update the `expo-updates` configuration in the Android project.
|
package/build/expo.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export declare function isExpoUpdatesInstalled(projectRoot: string): boolean;
|
|
|
12
12
|
* Resolve the `runtimeVersion` for expo-updates.
|
|
13
13
|
*/
|
|
14
14
|
export declare function resolveRuntimeVersionAsync(options: NormalizedOptions, config: ExpoConfig): Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* A wrapper around `@expo/config`'s `getConfig` function
|
|
17
|
+
* that uses the `@expo/config` package from the project's transitive dependencies.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getExpoConfig(projectRoot: string, options: Parameters<typeof import('@expo/config').getConfig>[1]): ReturnType<typeof import('@expo/config').getConfig>;
|
|
15
20
|
/**
|
|
16
21
|
* Generate JS bundle and assets for the app.
|
|
17
22
|
*/
|
package/build/expo.js
CHANGED
|
@@ -3,9 +3,13 @@ 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.
|
|
7
|
-
|
|
6
|
+
exports.generateAppConfigAsync = generateAppConfigAsync;
|
|
7
|
+
exports.isExpoUpdatesInstalled = isExpoUpdatesInstalled;
|
|
8
|
+
exports.resolveRuntimeVersionAsync = resolveRuntimeVersionAsync;
|
|
9
|
+
exports.getExpoConfig = getExpoConfig;
|
|
10
|
+
exports.generateBundleAssetsAsync = generateBundleAssetsAsync;
|
|
8
11
|
const steps_1 = require("@expo/steps");
|
|
12
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
9
13
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
10
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
11
15
|
const resolve_from_1 = __importDefault(require("resolve-from"));
|
|
@@ -18,15 +22,16 @@ async function generateAppConfigAsync(options, config) {
|
|
|
18
22
|
await promises_1.default.writeFile(appConfigPath, JSON.stringify(config));
|
|
19
23
|
return appConfigPath;
|
|
20
24
|
}
|
|
21
|
-
exports.generateAppConfigAsync = generateAppConfigAsync;
|
|
22
25
|
/**
|
|
23
26
|
* Returns whether expo-updates is installed in the project.
|
|
24
27
|
*/
|
|
25
28
|
function isExpoUpdatesInstalled(projectRoot) {
|
|
26
|
-
const
|
|
29
|
+
const expoConfigPath = resolveExpoConfigPath(projectRoot);
|
|
30
|
+
(0, node_assert_1.default)(expoConfigPath, `Failed to resolve '@expo/config' package in the project`);
|
|
31
|
+
const { getPackageJson } = require(expoConfigPath);
|
|
32
|
+
const packageJson = getPackageJson(projectRoot);
|
|
27
33
|
return !!(packageJson.dependencies && 'expo-updates' in packageJson.dependencies);
|
|
28
34
|
}
|
|
29
|
-
exports.isExpoUpdatesInstalled = isExpoUpdatesInstalled;
|
|
30
35
|
/**
|
|
31
36
|
* Resolve the `runtimeVersion` for expo-updates.
|
|
32
37
|
*/
|
|
@@ -40,7 +45,26 @@ async function resolveRuntimeVersionAsync(options, config) {
|
|
|
40
45
|
const runtimeVersion = JSON.parse(proc.stdout).runtimeVersion;
|
|
41
46
|
return runtimeVersion ?? config.version ?? '1.0.0';
|
|
42
47
|
}
|
|
43
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Resolves the path to the `@expo/config` package in the project.
|
|
50
|
+
*/
|
|
51
|
+
function resolveExpoConfigPath(projectRoot) {
|
|
52
|
+
const expoPackageRoot = resolve_from_1.default.silent(projectRoot, 'expo/package.json');
|
|
53
|
+
if (expoPackageRoot) {
|
|
54
|
+
return resolve_from_1.default.silent(node_path_1.default.dirname(expoPackageRoot), '@expo/config') ?? null;
|
|
55
|
+
}
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A wrapper around `@expo/config`'s `getConfig` function
|
|
60
|
+
* that uses the `@expo/config` package from the project's transitive dependencies.
|
|
61
|
+
*/
|
|
62
|
+
function getExpoConfig(projectRoot, options) {
|
|
63
|
+
const expoConfigPath = resolveExpoConfigPath(projectRoot);
|
|
64
|
+
(0, node_assert_1.default)(expoConfigPath, `Failed to resolve '@expo/config' package in the project`);
|
|
65
|
+
const { getConfig } = require(expoConfigPath);
|
|
66
|
+
return getConfig(projectRoot, options);
|
|
67
|
+
}
|
|
44
68
|
/**
|
|
45
69
|
* Generate JS bundle and assets for the app.
|
|
46
70
|
*/
|
|
@@ -89,7 +113,6 @@ async function generateBundleAssetsAsync(expoConfig, options) {
|
|
|
89
113
|
assetRoot,
|
|
90
114
|
};
|
|
91
115
|
}
|
|
92
|
-
exports.generateBundleAssetsAsync = generateBundleAssetsAsync;
|
|
93
116
|
/**
|
|
94
117
|
* Determine whether Hermes is enabled for the project.
|
|
95
118
|
*/
|
package/build/ios/build-tools.js
CHANGED
|
@@ -3,7 +3,10 @@ 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.
|
|
6
|
+
exports.unzipIpaAsync = unzipIpaAsync;
|
|
7
|
+
exports.updateFilesAsync = updateFilesAsync;
|
|
8
|
+
exports.createIpaAsync = createIpaAsync;
|
|
9
|
+
exports.createResignLane = createResignLane;
|
|
7
10
|
const steps_1 = require("@expo/steps");
|
|
8
11
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
9
12
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
@@ -19,7 +22,6 @@ async function unzipIpaAsync(options) {
|
|
|
19
22
|
(0, node_assert_1.default)(await (0, utils_1.directoryExistsAsync)(appWorkingDirectory));
|
|
20
23
|
return appWorkingDirectory;
|
|
21
24
|
}
|
|
22
|
-
exports.unzipIpaAsync = unzipIpaAsync;
|
|
23
25
|
/**
|
|
24
26
|
* Update some binary files.
|
|
25
27
|
*/
|
|
@@ -32,7 +34,6 @@ async function updateFilesAsync(config, appWorkingDirectory) {
|
|
|
32
34
|
await promises_1.default.rename(node_path_1.default.join(newAppWorkingDirectory, 'HelloWorld'), node_path_1.default.join(newAppWorkingDirectory, config.name));
|
|
33
35
|
return newAppWorkingDirectory;
|
|
34
36
|
}
|
|
35
|
-
exports.updateFilesAsync = updateFilesAsync;
|
|
36
37
|
/**
|
|
37
38
|
* From the given working .app directory, create a new .ipa file.
|
|
38
39
|
*/
|
|
@@ -46,7 +47,6 @@ async function createIpaAsync(options, appWorkingDirectory) {
|
|
|
46
47
|
: { cwd: workingDirectory });
|
|
47
48
|
return outputIpaPath;
|
|
48
49
|
}
|
|
49
|
-
exports.createIpaAsync = createIpaAsync;
|
|
50
50
|
/**
|
|
51
51
|
* Create a Fastfile lane for resigning an IPA.
|
|
52
52
|
*/
|
|
@@ -81,4 +81,3 @@ end
|
|
|
81
81
|
`;
|
|
82
82
|
return fastfileContents.replace(/^\s*[\r\n]/gm, '');
|
|
83
83
|
}
|
|
84
|
-
exports.createResignLane = createResignLane;
|
package/build/ios/index.js
CHANGED
|
@@ -3,8 +3,8 @@ 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.
|
|
7
|
-
|
|
6
|
+
exports.repackAppIosAsync = repackAppIosAsync;
|
|
7
|
+
exports.resignIpaAsync = resignIpaAsync;
|
|
8
8
|
const steps_1 = require("@expo/steps");
|
|
9
9
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
10
10
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
@@ -21,7 +21,7 @@ async function repackAppIosAsync(_options) {
|
|
|
21
21
|
const options = await (0, utils_1.normalizeOptionAsync)(_options);
|
|
22
22
|
const { workingDirectory, logger } = options;
|
|
23
23
|
await promises_1.default.mkdir(workingDirectory, { recursive: true });
|
|
24
|
-
const { exp } = (0,
|
|
24
|
+
const { exp } = (0, expo_1.getExpoConfig)(options.projectRoot, {
|
|
25
25
|
isPublicConfig: true,
|
|
26
26
|
skipSDKVersionRequirement: true,
|
|
27
27
|
});
|
|
@@ -75,7 +75,6 @@ async function repackAppIosAsync(_options) {
|
|
|
75
75
|
}
|
|
76
76
|
return options.outputPath;
|
|
77
77
|
}
|
|
78
|
-
exports.repackAppIosAsync = repackAppIosAsync;
|
|
79
78
|
/**
|
|
80
79
|
* Resign an IPA by fastlane.
|
|
81
80
|
*/
|
|
@@ -92,4 +91,3 @@ async function resignIpaAsync(ipaPath, signingOptions, _options) {
|
|
|
92
91
|
env: options.env,
|
|
93
92
|
});
|
|
94
93
|
}
|
|
95
|
-
exports.resignIpaAsync = resignIpaAsync;
|
package/build/ios/resources.js
CHANGED
|
@@ -3,7 +3,10 @@ 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.
|
|
6
|
+
exports.updateInfoPlistAsync = updateInfoPlistAsync;
|
|
7
|
+
exports.updateExpoPlistAsync = updateExpoPlistAsync;
|
|
8
|
+
exports.queryAppIdFromPlistAsync = queryAppIdFromPlistAsync;
|
|
9
|
+
exports.addBundleAssetsAsync = addBundleAssetsAsync;
|
|
7
10
|
const plist_1 = __importDefault(require("@expo/plist"));
|
|
8
11
|
const steps_1 = require("@expo/steps");
|
|
9
12
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
@@ -44,7 +47,6 @@ async function updateInfoPlistAsync({ config, infoPlistPath, originalAppId, opti
|
|
|
44
47
|
};
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
|
-
exports.updateInfoPlistAsync = updateInfoPlistAsync;
|
|
48
50
|
/**
|
|
49
51
|
* Update the Expo.plist file.
|
|
50
52
|
*/
|
|
@@ -63,7 +65,6 @@ async function updateExpoPlistAsync(config, expoPlistPath, runtimeVersion, optio
|
|
|
63
65
|
};
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
|
-
exports.updateExpoPlistAsync = updateExpoPlistAsync;
|
|
67
68
|
/**
|
|
68
69
|
* Query the app ID from the Info.plist file.
|
|
69
70
|
*/
|
|
@@ -76,7 +77,6 @@ async function queryAppIdFromPlistAsync(infoPlistPath, options) {
|
|
|
76
77
|
(0, node_assert_1.default)(appId, 'Expected `CFBundleIdentifier` to be present in Info.plist');
|
|
77
78
|
return appId;
|
|
78
79
|
}
|
|
79
|
-
exports.queryAppIdFromPlistAsync = queryAppIdFromPlistAsync;
|
|
80
80
|
/**
|
|
81
81
|
* Add the bundle assets to the app.
|
|
82
82
|
*/
|
|
@@ -90,7 +90,6 @@ async function addBundleAssetsAsync({ appWorkingDirectory, assetRoot, bundleOutp
|
|
|
90
90
|
// so we just need to copy the assets to the app root.
|
|
91
91
|
await copyDirAsync(assetRoot, appWorkingDirectory);
|
|
92
92
|
}
|
|
93
|
-
exports.addBundleAssetsAsync = addBundleAssetsAsync;
|
|
94
93
|
//#region Internals
|
|
95
94
|
async function updateBinaryPlistAsync(plistPath, options, updater) {
|
|
96
95
|
await (0, steps_1.spawnAsync)('plutil', ['-convert', 'xml1', plistPath], options.verbose ? { logger: options.logger, stdio: 'pipe' } : undefined);
|
package/build/types.d.ts
CHANGED
package/build/utils.js
CHANGED
|
@@ -3,7 +3,9 @@ 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.
|
|
6
|
+
exports.directoryExistsAsync = directoryExistsAsync;
|
|
7
|
+
exports.requireNotNull = requireNotNull;
|
|
8
|
+
exports.normalizeOptionAsync = normalizeOptionAsync;
|
|
7
9
|
const node_assert_1 = __importDefault(require("node:assert"));
|
|
8
10
|
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
9
11
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -13,7 +15,6 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
13
15
|
async function directoryExistsAsync(file) {
|
|
14
16
|
return (await promises_1.default.stat(file).catch(() => null))?.isDirectory() ?? false;
|
|
15
17
|
}
|
|
16
|
-
exports.directoryExistsAsync = directoryExistsAsync;
|
|
17
18
|
/**
|
|
18
19
|
* Return the non-null value.
|
|
19
20
|
*/
|
|
@@ -21,7 +22,6 @@ function requireNotNull(value) {
|
|
|
21
22
|
(0, node_assert_1.default)(value != null, 'Expected value to be non-null');
|
|
22
23
|
return value;
|
|
23
24
|
}
|
|
24
|
-
exports.requireNotNull = requireNotNull;
|
|
25
25
|
/**
|
|
26
26
|
* Normalize the options.
|
|
27
27
|
*/
|
|
@@ -33,4 +33,3 @@ async function normalizeOptionAsync(options) {
|
|
|
33
33
|
outputPath: options.outputPath ?? node_path_1.default.join(options.projectRoot, `repacked${fileExt}`),
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
exports.normalizeOptionAsync = normalizeOptionAsync;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/repack-app",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Repacking tool for Expo apps",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -25,35 +25,28 @@
|
|
|
25
25
|
"author": "650 Industries, Inc.",
|
|
26
26
|
"license": "BUSL-1.1",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@expo/logger": "^1.0.
|
|
29
|
-
"@expo/
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
28
|
+
"@expo/logger": "^1.0.117",
|
|
29
|
+
"@expo/plist": "^0.2.0",
|
|
30
|
+
"@expo/steps": "^1.0.156",
|
|
31
|
+
"commander": "^13.0.0",
|
|
32
|
+
"glob": "^11.0.0",
|
|
33
|
+
"picocolors": "^1.1.1",
|
|
33
34
|
"resolve-from": "^5.0.0",
|
|
34
|
-
"temp-dir": "^
|
|
35
|
+
"temp-dir": "^3.0.0",
|
|
35
36
|
"xml2js": "^0.6.2"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@expo/config": "^
|
|
39
|
-
"@tsconfig/
|
|
39
|
+
"@expo/config": "^10.0.6",
|
|
40
|
+
"@tsconfig/node22": "^22.0.0",
|
|
40
41
|
"@types/xml2js": "^0.4.14",
|
|
41
42
|
"eslint": "^8.57.0",
|
|
42
|
-
"expo-module-scripts": "^
|
|
43
|
+
"expo-module-scripts": "^4.0.2",
|
|
43
44
|
"jest": "^29.7.0",
|
|
44
|
-
"jest-snapshot-prettier": "npm:prettier@^2",
|
|
45
|
-
"ts-jest": "^29.
|
|
46
|
-
"typescript": "^5.
|
|
47
|
-
},
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"@expo/config": "*"
|
|
50
|
-
},
|
|
51
|
-
"peerDependenciesMeta": {
|
|
52
|
-
"@expo/config": {
|
|
53
|
-
"optional": true
|
|
54
|
-
}
|
|
45
|
+
"jest-snapshot-prettier": "npm:prettier@^3.4.2",
|
|
46
|
+
"ts-jest": "^29.2.5",
|
|
47
|
+
"typescript": "^5.7.2"
|
|
55
48
|
},
|
|
56
49
|
"volta": {
|
|
57
|
-
"node": "22.
|
|
50
|
+
"node": "22.12.0"
|
|
58
51
|
}
|
|
59
52
|
}
|