veryfront 0.1.752 → 0.1.754

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.752",
3
+ "version": "0.1.754",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": "P2D",
@@ -16,11 +16,18 @@ export declare class DependencyGraph {
16
16
  private hasTransitiveDependency;
17
17
  private collectDependents;
18
18
  }
19
+ export interface DependencyHashCache {
20
+ graph: DependencyGraph;
21
+ contentHashes: Map<string, string>;
22
+ completedModules: Set<string>;
23
+ inProgressModules: Map<string, Promise<void>>;
24
+ }
25
+ export declare function createDependencyHashCache(): DependencyHashCache;
19
26
  export declare function extractImports(code: string): Promise<string[]>;
20
27
  /**
21
28
  * Filter imports to only local/relative paths (excludes npm, URLs, and framework imports).
22
29
  */
23
30
  export declare function filterLocalImports(specifiers: string[]): string[];
24
31
  export declare function normalizeSpecifierToPath(specifier: string, fromFile: string, projectDir: string): string;
25
- export declare function computeDepsHash(filePath: string, getContent: (path: string) => Promise<string>, projectDir: string): Promise<string>;
32
+ export declare function computeDepsHash(filePath: string, getContent: (path: string) => Promise<string>, projectDir: string, cache?: DependencyHashCache): Promise<string>;
26
33
  //# sourceMappingURL=dependency-graph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-graph.d.ts","sourceRoot":"","sources":["../../../src/src/cache/dependency-graph.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,qBAAa,eAAe;IAC1B,OAAO,CAAC,YAAY,CAAkC;IACtD,OAAO,CAAC,UAAU,CAAkC;IAEpD,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI;IAczD,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAIjD,yBAAyB,C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AUzC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO;IAInD,KAAK,IAAI,IAAI;IAKb,aAAa,IAAI,MAAM,EAAE;IAIzB,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,uBAAuB;IAsB/B,OAAO,CAAC,iBAAiB;CAgB1B;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,eAAe,CAAC;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAC/C;AAED,wBAAgB,yBAAyB,IAAI,mBAAmB,CAO/D;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAGpE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAWjE;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM,CAsBR;AAMD,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,EAC7C,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,mBAAiD,GACvD,OAAO,CAAC,MAAM,CAAC,CAejB"}
@@ -79,6 +79,14 @@ export class DependencyGraph {
79
79
  path.delete(filePath);
80
80
  }
81
81
  }
