@nx/react-native 23.0.0-beta.4 → 23.0.0-beta.6
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 +9 -9
- package/plugins/plugin.d.ts.map +1 -1
- package/plugins/plugin.js +13 -22
- package/src/generators/application/application.d.ts.map +1 -1
- package/src/generators/application/application.js +2 -2
- package/src/generators/application/lib/normalize-options.js +3 -3
- package/src/generators/component/lib/normalize-options.d.ts +1 -1
- package/src/generators/component/lib/normalize-options.d.ts.map +1 -1
- package/src/generators/component/lib/normalize-options.js +2 -2
- package/src/generators/convert-to-inferred/convert-to-inferred.js +4 -5
- package/src/generators/convert-to-inferred/lib/create-process-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/create-process-options.d.ts.map +1 -1
- 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-start-options.d.ts +1 -1
- package/src/generators/convert-to-inferred/lib/process-start-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 +3 -4
- package/src/utils/react-native-project-detection.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
|
|
6
6
|
"keywords": [
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"type": "commonjs",
|
|
28
28
|
"types": "index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@nx/devkit": "23.0.0-beta.
|
|
31
|
-
"@nx/js": "23.0.0-beta.
|
|
32
|
-
"@nx/eslint": "23.0.0-beta.
|
|
33
|
-
"@nx/react": "23.0.0-beta.
|
|
30
|
+
"@nx/devkit": "23.0.0-beta.6",
|
|
31
|
+
"@nx/js": "23.0.0-beta.6",
|
|
32
|
+
"@nx/eslint": "23.0.0-beta.6",
|
|
33
|
+
"@nx/react": "23.0.0-beta.6",
|
|
34
34
|
"ajv": "^8.12.0",
|
|
35
35
|
"enhanced-resolve": "^5.8.3",
|
|
36
|
-
"ignore": "^
|
|
36
|
+
"ignore": "^7.0.5",
|
|
37
37
|
"picocolors": "^1.1.0",
|
|
38
38
|
"tinyglobby": "^0.2.12",
|
|
39
39
|
"tsconfig-paths": "^4.1.2",
|
|
@@ -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.6"
|
|
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.6",
|
|
51
|
+
"@nx/rollup": "23.0.0-beta.6"
|
|
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/react-native/plugins/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../packages/react-native/plugins/plugin.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,aAAa,EAMd,MAAM,YAAY,CAAC;AAOpB,MAAM,WAAW,wBAAwB;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAOD,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,wBAAwB,CA+B/D,CAAC;AAEF,eAAO,MAAM,aAAa,yCAAc,CAAC"}
|
package/plugins/plugin.js
CHANGED
|
@@ -1,41 +1,30 @@
|
|
|
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
|
-
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
12
10
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
13
|
-
function readTargetsCache(cachePath) {
|
|
14
|
-
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
15
|
-
}
|
|
16
|
-
function writeTargetsToCache(cachePath, targetsCache) {
|
|
17
|
-
const oldCache = readTargetsCache(cachePath);
|
|
18
|
-
(0, devkit_1.writeJsonFile)(cachePath, {
|
|
19
|
-
...oldCache,
|
|
20
|
-
targetsCache,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
11
|
exports.createNodes = [
|
|
24
12
|
'**/app.{json,config.js,config.ts}',
|
|
25
13
|
async (configFiles, options, context) => {
|
|
26
14
|
const optionsHash = (0, devkit_internals_1.hashObject)(options);
|
|
27
15
|
const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `react-native-${optionsHash}.hash`);
|
|
28
|
-
const targetsCache =
|
|
16
|
+
const targetsCache = new internal_1.PluginCache(cachePath);
|
|
17
|
+
const lockFileName = (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
|
|
29
18
|
try {
|
|
30
|
-
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache), configFiles, options, context);
|
|
19
|
+
return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, lockFileName), configFiles, options, context);
|
|
31
20
|
}
|
|
32
21
|
finally {
|
|
33
|
-
|
|
22
|
+
targetsCache.writeToDisk();
|
|
34
23
|
}
|
|
35
24
|
},
|
|
36
25
|
];
|
|
37
26
|
exports.createNodesV2 = exports.createNodes;
|
|
38
|
-
async function createNodesInternal(configFile, options, context, targetsCache) {
|
|
27
|
+
async function createNodesInternal(configFile, options, context, targetsCache, lockFileName) {
|
|
39
28
|
options = normalizeOptions(options);
|
|
40
29
|
const projectRoot = (0, path_1.dirname)(configFile);
|
|
41
30
|
// Do not create a project if package.json or project.json or metro.config.js isn't there.
|
|
@@ -52,18 +41,20 @@ async function createNodesInternal(configFile, options, context, targetsCache) {
|
|
|
52
41
|
packageJson.devDependencies?.['expo']) {
|
|
53
42
|
return {};
|
|
54
43
|
}
|
|
55
|
-
const hash = await (0,
|
|
56
|
-
targetsCache
|
|
44
|
+
const hash = await (0, internal_1.calculateHashForCreateNodes)(projectRoot, options, context, [lockFileName]);
|
|
45
|
+
if (!targetsCache.has(hash)) {
|
|
46
|
+
targetsCache.set(hash, buildReactNativeTargets(projectRoot, options, context));
|
|
47
|
+
}
|
|
57
48
|
return {
|
|
58
49
|
projects: {
|
|
59
50
|
[projectRoot]: {
|
|
60
|
-
targets: targetsCache
|
|
51
|
+
targets: targetsCache.get(hash),
|
|
61
52
|
},
|
|
62
53
|
},
|
|
63
54
|
};
|
|
64
55
|
}
|
|
65
56
|
function buildReactNativeTargets(projectRoot, options, context) {
|
|
66
|
-
const namedInputs = (0,
|
|
57
|
+
const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
|
|
67
58
|
const targets = {
|
|
68
59
|
[options.startTargetName]: {
|
|
69
60
|
command: `react-native start`,
|
|
@@ -119,7 +110,7 @@ function buildReactNativeTargets(projectRoot, options, context) {
|
|
|
119
110
|
}
|
|
120
111
|
function getAppConfig(configFilePath, context) {
|
|
121
112
|
const resolvedPath = (0, path_1.join)(context.workspaceRoot, configFilePath);
|
|
122
|
-
return (0,
|
|
113
|
+
return (0, internal_1.loadConfigFile)(resolvedPath);
|
|
123
114
|
}
|
|
124
115
|
function getInputs(namedInputs) {
|
|
125
116
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/application/application.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/application/application.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAKjB,IAAI,EACL,MAAM,YAAY,CAAC;AAcpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAWlC,wBAAsB,+BAA+B,CACnD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,uCAAuC,CAC3D,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAkG5B;AA4CD,eAAe,+BAA+B,CAAC"}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.reactNativeApplicationGenerator = reactNativeApplicationGenerator;
|
|
4
4
|
exports.reactNativeApplicationGeneratorInternal = reactNativeApplicationGeneratorInternal;
|
|
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
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
9
9
|
const add_linting_1 = require("../../utils/add-linting");
|
|
10
10
|
const add_jest_1 = require("../../utils/add-jest");
|
|
11
11
|
const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
|
|
@@ -87,7 +87,7 @@ async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
|
87
87
|
await (0, devkit_1.formatFiles)(host);
|
|
88
88
|
}
|
|
89
89
|
tasks.push(() => {
|
|
90
|
-
(0,
|
|
90
|
+
(0, internal_1.logShowProjectCommand)(options.projectName);
|
|
91
91
|
});
|
|
92
92
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
93
93
|
}
|
|
@@ -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,5 +1,5 @@
|
|
|
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
4
|
export interface NormalizedSchema extends Omit<Schema, 'js'> {
|
|
5
5
|
directory: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-native/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/react-native/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,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,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,CA+C3B"}
|
|
@@ -2,10 +2,10 @@
|
|
|
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, directory, fileName, filePath, fileExtension, fileExtensionType, project: projectName, } = await (0,
|
|
8
|
+
const { artifactName: name, directory, fileName, filePath, fileExtension, fileExtensionType, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(host, {
|
|
9
9
|
path: options.path,
|
|
10
10
|
name: options.name,
|
|
11
11
|
allowedFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.convertToInferred = convertToInferred;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
6
|
-
const executor_to_plugin_migrator_1 = require("@nx/devkit/src/generators/plugin-migrations/executor-to-plugin-migrator");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
6
|
const plugin_1 = require("../../../plugins/plugin");
|
|
8
7
|
const post_target_transformer_1 = require("./lib/post-target-transformer");
|
|
9
8
|
const process_start_options_1 = require("./lib/process-start-options");
|
|
10
9
|
const create_process_options_1 = require("./lib/create-process-options");
|
|
11
10
|
async function convertToInferred(tree, options) {
|
|
12
11
|
const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
|
|
13
|
-
const migrationLogs = new
|
|
14
|
-
const migratedProjects = await (0,
|
|
12
|
+
const migrationLogs = new internal_1.AggregatedLog();
|
|
13
|
+
const migratedProjects = await (0, internal_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/react-native/plugin', plugin_1.createNodesV2, {
|
|
15
14
|
buildAndroidTargetName: 'build-android',
|
|
16
15
|
buildIosTargetName: 'build-ios',
|
|
17
16
|
bundleTargetName: 'bundle',
|
|
@@ -80,7 +79,7 @@ async function convertToInferred(tree, options) {
|
|
|
80
79
|
},
|
|
81
80
|
], options.project);
|
|
82
81
|
if (migratedProjects.size === 0) {
|
|
83
|
-
throw new
|
|
82
|
+
throw new internal_1.NoTargetsToMigrateError();
|
|
84
83
|
}
|
|
85
84
|
if (!options.skipFormat) {
|
|
86
85
|
await (0, devkit_1.formatFiles)(tree);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
1
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
2
2
|
/**
|
|
3
3
|
* Logic copied from `packages/react-native/src/utils/get-cli-options.ts`,
|
|
4
4
|
* which was used by most executors to map their options to CLI options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-process-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/convert-to-inferred/lib/create-process-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"create-process-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/convert-to-inferred/lib/create-process-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,kBAAkB,EAAE,MAAM,EAAE,EAC5B,qBAAqB,EAAE,MAAM,EAAE,IAEvB,aAAa,MAAM,EAAE,SAAS,GAAG,EAAE,eAAe,aAAa,UA8BxE"}
|
|
@@ -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?: (projectName: string, options: any, 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/react-native/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/react-native/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,CAAC,EAAE,CACf,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,GAAG,EACZ,aAAa,EAAE,aAAa,KACzB,IAAI,IAGP,QAAQ,mBAAmB,EAC3B,OAAO,IAAI,EACX,gBAAgB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,6BAA6B,mBAAmB,8BAwCnD"}
|
|
@@ -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 && processOptions) {
|
|
@@ -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,3 +1,3 @@
|
|
|
1
|
-
import type { AggregatedLog } from '@nx/devkit/
|
|
1
|
+
import type { AggregatedLog } from '@nx/devkit/internal';
|
|
2
2
|
export declare function processStartOptions(_projectName: string, options: any, _migrationLogs: AggregatedLog): void;
|
|
3
3
|
//# sourceMappingURL=process-start-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-start-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/convert-to-inferred/lib/process-start-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"process-start-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/convert-to-inferred/lib/process-start-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,GAAG,EACZ,cAAc,EAAE,aAAa,QAkB9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAIjB,IAAI,EACL,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAKlE;AAED,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,8BA2Ef;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAgB5D;AAMD,eAAe,wBAAwB,CAAC"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.reactNativeInitGenerator = reactNativeInitGenerator;
|
|
4
4
|
exports.reactNativeInitGeneratorInternal = reactNativeInitGeneratorInternal;
|
|
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 add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
|
|
@@ -21,7 +21,7 @@ async function reactNativeInitGeneratorInternal(host, schema) {
|
|
|
21
21
|
nxJson.useInferencePlugins !== false;
|
|
22
22
|
schema.addPlugin ??= addPluginDefault;
|
|
23
23
|
if (schema.addPlugin) {
|
|
24
|
-
await (0,
|
|
24
|
+
await (0, internal_1.addPlugin)(host, await (0, devkit_1.createProjectGraphAsync)(), '@nx/react-native/plugin', plugin_1.createNodesV2, {
|
|
25
25
|
startTargetName: ['start', 'react-native:start', 'react-native-start'],
|
|
26
26
|
upgradeTargetName: [
|
|
27
27
|
'update',
|
|
@@ -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/react-native/src/generators/library/library.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/library/library.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EASjB,IAAI,EAIL,MAAM,YAAY,CAAC;AAYpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAkBlC,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAM5B;AAED,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAmH5B;AAyKD,eAAe,2BAA2B,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.reactNativeLibraryGenerator = reactNativeLibraryGenerator;
|
|
4
4
|
exports.reactNativeLibraryGeneratorInternal = reactNativeLibraryGeneratorInternal;
|
|
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/add-jest");
|
|
|
11
12
|
const component_1 = tslib_1.__importDefault(require("../component/component"));
|
|
12
13
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
13
14
|
const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
|
|
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 path_1 = require("path");
|
|
20
19
|
const versions_1 = require("../../utils/versions");
|
|
21
20
|
const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
|
|
@@ -62,7 +61,7 @@ async function reactNativeLibraryGeneratorInternal(host, schema) {
|
|
|
62
61
|
tasks.push(lintTask);
|
|
63
62
|
const jestTask = await (0, add_jest_1.addJest)(host, options.unitTestRunner, options.name, options.projectRoot, options.js, options.skipPackageJson, options.addPlugin, 'tsconfig.lib.json');
|
|
64
63
|
tasks.push(jestTask);
|
|
65
|
-
const relativeCwd = (0,
|
|
64
|
+
const relativeCwd = (0, internal_1.getRelativeCwd)();
|
|
66
65
|
const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.fileName);
|
|
67
66
|
const componentTask = await (0, component_1.default)(host, {
|
|
68
67
|
path: relativeCwd ? (0, path_1.relative)(relativeCwd, path) : path,
|
|
@@ -96,7 +95,7 @@ async function reactNativeLibraryGeneratorInternal(host, schema) {
|
|
|
96
95
|
tasks.push(() => (0, devkit_1.installPackagesTask)(host, true));
|
|
97
96
|
}
|
|
98
97
|
tasks.push(() => {
|
|
99
|
-
(0,
|
|
98
|
+
(0, internal_1.logShowProjectCommand)(options.name);
|
|
100
99
|
});
|
|
101
100
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
102
101
|
}
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isReactNativeProject = isReactNativeProject;
|
|
4
4
|
exports.getAllReactNativeProjects = getAllReactNativeProjects;
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
7
|
async function getAppConfig(tree, projectRoot, appConfigPath) {
|
|
8
8
|
const absolutePath = (0, devkit_1.joinPathFragments)(tree.root, projectRoot, appConfigPath);
|
|
9
|
-
return (0,
|
|
9
|
+
return (0, internal_1.loadConfigFile)(absolutePath);
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Determines if a project is a React Native project by checking for specific files
|