@nx/expo 23.0.0-beta.0 → 23.0.0-beta.10
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/package.json +8 -8
- package/plugins/plugin.d.ts.map +1 -1
- package/plugins/plugin.js +15 -23
- package/src/executors/build/build.impl.d.ts.map +1 -1
- package/src/executors/build/build.impl.js +2 -0
- package/src/executors/build/schema.json +1 -0
- package/src/executors/export/export.impl.d.ts.map +1 -1
- package/src/executors/export/export.impl.js +2 -0
- package/src/executors/export/schema.json +1 -0
- package/src/executors/install/install.impl.d.ts.map +1 -1
- package/src/executors/install/install.impl.js +2 -0
- package/src/executors/install/schema.json +1 -0
- package/src/executors/prebuild/prebuild.impl.d.ts.map +1 -1
- package/src/executors/prebuild/prebuild.impl.js +2 -0
- package/src/executors/prebuild/schema.json +1 -0
- package/src/executors/run/run.impl.d.ts.map +1 -1
- package/src/executors/run/run.impl.js +2 -0
- package/src/executors/run/schema.json +1 -0
- package/src/executors/serve/schema.json +1 -0
- package/src/executors/serve/serve.impl.d.ts.map +1 -1
- package/src/executors/serve/serve.impl.js +2 -0
- package/src/executors/start/schema.json +1 -0
- package/src/executors/start/start.impl.d.ts.map +1 -1
- package/src/executors/start/start.impl.js +2 -0
- package/src/executors/submit/schema.json +1 -0
- package/src/executors/submit/submit.impl.d.ts.map +1 -1
- package/src/executors/submit/submit.impl.js +2 -0
- package/src/generators/application/application.d.ts.map +1 -1
- package/src/generators/application/application.js +2 -2
- package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
- package/src/generators/application/lib/add-e2e.js +2 -2
- package/src/generators/application/lib/add-project.d.ts.map +1 -1
- package/src/generators/application/lib/add-project.js +4 -2
- package/src/generators/application/lib/normalize-options.js +3 -3
- package/src/generators/component/lib/normalize-options.d.ts +2 -2
- package/src/generators/component/lib/normalize-options.d.ts.map +1 -1
- package/src/generators/component/lib/normalize-options.js +3 -4
- package/src/generators/component/schema.d.ts +0 -5
- package/src/generators/component/schema.json +0 -5
- package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/convert-to-inferred.js +4 -5
- package/src/generators/convert-to-inferred/lib/post-target-transformer.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/post-target-transformer.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/post-target-transformer.js +2 -2
- package/src/generators/convert-to-inferred/lib/process-build-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-build-options.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/process-export-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-export-options.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/process-generic-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-generic-options.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/process-install-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-install-options.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/process-prebuild-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-prebuild-options.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/process-run-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-run-options.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/process-serve-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-serve-options.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/process-start-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-start-options.d.ts.map +1 -1
- package/src/generators/convert-to-inferred/lib/process-submit-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-submit-options.d.ts.map +1 -1
- package/src/generators/init/init.d.ts.map +1 -1
- package/src/generators/init/init.js +2 -2
- package/src/generators/library/lib/normalize-options.js +3 -3
- package/src/generators/library/library.d.ts.map +1 -1
- package/src/generators/library/library.js +4 -6
- package/src/utils/deprecation.d.ts +4 -0
- package/src/utils/deprecation.d.ts.map +1 -0
- package/src/utils/deprecation.js +23 -0
- package/src/utils/expo-project-detection.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/expo",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.10",
|
|
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": [
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"type": "commonjs",
|
|
30
30
|
"types": "index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nx/devkit": "23.0.0-beta.
|
|
33
|
-
"@nx/eslint": "23.0.0-beta.
|
|
34
|
-
"@nx/js": "23.0.0-beta.
|
|
35
|
-
"@nx/react": "23.0.0-beta.
|
|
32
|
+
"@nx/devkit": "23.0.0-beta.10",
|
|
33
|
+
"@nx/eslint": "23.0.0-beta.10",
|
|
34
|
+
"@nx/js": "23.0.0-beta.10",
|
|
35
|
+
"@nx/react": "23.0.0-beta.10",
|
|
36
36
|
"enhanced-resolve": "^5.8.3",
|
|
37
37
|
"picocolors": "^1.1.0",
|
|
38
38
|
"semver": "^7.6.3",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"metro-resolver": ">= 0.82.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"nx": "23.0.0-beta.
|
|
47
|
+
"nx": "23.0.0-beta.10"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@nx/detox": "23.0.0-beta.
|
|
51
|
-
"@nx/rollup": "23.0.0-beta.
|
|
50
|
+
"@nx/detox": "23.0.0-beta.10",
|
|
51
|
+
"@nx/rollup": "23.0.0-beta.10"
|
|
52
52
|
},
|
|
53
53
|
"executors": "./executors.json",
|
|
54
54
|
"ng-update": {
|
package/plugins/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../packages/expo/plugins/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../packages/expo/plugins/plugin.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,aAAa,EAMd,MAAM,YAAY,CAAC;AAQpB,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAID,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,iBAAiB,CA6BxD,CAAC;AAEF,eAAO,MAAM,aAAa,kCAAc,CAAC"}
|
package/plugins/plugin.js
CHANGED
|
@@ -1,43 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createNodesV2 = exports.createNodes = void 0;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const js_1 = require("@nx/js");
|
|
7
|
-
const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
|
|
8
8
|
const fs_1 = require("fs");
|
|
9
|
-
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
10
9
|
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
11
10
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
12
|
-
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
13
11
|
const util_1 = require("@nx/js/src/plugins/typescript/util");
|
|
14
|
-
function readTargetsCache(cachePath) {
|
|
15
|
-
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
16
|
-
}
|
|
17
|
-
function writeTargetsToCache(cachePath, targetsCache) {
|
|
18
|
-
const oldCache = readTargetsCache(cachePath);
|
|
19
|
-
(0, devkit_1.writeJsonFile)(cachePath, {
|
|
20
|
-
...oldCache,
|
|
21
|
-
targetsCache,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
12
|
exports.createNodes = [
|
|
25
13
|
'**/app.{json,config.js,config.ts}',
|
|
26
14
|
async (configFiles, options, context) => {
|
|
27
15
|
const optionsHash = (0, devkit_internals_1.hashObject)(options);
|
|
28
16
|
const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `expo-${optionsHash}.hash`);
|
|
29
|
-
const targetsCache =
|
|
30
|
-
const
|
|
17
|
+
const targetsCache = new internal_1.PluginCache(cachePath);
|
|
18
|
+
const packageManager = (0, devkit_1.detectPackageManager)(context.workspaceRoot);
|
|
19
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager);
|
|
20
|
+
const lockFileName = (0, js_1.getLockFileName)(packageManager);
|
|
31
21
|
try {
|
|
32
|
-
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, pmc), configFiles, options, context);
|
|
22
|
+
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, pmc, lockFileName), configFiles, options, context);
|
|
33
23
|
}
|
|
34
24
|
finally {
|
|
35
|
-
|
|
25
|
+
targetsCache.writeToDisk();
|
|
36
26
|
}
|
|
37
27
|
},
|
|
38
28
|
];
|
|
39
29
|
exports.createNodesV2 = exports.createNodes;
|
|
40
|
-
async function createNodesInternal(configFile, options, context, targetsCache, pmc) {
|
|
30
|
+
async function createNodesInternal(configFile, options, context, targetsCache, pmc, lockFileName) {
|
|
41
31
|
options = normalizeOptions(options);
|
|
42
32
|
const projectRoot = (0, path_1.dirname)(configFile);
|
|
43
33
|
// Do not create a project if package.json or project.json or metro.config.js isn't there.
|
|
@@ -54,18 +44,20 @@ async function createNodesInternal(configFile, options, context, targetsCache, p
|
|
|
54
44
|
!packageJson.devDependencies?.['expo']) {
|
|
55
45
|
return {};
|
|
56
46
|
}
|
|
57
|
-
const hash = await (0,
|
|
58
|
-
targetsCache
|
|
47
|
+
const hash = await (0, internal_1.calculateHashForCreateNodes)(projectRoot, options, context, [lockFileName]);
|
|
48
|
+
if (!targetsCache.has(hash)) {
|
|
49
|
+
targetsCache.set(hash, buildExpoTargets(projectRoot, options, context, pmc));
|
|
50
|
+
}
|
|
59
51
|
return {
|
|
60
52
|
projects: {
|
|
61
53
|
[projectRoot]: {
|
|
62
|
-
targets: targetsCache
|
|
54
|
+
targets: targetsCache.get(hash),
|
|
63
55
|
},
|
|
64
56
|
},
|
|
65
57
|
};
|
|
66
58
|
}
|
|
67
59
|
function buildExpoTargets(projectRoot, options, context, pmc) {
|
|
68
|
-
const namedInputs = (0,
|
|
60
|
+
const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
|
|
69
61
|
const targets = {
|
|
70
62
|
[options.startTargetName]: {
|
|
71
63
|
executor: `@nx/expo:start`,
|
|
@@ -113,7 +105,7 @@ function buildExpoTargets(projectRoot, options, context, pmc) {
|
|
|
113
105
|
}
|
|
114
106
|
function getAppConfig(configFilePath, context) {
|
|
115
107
|
const resolvedPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
116
|
-
return (0,
|
|
108
|
+
return (0, internal_1.loadConfigFile)(resolvedPath);
|
|
117
109
|
}
|
|
118
110
|
function getInputs(namedInputs) {
|
|
119
111
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAMhB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"build.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/build/build.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAMhB,MAAM,YAAY,CAAC;AAWpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,wBAA+B,aAAa,CAC1C,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,sBAAsB,CAAC,CAuBxC"}
|
|
@@ -8,8 +8,10 @@ const child_process_1 = require("child_process");
|
|
|
8
8
|
const node_fs_1 = require("node:fs");
|
|
9
9
|
const path_1 = require("path");
|
|
10
10
|
const resolve_eas_1 = require("../../utils/resolve-eas");
|
|
11
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
11
12
|
let childProcess;
|
|
12
13
|
async function* buildExecutor(options, context) {
|
|
14
|
+
(0, deprecation_1.warnExpoExecutorDeprecation)('build');
|
|
13
15
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
14
16
|
let resetLocalFunction;
|
|
15
17
|
try {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"title": "Expo EAS Build executor",
|
|
8
8
|
"description": "Start an EAS build for your expo project.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"x-deprecated": "The `@nx/expo:build` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
10
11
|
"presets": [
|
|
11
12
|
{
|
|
12
13
|
"name": "Build for a specific platform",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/export/export.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"export.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/export/export.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,wBAA+B,cAAc,CAC3C,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,gBAAgB,CAAC,CAgBlC;AAqCD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,EAC7B,WAAW,EAAE,MAAM,SA4BpB"}
|
|
@@ -6,8 +6,10 @@ const devkit_1 = require("@nx/devkit");
|
|
|
6
6
|
const internal_1 = require("@nx/devkit/internal");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
const path_1 = require("path");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
9
10
|
let childProcess;
|
|
10
11
|
async function* exportExecutor(options, context) {
|
|
12
|
+
(0, deprecation_1.warnExpoExecutorDeprecation)('export');
|
|
11
13
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
14
|
try {
|
|
13
15
|
await exportAsync(context.root, projectRoot, options);
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"title": "Expo Export",
|
|
8
8
|
"description": "Export the JavaScript and assets for your app using Metro/webpack bundler.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"x-deprecated": "The `@nx/expo:export` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
10
11
|
"properties": {
|
|
11
12
|
"platform": {
|
|
12
13
|
"description": "Choose the platform to compile for",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/install/install.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAS,MAAM,YAAY,CAAC;AAIpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"install.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/install/install.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAS,MAAM,YAAY,CAAC;AAIpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAQ9C,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,wBAA+B,eAAe,CAC5C,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,iBAAiB,CAAC,CAanC;AAED,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,kBAAkB,iBAwC5B"}
|
|
@@ -6,8 +6,10 @@ const devkit_1 = require("@nx/devkit");
|
|
|
6
6
|
const fileutils_1 = require("nx/src/utils/fileutils");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const sync_deps_impl_1 = require("../sync-deps/sync-deps.impl");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
9
10
|
let childProcess;
|
|
10
11
|
async function* installExecutor(options, context) {
|
|
12
|
+
(0, deprecation_1.warnExpoExecutorDeprecation)('install');
|
|
11
13
|
try {
|
|
12
14
|
await installAndUpdatePackageJson(context, options);
|
|
13
15
|
yield {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"title": "Expo Install",
|
|
8
8
|
"description": "Install a module or other package to a project.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"x-deprecated": "The `@nx/expo:install` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
10
11
|
"properties": {
|
|
11
12
|
"packages": {
|
|
12
13
|
"type": "array",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuild.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/prebuild/prebuild.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAwB,MAAM,YAAY,CAAC;AAMnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"prebuild.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/prebuild/prebuild.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAwB,MAAM,YAAY,CAAC;AAMnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,wBAA+B,gBAAgB,CAC7C,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,kBAAkB,CAAC,CA2BpC;AAED,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
|
|
@@ -7,8 +7,10 @@ const internal_1 = require("@nx/devkit/internal");
|
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
10
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
10
11
|
let childProcess;
|
|
11
12
|
async function* prebuildExecutor(options, context) {
|
|
13
|
+
(0, deprecation_1.warnExpoExecutorDeprecation)('prebuild');
|
|
12
14
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
15
|
try {
|
|
14
16
|
await prebuildAsync(context.root, projectRoot, options);
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"title": "Expo Prebuild",
|
|
8
8
|
"description": "Create native iOS and Android project files for building natively.",
|
|
9
9
|
"type": "object",
|
|
10
|
+
"x-deprecated": "The `@nx/expo:prebuild` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
10
11
|
"properties": {
|
|
11
12
|
"clean": {
|
|
12
13
|
"type": "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/run/run.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAS,MAAM,YAAY,CAAC;AAOpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"run.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/run/run.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAS,MAAM,YAAY,CAAC;AAOpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK1C,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,wBAA+B,WAAW,CACxC,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,aAAa,CAAC,CAoC/B"}
|
|
@@ -9,8 +9,10 @@ const os_1 = require("os");
|
|
|
9
9
|
const path_1 = require("path");
|
|
10
10
|
const prebuild_impl_1 = require("../prebuild/prebuild.impl");
|
|
11
11
|
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
12
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
12
13
|
let childProcess;
|
|
13
14
|
async function* runExecutor(options, context) {
|
|
15
|
+
(0, deprecation_1.warnExpoExecutorDeprecation)('run');
|
|
14
16
|
if ((0, os_1.platform)() !== 'darwin' && options.platform === 'ios') {
|
|
15
17
|
throw new Error(`The run-ios build requires Mac to run`);
|
|
16
18
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"title": "Run iOS or Android application",
|
|
9
9
|
"description": "Run Expo target options.",
|
|
10
10
|
"type": "object",
|
|
11
|
+
"x-deprecated": "The `@nx/expo:run` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
11
12
|
"properties": {
|
|
12
13
|
"platform": {
|
|
13
14
|
"description": "Platform to run for (ios, android).",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"title": "Serve web app for Expo",
|
|
9
9
|
"description": "Packager Server target options.",
|
|
10
10
|
"type": "object",
|
|
11
|
+
"x-deprecated": "The `@nx/expo:serve` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
11
12
|
"properties": {
|
|
12
13
|
"port": {
|
|
13
14
|
"type": "number",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/serve/serve.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiB,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAQ,MAAM,eAAe,CAAC;AAGnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"serve.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/serve/serve.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiB,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAQ,MAAM,eAAe,CAAC;AAGnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAGnD,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAA+B,aAAa,CAC1C,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,eAAe,CAAC,CA4BjC;AAED,wBAAsB,WAAW,CAC/B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,YAAY,CAAC,CAmBvB"}
|
|
@@ -7,7 +7,9 @@ const internal_1 = require("@nx/devkit/internal");
|
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const is_packager_running_1 = require("./lib/is-packager-running");
|
|
10
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
10
11
|
async function* serveExecutor(options, context) {
|
|
12
|
+
(0, deprecation_1.warnExpoExecutorDeprecation)('serve');
|
|
11
13
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
14
|
const serveProcess = await runCliServe(context.root, projectRoot, options);
|
|
13
15
|
yield {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"title": "Packager Server for Expo",
|
|
9
9
|
"description": "Packager Server target options.",
|
|
10
10
|
"type": "object",
|
|
11
|
+
"x-deprecated": "The `@nx/expo:start` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
11
12
|
"properties": {
|
|
12
13
|
"forceManifestType": {
|
|
13
14
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/start/start.impl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAiB,MAAM,YAAY,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"start.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/start/start.impl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAiB,MAAM,YAAY,CAAC;AAK5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,wBAA+B,aAAa,CAC1C,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,eAAe,CAAC,CAqBjC"}
|
|
@@ -7,8 +7,10 @@ const devkit_1 = require("@nx/devkit");
|
|
|
7
7
|
const internal_1 = require("@nx/devkit/internal");
|
|
8
8
|
const child_process_1 = require("child_process");
|
|
9
9
|
const path_1 = require("path");
|
|
10
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
10
11
|
let childProcess;
|
|
11
12
|
async function* startExecutor(options, context) {
|
|
13
|
+
(0, deprecation_1.warnExpoExecutorDeprecation)('start');
|
|
12
14
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
13
15
|
try {
|
|
14
16
|
const baseUrl = `http://localhost:${options.port}`;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"title": "EXPO EAS Submit Executor",
|
|
5
5
|
"description": "Submit app binary to App Store and/or Play Store.",
|
|
6
6
|
"type": "object",
|
|
7
|
+
"x-deprecated": "The `@nx/expo:submit` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` to migrate to the `@nx/expo/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
7
8
|
"presets": [
|
|
8
9
|
{
|
|
9
10
|
"name": "Submit for a specific platform",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/submit/submit.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAS,MAAM,YAAY,CAAC;AAOpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"submit.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/executors/submit/submit.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAS,MAAM,YAAY,CAAC;AAOpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,wBAA+B,cAAc,CAC3C,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,uBAAuB,CAAC,CAezC"}
|
|
@@ -6,8 +6,10 @@ const internal_1 = require("@nx/devkit/internal");
|
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
const resolve_eas_1 = require("../../utils/resolve-eas");
|
|
9
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
9
10
|
let childProcess;
|
|
10
11
|
async function* submitExecutor(options, context) {
|
|
12
|
+
(0, deprecation_1.warnExpoExecutorDeprecation)('submit');
|
|
11
13
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
14
|
try {
|
|
13
15
|
await runCliSubmit(context.root, projectRoot, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/application/application.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/application/application.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAGjB,IAAI,EACL,MAAM,YAAY,CAAC;AAiBpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKlC,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAmF5B;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.expoApplicationGenerator = expoApplicationGenerator;
|
|
4
4
|
exports.expoApplicationGeneratorInternal = expoApplicationGeneratorInternal;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const js_1 = require("@nx/js");
|
|
8
9
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
@@ -16,7 +17,6 @@ const add_eas_scripts_1 = require("./lib/add-eas-scripts");
|
|
|
16
17
|
const add_e2e_1 = require("./lib/add-e2e");
|
|
17
18
|
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
18
19
|
const init_root_babel_config_1 = require("../../utils/init-root-babel-config");
|
|
19
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
20
20
|
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
21
21
|
async function expoApplicationGenerator(host, schema) {
|
|
22
22
|
return await expoApplicationGeneratorInternal(host, {
|
|
@@ -76,7 +76,7 @@ async function expoApplicationGeneratorInternal(host, schema) {
|
|
|
76
76
|
await (0, devkit_1.formatFiles)(host);
|
|
77
77
|
}
|
|
78
78
|
tasks.push(() => {
|
|
79
|
-
(0,
|
|
79
|
+
(0, internal_1.logShowProjectCommand)(options.projectName);
|
|
80
80
|
});
|
|
81
81
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
82
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-e2e.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/application/lib/add-e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,iBAAiB,EAGjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAsB,MAAM,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAiJ5B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addE2e = addE2e;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const e2e_web_server_info_utils_1 = require("@nx/devkit/src/generators/e2e-web-server-info-utils");
|
|
6
6
|
const has_expo_plugin_1 = require("../../../utils/has-expo-plugin");
|
|
7
7
|
const versions_1 = require("../../../utils/versions");
|
|
8
8
|
async function addE2e(tree, options) {
|
|
@@ -126,7 +126,7 @@ async function getExpoE2EWebServerInfo(tree, projectName, configFilePath, isPlug
|
|
|
126
126
|
nxJson.targetDefaults?.['serve'].options?.port) {
|
|
127
127
|
e2ePort = nxJson.targetDefaults?.['serve'].options?.port;
|
|
128
128
|
}
|
|
129
|
-
return (0,
|
|
129
|
+
return (0, internal_1.getE2EWebServerInfo)(tree, projectName, {
|
|
130
130
|
plugin: '@nx/expo/plugin',
|
|
131
131
|
serveTargetName: 'serveTargetName',
|
|
132
132
|
serveStaticTargetName: 'serveTargetName',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/application/lib/add-project.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/application/lib/add-project.ts"],"names":[],"mappings":"AACA,OAAO,EAML,IAAI,EAEL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAwD/D"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addProject = addProject;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
|
|
6
6
|
const has_expo_plugin_1 = require("../../../utils/has-expo-plugin");
|
|
7
|
+
const deprecation_1 = require("../../../utils/deprecation");
|
|
7
8
|
function addProject(host, options) {
|
|
8
9
|
const hasPlugin = (0, has_expo_plugin_1.hasExpoPlugin)(host);
|
|
9
10
|
if (!hasPlugin) {
|
|
10
|
-
(0,
|
|
11
|
+
(0, deprecation_1.warnExpoExecutorGenerating)();
|
|
12
|
+
(0, internal_1.addBuildTargetDefaults)(host, '@nx/expo:build');
|
|
11
13
|
}
|
|
12
14
|
const projectConfiguration = {
|
|
13
15
|
root: options.appProjectRoot,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
7
|
async function normalizeOptions(host, options) {
|
|
8
|
-
await (0,
|
|
9
|
-
const { projectName, names: projectNames, projectRoot: appProjectRoot, importPath, } = await (0,
|
|
8
|
+
await (0, internal_1.ensureRootProjectName)(options, 'application');
|
|
9
|
+
const { projectName, names: projectNames, projectRoot: appProjectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
|
|
10
10
|
name: options.name,
|
|
11
11
|
projectType: 'application',
|
|
12
12
|
directory: options.directory,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { type FileExtensionType } from '@nx/devkit/
|
|
2
|
+
import { type FileExtensionType } from '@nx/devkit/internal';
|
|
3
3
|
import { Schema } from '../schema';
|
|
4
|
-
export interface NormalizedSchema extends
|
|
4
|
+
export interface NormalizedSchema extends Schema {
|
|
5
5
|
directory: string;
|
|
6
6
|
projectSourceRoot: string;
|
|
7
7
|
fileName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/component/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,
|
|
1
|
+
{"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/component/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,IAAI,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CA4C3B"}
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
7
|
async function normalizeOptions(host, options) {
|
|
8
|
-
const { artifactName: name, fileName, fileExtension, fileExtensionType, filePath, directory, project: projectName, } = await (0,
|
|
8
|
+
const { artifactName: name, fileName, fileExtension, fileExtensionType, filePath, directory, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(host, {
|
|
9
9
|
name: options.name,
|
|
10
10
|
path: options.path,
|
|
11
11
|
allowedFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
|
|
12
|
-
fileExtension:
|
|
13
|
-
js: options.js,
|
|
12
|
+
fileExtension: 'tsx',
|
|
14
13
|
});
|
|
15
14
|
const { className } = (0, devkit_1.names)(name);
|
|
16
15
|
const project = (0, devkit_1.getProjects)(host).get(projectName);
|
|
@@ -8,9 +8,4 @@ export interface Schema {
|
|
|
8
8
|
skipTests?: boolean;
|
|
9
9
|
export?: boolean;
|
|
10
10
|
classComponent?: boolean;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @deprecated Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21.
|
|
14
|
-
*/
|
|
15
|
-
js?: boolean;
|
|
16
11
|
}
|
|
@@ -36,11 +36,6 @@
|
|
|
36
36
|
"type": "string",
|
|
37
37
|
"description": "The component symbol name. Defaults to the last segment of the file path."
|
|
38
38
|
},
|
|
39
|
-
"js": {
|
|
40
|
-
"type": "boolean",
|
|
41
|
-
"description": "Generate JavaScript files rather than TypeScript files.",
|
|
42
|
-
"x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
|
|
43
|
-
},
|
|
44
39
|
"skipFormat": {
|
|
45
40
|
"description": "Skip formatting files.",
|
|
46
41
|
"type": "boolean",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-to-inferred.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/convert-to-inferred/convert-to-inferred.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convert-to-inferred.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/convert-to-inferred/convert-to-inferred.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAYpB,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAgIlE;AAiBD,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.convertToInferred = convertToInferred;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const aggregate_log_util_1 = require("@nx/devkit/src/generators/plugin-migrations/aggregate-log-util");
|
|
6
|
-
const executor_to_plugin_migrator_1 = require("@nx/devkit/src/generators/plugin-migrations/executor-to-plugin-migrator");
|
|
7
6
|
const plugin_1 = require("../../../plugins/plugin");
|
|
8
7
|
const process_build_options_1 = require("./lib/process-build-options");
|
|
9
8
|
const post_target_transformer_1 = require("./lib/post-target-transformer");
|
|
@@ -16,9 +15,9 @@ const process_prebuild_options_1 = require("./lib/process-prebuild-options");
|
|
|
16
15
|
const process_install_options_1 = require("./lib/process-install-options");
|
|
17
16
|
async function convertToInferred(tree, options) {
|
|
18
17
|
const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
|
|
19
|
-
const migrationLogs = new
|
|
18
|
+
const migrationLogs = new internal_1.AggregatedLog();
|
|
20
19
|
const projects = (0, devkit_1.getProjects)(tree);
|
|
21
|
-
const migratedProjects = await (0,
|
|
20
|
+
const migratedProjects = await (0, internal_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/expo/plugin', plugin_1.createNodesV2, {
|
|
22
21
|
buildTargetName: 'build',
|
|
23
22
|
exportTargetName: 'export',
|
|
24
23
|
installTargetName: 'install',
|
|
@@ -95,7 +94,7 @@ async function convertToInferred(tree, options) {
|
|
|
95
94
|
},
|
|
96
95
|
], options.project);
|
|
97
96
|
if (migratedProjects.size === 0) {
|
|
98
|
-
throw new
|
|
97
|
+
throw new internal_1.NoTargetsToMigrateError();
|
|
99
98
|
}
|
|
100
99
|
if (!options.skipFormat) {
|
|
101
100
|
await (0, devkit_1.formatFiles)(tree);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TargetConfiguration, Tree } from '@nx/devkit';
|
|
2
|
-
import type
|
|
2
|
+
import { type AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function postTargetTransformer(migrationLogs: AggregatedLog, processOptions: (tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog) => void): (target: TargetConfiguration, tree: Tree, projectDetails: {
|
|
4
4
|
projectName: string;
|
|
5
5
|
root: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE/E,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,CACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,KACzB,IAAI,IAGP,QAAQ,mBAAmB,EAC3B,MAAM,IAAI,EACV,gBAAgB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,6BAA6B,mBAAmB,8BAgDnD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.postTargetTransformer = postTargetTransformer;
|
|
4
|
-
const
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
5
|
function postTargetTransformer(migrationLogs, processOptions) {
|
|
6
6
|
return (target, tree, projectDetails, inferredTargetConfiguration) => {
|
|
7
7
|
if (target.options) {
|
|
@@ -24,7 +24,7 @@ function postTargetTransformer(migrationLogs, processOptions) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
if (target.outputs) {
|
|
27
|
-
(0,
|
|
27
|
+
(0, internal_1.processTargetOutputs)(target, [], inferredTargetConfiguration, {
|
|
28
28
|
projectName: projectDetails.projectName,
|
|
29
29
|
projectRoot: projectDetails.root,
|
|
30
30
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processBuildOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-build-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-build-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-build-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-build-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-build-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,GAC3B,IAAI,CAaN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processExportOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-export-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-export-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-export-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-export-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-export-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,QAqB7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processGenericOptions(_tree: Tree, options: any, _projectName: string, _projectRoot: string, _migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-generic-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-generic-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-generic-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-generic-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-generic-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,GAAG,EACZ,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,aAAa,QAc9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processInstallOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-install-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-install-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-install-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-install-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-install-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,GAC3B,IAAI,CAYN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processPrebuildOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-prebuild-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-prebuild-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-prebuild-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-prebuild-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-prebuild-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,GAC3B,IAAI,CAQN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processRunOptions(_tree: Tree, options: any, projectName: string, _projectRoot: string, migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-run-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-run-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-run-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-run-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-run-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,aAAa,QA8B7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processServeOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-serve-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-serve-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-serve-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-serve-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-serve-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,QAS7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processStartOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-start-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-start-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-start-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-start-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-start-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,QAS7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Tree } from '@nx/devkit';
|
|
2
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
2
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
3
3
|
export declare function processSubmitOptions(tree: Tree, options: any, projectName: string, projectRoot: string, migrationLogs: AggregatedLog): void;
|
|
4
4
|
//# sourceMappingURL=process-submit-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-submit-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-submit-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-submit-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/expo/src/generators/convert-to-inferred/lib/process-submit-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,aAAa,QAc7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/init/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAIjB,IAAI,EACL,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAE3D;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAwDzE;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAoBlE;AAMD,eAAe,iBAAiB,CAAC"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.expoInitGenerator = expoInitGenerator;
|
|
4
4
|
exports.expoInitGeneratorInternal = expoInitGeneratorInternal;
|
|
5
5
|
exports.updateDependencies = updateDependencies;
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
|
|
8
8
|
const plugin_1 = require("../../../plugins/plugin");
|
|
9
9
|
const versions_1 = require("../../utils/versions");
|
|
10
10
|
const version_utils_1 = require("../../utils/version-utils");
|
|
@@ -19,7 +19,7 @@ async function expoInitGeneratorInternal(host, schema) {
|
|
|
19
19
|
schema.addPlugin ??= addPluginDefault;
|
|
20
20
|
(0, add_git_ignore_entry_1.addGitIgnoreEntry)(host);
|
|
21
21
|
if (schema.addPlugin) {
|
|
22
|
-
await (0,
|
|
22
|
+
await (0, internal_1.addPlugin)(host, await (0, devkit_1.createProjectGraphAsync)(), '@nx/expo/plugin', plugin_1.createNodesV2, {
|
|
23
23
|
startTargetName: ['start', 'expo:start', 'expo-start'],
|
|
24
24
|
buildTargetName: ['build', 'expo:build', 'expo-build'],
|
|
25
25
|
prebuildTargetName: ['prebuild', 'expo:prebuild', 'expo-prebuild'],
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
7
|
async function normalizeOptions(host, options) {
|
|
8
|
-
await (0,
|
|
9
|
-
const { projectName, names: projectNames, projectRoot, importPath, } = await (0,
|
|
8
|
+
await (0, internal_1.ensureRootProjectName)(options, 'library');
|
|
9
|
+
const { projectName, names: projectNames, projectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
|
|
10
10
|
name: options.name,
|
|
11
11
|
projectType: 'library',
|
|
12
12
|
directory: options.directory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/library/library.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/expo/src/generators/library/library.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAWpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAelC,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAgH5B;AAwJD,eAAe,oBAAoB,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.expoLibraryGenerator = expoLibraryGenerator;
|
|
4
4
|
exports.expoLibraryGeneratorInternal = expoLibraryGeneratorInternal;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
7
|
const devkit_1 = require("@nx/devkit");
|
|
7
8
|
const js_1 = require("@nx/js");
|
|
8
9
|
const init_1 = tslib_1.__importDefault(require("../init/init"));
|
|
@@ -11,11 +12,9 @@ const add_jest_1 = require("../../utils/jest/add-jest");
|
|
|
11
12
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
12
13
|
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
13
14
|
const init_root_babel_config_1 = require("../../utils/init-root-babel-config");
|
|
14
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
15
15
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
16
16
|
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
17
17
|
const add_rollup_build_target_1 = require("@nx/react/src/generators/library/lib/add-rollup-build-target");
|
|
18
|
-
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
19
18
|
const component_1 = require("../component/component");
|
|
20
19
|
const path_1 = require("path");
|
|
21
20
|
const version_utils_1 = require("../../utils/version-utils");
|
|
@@ -61,14 +60,13 @@ async function expoLibraryGeneratorInternal(host, schema) {
|
|
|
61
60
|
],
|
|
62
61
|
});
|
|
63
62
|
tasks.push(lintTask);
|
|
64
|
-
const relativeCwd = (0,
|
|
65
|
-
const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.fileName);
|
|
63
|
+
const relativeCwd = (0, internal_1.getRelativeCwd)();
|
|
64
|
+
const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.js ? `${options.fileName}.js` : options.fileName);
|
|
66
65
|
const componentTask = await (0, component_1.expoComponentGenerator)(host, {
|
|
67
66
|
path: relativeCwd ? (0, path_1.relative)(relativeCwd, path) : path,
|
|
68
67
|
skipTests: options.unitTestRunner === 'none',
|
|
69
68
|
export: true,
|
|
70
69
|
skipFormat: true,
|
|
71
|
-
js: options.js,
|
|
72
70
|
});
|
|
73
71
|
tasks.push(() => componentTask);
|
|
74
72
|
if (!options.skipTsConfig && !options.isUsingTsSolutionConfig) {
|
|
@@ -97,7 +95,7 @@ async function expoLibraryGeneratorInternal(host, schema) {
|
|
|
97
95
|
tasks.push(() => (0, devkit_1.installPackagesTask)(host, true));
|
|
98
96
|
}
|
|
99
97
|
tasks.push(() => {
|
|
100
|
-
(0,
|
|
98
|
+
(0, internal_1.logShowProjectCommand)(options.projectName);
|
|
101
99
|
});
|
|
102
100
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
103
101
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecation.d.ts","sourceRoot":"","sources":["../../../../../packages/expo/src/utils/deprecation.ts"],"names":[],"mappings":"AAYA,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAEtE;AAED,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,wBAAgB,0BAA0B,IAAI,IAAI,CAIjD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.warnExpoExecutorDeprecation = warnExpoExecutorDeprecation;
|
|
4
|
+
exports.expoSchemaDeprecationMessage = expoSchemaDeprecationMessage;
|
|
5
|
+
exports.warnExpoExecutorGenerating = warnExpoExecutorGenerating;
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
// TODO(v24): Remove the @nx/expo:build, :export, :install, :prebuild, :run,
|
|
8
|
+
// :serve, :start, and :submit executors. The inferred plugin
|
|
9
|
+
// (@nx/expo/plugin) and the convert-to-inferred generator stay supported.
|
|
10
|
+
// (`@nx/expo:build-list`, `:sync-deps`, `:update`, and `:ensure-symlink`
|
|
11
|
+
// are not covered by `convert-to-inferred` and stay as-is.)
|
|
12
|
+
function buildMessage(executorName) {
|
|
13
|
+
return `The \`@nx/expo:${executorName}\` executor is deprecated and will be removed in Nx v24. Run \`nx g @nx/expo:convert-to-inferred\` to migrate to the \`@nx/expo/plugin\` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.`;
|
|
14
|
+
}
|
|
15
|
+
function warnExpoExecutorDeprecation(executorName) {
|
|
16
|
+
devkit_1.logger.warn(buildMessage(executorName));
|
|
17
|
+
}
|
|
18
|
+
function expoSchemaDeprecationMessage(executorName) {
|
|
19
|
+
return buildMessage(executorName);
|
|
20
|
+
}
|
|
21
|
+
function warnExpoExecutorGenerating() {
|
|
22
|
+
devkit_1.logger.warn('Generating targets that use the deprecated `@nx/expo:build`, `@nx/expo:export`, `@nx/expo:install`, `@nx/expo:prebuild`, `@nx/expo:run`, `@nx/expo:serve`, `@nx/expo:start`, and `@nx/expo:submit` executors. These executors will be removed in Nx v24. Run `nx g @nx/expo:convert-to-inferred` next to migrate these targets to the `@nx/expo/plugin` inferred plugin and prevent future generators from emitting executor targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.');
|
|
23
|
+
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isExpoProject = isExpoProject;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
async function getAppConfig(tree, projectRoot, appConfigPath) {
|
|
7
7
|
const absolutePath = (0, devkit_1.joinPathFragments)(tree.root, projectRoot, appConfigPath);
|
|
8
|
-
return (0,
|
|
8
|
+
return (0, internal_1.loadConfigFile)(absolutePath);
|
|
9
9
|
}
|
|
10
10
|
async function isExpoProject(tree, projectRoot) {
|
|
11
11
|
// Check for required files
|