@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
package/dist/session.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as
|
|
1
|
+
import { A as createSourceCorpus, At as contentHash, B as unresolvableIncludesMessage, Ct as noKitFilesDiagnostics, D as reportSurvivingAssetPlaceholders, E as generatedModuleCode, Et as unreadableSourceDiagnostic, F as findPackageRoot, G as createSourceIdentity, H as isJsonBlock, I as firstOwners, It as __require, K as isPathWithinRoot, L as isExcludedPackageRelativePath, M as engineImportParser, N as excludeCollectedPackages, Nt as assembleStylesheet, P as extractSystemFilePackages, S as resolveAssetFile, T as findSheetAssetSpecifiers, U as isJsonString, V as walkPackageSources, Y as discoverFiles, a as assertNoErrorDiagnostics, at as resolveVerbosity, ct as createV2EngineApi, d as serializeStaticCss, ft as projectExternalFileOwners, g as runProjectAnalysis, h as clearEngineCache, i as snapshotFilePlans, it as resolveMode, j as collectExternalPackageSources, k as substituteSheetAssets, kt as parseInternalWire, l as loadSystemConfig, mt as DEFAULT_EXTENSIONS, o as buildSystemPropsModule, q as sharesVolumeRoot, r as hashReplacementPlans, rt as createExcludeMatcher, t as toWatchKeys, v as postProcessCss, wt as surfaceManifestDiagnostics, x as enforceExternalTokenContracts, xt as isDeletedSource, y as resolveLightningTargets, z as staleDistIncludesMessage } from "./pipeline-BXY7Pf_D.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, dirname, 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
|
|
@@ -257,6 +257,68 @@ function collectSessionAssets(sessionDir) {
|
|
|
257
257
|
}
|
|
258
258
|
//#endregion
|
|
259
259
|
//#region session/resolve-packages.ts
|
|
260
|
+
/** An exports target under the `import` condition, then `default`, as the
|
|
261
|
+
* system loader reads it; an array offers its targets in order. */
|
|
262
|
+
function importTarget(value) {
|
|
263
|
+
if (isJsonString(value)) return value;
|
|
264
|
+
if (Array.isArray(value)) {
|
|
265
|
+
for (const entry of value) {
|
|
266
|
+
const target = importTarget(entry);
|
|
267
|
+
if (target !== null) return target;
|
|
268
|
+
}
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
if (!isJsonBlock(value)) return null;
|
|
272
|
+
return importTarget(value.import) ?? importTarget(value.default);
|
|
273
|
+
}
|
|
274
|
+
/** The exports entry for `subpath`: an exact key answers alone; otherwise
|
|
275
|
+
* the pattern with the longest prefix, then the longest suffix, wins. */
|
|
276
|
+
function exportsTarget(exports, subpath) {
|
|
277
|
+
const map = isJsonBlock(exports) && Object.keys(exports).some((k) => k.startsWith(".")) ? exports : { ".": exports };
|
|
278
|
+
if (subpath in map) return importTarget(map[subpath]);
|
|
279
|
+
let best = null;
|
|
280
|
+
for (const [pattern, value] of Object.entries(map)) {
|
|
281
|
+
const star = pattern.indexOf("*");
|
|
282
|
+
if (star === -1 || pattern.indexOf("*", star + 1) !== -1) continue;
|
|
283
|
+
const prefix = pattern.slice(0, star);
|
|
284
|
+
const suffix = pattern.slice(star + 1);
|
|
285
|
+
if (!subpath.startsWith(prefix) || !subpath.endsWith(suffix) || subpath.length < prefix.length + suffix.length) continue;
|
|
286
|
+
if (!best || prefix.length > best.prefix.length || prefix.length === best.prefix.length && suffix.length > best.suffix.length) best = {
|
|
287
|
+
prefix,
|
|
288
|
+
suffix,
|
|
289
|
+
value
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
if (!best) return null;
|
|
293
|
+
const matched = subpath.slice(best.prefix.length, subpath.length - best.suffix.length);
|
|
294
|
+
return importTarget(best.value)?.replaceAll("*", matched) ?? null;
|
|
295
|
+
}
|
|
296
|
+
/** The entry an ES import of `name` resolves to through the package's
|
|
297
|
+
* `exports`, under the `import` condition, then `default`: what the Vite
|
|
298
|
+
* host and the system loader resolve. Null without an `exports` field, or
|
|
299
|
+
* when no target exists. */
|
|
300
|
+
function resolveImportEntry(rootDir, name) {
|
|
301
|
+
const packageName = name.split("/").slice(0, name.startsWith("@") ? 2 : 1).join("/");
|
|
302
|
+
const subpath = `.${name.slice(packageName.length)}`;
|
|
303
|
+
for (let dir = rootDir;; dir = dirname(dir)) {
|
|
304
|
+
const manifest = join(dir, "node_modules", packageName, "package.json");
|
|
305
|
+
if (existsSync(manifest)) {
|
|
306
|
+
let exports;
|
|
307
|
+
try {
|
|
308
|
+
const parsed = parseInternalWire(readFileSync(manifest, "utf-8"), `${manifest} (a package manifest)`);
|
|
309
|
+
exports = isJsonBlock(parsed) ? parsed.exports : void 0;
|
|
310
|
+
} catch {
|
|
311
|
+
return null;
|
|
312
|
+
}
|
|
313
|
+
if (exports === void 0 || exports === null) return null;
|
|
314
|
+
const target = exportsTarget(exports, subpath);
|
|
315
|
+
if (target === null) return null;
|
|
316
|
+
const entryPath = resolve(dirname(manifest), target);
|
|
317
|
+
return existsSync(entryPath) ? realpathSync(entryPath) : null;
|
|
318
|
+
}
|
|
319
|
+
if (dir === dirname(dir)) return null;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
260
322
|
function resolvePackagesByName(rootDir, names) {
|
|
261
323
|
if (names.length === 0) return {};
|
|
262
324
|
const nameSet = new Set(names);
|
|
@@ -284,6 +346,11 @@ function resolvePackagesByName(rootDir, names) {
|
|
|
284
346
|
} catch {}
|
|
285
347
|
for (const name of nameSet) {
|
|
286
348
|
if (resolved.has(name)) continue;
|
|
349
|
+
const importEntry = resolveImportEntry(rootDir, name);
|
|
350
|
+
if (importEntry !== null) {
|
|
351
|
+
packageMap[name] = relative(rootDir, importEntry);
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
287
354
|
try {
|
|
288
355
|
const entryPath = __require.resolve(name, { paths: [rootDir] });
|
|
289
356
|
packageMap[name] = relative(rootDir, entryPath);
|
|
@@ -303,6 +370,7 @@ const SHARED_CSS_KEY = "__animus_shared_css__";
|
|
|
303
370
|
const SHARED_SYSTEM_PROPS_KEY = "__animus_shared_system_props__";
|
|
304
371
|
const SHARED_EXTERNAL_DIRS_KEY = "__animus_external_pkg_dirs__";
|
|
305
372
|
const SHARED_EXTERNAL_ENTRIES_KEY = "__animus_external_source_entries__";
|
|
373
|
+
const SHARED_EXTERNAL_SIDE_EFFECTS_KEY = "__animus_external_side_effects__";
|
|
306
374
|
const ANALYZED_HASHES_KEY = "__animus_analyzed_hashes__";
|
|
307
375
|
const REPLACEMENT_EPOCH_KEY = "__animus_replacement_epoch__";
|
|
308
376
|
const WATCH_TRANSACTION_KEY = "__animus_watch_transaction__";
|
|
@@ -368,6 +436,14 @@ function getSharedExternalEntries() {
|
|
|
368
436
|
function setSharedExternalEntries(entries) {
|
|
369
437
|
singletonStore[SHARED_EXTERNAL_ENTRIES_KEY] = entries;
|
|
370
438
|
}
|
|
439
|
+
/** Specifier → its source entry's side effects, published with the shared
|
|
440
|
+
* entries; absent leaves the bundler's own classification. */
|
|
441
|
+
function getSharedExternalSideEffects() {
|
|
442
|
+
return singletonStore[SHARED_EXTERNAL_SIDE_EFFECTS_KEY] || /* @__PURE__ */ new Map();
|
|
443
|
+
}
|
|
444
|
+
function setSharedExternalSideEffects(sideEffects) {
|
|
445
|
+
singletonStore[SHARED_EXTERNAL_SIDE_EFFECTS_KEY] = sideEffects;
|
|
446
|
+
}
|
|
371
447
|
function globalSlot(key) {
|
|
372
448
|
return {
|
|
373
449
|
get: () => singletonStore[key] ?? null,
|
|
@@ -553,6 +629,7 @@ function isDiskNumber(value) {
|
|
|
553
629
|
/** Bundler-agnostic extraction pipeline: system load, source ingestion,
|
|
554
630
|
* analysis, emission, and watch-cycle diffing. Carries no bundler types. */
|
|
555
631
|
var ExtractionSession = class {
|
|
632
|
+
host;
|
|
556
633
|
/** Set by the adapter before any pipeline run. */
|
|
557
634
|
rootDir = null;
|
|
558
635
|
/** Serialized path aliases, harvested by the adapter from bundler config. */
|
|
@@ -575,6 +652,9 @@ var ExtractionSession = class {
|
|
|
575
652
|
externalFileOwners = {};
|
|
576
653
|
/** External package specifier → absolute source entry path. */
|
|
577
654
|
externalSourceEntries = /* @__PURE__ */ new Map();
|
|
655
|
+
/** Specifier → its source entry's side effects, from the owning package's
|
|
656
|
+
* `sideEffects`; absent leaves the bundler's own classification. */
|
|
657
|
+
externalSourceSideEffects = /* @__PURE__ */ new Map();
|
|
578
658
|
/** SourceId authority for this generation — roots realpath'd once per
|
|
579
659
|
* pipeline; aliases recorded while files exist so deletions resolve. */
|
|
580
660
|
sourceIdentity = null;
|
|
@@ -609,6 +689,9 @@ var ExtractionSession = class {
|
|
|
609
689
|
/** Configured external files that could not be read. Incremental passes
|
|
610
690
|
* re-collect nothing, so they replay these instead of passing strict. */
|
|
611
691
|
ingestionFailureDiagnostics = [];
|
|
692
|
+
/** Whether the corpus being analyzed left a file out, whose renders the
|
|
693
|
+
* analysis cannot see. */
|
|
694
|
+
skippedSources = [];
|
|
612
695
|
/** Full package-resolution map from the last full pipeline — replayed by
|
|
613
696
|
* incremental passes (sourceEntries alone omits dist-resolved packages). */
|
|
614
697
|
lastPackageMap = {};
|
|
@@ -663,10 +746,16 @@ var ExtractionSession = class {
|
|
|
663
746
|
debouncePending = /* @__PURE__ */ new Map();
|
|
664
747
|
sessionStartHygieneDone = false;
|
|
665
748
|
lcssTargets = null;
|
|
666
|
-
constructor(options) {
|
|
749
|
+
constructor(options, host = {}) {
|
|
750
|
+
this.host = host;
|
|
667
751
|
this.options = options;
|
|
668
752
|
this.staticCssJson = serializeStaticCss(options.staticCss);
|
|
669
753
|
}
|
|
754
|
+
/** Forgets that `relPath` could not be read once an incremental pass reads
|
|
755
|
+
* or deletes it, so its cost stops holding pruning off. */
|
|
756
|
+
clearIngestionFailure(relPath) {
|
|
757
|
+
this.ingestionFailureDiagnostics = this.ingestionFailureDiagnostics.filter((diagnostic) => diagnostic.file !== relPath);
|
|
758
|
+
}
|
|
670
759
|
get sessionDir() {
|
|
671
760
|
return sessionArtifactDir(this.rootDir, this.sessionId);
|
|
672
761
|
}
|
|
@@ -694,6 +783,10 @@ var ExtractionSession = class {
|
|
|
694
783
|
/** Component count of the last published analysis, null before the first —
|
|
695
784
|
* read by drivers instead of re-parsing the manifest JSON every cycle. */
|
|
696
785
|
lastComponentCount = null;
|
|
786
|
+
/** The loaded theme's token → variable map; null before the system loads. */
|
|
787
|
+
get variableMapJson() {
|
|
788
|
+
return this.system?.variableMapJson ?? null;
|
|
789
|
+
}
|
|
697
790
|
/** When superseded asset copies leave `assets/`: `'full-pipeline'` suits a
|
|
698
791
|
* driver serving the dir in place, `'every-cycle'` one republishing it. */
|
|
699
792
|
staleAssetPruning = "full-pipeline";
|
|
@@ -829,6 +922,7 @@ var ExtractionSession = class {
|
|
|
829
922
|
owningRoot = resolved.owningRoot;
|
|
830
923
|
}
|
|
831
924
|
recordPrior(key);
|
|
925
|
+
this.clearIngestionFailure(key);
|
|
832
926
|
if (this.fileCache.delete(key)) {
|
|
833
927
|
removedAny = true;
|
|
834
928
|
if (owningRoot) {
|
|
@@ -869,6 +963,7 @@ var ExtractionSession = class {
|
|
|
869
963
|
} catch {
|
|
870
964
|
continue;
|
|
871
965
|
}
|
|
966
|
+
this.clearIngestionFailure(relPath);
|
|
872
967
|
const rawHash = contentHash(source);
|
|
873
968
|
const cached = this.fileCache.get(relPath);
|
|
874
969
|
const hash = rawHash;
|
|
@@ -916,6 +1011,7 @@ var ExtractionSession = class {
|
|
|
916
1011
|
externalFileOwners: this.externalFileOwners
|
|
917
1012
|
});
|
|
918
1013
|
this.throwOnAbortedParse(ingested);
|
|
1014
|
+
this.skippedSources = ingested.skippedOriginals ?? [];
|
|
919
1015
|
if (this.systemReloadOwed) {
|
|
920
1016
|
this.log("system reload: publishing the reload a parse hold deferred");
|
|
921
1017
|
this.resetForHmr();
|
|
@@ -1003,7 +1099,8 @@ var ExtractionSession = class {
|
|
|
1003
1099
|
this.system = loadSystemConfig(engineApi, {
|
|
1004
1100
|
systemPath: resolvedSystemPath,
|
|
1005
1101
|
rootDir,
|
|
1006
|
-
prefix: this.options.prefix
|
|
1102
|
+
prefix: this.options.prefix,
|
|
1103
|
+
prefixContextualVars: this.options.prefixContextualVars
|
|
1007
1104
|
});
|
|
1008
1105
|
this.assetCopyCache.clear();
|
|
1009
1106
|
this.assetDependencyPaths.clear();
|
|
@@ -1030,22 +1127,27 @@ var ExtractionSession = class {
|
|
|
1030
1127
|
bt.fileDiscovery = this.elapsed(t);
|
|
1031
1128
|
t = this.now();
|
|
1032
1129
|
const rawEntries = [];
|
|
1130
|
+
const ingestionFailures = [];
|
|
1033
1131
|
for (const filePath of files) {
|
|
1034
|
-
const source = readFileSync(filePath, "utf-8");
|
|
1035
1132
|
const relPath = relative(rootDir, filePath);
|
|
1036
|
-
|
|
1133
|
+
let source;
|
|
1134
|
+
try {
|
|
1135
|
+
source = readFileSync(filePath, "utf-8");
|
|
1136
|
+
} catch (err) {
|
|
1137
|
+
if (!isDeletedSource(err)) ingestionFailures.push(unreadableSourceDiagnostic(relPath, err));
|
|
1138
|
+
continue;
|
|
1139
|
+
}
|
|
1037
1140
|
rawEntries.push({
|
|
1038
1141
|
path: relPath,
|
|
1039
1142
|
source,
|
|
1040
|
-
hash
|
|
1143
|
+
hash: contentHash(source)
|
|
1041
1144
|
});
|
|
1042
1145
|
}
|
|
1043
1146
|
bt.fileRead = this.elapsed(t);
|
|
1044
1147
|
t = this.now();
|
|
1045
|
-
const packageNames = extractSystemFilePackages(resolvedSystemPath);
|
|
1148
|
+
const packageNames = extractSystemFilePackages(resolvedSystemPath, engineImportParser(engineApi()));
|
|
1046
1149
|
const preResolved = resolvePackagesByName(rootDir, packageNames);
|
|
1047
1150
|
const rawExternalFiles = /* @__PURE__ */ new Map();
|
|
1048
|
-
const ingestionFailures = [];
|
|
1049
1151
|
const collected = await collectExternalPackageSources({
|
|
1050
1152
|
specifiers: packageNames,
|
|
1051
1153
|
resolveSpecifier: (name) => preResolved[name] ? resolve(rootDir, preResolved[name]) : null,
|
|
@@ -1055,7 +1157,9 @@ var ExtractionSession = class {
|
|
|
1055
1157
|
onSourceRead: (source, _relPath, absPath) => {
|
|
1056
1158
|
rawExternalFiles.set(absPath, contentHash(source));
|
|
1057
1159
|
},
|
|
1058
|
-
onUnreadable: (relPath, err) =>
|
|
1160
|
+
onUnreadable: (relPath, err) => {
|
|
1161
|
+
if (!isDeletedSource(err)) ingestionFailures.push(unreadableSourceDiagnostic(relPath, err));
|
|
1162
|
+
},
|
|
1059
1163
|
onPackageResolved: (_specifier, packageDir) => {
|
|
1060
1164
|
if (!this.onExternalRootResolved) return;
|
|
1061
1165
|
if (!this.sharesProjectVolume(rootDir, packageDir)) return;
|
|
@@ -1068,7 +1172,7 @@ var ExtractionSession = class {
|
|
|
1068
1172
|
});
|
|
1069
1173
|
this.lastExternalOutcomes = collected.outcomes;
|
|
1070
1174
|
this.ingestionFailureDiagnostics = ingestionFailures;
|
|
1071
|
-
|
|
1175
|
+
surfaceManifestDiagnostics({ diagnostics: noKitFilesDiagnostics(collected.outcomes) }, (message) => this.warn(message));
|
|
1072
1176
|
const unresolvableMessage = unresolvableIncludesMessage(collected.outcomes);
|
|
1073
1177
|
if (unresolvableMessage !== null) {
|
|
1074
1178
|
if (this.options.strict) throw new Error(unresolvableMessage);
|
|
@@ -1127,6 +1231,7 @@ var ExtractionSession = class {
|
|
|
1127
1231
|
this.externalDirOwners = firstOwners(admitted.dirOwnerSets);
|
|
1128
1232
|
this.externalFileOwners = admitted.fileOwners;
|
|
1129
1233
|
this.externalSourceEntries = admitted.sourceEntries;
|
|
1234
|
+
this.externalSourceSideEffects = admitted.sourceEntrySideEffects;
|
|
1130
1235
|
for (const entry of admitted.entries) {
|
|
1131
1236
|
const hash = contentHash(entry.source);
|
|
1132
1237
|
rawEntries.push({
|
|
@@ -1142,6 +1247,7 @@ var ExtractionSession = class {
|
|
|
1142
1247
|
try {
|
|
1143
1248
|
accepted = await this.corpus.prepare(rawEntries);
|
|
1144
1249
|
this.throwOnAbortedParse(accepted);
|
|
1250
|
+
this.skippedSources = accepted.skippedOriginals ?? [];
|
|
1145
1251
|
} catch (err) {
|
|
1146
1252
|
this.debouncePending.clear();
|
|
1147
1253
|
this.writeAnalysisStatus("failed", pending, String(err));
|
|
@@ -1154,6 +1260,7 @@ var ExtractionSession = class {
|
|
|
1154
1260
|
this.publishSourceIngestion(accepted);
|
|
1155
1261
|
setSharedExternalDirs(admitted.packageDirs);
|
|
1156
1262
|
setSharedExternalEntries(admitted.sourceEntries);
|
|
1263
|
+
setSharedExternalSideEffects(admitted.sourceEntrySideEffects);
|
|
1157
1264
|
this.onExternalRootsCommitted?.(this.externalWatchRoots);
|
|
1158
1265
|
setOwningWatchSession(this);
|
|
1159
1266
|
} catch (err) {
|
|
@@ -1174,6 +1281,7 @@ var ExtractionSession = class {
|
|
|
1174
1281
|
externalDirOwners: this.externalDirOwners,
|
|
1175
1282
|
externalFileOwners: this.externalFileOwners,
|
|
1176
1283
|
externalSourceEntries: this.externalSourceEntries,
|
|
1284
|
+
externalSourceSideEffects: this.externalSourceSideEffects,
|
|
1177
1285
|
externalPackageDirs: this.externalPackageDirs,
|
|
1178
1286
|
ingestionFailureDiagnostics: this.ingestionFailureDiagnostics
|
|
1179
1287
|
};
|
|
@@ -1340,7 +1448,12 @@ var ExtractionSession = class {
|
|
|
1340
1448
|
pathAliasesJson: this.pathAliasesJson,
|
|
1341
1449
|
staticCssJson: this.staticCssJson,
|
|
1342
1450
|
externalDirs: this.externalPackageDirs.map((dir) => relative(this.rootDir, dir)),
|
|
1343
|
-
devMode: this.engineDevMode(devMode)
|
|
1451
|
+
devMode: this.engineDevMode(devMode),
|
|
1452
|
+
analysisContext: {
|
|
1453
|
+
skippedSources: [...this.skippedSources, ...this.ingestionFailureDiagnostics.map((d) => d.file)].map((file) => isAbsolute(file) ? relative(this.rootDir, file) : file),
|
|
1454
|
+
unbundledComputedImports: this.host.unbundledComputedImports,
|
|
1455
|
+
packageDirs: this.externalPackageDirs.map((dir) => relative(this.rootDir, dir))
|
|
1456
|
+
}
|
|
1344
1457
|
};
|
|
1345
1458
|
this.writeAnalysisStatus("analyzing", pending);
|
|
1346
1459
|
const result = runProjectAnalysis(engineApi, {
|
|
@@ -1394,6 +1507,12 @@ var ExtractionSession = class {
|
|
|
1394
1507
|
warn: (message) => this.warn(message),
|
|
1395
1508
|
prefix: `[${this.driverLabel}]`
|
|
1396
1509
|
});
|
|
1510
|
+
reportSurvivingAssetPlaceholders(generatedModuleCode(manifest), {
|
|
1511
|
+
strict: this.options.strict,
|
|
1512
|
+
warn: (message) => this.warn(message),
|
|
1513
|
+
prefix: `[${this.driverLabel}]`,
|
|
1514
|
+
surface: "generated runtime modules"
|
|
1515
|
+
});
|
|
1397
1516
|
setSharedCss(fullCss);
|
|
1398
1517
|
const systemPropsContent = buildSystemPropsModule({
|
|
1399
1518
|
systemPropMapJson: JSON.stringify(manifest?.system_prop_map ?? {}),
|
|
@@ -1986,4 +2105,4 @@ function startTurbopackWatcher(session, rootDir, options = {}) {
|
|
|
1986
2105
|
};
|
|
1987
2106
|
}
|
|
1988
2107
|
//#endregion
|
|
1989
|
-
export { ANIMUS_ARTIFACT_DIR, ANIMUS_CSS_MODULE_ID, CLI_COMMIT_ARTIFACT, CLI_LOCK_ARTIFACT, CLI_LOCK_HEARTBEAT_INTERVAL_MS, CLI_LOCK_STALE_AFTER_MS, ExtractionSession, MANIFEST_ARTIFACT, SESSION_ASSETS_DIR, STYLES_ARTIFACT, SYSTEM_PROPS_ARTIFACT, TURBOPACK_SYSTEM_PROPS_ID, analysisCommitPath, analysisInputsPath, analysisStatusPath, checkLockLiveness, collectSessionAssets, decodeCommitRecord, engineApi, getAnalysisStartedPromise, getAnalyzedHashes, getManifestJson, getReplacementEpoch, getSessionArtifactDir, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedSystemProps, holdDirectoryClaim, isLockHolderAlive, lockRecordBytes, manifestPath, pruneStaleAssets, readCliLockRecord, readJsonEnvelope, replacementEpochPath, resetAnalysisStartedPromise, runSessionPipeline, sessionArtifactDir, setAnalysisStartedPromise, setSharedEngine, startTurbopackWatcher, stylesPath, systemPropsPath, verifyCommitRecord };
|
|
2108
|
+
export { ANIMUS_ARTIFACT_DIR, ANIMUS_CSS_MODULE_ID, CLI_COMMIT_ARTIFACT, CLI_LOCK_ARTIFACT, CLI_LOCK_HEARTBEAT_INTERVAL_MS, CLI_LOCK_STALE_AFTER_MS, ExtractionSession, MANIFEST_ARTIFACT, SESSION_ASSETS_DIR, STYLES_ARTIFACT, SYSTEM_PROPS_ARTIFACT, TURBOPACK_SYSTEM_PROPS_ID, analysisCommitPath, analysisInputsPath, analysisStatusPath, checkLockLiveness, collectSessionAssets, decodeCommitRecord, engineApi, getAnalysisStartedPromise, getAnalyzedHashes, getManifestJson, getReplacementEpoch, getSessionArtifactDir, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedExternalSideEffects, getSharedSystemProps, holdDirectoryClaim, isLockHolderAlive, lockRecordBytes, manifestPath, pruneStaleAssets, readCliLockRecord, readJsonEnvelope, replacementEpochPath, resetAnalysisStartedPromise, runSessionPipeline, sessionArtifactDir, setAnalysisStartedPromise, setSharedEngine, startTurbopackWatcher, stylesPath, systemPropsPath, verifyCommitRecord };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/extract",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
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.21",
|
|
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.21",
|
|
64
|
+
"@animus-ui/system": "0.1.21",
|
|
65
65
|
"@mdx-js/mdx": "3.1.1",
|
|
66
66
|
"@napi-rs/cli": "^3.10.5",
|
|
67
67
|
"svelte": "5.57.0"
|