@nx/vite 21.3.7 → 21.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/executors.d.ts +1 -0
  2. package/executors.d.ts.map +1 -0
  3. package/executors.js +10 -26
  4. package/index.d.ts +1 -0
  5. package/index.d.ts.map +1 -0
  6. package/index.js +12 -26
  7. package/package.json +7 -4
  8. package/plugin.d.ts +1 -0
  9. package/plugin.d.ts.map +1 -0
  10. package/plugin.js +6 -23
  11. package/plugins/nx-copy-assets.plugin.d.ts +1 -0
  12. package/plugins/nx-copy-assets.plugin.d.ts.map +1 -0
  13. package/plugins/nx-copy-assets.plugin.js +28 -30
  14. package/plugins/nx-tsconfig-paths.plugin.d.ts +1 -0
  15. package/plugins/nx-tsconfig-paths.plugin.d.ts.map +1 -0
  16. package/plugins/nx-tsconfig-paths.plugin.js +86 -88
  17. package/plugins/nx-vite-build-coordination.plugin.d.ts +1 -0
  18. package/plugins/nx-vite-build-coordination.plugin.d.ts.map +1 -0
  19. package/plugins/nx-vite-build-coordination.plugin.js +25 -32
  20. package/plugins/rollup-replace-files.plugin.d.ts +1 -0
  21. package/plugins/rollup-replace-files.plugin.d.ts.map +1 -0
  22. package/plugins/rollup-replace-files.plugin.js +20 -26
  23. package/project.json +52 -0
  24. package/src/executors/build/build.impl.d.ts +1 -0
  25. package/src/executors/build/build.impl.d.ts.map +1 -0
  26. package/src/executors/build/build.impl.js +98 -112
  27. package/src/executors/build/compat.d.ts +1 -0
  28. package/src/executors/build/compat.d.ts.map +1 -0
  29. package/src/executors/build/compat.js +4 -11
  30. package/src/executors/dev-server/compat.d.ts +1 -0
  31. package/src/executors/dev-server/compat.d.ts.map +1 -0
  32. package/src/executors/dev-server/compat.js +4 -11
  33. package/src/executors/dev-server/dev-server.impl.d.ts +1 -0
  34. package/src/executors/dev-server/dev-server.impl.d.ts.map +1 -0
  35. package/src/executors/dev-server/dev-server.impl.js +54 -62
  36. package/src/executors/preview-server/compat.d.ts +1 -0
  37. package/src/executors/preview-server/compat.d.ts.map +1 -0
  38. package/src/executors/preview-server/compat.js +4 -11
  39. package/src/executors/preview-server/preview-server.impl.d.ts +1 -0
  40. package/src/executors/preview-server/preview-server.impl.d.ts.map +1 -0
  41. package/src/executors/preview-server/preview-server.impl.js +74 -77
  42. package/src/executors/test/compat.d.ts +1 -0
  43. package/src/executors/test/compat.d.ts.map +1 -0
  44. package/src/executors/test/compat.js +4 -11
  45. package/src/executors/test/lib/nx-reporter.d.ts +1 -0
  46. package/src/executors/test/lib/nx-reporter.d.ts.map +1 -0
  47. package/src/executors/test/lib/nx-reporter.js +17 -25
  48. package/src/executors/test/lib/utils.d.ts +1 -0
  49. package/src/executors/test/lib/utils.d.ts.map +1 -0
  50. package/src/executors/test/lib/utils.js +36 -59
  51. package/src/executors/test/vitest.impl.d.ts +1 -0
  52. package/src/executors/test/vitest.impl.d.ts.map +1 -0
  53. package/src/executors/test/vitest.impl.js +29 -43
  54. package/src/generators/configuration/configuration.d.ts +1 -0
  55. package/src/generators/configuration/configuration.d.ts.map +1 -0
  56. package/src/generators/configuration/configuration.js +82 -102
  57. package/src/generators/configuration/lib/convert-non-vite.d.ts +1 -0
  58. package/src/generators/configuration/lib/convert-non-vite.d.ts.map +1 -0
  59. package/src/generators/configuration/lib/convert-non-vite.js +33 -32
  60. package/src/generators/convert-to-inferred/convert-to-inferred.d.ts +1 -0
  61. package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +1 -0
  62. package/src/generators/convert-to-inferred/convert-to-inferred.js +31 -61
  63. package/src/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts +1 -0
  64. package/src/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts.map +1 -0
  65. package/src/generators/convert-to-inferred/lib/build-post-target-transformer.js +46 -58
  66. package/src/generators/convert-to-inferred/lib/preview-post-target-transformer.d.ts +1 -0
  67. package/src/generators/convert-to-inferred/lib/preview-post-target-transformer.d.ts.map +1 -0
  68. package/src/generators/convert-to-inferred/lib/preview-post-target-transformer.js +9 -14
  69. package/src/generators/convert-to-inferred/lib/serve-post-target-transformer.d.ts +1 -0
  70. package/src/generators/convert-to-inferred/lib/serve-post-target-transformer.d.ts.map +1 -0
  71. package/src/generators/convert-to-inferred/lib/serve-post-target-transformer.js +10 -15
  72. package/src/generators/convert-to-inferred/lib/test-post-target-transformer.d.ts +1 -0
  73. package/src/generators/convert-to-inferred/lib/test-post-target-transformer.d.ts.map +1 -0
  74. package/src/generators/convert-to-inferred/lib/test-post-target-transformer.js +16 -23
  75. package/src/generators/convert-to-inferred/lib/utils.d.ts +1 -0
  76. package/src/generators/convert-to-inferred/lib/utils.d.ts.map +1 -0
  77. package/src/generators/convert-to-inferred/lib/utils.js +18 -33
  78. package/src/generators/init/init.d.ts +1 -0
  79. package/src/generators/init/init.d.ts.map +1 -0
  80. package/src/generators/init/init.js +44 -96
  81. package/src/generators/init/lib/utils.d.ts +1 -0
  82. package/src/generators/init/lib/utils.d.ts.map +1 -0
  83. package/src/generators/init/lib/utils.js +20 -35
  84. package/src/generators/setup-paths-plugin/lib/utils.d.ts +1 -0
  85. package/src/generators/setup-paths-plugin/lib/utils.d.ts.map +1 -0
  86. package/src/generators/setup-paths-plugin/lib/utils.js +0 -3
  87. package/src/generators/setup-paths-plugin/setup-paths-plugin.d.ts +1 -0
  88. package/src/generators/setup-paths-plugin/setup-paths-plugin.d.ts.map +1 -0
  89. package/src/generators/setup-paths-plugin/setup-paths-plugin.js +45 -54
  90. package/src/generators/vitest/vitest-generator.d.ts +1 -0
  91. package/src/generators/vitest/vitest-generator.d.ts.map +1 -0
  92. package/src/generators/vitest/vitest-generator.js +134 -174
  93. package/src/migrations/update-19-6-0/add-depends-on-for-preview.d.ts +1 -0
  94. package/src/migrations/update-19-6-0/add-depends-on-for-preview.d.ts.map +1 -0
  95. package/src/migrations/update-19-6-0/add-depends-on-for-preview.js +10 -18
  96. package/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.d.ts +1 -0
  97. package/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.d.ts.map +1 -0
  98. package/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.js +4 -10
  99. package/src/migrations/update-20-3-0/add-vitest-temp-files-to-git-ignore.d.ts +1 -0
  100. package/src/migrations/update-20-3-0/add-vitest-temp-files-to-git-ignore.d.ts.map +1 -0
  101. package/src/migrations/update-20-3-0/add-vitest-temp-files-to-git-ignore.js +4 -10
  102. package/src/migrations/update-20-5-0/eslint-ignore-vite-temp-files.d.ts +1 -0
  103. package/src/migrations/update-20-5-0/eslint-ignore-vite-temp-files.d.ts.map +1 -0
  104. package/src/migrations/update-20-5-0/eslint-ignore-vite-temp-files.js +20 -24
  105. package/src/migrations/update-20-5-0/install-jiti.d.ts +1 -0
  106. package/src/migrations/update-20-5-0/install-jiti.d.ts.map +1 -0
  107. package/src/migrations/update-20-5-0/install-jiti.js +6 -12
  108. package/src/migrations/update-20-5-0/update-resolve-conditions.d.ts +1 -0
  109. package/src/migrations/update-20-5-0/update-resolve-conditions.d.ts.map +1 -0
  110. package/src/migrations/update-20-5-0/update-resolve-conditions.js +26 -28
  111. package/src/plugins/plugin.d.ts +1 -0
  112. package/src/plugins/plugin.d.ts.map +1 -0
  113. package/src/plugins/plugin.js +189 -267
  114. package/src/utils/detect-ui-framework.d.ts +1 -0
  115. package/src/utils/detect-ui-framework.d.ts.map +1 -0
  116. package/src/utils/detect-ui-framework.js +9 -20
  117. package/src/utils/e2e-web-server-info-utils.d.ts +1 -0
  118. package/src/utils/e2e-web-server-info-utils.d.ts.map +1 -0
  119. package/src/utils/e2e-web-server-info-utils.js +23 -35
  120. package/src/utils/ensure-dependencies.d.ts +1 -0
  121. package/src/utils/ensure-dependencies.d.ts.map +1 -0
  122. package/src/utils/ensure-dependencies.js +24 -26
  123. package/src/utils/executor-utils.d.ts +1 -0
  124. package/src/utils/executor-utils.d.ts.map +1 -0
  125. package/src/utils/executor-utils.js +27 -43
  126. package/src/utils/find-vite-config.d.ts +1 -0
  127. package/src/utils/find-vite-config.d.ts.map +1 -0
  128. package/src/utils/find-vite-config.js +12 -37
  129. package/src/utils/generator-utils.d.ts +1 -0
  130. package/src/utils/generator-utils.d.ts.map +1 -0
  131. package/src/utils/generator-utils.js +204 -216
  132. package/src/utils/ignore-vite-temp-files.d.ts +1 -0
  133. package/src/utils/ignore-vite-temp-files.d.ts.map +1 -0
  134. package/src/utils/ignore-vite-temp-files.js +22 -32
  135. package/src/utils/nx-tsconfig-paths-find-file.d.ts +1 -0
  136. package/src/utils/nx-tsconfig-paths-find-file.d.ts.map +1 -0
  137. package/src/utils/nx-tsconfig-paths-find-file.js +10 -16
  138. package/src/utils/options-utils.d.ts +1 -0
  139. package/src/utils/options-utils.d.ts.map +1 -0
  140. package/src/utils/options-utils.js +48 -58
  141. package/src/utils/test-files/test-vite-configs.d.ts +1 -0
  142. package/src/utils/test-files/test-vite-configs.d.ts.map +1 -0
  143. package/src/utils/test-files/test-vite-configs.js +21 -82
  144. package/src/utils/test-utils.d.ts +1 -0
  145. package/src/utils/test-utils.d.ts.map +1 -0
  146. package/src/utils/test-utils.js +103 -130
  147. package/src/utils/version-utils.d.ts +1 -0
  148. package/src/utils/version-utils.d.ts.map +1 -0
  149. package/src/utils/version-utils.js +26 -44
  150. package/src/utils/versions.d.ts +1 -0
  151. package/src/utils/versions.d.ts.map +1 -0
  152. package/src/utils/versions.js +22 -82
  153. package/src/utils/vite-config-edit-utils.d.ts +1 -0
  154. package/src/utils/vite-config-edit-utils.d.ts.map +1 -0
  155. package/src/utils/vite-config-edit-utils.js +145 -125
  156. package/executors.js.map +0 -1
  157. package/index.js.map +0 -1
  158. package/plugin.js.map +0 -1
  159. package/plugins/nx-copy-assets.plugin.js.map +0 -1
  160. package/plugins/nx-tsconfig-paths.plugin.js.map +0 -1
  161. package/plugins/nx-vite-build-coordination.plugin.js.map +0 -1
  162. package/plugins/rollup-replace-files.plugin.js.map +0 -1
  163. package/src/executors/build/build.impl.js.map +0 -1
  164. package/src/executors/build/compat.js.map +0 -1
  165. package/src/executors/build/schema.d.js +0 -3
  166. package/src/executors/build/schema.d.js.map +0 -1
  167. package/src/executors/dev-server/compat.js.map +0 -1
  168. package/src/executors/dev-server/dev-server.impl.js.map +0 -1
  169. package/src/executors/dev-server/schema.d.js +0 -3
  170. package/src/executors/dev-server/schema.d.js.map +0 -1
  171. package/src/executors/preview-server/compat.js.map +0 -1
  172. package/src/executors/preview-server/preview-server.impl.js.map +0 -1
  173. package/src/executors/preview-server/schema.d.js +0 -3
  174. package/src/executors/preview-server/schema.d.js.map +0 -1
  175. package/src/executors/test/compat.js.map +0 -1
  176. package/src/executors/test/lib/nx-reporter.js.map +0 -1
  177. package/src/executors/test/lib/utils.js.map +0 -1
  178. package/src/executors/test/schema.d.js +0 -3
  179. package/src/executors/test/schema.d.js.map +0 -1
  180. package/src/executors/test/vitest.impl.js.map +0 -1
  181. package/src/generators/configuration/configuration.js.map +0 -1
  182. package/src/generators/configuration/lib/convert-non-vite.js.map +0 -1
  183. package/src/generators/configuration/schema.d.js +0 -3
  184. package/src/generators/configuration/schema.d.js.map +0 -1
  185. package/src/generators/convert-to-inferred/convert-to-inferred.js.map +0 -1
  186. package/src/generators/convert-to-inferred/lib/build-post-target-transformer.js.map +0 -1
  187. package/src/generators/convert-to-inferred/lib/preview-post-target-transformer.js.map +0 -1
  188. package/src/generators/convert-to-inferred/lib/serve-post-target-transformer.js.map +0 -1
  189. package/src/generators/convert-to-inferred/lib/test-post-target-transformer.js.map +0 -1
  190. package/src/generators/convert-to-inferred/lib/utils.js.map +0 -1
  191. package/src/generators/init/init.js.map +0 -1
  192. package/src/generators/init/lib/utils.js.map +0 -1
  193. package/src/generators/init/schema.d.js +0 -3
  194. package/src/generators/init/schema.d.js.map +0 -1
  195. package/src/generators/setup-paths-plugin/lib/utils.js.map +0 -1
  196. package/src/generators/setup-paths-plugin/schema.d.js +0 -3
  197. package/src/generators/setup-paths-plugin/schema.d.js.map +0 -1
  198. package/src/generators/setup-paths-plugin/setup-paths-plugin.js.map +0 -1
  199. package/src/generators/vitest/schema.d.js +0 -3
  200. package/src/generators/vitest/schema.d.js.map +0 -1
  201. package/src/generators/vitest/vitest-generator.js.map +0 -1
  202. package/src/migrations/update-19-6-0/add-depends-on-for-preview.js.map +0 -1
  203. package/src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore.js.map +0 -1
  204. package/src/migrations/update-20-3-0/add-vitest-temp-files-to-git-ignore.js.map +0 -1
  205. package/src/migrations/update-20-5-0/eslint-ignore-vite-temp-files.js.map +0 -1
  206. package/src/migrations/update-20-5-0/install-jiti.js.map +0 -1
  207. package/src/migrations/update-20-5-0/update-resolve-conditions.js.map +0 -1
  208. package/src/plugins/plugin.js.map +0 -1
  209. package/src/utils/detect-ui-framework.js.map +0 -1
  210. package/src/utils/e2e-web-server-info-utils.js.map +0 -1
  211. package/src/utils/ensure-dependencies.js.map +0 -1
  212. package/src/utils/executor-utils.js.map +0 -1
  213. package/src/utils/find-vite-config.js.map +0 -1
  214. package/src/utils/generator-utils.js.map +0 -1
  215. package/src/utils/ignore-vite-temp-files.js.map +0 -1
  216. package/src/utils/nx-tsconfig-paths-find-file.js.map +0 -1
  217. package/src/utils/options-utils.js.map +0 -1
  218. package/src/utils/test-files/test-vite-configs.js.map +0 -1
  219. package/src/utils/test-utils.js.map +0 -1
  220. package/src/utils/version-utils.js.map +0 -1
  221. package/src/utils/versions.js.map +0 -1
  222. package/src/utils/vite-config-edit-utils.js.map +0 -1
