create-thally-docs 0.10.100 → 0.10.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/{chunk-DCSSZXWB.js → chunk-5EM52PZ5.js} +49 -4
- package/dist/{chunk-55ZVJIVO.js → chunk-7KFNFIKK.js} +1 -1
- package/dist/{chunk-Y6BBUB3O.js → chunk-KPUOOMZ6.js} +1 -1
- package/dist/{chunk-L76B6AVG.js → chunk-TUPFGTZP.js} +1 -1
- package/dist/{chunk-M3XOQJOE.js → chunk-VFDVP24D.js} +2 -2
- package/dist/{chunk-WSJUSRXL.js → chunk-Z3EDBWCZ.js} +24 -4
- package/dist/index.js +5 -5
- package/dist/migrate/index.js +5 -5
- package/dist/release.js +1 -1
- package/dist/scaffold.js +4 -4
- package/dist/starter-sync.js +2 -2
- package/dist/starter-update.js +4 -4
- package/dist/starter-upgrade-canary.js +34 -12
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
downloadStarter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VFDVP24D.js";
|
|
5
5
|
import {
|
|
6
6
|
applyStarterRuntimeSyncPlan,
|
|
7
7
|
captureTargetPrecondition,
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
planStarterRuntimeSync,
|
|
11
11
|
readStarterReleaseManifest,
|
|
12
12
|
starterManifestSha256
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KPUOOMZ6.js";
|
|
14
14
|
import {
|
|
15
15
|
STABLE_SCAFFOLD_RELEASE,
|
|
16
16
|
SUPPORTED_SCAFFOLD_RELEASES
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Z3EDBWCZ.js";
|
|
18
18
|
|
|
19
19
|
// src/starter-update.ts
|
|
20
20
|
import {
|
|
@@ -256,13 +256,58 @@ function assertRecoveryPackages(targetDir, baselineDir, packages) {
|
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
+
function hasArchivePackageIdentity(targetDir, baselineDir) {
|
|
260
|
+
const installed = JSON.parse(readFileSync(join(targetDir, "package.json"), "utf8"));
|
|
261
|
+
const canonical = JSON.parse(readFileSync(join(baselineDir, "package.json"), "utf8"));
|
|
262
|
+
const hasLock = existsSync(join(baselineDir, "package-lock.json"));
|
|
263
|
+
if (hasLock && !existsSync(join(targetDir, "package-lock.json"))) return false;
|
|
264
|
+
const baselineLock = hasLock ? JSON.parse(readFileSync(join(baselineDir, "package-lock.json"), "utf8")) : void 0;
|
|
265
|
+
const installedLock = hasLock ? JSON.parse(readFileSync(join(targetDir, "package-lock.json"), "utf8")) : void 0;
|
|
266
|
+
const fields = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"];
|
|
267
|
+
const names = new Set(fields.flatMap((field) => Object.keys(canonical[field] ?? {})));
|
|
268
|
+
for (const name of names) {
|
|
269
|
+
for (const field of fields) {
|
|
270
|
+
if (installed[field]?.[name] !== canonical[field]?.[name]) return false;
|
|
271
|
+
if (hasLock && installedLock.packages?.[""]?.[field]?.[name] !== baselineLock.packages?.[""]?.[field]?.[name]) return false;
|
|
272
|
+
}
|
|
273
|
+
if (hasLock) {
|
|
274
|
+
const path = `node_modules/${name}`;
|
|
275
|
+
if (!baselineLock.packages?.[path] || !isDeepStrictEqual2(installedLock.packages?.[path], baselineLock.packages[path])) return false;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
return true;
|
|
279
|
+
}
|
|
259
280
|
async function resolveStarterUpdateBase(options) {
|
|
260
281
|
const releases = options.releases ?? SUPPORTED_SCAFFOLD_RELEASES;
|
|
261
282
|
const manifestPath = STABLE_SCAFFOLD_RELEASE.source.manifestPath;
|
|
262
283
|
const source = readDownstreamManifest(options.targetDir, manifestPath);
|
|
263
284
|
const manifestSha256 = starterManifestSha256(source);
|
|
264
285
|
const exact = releases.filter((release) => release.source.manifestSha256 === manifestSha256);
|
|
265
|
-
if (exact.length) return { release: resolveStarterReleaseFromManifest(source, releases), recoveredProvenance: false, manifestSha256 };
|
|
286
|
+
if (exact.length === 1) return { release: resolveStarterReleaseFromManifest(source, releases), recoveredProvenance: false, manifestSha256 };
|
|
287
|
+
if (exact.length > 1) {
|
|
288
|
+
const download2 = options.download ?? (async (directory, release) => {
|
|
289
|
+
await downloadStarter(directory, void 0, release, { announce: false });
|
|
290
|
+
});
|
|
291
|
+
const workspace2 = mkdtempSync(join(tmpdir(), "thally-starter-exact-base-"));
|
|
292
|
+
try {
|
|
293
|
+
const proven = [];
|
|
294
|
+
const candidates2 = exact.filter((release, index, all) => all.findIndex((other) => isDeepStrictEqual2(other, release)) === index);
|
|
295
|
+
for (const [index, release] of candidates2.entries()) {
|
|
296
|
+
const baselineDir = join(workspace2, String(index));
|
|
297
|
+
mkdirSync(baselineDir);
|
|
298
|
+
await download2(baselineDir, release);
|
|
299
|
+
const baseline = readStarterReleaseManifest(baselineDir, release);
|
|
300
|
+
const ownership = mergeStarterOwnershipContracts(baseline.ownership, baseline.ownership);
|
|
301
|
+
const proof = planStarterRuntimeSync(baselineDir, baselineDir, options.targetDir, ownership);
|
|
302
|
+
if (proof.copyPaths.length || proof.deletePaths.length || proof.preservedPaths.length || proof.conflictPaths.length) continue;
|
|
303
|
+
if (hasArchivePackageIdentity(options.targetDir, baselineDir)) proven.push(release);
|
|
304
|
+
}
|
|
305
|
+
if (proven.length !== 1) throw new Error("The project starter manifest has no unique verified archive baseline; refusing to update.");
|
|
306
|
+
return { release: proven[0], recoveredProvenance: false, manifestSha256 };
|
|
307
|
+
} finally {
|
|
308
|
+
rmSync(workspace2, { recursive: true, force: true });
|
|
309
|
+
}
|
|
310
|
+
}
|
|
266
311
|
if (Buffer.byteLength(source, "utf8") > 256 * 1024) throw new Error("The project starter manifest is too large.");
|
|
267
312
|
let candidate;
|
|
268
313
|
try {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-L2YCVQBR.js";
|
|
5
5
|
import {
|
|
6
6
|
readStarterReleaseManifest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KPUOOMZ6.js";
|
|
8
8
|
import {
|
|
9
9
|
STABLE_SCAFFOLD_RELEASE
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Z3EDBWCZ.js";
|
|
11
11
|
|
|
12
12
|
// src/download.ts
|
|
13
13
|
import { Readable, Transform, pipeline } from "stream";
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// src/stable-scaffold-release.json
|
|
4
4
|
var stable_scaffold_release_default = {
|
|
5
5
|
schemaVersion: 1,
|
|
6
|
-
id: "2026-10-17.
|
|
6
|
+
id: "2026-10-17.c11bf6ef.ba0f9e2d",
|
|
7
7
|
source: {
|
|
8
8
|
repository: "thallylabs/starter",
|
|
9
|
-
commitSha: "
|
|
10
|
-
treeSha: "
|
|
11
|
-
archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/
|
|
9
|
+
commitSha: "c11bf6ef7bf6cb8e0d836d1b98974e453a6591b3",
|
|
10
|
+
treeSha: "fa5c415b8b79d193477418b8645c82b5751ccd9c",
|
|
11
|
+
archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/c11bf6ef7bf6cb8e0d836d1b98974e453a6591b3",
|
|
12
12
|
manifestPath: "starter-release.json",
|
|
13
13
|
manifestSha256: "3185c7b1923840d80d10c24b229ef8450c00ba057a641efda1030df33d31ec96"
|
|
14
14
|
},
|
|
@@ -24,6 +24,26 @@ var stable_scaffold_release_default = {
|
|
|
24
24
|
|
|
25
25
|
// src/previous-scaffold-releases.json
|
|
26
26
|
var previous_scaffold_releases_default = [
|
|
27
|
+
{
|
|
28
|
+
schemaVersion: 1,
|
|
29
|
+
id: "2026-10-17.c017c9b8.ba0f9e2d",
|
|
30
|
+
source: {
|
|
31
|
+
repository: "thallylabs/starter",
|
|
32
|
+
commitSha: "c017c9b88f78f310418219409bcda334cf8d3cf0",
|
|
33
|
+
treeSha: "03b91ca58e6cda916e2afb2c4c84d559c3cd6e99",
|
|
34
|
+
archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/c017c9b88f78f310418219409bcda334cf8d3cf0",
|
|
35
|
+
manifestPath: "starter-release.json",
|
|
36
|
+
manifestSha256: "3185c7b1923840d80d10c24b229ef8450c00ba057a641efda1030df33d31ec96"
|
|
37
|
+
},
|
|
38
|
+
runtime: {
|
|
39
|
+
repository: "thallylabs/thally",
|
|
40
|
+
commitSha: "ba0f9e2d7e07dd1589b57c48c50229bad77da688",
|
|
41
|
+
treeSha: "1394878c2ab4955a5a6e233aa6d7dc6273015516",
|
|
42
|
+
contentSource: "assets",
|
|
43
|
+
identityContractVersion: 1
|
|
44
|
+
},
|
|
45
|
+
starterVersion: 2
|
|
46
|
+
},
|
|
27
47
|
{
|
|
28
48
|
schemaVersion: 1,
|
|
29
49
|
id: "2026-10-16.9da45779.7bbdec81",
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
migrateDocs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7KFNFIKK.js";
|
|
5
5
|
import {
|
|
6
6
|
parseFrontmatter,
|
|
7
7
|
runCheck
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
scaffold,
|
|
14
14
|
slugify,
|
|
15
15
|
success
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TUPFGTZP.js";
|
|
17
17
|
import "./chunk-UG3OXVLE.js";
|
|
18
18
|
import "./chunk-J7255UQA.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-VFDVP24D.js";
|
|
20
20
|
import {
|
|
21
21
|
acquireTerminalAccent,
|
|
22
22
|
formatHelp,
|
|
23
23
|
terminal
|
|
24
24
|
} from "./chunk-L2YCVQBR.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-KPUOOMZ6.js";
|
|
26
|
+
import "./chunk-Z3EDBWCZ.js";
|
|
27
27
|
|
|
28
28
|
// src/index.ts
|
|
29
29
|
import { existsSync as existsSync2, readdirSync } from "fs";
|
package/dist/migrate/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
migrateDocs
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7KFNFIKK.js";
|
|
5
5
|
import "../chunk-KDLP27DS.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-TUPFGTZP.js";
|
|
7
7
|
import "../chunk-UG3OXVLE.js";
|
|
8
8
|
import "../chunk-J7255UQA.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-VFDVP24D.js";
|
|
10
10
|
import "../chunk-L2YCVQBR.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-KPUOOMZ6.js";
|
|
12
|
+
import "../chunk-Z3EDBWCZ.js";
|
|
13
13
|
export {
|
|
14
14
|
migrateDocs
|
|
15
15
|
};
|
package/dist/release.js
CHANGED
package/dist/scaffold.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
scaffold
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TUPFGTZP.js";
|
|
5
5
|
import "./chunk-UG3OXVLE.js";
|
|
6
6
|
import "./chunk-J7255UQA.js";
|
|
7
7
|
import {
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
STARTER_COMMIT_SHA,
|
|
10
10
|
STARTER_REPOSITORY,
|
|
11
11
|
validateStarterArchiveEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VFDVP24D.js";
|
|
13
13
|
import "./chunk-L2YCVQBR.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-KPUOOMZ6.js";
|
|
15
15
|
import {
|
|
16
16
|
STABLE_SCAFFOLD_RELEASE
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Z3EDBWCZ.js";
|
|
18
18
|
export {
|
|
19
19
|
STABLE_SCAFFOLD_RELEASE,
|
|
20
20
|
STARTER_ARCHIVE_ROOT,
|
package/dist/starter-sync.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
planStarterRuntimeSync,
|
|
10
10
|
readStarterReleaseManifest,
|
|
11
11
|
starterManifestSha256
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-KPUOOMZ6.js";
|
|
13
|
+
import "./chunk-Z3EDBWCZ.js";
|
|
14
14
|
export {
|
|
15
15
|
applyStarterRuntimeSyncPlan,
|
|
16
16
|
captureTargetPrecondition,
|
package/dist/starter-update.js
CHANGED
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
resolveStarterUpdateBase,
|
|
7
7
|
starterReleaseProviderError,
|
|
8
8
|
updateStarterProject
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-5EM52PZ5.js";
|
|
10
|
+
import "./chunk-VFDVP24D.js";
|
|
11
11
|
import "./chunk-L2YCVQBR.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-KPUOOMZ6.js";
|
|
13
|
+
import "./chunk-Z3EDBWCZ.js";
|
|
14
14
|
export {
|
|
15
15
|
fetchStarterReleaseHint,
|
|
16
16
|
resolveManualReviewMutations,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
updateStarterProject
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5EM52PZ5.js";
|
|
5
5
|
import {
|
|
6
6
|
downloadStarter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VFDVP24D.js";
|
|
8
8
|
import "./chunk-L2YCVQBR.js";
|
|
9
9
|
import {
|
|
10
10
|
classifyStarterPath,
|
|
11
11
|
mergeStarterOwnershipContracts,
|
|
12
12
|
readStarterReleaseManifest
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KPUOOMZ6.js";
|
|
14
14
|
import {
|
|
15
15
|
STABLE_SCAFFOLD_RELEASE,
|
|
16
16
|
SUPPORTED_SCAFFOLD_RELEASES
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Z3EDBWCZ.js";
|
|
18
18
|
|
|
19
19
|
// src/starter-upgrade-canary.ts
|
|
20
20
|
import { createHash } from "crypto";
|
|
@@ -22,6 +22,27 @@ import { cpSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, r
|
|
|
22
22
|
import { tmpdir } from "os";
|
|
23
23
|
import { dirname, join } from "path";
|
|
24
24
|
import { isDeepStrictEqual } from "util";
|
|
25
|
+
function releaseIdentity(release) {
|
|
26
|
+
return JSON.stringify([
|
|
27
|
+
release.schemaVersion,
|
|
28
|
+
release.id,
|
|
29
|
+
release.starterVersion,
|
|
30
|
+
release.source.repository,
|
|
31
|
+
release.source.commitSha,
|
|
32
|
+
release.source.treeSha,
|
|
33
|
+
release.source.archiveUrl,
|
|
34
|
+
release.source.manifestPath,
|
|
35
|
+
release.source.manifestSha256,
|
|
36
|
+
release.runtime.repository,
|
|
37
|
+
release.runtime.commitSha,
|
|
38
|
+
release.runtime.treeSha,
|
|
39
|
+
release.runtime.contentSource,
|
|
40
|
+
release.runtime.identityContractVersion
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
function distinctReleases(releases) {
|
|
44
|
+
return releases.filter((release, index, all) => all.findIndex((other) => releaseIdentity(other) === releaseIdentity(release)) === index);
|
|
45
|
+
}
|
|
25
46
|
function files(root, prefix = "") {
|
|
26
47
|
const result = /* @__PURE__ */ new Map();
|
|
27
48
|
for (const entry of readdirSync(join(root, prefix))) {
|
|
@@ -44,27 +65,28 @@ async function verifyScaffoldUpgrades(options) {
|
|
|
44
65
|
assertCanonicalScaffoldUpgradeRelease(target);
|
|
45
66
|
const targetManifest = readStarterReleaseManifest(options.candidateDirectory, target);
|
|
46
67
|
const targetFiles = files(options.candidateDirectory);
|
|
47
|
-
const history = [...options.releases ?? SUPPORTED_SCAFFOLD_RELEASES].filter((release) => release
|
|
68
|
+
const history = [...options.releases ?? SUPPORTED_SCAFFOLD_RELEASES].filter((release) => releaseIdentity(release) !== releaseIdentity(target));
|
|
48
69
|
if (!history.length) throw new Error("Historical upgrade canary has no retained baseline.");
|
|
49
70
|
const current = options.current ?? STABLE_SCAFFOLD_RELEASE;
|
|
50
|
-
const bases = [current, history.at(-1)]
|
|
51
|
-
const catalog = [target, ...bases, ...history]
|
|
71
|
+
const bases = distinctReleases([current, history.at(-1)]);
|
|
72
|
+
const catalog = distinctReleases([target, ...bases, ...history]);
|
|
52
73
|
catalog.forEach(assertCanonicalScaffoldUpgradeRelease);
|
|
53
74
|
const workspace = mkdtempSync(join(tmpdir(), "thally-upgrade-canary-"));
|
|
54
75
|
const snapshots = /* @__PURE__ */ new Map();
|
|
55
76
|
const download = async (destination, release) => {
|
|
56
|
-
if (!catalog.some((known) => known
|
|
57
|
-
if (release
|
|
77
|
+
if (!catalog.some((known) => releaseIdentity(known) === releaseIdentity(release))) throw new Error("Canary requested an uncatalogued release.");
|
|
78
|
+
if (releaseIdentity(release) === releaseIdentity(target)) cpSync(options.candidateDirectory, destination, { recursive: true });
|
|
58
79
|
else if (options.download) await options.download(destination, release);
|
|
59
80
|
else {
|
|
60
|
-
|
|
81
|
+
const identity = releaseIdentity(release);
|
|
82
|
+
let snapshot = snapshots.get(identity);
|
|
61
83
|
if (!snapshot) {
|
|
62
|
-
snapshot = join(workspace, "archives",
|
|
84
|
+
snapshot = join(workspace, "archives", createHash("sha256").update(identity).digest("hex"));
|
|
63
85
|
mkdirSync(snapshot, { recursive: true });
|
|
64
86
|
await downloadStarter(snapshot, void 0, release, { announce: false });
|
|
65
87
|
readStarterReleaseManifest(snapshot, release);
|
|
66
88
|
files(snapshot);
|
|
67
|
-
snapshots.set(
|
|
89
|
+
snapshots.set(identity, snapshot);
|
|
68
90
|
}
|
|
69
91
|
cpSync(snapshot, destination, { recursive: true });
|
|
70
92
|
}
|