nx 19.4.3 → 19.5.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. package/bin/init-local.js +2 -3
  2. package/package.json +30 -26
  3. package/src/adapter/angular-json.js +6 -6
  4. package/src/adapter/decorate-cli.js +1 -2
  5. package/src/adapter/ngcli-adapter.js +8 -8
  6. package/src/adapter/rxjs-for-await.js +5 -5
  7. package/src/command-line/add/add.js +2 -2
  8. package/src/command-line/affected/affected.js +2 -3
  9. package/src/command-line/connect/connect-to-nx-cloud.js +5 -6
  10. package/src/command-line/connect/view-logs.js +1 -2
  11. package/src/command-line/daemon/daemon.js +1 -2
  12. package/src/command-line/exec/exec.js +1 -2
  13. package/src/command-line/format/format.js +1 -2
  14. package/src/command-line/generate/generate.js +4 -5
  15. package/src/command-line/generate/generator-utils.js +2 -3
  16. package/src/command-line/graph/command-object.js +2 -2
  17. package/src/command-line/graph/graph.js +9 -5
  18. package/src/command-line/init/implementation/add-nx-to-monorepo.js +1 -2
  19. package/src/command-line/init/implementation/add-nx-to-nest.js +1 -2
  20. package/src/command-line/init/implementation/add-nx-to-npm-repo.js +1 -2
  21. package/src/command-line/init/implementation/angular/index.js +1 -2
  22. package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -2
  23. package/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -2
  24. package/src/command-line/init/implementation/angular/standalone-workspace.js +1 -2
  25. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +1 -1
  26. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +7 -7
  27. package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.js +1 -2
  28. package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +1 -2
  29. package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.js +1 -2
  30. package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -2
  31. package/src/command-line/init/implementation/react/clean-up-files.js +1 -2
  32. package/src/command-line/init/implementation/react/index.js +1 -2
  33. package/src/command-line/init/implementation/react/read-name-from-package-json.js +1 -2
  34. package/src/command-line/init/implementation/react/rename-js-to-jsx.js +1 -2
  35. package/src/command-line/init/implementation/react/tsconfig-setup.js +1 -2
  36. package/src/command-line/init/implementation/react/write-craco-config.js +1 -2
  37. package/src/command-line/init/implementation/react/write-vite-config.js +1 -2
  38. package/src/command-line/init/implementation/react/write-vite-index-html.js +1 -2
  39. package/src/command-line/init/implementation/utils.js +10 -11
  40. package/src/command-line/init/init-v1.js +1 -2
  41. package/src/command-line/init/init-v2.js +1 -2
  42. package/src/command-line/list/list.js +1 -2
  43. package/src/command-line/migrate/migrate.d.ts +1 -1
  44. package/src/command-line/migrate/migrate.js +5 -5
  45. package/src/command-line/new/new.js +1 -2
  46. package/src/command-line/release/changelog.js +3 -3
  47. package/src/command-line/release/config/config.js +3 -3
  48. package/src/command-line/release/config/filter-release-groups.js +1 -2
  49. package/src/command-line/release/config/version-plans.js +3 -4
  50. package/src/command-line/release/plan.js +2 -2
  51. package/src/command-line/release/publish.js +2 -2
  52. package/src/command-line/release/release.js +2 -2
  53. package/src/command-line/release/utils/batch-projects-by-generator-config.js +1 -2
  54. package/src/command-line/release/utils/exec-command.js +1 -2
  55. package/src/command-line/release/utils/git.js +11 -12
  56. package/src/command-line/release/utils/github.js +5 -6
  57. package/src/command-line/release/utils/launch-editor.js +1 -2
  58. package/src/command-line/release/utils/markdown.js +1 -2
  59. package/src/command-line/release/utils/print-changes.d.ts +0 -1
  60. package/src/command-line/release/utils/print-changes.js +2 -3
  61. package/src/command-line/release/utils/resolve-changelog-renderer.js +1 -2
  62. package/src/command-line/release/utils/resolve-nx-json-error-message.js +1 -2
  63. package/src/command-line/release/utils/resolve-semver-specifier.js +2 -3
  64. package/src/command-line/release/utils/semver.js +4 -5
  65. package/src/command-line/release/utils/shared.js +6 -6
  66. package/src/command-line/release/version.js +2 -2
  67. package/src/command-line/repair/repair.js +1 -2
  68. package/src/command-line/report/report.js +7 -7
  69. package/src/command-line/reset/reset.js +1 -2
  70. package/src/command-line/run/executor-utils.js +2 -3
  71. package/src/command-line/run/run-one.js +1 -2
  72. package/src/command-line/run/run.js +5 -6
  73. package/src/command-line/run-many/run-many.js +2 -3
  74. package/src/command-line/show/project.js +1 -2
  75. package/src/command-line/show/projects.js +1 -2
  76. package/src/command-line/watch/watch.js +8 -2
  77. package/src/command-line/yargs-utils/documentation.js +1 -2
  78. package/src/command-line/yargs-utils/shared-options.js +12 -13
  79. package/src/commands-runner/create-command-graph.js +1 -2
  80. package/src/commands-runner/get-command-projects.js +1 -2
  81. package/src/config/calculate-default-project-name.js +2 -3
  82. package/src/config/configuration.js +2 -2
  83. package/src/config/nx-json.js +2 -3
  84. package/src/config/project-graph.js +3 -3
  85. package/src/config/schema-utils.js +3 -4
  86. package/src/config/to-project-name.js +1 -2
  87. package/src/core/graph/main.js +1 -1
  88. package/src/daemon/cache.js +6 -6
  89. package/src/daemon/client/client.d.ts +1 -2
  90. package/src/daemon/client/client.js +13 -1
  91. package/src/daemon/client/daemon-socket-messenger.d.ts +0 -1
  92. package/src/daemon/client/generate-help-output.js +1 -2
  93. package/src/daemon/is-on-daemon.js +1 -2
  94. package/src/daemon/message-types/get-context-file-data.js +2 -2
  95. package/src/daemon/message-types/get-files-in-directory.js +2 -2
  96. package/src/daemon/message-types/get-nx-workspace-files.js +2 -2
  97. package/src/daemon/message-types/glob.js +2 -2
  98. package/src/daemon/message-types/hash-glob.js +2 -2
  99. package/src/daemon/message-types/task-history.js +3 -3
  100. package/src/daemon/message-types/update-context-files.js +2 -2
  101. package/src/daemon/server/file-watching/changed-projects.js +1 -2
  102. package/src/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -1
  103. package/src/daemon/server/file-watching/file-watcher-sockets.js +4 -4
  104. package/src/daemon/server/handle-context-file-data.js +1 -2
  105. package/src/daemon/server/handle-get-files-in-directory.js +1 -2
  106. package/src/daemon/server/handle-get-task-history.js +1 -2
  107. package/src/daemon/server/handle-glob.js +1 -2
  108. package/src/daemon/server/handle-hash-glob.js +1 -2
  109. package/src/daemon/server/handle-hash-tasks.js +1 -2
  110. package/src/daemon/server/handle-nx-workspace-files.js +1 -2
  111. package/src/daemon/server/handle-outputs-tracking.js +2 -3
  112. package/src/daemon/server/handle-process-in-background.js +1 -2
  113. package/src/daemon/server/handle-request-project-graph.js +1 -2
  114. package/src/daemon/server/handle-request-shutdown.d.ts +0 -1
  115. package/src/daemon/server/handle-request-shutdown.js +1 -2
  116. package/src/daemon/server/handle-write-task-runs-to-history.js +1 -2
  117. package/src/daemon/server/outputs-tracking.js +7 -8
  118. package/src/daemon/server/plugins.js +2 -3
  119. package/src/daemon/server/project-graph-incremental-recomputation.js +3 -3
  120. package/src/daemon/server/server.d.ts +0 -1
  121. package/src/daemon/server/server.js +2 -3
  122. package/src/daemon/server/shutdown-utils.d.ts +0 -1
  123. package/src/daemon/server/shutdown-utils.js +9 -9
  124. package/src/daemon/server/watcher.d.ts +0 -1
  125. package/src/daemon/server/watcher.js +3 -4
  126. package/src/daemon/socket-utils.js +3 -3
  127. package/src/daemon/tmp-dir.js +6 -6
  128. package/src/devkit-exports.d.ts +1 -0
  129. package/src/devkit-exports.js +3 -1
  130. package/src/executors/noop/noop.impl.js +1 -1
  131. package/src/executors/run-commands/run-commands.impl.js +3 -3
  132. package/src/executors/run-script/run-script.impl.js +1 -1
  133. package/src/executors/utils/convert-nx-executor.js +1 -2
  134. package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +1 -2
  135. package/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +1 -1
  136. package/src/generators/testing-utils/create-tree-with-empty-workspace.js +2 -3
  137. package/src/generators/testing-utils/create-tree.js +1 -2
  138. package/src/generators/tree.d.ts +0 -2
  139. package/src/generators/tree.js +3 -3
  140. package/src/generators/utils/glob.js +2 -3
  141. package/src/generators/utils/json.js +3 -4
  142. package/src/generators/utils/nx-json.js +2 -3
  143. package/src/generators/utils/project-configuration.js +7 -7
  144. package/src/hasher/create-task-hasher.js +1 -2
  145. package/src/hasher/file-hasher.js +2 -3
  146. package/src/hasher/hash-task.d.ts +0 -1
  147. package/src/hasher/hash-task.js +2 -3
  148. package/src/hasher/native-task-hasher-impl.d.ts +0 -1
  149. package/src/hasher/node-task-hasher-impl.d.ts +0 -1
  150. package/src/hasher/task-hasher.d.ts +0 -1
  151. package/src/hasher/task-hasher.js +10 -10
  152. package/src/migrations/update-15-0-0/migrate-to-inputs.js +1 -1
  153. package/src/migrations/update-15-0-0/prefix-outputs.js +1 -1
  154. package/src/migrations/update-16-0-0/remove-nrwl-cli.js +1 -1
  155. package/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +1 -1
  156. package/src/migrations/update-16-0-0/update-nx-cloud-runner.js +1 -1
  157. package/src/migrations/update-16-2-0/remove-run-commands-output-path.js +1 -1
  158. package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +1 -1
  159. package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +1 -1
  160. package/src/migrations/update-17-0-0/move-cache-directory.js +1 -1
  161. package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +1 -1
  162. package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +1 -1
  163. package/src/migrations/update-17-2-0/move-default-base.js +1 -1
  164. package/src/migrations/update-17-3-0/nx-release-path.js +2 -3
  165. package/src/migrations/update-17-3-0/update-nxw.js +1 -1
  166. package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +1 -1
  167. package/src/migrations/update-19-2-0/move-workspace-data-directory.js +3 -4
  168. package/src/migrations/update-19-2-4/set-project-name.js +1 -1
  169. package/src/native/assert-supported-platform.js +1 -2
  170. package/src/native/browser.js +1 -0
  171. package/src/native/index.d.ts +178 -138
  172. package/src/native/index.js +16 -0
  173. package/src/native/native-bindings.js +352 -238
  174. package/src/native/native-file-cache-location.js +1 -2
  175. package/src/native/nx.wasi-browser.js +108 -0
  176. package/src/native/nx.wasi.cjs +139 -0
  177. package/src/native/nx.wasm32-wasi.wasm +0 -0
  178. package/src/native/transform-objects.js +1 -2
  179. package/src/native/wasi-worker-browser.mjs +32 -0
  180. package/src/native/wasi-worker.mjs +63 -0
  181. package/src/nx-cloud/debug-logger.js +1 -2
  182. package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -2
  183. package/src/nx-cloud/resolution-helpers.js +1 -2
  184. package/src/nx-cloud/update-manager.js +2 -2
  185. package/src/nx-cloud/utilities/axios.js +1 -2
  186. package/src/nx-cloud/utilities/get-cloud-options.js +1 -2
  187. package/src/nx-cloud/utilities/url-shorten.js +8 -9
  188. package/src/plugins/js/hasher/hasher.js +1 -2
  189. package/src/plugins/js/lock-file/lock-file.js +6 -6
  190. package/src/plugins/js/lock-file/npm-parser.js +3 -4
  191. package/src/plugins/js/lock-file/pnpm-parser.js +3 -4
  192. package/src/plugins/js/lock-file/project-graph-pruning.js +1 -2
  193. package/src/plugins/js/lock-file/utils/package-json.js +2 -3
  194. package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +5 -6
  195. package/src/plugins/js/lock-file/yarn-parser.js +3 -4
  196. package/src/plugins/js/package-json/create-package-json.js +2 -3
  197. package/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +1 -2
  198. package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +1 -2
  199. package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -2
  200. package/src/plugins/js/project-graph/build-dependencies/strip-source-code.js +1 -2
  201. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +2 -2
  202. package/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +1 -2
  203. package/src/plugins/js/utils/config.js +1 -2
  204. package/src/plugins/js/utils/register.d.ts +1 -0
  205. package/src/plugins/js/utils/register.js +7 -8
  206. package/src/plugins/js/utils/resolve-relative-to-dir.js +1 -2
  207. package/src/plugins/js/utils/typescript.js +5 -6
  208. package/src/plugins/js/versions.d.ts +1 -1
  209. package/src/plugins/js/versions.js +1 -1
  210. package/src/plugins/package-json-workspaces/create-nodes.js +5 -5
  211. package/src/plugins/project-json/build-nodes/project-json.js +3 -3
  212. package/src/project-graph/affected/affected-project-graph.js +1 -2
  213. package/src/project-graph/build-project-graph.js +3 -4
  214. package/src/project-graph/error-types.js +11 -11
  215. package/src/project-graph/file-map-utils.js +4 -5
  216. package/src/project-graph/file-utils.d.ts +1 -1
  217. package/src/project-graph/file-utils.js +7 -7
  218. package/src/project-graph/nx-deps-cache.js +8 -8
  219. package/src/project-graph/operators.js +5 -5
  220. package/src/project-graph/plugins/internal-api.js +4 -5
  221. package/src/project-graph/plugins/isolation/index.js +1 -2
  222. package/src/project-graph/plugins/isolation/messaging.d.ts +0 -2
  223. package/src/project-graph/plugins/isolation/messaging.js +4 -5
  224. package/src/project-graph/plugins/isolation/plugin-pool.js +1 -2
  225. package/src/project-graph/plugins/loader.js +7 -7
  226. package/src/project-graph/plugins/utils.js +4 -5
  227. package/src/project-graph/project-graph-builder.js +2 -2
  228. package/src/project-graph/project-graph.js +7 -8
  229. package/src/project-graph/utils/build-all-workspace-files.js +1 -2
  230. package/src/project-graph/utils/find-project-for-path.js +4 -5
  231. package/src/project-graph/utils/implicit-project-dependencies.js +1 -2
  232. package/src/project-graph/utils/normalize-project-nodes.js +2 -3
  233. package/src/project-graph/utils/project-configuration-utils.d.ts +8 -6
  234. package/src/project-graph/utils/project-configuration-utils.js +118 -54
  235. package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -3
  236. package/src/project-graph/utils/retrieve-workspace-files.js +6 -7
  237. package/src/tasks-runner/create-task-graph.js +3 -3
  238. package/src/tasks-runner/forked-process-task-runner.d.ts +0 -1
  239. package/src/tasks-runner/init-tasks-runner.js +1 -2
  240. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +1 -2
  241. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +1 -2
  242. package/src/tasks-runner/life-cycles/formatting-utils.js +2 -3
  243. package/src/tasks-runner/life-cycles/pretty-time.js +1 -2
  244. package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -2
  245. package/src/tasks-runner/pseudo-ipc.d.ts +0 -1
  246. package/src/tasks-runner/pseudo-terminal.d.ts +0 -1
  247. package/src/tasks-runner/pseudo-terminal.js +5 -2
  248. package/src/tasks-runner/run-command.js +4 -5
  249. package/src/tasks-runner/task-env.d.ts +0 -1
  250. package/src/tasks-runner/task-env.js +5 -6
  251. package/src/tasks-runner/task-graph-utils.js +2 -3
  252. package/src/tasks-runner/utils.js +25 -26
  253. package/src/utils/ab-testing.js +2 -2
  254. package/src/utils/all-file-data.js +1 -2
  255. package/src/utils/assert-workspace-validity.js +1 -2
  256. package/src/utils/async-iterator.js +2 -3
  257. package/src/utils/cache-directory.js +2 -2
  258. package/src/utils/child-process.d.ts +0 -1
  259. package/src/utils/child-process.js +3 -3
  260. package/src/utils/chunkify.js +1 -2
  261. package/src/utils/code-frames.js +1 -2
  262. package/src/utils/collapse-expanded-outputs.js +1 -2
  263. package/src/utils/command-line-utils.js +5 -6
  264. package/src/utils/consume-messages-from-socket.js +1 -2
  265. package/src/utils/default-base.js +1 -2
  266. package/src/utils/dotenv.js +1 -2
  267. package/src/utils/exit-codes.d.ts +0 -1
  268. package/src/utils/exit-codes.js +1 -2
  269. package/src/utils/fileutils.d.ts +0 -1
  270. package/src/utils/fileutils.js +9 -10
  271. package/src/utils/find-matching-projects.js +2 -2
  272. package/src/utils/find-workspace-root.js +1 -2
  273. package/src/utils/get-package-name-from-import-path.js +1 -2
  274. package/src/utils/git-utils.js +4 -5
  275. package/src/utils/globs.js +1 -2
  276. package/src/utils/ignore.js +4 -4
  277. package/src/utils/installation-directory.js +2 -3
  278. package/src/utils/is-ci.js +1 -2
  279. package/src/utils/json-diff.js +5 -5
  280. package/src/utils/json.js +3 -3
  281. package/src/utils/logger.js +2 -2
  282. package/src/utils/nx-cloud-utils.js +3 -4
  283. package/src/utils/nx-plugin.deprecated.js +1 -4
  284. package/src/utils/object-sort.js +1 -2
  285. package/src/utils/package-json.js +8 -9
  286. package/src/utils/package-manager.js +13 -14
  287. package/src/utils/params.js +14 -14
  288. package/src/utils/path.js +3 -4
  289. package/src/utils/plugins/community-plugins.js +1 -2
  290. package/src/utils/plugins/core-plugins.js +2 -3
  291. package/src/utils/plugins/installed-plugins.js +3 -4
  292. package/src/utils/plugins/local-plugins.js +2 -3
  293. package/src/utils/plugins/plugin-capabilities.js +2 -3
  294. package/src/utils/plugins/shared.js +1 -2
  295. package/src/utils/print-help.js +1 -2
  296. package/src/utils/project-graph-utils.js +4 -5
  297. package/src/utils/serializable-error.js +1 -2
  298. package/src/utils/serialize-overrides-into-command-line.js +1 -2
  299. package/src/utils/serialize-target.js +1 -2
  300. package/src/utils/split-target.js +2 -3
  301. package/src/utils/strip-indents.js +1 -2
  302. package/src/utils/task-history.js +3 -3
  303. package/src/utils/update-nxw.js +1 -2
  304. package/src/utils/workspace-configuration-check.js +1 -2
  305. package/src/utils/workspace-context.js +10 -11
  306. package/src/utils/workspace-root.js +3 -3
  307. package/src/plugins/target-defaults/symbols.d.ts +0 -17
  308. package/src/plugins/target-defaults/symbols.js +0 -20
  309. package/src/plugins/target-defaults/target-defaults-plugin.d.ts +0 -121
  310. package/src/plugins/target-defaults/target-defaults-plugin.js +0 -176
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.respondWithErrorAndExit = exports.respondToClient = exports.resetInactivityTimeout = exports.handleServerProcessTermination = exports.getOutputWatcherInstance = exports.storeOutputWatcherInstance = exports.getWatcherInstance = exports.storeWatcherInstance = exports.SERVER_INACTIVITY_TIMEOUT_MS = void 0;
3
+ exports.SERVER_INACTIVITY_TIMEOUT_MS = void 0;
4
+ exports.storeWatcherInstance = storeWatcherInstance;
5
+ exports.getWatcherInstance = getWatcherInstance;
6
+ exports.storeOutputWatcherInstance = storeOutputWatcherInstance;
7
+ exports.getOutputWatcherInstance = getOutputWatcherInstance;
8
+ exports.handleServerProcessTermination = handleServerProcessTermination;
9
+ exports.resetInactivityTimeout = resetInactivityTimeout;
10
+ exports.respondToClient = respondToClient;
11
+ exports.respondWithErrorAndExit = respondWithErrorAndExit;
4
12
  const workspace_root_1 = require("../../utils/workspace-root");