@@ -1,55 +1,45 @@
1
1
  "use strict";
2
- function _export(target, all) {
3
- for(var name in all)Object.defineProperty(target, name, {
4
- enumerable: true,
5
- get: all[name]
6
- });
7
- }
8
- _export(exports, {
9
- createDependencies: function() {
10
- return createDependencies;
11
- },
12
- createNodes: function() {
13
- return createNodes;
14
- },
15
- createNodesV2: function() {
16
- return createNodesV2;
17
- }
18
- });
19
- const _extends = require("@swc/helpers/_/_extends");
20
- const _devkit = require("@nx/devkit");
21
- const _path = require("path");
22
- const _getnamedinputs = require("@nx/devkit/src/utils/get-named-inputs");
23
- const _fs = require("fs");
24
- const _calculatehashforcreatenodes = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
25
- const _cachedirectory = require("nx/src/utils/cache-directory");
26
- const _js = require("@nx/js");
27
- const _executorutils = require("../utils/executor-utils");
28
- const _filehasher = require("nx/src/hasher/file-hasher");
29
- const _tssolutionsetup = require("@nx/js/src/utils/typescript/ts-solution-setup");
30
- const _util = require("@nx/js/src/plugins/typescript/util");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createNodes = exports.createNodesV2 = exports.createDependencies = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const path_1 = require("path");
6
+ const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
7
+ const fs_1 = require("fs");
8
+ const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
9
+ const cache_directory_1 = require("nx/src/utils/cache-directory");
10
+ const js_1 = require("@nx/js");
11
+ const executor_utils_1 = require("../utils/executor-utils");
12
+ const file_hasher_1 = require("nx/src/hasher/file-hasher");
31
13
  const picomatch = require("picomatch");
