@animus-ui/extract 0.1.22 → 0.1.24

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.
Files changed (46) hide show
  1. package/crates/extract-v2/animus-extract-v2.darwin-arm64.node +0 -0
  2. package/crates/extract-v2/animus-extract-v2.linux-arm64-gnu.node +0 -0
  3. package/crates/extract-v2/animus-extract-v2.linux-x64-gnu.node +0 -0
  4. package/crates/extract-v2/index.d.ts +16 -3
  5. package/dist/index.cjs +14 -2
  6. package/dist/index.mjs +2 -2
  7. package/dist/pipeline/analyze-project-args.d.ts +5 -1
  8. package/dist/pipeline/analyze-project-args.d.ts.map +1 -1
  9. package/dist/pipeline/asset-placeholders.d.ts +4 -1
  10. package/dist/pipeline/asset-placeholders.d.ts.map +1 -1
  11. package/dist/pipeline/core-options.d.ts +15 -3
  12. package/dist/pipeline/core-options.d.ts.map +1 -1
  13. package/dist/pipeline/correlate-external-tokens.d.ts +3 -0
  14. package/dist/pipeline/correlate-external-tokens.d.ts.map +1 -1
  15. package/dist/pipeline/discover-packages.d.ts +105 -7
  16. package/dist/pipeline/discover-packages.d.ts.map +1 -1
  17. package/dist/pipeline/dynamic-prop-config.d.ts +13 -2
  18. package/dist/pipeline/dynamic-prop-config.d.ts.map +1 -1
  19. package/dist/pipeline/engine-adapter.d.ts +5 -1
  20. package/dist/pipeline/engine-adapter.d.ts.map +1 -1
  21. package/dist/pipeline/index.d.ts +7 -4
  22. package/dist/pipeline/index.d.ts.map +1 -1
  23. package/dist/pipeline/kit-descriptor.d.ts +44 -0
  24. package/dist/pipeline/kit-descriptor.d.ts.map +1 -0
  25. package/dist/pipeline/kit-publication.d.ts +15 -0
  26. package/dist/pipeline/kit-publication.d.ts.map +1 -0
  27. package/dist/pipeline/manifest-diagnostics.d.ts +64 -5
  28. package/dist/pipeline/manifest-diagnostics.d.ts.map +1 -1
  29. package/dist/pipeline/manifest-schema.d.ts +4 -0
  30. package/dist/pipeline/manifest-schema.d.ts.map +1 -1
  31. package/dist/pipeline/prefix.d.ts +14 -3
  32. package/dist/pipeline/prefix.d.ts.map +1 -1
  33. package/dist/pipeline/run-analysis.d.ts +16 -2
  34. package/dist/pipeline/run-analysis.d.ts.map +1 -1
  35. package/dist/pipeline/source-ingestion.d.ts +13 -2
  36. package/dist/pipeline/source-ingestion.d.ts.map +1 -1
  37. package/dist/pipeline/structural-self-check.d.ts.map +1 -1
  38. package/dist/pipeline/system-config.d.ts +6 -3
  39. package/dist/pipeline/system-config.d.ts.map +1 -1
  40. package/dist/{pipeline-BXY7Pf_D.mjs → pipeline-Bl20tbu_.mjs} +1484 -546
  41. package/dist/{pipeline-D7B1z0-1.cjs → pipeline-CAH9mxnK.cjs} +1602 -591
  42. package/dist/session/extraction-session.d.ts +17 -1
  43. package/dist/session/extraction-session.d.ts.map +1 -1
  44. package/dist/session.cjs +60 -17
  45. package/dist/session.mjs +60 -17
  46. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import type { AnimusCoreOptions, ExternalPackageOutcome } from '../pipeline/index';
1
+ import type { AnimusCoreOptions, ExternalPackageOutcome, KitDescriptorRecord } from '../pipeline/index';
2
2
  export type SessionOptions = AnimusCoreOptions;
3
3
  /** What the hosting bundler does, which the user does not configure. */