5
13
  const logger_1 = require("./logger");
6
14
  const socket_utils_1 = require("../socket-utils");
@@ -12,20 +20,16 @@ let watcherInstance;
12
20
  function storeWatcherInstance(instance) {
13
21
  watcherInstance = instance;
14
22
  }
15
- exports.storeWatcherInstance = storeWatcherInstance;
16
23
  function getWatcherInstance() {
17
24
  return watcherInstance;
18
25
  }
19
- exports.getWatcherInstance = getWatcherInstance;
20
26
  let outputWatcherInstance;
21
27
  function storeOutputWatcherInstance(instance) {
22
28
  outputWatcherInstance = instance;
23
29
  }
24
- exports.storeOutputWatcherInstance = storeOutputWatcherInstance;
25
30
  function getOutputWatcherInstance() {
26
31
  return outputWatcherInstance;
27
32
  }
28
- exports.getOutputWatcherInstance = getOutputWatcherInstance;
29
33
  async function handleServerProcessTermination({ server, reason, }) {
30
34
  try {
31
35
  server.close();
@@ -45,7 +49,6 @@ async function handleServerProcessTermination({ server, reason, }) {
45
49
  process.exit(0);
46
50
  }
47
51
  }
48
- exports.handleServerProcessTermination = handleServerProcessTermination;
49
52
  let serverInactivityTimerId;
50
53
  function resetInactivityTimeout(cb) {
51
54
  if (serverInactivityTimerId) {
@@ -53,7 +56,6 @@ function resetInactivityTimeout(cb) {
53
56
  }
54
57
  serverInactivityTimerId = setTimeout(cb, exports.SERVER_INACTIVITY_TIMEOUT_MS);
55
58
  }
56
- exports.resetInactivityTimeout = resetInactivityTimeout;
57
59
  function respondToClient(socket, response, description) {
58
60
  return new Promise(async (res) => {
59
61
  if (description) {
@@ -68,7 +70,6 @@ function respondToClient(socket, response, description) {
68
70
  });
69
71
  });
70
72
  }
71
- exports.respondToClient = respondToClient;
72
73
  async function respondWithErrorAndExit(socket, description, error) {
73
74
  const normalizedError = error instanceof error_types_1.DaemonProjectGraphError
74
75
  ? error_types_1.ProjectGraphError.fromDaemonProjectGraphError(error)
@@ -79,4 +80,3 @@ async function respondWithErrorAndExit(socket, description, error) {
79
80
  // Respond with the original error
80
81
  await respondToClient(socket, (0, socket_utils_1.serializeResult)(error, null, null), null);
81
82
  }
82
- exports.respondWithErrorAndExit = respondWithErrorAndExit;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Server } from 'net';
3
2
  import type { WatchEvent } from '../../native';
4
3
  export type FileWatcherCallback = (err: Error | string | null, changeEvents: WatchEvent[] | null) => Promise<void>;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertChangeEventsToLogMessage = exports.watchOutputFiles = exports.watchWorkspace = void 0;
3
+ exports.watchWorkspace = watchWorkspace;
4
+ exports.watchOutputFiles = watchOutputFiles;
5
+ exports.convertChangeEventsToLogMessage = convertChangeEventsToLogMessage;
4
6
  const workspace_root_1 = require("../../utils/workspace-root");
5
7
  const path_1 = require("path");
6
8
  const socket_utils_1 = require("../socket-utils");
@@ -40,7 +42,6 @@ async function watchWorkspace(server, cb) {
40
42
  });
41
43
  return watcher;
42
44
  }
