@nx/plugin 23.0.0-beta.12 → 23.0.0-beta.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/plugin",
3
- "version": "23.0.0-beta.12",
3
+ "version": "23.0.0-beta.13",
4
4
  "private": false,
5
5
  "description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
6
6
  "repository": {
@@ -29,13 +29,13 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "tslib": "^2.3.0",
32
- "@nx/devkit": "23.0.0-beta.12",
33
- "@nx/jest": "23.0.0-beta.12",
34
- "@nx/js": "23.0.0-beta.12",
35
- "@nx/eslint": "23.0.0-beta.12"
32
+ "@nx/devkit": "23.0.0-beta.13",
33
+ "@nx/jest": "23.0.0-beta.13",
34
+ "@nx/js": "23.0.0-beta.13",
35
+ "@nx/eslint": "23.0.0-beta.13"
36
36
  },
37
37
  "devDependencies": {
38
- "nx": "23.0.0-beta.12"
38
+ "nx": "23.0.0-beta.13"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"create-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/create-package/create-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAapB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,8BAO5B;AAED,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,8BAoC5B;AAwJD,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"create-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/create-package/create-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,8BAO5B;AAED,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,8BAoC5B;AAwJD,eAAe,sBAAsB,CAAC"}
@@ -4,10 +4,8 @@ exports.createPackageGenerator = createPackageGenerator;
4
4
  exports.createPackageGeneratorInternal = createPackageGeneratorInternal;
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const js_1 = require("@nx/js");
7
- const add_tslib_dependencies_1 = require("@nx/js/src/utils/typescript/add-tslib-dependencies");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
- const versions_1 = require("@nx/js/src/utils/versions");
10
- const versions_2 = require("nx/src/utils/versions");
7
+ const internal_1 = require("@nx/js/internal");
8
+ const versions_1 = require("nx/src/utils/versions");
11
9
  const path_1 = require("path");
12
10
  const has_generator_1 = require("../../utils/has-generator");
13
11
  const generator_1 = require("../generator/generator");
@@ -24,10 +22,10 @@ async function createPackageGeneratorInternal(host, schema) {
24
22
  const options = await (0, normalize_schema_1.normalizeSchema)(host, schema);
25
23
  const pluginPackageName = await addPresetGenerator(host, options);
26
24
  if (options.bundler === 'tsc') {
27
- tasks.push((0, add_tslib_dependencies_1.addTsLibDependencies)(host));
25
+ tasks.push((0, js_1.addTsLibDependencies)(host));
28
26
  }
29
27
  const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, {
30
- 'create-nx-workspace': versions_2.nxVersion,
28
+ 'create-nx-workspace': versions_1.nxVersion,
31
29
  }, {});
32
30
  tasks.push(installTask);
33
31
  const cliPackageTask = await createCliPackage(host, options, pluginPackageName);
@@ -73,7 +71,7 @@ async function createCliPackage(host, options, pluginPackageName) {
73
71
  useTscExecutor: true,
74
72
  });
75
73
  host.delete((0, devkit_1.joinPathFragments)(options.projectRoot, 'src'));
76
- const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
74
+ const isTsSolutionSetup = (0, internal_1.isUsingTsSolutionSetup)(host);
77
75
  // Add the bin entry to the package.json
78
76
  (0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'), (packageJson) => {
79
77
  packageJson.bin = {
@@ -88,8 +86,8 @@ async function createCliPackage(host, options, pluginPackageName) {
88
86
  delete packageJson.exports;
89
87
  }
90
88
  packageJson.dependencies = {
91
- 'create-nx-workspace': versions_2.nxVersion,
92
- ...(options.bundler === 'tsc' && { tslib: versions_1.tsLibVersion }),
89
+ 'create-nx-workspace': versions_1.nxVersion,
90
+ ...(options.bundler === 'tsc' && { tslib: internal_1.tsLibVersion }),
93
91
  };
94
92
  return packageJson;
95
93
  });