32
- const pmc = (0, _devkit.getPackageManagerCommand)();
14
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
15
+ const util_1 = require("@nx/js/src/plugins/typescript/util");
16
+ const pmc = (0, devkit_1.getPackageManagerCommand)();
33
17
  function readTargetsCache(cachePath) {
34
- return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && (0, _fs.existsSync)(cachePath) ? (0, _devkit.readJsonFile)(cachePath) : {};
18
+ return process.env.NX_CACHE_PROJECT_GRAPH !== 'false' && (0, fs_1.existsSync)(cachePath)
19
+ ? (0, devkit_1.readJsonFile)(cachePath)
20
+ : {};
35
21
  }
36
22
  function writeTargetsToCache(cachePath, results) {
37
- (0, _devkit.writeJsonFile)(cachePath, results);
23
+ (0, devkit_1.writeJsonFile)(cachePath, results);
38
24
  }
39
- const createDependencies = ()=>{
25
+ /**
26
+ * @deprecated The 'createDependencies' function is now a no-op. This functionality is included in 'createNodesV2'.
27
+ */
28
+ const createDependencies = () => {
40
29
  return [];
41
30
  };
31
+ exports.createDependencies = createDependencies;
42
32
  const viteVitestConfigGlob = '**/{vite,vitest}.config.{js,ts,mjs,mts,cjs,cts}';
43
- const createNodesV2 = [
33
+ exports.createNodesV2 = [
44
34
  viteVitestConfigGlob,
45
- async (configFilePaths, options, context)=>{
46
- const optionsHash = (0, _filehasher.hashObject)(options);
35
+ async (configFilePaths, options, context) => {
36
+ const optionsHash = (0, file_hasher_1.hashObject)(options);
47
37
  const normalizedOptions = normalizeOptions(options);
48
- const cachePath = (0, _path.join)(_cachedirectory.workspaceDataDirectory, `vite-${optionsHash}.hash`);
38
+ const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `vite-${optionsHash}.hash`);
49
39
  const targetsCache = readTargetsCache(cachePath);
50
- const isUsingTsSolutionSetup = (0, _tssolutionsetup.isUsingTsSolutionSetup)();
51
- const { roots: projectRoots, configFiles: validConfigFiles } = configFilePaths.reduce((acc, configFile)=>{
52
- const potentialRoot = (0, _path.dirname)(configFile);
40
+ const isUsingTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)();
41
+ const { roots: projectRoots, configFiles: validConfigFiles } = configFilePaths.reduce((acc, configFile) => {
42
+ const potentialRoot = (0, path_1.dirname)(configFile);
53
43
  if (checkIfConfigFileShouldBeProject(potentialRoot, context)) {
54
44
  acc.roots.push(potentialRoot);
55
45
  acc.configFiles.push(configFile);
@@ -57,37 +47,33 @@ const createNodesV2 = [
57
47
  return acc;
58
48
  }, {
59
49
  roots: [],
60
- configFiles: []
50
+ configFiles: [],
61
51
  });
62
- const lockfile = (0, _js.getLockFileName)((0, _devkit.detectPackageManager)(context.workspaceRoot));
63
- const hashes = await (0, _calculatehashforcreatenodes.calculateHashesForCreateNodes)(projectRoots, _extends._({}, normalizedOptions, {
64
- isUsingTsSolutionSetup
65
- }), context, projectRoots.map((r)=>[
66
- lockfile
67
- ]));
52
+ const lockfile = (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
53
+ const hashes = await (0, calculate_hash_for_create_nodes_1.calculateHashesForCreateNodes)(projectRoots, { ...normalizedOptions, isUsingTsSolutionSetup }, context, projectRoots.map((r) => [lockfile]));
68
54
  try {
69
- return await (0, _devkit.createNodesFromFiles)(async (configFile, _, context, idx)=>{
70
- var _targetsCache, _hash;
71
- const projectRoot = (0, _path.dirname)(configFile);
55
+ return await (0, devkit_1.createNodesFromFiles)(async (configFile, _, context, idx) => {
56
+ const projectRoot = (0, path_1.dirname)(configFile);
72
57
  // Do not create a project if package.json and project.json isn't there.
73
- const siblingFiles = (0, _fs.readdirSync)((0, _path.join)(context.workspaceRoot, projectRoot));
74
- var _siblingFiles_filter;
75
- const tsConfigFiles = (_siblingFiles_filter = siblingFiles.filter((p)=>picomatch('tsconfig*{.json,.*.json}')(p))) != null ? _siblingFiles_filter : [];
76
- const hasReactRouterConfig = siblingFiles.some((configFile)=>{
58
+ const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
59
+ const tsConfigFiles = siblingFiles.filter((p) => picomatch('tsconfig*{.json,.*.json}')(p)) ?? [];
60
+ const hasReactRouterConfig = siblingFiles.some((configFile) => {
77
61
  const parts = configFile.split('.');
78
- return parts[0] === 'react-router' && parts[1] === 'config' && parts.length > 2;
62
+ return (parts[0] === 'react-router' &&
63
+ parts[1] === 'config' &&
64
+ parts.length > 2);
79
65
  });
80
66
  // results from vitest.config.js will be different from results of vite.config.js
81
67
  // but the hash will be the same because it is based on the files under the project root.
82
68
  // Adding the config file path to the hash ensures that the final hash value is different
83
69
  // for different config files.
84
70
  const hash = hashes[idx] + configFile;
85
- var _1;
86
- const { projectType, metadata, targets } = (_1 = (_targetsCache = targetsCache)[_hash = hash]) != null ? _1 : _targetsCache[_hash] = await buildViteTargets(configFile, projectRoot, normalizedOptions, tsConfigFiles, hasReactRouterConfig, isUsingTsSolutionSetup, context);
71
+ const { projectType, metadata, targets } = (targetsCache[hash] ??=
72
+ await buildViteTargets(configFile, projectRoot, normalizedOptions, tsConfigFiles, hasReactRouterConfig, isUsingTsSolutionSetup, context));
87
73
  const project = {
88
74
  root: projectRoot,
89
75
  targets,
90
- metadata
76
+ metadata,
91
77
  };
92
78
  // If project is buildable, then the project type.
93
79
  // If it is not buildable, then leave it to other plugins/project.json to set the project type.
@@ -96,38 +82,40 @@ const createNodesV2 = [
96
82
  }
97
83
  return {
98
84
  projects: {
99
- [projectRoot]: project
100
- }
85
+ [projectRoot]: project,
86
+ },
101
87
  };
102
88
  }, validConfigFiles, options, context);
103
- } finally{
89
+ }
90
+ finally {
104
91
  writeTargetsToCache(cachePath, targetsCache);
105
92
  }
106
- }
93
+ },
107
94
  ];
108
- const createNodes = [
95
+ exports.createNodes = [
109
96
  viteVitestConfigGlob,
110
- async (configFilePath, options, context)=>{
111
- _devkit.logger.warn('`createNodes` is deprecated. Update your plugin to utilize createNodesV2 instead. In Nx 20, this will change to the createNodesV2 API.');
112
- const projectRoot = (0, _path.dirname)(configFilePath);
97
+ async (configFilePath, options, context) => {
98
+ devkit_1.logger.warn('`createNodes` is deprecated. Update your plugin to utilize createNodesV2 instead. In Nx 20, this will change to the createNodesV2 API.');
99
+ const projectRoot = (0, path_1.dirname)(configFilePath);
113
100
  // Do not create a project if package.json and project.json isn't there.
114
- const siblingFiles = (0, _fs.readdirSync)((0, _path.join)(context.workspaceRoot, projectRoot));
115
- if (!siblingFiles.includes('package.json') && !siblingFiles.includes('project.json')) {
101
+ const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
102
+ if (!siblingFiles.includes('package.json') &&
103
+ !siblingFiles.includes('project.json')) {
116
104
  return {};
117
105
  }
118
- var _siblingFiles_filter;
119
- const tsConfigFiles = (_siblingFiles_filter = siblingFiles.filter((p)=>picomatch('tsconfig*{.json,.*.json}')(p))) != null ? _siblingFiles_filter : [];
120
- const hasReactRouterConfig = siblingFiles.some((configFile)=>{
106
+ const tsConfigFiles = siblingFiles.filter((p) => picomatch('tsconfig*{.json,.*.json}')(p)) ??
107
+ [];
108
+ const hasReactRouterConfig = siblingFiles.some((configFile) => {
121
109
  const parts = configFile.split('.');
122
- return parts[0] === 'react-router' && parts[1] === 'config' && parts.length > 2;
110
+ return (parts[0] === 'react-router' && parts[1] === 'config' && parts.length > 2);
123
111
  });
124
112
  const normalizedOptions = normalizeOptions(options);
125
- const isUsingTsSolutionSetup = (0, _tssolutionsetup.isUsingTsSolutionSetup)();
113
+ const isUsingTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)();
126
114
  const { projectType, metadata, targets } = await buildViteTargets(configFilePath, projectRoot, normalizedOptions, tsConfigFiles, hasReactRouterConfig, isUsingTsSolutionSetup, context);
127
115
  const project = {
128
116
  root: projectRoot,
129
117
  targets,
130
- metadata
118
+ metadata,
131
119
  };
132
120
  // If project is buildable, then the project type.
133
121
  // If it is not buildable, then leave it to other plugins/project.json to set the project type.
@@ -136,29 +124,29 @@ const createNodes = [
136
124
  }
137
125
  return {
138
126
  projects: {
139
- [projectRoot]: project
140
- }
127
+ [projectRoot]: project,
128
+ },
141
129
  };
142
- }
130
+ },
143
131
  ];
144
132
  async function buildViteTargets(configFilePath, projectRoot, options, tsConfigFiles, hasReactRouterConfig, isUsingTsSolutionSetup, context) {
145
- var _viteBuildConfig_build;
146
- const absoluteConfigFilePath = (0, _devkit.joinPathFragments)(context.workspaceRoot, configFilePath);
133
+ const absoluteConfigFilePath = (0, devkit_1.joinPathFragments)(context.workspaceRoot, configFilePath);
147
134
  // Workaround for the `build$3 is not a function` error that we sometimes see in agents.
148
135
  // This should be removed later once we address the issue properly
149
136
  try {
150
- const importEsbuild = ()=>new Function('return import("esbuild")')();
137
+ const importEsbuild = () => new Function('return import("esbuild")')();
151
138
  await importEsbuild();
152
- } catch (e) {
153
- // do nothing
154
139
  }
155
- const { resolveConfig } = await (0, _executorutils.loadViteDynamicImport)();
140
+ catch {
141
+ // do nothing
142
+ }
143
+ const { resolveConfig } = await (0, executor_utils_1.loadViteDynamicImport)();
156
144
  const viteBuildConfig = await resolveConfig({
157
145
  configFile: absoluteConfigFilePath,
158
- mode: 'development'
146
+ mode: 'development',
159
147
  }, 'build');
160
148
  const { buildOutputs, testOutputs, hasTest, isBuildable, hasServeConfig } = getOutputs(viteBuildConfig, projectRoot, context.workspaceRoot);
161
- const namedInputs = (0, _getnamedinputs.getNamedInputs)(projectRoot, context);
149
+ const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
162
150
  const targets = {};
163
151
  // if file is vitest.config or vite.config has definition for test, create target for test
164
152
  if (configFilePath.includes('vitest.config') || hasTest) {
@@ -166,148 +154,112 @@ async function buildViteTargets(configFilePath, projectRoot, options, tsConfigFi
166
154
  }
167
155
  if (hasReactRouterConfig) {
168
156
  // If we have a react-router config, we can skip the rest of the targets
169
- return {
170
- targets,
171
- metadata: {},
172
- projectType: 'application'
173
- };
157
+ return { targets, metadata: {}, projectType: 'application' };
174
158
  }
175
159
  // If file is not vitest.config and buildable, create targets for build, serve, preview and serve-static
176
- const hasRemixPlugin = viteBuildConfig.plugins && viteBuildConfig.plugins.some((p)=>p.name === 'remix');
177
- if (!configFilePath.includes('vitest.config') && !hasRemixPlugin && isBuildable) {
178
- var _viteBuildConfig_build1;
160
+ const hasRemixPlugin = viteBuildConfig.plugins &&
161
+ viteBuildConfig.plugins.some((p) => p.name === 'remix');
162
+ if (!configFilePath.includes('vitest.config') &&
163
+ !hasRemixPlugin &&
164
+ isBuildable) {
179
165
  targets[options.buildTargetName] = await buildTarget(options.buildTargetName, namedInputs, buildOutputs, projectRoot, isUsingTsSolutionSetup);
180
166
  // If running in library mode, then there is nothing to serve.
181
- if (!((_viteBuildConfig_build1 = viteBuildConfig.build) == null ? void 0 : _viteBuildConfig_build1.lib) || hasServeConfig) {
167
+ if (!viteBuildConfig.build?.lib || hasServeConfig) {
182
168
  const devTarget = serveTarget(projectRoot, isUsingTsSolutionSetup);
183
- targets[options.serveTargetName] = _extends._({}, devTarget, {
184
- metadata: _extends._({}, devTarget.metadata, {
185
- deprecated: 'Use devTargetName instead. This option will be removed in Nx 22.'
186
- })
187
- });
169
+ targets[options.serveTargetName] = {
170
+ ...devTarget,
171
+ metadata: {
172
+ ...devTarget.metadata,
173
+ deprecated: 'Use devTargetName instead. This option will be removed in Nx 22.',
174
+ },
175
+ };
188
176
  targets[options.devTargetName] = devTarget;
189
177
  targets[options.previewTargetName] = previewTarget(projectRoot, options.buildTargetName);
190
178
  targets[options.serveStaticTargetName] = serveStaticTarget(options, isUsingTsSolutionSetup);
191
179
  }
192
180
  }
193
181
  if (tsConfigFiles.length) {
194
- var _viteBuildConfig_plugins;
195
- var _find;
196
- const tsConfigToUse = (_find = [
197
- 'tsconfig.app.json',
198
- 'tsconfig.lib.json',
199
- 'tsconfig.json'
200
- ].find((t)=>tsConfigFiles.includes(t))) != null ? _find : tsConfigFiles[0];
182
+ const tsConfigToUse = ['tsconfig.app.json', 'tsconfig.lib.json', 'tsconfig.json'].find((t) => tsConfigFiles.includes(t)) ?? tsConfigFiles[0];
201
183
  // Check if the project uses Vue plugin
202
- const hasVuePlugin = (_viteBuildConfig_plugins = viteBuildConfig.plugins) == null ? void 0 : _viteBuildConfig_plugins.some((p)=>p.name === 'vite:vue');
184
+ const hasVuePlugin = viteBuildConfig.plugins?.some((p) => p.name === 'vite:vue');
203
185
  const typeCheckCommand = hasVuePlugin ? 'vue-tsc' : 'tsc';
204
186
  targets[options.typecheckTargetName] = {
205
187
  cache: true,
206
188
  inputs: [
207
- ...'production' in namedInputs ? [
208
- 'production',
209
- '^production'
210
- ] : [
211
- 'default',
212
- '^default'
213
- ],
189
+ ...('production' in namedInputs
190
+ ? ['production', '^production']
191
+ : ['default', '^default']),
214
192
  {
215
- externalDependencies: hasVuePlugin ? [
216
- 'vue-tsc',
217
- 'typescript'
218
- ] : [
219
- 'typescript'
220
- ]
221
- }
193
+ externalDependencies: hasVuePlugin
194
+ ? ['vue-tsc', 'typescript']
195
+ : ['typescript'],
196
+ },
222
197
  ],
223
- command: isUsingTsSolutionSetup ? `${typeCheckCommand} --build --emitDeclarationOnly` : `${typeCheckCommand} --noEmit -p ${tsConfigToUse}`,
224
- options: {
225
- cwd: (0, _devkit.joinPathFragments)(projectRoot)
226
- },
198
+ command: isUsingTsSolutionSetup
199
+ ? `${typeCheckCommand} --build --emitDeclarationOnly`
200
+ : `${typeCheckCommand} --noEmit -p ${tsConfigToUse}`,
201
+ options: { cwd: (0, devkit_1.joinPathFragments)(projectRoot) },
227
202
  metadata: {
228
203
  description: `Runs type-checking for the project.`,
229
- technologies: hasVuePlugin ? [
230
- 'typescript',
231
- 'vue'
232
- ] : [
233
- 'typescript'
234
- ],
204
+ technologies: hasVuePlugin ? ['typescript', 'vue'] : ['typescript'],
235
205
  help: {
236
- command: isUsingTsSolutionSetup ? `${pmc.exec} ${typeCheckCommand} --build --help` : `${pmc.exec} ${typeCheckCommand} -p ${tsConfigToUse} --help`,
237
- example: isUsingTsSolutionSetup ? {
238
- args: [
239
- '--force'
240
- ]
241
- } : {
242
- options: {
243
- noEmit: true
244
- }
245
- }
246
- }
247
- }
206
+ command: isUsingTsSolutionSetup
207
+ ? `${pmc.exec} ${typeCheckCommand} --build --help`
208
+ : `${pmc.exec} ${typeCheckCommand} -p ${tsConfigToUse} --help`,
209
+ example: isUsingTsSolutionSetup
210
+ ? { args: ['--force'] }
211
+ : { options: { noEmit: true } },
212
+ },
213
+ },
248
214
  };
249
215
  if (isUsingTsSolutionSetup) {
250
216
  targets[options.typecheckTargetName].dependsOn = [
251
- `^${options.typecheckTargetName}`
217
+ `^${options.typecheckTargetName}`,
252
218
  ];
253
219
  targets[options.typecheckTargetName].syncGenerators = [
254
- '@nx/js:typescript-sync'
220
+ '@nx/js:typescript-sync',
255
221
  ];
256
222
  }
257
223
  }
258
- (0, _util.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
224
+ (0, util_1.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmc);
259
225
  const metadata = {};
260
226
  return {
261
227
  targets,
262
228
  metadata,
263
- projectType: ((_viteBuildConfig_build = viteBuildConfig.build) == null ? void 0 : _viteBuildConfig_build.lib) ? 'library' : 'application'
229
+ projectType: viteBuildConfig.build?.lib ? 'library' : 'application',
264
230
  };
265
231
  }
266
232
  async function buildTarget(buildTargetName, namedInputs, outputs, projectRoot, isUsingTsSolutionSetup) {
267
233
  const buildTarget = {
268
234
  command: `vite build`,
269
- options: {
270
- cwd: (0, _devkit.joinPathFragments)(projectRoot)
271
- },
235
+ options: { cwd: (0, devkit_1.joinPathFragments)(projectRoot) },
272
236
  cache: true,
273
- dependsOn: [
274
- `^${buildTargetName}`
275
- ],
237
+ dependsOn: [`^${buildTargetName}`],
276
238
  inputs: [
277
- ...'production' in namedInputs ? [
278
- 'production',
279
- '^production'
280
- ] : [
281
- 'default',
282
- '^default'
283
- ],
239
+ ...('production' in namedInputs
240
+ ? ['production', '^production']
241
+ : ['default', '^default']),
284
242
  {
285
- externalDependencies: [
286
- 'vite'
287
- ]
288
- }
243
+ externalDependencies: ['vite'],
244
+ },
289
245
  ],
290
246
  outputs,
291
247
  metadata: {
292
- technologies: [
293
- 'vite'
294
- ],
248
+ technologies: ['vite'],
295
249
  description: `Run Vite build`,
296
250
  help: {
297
251
  command: `${pmc.exec} vite build --help`,
298
252
  example: {
299
253
  options: {
300
254
  sourcemap: true,
301
- manifest: 'manifest.json'
302
- }
303
- }
304
- }
305
- }
255
+ manifest: 'manifest.json',
256
+ },
257
+ },
258
+ },
259
+ },
306
260
  };
307
261
  if (isUsingTsSolutionSetup) {
308
- buildTarget.syncGenerators = [
309
- '@nx/js:typescript-sync'
310
- ];
262
+ buildTarget.syncGenerators = ['@nx/js:typescript-sync'];
311
263
  }
312
264
  return buildTarget;
313
265
  }
@@ -316,27 +268,23 @@ function serveTarget(projectRoot, isUsingTsSolutionSetup) {
316
268
  continuous: true,
317
269
  command: `vite`,
318
270
  options: {
319
- cwd: (0, _devkit.joinPathFragments)(projectRoot)
271
+ cwd: (0, devkit_1.joinPathFragments)(projectRoot),
320
272
  },
321
273
  metadata: {
322
- technologies: [
323
- 'vite'
324
- ],
274
+ technologies: ['vite'],
325
275
  description: `Starts Vite dev server`,
326
276
  help: {
327
277
  command: `${pmc.exec} vite --help`,
328
278
  example: {
329
279
  options: {
330
- port: 3000
331
- }
332
- }
333
- }
334
- }
280
+ port: 3000,
281
+ },
282
+ },
283
+ },
284
+ },
335
285
  };
336
286
  if (isUsingTsSolutionSetup) {
337
- targetConfig.syncGenerators = [
338
- '@nx/js:typescript-sync'
339
- ];
287
+ targetConfig.syncGenerators = ['@nx/js:typescript-sync'];
340
288
  }
341
289
  return targetConfig;
342
290
  }
@@ -344,69 +292,53 @@ function previewTarget(projectRoot, buildTargetName) {
344
292
  const targetConfig = {
345
293
  continuous: true,
346
294
  command: `vite preview`,
347
- dependsOn: [
348
- buildTargetName
349
- ],
295
+ dependsOn: [buildTargetName],
350
296
  options: {
351
- cwd: (0, _devkit.joinPathFragments)(projectRoot)
297
+ cwd: (0, devkit_1.joinPathFragments)(projectRoot),
352
298
  },
353
299
  metadata: {
354
- technologies: [
355
- 'vite'
356
- ],
300
+ technologies: ['vite'],
357
301
  description: `Locally preview Vite production build`,
358
302
  help: {
359
303
  command: `${pmc.exec} vite preview --help`,
360
304
  example: {
361
305
  options: {
362
- port: 3000
363
- }
364
- }
365
- }
366
- }
306
+ port: 3000,
307
+ },
308
+ },
309
+ },
310
+ },
367
311
  };
