@nx/react-native 19.5.0-beta.0 → 19.5.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/plugins/metro-resolver.js +1 -2
- package/plugins/with-nx-metro.js +1 -2
- package/src/executors/build-android/build-android.impl.js +1 -1
- package/src/executors/build-ios/build-ios.impl.js +1 -1
- package/src/executors/bundle/bundle.impl.js +1 -1
- package/src/executors/ensure-symlink/ensure-symlink.impl.js +1 -1
- package/src/executors/pod-install/pod-install.impl.js +1 -1
- package/src/executors/run-android/run-android.impl.js +1 -1
- package/src/executors/run-ios/run-ios.impl.js +1 -1
- package/src/executors/start/lib/is-packager-running.js +1 -2
- package/src/executors/start/start.impl.d.ts +0 -1
- package/src/executors/start/start.impl.js +2 -3
- package/src/executors/storybook/storybook.impl.js +2 -3
- package/src/executors/sync-deps/sync-deps.impl.js +3 -4
- package/src/executors/upgrade/upgrade.impl.d.ts +0 -1
- package/src/executors/upgrade/upgrade.impl.js +2 -3
- package/src/generators/application/application.js +2 -3
- package/src/generators/application/lib/add-e2e.js +1 -2
- package/src/generators/application/lib/add-project.js +1 -2
- package/src/generators/application/lib/create-application-files.js +1 -2
- package/src/generators/application/lib/normalize-options.js +1 -2
- package/src/generators/component/component.js +2 -3
- package/src/generators/component/lib/add-import.js +1 -2
- package/src/generators/component/lib/normalize-options.js +1 -2
- package/src/generators/component-story/component-story.js +1 -2
- package/src/generators/init/init.js +3 -4
- package/src/generators/init/lib/add-git-ignore-entry.js +1 -2
- package/src/generators/library/lib/normalize-options.js +1 -2
- package/src/generators/library/library.js +2 -3
- package/src/generators/stories/stories.js +1 -2
- package/src/generators/storybook-configuration/configuration.js +2 -3
- package/src/generators/upgrade-native/lib/create-native-files.js +1 -2
- package/src/generators/upgrade-native/lib/normalize-options.js +1 -2
- package/src/generators/upgrade-native/upgrade-native.js +1 -2
- package/src/generators/web-configuration/lib/normalize-schema.js +1 -2
- package/src/generators/web-configuration/lib/webpack-targets.js +3 -4
- package/src/generators/web-configuration/web-configuration.js +1 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +1 -1
- package/src/migrations/update-16-1-0/upgrade-storybook-6-5.js +1 -1
- package/src/migrations/update-16-6-0/add-depends-on.js +1 -1
- package/src/migrations/update-16-6-0/update-metro-config.js +1 -1
- package/src/migrations/update-16-9-0/remove-types-react-native.js +1 -1
- package/src/migrations/update-18-0-0/add-upgrade-target.js +1 -1
- package/src/migrations/update-18-0-0/add-web-configuration.js +1 -1
- package/src/migrations/update-18-0-0/change-storybook-targets.js +1 -1
- package/src/migrations/update-18-0-0/remove-block-list.js +1 -1
- package/src/migrations/update-18-0-0/remove-metro.js +1 -1
- package/src/migrations/update-18-0-0/remove-symlink-target.js +1 -1
- package/src/utils/add-jest.js +1 -2
- package/src/utils/add-linting.js +1 -2
- package/src/utils/chmod-android-gradle-files.js +2 -3
- package/src/utils/ensure-dependencies.js +1 -2
- package/src/utils/ensure-node-modules-symlink.js +1 -2
- package/src/utils/find-all-npm-dependencies.js +1 -2
- package/src/utils/format-file.js +1 -2
- package/src/utils/get-cli-options.js +1 -2
- package/src/utils/pod-install-task.js +2 -3
- package/src/utils/testing-generators.js +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react-native",
|
|
3
|
-
"version": "19.5.0-beta.
|
|
3
|
+
"version": "19.5.0-beta.2",
|
|
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": [
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"node-fetch": "^2.6.7",
|
|
38
38
|
"tsconfig-paths": "^4.1.2",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/devkit": "19.5.0-beta.
|
|
41
|
-
"@nx/jest": "19.5.0-beta.
|
|
42
|
-
"@nx/js": "19.5.0-beta.
|
|
43
|
-
"@nx/eslint": "19.5.0-beta.
|
|
44
|
-
"@nx/react": "19.5.0-beta.
|
|
45
|
-
"@nx/workspace": "19.5.0-beta.
|
|
46
|
-
"@nrwl/react-native": "19.5.0-beta.
|
|
40
|
+
"@nx/devkit": "19.5.0-beta.2",
|
|
41
|
+
"@nx/jest": "19.5.0-beta.2",
|
|
42
|
+
"@nx/js": "19.5.0-beta.2",
|
|
43
|
+
"@nx/eslint": "19.5.0-beta.2",
|
|
44
|
+
"@nx/react": "19.5.0-beta.2",
|
|
45
|
+
"@nx/workspace": "19.5.0-beta.2",
|
|
46
|
+
"@nrwl/react-native": "19.5.0-beta.2"
|
|
47
47
|
},
|
|
48
48
|
"executors": "./executors.json",
|
|
49
49
|
"ng-update": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getResolveRequest =
|
|
3
|
+
exports.getResolveRequest = getResolveRequest;
|
|
4
4
|
const metroResolver = require("metro-resolver");
|
|
5
5
|
const tsconfig_paths_1 = require("tsconfig-paths");
|
|
6
6
|
const chalk = require("chalk");
|
|
@@ -33,7 +33,6 @@ function getResolveRequest(extensions) {
|
|
|
33
33
|
throw new Error(`Cannot resolve ${chalk.bold(realModuleName)}`);
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
exports.getResolveRequest = getResolveRequest;
|
|
37
36
|
function resolveRequestFromContext(resolveRequest, context, realModuleName, platform, debug) {
|
|
38
37
|
try {
|
|
39
38
|
return resolveRequest(context, realModuleName, platform);
|
package/plugins/with-nx-metro.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.withNxMetro =
|
|
3
|
+
exports.withNxMetro = withNxMetro;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const metro_config_1 = require("metro-config");
|
|
6
6
|
const fs_extra_1 = require("fs-extra");
|
|
@@ -29,4 +29,3 @@ async function withNxMetro(userConfig, opts = {}) {
|
|
|
29
29
|
};
|
|
30
30
|
return (0, metro_config_1.mergeConfig)(userConfig, nxConfig);
|
|
31
31
|
}
|
|
32
|
-
exports.withNxMetro = withNxMetro;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = buildAndroidExecutor;
|
|
3
4
|
const path_1 = require("path");
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
6
|
const chmod_android_gradle_files_1 = require("../../utils/chmod-android-gradle-files");
|
|
@@ -10,7 +11,6 @@ async function* buildAndroidExecutor(options, context) {
|
|
|
10
11
|
await runCliBuild(context.root, projectRoot, options);
|
|
11
12
|
yield { success: true };
|
|
12
13
|
}
|
|
13
|
-
exports.default = buildAndroidExecutor;
|
|
14
14
|
function runCliBuild(workspaceRoot, projectRoot, options) {
|
|
15
15
|
return new Promise((res, reject) => {
|
|
16
16
|
const childProcess = (0, child_process_1.fork)(require.resolve('react-native/cli.js'), ['build-android', ...createBuildAndroidOptions(options)], {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = buildIosExecutor;
|
|
3
4
|
const path_1 = require("path");
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
6
|
const os_1 = require("os");
|
|
@@ -12,7 +13,6 @@ async function* buildIosExecutor(options, context) {
|
|
|
12
13
|
await runCliBuildIOS(context.root, projectRoot, options);
|
|
13
14
|
return { success: true };
|
|
14
15
|
}
|
|
15
|
-
exports.default = buildIosExecutor;
|
|
16
16
|
function runCliBuildIOS(workspaceRoot, projectRoot, options) {
|
|
17
17
|
return new Promise((resolve, reject) => {
|
|
18
18
|
const childProcess = (0, child_process_1.fork)(require.resolve('react-native/cli.js'), [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = bundleExecutor;
|
|
3
4
|
const fileutils_1 = require("@nx/workspace/src/utilities/fileutils");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const path_1 = require("path");
|
|
@@ -11,7 +12,6 @@ async function* bundleExecutor(options, context) {
|
|
|
11
12
|
await runCliBuild(context.root, projectRoot, options);
|
|
12
13
|
yield { success: true };
|
|
13
14
|
}
|
|
14
|
-
exports.default = bundleExecutor;
|
|
15
15
|
function runCliBuild(workspaceRoot, projectRoot, options) {
|
|
16
16
|
return new Promise((resolve, reject) => {
|
|
17
17
|
const cliOptions = createBundleOptions(options);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = ensureSymlinkExecutor;
|
|
3
4
|
const ensure_node_modules_symlink_1 = require("../../utils/ensure-node-modules-symlink");
|
|
4
5
|
/**
|
|
5
6
|
* TODO (@xiongemi): remove this function in v20.
|
|
@@ -10,4 +11,3 @@ async function* ensureSymlinkExecutor(_, context) {
|
|
|
10
11
|
(0, ensure_node_modules_symlink_1.ensureNodeModulesSymlink)(context.root, projectRoot);
|
|
11
12
|
yield { success: true };
|
|
12
13
|
}
|
|
13
|
-
exports.default = ensureSymlinkExecutor;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = podInstall;
|
|
3
4
|
const path_1 = require("path");
|
|
4
5
|
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
5
6
|
async function* podInstall(options, context) {
|
|
@@ -8,4 +9,3 @@ async function* podInstall(options, context) {
|
|
|
8
9
|
await (0, pod_install_task_1.runPodInstall)(iosDirectory, true, options)();
|
|
9
10
|
yield { success: true };
|
|
10
11
|
}
|
|
11
|
-
exports.default = podInstall;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = runAndroidExecutor;
|
|
3
4
|
const path_1 = require("path");
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
6
|
const start_impl_1 = require("../start/start.impl");
|
|
@@ -20,7 +21,6 @@ async function* runAndroidExecutor(options, context) {
|
|
|
20
21
|
await Promise.all(tasks);
|
|
21
22
|
yield { success: true };
|
|
22
23
|
}
|
|
23
|
-
exports.default = runAndroidExecutor;
|
|
24
24
|
function runCliRunAndroid(workspaceRoot, projectRoot, options) {
|
|
25
25
|
return new Promise((resolve, reject) => {
|
|
26
26
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = runIosExecutor;
|
|
3
4
|
const path_1 = require("path");
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
6
|
const os_1 = require("os");
|
|
@@ -21,7 +22,6 @@ async function* runIosExecutor(options, context) {
|
|
|
21
22
|
await Promise.all(tasks);
|
|
22
23
|
yield { success: true };
|
|
23
24
|
}
|
|
24
|
-
exports.default = runIosExecutor;
|
|
25
25
|
function runCliRunIOS(workspaceRoot, projectRoot, options) {
|
|
26
26
|
return new Promise((resolve, reject) => {
|
|
27
27
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPackagerRunning =
|
|
3
|
+
exports.isPackagerRunning = isPackagerRunning;
|
|
4
4
|
const node_fetch_1 = require("node-fetch");
|
|
5
5
|
async function isPackagerRunning(packagerPort) {
|
|
6
6
|
try {
|
|
@@ -12,4 +12,3 @@ async function isPackagerRunning(packagerPort) {
|
|
|
12
12
|
return 'not_running';
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
exports.isPackagerRunning = isPackagerRunning;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.default = startExecutor;
|
|
4
|
+
exports.runCliStart = runCliStart;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const child_process_1 = require("child_process");
|
|
6
7
|
const path_1 = require("path");
|
|
@@ -13,7 +14,6 @@ async function* startExecutor(options, context) {
|
|
|
13
14
|
success: true,
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
exports.default = startExecutor;
|
|
17
17
|
/*
|
|
18
18
|
* Starts the JS bundler and checks for "running" status before notifying
|
|
19
19
|
* that packager has started.
|
|
@@ -38,7 +38,6 @@ async function runCliStart(workspaceRoot, projectRoot, options) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
exports.runCliStart = runCliStart;
|
|
42
41
|
function startAsync(workspaceRoot, projectRoot, options) {
|
|
43
42
|
return new Promise((resolve, reject) => {
|
|
44
43
|
const childProcess = (0, child_process_1.fork)(require.resolve('react-native/cli.js'), ['start', ...createStartOptions(options)], {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.default = reactNativeStorybookExecutor;
|
|
4
|
+
exports.runCliStorybook = runCliStorybook;
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
const fileutils_1 = require("@nx/workspace/src/utilities/fileutils");
|
|
@@ -34,7 +35,6 @@ async function* reactNativeStorybookExecutor(options, context) {
|
|
|
34
35
|
runCliStorybook(context.root, options);
|
|
35
36
|
yield { success: true };
|
|
36
37
|
}
|
|
37
|
-
exports.default = reactNativeStorybookExecutor;
|
|
38
38
|
function runCliStorybook(workspaceRoot, options) {
|
|
39
39
|
const storiesFiles = options.searchDir.flatMap((dir) => {
|
|
40
40
|
const storyFilePaths = (0, glob_1.sync)((0, path_1.join)(dir, options.pattern));
|
|
@@ -55,4 +55,3 @@ export function loadStories() {
|
|
|
55
55
|
}`;
|
|
56
56
|
(0, fs_extra_1.writeFileSync)((0, path_1.join)(workspaceRoot, options.outputFile), newContents);
|
|
57
57
|
}
|
|
58
|
-
exports.runCliStorybook = runCliStorybook;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.default = syncDepsExecutor;
|
|
4
|
+
exports.syncDeps = syncDeps;
|
|
5
|
+
exports.displayNewlyAddedDepsMessage = displayNewlyAddedDepsMessage;
|
|
4
6
|
const path_1 = require("path");
|
|
5
7
|
const chalk = require("chalk");
|
|
6
8
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -18,7 +20,6 @@ async function* syncDepsExecutor(options, context) {
|
|
|
18
20
|
: options.exclude, options.all));
|
|
19
21
|
yield { success: true };
|
|
20
22
|
}
|
|
21
|
-
exports.default = syncDepsExecutor;
|
|
22
23
|
async function syncDeps(projectName, projectPackageJson, projectPackageJsonPath, workspacePackageJson, projectGraph = (0, devkit_1.readCachedProjectGraph)(), include = [], exclude = [], all = false) {
|
|
23
24
|
let npmDeps = all
|
|
24
25
|
? Object.keys(workspacePackageJson.dependencies || {})
|
|
@@ -65,7 +66,6 @@ async function syncDeps(projectName, projectPackageJson, projectPackageJsonPath,
|
|
|
65
66
|
}
|
|
66
67
|
return newDeps;
|
|
67
68
|
}
|
|
68
|
-
exports.syncDeps = syncDeps;
|
|
69
69
|
function displayNewlyAddedDepsMessage(projectName, deps) {
|
|
70
70
|
if (deps.length > 0) {
|
|
71
71
|
devkit_1.logger.info(`${chalk.bold.cyan('info')} Added entries to 'package.json' for '${projectName}' (for autolink):
|
|
@@ -75,4 +75,3 @@ function displayNewlyAddedDepsMessage(projectName, deps) {
|
|
|
75
75
|
devkit_1.logger.info(`${chalk.bold.cyan('info')} Dependencies for '${projectName}' are up to date! No changes made.`);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
exports.displayNewlyAddedDepsMessage = displayNewlyAddedDepsMessage;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.default = upgradeExecutor;
|
|
4
|
+
exports.runCliUpgrade = runCliUpgrade;
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const child_process_1 = require("child_process");
|
|
6
7
|
/**
|
|
@@ -12,7 +13,6 @@ async function* upgradeExecutor(options, context) {
|
|
|
12
13
|
await runCliUpgrade(context.root, projectRoot);
|
|
13
14
|
yield { success: true };
|
|
14
15
|
}
|
|
15
|
-
exports.default = upgradeExecutor;
|
|
16
16
|
function runCliUpgrade(workspaceRoot, projectRoot) {
|
|
17
17
|
return new Promise((resolve, reject) => {
|
|
18
18
|
const childProcess = (0, child_process_1.fork)(require.resolve('react-native/cli.js'), ['upgrade'], {
|
|
@@ -44,4 +44,3 @@ function runCliUpgrade(workspaceRoot, projectRoot) {
|
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
exports.runCliUpgrade = runCliUpgrade;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.reactNativeApplicationGenerator = reactNativeApplicationGenerator;
|
|
4
|
+
exports.reactNativeApplicationGeneratorInternal = reactNativeApplicationGeneratorInternal;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const js_1 = require("@nx/js");
|
|
6
7
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
@@ -23,7 +24,6 @@ async function reactNativeApplicationGenerator(host, schema) {
|
|
|
23
24
|
...schema,
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
|
-
exports.reactNativeApplicationGenerator = reactNativeApplicationGenerator;
|
|
27
27
|
async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
28
28
|
const options = await (0, normalize_options_1.normalizeOptions)(host, schema);
|
|
29
29
|
const tasks = [];
|
|
@@ -83,5 +83,4 @@ async function reactNativeApplicationGeneratorInternal(host, schema) {
|
|
|
83
83
|
});
|
|
84
84
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
85
85
|
}
|
|
86
|
-
exports.reactNativeApplicationGeneratorInternal = reactNativeApplicationGeneratorInternal;
|
|
87
86
|
exports.default = reactNativeApplicationGenerator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addE2e =
|
|
3
|
+
exports.addE2e = addE2e;
|
|
4
4
|
const add_e2e_1 = require("@nx/react/src/generators/application/lib/add-e2e");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const versions_1 = require("../../../utils/versions");
|
|
@@ -43,4 +43,3 @@ async function addE2e(host, options) {
|
|
|
43
43
|
return () => { };
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
exports.addE2e = addE2e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addProject =
|
|
3
|
+
exports.addProject = addProject;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function addProject(host, options) {
|
|
6
6
|
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
@@ -18,7 +18,6 @@ function addProject(host, options) {
|
|
|
18
18
|
...project,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
exports.addProject = addProject;
|
|
22
21
|
function getTargets(options) {
|
|
23
22
|
const architect = {};
|
|
24
23
|
architect.start = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createApplicationFiles =
|
|
3
|
+
exports.createApplicationFiles = createApplicationFiles;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
6
|
const path_1 = require("path");
|
|
@@ -21,4 +21,3 @@ function createApplicationFiles(host, options) {
|
|
|
21
21
|
(0, devkit_1.toJS)(host);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
exports.createApplicationFiles = createApplicationFiles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeOptions =
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
6
|
async function normalizeOptions(host, options) {
|
|
@@ -67,4 +67,3 @@ async function normalizeOptions(host, options) {
|
|
|
67
67
|
e2ePort,
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
exports.normalizeOptions = normalizeOptions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.reactNativeComponentGenerator = reactNativeComponentGenerator;
|
|
4
|
+
exports.reactNativeComponentGeneratorInternal = reactNativeComponentGeneratorInternal;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
6
7
|
const add_import_1 = require("./lib/add-import");
|
|
@@ -12,14 +13,12 @@ async function reactNativeComponentGenerator(host, schema) {
|
|
|
12
13
|
...schema,
|
|
13
14
|
});
|
|
14
15
|
}
|
|
15
|
-
exports.reactNativeComponentGenerator = reactNativeComponentGenerator;
|
|
16
16
|
async function reactNativeComponentGeneratorInternal(host, schema) {
|
|
17
17
|
const options = await (0, normalize_options_1.normalizeOptions)(host, schema);
|
|
18
18
|
createComponentFiles(host, options);
|
|
19
19
|
addExportsToBarrel(host, options);
|
|
20
20
|
await (0, devkit_1.formatFiles)(host);
|
|
21
21
|
}
|
|
22
|
-
exports.reactNativeComponentGeneratorInternal = reactNativeComponentGeneratorInternal;
|
|
23
22
|
function createComponentFiles(host, options) {
|
|
24
23
|
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, './files'), options.directory, {
|
|
25
24
|
...options,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addImport =
|
|
3
|
+
exports.addImport = addImport;
|
|
4
4
|
const js_1 = require("@nx/js");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
@@ -30,4 +30,3 @@ function addImport(source, statement) {
|
|
|
30
30
|
];
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
exports.addImport = addImport;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeOptions =
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
6
6
|
async function normalizeOptions(host, options) {
|
|
@@ -34,7 +34,6 @@ async function normalizeOptions(host, options) {
|
|
|
34
34
|
projectName,
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
exports.normalizeOptions = normalizeOptions;
|
|
38
37
|
function assertValidOptions(options) {
|
|
39
38
|
const slashes = ['/', '\\'];
|
|
40
39
|
slashes.forEach((s) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.componentStoryGenerator =
|
|
3
|
+
exports.componentStoryGenerator = componentStoryGenerator;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const react_1 = require("@nx/react");
|
|
6
6
|
/**
|
|
@@ -11,5 +11,4 @@ async function componentStoryGenerator(host, schema) {
|
|
|
11
11
|
devkit_1.logger.warn(`Please run 'nx run @nx/react:component-story ${schema.project}' instead.`);
|
|
12
12
|
return (0, react_1.componentStoryGenerator)(host, schema);
|
|
13
13
|
}
|
|
14
|
-
exports.componentStoryGenerator = componentStoryGenerator;
|
|
15
14
|
exports.default = componentStoryGenerator;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.reactNativeInitGenerator = reactNativeInitGenerator;
|
|
4
|
+
exports.reactNativeInitGeneratorInternal = reactNativeInitGeneratorInternal;
|
|
5
|
+
exports.updateDependencies = updateDependencies;
|
|
4
6
|
const devkit_1 = require("@nx/devkit");
|
|
5
7
|
const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
|
|
6
8
|
const plugin_1 = require("../../../plugins/plugin");
|
|
@@ -12,7 +14,6 @@ function reactNativeInitGenerator(host, schema) {
|
|
|
12
14
|
...schema,
|
|
13
15
|
});
|
|
14
16
|
}
|
|
15
|
-
exports.reactNativeInitGenerator = reactNativeInitGenerator;
|
|
16
17
|
async function reactNativeInitGeneratorInternal(host, schema) {
|
|
17
18
|
(0, add_git_ignore_entry_1.addGitIgnoreEntry)(host);
|
|
18
19
|
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
@@ -74,7 +75,6 @@ async function reactNativeInitGeneratorInternal(host, schema) {
|
|
|
74
75
|
}
|
|
75
76
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
76
77
|
}
|
|
77
|
-
exports.reactNativeInitGeneratorInternal = reactNativeInitGeneratorInternal;
|
|
78
78
|
function updateDependencies(host, schema) {
|
|
79
79
|
return (0, devkit_1.addDependenciesToPackageJson)(host, {
|
|
80
80
|
react: versions_1.reactVersion,
|
|
@@ -84,7 +84,6 @@ function updateDependencies(host, schema) {
|
|
|
84
84
|
'@nx/react-native': versions_1.nxVersion,
|
|
85
85
|
}, undefined, schema.keepExistingVersions);
|
|
86
86
|
}
|
|
87
|
-
exports.updateDependencies = updateDependencies;
|
|
88
87
|
function moveDependency(host) {
|
|
89
88
|
return (0, devkit_1.removeDependenciesFromPackageJson)(host, ['@nx/react-native'], []);
|
|
90
89
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addGitIgnoreEntry =
|
|
3
|
+
exports.addGitIgnoreEntry = addGitIgnoreEntry;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const ignore_1 = require("ignore");
|
|
6
6
|
const gitignore_entries_1 = require("./gitignore-entries");
|
|
@@ -21,4 +21,3 @@ function addGitIgnoreEntry(host) {
|
|
|
21
21
|
}
|
|
22
22
|
host.write('.gitignore', content);
|
|
23
23
|
}
|
|
24
|
-
exports.addGitIgnoreEntry = addGitIgnoreEntry;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeOptions =
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
6
|
async function normalizeOptions(host, options) {
|
|
@@ -30,4 +30,3 @@ async function normalizeOptions(host, options) {
|
|
|
30
30
|
};
|
|
31
31
|
return normalized;
|
|
32
32
|
}
|
|
33
|
-
exports.normalizeOptions = normalizeOptions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.reactNativeLibraryGenerator = reactNativeLibraryGenerator;
|
|
4
|
+
exports.reactNativeLibraryGeneratorInternal = reactNativeLibraryGeneratorInternal;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const js_1 = require("@nx/js");
|
|
6
7
|
const init_1 = require("../init/init");
|
|
@@ -17,7 +18,6 @@ async function reactNativeLibraryGenerator(host, schema) {
|
|
|
17
18
|
...schema,
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
|
-
exports.reactNativeLibraryGenerator = reactNativeLibraryGenerator;
|
|
21
21
|
async function reactNativeLibraryGeneratorInternal(host, schema) {
|
|
22
22
|
const options = await (0, normalize_options_1.normalizeOptions)(host, schema);
|
|
23
23
|
if (options.publishable === true && !schema.importPath) {
|
|
@@ -65,7 +65,6 @@ async function reactNativeLibraryGeneratorInternal(host, schema) {
|
|
|
65
65
|
});
|
|
66
66
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
67
67
|
}
|
|
68
|
-
exports.reactNativeLibraryGeneratorInternal = reactNativeLibraryGeneratorInternal;
|
|
69
68
|
async function addProject(host, options) {
|
|
70
69
|
const project = {
|
|
71
70
|
root: options.projectRoot,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storiesGenerator =
|
|
3
|
+
exports.storiesGenerator = storiesGenerator;
|
|
4
4
|
const react_1 = require("@nx/react");
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated This would be a direct pass through to @nx/react:stories generator.
|
|
@@ -9,5 +9,4 @@ const react_1 = require("@nx/react");
|
|
|
9
9
|
async function storiesGenerator(host, schema) {
|
|
10
10
|
return (0, react_1.storiesGenerator)(host, schema);
|
|
11
11
|
}
|
|
12
|
-
exports.storiesGenerator = storiesGenerator;
|
|
13
12
|
exports.default = storiesGenerator;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
|
|
4
|
+
exports.storybookConfigurationGeneratorInternal = storybookConfigurationGeneratorInternal;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const react_1 = require("@nx/react");
|
|
6
7
|
function storybookConfigurationGenerator(tree, schema) {
|
|
@@ -9,7 +10,6 @@ function storybookConfigurationGenerator(tree, schema) {
|
|
|
9
10
|
...schema,
|
|
10
11
|
});
|
|
11
12
|
}
|
|
12
|
-
exports.storybookConfigurationGenerator = storybookConfigurationGenerator;
|
|
13
13
|
/**
|
|
14
14
|
* This would be a direct pass through to @nx/react:storybook-configuration generator.
|
|
15
15
|
* @TODO (@xiongemi): remove this generator for v19
|
|
@@ -22,5 +22,4 @@ async function storybookConfigurationGeneratorInternal(host, schema) {
|
|
|
22
22
|
schema.addPlugin ??= addPluginDefault;
|
|
23
23
|
return (0, react_1.storybookConfigurationGenerator)(host, schema);
|
|
24
24
|
}
|
|
25
|
-
exports.storybookConfigurationGeneratorInternal = storybookConfigurationGeneratorInternal;
|
|
26
25
|
exports.default = storybookConfigurationGenerator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNativeFiles =
|
|
3
|
+
exports.createNativeFiles = createNativeFiles;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const normalize_options_1 = require("./normalize-options");
|
|
@@ -11,4 +11,3 @@ function createNativeFiles(host, schema, appProjectRoot) {
|
|
|
11
11
|
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../../application/files/app/ios'), iosProjectRoot, options);
|
|
12
12
|
(0, devkit_1.generateFiles)(host, (0, path_1.join)(__dirname, '../../application/files/app/android'), androidProjectRoot, options);
|
|
13
13
|
}
|
|
14
|
-
exports.createNativeFiles = createNativeFiles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeOptions =
|
|
3
|
+
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function normalizeOptions(options, appProjectRoot // app root
|
|
6
6
|
) {
|
|
@@ -24,4 +24,3 @@ function normalizeOptions(options, appProjectRoot // app root
|
|
|
24
24
|
offsetFromRoot: (0, devkit_1.offsetFromRoot)(appProjectRoot),
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
exports.normalizeOptions = normalizeOptions;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* It would replace the Android and iOS folder entirely.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.reactNativeUpgradeNativeGenerator =
|
|
9
|
+
exports.reactNativeUpgradeNativeGenerator = reactNativeUpgradeNativeGenerator;
|
|
10
10
|
const devkit_1 = require("@nx/devkit");
|
|
11
11
|
const fs_1 = require("fs");
|
|
12
12
|
const pod_install_task_1 = require("../../utils/pod-install-task");
|
|
@@ -27,5 +27,4 @@ async function reactNativeUpgradeNativeGenerator(host, schema) {
|
|
|
27
27
|
const chmodTaskGradlew = (0, chmod_android_gradle_files_1.chmodAndroidGradlewFilesTask)(androidProjectRoot);
|
|
28
28
|
return (0, devkit_1.runTasksInSerial)(podInstallTask, chmodTaskGradlew);
|
|
29
29
|
}
|
|
30
|
-
exports.reactNativeUpgradeNativeGenerator = reactNativeUpgradeNativeGenerator;
|
|
31
30
|
exports.default = reactNativeUpgradeNativeGenerator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeSchema =
|
|
3
|
+
exports.normalizeSchema = normalizeSchema;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function normalizeSchema(tree, schema) {
|
|
6
6
|
const project = (0, devkit_1.getProjects)(tree).get(schema.project);
|
|
@@ -13,4 +13,3 @@ function normalizeSchema(tree, schema) {
|
|
|
13
13
|
className,
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
exports.normalizeSchema = normalizeSchema;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createBuildTarget = createBuildTarget;
|
|
4
|
+
exports.createServeTarget = createServeTarget;
|
|
5
|
+
exports.createNxWebpackPluginOptions = createNxWebpackPluginOptions;
|
|
4
6
|
const devkit_1 = require("@nx/devkit");
|
|
5
7
|
function createBuildTarget(options) {
|
|
6
8
|
return {
|
|
@@ -38,7 +40,6 @@ function createBuildTarget(options) {
|
|
|
38
40
|
},
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
|
-
exports.createBuildTarget = createBuildTarget;
|
|
42
43
|
function createServeTarget(options) {
|
|
43
44
|
return {
|
|
44
45
|
executor: '@nx/webpack:dev-server',
|
|
@@ -58,7 +59,6 @@ function createServeTarget(options) {
|
|
|
58
59
|
},
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
|
-
exports.createServeTarget = createServeTarget;
|
|
62
62
|
function createNxWebpackPluginOptions(options) {
|
|
63
63
|
return {
|
|
64
64
|
target: 'web',
|
|
@@ -72,4 +72,3 @@ function createNxWebpackPluginOptions(options) {
|
|
|
72
72
|
styles: [],
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
exports.createNxWebpackPluginOptions = createNxWebpackPluginOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.webConfigurationGenerator =
|
|
3
|
+
exports.webConfigurationGenerator = webConfigurationGenerator;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const has_webpack_plugin_1 = require("@nx/react/src/utils/has-webpack-plugin");
|
|
6
6
|
const versions_1 = require("../../utils/versions");
|
|
@@ -45,7 +45,6 @@ async function webConfigurationGenerator(tree, options) {
|
|
|
45
45
|
}
|
|
46
46
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
47
47
|
}
|
|
48
|
-
exports.webConfigurationGenerator = webConfigurationGenerator;
|
|
49
48
|
/**
|
|
50
49
|
* Add bundler configuration
|
|
51
50
|
* - for vite, viteConfigurationGenerator contains logics to add build and serve target
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = replacePackage;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
|
|
5
6
|
async function replacePackage(tree) {
|
|
6
7
|
await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/react-native', '@nx/react-native');
|
|
7
8
|
await (0, devkit_1.formatFiles)(tree);
|
|
8
9
|
}
|
|
9
|
-
exports.default = replacePackage;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
/**
|
|
5
6
|
* This migration is to upgrade storybook to 6.5.
|
|
@@ -18,4 +19,3 @@ function update(tree) {
|
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
exports.default = update;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
/**
|
|
5
6
|
* This migration adds dependsOn to project.json.
|
|
@@ -60,4 +61,3 @@ async function update(tree) {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
exports.default = update;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
/**
|
|
@@ -20,7 +21,6 @@ async function update(tree) {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
exports.default = update;
|
|
24
24
|
const oldConfigComment = `/**
|
|
25
25
|
* Old custom configuration for React Native v0.71.
|
|
26
26
|
* From @react-native/metro-config 0.72.1, it is no longer necessary to use a config function to access the complete default config.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
/**
|
|
5
6
|
* Remove @types/react-native package since it is no longer required. It would be a part of react native package.
|
|
@@ -10,4 +11,3 @@ async function update(tree) {
|
|
|
10
11
|
(0, devkit_1.removeDependenciesFromPackageJson)(tree, [], ['@types/react-native']);
|
|
11
12
|
await (0, devkit_1.formatFiles)(tree);
|
|
12
13
|
}
|
|
13
|
-
exports.default = update;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const upgrade_impl_1 = require("../../executors/upgrade/upgrade.impl");
|
|
5
6
|
/**
|
|
@@ -30,4 +31,3 @@ async function update(tree) {
|
|
|
30
31
|
}
|
|
31
32
|
await (0, devkit_1.formatFiles)(tree);
|
|
32
33
|
}
|
|
33
|
-
exports.default = update;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const web_configuration_1 = require("../../generators/web-configuration/web-configuration");
|
|
5
6
|
/**
|
|
@@ -30,4 +31,3 @@ async function update(tree) {
|
|
|
30
31
|
}
|
|
31
32
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
32
33
|
}
|
|
33
|
-
exports.default = update;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = changeStorybookTargets;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const output_1 = require("nx/src/utils/output");
|
|
5
6
|
const migrate_7_1 = require("@nx/storybook/src/generators/migrate-7/migrate-7");
|
|
@@ -54,4 +55,3 @@ async function changeStorybookTargets(tree) {
|
|
|
54
55
|
]));
|
|
55
56
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
56
57
|
}
|
|
57
|
-
exports.default = changeStorybookTargets;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
/**
|
|
5
6
|
* This migration removes blockList in metro.config.js.
|
|
@@ -25,4 +26,3 @@ async function update(tree) {
|
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
exports.default = update;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
/**
|
|
5
6
|
* Remove metro-* package since it is no longer explicity required in package.json.
|
|
@@ -26,4 +27,3 @@ async function update(tree) {
|
|
|
26
27
|
]);
|
|
27
28
|
await (0, devkit_1.formatFiles)(tree);
|
|
28
29
|
}
|
|
29
|
-
exports.default = update;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
3
4
|
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const fs_extra_1 = require("fs-extra");
|
|
5
6
|
/**
|
|
@@ -17,7 +18,6 @@ async function update(tree) {
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
exports.default = update;
|
|
21
21
|
function removeTargets(targets, targetNameToRemove) {
|
|
22
22
|
for (const targetName in targets) {
|
|
23
23
|
if (targetName === targetNameToRemove) {
|
package/src/utils/add-jest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addJest =
|
|
3
|
+
exports.addJest = addJest;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const jest_1 = require("@nx/jest");
|
|
6
6
|
async function addJest(host, unitTestRunner, projectName, appProjectRoot, js, skipPackageJson, addPlugin) {
|
|
@@ -45,4 +45,3 @@ async function addJest(host, unitTestRunner, projectName, appProjectRoot, js, sk
|
|
|
45
45
|
host.write(configPath, content);
|
|
46
46
|
return jestTask;
|
|
47
47
|
}
|
|
48
|
-
exports.addJest = addJest;
|
package/src/utils/add-linting.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addLinting =
|
|
3
|
+
exports.addLinting = addLinting;
|
|
4
4
|
const eslint_1 = require("@nx/eslint");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const lint_1 = require("@nx/react/src/utils/lint");
|
|
@@ -33,4 +33,3 @@ async function addLinting(host, options) {
|
|
|
33
33
|
}
|
|
34
34
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
35
35
|
}
|
|
36
|
-
exports.addLinting = addLinting;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.chmodAndroidGradlewFiles = chmodAndroidGradlewFiles;
|
|
4
|
+
exports.chmodAndroidGradlewFilesTask = chmodAndroidGradlewFilesTask;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const fs_1 = require("fs");
|
|
6
7
|
const path_1 = require("path");
|
|
@@ -12,7 +13,6 @@ function chmodAndroidGradlewFiles(androidFolder) {
|
|
|
12
13
|
(0, fs_1.chmodSync)((0, path_1.join)(androidFolder, 'gradlew.bat'), 0o775);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
|
-
exports.chmodAndroidGradlewFiles = chmodAndroidGradlewFiles;
|
|
16
16
|
function chmodAndroidGradlewFilesTask(androidFolder) {
|
|
17
17
|
return () => {
|
|
18
18
|
devkit_1.logger.info(`chmod android gradlew files under ${androidFolder}`);
|
|
@@ -24,4 +24,3 @@ function chmodAndroidGradlewFilesTask(androidFolder) {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
exports.chmodAndroidGradlewFilesTask = chmodAndroidGradlewFilesTask;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureDependencies =
|
|
3
|
+
exports.ensureDependencies = ensureDependencies;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("@nx/react/src/utils/versions");
|
|
6
6
|
const versions_2 = require("./versions");
|
|
@@ -27,4 +27,3 @@ function ensureDependencies(tree) {
|
|
|
27
27
|
: {}),
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
exports.ensureDependencies = ensureDependencies;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureNodeModulesSymlink =
|
|
3
|
+
exports.ensureNodeModulesSymlink = ensureNodeModulesSymlink;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const os_1 = require("os");
|
|
6
6
|
const fs_extra_1 = require("fs-extra");
|
|
@@ -25,4 +25,3 @@ function ensureNodeModulesSymlink(workspaceRoot, projectRoot) {
|
|
|
25
25
|
}
|
|
26
26
|
(0, fs_extra_1.symlinkSync)(worksapceNodeModulesPath, appNodeModulesPath, symlinkType);
|
|
27
27
|
}
|
|
28
|
-
exports.ensureNodeModulesSymlink = ensureNodeModulesSymlink;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findAllNpmDependencies =
|
|
3
|
+
exports.findAllNpmDependencies = findAllNpmDependencies;
|
|
4
4
|
function findAllNpmDependencies(graph, projectName, list = [], seen = new Set()) {
|
|
5
5
|
// In case of bad circular dependencies
|
|
6
6
|
if (seen.has(projectName)) {
|
|
@@ -24,4 +24,3 @@ function findAllNpmDependencies(graph, projectName, list = [], seen = new Set())
|
|
|
24
24
|
}
|
|
25
25
|
return list;
|
|
26
26
|
}
|
|
27
|
-
exports.findAllNpmDependencies = findAllNpmDependencies;
|
package/src/utils/format-file.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatFile =
|
|
3
|
+
exports.formatFile = formatFile;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const prettier_1 = require("prettier");
|
|
6
6
|
function formatFile(content, ...values) {
|
|
@@ -13,4 +13,3 @@ function formatFile(content, ...values) {
|
|
|
13
13
|
parser: 'typescript',
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
exports.formatFile = formatFile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCliOptions =
|
|
3
|
+
exports.getCliOptions = getCliOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
/**
|
|
6
6
|
* This function normalizes the options passed in to the Nx and returns an array of strings that can be passed to the React Native CLI.
|
|
@@ -30,4 +30,3 @@ function getCliOptions(options, optionKeysToIgnore = [], optionKeysInCamelName =
|
|
|
30
30
|
return acc;
|
|
31
31
|
}, []);
|
|
32
32
|
}
|
|
33
|
-
exports.getCliOptions = getCliOptions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.runPodInstall = runPodInstall;
|
|
4
|
+
exports.podInstall = podInstall;
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
6
|
const os_1 = require("os");
|
|
6
7
|
const chalk = require("chalk");
|
|
@@ -41,7 +42,6 @@ function runPodInstall(iosDirectory, install = true, options = {
|
|
|
41
42
|
return podInstall(iosDirectory, options);
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
|
-
exports.runPodInstall = runPodInstall;
|
|
45
45
|
function podInstall(iosDirectory, options = {
|
|
46
46
|
buildFolder: './build',
|
|
47
47
|
repoUpdate: false,
|
|
@@ -70,4 +70,3 @@ function podInstall(iosDirectory, options = {
|
|
|
70
70
|
throw e;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
exports.podInstall = podInstall;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createApp = createApp;
|
|
4
|
+
exports.createLib = createLib;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const application_1 = require("../generators/application/application");
|
|
6
7
|
const eslint_1 = require("@nx/eslint");
|
|
@@ -17,7 +18,6 @@ async function createApp(tree, appName) {
|
|
|
17
18
|
bundler: 'webpack',
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
|
-
exports.createApp = createApp;
|
|
21
21
|
async function createLib(tree, libName) {
|
|
22
22
|
const { fileName } = (0, devkit_1.names)(libName);
|
|
23
23
|
tree.write(`${fileName}/src/index.ts`, `import React from 'react';\n`);
|
|
@@ -29,4 +29,3 @@ async function createLib(tree, libName) {
|
|
|
29
29
|
targets: {},
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
exports.createLib = createLib;
|