43
- exports.watchWorkspace = watchWorkspace;
44
45
  async function watchOutputFiles(cb) {
45
46
  const { Watcher } = await Promise.resolve().then(() => require('../../native'));
46
47
  let watcher = new Watcher(workspace_root_1.workspaceRoot, null, false);
@@ -54,7 +55,6 @@ async function watchOutputFiles(cb) {
54
55
  });
55
56
  return watcher;
56
57
  }
57
- exports.watchOutputFiles = watchOutputFiles;
58
58
  /**
59
59
  * NOTE: An event type of "create" will also apply to the case where the user has restored
60
60
  * an original version of a file after modifying/deleting it by using git, so we adjust
@@ -96,4 +96,3 @@ function convertChangeEventsToLogMessage(changeEvents) {
96
96
  }
97
97
  return `${numCreatedOrRestoredFiles} file(s) created or restored, ${numModifiedFiles} file(s) modified, ${numDeletedFiles} file(s) deleted`;
98
98
  }
99
- exports.convertChangeEventsToLogMessage = convertChangeEventsToLogMessage;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeResult = exports.killSocketOrPath = exports.getPluginOsSocketPath = exports.getForkedProcessOsSocketPath = exports.getFullOsSocketPath = exports.isWindows = void 0;
3
+ exports.getPluginOsSocketPath = exports.getForkedProcessOsSocketPath = exports.getFullOsSocketPath = exports.isWindows = void 0;
4
+ exports.killSocketOrPath = killSocketOrPath;
5
+ exports.serializeResult = serializeResult;
4
6
  const fs_1 = require("fs");
5
7
  const os_1 = require("os");
6
8
  const path_1 = require("path");
@@ -33,10 +35,8 @@ function killSocketOrPath() {
33
35
  }
34
36
  catch { }
35
37
  }
36
- exports.killSocketOrPath = killSocketOrPath;
37
38
  // Prepare a serialized project graph result for sending over IPC from the server to the client
38
39
  function serializeResult(error, serializedProjectGraph, serializedSourceMaps) {
39
40
  // We do not want to repeat work `JSON.stringify`ing an object containing the potentially large project graph so merge as strings
40
41
  return `{ "error": ${JSON.stringify(error ? (0, serializable_error_1.createSerializableError)(error) : error)}, "projectGraph": ${serializedProjectGraph}, "sourceMaps": ${serializedSourceMaps} }`;
41
42
  }
42
- exports.serializeResult = serializeResult;
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.removeSocketDir = exports.getSocketDir = exports.isDaemonDisabled = exports.markDaemonAsDisabled = exports.writeDaemonLogs = exports.getDaemonSocketDir = exports.DAEMON_OUTPUT_LOG_FILE = exports.DAEMON_DIR_FOR_CURRENT_WORKSPACE = void 0;
3
+ exports.getDaemonSocketDir = exports.DAEMON_OUTPUT_LOG_FILE = exports.DAEMON_DIR_FOR_CURRENT_WORKSPACE = void 0;
4
+ exports.writeDaemonLogs = writeDaemonLogs;
5
+ exports.markDaemonAsDisabled = markDaemonAsDisabled;
6
+ exports.isDaemonDisabled = isDaemonDisabled;
7
+ exports.getSocketDir = getSocketDir;
8
+ exports.removeSocketDir = removeSocketDir;
4
9
  /**
5
10
  * Per workspace (to avoid subtle differences and issues), we want to have a deterministic
6
11
  * location within the OS's tmp directory where we write log files for background processes
@@ -24,11 +29,9 @@ function writeDaemonLogs(error) {
24
29
  (0, fs_1.writeFileSync)(file, error);
25
30
  return file;
26
31
  }
27
- exports.writeDaemonLogs = writeDaemonLogs;
28
32
  function markDaemonAsDisabled() {
29
33
  (0, fs_1.writeFileSync)((0, path_1.join)(exports.DAEMON_DIR_FOR_CURRENT_WORKSPACE, 'disabled'), 'true');
30
34
  }
31
- exports.markDaemonAsDisabled = markDaemonAsDisabled;
32
35
  function isDaemonDisabled() {
33
36
  try {
34
37
  (0, fs_1.statSync)((0, path_1.join)(exports.DAEMON_DIR_FOR_CURRENT_WORKSPACE, 'disabled'));
@@ -38,7 +41,6 @@ function isDaemonDisabled() {
38
41
  return false;
39
42
  }
40
43
  }
41
- exports.isDaemonDisabled = isDaemonDisabled;
42
44
  function socketDirName() {
43
45
  const hasher = (0, crypto_1.createHash)('sha256');
44
46
  hasher.update(workspace_root_1.workspaceRoot.toLowerCase());
@@ -59,11 +61,9 @@ function getSocketDir() {
59
61
  return exports.DAEMON_DIR_FOR_CURRENT_WORKSPACE;
60
62
  }
61
63
  }
62
- exports.getSocketDir = getSocketDir;
63
64
  function removeSocketDir() {
64
65
  try {
65
66
  (0, fs_extra_1.rmSync)(getSocketDir(), { recursive: true, force: true });
66
67
  }
67
68
  catch (e) { }
68
69
  }
69
- exports.removeSocketDir = removeSocketDir;
@@ -132,3 +132,4 @@ export { cacheDir } from './utils/cache-directory';
132
132
  * @category Utils
133
133
  */