@@ -131,7 +129,7 @@ function addE2eProject(host, options) {
131
129
  const e2eProjectConfiguration = (0, devkit_1.readProjectConfiguration)(host, options.e2eProject);
132
130
  const projectConfiguration = (0, devkit_1.readProjectConfiguration)(host, options.project);
133
131
  const { name: pluginPackageName } = (0, devkit_1.readJson)(host, (0, path_1.join)(projectConfiguration.root, 'package.json'));
134
- (0, devkit_1.generateFiles)(host, (0, devkit_1.joinPathFragments)(__dirname, './files/e2e'), (0, ts_solution_setup_1.getProjectSourceRoot)(e2eProjectConfiguration, host), {
132
+ (0, devkit_1.generateFiles)(host, (0, devkit_1.joinPathFragments)(__dirname, './files/e2e'), (0, internal_1.getProjectSourceRoot)(e2eProjectConfiguration, host), {
135
133
  pluginName: options.project,
136
134
  cliName: options.name,
137
135
  packageManagerCommands: (0, devkit_1.getPackageManagerCommand)(),
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugin/src/generators/create-package/utils/normalize-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,IAAI,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAS7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,OAAO,EAAE,KAAK,GAAG,KAAK,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAkD3B"}
1
+ {"version":3,"file":"normalize-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugin/src/generators/create-package/utils/normalize-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,IAAI,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAO7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,OAAO,EAAE,KAAK,GAAG,KAAK,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAkD3B"}
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeSchema = normalizeSchema;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const internal_1 = require("@nx/devkit/internal");
6
- const generator_prompts_1 = require("@nx/js/src/utils/generator-prompts");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
+ const internal_2 = require("@nx/js/internal");
8
7
  async function normalizeSchema(host, schema) {
9
- const linter = await (0, generator_prompts_1.normalizeLinterOption)(host, schema.linter);
10
- const unitTestRunner = await (0, generator_prompts_1.normalizeUnitTestRunnerOption)(host, schema.unitTestRunner, ['jest']);
8
+ const linter = await (0, internal_2.normalizeLinterOption)(host, schema.linter);
9
+ const unitTestRunner = await (0, internal_2.normalizeUnitTestRunnerOption)(host, schema.unitTestRunner, ['jest']);
11
10
  if (!schema.directory) {
12
11
  throw new Error(`Please provide the --directory option. It should be the directory containing the project '${schema.project}'.`);
13
12
  }
@@ -20,8 +19,8 @@ async function normalizeSchema(host, schema) {
20
19
  // jsLibraryGenerator, so, if the TS solution setup is not configured, we
21
20
  // additionally check if the TS solution setup will be configured by the
22
21
  // jsLibraryGenerator
23
- const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host) ||
24
- (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(host, schema.addPlugin);
22
+ const isTsSolutionSetup = (0, internal_2.isUsingTsSolutionSetup)(host) ||
23
+ (0, internal_2.shouldConfigureTsSolutionSetup)(host, schema.addPlugin);
25
24
  const nxJson = (0, devkit_1.readNxJson)(host);
26
25
  const addPlugin = schema.addPlugin ??
27
26
  (isTsSolutionSetup &&
@@ -1 +1 @@
1
- {"version":3,"file":"e2e.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/e2e-project/e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAeL,KAAK,iBAAiB,EAEtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAiBpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA+LvC,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMnE;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BA8C3E;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"e2e.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/e2e-project/e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAeL,KAAK,iBAAiB,EAEtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAgBpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA+LvC,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMnE;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BA8C3E;AAED,eAAe,mBAAmB,CAAC"}
@@ -7,13 +7,10 @@ const devkit_1 = require("@nx/devkit");
7
7
  const eslint_1 = require("@nx/eslint");
8
8
  const jest_1 = require("@nx/jest");
9
9
  const js_1 = require("@nx/js");
10
- const generator_1 = require("@nx/js/src/generators/setup-verdaccio/generator");
11
- const add_local_registry_scripts_1 = require("@nx/js/src/utils/add-local-registry-scripts");
12
- const generator_prompts_1 = require("@nx/js/src/utils/generator-prompts");
13
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
10
+ const internal_2 = require("@nx/js/internal");
14
11
  const path_1 = require("path");
15
12
  async function normalizeOptions(host, options) {
16
- const linter = await (0, generator_prompts_1.normalizeLinterOption)(host, options.linter);
13
+ const linter = await (0, internal_2.normalizeLinterOption)(host, options.linter);
17
14
  const projectName = options.rootProject ? 'e2e' : `${options.pluginName}-e2e`;
18
15
  const nxJson = (0, devkit_1.readNxJson)(host);
19
16
  const addPlugin = options.addPlugin ??
@@ -29,7 +26,7 @@ async function normalizeOptions(host, options) {
29
26
  });
30
27
  projectRoot = projectNameAndRootOptions.projectRoot;
31
28
  const pluginPropertyName = (0, devkit_1.names)(options.pluginName).propertyName;
32
- const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
29
+ const isTsSolutionSetup = (0, internal_2.isUsingTsSolutionSetup)(host);
33
30
  return {
34
31
  ...options,
35
32
  projectName,
@@ -92,7 +89,7 @@ async function addJest(host, options) {
92
89
  addPlugin: options.addPlugin,
93
90
  compiler: options.isTsSolutionSetup ? 'swc' : undefined,
94
91
  });
95
- const { startLocalRegistryPath, stopLocalRegistryPath } = (0, add_local_registry_scripts_1.addLocalRegistryScripts)(host);
92
+ const { startLocalRegistryPath, stopLocalRegistryPath } = (0, internal_2.addLocalRegistryScripts)(host);
96
93
  const jestConfigPath = (0, jest_1.findJestConfig)(host, options.projectRoot);
97
94
  if (!jestConfigPath) {
98
95
  throw new Error(`Could not find Jest config for project ${options.projectName} at ${options.projectRoot}`);
@@ -149,7 +146,7 @@ async function e2eProjectGeneratorInternal(host, schema) {
149
146
  validatePlugin(host, schema.pluginName);
150
147
  const options = await normalizeOptions(host, schema);
151
148
  addFiles(host, options);
152
- tasks.push(await (0, generator_1.setupVerdaccio)(host, {
149
+ tasks.push(await (0, js_1.setupVerdaccio)(host, {
153
150
  skipFormat: true,
154
151
  }));
155
152
  tasks.push(await addJest(host, options));
@@ -174,7 +171,7 @@ async function e2eProjectGeneratorInternal(host, schema) {
174
171
  // If we are using the new TS solution
175
172
  // We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
176
173
  if (options.isTsSolutionSetup) {
177
- await (0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(host, options.projectRoot);
174
+ await (0, internal_2.addProjectToTsSolutionWorkspace)(host, options.projectRoot);
178
175
  }
179
176
  if (!options.skipFormat) {
180
177
  await (0, devkit_1.formatFiles)(host);
@@ -5,7 +5,7 @@ exports.executorGenerator = executorGenerator;
5
5
  const tslib_1 = require("tslib");
6
6
  const internal_1 = require("@nx/devkit/internal");
7
7
  const devkit_1 = require("@nx/devkit");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
+ const internal_2 = require("@nx/js/internal");
9
9
  const path_1 = require("path");
10
10
  const paths_1 = require("../../utils/paths");
11
11
  const versions_1 = require("../../utils/versions");
@@ -124,7 +124,7 @@ async function normalizeOptions(tree, options) {
124
124
  description,
125
125
  projectRoot,
126
126
  projectSourceRoot: projectSourceRoot ?? (0, path_1.join)(projectRoot, 'src'),
127
- isTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree),
127
+ isTsSolutionSetup: (0, internal_2.isUsingTsSolutionSetup)(tree),
128
128
  };
129
129
  }
130
130
  async function executorGenerator(host, schema) {
@@ -5,7 +5,7 @@ exports.generatorGenerator = generatorGenerator;
5
5
  const tslib_1 = require("tslib");
6
6
  const internal_1 = require("@nx/devkit/internal");
7
7
  const devkit_1 = require("@nx/devkit");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
+ const internal_2 = require("@nx/js/internal");
9
9
  const node_path_1 = require("node:path");
10
10
  const has_generator_1 = require("../../utils/has-generator");
11
11
  const paths_1 = require("../../utils/paths");
@@ -51,7 +51,7 @@ async function normalizeOptions(tree, options) {
51
51
  description,
52
52
  projectRoot,
53
53
  projectSourceRoot: projectSourceRoot ?? (0, node_path_1.join)(projectRoot, 'src'),
54
- isTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree),
54
+ isTsSolutionSetup: (0, internal_2.isUsingTsSolutionSetup)(tree),
55
55
  };
56
56
  }
57
57
  function addFiles(host, options) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrationGenerator = migrationGenerator;
4
4
  const internal_1 = require("@nx/devkit/internal");
5
5
  const devkit_1 = require("@nx/devkit");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
+ const internal_2 = require("@nx/js/internal");
7
7
  const node_path_1 = require("node:path");
8
8
  const package_json_1 = require("nx/src/utils/package-json");
9
9
  const paths_1 = require("../../utils/paths");
@@ -27,7 +27,7 @@ async function normalizeOptions(tree, options) {
27
27
  description,
28
28
  projectRoot,
29
29
  projectSourceRoot: projectSourceRoot ?? (0, node_path_1.join)(projectRoot, 'src'),
30
- isTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree),
30
+ isTsSolutionSetup: (0, internal_2.isUsingTsSolutionSetup)(tree),
31
31
  };
32
32
  return normalized;
33
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/plugin/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAKjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAWpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAuDvC,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAM/D;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAwFvE;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/plugin/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAKjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAapB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAuDvC,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAM/D;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAwFvE;AAED,eAAe,eAAe,CAAC"}
@@ -5,9 +5,7 @@ exports.pluginGeneratorInternal = pluginGeneratorInternal;
5
5
  const tslib_1 = require("tslib");
6
6
  const devkit_1 = require("@nx/devkit");
7
7
  const js_1 = require("@nx/js");
8
- const add_swc_dependencies_1 = require("@nx/js/src/utils/swc/add-swc-dependencies");
9
- const add_tslib_dependencies_1 = require("@nx/js/src/utils/typescript/add-tslib-dependencies");
10
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
+ const internal_1 = require("@nx/js/internal");
11
9
  const path = tslib_1.__importStar(require("path"));
12
10
  const e2e_1 = require("../e2e-project/e2e");
13
11
  const generator_1 = tslib_1.__importDefault(require("../lint-checks/generator"));
@@ -24,7 +22,7 @@ function updatePluginConfig(host, options) {
24
22
  const project = (0, devkit_1.readProjectConfiguration)(host, options.projectName);
25
23
  if (project.targets.build) {
26
24
  if (options.isTsSolutionSetup && options.bundler === 'tsc') {
27
- project.targets.build.options.rootDir = (0, ts_solution_setup_1.getProjectSourceRoot)(project, host);
25
+ project.targets.build.options.rootDir = (0, internal_1.getProjectSourceRoot)(project, host);
28
26
  project.targets.build.options.generatePackageJson = false;
29
27
  }
30
28
  project.targets.build.options.assets = [
@@ -72,7 +70,7 @@ async function pluginGeneratorInternal(host, schema) {
72
70
  });
73
71
  }
74
72
  if (options.bundler === 'tsc') {
75
- tasks.push((0, add_tslib_dependencies_1.addTsLibDependencies)(host));
73
+ tasks.push((0, js_1.addTsLibDependencies)(host));
76
74
  }
77
75
  tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, {
78
76
  '@nx/devkit': nxVersion,
@@ -83,8 +81,8 @@ async function pluginGeneratorInternal(host, schema) {
83
81
  }));
84
82
  // Ensures Swc Deps are installed to handle running
85
83
  // local plugin generators and executors
86
- tasks.push((0, add_swc_dependencies_1.addSwcDependencies)(host));
87
- tasks.push((0, add_swc_dependencies_1.addSwcRegisterDependencies)(host));
84
+ tasks.push((0, internal_1.addSwcDependencies)(host));
85
+ tasks.push((0, internal_1.addSwcRegisterDependencies)(host));
88
86
  await addFiles(host, options);
89
87
  updatePluginConfig(host, options);
90
88
  if (options.e2eTestRunner !== 'none') {
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugin/src/generators/plugin/utils/normalize-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAKnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAS7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,GAAG,KAAK,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAwD3B"}
1
+ {"version":3,"file":"normalize-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugin/src/generators/plugin/utils/normalize-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAKnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAO7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,GAAG,KAAK,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAwD3B"}
@@ -3,16 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const internal_1 = require("@nx/devkit/internal");
6
- const generator_prompts_1 = require("@nx/js/src/utils/generator-prompts");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
+ const internal_2 = require("@nx/js/internal");
8
7
  async function normalizeOptions(host, options) {
9
- const linter = await (0, generator_prompts_1.normalizeLinterOption)(host, options.linter);
10
- const unitTestRunner = await (0, generator_prompts_1.normalizeUnitTestRunnerOption)(host, options.unitTestRunner, ['jest', 'vitest']);
8
+ const linter = await (0, internal_2.normalizeLinterOption)(host, options.linter);
9
+ const unitTestRunner = await (0, internal_2.normalizeUnitTestRunnerOption)(host, options.unitTestRunner, ['jest', 'vitest']);
11
10
  // this helper is called before the jsLibraryGenerator is called, so, if the
12
11
  // TS solution setup is not configured, we additionally check if the TS
13
12
  // solution setup will be configured by the jsLibraryGenerator
14
- const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host) ||
15
- (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(host, options.addPlugin);
13
+ const isTsSolutionSetup = (0, internal_2.isUsingTsSolutionSetup)(host) ||
14
+ (0, internal_2.shouldConfigureTsSolutionSetup)(host, options.addPlugin);
16
15
  const nxJson = (0, devkit_1.readNxJson)(host);
17
16
  const addPlugin = options.addPlugin ??
18
17
  (isTsSolutionSetup &&
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getArtifactMetadataDirectory = getArtifactMetadataDirectory;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_1 = require("@nx/js/internal");
6
6
  const posix_1 = require("node:path/posix");
7
7
  function getArtifactMetadataDirectory(tree, projectName, sourceDirectory, isTsSolutionSetup) {
8
8
  const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
@@ -24,6 +24,6 @@ function getArtifactMetadataDirectory(tree, projectName, sourceDirectory, isTsSo
24
24
  // unless the user manually changed the build process. In that case, we can't
25
25
  // reliably determine the output directory because it depends on the build
26
26
  // tool, so we'll just assume some defaults.
27
- const baseDir = (0, ts_solution_setup_1.getProjectSourceRoot)(project, tree);
27
+ const baseDir = (0, internal_1.getProjectSourceRoot)(project, tree);
28
28
  return `./${(0, posix_1.join)('dist', (0, posix_1.relative)(baseDir, sourceDirectory))}`;
29
29
  }