@animus-ui/extract 0.1.18 → 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/README.md +2 -2
- 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 +11 -0
- package/dist/index.cjs +6 -2
- 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 +33 -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/engine-retirement.d.ts.map +1 -1
- package/dist/pipeline/index.d.ts +3 -3
- package/dist/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/manifest-diagnostics.d.ts +41 -2
- package/dist/pipeline/manifest-diagnostics.d.ts.map +1 -1
- package/dist/pipeline/manifest-schema.d.ts +5 -2
- package/dist/pipeline/manifest-schema.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 +18 -0
- package/dist/pipeline/property-diagnostics.d.ts.map +1 -0
- 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 +11 -2
- package/dist/pipeline/property-registrations.d.ts.map +1 -1
- package/dist/pipeline/run-analysis.d.ts +18 -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 +12 -0
- package/dist/pipeline/system-config.d.ts.map +1 -1
- package/dist/{pipeline-Dr-I4Xhl.mjs → pipeline-6wmD00rr.mjs} +958 -263
- package/dist/{pipeline-OKnmnyFu.cjs → pipeline-A54wEQEg.cjs} +982 -263
- package/dist/session/extraction-session.d.ts +19 -3
- 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/timing.d.ts.map +1 -1
- package/dist/session.cjs +60 -22
- package/dist/session.mjs +61 -23
- package/index-v2.js +1 -1
- package/package.json +4 -4
- package/dist/pipeline/timing-waterfall.d.ts +0 -6
- package/dist/pipeline/timing-waterfall.d.ts.map +0 -1
|
@@ -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;
|
|
@@ -235,8 +250,9 @@ export declare class ExtractionSession {
|
|
|
235
250
|
/** Write one artifact write-then-rename, so a cross-process reader never
|
|
236
251
|
* sees a torn file; the tmp name carries the pid to keep writers apart. */
|
|
237
252
|
private writeSessionArtifact;
|
|
238
|
-
/** Copy each asset() specifier's bytes into `assets/`
|
|
239
|
-
* content-hashed name and substitute a url relative to
|
|
253
|
+
/** Copy each asset() specifier's bytes, from every sheet, into `assets/`
|
|
254
|
+
* under a content-hashed name and substitute a url relative to
|
|
255
|
+
* styles.css. */
|
|
240
256
|
private substituteAssetReferences;
|
|
241
257
|
private trackAssetDependency;
|
|
242
258
|
/** Resolve an asset specifier through the shared resolver, with one
|
|
@@ -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,CAAC;CACpC;AAkCD;6EAC6E;AAC7E,qBAAa,iBAAiB;IAoJ1B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAnJvB,kDAAkD;IAClD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,6EAA6E;IAC7E,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IAItC,OAAO,CAAC,cAAc,CASlB;IACJ,6DAA6D;IAC7D,oBAAoB,cAAqB;IACzC,OAAO,CAAC,mBAAmB,CAAqB;IAChD;+EAC2E;IAC3E,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1C;gFAC4E;IAC5E,qBAAqB,UAAS;IAE9B,4EAA4E;IAC5E,mBAAmB,EAAE,MAAM,EAAE,CAAM;IACnC,0EAA0E;IAC1E,OAAO,CAAC,iBAAiB,CAA8B;IACvD,4EAA4E;IAC5E,OAAO,CAAC,kBAAkB,CAA8B;IAC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AC,sBAAsB;IAyB9B;6EACyE;IACzE,OAAO,CAAC,iBAAiB;IAqBzB,2EAA2E;IAC3E,OAAO,CAAC,kBAAkB;IAiB1B;0EACsE;IACtE,OAAO,CAAC,qBAAqB;IA+B7B;yDACqD;IACrD,OAAO,CAAC,uBAAuB;IAoB/B;4EACwE;IACxE,OAAO,CAAC,cAAc,CAAuD;IAE7E;;;6EAGyE;IACzE,OAAO,CAAC,sBAAsB;IAqD9B;;;uEAGmE;IACnE,OAAO,CAAC,mBAAmB;IAa3B;0DACsD;IACtD,OAAO,CAAC,cAAc;IAetB;gFAC4E;IAC5E,OAAO,CAAC,kBAAkB;IAQ1B;+DAC2D;IAC3D,OAAO,CAAC,sBAAsB;IAqD9B;gFAC4E;IAC5E,OAAO,CAAC,oBAAoB;IAU5B;;sBAEkB;IAClB,OAAO,CAAC,yBAAyB;IAwEjC,OAAO,CAAC,oBAAoB;IAK5B;iEAC6D;IAC7D,OAAO,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,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../session/timing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../session/timing.ts"],"names":[],"mappings":"AAAA,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,CAyCN"}
|
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");
|
|
@@ -518,10 +518,6 @@ function logBuildTimings(bt, rustTiming, log, verbose) {
|
|
|
518
518
|
]) {
|
|
519
519
|
const sms = bt[sk] ?? 0;
|
|
520
520
|
log(` ${pad(sl, 15)}${String(sms).padStart(5)}ms`);
|
|
521
|
-
if (sk === "rustExtract" && rustTiming) for (const line of require_pipeline.formatRustTimingWaterfall(rustTiming, {
|
|
522
|
-
indent: " ",
|
|
523
|
-
labelWidth: 13
|
|
524
|
-
})) log(line);
|
|
525
521
|
}
|
|
526
522
|
}
|
|
527
523
|
log(` total ${String(bt.total).padStart(5)}ms`);
|
|
@@ -558,6 +554,7 @@ function isDiskNumber(value) {
|
|
|
558
554
|
/** Bundler-agnostic extraction pipeline: system load, source ingestion,
|
|
559
555
|
* analysis, emission, and watch-cycle diffing. Carries no bundler types. */
|
|
560
556
|
var ExtractionSession = class {
|
|
557
|
+
host;
|
|
561
558
|
/** Set by the adapter before any pipeline run. */
|
|
562
559
|
rootDir = null;
|
|
563
560
|
/** Serialized path aliases, harvested by the adapter from bundler config. */
|
|
@@ -614,6 +611,9 @@ var ExtractionSession = class {
|
|
|
614
611
|
/** Configured external files that could not be read. Incremental passes
|
|
615
612
|
* re-collect nothing, so they replay these instead of passing strict. */
|
|
616
613
|
ingestionFailureDiagnostics = [];
|
|
614
|
+
/** Whether the corpus being analyzed left a file out, whose renders the
|
|
615
|
+
* analysis cannot see. */
|
|
616
|
+
skippedSources = [];
|
|
617
617
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
618
618
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
619
619
|
lastPackageMap = {};
|
|
@@ -668,10 +668,16 @@ var ExtractionSession = class {
|
|
|
668
668
|
debouncePending = /* @__PURE__ */ new Map();
|
|
669
669
|
sessionStartHygieneDone = false;
|
|
670
670
|
lcssTargets = null;
|
|
671
|
-
constructor(options) {
|
|
671
|
+
constructor(options, host = {}) {
|
|
672
|
+
this.host = host;
|
|
672
673
|
this.options = options;
|
|
673
674
|
this.staticCssJson = require_pipeline.serializeStaticCss(options.staticCss);
|
|
674
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
|
+
}
|
|
675
681
|
get sessionDir() {
|
|
676
682
|
return sessionArtifactDir(this.rootDir, this.sessionId);
|
|
677
683
|
}
|
|
@@ -834,6 +840,7 @@ var ExtractionSession = class {
|
|
|
834
840
|
owningRoot = resolved.owningRoot;
|
|
835
841
|
}
|
|
836
842
|
recordPrior(key);
|
|
843
|
+
this.clearIngestionFailure(key);
|
|
837
844
|
if (this.fileCache.delete(key)) {
|
|
838
845
|
removedAny = true;
|
|
839
846
|
if (owningRoot) {
|
|
@@ -874,6 +881,7 @@ var ExtractionSession = class {
|
|
|
874
881
|
} catch {
|
|
875
882
|
continue;
|
|
876
883
|
}
|
|
884
|
+
this.clearIngestionFailure(relPath);
|
|
877
885
|
const rawHash = require_pipeline.contentHash(source);
|
|
878
886
|
const cached = this.fileCache.get(relPath);
|
|
879
887
|
const hash = rawHash;
|
|
@@ -921,6 +929,7 @@ var ExtractionSession = class {
|
|
|
921
929
|
externalFileOwners: this.externalFileOwners
|
|
922
930
|
});
|
|
923
931
|
this.throwOnAbortedParse(ingested);
|
|
932
|
+
this.skippedSources = ingested.skippedOriginals ?? [];
|
|
924
933
|
if (this.systemReloadOwed) {
|
|
925
934
|
this.log("system reload: publishing the reload a parse hold deferred");
|
|
926
935
|
this.resetForHmr();
|
|
@@ -1008,7 +1017,8 @@ var ExtractionSession = class {
|
|
|
1008
1017
|
this.system = require_pipeline.loadSystemConfig(engineApi, {
|
|
1009
1018
|
systemPath: resolvedSystemPath,
|
|
1010
1019
|
rootDir,
|
|
1011
|
-
prefix: this.options.prefix
|
|
1020
|
+
prefix: this.options.prefix,
|
|
1021
|
+
prefixContextualVars: this.options.prefixContextualVars
|
|
1012
1022
|
});
|
|
1013
1023
|
this.assetCopyCache.clear();
|
|
1014
1024
|
this.assetDependencyPaths.clear();
|
|
@@ -1035,14 +1045,20 @@ var ExtractionSession = class {
|
|
|
1035
1045
|
bt.fileDiscovery = this.elapsed(t);
|
|
1036
1046
|
t = this.now();
|
|
1037
1047
|
const rawEntries = [];
|
|
1048
|
+
const ingestionFailures = [];
|
|
1038
1049
|
for (const filePath of files) {
|
|
1039
|
-
const source = (0, fs.readFileSync)(filePath, "utf-8");
|
|
1040
1050
|
const relPath = (0, path.relative)(rootDir, filePath);
|
|
1041
|
-
|
|
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
|
+
}
|
|
1042
1058
|
rawEntries.push({
|
|
1043
1059
|
path: relPath,
|
|
1044
1060
|
source,
|
|
1045
|
-
hash
|
|
1061
|
+
hash: require_pipeline.contentHash(source)
|
|
1046
1062
|
});
|
|
1047
1063
|
}
|
|
1048
1064
|
bt.fileRead = this.elapsed(t);
|
|
@@ -1050,7 +1066,6 @@ var ExtractionSession = class {
|
|
|
1050
1066
|
const packageNames = require_pipeline.extractSystemFilePackages(resolvedSystemPath);
|
|
1051
1067
|
const preResolved = resolvePackagesByName(rootDir, packageNames);
|
|
1052
1068
|
const rawExternalFiles = /* @__PURE__ */ new Map();
|
|
1053
|
-
const ingestionFailures = [];
|
|
1054
1069
|
const collected = await require_pipeline.collectExternalPackageSources({
|
|
1055
1070
|
specifiers: packageNames,
|
|
1056
1071
|
resolveSpecifier: (name) => preResolved[name] ? (0, path.resolve)(rootDir, preResolved[name]) : null,
|
|
@@ -1060,7 +1075,9 @@ var ExtractionSession = class {
|
|
|
1060
1075
|
onSourceRead: (source, _relPath, absPath) => {
|
|
1061
1076
|
rawExternalFiles.set(absPath, require_pipeline.contentHash(source));
|
|
1062
1077
|
},
|
|
1063
|
-
onUnreadable: (relPath, err) =>
|
|
1078
|
+
onUnreadable: (relPath, err) => {
|
|
1079
|
+
if (!require_pipeline.isDeletedSource(err)) ingestionFailures.push(require_pipeline.unreadableSourceDiagnostic(relPath, err));
|
|
1080
|
+
},
|
|
1064
1081
|
onPackageResolved: (_specifier, packageDir) => {
|
|
1065
1082
|
if (!this.onExternalRootResolved) return;
|
|
1066
1083
|
if (!this.sharesProjectVolume(rootDir, packageDir)) return;
|
|
@@ -1147,6 +1164,7 @@ var ExtractionSession = class {
|
|
|
1147
1164
|
try {
|
|
1148
1165
|
accepted = await this.corpus.prepare(rawEntries);
|
|
1149
1166
|
this.throwOnAbortedParse(accepted);
|
|
1167
|
+
this.skippedSources = accepted.skippedOriginals ?? [];
|
|
1150
1168
|
} catch (err) {
|
|
1151
1169
|
this.debouncePending.clear();
|
|
1152
1170
|
this.writeAnalysisStatus("failed", pending, String(err));
|
|
@@ -1345,12 +1363,18 @@ var ExtractionSession = class {
|
|
|
1345
1363
|
pathAliasesJson: this.pathAliasesJson,
|
|
1346
1364
|
staticCssJson: this.staticCssJson,
|
|
1347
1365
|
externalDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir)),
|
|
1348
|
-
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
|
+
}
|
|
1349
1372
|
};
|
|
1350
1373
|
this.writeAnalysisStatus("analyzing", pending);
|
|
1351
1374
|
const result = require_pipeline.runProjectAnalysis(engineApi, {
|
|
1352
1375
|
...analysisOptions,
|
|
1353
1376
|
warn: (message) => this.warn(message),
|
|
1377
|
+
info: (message) => this.log(message),
|
|
1354
1378
|
strict: this.options.strict,
|
|
1355
1379
|
extraDiagnostics: this.ingestionFailureDiagnostics
|
|
1356
1380
|
});
|
|
@@ -1373,12 +1397,14 @@ var ExtractionSession = class {
|
|
|
1373
1397
|
bt.analysis = (bt.jsonSerialize ?? 0) + (bt.rustExtract ?? 0) + (bt.jsonParse ?? 0);
|
|
1374
1398
|
if (manifest?.report) this.log(`Extracted ${manifest.report.components_extracted ?? "?"}/${manifest.report.components_total ?? "?"} components (${bt.analysis}ms)`);
|
|
1375
1399
|
}
|
|
1376
|
-
const
|
|
1400
|
+
const sheets = this.substituteAssetReferences({
|
|
1401
|
+
variableCss: system.variableCss,
|
|
1402
|
+
globalCss: result.globalCss,
|
|
1403
|
+
componentCss: result.componentCss
|
|
1404
|
+
}, !devMode || this.staleAssetPruning === "every-cycle");
|
|
1377
1405
|
const { declaration, variables, body } = require_pipeline.assembleStylesheet({
|
|
1378
1406
|
layers: this.options.layers,
|
|
1379
|
-
|
|
1380
|
-
globalCss,
|
|
1381
|
-
componentCss: result.componentCss,
|
|
1407
|
+
...sheets,
|
|
1382
1408
|
split: true
|
|
1383
1409
|
});
|
|
1384
1410
|
if (this.lcssTargets === null) this.lcssTargets = require_pipeline.resolveLightningTargets(this.options.targets, this.rootDir);
|
|
@@ -1391,6 +1417,17 @@ var ExtractionSession = class {
|
|
|
1391
1417
|
warnFn: (msg) => this.warn(msg)
|
|
1392
1418
|
})
|
|
1393
1419
|
].filter(Boolean).join("\n");
|
|
1420
|
+
require_pipeline.reportSurvivingAssetPlaceholders(fullCss, {
|
|
1421
|
+
strict: this.options.strict,
|
|
1422
|
+
warn: (message) => this.warn(message),
|
|
1423
|
+
prefix: `[${this.driverLabel}]`
|
|
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
|
+
});
|
|
1394
1431
|
setSharedCss(fullCss);
|
|
1395
1432
|
const systemPropsContent = require_pipeline.buildSystemPropsModule({
|
|
1396
1433
|
systemPropMapJson: JSON.stringify(manifest?.system_prop_map ?? {}),
|
|
@@ -1681,10 +1718,11 @@ var ExtractionSession = class {
|
|
|
1681
1718
|
(0, fs.renameSync)(tmpPath, (0, path.join)(dir, name));
|
|
1682
1719
|
this.onArtifactWrite?.(name, content);
|
|
1683
1720
|
}
|
|
1684
|
-
/** Copy each asset() specifier's bytes into `assets/`
|
|
1685
|
-
* content-hashed name and substitute a url relative to
|
|
1686
|
-
|
|
1687
|
-
|
|
1721
|
+
/** Copy each asset() specifier's bytes, from every sheet, into `assets/`
|
|
1722
|
+
* under a content-hashed name and substitute a url relative to
|
|
1723
|
+
* styles.css. */
|
|
1724
|
+
substituteAssetReferences(sheets, pruneSuperseded) {
|
|
1725
|
+
const specifiers = require_pipeline.findSheetAssetSpecifiers(sheets);
|
|
1688
1726
|
const assetsDir = (0, path.join)(this.sessionDir, SESSION_ASSETS_DIR);
|
|
1689
1727
|
const expected = /* @__PURE__ */ new Set();
|
|
1690
1728
|
this.assetDependencyPaths.clear();
|
|
@@ -1729,7 +1767,7 @@ var ExtractionSession = class {
|
|
|
1729
1767
|
});
|
|
1730
1768
|
}
|
|
1731
1769
|
if (pruneSuperseded) pruneStaleAssets(assetsDir, expected);
|
|
1732
|
-
return require_pipeline.
|
|
1770
|
+
return require_pipeline.substituteSheetAssets(sheets, urlBySpecifier);
|
|
1733
1771
|
}
|
|
1734
1772
|
trackAssetDependency(path$8) {
|
|
1735
1773
|
this.assetDependencyPaths.add(path$8);
|
package/dist/session.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A 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
|
|
@@ -517,10 +517,6 @@ function logBuildTimings(bt, rustTiming, log, verbose) {
|
|
|
517
517
|
]) {
|
|
518
518
|
const sms = bt[sk] ?? 0;
|
|
519
519
|
log(` ${pad(sl, 15)}${String(sms).padStart(5)}ms`);
|
|
520
|
-
if (sk === "rustExtract" && rustTiming) for (const line of formatRustTimingWaterfall(rustTiming, {
|
|
521
|
-
indent: " ",
|
|
522
|
-
labelWidth: 13
|
|
523
|
-
})) log(line);
|
|
524
520
|
}
|
|
525
521
|
}
|
|
526
522
|
log(` total ${String(bt.total).padStart(5)}ms`);
|
|
@@ -557,6 +553,7 @@ function isDiskNumber(value) {
|
|
|
557
553
|
/** Bundler-agnostic extraction pipeline: system load, source ingestion,
|
|
558
554
|
* analysis, emission, and watch-cycle diffing. Carries no bundler types. */
|
|
559
555
|
var ExtractionSession = class {
|
|
556
|
+
host;
|
|
560
557
|
/** Set by the adapter before any pipeline run. */
|
|
561
558
|
rootDir = null;
|
|
562
559
|
/** Serialized path aliases, harvested by the adapter from bundler config. */
|
|
@@ -613,6 +610,9 @@ var ExtractionSession = class {
|
|
|
613
610
|
/** Configured external files that could not be read. Incremental passes
|
|
614
611
|
* re-collect nothing, so they replay these instead of passing strict. */
|
|
615
612
|
ingestionFailureDiagnostics = [];
|
|
613
|
+
/** Whether the corpus being analyzed left a file out, whose renders the
|
|
614
|
+
* analysis cannot see. */
|
|
615
|
+
skippedSources = [];
|
|
616
616
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
617
617
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
618
618
|
lastPackageMap = {};
|
|
@@ -667,10 +667,16 @@ var ExtractionSession = class {
|
|
|
667
667
|
debouncePending = /* @__PURE__ */ new Map();
|
|
668
668
|
sessionStartHygieneDone = false;
|
|
669
669
|
lcssTargets = null;
|
|
670
|
-
constructor(options) {
|
|
670
|
+
constructor(options, host = {}) {
|
|
671
|
+
this.host = host;
|
|
671
672
|
this.options = options;
|
|
672
673
|
this.staticCssJson = serializeStaticCss(options.staticCss);
|
|
673
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
|
+
}
|
|
674
680
|
get sessionDir() {
|
|
675
681
|
return sessionArtifactDir(this.rootDir, this.sessionId);
|
|
676
682
|
}
|
|
@@ -833,6 +839,7 @@ var ExtractionSession = class {
|
|
|
833
839
|
owningRoot = resolved.owningRoot;
|
|
834
840
|
}
|
|
835
841
|
recordPrior(key);
|
|
842
|
+
this.clearIngestionFailure(key);
|
|
836
843
|
if (this.fileCache.delete(key)) {
|
|
837
844
|
removedAny = true;
|
|
838
845
|
if (owningRoot) {
|
|
@@ -873,6 +880,7 @@ var ExtractionSession = class {
|
|
|
873
880
|
} catch {
|
|
874
881
|
continue;
|
|
875
882
|
}
|
|
883
|
+
this.clearIngestionFailure(relPath);
|
|
876
884
|
const rawHash = contentHash(source);
|
|
877
885
|
const cached = this.fileCache.get(relPath);
|
|
878
886
|
const hash = rawHash;
|
|
@@ -920,6 +928,7 @@ var ExtractionSession = class {
|
|
|
920
928
|
externalFileOwners: this.externalFileOwners
|
|
921
929
|
});
|
|
922
930
|
this.throwOnAbortedParse(ingested);
|
|
931
|
+
this.skippedSources = ingested.skippedOriginals ?? [];
|
|
923
932
|
if (this.systemReloadOwed) {
|
|
924
933
|
this.log("system reload: publishing the reload a parse hold deferred");
|
|
925
934
|
this.resetForHmr();
|
|
@@ -1007,7 +1016,8 @@ var ExtractionSession = class {
|
|
|
1007
1016
|
this.system = loadSystemConfig(engineApi, {
|
|
1008
1017
|
systemPath: resolvedSystemPath,
|
|
1009
1018
|
rootDir,
|
|
1010
|
-
prefix: this.options.prefix
|
|
1019
|
+
prefix: this.options.prefix,
|
|
1020
|
+
prefixContextualVars: this.options.prefixContextualVars
|
|
1011
1021
|
});
|
|
1012
1022
|
this.assetCopyCache.clear();
|
|
1013
1023
|
this.assetDependencyPaths.clear();
|
|
@@ -1034,14 +1044,20 @@ var ExtractionSession = class {
|
|
|
1034
1044
|
bt.fileDiscovery = this.elapsed(t);
|
|
1035
1045
|
t = this.now();
|
|
1036
1046
|
const rawEntries = [];
|
|
1047
|
+
const ingestionFailures = [];
|
|
1037
1048
|
for (const filePath of files) {
|
|
1038
|
-
const source = readFileSync(filePath, "utf-8");
|
|
1039
1049
|
const relPath = relative(rootDir, filePath);
|
|
1040
|
-
|
|
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
|
+
}
|
|
1041
1057
|
rawEntries.push({
|
|
1042
1058
|
path: relPath,
|
|
1043
1059
|
source,
|
|
1044
|
-
hash
|
|
1060
|
+
hash: contentHash(source)
|
|
1045
1061
|
});
|
|
1046
1062
|
}
|
|
1047
1063
|
bt.fileRead = this.elapsed(t);
|
|
@@ -1049,7 +1065,6 @@ var ExtractionSession = class {
|
|
|
1049
1065
|
const packageNames = extractSystemFilePackages(resolvedSystemPath);
|
|
1050
1066
|
const preResolved = resolvePackagesByName(rootDir, packageNames);
|
|
1051
1067
|
const rawExternalFiles = /* @__PURE__ */ new Map();
|
|
1052
|
-
const ingestionFailures = [];
|
|
1053
1068
|
const collected = await collectExternalPackageSources({
|
|
1054
1069
|
specifiers: packageNames,
|
|
1055
1070
|
resolveSpecifier: (name) => preResolved[name] ? resolve(rootDir, preResolved[name]) : null,
|
|
@@ -1059,7 +1074,9 @@ var ExtractionSession = class {
|
|
|
1059
1074
|
onSourceRead: (source, _relPath, absPath) => {
|
|
1060
1075
|
rawExternalFiles.set(absPath, contentHash(source));
|
|
1061
1076
|
},
|
|
1062
|
-
onUnreadable: (relPath, err) =>
|
|
1077
|
+
onUnreadable: (relPath, err) => {
|
|
1078
|
+
if (!isDeletedSource(err)) ingestionFailures.push(unreadableSourceDiagnostic(relPath, err));
|
|
1079
|
+
},
|
|
1063
1080
|
onPackageResolved: (_specifier, packageDir) => {
|
|
1064
1081
|
if (!this.onExternalRootResolved) return;
|
|
1065
1082
|
if (!this.sharesProjectVolume(rootDir, packageDir)) return;
|
|
@@ -1146,6 +1163,7 @@ var ExtractionSession = class {
|
|
|
1146
1163
|
try {
|
|
1147
1164
|
accepted = await this.corpus.prepare(rawEntries);
|
|
1148
1165
|
this.throwOnAbortedParse(accepted);
|
|
1166
|
+
this.skippedSources = accepted.skippedOriginals ?? [];
|
|
1149
1167
|
} catch (err) {
|
|
1150
1168
|
this.debouncePending.clear();
|
|
1151
1169
|
this.writeAnalysisStatus("failed", pending, String(err));
|
|
@@ -1344,12 +1362,18 @@ var ExtractionSession = class {
|
|
|
1344
1362
|
pathAliasesJson: this.pathAliasesJson,
|
|
1345
1363
|
staticCssJson: this.staticCssJson,
|
|
1346
1364
|
externalDirs: this.externalPackageDirs.map((dir) => relative(this.rootDir, dir)),
|
|
1347
|
-
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
|
+
}
|
|
1348
1371
|
};
|
|
1349
1372
|
this.writeAnalysisStatus("analyzing", pending);
|
|
1350
1373
|
const result = runProjectAnalysis(engineApi, {
|
|
1351
1374
|
...analysisOptions,
|
|
1352
1375
|
warn: (message) => this.warn(message),
|
|
1376
|
+
info: (message) => this.log(message),
|
|
1353
1377
|
strict: this.options.strict,
|
|
1354
1378
|
extraDiagnostics: this.ingestionFailureDiagnostics
|
|
1355
1379
|
});
|
|
@@ -1372,12 +1396,14 @@ var ExtractionSession = class {
|
|
|
1372
1396
|
bt.analysis = (bt.jsonSerialize ?? 0) + (bt.rustExtract ?? 0) + (bt.jsonParse ?? 0);
|
|
1373
1397
|
if (manifest?.report) this.log(`Extracted ${manifest.report.components_extracted ?? "?"}/${manifest.report.components_total ?? "?"} components (${bt.analysis}ms)`);
|
|
1374
1398
|
}
|
|
1375
|
-
const
|
|
1399
|
+
const sheets = this.substituteAssetReferences({
|
|
1400
|
+
variableCss: system.variableCss,
|
|
1401
|
+
globalCss: result.globalCss,
|
|
1402
|
+
componentCss: result.componentCss
|
|
1403
|
+
}, !devMode || this.staleAssetPruning === "every-cycle");
|
|
1376
1404
|
const { declaration, variables, body } = assembleStylesheet({
|
|
1377
1405
|
layers: this.options.layers,
|
|
1378
|
-
|
|
1379
|
-
globalCss,
|
|
1380
|
-
componentCss: result.componentCss,
|
|
1406
|
+
...sheets,
|
|
1381
1407
|
split: true
|
|
1382
1408
|
});
|
|
1383
1409
|
if (this.lcssTargets === null) this.lcssTargets = resolveLightningTargets(this.options.targets, this.rootDir);
|
|
@@ -1390,6 +1416,17 @@ var ExtractionSession = class {
|
|
|
1390
1416
|
warnFn: (msg) => this.warn(msg)
|
|
1391
1417
|
})
|
|
1392
1418
|
].filter(Boolean).join("\n");
|
|
1419
|
+
reportSurvivingAssetPlaceholders(fullCss, {
|
|
1420
|
+
strict: this.options.strict,
|
|
1421
|
+
warn: (message) => this.warn(message),
|
|
1422
|
+
prefix: `[${this.driverLabel}]`
|
|
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
|
+
});
|
|
1393
1430
|
setSharedCss(fullCss);
|
|
1394
1431
|
const systemPropsContent = buildSystemPropsModule({
|
|
1395
1432
|
systemPropMapJson: JSON.stringify(manifest?.system_prop_map ?? {}),
|
|
@@ -1680,10 +1717,11 @@ var ExtractionSession = class {
|
|
|
1680
1717
|
renameSync(tmpPath, join(dir, name));
|
|
1681
1718
|
this.onArtifactWrite?.(name, content);
|
|
1682
1719
|
}
|
|
1683
|
-
/** Copy each asset() specifier's bytes into `assets/`
|
|
1684
|
-
* content-hashed name and substitute a url relative to
|
|
1685
|
-
|
|
1686
|
-
|
|
1720
|
+
/** Copy each asset() specifier's bytes, from every sheet, into `assets/`
|
|
1721
|
+
* under a content-hashed name and substitute a url relative to
|
|
1722
|
+
* styles.css. */
|
|
1723
|
+
substituteAssetReferences(sheets, pruneSuperseded) {
|
|
1724
|
+
const specifiers = findSheetAssetSpecifiers(sheets);
|
|
1687
1725
|
const assetsDir = join(this.sessionDir, SESSION_ASSETS_DIR);
|
|
1688
1726
|
const expected = /* @__PURE__ */ new Set();
|
|
1689
1727
|
this.assetDependencyPaths.clear();
|
|
@@ -1728,7 +1766,7 @@ var ExtractionSession = class {
|
|
|
1728
1766
|
});
|
|
1729
1767
|
}
|
|
1730
1768
|
if (pruneSuperseded) pruneStaleAssets(assetsDir, expected);
|
|
1731
|
-
return
|
|
1769
|
+
return substituteSheetAssets(sheets, urlBySpecifier);
|
|
1732
1770
|
}
|
|
1733
1771
|
trackAssetDependency(path) {
|
|
1734
1772
|
this.assetDependencyPaths.add(path);
|
package/index-v2.js
CHANGED
|
@@ -17,7 +17,7 @@ function loadNative() {
|
|
|
17
17
|
`(looked for ${candidates.join(', ')} under crates/extract-v2/). ` +
|
|
18
18
|
`Published releases ship this binary for darwin-arm64, linux-x64-gnu and ` +
|
|
19
19
|
`linux-arm64-gnu — reinstall the package to restore it (v2 is the only ` +
|
|
20
|
-
`engine
|
|
20
|
+
`engine, so there is no other engine to fall back to). ` +
|
|
21
21
|
`In the animus workspace, build it with: vp run build:extract-v2.`
|
|
22
22
|
);
|
|
23
23
|
}
|
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"
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const RUST_TIMING_PHASES: ReadonlyArray<readonly [key: string, label: string]>;
|
|
2
|
-
export declare function formatRustTimingWaterfall(timing: Record<string, number>, opts: {
|
|
3
|
-
indent: string;
|
|
4
|
-
labelWidth: number;
|
|
5
|
-
}): string[];
|
|
6
|
-
//# sourceMappingURL=timing-waterfall.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timing-waterfall.d.ts","sourceRoot":"","sources":["../../pipeline/timing-waterfall.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAC5C,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAatC,CAAC;AAEF,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC3C,MAAM,EAAE,CAcV"}
|