@xemahq/xema 0.33.2 → 0.33.4
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/edition/verify-image-evidence.bundle.mjs +12 -17
- package/dist/edition/verify-image-evidence.bundle.provenance.json +47 -41
- package/dist/runtime/runner/chart-set-lock.d.ts +0 -3
- package/dist/runtime/runner/chart-set-lock.d.ts.map +1 -1
- package/dist/runtime/runner/chart-set-lock.js +3 -25
- package/dist/runtime/runner/chart-set-lock.js.map +1 -1
- package/edition/chart-set-source-commit.mjs +2 -7
- package/edition/checkout-indexed-source-repositories.mjs +67 -0
- package/edition/cross-repo-build-inputs.mjs +158 -0
- package/edition/develop-chart-set.mjs +61 -0
- package/edition/develop-edition-resolve.mjs +6 -7
- package/edition/dist-check.mjs +1 -2
- package/edition/edition-artifact.mjs +1 -1
- package/edition/edition-chart-set.mjs +11 -53
- package/edition/git-json.mjs +54 -0
- package/edition/lib.mjs +3 -165
- package/edition/release-channel-guard.mjs +3 -4
- package/edition/release-edition-artifact.mjs +1 -1
- package/edition/resolve-chart-set.mjs +7 -69
- package/edition/resolve-customer-edition.mjs +1 -1
- package/edition/resolve-images.mjs +1 -3
- package/package.json +2 -2
|
@@ -59428,9 +59428,6 @@ function assertCanonicalDistributionId(distributionId) {
|
|
|
59428
59428
|
return distributionId;
|
|
59429
59429
|
}
|
|
59430
59430
|
|
|
59431
|
-
// edition/edition-channel.mjs
|
|
59432
|
-
var EditionChannel = Object.freeze({ Develop: "develop", Release: "release" });
|
|
59433
|
-
|
|
59434
59431
|
// edition/edition-workspace.mjs
|
|
59435
59432
|
import { existsSync, realpathSync, statSync } from "node:fs";
|
|
59436
59433
|
import { join, resolve } from "node:path";
|
|
@@ -59544,15 +59541,9 @@ var EditionChartSetCheck = Object.freeze({
|
|
|
59544
59541
|
MISSING: "missing",
|
|
59545
59542
|
STALE: "stale"
|
|
59546
59543
|
});
|
|
59547
|
-
|
|
59548
|
-
|
|
59549
|
-
|
|
59550
|
-
});
|
|
59551
|
-
var DEVELOP_CHART_VERSION_PREFIX = "0.0.0-dev.";
|
|
59552
|
-
var DEVELOP_CHART_SHA_LENGTH = 12;
|
|
59553
|
-
var DEVELOP_CHART_VERSION_PATTERN = new RegExp(
|
|
59554
|
-
`^${DEVELOP_CHART_VERSION_PREFIX.replaceAll(".", "\\.")}[0-9a-f]{${DEVELOP_CHART_SHA_LENGTH}}$`
|
|
59555
|
-
);
|
|
59544
|
+
|
|
59545
|
+
// edition/edition-channel.mjs
|
|
59546
|
+
var EditionChannel = Object.freeze({ Develop: "develop", Release: "release" });
|
|
59556
59547
|
|
|
59557
59548
|
// edition/edition-contract-parse.mjs
|
|
59558
59549
|
var EDITION_CONTRACT_SCHEMA = "xema.edition-contract/v2";
|
|
@@ -59664,7 +59655,7 @@ var EDITION_LOCKS = Object.freeze([...EDITION_CONTRACT.locks]);
|
|
|
59664
59655
|
var EDITION_FILES = Object.freeze([EDITION_DESCRIPTOR_FILE, ...EDITION_LOCKS]);
|
|
59665
59656
|
|
|
59666
59657
|
// edition/lib.mjs
|
|
59667
|
-
import { createRequire as
|
|
59658
|
+
import { createRequire as createRequire4 } from "node:module";
|
|
59668
59659
|
import { isIP } from "node:net";
|
|
59669
59660
|
var import_yaml = __toESM(require_dist(), 1);
|
|
59670
59661
|
|
|
@@ -60350,12 +60341,16 @@ var COMMIT_PATTERN = /^[a-f0-9]{40}$/;
|
|
|
60350
60341
|
var SHA256_HEX_PATTERN = /^[a-f0-9]{64}$/;
|
|
60351
60342
|
var SHA256_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/;
|
|
60352
60343
|
|
|
60353
|
-
// edition/
|
|
60344
|
+
// edition/git-json.mjs
|
|
60354
60345
|
import { createRequire } from "node:module";
|
|
60355
60346
|
var requireFromHere = createRequire(import.meta.url);
|
|
60356
60347
|
|
|
60357
|
-
// edition/
|
|
60348
|
+
// edition/kernel-capability-domain.mjs
|
|
60358
60349
|
import { createRequire as createRequire2 } from "node:module";
|
|
60350
|
+
var requireFromHere2 = createRequire2(import.meta.url);
|
|
60351
|
+
|
|
60352
|
+
// edition/operation-requirements.mjs
|
|
60353
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
60359
60354
|
|
|
60360
60355
|
// edition/string-order.mjs
|
|
60361
60356
|
function compareStrings(a, b) {
|
|
@@ -60366,7 +60361,7 @@ function compareStrings(a, b) {
|
|
|
60366
60361
|
}
|
|
60367
60362
|
|
|
60368
60363
|
// edition/operation-requirements.mjs
|
|
60369
|
-
var
|
|
60364
|
+
var requireFromHere3 = createRequire3(import.meta.url);
|
|
60370
60365
|
var PRINCIPAL_PRIVILEGE_FIELDS = Object.freeze(["requiresOperations", "requiresOrganizationSweeps"]);
|
|
60371
60366
|
|
|
60372
60367
|
// edition/source-authority.mjs
|
|
@@ -60376,7 +60371,7 @@ var DistributionSourceMode = Object.freeze({
|
|
|
60376
60371
|
});
|
|
60377
60372
|
|
|
60378
60373
|
// edition/lib.mjs
|
|
60379
|
-
var requireFromLib =
|
|
60374
|
+
var requireFromLib = createRequire4(import.meta.url);
|
|
60380
60375
|
var WorkerProtocolKind = Object.freeze({ Worker: "worker", None: "none" });
|
|
60381
60376
|
var GIT_LS_TREE_MAX_BUFFER = 256 * 1024 * 1024;
|
|
60382
60377
|
function serializeJson(value) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"artifactSha256": "sha256:
|
|
3
|
+
"artifactSha256": "sha256:4fffbefc61cab2c4844351c1397fd18198f33d58532a4c31b9c333c3627097ba",
|
|
4
4
|
"esbuild": {
|
|
5
5
|
"version": "0.28.2"
|
|
6
6
|
},
|
|
@@ -2203,223 +2203,229 @@
|
|
|
2203
2203
|
},
|
|
2204
2204
|
{
|
|
2205
2205
|
"package": "@xemahq/xema",
|
|
2206
|
-
"version": "0.33.
|
|
2206
|
+
"version": "0.33.4",
|
|
2207
2207
|
"path": "edition/adapter-host-versions.mjs",
|
|
2208
2208
|
"sha256": "sha256:1b7ebd3592f4da1225fba74aaba912e7d85fbceeb1626f7dcdac83491cbb4d69"
|
|
2209
2209
|
},
|
|
2210
2210
|
{
|
|
2211
2211
|
"package": "@xemahq/xema",
|
|
2212
|
-
"version": "0.33.
|
|
2212
|
+
"version": "0.33.4",
|
|
2213
2213
|
"path": "edition/authorization-base.mjs",
|
|
2214
2214
|
"sha256": "sha256:bbeac7ff01376cb89ed2140526d4795d8e559b3f01612b404a701f19aaa24c6a"
|
|
2215
2215
|
},
|
|
2216
2216
|
{
|
|
2217
2217
|
"package": "@xemahq/xema",
|
|
2218
|
-
"version": "0.33.
|
|
2218
|
+
"version": "0.33.4",
|
|
2219
2219
|
"path": "edition/build-ledger.mjs",
|
|
2220
2220
|
"sha256": "sha256:05202cbdd606aee086c8e9c62d28be68c429653a8b1d73a289ed0fe4ff14da85"
|
|
2221
2221
|
},
|
|
2222
2222
|
{
|
|
2223
2223
|
"package": "@xemahq/xema",
|
|
2224
|
-
"version": "0.33.
|
|
2224
|
+
"version": "0.33.4",
|
|
2225
2225
|
"path": "edition/connector-source-authority.mjs",
|
|
2226
2226
|
"sha256": "sha256:ea94475f4324737673accd7de1303c44db1cbc4dac61a865a06cd83abe310164"
|
|
2227
2227
|
},
|
|
2228
2228
|
{
|
|
2229
2229
|
"package": "@xemahq/xema",
|
|
2230
|
-
"version": "0.33.
|
|
2230
|
+
"version": "0.33.4",
|
|
2231
2231
|
"path": "edition/distribution-paths.mjs",
|
|
2232
2232
|
"sha256": "sha256:d78a5c8405bc6c25d36fcec61b0030e1fdacac7d528e698adb96f906f4b70279"
|
|
2233
2233
|
},
|
|
2234
2234
|
{
|
|
2235
2235
|
"package": "@xemahq/xema",
|
|
2236
|
-
"version": "0.33.
|
|
2236
|
+
"version": "0.33.4",
|
|
2237
2237
|
"path": "edition/edition-artifact.mjs",
|
|
2238
|
-
"sha256": "sha256:
|
|
2238
|
+
"sha256": "sha256:e8a391938c88398f63f86fdf413582d3a18eb20c219784a01fa84794bbd22e38"
|
|
2239
2239
|
},
|
|
2240
2240
|
{
|
|
2241
2241
|
"package": "@xemahq/xema",
|
|
2242
|
-
"version": "0.33.
|
|
2242
|
+
"version": "0.33.4",
|
|
2243
2243
|
"path": "edition/edition-channel.mjs",
|
|
2244
2244
|
"sha256": "sha256:3c0c1564dc50be133cad500452d953353aa5beb703142c05a17bbce8175ba9f3"
|
|
2245
2245
|
},
|
|
2246
2246
|
{
|
|
2247
2247
|
"package": "@xemahq/xema",
|
|
2248
|
-
"version": "0.33.
|
|
2248
|
+
"version": "0.33.4",
|
|
2249
2249
|
"path": "edition/edition-chart-set.mjs",
|
|
2250
|
-
"sha256": "sha256:
|
|
2250
|
+
"sha256": "sha256:cea98292ffc8bfe2afcc01f327172bc9071a83ef9b62a4e56236f2029d2699a9"
|
|
2251
2251
|
},
|
|
2252
2252
|
{
|
|
2253
2253
|
"package": "@xemahq/xema",
|
|
2254
|
-
"version": "0.33.
|
|
2254
|
+
"version": "0.33.4",
|
|
2255
2255
|
"path": "edition/edition-config.mjs",
|
|
2256
2256
|
"sha256": "sha256:e3997bd9a0082e02d01760868b2a4f41ed3081e904126b30fdf86e7938dc6137"
|
|
2257
2257
|
},
|
|
2258
2258
|
{
|
|
2259
2259
|
"package": "@xemahq/xema",
|
|
2260
|
-
"version": "0.33.
|
|
2260
|
+
"version": "0.33.4",
|
|
2261
2261
|
"path": "edition/edition-constants.mjs",
|
|
2262
2262
|
"sha256": "sha256:71ae51028847ab3430ffec9b229b0516a7705b75a6de1fcfa665f5e1abf8e9bb"
|
|
2263
2263
|
},
|
|
2264
2264
|
{
|
|
2265
2265
|
"package": "@xemahq/xema",
|
|
2266
|
-
"version": "0.33.
|
|
2266
|
+
"version": "0.33.4",
|
|
2267
2267
|
"path": "edition/edition-contract-parse.mjs",
|
|
2268
2268
|
"sha256": "sha256:c575e96b70bda82899931eb0b18567988e2e13e664fa498bcbef96b571dcabb4"
|
|
2269
2269
|
},
|
|
2270
2270
|
{
|
|
2271
2271
|
"package": "@xemahq/xema",
|
|
2272
|
-
"version": "0.33.
|
|
2272
|
+
"version": "0.33.4",
|
|
2273
2273
|
"path": "edition/edition-contract.json",
|
|
2274
2274
|
"sha256": "sha256:aa1a05f1728813a7bdb1e02d9305e9adf641d695e6767305210c67a1d81b38a7"
|
|
2275
2275
|
},
|
|
2276
2276
|
{
|
|
2277
2277
|
"package": "@xemahq/xema",
|
|
2278
|
-
"version": "0.33.
|
|
2278
|
+
"version": "0.33.4",
|
|
2279
2279
|
"path": "edition/edition-protocol.mjs",
|
|
2280
2280
|
"sha256": "sha256:2940a0ee8662970722aa2618a1635f8d5b4f5e54b85f09667f71ccf7c2c81b03"
|
|
2281
2281
|
},
|
|
2282
2282
|
{
|
|
2283
2283
|
"package": "@xemahq/xema",
|
|
2284
|
-
"version": "0.33.
|
|
2284
|
+
"version": "0.33.4",
|
|
2285
2285
|
"path": "edition/edition-source-pins.mjs",
|
|
2286
2286
|
"sha256": "sha256:b2190ace174a29875e2a9bd7209460b0ef6de186aca9b31bcd45dc17af57c1ba"
|
|
2287
2287
|
},
|
|
2288
2288
|
{
|
|
2289
2289
|
"package": "@xemahq/xema",
|
|
2290
|
-
"version": "0.33.
|
|
2290
|
+
"version": "0.33.4",
|
|
2291
2291
|
"path": "edition/edition-workspace.mjs",
|
|
2292
2292
|
"sha256": "sha256:f7267e93fd7dc07cf65fb8cac2c4439d28a72c1e0acbdeca1648c6859440eb32"
|
|
2293
2293
|
},
|
|
2294
2294
|
{
|
|
2295
2295
|
"package": "@xemahq/xema",
|
|
2296
|
-
"version": "0.33.
|
|
2296
|
+
"version": "0.33.4",
|
|
2297
2297
|
"path": "edition/evidence-checkout.mjs",
|
|
2298
2298
|
"sha256": "sha256:31fb669769b31de4c6f2b2501bb96959548172ef166e7568edbbfed7f5079a11"
|
|
2299
2299
|
},
|
|
2300
2300
|
{
|
|
2301
2301
|
"package": "@xemahq/xema",
|
|
2302
|
-
"version": "0.33.
|
|
2302
|
+
"version": "0.33.4",
|
|
2303
2303
|
"path": "edition/evidence-grammars.mjs",
|
|
2304
2304
|
"sha256": "sha256:4dae22b61ade99219a482b971c9780d68a3d37d021e39cdfe860b245364b8b9f"
|
|
2305
2305
|
},
|
|
2306
2306
|
{
|
|
2307
2307
|
"package": "@xemahq/xema",
|
|
2308
|
-
"version": "0.33.
|
|
2308
|
+
"version": "0.33.4",
|
|
2309
2309
|
"path": "edition/evidence-trust-pin.mjs",
|
|
2310
2310
|
"sha256": "sha256:b9dd5c01903394436530783614efb0cd357d982ed2befd844a39328479773cbc"
|
|
2311
2311
|
},
|
|
2312
2312
|
{
|
|
2313
2313
|
"package": "@xemahq/xema",
|
|
2314
|
-
"version": "0.33.
|
|
2314
|
+
"version": "0.33.4",
|
|
2315
|
+
"path": "edition/git-json.mjs",
|
|
2316
|
+
"sha256": "sha256:d0d25cda0c19007becabc9a2827c3dcf759b295cd0b41596eb4480c9549a1f21"
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
"package": "@xemahq/xema",
|
|
2320
|
+
"version": "0.33.4",
|
|
2315
2321
|
"path": "edition/image-delivery-entitlement-descriptor.mjs",
|
|
2316
2322
|
"sha256": "sha256:4726b66116f01bf2523fafe2b7a356591eca8fb5ca6bd8b154dd4821873e921b"
|
|
2317
2323
|
},
|
|
2318
2324
|
{
|
|
2319
2325
|
"package": "@xemahq/xema",
|
|
2320
|
-
"version": "0.33.
|
|
2326
|
+
"version": "0.33.4",
|
|
2321
2327
|
"path": "edition/image-evidence-replay-state.mjs",
|
|
2322
2328
|
"sha256": "sha256:eba0cf1d38af0ab2f00c5099fa8bc2edc543136ce92f895544d4d284b3d6af0f"
|
|
2323
2329
|
},
|
|
2324
2330
|
{
|
|
2325
2331
|
"package": "@xemahq/xema",
|
|
2326
|
-
"version": "0.33.
|
|
2332
|
+
"version": "0.33.4",
|
|
2327
2333
|
"path": "edition/image-evidence.mjs",
|
|
2328
2334
|
"sha256": "sha256:09945712ecc6524d5f52cfd82141ef4cade45be35210777f6e32818792068881"
|
|
2329
2335
|
},
|
|
2330
2336
|
{
|
|
2331
2337
|
"package": "@xemahq/xema",
|
|
2332
|
-
"version": "0.33.
|
|
2338
|
+
"version": "0.33.4",
|
|
2333
2339
|
"path": "edition/kernel-capability-domain.mjs",
|
|
2334
2340
|
"sha256": "sha256:3ecf887dd8d399e91a8285f6f115f6e418fb59bbf3f004539fe65ec667219356"
|
|
2335
2341
|
},
|
|
2336
2342
|
{
|
|
2337
2343
|
"package": "@xemahq/xema",
|
|
2338
|
-
"version": "0.33.
|
|
2344
|
+
"version": "0.33.4",
|
|
2339
2345
|
"path": "edition/kernel-contract-authority.mjs",
|
|
2340
2346
|
"sha256": "sha256:20abdde62a7b037c01ea9bbe1ff1e6094e6b0efd0add2f656f1938a04409bf82"
|
|
2341
2347
|
},
|
|
2342
2348
|
{
|
|
2343
2349
|
"package": "@xemahq/xema",
|
|
2344
|
-
"version": "0.33.
|
|
2350
|
+
"version": "0.33.4",
|
|
2345
2351
|
"path": "edition/lib.mjs",
|
|
2346
|
-
"sha256": "sha256:
|
|
2352
|
+
"sha256": "sha256:0e9045632a14cb1a035bce7aac3ad26e7b2211daa3f9c2cd27a55dfd772e3b6b"
|
|
2347
2353
|
},
|
|
2348
2354
|
{
|
|
2349
2355
|
"package": "@xemahq/xema",
|
|
2350
|
-
"version": "0.33.
|
|
2356
|
+
"version": "0.33.4",
|
|
2351
2357
|
"path": "edition/no-follow-file.mjs",
|
|
2352
2358
|
"sha256": "sha256:c17bdf5e441f3c079aa06d4b48bbed05cad087855b9ad2a5e6dc43d5ee2b17c3"
|
|
2353
2359
|
},
|
|
2354
2360
|
{
|
|
2355
2361
|
"package": "@xemahq/xema",
|
|
2356
|
-
"version": "0.33.
|
|
2362
|
+
"version": "0.33.4",
|
|
2357
2363
|
"path": "edition/operation-requirements.mjs",
|
|
2358
2364
|
"sha256": "sha256:ffe6fdc9da6b2974270fc86c11be0c41d0bc6d85c8e3c137d3c3bc00a72fc4f6"
|
|
2359
2365
|
},
|
|
2360
2366
|
{
|
|
2361
2367
|
"package": "@xemahq/xema",
|
|
2362
|
-
"version": "0.33.
|
|
2368
|
+
"version": "0.33.4",
|
|
2363
2369
|
"path": "edition/pin-source.mjs",
|
|
2364
2370
|
"sha256": "sha256:fbaa6dffbdf4a262a13127bcf37bca791234fae74e327ac250e56ff4b78c1244"
|
|
2365
2371
|
},
|
|
2366
2372
|
{
|
|
2367
2373
|
"package": "@xemahq/xema",
|
|
2368
|
-
"version": "0.33.
|
|
2374
|
+
"version": "0.33.4",
|
|
2369
2375
|
"path": "edition/source-authority.mjs",
|
|
2370
2376
|
"sha256": "sha256:858b607dde94e2abd00a341f569e18cfa567d4bff139c64a2d60abbb7de4c85e"
|
|
2371
2377
|
},
|
|
2372
2378
|
{
|
|
2373
2379
|
"package": "@xemahq/xema",
|
|
2374
|
-
"version": "0.33.
|
|
2380
|
+
"version": "0.33.4",
|
|
2375
2381
|
"path": "edition/strict-json.mjs",
|
|
2376
2382
|
"sha256": "sha256:f95778396df7f38b086f55d2ec4f3b6644a8aeff2b32282a62829145fb544562"
|
|
2377
2383
|
},
|
|
2378
2384
|
{
|
|
2379
2385
|
"package": "@xemahq/xema",
|
|
2380
|
-
"version": "0.33.
|
|
2386
|
+
"version": "0.33.4",
|
|
2381
2387
|
"path": "edition/string-order.mjs",
|
|
2382
2388
|
"sha256": "sha256:b3210cd273e4b2e01fb8b1a91e28734cd211d4010c080d0ce95f5e5ff631cffb"
|
|
2383
2389
|
},
|
|
2384
2390
|
{
|
|
2385
2391
|
"package": "@xemahq/xema",
|
|
2386
|
-
"version": "0.33.
|
|
2392
|
+
"version": "0.33.4",
|
|
2387
2393
|
"path": "edition/trusted-executable.mjs",
|
|
2388
2394
|
"sha256": "sha256:37d46cdbc999ddd55d4ea8aeed4850ddd1efde89ed7b532f5a2ddec87105d796"
|
|
2389
2395
|
},
|
|
2390
2396
|
{
|
|
2391
2397
|
"package": "@xemahq/xema",
|
|
2392
|
-
"version": "0.33.
|
|
2398
|
+
"version": "0.33.4",
|
|
2393
2399
|
"path": "edition/verifier-binding.mjs",
|
|
2394
2400
|
"sha256": "sha256:80732658617f5255258c538eeb2383331ec8553b44b58d552b567845a7b916aa"
|
|
2395
2401
|
},
|
|
2396
2402
|
{
|
|
2397
2403
|
"package": "@xemahq/xema",
|
|
2398
|
-
"version": "0.33.
|
|
2404
|
+
"version": "0.33.4",
|
|
2399
2405
|
"path": "edition/verifier-files.mjs",
|
|
2400
2406
|
"sha256": "sha256:cdd14a20a63f0f194a8abb55680a5a7e3ced1f09f8b210a90d349e655f6de0c0"
|
|
2401
2407
|
},
|
|
2402
2408
|
{
|
|
2403
2409
|
"package": "@xemahq/xema",
|
|
2404
|
-
"version": "0.33.
|
|
2410
|
+
"version": "0.33.4",
|
|
2405
2411
|
"path": "edition/verifier-provenance.mjs",
|
|
2406
2412
|
"sha256": "sha256:3e2fb8e07cf1f66b8ad6c7ac2555fe3af64ec7abeb07cecbaf1939a18c2b3663"
|
|
2407
2413
|
},
|
|
2408
2414
|
{
|
|
2409
2415
|
"package": "@xemahq/xema",
|
|
2410
|
-
"version": "0.33.
|
|
2416
|
+
"version": "0.33.4",
|
|
2411
2417
|
"path": "edition/verify-image-evidence.mjs",
|
|
2412
2418
|
"sha256": "sha256:62f83f8bb835f360535402d12657156d2c9d6e651b426c2b30a04a2dc2f8d3e8"
|
|
2413
2419
|
},
|
|
2414
2420
|
{
|
|
2415
2421
|
"package": "@xemahq/xema",
|
|
2416
|
-
"version": "0.33.
|
|
2422
|
+
"version": "0.33.4",
|
|
2417
2423
|
"path": "edition/workspace-sections.mjs",
|
|
2418
2424
|
"sha256": "sha256:058c849767434e9ba911d9310092bede42e3ef959c75bbd35ff8879dc21ce3ff"
|
|
2419
2425
|
},
|
|
2420
2426
|
{
|
|
2421
2427
|
"package": "@xemahq/xema",
|
|
2422
|
-
"version": "0.33.
|
|
2428
|
+
"version": "0.33.4",
|
|
2423
2429
|
"path": "scripts/build-evidence-verifier.mjs",
|
|
2424
2430
|
"sha256": "sha256:5a688d20c47dc88aff37aa0c6cc02daf2c370a5bc610fef8446ce7be222d4c0b"
|
|
2425
2431
|
},
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
export declare const CHART_SET_LOCK_ENV = "XEMA_CHART_SET_LOCK";
|
|
2
2
|
export declare const CHART_SET_LOCK_FILENAME = "chart-set.lock.json";
|
|
3
3
|
export declare const CHART_SET_LOCK_SCHEMA_VERSION = 4;
|
|
4
|
-
export declare const DEVELOP_CHART_VERSION_PREFIX = "0.0.0-dev.";
|
|
5
|
-
export declare const DEVELOP_CHART_SHA_LENGTH = 12;
|
|
6
|
-
export declare const DEVELOP_CHART_VERSION_PATTERN: RegExp;
|
|
7
4
|
export declare const CHART_DIGEST_PATTERN: RegExp;
|
|
8
5
|
export interface ChartSetMember {
|
|
9
6
|
readonly version: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-set-lock.d.ts","sourceRoot":"","sources":["../../../src/runtime/runner/chart-set-lock.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAGxD,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAG7D,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAG/C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"chart-set-lock.d.ts","sourceRoot":"","sources":["../../../src/runtime/runner/chart-set-lock.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAGxD,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAG7D,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAG/C,eAAO,MAAM,oBAAoB,QAA0B,CAAC;AAG5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAE3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACvD;AAGD,wBAAgB,uBAAuB,CACrC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAQR;AAQD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAuBlE;AAuGD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMrD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHART_DIGEST_PATTERN = exports.
|
|
3
|
+
exports.CHART_DIGEST_PATTERN = exports.CHART_SET_LOCK_SCHEMA_VERSION = exports.CHART_SET_LOCK_FILENAME = exports.CHART_SET_LOCK_ENV = void 0;
|
|
4
4
|
exports.defaultChartSetLockPath = defaultChartSetLockPath;
|
|
5
5
|
exports.loadChartSetLock = loadChartSetLock;
|
|
6
6
|
exports.isMissingPath = isMissingPath;
|
|
@@ -9,9 +9,6 @@ const appliance_context_1 = require("./appliance-context");
|
|
|
9
9
|
exports.CHART_SET_LOCK_ENV = 'XEMA_CHART_SET_LOCK';
|
|
10
10
|
exports.CHART_SET_LOCK_FILENAME = 'chart-set.lock.json';
|
|
11
11
|
exports.CHART_SET_LOCK_SCHEMA_VERSION = 4;
|
|
12
|
-
exports.DEVELOP_CHART_VERSION_PREFIX = '0.0.0-dev.';
|
|
13
|
-
exports.DEVELOP_CHART_SHA_LENGTH = 12;
|
|
14
|
-
exports.DEVELOP_CHART_VERSION_PATTERN = new RegExp(`^${exports.DEVELOP_CHART_VERSION_PREFIX.replaceAll('.', '\\.')}[0-9a-f]{${exports.DEVELOP_CHART_SHA_LENGTH}}$`);
|
|
15
12
|
exports.CHART_DIGEST_PATTERN = /^sha256:[a-f0-9]{64}$/;
|
|
16
13
|
function defaultChartSetLockPath(env = process.env) {
|
|
17
14
|
const declared = env[exports.CHART_SET_LOCK_ENV];
|
|
@@ -83,28 +80,9 @@ function parseChartSetLock(parsed, path) {
|
|
|
83
80
|
function assertIndexDigest(publisher, index, path) {
|
|
84
81
|
const where = `${path}: publisher '${index}'`;
|
|
85
82
|
if (!Object.hasOwn(publisher, 'indexDigest')) {
|
|
86
|
-
throw new Error(`${where} carries no 'indexDigest' key (required: sha256:<64 hex>
|
|
87
|
-
'release index, null for a develop snapshot version).');
|
|
88
|
-
}
|
|
89
|
-
const { version, indexDigest } = publisher;
|
|
90
|
-
if (typeof version === 'string' &&
|
|
91
|
-
version.startsWith(exports.DEVELOP_CHART_VERSION_PREFIX) &&
|
|
92
|
-
!exports.DEVELOP_CHART_VERSION_PATTERN.test(version)) {
|
|
93
|
-
throw new Error(`${where} has malformed develop chart version ${JSON.stringify(version)}; ` +
|
|
94
|
-
`a develop version is exactly ${exports.DEVELOP_CHART_VERSION_PREFIX}<${exports.DEVELOP_CHART_SHA_LENGTH} lowercase hex>.`);
|
|
95
|
-
}
|
|
96
|
-
const develop = typeof version === 'string' && exports.DEVELOP_CHART_VERSION_PATTERN.test(version);
|
|
97
|
-
if (indexDigest === null) {
|
|
98
|
-
if (!develop) {
|
|
99
|
-
throw new Error(`${where} has indexDigest null with version ${JSON.stringify(version)}; ` +
|
|
100
|
-
`null is only for a develop snapshot version (${exports.DEVELOP_CHART_VERSION_PREFIX}<sha12>).`);
|
|
101
|
-
}
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
if (develop) {
|
|
105
|
-
throw new Error(`${where} has an indexDigest with develop snapshot version ${String(version)}; ` +
|
|
106
|
-
'a develop snapshot has no index chart, so indexDigest must be null.');
|
|
83
|
+
throw new Error(`${where} carries no 'indexDigest' key (required: sha256:<64 hex>).`);
|
|
107
84
|
}
|
|
85
|
+
const { indexDigest } = publisher;
|
|
108
86
|
if (typeof indexDigest !== 'string' || !exports.CHART_DIGEST_PATTERN.test(indexDigest)) {
|
|
109
87
|
throw new Error(`${where} has a malformed indexDigest (${JSON.stringify(indexDigest)}); ` +
|
|
110
88
|
'expected sha256:<64 hex>.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-set-lock.js","sourceRoot":"","sources":["../../../src/runtime/runner/chart-set-lock.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"chart-set-lock.js","sourceRoot":"","sources":["../../../src/runtime/runner/chart-set-lock.ts"],"names":[],"mappings":";;;AAmDA,0DAUC;AAQD,4CAuBC;AAuGD,sCAMC;AAzMD,qCAAuC;AAEvC,2DAAiE;AAsBpD,QAAA,kBAAkB,GAAG,qBAAqB,CAAC;AAG3C,QAAA,uBAAuB,GAAG,qBAAqB,CAAC;AAGhD,QAAA,6BAA6B,GAAG,CAAC,CAAC;AAGlC,QAAA,oBAAoB,GAAG,uBAAuB,CAAC;AAkB5D,SAAgB,uBAAuB,CACrC,MAAyB,OAAO,CAAC,GAAG;IAIpC,MAAM,QAAQ,GAAG,GAAG,CAAC,0BAAkB,CAAC,CAAC;IACzC,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,GAAG,IAAA,8CAA0B,EAAC,EAAE,GAAG,EAAE,CAAC,IAAI,+BAAuB,EAAE,CAAC;AAC7E,CAAC;AAQD,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,IAAA,sBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,IAAI,CA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AC;IACJ,CAAC;IACD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACnC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,aAAa,IAAI,mBAAmB,CAAC,CAAC;IAC/D,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,4BAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CACb,GAAG,IAAI,aAAa,IAAI,sCAAsC;YAC5D,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,8BAA8B,CAC3D,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,CAAC,CAAE,KAAiC;QACpC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAGD,SAAgB,aAAa,CAAC,KAAc;IAC1C,MAAM,IAAI,GACR,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QACzC,CAAC,CAAE,KAA4B,CAAC,IAAI;QACpC,CAAC,CAAC,SAAS,CAAC;IAChB,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,CAAC;AACjD,CAAC"}
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
//
|
|
4
4
|
// The publisher stamps its index chart with `xema.dev/chart-set-source-sha`
|
|
5
5
|
// next to `xema.dev/chart-set-charts`. This verb reads that stamp from the index
|
|
6
|
-
// chart at the digest the committed fleet `chart-set.lock.json` pins
|
|
7
|
-
// lock has none and is refused), and prints one JSON document. It refuses,
|
|
6
|
+
// chart at the digest the committed fleet `chart-set.lock.json` pins and prints one JSON document. It refuses,
|
|
8
7
|
// printing nothing, when the stamp is absent or is not a 40-hex commit, when the
|
|
9
8
|
// registry does not serve the locked digest, or when the index's roster is not
|
|
10
9
|
// the one the lock records for that publisher: the commit it would name would then be
|
|
11
10
|
// the commit of a different set than the locked one.
|
|
12
11
|
|
|
13
|
-
import { EditionChannel } from './edition-channel.mjs';
|
|
14
12
|
import { assertRosteredChartSetLock } from './edition-chart-set.mjs';
|
|
15
13
|
import { WorkspaceRoot, configureEditionWorkspaceFromProcess, isEntryModule } from './edition-workspace.mjs';
|
|
16
14
|
import { COMMIT_PATTERN } from './evidence-grammars.mjs';
|
|
@@ -59,9 +57,6 @@ export async function chartSetSourceCommits({ client, lock }) {
|
|
|
59
57
|
const publishers = [];
|
|
60
58
|
for (const { index, repo, version, indexDigest, charts } of lock.publishers) {
|
|
61
59
|
const label = `${index}@${version}`;
|
|
62
|
-
if (indexDigest === null) {
|
|
63
|
-
throw new Error(`${label}: a develop chart set names its deploy commit in the snapshot pins, not in an index chart (indexDigest is null)`);
|
|
64
|
-
}
|
|
65
60
|
// The index is read BY the digest the lock pins, so a re-pushed tag cannot answer.
|
|
66
61
|
const served = await client.getManifestByDigest(registryRepository(index), indexDigest);
|
|
67
62
|
if (served.digest !== indexDigest) {
|
|
@@ -89,7 +84,7 @@ async function main(argv) {
|
|
|
89
84
|
if (lock === null) {
|
|
90
85
|
throw new Error(`${chartSetLockPath()} is missing or is not JSON: run 'xema edition chart-set resolve' first`);
|
|
91
86
|
}
|
|
92
|
-
assertRosteredChartSetLock(lock, CHART_SET_LOCK_FILE
|
|
87
|
+
assertRosteredChartSetLock(lock, CHART_SET_LOCK_FILE);
|
|
93
88
|
const document = await chartSetSourceCommits({ client: chartRegistryClient(), lock });
|
|
94
89
|
process.stdout.write(serializeJson(document));
|
|
95
90
|
}
|
|
@@ -4,6 +4,7 @@ import { execFileSync } from 'node:child_process';
|
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync } from 'node:fs';
|
|
5
5
|
import { dirname, resolve } from 'node:path';
|
|
6
6
|
|
|
7
|
+
import { readCrossRepoBuildInputsRecord, splitCrossRepoInputKey } from './cross-repo-build-inputs.mjs';
|
|
7
8
|
import { discoverDistributionIds } from './distribution-paths.mjs';
|
|
8
9
|
import { editionWorkspaceConfig } from './edition-config.mjs';
|
|
9
10
|
import { readEditionSourcePins } from './edition-source-pins.mjs';
|
|
@@ -120,6 +121,53 @@ export function editionHeldCommits(plan, sourcePinsByEdition) {
|
|
|
120
121
|
return new Map([...held].map(([repo, commits]) => [repo, [...commits]]));
|
|
121
122
|
}
|
|
122
123
|
|
|
124
|
+
/**
|
|
125
|
+
* The commits each checkout must also hold because a consumer's cross-repo
|
|
126
|
+
* build-input record vendors bytes from them. The resolve hashes those paths at
|
|
127
|
+
* the record's commit (`resolveCrossRepoVendoredInputs`), and that commit lags
|
|
128
|
+
* or leads the source repository's own pin. The record is read AT THE
|
|
129
|
+
* CONSUMER'S PIN, by the same reader the resolve uses, from the consumer's
|
|
130
|
+
* checkout under `workspaceRoot` (so every repository must already be checked
|
|
131
|
+
* out). Maps source repo to the distinct such commits, excluding the commits
|
|
132
|
+
* the checkout already holds. A consumer or source repository without a
|
|
133
|
+
* repository pin is refused: there is no checkout to read or fetch into.
|
|
134
|
+
*
|
|
135
|
+
* @param {{ repo: string, sourceCommit: string, vendoredSourceCommit: string }[]} plan
|
|
136
|
+
* @returns {Map<string, string[]>}
|
|
137
|
+
*/
|
|
138
|
+
export function crossRepoVendoredCommits(plan, index, workspaceRoot) {
|
|
139
|
+
const pins = new Map(plan.map((entry) => [entry.repo, entry]));
|
|
140
|
+
const consumers = [...new Set((index.crossRepoBuildInputs ?? []).map((input) => input.consumerRepo))].sort();
|
|
141
|
+
const extra = new Map();
|
|
142
|
+
for (const consumerRepo of consumers) {
|
|
143
|
+
const consumer = pins.get(consumerRepo);
|
|
144
|
+
if (!consumer) {
|
|
145
|
+
throw new Error(`cross-repo build inputs name consumer ${JSON.stringify(consumerRepo)}, which has no repository pin in the runtime image source index`);
|
|
146
|
+
}
|
|
147
|
+
const record = readCrossRepoBuildInputsRecord({
|
|
148
|
+
consumerRepo,
|
|
149
|
+
consumerRepoDir: resolve(workspaceRoot, consumerRepo),
|
|
150
|
+
consumerCommit: consumer.sourceCommit,
|
|
151
|
+
});
|
|
152
|
+
for (const [key, commit] of record) {
|
|
153
|
+
const [sourceRepo] = splitCrossRepoInputKey(key);
|
|
154
|
+
const source = pins.get(sourceRepo);
|
|
155
|
+
if (!source) {
|
|
156
|
+
throw new Error(
|
|
157
|
+
`${consumerRepo} at ${consumer.sourceCommit} vendors from ${JSON.stringify(sourceRepo)}, which has no repository pin in the runtime image source index`,
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
if (!SHA.test(String(commit ?? ''))) {
|
|
161
|
+
throw new Error(`${consumerRepo} at ${consumer.sourceCommit} vendors from ${sourceRepo} at a sourceCommit that is not exact lowercase 40-hex`);
|
|
162
|
+
}
|
|
163
|
+
if (commit === source.sourceCommit || commit === source.vendoredSourceCommit) {continue;}
|
|
164
|
+
if (!extra.has(sourceRepo)) {extra.set(sourceRepo, new Set());}
|
|
165
|
+
extra.get(sourceRepo).add(commit);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return new Map([...extra].map(([repo, commits]) => [repo, [...commits].sort()]));
|
|
169
|
+
}
|
|
170
|
+
|
|
123
171
|
/** The `sourcePins` of every edition under the configured editions root. */
|
|
124
172
|
export function readEditionsSourcePins() {
|
|
125
173
|
return new Map(
|
|
@@ -129,6 +177,24 @@ export function readEditionsSourcePins() {
|
|
|
129
177
|
);
|
|
130
178
|
}
|
|
131
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Second pass, once every repository sits at its pin: fetch the commits the
|
|
182
|
+
* consumers' cross-repo build-input records vendor from.
|
|
183
|
+
*/
|
|
184
|
+
export function fetchCrossRepoVendoredCommits({ workspaceRoot, plan, index, workspace, env, runGit }) {
|
|
185
|
+
const vendored = crossRepoVendoredCommits(plan, index, workspaceRoot);
|
|
186
|
+
for (const entry of plan) {
|
|
187
|
+
const commits = vendored.get(entry.repo);
|
|
188
|
+
if (!commits) {continue;}
|
|
189
|
+
withSourceGitEnv({ name: entry.repo, url: entry.repositoryUrl }, { workspace, env }, (gitEnv) => {
|
|
190
|
+
for (const commit of commits) {
|
|
191
|
+
runGit(['-C', resolve(workspaceRoot, entry.repo), 'fetch', '--quiet', '--depth=1', 'origin', commit], gitEnv);
|
|
192
|
+
console.log(`[source-checkout] ${entry.repo} also holds cross-repo vendored commit ${commit}`);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
132
198
|
export function checkoutIndexedSources({ workspaceRoot, index, platformServiceIndex, editionSourcePins = new Map(), env = process.env, runGit = git }) {
|
|
133
199
|
if (!workspaceRoot) {throw new Error('workspaceRoot is required');}
|
|
134
200
|
const workspace = editionWorkspaceConfig();
|
|
@@ -176,6 +242,7 @@ export function checkoutIndexedSources({ workspaceRoot, index, platformServiceIn
|
|
|
176
242
|
});
|
|
177
243
|
console.log(`[source-checkout] ${entry.repo} @ ${entry.sourceCommit}`);
|
|
178
244
|
}
|
|
245
|
+
fetchCrossRepoVendoredCommits({ workspaceRoot, plan, index, workspace, env, runGit });
|
|
179
246
|
return plan.length;
|
|
180
247
|
}
|
|
181
248
|
|