@ogygia/compiler 0.0.0 → 0.14.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.
Files changed (156) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -1
  3. package/dist/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/taggedTemplateLiteral.js +5 -0
  4. package/dist/app-spec.d.ts +18 -0
  5. package/dist/app-spec.js +22 -0
  6. package/dist/blank-styles.d.ts +1 -0
  7. package/dist/blank-styles.js +24 -0
  8. package/dist/bom.d.ts +2 -0
  9. package/dist/bom.js +7 -0
  10. package/dist/build-cache.d.ts +13 -0
  11. package/dist/build-cache.js +65 -0
  12. package/dist/ctx.d.ts +238 -0
  13. package/dist/ctx.js +221 -0
  14. package/dist/dev/css-scope.d.ts +16 -0
  15. package/dist/dev/css-scope.js +32 -0
  16. package/dist/dev/dev-hmr.d.ts +24 -0
  17. package/dist/dev/dev-hmr.js +51 -0
  18. package/dist/dev/hmr.d.ts +34 -0
  19. package/dist/dev/hmr.js +52 -0
  20. package/dist/driver.d.ts +349 -0
  21. package/dist/driver.js +1401 -0
  22. package/dist/exports/index.d.ts +77 -0
  23. package/dist/exports/index.js +349 -0
  24. package/dist/exports/parse.d.ts +65 -0
  25. package/dist/exports/parse.js +251 -0
  26. package/dist/fouc-css.d.ts +102 -0
  27. package/dist/fouc-css.js +304 -0
  28. package/dist/free-vars.d.ts +32 -0
  29. package/dist/free-vars.js +454 -0
  30. package/dist/fs.d.ts +31 -0
  31. package/dist/fs.js +82 -0
  32. package/dist/ids.d.ts +49 -0
  33. package/dist/ids.js +52 -0
  34. package/dist/index.d.ts +23 -0
  35. package/dist/index.js +23 -0
  36. package/dist/kit.d.ts +204 -0
  37. package/dist/kit.js +554 -0
  38. package/dist/leg.d.ts +34 -0
  39. package/dist/leg.js +26 -0
  40. package/dist/link/analyses.d.ts +26 -0
  41. package/dist/link/analyses.js +237 -0
  42. package/dist/link/build-output.d.ts +47 -0
  43. package/dist/link/build-output.js +168 -0
  44. package/dist/link/caps.d.ts +32 -0
  45. package/dist/link/caps.js +39 -0
  46. package/dist/link/context-detect.d.ts +28 -0
  47. package/dist/link/context-detect.js +143 -0
  48. package/dist/link/emit-gate.d.ts +43 -0
  49. package/dist/link/emit-gate.js +55 -0
  50. package/dist/link/file-token.d.ts +11 -0
  51. package/dist/link/file-token.js +15 -0
  52. package/dist/link/island-deps.d.ts +183 -0
  53. package/dist/link/island-deps.js +802 -0
  54. package/dist/link/location-map.d.ts +24 -0
  55. package/dist/link/location-map.js +51 -0
  56. package/dist/link/own-reach.d.ts +15 -0
  57. package/dist/link/own-reach.js +188 -0
  58. package/dist/link/registry-stub.d.ts +50 -0
  59. package/dist/link/registry-stub.js +163 -0
  60. package/dist/link/relocations.d.ts +79 -0
  61. package/dist/link/relocations.js +198 -0
  62. package/dist/link/router-css.d.ts +38 -0
  63. package/dist/link/router-css.js +124 -0
  64. package/dist/link/runtime-entry.d.ts +103 -0
  65. package/dist/link/runtime-entry.js +183 -0
  66. package/dist/link/server-manifest.d.ts +25 -0
  67. package/dist/link/server-manifest.js +102 -0
  68. package/dist/link/transport.d.ts +42 -0
  69. package/dist/link/transport.js +91 -0
  70. package/dist/macros/dollar.d.ts +24 -0
  71. package/dist/macros/dollar.js +397 -0
  72. package/dist/macros/pipeline.d.ts +50 -0
  73. package/dist/macros/pipeline.js +133 -0
  74. package/dist/macros/source.d.ts +9 -0
  75. package/dist/macros/source.js +115 -0
  76. package/dist/macros/store.d.ts +22 -0
  77. package/dist/macros/store.js +217 -0
  78. package/dist/macros/wire.d.ts +17 -0
  79. package/dist/macros/wire.js +116 -0
  80. package/dist/map-chain.d.ts +18 -0
  81. package/dist/map-chain.js +42 -0
  82. package/dist/messages.d.ts +672 -0
  83. package/dist/messages.js +938 -0
  84. package/dist/ownership-stamps.d.ts +9 -0
  85. package/dist/ownership-stamps.js +101 -0
  86. package/dist/parse/oxc.d.ts +36 -0
  87. package/dist/parse/oxc.js +35 -0
  88. package/dist/parse/roots.d.ts +4 -0
  89. package/dist/parse/roots.js +27 -0
  90. package/dist/parse/scan.d.ts +65 -0
  91. package/dist/parse/scan.js +297 -0
  92. package/dist/parse/svelte-ast.d.ts +7 -0
  93. package/dist/parse/svelte-ast.js +99 -0
  94. package/dist/program.d.ts +140 -0
  95. package/dist/program.js +304 -0
  96. package/dist/queries.d.ts +105 -0
  97. package/dist/queries.js +326 -0
  98. package/dist/region/emit.d.ts +168 -0
  99. package/dist/region/emit.js +292 -0
  100. package/dist/region/identity.d.ts +32 -0
  101. package/dist/region/identity.js +46 -0
  102. package/dist/region/ir.d.ts +56 -0
  103. package/dist/region/ir.js +0 -0
  104. package/dist/region/marked-imports.d.ts +27 -0
  105. package/dist/region/marked-imports.js +265 -0
  106. package/dist/region/transform.d.ts +189 -0
  107. package/dist/region/transform.js +1565 -0
  108. package/dist/scan-facts.d.ts +36 -0
  109. package/dist/scan-facts.js +54 -0
  110. package/dist/script-request.d.ts +1 -0
  111. package/dist/script-request.js +33 -0
  112. package/dist/splice.d.ts +11 -0
  113. package/dist/splice.js +33 -0
  114. package/dist/transportables.d.ts +23 -0
  115. package/dist/transportables.js +144 -0
  116. package/dist/virtual/core.d.ts +158 -0
  117. package/dist/virtual/core.js +588 -0
  118. package/dist/virtual/resolver.d.ts +56 -0
  119. package/dist/virtual/resolver.js +249 -0
  120. package/dist/virtual/specifier.d.ts +10 -0
  121. package/dist/virtual/specifier.js +6 -0
  122. package/dist/virtual/table.d.ts +118 -0
  123. package/dist/virtual/table.js +54 -0
  124. package/dist/virtual/types.d.ts +17 -0
  125. package/dist/virtual/types.js +100 -0
  126. package/dist/virtual/value-names.d.ts +2 -0
  127. package/dist/virtual/value-names.js +18 -0
  128. package/dist/vite/definers.d.ts +16 -0
  129. package/dist/vite/definers.js +69 -0
  130. package/dist/vite/dev-maps.d.ts +34 -0
  131. package/dist/vite/dev-maps.js +91 -0
  132. package/dist/vite/index.d.ts +21 -0
  133. package/dist/vite/index.js +874 -0
  134. package/dist/vite/kit-dirs.d.ts +6 -0
  135. package/dist/vite/kit-dirs.js +53 -0
  136. package/dist/vite/late-island.d.ts +11 -0
  137. package/dist/vite/late-island.js +19 -0
  138. package/dist/vite/lazy-files.d.ts +2 -0
  139. package/dist/vite/lazy-files.js +72 -0
  140. package/dist/vite/options.d.ts +195 -0
  141. package/dist/vite/options.js +72 -0
  142. package/dist/vite/package-files.d.ts +3 -0
  143. package/dist/vite/package-files.js +88 -0
  144. package/dist/vite/paths.d.ts +14 -0
  145. package/dist/vite/paths.js +37 -0
  146. package/dist/vite/plugin-api.d.ts +316 -0
  147. package/dist/vite/plugin-api.js +328 -0
  148. package/dist/vite/session.d.ts +28 -0
  149. package/dist/vite/session.js +43 -0
  150. package/dist/vite/sourcemaps.d.ts +19 -0
  151. package/dist/vite/sourcemaps.js +75 -0
  152. package/dist/vite/style-preprocess.d.ts +2 -0
  153. package/dist/vite/style-preprocess.js +84 -0
  154. package/dist/vite/svelte-entries.d.ts +4 -0
  155. package/dist/vite/svelte-entries.js +10 -0
  156. package/package.json +87 -12
