@animus-ui/next-plugin 0.1.9 → 0.1.12

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 (45) hide show
  1. package/dist/index.cjs +88 -1742
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.mjs +78 -1731
  5. package/dist/loader-core-BthLSJQF.cjs +47 -0
  6. package/dist/loader-core-x6cOzF9v.mjs +42 -0
  7. package/dist/loader-core.d.ts +6 -13
  8. package/dist/loader-core.d.ts.map +1 -1
  9. package/dist/loader-path.d.ts +0 -13
  10. package/dist/loader-path.d.ts.map +1 -1
  11. package/dist/loader.cjs +10 -34
  12. package/dist/loader.d.ts +2 -24
  13. package/dist/loader.d.ts.map +1 -1
  14. package/dist/loader.mjs +3 -26
  15. package/dist/plugin.d.ts +18 -70
  16. package/dist/plugin.d.ts.map +1 -1
  17. package/dist/turbopack-config.d.ts +11 -38
  18. package/dist/turbopack-config.d.ts.map +1 -1
  19. package/dist/turbopack-loader.cjs +44 -64
  20. package/dist/turbopack-loader.d.ts +12 -24
  21. package/dist/turbopack-loader.d.ts.map +1 -1
  22. package/dist/turbopack-loader.mjs +40 -56
  23. package/dist/types.d.ts +25 -79
  24. package/dist/types.d.ts.map +1 -1
  25. package/dist/with-animus.d.ts +39 -24
  26. package/dist/with-animus.d.ts.map +1 -1
  27. package/package.json +8 -2
  28. package/dist/extraction-session.d.ts +0 -378
  29. package/dist/extraction-session.d.ts.map +0 -1
  30. package/dist/loader-core-C40WbC6s.cjs +0 -71
  31. package/dist/loader-core-D6Tm_b8F.mjs +0 -66
  32. package/dist/resolve-packages.d.ts +0 -8
  33. package/dist/resolve-packages.d.ts.map +0 -1
  34. package/dist/session-paths-CZoi19NW.cjs +0 -229
  35. package/dist/session-paths-DfYIPDcM.mjs +0 -107
  36. package/dist/session-paths.d.ts +0 -107
  37. package/dist/session-paths.d.ts.map +0 -1
  38. package/dist/singleton-BjSsGjsg.mjs +0 -217
  39. package/dist/singleton-BjZyw_8b.cjs +0 -366
  40. package/dist/singleton.d.ts +0 -96
  41. package/dist/singleton.d.ts.map +0 -1
  42. package/dist/timing.d.ts +0 -7
  43. package/dist/timing.d.ts.map +0 -1
  44. package/dist/turbopack-orchestrator.d.ts +0 -34
  45. package/dist/turbopack-orchestrator.d.ts.map +0 -1
