@animus-ui/extract 0.1.16 → 0.1.17

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 (42) hide show
  1. package/README.md +3 -1
  2. package/crates/extract-v2/animus-extract-v2.darwin-arm64.node +0 -0
  3. package/crates/extract-v2/animus-extract-v2.linux-arm64-gnu.node +0 -0
  4. package/crates/extract-v2/animus-extract-v2.linux-x64-gnu.node +0 -0
  5. package/crates/extract-v2/index.d.ts +20 -2
  6. package/dist/index.cjs +2 -1
  7. package/dist/index.mjs +2 -2
  8. package/dist/pipeline/analyze-project-args.d.ts +8 -1
  9. package/dist/pipeline/analyze-project-args.d.ts.map +1 -1
  10. package/dist/pipeline/core-options.d.ts +10 -2
  11. package/dist/pipeline/core-options.d.ts.map +1 -1
  12. package/dist/pipeline/dynamic-prop-config.d.ts +31 -4
  13. package/dist/pipeline/dynamic-prop-config.d.ts.map +1 -1
  14. package/dist/pipeline/engine-adapter.d.ts +1 -1
  15. package/dist/pipeline/engine-adapter.d.ts.map +1 -1
  16. package/dist/pipeline/index.d.ts +2 -2
  17. package/dist/pipeline/index.d.ts.map +1 -1
  18. package/dist/pipeline/manifest-diagnostics.d.ts +4 -2
  19. package/dist/pipeline/manifest-diagnostics.d.ts.map +1 -1
  20. package/dist/pipeline/manifest-schema.d.ts +7 -0
  21. package/dist/pipeline/manifest-schema.d.ts.map +1 -1
  22. package/dist/pipeline/prefix.d.ts +2 -0
  23. package/dist/pipeline/prefix.d.ts.map +1 -1
  24. package/dist/pipeline/run-analysis.d.ts.map +1 -1
  25. package/dist/pipeline/source-corpus.d.ts +11 -0
  26. package/dist/pipeline/source-corpus.d.ts.map +1 -1
  27. package/dist/pipeline/source-ingestion.d.ts +12 -0
  28. package/dist/pipeline/source-ingestion.d.ts.map +1 -1
  29. package/dist/pipeline/system-config.d.ts +9 -2
  30. package/dist/pipeline/system-config.d.ts.map +1 -1
  31. package/dist/pipeline/system-props-module.d.ts +3 -1
  32. package/dist/pipeline/system-props-module.d.ts.map +1 -1
  33. package/dist/pipeline/unit-fallback.d.ts.map +1 -1
  34. package/dist/{pipeline-DeEENy5C.mjs → pipeline-D7TdVERQ.mjs} +104 -16
  35. package/dist/{pipeline-x1yBZ2UP.cjs → pipeline-OMz1HGqU.cjs} +109 -15
  36. package/dist/session/extraction-session.d.ts +16 -4
  37. package/dist/session/extraction-session.d.ts.map +1 -1
  38. package/dist/session/index.d.ts +1 -1
  39. package/dist/session/index.d.ts.map +1 -1
  40. package/dist/session.cjs +69 -34
  41. package/dist/session.mjs +69 -35
  42. package/package.json +4 -4
