@dialecte/core 0.9.0 → 0.10.0

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 (33) hide show
  1. package/dist/{dialecte-oAXwOG-Q.js → dialecte-CVLWSkgW.js} +1631 -1557
  2. package/dist/document/query/get/record/get-record.d.ts +14 -1
  3. package/dist/document/query/get/record/get-record.d.ts.map +1 -1
  4. package/dist/document/query/get/record/get-records.d.ts +12 -2
  5. package/dist/document/query/get/record/get-records.d.ts.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/sqlite-engine.js +14 -10
  8. package/dist/store/sqlite/runtime/close-engine.d.ts +5 -2
  9. package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -1
  10. package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -1
  11. package/dist/store/sqlite/runtime/runtime.types.d.ts +3 -2
  12. package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -1
  13. package/dist/test/assert-xml/assert-xml.d.ts +4 -2
  14. package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
  15. package/dist/test/assert-xml/index.d.ts +1 -0
  16. package/dist/test/assert-xml/index.d.ts.map +1 -1
  17. package/dist/test/assert-xml/xml-assertion-error.d.ts +8 -0
  18. package/dist/test/assert-xml/xml-assertion-error.d.ts.map +1 -0
  19. package/dist/test/indexeddb-storage.setup.d.ts +1 -0
  20. package/dist/test/indexeddb-storage.setup.d.ts.map +1 -0
  21. package/dist/test.js +154 -148
  22. package/package.json +40 -4
  23. package/skills/dialecte/SKILL.md +8 -6
  24. package/skills/dialecte/references/api.json +5 -5
  25. package/skills/dialecte/references/api.md +2 -2
  26. package/skills/dialecte/references/testing.md +167 -11
  27. package/skills/dialecte-contributing/SKILL.md +1 -1
  28. package/skills/dialecte-contributing/references/code-rules.md +7 -0
  29. package/skills/dialecte-contributing/references/landing-changes.md +4 -4
  30. package/skills/dialecte-lot/SKILL.md +67 -28
  31. package/skills/dialecte-lot/references/briefs.md +30 -6
  32. package/skills/dialecte-lot/references/standard-check.md +2 -2
  33. package/skills/dialecte-lot/references/stations.md +5 -3
@@ -1,5 +1,5 @@
1
1
  import { Context, RefOrRecord } from '../../..';
2
- import { AnyDialecteConfig, ElementsOf, TrackedRecord } from '../../../../types';
2
+ import { AnyDialecteConfig, ElementsOf, RawRecord, TrackedRecord } from '../../../../types';
3
3
  /**
4
4
  * Fetch a single record by ref.
5
5
  *
@@ -18,4 +18,17 @@ export declare function getRecord<GenericConfig extends AnyDialecteConfig, Gener
18
18
  context: Context<GenericConfig>;
19
19
  ref: RefOrRecord<GenericConfig, GenericElement>;
20
20
  }): Promise<TrackedRecord<GenericConfig, GenericElement> | undefined>;
21
+ /**
22
+ * A record read from the store or the transaction cache, as a read hands it back: a copy with
23
+ * status `unchanged`.
24
+ *
25
+ * @internal shared by `getRecord` and `getRecords`
26
+ *
27
+ * @throws {@link DialecteError} `ELEMENT_TAGNAME_MISMATCH` when the record's tagName differs from
28
+ * `ref.tagName`.
29
+ */
30
+ export declare function trackStoredRecord<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
31
+ raw: RawRecord<GenericConfig, ElementsOf<GenericConfig>>;
32
+ ref: RefOrRecord<GenericConfig, GenericElement>;
33
+ }): TrackedRecord<GenericConfig, GenericElement>;
21
34
  //# sourceMappingURL=get-record.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-record.d.ts","sourceRoot":"","sources":["../../../../../src/document/query/get/record/get-record.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAa,aAAa,EAAE,MAAM,SAAS,CAAA;AAEtF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,SAAS,CAC9B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/B,GAAG,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;CAC/C,GAAG,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,CA+DpE"}
