@animus-ui/extract 0.1.19 → 0.1.20
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 +6 -0
- package/dist/index.cjs +3 -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/asset-placeholders.d.ts +14 -0
- package/dist/pipeline/asset-placeholders.d.ts.map +1 -1
- package/dist/pipeline/core-options.d.ts +4 -0
- package/dist/pipeline/core-options.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 +2 -2
- package/dist/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/manifest-diagnostics.d.ts +17 -3
- package/dist/pipeline/manifest-diagnostics.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 +5 -4
- package/dist/pipeline/property-diagnostics.d.ts.map +1 -1
- package/dist/pipeline/property-names.d.ts +42 -0
- package/dist/pipeline/property-names.d.ts.map +1 -0
- package/dist/pipeline/property-registrations.d.ts +4 -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/system-config.d.ts +9 -0
- package/dist/pipeline/system-config.d.ts.map +1 -1
- package/dist/{pipeline-BuiItKT-.mjs → pipeline-6wmD00rr.mjs} +697 -260
- package/dist/{pipeline-CD2qmEEn.cjs → pipeline-A54wEQEg.cjs} +707 -258
- package/dist/session/extraction-session.d.ts +16 -1
- package/dist/session/extraction-session.d.ts.map +1 -1
- package/dist/session/index.d.ts +1 -1
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session.cjs +42 -9
- package/dist/session.mjs +43 -10
- 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. */
|
|
@@ -67,6 +76,9 @@ export declare class ExtractionSession {
|
|
|
67
76
|
/** Configured external files that could not be read. Incremental passes
|
|
68
77
|
* re-collect nothing, so they replay these instead of passing strict. */
|
|
69
78
|
private ingestionFailureDiagnostics;
|
|
79
|
+
/** Whether the corpus being analyzed left a file out, whose renders the
|
|
80
|
+
* analysis cannot see. */
|
|
81
|
+
private skippedSources;
|
|
70
82
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
71
83
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
72
84
|
private lastPackageMap;
|
|
@@ -112,7 +124,10 @@ export declare class ExtractionSession {
|
|
|
112
124
|
private debouncePending;
|
|
113
125
|
private sessionStartHygieneDone;
|
|
114
126
|
private lcssTargets;
|
|
115
|
-
constructor(options: SessionOptions);
|
|
127
|
+
constructor(options: SessionOptions, host?: SessionHost);
|
|
128
|
+
/** Forgets that `relPath` could not be read once an incremental pass reads
|
|
129
|
+
* or deletes it, so its cost stops holding pruning off. */
|
|
130
|
+
private clearIngestionFailure;
|
|
116
131
|
get sessionDir(): string;
|
|
117
132
|
get verbose(): boolean;
|
|
118
133
|
private log;
|
|
@@ -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":"AA0GA,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,CA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,MAAM,EACjB,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAC5B,IAAI,CAgBN"}
|
package/dist/session/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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';
|
|
@@ -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,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,EACzB,eAAe,GAChB,MAAM,aAAa,CAAC"}
|
package/dist/session.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_pipeline = require("./pipeline-
|
|
2
|
+
const require_pipeline = require("./pipeline-A54wEQEg.cjs");
|
|
3
3
|
let crypto = require("crypto");
|
|
4
4
|
let fs = require("fs");
|
|
5
5
|
let path = require("path");
|
|
@@ -554,6 +554,7 @@ function isDiskNumber(value) {
|
|
|
554
554
|
/** Bundler-agnostic extraction pipeline: system load, source ingestion,
|
|
555
555
|
* analysis, emission, and watch-cycle diffing. Carries no bundler types. */
|
|
556
556
|
var ExtractionSession = class {
|
|
557
|
+
host;
|
|
557
558
|
/** Set by the adapter before any pipeline run. */
|
|
558
559
|
rootDir = null;
|
|
559
560
|
/** Serialized path aliases, harvested by the adapter from bundler config. */
|
|
@@ -610,6 +611,9 @@ var ExtractionSession = class {
|
|
|
610
611
|
/** Configured external files that could not be read. Incremental passes
|
|
611
612
|
* re-collect nothing, so they replay these instead of passing strict. */
|
|
612
613
|
ingestionFailureDiagnostics = [];
|
|
614
|
+
/** Whether the corpus being analyzed left a file out, whose renders the
|
|
615
|
+
* analysis cannot see. */
|
|
616
|
+
skippedSources = [];
|
|
613
617
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
614
618
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
615
619
|
lastPackageMap = {};
|
|
@@ -664,10 +668,16 @@ var ExtractionSession = class {
|
|
|
664
668
|
debouncePending = /* @__PURE__ */ new Map();
|
|
665
669
|
sessionStartHygieneDone = false;
|
|
666
670
|
lcssTargets = null;
|
|
667
|
-
constructor(options) {
|
|
671
|
+
constructor(options, host = {}) {
|
|
672
|
+
this.host = host;
|
|
668
673
|
this.options = options;
|
|
669
674
|
this.staticCssJson = require_pipeline.serializeStaticCss(options.staticCss);
|
|
670
675
|
}
|
|
676
|
+
/** Forgets that `relPath` could not be read once an incremental pass reads
|
|
677
|
+
* or deletes it, so its cost stops holding pruning off. */
|
|
678
|
+
clearIngestionFailure(relPath) {
|
|
679
|
+
this.ingestionFailureDiagnostics = this.ingestionFailureDiagnostics.filter((diagnostic) => diagnostic.file !== relPath);
|
|
680
|
+
}
|
|
671
681
|
get sessionDir() {
|
|
672
682
|
return sessionArtifactDir(this.rootDir, this.sessionId);
|
|
673
683
|
}
|
|
@@ -830,6 +840,7 @@ var ExtractionSession = class {
|
|
|
830
840
|
owningRoot = resolved.owningRoot;
|
|
831
841
|
}
|
|
832
842
|
recordPrior(key);
|
|
843
|
+
this.clearIngestionFailure(key);
|
|
833
844
|
if (this.fileCache.delete(key)) {
|
|
834
845
|
removedAny = true;
|
|
835
846
|
if (owningRoot) {
|
|
@@ -870,6 +881,7 @@ var ExtractionSession = class {
|
|
|
870
881
|
} catch {
|
|
871
882
|
continue;
|
|
872
883
|
}
|
|
884
|
+
this.clearIngestionFailure(relPath);
|
|
873
885
|
const rawHash = require_pipeline.contentHash(source);
|
|
874
886
|
const cached = this.fileCache.get(relPath);
|
|
875
887
|
const hash = rawHash;
|
|
@@ -917,6 +929,7 @@ var ExtractionSession = class {
|
|
|
917
929
|
externalFileOwners: this.externalFileOwners
|
|
918
930
|
});
|
|
919
931
|
this.throwOnAbortedParse(ingested);
|
|
932
|
+
this.skippedSources = ingested.skippedOriginals ?? [];
|
|
920
933
|
if (this.systemReloadOwed) {
|
|
921
934
|
this.log("system reload: publishing the reload a parse hold deferred");
|
|
922
935
|
this.resetForHmr();
|
|
@@ -1004,7 +1017,8 @@ var ExtractionSession = class {
|
|
|
1004
1017
|
this.system = require_pipeline.loadSystemConfig(engineApi, {
|
|
1005
1018
|
systemPath: resolvedSystemPath,
|
|
1006
1019
|
rootDir,
|
|
1007
|
-
prefix: this.options.prefix
|
|
1020
|
+
prefix: this.options.prefix,
|
|
1021
|
+
prefixContextualVars: this.options.prefixContextualVars
|
|
1008
1022
|
});
|
|
1009
1023
|
this.assetCopyCache.clear();
|
|
1010
1024
|
this.assetDependencyPaths.clear();
|
|
@@ -1031,14 +1045,20 @@ var ExtractionSession = class {
|
|
|
1031
1045
|
bt.fileDiscovery = this.elapsed(t);
|
|
1032
1046
|
t = this.now();
|
|
1033
1047
|
const rawEntries = [];
|
|
1048
|
+
const ingestionFailures = [];
|
|
1034
1049
|
for (const filePath of files) {
|
|
1035
|
-
const source = (0, fs.readFileSync)(filePath, "utf-8");
|
|
1036
1050
|
const relPath = (0, path.relative)(rootDir, filePath);
|
|
1037
|
-
|
|
1051
|
+
let source;
|
|
1052
|
+
try {
|
|
1053
|
+
source = (0, fs.readFileSync)(filePath, "utf-8");
|
|
1054
|
+
} catch (err) {
|
|
1055
|
+
if (!require_pipeline.isDeletedSource(err)) ingestionFailures.push(require_pipeline.unreadableSourceDiagnostic(relPath, err));
|
|
1056
|
+
continue;
|
|
1057
|
+
}
|
|
1038
1058
|
rawEntries.push({
|
|
1039
1059
|
path: relPath,
|
|
1040
1060
|
source,
|
|
1041
|
-
hash
|
|
1061
|
+
hash: require_pipeline.contentHash(source)
|
|
1042
1062
|
});
|
|
1043
1063
|
}
|
|
1044
1064
|
bt.fileRead = this.elapsed(t);
|
|
@@ -1046,7 +1066,6 @@ var ExtractionSession = class {
|
|
|
1046
1066
|
const packageNames = require_pipeline.extractSystemFilePackages(resolvedSystemPath);
|
|
1047
1067
|
const preResolved = resolvePackagesByName(rootDir, packageNames);
|
|
1048
1068
|
const rawExternalFiles = /* @__PURE__ */ new Map();
|
|
1049
|
-
const ingestionFailures = [];
|
|
1050
1069
|
const collected = await require_pipeline.collectExternalPackageSources({
|
|
1051
1070
|
specifiers: packageNames,
|
|
1052
1071
|
resolveSpecifier: (name) => preResolved[name] ? (0, path.resolve)(rootDir, preResolved[name]) : null,
|
|
@@ -1056,7 +1075,9 @@ var ExtractionSession = class {
|
|
|
1056
1075
|
onSourceRead: (source, _relPath, absPath) => {
|
|
1057
1076
|
rawExternalFiles.set(absPath, require_pipeline.contentHash(source));
|
|
1058
1077
|
},
|
|
1059
|
-
onUnreadable: (relPath, err) =>
|
|
1078
|
+
onUnreadable: (relPath, err) => {
|
|
1079
|
+
if (!require_pipeline.isDeletedSource(err)) ingestionFailures.push(require_pipeline.unreadableSourceDiagnostic(relPath, err));
|
|
1080
|
+
},
|
|
1060
1081
|
onPackageResolved: (_specifier, packageDir) => {
|
|
1061
1082
|
if (!this.onExternalRootResolved) return;
|
|
1062
1083
|
if (!this.sharesProjectVolume(rootDir, packageDir)) return;
|
|
@@ -1143,6 +1164,7 @@ var ExtractionSession = class {
|
|
|
1143
1164
|
try {
|
|
1144
1165
|
accepted = await this.corpus.prepare(rawEntries);
|
|
1145
1166
|
this.throwOnAbortedParse(accepted);
|
|
1167
|
+
this.skippedSources = accepted.skippedOriginals ?? [];
|
|
1146
1168
|
} catch (err) {
|
|
1147
1169
|
this.debouncePending.clear();
|
|
1148
1170
|
this.writeAnalysisStatus("failed", pending, String(err));
|
|
@@ -1341,7 +1363,12 @@ var ExtractionSession = class {
|
|
|
1341
1363
|
pathAliasesJson: this.pathAliasesJson,
|
|
1342
1364
|
staticCssJson: this.staticCssJson,
|
|
1343
1365
|
externalDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir)),
|
|
1344
|
-
devMode: this.engineDevMode(devMode)
|
|
1366
|
+
devMode: this.engineDevMode(devMode),
|
|
1367
|
+
analysisContext: {
|
|
1368
|
+
skippedSources: [...this.skippedSources, ...this.ingestionFailureDiagnostics.map((d) => d.file)].map((file) => (0, path.isAbsolute)(file) ? (0, path.relative)(this.rootDir, file) : file),
|
|
1369
|
+
unbundledComputedImports: this.host.unbundledComputedImports,
|
|
1370
|
+
packageDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir))
|
|
1371
|
+
}
|
|
1345
1372
|
};
|
|
1346
1373
|
this.writeAnalysisStatus("analyzing", pending);
|
|
1347
1374
|
const result = require_pipeline.runProjectAnalysis(engineApi, {
|
|
@@ -1395,6 +1422,12 @@ var ExtractionSession = class {
|
|
|
1395
1422
|
warn: (message) => this.warn(message),
|
|
1396
1423
|
prefix: `[${this.driverLabel}]`
|
|
1397
1424
|
});
|
|
1425
|
+
require_pipeline.reportSurvivingAssetPlaceholders(require_pipeline.generatedModuleCode(manifest), {
|
|
1426
|
+
strict: this.options.strict,
|
|
1427
|
+
warn: (message) => this.warn(message),
|
|
1428
|
+
prefix: `[${this.driverLabel}]`,
|
|
1429
|
+
surface: "generated runtime modules"
|
|
1430
|
+
});
|
|
1398
1431
|
setSharedCss(fullCss);
|
|
1399
1432
|
const systemPropsContent = require_pipeline.buildSystemPropsModule({
|
|
1400
1433
|
systemPropMapJson: JSON.stringify(manifest?.system_prop_map ?? {}),
|
package/dist/session.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { A as substituteSheetAssets, B as unresolvableIncludesMessage, C as resolveAssetFile, D as generatedModuleCode, E as findSheetAssetSpecifiers, F as findPackageRoot, H as createSourceIdentity, I as firstOwners, K as discoverFiles, L as isExcludedPackageRelativePath, M as collectExternalPackageSources, N as excludeCollectedPackages, O as reportSurvivingAssetPlaceholders, Ot as assembleStylesheet, P as extractSystemFilePackages, S as enforceExternalTokenContracts, St as unreadableSourceDiagnostic, Tt as contentHash, U as isPathWithinRoot, V as walkPackageSources, W as sharesVolumeRoot, _ as runProjectAnalysis, a as assertNoErrorDiagnostics, at as createV2EngineApi, b as resolveLightningTargets, dt as DEFAULT_EXTENSIONS, et as createExcludeMatcher, f as serializeStaticCss, g as clearEngineCache, i as snapshotFilePlans, j as createSourceCorpus, jt as __require, lt as projectExternalFileOwners, nt as resolveVerbosity, r as hashReplacementPlans, s as buildSystemPropsModule, t as toWatchKeys, tt as resolveMode, u as loadSystemConfig, vt as isDeletedSource, y as postProcessCss, z as staleDistIncludesMessage } from "./pipeline-6wmD00rr.mjs";
|
|
2
2
|
import { randomUUID } from "crypto";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, watch, writeFileSync } from "fs";
|
|
4
|
-
import { basename, extname, join, relative, resolve } from "path";
|
|
4
|
+
import { basename, extname, isAbsolute, join, relative, resolve } from "path";
|
|
5
5
|
//#region session/session-paths.ts
|
|
6
6
|
/**
|
|
7
7
|
* Session artifact names, path derivations, and artifact shapes. Imports no
|
|
@@ -553,6 +553,7 @@ function isDiskNumber(value) {
|
|
|
553
553
|
/** Bundler-agnostic extraction pipeline: system load, source ingestion,
|
|
554
554
|
* analysis, emission, and watch-cycle diffing. Carries no bundler types. */
|
|
555
555
|
var ExtractionSession = class {
|
|
556
|
+
host;
|
|
556
557
|
/** Set by the adapter before any pipeline run. */
|
|
557
558
|
rootDir = null;
|
|
558
559
|
/** Serialized path aliases, harvested by the adapter from bundler config. */
|
|
@@ -609,6 +610,9 @@ var ExtractionSession = class {
|
|
|
609
610
|
/** Configured external files that could not be read. Incremental passes
|
|
610
611
|
* re-collect nothing, so they replay these instead of passing strict. */
|
|
611
612
|
ingestionFailureDiagnostics = [];
|
|
613
|
+
/** Whether the corpus being analyzed left a file out, whose renders the
|
|
614
|
+
* analysis cannot see. */
|
|
615
|
+
skippedSources = [];
|
|
612
616
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
613
617
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
614
618
|
lastPackageMap = {};
|
|
@@ -663,10 +667,16 @@ var ExtractionSession = class {
|
|
|
663
667
|
debouncePending = /* @__PURE__ */ new Map();
|
|
664
668
|
sessionStartHygieneDone = false;
|
|
665
669
|
lcssTargets = null;
|
|
666
|
-
constructor(options) {
|
|
670
|
+
constructor(options, host = {}) {
|
|
671
|
+
this.host = host;
|
|
667
672
|
this.options = options;
|
|
668
673
|
this.staticCssJson = serializeStaticCss(options.staticCss);
|
|
669
674
|
}
|
|
675
|
+
/** Forgets that `relPath` could not be read once an incremental pass reads
|
|
676
|
+
* or deletes it, so its cost stops holding pruning off. */
|
|
677
|
+
clearIngestionFailure(relPath) {
|
|
678
|
+
this.ingestionFailureDiagnostics = this.ingestionFailureDiagnostics.filter((diagnostic) => diagnostic.file !== relPath);
|
|
679
|
+
}
|
|
670
680
|
get sessionDir() {
|
|
671
681
|
return sessionArtifactDir(this.rootDir, this.sessionId);
|
|
672
682
|
}
|
|
@@ -829,6 +839,7 @@ var ExtractionSession = class {
|
|
|
829
839
|
owningRoot = resolved.owningRoot;
|
|
830
840
|
}
|
|
831
841
|
recordPrior(key);
|
|
842
|
+
this.clearIngestionFailure(key);
|
|
832
843
|
if (this.fileCache.delete(key)) {
|
|
833
844
|
removedAny = true;
|
|
834
845
|
if (owningRoot) {
|
|
@@ -869,6 +880,7 @@ var ExtractionSession = class {
|
|
|
869
880
|
} catch {
|
|
870
881
|
continue;
|
|
871
882
|
}
|
|
883
|
+
this.clearIngestionFailure(relPath);
|
|
872
884
|
const rawHash = contentHash(source);
|
|
873
885
|
const cached = this.fileCache.get(relPath);
|
|
874
886
|
const hash = rawHash;
|
|
@@ -916,6 +928,7 @@ var ExtractionSession = class {
|
|
|
916
928
|
externalFileOwners: this.externalFileOwners
|
|
917
929
|
});
|
|
918
930
|
this.throwOnAbortedParse(ingested);
|
|
931
|
+
this.skippedSources = ingested.skippedOriginals ?? [];
|
|
919
932
|
if (this.systemReloadOwed) {
|
|
920
933
|
this.log("system reload: publishing the reload a parse hold deferred");
|
|
921
934
|
this.resetForHmr();
|
|
@@ -1003,7 +1016,8 @@ var ExtractionSession = class {
|
|
|
1003
1016
|
this.system = loadSystemConfig(engineApi, {
|
|
1004
1017
|
systemPath: resolvedSystemPath,
|
|
1005
1018
|
rootDir,
|
|
1006
|
-
prefix: this.options.prefix
|
|
1019
|
+
prefix: this.options.prefix,
|
|
1020
|
+
prefixContextualVars: this.options.prefixContextualVars
|
|
1007
1021
|
});
|
|
1008
1022
|
this.assetCopyCache.clear();
|
|
1009
1023
|
this.assetDependencyPaths.clear();
|
|
@@ -1030,14 +1044,20 @@ var ExtractionSession = class {
|
|
|
1030
1044
|
bt.fileDiscovery = this.elapsed(t);
|
|
1031
1045
|
t = this.now();
|
|
1032
1046
|
const rawEntries = [];
|
|
1047
|
+
const ingestionFailures = [];
|
|
1033
1048
|
for (const filePath of files) {
|
|
1034
|
-
const source = readFileSync(filePath, "utf-8");
|
|
1035
1049
|
const relPath = relative(rootDir, filePath);
|
|
1036
|
-
|
|
1050
|
+
let source;
|
|
1051
|
+
try {
|
|
1052
|
+
source = readFileSync(filePath, "utf-8");
|
|
1053
|
+
} catch (err) {
|
|
1054
|
+
if (!isDeletedSource(err)) ingestionFailures.push(unreadableSourceDiagnostic(relPath, err));
|
|
1055
|
+
continue;
|
|
1056
|
+
}
|
|
1037
1057
|
rawEntries.push({
|
|
1038
1058
|
path: relPath,
|
|
1039
1059
|
source,
|
|
1040
|
-
hash
|
|
1060
|
+
hash: contentHash(source)
|
|
1041
1061
|
});
|
|
1042
1062
|
}
|
|
1043
1063
|
bt.fileRead = this.elapsed(t);
|
|
@@ -1045,7 +1065,6 @@ var ExtractionSession = class {
|
|
|
1045
1065
|
const packageNames = extractSystemFilePackages(resolvedSystemPath);
|
|
1046
1066
|
const preResolved = resolvePackagesByName(rootDir, packageNames);
|
|
1047
1067
|
const rawExternalFiles = /* @__PURE__ */ new Map();
|
|
1048
|
-
const ingestionFailures = [];
|
|
1049
1068
|
const collected = await collectExternalPackageSources({
|
|
1050
1069
|
specifiers: packageNames,
|
|
1051
1070
|
resolveSpecifier: (name) => preResolved[name] ? resolve(rootDir, preResolved[name]) : null,
|
|
@@ -1055,7 +1074,9 @@ var ExtractionSession = class {
|
|
|
1055
1074
|
onSourceRead: (source, _relPath, absPath) => {
|
|
1056
1075
|
rawExternalFiles.set(absPath, contentHash(source));
|
|
1057
1076
|
},
|
|
1058
|
-
onUnreadable: (relPath, err) =>
|
|
1077
|
+
onUnreadable: (relPath, err) => {
|
|
1078
|
+
if (!isDeletedSource(err)) ingestionFailures.push(unreadableSourceDiagnostic(relPath, err));
|
|
1079
|
+
},
|
|
1059
1080
|
onPackageResolved: (_specifier, packageDir) => {
|
|
1060
1081
|
if (!this.onExternalRootResolved) return;
|
|
1061
1082
|
if (!this.sharesProjectVolume(rootDir, packageDir)) return;
|
|
@@ -1142,6 +1163,7 @@ var ExtractionSession = class {
|
|
|
1142
1163
|
try {
|
|
1143
1164
|
accepted = await this.corpus.prepare(rawEntries);
|
|
1144
1165
|
this.throwOnAbortedParse(accepted);
|
|
1166
|
+
this.skippedSources = accepted.skippedOriginals ?? [];
|
|
1145
1167
|
} catch (err) {
|
|
1146
1168
|
this.debouncePending.clear();
|
|
1147
1169
|
this.writeAnalysisStatus("failed", pending, String(err));
|
|
@@ -1340,7 +1362,12 @@ var ExtractionSession = class {
|
|
|
1340
1362
|
pathAliasesJson: this.pathAliasesJson,
|
|
1341
1363
|
staticCssJson: this.staticCssJson,
|
|
1342
1364
|
externalDirs: this.externalPackageDirs.map((dir) => relative(this.rootDir, dir)),
|
|
1343
|
-
devMode: this.engineDevMode(devMode)
|
|
1365
|
+
devMode: this.engineDevMode(devMode),
|
|
1366
|
+
analysisContext: {
|
|
1367
|
+
skippedSources: [...this.skippedSources, ...this.ingestionFailureDiagnostics.map((d) => d.file)].map((file) => isAbsolute(file) ? relative(this.rootDir, file) : file),
|
|
1368
|
+
unbundledComputedImports: this.host.unbundledComputedImports,
|
|
1369
|
+
packageDirs: this.externalPackageDirs.map((dir) => relative(this.rootDir, dir))
|
|
1370
|
+
}
|
|
1344
1371
|
};
|
|
1345
1372
|
this.writeAnalysisStatus("analyzing", pending);
|
|
1346
1373
|
const result = runProjectAnalysis(engineApi, {
|
|
@@ -1394,6 +1421,12 @@ var ExtractionSession = class {
|
|
|
1394
1421
|
warn: (message) => this.warn(message),
|
|
1395
1422
|
prefix: `[${this.driverLabel}]`
|
|
1396
1423
|
});
|
|
1424
|
+
reportSurvivingAssetPlaceholders(generatedModuleCode(manifest), {
|
|
1425
|
+
strict: this.options.strict,
|
|
1426
|
+
warn: (message) => this.warn(message),
|
|
1427
|
+
prefix: `[${this.driverLabel}]`,
|
|
1428
|
+
surface: "generated runtime modules"
|
|
1429
|
+
});
|
|
1397
1430
|
setSharedCss(fullCss);
|
|
1398
1431
|
const systemPropsContent = buildSystemPropsModule({
|
|
1399
1432
|
systemPropMapJson: JSON.stringify(manifest?.system_prop_map ?? {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/extract",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "Animus static CSS extraction pipeline (Rust/NAPI)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animus",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"build:v2:debug": "cd crates/extract-v2 && bunx napi build --platform --no-js"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@animus-ui/properties": "0.1.
|
|
58
|
+
"@animus-ui/properties": "0.1.20",
|
|
59
59
|
"browserslist": "^4.28.8",
|
|
60
60
|
"lightningcss": "^1.33.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@animus-ui/assertions": "0.1.
|
|
64
|
-
"@animus-ui/system": "0.1.
|
|
63
|
+
"@animus-ui/assertions": "0.1.20",
|
|
64
|
+
"@animus-ui/system": "0.1.20",
|
|
65
65
|
"@mdx-js/mdx": "3.1.1",
|
|
66
66
|
"@napi-rs/cli": "^3.10.5",
|
|
67
67
|
"svelte": "5.57.0"
|