@@ -100,6 +100,14 @@ export declare class ExtractionSession {
100
100
  onArtifactWrite: ((name: string, content: string) => void) | null;
101
101
  private statusAttemptId;
102
102
  private statusAttemptOpen;
103
+ /** Message of the aborted-parse rejection holding publication. While set,
104
+ * the cache keeps every observed source so the repair publishes them in
105
+ * one generation; a successful publication clears it. */
106
+ private heldRejection;
107
+ /** A system reload an aborted parse rejected. Its dependency hashes already
108
+ * advanced, so the first batch that passes the parse check publishes
109
+ * through the full pipeline, which loads the latest system. */
110
+ private systemReloadOwed;
103
111
  /** Monotonic readiness witness: flips true on the first complete
104
112
  * publication and never regresses; every later status write carries it. */
105
113
  private firstEmissionComplete;
@@ -136,14 +144,18 @@ export declare class ExtractionSession {
136
144
  /** Resolve the scan configuration from options — the single source of the
137
145
  * exclude/extension policy shared by the full and incremental pipelines. */
138
146
  private resolveScanConfig;
139
- /** One single-flight analysis transaction per event batch: concurrent
140
- * entries join the in-flight promise; each settled entry reports outcome. */
147
+ /** Concurrent entries wait for publication, then ingest their own batch;
148
+ * content hashes coalesce observations the prior analysis covered. */
141
149
  handleWatchUpdate(changes: WatchChanges): Promise<void>;
142
150
  private routeWatchUpdate;
143
- /** Owner-side entry for a batch a non-owning compiler observed. Serializes
144
- * behind any in-flight transaction — it has no other delivery. */
151
+ /** The shared owner gate for local and forwarded batches. Every waiter
152
+ * rechecks the slot so distinct batches publish in arrival order. */
145
153
  ingestForwardedBatch(changes: WatchChanges): Promise<void>;
146
154
  private processWatchUpdate;
155
+ /** An aborted parse fails the attempt in every mode with a terminal
156
+ * `failed` status, so the last commit stays current, and holds publication
157
+ * until an attempt without one publishes. */
158
+ private throwOnAbortedParse;
147
159
  private publishSourceIngestion;
148
160
  /** Full analysis + publication, registered in the one in-flight
149
161
  * transaction slot; a nested reload leaves the enclosing registration. */
@@ -1 +1 @@
1
- {"version":3,"file":"extraction-session.d.ts","sourceRoot":"","sources":["../../session/extraction-session.ts"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAG/C,OAAO,KAAK,EAGV,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;AA+BD;6EAC6E;AAC7E,qBAAa,iBAAiB;IAC5B,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,CAA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ACvC,OAAO,CAAC,mBAAmB;IAuB3B;iEAC6D;IAC7D,wBAAwB,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CA2BzD;IAED,sEAAsE;IACtE,OAAO,CAAC,4BAA4B,CAAS;IAE7C;0EACsE;IACtE,OAAO,CAAC,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;2EACuE;IACvE,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"}
@@ -6,5 +6,5 @@ export { analysisCommitPath, analysisInputsPath, analysisStatusPath, ANIMUS_ARTI
6
6
  export type { AnalysisCommit, AnalysisStatus, SessionEnvelope, } from './session-paths';
7
7
  export { runSessionPipeline, startTurbopackWatcher, } from './turbopack-orchestrator';
8
8
  export type { TurbopackWatcherHandle, TurbopackWatchOutcome, } from './turbopack-orchestrator';
9
- export { engineApi, getAnalysisStartedPromise, getAnalyzedHashes, getManifestJson, getReplacementEpoch, getSessionArtifactDir, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedSystemProps, setAnalysisStartedPromise, setSharedEngine, } from './singleton';
9
+ export { engineApi, getAnalysisStartedPromise, getAnalyzedHashes, getManifestJson, getReplacementEpoch, getSessionArtifactDir, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedSystemProps, resetAnalysisStartedPromise, setAnalysisStartedPromise, setSharedEngine, } from './singleton';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../session/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzE,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,yBAAyB,EACzB,eAAe,GAChB,MAAM,aAAa,CAAC"}
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,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,cAAc,EACd,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,SAAS,EACT,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,EACzB,eAAe,GAChB,MAAM,aAAa,CAAC"}
package/dist/session.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_pipeline = require("./pipeline-x1yBZ2UP.cjs");
2
+ const require_pipeline = require("./pipeline-OMz1HGqU.cjs");
3
3
  let crypto = require("crypto");
4
4
  let fs = require("fs");
5
5
  let path = require("path");
@@ -550,6 +550,8 @@ const LEGACY_FLAT_ARTIFACTS = [
550
550
  function isDiskString(value) {
551
551
  return Object(value) !== value && Object.prototype.toString.call(value) === "[object String]";
552
552
  }
553
+ /** Rejection of an attempt whose corpus holds an aborted parse. */
554
+ var AbortedParseRejection = class extends Error {};
553
555
  function isDiskNumber(value) {
554
556
  return Object(value) !== value && Object.prototype.toString.call(value) === "[object Number]";
555
557
  }
@@ -654,6 +656,14 @@ var ExtractionSession = class {
654
656
  onArtifactWrite = null;
655
657
  statusAttemptId = 0;
656
658
  statusAttemptOpen = false;
659
+ /** Message of the aborted-parse rejection holding publication. While set,
660
+ * the cache keeps every observed source so the repair publishes them in
661
+ * one generation; a successful publication clears it. */
662
+ heldRejection = null;
663
+ /** A system reload an aborted parse rejected. Its dependency hashes already
664
+ * advanced, so the first batch that passes the parse check publishes
665
+ * through the full pipeline, which loads the latest system. */
666
+ systemReloadOwed = false;
657
667
  /** Monotonic readiness witness: flips true on the first complete
658
668
  * publication and never regresses; every later status write carries it. */
659
669
  firstEmissionComplete = false;
@@ -669,7 +679,7 @@ var ExtractionSession = class {
669
679
  return sessionArtifactDir(this.rootDir, this.sessionId);
670
680
  }
671
681
  get verbose() {
672
- return this.options.verbose === true || process.env.ANIMUS_DEBUG === "1" || process.env.ANIMUS_DEBUG === "true";
682
+ return require_pipeline.resolveVerbosity(this.options.verbose, process.env.ANIMUS_DEBUG) !== "quiet";
673
683
  }
674
684
  log(msg) {
675
685
  if (this.verbose) console.error(`[animus] ${msg}`);
@@ -716,8 +726,8 @@ var ExtractionSession = class {
716
726
  }
717
727
  return this.scanConfigMemo;
718
728
  }
719
- /** One single-flight analysis transaction per event batch: concurrent
720
- * entries join the in-flight promise; each settled entry reports outcome. */
729
+ /** Concurrent entries wait for publication, then ingest their own batch;
730
+ * content hashes coalesce observations the prior analysis covered. */
721
731
  async handleWatchUpdate(changes) {
722
732
  try {
723
733
  await this.routeWatchUpdate(changes);
@@ -728,27 +738,21 @@ var ExtractionSession = class {
728
738
  this.onCycleSettled?.(null);
729
739
  }
730
740
  async routeWatchUpdate(changes) {
741
+ const hasBatch = (changes.modifiedFiles?.size ?? 0) > 0 || (changes.removedFiles?.size ?? 0) > 0;
731
742
  const inflight = getWatchTransaction();
732
743
  if (inflight) {
733
744
  await inflight;
734
- return;
745
+ if (!hasBatch) return;
735
746
  }
736
747
  if (!this.system) {
737
748
  const owner = getOwningWatchSession();
738
- const hasBatch = (changes.modifiedFiles?.size ?? 0) > 0 || (changes.removedFiles?.size ?? 0) > 0;
739
749
  if (owner && owner !== this && hasBatch) await owner.ingestForwardedBatch(changes);
740
750
  return;
741
751
  }
742
- const transaction = this.processWatchUpdate(changes);
743
- setWatchTransaction(transaction);
744
- try {
745
- await transaction;
746
- } finally {
747
- setWatchTransaction(null);
748
- }
752
+ await this.ingestForwardedBatch(changes);
749
753
  }
750
- /** Owner-side entry for a batch a non-owning compiler observed. Serializes
751
- * behind any in-flight transaction — it has no other delivery. */
754
+ /** The shared owner gate for local and forwarded batches. Every waiter
755
+ * rechecks the slot so distinct batches publish in arrival order. */
752
756
  async ingestForwardedBatch(changes) {
753
757
  if (!this.system) return;
754
758
  for (;;) {
@@ -756,7 +760,7 @@ var ExtractionSession = class {
756
760
  if (!inflight) break;
757
761
  await inflight;
758
762
  }
759
- const transaction = this.processWatchUpdate(changes);
763
+ const transaction = Promise.resolve().then(() => this.processWatchUpdate(changes));
760
764
  setWatchTransaction(transaction);
761
765
  try {
762
766
  await transaction;
@@ -796,7 +800,9 @@ var ExtractionSession = class {
796
800
  const promise = this.runFullPipeline(this.pendingFromBatch(changes));
797
801
  setAnalysisStartedPromise(promise);
798
802
  await promise;
803
+ this.systemReloadOwed = false;
799
804
  } catch (err) {
805
+ if (err instanceof AbortedParseRejection) this.systemReloadOwed = true;
800
806
  try {
801
807
  this.beginStatusAttempt();
802
808
  this.writeAnalysisStatus("failed", this.pendingFromBatch(changes), String(err));
@@ -895,6 +901,21 @@ var ExtractionSession = class {
895
901
  }
896
902
  if (changedPaths.length > 0 || removedAny || assetChanged) {
897
903
  const pending = changedPaths.map((rel) => [rel, this.fileCache.get(rel).hash]);
904
+ const commitObservedBatch = () => {
905
+ for (const update of inventoryUpdates) {
906
+ let inventory = this.externalInventory.get(update.root);
907
+ if (!inventory) {
908
+ inventory = /* @__PURE__ */ new Map();
909
+ this.externalInventory.set(update.root, inventory);
910
+ }
911
+ if (update.hash === null) inventory.delete(update.key);
912
+ else inventory.set(update.key, {
913
+ hash: update.hash,
914
+ abs: update.abs
915
+ });
916
+ }
917
+ for (const key of ownerRemovals) delete this.externalFileOwners[key];
918
+ };
898
919
  let ingested;
899
920
  try {
900
921
  this.beginStatusAttempt();
@@ -902,15 +923,26 @@ var ExtractionSession = class {
902
923
  fileCache: this.fileCache,
903
924
  externalFileOwners: this.externalFileOwners
904
925
  });
926
+ this.throwOnAbortedParse(ingested);
927
+ if (this.systemReloadOwed) {
928
+ this.log("system reload: publishing the reload a parse hold deferred");
929
+ this.resetForHmr();
930
+ await this.runFullPipeline(pending);
931
+ this.systemReloadOwed = false;
932
+ return;
933
+ }
905
934
  this.externalFileOwners = require_pipeline.projectExternalFileOwners(ingested, this.externalFileOwners);
906
935
  resetAnalysisStartedPromise();
907
936
  const promise = this.runIncrementalPipeline(ingested.analysisEntries, pending);
908
937
  setAnalysisStartedPromise(promise);
909
938
  await promise;
910
939
  } catch (err) {
911
- for (const [key, prior] of priorCacheEntries) if (prior === null) this.fileCache.delete(key);
912
- else this.fileCache.set(key, prior);
913
- this.externalFileOwners = priorExternalFileOwners;
940
+ if (err instanceof AbortedParseRejection) commitObservedBatch();
941
+ else {
942
+ for (const [key, prior] of priorCacheEntries) if (prior === null) this.fileCache.delete(key);
943
+ else this.fileCache.set(key, prior);
944
+ this.externalFileOwners = priorExternalFileOwners;
945
+ }
914
946
  if (this.statusAttemptOpen) {
915
947
  this.debouncePending.clear();
916
948
  this.writeAnalysisStatus("failed", pending, String(err));
@@ -918,25 +950,24 @@ var ExtractionSession = class {
918
950
  throw err;
919
951
  }
920
952
  this.publishSourceIngestion(ingested);
921
- for (const update of inventoryUpdates) {
922
- let inventory = this.externalInventory.get(update.root);
923
- if (!inventory) {
924
- inventory = /* @__PURE__ */ new Map();
925
- this.externalInventory.set(update.root, inventory);
926
- }
927
- if (update.hash === null) inventory.delete(update.key);
928
- else inventory.set(update.key, {
929
- hash: update.hash,
930
- abs: update.abs
931
- });
932
- }
933
- for (const key of ownerRemovals) delete this.externalFileOwners[key];
953
+ commitObservedBatch();
934
954
  } else if (this.statusAttemptOpen) {
935
955
  this.debouncePending.clear();
936
- this.writeAnalysisStatus("idle", []);
956
+ if (this.heldRejection === null) this.writeAnalysisStatus("idle", []);
957
+ else this.writeAnalysisStatus("failed", [], this.heldRejection);
937
958
  }
938
959
  }
960
+ /** An aborted parse fails the attempt in every mode with a terminal
961
+ * `failed` status, so the last commit stays current, and holds publication
962
+ * until an attempt without one publishes. */
963
+ throwOnAbortedParse(prepared) {
964
+ const rejection = this.corpus.rejection(prepared);
965
+ if (!rejection) return;
966
+ this.heldRejection = rejection.message;
967
+ throw new AbortedParseRejection(rejection.message);
968
+ }
939
969
  publishSourceIngestion(result) {
970
+ this.heldRejection = null;
940
971
  this.fileCache = new Map(result.originalEntries.map((entry) => [entry.path, {
941
972
  hash: entry.hash,
942
973
  source: entry.source
@@ -1119,6 +1150,7 @@ var ExtractionSession = class {
1119
1150
  let accepted;
1120
1151
  try {
1121
1152
  accepted = await this.corpus.prepare(rawEntries);
1153
+ this.throwOnAbortedParse(accepted);
1122
1154
  } catch (err) {
1123
1155
  this.debouncePending.clear();
1124
1156
  this.writeAnalysisStatus("failed", pending, String(err));
@@ -1368,7 +1400,9 @@ var ExtractionSession = class {
1368
1400
  const systemPropsContent = require_pipeline.buildSystemPropsModule({
1369
1401
  systemPropMapJson: JSON.stringify(manifest?.system_prop_map ?? {}),
1370
1402
  groupRegistryJson: system.groupRegistryJson,
1371
- dynamicProps: manifest?.dynamic_props ?? {}
1403
+ dynamicProps: manifest?.dynamic_props ?? {},
1404
+ admittedTransforms: manifest?.admitted_transforms ?? {},
1405
+ typedSystemProps: manifest?.typed_system_props ?? []
1372
1406
  });
1373
1407
  setSharedSystemProps(systemPropsContent);
1374
1408
  setManifestJson(result.manifestJson);
@@ -1989,6 +2023,7 @@ exports.pruneStaleAssets = pruneStaleAssets;
1989
2023
  exports.readCliLockRecord = readCliLockRecord;
1990
2024
  exports.readJsonEnvelope = readJsonEnvelope;
1991
2025
  exports.replacementEpochPath = replacementEpochPath;
2026
+ exports.resetAnalysisStartedPromise = resetAnalysisStartedPromise;
1992
2027
  exports.runSessionPipeline = runSessionPipeline;
1993
2028
  exports.sessionArtifactDir = sessionArtifactDir;
1994
2029
  exports.setAnalysisStartedPromise = setAnalysisStartedPromise;
package/dist/session.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as enforceExternalTokenContracts, B as firstOwners, D as postProcessCss, E as vocabularyWitnessDiagnostics, F as createSourceCorpus, G as walkPackageSources, I as collectExternalPackageSources, J as sharesVolumeRoot, K as createSourceIdentity, L as excludeCollectedPackages, N as findAssetSpecifiers, O as resolveLightningTargets, P as substituteAssetPlaceholders, R as extractSystemFilePackages, U as staleDistIncludesMessage, V as isExcludedPackageRelativePath, W as unresolvableIncludesMessage, X as discoverFiles, _ as clearEngineCache, a as assertNoErrorDiagnostics, at as resolveMode, c as buildSystemPropsModule, ct as createV2EngineApi, d as loadSystemConfig, ft as projectExternalFileOwners, i as snapshotFilePlans, it as createExcludeMatcher, j as resolveAssetFile, mt as DEFAULT_EXTENSIONS, p as serializeStaticCss, q as isPathWithinRoot, r as hashReplacementPlans, s as formatRustTimingWaterfall, t as toWatchKeys, v as runProjectAnalysis, vt as contentHash, w as unreadableSourceDiagnostic, wt as __require, xt as assembleStylesheet, z as findPackageRoot } from "./pipeline-DeEENy5C.mjs";
1
+ import { A as enforceExternalTokenContracts, B as firstOwners, D as postProcessCss, E as vocabularyWitnessDiagnostics, F as createSourceCorpus, G as walkPackageSources, I as collectExternalPackageSources, J as sharesVolumeRoot, K as createSourceIdentity, L as excludeCollectedPackages, N as findAssetSpecifiers, O as resolveLightningTargets, P as substituteAssetPlaceholders, R as extractSystemFilePackages, St as assembleStylesheet, Tt as __require, U as staleDistIncludesMessage, V as isExcludedPackageRelativePath, W as unresolvableIncludesMessage, X as discoverFiles, _ as clearEngineCache, a as assertNoErrorDiagnostics, at as resolveMode, c as buildSystemPropsModule, d as loadSystemConfig, ht as DEFAULT_EXTENSIONS, i as snapshotFilePlans, it as createExcludeMatcher, j as resolveAssetFile, lt as createV2EngineApi, ot as resolveVerbosity, p as serializeStaticCss, pt as projectExternalFileOwners, q as isPathWithinRoot, r as hashReplacementPlans, s as formatRustTimingWaterfall, t as toWatchKeys, v as runProjectAnalysis, w as unreadableSourceDiagnostic, yt as contentHash, z as findPackageRoot } from "./pipeline-D7TdVERQ.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, extname, join, relative, resolve } from "path";
@@ -549,6 +549,8 @@ const LEGACY_FLAT_ARTIFACTS = [
549
549
  function isDiskString(value) {
550
550
  return Object(value) !== value && Object.prototype.toString.call(value) === "[object String]";
551
551
  }
552
+ /** Rejection of an attempt whose corpus holds an aborted parse. */
553
+ var AbortedParseRejection = class extends Error {};
552
554
  function isDiskNumber(value) {
553
555
  return Object(value) !== value && Object.prototype.toString.call(value) === "[object Number]";
554
556
  }
@@ -653,6 +655,14 @@ var ExtractionSession = class {
653
655
  onArtifactWrite = null;
654
656
  statusAttemptId = 0;
655
657
  statusAttemptOpen = false;
658
+ /** Message of the aborted-parse rejection holding publication. While set,
659
+ * the cache keeps every observed source so the repair publishes them in
660
+ * one generation; a successful publication clears it. */
661
+ heldRejection = null;
662
+ /** A system reload an aborted parse rejected. Its dependency hashes already
663
+ * advanced, so the first batch that passes the parse check publishes
664
+ * through the full pipeline, which loads the latest system. */
665
+ systemReloadOwed = false;
656
666
  /** Monotonic readiness witness: flips true on the first complete
657
667
  * publication and never regresses; every later status write carries it. */
658
668
  firstEmissionComplete = false;
@@ -668,7 +678,7 @@ var ExtractionSession = class {
668
678
  return sessionArtifactDir(this.rootDir, this.sessionId);
669
679
  }
670
680
  get verbose() {
671
- return this.options.verbose === true || process.env.ANIMUS_DEBUG === "1" || process.env.ANIMUS_DEBUG === "true";
681
+ return resolveVerbosity(this.options.verbose, process.env.ANIMUS_DEBUG) !== "quiet";
672
682
  }
673
683
  log(msg) {
674
684
  if (this.verbose) console.error(`[animus] ${msg}`);
@@ -715,8 +725,8 @@ var ExtractionSession = class {
715
725
  }
716
726
  return this.scanConfigMemo;
717
727
  }
718
- /** One single-flight analysis transaction per event batch: concurrent
719
- * entries join the in-flight promise; each settled entry reports outcome. */
728
+ /** Concurrent entries wait for publication, then ingest their own batch;
729
+ * content hashes coalesce observations the prior analysis covered. */
720
730
  async handleWatchUpdate(changes) {
721
731
  try {
722
732
  await this.routeWatchUpdate(changes);
@@ -727,27 +737,21 @@ var ExtractionSession = class {
727
737
  this.onCycleSettled?.(null);
728
738
  }
729
739
  async routeWatchUpdate(changes) {
740
+ const hasBatch = (changes.modifiedFiles?.size ?? 0) > 0 || (changes.removedFiles?.size ?? 0) > 0;
730
741
  const inflight = getWatchTransaction();
731
742
  if (inflight) {
732
743
  await inflight;
733
- return;
744
+ if (!hasBatch) return;
734
745
  }
735
746
  if (!this.system) {
736
747
  const owner = getOwningWatchSession();
737
- const hasBatch = (changes.modifiedFiles?.size ?? 0) > 0 || (changes.removedFiles?.size ?? 0) > 0;
738
748
  if (owner && owner !== this && hasBatch) await owner.ingestForwardedBatch(changes);
739
749
  return;
740
750
  }
741
- const transaction = this.processWatchUpdate(changes);
742
- setWatchTransaction(transaction);
743
- try {
744
- await transaction;
745
- } finally {
746
- setWatchTransaction(null);
747
- }
751
+ await this.ingestForwardedBatch(changes);
748
752
  }
749
- /** Owner-side entry for a batch a non-owning compiler observed. Serializes
750
- * behind any in-flight transaction — it has no other delivery. */
753
+ /** The shared owner gate for local and forwarded batches. Every waiter
754
+ * rechecks the slot so distinct batches publish in arrival order. */
751
755
  async ingestForwardedBatch(changes) {
752
756
  if (!this.system) return;
753
757
  for (;;) {
@@ -755,7 +759,7 @@ var ExtractionSession = class {
755
759
  if (!inflight) break;
756
760
  await inflight;
757
761
  }
758
- const transaction = this.processWatchUpdate(changes);
762
+ const transaction = Promise.resolve().then(() => this.processWatchUpdate(changes));
759
763
  setWatchTransaction(transaction);
760
764
  try {
761
765
  await transaction;
@@ -795,7 +799,9 @@ var ExtractionSession = class {
795
799
  const promise = this.runFullPipeline(this.pendingFromBatch(changes));
796
800
  setAnalysisStartedPromise(promise);
797
801
  await promise;
802
+ this.systemReloadOwed = false;
798
803
  } catch (err) {
804
+ if (err instanceof AbortedParseRejection) this.systemReloadOwed = true;
799
805
  try {
800
806
  this.beginStatusAttempt();
801
807
  this.writeAnalysisStatus("failed", this.pendingFromBatch(changes), String(err));
@@ -894,6 +900,21 @@ var ExtractionSession = class {
894
900
  }
895
901
  if (changedPaths.length > 0 || removedAny || assetChanged) {
896
902
  const pending = changedPaths.map((rel) => [rel, this.fileCache.get(rel).hash]);
903
+ const commitObservedBatch = () => {
904
+ for (const update of inventoryUpdates) {
905
+ let inventory = this.externalInventory.get(update.root);
906
+ if (!inventory) {
907
+ inventory = /* @__PURE__ */ new Map();
908
+ this.externalInventory.set(update.root, inventory);
909
+ }
910
+ if (update.hash === null) inventory.delete(update.key);
911
+ else inventory.set(update.key, {
912
+ hash: update.hash,
913
+ abs: update.abs
914
+ });
915
+ }
916
+ for (const key of ownerRemovals) delete this.externalFileOwners[key];
917
+ };
897
918
  let ingested;
898
919
  try {
899
920
  this.beginStatusAttempt();
@@ -901,15 +922,26 @@ var ExtractionSession = class {
901
922
  fileCache: this.fileCache,
902
923
  externalFileOwners: this.externalFileOwners
903
924
  });
925
+ this.throwOnAbortedParse(ingested);
926
+ if (this.systemReloadOwed) {
927
+ this.log("system reload: publishing the reload a parse hold deferred");
928
+ this.resetForHmr();
929
+ await this.runFullPipeline(pending);
930
+ this.systemReloadOwed = false;
931
+ return;
932
+ }
904
933
  this.externalFileOwners = projectExternalFileOwners(ingested, this.externalFileOwners);
905
934
  resetAnalysisStartedPromise();
906
935
  const promise = this.runIncrementalPipeline(ingested.analysisEntries, pending);
907
936
  setAnalysisStartedPromise(promise);
908
937
  await promise;
909
938
  } catch (err) {
910
- for (const [key, prior] of priorCacheEntries) if (prior === null) this.fileCache.delete(key);
911
- else this.fileCache.set(key, prior);
912
- this.externalFileOwners = priorExternalFileOwners;
939
+ if (err instanceof AbortedParseRejection) commitObservedBatch();
940
+ else {
941
+ for (const [key, prior] of priorCacheEntries) if (prior === null) this.fileCache.delete(key);
942
+ else this.fileCache.set(key, prior);
943
+ this.externalFileOwners = priorExternalFileOwners;
944
+ }
913
945
  if (this.statusAttemptOpen) {
914
946
  this.debouncePending.clear();
915
947
  this.writeAnalysisStatus("failed", pending, String(err));
@@ -917,25 +949,24 @@ var ExtractionSession = class {
917
949
  throw err;
918
950
  }
919
951
  this.publishSourceIngestion(ingested);
920
- for (const update of inventoryUpdates) {
921
- let inventory = this.externalInventory.get(update.root);
922
- if (!inventory) {
923
- inventory = /* @__PURE__ */ new Map();
924
- this.externalInventory.set(update.root, inventory);
925
- }
926
- if (update.hash === null) inventory.delete(update.key);
927
- else inventory.set(update.key, {
928
- hash: update.hash,
929
- abs: update.abs
930
- });
931
- }
932
- for (const key of ownerRemovals) delete this.externalFileOwners[key];
952
+ commitObservedBatch();
933
953
  } else if (this.statusAttemptOpen) {
934
954
  this.debouncePending.clear();
935
- this.writeAnalysisStatus("idle", []);
955
+ if (this.heldRejection === null) this.writeAnalysisStatus("idle", []);
956
+ else this.writeAnalysisStatus("failed", [], this.heldRejection);
936
957
  }
937
958
  }
959
+ /** An aborted parse fails the attempt in every mode with a terminal
960
+ * `failed` status, so the last commit stays current, and holds publication
961
+ * until an attempt without one publishes. */
962
+ throwOnAbortedParse(prepared) {
963
+ const rejection = this.corpus.rejection(prepared);
964
+ if (!rejection) return;
965
+ this.heldRejection = rejection.message;
966
+ throw new AbortedParseRejection(rejection.message);
967
+ }
938
968
  publishSourceIngestion(result) {
969
+ this.heldRejection = null;
939
970
  this.fileCache = new Map(result.originalEntries.map((entry) => [entry.path, {
940
971
  hash: entry.hash,
941
972
  source: entry.source
@@ -1118,6 +1149,7 @@ var ExtractionSession = class {
1118
1149
  let accepted;
1119
1150
  try {
1120
1151
  accepted = await this.corpus.prepare(rawEntries);
1152
+ this.throwOnAbortedParse(accepted);
1121
1153
  } catch (err) {
1122
1154
  this.debouncePending.clear();
1123
1155
  this.writeAnalysisStatus("failed", pending, String(err));
@@ -1367,7 +1399,9 @@ var ExtractionSession = class {
1367
1399
  const systemPropsContent = buildSystemPropsModule({
1368
1400
  systemPropMapJson: JSON.stringify(manifest?.system_prop_map ?? {}),
1369
1401
  groupRegistryJson: system.groupRegistryJson,
1370
- dynamicProps: manifest?.dynamic_props ?? {}
1402
+ dynamicProps: manifest?.dynamic_props ?? {},
1403
+ admittedTransforms: manifest?.admitted_transforms ?? {},
1404
+ typedSystemProps: manifest?.typed_system_props ?? []
1371
1405
  });
1372
1406
  setSharedSystemProps(systemPropsContent);
1373
1407
  setManifestJson(result.manifestJson);
@@ -1952,4 +1986,4 @@ function startTurbopackWatcher(session, rootDir, options = {}) {
1952
1986
  };
1953
1987
  }
1954
1988
  //#endregion
1955
- 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, runSessionPipeline, sessionArtifactDir, setAnalysisStartedPromise, setSharedEngine, startTurbopackWatcher, stylesPath, systemPropsPath, verifyCommitRecord };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/extract",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
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.16",
58
+ "@animus-ui/properties": "0.1.17",
59
59
  "browserslist": "^4.28.8",
60
60
  "lightningcss": "^1.33.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@animus-ui/assertions": "0.1.16",
64
- "@animus-ui/system": "0.1.16",
63
+ "@animus-ui/assertions": "0.1.17",
64
+ "@animus-ui/system": "0.1.17",
65
65
  "@mdx-js/mdx": "3.1.1",
66
66
  "@napi-rs/cli": "^3.10.5",
67
67
  "svelte": "5.57.0"