create-thally-docs 0.10.99 → 0.10.101

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.
@@ -8,7 +8,7 @@ import {
8
8
  installDeps,
9
9
  runProjectCommand,
10
10
  scaffold
11
- } from "./chunk-HPYS4ZXZ.js";
11
+ } from "./chunk-L76B6AVG.js";
12
12
  import {
13
13
  pruneMissingSiteLinks
14
14
  } from "./chunk-UG3OXVLE.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  downloadStarter
4
- } from "./chunk-KC7QI76U.js";
4
+ } from "./chunk-M3XOQJOE.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-BVAPRROZ.js";
13
+ } from "./chunk-Y6BBUB3O.js";
14
14
  import {
15
15
  STABLE_SCAFFOLD_RELEASE,
16
16
  SUPPORTED_SCAFFOLD_RELEASES
17
- } from "./chunk-Q2CL6GEI.js";
17
+ } from "./chunk-WSJUSRXL.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 {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-J7255UQA.js";
10
10
  import {
11
11
  downloadStarter
12
- } from "./chunk-KC7QI76U.js";
12
+ } from "./chunk-M3XOQJOE.js";
13
13
  import {
14
14
  terminal
15
15
  } from "./chunk-L2YCVQBR.js";
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-L2YCVQBR.js";
5
5
  import {
6
6
  readStarterReleaseManifest
7
- } from "./chunk-BVAPRROZ.js";
7
+ } from "./chunk-Y6BBUB3O.js";
8
8
  import {
9
9
  STABLE_SCAFFOLD_RELEASE
10
- } from "./chunk-Q2CL6GEI.js";
10
+ } from "./chunk-WSJUSRXL.js";
11
11
 
12
12
  // src/download.ts
13
13
  import { Readable, Transform, pipeline } from "stream";
@@ -3,19 +3,19 @@
3
3
  // src/stable-scaffold-release.json
4
4
  var stable_scaffold_release_default = {
5
5
  schemaVersion: 1,
6
- id: "2026-10-16.9da45779.7bbdec81",
6
+ id: "2026-10-17.c017c9b8.ba0f9e2d",
7
7
  source: {
8
8
  repository: "thallylabs/starter",
9
- commitSha: "9da457794031d6429f99123084d252abc80f867c",
10
- treeSha: "7fa2539d64718f8c20cf066194d204b5965a7024",
11
- archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/9da457794031d6429f99123084d252abc80f867c",
9
+ commitSha: "c017c9b88f78f310418219409bcda334cf8d3cf0",
10
+ treeSha: "03b91ca58e6cda916e2afb2c4c84d559c3cd6e99",
11
+ archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/c017c9b88f78f310418219409bcda334cf8d3cf0",
12
12
  manifestPath: "starter-release.json",
13
- manifestSha256: "1973b1729c8067924021d02cbc68df95a9cae8bf125fe53d744f963713aaf44e"
13
+ manifestSha256: "3185c7b1923840d80d10c24b229ef8450c00ba057a641efda1030df33d31ec96"
14
14
  },
15
15
  runtime: {
16
16
  repository: "thallylabs/thally",
17
- commitSha: "7bbdec81ba4932831ee4a1d0c7e5aa20e47d7d6c",
18
- treeSha: "1033799748f20310c85054707ff11ab16f0fccd6",
17
+ commitSha: "ba0f9e2d7e07dd1589b57c48c50229bad77da688",
18
+ treeSha: "1394878c2ab4955a5a6e233aa6d7dc6273015516",
19
19
  contentSource: "assets",
20
20
  identityContractVersion: 1
21
21
  },
@@ -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-16.9da45779.7bbdec81",
30
+ source: {
31
+ repository: "thallylabs/starter",
32
+ commitSha: "9da457794031d6429f99123084d252abc80f867c",
33
+ treeSha: "7fa2539d64718f8c20cf066194d204b5965a7024",
34
+ archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/9da457794031d6429f99123084d252abc80f867c",
35
+ manifestPath: "starter-release.json",
36
+ manifestSha256: "1973b1729c8067924021d02cbc68df95a9cae8bf125fe53d744f963713aaf44e"
37
+ },
38
+ runtime: {
39
+ repository: "thallylabs/thally",
40
+ commitSha: "7bbdec81ba4932831ee4a1d0c7e5aa20e47d7d6c",
41
+ treeSha: "1033799748f20310c85054707ff11ab16f0fccd6",
42
+ contentSource: "assets",
43
+ identityContractVersion: 1
44
+ },
45
+ starterVersion: 2
46
+ },
27
47
  {
28
48
  schemaVersion: 1,
29
49
  id: "2026-10-14.ec81d6cd.6b1843c8",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  STABLE_SCAFFOLD_RELEASE
4
- } from "./chunk-Q2CL6GEI.js";
4
+ } from "./chunk-WSJUSRXL.js";
5
5
 
6
6
  // src/starter-sync.ts
7
7
  import { createHash } from "crypto";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  migrateDocs
4
- } from "./chunk-LBDWCRKT.js";
4
+ } from "./chunk-55ZVJIVO.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-HPYS4ZXZ.js";
16
+ } from "./chunk-L76B6AVG.js";
17
17
  import "./chunk-UG3OXVLE.js";
18
18
  import "./chunk-J7255UQA.js";
19
- import "./chunk-KC7QI76U.js";
19
+ import "./chunk-M3XOQJOE.js";
20
20
  import {
21
21
  acquireTerminalAccent,
22
22
  formatHelp,
23
23
  terminal
24
24
  } from "./chunk-L2YCVQBR.js";
25
- import "./chunk-BVAPRROZ.js";
26
- import "./chunk-Q2CL6GEI.js";
25
+ import "./chunk-Y6BBUB3O.js";
26
+ import "./chunk-WSJUSRXL.js";
27
27
 
