@smoothbricks/nx-plugin 0.7.12 → 0.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -27
- package/dist/.build-inputs.json +20 -12
- package/dist/built-output-packages.d.ts +27 -0
- package/dist/built-output-packages.d.ts.map +1 -0
- package/dist/built-output-packages.js +97 -0
- package/dist/cross-check-policy.d.ts +13 -1
- package/dist/cross-check-policy.d.ts.map +1 -1
- package/dist/cross-check-policy.js +13 -1
- package/dist/executors/bounded-exec/admission-queue.d.ts +68 -0
- package/dist/executors/bounded-exec/admission-queue.d.ts.map +1 -0
- package/dist/executors/bounded-exec/admission-queue.js +131 -0
- package/dist/executors/bounded-exec/cpu-grant.d.ts +14 -0
- package/dist/executors/bounded-exec/cpu-grant.d.ts.map +1 -0
- package/dist/executors/bounded-exec/cpu-grant.js +18 -0
- package/dist/executors/bounded-exec/cpu-pool.d.ts +1 -14
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.js +2 -49
- package/dist/executors/bounded-exec/executor.d.ts +5 -12
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +51 -154
- package/dist/executors/bounded-exec/memory-retry.d.ts +39 -0
- package/dist/executors/bounded-exec/memory-retry.d.ts.map +1 -0
- package/dist/executors/bounded-exec/memory-retry.js +33 -0
- package/dist/executors/bounded-exec/parent-grant.d.ts +43 -0
- package/dist/executors/bounded-exec/parent-grant.d.ts.map +1 -0
- package/dist/executors/bounded-exec/parent-grant.js +37 -0
- package/dist/executors/bounded-exec/peak-charge.d.ts +17 -0
- package/dist/executors/bounded-exec/peak-charge.d.ts.map +1 -0
- package/dist/executors/bounded-exec/peak-charge.js +20 -0
- package/dist/executors/bounded-exec/pool-environment.d.ts +25 -0
- package/dist/executors/bounded-exec/pool-environment.d.ts.map +1 -0
- package/dist/executors/bounded-exec/pool-environment.js +34 -0
- package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/run-cpu-pool.js +1 -1
- package/dist/executors/bounded-exec/verdict.d.ts +3 -18
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +4 -25
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +97 -31
- package/dist/managed-files/ci-workflow.d.ts +29 -5
- package/dist/managed-files/ci-workflow.d.ts.map +1 -1
- package/dist/managed-files/ci-workflow.js +111 -16
- package/dist/managed-files/context.d.ts.map +1 -1
- package/dist/managed-files/context.js +1 -0
- package/dist/managed-files/files.d.ts +3 -1
- package/dist/managed-files/files.d.ts.map +1 -1
- package/dist/managed-files/files.js +2 -0
- package/dist/managed-files/publish-workflow.d.ts +6 -1
- package/dist/managed-files/publish-workflow.d.ts.map +1 -1
- package/dist/managed-files/publish-workflow.js +16 -11
- package/dist/owned-installation.d.ts.map +1 -1
- package/dist/owned-installation.js +48 -14
- package/dist/typecheck-route.d.ts +28 -0
- package/dist/typecheck-route.d.ts.map +1 -0
- package/dist/typecheck-route.js +109 -0
- package/dist/workspace-manifest.d.ts +50 -5
- package/dist/workspace-manifest.d.ts.map +1 -1
- package/executors.json +10 -0
- package/managed/raw/patches/ttsc@0.34.1.patch +93 -8
- package/managed/raw/tooling/direnv/apple-developer.sh +8 -1
- package/managed/raw/tooling/direnv/compiler-variables.sh +1 -1
- package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +4 -2
- package/managed/raw/tooling/direnv/secret-references.ts +19 -5
- package/managed/raw/tooling/git-hooks/pre-push.sh +20 -10
- package/managed/templates/github/actions/forgejo-artifact.cjs +9 -9
- package/managed/templates/github/actions/setup-devenv/action.yml +53 -0
- package/package.json +2 -2
- package/src/built-output-packages.ts +125 -0
- package/src/cross-check-policy.ts +14 -1
- package/src/executors/bounded-exec/admission-queue.ts +163 -0
- package/src/executors/bounded-exec/cpu-grant.ts +32 -0
- package/src/executors/bounded-exec/cpu-pool.ts +2 -33
- package/src/executors/bounded-exec/executor.ts +60 -201
- package/src/executors/bounded-exec/memory-retry.ts +63 -0
- package/src/executors/bounded-exec/parent-grant.ts +75 -0
- package/src/executors/bounded-exec/peak-charge.ts +25 -0
- package/src/executors/bounded-exec/pool-environment.ts +45 -0
- package/src/executors/bounded-exec/run-cpu-pool.ts +2 -1
- package/src/executors/bounded-exec/verdict.ts +7 -35
- package/src/index.ts +105 -31
- package/src/managed-files/ci-workflow.ts +143 -16
- package/src/managed-files/context.ts +1 -0
- package/src/managed-files/files.ts +5 -0
- package/src/managed-files/publish-workflow.ts +26 -10
- package/src/owned-installation.ts +63 -14
- package/src/typecheck-route.ts +64 -0
- package/src/workspace-manifest.ts +56 -5
- package/test-timings.json +141 -139
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CpuGrantRecord } from './cpu-grant.js';
|
|
1
2
|
import type { CpuWaitRow } from './lease-wait.js';
|
|
2
3
|
import { type LockWait } from './lock-wait.js';
|
|
3
4
|
import type { MbxQueuedRequest } from './mbx-queue.js';
|
|
@@ -91,14 +92,10 @@ export interface BoundedExecRecord {
|
|
|
91
92
|
/**
|
|
92
93
|
* The parent CPU pool's grant the run started under: tokens granted of those asked for, and
|
|
93
94
|
* how long it waited for the pool. Absent when it ran ungranted. Its tokens are the parallelism the run's
|
|
94
|
-
* `peakBytes` was measured under, which the task's next run reads (`readLastPeak
|
|
95
|
+
* `peakBytes` was measured under, which the task's next run reads (`readLastPeak`, peak-charge.ts) to charge that peak in proportion
|
|
95
96
|
* to the parallelism it is lent.
|
|
96
97
|
*/
|
|
97
|
-
readonly cpu?:
|
|
98
|
-
readonly tokens: number;
|
|
99
|
-
readonly want: number;
|
|
100
|
-
readonly waitedMs: number;
|
|
101
|
-
};
|
|
98
|
+
readonly cpu?: CpuGrantRecord;
|
|
102
99
|
/**
|
|
103
100
|
* The parent CPU pool's wait that expired and refused the run: its code, bound and elapsed time, the last heartbeat
|
|
104
101
|
* sequence it read, and the pool's socket and pid (specs/cowshed/05_gateway.md, "Deadlines"). Absent when no wait
|
|
@@ -231,18 +228,6 @@ export declare function clearTaskDirectory(directory: string): Promise<void>;
|
|
|
231
228
|
export declare function writeRecord(directory: string, record: BoundedExecRecord): Promise<void>;
|
|
232
229
|
/** The record in `directory`, or `null` when there is none. A malformed record throws. */
|
|
233
230
|
export declare function readRecord(directory: string): Promise<BoundedExecRecord | null>;
|
|
234
|
-
/**
|
|
235
|
-
* The peak the task's last record in `directory` names: its charge in its run's pool. Null when the task has no record
|
|
236
|
-
* or its record no peak; a record that cannot be read is an error naming it, never a charge of nothing.
|
|
237
|
-
*/
|
|
238
|
-
export declare function readLastPeak(directory: string): Promise<{
|
|
239
|
-
ok: true;
|
|
240
|
-
peakBytes: number | null;
|
|
241
|
-
parallelism: number | null;
|
|
242
|
-
} | {
|
|
243
|
-
ok: false;
|
|
244
|
-
error: string;
|
|
245
|
-
}>;
|
|
246
231
|
/** The JUnit report a command wrote into `directory`, or `null` when it wrote none. */
|
|
247
232
|
export declare function readJunitReport(directory: string, bunClosed?: (results: readonly NativeTestResult[]) => void): Promise<JunitFailures | null>;
|
|
248
233
|
/** A failed task of an Nx run, and whether its bounded-exec record shows only a bound. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdict.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/verdict.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAmB,KAAK,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,OA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Q,EAAE,eAAe,GAAG,MAAM,CAgBjE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import typia from 'typia';
|
|
4
|
+
import { parseCpuGrant } from './cpu-grant.js';
|
|
4
5
|
import { describeHolders } from './lock-wait.js';
|
|
5
6
|
import { TEST_FAILURES_FILE, TEST_RESULTS_FILE } from './test-results.js';
|
|
6
7
|
const isQueuedVerdict = (() => {
|
|
@@ -321,22 +322,6 @@ export async function readRecord(directory) {
|
|
|
321
322
|
}
|
|
322
323
|
return parseRecord(JSON.parse(text));
|
|
323
324
|
}
|
|
324
|
-
/**
|
|
325
|
-
* The peak the task's last record in `directory` names: its charge in its run's pool. Null when the task has no record
|
|
326
|
-
* or its record no peak; a record that cannot be read is an error naming it, never a charge of nothing.
|
|
327
|
-
*/
|
|
328
|
-
export async function readLastPeak(directory) {
|
|
329
|
-
try {
|
|
330
|
-
const record = await readRecord(directory);
|
|
331
|
-
return { ok: true, peakBytes: record?.peakBytes ?? null, parallelism: record?.cpu?.tokens ?? null };
|
|
332
|
-
}
|
|
333
|
-
catch (error) {
|
|
334
|
-
return {
|
|
335
|
-
ok: false,
|
|
336
|
-
error: `the task's last record ${join(directory, VERDICT_FILE)} cannot be read: ${error instanceof Error ? error.message : String(error)}`,
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
325
|
/** The JUnit report a command wrote into `directory`, or `null` when it wrote none. */
|
|
341
326
|
export async function readJunitReport(directory, bunClosed) {
|
|
342
327
|
try {
|
|
@@ -362,21 +347,15 @@ function parseRecord(value) {
|
|
|
362
347
|
if (!(peakBytes === null || (typeof peakBytes === 'number' && Number.isSafeInteger(peakBytes) && peakBytes >= 0))) {
|
|
363
348
|
throw new Error(`not a bounded-exec record: ${JSON.stringify(value)}`);
|
|
364
349
|
}
|
|
365
|
-
const cpu = value.cpu;
|
|
366
|
-
if (cpu ===
|
|
367
|
-
return { task: value.task, hash: value.hash, verdict: parseVerdict(value.verdict), peakBytes };
|
|
368
|
-
}
|
|
369
|
-
if (!isObject(cpu) ||
|
|
370
|
-
!(typeof cpu.tokens === 'number' && Number.isSafeInteger(cpu.tokens) && cpu.tokens >= 1) ||
|
|
371
|
-
!(typeof cpu.want === 'number' && Number.isSafeInteger(cpu.want) && cpu.want >= 1) ||
|
|
372
|
-
!(typeof cpu.waitedMs === 'number' && Number.isFinite(cpu.waitedMs) && cpu.waitedMs >= 0)) {
|
|
350
|
+
const cpu = parseCpuGrant(value.cpu);
|
|
351
|
+
if (cpu === 'malformed') {
|
|
373
352
|
throw new Error(`not a bounded-exec record: ${JSON.stringify(value)}`);
|
|
374
353
|
}
|
|
375
354
|
return {
|
|
376
355
|
task: value.task,
|
|
377
356
|
hash: value.hash,
|
|
378
357
|
verdict: parseVerdict(value.verdict),
|
|
379
|
-
cpu
|
|
358
|
+
...(cpu === undefined ? {} : { cpu }),
|
|
380
359
|
peakBytes,
|
|
381
360
|
};
|
|
382
361
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,10 @@ export declare const createNodesV2: CreateNodesV2;
|
|
|
43
43
|
*/
|
|
44
44
|
export declare const preTasksExecution: PreTasksExecution<ProducerReceiptsOptions>;
|
|
45
45
|
export declare const postTasksExecution: PostTasksExecution<ProducerReceiptsOptions>;
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* The lock-scope nodes' edges: each bun node's to the packages and members its manifest resolves; and, for a workspace
|
|
48
|
+
* that names built-output packages, the lockfile's package edges (`built-output-packages.ts`).
|
|
49
|
+
*/
|
|
47
50
|
export declare const createDependencies: CreateDependencies;
|
|
48
51
|
/** Nx invokes this only after merging inferred/declarative targets and every plugin's project dependencies. */
|
|
49
52
|
export declare const createMetadata: CreateMetadata;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAGnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAGtB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAGnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAGtB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAqElC,OAAO,EACL,KAAK,uBAAuB,EAG7B,MAAM,wBAAwB,CAAC;AAqBhC,gEAAgE;AAChE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AA0elD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAMtE;AA4aD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,qBAAqB,UAAkC,GACtD,OAAO,CAoBT;AACD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,OAAO,GACjB,MAAM,EAAE,CAKV;AA6JD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAG,aAAa,CAEvG;AAED,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC;AAeF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,uBAAuB,CAQxE,CAAC;AACF,eAAO,MAAM,kBAAkB,EAAE,kBAAkB,CAAC,uBAAuB,CAM1E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAGhC,CAAC;AAEF,+GAA+G;AAC/G,eAAO,MAAM,cAAc,EAAE,cAI5B,CAAC;;;;;;;;;AAiDF,+GAA+G;AAC/G,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM,GACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmCxB"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { AggregateCreateNodesError } from 'nx/src/project-graph/error-types.js';
|
|
|
9
9
|
import { parse as parseToml } from 'smol-toml';
|
|
10
10
|
import { BOUNDED_TEST_IDLE_TIMEOUT_MS, BOUNDED_TEST_KILL_AFTER_MS } from './bounded-test-policy.js';
|
|
11
11
|
import { refuseOverlappingOutputs } from './build-state-output-policy.js';
|
|
12
|
+
import { builtOutputLockfileDependencies, builtOutputLockfileNodes } from './built-output-packages.js';
|
|
12
13
|
import { bunLockDependencies, bunLockInput, bunLockNode } from './bun-lock-scope.js';
|
|
13
14
|
import { CARGO_CLOSURE_INPUT, CARGO_LOCK_NODE_PREFIX, cargoClosureInputs, cargoLockNode, cargoLockNodeName, indexedCargoManifests, isCargoLockInput, resolveCargoClosureSource, } from './cargo-closure-input.js';
|
|
14
15
|
import { CARGO_PRODUCER_METADATA, postTasksExecution as postCargoRetention } from './cargo-retention-hook.js';
|
|
@@ -30,6 +31,7 @@ import { postTasksExecution as postTaskResults, preTasksExecution as preTaskResu
|
|
|
30
31
|
import { SHARD_TIMINGS_EXECUTOR, SHARD_TIMINGS_TARGET, timingsShardedSuite, timingsSuiteInputs, } from './test-timings.js';
|
|
31
32
|
import { assertUpstreamBasePrecondition } from './test-walk-policy.js';
|
|
32
33
|
import { nativeToolCommand, nativeToolDependsOn, resolveNativeTools } from './tool-bins.js';
|
|
34
|
+
import { typecheckRoute } from './typecheck-route.js';
|
|
33
35
|
import { isBuildOutputTargetName, isTestNamespaceTargetName, isTestRunnerTargetName, RELEASE_CONFIGURATION, } from './workspace-config-policy.js';
|
|
34
36
|
import { globIndexedFiles } from './workspace-index.js';
|
|
35
37
|
/** Makes a version live and proves it answers; never cached. */
|
|
@@ -48,21 +50,35 @@ const TYPESCRIPT_PATCH_INPUTS = ['{workspaceRoot}/patches/**/*', '!{workspaceRoo
|
|
|
48
50
|
*/
|
|
49
51
|
const WORKSPACE_TSCONFIG_BASE_INPUT = '{workspaceRoot}/tsconfig.base.json';
|
|
50
52
|
/**
|
|
51
|
-
* The native compiler a typecheck runs
|
|
52
|
-
* from a pinned source revision and exports its path. The typecheck targets run it
|
|
53
|
-
* not through ttsc: ttsc auto-loads a dependency's transform plugin (typia) and then checks
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* variable: falling back would check with another compiler under the same key.
|
|
53
|
+
* The native compiler a typecheck runs unless a dependency declares a dialect (typecheck-route.ts), apart from the one
|
|
54
|
+
* emit runs: devenv.smoo.nix builds it from a pinned source revision and exports its path. The typecheck targets run it
|
|
55
|
+
* directly, not through ttsc: ttsc auto-loads a dependency's transform plugin (typia) and then checks inside that
|
|
56
|
+
* plugin's host, which links ttsc's own compiler and never runs the pinned one. Transform diagnostics stay enforced
|
|
57
|
+
* where the transform runs: for the lib program in `tsc-js`'s emit, for test files when the test runner transforms
|
|
58
|
+
* them. A test file no test executes has its types checked here but its transform calls checked nowhere. Hashed by the
|
|
59
|
+
* store path, which carries the revision, so a compiler bump misses the cache. The command refuses an unset variable:
|
|
60
|
+
* falling back would check with another compiler under the same key.
|
|
60
61
|
*/
|
|
61
62
|
const TYPECHECK_COMPILER_ENV = 'SMOO_TYPECHECK_TSC';
|
|
62
63
|
const TYPECHECK_COMPILER_INPUT = { env: TYPECHECK_COMPILER_ENV };
|
|
63
64
|
function typecheckCommand(args) {
|
|
64
65
|
return `"\${${TYPECHECK_COMPILER_ENV}:?is unset, enter the devenv shell (devenv.smoo.nix builds the typecheck compiler)}" ${args}`;
|
|
65
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* A project's typecheck targets. A project whose direct dependency declares a dialect typechecks through ttsc, whose
|
|
69
|
+
* linked plugin lowers the dialect and withdraws the checker's refusals of it; its compiler is the installed ttsc,
|
|
70
|
+
* which bun.lock and the patches in its check inputs already key, and it waits for the targets the declaring package
|
|
71
|
+
* names to prepare the plugin binaries ttsc loads. Every other project runs the pinned native compiler.
|
|
72
|
+
*/
|
|
73
|
+
function typecheckTargets(packageJsonPath, packageJson) {
|
|
74
|
+
const route = typecheckRoute(packageJsonPath, [
|
|
75
|
+
...Object.keys(packageJson.dependencies ?? {}),
|
|
76
|
+
...Object.keys(packageJson.devDependencies ?? {}),
|
|
77
|
+
]);
|
|
78
|
+
return route.declaredBy.length === 0
|
|
79
|
+
? { command: typecheckCommand, inputs: [TYPECHECK_COMPILER_INPUT], dependsOn: [] }
|
|
80
|
+
: { command: (args) => `ttsc ${args}`, inputs: [], dependsOn: route.dependsOn };
|
|
81
|
+
}
|
|
66
82
|
/**
|
|
67
83
|
* The release-rewritten root manifest hashed by field instead of by byte, for
|
|
68
84
|
* a check that only reads it.
|
|
@@ -73,17 +89,36 @@ function typecheckCommand(args) {
|
|
|
73
89
|
* node and the project's through its `^` input, so a release's rewrite of the
|
|
74
90
|
* lockfile's `workspaces` mirror re-keys nothing.
|
|
75
91
|
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
92
|
+
* No check reads the root's scripts, developer-link configuration or Nx
|
|
93
|
+
* configuration; Nx already hashes the resolved project configuration. Nor
|
|
94
|
+
* does a check read install-only dependency ranges, overrides or catalogs:
|
|
95
|
+
* the bun lock-scope nodes key the installed packages they resolve to, and
|
|
96
|
+
* patch files key the patch bytes. Keeping those pins here would re-key every
|
|
97
|
+
* check on a catalog bump even when a built-output package's bytes agree.
|
|
98
|
+
* Resolution fields (type, imports, exports) and workspace member patterns
|
|
99
|
+
* remain inputs; only the catalogs nested beside those patterns are dropped.
|
|
84
100
|
*/
|
|
85
101
|
const VERSIONLESS_TOOLCHAIN_MANIFEST_INPUTS = [
|
|
86
|
-
{
|
|
102
|
+
{
|
|
103
|
+
json: '{workspaceRoot}/package.json',
|
|
104
|
+
excludeFields: [
|
|
105
|
+
'version',
|
|
106
|
+
'scripts',
|
|
107
|
+
'smoo',
|
|
108
|
+
'nx',
|
|
109
|
+
'dependencies',
|
|
110
|
+
'devDependencies',
|
|
111
|
+
'optionalDependencies',
|
|
112
|
+
'peerDependencies',
|
|
113
|
+
'overrides',
|
|
114
|
+
'resolutions',
|
|
115
|
+
'patchedDependencies',
|
|
116
|
+
'catalog',
|
|
117
|
+
'catalogs',
|
|
118
|
+
'workspaces.catalog',
|
|
119
|
+
'workspaces.catalogs',
|
|
120
|
+
],
|
|
121
|
+
},
|
|
87
122
|
];
|
|
88
123
|
/** A path segment Nx's workspace file map never carries, so a fileset naming it hashes nothing. */
|
|
89
124
|
const NODE_MODULES_SEGMENT = /(?:^|\/)node_modules(?:\/|$)/;
|
|
@@ -888,12 +923,13 @@ function supportsJsonInputs() {
|
|
|
888
923
|
return major > minimumMajor || (major === minimumMajor && minor >= minimumMinor);
|
|
889
924
|
}
|
|
890
925
|
function createNodesHandler(hostPlatform) {
|
|
891
|
-
return async (projectConfigurationFiles,
|
|
926
|
+
return async (projectConfigurationFiles, options, context) => {
|
|
892
927
|
const results = [];
|
|
893
928
|
const errors = [];
|
|
894
929
|
let cargoWorkspaces;
|
|
895
930
|
let eslint;
|
|
896
931
|
let nativeTools;
|
|
932
|
+
let lockfileNodes;
|
|
897
933
|
try {
|
|
898
934
|
cargoWorkspaces = await resolveCargoWorkspaces(projectConfigurationFiles, context.workspaceRoot, hostPlatform);
|
|
899
935
|
eslint = await eslintWorkspace(context.workspaceRoot);
|
|
@@ -901,6 +937,7 @@ function createNodesHandler(hostPlatform) {
|
|
|
901
937
|
hostPlatform === null
|
|
902
938
|
? null
|
|
903
939
|
: await resolveNativeTools(context.workspaceRoot, projectConfigurationFiles, EXECUTABLE_PLATFORM_DIRECTORY[hostPlatform.targetFamily][hostPlatform.architecture], scriptcTargetName(hostPlatform));
|
|
940
|
+
lockfileNodes = builtOutputLockfileNodes(options, context);
|
|
904
941
|
}
|
|
905
942
|
catch (error) {
|
|
906
943
|
throw new AggregateCreateNodesError([[null, error instanceof Error ? error : new Error(String(error))]], results);
|
|
@@ -927,6 +964,21 @@ function createNodesHandler(hostPlatform) {
|
|
|
927
964
|
errors.push([packageJsonPath, error instanceof Error ? error : new Error(String(error))]);
|
|
928
965
|
}
|
|
929
966
|
}));
|
|
967
|
+
// The root manifest's result carries the lockfile's package nodes, as it carries the root's lock-scope node.
|
|
968
|
+
if (Object.keys(lockfileNodes).length > 0) {
|
|
969
|
+
const rootIndex = results.findIndex(([file]) => file === 'package.json');
|
|
970
|
+
const rootResult = results[rootIndex];
|
|
971
|
+
if (rootResult === undefined) {
|
|
972
|
+
errors.push([
|
|
973
|
+
null,
|
|
974
|
+
new Error('builtOutputPackages needs a root package.json to publish the lockfile nodes on'),
|
|
975
|
+
]);
|
|
976
|
+
}
|
|
977
|
+
else {
|
|
978
|
+
const [file, result] = rootResult;
|
|
979
|
+
results[rootIndex] = [file, { ...result, externalNodes: { ...lockfileNodes, ...result.externalNodes } }];
|
|
980
|
+
}
|
|
981
|
+
}
|
|
930
982
|
if (errors.length > 0) {
|
|
931
983
|
throw new AggregateCreateNodesError(errors, results);
|
|
932
984
|
}
|
|
@@ -975,8 +1027,14 @@ export const postTasksExecution = async (options, context) => {
|
|
|
975
1027
|
await closeRunReservations(context);
|
|
976
1028
|
await postCargoRetention(options, context);
|
|
977
1029
|
};
|
|
978
|
-
/**
|
|
979
|
-
|
|
1030
|
+
/**
|
|
1031
|
+
* The lock-scope nodes' edges: each bun node's to the packages and members its manifest resolves; and, for a workspace
|
|
1032
|
+
* that names built-output packages, the lockfile's package edges (`built-output-packages.ts`).
|
|
1033
|
+
*/
|
|
1034
|
+
export const createDependencies = (options, context) => [
|
|
1035
|
+
...bunLockDependencies(context),
|
|
1036
|
+
...builtOutputLockfileDependencies(options, context),
|
|
1037
|
+
];
|
|
980
1038
|
/** Nx invokes this only after merging inferred/declarative targets and every plugin's project dependencies. */
|
|
981
1039
|
export const createMetadata = (graph, _options, context) => {
|
|
982
1040
|
refuseOverlappingOutputs(graph, context.workspaceRoot);
|
|
@@ -1233,6 +1291,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1233
1291
|
const projectRoot = dirname(packageJsonPath);
|
|
1234
1292
|
const absoluteProjectRoot = join(workspaceRoot, projectRoot);
|
|
1235
1293
|
const packageJson = await readPackageJson(join(workspaceRoot, packageJsonPath));
|
|
1294
|
+
const typecheck = typecheckTargets(join(workspaceRoot, packageJsonPath), packageJson);
|
|
1236
1295
|
const projectName = packageJson.nx?.name ?? packageJson.name;
|
|
1237
1296
|
if (typeof projectName !== 'string' || projectName.length === 0) {
|
|
1238
1297
|
throw new Error(`${packageJsonPath} must declare a non-empty package or nx project name`);
|
|
@@ -1261,7 +1320,13 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1261
1320
|
const crateInputs = versionless !== null && hasCrateManifests ? await versionlessCrateInputs(projectRoot, workspaceRoot) : [];
|
|
1262
1321
|
const versionlessProjectInputs = versionless === null
|
|
1263
1322
|
? []
|
|
1264
|
-
: [
|
|
1323
|
+
: [
|
|
1324
|
+
...(projectRoot === '.'
|
|
1325
|
+
? ['!{projectRoot}/package.json', ...VERSIONLESS_TOOLCHAIN_MANIFEST_INPUTS]
|
|
1326
|
+
: VERSIONLESS_PACKAGE_INPUTS),
|
|
1327
|
+
...crateInputs,
|
|
1328
|
+
...(projectRoot === '.' ? ROOT_LOCKFILE_EXCLUSIONS : []),
|
|
1329
|
+
];
|
|
1265
1330
|
// The options a TypeScript task's answer really depends on, which is the
|
|
1266
1331
|
// whole `extends` chain of the configs its commands name and not just those
|
|
1267
1332
|
// two files. Resolved once per project: every target below shares it.
|
|
@@ -1318,13 +1383,13 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1318
1383
|
selfProduction,
|
|
1319
1384
|
dependencyProduction,
|
|
1320
1385
|
...checkInputs,
|
|
1321
|
-
|
|
1386
|
+
...typecheck.inputs,
|
|
1322
1387
|
'{projectRoot}/tsconfig.lib.json',
|
|
1323
1388
|
],
|
|
1324
1389
|
outputs: [],
|
|
1325
|
-
dependsOn: ['^*-js', ...(cargoWasmConfig ? ['cargo-wasm'] : [])],
|
|
1390
|
+
dependsOn: ['^*-js', ...(cargoWasmConfig ? ['cargo-wasm'] : []), ...typecheck.dependsOn],
|
|
1326
1391
|
options: {
|
|
1327
|
-
command:
|
|
1392
|
+
command: typecheck.command('-p tsconfig.lib.json --noEmit'),
|
|
1328
1393
|
cwd: projectRoot,
|
|
1329
1394
|
},
|
|
1330
1395
|
};
|
|
@@ -1338,12 +1403,12 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1338
1403
|
selfDefault,
|
|
1339
1404
|
dependencyProduction,
|
|
1340
1405
|
...checkInputs,
|
|
1341
|
-
|
|
1406
|
+
...typecheck.inputs,
|
|
1342
1407
|
'{projectRoot}/tsconfig.test.json',
|
|
1343
1408
|
],
|
|
1344
|
-
dependsOn: ['typecheck'],
|
|
1409
|
+
dependsOn: ['typecheck', ...typecheck.dependsOn],
|
|
1345
1410
|
options: {
|
|
1346
|
-
command:
|
|
1411
|
+
command: typecheck.command('-p tsconfig.test.json --noEmit'),
|
|
1347
1412
|
cwd: projectRoot,
|
|
1348
1413
|
},
|
|
1349
1414
|
};
|
|
@@ -1351,7 +1416,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1351
1416
|
executor: 'nx:run-commands',
|
|
1352
1417
|
continuous: true,
|
|
1353
1418
|
options: {
|
|
1354
|
-
command:
|
|
1419
|
+
command: typecheck.command('-p tsconfig.test.json --noEmit --watch'),
|
|
1355
1420
|
cwd: projectRoot,
|
|
1356
1421
|
},
|
|
1357
1422
|
};
|
|
@@ -1877,10 +1942,10 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1877
1942
|
// Test configs may resolve the package's own `./index.js` through dist, so the
|
|
1878
1943
|
// current-project declaration output is rebuilt first, not only the
|
|
1879
1944
|
// dependency-project outputs reached through typecheck.
|
|
1880
|
-
targets['typecheck-tests'].dependsOn = ['tsc-js', 'typecheck'];
|
|
1945
|
+
targets['typecheck-tests'].dependsOn = ['tsc-js', 'typecheck', ...typecheck.dependsOn];
|
|
1881
1946
|
}
|
|
1882
1947
|
else if (targets.build) {
|
|
1883
|
-
targets['typecheck-tests'].dependsOn = ['build'];
|
|
1948
|
+
targets['typecheck-tests'].dependsOn = ['build', ...typecheck.dependsOn];
|
|
1884
1949
|
}
|
|
1885
1950
|
}
|
|
1886
1951
|
// A Bun suite that `--shard` splits and a `--timings` manifest balances gets a
|
|
@@ -2400,6 +2465,7 @@ async function readPackageJson(packageJsonPath) {
|
|
|
2400
2465
|
const rawNx = isRecord(parsed.nx) ? parsed.nx : undefined;
|
|
2401
2466
|
return {
|
|
2402
2467
|
...('bin' in parsed ? { bin: parsed.bin } : {}),
|
|
2468
|
+
...(isRecord(parsed.dependencies) ? { dependencies: parsed.dependencies } : {}),
|
|
2403
2469
|
...(isRecord(parsed.devDependencies) ? { devDependencies: parsed.devDependencies } : {}),
|
|
2404
2470
|
...(typeof parsed.name === 'string' ? { name: parsed.name } : {}),
|
|
2405
2471
|
...(isRecord(parsed.napi) ? { napi: parsed.napi } : {}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NonEmptyArray, PackageCargoCredentialsConfig, PackagePrivateNpmConfig, PackageRemoteCacheConfig, PackageSmooGithub, PackageSmooGithubEnvironments, PackageSourceCheckoutConfig } from '../workspace-manifest.js';
|
|
1
|
+
import type { NonEmptyArray, PackageCargoCredentialsConfig, PackageMbxRemoteConfig, PackagePrivateNpmConfig, PackageRemoteCacheConfig, PackageSmooGithub, PackageSmooGithubEnvironments, PackageSourceCheckoutConfig } from '../workspace-manifest.js';
|
|
2
2
|
export declare const githubActionPins: Readonly<Record<'checkout' | 'nxSetShas' | 'cacheSave' | 'uploadArtifact' | 'downloadArtifact', {
|
|
3
3
|
readonly ref: string;
|
|
4
4
|
readonly version: string;
|
|
@@ -94,6 +94,11 @@ export interface CiWorkflowDefinitionOptions extends DeployStepSecretConfig {
|
|
|
94
94
|
* cache serves the whole fleet. Absent means each runner caches locally.
|
|
95
95
|
*/
|
|
96
96
|
remoteCache?: PackageRemoteCacheConfig;
|
|
97
|
+
/**
|
|
98
|
+
* Declared mbx remote cache (package.json `smoo.mbxRemote`). Every job carries mbx's remote settings, which is
|
|
99
|
+
* what makes setup-devenv route Cargo through mbx. Absent means Cargo builds without mbx.
|
|
100
|
+
*/
|
|
101
|
+
mbxRemote?: PackageMbxRemoteConfig;
|
|
97
102
|
/** GitHub Environments: staging for the validate/e2e jobs, production for the production-on-push job. */
|
|
98
103
|
environments?: PackageSmooGithubEnvironments;
|
|
99
104
|
/** Secrets for the e2e-deployment step, env var name → repository secret name. */
|
|
@@ -179,14 +184,33 @@ export declare function normalizeSourceCheckout(config: PackageSourceCheckoutCon
|
|
|
179
184
|
* fail every task on 401, which is why the job carries the same fork-PR gate
|
|
180
185
|
* as a private dependency install (see `renderCiWorkflowHeader`).
|
|
181
186
|
*
|
|
182
|
-
* A declared `internalServer` is the address
|
|
183
|
-
*
|
|
184
|
-
*
|
|
187
|
+
* A declared `internalServer` is the address the repository's own runners use, exactly as a git origin's
|
|
188
|
+
* `internalMirror` is: both say those runners sit inside that network. A job on any other runner — a GitHub-hosted
|
|
189
|
+
* one, a macOS label — sits outside it and reaches the public `server`, as a developer shell does. Each job names
|
|
190
|
+
* its reach, so no job is pointed at an address its runner cannot route to.
|
|
185
191
|
* Mechanism errors surface at managed-file render time, never inside CI.
|
|
186
192
|
*/
|
|
187
|
-
export declare function remoteCacheJobEnvLines(config: PackageRemoteCacheConfig | undefined): string;
|
|
193
|
+
export declare function remoteCacheJobEnvLines(config: PackageRemoteCacheConfig | undefined, reach: CacheReach): string;
|
|
194
|
+
/**
|
|
195
|
+
* Which origin of a declared remote cache a job reaches: `internal` for a job on the repository's own runners
|
|
196
|
+
* (`smoo.github.runsOn`), inside the network `internalServer` names; `public` for any other runner, which reaches
|
|
197
|
+
* only `server`.
|
|
198
|
+
*/
|
|
199
|
+
export type CacheReach = 'internal' | 'public';
|
|
188
200
|
/** Mechanism errors surface at managed-file render time, never inside CI. */
|
|
189
201
|
export declare function normalizeRemoteCache(config: PackageRemoteCacheConfig): PackageRemoteCacheConfig;
|
|
202
|
+
/**
|
|
203
|
+
* Job env lines carrying the declared mbx remote cache (`smoo.mbxRemote`). setup-devenv routes Cargo through mbx's
|
|
204
|
+
* Cargo shim when `MBX_REMOTE_URL` is set, so these lines are what turn mbx on for the job; `reach` picks the origin
|
|
205
|
+
* exactly as for the Nx cache. The token is chosen by lane: the write token and `MBX_REMOTE_TRUST_WRITES` on the
|
|
206
|
+
* default branch's own runs, the read-only token everywhere else. mbx's own write policy cannot make that call here:
|
|
207
|
+
* it requires `GITHUB_REF_PROTECTED`, which Forgejo Actions never sets, and it reads a release's `workflow_dispatch`
|
|
208
|
+
* as untrusted. The server's grant on the token is what stops any other job publishing.
|
|
209
|
+
* Mechanism errors surface at managed-file render time, never inside CI.
|
|
210
|
+
*/
|
|
211
|
+
export declare function mbxRemoteJobEnvLines(config: PackageMbxRemoteConfig | undefined, reach: CacheReach): string;
|
|
212
|
+
/** Mechanism errors surface at managed-file render time, never inside CI. */
|
|
213
|
+
export declare function normalizeMbxRemote(config: PackageMbxRemoteConfig): PackageMbxRemoteConfig;
|
|
190
214
|
/**
|
|
191
215
|
* Job env lines carrying the declared Cargo credential secrets. Both registry
|
|
192
216
|
* tokens and git-origin tokens ride the job env so the credential helper is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-workflow.d.ts","sourceRoot":"","sources":["../../src/managed-files/ci-workflow.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ci-workflow.d.ts","sourceRoot":"","sources":["../../src/managed-files/ci-workflow.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,aAAa,EACb,6BAA6B,EAE7B,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,6BAA6B,EAC7B,2BAA2B,EAE5B,MAAM,0BAA0B,CAAC;AAGlC,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CACrC,MAAM,CACJ,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,EAC9E;IACE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CACF,CAsBF,CAAC;AAEF,oBAAY,kBAAkB;IAC5B,QAAQ,aAAa;IACrB,eAAe,qBAAqB;IACpC,WAAW,iBAAiB;IAC5B,gBAAgB,sBAAsB;IACtC,SAAS,gBAAgB;IACzB,cAAc,qBAAqB;IACnC,KAAK,UAAU;IACf,YAAY,kBAAkB;IAC9B,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,uBAAuB,8BAA8B;IACrD,iBAAiB,wBAAwB;IACzC,uBAAuB,+BAA+B;IACtD,yBAAyB,iCAAiC;IAC1D,UAAU,gBAAgB;IAC1B,iBAAiB,wBAAwB;IACzC,oBAAoB,2BAA2B;IAC/C,MAAM,WAAW;IACjB,WAAW,kBAAkB;IAC7B,cAAc,qBAAqB;IACnC,aAAa,oBAAoB;CAClC;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