nx 22.3.0-beta.1 → 22.3.0-beta.3

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 (74) hide show
  1. package/executors.json +16 -16
  2. package/generators.json +13 -13
  3. package/migrations.json +138 -138
  4. package/package.json +12 -15
  5. package/presets/npm.json +4 -4
  6. package/schemas/nx-schema.json +1291 -1286
  7. package/schemas/project-schema.json +359 -359
  8. package/schemas/workspace-schema.json +165 -165
  9. package/src/adapter/ngcli-adapter.d.ts.map +1 -1
  10. package/src/ai/set-up-ai-agents/schema.json +31 -31
  11. package/src/command-line/format/format.d.ts.map +1 -1
  12. package/src/command-line/format/format.js +5 -5
  13. package/src/command-line/graph/graph.d.ts.map +1 -1
  14. package/src/command-line/graph/graph.js +14 -1
  15. package/src/command-line/migrate/migrate.js +1 -1
  16. package/src/command-line/release/changelog.d.ts.map +1 -1
  17. package/src/command-line/release/changelog.js +1 -1
  18. package/src/command-line/release/config/config.js +2 -2
  19. package/src/command-line/release/release.d.ts.map +1 -1
  20. package/src/command-line/release/utils/remote-release-clients/github.d.ts.map +1 -1
  21. package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
  22. package/src/command-line/release/version/resolve-current-version.d.ts.map +1 -1
  23. package/src/command-line/release/version.js +1 -1
  24. package/src/command-line/run/executor-utils.js +1 -1
  25. package/src/command-line/show/projects.d.ts.map +1 -1
  26. package/src/config/nx-json.d.ts +5 -0
  27. package/src/config/nx-json.d.ts.map +1 -1
  28. package/src/config/schema-utils.js +1 -1
  29. package/src/core/graph/index.html +1 -1
  30. package/src/core/graph/main.js +1 -1
  31. package/src/daemon/server/file-watching/file-change-events.d.ts +8 -0
  32. package/src/daemon/server/file-watching/file-change-events.d.ts.map +1 -0
  33. package/src/daemon/server/file-watching/file-change-events.js +19 -0
  34. package/src/daemon/server/handle-process-in-background.d.ts.map +1 -1
  35. package/src/daemon/server/project-graph-incremental-recomputation.d.ts.map +1 -1
  36. package/src/daemon/server/project-graph-incremental-recomputation.js +7 -0
  37. package/src/daemon/server/server.d.ts.map +1 -1
  38. package/src/daemon/server/server.js +3 -0
  39. package/src/daemon/server/sync-generators.d.ts +1 -0
  40. package/src/daemon/server/sync-generators.d.ts.map +1 -1
  41. package/src/daemon/server/sync-generators.js +12 -1
  42. package/src/executors/noop/schema.json +8 -8
  43. package/src/executors/run-commands/schema.json +187 -187
  44. package/src/executors/run-script/schema.json +25 -25
  45. package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts.map +1 -1
  46. package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +1 -3
  47. package/src/generators/utils/project-configuration.js +2 -1
  48. package/src/native/index.d.ts +1 -0
  49. package/src/native/nx.wasm32-wasi.wasm +0 -0
  50. package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
  51. package/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts.map +1 -1
  52. package/src/nx-cloud/utilities/axios.d.ts.map +1 -1
  53. package/src/nx-cloud/utilities/client.d.ts.map +1 -1
  54. package/src/nx-cloud/utilities/url-shorten.d.ts.map +1 -1
  55. package/src/plugins/js/lock-file/bun-parser.d.ts.map +1 -1
  56. package/src/plugins/js/lock-file/pnpm-parser.d.ts.map +1 -1
  57. package/src/plugins/js/lock-file/pnpm-parser.js +88 -23
  58. package/src/plugins/js/package-json/create-package-json.js +1 -1
  59. package/src/plugins/js/project-graph/affected/npm-packages.d.ts.map +1 -1
  60. package/src/plugins/js/project-graph/affected/npm-packages.js +25 -0
  61. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts.map +1 -1
  62. package/src/plugins/js/utils/register.d.ts.map +1 -1
  63. package/src/plugins/package-json/create-nodes.js +1 -1
  64. package/src/project-graph/error-types.d.ts.map +1 -1
  65. package/src/project-graph/project-graph.d.ts.map +1 -1
  66. package/src/tasks-runner/init-tasks-runner.d.ts.map +1 -1
  67. package/src/tasks-runner/run-command.d.ts.map +1 -1
  68. package/src/tasks-runner/run-command.js +2 -1
  69. package/src/tasks-runner/task-graph-utils.d.ts.map +1 -1
  70. package/src/tasks-runner/task-orchestrator.d.ts.map +1 -1
  71. package/src/tasks-runner/task-orchestrator.js +5 -0
  72. package/src/tasks-runner/utils.d.ts.map +1 -1
  73. package/src/utils/assert-workspace-validity.d.ts.map +1 -1
  74. package/src/utils/sync-generators.d.ts.map +1 -1