@@ -1,366 +0,0 @@
1
- require("./turbopack-loader.cjs");
2
- let _animus_ui_extract_pipeline = require("@animus-ui/extract/pipeline");
3
- let crypto = require("crypto");
4
- //#region src/singleton.ts
5
- /**
6
- * Module-scope singleton for sharing analysis state between the webpack plugin and loader.
7
- *
8
- * Uses globalThis to survive the ESM/CJS module boundary: the plugin is loaded via ESM
9
- * (next.config.ts import) while the loader is loaded by webpack via require(). Without
10
- * globalThis, each module system gets its own singleton instance.
11
- */
12
- const MANIFEST_KEY = "__animus_manifest_json__";
13
- const PROMISE_KEY = "__animus_analysis_promise__";
14
- const SHARED_CSS_KEY = "__animus_shared_css__";
15
- const SHARED_SYSTEM_PROPS_KEY = "__animus_shared_system_props__";
16
- const SHARED_EXTERNAL_DIRS_KEY = "__animus_external_pkg_dirs__";
17
- const SHARED_EXTERNAL_ENTRIES_KEY = "__animus_external_source_entries__";
18
- function getManifestJson() {
19
- return globalThis[MANIFEST_KEY];
20
- }
21
- function setManifestJson(json) {
22
- globalThis[MANIFEST_KEY] = json;
23
- }
24
- function getAnalysisPromise() {
25
- return globalThis[PROMISE_KEY];
26
- }
27
- function setAnalysisPromise(promise) {
28
- globalThis[PROMISE_KEY] = promise;
29
- }
30
- function resetAnalysisPromise() {
31
- globalThis[PROMISE_KEY] = null;
32
- }
33
- function getSharedCss() {
34
- return globalThis[SHARED_CSS_KEY] || "";
35
- }
36
- function setSharedCss(css) {
37
- globalThis[SHARED_CSS_KEY] = css;
38
- }
39
- function setSharedSystemProps(content) {
40
- globalThis[SHARED_SYSTEM_PROPS_KEY] = content;
41
- }
42
- function getSharedExternalDirs() {
43
- return globalThis[SHARED_EXTERNAL_DIRS_KEY] || [];
44
- }
45
- function setSharedExternalDirs(dirs) {
46
- globalThis[SHARED_EXTERNAL_DIRS_KEY] = dirs;
47
- }
48
- function getSharedExternalEntries() {
49
- return globalThis[SHARED_EXTERNAL_ENTRIES_KEY] || /* @__PURE__ */ new Map();
50
- }
51
- function setSharedExternalEntries(entries) {
52
- globalThis[SHARED_EXTERNAL_ENTRIES_KEY] = entries;
53
- }
54
- /** One typed globalThis slot — the single accessor shape every
55
- * singleton-published value shares (null when unset). */
56
- function globalSlot(key) {
57
- const store = globalThis;
58
- return {
59
- get: () => store[key] ?? null,
60
- set: (value) => {
61
- store[key] = value;
62
- }
63
- };
64
- }
65
- const ANALYZED_HASHES_KEY = "__animus_analyzed_hashes__";
66
- const REPLACEMENT_EPOCH_KEY = "__animus_replacement_epoch__";
67
- const WATCH_TRANSACTION_KEY = "__animus_watch_transaction__";
68
- const PROCESS_SESSION_ID_KEY = "__animus_process_session_id__";
69
- const SESSION_ARTIFACT_DIR_KEY = "__animus_session_artifact_dir__";
70
- const OWNING_WATCH_SESSION_KEY = "__animus_owning_watch_session__";
71
- const analyzedHashesSlot = globalSlot(ANALYZED_HASHES_KEY);
72
- const replacementEpochSlot = globalSlot(REPLACEMENT_EPOCH_KEY);
73
- const watchTransactionSlot = globalSlot(WATCH_TRANSACTION_KEY);
74
- const sessionArtifactDirSlot = globalSlot(SESSION_ARTIFACT_DIR_KEY);
75
- const owningWatchSessionSlot = globalSlot(OWNING_WATCH_SESSION_KEY);
76
- /**
77
- * The session that completed the full pipeline and holds system state — the
78
- * only instance that can run watch analysis. Each MultiCompiler child holds
79
- * its own session AND its own watcher with its own modified set; a
80
- * non-owning session forwards its batch here instead of dropping it (a file
81
- * only that compiler watches would otherwise never be analyzed).
82
- */
83
- function getOwningWatchSession() {
84
- return owningWatchSessionSlot.get();
85
- }
86
- function setOwningWatchSession(session) {
87
- owningWatchSessionSlot.set(session);
88
- }
89
- /**
90
- * Per-file analyzed content hashes of the last published analysis (relPath →
91
- * contentHash of the exact bytes analyzed) — the loader's witness for the
92
- * unconditional catching-up guard (openspec:
93
- * next-webpack-served-transform-coherence, design D4). Includes files
94
- * analyzed with ZERO animus entries: analyzed identity is membership in the
95
- * analysis input set, not manifest entry count.
96
- */
97
- function getAnalyzedHashes() {
98
- return analyzedHashesSlot.get();
99
- }
100
- function setAnalyzedHashes(hashes) {
101
- analyzedHashesSlot.set(hashes);
102
- }
103
- /**
104
- * Session identity is per Next INVOCATION — one process, however many
105
- * compiler instances it holds (openspec:
106
- * next-turbopack-served-transform-coherence, design D2). The first
107
- * ExtractionSession constructed in a process claims a fresh randomUUID;
108
- * every later instance (client/server/RSC compilers each construct one)
109
- * adopts it, so all compilers alias, watch-ignore, and publish ONE
110
- * session-scoped artifact tree. Separate invocations (`next dev` +
111
- * `next build` co-writing) are separate processes and therefore separate
112
- * sessions by construction.
113
- */
114
- function claimProcessSessionId() {
115
- const store = globalThis;
116
- const existing = store[PROCESS_SESSION_ID_KEY];
117
- if (typeof existing === "string" && existing.length > 0) return existing;
118
- const fresh = (0, crypto.randomUUID)();
119
- store[PROCESS_SESSION_ID_KEY] = fresh;
120
- return fresh;
121
- }
122
- /**
123
- * Absolute session artifact directory of the OWNING session's last
124
- * publication — the webpack loader's source for the session-scoped epoch
125
- * dependency path (the loader shares the process with the pipeline; the
126
- * Turbopack loader instead receives the directory via its options).
127
- */
128
- function getSessionArtifactDir() {
129
- return sessionArtifactDirSlot.get();
130
- }
131
- function setSessionArtifactDir(dir) {
132
- sessionArtifactDirSlot.set(dir);
133
- }
134
- /**
135
- * Canonical replacement epoch of the last published analysis
136
- * (`hashReplacementPlans(snapshotFilePlans(manifest), systemPropsContent)`
137
- * — openspec: next-webpack-served-transform-coherence, design D5; the
138
- * served system-props module rides as the served-dependency witness so
139
- * offline system-props changes move the epoch). Published by the
140
- * owning session AFTER the manifest so a reader that observes the epoch
141
- * always observes at least that generation's manifest. (Session
142
- * attribution lives on the DISK epoch artifact — no in-process mirror.)
143
- */
144
- function getReplacementEpoch() {
145
- return replacementEpochSlot.get();
146
- }
147
- function setReplacementEpoch(epoch) {
148
- replacementEpochSlot.set(epoch);
149
- }
150
- /**
151
- * The one in-flight watch-analysis transaction (design D3): the first
152
- * compiler entering a watch batch runs analysis + publication; every other
153
- * compiler (client/server/RSC — each holds its own session instance) joins
154
- * this promise instead of proceeding against a pre-transaction generation.
155
- */
156
- function getWatchTransaction() {
157
- return watchTransactionSlot.get();
158
- }
159
- function setWatchTransaction(transaction) {
160
- watchTransactionSlot.set(transaction);
161
- }
162
- const ENGINE_KEY = "__animus_engine__";
163
- /** Engine selection travels through the singleton so non-owning compiler
164
- * instances and the webpack loader honor the same choice as the owner. */
165
- function setSharedEngine(engine) {
166
- globalThis[ENGINE_KEY] = engine;
167
- }
168
- function getSharedEngine() {
169
- return globalThis[ENGINE_KEY] || "v2";
170
- }
171
- /** Single engine choke-point for every native extraction call. Return type
172
- * mirrors the untyped `require` the call sites previously used — the NAPI
173
- * module's own .d.ts is the authoritative surface. */
174
- function requireEngine() {
175
- return require("@animus-ui/extract");
176
- }
177
- const V2_ENGINE_KEY = "__animus_v2_engine__";
178
- /**
179
- * Engine-agnostic API over both engines (extract-v2-spine row 13). The
180
- * v2 leg adapts the v1 function surface onto a stateful ExtractEngine
181
- * (hoisted to `createV2EngineApi` in @animus-ui/extract/pipeline — the
182
- * single authoritative copy shared with vite-plugin). The engine INSTANCE,
183
- * its analyze-time sources, and the one-shot drift flag all live on
184
- * globalThis for the same reason the manifest does — the ESM plugin and the
185
- * CJS webpack loader must see one engine (and one drift warning) across the
186
- * double-load. (The next-plugin is already process-singleton by design:
187
- * manifest, css, and system props share the same globalThis keys.)
188
- * loadSystemModule is exported by both bindings from one engine-neutral
189
- * Rust crate, so the default path no longer loads the v1 binary.
190
- */
191
- const V2_SENT_SOURCES_KEY = "__animus_v2_sent_sources__";
192
- const V2_DRIFT_WARNED_KEY = "__animus_v2_drift_warned__";
193
- const v2EngineApi = (0, _animus_ui_extract_pipeline.createV2EngineApi)({
194
- label: "animus-next",
195
- isV2: () => getSharedEngine() === "v2",
196
- loadNativeEngine: requireEngine,
197
- passThroughUnknownPaths: true,
198
- store: {
199
- getEngine: () => globalThis[V2_ENGINE_KEY],
200
- setEngine: (engine) => {
201
- globalThis[V2_ENGINE_KEY] = engine;
202
- },
203
- getSentSources: () => globalThis[V2_SENT_SOURCES_KEY] ?? null,
204
- setSentSources: (sources) => {
205
- globalThis[V2_SENT_SOURCES_KEY] = sources;
206
- },
207
- getDriftWarned: () => Boolean(globalThis[V2_DRIFT_WARNED_KEY]),
208
- setDriftWarned: (value) => {
209
- globalThis[V2_DRIFT_WARNED_KEY] = value;
210
- }
211
- }
212
- });
213
- function engineApi() {
214
- return v2EngineApi();
215
- }
216
- //#endregion
217
- Object.defineProperty(exports, "claimProcessSessionId", {
218
- enumerable: true,
219
- get: function() {
220
- return claimProcessSessionId;
221
- }
222
- });
223
- Object.defineProperty(exports, "engineApi", {
224
- enumerable: true,
225
- get: function() {
226
- return engineApi;
227
- }
228
- });
229
- Object.defineProperty(exports, "getAnalysisPromise", {
230
- enumerable: true,
231
- get: function() {
232
- return getAnalysisPromise;
233
- }
234
- });
235
- Object.defineProperty(exports, "getAnalyzedHashes", {
236
- enumerable: true,
237
- get: function() {
238
- return getAnalyzedHashes;
239
- }
240
- });
241
- Object.defineProperty(exports, "getManifestJson", {
242
- enumerable: true,
243
- get: function() {
244
- return getManifestJson;
245
- }
246
- });
247
- Object.defineProperty(exports, "getOwningWatchSession", {
248
- enumerable: true,
249
- get: function() {
250
- return getOwningWatchSession;
251
- }
252
- });
253
- Object.defineProperty(exports, "getReplacementEpoch", {
254
- enumerable: true,
255
- get: function() {
256
- return getReplacementEpoch;
257
- }
258
- });
259
- Object.defineProperty(exports, "getSessionArtifactDir", {
260
- enumerable: true,
261
- get: function() {
262
- return getSessionArtifactDir;
263
- }
264
- });
265
- Object.defineProperty(exports, "getSharedCss", {
266
- enumerable: true,
267
- get: function() {
268
- return getSharedCss;
269
- }
270
- });
271
- Object.defineProperty(exports, "getSharedExternalDirs", {
272
- enumerable: true,
273
- get: function() {
274
- return getSharedExternalDirs;
275
- }
276
- });
277
- Object.defineProperty(exports, "getSharedExternalEntries", {
278
- enumerable: true,
279
- get: function() {
280
- return getSharedExternalEntries;
281
- }
282
- });
283
- Object.defineProperty(exports, "getWatchTransaction", {
284
- enumerable: true,
285
- get: function() {
286
- return getWatchTransaction;
287
- }
288
- });
289
- Object.defineProperty(exports, "resetAnalysisPromise", {
290
- enumerable: true,
291
- get: function() {
292
- return resetAnalysisPromise;
293
- }
294
- });
295
- Object.defineProperty(exports, "setAnalysisPromise", {
296
- enumerable: true,
297
- get: function() {
298
- return setAnalysisPromise;
299
- }
300
- });
301
- Object.defineProperty(exports, "setAnalyzedHashes", {
302
- enumerable: true,
303
- get: function() {
304
- return setAnalyzedHashes;
305
- }
306
- });
307
- Object.defineProperty(exports, "setManifestJson", {
308
- enumerable: true,
309
- get: function() {
310
- return setManifestJson;
311
- }
312
- });
313
- Object.defineProperty(exports, "setOwningWatchSession", {
314
- enumerable: true,
315
- get: function() {
316
- return setOwningWatchSession;
317
- }
318
- });
319
- Object.defineProperty(exports, "setReplacementEpoch", {
320
- enumerable: true,
321
- get: function() {
322
- return setReplacementEpoch;
323
- }
324
- });
325
- Object.defineProperty(exports, "setSessionArtifactDir", {
326
- enumerable: true,
327
- get: function() {
328
- return setSessionArtifactDir;
329
- }
330
- });
331
- Object.defineProperty(exports, "setSharedCss", {
332
- enumerable: true,
333
- get: function() {
334
- return setSharedCss;
335
- }
336
- });
337
- Object.defineProperty(exports, "setSharedEngine", {
338
- enumerable: true,
339
- get: function() {
340
- return setSharedEngine;
341
- }
342
- });
343
- Object.defineProperty(exports, "setSharedExternalDirs", {
344
- enumerable: true,
345
- get: function() {
346
- return setSharedExternalDirs;
347
- }
348
- });
349
- Object.defineProperty(exports, "setSharedExternalEntries", {
350
- enumerable: true,
351
- get: function() {
352
- return setSharedExternalEntries;
353
- }
354
- });
355
- Object.defineProperty(exports, "setSharedSystemProps", {
356
- enumerable: true,
357
- get: function() {
358
- return setSharedSystemProps;
359
- }
360
- });
361
- Object.defineProperty(exports, "setWatchTransaction", {
362
- enumerable: true,
363
- get: function() {
364
- return setWatchTransaction;
365
- }
366
- });
@@ -1,96 +0,0 @@
1
- export declare function getManifestJson(): string | null;
2
- export declare function setManifestJson(json: string): void;
3
- export declare function getAnalysisPromise(): Promise<void> | null;
4
- export declare function setAnalysisPromise(promise: Promise<void>): void;
5
- export declare function resetAnalysisPromise(): void;
6
- export declare function getSharedCss(): string;
7
- export declare function setSharedCss(css: string): void;
8
- export declare function setSharedSystemProps(content: string): void;
9
- export declare function getSharedExternalDirs(): string[];
10
- export declare function setSharedExternalDirs(dirs: string[]): void;
11
- export declare function getSharedExternalEntries(): Map<string, string>;
12
- export declare function setSharedExternalEntries(entries: Map<string, string>): void;
13
- /** Structural view of the owning session a forwarded watch batch targets —
14
- * kept minimal (and defined here, not imported) so the singleton never
15
- * depends on the session module it serves. */
16
- export interface WatchBatchTarget {
17
- ingestForwardedBatch(changes: {
18
- modifiedFiles?: ReadonlySet<string>;
19
- removedFiles?: ReadonlySet<string>;
20
- }): Promise<void>;
21
- }
22
- /**
23
- * The session that completed the full pipeline and holds system state — the
24
- * only instance that can run watch analysis. Each MultiCompiler child holds
25
- * its own session AND its own watcher with its own modified set; a
26
- * non-owning session forwards its batch here instead of dropping it (a file
27
- * only that compiler watches would otherwise never be analyzed).
28
- */
29
- export declare function getOwningWatchSession(): WatchBatchTarget | null;
30
- export declare function setOwningWatchSession(session: WatchBatchTarget | null): void;
31
- /**
32
- * Per-file analyzed content hashes of the last published analysis (relPath →
33
- * contentHash of the exact bytes analyzed) — the loader's witness for the
34
- * unconditional catching-up guard (openspec:
35
- * next-webpack-served-transform-coherence, design D4). Includes files
36
- * analyzed with ZERO animus entries: analyzed identity is membership in the
37
- * analysis input set, not manifest entry count.
38
- */
39
- export declare function getAnalyzedHashes(): ReadonlyMap<string, string> | null;
40
- export declare function setAnalyzedHashes(hashes: Map<string, string>): void;
41
- /**
42
- * Session identity is per Next INVOCATION — one process, however many
43
- * compiler instances it holds (openspec:
44
- * next-turbopack-served-transform-coherence, design D2). The first
45
- * ExtractionSession constructed in a process claims a fresh randomUUID;
46
- * every later instance (client/server/RSC compilers each construct one)
47
- * adopts it, so all compilers alias, watch-ignore, and publish ONE
48
- * session-scoped artifact tree. Separate invocations (`next dev` +
49
- * `next build` co-writing) are separate processes and therefore separate
50
- * sessions by construction.
51
- */
52
- export declare function claimProcessSessionId(): string;
53
- /**
54
- * Absolute session artifact directory of the OWNING session's last
55
- * publication — the webpack loader's source for the session-scoped epoch
56
- * dependency path (the loader shares the process with the pipeline; the
57
- * Turbopack loader instead receives the directory via its options).
58
- */
59
- export declare function getSessionArtifactDir(): string | null;
60
- export declare function setSessionArtifactDir(dir: string): void;
61
- /**
62
- * Canonical replacement epoch of the last published analysis
63
- * (`hashReplacementPlans(snapshotFilePlans(manifest), systemPropsContent)`
64
- * — openspec: next-webpack-served-transform-coherence, design D5; the
65
- * served system-props module rides as the served-dependency witness so
66
- * offline system-props changes move the epoch). Published by the
67
- * owning session AFTER the manifest so a reader that observes the epoch
68
- * always observes at least that generation's manifest. (Session
69
- * attribution lives on the DISK epoch artifact — no in-process mirror.)
70
- */
71
- export declare function getReplacementEpoch(): string | null;
72
- export declare function setReplacementEpoch(epoch: string): void;
73
- /**
74
- * The one in-flight watch-analysis transaction (design D3): the first
75
- * compiler entering a watch batch runs analysis + publication; every other
76
- * compiler (client/server/RSC — each holds its own session instance) joins
77
- * this promise instead of proceeding against a pre-transaction generation.
78
- */
79
- export declare function getWatchTransaction(): Promise<void> | null;
80
- export declare function setWatchTransaction(transaction: Promise<void> | null): void;
81
- export type AnimusEngine = 'v2';
82
- /** Engine selection travels through the singleton so non-owning compiler
83
- * instances and the webpack loader honor the same choice as the owner. */
84
- export declare function setSharedEngine(engine: AnimusEngine): void;
85
- export declare function getSharedEngine(): AnimusEngine;
86
- /** Single engine choke-point for every native extraction call. Return type
87
- * mirrors the untyped `require` the call sites previously used — the NAPI
88
- * module's own .d.ts is the authoritative surface. */
89
- export declare function requireEngine(): any;
90
- export declare function engineApi(): any;
91
- /**
92
- * Every globalThis key this module owns — the single authority test
93
- * harnesses snapshot/clear per test (never re-declare this list).
94
- */
95
- export declare const SINGLETON_GLOBAL_KEYS: readonly ["__animus_manifest_json__", "__animus_analysis_promise__", "__animus_shared_css__", "__animus_shared_system_props__", "__animus_external_pkg_dirs__", "__animus_external_source_entries__", "__animus_analyzed_hashes__", "__animus_replacement_epoch__", "__animus_watch_transaction__", "__animus_process_session_id__", "__animus_session_artifact_dir__", "__animus_owning_watch_session__", "__animus_engine__", "__animus_v2_engine__", "__animus_v2_sent_sources__", "__animus_v2_drift_warned__"];
96
- //# sourceMappingURL=singleton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../src/singleton.ts"],"names":[],"mappings":"AAmBA,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAIzD;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAE/D;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,YAAY,IAAI,MAAM,CAIrC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1D;AAED,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAMhD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAE1D;AAED,wBAAgB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAM9D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAG3E;AA6BD;;+CAE+C;AAC/C,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB,CAAC,OAAO,EAAE;QAC5B,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACpC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;KACpC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnB;AAMD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,gBAAgB,GAAG,IAAI,CAE/D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAE5E;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAEtE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAEnE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAO9C;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CAErD;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAE1D;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,CAE3E;AAID,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC;AAEhC;2EAC2E;AAC3E,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAE1D;AAED,wBAAgB,eAAe,IAAI,YAAY,CAQ9C;AAED;;uDAEuD;AAEvD,wBAAgB,aAAa,IAAI,GAAG,CAInC;AAoDD,wBAAgB,SAAS,IAAI,GAAG,CAE/B;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qfAiBxB,CAAC"}
package/dist/timing.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Verbose build-timing waterfall: JS phases, analysis sub-phases, and the
3
- * shared Rust phase table. `ANIMUS_TIMING_JSON=1` additionally dumps a
4
- * machine-readable merged record.
5
- */
6
- export declare function logBuildTimings(bt: Record<string, number>, rustTiming: Record<string, number> | undefined, log: (msg: string) => void, verbose: boolean): void;
7
- //# sourceMappingURL=timing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../src/timing.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC9C,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,EAC1B,OAAO,EAAE,OAAO,GACf,IAAI,CAkDN"}
@@ -1,34 +0,0 @@
1
- import { watch } from 'fs';
2
- import type { ExtractionSession } from './extraction-session';
3
- /**
4
- * Out-of-band pipeline orchestration for Turbopack (spec:
5
- * next-turbopack-integration). Turbopack exposes no compiler hooks, so the
6
- * pipeline runs during next.config resolution and, in dev, from a
7
- * filesystem watcher — the bundler only ever sees the `.animus/` disk
8
- * artifacts.
9
- */
10
- /** Run the full pipeline with the Turbopack emitter identity: the virtual
11
- * system-props id (Turbopack rejects the webpack path's absolute-path
12
- * imports). Turbopack orchestration persists the analysis-inputs
13
- * hydration corpus — its isolated loader workers replay it (spec:
14
- * next-turbopack-integration, "Manifest disk artifact"; webpack mode
15
- * skips the corpus). */
16
- export declare function runTurbopackPipeline(session: ExtractionSession): Promise<void>;
17
- /**
18
- * Start the dev watcher: fs.watch per eligible top-level directory (plus a
19
- * non-recursive watch on the root itself), debounced into
20
- * existence-partitioned modified/removed sets feeding
21
- * `session.handleWatchUpdate` (serialized — updates never overlap).
22
- * Generated and vendored trees (`.animus`, `.next`, node_modules) are never
23
- * registered with the OS — recursive registration of those trees exhausts
24
- * inotify/kqueue descriptors (EMFILE/ENOSPC) on large projects.
25
- * Idempotent per project root; unref'd so it never holds the process open.
26
- * Asynchronous FSWatcher errors degrade to no-watch with a warning instead
27
- * of crashing the dev server. Returns a close handle, or null when this
28
- * root is already watched or the platform lacks recursive fs.watch (Linux
29
- * before Node 20 — degrades to no-watch with a warning).
30
- */
31
- export declare function startTurbopackWatcher(session: ExtractionSession, rootDir: string, debounceMs?: number, watchFn?: typeof watch): {
32
- close(): void;
33
- } | null;
34
- //# sourceMappingURL=turbopack-orchestrator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"turbopack-orchestrator.d.ts","sourceRoot":"","sources":["../src/turbopack-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,EAAE,MAAM,IAAI,CAAC;AAK9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;;GAMG;AAEH;;;;;yBAKyB;AACzB,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAIf;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,MAAM,EACf,UAAU,SAAK,EAGf,OAAO,GAAE,OAAO,KAAa,GAC5B;IAAE,KAAK,IAAI,IAAI,CAAA;CAAE,GAAG,IAAI,CAiS1B"}