134
134
  export { createProjectFileMapUsingProjectGraph } from './project-graph/file-map-utils';
135
+ export { isDaemonEnabled } from './daemon/client/client';
@@ -4,7 +4,7 @@
4
4
  * Try hard to not add to this API to reduce the surface area we need to maintain.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.createProjectFileMapUsingProjectGraph = exports.cacheDir = exports.hashArray = exports.defaultTasksRunner = exports.getOutputsForTargetAndConfiguration = exports.readProjectsConfigurationFromProjectGraph = exports.readCachedProjectGraph = exports.createProjectGraphAsync = exports.reverse = exports.appRootPath = exports.workspaceRoot = exports.normalizePath = exports.joinPathFragments = exports.stripIndents = exports.writeJsonFile = exports.readJsonFile = exports.stripJsonComments = exports.serializeJson = exports.parseJson = exports.updateJson = exports.writeJson = exports.readJson = exports.validateDependency = exports.ProjectGraphBuilder = exports.DependencyType = exports.updateNxJson = exports.readNxJson = exports.globAsync = exports.glob = exports.getProjects = exports.updateProjectConfiguration = exports.removeProjectConfiguration = exports.readProjectConfiguration = exports.addProjectConfiguration = exports.runExecutor = exports.isWorkspacesEnabled = exports.getPackageManagerVersion = exports.detectPackageManager = exports.getPackageManagerCommand = exports.output = exports.logger = exports.createNodesFromFiles = exports.AggregateCreateNodesError = exports.workspaceLayout = void 0;