28
28
  // src/index.ts
29
29
  import { existsSync as existsSync2, readdirSync } from "fs";
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  migrateDocs
4
- } from "../chunk-LBDWCRKT.js";
4
+ } from "../chunk-55ZVJIVO.js";
5
5
  import "../chunk-KDLP27DS.js";
6
- import "../chunk-HPYS4ZXZ.js";
6
+ import "../chunk-L76B6AVG.js";
7
7
  import "../chunk-UG3OXVLE.js";
8
8
  import "../chunk-J7255UQA.js";
9
- import "../chunk-KC7QI76U.js";
9
+ import "../chunk-M3XOQJOE.js";
10
10
  import "../chunk-L2YCVQBR.js";
11
- import "../chunk-BVAPRROZ.js";
12
- import "../chunk-Q2CL6GEI.js";
11
+ import "../chunk-Y6BBUB3O.js";
12
+ import "../chunk-WSJUSRXL.js";
13
13
  export {
14
14
  migrateDocs
15
15
  };
package/dist/release.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  STABLE_SCAFFOLD_RELEASE,
4
4
  SUPPORTED_SCAFFOLD_RELEASES,
5
5
  isStableScaffoldRelease
6
- } from "./chunk-Q2CL6GEI.js";
6
+ } from "./chunk-WSJUSRXL.js";
7
7
  export {
8
8
  STABLE_SCAFFOLD_RELEASE,
9
9
  SUPPORTED_SCAFFOLD_RELEASES,
package/dist/scaffold.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  scaffold
4
- } from "./chunk-HPYS4ZXZ.js";
4
+ } from "./chunk-L76B6AVG.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-KC7QI76U.js";
12
+ } from "./chunk-M3XOQJOE.js";
13
13
  import "./chunk-L2YCVQBR.js";
14
- import "./chunk-BVAPRROZ.js";
14
+ import "./chunk-Y6BBUB3O.js";
15
15
  import {
16
16
  STABLE_SCAFFOLD_RELEASE
17
- } from "./chunk-Q2CL6GEI.js";
17
+ } from "./chunk-WSJUSRXL.js";
18
18
  export {
19
19
  STABLE_SCAFFOLD_RELEASE,
20
20
  STARTER_ARCHIVE_ROOT,
@@ -9,8 +9,8 @@ import {
9
9
  planStarterRuntimeSync,
10
10
  readStarterReleaseManifest,
11
11
  starterManifestSha256
12
- } from "./chunk-BVAPRROZ.js";
13
- import "./chunk-Q2CL6GEI.js";
12
+ } from "./chunk-Y6BBUB3O.js";
13
+ import "./chunk-WSJUSRXL.js";
14
14
  export {
15
15
  applyStarterRuntimeSyncPlan,
16
16
  captureTargetPrecondition,
@@ -6,11 +6,11 @@ import {
6
6
  resolveStarterUpdateBase,
7
7
  starterReleaseProviderError,
8
8
  updateStarterProject
9
- } from "./chunk-53BTIUGV.js";
10
- import "./chunk-KC7QI76U.js";
9
+ } from "./chunk-KYNWR6UI.js";
10
+ import "./chunk-M3XOQJOE.js";
11
11
  import "./chunk-L2YCVQBR.js";
12
- import "./chunk-BVAPRROZ.js";
13
- import "./chunk-Q2CL6GEI.js";
12
+ import "./chunk-Y6BBUB3O.js";
13
+ import "./chunk-WSJUSRXL.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-53BTIUGV.js";
4
+ } from "./chunk-KYNWR6UI.js";
5
5
  import {
6
6
  downloadStarter
7
- } from "./chunk-KC7QI76U.js";
7
+ } from "./chunk-M3XOQJOE.js";
8
8
  import "./chunk-L2YCVQBR.js";
9
9
  import {
10
10
  classifyStarterPath,
11
11
  mergeStarterOwnershipContracts,
12
12
  readStarterReleaseManifest
13
- } from "./chunk-BVAPRROZ.js";
13
+ } from "./chunk-Y6BBUB3O.js";
14
14
  import {
15
15
  STABLE_SCAFFOLD_RELEASE,
16
16
  SUPPORTED_SCAFFOLD_RELEASES
17
- } from "./chunk-Q2CL6GEI.js";
17
+ } from "./chunk-WSJUSRXL.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.source.manifestSha256 !== target.source.manifestSha256);
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)].filter((release, index, all) => all.findIndex((other) => other.source.manifestSha256 === release.source.manifestSha256) === index);
51
- const catalog = [target, ...bases, ...history].filter((release, index, all) => all.findIndex((other) => other.source.manifestSha256 === release.source.manifestSha256) === index);
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.id === release.id && known.source.manifestSha256 === release.source.manifestSha256)) throw new Error("Canary requested an uncatalogued release.");
57
- if (release.source.manifestSha256 === target.source.manifestSha256) cpSync(options.candidateDirectory, destination, { recursive: true });
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
- let snapshot = snapshots.get(release.source.manifestSha256);
81
+ const identity = releaseIdentity(release);
82
+ let snapshot = snapshots.get(identity);
61
83
  if (!snapshot) {
62
- snapshot = join(workspace, "archives", release.source.manifestSha256);
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(release.source.manifestSha256, snapshot);
89
+ snapshots.set(identity, snapshot);
68
90
  }
69
91
  cpSync(snapshot, destination, { recursive: true });
70
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-thally-docs",
3
- "version": "0.10.99",
3
+ "version": "0.10.101",
4
4
  "description": "Scaffold an open-source Thally docs site for people, search engines, and AI tools.",
5
5
  "type": "module",
6
6
  "engines": {