@nrwl/expo 13.7.0-beta.1
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 +187 -0
- package/collection.json +0 -0
- package/executors.json +116 -0
- package/generators.json +61 -0
- package/index.d.ts +3 -0
- package/index.js +10 -0
- package/index.js.map +1 -0
- package/jest.config.js +12 -0
- package/package.json +50 -0
- package/plugins/jest/svg-mock.d.ts +0 -0
- package/plugins/jest/svg-mock.js +4 -0
- package/plugins/jest/svg-mock.js.map +1 -0
- package/plugins/metro-resolver.d.ts +1 -0
- package/plugins/metro-resolver.js +142 -0
- package/plugins/metro-resolver.js.map +1 -0
- package/plugins/with-nx-metro.d.ts +6 -0
- package/plugins/with-nx-metro.js +26 -0
- package/plugins/with-nx-metro.js.map +1 -0
- package/project.json +99 -0
- package/src/executors/build-android/build-android.impl.d.ts +6 -0
- package/src/executors/build-android/build-android.impl.js +66 -0
- package/src/executors/build-android/build-android.impl.js.map +1 -0
- package/src/executors/build-android/compat.d.ts +2 -0
- package/src/executors/build-android/compat.js +6 -0
- package/src/executors/build-android/compat.js.map +1 -0
- package/src/executors/build-android/schema.d.ts +13 -0
- package/src/executors/build-android/schema.json +54 -0
- package/src/executors/build-ios/build-ios.impl.d.ts +6 -0
- package/src/executors/build-ios/build-ios.impl.js +66 -0
- package/src/executors/build-ios/build-ios.impl.js.map +1 -0
- package/src/executors/build-ios/compat.d.ts +2 -0
- package/src/executors/build-ios/compat.js +6 -0
- package/src/executors/build-ios/compat.js.map +1 -0
- package/src/executors/build-ios/schema.d.ts +23 -0
- package/src/executors/build-ios/schema.json +91 -0
- package/src/executors/build-status/build-status.impl.d.ts +6 -0
- package/src/executors/build-status/build-status.impl.js +59 -0
- package/src/executors/build-status/build-status.impl.js.map +1 -0
- package/src/executors/build-status/compat.d.ts +2 -0
- package/src/executors/build-status/compat.js +6 -0
- package/src/executors/build-status/compat.js.map +1 -0
- package/src/executors/build-status/schema.d.ts +4 -0
- package/src/executors/build-status/schema.json +15 -0
- package/src/executors/build-web/build-web.impl.d.ts +6 -0
- package/src/executors/build-web/build-web.impl.js +59 -0
- package/src/executors/build-web/build-web.impl.js.map +1 -0
- package/src/executors/build-web/compat.d.ts +2 -0
- package/src/executors/build-web/compat.js +6 -0
- package/src/executors/build-web/compat.js.map +1 -0
- package/src/executors/build-web/schema.d.ts +6 -0
- package/src/executors/build-web/schema.json +24 -0
- package/src/executors/ensure-symlink/compat.d.ts +2 -0
- package/src/executors/ensure-symlink/compat.js +6 -0
- package/src/executors/ensure-symlink/compat.js.map +1 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.d.ts +5 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +13 -0
- package/src/executors/ensure-symlink/ensure-symlink.impl.js.map +1 -0
- package/src/executors/ensure-symlink/schema.json +9 -0
- package/src/executors/publish/compat.d.ts +2 -0
- package/src/executors/publish/compat.js +6 -0
- package/src/executors/publish/compat.js.map +1 -0
- package/src/executors/publish/publish.impl.d.ts +6 -0
- package/src/executors/publish/publish.impl.js +72 -0
- package/src/executors/publish/publish.impl.js.map +1 -0
- package/src/executors/publish/schema.d.ts +10 -0
- package/src/executors/publish/schema.json +42 -0
- package/src/executors/publish-set/compat.d.ts +2 -0
- package/src/executors/publish-set/compat.js +6 -0
- package/src/executors/publish-set/compat.js.map +1 -0
- package/src/executors/publish-set/publish-set.impl.d.ts +6 -0
- package/src/executors/publish-set/publish-set.impl.js +61 -0
- package/src/executors/publish-set/publish-set.impl.js.map +1 -0
- package/src/executors/publish-set/schema.d.ts +6 -0
- package/src/executors/publish-set/schema.json +19 -0
- package/src/executors/rollback/compat.d.ts +2 -0
- package/src/executors/rollback/compat.js +6 -0
- package/src/executors/rollback/compat.js.map +1 -0
- package/src/executors/rollback/rollback.impl.d.ts +6 -0
- package/src/executors/rollback/rollback.impl.js +61 -0
- package/src/executors/rollback/rollback.impl.js.map +1 -0
- package/src/executors/rollback/schema.d.ts +6 -0
- package/src/executors/rollback/schema.json +23 -0
- package/src/executors/run/compat.d.ts +2 -0
- package/src/executors/run/compat.js +6 -0
- package/src/executors/run/compat.js.map +1 -0
- package/src/executors/run/run.impl.d.ts +6 -0
- package/src/executors/run/run.impl.js +87 -0
- package/src/executors/run/run.impl.js.map +1 -0
- package/src/executors/run/schema.d.ts +11 -0
- package/src/executors/run/schema.json +51 -0
- package/src/executors/start/compat.d.ts +2 -0
- package/src/executors/start/compat.js +6 -0
- package/src/executors/start/compat.js.map +1 -0
- package/src/executors/start/schema.d.ts +22 -0
- package/src/executors/start/schema.json +85 -0
- package/src/executors/start/start.impl.d.ts +7 -0
- package/src/executors/start/start.impl.js +77 -0
- package/src/executors/start/start.impl.js.map +1 -0
- package/src/executors/sync-deps/compat.d.ts +2 -0
- package/src/executors/sync-deps/compat.js +6 -0
- package/src/executors/sync-deps/compat.js.map +1 -0
- package/src/executors/sync-deps/schema.d.ts +3 -0
- package/src/executors/sync-deps/schema.json +14 -0
- package/src/executors/sync-deps/sync-deps.impl.d.ts +8 -0
- package/src/executors/sync-deps/sync-deps.impl.js +58 -0
- package/src/executors/sync-deps/sync-deps.impl.js.map +1 -0
- package/src/generators/application/application.d.ts +5 -0
- package/src/generators/application/application.js +34 -0
- package/src/generators/application/application.js.map +1 -0
- package/src/generators/application/files/.babelrc.js.template +6 -0
- package/src/generators/application/files/app.json.template +32 -0
- package/src/generators/application/files/assets/adaptive-icon.png +0 -0
- package/src/generators/application/files/assets/favicon.png +0 -0
- package/src/generators/application/files/assets/icon.png +0 -0
- package/src/generators/application/files/assets/logo.png +0 -0
- package/src/generators/application/files/assets/splash.png +0 -0
- package/src/generators/application/files/assets/star.svg +11 -0
- package/src/generators/application/files/eas.js.template +1 -0
- package/src/generators/application/files/eas.json.template +18 -0
- package/src/generators/application/files/index.js.template +9 -0
- package/src/generators/application/files/metro.config.js.template +21 -0
- package/src/generators/application/files/package.json.template +25 -0
- package/src/generators/application/files/src/app/App.spec.tsx.template +9 -0
- package/src/generators/application/files/src/app/App.tsx.template +486 -0
- package/src/generators/application/files/src/app/icons/blog.svg +1 -0
- package/src/generators/application/files/src/app/icons/book.svg +1 -0
- package/src/generators/application/files/src/app/icons/checkmark.svg +1 -0
- package/src/generators/application/files/src/app/icons/chevron-right.svg +1 -0
- package/src/generators/application/files/src/app/icons/courses.svg +1 -0
- package/src/generators/application/files/src/app/icons/github.svg +1 -0
- package/src/generators/application/files/src/app/icons/heart.svg +1 -0
- package/src/generators/application/files/src/app/icons/logo.png +0 -0
- package/src/generators/application/files/src/app/icons/nx-cloud.svg +1 -0
- package/src/generators/application/files/src/app/icons/pointer.svg +1 -0
- package/src/generators/application/files/src/app/icons/terminal.svg +1 -0
- package/src/generators/application/files/src/app/icons/vscode.svg +1 -0
- package/src/generators/application/files/src/app/icons/youtube.svg +1 -0
- package/src/generators/application/files/test-setup.ts.template +1 -0
- package/src/generators/application/files/tsconfig.app.json.template +9 -0
- package/src/generators/application/files/tsconfig.json.template +25 -0
- package/src/generators/application/lib/add-detox.d.ts +3 -0
- package/src/generators/application/lib/add-detox.js +16 -0
- package/src/generators/application/lib/add-detox.js.map +1 -0
- package/src/generators/application/lib/add-project.d.ts +3 -0
- package/src/generators/application/lib/add-project.js +92 -0
- package/src/generators/application/lib/add-project.js.map +1 -0
- package/src/generators/application/lib/create-application-files.d.ts +3 -0
- package/src/generators/application/lib/create-application-files.js +24 -0
- package/src/generators/application/lib/create-application-files.js.map +1 -0
- package/src/generators/application/lib/normalize-options.d.ts +9 -0
- package/src/generators/application/lib/normalize-options.js +28 -0
- package/src/generators/application/lib/normalize-options.js.map +1 -0
- package/src/generators/application/schema.d.ts +17 -0
- package/src/generators/application/schema.json +76 -0
- package/src/generators/component/component.d.ts +5 -0
- package/src/generators/component/component.js +51 -0
- package/src/generators/component/component.js.map +1 -0
- package/src/generators/component/files/__fileName__.spec.tsx.template +11 -0
- package/src/generators/component/files/__fileName__.tsx.template +32 -0
- package/src/generators/component/lib/add-import.d.ts +3 -0
- package/src/generators/component/lib/add-import.js +30 -0
- package/src/generators/component/lib/add-import.js.map +1 -0
- package/src/generators/component/lib/normalize-options.d.ts +8 -0
- package/src/generators/component/lib/normalize-options.js +58 -0
- package/src/generators/component/lib/normalize-options.js.map +1 -0
- package/src/generators/component/schema.d.ts +15 -0
- package/src/generators/component/schema.json +82 -0
- package/src/generators/init/init.d.ts +6 -0
- package/src/generators/init/init.js +70 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/lib/add-git-ignore-entry.d.ts +2 -0
- package/src/generators/init/lib/add-git-ignore-entry.js +19 -0
- package/src/generators/init/lib/add-git-ignore-entry.js.map +1 -0
- package/src/generators/init/lib/gitignore-entries.d.ts +1 -0
- package/src/generators/init/lib/gitignore-entries.js +18 -0
- package/src/generators/init/lib/gitignore-entries.js.map +1 -0
- package/src/generators/init/lib/init-root-babel-config.d.ts +2 -0
- package/src/generators/init/lib/init-root-babel-config.js +14 -0
- package/src/generators/init/lib/init-root-babel-config.js.map +1 -0
- package/src/generators/init/schema.d.ts +5 -0
- package/src/generators/init/schema.json +27 -0
- package/src/generators/library/files/lib/README.md +7 -0
- package/src/generators/library/files/lib/package.json.template +5 -0
- package/src/generators/library/files/lib/src/index.ts.template +0 -0
- package/src/generators/library/files/lib/test-setup.ts.template +1 -0
- package/src/generators/library/files/lib/tsconfig.json.template +16 -0
- package/src/generators/library/files/lib/tsconfig.lib.json.template +9 -0
- package/src/generators/library/lib/normalize-options.d.ts +12 -0
- package/src/generators/library/lib/normalize-options.js +27 -0
- package/src/generators/library/lib/normalize-options.js.map +1 -0
- package/src/generators/library/library.d.ts +5 -0
- package/src/generators/library/library.js +114 -0
- package/src/generators/library/library.js.map +1 -0
- package/src/generators/library/schema.d.ts +22 -0
- package/src/generators/library/schema.json +97 -0
- package/src/utils/add-jest.d.ts +2 -0
- package/src/utils/add-jest.js +44 -0
- package/src/utils/add-jest.js.map +1 -0
- package/src/utils/add-linting.d.ts +3 -0
- package/src/utils/add-linting.js +42 -0
- package/src/utils/add-linting.js.map +1 -0
- package/src/utils/ensure-node-modules-symlink.d.ts +9 -0
- package/src/utils/ensure-node-modules-symlink.js +29 -0
- package/src/utils/ensure-node-modules-symlink.js.map +1 -0
- package/src/utils/find-all-npm-dependencies.d.ts +2 -0
- package/src/utils/find-all-npm-dependencies.js +26 -0
- package/src/utils/find-all-npm-dependencies.js.map +1 -0
- package/src/utils/symlink-task.d.ts +2 -0
- package/src/utils/symlink-task.js +19 -0
- package/src/utils/symlink-task.js.map +1 -0
- package/src/utils/versions.d.ts +21 -0
- package/src/utils/versions.js +25 -0
- package/src/utils/versions.js.map +1 -0
- package/tsconfig.json +13 -0
- package/tsconfig.lib.json +11 -0
- package/tsconfig.spec.json +19 -0
- package/typings/svg.d.ts +6 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nrwl/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 buildWebExecutor(options, context) {
|
|
10
|
+
return (0, tslib_1.__asyncGenerator)(this, arguments, function* buildWebExecutor_1() {
|
|
11
|
+
const projectRoot = context.workspace.projects[context.projectName].root;
|
|
12
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
13
|
+
try {
|
|
14
|
+
yield (0, tslib_1.__await)(runCliBuild(context.root, projectRoot, options));
|
|
15
|
+
yield yield (0, tslib_1.__await)({ success: true });
|
|
16
|
+
}
|
|
17
|
+
finally {
|
|
18
|
+
if (childProcess) {
|
|
19
|
+
childProcess.kill();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.default = buildWebExecutor;
|
|
25
|
+
function runCliBuild(workspaceRoot, projectRoot, options) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/expo/bin/cli.js'), ['build:web', ...createRunOptions(options)], { cwd: (0, path_1.join)(workspaceRoot, projectRoot) });
|
|
28
|
+
// Ensure the child process is killed when the parent exits
|
|
29
|
+
process.on('exit', () => childProcess.kill());
|
|
30
|
+
process.on('SIGTERM', () => childProcess.kill());
|
|
31
|
+
childProcess.on('error', (err) => {
|
|
32
|
+
reject(err);
|
|
33
|
+
});
|
|
34
|
+
childProcess.on('exit', (code) => {
|
|
35
|
+
if (code === 0) {
|
|
36
|
+
resolve(code);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
reject(code);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function createRunOptions(options) {
|
|
45
|
+
return Object.keys(options).reduce((acc, k) => {
|
|
46
|
+
const v = options[k];
|
|
47
|
+
if (typeof v === 'boolean') {
|
|
48
|
+
if (v === true) {
|
|
49
|
+
// when true, does not need to pass the value true, just need to pass the flag in kebob case
|
|
50
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
|
|
55
|
+
}
|
|
56
|
+
return acc;
|
|
57
|
+
}, []);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=build-web.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-web.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/build-web/build-web.impl.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AACtD,+BAA4B;AAC5B,iDAAmD;AAEnD,yFAAmF;AAQnF,IAAI,YAA0B,CAAC;AAE/B,SAA+B,gBAA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C/B,IAAI,IAAI,KAAK,CAAC,EAAE;gBACd,OAAO,CAAC,IAAI,CAAC,CAAC;aACf;iBAAM;gBACL,MAAM,CAAC,IAAI,CAAC,CAAC;aACd;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAO;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAC5C,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACrB,IAAI,OAAO,CAAC,KAAK,SAAS,EAAE;YAC1B,IAAI,CAAC,KAAK,IAAI,EAAE;gBACd,4FAA4F;gBAC5F,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;aACpC;SACF;aAAM;YACL,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;SACvC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const build_web_impl_1 = require("./build-web.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(build_web_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/build-web/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,qDAAgD;AAEhD,kBAAe,IAAA,0BAAiB,EAAC,wBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "NxExpoBuildWeb",
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"title": "Expo web Build executor",
|
|
6
|
+
"description": "Build the web app for production",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"clear": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "Clear all cached build files and assets.",
|
|
12
|
+
"alias": "c"
|
|
13
|
+
},
|
|
14
|
+
"noPwa": {
|
|
15
|
+
"type": "boolean",
|
|
16
|
+
"description": "Prevent webpack from generating the manifest.json and injecting meta into the index.html head."
|
|
17
|
+
},
|
|
18
|
+
"dev": {
|
|
19
|
+
"type": "boolean",
|
|
20
|
+
"description": "Turns dev flag on before bundling"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": []
|
|
24
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const ensure_symlink_impl_1 = require("./ensure-symlink.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(ensure_symlink_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/ensure-symlink/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,+DAA0D;AAE1D,kBAAe,IAAA,0BAAiB,EAAC,6BAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
5
|
+
function ensureSymlinkExecutor(_, context) {
|
|
6
|
+
return (0, tslib_1.__asyncGenerator)(this, arguments, function* ensureSymlinkExecutor_1() {
|
|
7
|
+
const projectRoot = context.workspace.projects[context.projectName].root;
|
|
8
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
9
|
+
yield yield (0, tslib_1.__await)({ success: true });
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
exports.default = ensureSymlinkExecutor;
|
|
13
|
+
//# sourceMappingURL=ensure-symlink.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ensure-symlink.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/ensure-symlink/ensure-symlink.impl.ts"],"names":[],"mappings":";;;AAEA,yFAAmF;AAMnF,SAA+B,qBAAqB,CAClD,CAAC,EACD,OAAwB;;QAExB,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QAEzE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,iCAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;IAC1B,CAAC;CAAA;AATD,wCASC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli": "nx",
|
|
3
|
+
"$id": "NxExpoEnsureSymlink",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"title": "Ensure Symlink for Expo",
|
|
6
|
+
"description": "Ensure workspace node_modules is symlink under app's node_modules folder.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {}
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const publish_impl_1 = require("./publish.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(publish_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/publish/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,iDAA6C;AAE7C,kBAAe,IAAA,0BAAiB,EAAC,sBAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
+
import { ExpoPublishOptions } from './schema';
|
|
3
|
+
export interface ExpoPublishOutput {
|
|
4
|
+
success: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function publishExecutor(options: ExpoPublishOptions, context: ExecutorContext): AsyncGenerator<ExpoPublishOutput>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nrwl/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
|
+
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
9
|
+
let childProcess;
|
|
10
|
+
function publishExecutor(options, context) {
|
|
11
|
+
return (0, tslib_1.__asyncGenerator)(this, arguments, function* publishExecutor_1() {
|
|
12
|
+
const projectRoot = context.workspace.projects[context.projectName].root;
|
|
13
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
14
|
+
if (options.sync) {
|
|
15
|
+
(0, sync_deps_impl_1.displayNewlyAddedDepsMessage)(context.projectName, yield (0, tslib_1.__await)((0, sync_deps_impl_1.syncDeps)(context.projectName, projectRoot)));
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
yield (0, tslib_1.__await)(runCliPublish(context.root, projectRoot, options));
|
|
19
|
+
yield yield (0, tslib_1.__await)({ success: true });
|
|
20
|
+
}
|
|
21
|
+
finally {
|
|
22
|
+
if (childProcess) {
|
|
23
|
+
childProcess.kill();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
exports.default = publishExecutor;
|
|
29
|
+
function runCliPublish(workspaceRoot, projectRoot, options) {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/expo/bin/cli.js'), [
|
|
32
|
+
'publish',
|
|
33
|
+
(0, path_1.join)(workspaceRoot, projectRoot),
|
|
34
|
+
...createPublishOptions(options),
|
|
35
|
+
], {
|
|
36
|
+
cwd: projectRoot,
|
|
37
|
+
});
|
|
38
|
+
// Ensure the child process is killed when the parent exits
|
|
39
|
+
process.on('exit', () => childProcess.kill());
|
|
40
|
+
process.on('SIGTERM', () => childProcess.kill());
|
|
41
|
+
childProcess.on('error', (err) => {
|
|
42
|
+
reject(err);
|
|
43
|
+
});
|
|
44
|
+
childProcess.on('exit', (code) => {
|
|
45
|
+
if (code === 0) {
|
|
46
|
+
resolve(code);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
reject(code);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const nxOptions = ['sync'];
|
|
55
|
+
function createPublishOptions(options) {
|
|
56
|
+
return Object.keys(options).reduce((acc, k) => {
|
|
57
|
+
const v = options[k];
|
|
58
|
+
if (!nxOptions.includes(k)) {
|
|
59
|
+
if (typeof v === 'boolean') {
|
|
60
|
+
if (v === true) {
|
|
61
|
+
// when true, does not need to pass the value true, just need to pass the flag in kebob case
|
|
62
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return acc;
|
|
70
|
+
}, []);
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=publish.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/publish/publish.impl.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AACtD,+BAA4B;AAC5B,iDAAmD;AAEnD,yFAAmF;AACnF,gEAGqC;AAOrC,IAAI,YAA0B,CAAC;AAE/B,SAA+B,eAAe,CAC5C,OAA2B,EAC3B,OAAwB;;QAExB,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACzE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,IAAA,6CAA4B,EAC1B,OAAO,CAAC,WAAW,EACnB,2BAAM,IAAA,yBAAQ,EAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA,CACjD,CAAC;SACH;QAED,IAAI;YACF,2BAAM,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YAExD,iCAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;SACzB;gBAAS;YACR,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CAAA;AAtBD,kCAsBC;AAED,SAAS,aAAa,CACpB,aAAqB,EACrB,WAAmB,EACnB,OAA2B;IAE3B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,YAAY,GA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C,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACpC;aACF;iBAAM;gBACL,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;aACvC;SACF;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// options from https://docs.expo.dev/workflow/expo-cli/#expo-publish
|
|
2
|
+
export interface ExpoPublishOptions {
|
|
3
|
+
quiet: boolean; // default is false
|
|
4
|
+
sendTo?: string;
|
|
5
|
+
clear: boolean; // default is false
|
|
6
|
+
target: 'managed' | 'bare';
|
|
7
|
+
maxWorkers?: number;
|
|
8
|
+
releaseChannel: string; // default is 'default'
|
|
9
|
+
sync: boolean; // default is true
|
|
10
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli": "nx",
|
|
3
|
+
"$id": "NxExpoPublish",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"title": "Publish for Expo",
|
|
6
|
+
"description": "Deploy a project to Expo hosting",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"quiet": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "Suppress verbose output from the Metro bundler",
|
|
12
|
+
"default": false,
|
|
13
|
+
"alias": "q"
|
|
14
|
+
},
|
|
15
|
+
"sendTo": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "A phone number or email address to send a link to",
|
|
18
|
+
"alias": "s"
|
|
19
|
+
},
|
|
20
|
+
"clear": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "Clear the Metro bundler cache",
|
|
23
|
+
"default": false,
|
|
24
|
+
"alias": "c"
|
|
25
|
+
},
|
|
26
|
+
"target": {
|
|
27
|
+
"enum": ["managed", "bare"],
|
|
28
|
+
"default": "managed",
|
|
29
|
+
"description": "Target environment for which this publish is intended. Options are managed or bare.",
|
|
30
|
+
"alias": "t"
|
|
31
|
+
},
|
|
32
|
+
"maxWorkers": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"description": "Maximum number of tasks to allow Metro to spawn"
|
|
35
|
+
},
|
|
36
|
+
"releaseChannel": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "The release channel to publish to. Default is 'default'.",
|
|
39
|
+
"default": "default"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const publish_set_impl_1 = require("./publish-set.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(publish_set_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/publish-set/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,yDAAoD;AAEpD,kBAAe,IAAA,0BAAiB,EAAC,0BAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
+
import { ExpoPublishSetOptions } from './schema';
|
|
3
|
+
export interface ExpoPublishSetOutput {
|
|
4
|
+
success: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function publishSetExecutor(options: ExpoPublishSetOptions, context: ExecutorContext): AsyncGenerator<ExpoPublishSetOutput>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nrwl/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 publishSetExecutor(options, context) {
|
|
10
|
+
return (0, tslib_1.__asyncGenerator)(this, arguments, function* publishSetExecutor_1() {
|
|
11
|
+
const projectRoot = context.workspace.projects[context.projectName].root;
|
|
12
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
13
|
+
try {
|
|
14
|
+
yield (0, tslib_1.__await)(runCliPublishSet(context.root, projectRoot, options));
|
|
15
|
+
yield yield (0, tslib_1.__await)({ success: true });
|
|
16
|
+
}
|
|
17
|
+
finally {
|
|
18
|
+
if (childProcess) {
|
|
19
|
+
childProcess.kill();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.default = publishSetExecutor;
|
|
25
|
+
function runCliPublishSet(workspaceRoot, projectRoot, options) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/expo/bin/cli.js'), ['publish:set', ...createPublishSetOptions(options)], {
|
|
28
|
+
cwd: projectRoot,
|
|
29
|
+
});
|
|
30
|
+
// Ensure the child process is killed when the parent exits
|
|
31
|
+
process.on('exit', () => childProcess.kill());
|
|
32
|
+
process.on('SIGTERM', () => childProcess.kill());
|
|
33
|
+
childProcess.on('error', (err) => {
|
|
34
|
+
reject(err);
|
|
35
|
+
});
|
|
36
|
+
childProcess.on('exit', (code) => {
|
|
37
|
+
if (code === 0) {
|
|
38
|
+
resolve(code);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
reject(code);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function createPublishSetOptions(options) {
|
|
47
|
+
return Object.keys(options).reduce((acc, k) => {
|
|
48
|
+
const v = options[k];
|
|
49
|
+
if (typeof v === 'boolean') {
|
|
50
|
+
if (v === true) {
|
|
51
|
+
// when true, does not need to pass the value true, just need to pass the flag in kebob case
|
|
52
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
|
|
57
|
+
}
|
|
58
|
+
return acc;
|
|
59
|
+
}, []);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=publish-set.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-set.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/publish-set/publish-set.impl.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AACtD,+BAA4B;AAC5B,iDAAmD;AAEnD,yFAAmF;AAOnF,IAAI,YAA0B,CAAC;AAE/B,SAA+B,kBAAkB,CAC/C,OAA8B,EAC9B,OAAwB;;QAExB,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACzE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,IAAI;YACF,2BAAM,gBAAgB,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YAE3D,iCAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;SACzB;gBAAS;YACR,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CAAA;AAhBD,qCAgBC;AAED,SAAS,gBAAgB,CACvB,aAAqB,EACrB,WAAmB,EACnB,OAA8B;IAE9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,E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C,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;SACvC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli": "nx",
|
|
3
|
+
"$id": "NxExpoPublishSet",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"title": "Set Publish Channel for Expo",
|
|
6
|
+
"description": "Specify the channel to serve a published release",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"releaseChannel": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The release channel to publish to."
|
|
12
|
+
},
|
|
13
|
+
"publishId": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The id of the published release to serve from the channel."
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["releaseChannel", "publishId"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const rollback_impl_1 = require("./rollback.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(rollback_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/rollback/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,mDAA+C;AAE/C,kBAAe,IAAA,0BAAiB,EAAC,uBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
+
import { ExpoRollbackOptions } from './schema';
|
|
3
|
+
export interface ExpoRollbackOutput {
|
|
4
|
+
success: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function rollbackExecutor(options: ExpoRollbackOptions, context: ExecutorContext): AsyncGenerator<ExpoRollbackOutput>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nrwl/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 rollbackExecutor(options, context) {
|
|
10
|
+
return (0, tslib_1.__asyncGenerator)(this, arguments, function* rollbackExecutor_1() {
|
|
11
|
+
const projectRoot = context.workspace.projects[context.projectName].root;
|
|
12
|
+
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
13
|
+
try {
|
|
14
|
+
yield (0, tslib_1.__await)(runCliRollback(context.root, projectRoot, options));
|
|
15
|
+
yield yield (0, tslib_1.__await)({ success: true });
|
|
16
|
+
}
|
|
17
|
+
finally {
|
|
18
|
+
if (childProcess) {
|
|
19
|
+
childProcess.kill();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.default = rollbackExecutor;
|
|
25
|
+
function runCliRollback(workspaceRoot, projectRoot, options) {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
childProcess = (0, child_process_1.fork)((0, path_1.join)(workspaceRoot, './node_modules/expo/bin/cli.js'), ['publish:rollback', ...createRollbackOptions(options)], {
|
|
28
|
+
cwd: projectRoot,
|
|
29
|
+
});
|
|
30
|
+
// Ensure the child process is killed when the parent exits
|
|
31
|
+
process.on('exit', () => childProcess.kill());
|
|
32
|
+
process.on('SIGTERM', () => childProcess.kill());
|
|
33
|
+
childProcess.on('error', (err) => {
|
|
34
|
+
reject(err);
|
|
35
|
+
});
|
|
36
|
+
childProcess.on('exit', (code) => {
|
|
37
|
+
if (code === 0) {
|
|
38
|
+
resolve(code);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
reject(code);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function createRollbackOptions(options) {
|
|
47
|
+
return Object.keys(options).reduce((acc, k) => {
|
|
48
|
+
const v = options[k];
|
|
49
|
+
if (typeof v === 'boolean') {
|
|
50
|
+
if (v === true) {
|
|
51
|
+
// when true, does not need to pass the value true, just need to pass the flag in kebob case
|
|
52
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
acc.push(`--${(0, devkit_1.names)(k).fileName}`, v);
|
|
57
|
+
}
|
|
58
|
+
return acc;
|
|
59
|
+
}, []);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=rollback.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rollback.impl.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/rollback/rollback.impl.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AACtD,+BAA4B;AAC5B,iDAAmD;AAEnD,yFAAmF;AAOnF,IAAI,YAA0B,CAAC;AAE/B,SAA+B,gBAAgB,CAC7C,OAA4B,EAC5B,OAAwB;;QAExB,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC;QACzE,IAAA,sDAAwB,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,IAAI;YACF,2BAAM,cAAc,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA,CAAC;YAEzD,iCAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA,CAAC;SACzB;gBAAS;YAC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E;YAC1B,IAAI,CAAC,KAAK,IAAI,EAAE;gBACd,4FAA4F;gBAC5F,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;aACpC;SACF;aAAM;YACL,GAAG,CAAC,IAAI,CAAC,KAAK,IAAA,cAAK,EAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;SACvC;QACD,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cli": "nx",
|
|
3
|
+
"$id": "NxExpoRollback",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"title": "Rollback Publish Command for Expo",
|
|
6
|
+
"description": "Undo an update to a channel",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"releaseChannel": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The release channel to publish to."
|
|
12
|
+
},
|
|
13
|
+
"sdkVersion": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The sdk version to rollback."
|
|
16
|
+
},
|
|
17
|
+
"platform": {
|
|
18
|
+
"enum": ["ios", "android"],
|
|
19
|
+
"description": "The platform to rollback."
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": ["releaseChannel", "sdkVersion"]
|
|
23
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
+
const run_impl_1 = require("./run.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(run_impl_1.default);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/run/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AAEjD,yCAAqC;AAErC,kBAAe,IAAA,0BAAiB,EAAC,kBAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
+
import { ExpoRunOptions } from './schema';
|
|
3
|
+
export interface ExpoRunOutput {
|
|
4
|
+
success: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function runExecutor(options: ExpoRunOptions, context: ExecutorContext): AsyncGenerator<ExpoRunOutput>;
|