7
+ exports.isDaemonEnabled = exports.createProjectFileMapUsingProjectGraph = exports.cacheDir = exports.hashArray = exports.defaultTasksRunner = exports.getOutputsForTargetAndConfiguration = exports.readProjectsConfigurationFromProjectGraph = exports.readCachedProjectGraph = exports.createProjectGraphAsync = exports.reverse = exports.appRootPath = exports.workspaceRoot = exports.normalizePath = exports.joinPathFragments = exports.stripIndents = exports.writeJsonFile = exports.readJsonFile = exports.stripJsonComments = exports.serializeJson = exports.parseJson = exports.updateJson = exports.writeJson = exports.readJson = exports.validateDependency = exports.ProjectGraphBuilder = exports.DependencyType = exports.updateNxJson = exports.readNxJson = exports.globAsync = exports.glob = exports.getProjects = exports.updateProjectConfiguration = exports.removeProjectConfiguration = exports.readProjectConfiguration = exports.addProjectConfiguration = exports.runExecutor = exports.isWorkspacesEnabled = exports.getPackageManagerVersion = exports.detectPackageManager = exports.getPackageManagerCommand = exports.output = exports.logger = exports.createNodesFromFiles = exports.AggregateCreateNodesError = exports.workspaceLayout = void 0;
8
8
  var configuration_1 = require("./config/configuration");
9
9
  Object.defineProperty(exports, "workspaceLayout", { enumerable: true, get: function () { return configuration_1.workspaceLayout; } });
10
10
  var error_types_1 = require("./project-graph/error-types");