@@ -0,0 +1,802 @@
1
+ import { is_generated_specifier } from "../virtual/table.js";
2
+ import path from "node:path";
3
+ import { OWN_FILE_RE, OWN_PACKAGE_NAMES, dedent, hydration_hazards } from "@ogygia/core/contract";
4
+ // src/link/island-deps.ts
5
+ function merge_page_keys(a, b) {
6
+ if (a === "unknown" || b === "unknown") return "unknown";
7
+ if (!a) return b;
8
+ if (!b) return a;
9
+ return /* @__PURE__ */ new Set([...a, ...b]);
10
+ }
11
+ /** The server module's string slot the client leg writes the deps JSON into (link/relocations.ts). */
12
+ const ISLAND_DEPS_INLINE_TOKEN = "__OGYGIA_ISLAND_DEPS_INLINE__";
13
+ const ISLAND_FACADE_RE = /(?:^|\/)og-region\.[0-9a-f]+\.js$/;
14
+ const LEADING_SLASH = /^\//;
15
+ const REMOTE_MODULE_RE = /\.remote\.[cm]?[jt]s$/;
16
+ const BACKSLASH_G = /\\/g;
17
+ /**
18
+ * Kit's own `hash()` (`@sveltejs/kit/src/utils/hash.js`: djb2 ×33 xor, unsigned, base36) — the
19
+ * function a remote's id is minted with: `${hash(file)}/${exportName}`, `file` the module's path
20
+ * relative to `process.cwd()`, posix. Mirrored here (Kit does not export it) so the build can
21
+ * name a remote by the same id the server sees on `internals.id` at render time. Covered by a
22
+ * vector test against ids observed from a real Kit build.
23
+ */
24
+ function kit_remote_hash(file) {
25
+ let hash = 5381;
26
+ let i = file.length;
27
+ while (i) hash = hash * 33 ^ file.charCodeAt(--i);
28
+ return (hash >>> 0).toString(36);
29
+ }
30
+ /**
31
+ * The Kit remote id-hash of a CLIENT module id, or `null` for a module that is not a remote file.
32
+ * `cwd` is what Kit hashed the file against (`process.cwd()` at build), either separator.
33
+ *
34
+ * @internal Exported for the plugin and unit tests.
35
+ */
36
+ function remote_hash_of(module_id, cwd) {
37
+ const id = module_id.split("?")[0].replace(BACKSLASH_G, "/");
38
+ if (!REMOTE_MODULE_RE.test(id)) return null;
39
+ const root = cwd.replace(BACKSLASH_G, "/").replace(TRAILING_SLASH_RE, "");
40
+ return kit_remote_hash(id.startsWith(`${root}/`) ? id.slice(root.length + 1) : path.posix.relative(root, id));
41
+ }
42
+ const TRAILING_SLASH_RE = /\/+$/;
43
+ /**
44
+ * From a client `generateBundle` output, collect transitive static `imports` for each
45
+ * `og-region.<id>.js` facade. Keys/values are public URLs (`/_app/immutable/…`).
46
+ * Used so SSR can `modulepreload` hashed dependency chunks for `hydrate: 'load'` islands
47
+ * (Vite’s auto graph does not apply to `@vite-ignore` `import(entry)`).
48
+ *
49
+ * @param page_reader_files Source files whose presence in an island's chunk closure means the
50
+ * island READS THE PAGE (the `$app/state` / `$app/stores` shims). Per entry, `page[entryUrl]`
51
+ * says whether any chunk in its closure bundles one of them — what lets the handle skip the page
52
+ * seed on a page whose islands never read it. Absolute paths, either separator.
53
+ * @param remote_hash Names a bundled module's Kit remote id-hash (`remote_hash_of`), or `null` for
54
+ * a module that is no remote file. Per entry, `remotes[entryUrl]` lists every remote module in
55
+ * the island's chunk closure, static AND dynamic imports, which is what lets the handle seed a
56
+ * remote's SSR result only when some island on the page can call it. Absent → every entry `[]`.
57
+ * @param page_keys_of SEED SHAPING: the top-level `page.data` keys a bundled module reads (the
58
+ * seed-shaping plugin's answer), `'unknown'` when its reads could not be pinned, `null` for a
59
+ * module it never saw read the page. Per entry, `page_keys[entryUrl]` is the union over its chunk
60
+ * closure, or `null` (ship all) when any module said `'unknown'`, or when the closure reads the
61
+ * page through a module the plugin never saw. Absent (no plugin) → every reader `null`.
62
+ * @param read_source WAKE ADVISOR: reads a bundled `.svelte` source by id so the collector can
63
+ * count what the island's components do. Per entry, `interactivity[entryUrl]` is the union over
64
+ * its closure's own components (dependencies and ogygia's wrappers skipped). Absent → no facts.
65
+ * @param runtime_file The runtime entry chunk's exact file name (compiler
66
+ * `runtime_chunk_filename`). Its static imports are recorded under its URL so SSR hints them
67
+ * beside the runtime script. Matched exactly, never by pattern. Absent → no runtime entry.
68
+ * @param entries Which emitted file is which entry. Every map is keyed by an entry's IDENTITY (the
69
+ * stable public URL SSR bakes), never by its hashed name. `islands`: hashed file name →
70
+ * identity; `runtime`: the runtime's identity. Absent → a facade-named file is its own identity.
71
+ * @internal Exported for unit tests.
72
+ */
73
+ function collectIslandDepModulepreloads(bundle, page_reader_files = [], remote_hash = null, page_keys_of = null, read_source = null, runtime_file = null, entries = null) {
74
+ const js = {};
75
+ const css = {};
76
+ const page = {};
77
+ const page_keys = {};
78
+ const remotes = {};
79
+ const interactivity = {};
80
+ const hazards = {};
81
+ const hazards_cache = /* @__PURE__ */ new Map();
82
+ const hazards_of = (id) => {
83
+ if (!read_source) return [];
84
+ const clean = norm(id.split("?")[0]);
85
+ if (!clean.endsWith(".svelte") || OWN_OR_DEP_RE.test(clean) && !SITE_KIT_RE.test(clean)) return [];
86
+ const hit = hazards_cache.get(clean);
87
+ if (hit) return hit;
88
+ const src = read_source(clean);
89
+ const at_src = clean.lastIndexOf("/src/");
90
+ const kit = SITE_KIT_RE.test(clean);
91
+ let file = clean.split("/").slice(-2).join("/");
92
+ if (kit) file = `ogygia/${clean.slice(clean.lastIndexOf("/content/") + 1)}`;
93
+ else if (at_src !== -1) file = clean.slice(at_src + 1);
94
+ const out = src === null ? [] : hydration_hazards(src).slice(0, 3).map((h) => ({
95
+ file,
96
+ ...h
97
+ }));
98
+ hazards_cache.set(clean, out);
99
+ return out;
100
+ };
101
+ const facts_cache = /* @__PURE__ */ new Map();
102
+ const facts_of = (id) => {
103
+ if (!read_source) return null;
104
+ const clean = norm(id.split("?")[0]);
105
+ if (!clean.endsWith(".svelte") || OWN_OR_DEP_RE.test(clean)) return null;
106
+ const hit = facts_cache.get(clean);
107
+ if (hit !== void 0) return hit;
108
+ const src = read_source(clean);
109
+ const f = src === null ? null : interactivity_facts(src);
110
+ facts_cache.set(clean, f);
111
+ return f;
112
+ };
113
+ const norm = (p) => p.split("\\").join("/");
114
+ const readers = new Set(page_reader_files.map(norm));
115
+ const keys_in = (fileName) => {
116
+ if (!page_keys_of) return void 0;
117
+ let acc = null;
118
+ let any = false;
119
+ for (const id of bundle[fileName]?.moduleIds ?? []) {
120
+ const k = page_keys_of(norm(id.split("?")[0]));
121
+ if (k === null) continue;
122
+ any = true;
123
+ acc = merge_page_keys(acc, k);
124
+ if (acc === "unknown") break;
125
+ }
126
+ return any ? acc : void 0;
127
+ };
128
+ const reads_page = (fileName) => {
129
+ if (!readers.size) return false;
130
+ for (const id of bundle[fileName]?.moduleIds ?? []) if (readers.has(norm(id.split("?")[0]))) return true;
131
+ return false;
132
+ };
133
+ const remotes_in = (fileName, acc) => {
134
+ if (!remote_hash) return;
135
+ for (const id of bundle[fileName]?.moduleIds ?? []) {
136
+ const h = remote_hash(id);
137
+ if (h) acc.add(h);
138
+ }
139
+ };
140
+ const closure_all = (fileName) => {
141
+ const seen = /* @__PURE__ */ new Set([fileName]);
142
+ const queue = [fileName];
143
+ while (queue.length) {
144
+ const chunk = bundle[queue.pop()];
145
+ if (!chunk || chunk.type !== "chunk") continue;
146
+ for (const imp of [...chunk.imports ?? [], ...chunk.dynamicImports ?? []]) {
147
+ if (seen.has(imp)) continue;
148
+ const dep = bundle[imp];
149
+ if (!dep || dep.type !== "chunk") continue;
150
+ seen.add(imp);
151
+ queue.push(imp);
152
+ }
153
+ }
154
+ return seen;
155
+ };
156
+ const css_of = (fileName) => {
157
+ const imported = bundle[fileName]?.viteMetadata?.importedCss;
158
+ if (!imported) return [];
159
+ return [...imported].map((f) => f.startsWith("/") ? f : `/${f}`);
160
+ };
161
+ const walk = (fileName, seen, css_acc) => {
162
+ const chunk = bundle[fileName];
163
+ if (!chunk || chunk.type !== "chunk") return [];
164
+ const deps = [];
165
+ for (const imp of chunk.imports ?? []) {
166
+ if (seen.has(imp)) continue;
167
+ seen.add(imp);
168
+ const dep = bundle[imp];
169
+ if (!dep || dep.type !== "chunk") continue;
170
+ deps.push(imp.startsWith("/") ? imp : `/${imp}`);
171
+ css_acc.push(...css_of(imp));
172
+ deps.push(...walk(imp, seen, css_acc));
173
+ }
174
+ return deps;
175
+ };
176
+ const identity_of = (fileName) => {
177
+ if (entries) return entries.islands.get(fileName) ?? null;
178
+ if (!ISLAND_FACADE_RE.test(fileName)) return null;
179
+ return fileName.startsWith("/") ? fileName : `/${fileName}`;
180
+ };
181
+ for (const [key, chunk] of Object.entries(bundle)) {
182
+ if (chunk.type !== "chunk") continue;
183
+ const fileName = chunk.fileName || key;
184
+ const entryUrl = identity_of(fileName);
185
+ if (!entryUrl) continue;
186
+ const seen = /* @__PURE__ */ new Set([fileName]);
187
+ const css_acc = css_of(fileName);
188
+ const raw = walk(fileName, seen, css_acc);
189
+ const uniq = [];
190
+ const have = /* @__PURE__ */ new Set([entryUrl, `/${fileName.replace(LEADING_SLASH, "")}`]);
191
+ for (const d of raw) {
192
+ if (have.has(d)) continue;
193
+ have.add(d);
194
+ uniq.push(d);
195
+ }
196
+ js[entryUrl] = uniq;
197
+ css[entryUrl] = [...new Set(css_acc)];
198
+ const full = closure_all(fileName);
199
+ let reads = false;
200
+ for (const s of full) if (reads_page(s)) {
201
+ reads = true;
202
+ break;
203
+ }
204
+ page[entryUrl] = reads;
205
+ if (reads) {
206
+ let acc = null;
207
+ let saw_reader = false;
208
+ for (const s of full) {
209
+ const k = keys_in(s);
210
+ if (k === void 0) continue;
211
+ saw_reader = true;
212
+ acc = merge_page_keys(acc, k);
213
+ if (acc === "unknown") break;
214
+ }
215
+ page_keys[entryUrl] = !saw_reader || acc === "unknown" || acc === null ? null : [...acc].sort();
216
+ }
217
+ const found = /* @__PURE__ */ new Set();
218
+ for (const s of full) remotes_in(s, found);
219
+ remotes[entryUrl] = [...found].sort();
220
+ if (read_source) {
221
+ let acc;
222
+ const seen_files = /* @__PURE__ */ new Set();
223
+ const lines = [];
224
+ for (const s of full) for (const id of bundle[s]?.moduleIds ?? []) {
225
+ const clean = norm(id.split("?")[0]);
226
+ if (seen_files.has(clean)) continue;
227
+ seen_files.add(clean);
228
+ const f = facts_of(id);
229
+ if (f) acc = merge_facts(acc, f);
230
+ if (lines.length < 5) {
231
+ for (const h of hazards_of(id)) if (lines.length < 5) lines.push(h);
232
+ }
233
+ }
234
+ if (lines.length) hazards[entryUrl] = lines;
235
+ if (acc) interactivity[entryUrl] = {
236
+ ...acc,
237
+ remotes: remotes[entryUrl].length
238
+ };
239
+ }
240
+ }
241
+ if (runtime_file) {
242
+ const runtime_key = norm(runtime_file).replace(LEADING_SLASH, "");
243
+ const chunk = bundle[runtime_key];
244
+ if (chunk && chunk.type === "chunk") js[entries?.runtime ?? `/${runtime_key}`] = [...new Set(walk(runtime_key, /* @__PURE__ */ new Set([runtime_key]), []))];
245
+ }
246
+ const contents = {};
247
+ const heavy = {};
248
+ const summarize = (s) => {
249
+ const url = s.startsWith("/") ? s : `/${s}`;
250
+ if (contents[url]) return;
251
+ const chunk = bundle[s];
252
+ const ids = chunk?.moduleIds ?? [];
253
+ const mods = chunk?.modules;
254
+ const size_of = mods ? (id) => mods[id]?.renderedLength ?? 0 : void 0;
255
+ if (ids.length) contents[url] = summarize_chunk_contents(ids, 6, 5, size_of);
256
+ if (ids.length && size_of) {
257
+ const named = chunk_module_bytes(ids, size_of);
258
+ if (named.top.length) heavy[url] = named;
259
+ }
260
+ };
261
+ for (const [key, chunk] of Object.entries(bundle)) {
262
+ if (chunk.type !== "chunk") continue;
263
+ const fileName = chunk.fileName || key;
264
+ if (!identity_of(fileName)) continue;
265
+ for (const s of closure_all(fileName)) summarize(s);
266
+ }
267
+ for (const [key, chunk] of Object.entries(bundle)) if (chunk.type === "chunk") summarize(chunk.fileName || key);
268
+ return {
269
+ js,
270
+ css,
271
+ page,
272
+ page_keys,
273
+ remotes,
274
+ interactivity,
275
+ hazards,
276
+ contents,
277
+ heavy,
278
+ dupes: duplicate_modules(Object.entries(bundle).filter(([, c]) => c.type === "chunk").map(([key, c]) => {
279
+ const mods = c.modules;
280
+ return {
281
+ file: c.fileName || key,
282
+ ids: c.moduleIds ?? [],
283
+ ...mods ? { size_of: (id) => mods[id]?.renderedLength ?? 0 } : {}
284
+ };
285
+ }))
286
+ };
287
+ }
288
+ /** Where a module id's copy came from: an installed package's version (`name@1.2.3`, from a pnpm
289
+ * store path), else the package's top folder (`name/src`, `name/dist`). */
290
+ function module_origin(id) {
291
+ const p = id.split("\\").join("/");
292
+ const store = p.lastIndexOf("/.pnpm/");
293
+ if (store !== -1) {
294
+ const seg = p.slice(store + 7, p.indexOf("/", store + 7));
295
+ const cut = seg.indexOf("_");
296
+ return (cut === -1 ? seg : seg.slice(0, cut)).split("+").join("/");
297
+ }
298
+ if (!module_key(id)) return void 0;
299
+ let at = -1;
300
+ let top = "";
301
+ for (const t of [
302
+ "/src/",
303
+ "/dist/",
304
+ "/esm/",
305
+ "/build/"
306
+ ]) {
307
+ const i = p.lastIndexOf(t);
308
+ if (i > at) {
309
+ at = i;
310
+ top = t;
311
+ }
312
+ }
313
+ return at === -1 ? void 0 : `${p.slice(p.lastIndexOf("/", at - 1) + 1, at)}${top.slice(0, -1)}`;
314
+ }
315
+ /** A module id as the file of its package, the build-or-source folder and the extension left out:
316
+ * two ids with one key are one module twice. Null for ids that are no file (virtual, `\0`). */
317
+ function module_key(id) {
318
+ if (!id || id.startsWith("\0") || is_generated_specifier(id)) return null;
319
+ let p = id.split("\\").join("/");
320
+ const q = p.indexOf("?");
321
+ if (q !== -1) p = p.slice(0, q);
322
+ let pkg;
323
+ let rest;
324
+ const nm = p.lastIndexOf("/node_modules/");
325
+ if (nm !== -1) {
326
+ const after = p.slice(nm + 14).split("/");
327
+ const n = after[0].startsWith("@") ? 2 : 1;
328
+ pkg = after.slice(0, n).join("/");
329
+ rest = after.slice(n).join("/");
330
+ } else {
331
+ const at = Math.max(p.lastIndexOf("/src/"), p.lastIndexOf("/dist/"));
332
+ if (at === -1) return null;
333
+ pkg = p.slice(p.lastIndexOf("/", at - 1) + 1, at);
334
+ rest = p.slice(at + 1);
335
+ }
336
+ for (const top of [
337
+ "src/",
338
+ "dist/",
339
+ "esm/",
340
+ "build/"
341
+ ]) if (rest.startsWith(top)) rest = rest.slice(top.length);
342
+ for (const ext of [
343
+ ".mjs",
344
+ ".cjs",
345
+ ".mts",
346
+ ".ts",
347
+ ".js"
348
+ ]) if (rest.endsWith(ext)) rest = rest.slice(0, -ext.length);
349
+ return pkg && rest ? `${pkg}/${rest}` : null;
350
+ }
351
+ /** Every module the build shipped more than once: one key, two or more ids (a single id is in one
352
+ * chunk only). The heaviest first, copies of 512 bytes or more, at most 50.
353
+ * @internal exported for the tests */
354
+ function duplicate_modules(chunks) {
355
+ const by = /* @__PURE__ */ new Map();
356
+ for (const c of chunks) for (const id of c.ids) {
357
+ const key = module_key(id);
358
+ if (!key) continue;
359
+ const ids = by.get(key) ?? by.set(key, /* @__PURE__ */ new Map()).get(key);
360
+ if (!ids.has(id)) {
361
+ const from = module_origin(id);
362
+ ids.set(id, {
363
+ file: c.file.startsWith("/") ? c.file : `/${c.file}`,
364
+ bytes: c.size_of?.(id) ?? 0,
365
+ ...from ? { from } : {}
366
+ });
367
+ }
368
+ }
369
+ const out = [];
370
+ for (const [name, ids] of by) {
371
+ if (ids.size < 2) continue;
372
+ const copies = [...ids.values()].filter((c) => c.bytes >= 512);
373
+ if (copies.length >= 2) out.push({
374
+ name,
375
+ copies
376
+ });
377
+ }
378
+ const weight = (d) => d.copies.reduce((s, c) => s + c.bytes, 0);
379
+ return out.sort((a, b) => weight(b) - weight(a)).slice(0, 50);
380
+ }
381
+ /** A chunk's modules as readable names (the same names `contents` uses) with their rendered bytes,
382
+ * heaviest first, the five heaviest; a package's modules summed under its name.
383
+ * @internal exported for the tests */
384
+ function chunk_module_bytes(module_ids, size_of) {
385
+ const by = /* @__PURE__ */ new Map();
386
+ let total = 0;
387
+ for (const raw of module_ids) {
388
+ if (!raw || raw.startsWith("\0") || is_generated_specifier(raw)) continue;
389
+ const name = summarize_chunk_contents([raw], 1, 1)[0];
390
+ if (!name) continue;
391
+ const bytes = size_of(raw) || 0;
392
+ total += bytes;
393
+ by.set(name, (by.get(name) ?? 0) + bytes);
394
+ }
395
+ const top = [...by].filter(([, bytes]) => bytes > 0).sort((a, b) => b[1] - a[1]).slice(0, 5).map(([name, bytes]) => ({
396
+ name,
397
+ bytes
398
+ }));
399
+ return {
400
+ total,
401
+ top
402
+ };
403
+ }
404
+ const PKG_IN_PATH_RE = /\/node_modules\/((?:@[^/]+\/)?[^/]+)/;
405
+ const SRC_IN_PATH_RE = /\/src\/(.+)$/;
406
+ /**
407
+ * A chunk's source modules as a short readable list: the app's own files first (relative to
408
+ * `src/`), then the packages, the framework runtimes named plainly. Capped; the tail is "+N more".
409
+ * @internal exported for the tests
410
+ */
411
+ function summarize_chunk_contents(module_ids, max_files = 6, max_pkgs = 5, size_of) {
412
+ const files = [];
413
+ const pkgs = [];
414
+ const bytes = /* @__PURE__ */ new Map();
415
+ const add = (list, v, raw) => {
416
+ if (!list.includes(v)) list.push(v);
417
+ if (size_of) bytes.set(v, (bytes.get(v) ?? 0) + (size_of(raw) || 0));
418
+ };
419
+ const ordered = (list) => size_of ? [...list].sort((a, b) => (bytes.get(b) ?? 0) - (bytes.get(a) ?? 0)) : list;
420
+ for (const raw of module_ids) {
421
+ if (!raw || raw.startsWith("\0") || is_generated_specifier(raw)) continue;
422
+ const id = raw.split("\\").join("/").split("?")[0];
423
+ const nm = id.lastIndexOf("/node_modules/");
424
+ if (nm !== -1) {
425
+ const pkg = PKG_IN_PATH_RE.exec(id.slice(nm))?.[1];
426
+ if (pkg === "svelte") add(pkgs, "svelte runtime", raw);
427
+ else if (pkg && OWN_PACKAGE_NAMES.includes(pkg)) add(pkgs, "ogygia runtime", raw);
428
+ else if (pkg) add(pkgs, pkg, raw);
429
+ continue;
430
+ }
431
+ if (OWN_FILE_RE.test(id)) add(pkgs, "ogygia runtime", raw);
432
+ else {
433
+ const rel = SRC_IN_PATH_RE.exec(id);
434
+ add(files, rel ? `src/${rel[1]}` : id.split("/").slice(-2).join("/"), raw);
435
+ }
436
+ }
437
+ const out = [...ordered(files).slice(0, max_files), ...ordered(pkgs).slice(0, max_pkgs)];
438
+ const more = files.length - Math.min(files.length, max_files) + (pkgs.length - Math.min(pkgs.length, max_pkgs));
439
+ if (more > 0) out.push(`+${more} more`);
440
+ return out;
441
+ }
442
+ const OWN_OR_DEP_RE = new RegExp(`/node_modules/|${OWN_FILE_RE.source}`);
443
+ const SITE_KIT_RE = /\/ogygia\/(?:src|dist)\/content\//;
444
+ const HANDLER_RE = /\son[a-z]+\s*=\s*\{|\son:[a-z]+/g;
445
+ const STATE_RE = /\$state(?:\.raw)?\s*\(/g;
446
+ const EFFECT_RE = /\$effect(?:\.pre)?\s*\(/g;
447
+ const BIND_RE = /\sbind:[a-zA-Z]/g;
448
+ const ACTION_RE = /\suse:[a-zA-Z]/g;
449
+ const AWAIT_RE = /\{\s*(?:#\s*)?await\s/g;
450
+ const SHARED_RE = /\bgetContext\s*(?:<[^>]*>\s*)?\(|\bfrom\s*['"][^'"]+\.svelte\.(?:js|ts)['"]/g;
451
+ const count = (src, re) => (src.match(re) ?? []).length;
452
+ /** Count a component source's interactivity markers. */
453
+ function interactivity_facts(src) {
454
+ return {
455
+ handlers: count(src, HANDLER_RE),
456
+ state: count(src, STATE_RE),
457
+ effects: count(src, EFFECT_RE),
458
+ binds: count(src, BIND_RE),
459
+ actions: count(src, ACTION_RE),
460
+ awaits: count(src, AWAIT_RE),
461
+ shared: count(src, SHARED_RE),
462
+ files: 1
463
+ };
464
+ }
465
+ function merge_facts(a, b) {
466
+ if (!a) return { ...b };
467
+ return {
468
+ handlers: a.handlers + b.handlers,
469
+ state: a.state + b.state,
470
+ effects: a.effects + b.effects,
471
+ binds: a.binds + b.binds,
472
+ actions: a.actions + b.actions,
473
+ awaits: (a.awaits ?? 0) + (b.awaits ?? 0),
474
+ shared: (a.shared ?? 0) + (b.shared ?? 0),
475
+ files: a.files + b.files
476
+ };
477
+ }
478
+ /** Stable handoff path under Kit's `outDir`: client `generateBundle` writes; SSR reads at render
479
+ * (Kit is SSR-first). */
480
+ function islandDepsHandoffPath(out_dir) {
481
+ return path.join(out_dir, "og-region-deps.json");
482
+ }
483
+ const STYLE_CLOSE_RE = /<\/style/i;
484
+ /**
485
+ * INLINE REGION CSS. For every region CSS asset (`hrefs`: the union of the handoff's `css` and
486
+ * `content_css` lists) whose bytes are under `threshold` — Kit's `inlineStyleThreshold`, the same
487
+ * number Kit inlines its own route sheets under — keep the asset's text, keyed by its public href.
488
+ * The render then emits `<style data-ogygia-region-css="href">` in place of a blocking `<link>`:
489
+ * a page carrying twenty-five small island sheets (42 KB on a measured home page, twenty of them
490
+ * under 3 KB) stops paying twenty-five requests before first paint. `0` = keep nothing (Kit's
491
+ * default: never inline). Above the threshold, or not an emitted asset, → not in the map → linked.
492
+ *
493
+ * @internal Exported for unit tests.
494
+ */
495
+ function collect_inline_css(bundle, hrefs, threshold) {
496
+ const out = {};
497
+ if (!(threshold > 0)) return out;
498
+ const by_href = /* @__PURE__ */ new Map();
499
+ for (const key in bundle) {
500
+ const item = bundle[key];
501
+ if (item.type !== "asset") continue;
502
+ const file = item.fileName || key;
503
+ by_href.set(file.startsWith("/") ? file : `/${file}`, item);
504
+ }
505
+ for (const href of hrefs) {
506
+ if (href in out) continue;
507
+ const asset = by_href.get(href);
508
+ if (!asset || asset.source == null) continue;
509
+ const text = typeof asset.source === "string" ? asset.source : new TextDecoder().decode(asset.source);
510
+ if (text.length >= threshold) continue;
511
+ if (STYLE_CLOSE_RE.test(text)) continue;
512
+ out[href] = text;
513
+ }
514
+ return out;
515
+ }
516
+ /** The global (by `Symbol.for` name) the dev server's plugin fills with a reader of the og.$
517
+ * factories the compiler holds now (tag → factory source): the dev `fn_manifest()` asks it, so a
518
+ * page carries the factories of a module that never runs in the browser, as a build's handoff
519
+ * does (apps/palaestra/e2e/dev-dollar-fn.spec.ts). */
520
+ const DEV_FN_MANIFEST_KEY = "ogygia.dev.fn-manifest";
521
+ /**
522
+ * `ogygia:server/region-deps` emitter — the SSR-render-time reader of the deps handoff.
523
+ * Client: every reader answers none (the SSR HTML carries every hint). Dev: a region's CSS is its
524
+ * module URL (the client imports it), the page always seeds, remotes are `null` (may call
525
+ * anything), and an identity is its own location. SSR: read the handoff JSON at *render* time —
526
+ * Kit builds the server bundle before the client, so baking at `load()` would always be empty;
527
+ * prerender/live SSR run after client generateBundle. Resolve via import.meta.url walk (not absolute
528
+ * build-machine paths) so adapters find `output/server/og-region-deps.json` next to the server bundle.
529
+ * `out_dir_rel` — Kit's `outDir` relative to the app root (`.svelte-kit` by default) — is the cwd
530
+ * fallback for adapter-node / preview run from the app root.
531
+ */
532
+ function island_deps_module(ssr, is_dev, out_dir_rel = ".svelte-kit") {
533
+ if (!ssr) return dedent`
534
+ export function region_deps(_entry) { return []; }
535
+ export function region_css(_entry) { return []; }
536
+ export function region_css_inline(_href) { return null; }
537
+ export function content_css(_id) { return []; }
538
+ export function region_reads_page(_entry) { return false; }
539
+ export function region_page_keys(_entry) { return null; }
540
+ export function region_page_why(_entry) { return null; }
541
+ export function region_remotes(_entry) { return null; }
542
+ export function region_interactivity(_entry) { return null; }
543
+ export function region_hazards(_entry) { return null; }
544
+ export function chunk_contents(_href) { return null; }
545
+ export function chunk_heavy(_href) { return null; }
546
+ export function chunk_barrels(_href) { return null; }
547
+ export function chunk_duplicates() { return null; }
548
+ export function fn_manifest() { return null; }
549
+ export function entry_location(_identity) { return null; }
550
+ export function location_map() { return null; }
551
+ export function handoff_problem() { return null; }
552
+ `;
553
+ if (is_dev) return dedent`
554
+ export function region_deps(_entry) { return []; }
555
+ export function region_css(entry) { return entry ? [entry] : []; }
556
+ export function region_css_inline(_href) { return null; }
557
+ export function content_css(_id) { return []; }
558
+ export function region_reads_page(_entry) { return true; }
559
+ export function region_page_keys(_entry) { return null; }
560
+ export function region_page_why(_entry) { return null; }
561
+ export function region_remotes(_entry) { return null; }
562
+ export function region_interactivity(_entry) { return null; }
563
+ export function region_hazards(_entry) { return null; }
564
+ export function chunk_contents(_href) { return null; }
565
+ export function chunk_heavy(_href) { return null; }
566
+ export function chunk_barrels(_href) { return null; }
567
+ export function chunk_duplicates() { return null; }
568
+ export function fn_manifest() {
569
+ const m = globalThis[Symbol.for(${JSON.stringify(DEV_FN_MANIFEST_KEY)})]?.();
570
+ return m && Object.keys(m).length > 0 ? m : null;
571
+ }
572
+ export function entry_location(identity) { return identity || null; }
573
+ export function location_map() { return null; }
574
+ export function handoff_problem() { return null; }
575
+ `;
576
+ const out_dir = JSON.stringify(out_dir_rel);
577
+ return dedent`
578
+ import fs from 'node:fs';
579
+ import path from 'node:path';
580
+ import { fileURLToPath } from 'node:url';
581
+
582
+ // PRIMARY source: a string slot the client build patches in place with the manifest JSON (see
583
+ // writeBundle). Inlined into the server bundle, it survives serverless tracing: Vercel/Netlify
584
+ // (@vercel/nft) bundle only imported files, not runtime fs reads, so the co-located JSON below
585
+ // is dropped there. The fs walk stays the fallback for adapter-node and dev-preview (the whole
586
+ // server dir ships). Unpatched, the token starts with '_' (char 95), the guard is false, and
587
+ // the walk runs. A bad patch degrades to the walk, never crashes the server at import.
588
+ const __OG_INLINE = '${ISLAND_DEPS_INLINE_TOKEN}';
589
+ let cache = null;
590
+ // Why the last read found no handoff (null: it has one). The server says it once, with a
591
+ // code (island_deps_handoff_missing). A read that failed is never kept: the next one tries
592
+ // again. Every path absent is the deployment's fact, kept with its problem.
593
+ let problem = null;
594
+ let absent = false;
595
+ let inline_error = null;
596
+ if (__OG_INLINE.charCodeAt(0) === 123) {
597
+ try {
598
+ cache = JSON.parse(__OG_INLINE);
599
+ } catch (e) {
600
+ inline_error = '(inlined in the server bundle): ' + String(e);
601
+ }
602
+ }
603
+
604
+ function candidates() {
605
+ const out = [];
606
+ try {
607
+ let dir = path.dirname(fileURLToPath(import.meta.url));
608
+ for (let i = 0; i < 8; i++) {
609
+ out.push(path.join(dir, 'og-region-deps.json'));
610
+ const parent = path.dirname(dir);
611
+ if (parent === dir) break;
612
+ dir = parent;
613
+ }
614
+ } catch {}
615
+ if (typeof process !== 'undefined' && process.cwd) {
616
+ const cwd = process.cwd();
617
+ out.push(path.join(cwd, ${out_dir}, 'og-region-deps.json'));
618
+ out.push(path.join(cwd, ${out_dir}, 'output', 'server', 'og-region-deps.json'));
619
+ }
620
+ return out;
621
+ }
622
+
623
+ const NONE = {};
624
+ function load() {
625
+ if (cache) return cache;
626
+ if (absent) return NONE;
627
+ const tried = [];
628
+ let error = inline_error;
629
+ for (const p of candidates()) {
630
+ tried.push(p);
631
+ let text;
632
+ try {
633
+ text = fs.readFileSync(p, 'utf8');
634
+ } catch (e) {
635
+ // (absent here: the next candidate)
636
+ if (!e || (e.code !== 'ENOENT' && e.code !== 'ENOTDIR')) error = error || p + ': ' + String(e);
637
+ continue;
638
+ }
639
+ try {
640
+ cache = JSON.parse(text);
641
+ problem = null;
642
+ return cache;
643
+ } catch (e) {
644
+ error = error || p + ': ' + String(e);
645
+ }
646
+ }
647
+ problem = error ? { kind: 'unreadable', tried, error } : { kind: 'missing', tried };
648
+ absent = !error;
649
+ return NONE;
650
+ }
651
+
652
+ /** Why the server has no handoff (\`missing\`: no path held one; \`unreadable\`: one failed to
653
+ * read or parse), or null when it has one. */
654
+ export function handoff_problem() {
655
+ load();
656
+ return problem;
657
+ }
658
+
659
+ // Handoff shape: { js: { entryUrl: [...] }, css: { entryUrl: [...] } }. A stale flat
660
+ // map (pre-css build) degrades gracefully: js falls back to the root, css to [].
661
+ function pick(kind, entry) {
662
+ const all = load();
663
+ const map = all && typeof all[kind] === 'object' ? all[kind] : kind === 'js' ? all : null;
664
+ const list = map ? map[entry] : null;
665
+ return Array.isArray(list) ? list : [];
666
+ }
667
+
668
+ /** One entry of a handoff map (\`field\`), or null: no map, no key, or the wrong shape. */
669
+ function lookup(field, key, ok) {
670
+ const all = load();
671
+ const map = all && typeof all[field] === 'object' && all[field] ? all[field] : null;
672
+ if (!map || !key) return null;
673
+ const v = map[key];
674
+ return ok(v) ? v : null;
675
+ }
676
+
677
+ /** A chunk href's key: root-absolute, as the build wrote it. */
678
+ function chunk_key(href) {
679
+ return href.startsWith('/') ? href : '/' + href.replace(/^\\.\\//, '');
680
+ }
681
+
682
+ export function region_deps(entry) {
683
+ return entry ? pick('js', entry) : [];
684
+ }
685
+
686
+ export function region_css(entry) {
687
+ return entry ? pick('css', entry) : [];
688
+ }
689
+
690
+ // INLINE REGION CSS: the text of a region CSS asset the build kept under Kit's
691
+ // inlineStyleThreshold (collect_inline_css), keyed by the same public href islandCss hands
692
+ // out. null = link it (over the threshold, no threshold, or a pre-inline handoff).
693
+ export function region_css_inline(href) {
694
+ return lookup('css_inline', href, (v) => typeof v === 'string');
695
+ }
696
+
697
+ export function content_css(id) {
698
+ return id ? pick('content_css', id) : [];
699
+ }
700
+
701
+ // Does this island's client closure read $page? FAIL-OPEN: no map (a pre-page handoff), or an
702
+ // entry the build never saw (a foreign fragment's island mounted from another app) → true, so
703
+ // the seed ships and nothing that might read it finds it missing.
704
+ export function region_reads_page(entry) {
705
+ const all = load();
706
+ const map = all && typeof all.page === 'object' && all.page ? all.page : null;
707
+ if (!map || !entry) return true;
708
+ const v = map[entry];
709
+ return v === undefined ? true : !!v;
710
+ }
711
+
712
+ // SEED SHAPING: which top-level page.data keys this island's closure reads. FAIL-OPEN as null
713
+ // ("ship all"): no map (a pre-shaping handoff), an entry the build never saw, or a closure
714
+ // whose reads could not be pinned to literal keys.
715
+ export function region_page_keys(entry) {
716
+ return lookup('page_keys', entry, Array.isArray);
717
+ }
718
+
719
+ // Why this island ships all of page.data: the modules in its closure whose reads the build
720
+ // could not pin (file, line, why). Profiler builds only; null = none recorded.
721
+ export function region_page_why(entry) {
722
+ return lookup('page_why', entry, Array.isArray);
723
+ }
724
+
725
+ // Which remotes (Kit id-hashes) this island's client closure can call: REMOTE SEED ONLY WHEN
726
+ // REACHABLE. FAIL-OPEN as null ("may call anything"): no map (a pre-remotes handoff), or an
727
+ // entry the build never saw (a foreign fragment's island) → every SSR-resolved remote seeds.
728
+ export function region_remotes(entry) {
729
+ return lookup('remotes', entry, Array.isArray);
730
+ }
731
+
732
+ // WAKE ADVISOR facts per entry (handlers / $state / bind: counts over the island's own
733
+ // components), for the profiler's Islands table. null = the handoff has none.
734
+ export function region_interactivity(entry) {
735
+ return lookup('interactivity', entry, (v) => !!v && typeof v === 'object');
736
+ }
737
+
738
+ // each island's lines that draw differently in the browser (the profiler's mismatch findings)
739
+ export function region_hazards(entry) {
740
+ return lookup('hazards', entry, Array.isArray);
741
+ }
742
+
743
+ // WHAT IS INSIDE a chunk (readable source list): the profiler names hashed chunks with it
744
+ export function chunk_contents(href) {
745
+ const all = load();
746
+ const map = all && typeof all.contents === 'object' && all.contents ? all.contents : null;
747
+ if (!map || !href) return null;
748
+ const v = map[chunk_key(href)] ?? map[href];
749
+ return Array.isArray(v) ? v : null;
750
+ }
751
+
752
+ // …and its heaviest modules with their rendered bytes (the report's heavy-module finding)
753
+ export function chunk_heavy(href) {
754
+ const all = load();
755
+ const map = all && typeof all.heavy === 'object' && all.heavy ? all.heavy : null;
756
+ if (!map || !href) return null;
757
+ const v = map[chunk_key(href)] ?? map[href];
758
+ return v && typeof v === 'object' && Array.isArray(v.top) ? v : null;
759
+ }
760
+
761
+ // …and the re-export barrels it still holds (the report's island-barrel note)
762
+ export function chunk_barrels(href) {
763
+ const all = load();
764
+ const map = all && typeof all.barrels === 'object' && all.barrels ? all.barrels : null;
765
+ if (!map || !href) return null;
766
+ const v = map[chunk_key(href)] ?? map[href];
767
+ return Array.isArray(v) ? v : null;
768
+ }
769
+
770
+ // the modules the build shipped twice, each copy's chunk (the report's duplicate-module finding)
771
+ export function chunk_duplicates() {
772
+ const all = load();
773
+ const v = all && Array.isArray(all.dupes) ? all.dupes : null;
774
+ return v && v.length ? v : null;
775
+ }
776
+
777
+ // og.$ factories for the page-inline registration script (CSP-clean prod path): written by
778
+ // the CLIENT build's writeBundle, read here at SSR render time, the same ordering-safe channel
779
+ // islandCss uses.
780
+ export function fn_manifest() {
781
+ const m = load().fn_manifest;
782
+ return m && typeof m === 'object' && Object.keys(m).length ? m : null;
783
+ }
784
+
785
+ // IDENTITY → LOCATION: the content-hashed file an entry (an island's stable URL, the runtime's)
786
+ // is served from. null = no location known (a handoff from before hashing, a foreign island):
787
+ // the identity itself is written, and the browser finds it in the build's location maps.
788
+ export function entry_location(identity) {
789
+ const m = load().entries;
790
+ const v = m && typeof m === 'object' && identity ? m[identity] : null;
791
+ return typeof v === 'string' ? v : null;
792
+ }
793
+
794
+ // The build's content-hashed location map (link/location-map.ts), the file the browser reads:
795
+ // its served path, base-less (asset() adds it), or null (no island, a handoff from before it).
796
+ export function location_map() {
797
+ const v = load().locations;
798
+ return typeof v === 'string' ? v : null;
799
+ }
800
+ `;
801
+ }
802
+ export { DEV_FN_MANIFEST_KEY, ISLAND_DEPS_INLINE_TOKEN, chunk_module_bytes, collectIslandDepModulepreloads, collect_inline_css, duplicate_modules, interactivity_facts, islandDepsHandoffPath, island_deps_module, kit_remote_hash, module_key, module_origin, remote_hash_of, summarize_chunk_contents };