fleetfizz 0.7.0 → 0.8.0
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/fleetfizz.mjs +4 -18
- package/package.json +1 -1
- package/schema.json +0 -45
package/dist/fleetfizz.mjs
CHANGED
|
@@ -32632,7 +32632,7 @@ const runWith = (command, config) => {
|
|
|
32632
32632
|
};
|
|
32633
32633
|
//#endregion
|
|
32634
32634
|
//#region package.json
|
|
32635
|
-
var version = "0.
|
|
32635
|
+
var version = "0.8.0";
|
|
32636
32636
|
//#endregion
|
|
32637
32637
|
//#region ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
32638
32638
|
/**
|
|
@@ -35353,8 +35353,7 @@ const TrackedRepo = Struct({
|
|
|
35353
35353
|
origin: Origin.annotateKey({ description: "The GitHub `owner/repo`." }),
|
|
35354
35354
|
ref: Ref.annotateKey({ description: "A branch, or a full 40-character commit SHA to pin it." }),
|
|
35355
35355
|
install: NonEmptyString.annotateKey({ description: "The Install Command, run in a login shell inside the Managed Clone." }),
|
|
35356
|
-
outputs: optionalKey(ArraySchema(NonEmptyString)).annotateKey({ description: "Paths outside the clone the Install Command produces. If one changes by hand, the repo reinstalls." })
|
|
35357
|
-
files: optionalKey(Record(NonEmptyString, String$5)).annotateKey({ description: "Gitignored files (Clone Files) written into the clone before every install, keyed by path. Never secrets." })
|
|
35356
|
+
outputs: optionalKey(ArraySchema(NonEmptyString)).annotateKey({ description: "Paths outside the clone the Install Command produces. If one changes by hand, the repo reinstalls." })
|
|
35358
35357
|
});
|
|
35359
35358
|
const withShorthand = (entry, value, shorthand) => Union([entry, value.pipe(decodeTo(toType(entry), transform$1(shorthand)))]);
|
|
35360
35359
|
const variants = (entry) => Union([entry, NonEmptyArray(entry)]);
|
|
@@ -64237,7 +64236,6 @@ const orderProviders = (all, dependsOn) => {
|
|
|
64237
64236
|
};
|
|
64238
64237
|
//#endregion
|
|
64239
64238
|
//#region ../../packages/core/src/record.ts
|
|
64240
|
-
const sameRecord = (a, b) => Object.keys(a).length === Object.keys(b).length && Object.entries(a).every(([k, v]) => b[k] === v);
|
|
64241
64239
|
const decideInstall = (record, now, rebuild) => {
|
|
64242
64240
|
if (rebuild) return {
|
|
64243
64241
|
run: true,
|
|
@@ -64259,10 +64257,6 @@ const decideInstall = (record, now, rebuild) => {
|
|
|
64259
64257
|
run: true,
|
|
64260
64258
|
reason: "install command changed"
|
|
64261
64259
|
};
|
|
64262
|
-
if (!sameRecord(record.files, now.files)) return {
|
|
64263
|
-
run: true,
|
|
64264
|
-
reason: "files changed"
|
|
64265
|
-
};
|
|
64266
64260
|
for (const [path, fingerprint] of Object.entries(now.outputs)) if (fingerprint === void 0 || record.outputs[path] !== fingerprint) return {
|
|
64267
64261
|
run: true,
|
|
64268
64262
|
reason: `drift: ${path}`
|
|
@@ -65476,7 +65470,6 @@ const decodeRecord = decodeUnknownOption(Struct({
|
|
|
65476
65470
|
commit: String$5,
|
|
65477
65471
|
path: String$5,
|
|
65478
65472
|
install: String$5,
|
|
65479
|
-
files: Record(String$5, String$5),
|
|
65480
65473
|
outputs: Record(String$5, String$5)
|
|
65481
65474
|
}));
|
|
65482
65475
|
const branchKey = (repo) => `${repo.origin}#${repo.ref}`;
|
|
@@ -65488,7 +65481,6 @@ const originUrl = (origin) => `https://github.com/${origin}.git`;
|
|
|
65488
65481
|
const short = (commit) => commit.slice(0, 7);
|
|
65489
65482
|
const expandHome = (path, home) => path === "~" ? home : path.startsWith("~/") ? `${home}${path.slice(1)}` : path;
|
|
65490
65483
|
const jsonString = encodeSync(fromJsonString(String$5));
|
|
65491
|
-
const jsonRecord = encodeSync(fromJsonString(Record(String$5, String$5)));
|
|
65492
65484
|
const lsRemote = fn("lsRemote")(function* (repo, token) {
|
|
65493
65485
|
const spawner = yield* ChildProcessSpawner;
|
|
65494
65486
|
const auth = token === void 0 ? [] : [
|
|
@@ -65561,7 +65553,6 @@ const decideRepo = (repo, root, observed, resolved, ctx) => {
|
|
|
65561
65553
|
commit,
|
|
65562
65554
|
path: expandHome(`${root}/${repo.name}`, ctx.home),
|
|
65563
65555
|
install: repo.install,
|
|
65564
|
-
files: repo.files ?? {},
|
|
65565
65556
|
outputs: Object.fromEntries((repo.outputs ?? []).map((o) => [o, outputs?.get(o)]))
|
|
65566
65557
|
}, ctx.rebuild(address("repos", repo.name)));
|
|
65567
65558
|
const reason = install.run ? install.reason : !clone?.present ? "not cloned" : clone.head !== commit ? `checked out at ${short(clone.head ?? "")}` : void 0;
|
|
@@ -65593,7 +65584,6 @@ const fetchStep = ({ item, root, commit }) => {
|
|
|
65593
65584
|
`git -C "$ff_d" checkout --quiet --detach ${quote(commit)}`,
|
|
65594
65585
|
`git -C "$ff_d" reset --quiet --hard ${quote(commit)}`
|
|
65595
65586
|
] : [`ff_git -C "$ff_d" fetch --quiet origin ${quote(item.ref)}`, `git -C "$ff_d" reset --quiet --hard ${quote(commit)}`];
|
|
65596
|
-
const files = Object.entries(item.files ?? {}).flatMap(([path, content]) => [`mkdir -p "$(dirname "$ff_d"/${quote(path)})"`, `printf '%s' ${quote(content)} > "$ff_d"/${quote(path)}`]);
|
|
65597
65587
|
return {
|
|
65598
65588
|
id: `repos:${item.name}:fetch`,
|
|
65599
65589
|
items: [item.name],
|
|
@@ -65606,11 +65596,7 @@ const fetchStep = ({ item, root, commit }) => {
|
|
|
65606
65596
|
" set -e",
|
|
65607
65597
|
` if [ ! -d "$ff_d/.git" ]; then ff_git clone --quiet ${quote(url)} "$ff_d"; fi`,
|
|
65608
65598
|
` if [ "$(git -C "$ff_d" remote get-url origin)" != ${quote(url)} ]; then echo "origin is $(git -C "$ff_d" remote get-url origin), expected ${url}"; exit 1; fi`,
|
|
65609
|
-
...[
|
|
65610
|
-
...sync,
|
|
65611
|
-
`git -C "$ff_d" clean --quiet -fd`,
|
|
65612
|
-
...files
|
|
65613
|
-
].map((l) => ` ${l}`),
|
|
65599
|
+
...[...sync, `git -C "$ff_d" clean --quiet -fd`].map((l) => ` ${l}`),
|
|
65614
65600
|
")"
|
|
65615
65601
|
]
|
|
65616
65602
|
};
|
|
@@ -65627,7 +65613,7 @@ const installStep = ({ item, root }, ctx) => {
|
|
|
65627
65613
|
`ff_outs=""`,
|
|
65628
65614
|
...(item.outputs ?? []).map((o) => `ff_fpv=$(ff_fp ${quotePath(o)}); if [ -n "$ff_fpv" ]; then ff_outs="$ff_outs,\\"$(ff_json ${quote(o)})\\":\\"$(ff_json "$ff_fpv")\\""; fi`),
|
|
65629
65615
|
`mkdir -p ${recordDir("repos")}`,
|
|
65630
|
-
`printf '%s\\n' "{\\"commit\\":\\"$ff_after\\",\\"path\\":\\"$(ff_json "$ff_d")\\",\\"install\\":$(ff_lit ${quote(jsonString(item.install))}),\\"
|
|
65616
|
+
`printf '%s\\n' "{\\"commit\\":\\"$ff_after\\",\\"path\\":\\"$(ff_json "$ff_d")\\",\\"install\\":$(ff_lit ${quote(jsonString(item.install))}),\\"outputs\\":{\${ff_outs#,}}}" > ${tmp}`,
|
|
65631
65617
|
`mv -f ${tmp} ${recordFile("repos", item.name)}`,
|
|
65632
65618
|
`rm -f ${quotePath(RECORDS_DIR)}/${quote(`${item.name}.json`)}`
|
|
65633
65619
|
];
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -364,21 +364,6 @@
|
|
|
364
364
|
"description": "Paths outside the clone the Install Command produces. If one changes by hand, the repo reinstalls."
|
|
365
365
|
}
|
|
366
366
|
]
|
|
367
|
-
},
|
|
368
|
-
"files": {
|
|
369
|
-
"type": "object",
|
|
370
|
-
"propertyNames": {
|
|
371
|
-
"type": "string",
|
|
372
|
-
"minLength": 1
|
|
373
|
-
},
|
|
374
|
-
"additionalProperties": {
|
|
375
|
-
"type": "string"
|
|
376
|
-
},
|
|
377
|
-
"allOf": [
|
|
378
|
-
{
|
|
379
|
-
"description": "Gitignored files (Clone Files) written into the clone before every install, keyed by path. Never secrets."
|
|
380
|
-
}
|
|
381
|
-
]
|
|
382
367
|
}
|
|
383
368
|
},
|
|
384
369
|
"required": ["origin", "ref", "install"],
|
|
@@ -467,21 +452,6 @@
|
|
|
467
452
|
"description": "Paths outside the clone the Install Command produces. If one changes by hand, the repo reinstalls."
|
|
468
453
|
}
|
|
469
454
|
]
|
|
470
|
-
},
|
|
471
|
-
"files": {
|
|
472
|
-
"type": "object",
|
|
473
|
-
"propertyNames": {
|
|
474
|
-
"type": "string",
|
|
475
|
-
"minLength": 1
|
|
476
|
-
},
|
|
477
|
-
"additionalProperties": {
|
|
478
|
-
"type": "string"
|
|
479
|
-
},
|
|
480
|
-
"allOf": [
|
|
481
|
-
{
|
|
482
|
-
"description": "Gitignored files (Clone Files) written into the clone before every install, keyed by path. Never secrets."
|
|
483
|
-
}
|
|
484
|
-
]
|
|
485
455
|
}
|
|
486
456
|
},
|
|
487
457
|
"required": ["origin", "ref", "install"],
|
|
@@ -569,21 +539,6 @@
|
|
|
569
539
|
"description": "Paths outside the clone the Install Command produces. If one changes by hand, the repo reinstalls."
|
|
570
540
|
}
|
|
571
541
|
]
|
|
572
|
-
},
|
|
573
|
-
"files": {
|
|
574
|
-
"type": "object",
|
|
575
|
-
"propertyNames": {
|
|
576
|
-
"type": "string",
|
|
577
|
-
"minLength": 1
|
|
578
|
-
},
|
|
579
|
-
"additionalProperties": {
|
|
580
|
-
"type": "string"
|
|
581
|
-
},
|
|
582
|
-
"allOf": [
|
|
583
|
-
{
|
|
584
|
-
"description": "Gitignored files (Clone Files) written into the clone before every install, keyed by path. Never secrets."
|
|
585
|
-
}
|
|
586
|
-
]
|
|
587
542
|
}
|
|
588
543
|
},
|
|
589
544
|
"required": ["origin", "ref", "install"],
|