4
4
  export interface SessionHost {
@@ -24,6 +24,8 @@ export declare class ExtractionSession {
24
24
  rootDir: string | null;
25
25
  /** Serialized path aliases, harvested by the adapter from bundler config. */
26
26
  pathAliasesJson: string | null;
27
+ /** The host's export conditions, in its order, for the system loader. */
28
+ conditions: readonly string[];
27
29
  private assetCopyCache;
28
30
  /** Physical asset files registered with the host watcher. */
29
31
  assetDependencyPaths: Set<string>;
@@ -34,8 +36,16 @@ export declare class ExtractionSession {
34
36
  /** Whether the analysis-inputs hydration corpus is written to disk. Only
35
37
  * isolated loader workers replay it; an in-process loader reads memory. */
36
38
  persistAnalysisInputs: boolean;
39
+ /** Whether this session serves development (a watch), where an error-level
40
+ * diagnostic is reported and the session keeps running. Only a build
41
+ * fails on one. */
42
+ development: boolean;
37
43
  /** Absolute directory prefixes for external packages (loader allowlist). */
38
44
  externalPackageDirs: string[];
45
+ /** Those whose package is linked rather than installed. */
46
+ externalLinkedDirs: string[];
47
+ /** Those read from their package's compiled output. */
48
+ externalOutputDirs: string[];
39
49
  /** Absolute package dir → owning specifier (cross-source correlation). */
40
50
  private externalDirOwners;
41
51
  /** rootDir-relative external file → owning specifier (correlation join). */
@@ -135,6 +145,10 @@ export declare class ExtractionSession {
135
145
  get verbose(): boolean;
136
146
  private log;
137
147
  private warn;
148
+ private reportErrors;
149
+ /** A build-strictness check that failed: a build throws `message`, and
150
+ * development reports it at error level and takes the non-strict path. */
151
+ private strictFailure;
138
152
  private now;
139
153
  private elapsed;
140
154
  /** Diagnostic prefix label — drivers set their own so one host's errors
@@ -143,6 +157,8 @@ export declare class ExtractionSession {
143
157
  /** Per-specifier discovery outcomes from the last full collection —
144
158
  * driver-consumed reporting surface (the CLI's summary). */
145
159
  lastExternalOutcomes: ExternalPackageOutcome[];
160
+ /** The analysed kits' descriptors, from the last discovery. */
161
+ kitDescriptors: KitDescriptorRecord[];
146
162
  /** Component count of the last published analysis, null before the first —
147
163
  * read by drivers instead of re-parsing the manifest JSON every cycle. */
148
164
  lastComponentCount: number | null;
@@ -1 +1 @@
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,Y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B,CAC9B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAC5B,IAAI,CAgBN"}
package/dist/session.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_pipeline = require("./pipeline-D7B1z0-1.cjs");
2
+ const require_pipeline = require("./pipeline-CAH9mxnK.cjs");
3
3
  let crypto = require("crypto");
4
4
  let fs = require("fs");
5
5
  let path = require("path");
@@ -635,6 +635,8 @@ var ExtractionSession = class {
635
635
  rootDir = null;
636
636
  /** Serialized path aliases, harvested by the adapter from bundler config. */
637
637
  pathAliasesJson = null;
638
+ /** The host's export conditions, in its order, for the system loader. */
639
+ conditions = [];
638
640
  assetCopyCache = /* @__PURE__ */ new Map();
639
641
  /** Physical asset files registered with the host watcher. */
640
642
  assetDependencyPaths = /* @__PURE__ */ new Set();
@@ -645,8 +647,16 @@ var ExtractionSession = class {
645
647
  /** Whether the analysis-inputs hydration corpus is written to disk. Only
646
648
  * isolated loader workers replay it; an in-process loader reads memory. */
647
649
  persistAnalysisInputs = false;
650
+ /** Whether this session serves development (a watch), where an error-level
651
+ * diagnostic is reported and the session keeps running. Only a build
652
+ * fails on one. */
653
+ development = false;
648
654
  /** Absolute directory prefixes for external packages (loader allowlist). */
649
655
  externalPackageDirs = [];
656
+ /** Those whose package is linked rather than installed. */
657
+ externalLinkedDirs = [];
658
+ /** Those read from their package's compiled output. */
659
+ externalOutputDirs = [];
650
660
  /** Absolute package dir → owning specifier (cross-source correlation). */
651
661
  externalDirOwners = {};
652
662
  /** rootDir-relative external file → owning specifier (correlation join). */
@@ -701,7 +711,8 @@ var ExtractionSession = class {
701
711
  engineApi: () => engineApi(),
702
712
  prefix: "[animus-next]",
703
713
  strict: () => !!this.options.strict,
704
- warn: (message) => this.warn(message)
714
+ warn: (message) => this.warn(message),
715
+ reportErrors: () => this.reportErrors()
705
716
  });
706
717
  systemDependencyKeys = /* @__PURE__ */ new Set();
707
718
  /** Loader-reported dependency paths for bundler watch registration. */
@@ -769,6 +780,16 @@ var ExtractionSession = class {
769
780
  warn(msg) {
770
781
  console.warn(`[animus] ${msg}`);
771
782
  }
783
+ reportErrors() {
784
+ return this.development ? (message) => console.error(message) : void 0;
785
+ }
786
+ /** A build-strictness check that failed: a build throws `message`, and
787
+ * development reports it at error level and takes the non-strict path. */
788
+ strictFailure(message) {
789
+ const report = this.reportErrors();
790
+ if (!report) throw new Error(message);
791
+ report(message);
792
+ }
772
793
  now() {
773
794
  return this.verbose ? performance.now() : 0;
774
795
  }
@@ -781,6 +802,8 @@ var ExtractionSession = class {
781
802
  /** Per-specifier discovery outcomes from the last full collection —
782
803
  * driver-consumed reporting surface (the CLI's summary). */
783
804
  lastExternalOutcomes = [];
805
+ /** The analysed kits' descriptors, from the last discovery. */
806
+ kitDescriptors = [];
784
807
  /** Component count of the last published analysis, null before the first —
785
808
  * read by drivers instead of re-parsing the manifest JSON every cycle. */
786
809
  lastComponentCount = null;
@@ -1101,7 +1124,8 @@ var ExtractionSession = class {
1101
1124
  systemPath: resolvedSystemPath,
1102
1125
  rootDir,
1103
1126
  prefix: this.options.prefix,
1104
- prefixContextualVars: this.options.prefixContextualVars
1127
+ prefixContextualVars: this.options.prefixContextualVars,
1128
+ conditions: this.conditions
1105
1129
  });
1106
1130
  this.assetCopyCache.clear();
1107
1131
  this.assetDependencyPaths.clear();
@@ -1146,7 +1170,12 @@ var ExtractionSession = class {
1146
1170
  }
1147
1171
  bt.fileRead = this.elapsed(t);
1148
1172
  t = this.now();
1149
- const packageNames = require_pipeline.extractSystemFilePackages(resolvedSystemPath, require_pipeline.engineImportParser(engineApi()));
1173
+ const discoveryDiagnostics = [];
1174
+ const packageNames = await require_pipeline.extractSystemFilePackages(resolvedSystemPath, require_pipeline.engineModuleParser(engineApi()), (diagnostic) => discoveryDiagnostics.push(diagnostic), (name) => {
1175
+ const entry = resolvePackagesByName(rootDir, [name])[name];
1176
+ return entry ? (0, path.resolve)(rootDir, entry) : null;
1177
+ });
1178
+ discoveryDiagnostics.push(...require_pipeline.importedKitDiagnostics(rawEntries, engineApi(), rootDir, packageNames));
1150
1179
  const preResolved = resolvePackagesByName(rootDir, packageNames);
1151
1180
  const rawExternalFiles = /* @__PURE__ */ new Map();
1152
1181
  const collected = await require_pipeline.collectExternalPackageSources({
@@ -1173,16 +1202,20 @@ var ExtractionSession = class {
1173
1202
  });
1174
1203
  this.lastExternalOutcomes = collected.outcomes;
1175
1204
  this.ingestionFailureDiagnostics = ingestionFailures;
1176
- require_pipeline.surfaceManifestDiagnostics({ diagnostics: require_pipeline.noKitFilesDiagnostics(collected.outcomes) }, (message) => this.warn(message));
1205
+ require_pipeline.surfaceManifestDiagnostics({ diagnostics: [...discoveryDiagnostics, ...collected.diagnostics] }, (message) => this.warn(message), {
1206
+ levels: this.options.diagnostics,
1207
+ strict: this.options.strict,
1208
+ reportErrors: this.reportErrors()
1209
+ });
1177
1210
  const unresolvableMessage = require_pipeline.unresolvableIncludesMessage(collected.outcomes);
1178
1211
  if (unresolvableMessage !== null) {
1179
- if (this.options.strict) throw new Error(unresolvableMessage);
1180
- this.warn(unresolvableMessage);
1212
+ if (this.options.strict) this.strictFailure(unresolvableMessage);
1213
+ else this.warn(unresolvableMessage);
1181
1214
  }
1182
1215
  const staleDistMessage = require_pipeline.staleDistIncludesMessage(collected.outcomes);
1183
1216
  if (staleDistMessage !== null) {
1184
- if (this.options.strict) throw new Error(staleDistMessage);
1185
- this.warn(staleDistMessage);
1217
+ if (this.options.strict) this.strictFailure(staleDistMessage);
1218
+ else this.warn(staleDistMessage);
1186
1219
  }
1187
1220
  const rejectedSpecifiers = /* @__PURE__ */ new Set();
1188
1221
  const crossVolumeDetails = [];
@@ -1194,11 +1227,12 @@ var ExtractionSession = class {
1194
1227
  this.stickyDiagnostics.delete("cross-volume");
1195
1228
  if (rejectedSpecifiers.size > 0) {
1196
1229
  const message = `ANIMUS_EXTERNAL_CROSS_VOLUME_UNSUPPORTED: external package source root(s) on a different volume than the project root (${rootDir}): ${crossVolumeDetails.join("; ")} — cross-volume workspace sources are unsupported; the package(s) are excluded from extraction and watching`;
1197
- if (this.options.strict) throw new Error(`[${this.driverLabel}] ${message}`);
1198
- this.stickyDiagnostics.set("cross-volume", message);
1230
+ if (this.options.strict) this.strictFailure(`[${this.driverLabel}] ${message}`);
1231
+ else this.stickyDiagnostics.set("cross-volume", message);
1199
1232
  }
1200
1233
  for (const message of this.stickyDiagnostics.values()) this.warn(message);
1201
1234
  const admitted = require_pipeline.excludeCollectedPackages(collected, rejectedSpecifiers, rootDir);
1235
+ this.kitDescriptors = admitted.kitDescriptors;
1202
1236
  try {
1203
1237
  const identity = require_pipeline.createSourceIdentity(rootDir);
1204
1238
  this.externalRootOwners = /* @__PURE__ */ new Map();
@@ -1242,6 +1276,8 @@ var ExtractionSession = class {
1242
1276
  });
1243
1277
  }
1244
1278
  this.externalPackageDirs = admitted.packageDirs;
1279
+ this.externalLinkedDirs = admitted.linkedDirs;
1280
+ this.externalOutputDirs = admitted.outputDirs;
1245
1281
  bt.packageResolve = this.elapsed(t);
1246
1282
  this.beginStatusAttempt();
1247
1283
  let accepted;
@@ -1453,7 +1489,9 @@ var ExtractionSession = class {
1453
1489
  analysisContext: {
1454
1490
  skippedSources: [...this.skippedSources, ...this.ingestionFailureDiagnostics.map((d) => d.file)].map((file) => (0, path.isAbsolute)(file) ? (0, path.relative)(this.rootDir, file) : file),
1455
1491
  unbundledComputedImports: this.host.unbundledComputedImports,
1456
- packageDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir))
1492
+ packageDirs: this.externalPackageDirs.map((dir) => (0, path.relative)(this.rootDir, dir)),
1493
+ linkedDirs: this.externalLinkedDirs.map((dir) => (0, path.relative)(this.rootDir, dir)),
1494
+ outputDirs: this.externalOutputDirs.map((dir) => (0, path.relative)(this.rootDir, dir))
1457
1495
  }
1458
1496
  };
1459
1497
  this.writeAnalysisStatus("analyzing", pending);
@@ -1462,9 +1500,11 @@ var ExtractionSession = class {
1462
1500
  warn: (message) => this.warn(message),
1463
1501
  info: (message) => this.log(message),
1464
1502
  strict: this.options.strict,
1465
- extraDiagnostics: this.ingestionFailureDiagnostics
1503
+ diagnostics: this.options.diagnostics,
1504
+ reportErrors: this.reportErrors(),
1505
+ extraDiagnostics: this.ingestionFailureDiagnostics,
1506
+ kitDescriptors: this.kitDescriptors
1466
1507
  });
1467
- require_pipeline.assertNoErrorDiagnostics(result.manifest?.diagnostics);
1468
1508
  require_pipeline.enforceExternalTokenContracts({
1469
1509
  diagnostics: result.manifest?.diagnostics,
1470
1510
  fileOwners: this.externalFileOwners,
@@ -1472,7 +1512,8 @@ var ExtractionSession = class {
1472
1512
  sourceThemeManifestsJson: system.sourceThemeManifestsJson,
1473
1513
  strict: this.options.strict,
1474
1514
  prefix: `[${this.driverLabel}]`,
1475
- warn: (message) => this.warn(message)
1515
+ warn: (message) => this.warn(message),
1516
+ reportErrors: this.reportErrors()
1476
1517
  });
1477
1518
  bt.jsonSerialize = result.timings.serializeMs;
1478
1519
  bt.rustExtract = result.timings.extractMs;
@@ -1506,11 +1547,13 @@ var ExtractionSession = class {
1506
1547
  require_pipeline.reportSurvivingAssetPlaceholders(fullCss, {
1507
1548
  strict: this.options.strict,
1508
1549
  warn: (message) => this.warn(message),
1550
+ reportErrors: this.reportErrors(),
1509
1551
  prefix: `[${this.driverLabel}]`
1510
1552
  });
1511
1553
  require_pipeline.reportSurvivingAssetPlaceholders(require_pipeline.generatedModuleCode(manifest), {
1512
1554
  strict: this.options.strict,
1513
1555
  warn: (message) => this.warn(message),
1556
+ reportErrors: this.reportErrors(),
1514
1557
  prefix: `[${this.driverLabel}]`,
1515
1558
  surface: "generated runtime modules"
1516
1559
  });
@@ -1828,8 +1871,8 @@ var ExtractionSession = class {
1828
1871
  const resolvedPath = this.resolveAssetSpecifier(specifier);
1829
1872
  if (!resolvedPath) {
1830
1873
  const message = `unresolvable asset() specifier: ${specifier}`;
1831
- if (this.options.strict) throw new Error(`[${this.driverLabel}] ${message}`);
1832
- this.warn(message);
1874
+ if (this.options.strict) this.strictFailure(`[${this.driverLabel}] ${message}`);
1875
+ else this.warn(message);
1833
1876
  urlBySpecifier.set(specifier, specifier);
1834
1877
  continue;
1835
1878
  }
package/dist/session.mjs CHANGED
@@ -1,4 +1,4 @@
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";
1
+ import { $ as discoverFiles, At as surfaceManifestDiagnostics, B as unresolvableIncludesMessage, Bt as substituteSheetAssets, C as resolveAssetFile, D as engineModuleParser, Dt as isDeletedSource, E as collectExternalPackageSources, Gt as assembleStylesheet, H as createSourceIdentity, Ht as contentHash, It as findSheetAssetSpecifiers, Jt as __require, Lt as generatedModuleCode, M as firstOwners, Mt as unreadableSourceDiagnostic, N as importedKitDiagnostics, O as excludeCollectedPackages, P as isExcludedPackageRelativePath, Rt as reportSurvivingAssetPlaceholders, S as enforceExternalTokenContracts, T as createSourceCorpus, U as isPathWithinRoot, V as walkPackageSources, Vt as parseInternalWire, W as sharesVolumeRoot, X as isJsonString, Y as isJsonBlock, _ as runProjectAnalysis, b as resolveLightningTargets, ct as resolveMode, f as serializeStaticCss, ft as createV2EngineApi, g as clearEngineCache, gt as projectExternalFileOwners, i as snapshotFilePlans, j as findPackageRoot, k as extractSystemFilePackages, lt as resolveVerbosity, r as hashReplacementPlans, s as buildSystemPropsModule, st as createExcludeMatcher, t as toWatchKeys, u as loadSystemConfig, vt as DEFAULT_EXTENSIONS, y as postProcessCss, z as staleDistIncludesMessage } from "./pipeline-Bl20tbu_.mjs";
2
2
  import { randomUUID } from "crypto";
3
3
  import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, watch, writeFileSync } from "fs";
4
4
  import { basename, dirname, extname, isAbsolute, join, relative, resolve } from "path";
@@ -634,6 +634,8 @@ var ExtractionSession = class {
634
634
  rootDir = null;
635
635
  /** Serialized path aliases, harvested by the adapter from bundler config. */
636
636
  pathAliasesJson = null;
637
+ /** The host's export conditions, in its order, for the system loader. */
638
+ conditions = [];
637
639
  assetCopyCache = /* @__PURE__ */ new Map();
638
640
  /** Physical asset files registered with the host watcher. */
639
641
  assetDependencyPaths = /* @__PURE__ */ new Set();
@@ -644,8 +646,16 @@ var ExtractionSession = class {
644
646
  /** Whether the analysis-inputs hydration corpus is written to disk. Only
645
647
  * isolated loader workers replay it; an in-process loader reads memory. */
646
648
  persistAnalysisInputs = false;
649
+ /** Whether this session serves development (a watch), where an error-level
650
+ * diagnostic is reported and the session keeps running. Only a build
651
+ * fails on one. */
652
+ development = false;
647
653
  /** Absolute directory prefixes for external packages (loader allowlist). */
648
654
  externalPackageDirs = [];
655
+ /** Those whose package is linked rather than installed. */
656
+ externalLinkedDirs = [];
657
+ /** Those read from their package's compiled output. */
658
+ externalOutputDirs = [];
649
659
  /** Absolute package dir → owning specifier (cross-source correlation). */
650
660
  externalDirOwners = {};
651
661
  /** rootDir-relative external file → owning specifier (correlation join). */
@@ -700,7 +710,8 @@ var ExtractionSession = class {
700
710
  engineApi: () => engineApi(),
701
711
  prefix: "[animus-next]",
702
712
  strict: () => !!this.options.strict,
703
- warn: (message) => this.warn(message)
713
+ warn: (message) => this.warn(message),
714
+ reportErrors: () => this.reportErrors()
704
715
  });
705
716
  systemDependencyKeys = /* @__PURE__ */ new Set();
706
717
  /** Loader-reported dependency paths for bundler watch registration. */
@@ -768,6 +779,16 @@ var ExtractionSession = class {
768
779
  warn(msg) {
769
780
  console.warn(`[animus] ${msg}`);
770
781
  }
782
+ reportErrors() {
783
+ return this.development ? (message) => console.error(message) : void 0;
784
+ }
785
+ /** A build-strictness check that failed: a build throws `message`, and
786
+ * development reports it at error level and takes the non-strict path. */
787
+ strictFailure(message) {
788
+ const report = this.reportErrors();
789
+ if (!report) throw new Error(message);
790
+ report(message);
791
+ }
771
792
  now() {
772
793
  return this.verbose ? performance.now() : 0;
773
794
  }
@@ -780,6 +801,8 @@ var ExtractionSession = class {
780
801
  /** Per-specifier discovery outcomes from the last full collection —
781
802
  * driver-consumed reporting surface (the CLI's summary). */
782
803
  lastExternalOutcomes = [];
804
+ /** The analysed kits' descriptors, from the last discovery. */
805
+ kitDescriptors = [];
783
806
  /** Component count of the last published analysis, null before the first —
784
807
  * read by drivers instead of re-parsing the manifest JSON every cycle. */
785
808
  lastComponentCount = null;
@@ -1100,7 +1123,8 @@ var ExtractionSession = class {
1100
1123
  systemPath: resolvedSystemPath,
1101
1124
  rootDir,
1102
1125
  prefix: this.options.prefix,
1103
- prefixContextualVars: this.options.prefixContextualVars
1126
+ prefixContextualVars: this.options.prefixContextualVars,
1127
+ conditions: this.conditions
1104
1128
  });
1105
1129
  this.assetCopyCache.clear();
1106
1130
  this.assetDependencyPaths.clear();
@@ -1145,7 +1169,12 @@ var ExtractionSession = class {
1145
1169
  }
1146
1170
  bt.fileRead = this.elapsed(t);
1147
1171
  t = this.now();
1148
- const packageNames = extractSystemFilePackages(resolvedSystemPath, engineImportParser(engineApi()));
1172
+ const discoveryDiagnostics = [];
1173
+ const packageNames = await extractSystemFilePackages(resolvedSystemPath, engineModuleParser(engineApi()), (diagnostic) => discoveryDiagnostics.push(diagnostic), (name) => {
1174
+ const entry = resolvePackagesByName(rootDir, [name])[name];
1175
+ return entry ? resolve(rootDir, entry) : null;
1176
+ });
1177
+ discoveryDiagnostics.push(...importedKitDiagnostics(rawEntries, engineApi(), rootDir, packageNames));
1149
1178
  const preResolved = resolvePackagesByName(rootDir, packageNames);
1150
1179
  const rawExternalFiles = /* @__PURE__ */ new Map();
1151
1180
  const collected = await collectExternalPackageSources({
@@ -1172,16 +1201,20 @@ var ExtractionSession = class {
1172
1201
  });
1173
1202
  this.lastExternalOutcomes = collected.outcomes;
1174
1203
  this.ingestionFailureDiagnostics = ingestionFailures;
1175
- surfaceManifestDiagnostics({ diagnostics: noKitFilesDiagnostics(collected.outcomes) }, (message) => this.warn(message));
1204
+ surfaceManifestDiagnostics({ diagnostics: [...discoveryDiagnostics, ...collected.diagnostics] }, (message) => this.warn(message), {
1205
+ levels: this.options.diagnostics,
1206
+ strict: this.options.strict,
1207
+ reportErrors: this.reportErrors()
1208
+ });
1176
1209
  const unresolvableMessage = unresolvableIncludesMessage(collected.outcomes);
1177
1210
  if (unresolvableMessage !== null) {
1178
- if (this.options.strict) throw new Error(unresolvableMessage);
1179
- this.warn(unresolvableMessage);
1211
+ if (this.options.strict) this.strictFailure(unresolvableMessage);
1212
+ else this.warn(unresolvableMessage);
1180
1213
  }
1181
1214
  const staleDistMessage = staleDistIncludesMessage(collected.outcomes);
1182
1215
  if (staleDistMessage !== null) {
1183
- if (this.options.strict) throw new Error(staleDistMessage);
1184
- this.warn(staleDistMessage);
1216
+ if (this.options.strict) this.strictFailure(staleDistMessage);
1217
+ else this.warn(staleDistMessage);
1185
1218
  }
1186
1219
  const rejectedSpecifiers = /* @__PURE__ */ new Set();
1187
1220
  const crossVolumeDetails = [];
@@ -1193,11 +1226,12 @@ var ExtractionSession = class {
1193
1226
  this.stickyDiagnostics.delete("cross-volume");
1194
1227
  if (rejectedSpecifiers.size > 0) {
1195
1228
  const message = `ANIMUS_EXTERNAL_CROSS_VOLUME_UNSUPPORTED: external package source root(s) on a different volume than the project root (${rootDir}): ${crossVolumeDetails.join("; ")} — cross-volume workspace sources are unsupported; the package(s) are excluded from extraction and watching`;
1196
- if (this.options.strict) throw new Error(`[${this.driverLabel}] ${message}`);
1197
- this.stickyDiagnostics.set("cross-volume", message);
1229
+ if (this.options.strict) this.strictFailure(`[${this.driverLabel}] ${message}`);
1230
+ else this.stickyDiagnostics.set("cross-volume", message);
1198
1231
  }
1199
1232
  for (const message of this.stickyDiagnostics.values()) this.warn(message);
1200
1233
  const admitted = excludeCollectedPackages(collected, rejectedSpecifiers, rootDir);
1234
+ this.kitDescriptors = admitted.kitDescriptors;
1201
1235
  try {
1202
1236
  const identity = createSourceIdentity(rootDir);
1203
1237
  this.externalRootOwners = /* @__PURE__ */ new Map();
@@ -1241,6 +1275,8 @@ var ExtractionSession = class {
1241
1275
  });
1242
1276
  }
1243
1277
  this.externalPackageDirs = admitted.packageDirs;
1278
+ this.externalLinkedDirs = admitted.linkedDirs;
1279
+ this.externalOutputDirs = admitted.outputDirs;
1244
1280
  bt.packageResolve = this.elapsed(t);
1245
1281
  this.beginStatusAttempt();
1246
1282
  let accepted;
@@ -1452,7 +1488,9 @@ var ExtractionSession = class {
1452
1488
  analysisContext: {
1453
1489
  skippedSources: [...this.skippedSources, ...this.ingestionFailureDiagnostics.map((d) => d.file)].map((file) => isAbsolute(file) ? relative(this.rootDir, file) : file),
1454
1490
  unbundledComputedImports: this.host.unbundledComputedImports,
1455
- packageDirs: this.externalPackageDirs.map((dir) => relative(this.rootDir, dir))
1491
+ packageDirs: this.externalPackageDirs.map((dir) => relative(this.rootDir, dir)),
1492
+ linkedDirs: this.externalLinkedDirs.map((dir) => relative(this.rootDir, dir)),
1493
+ outputDirs: this.externalOutputDirs.map((dir) => relative(this.rootDir, dir))
1456
1494
  }
1457
1495
  };
1458
1496
  this.writeAnalysisStatus("analyzing", pending);
@@ -1461,9 +1499,11 @@ var ExtractionSession = class {
1461
1499
  warn: (message) => this.warn(message),
1462
1500
  info: (message) => this.log(message),
1463
1501
  strict: this.options.strict,
1464
- extraDiagnostics: this.ingestionFailureDiagnostics
1502
+ diagnostics: this.options.diagnostics,
1503
+ reportErrors: this.reportErrors(),
1504
+ extraDiagnostics: this.ingestionFailureDiagnostics,
1505
+ kitDescriptors: this.kitDescriptors
1465
1506
  });
1466
- assertNoErrorDiagnostics(result.manifest?.diagnostics);
1467
1507
  enforceExternalTokenContracts({
1468
1508
  diagnostics: result.manifest?.diagnostics,
1469
1509
  fileOwners: this.externalFileOwners,
@@ -1471,7 +1511,8 @@ var ExtractionSession = class {
1471
1511
  sourceThemeManifestsJson: system.sourceThemeManifestsJson,
1472
1512
  strict: this.options.strict,
1473
1513
  prefix: `[${this.driverLabel}]`,
1474
- warn: (message) => this.warn(message)
1514
+ warn: (message) => this.warn(message),
1515
+ reportErrors: this.reportErrors()
1475
1516
  });
1476
1517
  bt.jsonSerialize = result.timings.serializeMs;
1477
1518
  bt.rustExtract = result.timings.extractMs;
@@ -1505,11 +1546,13 @@ var ExtractionSession = class {
1505
1546
  reportSurvivingAssetPlaceholders(fullCss, {
1506
1547
  strict: this.options.strict,
1507
1548
  warn: (message) => this.warn(message),
1549
+ reportErrors: this.reportErrors(),
1508
1550
  prefix: `[${this.driverLabel}]`
1509
1551
  });
1510
1552
  reportSurvivingAssetPlaceholders(generatedModuleCode(manifest), {
1511
1553
  strict: this.options.strict,
1512
1554
  warn: (message) => this.warn(message),
1555
+ reportErrors: this.reportErrors(),
1513
1556
  prefix: `[${this.driverLabel}]`,
1514
1557
  surface: "generated runtime modules"
1515
1558
  });
@@ -1827,8 +1870,8 @@ var ExtractionSession = class {
1827
1870
  const resolvedPath = this.resolveAssetSpecifier(specifier);
1828
1871
  if (!resolvedPath) {
1829
1872
  const message = `unresolvable asset() specifier: ${specifier}`;
1830
- if (this.options.strict) throw new Error(`[${this.driverLabel}] ${message}`);
1831
- this.warn(message);
1873
+ if (this.options.strict) this.strictFailure(`[${this.driverLabel}] ${message}`);
1874
+ else this.warn(message);
1832
1875
  urlBySpecifier.set(specifier, specifier);
1833
1876
  continue;
1834
1877
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/extract",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
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.22",
58
+ "@animus-ui/properties": "0.1.24",
59
59
  "browserslist": "^4.28.8",
60
60
  "lightningcss": "^1.33.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@animus-ui/assertions": "0.1.22",
64
- "@animus-ui/system": "0.1.22",
63
+ "@animus-ui/assertions": "0.1.24",
64
+ "@animus-ui/system": "0.1.24",
65
65
  "@mdx-js/mdx": "3.1.1",
66
66
  "@napi-rs/cli": "^3.10.5",
67
67
  "svelte": "5.57.0"