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.
- package/bin/init-local.js +2 -3
- package/package.json +30 -26
- package/src/adapter/angular-json.js +6 -6
- package/src/adapter/decorate-cli.js +1 -2
- package/src/adapter/ngcli-adapter.js +8 -8
- package/src/adapter/rxjs-for-await.js +5 -5
- package/src/command-line/add/add.js +2 -2
- package/src/command-line/affected/affected.js +2 -3
- package/src/command-line/connect/connect-to-nx-cloud.js +5 -6
- package/src/command-line/connect/view-logs.js +1 -2
- package/src/command-line/daemon/daemon.js +1 -2
- package/src/command-line/exec/exec.js +1 -2
- package/src/command-line/format/format.js +1 -2
- package/src/command-line/generate/generate.js +4 -5
- package/src/command-line/generate/generator-utils.js +2 -3
- package/src/command-line/graph/command-object.js +2 -2
- package/src/command-line/graph/graph.js +9 -5
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +1 -2
- package/src/command-line/init/implementation/add-nx-to-nest.js +1 -2
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +1 -2
- package/src/command-line/init/implementation/angular/index.js +1 -2
- package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -2
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -2
- package/src/command-line/init/implementation/angular/standalone-workspace.js +1 -2
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +1 -1
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +7 -7
- package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.js +1 -2
- package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +1 -2
- package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.js +1 -2
- package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -2
- package/src/command-line/init/implementation/react/clean-up-files.js +1 -2
- package/src/command-line/init/implementation/react/index.js +1 -2
- package/src/command-line/init/implementation/react/read-name-from-package-json.js +1 -2
- package/src/command-line/init/implementation/react/rename-js-to-jsx.js +1 -2
- package/src/command-line/init/implementation/react/tsconfig-setup.js +1 -2
- package/src/command-line/init/implementation/react/write-craco-config.js +1 -2
- package/src/command-line/init/implementation/react/write-vite-config.js +1 -2
- package/src/command-line/init/implementation/react/write-vite-index-html.js +1 -2
- package/src/command-line/init/implementation/utils.js +10 -11
- package/src/command-line/init/init-v1.js +1 -2
- package/src/command-line/init/init-v2.js +1 -2
- package/src/command-line/list/list.js +1 -2
- package/src/command-line/migrate/migrate.d.ts +1 -1
- package/src/command-line/migrate/migrate.js +5 -5
- package/src/command-line/new/new.js +1 -2
- package/src/command-line/release/changelog.js +3 -3
- package/src/command-line/release/config/config.js +3 -3
- package/src/command-line/release/config/filter-release-groups.js +1 -2
- package/src/command-line/release/config/version-plans.js +3 -4
- package/src/command-line/release/plan.js +2 -2
- package/src/command-line/release/publish.js +2 -2
- package/src/command-line/release/release.js +2 -2
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +1 -2
- package/src/command-line/release/utils/exec-command.js +1 -2
- package/src/command-line/release/utils/git.js +11 -12
- package/src/command-line/release/utils/github.js +5 -6
- package/src/command-line/release/utils/launch-editor.js +1 -2
- package/src/command-line/release/utils/markdown.js +1 -2
- package/src/command-line/release/utils/print-changes.d.ts +0 -1
- package/src/command-line/release/utils/print-changes.js +2 -3
- package/src/command-line/release/utils/resolve-changelog-renderer.js +1 -2
- package/src/command-line/release/utils/resolve-nx-json-error-message.js +1 -2
- package/src/command-line/release/utils/resolve-semver-specifier.js +2 -3
- package/src/command-line/release/utils/semver.js +4 -5
- package/src/command-line/release/utils/shared.js +6 -6
- package/src/command-line/release/version.js +2 -2
- package/src/command-line/repair/repair.js +1 -2
- package/src/command-line/report/report.js +7 -7
- package/src/command-line/reset/reset.js +1 -2
- package/src/command-line/run/executor-utils.js +2 -3
- package/src/command-line/run/run-one.js +1 -2
- package/src/command-line/run/run.js +5 -6
- package/src/command-line/run-many/run-many.js +2 -3
- package/src/command-line/show/project.js +1 -2
- package/src/command-line/show/projects.js +1 -2
- package/src/command-line/watch/watch.js +8 -2
- package/src/command-line/yargs-utils/documentation.js +1 -2
- package/src/command-line/yargs-utils/shared-options.js +12 -13
- package/src/commands-runner/create-command-graph.js +1 -2
- package/src/commands-runner/get-command-projects.js +1 -2
- package/src/config/calculate-default-project-name.js +2 -3
- package/src/config/configuration.js +2 -2
- package/src/config/nx-json.js +2 -3
- package/src/config/project-graph.js +3 -3
- package/src/config/schema-utils.js +3 -4
- package/src/config/to-project-name.js +1 -2
- package/src/core/graph/main.js +1 -1
- package/src/daemon/cache.js +6 -6
- package/src/daemon/client/client.d.ts +1 -2
- package/src/daemon/client/client.js +13 -1
- package/src/daemon/client/daemon-socket-messenger.d.ts +0 -1
- package/src/daemon/client/generate-help-output.js +1 -2
- package/src/daemon/is-on-daemon.js +1 -2
- package/src/daemon/message-types/get-context-file-data.js +2 -2
- package/src/daemon/message-types/get-files-in-directory.js +2 -2
- package/src/daemon/message-types/get-nx-workspace-files.js +2 -2
- package/src/daemon/message-types/glob.js +2 -2
- package/src/daemon/message-types/hash-glob.js +2 -2
- package/src/daemon/message-types/task-history.js +3 -3
- package/src/daemon/message-types/update-context-files.js +2 -2
- package/src/daemon/server/file-watching/changed-projects.js +1 -2
- package/src/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -1
- package/src/daemon/server/file-watching/file-watcher-sockets.js +4 -4
- package/src/daemon/server/handle-context-file-data.js +1 -2
- package/src/daemon/server/handle-get-files-in-directory.js +1 -2
- package/src/daemon/server/handle-get-task-history.js +1 -2
- package/src/daemon/server/handle-glob.js +1 -2
- package/src/daemon/server/handle-hash-glob.js +1 -2
- package/src/daemon/server/handle-hash-tasks.js +1 -2
- package/src/daemon/server/handle-nx-workspace-files.js +1 -2
- package/src/daemon/server/handle-outputs-tracking.js +2 -3
- package/src/daemon/server/handle-process-in-background.js +1 -2
- package/src/daemon/server/handle-request-project-graph.js +1 -2
- package/src/daemon/server/handle-request-shutdown.d.ts +0 -1
- package/src/daemon/server/handle-request-shutdown.js +1 -2
- package/src/daemon/server/handle-write-task-runs-to-history.js +1 -2
- package/src/daemon/server/outputs-tracking.js +7 -8
- package/src/daemon/server/plugins.js +2 -3
- package/src/daemon/server/project-graph-incremental-recomputation.js +3 -3
- package/src/daemon/server/server.d.ts +0 -1
- package/src/daemon/server/server.js +2 -3
- package/src/daemon/server/shutdown-utils.d.ts +0 -1
- package/src/daemon/server/shutdown-utils.js +9 -9
- package/src/daemon/server/watcher.d.ts +0 -1
- package/src/daemon/server/watcher.js +3 -4
- package/src/daemon/socket-utils.js +3 -3
- package/src/daemon/tmp-dir.js +6 -6
- package/src/devkit-exports.d.ts +1 -0
- package/src/devkit-exports.js +3 -1
- package/src/executors/noop/noop.impl.js +1 -1
- package/src/executors/run-commands/run-commands.impl.js +3 -3
- package/src/executors/run-script/run-script.impl.js +1 -1
- package/src/executors/utils/convert-nx-executor.js +1 -2
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +1 -2
- package/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +1 -1
- package/src/generators/testing-utils/create-tree-with-empty-workspace.js +2 -3
- package/src/generators/testing-utils/create-tree.js +1 -2
- package/src/generators/tree.d.ts +0 -2
- package/src/generators/tree.js +3 -3
- package/src/generators/utils/glob.js +2 -3
- package/src/generators/utils/json.js +3 -4
- package/src/generators/utils/nx-json.js +2 -3
- package/src/generators/utils/project-configuration.js +7 -7
- package/src/hasher/create-task-hasher.js +1 -2
- package/src/hasher/file-hasher.js +2 -3
- package/src/hasher/hash-task.d.ts +0 -1
- package/src/hasher/hash-task.js +2 -3
- package/src/hasher/native-task-hasher-impl.d.ts +0 -1
- package/src/hasher/node-task-hasher-impl.d.ts +0 -1
- package/src/hasher/task-hasher.d.ts +0 -1
- package/src/hasher/task-hasher.js +10 -10
- package/src/migrations/update-15-0-0/migrate-to-inputs.js +1 -1
- package/src/migrations/update-15-0-0/prefix-outputs.js +1 -1
- package/src/migrations/update-16-0-0/remove-nrwl-cli.js +1 -1
- package/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +1 -1
- package/src/migrations/update-16-0-0/update-nx-cloud-runner.js +1 -1
- package/src/migrations/update-16-2-0/remove-run-commands-output-path.js +1 -1
- package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +1 -1
- package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +1 -1
- package/src/migrations/update-17-0-0/move-cache-directory.js +1 -1
- package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +1 -1
- package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +1 -1
- package/src/migrations/update-17-2-0/move-default-base.js +1 -1
- package/src/migrations/update-17-3-0/nx-release-path.js +2 -3
- package/src/migrations/update-17-3-0/update-nxw.js +1 -1
- package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +1 -1
- package/src/migrations/update-19-2-0/move-workspace-data-directory.js +3 -4
- package/src/migrations/update-19-2-4/set-project-name.js +1 -1
- package/src/native/assert-supported-platform.js +1 -2
- package/src/native/browser.js +1 -0
- package/src/native/index.d.ts +178 -138
- package/src/native/index.js +16 -0
- package/src/native/native-bindings.js +352 -238
- package/src/native/native-file-cache-location.js +1 -2
- package/src/native/nx.wasi-browser.js +108 -0
- package/src/native/nx.wasi.cjs +139 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/native/transform-objects.js +1 -2
- package/src/native/wasi-worker-browser.mjs +32 -0
- package/src/native/wasi-worker.mjs +63 -0
- package/src/nx-cloud/debug-logger.js +1 -2
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -2
- package/src/nx-cloud/resolution-helpers.js +1 -2
- package/src/nx-cloud/update-manager.js +2 -2
- package/src/nx-cloud/utilities/axios.js +1 -2
- package/src/nx-cloud/utilities/get-cloud-options.js +1 -2
- package/src/nx-cloud/utilities/url-shorten.js +8 -9
- package/src/plugins/js/hasher/hasher.js +1 -2
- package/src/plugins/js/lock-file/lock-file.js +6 -6
- package/src/plugins/js/lock-file/npm-parser.js +3 -4
- package/src/plugins/js/lock-file/pnpm-parser.js +3 -4
- package/src/plugins/js/lock-file/project-graph-pruning.js +1 -2
- package/src/plugins/js/lock-file/utils/package-json.js +2 -3
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +5 -6
- package/src/plugins/js/lock-file/yarn-parser.js +3 -4
- package/src/plugins/js/package-json/create-package-json.js +2 -3
- package/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +1 -2
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +1 -2
- package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -2
- package/src/plugins/js/project-graph/build-dependencies/strip-source-code.js +1 -2
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +2 -2
- package/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +1 -2
- package/src/plugins/js/utils/config.js +1 -2
- package/src/plugins/js/utils/register.d.ts +1 -0
- package/src/plugins/js/utils/register.js +7 -8
- package/src/plugins/js/utils/resolve-relative-to-dir.js +1 -2
- package/src/plugins/js/utils/typescript.js +5 -6
- package/src/plugins/js/versions.d.ts +1 -1
- package/src/plugins/js/versions.js +1 -1
- package/src/plugins/package-json-workspaces/create-nodes.js +5 -5
- package/src/plugins/project-json/build-nodes/project-json.js +3 -3
- package/src/project-graph/affected/affected-project-graph.js +1 -2
- package/src/project-graph/build-project-graph.js +3 -4
- package/src/project-graph/error-types.js +11 -11
- package/src/project-graph/file-map-utils.js +4 -5
- package/src/project-graph/file-utils.d.ts +1 -1
- package/src/project-graph/file-utils.js +7 -7
- package/src/project-graph/nx-deps-cache.js +8 -8
- package/src/project-graph/operators.js +5 -5
- package/src/project-graph/plugins/internal-api.js +4 -5
- package/src/project-graph/plugins/isolation/index.js +1 -2
- package/src/project-graph/plugins/isolation/messaging.d.ts +0 -2
- package/src/project-graph/plugins/isolation/messaging.js +4 -5
- package/src/project-graph/plugins/isolation/plugin-pool.js +1 -2
- package/src/project-graph/plugins/loader.js +7 -7
- package/src/project-graph/plugins/utils.js +4 -5
- package/src/project-graph/project-graph-builder.js +2 -2
- package/src/project-graph/project-graph.js +7 -8
- package/src/project-graph/utils/build-all-workspace-files.js +1 -2
- package/src/project-graph/utils/find-project-for-path.js +4 -5
- package/src/project-graph/utils/implicit-project-dependencies.js +1 -2
- package/src/project-graph/utils/normalize-project-nodes.js +2 -3
- package/src/project-graph/utils/project-configuration-utils.d.ts +8 -6
- package/src/project-graph/utils/project-configuration-utils.js +118 -54
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -3
- package/src/project-graph/utils/retrieve-workspace-files.js +6 -7
- package/src/tasks-runner/create-task-graph.js +3 -3
- package/src/tasks-runner/forked-process-task-runner.d.ts +0 -1
- package/src/tasks-runner/init-tasks-runner.js +1 -2
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +1 -2
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +1 -2
- package/src/tasks-runner/life-cycles/formatting-utils.js +2 -3
- package/src/tasks-runner/life-cycles/pretty-time.js +1 -2
- package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -2
- package/src/tasks-runner/pseudo-ipc.d.ts +0 -1
- package/src/tasks-runner/pseudo-terminal.d.ts +0 -1
- package/src/tasks-runner/pseudo-terminal.js +5 -2
- package/src/tasks-runner/run-command.js +4 -5
- package/src/tasks-runner/task-env.d.ts +0 -1
- package/src/tasks-runner/task-env.js +5 -6
- package/src/tasks-runner/task-graph-utils.js +2 -3
- package/src/tasks-runner/utils.js +25 -26
- package/src/utils/ab-testing.js +2 -2
- package/src/utils/all-file-data.js +1 -2
- package/src/utils/assert-workspace-validity.js +1 -2
- package/src/utils/async-iterator.js +2 -3
- package/src/utils/cache-directory.js +2 -2
- package/src/utils/child-process.d.ts +0 -1
- package/src/utils/child-process.js +3 -3
- package/src/utils/chunkify.js +1 -2
- package/src/utils/code-frames.js +1 -2
- package/src/utils/collapse-expanded-outputs.js +1 -2
- package/src/utils/command-line-utils.js +5 -6
- package/src/utils/consume-messages-from-socket.js +1 -2
- package/src/utils/default-base.js +1 -2
- package/src/utils/dotenv.js +1 -2
- package/src/utils/exit-codes.d.ts +0 -1
- package/src/utils/exit-codes.js +1 -2
- package/src/utils/fileutils.d.ts +0 -1
- package/src/utils/fileutils.js +9 -10
- package/src/utils/find-matching-projects.js +2 -2
- package/src/utils/find-workspace-root.js +1 -2
- package/src/utils/get-package-name-from-import-path.js +1 -2
- package/src/utils/git-utils.js +4 -5
- package/src/utils/globs.js +1 -2
- package/src/utils/ignore.js +4 -4
- package/src/utils/installation-directory.js +2 -3
- package/src/utils/is-ci.js +1 -2
- package/src/utils/json-diff.js +5 -5
- package/src/utils/json.js +3 -3
- package/src/utils/logger.js +2 -2
- package/src/utils/nx-cloud-utils.js +3 -4
- package/src/utils/nx-plugin.deprecated.js +1 -4
- package/src/utils/object-sort.js +1 -2
- package/src/utils/package-json.js +8 -9
- package/src/utils/package-manager.js +13 -14
- package/src/utils/params.js +14 -14
- package/src/utils/path.js +3 -4
- package/src/utils/plugins/community-plugins.js +1 -2
- package/src/utils/plugins/core-plugins.js +2 -3
- package/src/utils/plugins/installed-plugins.js +3 -4
- package/src/utils/plugins/local-plugins.js +2 -3
- package/src/utils/plugins/plugin-capabilities.js +2 -3
- package/src/utils/plugins/shared.js +1 -2
- package/src/utils/print-help.js +1 -2
- package/src/utils/project-graph-utils.js +4 -5
- package/src/utils/serializable-error.js +1 -2
- package/src/utils/serialize-overrides-into-command-line.js +1 -2
- package/src/utils/serialize-target.js +1 -2
- package/src/utils/split-target.js +2 -3
- package/src/utils/strip-indents.js +1 -2
- package/src/utils/task-history.js +3 -3
- package/src/utils/update-nxw.js +1 -2
- package/src/utils/workspace-configuration-check.js +1 -2
- package/src/utils/workspace-context.js +10 -11
- package/src/utils/workspace-root.js +3 -3
- package/src/plugins/target-defaults/symbols.d.ts +0 -17
- package/src/plugins/target-defaults/symbols.js +0 -20
- package/src/plugins/target-defaults/target-defaults-plugin.d.ts +0 -121
- package/src/plugins/target-defaults/target-defaults-plugin.js +0 -176
package/src/daemon/cache.js
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.serverProcessJsonPath = void 0;
|
4
|
+
exports.readDaemonProcessJsonCache = readDaemonProcessJsonCache;
|
5
|
+
exports.deleteDaemonJsonProcessCache = deleteDaemonJsonProcessCache;
|
6
|
+
exports.writeDaemonJsonProcessCache = writeDaemonJsonProcessCache;
|
7
|
+
exports.safelyCleanUpExistingProcess = safelyCleanUpExistingProcess;
|
8
|
+
exports.getDaemonProcessIdSync = getDaemonProcessIdSync;
|
4
9
|
const fs_extra_1 = require("fs-extra");
|
5
10
|
const path_1 = require("path");
|
6
11
|
const tmp_dir_1 = require("./tmp-dir");
|
@@ -11,7 +16,6 @@ async function readDaemonProcessJsonCache() {
|
|
11
16
|
}
|
12
17
|
return await (0, fs_extra_1.readJson)(exports.serverProcessJsonPath);
|
13
18
|
}
|
14
|
-
exports.readDaemonProcessJsonCache = readDaemonProcessJsonCache;
|
15
19
|
function deleteDaemonJsonProcessCache() {
|
16
20
|
try {
|
17
21
|
if (getDaemonProcessIdSync() === process.pid) {
|
@@ -20,11 +24,9 @@ function deleteDaemonJsonProcessCache() {
|
|
20
24
|
}
|
21
25
|
catch { }
|
22
26
|
}
|
23
|
-
exports.deleteDaemonJsonProcessCache = deleteDaemonJsonProcessCache;
|
24
27
|
async function writeDaemonJsonProcessCache(daemonJson) {
|
25
28
|
await (0, fs_extra_1.writeJson)(exports.serverProcessJsonPath, daemonJson);
|
26
29
|
}
|
27
|
-
exports.writeDaemonJsonProcessCache = writeDaemonJsonProcessCache;
|
28
30
|
async function safelyCleanUpExistingProcess() {
|
29
31
|
const daemonProcessJson = await readDaemonProcessJsonCache();
|
30
32
|
if (daemonProcessJson && daemonProcessJson.processId) {
|
@@ -53,7 +55,6 @@ async function safelyCleanUpExistingProcess() {
|
|
53
55
|
}
|
54
56
|
deleteDaemonJsonProcessCache();
|
55
57
|
}
|
56
|
-
exports.safelyCleanUpExistingProcess = safelyCleanUpExistingProcess;
|
57
58
|
// Must be sync for the help output use case
|
58
59
|
function getDaemonProcessIdSync() {
|
59
60
|
if (!(0, fs_extra_1.existsSync)(exports.serverProcessJsonPath)) {
|
@@ -67,4 +68,3 @@ function getDaemonProcessIdSync() {
|
|
67
68
|
return null;
|
68
69
|
}
|
69
70
|
}
|
70
|
-
exports.getDaemonProcessIdSync = getDaemonProcessIdSync;
|
@@ -1,5 +1,3 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
/// <reference types="node" />
|
3
1
|
import { ChildProcess } from 'child_process';
|
4
2
|
import { FileData, ProjectGraph } from '../../config/project-graph';
|
5
3
|
import { Hash } from '../../hasher/task-hasher';
|
@@ -65,3 +63,4 @@ export declare class DaemonClient {
|
|
65
63
|
stop(): Promise<void>;
|
66
64
|
}
|
67
65
|
export declare const daemonClient: DaemonClient;
|
66
|
+
export declare function isDaemonEnabled(): boolean;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.daemonClient = exports.DaemonClient = void 0;
|
4
|
+
exports.isDaemonEnabled = isDaemonEnabled;
|
4
5
|
const workspace_root_1 = require("../../utils/workspace-root");
|
5
6
|
const child_process_1 = require("child_process");
|
6
7
|
const fs_1 = require("fs");
|
@@ -13,12 +14,13 @@ const output_1 = require("../../utils/output");
|
|
13
14
|
const socket_utils_1 = require("../socket-utils");
|
14
15
|
const tmp_dir_1 = require("../tmp-dir");
|
15
16
|
const is_ci_1 = require("../../utils/is-ci");
|
17
|
+
const nx_json_1 = require("../../config/nx-json");
|
16
18
|
const configuration_1 = require("../../config/configuration");
|
17
19
|
const promised_based_queue_1 = require("../../utils/promised-based-queue");
|
18
|
-
const nx_json_1 = require("../../config/nx-json");
|
19
20
|
const daemon_socket_messenger_1 = require("./daemon-socket-messenger");
|
20
21
|
const cache_1 = require("../cache");
|
21
22
|
const error_types_1 = require("../../project-graph/error-types");
|
23
|
+
const native_1 = require("../../native");
|
22
24
|
const get_nx_workspace_files_1 = require("../message-types/get-nx-workspace-files");
|
23
25
|
const get_context_file_data_1 = require("../message-types/get-context-file-data");
|
24
26
|
const get_files_in_directory_1 = require("../message-types/get-files-in-directory");
|
@@ -64,6 +66,7 @@ class DaemonClient {
|
|
64
66
|
// CI=true,env=undefined => no daemon
|
65
67
|
// CI=true,env=false => no daemon
|
66
68
|
// CI=true,env=true => daemon
|
69
|
+
// WASM => no daemon because file watching does not work
|
67
70
|
if (((0, is_ci_1.isCI)() && env !== 'true') ||
|
68
71
|
isDocker() ||
|
69
72
|
(0, tmp_dir_1.isDaemonDisabled)() ||
|
@@ -74,6 +77,12 @@ class DaemonClient {
|
|
74
77
|
(useDaemonProcessOption === false && env === 'false')) {
|
75
78
|
this._enabled = false;
|
76
79
|
}
|
80
|
+
else if (native_1.IS_WASM) {
|
81
|
+
output_1.output.warn({
|
82
|
+
title: 'The Nx Daemon is unsupported in WebAssembly environments. Some things may be slower than or not function as expected.',
|
83
|
+
});
|
84
|
+
this._enabled = false;
|
85
|
+
}
|
77
86
|
else {
|
78
87
|
this._enabled = true;
|
79
88
|
}
|
@@ -402,6 +411,9 @@ class DaemonClient {
|
|
402
411
|
}
|
403
412
|
exports.DaemonClient = DaemonClient;
|
404
413
|
exports.daemonClient = new DaemonClient();
|
414
|
+
function isDaemonEnabled() {
|
415
|
+
return exports.daemonClient.enabled();
|
416
|
+
}
|
405
417
|
function isDocker() {
|
406
418
|
try {
|
407
419
|
(0, fs_1.statSync)('/.dockerenv');
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.generateDaemonHelpOutput =
|
3
|
+
exports.generateDaemonHelpOutput = generateDaemonHelpOutput;
|
4
4
|
const child_process_1 = require("child_process");
|
5
5
|
const cache_1 = require("../cache");
|
6
6
|
const tmp_dir_1 = require("../tmp-dir");
|
@@ -23,4 +23,3 @@ function generateDaemonHelpOutput() {
|
|
23
23
|
- Process ID: ${pid}`
|
24
24
|
: ''}`;
|
25
25
|
}
|
26
|
-
exports.generateDaemonHelpOutput = generateDaemonHelpOutput;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.GET_CONTEXT_FILE_DATA = void 0;
|
4
|
+
exports.isHandleContextFileDataMessage = isHandleContextFileDataMessage;
|
4
5
|
exports.GET_CONTEXT_FILE_DATA = 'GET_CONTEXT_FILE_DATA';
|
5
6
|
function isHandleContextFileDataMessage(message) {
|
6
7
|
return (typeof message === 'object' &&
|
@@ -8,4 +9,3 @@ function isHandleContextFileDataMessage(message) {
|
|
8
9
|
'type' in message &&
|
9
10
|
message['type'] === exports.GET_CONTEXT_FILE_DATA);
|
10
11
|
}
|
11
|
-
exports.isHandleContextFileDataMessage = isHandleContextFileDataMessage;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.GET_FILES_IN_DIRECTORY = void 0;
|
4
|
+
exports.isHandleGetFilesInDirectoryMessage = isHandleGetFilesInDirectoryMessage;
|
4
5
|
exports.GET_FILES_IN_DIRECTORY = 'GET_FILES_IN_DIRECTORY';
|
5
6
|
function isHandleGetFilesInDirectoryMessage(message) {
|
6
7
|
return (typeof message === 'object' &&
|
@@ -8,4 +9,3 @@ function isHandleGetFilesInDirectoryMessage(message) {
|
|
8
9
|
'type' in message &&
|
9
10
|
message['type'] === exports.GET_FILES_IN_DIRECTORY);
|
10
11
|
}
|
11
|
-
exports.isHandleGetFilesInDirectoryMessage = isHandleGetFilesInDirectoryMessage;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.GET_NX_WORKSPACE_FILES = void 0;
|
4
|
+
exports.isHandleNxWorkspaceFilesMessage = isHandleNxWorkspaceFilesMessage;
|
4
5
|
exports.GET_NX_WORKSPACE_FILES = 'GET_NX_WORKSPACE_FILES';
|
5
6
|
function isHandleNxWorkspaceFilesMessage(message) {
|
6
7
|
return (typeof message === 'object' &&
|
@@ -8,4 +9,3 @@ function isHandleNxWorkspaceFilesMessage(message) {
|
|
8
9
|
'type' in message &&
|
9
10
|
message['type'] === exports.GET_NX_WORKSPACE_FILES);
|
10
11
|
}
|
11
|
-
exports.isHandleNxWorkspaceFilesMessage = isHandleNxWorkspaceFilesMessage;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.GLOB = void 0;
|
4
|
+
exports.isHandleGlobMessage = isHandleGlobMessage;
|
4
5
|
exports.GLOB = 'GLOB';
|
5
6
|
function isHandleGlobMessage(message) {
|
6
7
|
return (typeof message === 'object' &&
|
@@ -8,4 +9,3 @@ function isHandleGlobMessage(message) {
|
|
8
9
|
'type' in message &&
|
9
10
|
message['type'] === exports.GLOB);
|
10
11
|
}
|
11
|
-
exports.isHandleGlobMessage = isHandleGlobMessage;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.HASH_GLOB = void 0;
|
4
|
+
exports.isHandleHashGlobMessage = isHandleHashGlobMessage;
|
4
5
|
exports.HASH_GLOB = 'HASH_GLOB';
|
5
6
|
function isHandleHashGlobMessage(message) {
|
6
7
|
return (typeof message === 'object' &&
|
@@ -8,4 +9,3 @@ function isHandleHashGlobMessage(message) {
|
|
8
9
|
'type' in message &&
|
9
10
|
message['type'] === exports.HASH_GLOB);
|
10
11
|
}
|
11
|
-
exports.isHandleHashGlobMessage = isHandleHashGlobMessage;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.WRITE_TASK_RUNS_TO_HISTORY = exports.GET_TASK_HISTORY_FOR_HASHES = void 0;
|
4
|
+
exports.isHandleGetTaskHistoryForHashesMessage = isHandleGetTaskHistoryForHashesMessage;
|
5
|
+
exports.isHandleWriteTaskRunsToHistoryMessage = isHandleWriteTaskRunsToHistoryMessage;
|
4
6
|
exports.GET_TASK_HISTORY_FOR_HASHES = 'GET_TASK_HISTORY_FOR_HASHES';
|
5
7
|
function isHandleGetTaskHistoryForHashesMessage(message) {
|
6
8
|
return (typeof message === 'object' &&
|
@@ -8,7 +10,6 @@ function isHandleGetTaskHistoryForHashesMessage(message) {
|
|
8
10
|
'type' in message &&
|
9
11
|
message['type'] === exports.GET_TASK_HISTORY_FOR_HASHES);
|
10
12
|
}
|
11
|
-
exports.isHandleGetTaskHistoryForHashesMessage = isHandleGetTaskHistoryForHashesMessage;
|
12
13
|
exports.WRITE_TASK_RUNS_TO_HISTORY = 'WRITE_TASK_RUNS_TO_HISTORY';
|
13
14
|
function isHandleWriteTaskRunsToHistoryMessage(message) {
|
14
15
|
return (typeof message === 'object' &&
|
@@ -16,4 +17,3 @@ function isHandleWriteTaskRunsToHistoryMessage(message) {
|
|
16
17
|
'type' in message &&
|
17
18
|
message['type'] === exports.WRITE_TASK_RUNS_TO_HISTORY);
|
18
19
|
}
|
19
|
-
exports.isHandleWriteTaskRunsToHistoryMessage = isHandleWriteTaskRunsToHistoryMessage;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.GLOB = void 0;
|
4
|
+
exports.isHandleUpdateContextMessage = isHandleUpdateContextMessage;
|
4
5
|
exports.GLOB = 'GLOB';
|
5
6
|
function isHandleUpdateContextMessage(message) {
|
6
7
|
return (typeof message === 'object' &&
|
@@ -8,4 +9,3 @@ function isHandleUpdateContextMessage(message) {
|
|
8
9
|
'type' in message &&
|
9
10
|
message['type'] === exports.GLOB);
|
10
11
|
}
|
11
|
-
exports.isHandleUpdateContextMessage = isHandleUpdateContextMessage;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getProjectsAndGlobalChanges =
|
3
|
+
exports.getProjectsAndGlobalChanges = getProjectsAndGlobalChanges;
|
4
4
|
const perf_hooks_1 = require("perf_hooks");
|
5
5
|
const project_graph_incremental_recomputation_1 = require("../project-graph-incremental-recomputation");
|
6
6
|
function getProjectsAndGlobalChanges(createdFiles, updatedFiles, deletedFiles) {
|
@@ -42,4 +42,3 @@ function getProjectsAndGlobalChanges(createdFiles, updatedFiles, deletedFiles) {
|
|
42
42
|
perf_hooks_1.performance.measure('changed-projects', 'changed-projects:start', 'changed-projects:end');
|
43
43
|
return projectAndGlobalChanges;
|
44
44
|
}
|
45
|
-
exports.getProjectsAndGlobalChanges = getProjectsAndGlobalChanges;
|
@@ -1,6 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.registeredFileWatcherSockets = void 0;
|
4
|
+
exports.removeRegisteredFileWatcherSocket = removeRegisteredFileWatcherSocket;
|
5
|
+
exports.hasRegisteredFileWatcherSockets = hasRegisteredFileWatcherSockets;
|
6
|
+
exports.notifyFileWatcherSockets = notifyFileWatcherSockets;
|
4
7
|
const find_matching_projects_1 = require("../../../utils/find-matching-projects");
|
5
8
|
const project_graph_utils_1 = require("../../../utils/project-graph-utils");
|
6
9
|
const promised_based_queue_1 = require("../../../utils/promised-based-queue");
|
@@ -12,11 +15,9 @@ exports.registeredFileWatcherSockets = [];
|
|
12
15
|
function removeRegisteredFileWatcherSocket(socket) {
|
13
16
|
exports.registeredFileWatcherSockets = exports.registeredFileWatcherSockets.filter((watcher) => watcher.socket !== socket);
|
14
17
|
}
|
15
|
-
exports.removeRegisteredFileWatcherSocket = removeRegisteredFileWatcherSocket;
|
16
18
|
function hasRegisteredFileWatcherSockets() {
|
17
19
|
return exports.registeredFileWatcherSockets.length > 0;
|
18
20
|
}
|
19
|
-
exports.hasRegisteredFileWatcherSockets = hasRegisteredFileWatcherSockets;
|
20
21
|
function notifyFileWatcherSockets(createdFiles, updatedFiles, deletedFiles) {
|
21
22
|
if (!hasRegisteredFileWatcherSockets()) {
|
22
23
|
return;
|
@@ -63,4 +64,3 @@ function notifyFileWatcherSockets(createdFiles, updatedFiles, deletedFiles) {
|
|
63
64
|
}));
|
64
65
|
});
|
65
66
|
}
|
66
|
-
exports.notifyFileWatcherSockets = notifyFileWatcherSockets;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleContextFileData =
|
3
|
+
exports.handleContextFileData = handleContextFileData;
|
4
4
|
const workspace_context_1 = require("../../utils/workspace-context");
|
5
5
|
const workspace_root_1 = require("../../utils/workspace-root");
|
6
6
|
async function handleContextFileData() {
|
@@ -10,4 +10,3 @@ async function handleContextFileData() {
|
|
10
10
|
description: 'handleContextFileData',
|
11
11
|
};
|
12
12
|
}
|
13
|
-
exports.handleContextFileData = handleContextFileData;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleGetFilesInDirectory =
|
3
|
+
exports.handleGetFilesInDirectory = handleGetFilesInDirectory;
|
4
4
|
const workspace_context_1 = require("../../utils/workspace-context");
|
5
5
|
const workspace_root_1 = require("../../utils/workspace-root");
|
6
6
|
async function handleGetFilesInDirectory(dir) {
|
@@ -10,4 +10,3 @@ async function handleGetFilesInDirectory(dir) {
|
|
10
10
|
description: 'handleNxWorkspaceFiles',
|
11
11
|
};
|
12
12
|
}
|
13
|
-
exports.handleGetFilesInDirectory = handleGetFilesInDirectory;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleGetTaskHistoryForHashes =
|
3
|
+
exports.handleGetTaskHistoryForHashes = handleGetTaskHistoryForHashes;
|
4
4
|
const task_history_1 = require("../../utils/task-history");
|
5
5
|
async function handleGetTaskHistoryForHashes(hashes) {
|
6
6
|
const history = await (0, task_history_1.getHistoryForHashes)(hashes);
|
@@ -9,4 +9,3 @@ async function handleGetTaskHistoryForHashes(hashes) {
|
|
9
9
|
description: 'handleGetTaskHistoryForHashes',
|
10
10
|
};
|
11
11
|
}
|
12
|
-
exports.handleGetTaskHistoryForHashes = handleGetTaskHistoryForHashes;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleGlob =
|
3
|
+
exports.handleGlob = handleGlob;
|
4
4
|
const workspace_root_1 = require("../../utils/workspace-root");
|
5
5
|
const workspace_context_1 = require("../../utils/workspace-context");
|
6
6
|
async function handleGlob(globs, exclude) {
|
@@ -10,4 +10,3 @@ async function handleGlob(globs, exclude) {
|
|
10
10
|
description: 'handleGlob',
|
11
11
|
};
|
12
12
|
}
|
13
|
-
exports.handleGlob = handleGlob;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleHashGlob =
|
3
|
+
exports.handleHashGlob = handleHashGlob;
|
4
4
|
const workspace_root_1 = require("../../utils/workspace-root");
|
5
5
|
const workspace_context_1 = require("../../utils/workspace-context");
|
6
6
|
async function handleHashGlob(globs, exclude) {
|
@@ -10,4 +10,3 @@ async function handleHashGlob(globs, exclude) {
|
|
10
10
|
description: 'handleHashGlob',
|
11
11
|
};
|
12
12
|
}
|
13
|
-
exports.handleHashGlob = handleHashGlob;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleHashTasks =
|
3
|
+
exports.handleHashTasks = handleHashTasks;
|
4
4
|
const project_graph_incremental_recomputation_1 = require("./project-graph-incremental-recomputation");
|
5
5
|
const task_hasher_1 = require("../../hasher/task-hasher");
|
6
6
|
const configuration_1 = require("../../config/configuration");
|
@@ -33,4 +33,3 @@ async function handleHashTasks(payload) {
|
|
33
33
|
description: 'handleHashTasks',
|
34
34
|
};
|
35
35
|
}
|
36
|
-
exports.handleHashTasks = handleHashTasks;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleNxWorkspaceFiles =
|
3
|
+
exports.handleNxWorkspaceFiles = handleNxWorkspaceFiles;
|
4
4
|
const workspace_context_1 = require("../../utils/workspace-context");
|
5
5
|
const workspace_root_1 = require("../../utils/workspace-root");
|
6
6
|
async function handleNxWorkspaceFiles(projectRootMap) {
|
@@ -10,4 +10,3 @@ async function handleNxWorkspaceFiles(projectRootMap) {
|
|
10
10
|
description: 'handleNxWorkspaceFiles',
|
11
11
|
};
|
12
12
|
}
|
13
|
-
exports.handleNxWorkspaceFiles = handleNxWorkspaceFiles;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.handleRecordOutputsHash = handleRecordOutputsHash;
|
4
|
+
exports.handleOutputsHashesMatch = handleOutputsHashesMatch;
|
4
5
|
const outputs_tracking_1 = require("./outputs-tracking");
|
5
6
|
async function handleRecordOutputsHash(payload) {
|
6
7
|
try {
|
@@ -17,7 +18,6 @@ async function handleRecordOutputsHash(payload) {
|
|
17
18
|
};
|
18
19
|
}
|
19
20
|
}
|
20
|
-
exports.handleRecordOutputsHash = handleRecordOutputsHash;
|
21
21
|
async function handleOutputsHashesMatch(payload) {
|
22
22
|
try {
|
23
23
|
const res = await (0, outputs_tracking_1.outputsHashesMatch)(payload.data.outputs, payload.data.hash);
|
@@ -33,4 +33,3 @@ async function handleOutputsHashesMatch(payload) {
|
|
33
33
|
};
|
34
34
|
}
|
35
35
|
}
|
36
|
-
exports.handleOutputsHashesMatch = handleOutputsHashesMatch;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleProcessInBackground =
|
3
|
+
exports.handleProcessInBackground = handleProcessInBackground;
|
4
4
|
const logger_1 = require("./logger");
|
5
5
|
const installation_directory_1 = require("../../utils/installation-directory");
|
6
6
|
async function handleProcessInBackground(payload) {
|
@@ -30,4 +30,3 @@ async function handleProcessInBackground(payload) {
|
|
30
30
|
};
|
31
31
|
}
|
32
32
|
}
|
33
|
-
exports.handleProcessInBackground = handleProcessInBackground;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleRequestProjectGraph =
|
3
|
+
exports.handleRequestProjectGraph = handleRequestProjectGraph;
|
4
4
|
const perf_hooks_1 = require("perf_hooks");
|
5
5
|
const socket_utils_1 = require("../socket-utils");
|
6
6
|
const logger_1 = require("./logger");
|
@@ -34,4 +34,3 @@ async function handleRequestProjectGraph() {
|
|
34
34
|
};
|
35
35
|
}
|
36
36
|
}
|
37
|
-
exports.handleRequestProjectGraph = handleRequestProjectGraph;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleRequestShutdown =
|
3
|
+
exports.handleRequestShutdown = handleRequestShutdown;
|
4
4
|
const shutdown_utils_1 = require("./shutdown-utils");
|
5
5
|
async function handleRequestShutdown(server, numberOfConnections) {
|
6
6
|
// 1 connection is the client asking to shut down
|
@@ -23,4 +23,3 @@ async function handleRequestShutdown(server, numberOfConnections) {
|
|
23
23
|
};
|
24
24
|
}
|
25
25
|
}
|
26
|
-
exports.handleRequestShutdown = handleRequestShutdown;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.handleWriteTaskRunsToHistory =
|
3
|
+
exports.handleWriteTaskRunsToHistory = handleWriteTaskRunsToHistory;
|
4
4
|
const task_history_1 = require("../../utils/task-history");
|
5
5
|
async function handleWriteTaskRunsToHistory(taskRuns) {
|
6
6
|
await (0, task_history_1.writeTaskRunsToHistory)(taskRuns);
|
@@ -9,4 +9,3 @@ async function handleWriteTaskRunsToHistory(taskRuns) {
|
|
9
9
|
description: 'handleWriteTaskRunsToHistory',
|
10
10
|
};
|
11
11
|
}
|
12
|
-
exports.handleWriteTaskRunsToHistory = handleWriteTaskRunsToHistory;
|
@@ -1,6 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports._recordOutputsHash = _recordOutputsHash;
|
4
|
+
exports._outputsHashesMatch = _outputsHashesMatch;
|
5
|
+
exports.recordedHash = recordedHash;
|
6
|
+
exports.recordOutputsHash = recordOutputsHash;
|
7
|
+
exports.outputsHashesMatch = outputsHashesMatch;
|
8
|
+
exports.processFileChangesInOutputs = processFileChangesInOutputs;
|
9
|
+
exports.disableOutputsTracking = disableOutputsTracking;
|
4
10
|
const path_1 = require("path");
|
5
11
|
const native_1 = require("../../native");
|
6
12
|
const collapse_expanded_outputs_1 = require("../../utils/collapse-expanded-outputs");
|
@@ -25,7 +31,6 @@ function _recordOutputsHash(outputs, hash) {
|
|
25
31
|
}
|
26
32
|
}
|
27
33
|
}
|
28
|
-
exports._recordOutputsHash = _recordOutputsHash;
|
29
34
|
function _outputsHashesMatch(outputs, hash) {
|
30
35
|
if (outputs.length !== numberOfExpandedOutputs[hash]) {
|
31
36
|
return false;
|
@@ -39,25 +44,21 @@ function _outputsHashesMatch(outputs, hash) {
|
|
39
44
|
}
|
40
45
|
return true;
|
41
46
|
}
|
42
|
-
exports._outputsHashesMatch = _outputsHashesMatch;
|
43
47
|
function recordedHash(output) {
|
44
48
|
return recordedHashes[output];
|
45
49
|
}
|
46
|
-
exports.recordedHash = recordedHash;
|
47
50
|
async function recordOutputsHash(_outputs, hash) {
|
48
51
|
const outputs = await normalizeOutputs(_outputs);
|
49
52
|
if (disabled)
|
50
53
|
return;
|
51
54
|
_recordOutputsHash(outputs, hash);
|
52
55
|
}
|
53
|
-
exports.recordOutputsHash = recordOutputsHash;
|
54
56
|
async function outputsHashesMatch(_outputs, hash) {
|
55
57
|
const outputs = await normalizeOutputs(_outputs);
|
56
58
|
if (disabled)
|
57
59
|
return false;
|
58
60
|
return _outputsHashesMatch(outputs, hash);
|
59
61
|
}
|
60
|
-
exports.outputsHashesMatch = outputsHashesMatch;
|
61
62
|
async function normalizeOutputs(outputs) {
|
62
63
|
let expandedOutputs = (0, collapse_expanded_outputs_1.collapseExpandedOutputs)((0, native_1.getFilesForOutputs)(workspace_root_1.workspaceRoot, outputs));
|
63
64
|
return expandedOutputs;
|
@@ -87,8 +88,6 @@ function processFileChangesInOutputs(changeEvents, now = undefined) {
|
|
87
88
|
}
|
88
89
|
}
|
89
90
|
}
|
90
|
-
exports.processFileChangesInOutputs = processFileChangesInOutputs;
|
91
91
|
function disableOutputsTracking() {
|
92
92
|
disabled = true;
|
93
93
|
}
|
94
|
-
exports.disableOutputsTracking = disableOutputsTracking;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.getPlugins = getPlugins;
|
4
|
+
exports.cleanupPlugins = cleanupPlugins;
|
4
5
|
const file_hasher_1 = require("../../hasher/file-hasher");
|
5
6
|
const nx_json_1 = require("../../config/nx-json");
|
6
7
|
const internal_api_1 = require("../../project-graph/plugins/internal-api");
|
@@ -26,8 +27,6 @@ async function getPlugins() {
|
|
26
27
|
loadedPlugins = result;
|
27
28
|
return result;
|
28
29
|
}
|
29
|
-
exports.getPlugins = getPlugins;
|
30
30
|
function cleanupPlugins() {
|
31
31
|
cleanup();
|
32
32
|
}
|
33
|
-
exports.cleanupPlugins = cleanupPlugins;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.currentProjectGraph = exports.currentProjectFileMapCache = exports.fileMapWithFiles = void 0;
|
4
|
+
exports.getCachedSerializedProjectGraphPromise = getCachedSerializedProjectGraphPromise;
|
5
|
+
exports.addUpdatedAndDeletedFiles = addUpdatedAndDeletedFiles;
|
4
6
|
const perf_hooks_1 = require("perf_hooks");
|
5
7
|
const nx_json_1 = require("../../config/nx-json");
|
6
8
|
const file_hasher_1 = require("../../hasher/file-hasher");
|
@@ -58,7 +60,6 @@ async function getCachedSerializedProjectGraphPromise() {
|
|
58
60
|
};
|
59
61
|
}
|
60
62
|
}
|
61
|
-
exports.getCachedSerializedProjectGraphPromise = getCachedSerializedProjectGraphPromise;
|
62
63
|
function addUpdatedAndDeletedFiles(createdFiles, updatedFiles, deletedFiles) {
|
63
64
|
for (let f of [...createdFiles, ...updatedFiles]) {
|
64
65
|
collectedDeletedFiles.delete(f);
|
@@ -89,7 +90,6 @@ function addUpdatedAndDeletedFiles(createdFiles, updatedFiles, deletedFiles) {
|
|
89
90
|
}, waitPeriod);
|
90
91
|
}
|
91
92
|
}
|
92
|
-
exports.addUpdatedAndDeletedFiles = addUpdatedAndDeletedFiles;
|
93
93
|
function computeWorkspaceConfigHash(projectsConfigurations) {
|
94
94
|
const projectConfigurationStrings = Object.entries(projectsConfigurations)
|
95
95
|
.sort(([projectNameA], [projectNameB]) => projectNameA.localeCompare(projectNameB))
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.handleResult = handleResult;
|
4
|
+
exports.startServer = startServer;
|
4
5
|
const fs_1 = require("fs");
|
5
6
|
const net_1 = require("net");
|
6
7
|
const path_1 = require("path");
|
@@ -147,7 +148,6 @@ async function handleResult(socket, type, hrFn) {
|
|
147
148
|
const endMark = new Date();
|
148
149
|
logger_1.serverLogger.log(`Handled ${type}. Handling time: ${doneHandlingMark.getTime() - startMark.getTime()}. Response time: ${endMark.getTime() - doneHandlingMark.getTime()}.`);
|
149
150
|
}
|
150
|
-
exports.handleResult = handleResult;
|
151
151
|
function handleInactivityTimeout() {
|
152
152
|
if (numberOfOpenConnections > 0) {
|
153
153
|
logger_1.serverLogger.log(`There are ${numberOfOpenConnections} open connections. Reset inactivity timer.`);
|
@@ -337,4 +337,3 @@ async function startServer() {
|
|
337
337
|
}
|
338
338
|
});
|
339
339
|
}
|
340
|
-
exports.startServer = startServer;
|