368
312
  return targetConfig;
369
313
  }
370
314
  async function testTarget(namedInputs, outputs, projectRoot) {
371
315
  return {
372
316
  command: `vitest`,
373
- options: {
374
- cwd: (0, _devkit.joinPathFragments)(projectRoot)
375
- },
317
+ options: { cwd: (0, devkit_1.joinPathFragments)(projectRoot) },
376
318
  cache: true,
377
319
  inputs: [
378
- ...'production' in namedInputs ? [
379
- 'default',
380
- '^production'
381
- ] : [
382
- 'default',
383
- '^default'
384
- ],
320
+ ...('production' in namedInputs
321
+ ? ['default', '^production']
322
+ : ['default', '^default']),
385
323
  {
386
- externalDependencies: [
387
- 'vitest'
388
- ]
324
+ externalDependencies: ['vitest'],
389
325
  },
390
- {
391
- env: 'CI'
392
- }
326
+ { env: 'CI' },
393
327
  ],
394
328
  outputs,
395
329
  metadata: {
396
- technologies: [
397
- 'vite'
398
- ],
330
+ technologies: ['vite'],
399
331
  description: `Run Vite tests`,
400
332
  help: {
401
333
  command: `${pmc.exec} vitest --help`,
402
334
  example: {
403
335
  options: {
404
336
  bail: 1,
405
- coverage: true
406
- }
407
- }
408
- }
409
- }
337
+ coverage: true,
338
+ },
339
+ },
340
+ },
341
+ },
410
342
  };