@@ -138,3 +138,5 @@ Object.defineProperty(exports, "cacheDir", { enumerable: true, get: function ()
138
138
  */
139
139
  var file_map_utils_1 = require("./project-graph/file-map-utils");
140
140
  Object.defineProperty(exports, "createProjectFileMapUsingProjectGraph", { enumerable: true, get: function () { return file_map_utils_1.createProjectFileMapUsingProjectGraph; } });
141
+ var client_1 = require("./daemon/client/client");
142
+ Object.defineProperty(exports, "isDaemonEnabled", { enumerable: true, get: function () { return client_1.isDaemonEnabled; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  async function default_1() {
4
5
  return { success: true };
5
6
  }
6
- exports.default = default_1;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.interpolateArgsIntoCommand = exports.LARGE_BUFFER = void 0;
3
+ exports.LARGE_BUFFER = void 0;
4
+ exports.default = default_1;
5
+ exports.interpolateArgsIntoCommand = interpolateArgsIntoCommand;
4
6
  const child_process_1 = require("child_process");
5
7
  const path = require("path");
6
8
  const yargsParser = require("yargs-parser");
@@ -72,7 +74,6 @@ async function default_1(options, context) {
72
74
  throw new Error(`ERROR: Something went wrong in run-commands - ${e.message}`);
73
75
  }
74
76
  }
75
- exports.default = default_1;
76
77
  async function runInParallel(options, context) {
77
78
  const procs = options.commands.map((c) => createProcess(null, c, options.readyWhenStatus, options.color, calculateCwd(options.cwd, context), options.env ?? {}, true, options.usePty, options.streamOutput, options.tty, options.envFile).then((result) => ({
78
79
  result,
@@ -345,7 +346,6 @@ function interpolateArgsIntoCommand(command, opts, forwardAllArgs) {
345
346
  return command;
346
347
  }
347
348
  }
348
- exports.interpolateArgsIntoCommand = interpolateArgsIntoCommand;
349
349
  function parseArgs(unparsedCommandArgs, unknownOptions, args) {
350
350
  if (!args) {
351
351
  return { ...unknownOptions, ...unparsedCommandArgs };
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const path = require("path");
4
5
  const package_manager_1 = require("../../utils/package-manager");
5
6
  const child_process_1 = require("child_process");
@@ -29,7 +30,6 @@ async function default_1(options, context) {
29
30
  return { success: false };
30
31
  }
31
32
  }
32
- exports.default = default_1;
33
33
  function nodeProcess(command, cwd, env) {
34
34
  (0, child_process_1.execSync)(command, {
35
35
  stdio: ['inherit', 'inherit', 'inherit'],
@@ -3,7 +3,7 @@
3
3
  * This is a copy of the @nx/devkit utility but this should not be used outside of the nx package
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.convertNxExecutor = void 0;
6
+ exports.convertNxExecutor = convertNxExecutor;
7
7
  const nx_json_1 = require("../../config/nx-json");
8
8
  const retrieve_workspace_files_1 = require("../../project-graph/utils/retrieve-workspace-files");
9
9
  const project_configuration_utils_1 = require("../../project-graph/utils/project-configuration-utils");
@@ -43,7 +43,6 @@ function convertNxExecutor(executor) {
43
43
  };
44
44
  return require('@angular-devkit/architect').createBuilder(builderFunction);
45
45
  }
46
- exports.convertNxExecutor = convertNxExecutor;
47
46
  function toObservable(promiseOrAsyncIterator) {
48
47
  return new (require('rxjs').Observable)((subscriber) => {
49
48
  promiseOrAsyncIterator
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatChangedFilesWithPrettierIfAvailable = void 0;
3
+ exports.formatChangedFilesWithPrettierIfAvailable = formatChangedFilesWithPrettierIfAvailable;
4
4
  const path = require("path");
5
5
  /**
6
6
  * Formats all the created or updated files using Prettier
@@ -46,4 +46,3 @@ async function formatChangedFilesWithPrettierIfAvailable(tree, options) {
46
46
  }
47
47
  }));
48
48
  }
49
- exports.formatChangedFilesWithPrettierIfAvailable = formatChangedFilesWithPrettierIfAvailable;
@@ -3,7 +3,7 @@ import type { Tree } from '../tree';
3
3
  * Creates a host for testing.
4
4
  */
5
5
  export declare function createTreeWithEmptyWorkspace(opts?: {
6
- layout?: 'apps-libs';
6
+ layout?: "apps-libs";
7
7
  }): Tree;
8
8
  /**
9
9
  * @deprecated use createTreeWithEmptyWorkspace instead
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTreeWithEmptyV1Workspace = exports.createTreeWithEmptyWorkspace = void 0;
3
+ exports.createTreeWithEmptyWorkspace = createTreeWithEmptyWorkspace;
4
+ exports.createTreeWithEmptyV1Workspace = createTreeWithEmptyV1Workspace;
4
5
  const tree_1 = require("../tree");
5
6
  const workspace_root_1 = require("../../utils/workspace-root");
6
7
  /**
@@ -16,14 +17,12 @@ function createTreeWithEmptyWorkspace(opts = {}) {
16
17
  process.env.INIT_CWD = workspace_root_1.workspaceRoot;
17
18
  return addCommonFiles(tree, opts.layout === 'apps-libs');
18
19
  }
19
- exports.createTreeWithEmptyWorkspace = createTreeWithEmptyWorkspace;
20
20
  /**
21
21
  * @deprecated use createTreeWithEmptyWorkspace instead
22
22
  */
23
23
  function createTreeWithEmptyV1Workspace() {
24
24
  throw new Error('Use createTreeWithEmptyWorkspace instead of createTreeWithEmptyV1Workspace');
25
25
  }
26
- exports.createTreeWithEmptyV1Workspace = createTreeWithEmptyV1Workspace;
27
26
  function addCommonFiles(tree, addAppsAndLibsFolders) {
28
27
  tree.write('./.prettierrc', JSON.stringify({ singleQuote: true }));
29
28
  tree.write('/package.json', JSON.stringify({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTree = void 0;
3
+ exports.createTree = createTree;
4
4
  const tree_1 = require("../tree");
5
5
  /**
6
6
  * Creates a host for testing.
@@ -8,4 +8,3 @@ const tree_1 = require("../tree");
8
8
  function createTree() {
9
9
  return new tree_1.FsTree('/virtual', false);
10
10
  }
11
- exports.createTree = createTree;
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { Mode } from 'fs';
4
2
  /**
5
3
  * Options to set when writing a file in the Virtual file system tree.
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.printChanges = exports.flushChanges = exports.FsTree = void 0;
3
+ exports.FsTree = void 0;
4
+ exports.flushChanges = flushChanges;
5
+ exports.printChanges = printChanges;
4
6
  const fs_extra_1 = require("fs-extra");
5
7
  const logger_1 = require("../utils/logger");
6
8
  const output_1 = require("../utils/output");
@@ -292,7 +294,6 @@ function flushChanges(root, fileChanges) {
292
294
  }
293
295
  });
294
296
  }
295
- exports.flushChanges = flushChanges;
296
297
  function printChanges(fileChanges, indent = '') {
297
298
  fileChanges.forEach((f) => {
298
299
  if (f.type === 'CREATE') {
@@ -306,4 +307,3 @@ function printChanges(fileChanges, indent = '') {
306
307
  }
307
308
  });
308
309
  }
309
- exports.printChanges = printChanges;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.globAsync = exports.glob = void 0;
3
+ exports.glob = glob;
4
+ exports.globAsync = globAsync;
4
5
  const minimatch_1 = require("minimatch");
5
6
  const globs_1 = require("../../utils/globs");
6
7
  const workspace_context_1 = require("../../utils/workspace-context");
@@ -17,7 +18,6 @@ const workspace_context_1 = require("../../utils/workspace-context");
17
18
  function glob(tree, patterns) {
18
19
  return combineGlobResultsWithTree(tree, patterns, (0, workspace_context_1.globWithWorkspaceContextSync)(tree.root, patterns));
19
20
  }
20
- exports.glob = glob;
21
21
  /**
22
22
  * Performs a tree-aware glob search on the files in a workspace. Able to find newly
23
23
  * created files and hides deleted files before the updates are committed to disk.
@@ -30,7 +30,6 @@ exports.glob = glob;
30
30
  async function globAsync(tree, patterns) {
31
31
  return combineGlobResultsWithTree(tree, patterns, await (0, workspace_context_1.globWithWorkspaceContext)(tree.root, patterns));
32
32
  }
33
- exports.globAsync = globAsync;
34
33
  function combineGlobResultsWithTree(tree, patterns, results) {
35
34
  const matches = new Set(results);
36
35
  const combinedGlob = (0, globs_1.combineGlobPatterns)(patterns);
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateJson = exports.writeJson = exports.readJson = void 0;
3
+ exports.readJson = readJson;
4
+ exports.writeJson = writeJson;
5
+ exports.updateJson = updateJson;
4
6
  const json_1 = require("../../utils/json");
5
7
  /**
6
8
  * Reads a json file, removes all comments and parses JSON.
@@ -20,7 +22,6 @@ function readJson(tree, path, options) {
20
22
  throw new Error(`Cannot parse ${path}: ${e.message}`);
21
23
  }
22
24
  }
23
- exports.readJson = readJson;
24
25
  /**
25
26
  * Writes a JSON value to the file system tree
26
27
 
@@ -33,7 +34,6 @@ function writeJson(tree, path, value, options) {
33
34
  const serialized = (0, json_1.serializeJson)(value, options);
34
35
  tree.write(path, `${serialized}\n`);
35
36
  }
36
- exports.writeJson = writeJson;
37
37
  /**
38
38
  * Updates a JSON value to the file system tree
39
39
  *
@@ -46,4 +46,3 @@ function updateJson(tree, path, updater, options) {
46
46
  const updatedValue = updater(readJson(tree, path, options));
47
47
  writeJson(tree, path, updatedValue, options);
48
48
  }
49
- exports.updateJson = updateJson;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateNxJson = exports.readNxJson = void 0;
3
+ exports.readNxJson = readNxJson;
4
+ exports.updateNxJson = updateNxJson;
4
5
  const path_1 = require("path");
5
6
  const json_1 = require("./json");
6
7
  const nx_json_1 = require("../../config/nx-json");
@@ -22,7 +23,6 @@ function readNxJson(tree) {
22
23
  return (0, nx_json_1.readNxJson)();
23
24
  }
24
25
  }
25
- exports.readNxJson = readNxJson;
26
26
  /**
27
27
  * Update nx.json
28
28
  */
@@ -46,7 +46,6 @@ function updateNxJson(tree, nxJson) {
46
46
  });
47
47
  }
48
48
  }
49
- exports.updateNxJson = updateNxJson;
50
49
  function readNxJsonExtends(tree, extendsPath) {
51
50
  try {
52
51
  return (0, json_1.readJson)(tree, (0, path_1.relative)(tree.root, require.resolve(extendsPath, {
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRelativeProjectJsonSchemaPath = exports.getProjects = exports.readProjectConfiguration = exports.removeProjectConfiguration = exports.updateProjectConfiguration = exports.addProjectConfiguration = exports.updateNxJson = exports.readNxJson = void 0;
3
+ exports.updateNxJson = exports.readNxJson = void 0;
4
+ exports.addProjectConfiguration = addProjectConfiguration;
5
+ exports.updateProjectConfiguration = updateProjectConfiguration;
6
+ exports.removeProjectConfiguration = removeProjectConfiguration;
7
+ exports.readProjectConfiguration = readProjectConfiguration;
8
+ exports.getProjects = getProjects;
9
+ exports.getRelativeProjectJsonSchemaPath = getRelativeProjectJsonSchemaPath;
4
10
  const minimatch_1 = require("minimatch");
5
11
  const path_1 = require("path");
6
12
  const package_json_workspaces_1 = require("../../plugins/package-json-workspaces");
@@ -42,7 +48,6 @@ function addProjectConfiguration(tree, projectName, projectConfiguration, standa
42
48
  root: undefined,
43
49
  });
44
50
  }
45
- exports.addProjectConfiguration = addProjectConfiguration;
46
51
  /**
47
52
  * Updates the configuration of an existing project.
48
53
  *
@@ -63,7 +68,6 @@ function updateProjectConfiguration(tree, projectName, projectConfiguration) {
63
68
  root: undefined,
64
69
  });
65
70
  }
66
- exports.updateProjectConfiguration = updateProjectConfiguration;
67
71
  /**
68
72
  * Removes the configuration of an existing project.
69
73
  *
@@ -80,7 +84,6 @@ function removeProjectConfiguration(tree, projectName) {
80
84
  tree.delete(projectConfigFile);
81
85
  }
82
86
  }
83
- exports.removeProjectConfiguration = removeProjectConfiguration;
84
87
  /**
85
88
  * Reads a project configuration.
86
89
  *
@@ -101,7 +104,6 @@ function readProjectConfiguration(tree, projectName) {
101
104
  }
102
105
  return allProjects[projectName];
103
106
  }
104
- exports.readProjectConfiguration = readProjectConfiguration;
105
107
  /**
106
108
  * Get a map of all projects in a workspace.
107
109
  *
@@ -118,11 +120,9 @@ function getProjects(tree) {
118
120
  return [projectName, allProjects[projectName]];
119
121
  }));
120
122
  }
121
- exports.getProjects = getProjects;
122
123
  function getRelativeProjectJsonSchemaPath(tree, project) {
123
124
  return (0, path_2.normalizePath)((0, path_1.relative)((0, path_1.join)(tree.root, project.root), (0, path_1.join)(tree.root, 'node_modules/nx/schemas/project-schema.json')));
124
125
  }
125
- exports.getRelativeProjectJsonSchemaPath = getRelativeProjectJsonSchemaPath;
126
126
  function readAndCombineAllProjectConfigurations(tree) {
127
127
  /**
128
128
  * We can't update projects that come from plugins anyways, so we are going
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTaskHasher = void 0;
3
+ exports.createTaskHasher = createTaskHasher;
4
4
  const client_1 = require("../daemon/client/client");
5
5
  const build_project_graph_1 = require("../project-graph/build-project-graph");
6
6
  const task_hasher_1 = require("./task-hasher");
@@ -13,4 +13,3 @@ function createTaskHasher(projectGraph, nxJson, runnerOptions) {
13
13
  return new task_hasher_1.InProcessTaskHasher(fileMap?.projectFileMap, allWorkspaceFiles, projectGraph, nxJson, rustReferences, runnerOptions);
14
14
  }
15
15
  }
16
- exports.createTaskHasher = createTaskHasher;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hashObject = exports.hashArray = void 0;
3
+ exports.hashArray = hashArray;
4
+ exports.hashObject = hashObject;
4
5
  function hashArray(content) {
5
6
  // Import as needed. There is also an issue running unit tests in Nx repo if this is a top-level import.
6
7
  const { hashArray } = require('../native');
7
8
  return hashArray(content);
8
9
  }
9
- exports.hashArray = hashArray;
10
10
  function hashObject(obj) {
11
11
  const { hashArray } = require('../native');
12
12
  const parts = [];
@@ -16,4 +16,3 @@ function hashObject(obj) {
16
16
  }
17
17
  return hashArray(parts);
18
18
  }
19
- exports.hashObject = hashObject;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Task, TaskGraph } from '../config/task-graph';
3
2
  import { TaskHasher } from './task-hasher';
4
3
  import { ProjectGraph } from '../config/project-graph';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hashTask = exports.hashTasksThatDoNotDependOnOutputsOfOtherTasks = void 0;
3
+ exports.hashTasksThatDoNotDependOnOutputsOfOtherTasks = hashTasksThatDoNotDependOnOutputsOfOtherTasks;
4
+ exports.hashTask = hashTask;
4
5
  const utils_1 = require("../tasks-runner/utils");
5
6
  const project_graph_1 = require("../project-graph/project-graph");
6
7
  const task_hasher_1 = require("./task-hasher");
@@ -30,7 +31,6 @@ async function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher, projectGrap
30
31
  performance.mark('hashMultipleTasks:end');
31
32
  performance.measure('hashMultipleTasks', 'hashMultipleTasks:start', 'hashMultipleTasks:end');
32
33
  }
33
- exports.hashTasksThatDoNotDependOnOutputsOfOtherTasks = hashTasksThatDoNotDependOnOutputsOfOtherTasks;
34
34
  async function hashTask(hasher, projectGraph, taskGraph, task, env) {
35
35
  performance.mark('hashSingleTask:start');
36
36
  const customHasher = (0, utils_1.getCustomHasher)(task, projectGraph);
@@ -51,4 +51,3 @@ async function hashTask(hasher, projectGraph, taskGraph, task, env) {
51
51
  performance.mark('hashSingleTask:end');
52
52
  performance.measure('hashSingleTask', 'hashSingleTask:start', 'hashSingleTask:end');
53
53
  }
54
- exports.hashTask = hashTask;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { NxJsonConfiguration } from '../config/nx-json';
3
2
  import { ProjectGraph } from '../config/project-graph';
4
3
  import { Task, TaskGraph } from '../config/task-graph';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { NxJsonConfiguration } from '../config/nx-json';
3
2
  import { FileData, ProjectFileMap, ProjectGraph } from '../config/project-graph';
4
3
  import { Task, TaskGraph } from '../config/task-graph';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { FileData, ProjectFileMap, ProjectGraph, ProjectGraphProjectNode } from '../config/project-graph';
3
2
  import { NxJsonConfiguration } from '../config/nx-json';
4
3
  import { Task, TaskGraph } from '../config/task-graph';
@@ -1,6 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.filterUsingGlobPatterns = exports.expandNamedInput = exports.expandSingleProjectInputs = exports.isDepsOutput = exports.isSelfInput = exports.getInputs = exports.extractPatternsFromFileSets = exports.getTargetInputs = exports.getNamedInputs = exports.InProcessTaskHasher = exports.DaemonBasedTaskHasher = void 0;
3
+ exports.InProcessTaskHasher = exports.DaemonBasedTaskHasher = void 0;
4
+ exports.getNamedInputs = getNamedInputs;
5
+ exports.getTargetInputs = getTargetInputs;
6
+ exports.extractPatternsFromFileSets = extractPatternsFromFileSets;
7
+ exports.getInputs = getInputs;
8
+ exports.isSelfInput = isSelfInput;
9
+ exports.isDepsOutput = isDepsOutput;
10
+ exports.expandSingleProjectInputs = expandSingleProjectInputs;
11
+ exports.expandNamedInput = expandNamedInput;
12
+ exports.filterUsingGlobPatterns = filterUsingGlobPatterns;
4
13
  const file_hasher_1 = require("./file-hasher");
5
14
  const node_task_hasher_impl_1 = require("./node-task-hasher-impl");
6
15
  const minimatch_1 = require("minimatch");
@@ -106,7 +115,6 @@ function getNamedInputs(nxJson, project) {
106
115
  ...project.data.namedInputs,
107
116
  };
108
117
  }
109
- exports.getNamedInputs = getNamedInputs;
110
118
  function getTargetInputs(nxJson, projectNode, target) {
111
119
  const namedInputs = getNamedInputs(nxJson, projectNode);
112
120
  const targetData = projectNode.data.targets[target];
@@ -116,13 +124,11 @@ function getTargetInputs(nxJson, projectNode, target) {
116
124
  const dependencyInputs = extractPatternsFromFileSets(inputs.depsInputs.map((s) => expandNamedInput(s.input, namedInputs)).flat());
117
125
  return { selfInputs, dependencyInputs };
118
126
  }
119
- exports.getTargetInputs = getTargetInputs;
120
127
  function extractPatternsFromFileSets(inputs) {
121
128
  return inputs
122
129
  .filter((c) => !!c['fileset'])
123
130
  .map((c) => c['fileset']);
124
131
  }
125
- exports.extractPatternsFromFileSets = extractPatternsFromFileSets;
126
132
  function getInputs(task, projectGraph, nxJson) {
127
133
  const projectNode = projectGraph.nodes[task.target.project];
128
134
  const namedInputs = getNamedInputs(nxJson, projectNode);
@@ -131,7 +137,6 @@ function getInputs(task, projectGraph, nxJson) {
131
137
  const { selfInputs, depsInputs, depsOutputs, projectInputs } = splitInputsIntoSelfAndDependencies(targetData.inputs || targetDefaults?.inputs || DEFAULT_INPUTS, namedInputs);
132
138
  return { selfInputs, depsInputs, depsOutputs, projectInputs };
133
139
  }
134
- exports.getInputs = getInputs;
135
140
  function splitInputsIntoSelfAndDependencies(inputs, namedInputs) {
136
141
  const depsInputs = [];
137
142
  const projectInputs = [];
@@ -181,11 +186,9 @@ function splitInputsIntoSelfAndDependencies(inputs, namedInputs) {
181
186
  function isSelfInput(input) {
182
187
  return !('dependentTasksOutputFiles' in input);
183
188
  }
184
- exports.isSelfInput = isSelfInput;
185
189
  function isDepsOutput(input) {
186
190
  return 'dependentTasksOutputFiles' in input;
187
191
  }
188
- exports.isDepsOutput = isDepsOutput;
189
192
  function expandSingleProjectInputs(inputs, namedInputs) {
190
193
  const expanded = [];
191
194
  for (const d of inputs) {
@@ -217,14 +220,12 @@ function expandSingleProjectInputs(inputs, namedInputs) {
217
220
  }
218
221
  return expanded;
219
222
  }
220
- exports.expandSingleProjectInputs = expandSingleProjectInputs;
221
223
  function expandNamedInput(input, namedInputs) {
222
224
  namedInputs ||= {};
223
225
  if (!namedInputs[input])
224
226
  throw new Error(`Input '${input}' is not defined`);
225
227
  return expandSingleProjectInputs(namedInputs[input], namedInputs);
226
228
  }
227
- exports.expandNamedInput = expandNamedInput;
228
229
  function filterUsingGlobPatterns(root, files, patterns) {
229
230
  const filesetWithExpandedProjectRoot = patterns
230
231
  .map((f) => f.replace('{projectRoot}', root))
@@ -263,4 +264,3 @@ function filterUsingGlobPatterns(root, files, patterns) {
263
264
  return negative.every((pattern) => (0, minimatch_1.minimatch)(f.file, pattern));
264
265
  });
265
266
  }
266
- exports.filterUsingGlobPatterns = filterUsingGlobPatterns;