@intentius/chant 0.124.101 → 0.124.102
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/dist/ci-evidence-claims.d.ts +12 -0
- package/dist/ci-evidence-claims.js +12 -0
- package/dist/cli/handlers/release-init.js +50 -18
- package/dist/cli/handlers/release.d.ts +1 -1
- package/dist/cli/handlers/release.js +12 -9
- package/dist/cli/release-commands/cut.js +4 -3
- package/dist/cli/release-commands/init.js +4 -1
- package/dist/cli/release-commands/workflow.js +4 -2
- package/dist/cloud-lister/index.d.ts +4 -1
- package/dist/cloud-lister/index.js +2 -1
- package/dist/cloud-lister/kubernetes-components.d.ts +56 -0
- package/dist/cloud-lister/kubernetes-components.js +642 -0
- package/dist/cloud-lister/kubernetes.d.ts +18 -0
- package/dist/cloud-lister/kubernetes.js +26 -1
- package/dist/cloud-lister/mask.d.ts +5 -1
- package/dist/cloud-lister/mask.js +14 -5
- package/dist/config-import.d.ts +1 -1
- package/dist/config-import.js +6 -2
- package/dist/config-sandbox.d.ts +1 -1
- package/dist/config-sandbox.js +3 -3
- package/dist/config.d.ts +75 -1
- package/dist/config.js +27 -2
- package/dist/deep-observation.js +9 -3
- package/dist/floor-table.data.js +12 -6
- package/dist/lexicon.d.ts +4 -2
- package/dist/lifecycle/__fixtures__/package-files.d.ts +32 -0
- package/dist/lifecycle/__fixtures__/package-files.js +72 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +5 -0
- package/dist/lifecycle/publish-credentials.d.ts +1 -1
- package/dist/lifecycle/publish-credentials.js +5 -0
- package/dist/lifecycle/publish-declaration.d.ts +123 -0
- package/dist/lifecycle/publish-declaration.js +140 -0
- package/dist/lifecycle/publish-helm.d.ts +83 -0
- package/dist/lifecycle/publish-helm.js +452 -0
- package/dist/lifecycle/publish-maven.d.ts +79 -0
- package/dist/lifecycle/publish-maven.js +364 -0
- package/dist/lifecycle/publish-mcp-registry.js +1 -2
- package/dist/lifecycle/publish-npm.d.ts +27 -1
- package/dist/lifecycle/publish-npm.js +51 -1
- package/dist/lifecycle/publish-nuget.d.ts +93 -0
- package/dist/lifecycle/publish-nuget.js +377 -0
- package/dist/lifecycle/publish-oci.d.ts +57 -1
- package/dist/lifecycle/publish-oci.js +1 -1
- package/dist/lifecycle/publish-package-files.d.ts +16 -0
- package/dist/lifecycle/publish-package-files.js +39 -0
- package/dist/lifecycle/publish-pypi.d.ts +2 -0
- package/dist/lifecycle/publish-pypi.js +1 -1
- package/dist/lifecycle/publish-rubygems.d.ts +84 -0
- package/dist/lifecycle/publish-rubygems.js +366 -0
- package/dist/lifecycle/publish-targets.d.ts +10 -0
- package/dist/lifecycle/publish-targets.js +22 -0
- package/dist/lifecycle/publish-train-names.d.ts +4 -1
- package/dist/lifecycle/publish-train-names.js +5 -0
- package/dist/lifecycle/release-artifacts.d.ts +80 -2
- package/dist/lifecycle/release-artifacts.js +242 -5
- package/dist/lifecycle/release-cut.d.ts +6 -1
- package/dist/lifecycle/release-cut.js +15 -0
- package/dist/lifecycle/release-doctor.js +208 -6
- package/dist/lifecycle/release-init-registries.d.ts +48 -0
- package/dist/lifecycle/release-init-registries.js +97 -0
- package/dist/lifecycle/release-init.d.ts +22 -2
- package/dist/lifecycle/release-init.js +132 -7
- package/dist/lifecycle/release-next.js +1 -2
- package/dist/lifecycle/release-publish.d.ts +1 -1
- package/dist/lifecycle/release-publish.js +1 -1
- package/dist/lifecycle/release-tag.js +1 -2
- package/dist/op/local-executor.d.ts +1 -1
- package/dist/op/local-executor.js +2 -2
- package/dist/op/op-waves-evidence.js +9 -2
- package/dist/release-floors.d.ts +1 -1
- package/dist/release-floors.js +1 -1
- package/dist/sensitive-key.d.ts +12 -0
- package/dist/sensitive-key.js +52 -0
- package/dist/tool-pins.d.ts +2 -0
- package/dist/tool-pins.js +12 -0
- package/dist/ts-loader.d.ts +8 -0
- package/dist/ts-loader.js +19 -0
- package/dist/wave-runtime.mjs +325 -325
- package/dist/workspace/lexicon-outputs.d.ts +1 -1
- package/dist/workspace/lexicon-outputs.js +1 -1
- package/dist/workspace/release-steps/index.js +4 -0
- package/dist/workspace/release-steps/nfpm.d.ts +13 -0
- package/dist/workspace/release-steps/nfpm.js +29 -0
- package/dist/workspace/release-steps/nuget.d.ts +14 -0
- package/dist/workspace/release-steps/nuget.js +16 -0
- package/dist/workspace/release-steps/targets.d.ts +2 -2
- package/dist/workspace/release-steps/targets.js +3 -3
- package/dist/workspace/release-train-workflow.d.ts +7 -0
- package/dist/workspace/release-train-workflow.js +46 -10
- package/dist/workspace/release-workflow.d.ts +28 -3
- package/dist/workspace/release-workflow.js +38 -15
- package/dist/workspace/train-cut.d.ts +2 -2
- package/dist/workspace/train-cut.js +27 -5
- package/dist/workspace/train-prepare.d.ts +6 -3
- package/dist/workspace/train-prepare.js +54 -8
- package/dist/workspace/train-publish.js +2 -3
- package/dist/workspace/train-shell.d.ts +5 -0
- package/dist/workspace/train-shell.js +17 -0
- package/dist/workspace/trust/check-evidence-report.d.ts +3 -7
- package/dist/workspace/trust/check-evidence-report.js +3 -7
- package/package.json +1 -1
|
@@ -194,7 +194,7 @@ export async function listKubernetes(ctx, target, retryDelays) {
|
|
|
194
194
|
nativeId: k.namespaced ? `${ns}/${meta.name}` : meta.name,
|
|
195
195
|
cloudIds: meta.uid ? [{ kind: "k8s-uid", value: meta.uid }] : [],
|
|
196
196
|
tags,
|
|
197
|
-
properties: maskKubernetesObject(obj),
|
|
197
|
+
properties: withWorkloadStatus(maskKubernetesObject(obj), item, k),
|
|
198
198
|
observedAt,
|
|
199
199
|
labels: true,
|
|
200
200
|
});
|
|
@@ -221,6 +221,31 @@ export async function listKubernetes(ctx, target, retryDelays) {
|
|
|
221
221
|
ctx.coverage.push({ listedType: k.listedType, location: l, ...listedVerdict(scope) });
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
+
const num = (v) => (typeof v === "number" && Number.isFinite(v) ? v : 0);
|
|
225
|
+
export function workloadStatusView(obj, group, kind) {
|
|
226
|
+
const status = obj.status;
|
|
227
|
+
if (!status || typeof status !== "object")
|
|
228
|
+
return undefined;
|
|
229
|
+
const spec = (obj.spec ?? {});
|
|
230
|
+
if (group === "apps" && (kind === "Deployment" || kind === "StatefulSet" || kind === "ReplicaSet")) {
|
|
231
|
+
return { readyReplicas: num(status.readyReplicas), desiredReplicas: typeof spec.replicas === "number" ? spec.replicas : 1 };
|
|
232
|
+
}
|
|
233
|
+
if (group === "apps" && kind === "DaemonSet") {
|
|
234
|
+
return { readyReplicas: num(status.numberReady), desiredReplicas: num(status.desiredNumberScheduled) };
|
|
235
|
+
}
|
|
236
|
+
if (group === "" && kind === "Pod") {
|
|
237
|
+
const containers = [...(Array.isArray(status.containerStatuses) ? status.containerStatuses : []), ...(Array.isArray(status.initContainerStatuses) ? status.initContainerStatuses : [])];
|
|
238
|
+
const restarts = containers.reduce((sum, c) => sum + num(c?.restartCount), 0);
|
|
239
|
+
const conditions = Array.isArray(status.conditions) ? status.conditions : [];
|
|
240
|
+
const ready = conditions.some((c) => c?.type === "Ready" && c?.status === "True");
|
|
241
|
+
return { ...(typeof status.phase === "string" ? { phase: status.phase } : {}), restarts, ready };
|
|
242
|
+
}
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
function withWorkloadStatus(masked, item, k) {
|
|
246
|
+
const view = workloadStatusView(item, k.group, k.kind);
|
|
247
|
+
return view ? { ...masked, workloadStatus: view } : masked;
|
|
248
|
+
}
|
|
224
249
|
/**
|
|
225
250
|
* A {@link KubernetesTarget} from a kubeconfig the caller names (its text,
|
|
226
251
|
* and the directory relative file paths resolve against). Static credentials
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
* one list chant's thin and deep observation paths share. behold carried a
|
|
8
8
|
* copy while the lister lived there; in chant it is the same list.
|
|
9
9
|
*
|
|
10
|
+
* A Kubernetes pod spec's Secret references keep the Secret's name and mask
|
|
11
|
+
* every other field (chant#5252, `podSecretNameView` in ../sensitive-key.ts),
|
|
12
|
+
* so a live read can tell which Secret a workload mounts.
|
|
13
|
+
*
|
|
10
14
|
* Beyond key names, two things are masked whole because their values are
|
|
11
15
|
* secrets whatever their keys are called:
|
|
12
16
|
* - a Kubernetes Secret's `data` and `stringData`, and its
|
|
@@ -23,7 +27,7 @@ export declare const MASKED = "<masked>";
|
|
|
23
27
|
* {@link MASKED}. Arrays of `{Key, Value}` / `{key, value}` pairs (AWS tags,
|
|
24
28
|
* some ARM shapes) are masked by the pair's key as well.
|
|
25
29
|
*/
|
|
26
|
-
export declare function maskValue(value: unknown): unknown;
|
|
30
|
+
export declare function maskValue(value: unknown, pattern?: string): unknown;
|
|
27
31
|
export declare function maskProperties(props: Record<string, unknown>): Record<string, unknown>;
|
|
28
32
|
export declare function maskTags(tags: Record<string, string>): Record<string, string>;
|
|
29
33
|
/**
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
* one list chant's thin and deep observation paths share. behold carried a
|
|
8
8
|
* copy while the lister lived there; in chant it is the same list.
|
|
9
9
|
*
|
|
10
|
+
* A Kubernetes pod spec's Secret references keep the Secret's name and mask
|
|
11
|
+
* every other field (chant#5252, `podSecretNameView` in ../sensitive-key.ts),
|
|
12
|
+
* so a live read can tell which Secret a workload mounts.
|
|
13
|
+
*
|
|
10
14
|
* Beyond key names, two things are masked whole because their values are
|
|
11
15
|
* secrets whatever their keys are called:
|
|
12
16
|
* - a Kubernetes Secret's `data` and `stringData`, and its
|
|
@@ -14,7 +18,7 @@
|
|
|
14
18
|
* repeats them;
|
|
15
19
|
* - any tag or label whose key matches the patterns.
|
|
16
20
|
*/
|
|
17
|
-
import { isReferenceField, isSensitiveKey, SENSITIVE_KEY_PATTERNS } from "../sensitive-key.js";
|
|
21
|
+
import { isReferenceField, isSensitiveKey, podSecretNameView, SENSITIVE_KEY_PATTERNS } from "../sensitive-key.js";
|
|
18
22
|
export { isSensitiveKey, SENSITIVE_KEY_PATTERNS };
|
|
19
23
|
/** What a masked value becomes. A fixed string, so a masked value never diffs. */
|
|
20
24
|
export const MASKED = "<masked>";
|
|
@@ -23,23 +27,28 @@ export const MASKED = "<masked>";
|
|
|
23
27
|
* {@link MASKED}. Arrays of `{Key, Value}` / `{key, value}` pairs (AWS tags,
|
|
24
28
|
* some ARM shapes) are masked by the pair's key as well.
|
|
25
29
|
*/
|
|
26
|
-
export function maskValue(value) {
|
|
30
|
+
export function maskValue(value, pattern = "") {
|
|
27
31
|
if (Array.isArray(value))
|
|
28
|
-
return value.map((v) => maskValue(v));
|
|
32
|
+
return value.map((v) => maskValue(v, `${pattern}[]`));
|
|
29
33
|
if (value === null || typeof value !== "object")
|
|
30
34
|
return value;
|
|
31
35
|
const obj = value;
|
|
32
36
|
const pairKey = typeof obj.Key === "string" ? obj.Key : typeof obj.key === "string" ? obj.key : undefined;
|
|
33
37
|
const out = {};
|
|
34
38
|
for (const [k, v] of Object.entries(obj)) {
|
|
35
|
-
|
|
39
|
+
const at = pattern ? `${pattern}.${k}` : k;
|
|
40
|
+
const view = isSensitiveKey(k) ? podSecretNameView(at, v, MASKED) : undefined;
|
|
41
|
+
if (view !== undefined) {
|
|
42
|
+
out[k] = view;
|
|
43
|
+
}
|
|
44
|
+
else if (isSensitiveKey(k) && !isReferenceField(k, v)) {
|
|
36
45
|
out[k] = MASKED;
|
|
37
46
|
}
|
|
38
47
|
else if (pairKey !== undefined && isSensitiveKey(pairKey) && (k === "Value" || k === "value")) {
|
|
39
48
|
out[k] = MASKED;
|
|
40
49
|
}
|
|
41
50
|
else {
|
|
42
|
-
out[k] = maskValue(v);
|
|
51
|
+
out[k] = maskValue(v, at);
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
54
|
return out;
|
package/dist/config-import.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type ConfigModuleNamespace = Record<string, unknown>;
|
|
|
23
23
|
* Node's ESM registry caches it, so repeated loads within one CLI invocation
|
|
24
24
|
* evaluate the file once — the behavior `loadChantConfig` has always had.
|
|
25
25
|
*/
|
|
26
|
-
export declare function importConfigModule(configPath: string): Promise<ConfigModuleNamespace>;
|
|
26
|
+
export declare function importConfigModule(configPath: string, fresh?: boolean): Promise<ConfigModuleNamespace>;
|
|
27
27
|
/**
|
|
28
28
|
* `require()` a `chant.config.ts` into THIS process from `dir`'s resolution
|
|
29
29
|
* context — the synchronous path `./lint/config.ts`'s `loadConfig` has used
|
package/dist/config-import.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
let freshLoads = 0;
|
|
3
5
|
import { ensureTypeScriptLoader } from "./ts-loader.js";
|
|
4
6
|
/**
|
|
5
7
|
* Import a `chant.config.ts` into THIS process and return its module namespace.
|
|
6
8
|
* Node's ESM registry caches it, so repeated loads within one CLI invocation
|
|
7
9
|
* evaluate the file once — the behavior `loadChantConfig` has always had.
|
|
8
10
|
*/
|
|
9
|
-
export async function importConfigModule(configPath) {
|
|
11
|
+
export async function importConfigModule(configPath, fresh = false) {
|
|
10
12
|
ensureTypeScriptLoader();
|
|
11
|
-
|
|
13
|
+
// `fresh` re-evaluates the config file itself: a query string makes the specifier a new module. Files it imports stay cached.
|
|
14
|
+
const specifier = fresh ? `${pathToFileURL(configPath).href}?fresh=${++freshLoads}` : configPath;
|
|
15
|
+
return (await import(specifier));
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* `require()` a `chant.config.ts` into THIS process from `dir`'s resolution
|
package/dist/config-sandbox.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare function selectConfigExport(namespace: ConfigModuleNamespace): un
|
|
|
31
31
|
* @param projectRoot - Directory to grant the sandboxed child read access to;
|
|
32
32
|
* defaults to the config file's own directory.
|
|
33
33
|
*/
|
|
34
|
-
export declare function evaluateProjectConfig(configPath: string, projectRoot?: string): Promise<unknown>;
|
|
34
|
+
export declare function evaluateProjectConfig(configPath: string, projectRoot?: string, fresh?: boolean): Promise<unknown>;
|
|
35
35
|
/**
|
|
36
36
|
* Synchronous counterpart for `./lint/config.ts`'s `loadConfig` (`chant lint`
|
|
37
37
|
* is a sync pipeline and predates the async loader).
|
package/dist/config-sandbox.js
CHANGED
|
@@ -91,11 +91,11 @@ export function selectConfigExport(namespace) {
|
|
|
91
91
|
* @param projectRoot - Directory to grant the sandboxed child read access to;
|
|
92
92
|
* defaults to the config file's own directory.
|
|
93
93
|
*/
|
|
94
|
-
export async function evaluateProjectConfig(configPath, projectRoot = dirname(configPath)) {
|
|
94
|
+
export async function evaluateProjectConfig(configPath, projectRoot = dirname(configPath), fresh = false) {
|
|
95
95
|
if (!armed) {
|
|
96
|
-
return selectConfigExport(await importConfigModule(configPath));
|
|
96
|
+
return selectConfigExport(await importConfigModule(configPath, fresh));
|
|
97
97
|
}
|
|
98
|
-
if (memo.has(configPath))
|
|
98
|
+
if (!fresh && memo.has(configPath))
|
|
99
99
|
return memo.get(configPath);
|
|
100
100
|
// Dynamic, not static, for the same reason `./discovery/index.ts` imports
|
|
101
101
|
// `./sandbox/run` dynamically: this pulls in `esbuild`, a large CJS package
|
package/dist/config.d.ts
CHANGED
|
@@ -234,6 +234,52 @@ export declare const ChantConfigSchema: z.ZodObject<{
|
|
|
234
234
|
fail: "fail";
|
|
235
235
|
warn: "warn";
|
|
236
236
|
}>>;
|
|
237
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
238
|
+
type: z.ZodLiteral<"helm">;
|
|
239
|
+
charts: z.ZodArray<z.ZodString>;
|
|
240
|
+
oci: z.ZodOptional<z.ZodObject<{
|
|
241
|
+
repository: z.ZodString;
|
|
242
|
+
usernameEnv: z.ZodOptional<z.ZodString>;
|
|
243
|
+
passwordEnv: z.ZodOptional<z.ZodString>;
|
|
244
|
+
}, z.core.$strict>>;
|
|
245
|
+
index: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
repo: z.ZodString;
|
|
247
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
248
|
+
path: z.ZodOptional<z.ZodString>;
|
|
249
|
+
url: z.ZodOptional<z.ZodString>;
|
|
250
|
+
api: z.ZodOptional<z.ZodString>;
|
|
251
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, z.core.$strict>>;
|
|
253
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"maven">;
|
|
255
|
+
bundle: z.ZodString;
|
|
256
|
+
api: z.ZodOptional<z.ZodString>;
|
|
257
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
258
|
+
usernameEnv: z.ZodOptional<z.ZodString>;
|
|
259
|
+
passwordEnv: z.ZodOptional<z.ZodString>;
|
|
260
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
261
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
262
|
+
type: z.ZodLiteral<"nuget">;
|
|
263
|
+
packages: z.ZodArray<z.ZodString>;
|
|
264
|
+
pushUrl: z.ZodOptional<z.ZodString>;
|
|
265
|
+
flatContainerUrl: z.ZodOptional<z.ZodString>;
|
|
266
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
token: "token";
|
|
268
|
+
"trusted-publishing": "trusted-publishing";
|
|
269
|
+
}>>;
|
|
270
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
271
|
+
userEnv: z.ZodOptional<z.ZodString>;
|
|
272
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
273
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
274
|
+
type: z.ZodLiteral<"rubygems">;
|
|
275
|
+
gems: z.ZodArray<z.ZodString>;
|
|
276
|
+
host: z.ZodOptional<z.ZodString>;
|
|
277
|
+
auth: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
token: "token";
|
|
279
|
+
"trusted-publishing": "trusted-publishing";
|
|
280
|
+
}>>;
|
|
281
|
+
tokenEnv: z.ZodOptional<z.ZodString>;
|
|
282
|
+
sbom: z.ZodOptional<z.ZodLiteral<false>>;
|
|
237
283
|
}, z.core.$strict>], "type">>>;
|
|
238
284
|
images: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
239
285
|
name: z.ZodString;
|
|
@@ -275,6 +321,28 @@ export declare const ChantConfigSchema: z.ZodObject<{
|
|
|
275
321
|
name: z.ZodString;
|
|
276
322
|
checksums: z.ZodString;
|
|
277
323
|
of: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
324
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
325
|
+
name: z.ZodString;
|
|
326
|
+
helm: z.ZodObject<{
|
|
327
|
+
chart: z.ZodString;
|
|
328
|
+
dir: z.ZodOptional<z.ZodString>;
|
|
329
|
+
appVersion: z.ZodOptional<z.ZodBoolean>;
|
|
330
|
+
}, z.core.$strict>;
|
|
331
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
332
|
+
name: z.ZodString;
|
|
333
|
+
nfpm: z.ZodObject<{
|
|
334
|
+
config: z.ZodOptional<z.ZodString>;
|
|
335
|
+
packagers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
336
|
+
apk: "apk";
|
|
337
|
+
archlinux: "archlinux";
|
|
338
|
+
deb: "deb";
|
|
339
|
+
ipk: "ipk";
|
|
340
|
+
rpm: "rpm";
|
|
341
|
+
}>>>;
|
|
342
|
+
platforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
343
|
+
dir: z.ZodOptional<z.ZodString>;
|
|
344
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
345
|
+
}, z.core.$strict>;
|
|
278
346
|
}, z.core.$strict>]>>>;
|
|
279
347
|
lane: z.ZodOptional<z.ZodString>;
|
|
280
348
|
green: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1047,8 +1115,14 @@ export declare const DEFAULT_CHANT_CONFIG: LoadedChantConfig;
|
|
|
1047
1115
|
* ({@link normalizeConfig}) happens here, in the trusted process.
|
|
1048
1116
|
* `chant.config.json` is data, not code — it is parsed in-process under
|
|
1049
1117
|
* `--sandbox` too, because there is nothing to execute.
|
|
1118
|
+
*
|
|
1119
|
+
* `fresh` re-evaluates `chant.config.ts` instead of taking the module the
|
|
1120
|
+
* process already loaded, for a release step that must see the file as it is
|
|
1121
|
+
* now. Modules the config imports stay cached.
|
|
1050
1122
|
*/
|
|
1051
|
-
export declare function loadChantConfig(dir: string
|
|
1123
|
+
export declare function loadChantConfig(dir: string, opts?: {
|
|
1124
|
+
fresh?: boolean;
|
|
1125
|
+
}): Promise<ResolvedConfig>;
|
|
1052
1126
|
/**
|
|
1053
1127
|
* Load project configuration by walking up from `startDir` to the project
|
|
1054
1128
|
* root (chant #1117), instead of trying only `startDir` itself.
|
package/dist/config.js
CHANGED
|
@@ -152,6 +152,27 @@ export const ChantConfigSchema = z.object({
|
|
|
152
152
|
})
|
|
153
153
|
.strict(),
|
|
154
154
|
z.object({ name: z.string().min(1), checksums: z.string().min(1), of: z.array(z.string().min(1)).min(1).optional() }).strict(),
|
|
155
|
+
// #5233: a Helm chart chant packs, and Linux packages nfpm builds.
|
|
156
|
+
z
|
|
157
|
+
.object({
|
|
158
|
+
name: z.string().min(1),
|
|
159
|
+
helm: z.object({ chart: z.string().min(1), dir: z.string().min(1).optional(), appVersion: z.boolean().optional() }).strict(),
|
|
160
|
+
})
|
|
161
|
+
.strict(),
|
|
162
|
+
z
|
|
163
|
+
.object({
|
|
164
|
+
name: z.string().min(1),
|
|
165
|
+
nfpm: z
|
|
166
|
+
.object({
|
|
167
|
+
config: z.string().min(1).optional(),
|
|
168
|
+
packagers: z.array(z.enum(["deb", "rpm", "apk", "archlinux", "ipk"])).min(1).optional(),
|
|
169
|
+
platforms: z.array(z.string().min(1)).min(1).optional(),
|
|
170
|
+
dir: z.string().min(1).optional(),
|
|
171
|
+
fileName: z.string().min(1).optional(),
|
|
172
|
+
})
|
|
173
|
+
.strict(),
|
|
174
|
+
})
|
|
175
|
+
.strict(),
|
|
155
176
|
]))
|
|
156
177
|
.optional(),
|
|
157
178
|
lane: z.string().regex(/^[a-z0-9][a-z0-9-]*$/, "a ci.green lane name: lowercase letters, digits and dashes").optional(),
|
|
@@ -295,12 +316,16 @@ export const DEFAULT_CHANT_CONFIG = {};
|
|
|
295
316
|
* ({@link normalizeConfig}) happens here, in the trusted process.
|
|
296
317
|
* `chant.config.json` is data, not code — it is parsed in-process under
|
|
297
318
|
* `--sandbox` too, because there is nothing to execute.
|
|
319
|
+
*
|
|
320
|
+
* `fresh` re-evaluates `chant.config.ts` instead of taking the module the
|
|
321
|
+
* process already loaded, for a release step that must see the file as it is
|
|
322
|
+
* now. Modules the config imports stay cached.
|
|
298
323
|
*/
|
|
299
|
-
export async function loadChantConfig(dir) {
|
|
324
|
+
export async function loadChantConfig(dir, opts = {}) {
|
|
300
325
|
// Try chant.config.ts first
|
|
301
326
|
const tsPath = join(dir, "chant.config.ts");
|
|
302
327
|
if (existsSync(tsPath)) {
|
|
303
|
-
const config = await evaluateProjectConfig(tsPath, dir);
|
|
328
|
+
const config = await evaluateProjectConfig(tsPath, dir, opts.fresh);
|
|
304
329
|
return { config: normalizeConfig(config, tsPath), configPath: tsPath };
|
|
305
330
|
}
|
|
306
331
|
// Fall back to chant.config.json
|
package/dist/deep-observation.js
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* when nobody declared the property.
|
|
44
44
|
*/
|
|
45
45
|
import { isHeldElsewhere, isNormalizedHeldElsewhere, normalizeHeldElsewhere } from "./held-elsewhere.js";
|
|
46
|
-
import { isReferenceField, isSensitiveKey } from "./sensitive-key.js";
|
|
46
|
+
import { isReferenceField, isSensitiveKey, podSecretNameView } from "./sensitive-key.js";
|
|
47
47
|
/** True when `value` is the versioned {@link DeepObservationResult} envelope. */
|
|
48
48
|
export function isDeepObservationResult(value) {
|
|
49
49
|
return (typeof value === "object" &&
|
|
@@ -232,8 +232,14 @@ export function normalizeDeepProperties(tree, options) {
|
|
|
232
232
|
// very identity that makes it a marker rather than authored data.
|
|
233
233
|
if (isHeldElsewhere(value))
|
|
234
234
|
return normalizeHeldElsewhere(value);
|
|
235
|
-
if (isSensitiveKey(key)
|
|
236
|
-
|
|
235
|
+
if (isSensitiveKey(key)) {
|
|
236
|
+
// A pod spec's Secret reference keeps its name (chant#5252).
|
|
237
|
+
const view = podSecretNameView(pattern, value, MASKED);
|
|
238
|
+
if (view !== undefined)
|
|
239
|
+
return view;
|
|
240
|
+
if (!isReferenceField(key, value))
|
|
241
|
+
return MASKED;
|
|
242
|
+
}
|
|
237
243
|
// The lexicon's structural mask — same collapse, path-shaped rather than
|
|
238
244
|
// key-named (a k8s Secret's `data.*` no matter what the key is called).
|
|
239
245
|
if (hooks?.mask?.(nodeOf(path, pattern, key, value)))
|
package/dist/floor-table.data.js
CHANGED
|
@@ -75,6 +75,7 @@ export const FLOOR_ROWS = [
|
|
|
75
75
|
{ name: "APPROVE_CONFIRM_FLOOR", version: "0.124.55", gates: "The first chant with `confirmApproval` here, the type-the-name confirmation a product's approve word asks through (#4575).", issue: "#4575", file: "cli/handlers/approve-confirm.ts", modules: ["@intentius/chant/cli/handlers/approve-confirm"] },
|
|
76
76
|
{ name: "PRODUCT_MCP_PROPOSE_FLOOR", version: "0.124.58", gates: "The first chant whose `chant serve mcp` has the `--propose` tier and serves `forgeWrite` product tools on it (chant#4655).", issue: "#4655", file: "cli/mcp/product-tools.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/cli/mcp/product-tools"] },
|
|
77
77
|
{ name: "MCP_TOOL_ANNOTATIONS_FLOOR", version: "0.124.79", gates: "The first chant whose `tools/list` gives MCP tool annotations: a tool's `annotations`, and `readOnlyHint`/`destructiveHint` from `readOnly: true` or `forgeWrite: true` (chant#4823).", issue: "#4823", file: "cli/mcp/product-tools.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/cli/mcp/product-tools"] },
|
|
78
|
+
{ name: "K8S_COMPONENTS_FLOOR", version: NEXT_RELEASE, gates: "The first chant with `inferK8sComponents`, the applications of a live Kubernetes read as a component graph (#5252).", issue: "#5252", file: "cloud-lister/kubernetes-components.ts", modules: ["@intentius/chant/cloud-lister/index", "@intentius/chant/cloud-lister/kubernetes-components"] },
|
|
78
79
|
{ name: "DEPLOY_ADOPT_FLOOR", version: "0.124.55", gates: "The first chant whose `run --components` takes `--adopt`.", file: "components/adoption.ts", modules: ["@intentius/chant/components/adoption"] },
|
|
79
80
|
{ name: "CI_SERVICES_FLOOR", version: "0.124.55", gates: "The first chant with `LexiconPlugin.ciServices` and this module (#4572).", issue: "#4572", file: "components/ci-services.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/components/ci-services"] },
|
|
80
81
|
{ name: "PR_ENV_COMPONENTS_FLOOR", version: "0.124.77", gates: "The first chant with the component adapter and teardown, and the terraform lexicon's copies on them (#4762).", issue: "#4762", file: "components/pr-env-components.ts", modules: ["@intentius/chant/components/pr-env-components"] },
|
|
@@ -103,14 +104,18 @@ export const FLOOR_ROWS = [
|
|
|
103
104
|
{ name: "PUBLISH_FORGE_LATEST_FLOOR", version: "0.124.63", gates: "The first chant that reads `latest` on a forge target and sends it as GitHub's `make_latest` (#4676).", issue: "#4676", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
|
|
104
105
|
{ name: "PUBLISH_FORGE_NOTES_FLOOR", version: "0.124.71", gates: "The first chant whose forge target reads `notes` and may have no assets (#4658).", issue: "#4658", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
|
|
105
106
|
{ name: "PUBLISH_FORGE_GENERATED_NOTES_FLOOR", version: "0.124.101", gates: "The first chant whose forge target generates notes, `notes.generate` (#5153).", issue: "#5153", file: "lifecycle/publish-forge.ts", modules: ["@intentius/chant/lifecycle/publish-forge"] },
|
|
107
|
+
{ name: "PUBLISH_HELM_FLOOR", version: NEXT_RELEASE, gates: "The first chant that publishes a `helm` target (#5233).", issue: "#5233", file: "lifecycle/publish-helm.ts", modules: ["@intentius/chant/lifecycle/publish-helm"] },
|
|
106
108
|
{ name: "PUBLISH_HOMEBREW_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `homebrew` target (#4676).", issue: "#4676", file: "lifecycle/publish-homebrew.ts", modules: ["@intentius/chant/lifecycle/publish-homebrew"] },
|
|
107
109
|
{ name: "PUBLISH_HOMEBREW_SSH_KEY_FLOOR", version: "0.124.64", gates: "The first chant that reads a homebrew target's `sshKeyEnv` (#4699).", issue: "#4699", file: "lifecycle/publish-homebrew.ts", modules: ["@intentius/chant/lifecycle/publish-homebrew"] },
|
|
108
110
|
{ name: "PUBLISH_INDEX_FLOOR", version: "0.124.101", gates: "The first chant that publishes an `index` target (#5158).", issue: "#5158", file: "lifecycle/publish-index.ts", modules: ["@intentius/chant/lifecycle/publish-index"] },
|
|
109
111
|
{ name: "PUBLISH_MARKETPLACE_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `marketplace` target (#4676).", issue: "#4676", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
|
|
110
112
|
{ name: "PUBLISH_MARKETPLACE_AUTH_FLOOR", version: "0.124.64", gates: "The first chant that reads a marketplace target's `auth` (#4698).", issue: "#4698", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
|
|
111
113
|
{ name: "PUBLISH_MARKETPLACE_ON_REFUSAL_FLOOR", version: "0.124.64", gates: "The first chant that reads a marketplace target's `onRefusal` (#4698).", issue: "#4698", file: "lifecycle/publish-marketplace.ts", modules: ["@intentius/chant/lifecycle/publish-marketplace"] },
|
|
112
|
-
{ name: "
|
|
114
|
+
{ name: "PUBLISH_MAVEN_FLOOR", version: NEXT_RELEASE, gates: "The first chant that publishes a `maven` target (#5232).", issue: "#5232", file: "lifecycle/publish-maven.ts", modules: ["@intentius/chant/lifecycle/publish-maven"] },
|
|
115
|
+
{ name: "PUBLISH_MCP_REGISTRY_FLOOR", version: "0.124.101", gates: "The first chant with the `mcp-registry` publish target: a `server.json` published to the MCP Registry after the packages it names, with GitHub OIDC, and the `mcp-registry-*` checks of `chant release doctor` (#5162).", issue: "#5162", file: "lifecycle/publish-mcp-registry.ts", modules: ["@intentius/chant/lifecycle/publish-mcp-registry"] },
|
|
116
|
+
{ name: "PUBLISH_NUGET_FLOOR", version: NEXT_RELEASE, gates: "The first chant that publishes a `nuget` target (#5232).", issue: "#5232", file: "lifecycle/publish-nuget.ts", modules: ["@intentius/chant/lifecycle/publish-nuget"] },
|
|
113
117
|
{ name: "PUBLISH_PYPI_FLOOR", version: "0.124.101", gates: "The first chant that publishes a `pypi` target (#5167).", issue: "#5167", file: "lifecycle/publish-pypi.ts", modules: ["@intentius/chant/lifecycle/publish-pypi"] },
|
|
118
|
+
{ name: "PUBLISH_RUBYGEMS_FLOOR", version: NEXT_RELEASE, gates: "The first chant that publishes a `rubygems` target (#5232).", issue: "#5232", file: "lifecycle/publish-rubygems.ts", modules: ["@intentius/chant/lifecycle/publish-rubygems"] },
|
|
114
119
|
{ name: "PUBLISH_TAURI_UPDATER_FLOOR", version: "0.124.63", gates: "The first chant that publishes a `tauri-updater` target (#4676).", issue: "#4676", file: "lifecycle/publish-tauri.ts", modules: ["@intentius/chant/lifecycle/publish-tauri"] },
|
|
115
120
|
{ name: "LEDGER_ROOT_MEMBER_FLOOR", version: "0.124.54", gates: "The first chant that writes `root_member` on a `runs` row, in `chant query` and in `chant ledger runs --json` (#4482, #4500).", issue: "#4482", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
|
|
116
121
|
{ name: "QUERY_OWNERSHIP_COLUMNS_FLOOR", version: "0.124.54", gates: "The first chant that writes `marker_stack`, `marker_env`, `engine_ownership` and `engine_owned_by` on a `resources` row, in `chant query` and in `chant ledger resources --json` (#4534).", issue: "#4534", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
|
|
@@ -119,22 +124,23 @@ export const FLOOR_ROWS = [
|
|
|
119
124
|
{ name: "LEDGER_CONTROL_ENTRIES_FLOOR", version: "0.124.55", gates: "The first chant with the `control_entries` table (#4593), added within version 1.", issue: "#4593", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
|
|
120
125
|
{ name: "LEDGER_RELEASE_STATUS_FLOOR", version: "0.124.55", gates: "The first chant with the `release_status` table (#4596), added within version 1 (chant#4551's ruling C).", issue: "#4551", file: "lifecycle/query.ts", modules: ["@intentius/chant/lifecycle/query"] },
|
|
121
126
|
{ name: "RELEASE_ARTIFACTS_FLOOR", version: "0.124.101", gates: "The first chant with `release.artifacts`, `chant release artifacts` and `artifact:<name>` in a forge or homebrew target's `assets` (#5151).", issue: "#5151", file: "lifecycle/release-artifacts.ts", modules: ["@intentius/chant/lifecycle/release-artifacts"] },
|
|
127
|
+
{ name: "RELEASE_ARTIFACTS_PACKAGES_FLOOR", version: NEXT_RELEASE, gates: "The first chant with `helm` and `nfpm` entries in `release.artifacts` (#5233).", issue: "#5233", file: "lifecycle/release-artifacts.ts", modules: ["@intentius/chant/lifecycle/release-artifacts"] },
|
|
122
128
|
{ name: "RELEASE_CATALOG_FLOOR", version: "0.124.55", gates: "The first chant that writes and reads a release catalog (#4595).", issue: "#4595", file: "lifecycle/release-catalog.ts", modules: ["@intentius/chant/lifecycle/release-catalog"] },
|
|
123
129
|
{ name: "RELEASE_CUT_LANE_FLOOR", version: "0.124.64", gates: "The first chant that cuts from a lane's green tag and writes `lane` on the cut line (#4692).", issue: "#4692", file: "lifecycle/release-cut.ts", modules: ["@intentius/chant/lifecycle/release-cut"] },
|
|
124
130
|
{ name: "RELEASE_CUT_OVERRIDE_FLOOR", version: "0.124.64", gates: "The first chant that cuts a commit that is not green under an override and writes `override` on the cut line (#4693).", issue: "#4693", file: "lifecycle/release-cut.ts", modules: ["@intentius/chant/lifecycle/release-cut"] },
|
|
125
|
-
{ name: "RELEASE_DOCTOR_FLOOR", version:
|
|
131
|
+
{ name: "RELEASE_DOCTOR_FLOOR", version: "0.124.101", gates: "The first chant with `chant release doctor`, which checks each `release.publish` target before a cut, and whose `chant release workflow` runs it in a dispatched release's cut job (`release.workflow.doctor`) (#5161).", issue: "#5161", file: "lifecycle/release-doctor.ts", modules: ["@intentius/chant/lifecycle/release-doctor"] },
|
|
126
132
|
{ name: "RELEASE_IMAGES_FLOOR", version: "0.124.71", gates: "The first chant with `release.images`, `CHANT_RELEASE_DIGESTS`, `chant release images` and an npm target's `pins` (#4657).", issue: "#4657", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
|
|
127
133
|
{ name: "RELEASE_IMAGE_DOCKERFILE_FLOOR", version: "0.124.78", gates: "The first chant whose `release.images` takes a Dockerfile entry, with `releaseImagePins` and `writeReleaseImagePins` for a product's package build (#4819).", issue: "#4819", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
|
|
128
134
|
{ name: "RELEASE_IMAGE_ARGS_FLOOR", version: "0.124.88", gates: "The first chant whose Dockerfile entry in `release.images` takes `args`, build arguments beside the two chant passes (#4908).", issue: "#4908", file: "lifecycle/release-images.ts", modules: ["@intentius/chant/lifecycle/release-images"] },
|
|
129
135
|
{ name: "RUN_ORIGIN_CHANT_FLOOR", version: "0.124.30", gates: "The first chant that writes `runOrigin.forge: \"chant\"`, for a job `chant ci run` ran (#4094).", issue: "#4094", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
|
|
130
136
|
{ name: "RUN_ORIGIN_JOB_FLOOR", version: "0.124.32", gates: "The first chant that writes `runOrigin.jobId` and `runOrigin.attempt`, for a forge job that ran `chant ci run` (#4156).", issue: "#4156", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
|
|
131
137
|
{ name: "RELEASE_RECORD_VERSION_FLOOR", version: "0.124.55", gates: "The first chant that writes and reads `releaseVersion` on a release record (#4595).", issue: "#4595", file: "lifecycle/release-ledger.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/release-ledger"] },
|
|
132
|
-
{ name: "RELEASE_NEXT_FLOOR", version:
|
|
138
|
+
{ name: "RELEASE_NEXT_FLOOR", version: "0.124.101", gates: "The first chant with `chant release next` and `chant release cut auto`, the label from the conventional commits and the `.chant/release/*.md` intent files since the member's previous release; a cut records the intent files it consumed (`intents` on its cut line), `release changed` computes each member's bump from them (`bumpFrom`, `intents`, `intent-pending`), notes generated from commits lead with their summaries, and a dispatched release workflow takes the label `auto` (#5159); with no release in the ledger the previous one is the newest version tag `release.tag` or `release.legacyTags` matches (#5200), and on 0.x a breaking commit bumps minor unless `release.breakingOnZero` is `major` (#5191).", issue: "#5191", file: "lifecycle/release-next.ts", modules: ["@intentius/chant/lifecycle/release-next"] },
|
|
133
139
|
{ name: "RELEASE_STATUS_FLOOR", version: "0.124.55", gates: "The first chant that writes and reads `<env>/release-status.jsonl`, and lists the `release_status` table (#4596).", issue: "#4596", file: "lifecycle/release-status.ts", modules: ["@intentius/chant/lifecycle/release-status"] },
|
|
134
140
|
{ name: "RELEASE_IMAGE_REF_FLOOR", version: "0.124.65", gates: "The first chant that writes and reads an artifact's `ref` (#4694).", issue: "#4694", file: "lifecycle/release-store.ts", modules: ["@intentius/chant/lifecycle/release-store"] },
|
|
135
141
|
{ name: "RELEASE_PUBLISHES_FLOOR", version: "0.124.101", gates: "The first chant that writes and reads a release's `publishes` (#5149).", issue: "#5149", file: "lifecycle/release-store.ts", modules: ["@intentius/chant/lifecycle/release-store"] },
|
|
136
142
|
{ name: "RELEASE_GATE_SEAL_FLOOR", version: "0.124.101", gates: "The first chant that signs a cut's green-gate record and writes and reads `sealVersion` (#5177).", issue: "#5177", file: "lifecycle/release-store.ts", modules: ["@intentius/chant/lifecycle/release-store"] },
|
|
137
|
-
{ name: "RELEASE_TAG_FLOOR", version:
|
|
143
|
+
{ name: "RELEASE_TAG_FLOOR", version: "0.124.101", gates: "The first chant with `release.tag` in `chant.config.ts`: the cut makes the tag the template renders (`{version}`, `{label}`, `{member}`, `{path}`), refuses one another member's template can render (`release-tag-collision`), `chant release tag` reads a release back from its tag through the ledger, `chant release publish` moves a `floating` tag at reveal, and `chant release workflow` triggers on the template's tags (#5150).", issue: "#5150", file: "lifecycle/release-tag.ts", modules: ["@intentius/chant/lifecycle/release-tag"] },
|
|
138
144
|
{ name: "RELEASE_VERSION_FLOOR", version: "0.124.79", gates: "The first chant with `release.version` and `chant release stamp` (#4840).", issue: "#4840", file: "lifecycle/release-version.ts", modules: ["@intentius/chant/lifecycle/release-version"] },
|
|
139
145
|
{ name: "SNAPSHOT_STORE_FLOOR", version: "0.124.54", gates: "The first chant that writes snapshots through the store, to `refs/chant/snapshots` by default.", file: "lifecycle/snapshot-store.ts", modules: ["@intentius/chant", "@intentius/chant/index", "@intentius/chant/lifecycle/index", "@intentius/chant/lifecycle/snapshot-store"] },
|
|
140
146
|
{ name: "NOTIFY_MESSAGE_WORDS_FLOOR", version: "0.124.78", gates: "The first chant whose Slack and Teams messages take a product's words, a drift event's `rerunUrl` and the relay's name (#4818): `notify.message` in the words, `message` in sendNotify's options, and the third argument of `slackMessage` and `teamsMessage`.", issue: "#4818", file: "notify-product.ts", modules: ["@intentius/chant/ci-product", "@intentius/chant/notify-product"] },
|
|
@@ -286,8 +292,8 @@ export const FLOOR_ROWS = [
|
|
|
286
292
|
{ name: "RELEASE_CANDIDATES_CLOSES_FLOOR", version: "0.124.63", gates: "The first chant whose candidates carry `changes[].closes` and `groups[].issue` (#4649).", issue: "#4649", file: "workspace/release-candidates.ts", modules: ["@intentius/chant/workspace/release-candidates"] },
|
|
287
293
|
{ name: "RELEASE_CANDIDATES_LANE_FLOOR", version: "0.124.64", gates: "The first chant whose candidates document carries `lane` and reads a lane's tags (#4692).", issue: "#4692", file: "workspace/release-candidates.ts", modules: ["@intentius/chant/workspace/release-candidates"] },
|
|
288
294
|
{ name: "TRAIN_PROMOTE_FLOOR", version: "0.124.98", gates: "The first chant that writes ReleaseTrainRecord.trainDigest and has `chant workspace train promote` (#4037).", issue: "#4037", file: "workspace/release-train.ts", modules: ["@intentius/chant/workspace/release-train"] },
|
|
289
|
-
{ name: "TRAIN_PUBLISH_TARGETS_FLOOR", version:
|
|
290
|
-
{ name: "PROW_LEXICON_FLOOR", version:
|
|
295
|
+
{ name: "TRAIN_PUBLISH_TARGETS_FLOOR", version: "0.124.101", gates: "The first chant whose `chant workspace train publish` orders and resumes members of every target kind (#5165): the oci, forge, homebrew, index, marketplace, pypi, cargo, mcp-registry and tauri-updater targets name what they publish and need, say whether a pinned release is published, and wait until a reveal is served before the next layer; a member's `release.dependsOn` names members a manifest doesn't show.", issue: "#5165", file: "workspace/train-publish.ts", modules: ["@intentius/chant/workspace/train-publish"] },
|
|
296
|
+
{ name: "PROW_LEXICON_FLOOR", version: "0.124.101", package: "@intentius/chant-lexicon-prow", gates: "The first prow lexicon release: `Presubmit`, `Postsubmit`, `Periodic` and `JobConfig`, `emitJobConfig` for plain job data, `forgeJobConfig` for one repository's jobs keyed by its owner/name (#5170), the generators behind `chant build --components --generate prow` and `chant run --generate prow` (#5189), `chant import` of a job config, and the PROW rules (#5169).", issue: "#5169", file: "lexicons/prow/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-prow", "@intentius/chant-lexicon-prow/chant-floors", "@intentius/chant-lexicon-prow/index"] },
|
|
291
297
|
{ name: "MODULE_CONSUMERS_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `moduleConsumers`, the scan of every registry module call a root makes, with `readRegistryCatalog` and `deprecatedPins` beside it on `./registry` (#4599).", issue: "#4599", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
|
|
292
298
|
{ name: "USED_SOURCES_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `usedSources`, every module source and provider address a root uses, with `moduleSourceForms`, `providerAddressForms` and `lockedProviders` on `./registry` (#3924).", issue: "#3924", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/registry", "@intentius/chant-lexicon-terraform/registry/index"] },
|
|
293
299
|
{ name: "MODULE_CATALOG_FLOOR", version: "0.124.55", package: "@intentius/chant-lexicon-terraform", gates: "The first terraform lexicon release that has `./module-catalog`, the known-module catalog TF047 reads (#4560).", issue: "#4560", file: "lexicons/terraform/src/chant-floors.ts", modules: ["@intentius/chant-lexicon-terraform/chant-floors", "@intentius/chant-lexicon-terraform/module-catalog", "@intentius/chant-lexicon-terraform/module-catalog/index"] },
|
package/dist/lexicon.d.ts
CHANGED
|
@@ -1930,9 +1930,11 @@ export interface LexiconPlugin {
|
|
|
1930
1930
|
* folded source, as it calls `workspaceOutputs`, and checks each link like
|
|
1931
1931
|
* one a kind's reader found (WSP093 to WSP095, WSP099 for `gaps`), naming
|
|
1932
1932
|
* the file and line of the declaring entity. Pure: no I/O. Return
|
|
1933
|
-
* `undefined` when the project declares nothing that links.
|
|
1933
|
+
* `undefined` when the project declares nothing that links. It may return
|
|
1934
|
+
* a promise, so a lexicon can load the code that reads its links only when
|
|
1935
|
+
* a workspace asks for them (#5219).
|
|
1934
1936
|
*/
|
|
1935
|
-
workspaceLinks?(entities: ReadonlyMap<string, Declarable>, unread?: readonly LexiconUnreadSource[]): LexiconWorkspaceLinks | undefined
|
|
1937
|
+
workspaceLinks?(entities: ReadonlyMap<string, Declarable>, unread?: readonly LexiconUnreadSource[]): LexiconWorkspaceLinks | undefined | Promise<LexiconWorkspaceLinks | undefined>;
|
|
1936
1938
|
/** Provide completions for LSP */
|
|
1937
1939
|
completionProvider?(ctx: CompletionContext): CompletionItem[];
|
|
1938
1940
|
/** Provide hover information for LSP */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Package files for the registry targets' tests (#5232): zips and plain tars built in memory, a fake fetch reply, and a publish context. */
|
|
2
|
+
import type { PublishContext } from "../release-publish.js";
|
|
3
|
+
import { type ReleaseArtifact } from "../release-store.js";
|
|
4
|
+
/** A zip of `files`, in order. */
|
|
5
|
+
export declare function zipOf(files: Record<string, string | Buffer>): Buffer;
|
|
6
|
+
/** A plain ustar tar of `files`, as a `.gem` is. */
|
|
7
|
+
export declare function tarOf(files: Record<string, string | Buffer>): Buffer;
|
|
8
|
+
export declare const sha256: (b: Buffer) => string;
|
|
9
|
+
export declare const reply: (status: number, body?: string | Buffer) => {
|
|
10
|
+
ok: boolean;
|
|
11
|
+
status: number;
|
|
12
|
+
headers: {
|
|
13
|
+
get: () => null;
|
|
14
|
+
};
|
|
15
|
+
text: () => Promise<string>;
|
|
16
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
17
|
+
};
|
|
18
|
+
/** A publish context for the member at `cwd`, its log lines kept. */
|
|
19
|
+
export declare function publishContext(cwd: string, env: NodeJS.ProcessEnv, artifacts?: ReleaseArtifact[], extra?: Partial<PublishContext>): PublishContext & {
|
|
20
|
+
lines: string[];
|
|
21
|
+
};
|
|
22
|
+
/** The file part of a multipart/form-data body. */
|
|
23
|
+
export declare function formFile(body: Uint8Array, type: string): {
|
|
24
|
+
field: string;
|
|
25
|
+
name: string;
|
|
26
|
+
bytes: Buffer;
|
|
27
|
+
};
|
|
28
|
+
/** Run `p` and return the PublishTargetError-like error it throws. */
|
|
29
|
+
export declare function refusal(p: Promise<unknown>): Promise<Error & {
|
|
30
|
+
code: string;
|
|
31
|
+
fix?: string;
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** Package files for the registry targets' tests (#5232): zips and plain tars built in memory, a fake fetch reply, and a publish context. */
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { createRedactor } from "../publish-credentials.js";
|
|
4
|
+
import { zipArchive } from "../release-artifacts.js";
|
|
5
|
+
import { makeRelease } from "../release-store.js";
|
|
6
|
+
/** A zip of `files`, in order. */
|
|
7
|
+
export function zipOf(files) {
|
|
8
|
+
return zipArchive(Object.entries(files).map(([name, v]) => ({ name, bytes: Buffer.isBuffer(v) ? v : Buffer.from(v) })), 315532800);
|
|
9
|
+
}
|
|
10
|
+
/** A plain ustar tar of `files`, as a `.gem` is. */
|
|
11
|
+
export function tarOf(files) {
|
|
12
|
+
const blocks = [];
|
|
13
|
+
for (const [name, v] of Object.entries(files)) {
|
|
14
|
+
const body = Buffer.isBuffer(v) ? v : Buffer.from(v);
|
|
15
|
+
const h = Buffer.alloc(512);
|
|
16
|
+
h.write(name, 0, "utf-8");
|
|
17
|
+
h.write("0000644\0", 100);
|
|
18
|
+
h.write("0000000\0", 108);
|
|
19
|
+
h.write("0000000\0", 116);
|
|
20
|
+
h.write(`${body.length.toString(8).padStart(11, "0")}\0`, 124);
|
|
21
|
+
h.write("00000000000\0", 136);
|
|
22
|
+
h.write(" ", 148);
|
|
23
|
+
h.write("0", 156);
|
|
24
|
+
h.write("ustar\0", 257);
|
|
25
|
+
h.write("00", 263);
|
|
26
|
+
let sum = 0;
|
|
27
|
+
for (const b of h)
|
|
28
|
+
sum += b;
|
|
29
|
+
h.write(`${sum.toString(8).padStart(6, "0")}\0 `, 148);
|
|
30
|
+
blocks.push(h, body, Buffer.alloc((512 - (body.length % 512)) % 512));
|
|
31
|
+
}
|
|
32
|
+
blocks.push(Buffer.alloc(1024));
|
|
33
|
+
return Buffer.concat(blocks);
|
|
34
|
+
}
|
|
35
|
+
export const sha256 = (b) => createHash("sha256").update(b).digest("hex");
|
|
36
|
+
export const reply = (status, body = "") => ({
|
|
37
|
+
ok: status < 300,
|
|
38
|
+
status,
|
|
39
|
+
headers: { get: () => null },
|
|
40
|
+
text: async () => body.toString(),
|
|
41
|
+
arrayBuffer: async () => {
|
|
42
|
+
const b = Buffer.isBuffer(body) ? body : Buffer.from(body);
|
|
43
|
+
return b.buffer.slice(b.byteOffset, b.byteOffset + b.byteLength);
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
/** A publish context for the member at `cwd`, its log lines kept. */
|
|
47
|
+
export function publishContext(cwd, env, artifacts = [], extra = {}) {
|
|
48
|
+
const redactor = createRedactor(env);
|
|
49
|
+
const lines = [];
|
|
50
|
+
const release = makeRelease({ member: null, commit: "c0ffee".padEnd(40, "0"), artifactDigests: artifacts, targets: [{ env: "dev", params: [], templates: [] }] });
|
|
51
|
+
return { release, label: "1.2.0", releaseTag: "release/1.2.0", provenance: { oidc: false, ci: null, reason: "" }, cwd, tag: null, env, redactor, log: (l) => lines.push(redactor.redact(l)), lines, ...extra };
|
|
52
|
+
}
|
|
53
|
+
/** The file part of a multipart/form-data body. */
|
|
54
|
+
export function formFile(body, type) {
|
|
55
|
+
const boundary = /boundary=(.+)$/.exec(type)[1];
|
|
56
|
+
const raw = Buffer.from(body).toString("latin1");
|
|
57
|
+
const part = raw.split(`--${boundary}`)[1].replace(/^\r\n/, "");
|
|
58
|
+
const [head, ...rest] = part.split("\r\n\r\n");
|
|
59
|
+
return { field: /name="([^"]+)"/.exec(head)[1], name: /filename="([^"]+)"/.exec(head)[1], bytes: Buffer.from(rest.join("\r\n\r\n").replace(/\r\n$/, ""), "latin1") };
|
|
60
|
+
}
|
|
61
|
+
/** Run `p` and return the PublishTargetError-like error it throws. */
|
|
62
|
+
export async function refusal(p) {
|
|
63
|
+
try {
|
|
64
|
+
await p;
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
if (err instanceof Error && typeof err.code === "string")
|
|
68
|
+
return err;
|
|
69
|
+
throw err;
|
|
70
|
+
}
|
|
71
|
+
throw new Error("expected a refusal");
|
|
72
|
+
}
|
|
@@ -207,6 +207,11 @@ if (args[0] === "publish") {
|
|
|
207
207
|
const p = reg.packages[args[1]];
|
|
208
208
|
if (!p) { console.error("npm error code E404"); console.error("npm error 404 Not Found - " + args[1]); process.exit(1); }
|
|
209
209
|
console.log(JSON.stringify(p.versions.length === 1 ? p.versions[0] : p.versions));
|
|
210
|
+
} else if (args[0] === "view" && args[2] === "version" && args[1].lastIndexOf("@") <= 0) {
|
|
211
|
+
// #5230: a view of a bare name asks whether the package was ever published.
|
|
212
|
+
const p = reg.packages[args[1]];
|
|
213
|
+
if (!p) { console.error("npm error code E404"); console.error("npm error 404 Not Found - " + args[1]); process.exit(1); }
|
|
214
|
+
console.log(p.distTags.latest || p.versions[p.versions.length - 1] || "");
|
|
210
215
|
} else if (args[0] === "view") {
|
|
211
216
|
const [name, version] = split(args[1]);
|
|
212
217
|
const p = reg.packages[name];
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* (`_authToken=...`, `Authorization: Bearer ...`).
|
|
16
16
|
*/
|
|
17
17
|
/** Environment variables that hold a token in CI or for a registry. Their values are masked in all publish output. */
|
|
18
|
-
export declare const TOKEN_ENV_VARS: readonly ["NODE_AUTH_TOKEN", "NPM_TOKEN", "NPM_ID_TOKEN", "SIGSTORE_ID_TOKEN", "ACTIONS_ID_TOKEN_REQUEST_TOKEN", "ACTIONS_RUNTIME_TOKEN", "GITHUB_TOKEN", "GH_TOKEN", "GITLAB_TOKEN", "CI_JOB_TOKEN", "FORGEJO_TOKEN", "GITEA_TOKEN", "OCI_PASSWORD", "DOCKER_PASSWORD", "VSCE_PAT", "OVSX_PAT", "PYPI_TOKEN", "TEST_PYPI_TOKEN", "TWINE_PASSWORD", "PYPI_ID_TOKEN", "CARGO_REGISTRY_TOKEN", "CRATES_IO_ID_TOKEN", "MCP_GITHUB_TOKEN", "MCP_REGISTRY_TOKEN"];
|
|
18
|
+
export declare const TOKEN_ENV_VARS: readonly ["NODE_AUTH_TOKEN", "NPM_TOKEN", "NPM_ID_TOKEN", "SIGSTORE_ID_TOKEN", "ACTIONS_ID_TOKEN_REQUEST_TOKEN", "ACTIONS_RUNTIME_TOKEN", "GITHUB_TOKEN", "GH_TOKEN", "GITLAB_TOKEN", "CI_JOB_TOKEN", "FORGEJO_TOKEN", "GITEA_TOKEN", "OCI_PASSWORD", "DOCKER_PASSWORD", "VSCE_PAT", "OVSX_PAT", "PYPI_TOKEN", "TEST_PYPI_TOKEN", "TWINE_PASSWORD", "PYPI_ID_TOKEN", "CARGO_REGISTRY_TOKEN", "CRATES_IO_ID_TOKEN", "MCP_GITHUB_TOKEN", "MCP_REGISTRY_TOKEN", "MAVEN_CENTRAL_PASSWORD", "NUGET_API_KEY", "NUGET_ID_TOKEN", "GEM_HOST_API_KEY", "RUBYGEMS_ID_TOKEN"];
|
|
19
19
|
/** What a masked value is replaced with. */
|
|
20
20
|
export declare const REDACTED = "[redacted]";
|
|
21
21
|
/** Masks credentials in text a publish prints. */
|
|
@@ -40,6 +40,11 @@ export const TOKEN_ENV_VARS = [
|
|
|
40
40
|
"CRATES_IO_ID_TOKEN",
|
|
41
41
|
"MCP_GITHUB_TOKEN",
|
|
42
42
|
"MCP_REGISTRY_TOKEN",
|
|
43
|
+
"MAVEN_CENTRAL_PASSWORD",
|
|
44
|
+
"NUGET_API_KEY",
|
|
45
|
+
"NUGET_ID_TOKEN",
|
|
46
|
+
"GEM_HOST_API_KEY",
|
|
47
|
+
"RUBYGEMS_ID_TOKEN",
|
|
43
48
|
];
|
|
44
49
|
/** What a masked value is replaced with. */
|
|
45
50
|
export const REDACTED = "[redacted]";
|