411
343
  }
412
344
  function serveStaticTarget(options, isUsingTsSolutionSetup) {
@@ -415,80 +347,70 @@ function serveStaticTarget(options, isUsingTsSolutionSetup) {
415
347
  executor: '@nx/web:file-server',
416
348
  options: {
417
349
  buildTarget: `${options.buildTargetName}`,
418
- spa: true
419
- }
350
+ spa: true,
351
+ },
420
352
  };
421
353
  if (isUsingTsSolutionSetup) {
422
- targetConfig.syncGenerators = [
423
- '@nx/js:typescript-sync'
424
- ];
354
+ targetConfig.syncGenerators = ['@nx/js:typescript-sync'];
425
355
  }
426
356
  return targetConfig;
427
357
  }
428
358
  function getOutputs(viteBuildConfig, projectRoot, workspaceRoot) {
429
- var _build_rollupOptions, _test_coverage;
430
359
  const { build, test, server } = viteBuildConfig;
431
- const buildOutputPath = normalizeOutputPath(build == null ? void 0 : build.outDir, projectRoot, workspaceRoot, 'dist');
432
- const isBuildable = (build == null ? void 0 : build.lib) || (build == null ? void 0 : (_build_rollupOptions = build.rollupOptions) == null ? void 0 : _build_rollupOptions.input) || (0, _fs.existsSync)((0, _path.join)(workspaceRoot, projectRoot, 'index.html'));
360
+ const buildOutputPath = normalizeOutputPath(build?.outDir, projectRoot, workspaceRoot, 'dist');
361
+ const isBuildable = build?.lib ||
362
+ build?.rollupOptions?.input ||
363
+ (0, fs_1.existsSync)((0, path_1.join)(workspaceRoot, projectRoot, 'index.html'));
433
364
  const hasServeConfig = Boolean(server);
434
- const reportsDirectoryPath = normalizeOutputPath(test == null ? void 0 : (_test_coverage = test.coverage) == null ? void 0 : _test_coverage.reportsDirectory, projectRoot, workspaceRoot, 'coverage');
365
+ const reportsDirectoryPath = normalizeOutputPath(test?.coverage?.reportsDirectory, projectRoot, workspaceRoot, 'coverage');
435
366
  return {
436
- buildOutputs: [
437
- buildOutputPath
438
- ],
439
- testOutputs: [
440
- reportsDirectoryPath
441
- ],
367
+ buildOutputs: [buildOutputPath],
368
+ testOutputs: [reportsDirectoryPath],
442
369
  hasTest: !!test,
443
370
  isBuildable,
444
- hasServeConfig
371
+ hasServeConfig,
445
372
  };
446
373
  }