@@ -0,0 +1,8 @@
1
+ export interface FileChangeEvent {
2
+ createdFiles: string[];
3
+ updatedFiles: string[];
4
+ deletedFiles: string[];
5
+ }
6
+ export declare function registerFileChangeListener(listener: (event: FileChangeEvent) => void): void;
7
+ export declare function notifyFileChangeListeners(event: FileChangeEvent): void;
8
+ //# sourceMappingURL=file-change-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-change-events.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/daemon/server/file-watching/file-change-events.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAID,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,GACzC,IAAI,CAEN;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAQtE"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerFileChangeListener = registerFileChangeListener;
4
+ exports.notifyFileChangeListeners = notifyFileChangeListeners;
5
+ const logger_1 = require("../logger");
6
+ const fileChangeListeners = new Set();
7
+ function registerFileChangeListener(listener) {
8
+ fileChangeListeners.add(listener);
9
+ }
10
+ function notifyFileChangeListeners(event) {
11
+ for (const listener of fileChangeListeners) {
12
+ try {
13
+ listener(event);
14
+ }
15
+ catch (error) {
16
+ logger_1.serverLogger.log('Error notifying file change listener:', error);
17
+ }
18
+ }
19
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"handle-process-in-background.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/handle-process-in-background.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,wBAAsB,yBAAyB,CAAC,OAAO,EAAE;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,GAAG,CAAC;CACX,GAAG,OAAO,CAAC,aAAa,CAAC,CAyBzB"}
1
+ {"version":3,"file":"handle-process-in-background.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/handle-process-in-background.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,wBAAsB,yBAAyB,CAAC,OAAO,EAAE;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,GAAG,CAAC;CACX,GAAG,OAAO,CAAC,aAAa,CAAC,CA2BzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"project-graph-incremental-recomputation.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/project-graph-incremental-recomputation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,YAAY,EAEb,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,YAAY,EAIb,MAAM,mCAAmC,CAAC;AAc3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAEL,uBAAuB,EACxB,MAAM,uDAAuD,CAAC;AAS/D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,mBAAmB,EAAE,YAAY,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,iBAAiB,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACrC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3C,cAAc,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAClD;AAGD,eAAO,IAAI,gBAAgB,EACvB;IACE,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC9B,cAAc,EAAE,yBAAyB,CAAC;CAC3C,GACD,SAAS,CAAC;AACd,eAAO,IAAI,0BAA0B,EAAE,YAAY,GAAG,SAAS,CAAC;AAChE,eAAO,IAAI,mBAAmB,EAAE,YAAY,GAAG,SAAS,CAAC;AAYzD,wBAAsB,sCAAsC,IAAI,OAAO,CAAC,sBAAsB,CAAC,CA+E9F;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,MAAM,EAAE,QAuCvB;AAED,wBAAgB,yCAAyC,CACvD,QAAQ,EAAE,CACR,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,uBAAuB,KAChC,IAAI,QAGV"}
1
+ {"version":3,"file":"project-graph-incremental-recomputation.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/project-graph-incremental-recomputation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,YAAY,EAEb,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,YAAY,EAIb,MAAM,mCAAmC,CAAC;AAe3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAEL,uBAAuB,EACxB,MAAM,uDAAuD,CAAC;AAS/D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,mBAAmB,EAAE,YAAY,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,iBAAiB,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACrC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3C,cAAc,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAClD;AAGD,eAAO,IAAI,gBAAgB,EACvB;IACE,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC9B,cAAc,EAAE,yBAAyB,CAAC;CAC3C,GACD,SAAS,CAAC;AACd,eAAO,IAAI,0BAA0B,EAAE,YAAY,GAAG,SAAS,CAAC;AAChE,eAAO,IAAI,mBAAmB,EAAE,YAAY,GAAG,SAAS,CAAC;AAYzD,wBAAsB,sCAAsC,IAAI,OAAO,CAAC,sBAAsB,CAAC,CA+E9F;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,MAAM,EAAE,EACtB,YAAY,EAAE,MAAM,EAAE,QAgDvB;AAED,wBAAgB,yCAAyC,CACvD,QAAQ,EAAE,CACR,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,uBAAuB,KAChC,IAAI,QAGV"}
@@ -15,6 +15,7 @@ const fileutils_1 = require("../../utils/fileutils");
15
15
  const workspace_context_1 = require("../../utils/workspace-context");
16
16
  const workspace_root_1 = require("../../utils/workspace-root");
17
17
  const file_watcher_sockets_1 = require("./file-watching/file-watcher-sockets");
18
+ const file_change_events_1 = require("./file-watching/file-change-events");
18
19
  const project_graph_listener_sockets_1 = require("./project-graph-listener-sockets");
19
20
  const logger_1 = require("./logger");
20
21
  const error_types_1 = require("../../project-graph/error-types");
@@ -98,6 +99,12 @@ function addUpdatedAndDeletedFiles(createdFiles, updatedFiles, deletedFiles) {
98
99
  collectedUpdatedFiles.delete(f);
99
100
  collectedDeletedFiles.add(f);
100
101
  }
102
+ // Notify file change listeners immediately when files change
103
+ if (createdFiles.length > 0 ||
104
+ updatedFiles.length > 0 ||
105
+ deletedFiles.length > 0) {
106
+ (0, file_change_events_1.notifyFileChangeListeners)({ createdFiles, updatedFiles, deletedFiles });
107
+ }
101
108
  if (updatedFiles.length > 0 || deletedFiles.length > 0) {
102
109
  (0, file_watcher_sockets_1.notifyFileWatcherSockets)(null, updatedFiles, deletedFiles);
103
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AA+JnD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACtC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CAAa,CAAC;AA8RlD,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,EAClC,IAAI,EAAE,MAAM,GAAG,IAAI,iBA6BpB;AAoLD,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAyEnD"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAmKnD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACtC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CAAa,CAAC;AA8RlD,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,EAClC,IAAI,EAAE,MAAM,GAAG,IAAI,iBA6BpB;AAoLD,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CA2EnD"}
@@ -45,6 +45,7 @@ const handle_force_shutdown_1 = require("./handle-force-shutdown");
45
45
  const get_sync_generator_changes_1 = require("../message-types/get-sync-generator-changes");
46
46
  const handle_get_sync_generator_changes_1 = require("./handle-get-sync-generator-changes");
47
47
  const sync_generators_1 = require("./sync-generators");
48
+ const file_change_events_1 = require("./file-watching/file-change-events");
48
49
  const get_registered_sync_generators_1 = require("../message-types/get-registered-sync-generators");
49
50
  const handle_get_registered_sync_generators_1 = require("./handle-get-registered-sync-generators");
50
51
  const update_workspace_context_1 = require("../message-types/update-workspace-context");
@@ -415,6 +416,8 @@ async function startServer() {
415
416
  }
416
417
  // listen for project graph recomputation events to collect and schedule sync generators
417
418
  (0, project_graph_incremental_recomputation_1.registerProjectGraphRecomputationListener)(sync_generators_1.collectAndScheduleSyncGenerators);
419
+ // register file change listener to invalidate sync generator cache
420
+ (0, file_change_events_1.registerFileChangeListener)(sync_generators_1.clearSyncGeneratorsCache);
418
421
  // trigger an initial project graph recomputation
419
422
  (0, project_graph_incremental_recomputation_1.addUpdatedAndDeletedFiles)([], [], []);
420
423
  // Kick off Nx Console check in background to prime the cache
@@ -1,5 +1,6 @@
1
1
  import type { ProjectGraph } from '../../config/project-graph';
2
2
  import { type FlushSyncGeneratorChangesResult, type SyncGeneratorRunResult } from '../../utils/sync-generators';
3
+ export declare function clearSyncGeneratorsCache(): void;
3
4
  export declare function getCachedSyncGeneratorChanges(generators: string[]): Promise<SyncGeneratorRunResult[]>;
4
5
  export declare function flushSyncGeneratorChangesToDisk(generators: string[]): Promise<FlushSyncGeneratorChangesResult>;
5
6
  export declare function collectAndScheduleSyncGenerators(projectGraph: ProjectGraph): void;
@@ -1 +1 @@
1
- {"version":3,"file":"sync-generators.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/sync-generators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAK/D,OAAO,EAKL,KAAK,+BAA+B,EACpC,KAAK,sBAAsB,EAE5B,MAAM,6BAA6B,CAAC;AA0BrC,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CA8BnC;AAED,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,+BAA+B,CAAC,CAU1C;AAED,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,YAAY,GACzB,IAAI,CA4DN;AAED,wBAAsB,iCAAiC,IAAI,OAAO,CAAC;IACjE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,CAcD;AAsKD;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,sBAAsB,EAAE,GAChC,MAAM,EAAE,EAAE,CA8CZ"}
1
+ {"version":3,"file":"sync-generators.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/sync-generators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAK/D,OAAO,EAKL,KAAK,+BAA+B,EACpC,KAAK,sBAAsB,EAE5B,MAAM,6BAA6B,CAAC;AA0BrC,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C;AAED,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CA8BnC;AAED,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,+BAA+B,CAAC,CAU1C;AAED,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,YAAY,GACzB,IAAI,CAoEN;AAED,wBAAsB,iCAAiC,IAAI,OAAO,CAAC;IACjE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC,CAcD;AAsKD;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,sBAAsB,EAAE,GAChC,MAAM,EAAE,EAAE,CA8CZ"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearSyncGeneratorsCache = clearSyncGeneratorsCache;
3
4
  exports.getCachedSyncGeneratorChanges = getCachedSyncGeneratorChanges;
4
5
  exports.flushSyncGeneratorChangesToDisk = flushSyncGeneratorChangesToDisk;
5
6
  exports.collectAndScheduleSyncGenerators = collectAndScheduleSyncGenerators;
@@ -26,6 +27,10 @@ let storedDisabledTaskSyncGeneratorsHash;
26
27
  const log = (...messageParts) => {
27
28
  logger_1.serverLogger.log('[SYNC]:', ...messageParts);
28
29
  };
30
+ function clearSyncGeneratorsCache() {
31
+ log('clearing sync generators cache due to file changes');
32
+ syncGeneratorsCacheResultPromises.clear();
33
+ }
29
34
  async function getCachedSyncGeneratorChanges(generators) {
30
35
  try {
31
36
  log('get sync generators changes on demand', generators);
@@ -98,7 +103,13 @@ function collectAndScheduleSyncGenerators(projectGraph) {
98
103
  // no generators to run
99
104
  return;
100
105
  }
101
- const { projects } = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
106
+ // Fetch the latest graph instead of using the captured one which might be stale
107
+ const { projectGraph: latestGraph, error } = await (0, project_graph_incremental_recomputation_1.getCachedSerializedProjectGraphPromise)();
108
+ if (!latestGraph || error) {
109
+ log('Cannot run scheduled generators: graph unavailable or errored');
110
+ return;
111
+ }
112
+ const { projects } = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(latestGraph);
102
113
  for (const generator of scheduledGenerators) {
103
114
  syncGeneratorsCacheResultPromises.set(generator, runGenerator(generator, projects));
104
115
  }
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": 2,
3
- "title": "Noop",
4
- "description": "An executor that does nothing.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "properties": {},
9
- "additionalProperties": true
2
+ "version": 2,
3
+ "title": "Noop",
4
+ "description": "An executor that does nothing.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "properties": {},
9
+ "additionalProperties": true
10
10
  }
@@ -1,198 +1,198 @@
1
1
  {
2
- "version": 2,
3
- "title": "Run Commands",
4
- "description": "Run any custom commands with Nx.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "presets": [
9
- {
10
- "name": "Arguments forwarding",
11
- "keys": ["commands"]
12
- },
13
- {
14
- "name": "Custom done conditions",
15
- "keys": ["commands", "readyWhen"]
16
- },
17
- {
18
- "name": "Setting the cwd",
19
- "keys": ["commands", "cwd"]
20
- }
21
- ],
22
- "properties": {
23
- "commands": {
24
- "type": "array",
25
- "description": "Commands to run in child process.",
26
- "items": {
27
- "oneOf": [
28
- {
29
- "type": "object",
30
- "properties": {
31
- "command": {
32
- "type": "string",
33
- "description": "Command to run in child process."
34
- },
35
- "forwardAllArgs": {
36
- "type": "boolean",
37
- "description": "Whether arguments should be forwarded when interpolation is not present."
38
- },
39
- "prefix": {
40
- "type": "string",
41
- "description": "Prefix in front of every line out of the output"
42
- },
43
- "prefixColor": {
44
- "type": "string",
45
- "description": "Color of the prefix",
46
- "enum": [
47
- "black",
48
- "red",
49
- "green",
50
- "yellow",
51
- "blue",
52
- "magenta",
53
- "cyan",
54
- "white"
55
- ]
56
- },
57
- "color": {
58
- "type": "string",
59
- "description": "Color of the output",
60
- "enum": [
61
- "black",
62
- "red",
63
- "green",
64
- "yellow",
65
- "blue",
66
- "magenta",
67
- "cyan",
68
- "white"
69
- ]
70
- },
71
- "bgColor": {
72
- "type": "string",
73
- "description": "Background color of the output",
74
- "enum": [
75
- "bgBlack",
76
- "bgRed",
77
- "bgGreen",
78
- "bgYellow",
79
- "bgBlue",
80
- "bgMagenta",
81
- "bgCyan",
82
- "bgWhite"
83
- ]
84
- },
85
- "description": {
86
- "type": "string",
87
- "description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command."
88
- }
89
- },
90
- "additionalProperties": false,
91
- "required": ["command"]
92
- },
93
- {
94
- "type": "string"
95
- }
96
- ]
97
- },
98
- "x-priority": "important"
99
- },
100
- "command": {
101
- "oneOf": [
2
+ "version": 2,
3
+ "title": "Run Commands",
4
+ "description": "Run any custom commands with Nx.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "presets": [
9
+ {
10
+ "name": "Arguments forwarding",
11
+ "keys": ["commands"]
12
+ },
102
13
  {
103
- "type": "array",
104
- "description": "Command to run in child process, but divided into parts.",
105
- "items": {
106
- "type": "string"
107
- },
108
- "x-priority": "important"
14
+ "name": "Custom done conditions",
15
+ "keys": ["commands", "readyWhen"]
109
16
  },
110
17
  {
111
- "type": "string",
112
- "description": "Command to run in child process."
18
+ "name": "Setting the cwd",
19
+ "keys": ["commands", "cwd"]
20
+ }
21
+ ],
22
+ "properties": {
23
+ "commands": {
24
+ "type": "array",
25
+ "description": "Commands to run in child process.",
26
+ "items": {
27
+ "oneOf": [
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "command": {
32
+ "type": "string",
33
+ "description": "Command to run in child process."
34
+ },
35
+ "forwardAllArgs": {
36
+ "type": "boolean",
37
+ "description": "Whether arguments should be forwarded when interpolation is not present."
38
+ },
39
+ "prefix": {
40
+ "type": "string",
41
+ "description": "Prefix in front of every line out of the output"
42
+ },
43
+ "prefixColor": {
44
+ "type": "string",
45
+ "description": "Color of the prefix",
46
+ "enum": [
47
+ "black",
48
+ "red",
49
+ "green",
50
+ "yellow",
51
+ "blue",
52
+ "magenta",
53
+ "cyan",
54
+ "white"
55
+ ]
56
+ },
57
+ "color": {
58
+ "type": "string",
59
+ "description": "Color of the output",
60
+ "enum": [
61
+ "black",
62
+ "red",
63
+ "green",
64
+ "yellow",
65
+ "blue",
66
+ "magenta",
67
+ "cyan",
68
+ "white"
69
+ ]
70
+ },
71
+ "bgColor": {
72
+ "type": "string",
73
+ "description": "Background color of the output",
74
+ "enum": [
75
+ "bgBlack",
76
+ "bgRed",
77
+ "bgGreen",
78
+ "bgYellow",
79
+ "bgBlue",
80
+ "bgMagenta",
81
+ "bgCyan",
82
+ "bgWhite"
83
+ ]
84
+ },
85
+ "description": {
86
+ "type": "string",
87
+ "description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command."
88
+ }
89
+ },
90
+ "additionalProperties": false,
91
+ "required": ["command"]
92
+ },
93
+ {
94
+ "type": "string"
95
+ }
96
+ ]
97
+ },
98
+ "x-priority": "important"
99
+ },
100
+ "command": {
101
+ "oneOf": [
102
+ {
103
+ "type": "array",
104
+ "description": "Command to run in child process, but divided into parts.",
105
+ "items": {
106
+ "type": "string"
107
+ },
108
+ "x-priority": "important"
109
+ },
110
+ {
111
+ "type": "string",
112
+ "description": "Command to run in child process."
113
+ }
114
+ ],
115
+ "type": "string",
116
+ "description": "Command to run in child process.",
117
+ "x-priority": "important"
118
+ },
119
+ "parallel": {
120
+ "type": "boolean",
121
+ "description": "Run commands in parallel.",
122
+ "default": true,
123
+ "x-priority": "important"
124
+ },
125
+ "readyWhen": {
126
+ "description": "String or array of strings to appear in `stdout` or `stderr` that indicate that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete.",
127
+ "oneOf": [
128
+ { "type": "string" },
129
+ { "type": "array", "items": { "type": "string" } }
130
+ ]
131
+ },
132
+ "args": {
133
+ "oneOf": [
134
+ {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ {
141
+ "type": "string"
142
+ }
143
+ ],
144
+ "description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)"
145
+ },
146
+ "envFile": {
147
+ "type": "string",
148
+ "description": "You may specify a custom .env file path."
149
+ },
150
+ "color": {
151
+ "type": "boolean",
152
+ "description": "Use colors when showing output of command.",
153
+ "default": false
154
+ },
155
+ "cwd": {
156
+ "type": "string",
157
+ "description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path."
158
+ },
159
+ "env": {
160
+ "type": "object",
161
+ "description": "Environment variables that will be made available to the commands. This property has priority over the `.env` files.",
162
+ "additionalProperties": {
163
+ "type": "string"
164
+ }
165
+ },
166
+ "__unparsed__": {
167
+ "hidden": true,
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string"
171
+ },
172
+ "$default": {
173
+ "$source": "unparsed"
174
+ },
175
+ "x-priority": "internal"
176
+ },
177
+ "forwardAllArgs": {
178
+ "type": "boolean",
179
+ "description": "Whether arguments should be forwarded when interpolation is not present.",
180
+ "default": true
181
+ },
182
+ "tty": {
183
+ "type": "boolean",
184
+ "description": "Whether commands should be run with a tty terminal",
185
+ "hidden": true
113
186
  }
114
- ],
115
- "type": "string",
116
- "description": "Command to run in child process.",
117
- "x-priority": "important"
118
- },
119
- "parallel": {
120
- "type": "boolean",
121
- "description": "Run commands in parallel.",
122
- "default": true,
123
- "x-priority": "important"
124
- },
125
- "readyWhen": {
126
- "description": "String or array of strings to appear in `stdout` or `stderr` that indicate that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete.",
127
- "oneOf": [
128
- { "type": "string" },
129
- { "type": "array", "items": { "type": "string" } }
130
- ]
131
187
  },
132
- "args": {
133
- "oneOf": [
188
+ "additionalProperties": true,
189
+ "oneOf": [
134
190
  {
135
- "type": "array",
136
- "items": {
137
- "type": "string"
138
- }
191
+ "required": ["commands"]
139
192
  },
140
193
  {
141
- "type": "string"
194
+ "required": ["command"]
142
195
  }
143
- ],
144
- "description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)"
145
- },
146
- "envFile": {
147
- "type": "string",
148
- "description": "You may specify a custom .env file path."
149
- },
150
- "color": {
151
- "type": "boolean",
152
- "description": "Use colors when showing output of command.",
153
- "default": false
154
- },
155
- "cwd": {
156
- "type": "string",
157
- "description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path."
158
- },
159
- "env": {
160
- "type": "object",
161
- "description": "Environment variables that will be made available to the commands. This property has priority over the `.env` files.",
162
- "additionalProperties": {
163
- "type": "string"
164
- }
165
- },
166
- "__unparsed__": {
167
- "hidden": true,
168
- "type": "array",
169
- "items": {
170
- "type": "string"
171
- },
172
- "$default": {
173
- "$source": "unparsed"
174
- },
175
- "x-priority": "internal"
176
- },
177
- "forwardAllArgs": {
178
- "type": "boolean",
179
- "description": "Whether arguments should be forwarded when interpolation is not present.",
180
- "default": true
181
- },
182
- "tty": {
183
- "type": "boolean",
184
- "description": "Whether commands should be run with a tty terminal",
185
- "hidden": true
186
- }
187
- },
188
- "additionalProperties": true,
189
- "oneOf": [
190
- {
191
- "required": ["commands"]
192
- },
193
- {
194
- "required": ["command"]
195
- }
196
- ],
197
- "examplesFile": "../../../docs/run-commands-examples.md"
196
+ ],
197
+ "examplesFile": "../../../docs/run-commands-examples.md"
198
198
  }