82
+ export function createDependencyHashCache() {
83
+ return {
84
+ graph: new DependencyGraph(),
85
+ contentHashes: new Map(),
86
+ completedModules: new Set(),
87
+ inProgressModules: new Map(),
88
+ };
89
+ }
82
90
  export async function extractImports(code) {
83
91
  const parsed = await parseAllImports(code);
84
92
  return parsed.imports.map((imp) => imp.specifier);
@@ -120,31 +128,49 @@ export function normalizeSpecifierToPath(specifier, fromFile, projectDir) {
120
128
  function normalizeExtension(path) {
121
129
  return path.replace(/\.(tsx?|jsx)$/, ".js");
122
130
  }
123
- export async function computeDepsHash(filePath, getContent, projectDir) {
124
- const graph = new DependencyGraph();
125
- const contentHashes = new Map();
126
- await buildDependencyGraph(filePath, graph, contentHashes, getContent, projectDir);
127
- const deps = [filePath, ...graph.getTransitiveDependencies(filePath)].sort();
131
+ export async function computeDepsHash(filePath, getContent, projectDir, cache = createDependencyHashCache()) {
132
+ await buildDependencyGraph(filePath, cache, getContent, projectDir);
133
+ const deps = [filePath, ...cache.graph.getTransitiveDependencies(filePath)].sort();
128
134
  const combinedHash = deps
129
- .map((dep) => contentHashes.get(dep) ?? "")
135
+ .map((dep) => cache.contentHashes.get(dep) ?? "")
130
136
  .filter(Boolean)
131
137
  .join(":");
132
138
  return computeHash(combinedHash);
133
139
  }
134
- async function buildDependencyGraph(filePath, graph, contentHashes, getContent, projectDir, visited = new Set()) {
140
+ async function buildDependencyGraph(filePath, cache, getContent, projectDir, visited = new Set()) {
141
+ if (cache.completedModules.has(filePath))
142
+ return;
135
143
  if (visited.has(filePath))
136
144
  return;
137
145
  visited.add(filePath);
146
+ const inProgress = cache.inProgressModules.get(filePath);
147
+ if (inProgress) {
148
+ await inProgress;
149
+ return;
150
+ }
151
+ const buildPromise = buildDependencyGraphFresh(filePath, cache, getContent, projectDir, visited);
152
+ cache.inProgressModules.set(filePath, buildPromise);
153
+ try {
154
+ await buildPromise;
155
+ }
156
+ finally {
157
+ cache.inProgressModules.delete(filePath);
158
+ }
159
+ }
160
+ async function buildDependencyGraphFresh(filePath, cache, getContent, projectDir, visited) {
138
161
  try {
139
162
  const content = await getContent(filePath);
140
- contentHashes.set(filePath, await computeHash(content));
163
+ cache.contentHashes.set(filePath, await computeHash(content));
141
164
  const allImports = await extractImports(content);
142
165
  const normalizedDeps = filterLocalImports(allImports).map((spec) => normalizeSpecifierToPath(spec, filePath, projectDir));
143
- graph.addModule(filePath, normalizedDeps);
144
- await Promise.all(normalizedDeps.map((dep) => buildDependencyGraph(dep, graph, contentHashes, getContent, projectDir, visited)));
166
+ cache.graph.addModule(filePath, normalizedDeps);
167
+ await Promise.all(normalizedDeps.map((dep) => buildDependencyGraph(dep, cache, getContent, projectDir, visited)));
145
168
  }
146
169
  catch (_) {
147
170
  // expected: file may not exist or imports may fail to parse
148
- graph.addModule(filePath, []);
171
+ cache.graph.addModule(filePath, []);
172
+ }
173
+ finally {
174
+ cache.completedModules.add(filePath);
149
175
  }
150
176
  }
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../../../../src/src/modules/react-loader/ssr-module-loader/cache/memory.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAO5D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAOnE,eAAO,MAAM,iBAAiB,oCAE5B,CAAC;AAEH,eAAO,MAAM,uBAAuB,oCAElC,CAAC;AAEH,eAAO,MAAM,gBAAgB,4BAAmC,CAAC;AAEjE,eAAO,MAAM,aAAa,0BAExB,CAAC;AAEH,eAAO,MAAM,gBAAgB,4BAAmC,CAAC;AAGjE,wBAAgB,qBAAqB,IAAI,SAAS,CAKjD;AAwBD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,OAAO,CAY/E;AAKD;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,UAAQ,GACb,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED;;;;GAIG;AACH,wBAAgB,oBA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,GAAG,IAAI,CAY5E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAOA;AAkDD,wBAAgB,mBAAmB,IAAI,IAAI,CAsB1C;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAkDrE"}
@@ -48,6 +48,7 @@ export function getTransformSemaphore() {
48
48
  * Only enforced when TRANSFORM_PER_PROJECT_LIMIT > 0.
49
49
  */
50
50
  const projectTransformCounts = new Map();
51
+ const projectTransformWaiters = new Map();
51
52
  /**
52
53
  * Projects that bypass per-project rate limiting.
53
54
  * - "__single__": Used for local development and tests where there's no multi-tenancy
@@ -88,8 +89,55 @@ export function acquireTransformSlot(projectId, bypass = false) {
88
89
  projectTransformCounts.set(projectId, current + 1);
89
90
  return true;
90
91
  }
91
- /** How long to wait between retry attempts for per-project slots */
92
- const PROJECT_SLOT_RETRY_INTERVAL_MS = 50;
92
+ function removeProjectTransformWaiter(projectId, waiter) {
93
+ const queue = projectTransformWaiters.get(projectId);
94
+ if (!queue)
95
+ return;
96
+ const index = queue.indexOf(waiter);
97
+ if (index !== -1)
98
+ queue.splice(index, 1);
99
+ if (queue.length === 0)
100
+ projectTransformWaiters.delete(projectId);
101
+ }
102
+ function settleProjectTransformWaiter(projectId, waiter, acquired) {
103
+ removeProjectTransformWaiter(projectId, waiter);
104
+ clearTimeout(waiter.timeoutId);
105
+ waiter.resolve(acquired);
106
+ }
107
+ function wakeNextProjectTransformWaiter(projectId) {
108
+ const limit = getTransformPerProjectLimit();
109
+ if (limit <= 0)
110
+ return;
111
+ const queue = projectTransformWaiters.get(projectId);
112
+ if (!queue?.length)
113
+ return;
114
+ const current = projectTransformCounts.get(projectId) ?? 0;
115
+ if (current >= limit)
116
+ return;
117
+ const waiter = queue.shift();
118
+ if (queue.length === 0)
119
+ projectTransformWaiters.delete(projectId);
120
+ if (!waiter)
121
+ return;
122
+ projectTransformCounts.set(projectId, current + 1);
123
+ clearTimeout(waiter.timeoutId);
124
+ waiter.resolve(true);
125
+ }
126
+ function rejectProjectTransformWaiters(projectId) {
127
+ const queue = projectTransformWaiters.get(projectId);
128
+ if (!queue?.length)
129
+ return;
130
+ projectTransformWaiters.delete(projectId);
131
+ for (const waiter of queue) {
132
+ clearTimeout(waiter.timeoutId);
133
+ waiter.resolve(false);
134
+ }
135
+ }
136
+ function rejectAllProjectTransformWaiters() {
137
+ const projectIds = Array.from(projectTransformWaiters.keys());
138
+ for (const projectId of projectIds)
139
+ rejectProjectTransformWaiters(projectId);
140
+ }
93
141
  /**
94
142
  * Try to acquire a project-level transform slot with retries.
95
143
  * Waits up to timeoutMs for a slot to become available.
@@ -98,13 +146,22 @@ const PROJECT_SLOT_RETRY_INTERVAL_MS = 50;
98
146
  export async function tryAcquireTransformSlot(projectId, timeoutMs, bypass = false) {
99
147
  if (acquireTransformSlot(projectId, bypass))
100
148
  return true;
101
- const deadline = Date.now() + timeoutMs;
102
- while (Date.now() < deadline) {
103
- await new Promise((resolve) => dntShim.setTimeout(resolve, PROJECT_SLOT_RETRY_INTERVAL_MS)); // no cleanup needed: one-shot
104
- if (acquireTransformSlot(projectId, bypass))
105
- return true;
106
- }
107
- return false;
149
+ if (timeoutMs <= 0)
150
+ return false;
151
+ return new Promise((resolve) => {
152
+ const waiter = {
153
+ resolve,
154
+ timeoutId: dntShim.setTimeout(() => {
155
+ settleProjectTransformWaiter(projectId, waiter, false);
156
+ }, timeoutMs),
157
+ };
158
+ const queue = projectTransformWaiters.get(projectId);
159
+ if (queue) {
160
+ queue.push(waiter);
161
+ return;
162
+ }
163
+ projectTransformWaiters.set(projectId, [waiter]);
164
+ });
108
165
  }
109
166
  /**
110
167
  * Release a project-level transform slot. `bypass` must match the value
@@ -117,9 +174,11 @@ export function releaseTransformSlot(projectId, bypass = false) {
117
174
  const current = projectTransformCounts.get(projectId) ?? 0;
118
175
  if (current <= 1) {
119
176
  projectTransformCounts.delete(projectId);
177
+ wakeNextProjectTransformWaiter(projectId);
120
178
  return;
121
179
  }
122
180
  projectTransformCounts.set(projectId, current - 1);
181
+ wakeNextProjectTransformWaiter(projectId);
123
182
  }
124
183
  /**
125
184
  * Get per-project transform statistics.
@@ -177,6 +236,7 @@ export function clearSSRModuleCache() {
177
236
  globalModuleCache.clear();
178
237
  failedComponents.clear();
179
238
  projectTransformCounts.clear();
239
+ rejectAllProjectTransformWaiters();
180
240
  verifiedHttpBundlePaths.clear();
181
241
  // Reset the transform semaphore and cached limits so leaked permits
182
242
  // from prior operations don't starve subsequent callers, and env var
@@ -225,6 +285,7 @@ export function clearSSRModuleCacheForProject(projectId) {
225
285
  }
226
286
  }
227
287
  projectTransformCounts.delete(projectId);
288
+ rejectProjectTransformWaiters(projectId);
228
289
  // Clear verified HTTP bundle paths — keys are tempPath:contentHash (not project-scoped),
229
290
  // so full clear is needed. This just forces re-verification on next access.
230
291
  verifiedHttpBundlePaths.clear();
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAsCzD,OAAO,KAAK,EAAoB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAkB3E;;;;;GAKG;AACH,qBAAa,eAAe;IAKd,OAAO,CAAC,OAAO;IAJ3B,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,cAAc,CAA2B;IACjD,OAAO,CAAC,YAAY,CAAyB;gBAEzB,OAAO,EAAE,sBAAsB;YAWrC,qBAAqB;YAgDrB,0BAA0B;IAwHxC,aAAa,CACX,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IA+C7B,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAK1C,2BAA2B;IAYzC,OAAO,CAAC,yBAAyB;YAiBnB,2BAA2B;CA+V1C"}
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAsCzD,OAAO,KAAK,EAAoB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAsB3E;;;;;GAKG;AACH,qBAAa,eAAe;IAKd,OAAO,CAAC,OAAO;IAJ3B,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,cAAc,CAA2B;IACjD,OAAO,CAAC,YAAY,CAAyB;gBAEzB,OAAO,EAAE,sBAAsB;YAYrC,qBAAqB;YAgDrB,0BAA0B;IAwHxC,aAAa,CACX,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAgD7B,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAK1C,2BAA2B;IAYzC,OAAO,CAAC,yBAAyB;YAkBnB,2BAA2B;CAkW1C"}
@@ -34,6 +34,7 @@ import { resolveVfModuleImports } from "./vf-module-resolver.js";
34
34
  import { registerCSSImport } from "../css-import-collector.js";
35
35
  import { injectNodePositions } from "../../../transforms/plugins/babel-node-positions.js";
36
36
  import { ensureMdxModuleDependencies } from "../../../transforms/mdx/esm-module-loader/module-fetcher/dependency-recovery.js";
37
+ import { createDependencyHashCache, } from "../../../cache/dependency-graph.js";
37
38
  const logger = rendererLogger.component("ssr-module-loader");
38
39
  /**
39
40
  * SSR Module Loader with Redis Support.
@@ -49,7 +50,7 @@ export class SSRModuleLoader {
49
50
  constructor(options) {
50
51
  this.options = options;
51
52
  this.cache = new SSRCacheManager(options);
52
- this.depValidator = new SSRDependencyValidator((filePath) => this.cache.getCacheKey(filePath), (filePath, source, depth) => this.transformWithDependencies(filePath, source, depth), (crossImport) => this.transformCrossProjectImport(crossImport), options.adapter, options.projectDir);
53
+ this.depValidator = new SSRDependencyValidator((filePath) => this.cache.getCacheKey(filePath), (filePath, source, depth, dependencyHashCache) => this.transformWithDependencies(filePath, source, depth, dependencyHashCache), (crossImport) => this.transformCrossProjectImport(crossImport), options.adapter, options.projectDir);
53
54
  }
54
55
  async withTransformCapacity(filePath, mode, operation) {
55
56
  const useSemaphore = getMaxConcurrentTransforms() > 0;
@@ -176,7 +177,8 @@ export class SSRModuleLoader {
176
177
  this.circuitBreaker.check(circuitKey, filePath);
177
178
  this.depValidator.reset();
178
179
  try {
179
- await this.transformWithDependencies(filePath, source);
180
+ const dependencyHashCache = createDependencyHashCache();
181
+ await this.transformWithDependencies(filePath, source, 0, dependencyHashCache);
180
182
  if (this.depValidator.missingDependencies.length > 0) {
181
183
  this.depValidator.throwMissingDependencies(filePath);
182
184
  }
@@ -215,14 +217,14 @@ export class SSRModuleLoader {
215
217
  withTransformCapacity: (syntheticFilePath, operation) => this.withTransformCapacity(syntheticFilePath, "plain", operation),
216
218
  });
217
219
  }
218
- transformWithDependencies(filePath, source, depth = 0) {
220
+ transformWithDependencies(filePath, source, depth = 0, dependencyHashCache = createDependencyHashCache()) {
219
221
  const fileName = filePath.split("/").pop() || filePath;
220
- return withSpan(SpanNames.SSR_TRANSFORM_DEPENDENCIES, () => this.doTransformWithDependencies(filePath, source, depth), {
222
+ return withSpan(SpanNames.SSR_TRANSFORM_DEPENDENCIES, () => this.doTransformWithDependencies(filePath, source, depth, dependencyHashCache), {
221
223
  "ssr.file": fileName,
222
224
  "ssr.depth": depth,
223
225
  });
224
226
  }
225
- async doTransformWithDependencies(filePath, source, depth = 0) {
227
+ async doTransformWithDependencies(filePath, source, depth = 0, dependencyHashCache = createDependencyHashCache()) {
226
228
  if (depth > MAX_TRANSFORM_DEPTH) {
227
229
  logger.warn("Max transform depth exceeded", {
228
230
  file: filePath.slice(-40),
@@ -365,7 +367,7 @@ export class SSRModuleLoader {
365
367
  // children also need slots (10 batch x 2 depth = 21 slots, but limit is 17).
366
368
  const crossProjectPaths = new Map();
367
369
  const localFs = createFileSystem();
368
- const localImportPaths = await this.depValidator.processLocalImports(parseResult.imports, filePath, depth, localFs);
370
+ const localImportPaths = await this.depValidator.processLocalImports(parseResult.imports, filePath, depth, localFs, dependencyHashCache);
369
371
  for (let i = 0; i < parseResult.crossProjectImports.length; i += TRANSFORM_BATCH_SIZE) {
370
372
  const batch = parseResult.crossProjectImports.slice(i, i + TRANSFORM_BATCH_SIZE);
371
373
  await Promise.all(batch.map(async (crossImport) => {
@@ -391,6 +393,7 @@ export class SSRModuleLoader {
391
393
  ssr: true,
392
394
  apiBaseUrl: this.options.apiBaseUrl,
393
395
  reactVersion: this.options.reactVersion,
396
+ dependencyHashCache,
394
397
  };
395
398
  let transformed = await withSpan(SpanNames.SSR_TRANSFORM_SINGLE, () => transformToESM(code, filePath, this.options.projectDir, this.options.adapter, transformOpts), { "ssr.file": filePath.split("/").pop() || filePath });
396
399
  for (const [specifier, tempPath] of crossProjectPaths.entries()) {
@@ -9,6 +9,7 @@
9
9
  import type { CrossProjectImport, MissingImport } from "../../../transforms/esm/import-parser.js";
10
10
  import { createFileSystem } from "../../../platform/compat/fs.js";
11
11
  import type { RuntimeAdapter } from "../../../platform/adapters/base.js";
12
+ import { type DependencyHashCache } from "../../../cache/dependency-graph.js";
12
13
  /**
13
14
  * Manages dependency validation for SSR module loading:
14
15
  * - Pre-flight checks for local file existence
@@ -23,7 +24,7 @@ export declare class SSRDependencyValidator {
23
24
  private projectDir;
24
25
  /** Accumulated missing dependencies across the transform tree. */
25
26
  missingDependencies: MissingImport[];
26
- constructor(getCacheKey: (filePath: string) => string, transformWithDependencies: (filePath: string, source: string | undefined, depth: number) => Promise<void>, transformCrossProjectImport: (crossProjectImport: CrossProjectImport) => Promise<string>, adapter: RuntimeAdapter, projectDir: string);
27
+ constructor(getCacheKey: (filePath: string) => string, transformWithDependencies: (filePath: string, source: string | undefined, depth: number, dependencyHashCache: DependencyHashCache) => Promise<void>, transformCrossProjectImport: (crossProjectImport: CrossProjectImport) => Promise<string>, adapter: RuntimeAdapter, projectDir: string);
27
28
  /** Reset missing dependencies for a new load cycle. */
28
29
  reset(): void;
29
30
  /**
@@ -42,6 +43,6 @@ export declare class SSRDependencyValidator {
42
43
  processLocalImports(imports: Array<{
43
44
  absolutePath: string;
44
45
  specifier: string;
45
- }>, fromFilePath: string, depth: number, localFs: ReturnType<typeof createFileSystem>): Promise<Map<string, string>>;
46
+ }>, fromFilePath: string, depth: number, localFs: ReturnType<typeof createFileSystem>, dependencyHashCache: DependencyHashCache): Promise<Map<string, string>>;
46
47
  }
47
48
  //# sourceMappingURL=ssr-dependency-validator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-dependency-validator.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAGlG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAMzE;;;;;GAKG;AACH,qBAAa,sBAAsB;IAK/B,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,yBAAyB;IAKjC,OAAO,CAAC,2BAA2B;IAGnC,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,UAAU;IAdpB,kEAAkE;IAClE,mBAAmB,EAAE,aAAa,EAAE,CAAM;gBAGhC,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,EACzC,yBAAyB,EAAE,CACjC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,IAAI,CAAC,EACV,2BAA2B,EAAE,CACnC,kBAAkB,EAAE,kBAAkB,KACnC,OAAO,CAAC,MAAM,CAAC,EACZ,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM;IAG5B,uDAAuD;IACvD,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK;IAwBjD;;;OAGG;IACG,uBAAuB,CAC3B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,MAAU,GAChB,OAAO,CAAC,IAAI,CAAC;IA0ChB;;;OAGG;IACG,mBAAmB,CACvB,OAAO,EAAE,KAAK,CAAC;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,EAC3D,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,GAC3C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAmChC"}
1
+ {"version":3,"file":"ssr-dependency-validator.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAGlG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE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C,CAAC;CAwChC"}
@@ -13,6 +13,7 @@ import { createError, toError } from "../../../errors/veryfront-error.js";
13
13
  import { rendererLogger } from "../../../utils/index.js";
14
14
  import { MAX_TRANSFORM_DEPTH, TRANSFORM_BATCH_SIZE } from "./constants.js";
15
15
  import { globalModuleCache } from "./cache/index.js";
16
+ import { createDependencyHashCache, } from "../../../cache/dependency-graph.js";
16
17
  const logger = rendererLogger.component("ssr-module-loader");
17
18
  /**
18
19
  * Manages dependency validation for SSR module loading:
@@ -77,7 +78,7 @@ export class SSRDependencyValidator {
77
78
  this.missingDependencies.push(...parseResult.missing);
78
79
  }
79
80
  const localFs = createFileSystem();
80
- await this.processLocalImports(parseResult.imports, filePath, depth, localFs);
81
+ await this.processLocalImports(parseResult.imports, filePath, depth, localFs, createDependencyHashCache());
81
82
  for (let i = 0; i < parseResult.crossProjectImports.length; i += TRANSFORM_BATCH_SIZE) {
82
83
  const batch = parseResult.crossProjectImports.slice(i, i + TRANSFORM_BATCH_SIZE);
83
84
  await Promise.all(batch.map(async (crossImport) => {
@@ -98,7 +99,7 @@ export class SSRDependencyValidator {
98
99
  * Process local imports in batches, recursively transforming dependencies
99
100
  * and building a map of specifier -> temp file path.
100
101
  */
101
- async processLocalImports(imports, fromFilePath, depth, localFs) {
102
+ async processLocalImports(imports, fromFilePath, depth, localFs, dependencyHashCache) {
102
103
  const importPathMap = new Map();
103
104
  for (let i = 0; i < imports.length; i += TRANSFORM_BATCH_SIZE) {
104
105
  const batch = imports.slice(i, i + TRANSFORM_BATCH_SIZE);
@@ -107,7 +108,7 @@ export class SSRDependencyValidator {
107
108
  const depSource = imp.absolutePath.startsWith("/")
108
109
  ? await localFs.readTextFile(imp.absolutePath)
109
110
  : await this.adapter.fs.readFile(imp.absolutePath);
110
- await this.transformWithDependencies(imp.absolutePath, depSource, depth + 1);
111
+ await this.transformWithDependencies(imp.absolutePath, depSource, depth + 1, dependencyHashCache);
111
112
  const depCacheKey = this.getCacheKey(imp.absolutePath);
112
113
  const depEntry = globalModuleCache.get(depCacheKey);
113
114
  if (depEntry) {
@@ -8,7 +8,7 @@ interface TransformCacheEntry {
8
8
  }
9
9
  interface LocalFallbackLike<K, V> {
10
10
  get(key: K): V | undefined;
11
- set(key: K, value: V): void | this;
11
+ set(key: K, value: V): unknown;
12
12
  delete(key: K): boolean;
13
13
  has(key: K): boolean;
14
14
  clear(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"transform-cache.d.ts","sourceRoot":"","sources":["../../../../src/src/transforms/esm/transform-cache.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,YAAY,EAIlB,MAAM,wBAAwB,CAAC;AAmBhC,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAUD,UAAU,iBAAiB,CAAC,CAAC,EAAE,CAAC;IAC9B,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAC3B,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;IACnC,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IACxB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC;IACrB,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACrC;AAcD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE;IACN,aAAa,CAAC,EAAE,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;IACtE,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;CACpC,GAAG,IA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B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,GAAG,GAAE,OAAe,EACpB,WAAW,GAAE,OAAe,EAC5B,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,CAER;AAED,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAgC1C;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAI/E;AAED,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,MAA4B,EACxC,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,IAAI,CAAC,CAyBf;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,MAA4B,GACvC,IAAI,CAoBN;AAWD,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,wBAAsB,8BAA8B,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAKnF;AAED,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mCAAmC;IACnC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAChC,UAAU,GAAE,MAA4B,GACvC,OAAO,CAAC,oBAAoB,CAAC,CA4B/B"}
@@ -1,7 +1,6 @@
1
1
  import { registerCache } from "../../utils/memory/index.js";
2
2
  import { logger as baseLogger } from "../../utils/logger/logger.js";
3
3
  import { buildTransformCacheKey } from "../../cache/keys.js";
4
- import { LRUCache } from "../../utils/lru-wrapper.js";
5
4
  import { CacheBackends, MemoryCacheBackend, } from "../../cache/backend.js";
6
5
  import { hashCodeHex } from "../../utils/hash-utils.js";
7
6
  import { detokenizeAllCachePaths, tokenizeAllVeryFrontPaths } from "../../cache/paths.js";
@@ -19,9 +18,47 @@ const UNRESOLVED_VF_MODULES_PATTERN = /from\s*["']((?:file:\/\/)?\/?\/?_vf_modul
19
18
  let cacheGateway = null;
20
19
  let cacheInitialized = false;
21
20
  let cacheInitPromise = null;
22
- const defaultLocalFallback = new LRUCache({
23
- maxEntries: FALLBACK_MAX_ENTRIES,
24
- });
21
+ class EntryBoundedFallback {
22
+ maxEntries;
23
+ store = new Map();
24
+ constructor(maxEntries) {
25
+ this.maxEntries = maxEntries;
26
+ }
27
+ get(key) {
28
+ const value = this.store.get(key);
29
+ if (value === undefined)
30
+ return undefined;
31
+ this.store.delete(key);
32
+ this.store.set(key, value);
33
+ return value;
34
+ }
35
+ set(key, value) {
36
+ this.store.delete(key);
37
+ this.store.set(key, value);
38
+ while (this.store.size > this.maxEntries) {
39
+ const oldestKey = this.store.keys().next();
40
+ if (oldestKey.done)
41
+ break;
42
+ this.store.delete(oldestKey.value);
43
+ }
44
+ }
45
+ delete(key) {
46
+ return this.store.delete(key);
47
+ }
48
+ has(key) {
49
+ return this.store.has(key);
50
+ }
51
+ clear() {
52
+ this.store.clear();
53
+ }
54
+ get size() {
55
+ return this.store.size;
56
+ }
57
+ entries() {
58
+ return this.store.entries();
59
+ }
60
+ }
61
+ const defaultLocalFallback = new EntryBoundedFallback(FALLBACK_MAX_ENTRIES);
25
62
  /** Injected caches for testing */
26
63
  let injectedLocalFallback = null;
27
64
  let injectedCacheGateway = undefined;
@@ -176,21 +213,6 @@ function normalizeTtl(ttlSeconds) {
176
213
  function setLocalFallback(key, entry) {
177
214
  const fallback = getLocalFallback();
178
215
  fallback.set(key, entry);
179
- if (fallback === defaultLocalFallback)
180
- return;
181
- if (fallback.size > FALLBACK_MAX_ENTRIES)
182
- pruneLocalFallback();
183
- }
184
- function pruneLocalFallback() {
185
- const fallback = getLocalFallback();
186
- const excess = fallback.size - FALLBACK_MAX_ENTRIES;
187
- if (excess <= 0)
188
- return;
189
- const entries = Array.from(fallback.entries()).sort(([, a], [, b]) => a.timestamp - b.timestamp);
190
- for (let i = 0; i < excess; i++) {
191
- const [key] = entries[i];
192
- fallback.delete(key);
193
- }
194
216
  }
195
217
  export function destroyTransformCache() {
196
218
  getLocalFallback().clear();
@@ -1,4 +1,5 @@
1
1
  import type { RuntimeAdapter } from "../../platform/adapters/base.js";
2
+ import type { DependencyHashCache } from "../../cache/dependency-graph.js";
2
3
  export interface TransformOptions {
3
4
  dev?: boolean;
4
5
  projectId: string;
@@ -10,6 +11,8 @@ export interface TransformOptions {
10
11
  studioEmbed?: boolean;
11
12
  /** React version for transforms (from project config, defaults to DEFAULT_REACT_VERSION) */
12
13
  reactVersion?: string;
14
+ /** Internal per-render dependency hash cache. */
15
+ dependencyHashCache?: DependencyHashCache;
13
16
  }
14
17
  export interface TransformContext {
15
18
  source: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/transforms/esm/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,gBAAgB,CAAC;CAC3B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/transforms/esm/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,gBAAgB,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/transforms/pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAEhB,eAAe,EAChB,MAAM,YAAY,CAAC;AA0HpB,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,gBAAgB,EACzB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAoI1B;AAoBD,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,MAAM,CAAC,CASjB;AAmCD,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,GACb,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/transforms/pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAEhB,eAAe,EAChB,MAAM,YAAY,CAAC;AA0HpB,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,gBAAgB,EACzB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAyI1B;AAqBD,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,MAAM,CAAC,CASjB;AAmCD,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,GACb,MAAM,cAAc,CAAC"}
@@ -118,7 +118,7 @@ export function runPipeline(source, filePath, projectDir, options, config) {
118
118
  studioEmbed: ctx.studioEmbed,
119
119
  dev: ctx.dev,
120
120
  });
121
- const depsHash = await computeDepsHashSafe(filePath, projectDir, options.readFile);
121
+ const depsHash = await computeDepsHashSafe(filePath, projectDir, options.readFile, options.dependencyHashCache);
122
122
  const cacheKey = generateCacheKey(filePath, ctx.contentHash, options.ssr ?? false, options.studioEmbed ?? false, { depsHash, configHash, projectId: options.projectId });
123
123
  const cached = await getCachedTransformAsync(cacheKey);
124
124
  if (cached) {
@@ -204,11 +204,11 @@ export function runPipeline(source, filePath, projectDir, options, config) {
204
204
  "transform.studio_embed": options.studioEmbed ?? false,
205
205
  });
206
206
  }
207
- async function computeDepsHashSafe(filePath, projectDir, readFile) {
207
+ async function computeDepsHashSafe(filePath, projectDir, readFile, dependencyHashCache) {
208
208
  if (!readFile)
209
209
  return undefined;
210
210
  try {
211
- return await computeDepsHash(filePath, readFile, projectDir);
211
+ return await computeDepsHash(filePath, readFile, projectDir, dependencyHashCache);
212
212
  }
213
213
  catch (err) {
214
214
  logger.debug("depsHash computation failed, skipping", {
@@ -4,6 +4,7 @@
4
4
  * Defines the plugin-based architecture for ESM transforms.
5
5
  * Each stage handles one concern, making the pipeline testable and maintainable.
6
6
  */
7
+ import type { DependencyHashCache } from "../../cache/dependency-graph.js";
7
8
  /**
8
9
  * Transform stages in execution order.
9
10
  * Each stage runs after the previous completes.
@@ -54,6 +55,8 @@ export interface TransformOptions {
54
55
  reactVersion?: string;
55
56
  /** File reader for dependency hash computation. When provided, enables dependency-aware cache invalidation. */
56
57
  readFile?: (path: string) => Promise<string>;
58
+ /** Internal per-render dependency hash cache. */
59
+ dependencyHashCache?: DependencyHashCache;
57
60
  }
58
61
  /**
59
62
  * Context passed through the transform pipeline.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/transforms/pipeline/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,oBAAY,cAAc;IACxB,4BAA4B;IAC5B,KAAK,IAAI;IACT,mCAAmC;IACnC,OAAO,IAAI;IACX,0BAA0B;IAC1B,eAAe,IAAI;IACnB,wEAAwE;IACxE,aAAa,IAAI;IACjB,oEAAoE;IACpE,eAAe,IAAI;IACnB,4DAA4D;IAC5D,gBAAgB,IAAI;IACpB,uEAAuE;IACvE,YAAY,IAAI;IAChB,iDAAiD;IACjD,QAAQ,IAAI;CACb;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,SAAS,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+GAA+G;IAC/G,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,IAAI,EAA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IACb,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,MAAM,EAAE,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACpC,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+BAA+B;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/transforms/pipeline/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;GAGG;AACH,oBAAY,cAAc;IACxB,4BAA4B;IAC5B,KAAK,IAAI;IACT,mCAAmC;IACnC,OAAO,IAAI;IACX,0BAA0B;IAC1B,eAAe,IAAI;IACnB,wEAAwE;IACxE,aAAa,IAAI;IACjB,oEAAoE;IACpE,eAAe,IAAI;IACnB,4DAA4D;IAC5D,gBAAgB,IAAI;IACpB,uEAAuE;IACvE,YAAY,IAAI;IAChB,iDAAiD;IACjD,QAAQ,IAAI;CACb;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,SAAS,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,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AA2C;IAC3C,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,EAAE,cAAc,CAAC;IACtB,uDAAuD;IACvD,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAC/C,4CAA4C;IAC5C,SAAS,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CAChE;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,MAAM,EAAE,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACpC,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+BAA+B;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.752";
2
+ export declare const VERSION = "0.1.754";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.752";
4
+ export const VERSION = "0.1.754";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.752",
3
+ "version": "0.1.754",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",