447
374
  function normalizeOutputPath(outputPath, projectRoot, workspaceRoot, path) {
448
375
  if (!outputPath) {
449
376
  if (projectRoot === '.') {
450
377
  return `{projectRoot}/${path}`;
451
- } else {
378
+ }
379
+ else {
452
380
  return `{workspaceRoot}/${path}/{projectRoot}`;
453
381
  }
454
- } else {
455
- if ((0, _path.isAbsolute)(outputPath)) {
456
- return `{workspaceRoot}/${(0, _path.relative)(workspaceRoot, outputPath)}`;
457
- } else {
382
+ }
383
+ else {
384
+ if ((0, path_1.isAbsolute)(outputPath)) {
385
+ return `{workspaceRoot}/${(0, path_1.relative)(workspaceRoot, outputPath)}`;
386
+ }
387
+ else {
458
388
  if (outputPath.startsWith('..')) {
459
- return (0, _path.join)('{workspaceRoot}', (0, _path.join)(projectRoot, outputPath));
460
- } else {
461
- return (0, _path.join)('{projectRoot}', outputPath);
389
+ return (0, path_1.join)('{workspaceRoot}', (0, path_1.join)(projectRoot, outputPath));
390
+ }
391
+ else {
392
+ return (0, path_1.join)('{projectRoot}', outputPath);
462
393
  }
463
394
  }
464
395
  }
465
396
  }
466
397
  function normalizeOptions(options) {
467
- var _options, _options1, _options2, _options3, _options4, _options5, _options6;
468
- options != null ? options : options = {};
469
- var _buildTargetName;
470
- (_buildTargetName = (_options = options).buildTargetName) != null ? _buildTargetName : _options.buildTargetName = 'build';
471
- var _serveTargetName;
472
- (_serveTargetName = (_options1 = options).serveTargetName) != null ? _serveTargetName : _options1.serveTargetName = 'serve';
473
- var _devTargetName;
474
- (_devTargetName = (_options2 = options).devTargetName) != null ? _devTargetName : _options2.devTargetName = 'dev';
475
- var _previewTargetName;
476
- (_previewTargetName = (_options3 = options).previewTargetName) != null ? _previewTargetName : _options3.previewTargetName = 'preview';
477
- var _testTargetName;
478
- (_testTargetName = (_options4 = options).testTargetName) != null ? _testTargetName : _options4.testTargetName = 'test';
479
- var _serveStaticTargetName;
480
- (_serveStaticTargetName = (_options5 = options).serveStaticTargetName) != null ? _serveStaticTargetName : _options5.serveStaticTargetName = 'serve-static';
481
- var _typecheckTargetName;
482
- (_typecheckTargetName = (_options6 = options).typecheckTargetName) != null ? _typecheckTargetName : _options6.typecheckTargetName = 'typecheck';
398
+ options ??= {};
399
+ options.buildTargetName ??= 'build';
400
+ options.serveTargetName ??= 'serve';
401
+ options.devTargetName ??= 'dev';
402
+ options.previewTargetName ??= 'preview';
403
+ options.testTargetName ??= 'test';
404
+ options.serveStaticTargetName ??= 'serve-static';
405
+ options.typecheckTargetName ??= 'typecheck';
483
406
  return options;
484
407
  }
485
408
  function checkIfConfigFileShouldBeProject(projectRoot, context) {
486
409
  // Do not create a project if package.json and project.json isn't there.
487
- const siblingFiles = (0, _fs.readdirSync)((0, _path.join)(context.workspaceRoot, projectRoot));
488
- if (!siblingFiles.includes('package.json') && !siblingFiles.includes('project.json')) {
410
+ const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
411
+ if (!siblingFiles.includes('package.json') &&
412
+ !siblingFiles.includes('project.json')) {
489
413
  return false;
490
414
  }
491
415
  return true;
492
416
  }
493
-
494
- //# sourceMappingURL=plugin.js.map