1
+ {"version":3,"file":"get-record.d.ts","sourceRoot":"","sources":["../../../../../src/document/query/get/record/get-record.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEtF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,SAAS,CAC9B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/B,GAAG,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;CAC/C,GAAG,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,CAsDpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,GAAG,EAAE,SAAS,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IACxD,GAAG,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;CAC/C,GAAG,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAU/C"}
@@ -1,10 +1,20 @@
1
1
  import { Context, RefOrRecord } from '../../..';
2
2
  import { AnyDialecteConfig, ElementsOf, TrackedRecord } from '../../../../types';
3
3
  /**
4
- * Batch lookup — resolve multiple refs in parallel.
5
- * Delegates to getRecord per ref; cache hits avoid redundant store calls.
4
+ * Batch lookup: the records of several refs, in the order given; a missing record yields `undefined`.
5
+ *
6
+ * Each ref resolves as with `getRecord`: staged operations first, then the transaction cache, a ref
7
+ * without id by its tag name. The refs left are read from the store in one `getMany` (each id once,
8
+ * however often it is given), and a transaction caches every record it read. Positions naming the
9
+ * same stored record get their own copy of it, sharing its nested arrays (as cache hits do).
10
+ *
11
+ * Perf: counts `core::store::getMany` once per call that reads the store by id, and
12
+ * `core::query::getRecord.miss` once per id it reads.
6
13
  *
7
14
  * @internal the context-level read behind `doc.query.getRecords`; callers use the query
15
+ *
16
+ * @throws {@link DialecteError} `ELEMENT_TAGNAME_MISMATCH` when a ref names another tag than its
17
+ * record: a staged or cached one before any store read, else the first in input order.
8
18
  */
9
19
  export declare function getRecords<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
10
20
  context: Context<GenericConfig>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-records.d.ts","sourceRoot":"","sources":["../../../../../src/document/query/get/record/get-records.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE3E;;;;;GAKG;AACH,wBAAsB,UAAU,CAC/B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/B,IAAI,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,CAAA;CAClD,GAAG,OAAO,CAAC,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAGxE"}
1
+ {"version":3,"file":"get-records.d.ts","sourceRoot":"","sources":["../../../../../src/document/query/get/record/get-records.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAa,aAAa,EAAE,MAAM,SAAS,CAAA;AAEtF;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAC/B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/B,IAAI,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,CAAA;CAClD,GAAG,OAAO,CAAC,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAwBxE"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { G as e, H as t, K as n, U as r, V as i, W as a } from "./utils-Cv4oHia0.js";
2
- import { A as o, C as s, D as c, E as ee, F as l, G as u, H as d, I as f, J as p, K as m, L as h, M as g, N as _, O as v, P as y, R as b, S as x, T as S, U as C, V as w, W as T, X as E, Y as D, _ as O, a as k, b as A, c as j, d as M, f as N, g as P, h as F, i as I, j as L, k as R, l as z, m as B, o as V, p as H, q as U, r as W, s as G, t as K, u as q, v as J, w as Y, x as X, y as Z, z as Q } from "./dialecte-oAXwOG-Q.js";
2
+ import { A as o, C as s, D as c, E as ee, F as l, G as u, H as d, I as f, J as p, K as m, L as h, M as g, N as _, O as v, P as y, R as b, S as x, T as S, U as C, V as w, W as T, X as E, Y as D, _ as O, a as k, b as A, c as j, d as M, f as N, g as P, h as F, i as I, j as L, k as R, l as z, m as B, o as V, p as H, q as U, r as W, s as G, t as K, u as q, v as J, w as Y, x as X, y as Z, z as Q } from "./dialecte-CVLWSkgW.js";
3
3
  import { o as te } from "./running-operations-DCKvzlU7.js";
4
4
  import { C as ne, D as re, E as ie, O as ae, S as oe, T as se, _ as ce, b as le, g as ue, k as de, l as fe, m as pe, n as me, p as he, v as ge, w as _e, x as ve, y as ye } from "./project-key-2ccZ-0gu.js";
5
5
  import { C as be, S as xe, T as Se, a as Ce, b as we, c as Te, g as Ee, h as De, i as $, l as Oe, m as ke, p as Ae, s as je, w as Me, x as Ne, y as Pe } from "./same-json-value-_AChwM_n.js";
@@ -15195,7 +15195,7 @@ async function Es(e) {
15195
15195
  try {
15196
15196
  await Ds({ state: t });
15197
15197
  } finally {
15198
- ks({ state: t });
15198
+ await ks({ state: t });
15199
15199
  }
15200
15200
  }
15201
15201
  async function Ds(e) {
@@ -15222,13 +15222,14 @@ async function Os(e) {
15222
15222
  for (let e of n) e.port.close();
15223
15223
  t.events?.close(), t.events = void 0, t.heartbeat = void 0;
15224
15224
  }
15225
- function ks(e) {
15225
+ async function ks(e) {
15226
15226
  let { state: t } = e;
15227
15227
  t.events?.close(), t.events = void 0, t.heartbeat = void 0;
15228
15228
  try {
15229
15229
  t.pool?.pauseVfs();
15230
15230
  } finally {
15231
- t.releaseLock?.(), t.releaseLock = void 0;
15231
+ let e = t.releaseLock;
15232
+ t.releaseLock = void 0, await e?.();
15232
15233
  }
15233
15234
  }
15234
15235
  // src/store/project-key.ts
@@ -15339,7 +15340,7 @@ async function Js(e) {
15339
15340
  lock: u
15340
15341
  };
15341
15342
  } catch (e) {
15342
- throw u.release(), e;
15343
+ throw await u.release(), e;
15343
15344
  }
15344
15345
  }
15345
15346
  function Ys(e) {
@@ -15398,9 +15399,12 @@ function $s(e) {
15398
15399
  return new Promise(function(e, t) {
15399
15400
  let i = fc, s = new Promise(function(e) {
15400
15401
  i = e;
15401
- }), c = r === "if-available" || a === 0 ? { ifAvailable: !0 } : { signal: AbortSignal.timeout(a) };
15402
- navigator.locks.request(o, c, async function(o) {
15403
- o ? (e({ release: i }), await s) : t(r === "if-available" ? x("PROJECT_OPEN_ELSEWHERE", {
15402
+ });
15403
+ async function c() {
15404
+ i(), await u;
15405
+ }
15406
+ let l = r === "if-available" || a === 0 ? { ifAvailable: !0 } : { signal: AbortSignal.timeout(a) }, u = navigator.locks.request(o, l, async function(i) {
15407
+ i ? (e({ release: c }), await s) : t(r === "if-available" ? x("PROJECT_OPEN_ELSEWHERE", {
15404
15408
  detail: `Project "${n}" is open in another tab or window`,
15405
15409
  meta: { project: n }
15406
15410
  }) : ec({
@@ -15748,7 +15752,7 @@ async function yc(e) {
15748
15752
  expectedCreationId: s
15749
15753
  }), await n.pool.unpauseVfs();
15750
15754
  } catch (e) {
15751
- throw ks({ state: n }), e;
15755
+ throw await ks({ state: n }), e;
15752
15756
  }
15753
15757
  } else {
15754
15758
  let e = await Js({
@@ -15813,7 +15817,7 @@ async function yc(e) {
15813
15817
  }
15814
15818
  }), { resumed: m };
15815
15819
  } catch (e) {
15816
- throw h?.isOpen() && h.close(), ks({ state: n }), e;
15820
+ throw h?.isOpen() && h.close(), await ks({ state: n }), e;
15817
15821
  }
15818
15822
  }
15819
15823
  function bc(e) {
@@ -15852,7 +15856,7 @@ async function Sc(e) {
15852
15856
  deadline: s
15853
15857
  });
15854
15858
  } finally {
15855
- c && (n.pool = void 0, n.project = void 0, n.dialecteId = void 0), ks({ state: n });
15859
+ c && (n.pool = void 0, n.project = void 0, n.dialecteId = void 0), await ks({ state: n });
15856
15860
  }
15857
15861
  }
15858
15862
  function Cc(e) {
@@ -11,8 +11,11 @@ export declare function closeEngine(params: {
11
11
  export declare function endEngineAndClients(params: {
12
12
  state: EngineRuntimeState;
13
13
  }): Promise<void>;
14
- /** The pool paused and the lock released whatever the pause does: the files stay, another engine may open them. */
14
+ /**
15
+ * The pool paused and the lock released whatever the pause does: the files stay, another engine may open them.
16
+ * Settled once the browser has let the lock go: an answer posted after it finds the lock free in any context.
17
+ */
15
18
  export declare function releasePool(params: {
16
19
  state: EngineRuntimeState;
17
- }): void;
20
+ }): Promise<void>;
18
21
  //# sourceMappingURL=close-engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"close-engine.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/runtime/close-engine.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,iHAAiH;AACjH,wBAAsB,WAAW,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtF;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAW9F;AA4BD,mHAAmH;AACnH,wBAAgB,WAAW,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,IAAI,CAWvE"}
1
+ {"version":3,"file":"close-engine.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/runtime/close-engine.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,iHAAiH;AACjH,wBAAsB,WAAW,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtF;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAW9F;AA4BD;;;GAGG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAYtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"install-pool.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/runtime/install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AHPoolUtil | undefined;
18
18
  /** Releases the engine lock (held from the open until `close` or `destroy`). */
19
- releaseLock: (() => void) | undefined;
19
+ releaseLock: (() => Promise<void>) | undefined;
20
20
  engine: SqliteEngine | undefined;
21
21
  /** The project's channel, open while the engine is. */
22
22
  events: StoreEvents | undefined;
@@ -31,7 +31,8 @@ export type PoolInstallOptions = Parameters<Sqlite3Static['installOpfsSAHPoolVfs
31
31
  };
32
32
  /** The project's lock, held: release it once the engine no longer touches the files. */
33
33
  export type HeldEngineLock = {
34
- release: () => void;
34
+ /** Let the lock go; settled once the browser has let it go: another context asking for it then gets it. */
35
+ release: () => Promise<void>;
35
36
  };
36
37
  /** A file of the private file system as a dedicated worker reaches it (the page's types lack this member). */
37
38
  export type SyncAccessFileHandle = FileSystemFileHandle & {
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.types.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/runtime/runtime.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACrF,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEzE,uGAAuG;AACvG,MAAM,MAAM,oBAAoB,GAAG;IAClC,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACtC,2GAA2G;IAC3G,eAAe,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,0HAA0H;AAC1H,MAAM,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,sHAAsH;IACtH,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,IAAI,EAAE,WAAW,GAAG,SAAS,CAAA;IAC7B,gFAA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,CAAA;CAC5B,CAAA;AAED,8GAA8G;AAC9G,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG;IACzD,sBAAsB,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAA;CACrD,CAAA;AAED,yFAAyF;AACzF,MAAM,MAAM,cAAc,GAAG;IAC5B,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,OAAO,EAAE,MAAM,MAAM,CAAA;IACrB,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAA;CAC7D,CAAA;AAED,6GAA6G;AAC7G,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAA;AAE/D;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAA"}
@@ -13,13 +13,15 @@ export declare function createXmlAssertions(params: {
13
13
  /**
14
14
  * Asserts that each XPath query selects at least one node of the XML text, parsed once for all of them.
15
15
  * A failure names the steps that matched, the step that failed, where the last match sits, what the failing
16
- * step finds there without its predicates, and the XML around it.
16
+ * step finds there without its predicates, and the XML around it. A query that selects nothing throws
17
+ * an `XmlAssertionError`.
17
18
  *
18
19
  * @intent assert that XML holds the elements XPath queries select, check that an export holds an element
19
20
  */
20
21
  export declare function assertExpectedElementQueries(params: XmlQueriesWithNamespacesParams): void;
21
22
  /**
22
- * Asserts that no XPath query selects a node of the XML text, parsed once for all of them.
23
+ * Asserts that no XPath query selects a node of the XML text, parsed once for all of them. A query that
24
+ * selects a node throws an `XmlAssertionError`.
23
25
  *
24
26
  * Every step but the last must still select a node: an absence is only meaningful when the ancestors
25
27
  * exist, so a missing ancestor (a fixture bug) fails the assertion instead of passing it for the wrong
@@ -1 +1 @@
1
- {"version":3,"file":"assert-xml.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/ass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;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,8BAA8B,GAAG,IAAI,CAG3F;AAED,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAM7D;AAED,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,aAAa,CAIpF"}
@@ -1,3 +1,4 @@
1
1
  export { assertExpectedElementQueries, assertUnexpectedElementQueries, createXmlAssertions, } from './assert-xml';
2
2
  export type { XmlAssertions, XmlQueriesParams, XmlQueriesWithNamespacesParams, } from './assert-xml.types';
3
+ export { XmlAssertionError } from './xml-assertion-error';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,4BAA4B,EAC5B,8BAA8B,EAC9B,mBAAmB,GACnB,MAAM,cAAc,CAAA;AACrB,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,8BAA8B,GAC9B,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,4BAA4B,EAC5B,8BAA8B,EAC9B,mBAAmB,GACnB,MAAM,cAAc,CAAA;AACrB,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,8BAA8B,GAC9B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A behaviour miss of the XML query assertions: an expected element absent or an unexpected one present.
3
+ * Named `AssertionError` so a test runner and tools read it as an assertion failure, not a test error.
4
+ */
5
+ export declare class XmlAssertionError extends Error {
6
+ constructor(message: string);
7
+ }
8
+ //# sourceMappingURL=xml-assertion-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xml-assertion-error.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/xml-assertion-error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI3B"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=indexeddb-storage.setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexeddb-storage.setup.d.ts","sourceRoot":"","sources":["../../src/test/indexeddb-storage.setup.ts"],"names":[],"mappings":"AAEA,OAAO,qBAAqB,CAAA"}