@smoothbricks/nx-plugin 0.7.11 → 0.7.13
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 +87 -25
- package/dist/.build-inputs.json +25 -17
- 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-thread.d.ts +5 -4
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.d.ts +26 -24
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.js +88 -72
- package/dist/executors/bounded-exec/executor.d.ts +5 -7
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +69 -133
- package/dist/executors/bounded-exec/host-memory.d.ts +22 -0
- package/dist/executors/bounded-exec/host-memory.d.ts.map +1 -1
- package/dist/executors/bounded-exec/host-memory.darwin.d.ts.map +1 -1
- package/dist/executors/bounded-exec/host-memory.darwin.js +7 -1
- package/dist/executors/bounded-exec/host-memory.js +6 -0
- package/dist/executors/bounded-exec/host-memory.linux.d.ts +3 -1
- package/dist/executors/bounded-exec/host-memory.linux.d.ts.map +1 -1
- package/dist/executors/bounded-exec/host-memory.linux.js +43 -1
- 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-admission.d.ts +31 -7
- package/dist/executors/bounded-exec/pool-admission.d.ts.map +1 -1
- package/dist/executors/bounded-exec/pool-admission.js +44 -8
- 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 +2 -2
- package/dist/executors/bounded-exec/verdict.d.ts +5 -18
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +12 -16
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -21
- 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/nx@24.0.3.patch +16 -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-thread.ts +5 -4
- package/src/executors/bounded-exec/cpu-pool.ts +123 -58
- package/src/executors/bounded-exec/executor.ts +93 -168
- package/src/executors/bounded-exec/host-memory.darwin.ts +7 -1
- package/src/executors/bounded-exec/host-memory.linux.ts +42 -2
- package/src/executors/bounded-exec/host-memory.ts +25 -0
- 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-admission.ts +66 -11
- package/src/executors/bounded-exec/pool-environment.ts +45 -0
- package/src/executors/bounded-exec/run-cpu-pool.ts +5 -4
- package/src/executors/bounded-exec/verdict.ts +17 -25
- package/src/index.ts +70 -21
- 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 -137
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.
|
|
@@ -888,12 +904,13 @@ function supportsJsonInputs() {
|
|
|
888
904
|
return major > minimumMajor || (major === minimumMajor && minor >= minimumMinor);
|
|
889
905
|
}
|
|
890
906
|
function createNodesHandler(hostPlatform) {
|
|
891
|
-
return async (projectConfigurationFiles,
|
|
907
|
+
return async (projectConfigurationFiles, options, context) => {
|
|
892
908
|
const results = [];
|
|
893
909
|
const errors = [];
|
|
894
910
|
let cargoWorkspaces;
|
|
895
911
|
let eslint;
|
|
896
912
|
let nativeTools;
|
|
913
|
+
let lockfileNodes;
|
|
897
914
|
try {
|
|
898
915
|
cargoWorkspaces = await resolveCargoWorkspaces(projectConfigurationFiles, context.workspaceRoot, hostPlatform);
|
|
899
916
|
eslint = await eslintWorkspace(context.workspaceRoot);
|
|
@@ -901,6 +918,7 @@ function createNodesHandler(hostPlatform) {
|
|
|
901
918
|
hostPlatform === null
|
|
902
919
|
? null
|
|
903
920
|
: await resolveNativeTools(context.workspaceRoot, projectConfigurationFiles, EXECUTABLE_PLATFORM_DIRECTORY[hostPlatform.targetFamily][hostPlatform.architecture], scriptcTargetName(hostPlatform));
|
|
921
|
+
lockfileNodes = builtOutputLockfileNodes(options, context);
|
|
904
922
|
}
|
|
905
923
|
catch (error) {
|
|
906
924
|
throw new AggregateCreateNodesError([[null, error instanceof Error ? error : new Error(String(error))]], results);
|
|
@@ -927,6 +945,21 @@ function createNodesHandler(hostPlatform) {
|
|
|
927
945
|
errors.push([packageJsonPath, error instanceof Error ? error : new Error(String(error))]);
|
|
928
946
|
}
|
|
929
947
|
}));
|
|
948
|
+
// The root manifest's result carries the lockfile's package nodes, as it carries the root's lock-scope node.
|
|
949
|
+
if (Object.keys(lockfileNodes).length > 0) {
|
|
950
|
+
const rootIndex = results.findIndex(([file]) => file === 'package.json');
|
|
951
|
+
const rootResult = results[rootIndex];
|
|
952
|
+
if (rootResult === undefined) {
|
|
953
|
+
errors.push([
|
|
954
|
+
null,
|
|
955
|
+
new Error('builtOutputPackages needs a root package.json to publish the lockfile nodes on'),
|
|
956
|
+
]);
|
|
957
|
+
}
|
|
958
|
+
else {
|
|
959
|
+
const [file, result] = rootResult;
|
|
960
|
+
results[rootIndex] = [file, { ...result, externalNodes: { ...lockfileNodes, ...result.externalNodes } }];
|
|
961
|
+
}
|
|
962
|
+
}
|
|
930
963
|
if (errors.length > 0) {
|
|
931
964
|
throw new AggregateCreateNodesError(errors, results);
|
|
932
965
|
}
|
|
@@ -975,8 +1008,14 @@ export const postTasksExecution = async (options, context) => {
|
|
|
975
1008
|
await closeRunReservations(context);
|
|
976
1009
|
await postCargoRetention(options, context);
|
|
977
1010
|
};
|
|
978
|
-
/**
|
|
979
|
-
|
|
1011
|
+
/**
|
|
1012
|
+
* The lock-scope nodes' edges: each bun node's to the packages and members its manifest resolves; and, for a workspace
|
|
1013
|
+
* that names built-output packages, the lockfile's package edges (`built-output-packages.ts`).
|
|
1014
|
+
*/
|
|
1015
|
+
export const createDependencies = (options, context) => [
|
|
1016
|
+
...bunLockDependencies(context),
|
|
1017
|
+
...builtOutputLockfileDependencies(options, context),
|
|
1018
|
+
];
|
|
980
1019
|
/** Nx invokes this only after merging inferred/declarative targets and every plugin's project dependencies. */
|
|
981
1020
|
export const createMetadata = (graph, _options, context) => {
|
|
982
1021
|
refuseOverlappingOutputs(graph, context.workspaceRoot);
|
|
@@ -1233,6 +1272,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1233
1272
|
const projectRoot = dirname(packageJsonPath);
|
|
1234
1273
|
const absoluteProjectRoot = join(workspaceRoot, projectRoot);
|
|
1235
1274
|
const packageJson = await readPackageJson(join(workspaceRoot, packageJsonPath));
|
|
1275
|
+
const typecheck = typecheckTargets(join(workspaceRoot, packageJsonPath), packageJson);
|
|
1236
1276
|
const projectName = packageJson.nx?.name ?? packageJson.name;
|
|
1237
1277
|
if (typeof projectName !== 'string' || projectName.length === 0) {
|
|
1238
1278
|
throw new Error(`${packageJsonPath} must declare a non-empty package or nx project name`);
|
|
@@ -1318,13 +1358,13 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1318
1358
|
selfProduction,
|
|
1319
1359
|
dependencyProduction,
|
|
1320
1360
|
...checkInputs,
|
|
1321
|
-
|
|
1361
|
+
...typecheck.inputs,
|
|
1322
1362
|
'{projectRoot}/tsconfig.lib.json',
|
|
1323
1363
|
],
|
|
1324
1364
|
outputs: [],
|
|
1325
|
-
dependsOn: ['^*-js', ...(cargoWasmConfig ? ['cargo-wasm'] : [])],
|
|
1365
|
+
dependsOn: ['^*-js', ...(cargoWasmConfig ? ['cargo-wasm'] : []), ...typecheck.dependsOn],
|
|
1326
1366
|
options: {
|
|
1327
|
-
command:
|
|
1367
|
+
command: typecheck.command('-p tsconfig.lib.json --noEmit'),
|
|
1328
1368
|
cwd: projectRoot,
|
|
1329
1369
|
},
|
|
1330
1370
|
};
|
|
@@ -1338,12 +1378,12 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1338
1378
|
selfDefault,
|
|
1339
1379
|
dependencyProduction,
|
|
1340
1380
|
...checkInputs,
|
|
1341
|
-
|
|
1381
|
+
...typecheck.inputs,
|
|
1342
1382
|
'{projectRoot}/tsconfig.test.json',
|
|
1343
1383
|
],
|
|
1344
|
-
dependsOn: ['typecheck'],
|
|
1384
|
+
dependsOn: ['typecheck', ...typecheck.dependsOn],
|
|
1345
1385
|
options: {
|
|
1346
|
-
command:
|
|
1386
|
+
command: typecheck.command('-p tsconfig.test.json --noEmit'),
|
|
1347
1387
|
cwd: projectRoot,
|
|
1348
1388
|
},
|
|
1349
1389
|
};
|
|
@@ -1351,7 +1391,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1351
1391
|
executor: 'nx:run-commands',
|
|
1352
1392
|
continuous: true,
|
|
1353
1393
|
options: {
|
|
1354
|
-
command:
|
|
1394
|
+
command: typecheck.command('-p tsconfig.test.json --noEmit --watch'),
|
|
1355
1395
|
cwd: projectRoot,
|
|
1356
1396
|
},
|
|
1357
1397
|
};
|
|
@@ -1877,10 +1917,10 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
|
|
|
1877
1917
|
// Test configs may resolve the package's own `./index.js` through dist, so the
|
|
1878
1918
|
// current-project declaration output is rebuilt first, not only the
|
|
1879
1919
|
// dependency-project outputs reached through typecheck.
|
|
1880
|
-
targets['typecheck-tests'].dependsOn = ['tsc-js', 'typecheck'];
|
|
1920
|
+
targets['typecheck-tests'].dependsOn = ['tsc-js', 'typecheck', ...typecheck.dependsOn];
|
|
1881
1921
|
}
|
|
1882
1922
|
else if (targets.build) {
|
|
1883
|
-
targets['typecheck-tests'].dependsOn = ['build'];
|
|
1923
|
+
targets['typecheck-tests'].dependsOn = ['build', ...typecheck.dependsOn];
|
|
1884
1924
|
}
|
|
1885
1925
|
}
|
|
1886
1926
|
// A Bun suite that `--shard` splits and a `--timings` manifest balances gets a
|
|
@@ -2400,6 +2440,7 @@ async function readPackageJson(packageJsonPath) {
|
|
|
2400
2440
|
const rawNx = isRecord(parsed.nx) ? parsed.nx : undefined;
|
|
2401
2441
|
return {
|
|
2402
2442
|
...('bin' in parsed ? { bin: parsed.bin } : {}),
|
|
2443
|
+
...(isRecord(parsed.dependencies) ? { dependencies: parsed.dependencies } : {}),
|
|
2403
2444
|
...(isRecord(parsed.devDependencies) ? { devDependencies: parsed.devDependencies } : {}),
|
|
2404
2445
|
...(typeof parsed.name === 'string' ? { name: parsed.name } : {}),
|
|
2405
2446
|
...(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,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E,QAAQ,GAAG,UAAU,EAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,SAAS,SAAc,GACtB,MAAM,EAAE,CAkBV"}
|
|
@@ -153,7 +153,10 @@ jobs:
|
|
|
153
153
|
name: Validate
|
|
154
154
|
${renderRunsOnLine(options.runsOn)}
|
|
155
155
|
timeout-minutes: 45
|
|
156
|
-
${options.privateNpm?.readTokenEnv ||
|
|
156
|
+
${options.privateNpm?.readTokenEnv ||
|
|
157
|
+
options.cargoCredentials !== undefined ||
|
|
158
|
+
options.remoteCache !== undefined ||
|
|
159
|
+
options.mbxRemote !== undefined
|
|
157
160
|
? ` # Fork PRs receive no secrets, so neither a private dependency install nor an
|
|
158
161
|
# authenticated remote cache read can run there.
|
|
159
162
|
if: \${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
|
@@ -164,7 +167,7 @@ ${options.privateNpm?.readTokenEnv || options.cargoCredentials !== undefined ||
|
|
|
164
167
|
`
|
|
165
168
|
: ''} env:
|
|
166
169
|
GH_TOKEN: ${githubExpression('github.token')}
|
|
167
|
-
${remoteCacheJobEnvLines(options.remoteCache)}${cargoCredentialJobEnvLines(options.cargoCredentials)}${privateNpmReadTokenJobEnv(options)} steps:
|
|
170
|
+
${remoteCacheJobEnvLines(options.remoteCache, 'internal')}${mbxRemoteJobEnvLines(options.mbxRemote, 'internal')}${cargoCredentialJobEnvLines(options.cargoCredentials)}${privateNpmReadTokenJobEnv(options)} steps:
|
|
168
171
|
`;
|
|
169
172
|
}
|
|
170
173
|
function githubExpression(expression) {
|
|
@@ -486,28 +489,46 @@ export function normalizeSourceCheckout(config) {
|
|
|
486
489
|
* fail every task on 401, which is why the job carries the same fork-PR gate
|
|
487
490
|
* as a private dependency install (see `renderCiWorkflowHeader`).
|
|
488
491
|
*
|
|
489
|
-
* A declared `internalServer` is the address
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
+
* A declared `internalServer` is the address the repository's own runners use, exactly as a git origin's
|
|
493
|
+
* `internalMirror` is: both say those runners sit inside that network. A job on any other runner — a GitHub-hosted
|
|
494
|
+
* one, a macOS label — sits outside it and reaches the public `server`, as a developer shell does. Each job names
|
|
495
|
+
* its reach, so no job is pointed at an address its runner cannot route to.
|
|
492
496
|
* Mechanism errors surface at managed-file render time, never inside CI.
|
|
493
497
|
*/
|
|
494
|
-
export function remoteCacheJobEnvLines(config) {
|
|
498
|
+
export function remoteCacheJobEnvLines(config, reach) {
|
|
495
499
|
if (config === undefined) {
|
|
496
500
|
return '';
|
|
497
501
|
}
|
|
498
502
|
const normalized = normalizeRemoteCache(config);
|
|
503
|
+
const server = reach === 'internal' ? (normalized.internalServer ?? publicCacheOrigin(normalized)) : publicCacheOrigin(normalized);
|
|
499
504
|
return [
|
|
500
|
-
` NX_SELF_HOSTED_REMOTE_CACHE_SERVER: ${
|
|
505
|
+
` NX_SELF_HOSTED_REMOTE_CACHE_SERVER: ${server}\n`,
|
|
501
506
|
` NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN: ${githubExpression(`secrets.${normalized.tokenSecret}`)}\n`,
|
|
502
507
|
].join('');
|
|
503
508
|
}
|
|
509
|
+
/**
|
|
510
|
+
* The public origin as a job env value: the declared origin, or the expression that reads the repository variable
|
|
511
|
+
* naming it.
|
|
512
|
+
*/
|
|
513
|
+
function publicCacheOrigin(config) {
|
|
514
|
+
return 'serverVariable' in config ? githubExpression(`vars.${config.serverVariable}`) : config.server;
|
|
515
|
+
}
|
|
504
516
|
/** Mechanism errors surface at managed-file render time, never inside CI. */
|
|
505
517
|
export function normalizeRemoteCache(config) {
|
|
506
|
-
|
|
518
|
+
const literal = 'server' in config ? config.server : undefined;
|
|
519
|
+
if ('server' in config && 'serverVariable' in config) {
|
|
520
|
+
throw new Error('smoo.remoteCache names its public origin twice; declare server or serverVariable, not both');
|
|
521
|
+
}
|
|
522
|
+
if (literal !== undefined) {
|
|
523
|
+
assertCacheOrigin('smoo.remoteCache', 'server', literal);
|
|
524
|
+
}
|
|
525
|
+
else if (!('serverVariable' in config) || !/^[A-Z_][A-Z0-9_]*$/.test(config.serverVariable)) {
|
|
526
|
+
throw new Error(`smoo.remoteCache needs server, or an upper-case repository variable name for serverVariable, got ${JSON.stringify(config)}`);
|
|
527
|
+
}
|
|
507
528
|
if (config.internalServer !== undefined) {
|
|
508
|
-
assertCacheOrigin('internalServer', config.internalServer);
|
|
509
|
-
if (config.internalServer ===
|
|
510
|
-
throw new Error(`smoo.remoteCache internalServer repeats server ${
|
|
529
|
+
assertCacheOrigin('smoo.remoteCache', 'internalServer', config.internalServer);
|
|
530
|
+
if (config.internalServer === literal) {
|
|
531
|
+
throw new Error(`smoo.remoteCache internalServer repeats server ${literal}; drop internalServer or point it at the address internal runners reach`);
|
|
511
532
|
}
|
|
512
533
|
}
|
|
513
534
|
if (!/^[A-Z_][A-Z0-9_]*$/.test(config.tokenSecret)) {
|
|
@@ -521,7 +542,7 @@ export function normalizeRemoteCache(config) {
|
|
|
521
542
|
* slash the server routes nowhere, and a path or credential would be dropped
|
|
522
543
|
* or leaked rather than honored.
|
|
523
544
|
*/
|
|
524
|
-
function assertCacheOrigin(field, value) {
|
|
545
|
+
function assertCacheOrigin(declaration, field, value) {
|
|
525
546
|
let url = null;
|
|
526
547
|
try {
|
|
527
548
|
url = new URL(value);
|
|
@@ -537,7 +558,81 @@ function assertCacheOrigin(field, value) {
|
|
|
537
558
|
url.password !== '' ||
|
|
538
559
|
url.search !== '' ||
|
|
539
560
|
url.hash !== '') {
|
|
540
|
-
throw new Error(
|
|
561
|
+
throw new Error(`${declaration} ${field} needs a credential-free http(s) origin with no path and no trailing slash, got ${JSON.stringify(value)}`);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* The default branch's own runs: a push to it, or a workflow dispatched on it (a release). These are the only lanes
|
|
566
|
+
* given the mbx write token. A pull request's ref is never the default branch, and `pull_request_target` is left out
|
|
567
|
+
* because its ref is the base branch while the code it runs is not.
|
|
568
|
+
*/
|
|
569
|
+
const DEFAULT_BRANCH_LANE = "(github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)";
|
|
570
|
+
/**
|
|
571
|
+
* Job env lines carrying the declared mbx remote cache (`smoo.mbxRemote`). setup-devenv routes Cargo through mbx's
|
|
572
|
+
* Cargo shim when `MBX_REMOTE_URL` is set, so these lines are what turn mbx on for the job; `reach` picks the origin
|
|
573
|
+
* exactly as for the Nx cache. The token is chosen by lane: the write token and `MBX_REMOTE_TRUST_WRITES` on the
|
|
574
|
+
* default branch's own runs, the read-only token everywhere else. mbx's own write policy cannot make that call here:
|
|
575
|
+
* it requires `GITHUB_REF_PROTECTED`, which Forgejo Actions never sets, and it reads a release's `workflow_dispatch`
|
|
576
|
+
* as untrusted. The server's grant on the token is what stops any other job publishing.
|
|
577
|
+
* Mechanism errors surface at managed-file render time, never inside CI.
|
|
578
|
+
*/
|
|
579
|
+
export function mbxRemoteJobEnvLines(config, reach) {
|
|
580
|
+
if (config === undefined) {
|
|
581
|
+
return '';
|
|
582
|
+
}
|
|
583
|
+
const normalized = normalizeMbxRemote(config);
|
|
584
|
+
const server = reach === 'internal' ? (normalized.internalServer ?? publicCacheOrigin(normalized)) : publicCacheOrigin(normalized);
|
|
585
|
+
const token = `${DEFAULT_BRANCH_LANE} && secrets.${normalized.writeTokenSecret} || secrets.${normalized.readTokenSecret}`;
|
|
586
|
+
return [
|
|
587
|
+
` MBX_REMOTE_URL: ${server}\n`,
|
|
588
|
+
` MBX_REMOTE_NAMESPACE: ${normalized.namespace}\n`,
|
|
589
|
+
// One expression per line: a folded scalar would split the lane condition, and Prettier refolds it otherwise.
|
|
590
|
+
' # prettier-ignore\n',
|
|
591
|
+
` MBX_REMOTE_TOKEN: ${githubExpression(token)}\n`,
|
|
592
|
+
' # prettier-ignore\n',
|
|
593
|
+
` MBX_REMOTE_TRUST_WRITES: ${githubExpression(DEFAULT_BRANCH_LANE)}\n`,
|
|
594
|
+
].join('');
|
|
595
|
+
}
|
|
596
|
+
/** Mechanism errors surface at managed-file render time, never inside CI. */
|
|
597
|
+
export function normalizeMbxRemote(config) {
|
|
598
|
+
if ('server' in config && 'serverVariable' in config) {
|
|
599
|
+
throw new Error('smoo.mbxRemote names its public origin twice; declare server or serverVariable, not both');
|
|
600
|
+
}
|
|
601
|
+
if ('server' in config) {
|
|
602
|
+
assertMbxOrigin('server', config.server);
|
|
603
|
+
}
|
|
604
|
+
else if (!/^[A-Z_][A-Z0-9_]*$/.test(config.serverVariable)) {
|
|
605
|
+
throw new Error(`smoo.mbxRemote needs server, or an upper-case repository variable name for serverVariable, got ${JSON.stringify(config)}`);
|
|
606
|
+
}
|
|
607
|
+
if (config.internalServer !== undefined) {
|
|
608
|
+
assertMbxOrigin('internalServer', config.internalServer);
|
|
609
|
+
}
|
|
610
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9._-]*(\/[A-Za-z0-9][A-Za-z0-9._-]*)*$/.test(config.namespace)) {
|
|
611
|
+
throw new Error(`smoo.mbxRemote namespace must be slash-separated segments of letters, digits, '.', '_' and '-', got ${JSON.stringify(config.namespace)}`);
|
|
612
|
+
}
|
|
613
|
+
for (const [field, name] of [
|
|
614
|
+
['writeTokenSecret', config.writeTokenSecret],
|
|
615
|
+
['readTokenSecret', config.readTokenSecret],
|
|
616
|
+
]) {
|
|
617
|
+
if (!/^[A-Z_][A-Z0-9_]*$/.test(name)) {
|
|
618
|
+
throw new Error(`smoo.mbxRemote needs an upper-case secret name for ${field}, got ${JSON.stringify(name)}`);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
if (config.writeTokenSecret === config.readTokenSecret) {
|
|
622
|
+
throw new Error(`smoo.mbxRemote writeTokenSecret and readTokenSecret both name ${config.writeTokenSecret}; untrusted jobs would hold the write token`);
|
|
623
|
+
}
|
|
624
|
+
return config;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* An mbx origin is a cache origin mbx will send its token to: HTTPS, or plain HTTP to a loopback address only, which
|
|
628
|
+
* is mbx's own rule (it refuses the remote otherwise), checked here so a bad declaration fails at render time.
|
|
629
|
+
*/
|
|
630
|
+
function assertMbxOrigin(field, value) {
|
|
631
|
+
assertCacheOrigin('smoo.mbxRemote', field, value);
|
|
632
|
+
const url = new URL(value);
|
|
633
|
+
const loopback = url.hostname === 'localhost' || url.hostname === '[::1]' || /^127\.\d+\.\d+\.\d+$/.test(url.hostname);
|
|
634
|
+
if (url.protocol === 'http:' && !loopback) {
|
|
635
|
+
throw new Error(`smoo.mbxRemote ${field} ${JSON.stringify(value)} is plain HTTP to a non-loopback host; mbx sends its token only over HTTPS or to loopback`);
|
|
541
636
|
}
|
|
542
637
|
}
|
|
543
638
|
/**
|
|
@@ -993,7 +1088,7 @@ ${options.macosRunsOn === undefined ? ' runs-on: macos-latest' : renderRunsOn
|
|
|
993
1088
|
if: \${{ needs.main.result == 'success' }}
|
|
994
1089
|
env:
|
|
995
1090
|
GH_TOKEN: \${{ github.token }}
|
|
996
|
-
${remoteCacheJobEnvLines(options.remoteCache)}${cargoCredentialJobEnvLines(options.cargoCredentials)}${privateNpmReadTokenJobEnv(options)} steps:
|
|
1091
|
+
${remoteCacheJobEnvLines(options.remoteCache, 'public')}${mbxRemoteJobEnvLines(options.mbxRemote, 'public')}${cargoCredentialJobEnvLines(options.cargoCredentials)}${privateNpmReadTokenJobEnv(options)} steps:
|
|
997
1092
|
${renderCiWorkflowSteps(followUpSetupSteps(options, numbers), options)}
|
|
998
1093
|
${renderCiWorkflowSteps(middleSteps, options)}
|
|
999
1094
|
${renderCiWorkflowSteps(followUpCleanupStep(numbers), options)}`;
|
|
@@ -1079,7 +1174,7 @@ ${renderRunsOnLine(options.runsOn)}
|
|
|
1079
1174
|
${environmentLine(options.environments?.staging)} if: \${{ needs.main.result == 'success' && needs.main.outputs.deployment-stage != '' }}
|
|
1080
1175
|
env:
|
|
1081
1176
|
GH_TOKEN: \${{ github.token }}
|
|
1082
|
-
${remoteCacheJobEnvLines(options.remoteCache)}${cargoCredentialJobEnvLines(options.cargoCredentials)}${privateNpmReadTokenJobEnv(options)} steps:
|
|
1177
|
+
${remoteCacheJobEnvLines(options.remoteCache, 'internal')}${mbxRemoteJobEnvLines(options.mbxRemote, 'internal')}${cargoCredentialJobEnvLines(options.cargoCredentials)}${privateNpmReadTokenJobEnv(options)} steps:
|
|
1083
1178
|
${renderCiWorkflowSteps(followUpSetupSteps(options, numbers), options)}
|
|
1084
1179
|
# Step ${numbers.middle}
|
|
1085
1180
|
- name: E2E Tests (Deployed Stage)
|
|
@@ -1111,7 +1206,7 @@ ${renderRunsOnLine(options.runsOn)}
|
|
|
1111
1206
|
if: \${{ !cancelled() && github.event_name == 'push' && github.ref == ${stagingRefLiteral(options)} && needs.main.result == 'success'${e2eGate} }}
|
|
1112
1207
|
${environmentLine(options.environments?.production)} env:
|
|
1113
1208
|
GH_TOKEN: \${{ github.token }}
|
|
1114
|
-
${remoteCacheJobEnvLines(options.remoteCache)}${cargoCredentialJobEnvLines(options.cargoCredentials)}${privateNpmReadTokenJobEnv(options)} steps:
|
|
1209
|
+
${remoteCacheJobEnvLines(options.remoteCache, 'internal')}${mbxRemoteJobEnvLines(options.mbxRemote, 'internal')}${cargoCredentialJobEnvLines(options.cargoCredentials)}${privateNpmReadTokenJobEnv(options)} steps:
|
|
1115
1210
|
${renderCiWorkflowSteps(followUpSetupSteps(options, numbers), options)}
|
|
1116
1211
|
# Step ${numbers.middle}
|
|
1117
1212
|
- name: 🚀 Deploy Production
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/managed-files/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAmD,MAAM,qBAAqB,CAAC;AAE5G,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,WAAW,EAA0B,MAAM,0BAA0B,CAAC;AAExH,OAAO,KAAK,EAAE,kBAAkB,EAA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AG,OAAO,CAE5F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,kBAAkB,EAAE,CAiB1F;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,mBAAmB,EAAE,SAAS,MAAM,EAAE,EACtC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACtC,MAAM,EAAE,CAIV;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAMlF;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAezF;AAED,yFAAyF;AACzF,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAYlH;AAED,sEAAsE;AACtE,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEzF"}
|
|
@@ -56,6 +56,7 @@ export function deriveManagedFileContext(manifest, packages, nxProjects, hasBunL
|
|
|
56
56
|
sourceCheckouts,
|
|
57
57
|
cargoCredentials,
|
|
58
58
|
remoteCache: manifest?.smoo?.remoteCache,
|
|
59
|
+
mbxRemote: manifest?.smoo?.mbxRemote,
|
|
59
60
|
macosPlatformArchitectures: MACOS_PLATFORM_TARGET_GLOBS.some((glob) => releasePlatformTargetGlobs.includes(glob))
|
|
60
61
|
? macosPlatformArchitecturesForTest(targetNames)
|
|
61
62
|
: [],
|
|
@@ -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
|
import { type CiCrossTestArchive } from './ci-workflow.js';
|
|
3
3
|
import type { ManagedFile } from './tree.js';
|
|
4
4
|
export interface ManagedFileContext {
|
|
@@ -33,6 +33,8 @@ export interface ManagedFileContext {
|
|
|
33
33
|
cargoCredentials?: PackageCargoCredentialsConfig;
|
|
34
34
|
/** Declared self-hosted Nx remote cache from the root smoo config; absent means local caching only. */
|
|
35
35
|
remoteCache?: PackageRemoteCacheConfig;
|
|
36
|
+
/** Declared mbx remote cache from the root smoo config; absent means Cargo builds without mbx. */
|
|
37
|
+
mbxRemote?: PackageMbxRemoteConfig;
|
|
36
38
|
/**
|
|
37
39
|
* Cross-built test archives the graph can produce, one per foreign target
|
|
38
40
|
* triple the cargo workspace declares. Empty for a repository that declares
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/managed-files/files.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,kBAAkB,EAAmD,MAAM,kBAAkB,CAAC;AAI5G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAa7C,MAAM,WAAW,kBAAkB;IACjC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,uBAAuB,EAAE,OAAO,CAAC;IACjC,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,uBAAuB,EAAE,OAAO,CAAC;IACjC,8BAA8B,EAAE,OAAO,CAAC;IACxC,qBAAqB,CAAC,EAAE,YAAY,CAAC;IACrC,wBAAw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AAC/G,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,aAAa,GAAG,kBAAkB,GAAG,6BAA6B,GAAG,yBAAyB,EACtG,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAMR"}
|
|
@@ -307,6 +307,7 @@ function getManagedContent(file, context) {
|
|
|
307
307
|
sourceCheckouts: context.sourceCheckouts,
|
|
308
308
|
cargoCredentials: context.cargoCredentials,
|
|
309
309
|
remoteCache: context.remoteCache,
|
|
310
|
+
mbxRemote: context.mbxRemote,
|
|
310
311
|
environments: context.ciEnvironments,
|
|
311
312
|
deploySecrets: context.ciDeploySecrets,
|
|
312
313
|
e2eSecrets: context.ciE2eSecrets,
|
|
@@ -334,6 +335,7 @@ function getManagedContent(file, context) {
|
|
|
334
335
|
sourceCheckouts: context.sourceCheckouts,
|
|
335
336
|
cargoCredentials: context.cargoCredentials,
|
|
336
337
|
remoteCache: context.remoteCache,
|
|
338
|
+
mbxRemote: context.mbxRemote,
|
|
337
339
|
deploySecrets: context.ciDeploySecrets,
|
|
338
340
|
});
|
|
339
341
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PackageCargoCredentialsConfig, PackagePrivateNpmConfig, PackageRemoteCacheConfig, PackageSmooGithub, PackageSourceCheckoutConfig } from '../workspace-manifest.js';
|
|
1
|
+
import type { PackageCargoCredentialsConfig, PackageMbxRemoteConfig, PackagePrivateNpmConfig, PackageRemoteCacheConfig, PackageSmooGithub, PackageSourceCheckoutConfig } from '../workspace-manifest.js';
|
|
2
2
|
import { type DeployStepSecretConfig } from './ci-workflow.js';
|
|
3
3
|
import { type WorkflowRunsOn } from './github-runs-on.js';
|
|
4
4
|
export type PublishWorkflowBump = 'auto' | 'patch' | 'minor' | 'major' | 'prerelease';
|
|
@@ -80,6 +80,11 @@ export interface PublishWorkflowDefinitionOptions extends DeployStepSecretConfig
|
|
|
80
80
|
* built for the same hashes.
|
|
81
81
|
*/
|
|
82
82
|
remoteCache?: PackageRemoteCacheConfig;
|
|
83
|
+
/**
|
|
84
|
+
* Declared mbx remote cache. Every job here may build Cargo, so each carries mbx's remote settings; a release
|
|
85
|
+
* dispatched on the default branch publishes what it compiles.
|
|
86
|
+
*/
|
|
87
|
+
mbxRemote?: PackageMbxRemoteConfig;
|
|
83
88
|
}
|
|
84
89
|
export interface PublishWorkflowInputs {
|
|
85
90
|
bump: PublishWorkflowBump;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-workflow.d.ts","sourceRoot":"","sources":["../../src/managed-files/publish-workflow.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAElC,OAAO,
|
|
1
|
+
{"version":3,"file":"publish-workflow.d.ts","sourceRoot":"","sources":["../../src/managed-files/publish-workflow.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAQL,KAAK,sBAAsB,EAO5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAgD,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AASxG,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,CAAC;AACtF,MAAM,MAAM,wBAAwB,GAChC,oBAAoB,GACpB,uBAAuB,GACvB,mBAAmB,GACnB,8BAA8B,GAC9B,SAAS,GACT,QAAQ,CAAC;AACb,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAChE,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,YAAY,CAAC;AAE/D,oBAAY,uBAAuB;IACjC,QAAQ,aAAa;IACrB,eAAe,qBAAqB;IACpC,gBA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