@@ -1,28 +1,28 @@
1
1
  {
2
- "version": 2,
3
- "title": "Run Script",
4
- "description": "Run any NPM script of a project in the project's root directory.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "properties": {
9
- "script": {
10
- "type": "string",
11
- "description": "An npm script name in the `package.json` file of the project (e.g., `build`)."
2
+ "version": 2,
3
+ "title": "Run Script",
4
+ "description": "Run any NPM script of a project in the project's root directory.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "properties": {
9
+ "script": {
10
+ "type": "string",
11
+ "description": "An npm script name in the `package.json` file of the project (e.g., `build`)."
12
+ },
13
+ "__unparsed__": {
14
+ "hidden": true,
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string"
18
+ },
19
+ "$default": {
20
+ "$source": "unparsed"
21
+ },
22
+ "x-priority": "internal"
23
+ }
12
24
  },
13
- "__unparsed__": {
14
- "hidden": true,
15
- "type": "array",
16
- "items": {
17
- "type": "string"
18
- },
19
- "$default": {
20
- "$source": "unparsed"
21
- },
22
- "x-priority": "internal"
23
- }
24
- },
25
- "additionalProperties": true,
26
- "required": ["script"],
27
- "examplesFile": "../../../docs/run-script-examples.md"
25
+ "additionalProperties": true,
26
+ "required": ["script"],
27
+ "examplesFile": "../../../docs/run-script-examples.md"
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"format-changed-files-with-prettier-if-available.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/internal-utils/format-changed-files-with-prettier-if-available.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGpC;;;GAGG;AACH,wBAAsB,yCAAyC,CAC7D,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,wBAAsB,kCAAkC,CACtD,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,EACnD,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA8D9B"}
1
+ {"version":3,"file":"format-changed-files-with-prettier-if-available.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/internal-utils/format-changed-files-with-prettier-if-available.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGpC;;;GAGG;AACH,wBAAsB,yCAAyC,CAC7D,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,wBAAsB,kCAAkC,CACtD,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,EACnD,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA2D9B"}
@@ -56,9 +56,7 @@ async function formatFilesWithPrettierIfAvailable(files, root, options) {
56
56
  if (support.ignored || !support.inferredParser) {
57
57
  return;
58
58
  }
59
- results.set(file.path,
60
- // In prettier v3 the format result is a promise
61
- await prettier.format(file.content.toString('utf-8'), options));
59
+ results.set(file.path, await prettier.format(file.content.toString('utf-8'), options));
62
60
  }
63
61
  catch (e) {
64
62
  if (!options?.silent) {
@@ -297,7 +297,8 @@ function handleEmptyTargets(projectName, projectConfiguration) {
297
297
  !Object.keys(projectConfiguration.targets).length) {
298
298
  // Re-order `targets` to appear after the `// target` comment.
299
299
  delete projectConfiguration.targets;
300
- projectConfiguration['// targets'] = `to see all targets run: nx show project ${projectName} --web`;
300
+ projectConfiguration['// targets'] =
301
+ `to see all targets run: nx show project ${projectName} --web`;
301
302
  projectConfiguration.targets = {};
302
303
  }
303
304
  else {
@@ -498,6 +498,7 @@ export interface TuiCliArgs {
498
498
 
499
499
  export interface TuiConfig {
500
500
  autoExit?: boolean | number | undefined
501
+ suppressHints?: boolean
501
502
  }
502
503
 
503
504
  export interface UpdatedWorkspaceFiles {
Binary file