expo-targets 0.2.8 → 0.3.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/README.md +23 -55
- package/bin/expo-targets.js +2 -0
- package/bin/export-safari-bundle.js +2 -0
- package/build/metro/src/index.d.ts +1 -1
- package/build/metro/src/index.d.ts.map +1 -1
- package/build/metro/src/index.js +5 -4
- package/build/metro/src/index.js.map +1 -1
- package/build/metro/src/{withTargetsMetro.d.ts → withTargets.d.ts} +6 -1
- package/build/metro/src/withTargets.d.ts.map +1 -0
- package/{metro/build/withTargetsMetro.js → build/metro/src/withTargets.js} +13 -3
- package/build/metro/src/withTargets.js.map +1 -0
- package/build/plugin/src/codegen/collectRuntimeConfigs.d.ts +31 -0
- package/build/plugin/src/codegen/collectRuntimeConfigs.d.ts.map +1 -0
- package/build/plugin/src/codegen/collectRuntimeConfigs.js +57 -0
- package/build/plugin/src/codegen/collectRuntimeConfigs.js.map +1 -0
- package/build/plugin/src/codegen/index.d.ts +7 -0
- package/build/plugin/src/codegen/index.d.ts.map +1 -0
- package/build/plugin/src/codegen/index.js +13 -0
- package/build/plugin/src/codegen/index.js.map +1 -0
- package/build/plugin/src/codegen/typedTargets.d.ts +10 -0
- package/build/plugin/src/codegen/typedTargets.d.ts.map +1 -0
- package/build/plugin/src/codegen/typedTargets.js +41 -0
- package/build/plugin/src/codegen/typedTargets.js.map +1 -0
- package/build/plugin/src/codegen/warnIfSealedHandEdited.d.ts +12 -0
- package/build/plugin/src/codegen/warnIfSealedHandEdited.d.ts.map +1 -0
- package/build/plugin/src/codegen/warnIfSealedHandEdited.js +32 -0
- package/build/plugin/src/codegen/warnIfSealedHandEdited.js.map +1 -0
- package/build/plugin/src/ensureHostAppGroups.d.ts +16 -0
- package/build/plugin/src/ensureHostAppGroups.d.ts.map +1 -0
- package/build/plugin/src/ensureHostAppGroups.js +95 -0
- package/build/plugin/src/ensureHostAppGroups.js.map +1 -0
- package/build/plugin/src/ios/apply/fs/applyTargetPlan.d.ts.map +1 -1
- package/build/plugin/src/ios/apply/fs/applyTargetPlan.js +3 -1
- package/build/plugin/src/ios/apply/fs/applyTargetPlan.js.map +1 -1
- package/build/plugin/src/ios/apply/fs/entitlements.d.ts +5 -1
- package/build/plugin/src/ios/apply/fs/entitlements.d.ts.map +1 -1
- package/build/plugin/src/ios/apply/fs/entitlements.js +13 -1
- package/build/plugin/src/ios/apply/fs/entitlements.js.map +1 -1
- package/build/plugin/src/ios/apply/fs/safari.d.ts +4 -1
- package/build/plugin/src/ios/apply/fs/safari.d.ts.map +1 -1
- package/build/plugin/src/ios/apply/fs/safari.js +19 -1
- package/build/plugin/src/ios/apply/fs/safari.js.map +1 -1
- package/build/plugin/src/ios/apply/fs/swift.d.ts +4 -1
- package/build/plugin/src/ios/apply/fs/swift.d.ts.map +1 -1
- package/build/plugin/src/ios/apply/fs/swift.js +11 -2
- package/build/plugin/src/ios/apply/fs/swift.js.map +1 -1
- package/build/plugin/src/ios/apply/pbx/applyTargetPlan.d.ts.map +1 -1
- package/build/plugin/src/ios/apply/pbx/applyTargetPlan.js +9 -0
- package/build/plugin/src/ios/apply/pbx/applyTargetPlan.js.map +1 -1
- package/build/plugin/src/ios/apply/pbx/index.d.ts +1 -0
- package/build/plugin/src/ios/apply/pbx/index.d.ts.map +1 -1
- package/build/plugin/src/ios/apply/pbx/index.js +4 -1
- package/build/plugin/src/ios/apply/pbx/index.js.map +1 -1
- package/build/plugin/src/ios/apply/pbx/safariWebBundle.d.ts +15 -0
- package/build/plugin/src/ios/apply/pbx/safariWebBundle.d.ts.map +1 -0
- package/build/plugin/src/ios/apply/pbx/safariWebBundle.js +99 -0
- package/build/plugin/src/ios/apply/pbx/safariWebBundle.js.map +1 -0
- package/build/plugin/src/ios/apply/podfile/podfile.d.ts +0 -2
- package/build/plugin/src/ios/apply/podfile/podfile.d.ts.map +1 -1
- package/build/plugin/src/ios/apply/podfile/podfile.js +0 -2
- package/build/plugin/src/ios/apply/podfile/podfile.js.map +1 -1
- package/build/plugin/src/ios/config-plugins/withEntitlements.d.ts.map +1 -1
- package/build/plugin/src/ios/config-plugins/withEntitlements.js +4 -1
- package/build/plugin/src/ios/config-plugins/withEntitlements.js.map +1 -1
- package/build/plugin/src/ios/observe/podsRb.d.ts +2 -1
- package/build/plugin/src/ios/observe/podsRb.d.ts.map +1 -1
- package/build/plugin/src/ios/observe/podsRb.js +2 -1
- package/build/plugin/src/ios/observe/podsRb.js.map +1 -1
- package/build/plugin/src/ios/plan/buildInfoPlist.js +1 -1
- package/build/plugin/src/ios/plan/buildInfoPlist.js.map +1 -1
- package/build/plugin/src/ios/plan/compose.d.ts.map +1 -1
- package/build/plugin/src/ios/plan/compose.js +3 -0
- package/build/plugin/src/ios/plan/compose.js.map +1 -1
- package/build/plugin/src/ios/plan/index.d.ts +2 -1
- package/build/plugin/src/ios/plan/index.d.ts.map +1 -1
- package/build/plugin/src/ios/plan/index.js +3 -1
- package/build/plugin/src/ios/plan/index.js.map +1 -1
- package/build/plugin/src/ios/plan/safari.d.ts.map +1 -1
- package/build/plugin/src/ios/plan/safari.js +1 -0
- package/build/plugin/src/ios/plan/safari.js.map +1 -1
- package/build/plugin/src/ios/plan/safariWebBundle.d.ts +7 -0
- package/build/plugin/src/ios/plan/safariWebBundle.d.ts.map +1 -0
- package/build/plugin/src/ios/plan/safariWebBundle.js +53 -0
- package/build/plugin/src/ios/plan/safariWebBundle.js.map +1 -0
- package/build/plugin/src/ios/plan/types.d.ts +12 -0
- package/build/plugin/src/ios/plan/types.d.ts.map +1 -1
- package/build/plugin/src/ios/safari/exportSafariWebBundle.d.ts +20 -0
- package/build/plugin/src/ios/safari/exportSafariWebBundle.d.ts.map +1 -0
- package/build/plugin/src/ios/safari/exportSafariWebBundle.js +119 -0
- package/build/plugin/src/ios/safari/exportSafariWebBundle.js.map +1 -0
- package/build/plugin/src/ios/safari/exportSafariWebBundleCli.d.ts +2 -0
- package/build/plugin/src/ios/safari/exportSafariWebBundleCli.d.ts.map +1 -0
- package/build/plugin/src/ios/safari/exportSafariWebBundleCli.js +75 -0
- package/build/plugin/src/ios/safari/exportSafariWebBundleCli.js.map +1 -0
- package/build/plugin/src/ios/utils/paths.d.ts +2 -0
- package/build/plugin/src/ios/utils/paths.d.ts.map +1 -1
- package/build/plugin/src/ios/utils/paths.js +6 -1
- package/build/plugin/src/ios/utils/paths.js.map +1 -1
- package/build/plugin/src/ios/utils/safari.d.ts +11 -4
- package/build/plugin/src/ios/utils/safari.d.ts.map +1 -1
- package/build/plugin/src/ios/utils/safari.js +57 -21
- package/build/plugin/src/ios/utils/safari.js.map +1 -1
- package/build/plugin/src/withTargetsDir.d.ts.map +1 -1
- package/build/plugin/src/withTargetsDir.js +18 -2
- package/build/plugin/src/withTargetsDir.js.map +1 -1
- package/cli/build/checks/appGroups.d.ts +3 -0
- package/cli/build/checks/appGroups.d.ts.map +1 -0
- package/cli/build/checks/appGroups.js +56 -0
- package/cli/build/checks/appGroups.js.map +1 -0
- package/cli/build/checks/dualWidgets.d.ts +3 -0
- package/cli/build/checks/dualWidgets.d.ts.map +1 -0
- package/cli/build/checks/dualWidgets.js +31 -0
- package/cli/build/checks/dualWidgets.js.map +1 -0
- package/cli/build/checks/entries.d.ts +3 -0
- package/cli/build/checks/entries.d.ts.map +1 -0
- package/cli/build/checks/entries.js +52 -0
- package/cli/build/checks/entries.js.map +1 -0
- package/cli/build/checks/metro.d.ts +3 -0
- package/cli/build/checks/metro.d.ts.map +1 -0
- package/cli/build/checks/metro.js +67 -0
- package/cli/build/checks/metro.js.map +1 -0
- package/cli/build/checks/nameSync.d.ts +3 -0
- package/cli/build/checks/nameSync.d.ts.map +1 -0
- package/cli/build/checks/nameSync.js +107 -0
- package/cli/build/checks/nameSync.js.map +1 -0
- package/cli/build/checks/plugin.d.ts +3 -0
- package/cli/build/checks/plugin.d.ts.map +1 -0
- package/cli/build/checks/plugin.js +27 -0
- package/cli/build/checks/plugin.js.map +1 -0
- package/cli/build/checks/sealedZone.d.ts +3 -0
- package/cli/build/checks/sealedZone.d.ts.map +1 -0
- package/cli/build/checks/sealedZone.js +101 -0
- package/cli/build/checks/sealedZone.js.map +1 -0
- package/cli/build/doctor.d.ts +9 -0
- package/cli/build/doctor.d.ts.map +1 -0
- package/cli/build/doctor.js +101 -0
- package/cli/build/doctor.js.map +1 -0
- package/cli/build/exportSafari.d.ts +2 -0
- package/cli/build/exportSafari.d.ts.map +1 -0
- package/cli/build/exportSafari.js +42 -0
- package/cli/build/exportSafari.js.map +1 -0
- package/cli/build/generate.d.ts +2 -0
- package/cli/build/generate.d.ts.map +1 -0
- package/cli/build/generate.js +27 -0
- package/cli/build/generate.js.map +1 -0
- package/cli/build/index.d.ts +3 -0
- package/cli/build/index.d.ts.map +1 -0
- package/cli/build/index.js +79 -0
- package/cli/build/index.js.map +1 -0
- package/cli/build/orphans.d.ts +14 -0
- package/cli/build/orphans.d.ts.map +1 -0
- package/cli/build/orphans.js +184 -0
- package/cli/build/orphans.js.map +1 -0
- package/cli/build/project.d.ts +3 -0
- package/cli/build/project.d.ts.map +1 -0
- package/cli/build/project.js +114 -0
- package/cli/build/project.js.map +1 -0
- package/cli/build/sync.d.ts +8 -0
- package/cli/build/sync.d.ts.map +1 -0
- package/cli/build/sync.js +154 -0
- package/cli/build/sync.js.map +1 -0
- package/cli/build/types.d.ts +44 -0
- package/cli/build/types.d.ts.map +1 -0
- package/cli/build/types.js +3 -0
- package/cli/build/types.js.map +1 -0
- package/metro/build/index.d.ts +1 -1
- package/metro/build/index.d.ts.map +1 -1
- package/metro/build/index.js +5 -4
- package/metro/build/index.js.map +1 -1
- package/metro/build/{withTargetsMetro.d.ts → withTargets.d.ts} +6 -1
- package/metro/build/withTargets.d.ts.map +1 -0
- package/{build/metro/src/withTargetsMetro.js → metro/build/withTargets.js} +13 -3
- package/metro/build/withTargets.js.map +1 -0
- package/package.json +21 -2
- package/plugin/build/codegen/collectRuntimeConfigs.d.ts +31 -0
- package/plugin/build/codegen/collectRuntimeConfigs.d.ts.map +1 -0
- package/plugin/build/codegen/collectRuntimeConfigs.js +57 -0
- package/plugin/build/codegen/collectRuntimeConfigs.js.map +1 -0
- package/plugin/build/codegen/index.d.ts +7 -0
- package/plugin/build/codegen/index.d.ts.map +1 -0
- package/plugin/build/codegen/index.js +13 -0
- package/plugin/build/codegen/index.js.map +1 -0
- package/plugin/build/codegen/typedTargets.d.ts +10 -0
- package/plugin/build/codegen/typedTargets.d.ts.map +1 -0
- package/plugin/build/codegen/typedTargets.js +41 -0
- package/plugin/build/codegen/typedTargets.js.map +1 -0
- package/plugin/build/codegen/warnIfSealedHandEdited.d.ts +12 -0
- package/plugin/build/codegen/warnIfSealedHandEdited.d.ts.map +1 -0
- package/plugin/build/codegen/warnIfSealedHandEdited.js +32 -0
- package/plugin/build/codegen/warnIfSealedHandEdited.js.map +1 -0
- package/plugin/build/ensureHostAppGroups.d.ts +16 -0
- package/plugin/build/ensureHostAppGroups.d.ts.map +1 -0
- package/plugin/build/ensureHostAppGroups.js +95 -0
- package/plugin/build/ensureHostAppGroups.js.map +1 -0
- package/plugin/build/ios/apply/fs/applyTargetPlan.d.ts.map +1 -1
- package/plugin/build/ios/apply/fs/applyTargetPlan.js +3 -1
- package/plugin/build/ios/apply/fs/applyTargetPlan.js.map +1 -1
- package/plugin/build/ios/apply/fs/entitlements.d.ts +5 -1
- package/plugin/build/ios/apply/fs/entitlements.d.ts.map +1 -1
- package/plugin/build/ios/apply/fs/entitlements.js +13 -1
- package/plugin/build/ios/apply/fs/entitlements.js.map +1 -1
- package/plugin/build/ios/apply/fs/safari.d.ts +4 -1
- package/plugin/build/ios/apply/fs/safari.d.ts.map +1 -1
- package/plugin/build/ios/apply/fs/safari.js +19 -1
- package/plugin/build/ios/apply/fs/safari.js.map +1 -1
- package/plugin/build/ios/apply/fs/swift.d.ts +4 -1
- package/plugin/build/ios/apply/fs/swift.d.ts.map +1 -1
- package/plugin/build/ios/apply/fs/swift.js +11 -2
- package/plugin/build/ios/apply/fs/swift.js.map +1 -1
- package/plugin/build/ios/apply/pbx/applyTargetPlan.d.ts.map +1 -1
- package/plugin/build/ios/apply/pbx/applyTargetPlan.js +9 -0
- package/plugin/build/ios/apply/pbx/applyTargetPlan.js.map +1 -1
- package/plugin/build/ios/apply/pbx/index.d.ts +1 -0
- package/plugin/build/ios/apply/pbx/index.d.ts.map +1 -1
- package/plugin/build/ios/apply/pbx/index.js +4 -1
- package/plugin/build/ios/apply/pbx/index.js.map +1 -1
- package/plugin/build/ios/apply/pbx/safariWebBundle.d.ts +15 -0
- package/plugin/build/ios/apply/pbx/safariWebBundle.d.ts.map +1 -0
- package/plugin/build/ios/apply/pbx/safariWebBundle.js +99 -0
- package/plugin/build/ios/apply/pbx/safariWebBundle.js.map +1 -0
- package/plugin/build/ios/apply/podfile/podfile.d.ts +0 -2
- package/plugin/build/ios/apply/podfile/podfile.d.ts.map +1 -1
- package/plugin/build/ios/apply/podfile/podfile.js +0 -2
- package/plugin/build/ios/apply/podfile/podfile.js.map +1 -1
- package/plugin/build/ios/config-plugins/withEntitlements.d.ts.map +1 -1
- package/plugin/build/ios/config-plugins/withEntitlements.js +4 -1
- package/plugin/build/ios/config-plugins/withEntitlements.js.map +1 -1
- package/plugin/build/ios/observe/podsRb.d.ts +2 -1
- package/plugin/build/ios/observe/podsRb.d.ts.map +1 -1
- package/plugin/build/ios/observe/podsRb.js +2 -1
- package/plugin/build/ios/observe/podsRb.js.map +1 -1
- package/plugin/build/ios/plan/buildInfoPlist.js +1 -1
- package/plugin/build/ios/plan/buildInfoPlist.js.map +1 -1
- package/plugin/build/ios/plan/compose.d.ts.map +1 -1
- package/plugin/build/ios/plan/compose.js +3 -0
- package/plugin/build/ios/plan/compose.js.map +1 -1
- package/plugin/build/ios/plan/index.d.ts +2 -1
- package/plugin/build/ios/plan/index.d.ts.map +1 -1
- package/plugin/build/ios/plan/index.js +3 -1
- package/plugin/build/ios/plan/index.js.map +1 -1
- package/plugin/build/ios/plan/safari.d.ts.map +1 -1
- package/plugin/build/ios/plan/safari.js +1 -0
- package/plugin/build/ios/plan/safari.js.map +1 -1
- package/plugin/build/ios/plan/safariWebBundle.d.ts +7 -0
- package/plugin/build/ios/plan/safariWebBundle.d.ts.map +1 -0
- package/plugin/build/ios/plan/safariWebBundle.js +53 -0
- package/plugin/build/ios/plan/safariWebBundle.js.map +1 -0
- package/plugin/build/ios/plan/types.d.ts +12 -0
- package/plugin/build/ios/plan/types.d.ts.map +1 -1
- package/plugin/build/ios/safari/exportSafariWebBundle.d.ts +20 -0
- package/plugin/build/ios/safari/exportSafariWebBundle.d.ts.map +1 -0
- package/plugin/build/ios/safari/exportSafariWebBundle.js +119 -0
- package/plugin/build/ios/safari/exportSafariWebBundle.js.map +1 -0
- package/plugin/build/ios/safari/exportSafariWebBundleCli.d.ts +2 -0
- package/plugin/build/ios/safari/exportSafariWebBundleCli.d.ts.map +1 -0
- package/plugin/build/ios/safari/exportSafariWebBundleCli.js +75 -0
- package/plugin/build/ios/safari/exportSafariWebBundleCli.js.map +1 -0
- package/plugin/build/ios/templates/ReactNativeViewController.swift +58 -19
- package/plugin/build/ios/utils/paths.d.ts +2 -0
- package/plugin/build/ios/utils/paths.d.ts.map +1 -1
- package/plugin/build/ios/utils/paths.js +6 -1
- package/plugin/build/ios/utils/paths.js.map +1 -1
- package/plugin/build/ios/utils/safari.d.ts +11 -4
- package/plugin/build/ios/utils/safari.d.ts.map +1 -1
- package/plugin/build/ios/utils/safari.js +57 -21
- package/plugin/build/ios/utils/safari.js.map +1 -1
- package/plugin/build/withTargetsDir.d.ts.map +1 -1
- package/plugin/build/withTargetsDir.js +18 -2
- package/plugin/build/withTargetsDir.js.map +1 -1
- package/build/metro/src/withTargetsMetro.d.ts.map +0 -1
- package/build/metro/src/withTargetsMetro.js.map +0 -1
- package/metro/build/withTargetsMetro.d.ts.map +0 -1
- package/metro/build/withTargetsMetro.js.map +0 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.checkNameSync = void 0;
|
|
30
|
+
const fs = __importStar(require("node:fs"));
|
|
31
|
+
const path = __importStar(require("node:path"));
|
|
32
|
+
const parser_1 = require("@babel/parser");
|
|
33
|
+
const traverse_1 = __importDefault(require("@babel/traverse"));
|
|
34
|
+
function parseCreateTargetName(filePath) {
|
|
35
|
+
const source = fs.readFileSync(filePath, 'utf8');
|
|
36
|
+
const ast = (0, parser_1.parse)(source, {
|
|
37
|
+
sourceType: 'module',
|
|
38
|
+
plugins: ['typescript', 'jsx'],
|
|
39
|
+
});
|
|
40
|
+
let found = null;
|
|
41
|
+
(0, traverse_1.default)(ast, {
|
|
42
|
+
CallExpression(path) {
|
|
43
|
+
const callee = path.node.callee;
|
|
44
|
+
if (callee.type !== 'Identifier' || callee.name !== 'createTarget') {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const arg = path.node.arguments[0];
|
|
48
|
+
if (arg?.type === 'StringLiteral') {
|
|
49
|
+
found = arg.value;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
return found;
|
|
54
|
+
}
|
|
55
|
+
function helperPath(targetDir) {
|
|
56
|
+
for (const name of ['index.ts', 'index.tsx', 'index.js', 'index.jsx']) {
|
|
57
|
+
const candidate = path.join(targetDir, name);
|
|
58
|
+
if (fs.existsSync(candidate)) {
|
|
59
|
+
return candidate;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
function checkNameSync(ctx) {
|
|
65
|
+
const failures = [];
|
|
66
|
+
for (const target of ctx.targets) {
|
|
67
|
+
const configName = target.config.name;
|
|
68
|
+
if (!configName) {
|
|
69
|
+
failures.push({
|
|
70
|
+
ok: false,
|
|
71
|
+
level: 'error',
|
|
72
|
+
title: 'Name sync',
|
|
73
|
+
message: `targets/${target.dirName}: missing "name" in expo-target.config`,
|
|
74
|
+
fix: 'Set "name" to match createTarget(\'...\') in the target index file',
|
|
75
|
+
});
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const helper = helperPath(path.dirname(target.configPath));
|
|
79
|
+
if (!helper) {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const createName = parseCreateTargetName(helper);
|
|
83
|
+
if (!createName) {
|
|
84
|
+
failures.push({
|
|
85
|
+
ok: false,
|
|
86
|
+
level: 'error',
|
|
87
|
+
title: 'Name sync',
|
|
88
|
+
message: `targets/${target.dirName}: could not find createTarget('...') in ${path.basename(helper)}`,
|
|
89
|
+
fix: `Add: export const x = createTarget('${configName}');`,
|
|
90
|
+
});
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (createName === configName) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
failures.push({
|
|
97
|
+
ok: false,
|
|
98
|
+
level: 'error',
|
|
99
|
+
title: 'Name sync',
|
|
100
|
+
message: `targets/${target.dirName}: config name "${configName}" ≠ createTarget('${createName}')`,
|
|
101
|
+
fix: `Align expo-target.config "name" and createTarget('${configName}')`,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return failures;
|
|
105
|
+
}
|
|
106
|
+
exports.checkNameSync = checkNameSync;
|
|
107
|
+
//# sourceMappingURL=nameSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nameSync.js","sourceRoot":"","sources":["../../src/checks/nameSync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA8B;AAC9B,gDAAkC;AAClC,0CAAsC;AACtC,+DAAuC;AAIvC,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,MAAM,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjD,MAAM,GAAG,GAAG,IAAA,cAAK,EAAC,MAAM,EAAE;QACxB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC;KAC/B,CAAC,CAAC;IAEH,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,IAAA,kBAAQ,EAAC,GAAG,EAAE;QACZ,cAAc,CAAC,IAAI;YACjB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAChC,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY,IAAI,MAAM,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;gBACnE,OAAO;YACT,CAAC;YACD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B,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,QAAQ,CAAC,IAAI,CAAC;gBACZ,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,OAAO;gBACd,KAAK,EAAE,WAAW;gBAClB,OAAO,EAAE,WAAW,MAAM,CAAC,OAAO,2CAA2C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBACpG,GAAG,EAAE,uCAAuC,UAAU,KAAK;aAC5D,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QAED,IAAI,UAAU,KAAK,UAAU,EAAE,CAAC;YAC9B,SAAS;QACX,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC;YACZ,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,WAAW,MAAM,CAAC,OAAO,kBAAkB,UAAU,qBAAqB,UAAU,IAAI;YACjG,GAAG,EAAE,qDAAqD,UAAU,IAAI;SACzE,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AA/CD,sCA+CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/checks/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAW5D,wBAAgB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,WAAW,GAAG,IAAI,CAenE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkPlugin = void 0;
|
|
4
|
+
function hasExpoTargetsPlugin(plugins) {
|
|
5
|
+
return plugins.some((plugin) => {
|
|
6
|
+
if (plugin === 'expo-targets') {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
return Array.isArray(plugin) && plugin[0] === 'expo-targets';
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function checkPlugin(ctx) {
|
|
13
|
+
if (hasExpoTargetsPlugin(ctx.plugins)) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
ok: false,
|
|
18
|
+
level: 'error',
|
|
19
|
+
title: 'Expo plugin',
|
|
20
|
+
message: 'expo-targets is missing from app config plugins',
|
|
21
|
+
fix: 'Add to app.json:\n' +
|
|
22
|
+
' "plugins": ["expo-targets"]\n' +
|
|
23
|
+
'Or run: npx create-expo-target (auto-wires host)',
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.checkPlugin = checkPlugin;
|
|
27
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/checks/plugin.ts"],"names":[],"mappings":";;;AAEA,SAAS,oBAAoB,CAAC,OAAkB;IAC9C,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,WAAW,CAAC,GAAmB;IAC7C,IAAI,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,aAAa;QACpB,OAAO,EAAE,iDAAiD;QAC1D,GAAG,EACD,oBAAoB;YACpB,iCAAiC;YACjC,kDAAkD;KACrD,CAAC;AACJ,CAAC;AAfD,kCAeC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sealedZone.d.ts","sourceRoot":"","sources":["../../src/checks/sealedZone.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAsC5D,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,WAAW,EAAE,CAyCjE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.warnSealedZone = void 0;
|
|
27
|
+
const node_child_process_1 = require("node:child_process");
|
|
28
|
+
const fs = __importStar(require("node:fs"));
|
|
29
|
+
const glob_1 = require("glob");
|
|
30
|
+
function sealedDirs(projectRoot) {
|
|
31
|
+
return (0, glob_1.globSync)('ios/*/ExpoTargetsGenerated', {
|
|
32
|
+
cwd: projectRoot,
|
|
33
|
+
absolute: true,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function gitTrackedSealed(projectRoot) {
|
|
37
|
+
try {
|
|
38
|
+
const out = (0, node_child_process_1.execSync)('git ls-files -- "ios/*/ExpoTargetsGenerated"', {
|
|
39
|
+
cwd: projectRoot,
|
|
40
|
+
encoding: 'utf8',
|
|
41
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
42
|
+
}).trim();
|
|
43
|
+
return out ? out.split('\n') : [];
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function gitDirtySealed(projectRoot) {
|
|
50
|
+
try {
|
|
51
|
+
const out = (0, node_child_process_1.execSync)('git status --porcelain -- "ios/*/ExpoTargetsGenerated"', {
|
|
52
|
+
cwd: projectRoot,
|
|
53
|
+
encoding: 'utf8',
|
|
54
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
55
|
+
}).trim();
|
|
56
|
+
return out ? out.split('\n').map((line) => line.slice(3)) : [];
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function warnSealedZone(ctx) {
|
|
63
|
+
const dirs = sealedDirs(ctx.projectRoot);
|
|
64
|
+
if (dirs.length === 0) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
const warnings = [];
|
|
68
|
+
const tracked = gitTrackedSealed(ctx.projectRoot);
|
|
69
|
+
if (tracked.length > 0) {
|
|
70
|
+
warnings.push({
|
|
71
|
+
ok: false,
|
|
72
|
+
level: 'warn',
|
|
73
|
+
title: 'Sealed zone',
|
|
74
|
+
message: `${tracked.length} file(s) under ExpoTargetsGenerated are tracked by git`,
|
|
75
|
+
fix: 'Remove from git; deepen under targets/<name>/ios/ instead',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
const dirty = gitDirtySealed(ctx.projectRoot);
|
|
79
|
+
if (dirty.length > 0) {
|
|
80
|
+
warnings.push({
|
|
81
|
+
ok: false,
|
|
82
|
+
level: 'warn',
|
|
83
|
+
title: 'Sealed zone',
|
|
84
|
+
message: `ExpoTargetsGenerated has ${dirty.length} uncommitted change(s)`,
|
|
85
|
+
fix: 'Do not hand-edit ios/*/ExpoTargetsGenerated — move changes to targets/*/ios/',
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
const hasContent = dirs.some((dir) => fs.readdirSync(dir).length > 0);
|
|
89
|
+
if (hasContent && warnings.length === 0) {
|
|
90
|
+
warnings.push({
|
|
91
|
+
ok: false,
|
|
92
|
+
level: 'warn',
|
|
93
|
+
title: 'Sealed zone',
|
|
94
|
+
message: 'ExpoTargetsGenerated exists (CNG output)',
|
|
95
|
+
fix: 'Never edit ios/*/ExpoTargetsGenerated — deepen under targets/<name>/ios/',
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return warnings;
|
|
99
|
+
}
|
|
100
|
+
exports.warnSealedZone = warnSealedZone;
|
|
101
|
+
//# sourceMappingURL=sealedZone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sealedZone.js","sourceRoot":"","sources":["../../src/checks/sealedZone.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA8C;AAC9C,4CAA8B;AAC9B,+BAAgC;AAIhC,SAAS,UAAU,CAAC,WAAmB;IACrC,OAAO,IAAA,eAAQ,EAAC,4BAA4B,EAAE;QAC5C,GAAG,EAAE,WAAW;QAChB,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,WAAmB;IAC3C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAA,6BAAQ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,IAAI,CAAC;YACZ,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,wDAAwD;YAClF,GAAG,EAAE,2DAA2D;SACjE,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC9C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,QAAQ,CAAC,IAAI,CAAC;YACZ,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,4BAA4B,KAAK,CAAC,MAAM,wBAAwB;YACzE,GAAG,EAAE,8EAA8E;SACpF,CAAC,CAAC;IACL,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtE,IAAI,UAAU,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxC,QAAQ,CAAC,IAAI,CAAC;YACZ,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,0CAA0C;YACnD,GAAG,EAAE,0EAA0E;SAChF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAzCD,wCAyCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CheckResult } from './types';
|
|
2
|
+
export interface DoctorReport {
|
|
3
|
+
errors: CheckResult[];
|
|
4
|
+
warnings: CheckResult[];
|
|
5
|
+
passed: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function runDoctor(projectRoot?: string): DoctorReport;
|
|
8
|
+
export declare function printDoctorReport(report: DoctorReport): number;
|
|
9
|
+
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AA0CD,wBAAgB,SAAS,CAAC,WAAW,SAAgB,GAAG,YAAY,CAOnE;AAwCD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAM9D"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.printDoctorReport = exports.runDoctor = void 0;
|
|
7
|
+
const node_process_1 = __importDefault(require("node:process"));
|
|
8
|
+
const appGroups_1 = require("./checks/appGroups");
|
|
9
|
+
const dualWidgets_1 = require("./checks/dualWidgets");
|
|
10
|
+
const entries_1 = require("./checks/entries");
|
|
11
|
+
const metro_1 = require("./checks/metro");
|
|
12
|
+
const nameSync_1 = require("./checks/nameSync");
|
|
13
|
+
const plugin_1 = require("./checks/plugin");
|
|
14
|
+
const sealedZone_1 = require("./checks/sealedZone");
|
|
15
|
+
const project_1 = require("./project");
|
|
16
|
+
function collectFailures(ctx) {
|
|
17
|
+
const results = [];
|
|
18
|
+
const plugin = (0, plugin_1.checkPlugin)(ctx);
|
|
19
|
+
if (plugin) {
|
|
20
|
+
results.push(plugin);
|
|
21
|
+
}
|
|
22
|
+
const metro = (0, metro_1.checkMetro)(ctx);
|
|
23
|
+
if (metro) {
|
|
24
|
+
results.push(metro);
|
|
25
|
+
}
|
|
26
|
+
results.push(...(0, appGroups_1.checkAppGroups)(ctx));
|
|
27
|
+
results.push(...(0, entries_1.checkEntries)(ctx));
|
|
28
|
+
results.push(...(0, nameSync_1.checkNameSync)(ctx));
|
|
29
|
+
return results;
|
|
30
|
+
}
|
|
31
|
+
function collectWarnings(ctx) {
|
|
32
|
+
return [...(0, sealedZone_1.warnSealedZone)(ctx), ...(0, dualWidgets_1.warnDualWidgets)(ctx)];
|
|
33
|
+
}
|
|
34
|
+
function passedChecks(ctx) {
|
|
35
|
+
const passed = [];
|
|
36
|
+
if (!(0, plugin_1.checkPlugin)(ctx)) {
|
|
37
|
+
passed.push('Expo plugin registered');
|
|
38
|
+
}
|
|
39
|
+
if (!(0, metro_1.checkMetro)(ctx)) {
|
|
40
|
+
passed.push('Metro config');
|
|
41
|
+
}
|
|
42
|
+
if ((0, appGroups_1.checkAppGroups)(ctx).length === 0 && ctx.targets.length > 0) {
|
|
43
|
+
passed.push('App Groups');
|
|
44
|
+
}
|
|
45
|
+
if ((0, entries_1.checkEntries)(ctx).length === 0) {
|
|
46
|
+
passed.push('Entry files');
|
|
47
|
+
}
|
|
48
|
+
if ((0, nameSync_1.checkNameSync)(ctx).length === 0) {
|
|
49
|
+
passed.push('Name sync');
|
|
50
|
+
}
|
|
51
|
+
return passed;
|
|
52
|
+
}
|
|
53
|
+
function runDoctor(projectRoot = node_process_1.default.cwd()) {
|
|
54
|
+
const ctx = (0, project_1.loadProject)(projectRoot);
|
|
55
|
+
return {
|
|
56
|
+
errors: collectFailures(ctx),
|
|
57
|
+
warnings: collectWarnings(ctx),
|
|
58
|
+
passed: passedChecks(ctx),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.runDoctor = runDoctor;
|
|
62
|
+
function printSection(label, items, prefix) {
|
|
63
|
+
if (items.length === 0) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
console.log(`\n${label}:`);
|
|
67
|
+
for (const item of items) {
|
|
68
|
+
console.log(` ${prefix} [${item.title}] ${item.message}`);
|
|
69
|
+
if (item.fix) {
|
|
70
|
+
console.log(` → ${item.fix.split('\n').join('\n ')}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function printPassed(passed) {
|
|
75
|
+
if (passed.length === 0) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
console.log('\n✓ Passed:');
|
|
79
|
+
for (const item of passed) {
|
|
80
|
+
console.log(` • ${item}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function printSummary(report) {
|
|
84
|
+
if (report.errors.length > 0) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (report.passed.length === 0 && report.warnings.length === 0) {
|
|
88
|
+
console.log('No targets found under targets/.');
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
console.log('\nAll checks passed.');
|
|
92
|
+
}
|
|
93
|
+
function printDoctorReport(report) {
|
|
94
|
+
printPassed(report.passed);
|
|
95
|
+
printSection('⚠ Warnings', report.warnings, '•');
|
|
96
|
+
printSection('✗ Failed', report.errors, '•');
|
|
97
|
+
printSummary(report);
|
|
98
|
+
return report.errors.length > 0 ? 1 : 0;
|
|
99
|
+
}
|
|
100
|
+
exports.printDoctorReport = printDoctorReport;
|
|
101
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAmC;AAEnC,kDAAoD;AACpD,sDAAuD;AACvD,8CAAgD;AAChD,0CAA4C;AAC5C,gDAAkD;AAClD,4CAA8C;AAC9C,oDAAqD;AACrD,uCAAwC;AASxC,SAAS,eAAe,CAAC,GAAmC;IAC1D,MAAM,OAAO,GAAkB,EAAE,CAAC;IAClC,MAAM,MAAM,GAAG,IAAA,oBAAW,EAAC,GAAG,CAAC,CAAC;IAChC,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CAAC,aAAa,CAAC,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,MAAoB;IACxC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO;IACT,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAChD,OAAO;IACT,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;AACtC,CAAC;AAED,SAAgB,iBAAiB,CAAC,MAAoB;IACpD,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjD,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7C,YAAY,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC;AAND,8CAMC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportSafari.d.ts","sourceRoot":"","sources":["../src/exportSafari.ts"],"names":[],"mappings":"AASA,wBAAgB,eAAe,CAAC,WAAW,SAAgB,GAAG,MAAM,CAsCnE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runExportSafari = void 0;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const node_process_1 = __importDefault(require("node:process"));
|
|
9
|
+
const pbx_1 = require("../../plugin/build/ios/apply/pbx");
|
|
10
|
+
const exportSafariWebBundle_1 = require("../../plugin/build/ios/safari/exportSafariWebBundle");
|
|
11
|
+
const paths_1 = require("../../plugin/build/ios/utils/paths");
|
|
12
|
+
const project_1 = require("./project");
|
|
13
|
+
function runExportSafari(projectRoot = node_process_1.default.cwd()) {
|
|
14
|
+
if (node_process_1.default.env.SKIP_SAFARI_EXPORT === '1') {
|
|
15
|
+
console.log('SKIP_SAFARI_EXPORT=1, skipping Safari web export');
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
const ctx = (0, project_1.loadProject)(projectRoot);
|
|
19
|
+
const platformProjectRoot = node_path_1.default.join(projectRoot, 'ios');
|
|
20
|
+
const projectName = (0, pbx_1.getProjectName)(platformProjectRoot);
|
|
21
|
+
const targets = ctx.targets.filter((target) => target.config.type === 'safari' && target.config.entry);
|
|
22
|
+
if (targets.length === 0) {
|
|
23
|
+
console.log('No safari targets with entry found');
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
for (const target of targets) {
|
|
27
|
+
const displayName = target.config.displayName || target.config.name || target.dirName;
|
|
28
|
+
const productName = (0, paths_1.sanitizeTargetName)(displayName);
|
|
29
|
+
const entryFile = target.config.entry.replace(/^\.\//, '');
|
|
30
|
+
const result = (0, exportSafariWebBundle_1.exportSafariWebBundle)({
|
|
31
|
+
projectRoot,
|
|
32
|
+
platformProjectRoot,
|
|
33
|
+
projectName,
|
|
34
|
+
target: { entryFile, productName },
|
|
35
|
+
});
|
|
36
|
+
const verb = result.skipped ? 'Skipped' : 'Exported';
|
|
37
|
+
console.log(`${verb} Safari web bundle for ${displayName} → ${result.popupJsPath}`);
|
|
38
|
+
}
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
exports.runExportSafari = runExportSafari;
|
|
42
|
+
//# sourceMappingURL=exportSafari.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportSafari.js","sourceRoot":"","sources":["../src/exportSafari.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA6B;AAC7B,gEAAmC;AAEnC,0DAAkE;AAClE,+FAA4F;AAC5F,8DAAwE;AAExE,uCAAwC;AAExC,SAAgB,eAAe,CAAC,WAAW,GAAG,sBAAO,CAAC,GAAG,EAAE;IACzD,IAAI,sBAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,GAAG,EAAE,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;QAChE,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,GAAG,GAAG,IAAA,qBAAW,EAAC,WAAW,CAAC,CAAC;IACrC,MAAM,mBAAmB,GAAG,mBAAI,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC1D,MAAM,WAAW,GAAG,IAAA,oBAAc,EAAC,mBAAmB,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAChC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CACnE,CAAC;IAEF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,WAAW,GACf,MAAM,CAAC,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC;QACpE,MAAM,WAAW,GAAG,IAAA,0BAAkB,EAAC,WAAW,CAAC,CAAC;QACpD,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAE5D,MAAM,MAAM,GAAG,IAAA,6CAAqB,EAAC;YACnC,WAAW;YACX,mBAAmB;YACnB,WAAW;YACX,MAAM,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;SACnC,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;QACrD,OAAO,CAAC,GAAG,CACT,GAAG,IAAI,0BAA0B,WAAW,MAAM,MAAM,CAAC,WAAW,EAAE,CACvE,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,CAAC;AACX,CAAC;AAtCD,0CAsCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAQA,wBAAgB,WAAW,CAAC,WAAW,SAAgB,GAAG,MAAM,CA0B/D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runGenerate = void 0;
|
|
7
|
+
const node_process_1 = __importDefault(require("node:process"));
|
|
8
|
+
const codegen_1 = require("expo-targets/codegen");
|
|
9
|
+
const project_1 = require("./project");
|
|
10
|
+
function runGenerate(projectRoot = node_process_1.default.cwd()) {
|
|
11
|
+
const ctx = (0, project_1.loadProject)(projectRoot);
|
|
12
|
+
const runtimeConfigs = (0, codegen_1.collectRuntimeConfigs)(ctx.targets
|
|
13
|
+
.filter((target) => Boolean(target.config.name))
|
|
14
|
+
.map((target) => ({
|
|
15
|
+
config: target.config,
|
|
16
|
+
})), {
|
|
17
|
+
ios: ctx.expo.ios,
|
|
18
|
+
});
|
|
19
|
+
const outputPath = (0, codegen_1.writeTargetsTypesFile)(projectRoot, runtimeConfigs.map((cfg) => ({
|
|
20
|
+
name: cfg.name,
|
|
21
|
+
liveActivity: cfg.liveActivity,
|
|
22
|
+
})));
|
|
23
|
+
console.log(`Wrote ${outputPath}`);
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
exports.runGenerate = runGenerate;
|
|
27
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAmC;AACnC,kDAG8B;AAE9B,uCAAwC;AAExC,SAAgB,WAAW,CAAC,WAAW,GAAG,sBAAO,CAAC,GAAG,EAAE;IACrD,MAAM,GAAG,GAAG,IAAA,qBAAW,EAAC,WAAW,CAAC,CAAC;IACrC,MAAM,cAAc,GAAG,IAAA,+BAAqB,EAC1C,GAAG,CAAC,OAAO;SACR,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAC/C,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAChB,MAAM,EACJ,MAAM,CAAC,MAA4D;KACtE,CAAC,CAAC,EACL;QACE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,GAED;KACd,CACF,CAAC;IAEF,MAAM,UAAU,GAAG,IAAA,+BAAqB,EACtC,WAAW,EACX,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC3B,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,YAAY,EAAE,GAAG,CAAC,YAAY;KAC/B,CAAC,CAAC,CACJ,CAAC;IAEF,OAAO,CAAC,GAAG,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;IACnC,OAAO,CAAC,CAAC;AACX,CAAC;AA1BD,kCA0BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
const node_process_1 = __importDefault(require("node:process"));
|
|
10
|
+
const commander_1 = require("commander");
|
|
11
|
+
const doctor_1 = require("./doctor");
|
|
12
|
+
const exportSafari_1 = require("./exportSafari");
|
|
13
|
+
const generate_1 = require("./generate");
|
|
14
|
+
const sync_1 = require("./sync");
|
|
15
|
+
function readVersion() {
|
|
16
|
+
try {
|
|
17
|
+
const pkg = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(__dirname, '../../package.json'), 'utf8'));
|
|
18
|
+
return pkg.version ?? '0.0.0';
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return '0.0.0';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const program = new commander_1.Command();
|
|
25
|
+
program
|
|
26
|
+
.name('expo-targets')
|
|
27
|
+
.description('Validate and manage expo-targets host wiring')
|
|
28
|
+
.version(readVersion());
|
|
29
|
+
program
|
|
30
|
+
.command('doctor')
|
|
31
|
+
.description('Validate plugin, Metro, App Groups, entries, and name sync')
|
|
32
|
+
.option('--fix', 'Regenerate .expo/expo-targets.generated.ts')
|
|
33
|
+
.action((options) => {
|
|
34
|
+
if (options.fix) {
|
|
35
|
+
(0, generate_1.runGenerate)();
|
|
36
|
+
}
|
|
37
|
+
const code = (0, doctor_1.printDoctorReport)((0, doctor_1.runDoctor)());
|
|
38
|
+
node_process_1.default.exit(code);
|
|
39
|
+
});
|
|
40
|
+
program
|
|
41
|
+
.command('generate')
|
|
42
|
+
.description('Regenerate .expo/expo-targets.generated.ts without full prebuild')
|
|
43
|
+
.action(() => {
|
|
44
|
+
node_process_1.default.exit((0, generate_1.runGenerate)());
|
|
45
|
+
});
|
|
46
|
+
program
|
|
47
|
+
.command('sync')
|
|
48
|
+
.description('Sync targets to an existing ios/ tree (bare React Native)')
|
|
49
|
+
.option('--clean', 'Remove orphaned sealed dirs and Podfile targets')
|
|
50
|
+
.option('--dry-run', 'Preview changes without writing files')
|
|
51
|
+
.option('-v, --verbose', 'Enable verbose logging')
|
|
52
|
+
.option('--targets-root <path>', 'Custom targets directory', './targets')
|
|
53
|
+
.action(async (options) => {
|
|
54
|
+
try {
|
|
55
|
+
const code = await (0, sync_1.runSync)({
|
|
56
|
+
clean: options.clean,
|
|
57
|
+
dryRun: options.dryRun,
|
|
58
|
+
verbose: options.verbose,
|
|
59
|
+
targetsRoot: options.targetsRoot,
|
|
60
|
+
});
|
|
61
|
+
node_process_1.default.exit(code);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
const message = error instanceof Error ? error.message : 'expo-targets sync failed';
|
|
65
|
+
console.error(message);
|
|
66
|
+
if (options.verbose && error instanceof Error && error.stack) {
|
|
67
|
+
console.error(error.stack);
|
|
68
|
+
}
|
|
69
|
+
node_process_1.default.exit(1);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
program
|
|
73
|
+
.command('export-safari')
|
|
74
|
+
.description('Export Safari extension RN Web bundles to sealed Resources')
|
|
75
|
+
.action(() => {
|
|
76
|
+
node_process_1.default.exit((0, exportSafari_1.runExportSafari)());
|
|
77
|
+
});
|
|
78
|
+
program.parse();
|
|
79
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ProjectContext } from './types';
|
|
2
|
+
export interface OrphanReport {
|
|
3
|
+
sealedProducts: string[];
|
|
4
|
+
xcodeTargets: string[];
|
|
5
|
+
podfileTargets: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function findOrphans(projectRoot: string, ctx: ProjectContext): OrphanReport;
|
|
8
|
+
export interface CleanResult {
|
|
9
|
+
removedSealed: string[];
|
|
10
|
+
removedPodfileTargets: string[];
|
|
11
|
+
skippedXcodeTargets: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare function cleanOrphans(projectRoot: string, report: OrphanReport): CleanResult;
|
|
14
|
+
//# sourceMappingURL=orphans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orphans.d.ts","sourceRoot":"","sources":["../src/orphans.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAiJD,wBAAgB,WAAW,CACzB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,cAAc,GAClB,YAAY,CAgBd;AAED,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,YAAY,GACnB,WAAW,CAqCb"}
|