okno 1.0.0-beta.41 → 1.0.0-beta.43

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.
@@ -1,4 +1,4 @@
1
- import { o as i } from "../plugin-sAwHmkG8.js";
1
+ import { o as i } from "../plugin-DgYy2aTI.js";
2
2
  import { join as d } from "node:path";
3
3
  import { readFileSync as p } from "node:fs";
4
4
  function c(o) {
package/dist/bake.d.ts CHANGED
@@ -4,14 +4,23 @@
4
4
  * ref). Baking `@HEAD` breaks the editor (HEAD isn't a writable branch), so on
5
5
  * detachment fall back to the host's branch env var, then "main". */
6
6
  export declare function bakeBranch(): string;
7
- /** Bake the project's repo identity (`owner/repo@branch`, mirroring the
8
- * X-Okno-Repo header) from the app's git origin + current branch. A deployed
9
- * site is exactly one repo, so the editor adopts this and skips the picker on
10
- * live. Returns null outside a GitHub checkout (no origin / no git) — the editor
11
- * then falls back to the picker. git resolves the repo from any cwd inside the
12
- * tree, so process.cwd() (the build's working dir, = the app dir even in a
13
- * monorepo) is enough. */
14
- export declare function bakeRepoIdentity(): string | null;
7
+ /** Bake the project's repo identity (`owner/repo[#repoId]@branch`, mirroring
8
+ * the X-Okno-Repo header) from the app's git origin + current branch, plus the
9
+ * immutable repo ID from `<dir>/project.json` when present. The ID is the part
10
+ * that survives a GitHub transfer/rename — the git origin URL goes stale the
11
+ * moment a repo moves (push redirects hide it), which is exactly the failure
12
+ * the ID exists to absorb. A deployed site is exactly one repo, so the editor
13
+ * adopts this and skips the picker on live. Returns null outside a GitHub
14
+ * checkout (no origin / no git) — the editor then falls back to the picker.
15
+ * git resolves the repo from any cwd inside the tree, so process.cwd() (the
16
+ * build's working dir, = the app dir even in a monorepo) is enough.
17
+ *
18
+ * The NAME part is ADVISORY, not authoritative: the hosted backend treats it
19
+ * as a lookup key and maps it to the repo's CURRENT location via its
20
+ * repo_names ledger (backend/src/lib/canonical.ts) — never make backend
21
+ * behavior depend on this string being current. The `#repoId` is the part
22
+ * that stays true. */
23
+ export declare function bakeRepoIdentity(oknoDir?: string): string | null;
15
24
  /** Bake the monorepo root path — the build dir relative to the git root — so the
16
25
  * hosted backend knows which subtree holds this project's `okno/`. "" at the repo
17
26
  * root (single-project repo), "apps/site" in a monorepo. POSIX-normalized. */
@@ -1 +1 @@
1
- {"version":3,"file":"bake.d.ts","sourceRoot":"","sources":["../src/bake.ts"],"names":[],"mappings":"AAmBA;;;;sEAIsE;AACtE,wBAAgB,UAAU,IAAI,MAAM,CAWnC;AAED;;;;;;2BAM2B;AAC3B,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAMhD;AAED;;+EAE+E;AAC/E,wBAAgB,YAAY,IAAI,MAAM,CAIrC"}
1
+ {"version":3,"file":"bake.d.ts","sourceRoot":"","sources":["../src/bake.ts"],"names":[],"mappings":"AAoBA;;;;sEAIsE;AACtE,wBAAgB,UAAU,IAAI,MAAM,CAWnC;AAiBD;;;;;;;;;;;;;;;uBAeuB;AACvB,wBAAgB,gBAAgB,CAAC,OAAO,SAAS,GAAG,MAAM,GAAG,IAAI,CAOhE;AAED;;+EAE+E;AAC/E,wBAAgB,YAAY,IAAI,MAAM,CAIrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAoLhE"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAqNhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/codegen/modules.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,eAAe,oHACoF,CAAA;AAoBhH;k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