@animus-ui/next-plugin 0.1.8 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,339 +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 analyzedHashesSlot = globalSlot(ANALYZED_HASHES_KEY);
71
- const replacementEpochSlot = globalSlot(REPLACEMENT_EPOCH_KEY);
72
- const watchTransactionSlot = globalSlot(WATCH_TRANSACTION_KEY);
73
- const sessionArtifactDirSlot = globalSlot(SESSION_ARTIFACT_DIR_KEY);
74
- /**
75
- * Per-file analyzed content hashes of the last published analysis (relPath →
76
- * contentHash of the exact bytes analyzed) — the loader's witness for the
77
- * unconditional catching-up guard (openspec:
78
- * next-webpack-served-transform-coherence, design D4). Includes files
79
- * analyzed with ZERO animus entries: analyzed identity is membership in the
80
- * analysis input set, not manifest entry count.
81
- */
82
- function getAnalyzedHashes() {
83
- return analyzedHashesSlot.get();
84
- }
85
- function setAnalyzedHashes(hashes) {
86
- analyzedHashesSlot.set(hashes);
87
- }
88
- /**
89
- * Session identity is per Next INVOCATION — one process, however many
90
- * compiler instances it holds (openspec:
91
- * next-turbopack-served-transform-coherence, design D2). The first
92
- * ExtractionSession constructed in a process claims a fresh randomUUID;
93
- * every later instance (client/server/RSC compilers each construct one)
94
- * adopts it, so all compilers alias, watch-ignore, and publish ONE
95
- * session-scoped artifact tree. Separate invocations (`next dev` +
96
- * `next build` co-writing) are separate processes and therefore separate
97
- * sessions by construction.
98
- */
99
- function claimProcessSessionId() {
100
- const store = globalThis;
101
- const existing = store[PROCESS_SESSION_ID_KEY];
102
- if (typeof existing === "string" && existing.length > 0) return existing;
103
- const fresh = (0, crypto.randomUUID)();
104
- store[PROCESS_SESSION_ID_KEY] = fresh;
105
- return fresh;
106
- }
107
- /**
108
- * Absolute session artifact directory of the OWNING session's last
109
- * publication — the webpack loader's source for the session-scoped epoch
110
- * dependency path (the loader shares the process with the pipeline; the
111
- * Turbopack loader instead receives the directory via its options).
112
- */
113
- function getSessionArtifactDir() {
114
- return sessionArtifactDirSlot.get();
115
- }
116
- function setSessionArtifactDir(dir) {
117
- sessionArtifactDirSlot.set(dir);
118
- }
119
- /**
120
- * Canonical replacement epoch of the last published analysis
121
- * (`hashReplacementPlans(snapshotFilePlans(manifest), systemPropsContent)`
122
- * — openspec: next-webpack-served-transform-coherence, design D5; the
123
- * served system-props module rides as the served-dependency witness so
124
- * offline system-props changes move the epoch). Published by the
125
- * owning session AFTER the manifest so a reader that observes the epoch
126
- * always observes at least that generation's manifest. (Session
127
- * attribution lives on the DISK epoch artifact — no in-process mirror.)
128
- */
129
- function getReplacementEpoch() {
130
- return replacementEpochSlot.get();
131
- }
132
- function setReplacementEpoch(epoch) {
133
- replacementEpochSlot.set(epoch);
134
- }
135
- /**
136
- * The one in-flight watch-analysis transaction (design D3): the first
137
- * compiler entering a watch batch runs analysis + publication; every other
138
- * compiler (client/server/RSC — each holds its own session instance) joins
139
- * this promise instead of proceeding against a pre-transaction generation.
140
- */
141
- function getWatchTransaction() {
142
- return watchTransactionSlot.get();
143
- }
144
- function setWatchTransaction(transaction) {
145
- watchTransactionSlot.set(transaction);
146
- }
147
- const ENGINE_KEY = "__animus_engine__";
148
- /** Engine selection travels through the singleton so non-owning compiler
149
- * instances and the webpack loader honor the same choice as the owner. */
150
- function setSharedEngine(engine) {
151
- globalThis[ENGINE_KEY] = engine;
152
- }
153
- function getSharedEngine() {
154
- return globalThis[ENGINE_KEY] || "v2";
155
- }
156
- /** Single engine choke-point for every native extraction call. Return type
157
- * mirrors the untyped `require` the call sites previously used — the NAPI
158
- * module's own .d.ts is the authoritative surface. */
159
- function requireEngine() {
160
- return require("@animus-ui/extract");
161
- }
162
- const V2_ENGINE_KEY = "__animus_v2_engine__";
163
- /**
164
- * Engine-agnostic API over both engines (extract-v2-spine row 13). The
165
- * v2 leg adapts the v1 function surface onto a stateful ExtractEngine
166
- * (hoisted to `createV2EngineApi` in @animus-ui/extract/pipeline — the
167
- * single authoritative copy shared with vite-plugin). The engine INSTANCE,
168
- * its analyze-time sources, and the one-shot drift flag all live on
169
- * globalThis for the same reason the manifest does — the ESM plugin and the
170
- * CJS webpack loader must see one engine (and one drift warning) across the
171
- * double-load. (The next-plugin is already process-singleton by design:
172
- * manifest, css, and system props share the same globalThis keys.)
173
- * loadSystemModule is exported by both bindings from one engine-neutral
174
- * Rust crate, so the default path no longer loads the v1 binary.
175
- */
176
- const V2_SENT_SOURCES_KEY = "__animus_v2_sent_sources__";
177
- const V2_DRIFT_WARNED_KEY = "__animus_v2_drift_warned__";
178
- const v2EngineApi = (0, _animus_ui_extract_pipeline.createV2EngineApi)({
179
- label: "animus-next",
180
- isV2: () => getSharedEngine() === "v2",
181
- loadNativeEngine: requireEngine,
182
- passThroughUnknownPaths: true,
183
- store: {
184
- getEngine: () => globalThis[V2_ENGINE_KEY],
185
- setEngine: (engine) => {
186
- globalThis[V2_ENGINE_KEY] = engine;
187
- },
188
- getSentSources: () => globalThis[V2_SENT_SOURCES_KEY] ?? null,
189
- setSentSources: (sources) => {
190
- globalThis[V2_SENT_SOURCES_KEY] = sources;
191
- },
192
- getDriftWarned: () => Boolean(globalThis[V2_DRIFT_WARNED_KEY]),
193
- setDriftWarned: (value) => {
194
- globalThis[V2_DRIFT_WARNED_KEY] = value;
195
- }
196
- }
197
- });
198
- function engineApi() {
199
- return v2EngineApi();
200
- }
201
- //#endregion
202
- Object.defineProperty(exports, "claimProcessSessionId", {
203
- enumerable: true,
204
- get: function() {
205
- return claimProcessSessionId;
206
- }
207
- });
208
- Object.defineProperty(exports, "engineApi", {
209
- enumerable: true,
210
- get: function() {
211
- return engineApi;
212
- }
213
- });
214
- Object.defineProperty(exports, "getAnalysisPromise", {
215
- enumerable: true,
216
- get: function() {
217
- return getAnalysisPromise;
218
- }
219
- });
220
- Object.defineProperty(exports, "getAnalyzedHashes", {
221
- enumerable: true,
222
- get: function() {
223
- return getAnalyzedHashes;
224
- }
225
- });
226
- Object.defineProperty(exports, "getManifestJson", {
227
- enumerable: true,
228
- get: function() {
229
- return getManifestJson;
230
- }
231
- });
232
- Object.defineProperty(exports, "getReplacementEpoch", {
233
- enumerable: true,
234
- get: function() {
235
- return getReplacementEpoch;
236
- }
237
- });
238
- Object.defineProperty(exports, "getSessionArtifactDir", {
239
- enumerable: true,
240
- get: function() {
241
- return getSessionArtifactDir;
242
- }
243
- });
244
- Object.defineProperty(exports, "getSharedCss", {
245
- enumerable: true,
246
- get: function() {
247
- return getSharedCss;
248
- }
249
- });
250
- Object.defineProperty(exports, "getSharedExternalDirs", {
251
- enumerable: true,
252
- get: function() {
253
- return getSharedExternalDirs;
254
- }
255
- });
256
- Object.defineProperty(exports, "getSharedExternalEntries", {
257
- enumerable: true,
258
- get: function() {
259
- return getSharedExternalEntries;
260
- }
261
- });
262
- Object.defineProperty(exports, "getWatchTransaction", {
263
- enumerable: true,
264
- get: function() {
265
- return getWatchTransaction;
266
- }
267
- });
268
- Object.defineProperty(exports, "resetAnalysisPromise", {
269
- enumerable: true,
270
- get: function() {
271
- return resetAnalysisPromise;
272
- }
273
- });
274
- Object.defineProperty(exports, "setAnalysisPromise", {
275
- enumerable: true,
276
- get: function() {
277
- return setAnalysisPromise;
278
- }
279
- });
280
- Object.defineProperty(exports, "setAnalyzedHashes", {
281
- enumerable: true,
282
- get: function() {
283
- return setAnalyzedHashes;
284
- }
285
- });
286
- Object.defineProperty(exports, "setManifestJson", {
287
- enumerable: true,
288
- get: function() {
289
- return setManifestJson;
290
- }
291
- });
292
- Object.defineProperty(exports, "setReplacementEpoch", {
293
- enumerable: true,
294
- get: function() {
295
- return setReplacementEpoch;
296
- }
297
- });
298
- Object.defineProperty(exports, "setSessionArtifactDir", {
299
- enumerable: true,
300
- get: function() {
301
- return setSessionArtifactDir;
302
- }
303
- });
304
- Object.defineProperty(exports, "setSharedCss", {
305
- enumerable: true,
306
- get: function() {
307
- return setSharedCss;
308
- }
309
- });
310
- Object.defineProperty(exports, "setSharedEngine", {
311
- enumerable: true,
312
- get: function() {
313
- return setSharedEngine;
314
- }
315
- });
316
- Object.defineProperty(exports, "setSharedExternalDirs", {
317
- enumerable: true,
318
- get: function() {
319
- return setSharedExternalDirs;
320
- }
321
- });
322
- Object.defineProperty(exports, "setSharedExternalEntries", {
323
- enumerable: true,
324
- get: function() {
325
- return setSharedExternalEntries;
326
- }
327
- });
328
- Object.defineProperty(exports, "setSharedSystemProps", {
329
- enumerable: true,
330
- get: function() {
331
- return setSharedSystemProps;
332
- }
333
- });
334
- Object.defineProperty(exports, "setWatchTransaction", {
335
- enumerable: true,
336
- get: function() {
337
- return setWatchTransaction;
338
- }
339
- });
@@ -1,78 +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
- /**
14
- * Per-file analyzed content hashes of the last published analysis (relPath →
15
- * contentHash of the exact bytes analyzed) — the loader's witness for the
16
- * unconditional catching-up guard (openspec:
17
- * next-webpack-served-transform-coherence, design D4). Includes files
18
- * analyzed with ZERO animus entries: analyzed identity is membership in the
19
- * analysis input set, not manifest entry count.
20
- */
21
- export declare function getAnalyzedHashes(): ReadonlyMap<string, string> | null;
22
- export declare function setAnalyzedHashes(hashes: Map<string, string>): void;
23
- /**
24
- * Session identity is per Next INVOCATION — one process, however many
25
- * compiler instances it holds (openspec:
26
- * next-turbopack-served-transform-coherence, design D2). The first
27
- * ExtractionSession constructed in a process claims a fresh randomUUID;
28
- * every later instance (client/server/RSC compilers each construct one)
29
- * adopts it, so all compilers alias, watch-ignore, and publish ONE
30
- * session-scoped artifact tree. Separate invocations (`next dev` +
31
- * `next build` co-writing) are separate processes and therefore separate
32
- * sessions by construction.
33
- */
34
- export declare function claimProcessSessionId(): string;
35
- /**
36
- * Absolute session artifact directory of the OWNING session's last
37
- * publication — the webpack loader's source for the session-scoped epoch
38
- * dependency path (the loader shares the process with the pipeline; the
39
- * Turbopack loader instead receives the directory via its options).
40
- */
41
- export declare function getSessionArtifactDir(): string | null;
42
- export declare function setSessionArtifactDir(dir: string): void;
43
- /**
44
- * Canonical replacement epoch of the last published analysis
45
- * (`hashReplacementPlans(snapshotFilePlans(manifest), systemPropsContent)`
46
- * — openspec: next-webpack-served-transform-coherence, design D5; the
47
- * served system-props module rides as the served-dependency witness so
48
- * offline system-props changes move the epoch). Published by the
49
- * owning session AFTER the manifest so a reader that observes the epoch
50
- * always observes at least that generation's manifest. (Session
51
- * attribution lives on the DISK epoch artifact — no in-process mirror.)
52
- */
53
- export declare function getReplacementEpoch(): string | null;
54
- export declare function setReplacementEpoch(epoch: string): void;
55
- /**
56
- * The one in-flight watch-analysis transaction (design D3): the first
57
- * compiler entering a watch batch runs analysis + publication; every other
58
- * compiler (client/server/RSC — each holds its own session instance) joins
59
- * this promise instead of proceeding against a pre-transaction generation.
60
- */
61
- export declare function getWatchTransaction(): Promise<void> | null;
62
- export declare function setWatchTransaction(transaction: Promise<void> | null): void;
63
- export type AnimusEngine = 'v2';
64
- /** Engine selection travels through the singleton so non-owning compiler
65
- * instances and the webpack loader honor the same choice as the owner. */
66
- export declare function setSharedEngine(engine: AnimusEngine): void;
67
- export declare function getSharedEngine(): AnimusEngine;
68
- /** Single engine choke-point for every native extraction call. Return type
69
- * mirrors the untyped `require` the call sites previously used — the NAPI
70
- * module's own .d.ts is the authoritative surface. */
71
- export declare function requireEngine(): any;
72
- export declare function engineApi(): any;
73
- /**
74
- * Every globalThis key this module owns — the single authority test
75
- * harnesses snapshot/clear per test (never re-declare this list).
76
- */
77
- 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_engine__", "__animus_v2_engine__", "__animus_v2_sent_sources__", "__animus_v2_drift_warned__"];
78
- //# 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;AA4BD;;;;;;;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,kdAgBxB,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"}