@animus-ui/extract 0.1.19 → 0.1.21
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/crates/extract-v2/animus-extract-v2.darwin-arm64.node +0 -0
- package/crates/extract-v2/animus-extract-v2.linux-arm64-gnu.node +0 -0
- package/crates/extract-v2/animus-extract-v2.linux-x64-gnu.node +0 -0
- package/crates/extract-v2/index.d.ts +13 -0
- package/dist/index.cjs +5 -1
- package/dist/index.mjs +2 -2
- package/dist/pipeline/analyze-project-args.d.ts +5 -1
- package/dist/pipeline/analyze-project-args.d.ts.map +1 -1
- package/dist/pipeline/assemble-stylesheet.d.ts +5 -0
- package/dist/pipeline/assemble-stylesheet.d.ts.map +1 -1
- package/dist/pipeline/asset-placeholders.d.ts +14 -0
- package/dist/pipeline/asset-placeholders.d.ts.map +1 -1
- package/dist/pipeline/core-options.d.ts +6 -0
- package/dist/pipeline/core-options.d.ts.map +1 -1
- package/dist/pipeline/discover-packages.d.ts +15 -1
- package/dist/pipeline/discover-packages.d.ts.map +1 -1
- package/dist/pipeline/dynamic-prop-config.d.ts +3 -0
- package/dist/pipeline/dynamic-prop-config.d.ts.map +1 -1
- package/dist/pipeline/engine-adapter.d.ts +1 -1
- package/dist/pipeline/engine-adapter.d.ts.map +1 -1
- package/dist/pipeline/index.d.ts +4 -4
- package/dist/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/manifest-diagnostics.d.ts +33 -3
- package/dist/pipeline/manifest-diagnostics.d.ts.map +1 -1
- package/dist/pipeline/manifest-schema.d.ts +6 -0
- package/dist/pipeline/manifest-schema.d.ts.map +1 -1
- package/dist/pipeline/post-process-css.d.ts.map +1 -1
- package/dist/pipeline/prefix.d.ts +35 -0
- package/dist/pipeline/prefix.d.ts.map +1 -1
- package/dist/pipeline/property-diagnostics.d.ts +6 -4
- package/dist/pipeline/property-diagnostics.d.ts.map +1 -1
- package/dist/pipeline/property-names.d.ts +32 -0
- package/dist/pipeline/property-names.d.ts.map +1 -0
- package/dist/pipeline/property-registrations.d.ts +5 -2
- package/dist/pipeline/property-registrations.d.ts.map +1 -1
- package/dist/pipeline/run-analysis.d.ts +16 -0
- package/dist/pipeline/run-analysis.d.ts.map +1 -1
- package/dist/pipeline/source-ingestion.d.ts +3 -0
- package/dist/pipeline/source-ingestion.d.ts.map +1 -1
- package/dist/pipeline/structural-self-check.d.ts +3 -0
- package/dist/pipeline/structural-self-check.d.ts.map +1 -1
- package/dist/pipeline/system-config.d.ts +9 -0
- package/dist/pipeline/system-config.d.ts.map +1 -1
- package/dist/pipeline/tsconfig-paths.d.ts +14 -0
- package/dist/pipeline/tsconfig-paths.d.ts.map +1 -1
- package/dist/{pipeline-BuiItKT-.mjs → pipeline-BXY7Pf_D.mjs} +1322 -567
- package/dist/{pipeline-CD2qmEEn.cjs → pipeline-D7B1z0-1.cjs} +1363 -566
- package/dist/session/extraction-session.d.ts +21 -1
- package/dist/session/extraction-session.d.ts.map +1 -1
- package/dist/session/index.d.ts +2 -2
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/resolve-packages.d.ts.map +1 -1
- package/dist/session/singleton.d.ts +5 -1
- package/dist/session/singleton.d.ts.map +1 -1
- package/dist/session.cjs +131 -11
- package/dist/session.mjs +132 -13
- package/package.json +4 -4
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { AnimusCoreOptions, ExternalPackageOutcome } from '../pipeline/index';
|
|
2
2
|
export type SessionOptions = AnimusCoreOptions;
|
|
3
|
+
/** What the hosting bundler does, which the user does not configure. */
|
|
4
|
+
export interface SessionHost {
|
|
5
|
+
/** The bundler leaves an `import(expr)` it cannot read unbundled
|
|
6
|
+
* (Rollup, Vite, Turbopack), so the load reaches no analysed module.
|
|
7
|
+
* Omitted, it reaches the importer's directory, as a webpack context
|
|
8
|
+
* does. */
|
|
9
|
+
unbundledComputedImports?: boolean;
|
|
10
|
+
}
|
|
3
11
|
import type { SourceCorpus } from '../pipeline/index';
|
|
4
12
|
/** Default watcher debounce and the session's status-deadline ceiling.
|
|
5
13
|
* The watcher entry point defaults its debounce from this — one definition. */
|
|
@@ -11,6 +19,7 @@ export interface WatchChanges {
|
|
|
11
19
|
/** Bundler-agnostic extraction pipeline: system load, source ingestion,
|
|
12
20
|
* analysis, emission, and watch-cycle diffing. Carries no bundler types. */
|
|
13
21
|
export declare class ExtractionSession {
|
|
22
|
+
private readonly host;
|
|
14
23
|
/** Set by the adapter before any pipeline run. */
|
|
15
24
|
rootDir: string | null;
|
|
16
25
|
/** Serialized path aliases, harvested by the adapter from bundler config. */
|
|
@@ -33,6 +42,9 @@ export declare class ExtractionSession {
|
|
|
33
42
|
private externalFileOwners;
|
|
34
43
|
/** External package specifier → absolute source entry path. */
|
|
35
44
|
externalSourceEntries: Map<string, string>;
|
|
45
|
+
/** Specifier → its source entry's side effects, from the owning package's
|
|
46
|
+
* `sideEffects`; absent leaves the bundler's own classification. */
|
|
47
|
+
externalSourceSideEffects: Map<string, boolean>;
|
|
36
48
|
/** SourceId authority for this generation — roots realpath'd once per
|
|
37
49
|
* pipeline; aliases recorded while files exist so deletions resolve. */
|
|
38
50
|
private sourceIdentity;
|
|
@@ -67,6 +79,9 @@ export declare class ExtractionSession {
|
|
|
67
79
|
/** Configured external files that could not be read. Incremental passes
|
|
68
80
|
* re-collect nothing, so they replay these instead of passing strict. */
|
|
69
81
|
private ingestionFailureDiagnostics;
|
|
82
|
+
/** Whether the corpus being analyzed left a file out, whose renders the
|
|
83
|
+
* analysis cannot see. */
|
|
84
|
+
private skippedSources;
|
|
70
85
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
71
86
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
72
87
|
private lastPackageMap;
|
|
@@ -112,7 +127,10 @@ export declare class ExtractionSession {
|
|
|
112
127
|
private debouncePending;
|
|
113
128
|
private sessionStartHygieneDone;
|
|
114
129
|
private lcssTargets;
|
|
115
|
-
constructor(options: SessionOptions);
|
|
130
|
+
constructor(options: SessionOptions, host?: SessionHost);
|
|
131
|
+
/** Forgets that `relPath` could not be read once an incremental pass reads
|
|
132
|
+
* or deletes it, so its cost stops holding pruning off. */
|
|
133
|
+
private clearIngestionFailure;
|
|
116
134
|
get sessionDir(): string;
|
|
117
135
|
get verbose(): boolean;
|
|
118
136
|
private log;
|
|
@@ -128,6 +146,8 @@ export declare class ExtractionSession {
|
|
|
128
146
|
/** Component count of the last published analysis, null before the first —
|
|
129
147
|
* read by drivers instead of re-parsing the manifest JSON every cycle. */
|
|
130
148
|
lastComponentCount: number | null;
|
|
149
|
+
/** The loaded theme's token → variable map; null before the system loads. */
|
|
150
|
+
get variableMapJson(): string | null;
|
|
131
151
|
/** When superseded asset copies leave `assets/`: `'full-pipeline'` suits a
|
|
132
152
|
* driver serving the dir in place, `'every-cycle'` one republishing it. */
|
|
133
153
|
staleAssetPruning: 'full-pipeline' | 'every-cycle';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction-session.d.ts","sourceRoot":"","sources":["../../session/extraction-session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extraction-session.d.ts","sourceRoot":"","sources":["../../session/extraction-session.ts"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAE/C,wEAAwE;AACxE,MAAM,WAAW,WAAW;IAC1B;;;gBAGY;IACZ,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAGD,OAAO,KAAK,EAIV,YAAY,EAIb,MAAM,mBAAmB,CAAC;AAW3B;gFACgF;AAChF,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAc5C,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACpC;AAkCD;6EAC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O,CAAC,qBAAqB;CA0B9B;AAED;uEACuE;AACvE,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAC5B,IAAI,CAgBN"}
|
package/dist/session/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { ExtractionSession, pruneStaleAssets } from './extraction-session';
|
|
2
|
-
export type { SessionOptions, WatchChanges } from './extraction-session';
|
|
2
|
+
export type { SessionHost, SessionOptions, WatchChanges, } from './extraction-session';
|
|
3
3
|
export { checkLockLiveness, CLI_LOCK_HEARTBEAT_INTERVAL_MS, CLI_LOCK_STALE_AFTER_MS, collectSessionAssets, decodeCommitRecord, holdDirectoryClaim, isLockHolderAlive, lockRecordBytes, readCliLockRecord, verifyCommitRecord, } from './published-set';
|
|
4
4
|
export type { CliLockLiveness, CliLockRecord, CommitRecord, SessionAsset, } from './published-set';
|
|
5
5
|
export { analysisCommitPath, analysisInputsPath, analysisStatusPath, ANIMUS_ARTIFACT_DIR, ANIMUS_CSS_MODULE_ID, CLI_COMMIT_ARTIFACT, CLI_LOCK_ARTIFACT, MANIFEST_ARTIFACT, manifestPath, readJsonEnvelope, replacementEpochPath, SESSION_ASSETS_DIR, sessionArtifactDir, STYLES_ARTIFACT, stylesPath, SYSTEM_PROPS_ARTIFACT, systemPropsPath, TURBOPACK_SYSTEM_PROPS_ID, } from './session-paths';
|
|
6
6
|
export type { AnalysisCommit, AnalysisStatus, SessionEnvelope, } from './session-paths';
|
|
7
7
|
export { runSessionPipeline, startTurbopackWatcher, } from './turbopack-orchestrator';
|
|
8
8
|
export type { TurbopackWatcherHandle, TurbopackWatchOutcome, } from './turbopack-orchestrator';
|
|
9
|
-
export { engineApi, getAnalysisStartedPromise, getAnalyzedHashes, getManifestJson, getReplacementEpoch, getSessionArtifactDir, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedSystemProps, resetAnalysisStartedPromise, setAnalysisStartedPromise, setSharedEngine, } from './singleton';
|
|
9
|
+
export { engineApi, getAnalysisStartedPromise, getAnalyzedHashes, getManifestJson, getReplacementEpoch, getSessionArtifactDir, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedExternalSideEffects, getSharedSystemProps, resetAnalysisStartedPromise, setAnalysisStartedPromise, setSharedEngine, } from './singleton';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../session/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../session/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,YAAY,EACV,WAAW,EACX,cAAc,EACd,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,cAAc,EACd,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,SAAS,EACT,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EACrB,wBAAwB,EACxB,4BAA4B,EAC5B,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,EACzB,eAAe,GAChB,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-packages.d.ts","sourceRoot":"","sources":["../../session/resolve-packages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-packages.d.ts","sourceRoot":"","sources":["../../session/resolve-packages.ts"],"names":[],"mappings":"AAQA;2DAC2D;AAC3D,MAAM,WAAW,kBAAkB;IACjC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAuFD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EAAE,GACd,kBAAkB,CAsDpB"}
|
|
@@ -15,6 +15,10 @@ export declare function getSharedExternalDirs(): string[];
|
|
|
15
15
|
export declare function setSharedExternalDirs(dirs: string[]): void;
|
|
16
16
|
export declare function getSharedExternalEntries(): Map<string, string>;
|
|
17
17
|
export declare function setSharedExternalEntries(entries: Map<string, string>): void;
|
|
18
|
+
/** Specifier → its source entry's side effects, published with the shared
|
|
19
|
+
* entries; absent leaves the bundler's own classification. */
|
|
20
|
+
export declare function getSharedExternalSideEffects(): Map<string, boolean>;
|
|
21
|
+
export declare function setSharedExternalSideEffects(sideEffects: Map<string, boolean>): void;
|
|
18
22
|
/** Structural view of the target session, declared here rather than imported
|
|
19
23
|
* so the singleton never depends on the session module it serves. */
|
|
20
24
|
export interface WatchBatchTarget {
|
|
@@ -81,5 +85,5 @@ export declare function engineApi(): any;
|
|
|
81
85
|
* Every globalThis key this module owns except the engine-api override, which
|
|
82
86
|
* a per-test reset must not clear. Test harnesses clear exactly this list.
|
|
83
87
|
*/
|
|
84
|
-
export declare const SINGLETON_GLOBAL_KEYS: readonly ["__animus_manifest_json__", "__animus_analysis_started__", "__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_exclusive_session_owner__", "__animus_engine__", "__animus_v2_engine__", "__animus_v2_sent_sources__", "__animus_v2_drift_warned__"];
|
|
88
|
+
export declare const SINGLETON_GLOBAL_KEYS: readonly ["__animus_manifest_json__", "__animus_analysis_started__", "__animus_shared_css__", "__animus_shared_system_props__", "__animus_external_pkg_dirs__", "__animus_external_source_entries__", "__animus_external_side_effects__", "__animus_analyzed_hashes__", "__animus_replacement_epoch__", "__animus_watch_transaction__", "__animus_process_session_id__", "__animus_session_artifact_dir__", "__animus_owning_watch_session__", "__animus_exclusive_session_owner__", "__animus_engine__", "__animus_v2_engine__", "__animus_v2_sent_sources__", "__animus_v2_drift_warned__"];
|
|
85
89
|
//# sourceMappingURL=singleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../session/singleton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../session/singleton.ts"],"names":[],"mappings":"AAoEA,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAEhE;AAED,wBA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
const require_pipeline = require("./pipeline-
|
|
2
|
+
const require_pipeline = require("./pipeline-D7B1z0-1.cjs");
|
|
3
3
|
let crypto = require("crypto");
|
|
4
4
|
let fs = require("fs");
|
|
5
5
|
let path = require("path");
|
|
@@ -258,6 +258,68 @@ function collectSessionAssets(sessionDir) {
|
|
|
258
258
|
}
|
|
259
259
|
//#endregion
|
|
260
260
|
//#region session/resolve-packages.ts
|
|
261
|
+
/** An exports target under the `import` condition, then `default`, as the
|
|
262
|
+
* system loader reads it; an array offers its targets in order. */
|
|
263
|
+
function importTarget(value) {
|
|
264
|
+
if (require_pipeline.isJsonString(value)) return value;
|
|
265
|
+
if (Array.isArray(value)) {
|
|
266
|
+
for (const entry of value) {
|
|
267
|
+
const target = importTarget(entry);
|
|
268
|
+
if (target !== null) return target;
|
|
269
|
+
}
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
if (!require_pipeline.isJsonBlock(value)) return null;
|
|
273
|
+
return importTarget(value.import) ?? importTarget(value.default);
|
|
274
|
+
}
|
|
275
|
+
/** The exports entry for `subpath`: an exact key answers alone; otherwise
|
|
276
|
+
* the pattern with the longest prefix, then the longest suffix, wins. */
|
|
277
|
+
function exportsTarget(exports, subpath) {
|
|
278
|
+
const map = require_pipeline.isJsonBlock(exports) && Object.keys(exports).some((k) => k.startsWith(".")) ? exports : { ".": exports };
|
|
279
|
+
if (subpath in map) return importTarget(map[subpath]);
|
|
280
|
+
let best = null;
|
|
281
|
+
for (const [pattern, value] of Object.entries(map)) {
|
|
282
|
+
const star = pattern.indexOf("*");
|
|
283
|
+
if (star === -1 || pattern.indexOf("*", star + 1) !== -1) continue;
|
|
284
|
+
const prefix = pattern.slice(0, star);
|
|
285
|
+
const suffix = pattern.slice(star + 1);
|
|
286
|
+
if (!subpath.startsWith(prefix) || !subpath.endsWith(suffix) || subpath.length < prefix.length + suffix.length) continue;
|
|
287
|
+
if (!best || prefix.length > best.prefix.length || prefix.length === best.prefix.length && suffix.length > best.suffix.length) best = {
|
|
288
|
+
prefix,
|
|
289
|
+
suffix,
|
|
290
|
+
value
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
if (!best) return null;
|
|
294
|
+
const matched = subpath.slice(best.prefix.length, subpath.length - best.suffix.length);
|
|
295
|
+
return importTarget(best.value)?.replaceAll("*", matched) ?? null;
|
|
296
|
+
}
|
|
297
|
+
/** The entry an ES import of `name` resolves to through the package's
|
|
298
|
+
* `exports`, under the `import` condition, then `default`: what the Vite
|
|
299
|
+
* host and the system loader resolve. Null without an `exports` field, or
|
|
300
|
+
* when no target exists. */
|
|
301
|
+
function resolveImportEntry(rootDir, name) {
|
|
302
|
+
const packageName = name.split("/").slice(0, name.startsWith("@") ? 2 : 1).join("/");
|
|
303
|
+
const subpath = `.${name.slice(packageName.length)}`;
|
|
304
|
+
for (let dir = rootDir;; dir = (0, path.dirname)(dir)) {
|
|
305
|
+
const manifest = (0, path.join)(dir, "node_modules", packageName, "package.json");
|
|
306
|
+
if ((0, fs.existsSync)(manifest)) {
|
|
307
|
+
let exports;
|
|
308
|
+
try {
|
|
309
|
+
const parsed = require_pipeline.parseInternalWire((0, fs.readFileSync)(manifest, "utf-8"), `${manifest} (a package manifest)`);
|
|
310
|
+
exports = require_pipeline.isJsonBlock(parsed) ? parsed.exports : void 0;
|
|
311
|
+
} catch {
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
if (exports === void 0 || exports === null) return null;
|
|
315
|
+
const target = exportsTarget(exports, subpath);
|
|
316
|
+
if (target === null) return null;
|
|
317
|
+
const entryPath = (0, path.resolve)((0, path.dirname)(manifest), target);
|
|
318
|
+
return (0, fs.existsSync)(entryPath) ? (0, fs.realpathSync)(entryPath) : null;
|
|
319
|
+
}
|
|
320
|
+
if (dir === (0, path.dirname)(dir)) return null;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
261
323
|
function resolvePackagesByName(rootDir, names) {
|
|
262
324
|
if (names.length === 0) return {};
|
|
263
325
|
const nameSet = new Set(names);
|
|
@@ -285,6 +347,11 @@ function resolvePackagesByName(rootDir, names) {
|
|
|
285
347
|
} catch {}
|
|
286
348
|
for (const name of nameSet) {
|
|
287
349
|
if (resolved.has(name)) continue;
|
|
350
|
+
const importEntry = resolveImportEntry(rootDir, name);
|
|
351
|
+
if (importEntry !== null) {
|
|
352
|
+
packageMap[name] = (0, path.relative)(rootDir, importEntry);
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
288
355
|
try {
|
|
289
356
|
const entryPath = require.resolve(name, { paths: [rootDir] });
|
|
290
357
|
packageMap[name] = (0, path.relative)(rootDir, entryPath);
|
|
@@ -304,6 +371,7 @@ const SHARED_CSS_KEY = "__animus_shared_css__";
|
|
|
304
371
|
const SHARED_SYSTEM_PROPS_KEY = "__animus_shared_system_props__";
|
|
305
372
|
const SHARED_EXTERNAL_DIRS_KEY = "__animus_external_pkg_dirs__";
|
|
306
373
|
const SHARED_EXTERNAL_ENTRIES_KEY = "__animus_external_source_entries__";
|
|
374
|
+
const SHARED_EXTERNAL_SIDE_EFFECTS_KEY = "__animus_external_side_effects__";
|
|
307
375
|
const ANALYZED_HASHES_KEY = "__animus_analyzed_hashes__";
|
|
308
376
|
const REPLACEMENT_EPOCH_KEY = "__animus_replacement_epoch__";
|
|
309
377
|
const WATCH_TRANSACTION_KEY = "__animus_watch_transaction__";
|
|
@@ -369,6 +437,14 @@ function getSharedExternalEntries() {
|
|
|
369
437
|
function setSharedExternalEntries(entries) {
|
|
370
438
|
singletonStore[SHARED_EXTERNAL_ENTRIES_KEY] = entries;
|
|
371
439
|
}
|
|
440
|
+
/** Specifier → its source entry's side effects, published with the shared
|
|
441
|
+
* entries; absent leaves the bundler's own classification. */
|
|
442
|
+
function getSharedExternalSideEffects() {
|
|
443
|
+
return singletonStore[SHARED_EXTERNAL_SIDE_EFFECTS_KEY] || /* @__PURE__ */ new Map();
|
|
444
|
+
}
|
|
445
|
+
function setSharedExternalSideEffects(sideEffects) {
|
|
446
|
+
singletonStore[SHARED_EXTERNAL_SIDE_EFFECTS_KEY] = sideEffects;
|
|
447
|
+
}
|
|
372
448
|
function globalSlot(key) {
|
|
373
449
|
return {
|
|
374
450
|
get: () => singletonStore[key] ?? null,
|
|
@@ -554,6 +630,7 @@ function isDiskNumber(value) {
|
|
|
554
630
|
/** Bundler-agnostic extraction pipeline: system load, source ingestion,
|
|
555
631
|
* analysis, emission, and watch-cycle diffing. Carries no bundler types. */
|
|
556
632
|
var ExtractionSession = class {
|
|
633
|
+
host;
|
|
557
634
|
/** Set by the adapter before any pipeline run. */
|
|
558
635
|
rootDir = null;
|
|
559
636
|
/** Serialized path aliases, harvested by the adapter from bundler config. */
|
|
@@ -576,6 +653,9 @@ var ExtractionSession = class {
|
|
|
576
653
|
externalFileOwners = {};
|
|
577
654
|
/** External package specifier → absolute source entry path. */
|
|
578
655
|
externalSourceEntries = /* @__PURE__ */ new Map();
|
|
656
|
+
/** Specifier → its source entry's side effects, from the owning package's
|
|
657
|
+
* `sideEffects`; absent leaves the bundler's own classification. */
|
|
658
|
+
externalSourceSideEffects = /* @__PURE__ */ new Map();
|
|
579
659
|
/** SourceId authority for this generation — roots realpath'd once per
|
|
580
660
|
* pipeline; aliases recorded while files exist so deletions resolve. */
|
|
581
661
|
sourceIdentity = null;
|
|
@@ -610,6 +690,9 @@ var ExtractionSession = class {
|
|
|
610
690
|
/** Configured external files that could not be read. Incremental passes
|
|
611
691
|
* re-collect nothing, so they replay these instead of passing strict. */
|
|
612
692
|
ingestionFailureDiagnostics = [];
|
|
693
|
+
/** Whether the corpus being analyzed left a file out, whose renders the
|
|
694
|
+
* analysis cannot see. */
|
|
695
|
+
skippedSources = [];
|
|
613
696
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
614
697
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
615
698
|
lastPackageMap = {};
|
|
@@ -664,10 +747,16 @@ var ExtractionSession = class {
|
|
|
664
747
|
debouncePending = /* @__PURE__ */ new Map();
|
|
665
748
|
sessionStartHygieneDone = false;
|
|
666
749
|
lcssTargets = null;
|
|
667
|
-
constructor(options) {
|
|
750
|
+
constructor(options, host = {}) {
|
|
751
|
+
this.host = host;
|
|
668
752
|
this.options = options;
|
|
669
753
|
this.staticCssJson = require_pipeline.serializeStaticCss(options.staticCss);
|
|
670
754
|
}
|
|
755
|
+
/** Forgets that `relPath` could not be read once an incremental pass reads
|
|
756
|
+
* or deletes it, so its cost stops holding pruning off. */
|
|
757
|
+
clearIngestionFailure(relPath) {
|
|
758
|
+
this.ingestionFailureDiagnostics = this.ingestionFailureDiagnostics.filter((diagnostic) => diagnostic.file !== relPath);
|
|
759
|
+
}
|
|
671
760
|
get sessionDir() {
|
|
672
761
|
return sessionArtifactDir(this.rootDir, this.sessionId);
|
|
673
762
|
}
|
|
@@ -695,6 +784,10 @@ var ExtractionSession = class {
|
|
|
695
784
|
/** Component count of the last published analysis, null before the first —
|
|
696
785
|
* read by drivers instead of re-parsing the manifest JSON every cycle. */
|
|
697
786
|
lastComponentCount = null;
|
|
787
|
+
/** The loaded theme's token → variable map; null before the system loads. */
|
|
788
|
+
get variableMapJson() {
|
|
789
|
+
return this.system?.variableMapJson ?? null;
|
|
790
|
+
}
|
|
698
791
|
/** When superseded asset copies leave `assets/`: `'full-pipeline'` suits a
|
|
699
792
|
* driver serving the dir in place, `'every-cycle'` one republishing it. */
|
|
700
793
|
staleAssetPruning = "full-pipeline";
|
|
@@ -830,6 +923,7 @@ var ExtractionSession = class {
|
|
|
830
923
|
owningRoot = resolved.owningRoot;
|
|
831
924
|
}
|
|
832
925
|
recordPrior(key);
|
|
926
|
+
this.clearIngestionFailure(key);
|
|
833
927
|
if (this.fileCache.delete(key)) {
|
|
834
928
|
removedAny = true;
|
|
835
929
|
if (owningRoot) {
|
|
@@ -870,6 +964,7 @@ var ExtractionSession = class {
|
|
|
870
964
|
} catch {
|
|
871
965
|
continue;
|
|
872
966
|
}
|
|
967
|
+
this.clearIngestionFailure(relPath);
|
|
873
968
|
const rawHash = require_pipeline.contentHash(source);
|
|
874
969
|
const cached = this.fileCache.get(relPath);
|
|
875
970
|
const hash = rawHash;
|
|
@@ -917,6 +1012,7 @@ var ExtractionSession = class {
|
|
|
917
1012
|
externalFileOwners: this.externalFileOwners
|
|
918
1013
|
});
|
|
919
1014
|
this.throwOnAbortedParse(ingested);
|
|
1015
|
+
this.skippedSources = ingested.skippedOriginals ?? [];
|
|
920
1016
|
if (this.systemReloadOwed) {
|
|
921
1017
|
this.log("system reload: publishing the reload a parse hold deferred");
|
|
922
1018
|
this.resetForHmr();
|
|
@@ -1004,7 +1100,8 @@ var ExtractionSession = class {
|
|
|
1004
1100
|
this.system = require_pipeline.loadSystemConfig(engineApi, {
|
|
1005
1101
|
systemPath: resolvedSystemPath,
|
|
1006
1102
|
rootDir,
|
|
1007
|
-
prefix: this.options.prefix
|
|
1103
|
+
prefix: this.options.prefix,
|
|
1104
|
+
prefixContextualVars: this.options.prefixContextualVars
|
|
1008
1105
|
});
|
|
1009
1106
|
this.assetCopyCache.clear();
|
|
1010
1107
|
this.assetDependencyPaths.clear();
|
|
@@ -1031,22 +1128,27 @@ var ExtractionSession = class {
|
|
|
1031
1128
|
bt.fileDiscovery = this.elapsed(t);
|
|
1032
1129
|
t = this.now();
|
|
1033
1130
|
const rawEntries = [];
|
|
1131
|
+
const ingestionFailures = [];
|
|
1034
1132
|
for (const filePath of files) {
|
|
1035
|
-
const source = (0, fs.readFileSync)(filePath, "utf-8");
|
|
1036
1133
|
const relPath = (0, path.relative)(rootDir, filePath);
|
|
1037
|
-
|
|
1134
|
+
let source;
|
|
1135
|
+
try {
|
|
1136
|
+
source = (0, fs.readFileSync)(filePath, "utf-8");
|
|
1137
|
+
} catch (err) {
|
|
1138
|
+
if (!require_pipeline.isDeletedSource(err)) ingestionFailures.push(require_pipeline.unreadableSourceDiagnostic(relPath, err));
|
|
1139
|
+
continue;
|
|
1140
|
+
}
|
|
1038
1141
|
rawEntries.push({
|
|
1039
1142
|
path: relPath,
|
|
1040
1143
|
source,
|
|
1041
|
-
hash
|
|
1144
|
+
hash: require_pipeline.contentHash(source)
|
|
1042
1145
|
});
|
|
1043
1146
|
}
|
|
1044
1147
|
bt.fileRead = this.elapsed(t);
|
|
1045
1148
|
t = this.now();
|
|
1046
|
-
const packageNames = require_pipeline.extractSystemFilePackages(resolvedSystemPath);
|
|
1149
|
+
const packageNames = require_pipeline.extractSystemFilePackages(resolvedSystemPath, require_pipeline.engineImportParser(engineApi()));
|
|
1047
1150
|
const preResolved = resolvePackagesByName(rootDir, packageNames);
|
|
1048
1151
|
const rawExternalFiles = /* @__PURE__ */ new Map();
|
|
1049
|
-
const ingestionFailures = [];
|
|
1050
1152
|
const collected = await require_pipeline.collectExternalPackageSources({
|
|
1051
1153
|
specifiers: packageNames,
|
|
1052
1154
|
resolveSpecifier: (name) => preResolved[name] ? (0, path.resolve)(rootDir, preResolved[name]) : null,
|
|
@@ -1056,7 +1158,9 @@ var ExtractionSession = class {
|
|
|
1056
1158
|
onSourceRead: (source, _relPath, absPath) => {
|
|
1057
1159
|
rawExternalFiles.set(absPath, require_pipeline.contentHash(source));
|
|
1058
1160
|
},
|
|
1059
|
-
onUnreadable: (relPath, err) =>
|
|
1161
|
+
onUnreadable: (relPath, err) => {
|
|
1162
|
+
if (!require_pipeline.isDeletedSource(err)) ingestionFailures.push(require_pipeline.unreadableSourceDiagnostic(relPath, err));
|
|
1163
|
+
},
|
|
1060
1164
|
onPackageResolved: (_specifier, packageDir) => {
|
|
1061
1165
|
if (!this.onExternalRootResolved) return;
|
|
1062
1166
|
if (!this.sharesProjectVolume(rootDir, packageDir)) return;
|
|
@@ -1069,7 +1173,7 @@ var ExtractionSession = class {
|
|
|
1069
1173
|
});
|
|
1070
1174
|
this.lastExternalOutcomes = collected.outcomes;
|
|
1071
1175
|
this.ingestionFailureDiagnostics = ingestionFailures;
|
|
1072
|
-
|
|
1176
|
+
require_pipeline.surfaceManifestDiagnostics({ diagnostics: require_pipeline.noKitFilesDiagnostics(collected.outcomes) }, (message) => this.warn(message));
|
|
1073
1177
|
const unresolvableMessage = require_pipeline.unresolvableIncludesMessage(collected.outcomes);
|
|
1074
1178
|
if (unresolvableMessage !== null) {
|
|
1075
1179
|
if (this.options.strict) throw new Error(unresolvableMessage);
|
|
@@ -1128,6 +1232,7 @@ var ExtractionSession = class {
|
|
|
1128
1232
|
this.externalDirOwners = require_pipeline.firstOwners(admitted.dirOwnerSets);
|
|
1129
1233
|
this.externalFileOwners = admitted.fileOwners;
|
|
1130
1234
|
this.externalSourceEntries = admitted.sourceEntries;
|
|
1235
|
+
this.externalSourceSideEffects = admitted.sourceEntrySideEffects;
|
|
1131
1236
|
for (const entry of admitted.entries) {
|
|
1132
1237
|
const hash = require_pipeline.contentHash(entry.source);
|
|
1133
1238
|
rawEntries.push({
|
|
@@ -1143,6 +1248,7 @@ var ExtractionSession = class {
|
|
|
1143
1248
|
try {
|
|
1144
1249
|
accepted = await this.corpus.prepare(rawEntries);
|
|
1145
1250
|
this.throwOnAbortedParse(accepted);
|
|
1251
|
+
this.skippedSources = accepted.skippedOriginals ?? [];
|
|
1146
1252
|
} catch (err) {
|
|
1147
1253
|
this.debouncePending.clear();
|
|
1148
1254
|
this.writeAnalysisStatus("failed", pending, String(err));
|
|
@@ -1155,6 +1261,7 @@ var ExtractionSession = class {
|
|
|
1155
1261
|
this.publishSourceIngestion(accepted);
|
|
1156
1262
|
setSharedExternalDirs(admitted.packageDirs);
|
|
1157
1263
|
setSharedExternalEntries(admitted.sourceEntries);
|
|
1264
|
+
setSharedExternalSideEffects(admitted.sourceEntrySideEffects);
|
|
1158
1265
|
this.onExternalRootsCommitted?.(this.externalWatchRoots);
|
|
1159
1266
|
setOwningWatchSession(this);
|
|
1160
1267
|
} catch (err) {
|
|
@@ -1175,6 +1282,7 @@ var ExtractionSession = class {
|
|
|
1175
1282
|
externalDirOwners: this.externalDirOwners,
|
|
1176
1283
|
externalFileOwners: this.externalFileOwners,
|
|
1177
1284
|
externalSourceEntries: this.externalSourceEntries,
|
|
1285
|
+
externalSourceSideEffects: this.externalSourceSideEffects,
|
|
1178
1286
|
externalPackageDirs: this.externalPackageDirs,
|
|
1179
1287
|
ingestionFailureDiagnostics: this.ingestionFailureDiagnostics
|
|
1180
1288
|
};
|
|
@@ -1341,7 +1449,12 @@ var ExtractionSession = class {
|
|
|
1341
1449
|
pathAliasesJson: this.pathAliasesJson,
|
|
1342
1450
|
staticCssJson: this.staticCssJson,
|
|
1343
1451
|
externalDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir)),
|
|
1344
|
-
devMode: this.engineDevMode(devMode)
|
|
1452
|
+
devMode: this.engineDevMode(devMode),
|
|
1453
|
+
analysisContext: {
|
|
1454
|
+
skippedSources: [...this.skippedSources, ...this.ingestionFailureDiagnostics.map((d) => d.file)].map((file) => (0, path.isAbsolute)(file) ? (0, path.relative)(this.rootDir, file) : file),
|
|
1455
|
+
unbundledComputedImports: this.host.unbundledComputedImports,
|
|
1456
|
+
packageDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir))
|
|
1457
|
+
}
|
|
1345
1458
|
};
|
|
1346
1459
|
this.writeAnalysisStatus("analyzing", pending);
|
|
1347
1460
|
const result = require_pipeline.runProjectAnalysis(engineApi, {
|
|
@@ -1395,6 +1508,12 @@ var ExtractionSession = class {
|
|
|
1395
1508
|
warn: (message) => this.warn(message),
|
|
1396
1509
|
prefix: `[${this.driverLabel}]`
|
|
1397
1510
|
});
|
|
1511
|
+
require_pipeline.reportSurvivingAssetPlaceholders(require_pipeline.generatedModuleCode(manifest), {
|
|
1512
|
+
strict: this.options.strict,
|
|
1513
|
+
warn: (message) => this.warn(message),
|
|
1514
|
+
prefix: `[${this.driverLabel}]`,
|
|
1515
|
+
surface: "generated runtime modules"
|
|
1516
|
+
});
|
|
1398
1517
|
setSharedCss(fullCss);
|
|
1399
1518
|
const systemPropsContent = require_pipeline.buildSystemPropsModule({
|
|
1400
1519
|
systemPropMapJson: JSON.stringify(manifest?.system_prop_map ?? {}),
|
|
@@ -2014,6 +2133,7 @@ exports.getSessionArtifactDir = getSessionArtifactDir;
|
|
|
2014
2133
|
exports.getSharedCss = getSharedCss;
|
|
2015
2134
|
exports.getSharedExternalDirs = getSharedExternalDirs;
|
|
2016
2135
|
exports.getSharedExternalEntries = getSharedExternalEntries;
|
|
2136
|
+
exports.getSharedExternalSideEffects = getSharedExternalSideEffects;
|
|
2017
2137
|
exports.getSharedSystemProps = getSharedSystemProps;
|
|
2018
2138
|
exports.holdDirectoryClaim = holdDirectoryClaim;
|
|
2019
2139
|
exports.isLockHolderAlive = isLockHolderAlive;
|