@nx/expo 16.4.0-beta.0 → 16.4.0-beta.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/executors.json +10 -0
- package/index.js +0 -1
- package/migrations.json +21 -0
- package/package.json +11 -11
- package/plugins/jest/svg-mock.js +0 -1
- package/plugins/metro-resolver.js +0 -1
- package/plugins/with-nx-metro.js +0 -1
- package/plugins/with-nx-webpack.js +0 -1
- package/src/executors/build/build.impl.js +5 -1
- package/src/executors/build/compat.js +0 -1
- package/src/executors/build/schema.d.ts +1 -1
- package/src/executors/build/schema.json +21 -3
- package/src/executors/build-list/build-list.impl.js +0 -1
- package/src/executors/build-list/compat.js +0 -1
- package/src/executors/download/compat.js +0 -1
- package/src/executors/download/download.impl.js +0 -1
- package/src/executors/ensure-symlink/compat.js +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +0 -1
- package/src/executors/export/compat.js +0 -1
- package/src/executors/export/export.impl.js +0 -1
- package/src/executors/install/compat.js +0 -1
- package/src/executors/install/install.impl.js +0 -1
- package/src/executors/prebuild/compat.js +0 -1
- package/src/executors/prebuild/prebuild.impl.js +1 -5
- package/src/executors/prebuild/schema.json +1 -1
- package/src/executors/run/compat.js +0 -1
- package/src/executors/run/run.impl.js +1 -9
- package/src/executors/run/schema.json +1 -1
- package/src/executors/start/compat.js +0 -1
- package/src/executors/start/schema.d.ts +3 -0
- package/src/executors/start/schema.json +5 -0
- package/src/executors/start/start.impl.js +9 -2
- package/src/executors/submit/compat.d.ts +2 -0
- package/src/executors/submit/compat.js +5 -0
- package/src/executors/submit/schema.d.ts +12 -0
- package/src/executors/submit/schema.json +57 -0
- package/src/executors/submit/submit.impl.d.ts +6 -0
- package/src/executors/submit/submit.impl.js +74 -0
- package/src/executors/sync-deps/compat.js +0 -1
- package/src/executors/sync-deps/sync-deps.impl.js +0 -1
- package/src/executors/update/compat.js +0 -1
- package/src/executors/update/schema.d.ts +1 -1
- package/src/executors/update/schema.json +13 -3
- package/src/executors/update/update.impl.js +10 -2
- package/src/generators/application/application.js +0 -1
- package/src/generators/application/lib/add-detox.js +0 -1
- package/src/generators/application/lib/add-eas-scripts.js +0 -1
- package/src/generators/application/lib/add-project.js +4 -1
- package/src/generators/application/lib/create-application-files.js +0 -1
- package/src/generators/application/lib/normalize-options.js +0 -1
- package/src/generators/component/component.js +0 -1
- package/src/generators/component/lib/add-import.js +0 -1
- package/src/generators/component/lib/normalize-options.js +0 -1
- package/src/generators/init/init.js +0 -1
- package/src/generators/init/lib/add-git-ignore-entry.js +0 -1
- package/src/generators/init/lib/gitignore-entries.js +0 -1
- package/src/generators/init/lib/init-root-babel-config.js +0 -1
- package/src/generators/library/files/lib/tsconfig.json.template +1 -1
- package/src/generators/library/lib/normalize-options.js +0 -1
- package/src/generators/library/library.js +0 -1
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js +0 -1
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js +0 -1
- package/src/migrations/update-14-4-3/add-eas-build-target.js +0 -1
- package/src/migrations/update-14-5-1/add-eas-update-target.js +0 -1
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js +0 -1
- package/src/migrations/update-15-0-3/change-jest-preset.js +0 -1
- package/src/migrations/update-15-8-3/change-webpack-to-metro.js +0 -1
- package/src/migrations/update-16-0-0/add-jest-expo.js +5 -5
- package/src/migrations/update-16-0-0/remove-deprecated-targets.js +4 -4
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -1
- package/src/migrations/update-16-1-4/add-detox-app-json.js +3 -3
- package/src/migrations/update-16-1-4/update-eas-scripts.js +4 -4
- package/src/migrations/update-16-2-2/add-submit-target.d.ts +5 -0
- package/src/migrations/update-16-2-2/add-submit-target.js +26 -0
- package/src/utils/add-jest.js +0 -1
- package/src/utils/add-linting.js +0 -1
- package/src/utils/ensure-node-modules-symlink.js +0 -1
- package/src/utils/find-all-npm-dependencies.js +0 -1
- package/src/utils/pod-install-task.d.ts +1 -1
- package/src/utils/pod-install-task.js +9 -21
- package/src/utils/symlink-task.js +0 -1
- package/src/utils/versions.d.ts +5 -4
- package/src/utils/versions.js +6 -6
- package/index.js.map +0 -1
- package/plugins/jest/svg-mock.js.map +0 -1
- package/plugins/metro-resolver.js.map +0 -1
- package/plugins/with-nx-metro.js.map +0 -1
- package/plugins/with-nx-webpack.js.map +0 -1
- package/src/executors/build/build.impl.js.map +0 -1
- package/src/executors/build/compat.js.map +0 -1
- package/src/executors/build-list/build-list.impl.js.map +0 -1
- package/src/executors/build-list/compat.js.map +0 -1
- package/src/executors/download/compat.js.map +0 -1
- package/src/executors/download/download.impl.js.map +0 -1
- package/src/executors/ensure-symlink/compat.js.map +0 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +0 -1
- package/src/executors/export/compat.js.map +0 -1
- package/src/executors/export/export.impl.js.map +0 -1
- package/src/executors/install/compat.js.map +0 -1
- package/src/executors/install/install.impl.js.map +0 -1
- package/src/executors/prebuild/compat.js.map +0 -1
- package/src/executors/prebuild/prebuild.impl.js.map +0 -1
- package/src/executors/run/compat.js.map +0 -1
- package/src/executors/run/run.impl.js.map +0 -1
- package/src/executors/start/compat.js.map +0 -1
- package/src/executors/start/start.impl.js.map +0 -1
- package/src/executors/sync-deps/compat.js.map +0 -1
- package/src/executors/sync-deps/sync-deps.impl.js.map +0 -1
- package/src/executors/update/compat.js.map +0 -1
- package/src/executors/update/update.impl.js.map +0 -1
- package/src/generators/application/application.js.map +0 -1
- package/src/generators/application/lib/add-detox.js.map +0 -1
- package/src/generators/application/lib/add-eas-scripts.js.map +0 -1
- package/src/generators/application/lib/add-project.js.map +0 -1
- package/src/generators/application/lib/create-application-files.js.map +0 -1
- package/src/generators/application/lib/normalize-options.js.map +0 -1
- package/src/generators/component/component.js.map +0 -1
- package/src/generators/component/lib/add-import.js.map +0 -1
- package/src/generators/component/lib/normalize-options.js.map +0 -1
- package/src/generators/init/init.js.map +0 -1
- package/src/generators/init/lib/add-git-ignore-entry.js.map +0 -1
- package/src/generators/init/lib/gitignore-entries.js.map +0 -1
- package/src/generators/init/lib/init-root-babel-config.js.map +0 -1
- package/src/generators/library/lib/normalize-options.js.map +0 -1
- package/src/generators/library/library.js.map +0 -1
- package/src/migrations/update-14-0-0/add-project-root-metro-config-14-0-0.js.map +0 -1
- package/src/migrations/update-14-1-2/add-eject-target-14-1-2.js.map +0 -1
- package/src/migrations/update-14-4-3/add-eas-build-target.js.map +0 -1
- package/src/migrations/update-14-5-1/add-eas-update-target.js.map +0 -1
- package/src/migrations/update-15-0-3/add-new-expo-cli-targets.js.map +0 -1
- package/src/migrations/update-15-0-3/change-jest-preset.js.map +0 -1
- package/src/migrations/update-15-8-3/change-webpack-to-metro.js.map +0 -1
- package/src/migrations/update-16-0-0/add-jest-expo.js.map +0 -1
- package/src/migrations/update-16-0-0/remove-deprecated-targets.js.map +0 -1
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +0 -1
- package/src/migrations/update-16-1-4/add-detox-app-json.js.map +0 -1
- package/src/migrations/update-16-1-4/update-eas-scripts.js.map +0 -1
- package/src/utils/add-jest.js.map +0 -1
- package/src/utils/add-linting.js.map +0 -1
- package/src/utils/ensure-node-modules-symlink.js.map +0 -1
- package/src/utils/find-all-npm-dependencies.js.map +0 -1
- package/src/utils/pod-install-task.js.map +0 -1
- package/src/utils/symlink-task.js.map +0 -1
- package/src/utils/versions.js.map +0 -1
package/executors.json
CHANGED
|
@@ -54,6 +54,11 @@
|
|
|
54
54
|
"implementation": "./src/executors/export/export.impl",
|
|
55
55
|
"schema": "./src/executors/export/schema.json",
|
|
56
56
|
"description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
|
|
57
|
+
},
|
|
58
|
+
"submit": {
|
|
59
|
+
"implementation": "./src/executors/submit/submit.impl",
|
|
60
|
+
"schema": "./src/executors/submit/schema.json",
|
|
61
|
+
"description": "Submit app binary to App Store and/or Play Store"
|
|
57
62
|
}
|
|
58
63
|
},
|
|
59
64
|
"builders": {
|
|
@@ -111,6 +116,11 @@
|
|
|
111
116
|
"implementation": "./src/executors/export/compat",
|
|
112
117
|
"schema": "./src/executors/export/schema.json",
|
|
113
118
|
"description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
|
|
119
|
+
},
|
|
120
|
+
"submit": {
|
|
121
|
+
"implementation": "./src/executors/submit/compat",
|
|
122
|
+
"schema": "./src/executors/submit/schema.json",
|
|
123
|
+
"description": "Submit app binary to App Store and/or Play Store"
|
|
114
124
|
}
|
|
115
125
|
}
|
|
116
126
|
}
|
package/index.js
CHANGED
|
@@ -9,4 +9,3 @@ var with_nx_metro_1 = require("./plugins/with-nx-metro");
|
|
|
9
9
|
Object.defineProperty(exports, "withNxMetro", { enumerable: true, get: function () { return with_nx_metro_1.withNxMetro; } });
|
|
10
10
|
var with_nx_webpack_1 = require("./plugins/with-nx-webpack");
|
|
11
11
|
Object.defineProperty(exports, "withNxWebpack", { enumerable: true, get: function () { return with_nx_webpack_1.withNxWebpack; } });
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
package/migrations.json
CHANGED
|
@@ -817,6 +817,27 @@
|
|
|
817
817
|
"alwaysAddToPackageJson": false
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
|
+
},
|
|
821
|
+
"16.2.2": {
|
|
822
|
+
"version": "16.2.2-beta.0",
|
|
823
|
+
"packages": {
|
|
824
|
+
"expo": {
|
|
825
|
+
"version": "^48.0.17",
|
|
826
|
+
"alwaysAddToPackageJson": false
|
|
827
|
+
},
|
|
828
|
+
"eas-cli": {
|
|
829
|
+
"version": "~3.13.2",
|
|
830
|
+
"alwaysAddToPackageJson": false
|
|
831
|
+
},
|
|
832
|
+
"react-native": {
|
|
833
|
+
"version": "0.71.8",
|
|
834
|
+
"alwaysAddToPackageJson": false
|
|
835
|
+
},
|
|
836
|
+
"@types/react-native": {
|
|
837
|
+
"version": "0.71.7",
|
|
838
|
+
"alwaysAddToPackageJson": false
|
|
839
|
+
}
|
|
840
|
+
}
|
|
820
841
|
}
|
|
821
842
|
}
|
|
822
843
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/expo",
|
|
3
|
-
"version": "16.4.0-beta.
|
|
3
|
+
"version": "16.4.0-beta.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Expo Plugin for Nx contains executors and generators for managing and developing an expo application within your workspace. For example, you can directly build for different target platforms as well as generate projects and publish your code.",
|
|
6
6
|
"keywords": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"main": "./index",
|
|
27
27
|
"types": "index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@nrwl/expo": "16.4.0-beta.
|
|
30
|
-
"@nx/detox": "16.4.0-beta.
|
|
31
|
-
"@nx/devkit": "16.4.0-beta.
|
|
32
|
-
"@nx/jest": "16.4.0-beta.
|
|
33
|
-
"@nx/js": "16.4.0-beta.
|
|
34
|
-
"@nx/linter": "16.4.0-beta.
|
|
35
|
-
"@nx/react": "16.4.0-beta.
|
|
36
|
-
"@nx/webpack": "16.4.0-beta.
|
|
29
|
+
"@nrwl/expo": "16.4.0-beta.2",
|
|
30
|
+
"@nx/detox": "16.4.0-beta.2",
|
|
31
|
+
"@nx/devkit": "16.4.0-beta.2",
|
|
32
|
+
"@nx/jest": "16.4.0-beta.2",
|
|
33
|
+
"@nx/js": "16.4.0-beta.2",
|
|
34
|
+
"@nx/linter": "16.4.0-beta.2",
|
|
35
|
+
"@nx/react": "16.4.0-beta.2",
|
|
36
|
+
"@nx/webpack": "16.4.0-beta.2",
|
|
37
37
|
"chalk": "^4.1.0",
|
|
38
38
|
"enhanced-resolve": "^5.8.3",
|
|
39
39
|
"fs-extra": "^11.1.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"tsconfig-paths-webpack-plugin": "^4.0.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"expo": "^48.0.
|
|
47
|
+
"expo": "^48.0.17"
|
|
48
48
|
},
|
|
49
49
|
"builders": "./executors.json",
|
|
50
50
|
"ng-update": {
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "abb2678056668cc8beaaf9c5ebc2a2e6ad487173"
|
|
59
59
|
}
|
package/plugins/jest/svg-mock.js
CHANGED
package/plugins/with-nx-metro.js
CHANGED
|
@@ -61,6 +61,11 @@ function createBuildOptions(options) {
|
|
|
61
61
|
return Object.keys(options).reduce((acc, k) => {
|
|
62
62
|
const v = options[k];
|
|
63
63
|
if (typeof v === 'boolean') {
|
|
64
|
+
if (k === 'interactive') {
|
|
65
|
+
if (v === false) {
|
|
66
|
+
acc.push('--non-interactive'); // when is false, the flag is --non-interactive
|
|
67
|
+
}
|
|
68
|
+
}
|
|
64
69
|
if (v === true) {
|
|
65
70
|
// when true, does not need to pass the value true, just need to pass the flag in kebob case
|
|
66
71
|
acc.push(`--${(0, devkit_1.names)(k).fileName}`);
|
|
@@ -75,4 +80,3 @@ function createBuildOptions(options) {
|
|
|
75
80
|
return acc;
|
|
76
81
|
}, []);
|
|
77
82
|
}
|
|
78
|
-
//# sourceMappingURL=build.impl.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export interface ExpoEasBuildOptions {
|
|
4
4
|
platform: 'ios' | 'android' | 'all';
|
|
5
5
|
profile?: string;
|
|
6
|
-
|
|
6
|
+
interactive: boolean; // default is true
|
|
7
7
|
local: boolean; // default is false
|
|
8
8
|
output?: string;
|
|
9
9
|
wait: boolean; // default is true
|
|
@@ -7,6 +7,24 @@
|
|
|
7
7
|
"title": "Expo EAS Build executor",
|
|
8
8
|
"description": "Start an EAS build for your expo project.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"presets": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Build for a specific platform",
|
|
13
|
+
"keys": ["platform"]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "Build using a specific profile",
|
|
17
|
+
"keys": ["profile"]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "Run build locally",
|
|
21
|
+
"keys": ["local"]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "Clear cache before the build",
|
|
25
|
+
"keys": ["clearCache"]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
10
28
|
"properties": {
|
|
11
29
|
"platform": {
|
|
12
30
|
"enum": ["ios", "android", "all"],
|
|
@@ -25,10 +43,10 @@
|
|
|
25
43
|
"examples": ["production", "development", "preview"],
|
|
26
44
|
"x-priority": "important"
|
|
27
45
|
},
|
|
28
|
-
"
|
|
46
|
+
"interactive": {
|
|
29
47
|
"type": "boolean",
|
|
30
|
-
"description": "Run command in
|
|
31
|
-
"default":
|
|
48
|
+
"description": "Run command in interactive mode",
|
|
49
|
+
"default": true
|
|
32
50
|
},
|
|
33
51
|
"local": {
|
|
34
52
|
"type": "boolean",
|
|
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const devkit_1 = require("@nx/devkit");
|
|
4
4
|
const build_list_impl_1 = require("./build-list.impl");
|
|
5
5
|
exports.default = (0, devkit_1.convertNxExecutor)(build_list_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const devkit_1 = require("@nx/devkit");
|
|
4
4
|
const ensure_symlink_impl_1 = require("./ensure-symlink.impl");
|
|
5
5
|
exports.default = (0, devkit_1.convertNxExecutor)(ensure_symlink_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -16,14 +16,11 @@ function prebuildExecutor(options, context) {
|
|
|
16
16
|
try {
|
|
17
17
|
yield tslib_1.__await(prebuildAsync(context.root, projectRoot, options));
|
|
18
18
|
if (options.install) {
|
|
19
|
-
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
|
|
19
|
+
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
|
|
20
20
|
if (options.platform === 'ios') {
|
|
21
21
|
yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
else {
|
|
25
|
-
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
|
|
26
|
-
}
|
|
27
24
|
yield yield tslib_1.__await({
|
|
28
25
|
success: true,
|
|
29
26
|
});
|
|
@@ -67,4 +64,3 @@ function createPrebuildOptions(options) {
|
|
|
67
64
|
return acc;
|
|
68
65
|
}, []);
|
|
69
66
|
}
|
|
70
|
-
//# sourceMappingURL=prebuild.impl.js.map
|
|
@@ -30,18 +30,11 @@ function runExecutor(options, context) {
|
|
|
30
30
|
}));
|
|
31
31
|
}
|
|
32
32
|
if (options.install) {
|
|
33
|
-
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
|
|
34
|
-
fix: true,
|
|
35
|
-
}));
|
|
33
|
+
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {}));
|
|
36
34
|
if (options.platform === 'ios') {
|
|
37
35
|
yield tslib_1.__await((0, pod_install_task_1.podInstall)((0, path_1.join)(context.root, projectRoot, 'ios')));
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
|
-
else {
|
|
41
|
-
yield tslib_1.__await((0, install_impl_1.installAsync)(context.root, {
|
|
42
|
-
check: true,
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
38
|
try {
|
|
46
39
|
yield tslib_1.__await(runCliRun(context.root, projectRoot, options));
|
|
47
40
|
yield yield tslib_1.__await({ success: true });
|
|
@@ -109,4 +102,3 @@ function createRunOptions(options) {
|
|
|
109
102
|
return acc;
|
|
110
103
|
}, []);
|
|
111
104
|
}
|
|
112
|
-
//# sourceMappingURL=run.impl.js.map
|
|
@@ -87,6 +87,11 @@
|
|
|
87
87
|
"offline": {
|
|
88
88
|
"type": "boolean",
|
|
89
89
|
"description": "Allows this command to run while offline"
|
|
90
|
+
},
|
|
91
|
+
"sync": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"description": "Syncs npm dependencies to package.json (for React Native autolink).",
|
|
94
|
+
"default": true
|
|
90
95
|
}
|
|
91
96
|
},
|
|
92
97
|
"examplesFile": "../../../docs/start-examples.md"
|
|
@@ -6,11 +6,15 @@ const devkit_1 = require("@nx/devkit");
|
|
|
6
6
|
const child_process_1 = require("child_process");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
9
|
+
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
9
10
|
let childProcess;
|
|
10
11
|
function startExecutor(options, context) {
|
|
11
12
|
return tslib_1.__asyncGenerator(this, arguments, function* startExecutor_1() {
|
|
12
13
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
14
|
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
15
|
+
if (options.sync) {
|
|
16
|
+
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield tslib_1.__await((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot, context.root, context.projectGraph)));
|
|
17
|
+
}
|
|
14
18
|
try {
|
|
15
19
|
const baseUrl = `http://localhost:${options.port}`;
|
|
16
20
|
devkit_1.logger.info(chalk.cyan(`Packager is ready at ${baseUrl}`));
|
|
@@ -48,12 +52,16 @@ function startAsync(workspaceRoot, projectRoot, options) {
|
|
|
48
52
|
});
|
|
49
53
|
}
|
|
50
54
|
// options from https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/start/index.ts
|
|
55
|
+
const nxOptions = ['sync'];
|
|
51
56
|
function createStartOptions(options) {
|
|
52
57
|
return Object.keys(options).reduce((acc, k) => {
|
|
58
|
+
if (nxOptions.includes(k)) {
|
|
59
|
+
return acc;
|
|
60
|
+
}
|
|
53
61
|
const v = options[k];
|
|
54
62
|
if (k === 'dev') {
|
|
55
63
|
if (v === false) {
|
|
56
|
-
acc.push(`--no-dev`);
|
|
64
|
+
acc.push(`--no-dev`); // only no-dev flag is supported
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
67
|
else {
|
|
@@ -70,4 +78,3 @@ function createStartOptions(options) {
|
|
|
70
78
|
return acc;
|
|
71
79
|
}, []);
|
|
72
80
|
}
|
|
73
|
-
//# sourceMappingURL=start.impl.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// command to run https://github.com/expo/eas-cli/tree/main#eas-submit
|
|
2
|
+
// options from https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/commands/submit.ts
|
|
3
|
+
export interface SubmitExecutorSchema {
|
|
4
|
+
profile?: string;
|
|
5
|
+
platform?: 'ios' | 'android' | 'all';
|
|
6
|
+
id?: string;
|
|
7
|
+
latest?: boolean;
|
|
8
|
+
interactive: boolean; // default is true
|
|
9
|
+
path?: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
wait: boolean; // default is true
|
|
12
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"title": "EXPO EAS Submit Executor",
|
|
5
|
+
"description": "Submit app binary to App Store and/or Play Store.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"presets": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Submit for a specific platform",
|
|
10
|
+
"keys": ["platform"]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Submit using a specific profile",
|
|
14
|
+
"keys": ["profile"]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"profile": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Name of the build profile from eas.json. Defaults to \"production\" if defined in eas.json.",
|
|
21
|
+
"examples": ["production", "development", "preview"],
|
|
22
|
+
"x-priority": "important"
|
|
23
|
+
},
|
|
24
|
+
"platform": {
|
|
25
|
+
"enum": ["ios", "android", "all"],
|
|
26
|
+
"alias": "p",
|
|
27
|
+
"description": "The platform to build the app, example values: ios, android, all.",
|
|
28
|
+
"x-priority": "important"
|
|
29
|
+
},
|
|
30
|
+
"id": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Build ID to submit"
|
|
33
|
+
},
|
|
34
|
+
"path": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Path to the .apk/.aab/.ipa file"
|
|
37
|
+
},
|
|
38
|
+
"url": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "URL to the .apk/.aab/.ipa file, app archive url"
|
|
41
|
+
},
|
|
42
|
+
"latest": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"description": "Submit the latest build for specified platform"
|
|
45
|
+
},
|
|
46
|
+
"interactive": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"description": "Run command in interactive mode",
|
|
49
|
+
"default": true
|
|
50
|
+
},
|
|
51
|
+
"wait": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "Wait for build(s) to complete",
|
|
54
|
+
"default": true
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { SubmitExecutorSchema } from './schema';
|
|
3
|
+
export interface ReactNativeSubmitOutput {
|
|
4
|
+
success: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function submitExecutor(options: SubmitExecutorSchema, context: ExecutorContext): AsyncGenerator<ReactNativeSubmitOutput>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const child_process_1 = require("child_process");
|
|
7
|
+
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
8
|
+
let childProcess;
|
|
9
|
+
function submitExecutor(options, context) {
|
|
10
|
+
return tslib_1.__asyncGenerator(this, arguments, function* submitExecutor_1() {
|
|
11
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
13
|
+
try {
|
|
14
|
+
yield tslib_1.__await(runCliSubmit(context.root, projectRoot, options));
|
|
15
|
+
yield yield tslib_1.__await({ success: true });
|
|
16
|
+
}
|
|
17
|
+
finally {
|
|
18
|
+
if (childProcess) {
|
|
19
|
+
childProcess.kill();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.default = submitExecutor;
|
|
25
|
+
function runCliSubmit(workspaceRoot, projectRoot, options) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/eas-cli/bin/run'), ['submit', ...createSubmitOptions(options)], {
|
|
28
|
+
cwd: (0, path_1.join)(workspaceRoot, projectRoot),
|
|
29
|
+
env: process.env,
|
|
30
|
+
});
|
|
31
|
+
// Ensure the child process is killed when the parent exits
|
|
32
|
+
process.on('exit', () => childProcess.kill());
|
|
33
|
+
process.on('SIGTERM', () => childProcess.kill());
|
|
34
|
+
childProcess.on('error', (err) => {
|
|
35
|
+
reject(err);
|
|
36
|
+
});
|
|
37
|
+
childProcess.on('exit', (code) => {
|
|
38
|
+
if (code === 0) {
|
|
39
|
+
resolve(code);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
reject(code);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function createSubmitOptions(options) {
|
|
48
|
+
return Object.keys(options).reduce((acc, k) => {
|
|
49
|
+
const v = options[k];
|
|
50
|
+
if (typeof v === 'boolean') {
|
|
51
|
+
if (k === 'interactive') {
|
|
52
|
+
if (v === false) {
|
|
53
|
+
acc.push('--non-interactive'); // when is false, the flag is --non-interactive
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else if (k === 'wait') {
|
|
57
|
+
if (v === false) {
|
|
58
|
+
acc.push('--no-wait'); // when is false, the flag is --no-wait
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
acc.push('--wait');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else if (v === true) {
|
|
65
|
+
// when true, does not need to pass the value true, just need to pass the flag in kebob case
|
|
66
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
|
|
71
|
+
}
|
|
72
|
+
return acc;
|
|
73
|
+
}, []);
|
|
74
|
+
}
|
|
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const devkit_1 = require("@nx/devkit");
|
|
4
4
|
const sync_deps_impl_1 = require("./sync-deps.impl");
|
|
5
5
|
exports.default = (0, devkit_1.convertNxExecutor)(sync_deps_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
"title": "Expo EAS Update executor",
|
|
8
8
|
"description": "Start an EAS update for your expo project.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"presets": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Update for a specific platform",
|
|
13
|
+
"keys": ["platform"]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "Update from a specific branch",
|
|
17
|
+
"keys": ["branch"]
|
|
18
|
+
}
|
|
19
|
+
],
|
|
10
20
|
"properties": {
|
|
11
21
|
"branch": {
|
|
12
22
|
"type": "string",
|
|
@@ -55,10 +65,10 @@
|
|
|
55
65
|
"type": "string",
|
|
56
66
|
"description": "File containing the PEM-encoded private key corresponding to the certificate in expo-updates' configuration. Defaults to a file named \"private-key.pem\" in the certificate's directory."
|
|
57
67
|
},
|
|
58
|
-
"
|
|
68
|
+
"interactive": {
|
|
59
69
|
"type": "boolean",
|
|
60
|
-
"description": "Run command in
|
|
61
|
-
"default":
|
|
70
|
+
"description": "Run command in interactive mode",
|
|
71
|
+
"default": true
|
|
62
72
|
}
|
|
63
73
|
},
|
|
64
74
|
"required": []
|