js.documents 14.1.0 → 14.1.1

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 (64) hide show
  1. package/README.md +8 -8
  2. package/dist/bin-dispatch.cjs +1 -1
  3. package/dist/bin-dispatch.d.cts +3 -3
  4. package/dist/bin-dispatch.d.ts +3 -3
  5. package/dist/bin-dispatch.js +1 -1
  6. package/dist/convert/composition.cjs +1 -1
  7. package/dist/convert/composition.js +1 -1
  8. package/dist/convert/convert.cjs +1 -1
  9. package/dist/convert/convert.js +1 -1
  10. package/dist/convert/document-fonts.cjs +1 -1
  11. package/dist/convert/document-fonts.js +1 -1
  12. package/dist/convert/from-package.cjs +2 -2
  13. package/dist/convert/from-package.js +2 -2
  14. package/dist/csv/write.cjs +2 -2
  15. package/dist/csv/write.js +2 -2
  16. package/dist/edit/docx/image.cjs +1 -1
  17. package/dist/edit/docx/image.js +1 -1
  18. package/dist/edit/docx/paragraph.cjs +1 -1
  19. package/dist/edit/docx/paragraph.js +1 -1
  20. package/dist/edit/ods/sheet.cjs +1 -1
  21. package/dist/edit/ods/sheet.js +1 -1
  22. package/dist/edit/pptx/content.cjs +1 -1
  23. package/dist/edit/pptx/content.js +1 -1
  24. package/dist/firebird/backup.cjs +4 -4
  25. package/dist/firebird/backup.js +4 -4
  26. package/dist/firebird/data.cjs +2 -2
  27. package/dist/firebird/data.js +2 -2
  28. package/dist/hsqldb/binary-script.cjs +3 -3
  29. package/dist/hsqldb/binary-script.js +3 -3
  30. package/dist/hsqldb/cache.cjs +2 -2
  31. package/dist/hsqldb/cache.js +2 -2
  32. package/dist/hsqldb/rowformat.cjs +2 -2
  33. package/dist/hsqldb/rowformat.js +2 -2
  34. package/dist/hsqldb/script.cjs +2 -2
  35. package/dist/hsqldb/script.js +2 -2
  36. package/dist/layout/shared.cjs +1 -1
  37. package/dist/layout/shared.js +1 -1
  38. package/dist/metadata/write.cjs +12 -12
  39. package/dist/metadata/write.js +12 -12
  40. package/dist/odb/csv.cjs +2 -2
  41. package/dist/odb/csv.js +2 -2
  42. package/dist/odb/formula/errors.cjs +3 -3
  43. package/dist/odb/formula/errors.js +3 -3
  44. package/dist/odb/formula/evaluate.cjs +4 -4
  45. package/dist/odb/formula/evaluate.js +4 -4
  46. package/dist/odb/formula/parser.cjs +2 -2
  47. package/dist/odb/formula/parser.js +2 -2
  48. package/dist/odb/read.cjs +9 -9
  49. package/dist/odb/read.js +9 -9
  50. package/dist/odb/report/content.cjs +1 -1
  51. package/dist/odb/report/content.js +1 -1
  52. package/dist/odb/report/source.cjs +1 -1
  53. package/dist/odb/report/source.js +1 -1
  54. package/dist/odb/sql/errors.cjs +3 -3
  55. package/dist/odb/sql/errors.js +3 -3
  56. package/dist/odb/sql/evaluate.cjs +9 -9
  57. package/dist/odb/sql/evaluate.js +9 -9
  58. package/dist/odb/sql/parser.cjs +2 -2
  59. package/dist/odb/sql/parser.js +2 -2
  60. package/dist/package-codec.cjs +1 -1
  61. package/dist/package-codec.js +1 -1
  62. package/dist/svg/write.cjs +2 -2
  63. package/dist/svg/write.js +2 -2
  64. package/package.json +14 -14
@@ -2,7 +2,7 @@
2
2
  var HsqldbScriptParseError = class extends Error {
3
3
  statement;
4
4
  constructor(message, statement) {
5
- super(`HSQLDB script parse error: ${message} -- in statement: ${truncateForMessage(statement)}`);
5
+ super(`HSQLDB script parse error: ${message} — in statement: ${truncateForMessage(statement)}`);
6
6
  this.name = "HsqldbScriptParseError";
7
7
  this.statement = statement;
8
8
  }
@@ -390,7 +390,7 @@ function parseInsertInto(statement) {
390
390
  if (statement.charAt(i) !== "(") throw new HsqldbScriptParseError(`INSERT INTO "${tableName}": expected "(" to start the VALUES tuple`, statement);
391
391
  const { inner, next: afterTuple } = readBalancedParens(statement, i);
392
392
  const trailing = statement.slice(afterTuple).trim();
393
- if (trailing.length > 0) throw new HsqldbScriptParseError(`INSERT INTO "${tableName}": unexpected trailing content after the VALUES tuple ("${trailing}") -- multiple tuples per INSERT are outside this bounded parser's scope`, statement);
393
+ if (trailing.length > 0) throw new HsqldbScriptParseError(`INSERT INTO "${tableName}": unexpected trailing content after the VALUES tuple ("${trailing}") — multiple tuples per INSERT are outside this bounded parser's scope`, statement);
394
394
  return {
395
395
  tableName,
396
396
  explicitColumns,
@@ -198,7 +198,7 @@ function decodeImageDimensions(format, bytes) {
198
198
  };
199
199
  }
200
200
  function registerImage(block, images) {
201
- if (block.format === "svg" || block.format === "gif") throw new Error(`registerImage: an image block in ${block.format} format cannot be laid out to PDF -- pdf-codec's own LayoutImageAsset registry (and its writer, byte-codec's image encoders) supports png and jpeg only`);
201
+ if (block.format === "svg" || block.format === "gif") throw new Error(`registerImage: an image block in ${block.format} format cannot be laid out to PDF — pdf-codec's own LayoutImageAsset registry (and its writer, byte-codec's image encoders) supports png and jpeg only`);
202
202
  const bytes = (0, ooxml_js.base64ToBytes)(block.base64);
203
203
  const imageId = `img${(0, byte_codec.crc32)(bytes).toString(16)}`;
204
204
  if (!(imageId in images)) {
@@ -197,7 +197,7 @@ function decodeImageDimensions(format, bytes) {
197
197
  };
198
198
  }
199
199
  function registerImage(block, images) {
200
- if (block.format === "svg" || block.format === "gif") throw new Error(`registerImage: an image block in ${block.format} format cannot be laid out to PDF -- pdf-codec's own LayoutImageAsset registry (and its writer, byte-codec's image encoders) supports png and jpeg only`);
200
+ if (block.format === "svg" || block.format === "gif") throw new Error(`registerImage: an image block in ${block.format} format cannot be laid out to PDF — pdf-codec's own LayoutImageAsset registry (and its writer, byte-codec's image encoders) supports png and jpeg only`);
201
201
  const bytes = base64ToBytes(block.base64);
202
202
  const imageId = `img${crc32(bytes).toString(16)}`;
203
203
  if (!(imageId in images)) {
@@ -21,12 +21,12 @@ function isRebuildFormat(format) {
21
21
  }
22
22
  function readContentForFormat(format, bytes, options) {
23
23
  const content = require_codecs_registry.DOCUMENT_FORMAT_CODECS[format].content;
24
- if (!content) throw new Error(`RebuildFormat '${format}' has no content codec in DOCUMENT_FORMAT_CODECS -- this is an internal invariant violation, not a caller error`);
24
+ if (!content) throw new Error(`RebuildFormat '${format}' has no content codec in DOCUMENT_FORMAT_CODECS — this is an internal invariant violation, not a caller error`);
25
25
  return content.read(bytes, options);
26
26
  }
27
27
  function buildBytesForRebuildFormat(format, content) {
28
28
  const codec = require_codecs_registry.DOCUMENT_FORMAT_CODECS[format].content;
29
- if (!codec?.write) throw new Error(`RebuildFormat '${format}' has no content.write codec in DOCUMENT_FORMAT_CODECS -- this is an internal invariant violation, not a caller error`);
29
+ if (!codec?.write) throw new Error(`RebuildFormat '${format}' has no content.write codec in DOCUMENT_FORMAT_CODECS — this is an internal invariant violation, not a caller error`);
30
30
  return require_model_bytes.requireArrayBufferBytes(codec.write(content));
31
31
  }
32
32
  function patchDocxMetadata(bytes, overrides, options) {
@@ -38,18 +38,18 @@ function patchDocxMetadata(bytes, overrides, options) {
38
38
  function classifyWritePath(source, target) {
39
39
  if (source === "pdf" && target === "pdf") return { kind: "pdf" };
40
40
  if (source === "docx" && target === "docx") return { kind: "docx-patch" };
41
- if (target === "odf" || source === "odf") return { errorMessage: "'odf' (a standalone formula document) is not a supported setDocumentMetadata source or target -- it has no write path back out at all" };
42
- if (target === "csv" || source === "csv") return { errorMessage: "'csv' is not a supported setDocumentMetadata source or target -- RFC 4180 text has no metadata container, so a rebuild would silently drop the override. Convert to or from csv first, then patch metadata on the package format." };
43
- if (target === "svg" || source === "svg") return { errorMessage: "'svg' is not a supported setDocumentMetadata source or target -- this package's SVG metadata surface is the root <title> element alone, so an author/subject/keywords override would be silently dropped by the rebuild. Convert to or from svg first, then patch metadata on the package format." };
44
- if (target === "doc" || source === "doc") return { errorMessage: "'doc' is not a supported setDocumentMetadata source or target -- doc-codec's reader always returns empty metadata and its writer never references document.metadata at all, so a rebuild would silently drop the override. Convert to or from doc first, then patch metadata on the package format." };
45
- if (target === "xls" || source === "xls") return { errorMessage: "'xls' is not a supported setDocumentMetadata source or target -- xls-codec's reader always returns empty metadata and its writer never references document.metadata at all, so a rebuild would silently drop the override. Convert to or from xls first, then patch metadata on the package format." };
46
- if (target === "ppt" || source === "ppt") return { errorMessage: "'ppt' is not a supported setDocumentMetadata source or target -- ppt-codec's reader always returns empty metadata (document properties live in the compound file's own SummaryInformation stream, which it does not read) and its writer never references it either, so a rebuild would silently drop the override. Convert to or from ppt first, then patch metadata on the package format." };
47
- if (target === "epub" || source === "epub") return { errorMessage: "'epub' is not a supported setDocumentMetadata source or target -- epub-codec round-trips title/author/keywords/language through OPF Dublin Core elements, but 'subject' has no dc:description-equivalent mapping in either direction, so a rebuild would silently drop that one override. Convert to or from epub first, then patch metadata on the package format." };
41
+ if (target === "odf" || source === "odf") return { errorMessage: "'odf' (a standalone formula document) is not a supported setDocumentMetadata source or target — it has no write path back out at all" };
42
+ if (target === "csv" || source === "csv") return { errorMessage: "'csv' is not a supported setDocumentMetadata source or target — RFC 4180 text has no metadata container, so a rebuild would silently drop the override. Convert to or from csv first, then patch metadata on the package format." };
43
+ if (target === "svg" || source === "svg") return { errorMessage: "'svg' is not a supported setDocumentMetadata source or target — this package's SVG metadata surface is the root <title> element alone, so an author/subject/keywords override would be silently dropped by the rebuild. Convert to or from svg first, then patch metadata on the package format." };
44
+ if (target === "doc" || source === "doc") return { errorMessage: "'doc' is not a supported setDocumentMetadata source or target — doc-codec's reader always returns empty metadata and its writer never references document.metadata at all, so a rebuild would silently drop the override. Convert to or from doc first, then patch metadata on the package format." };
45
+ if (target === "xls" || source === "xls") return { errorMessage: "'xls' is not a supported setDocumentMetadata source or target — xls-codec's reader always returns empty metadata and its writer never references document.metadata at all, so a rebuild would silently drop the override. Convert to or from xls first, then patch metadata on the package format." };
46
+ if (target === "ppt" || source === "ppt") return { errorMessage: "'ppt' is not a supported setDocumentMetadata source or target — ppt-codec's reader always returns empty metadata (document properties live in the compound file's own SummaryInformation stream, which it does not read) and its writer never references it either, so a rebuild would silently drop the override. Convert to or from ppt first, then patch metadata on the package format." };
47
+ if (target === "epub" || source === "epub") return { errorMessage: "'epub' is not a supported setDocumentMetadata source or target — epub-codec round-trips title/author/keywords/language through OPF Dublin Core elements, but 'subject' has no dc:description-equivalent mapping in either direction, so a rebuild would silently drop that one override. Convert to or from epub first, then patch metadata on the package format." };
48
48
  const sourcePatchable = source === "docx" || isRebuildFormat(source);
49
49
  const targetPatchable = target === "docx" || isRebuildFormat(target);
50
- if (!sourcePatchable || !targetPatchable) return { errorMessage: `setDocumentMetadata only patches metadata in place; it does not convert format -- source ('${source}') and target ('${target}') must be the same format (or both 'pdf'). Convert first if you need a different target format.` };
51
- if (source !== target) return { errorMessage: `setDocumentMetadata only patches metadata in place; it does not convert format -- source ('${source}') and target ('${target}') must be the same format. Convert first if you need a different target format.` };
52
- if (!isRebuildFormat(source)) throw new Error(`classifyWritePath: unreachable -- '${source}' is patchable and matches its target but is neither 'docx' nor a RebuildFormat`);
50
+ if (!sourcePatchable || !targetPatchable) return { errorMessage: `setDocumentMetadata only patches metadata in place; it does not convert format — source ('${source}') and target ('${target}') must be the same format (or both 'pdf'). Convert first if you need a different target format.` };
51
+ if (source !== target) return { errorMessage: `setDocumentMetadata only patches metadata in place; it does not convert format — source ('${source}') and target ('${target}') must be the same format. Convert first if you need a different target format.` };
52
+ if (!isRebuildFormat(source)) throw new Error(`classifyWritePath: unreachable — '${source}' is patchable and matches its target but is neither 'docx' nor a RebuildFormat`);
53
53
  return {
54
54
  kind: "rebuild",
55
55
  format: source
@@ -20,12 +20,12 @@ function isRebuildFormat(format) {
20
20
  }
21
21
  function readContentForFormat(format, bytes, options) {
22
22
  const content = DOCUMENT_FORMAT_CODECS[format].content;
23
- if (!content) throw new Error(`RebuildFormat '${format}' has no content codec in DOCUMENT_FORMAT_CODECS -- this is an internal invariant violation, not a caller error`);
23
+ if (!content) throw new Error(`RebuildFormat '${format}' has no content codec in DOCUMENT_FORMAT_CODECS — this is an internal invariant violation, not a caller error`);
24
24
  return content.read(bytes, options);
25
25
  }
26
26
  function buildBytesForRebuildFormat(format, content) {
27
27
  const codec = DOCUMENT_FORMAT_CODECS[format].content;
28
- if (!codec?.write) throw new Error(`RebuildFormat '${format}' has no content.write codec in DOCUMENT_FORMAT_CODECS -- this is an internal invariant violation, not a caller error`);
28
+ if (!codec?.write) throw new Error(`RebuildFormat '${format}' has no content.write codec in DOCUMENT_FORMAT_CODECS — this is an internal invariant violation, not a caller error`);
29
29
  return requireArrayBufferBytes(codec.write(content));
30
30
  }
31
31
  function patchDocxMetadata(bytes, overrides, options) {
@@ -37,18 +37,18 @@ function patchDocxMetadata(bytes, overrides, options) {
37
37
  function classifyWritePath(source, target) {
38
38
  if (source === "pdf" && target === "pdf") return { kind: "pdf" };
39
39
  if (source === "docx" && target === "docx") return { kind: "docx-patch" };
40
- if (target === "odf" || source === "odf") return { errorMessage: "'odf' (a standalone formula document) is not a supported setDocumentMetadata source or target -- it has no write path back out at all" };
41
- if (target === "csv" || source === "csv") return { errorMessage: "'csv' is not a supported setDocumentMetadata source or target -- RFC 4180 text has no metadata container, so a rebuild would silently drop the override. Convert to or from csv first, then patch metadata on the package format." };
42
- if (target === "svg" || source === "svg") return { errorMessage: "'svg' is not a supported setDocumentMetadata source or target -- this package's SVG metadata surface is the root <title> element alone, so an author/subject/keywords override would be silently dropped by the rebuild. Convert to or from svg first, then patch metadata on the package format." };
43
- if (target === "doc" || source === "doc") return { errorMessage: "'doc' is not a supported setDocumentMetadata source or target -- doc-codec's reader always returns empty metadata and its writer never references document.metadata at all, so a rebuild would silently drop the override. Convert to or from doc first, then patch metadata on the package format." };
44
- if (target === "xls" || source === "xls") return { errorMessage: "'xls' is not a supported setDocumentMetadata source or target -- xls-codec's reader always returns empty metadata and its writer never references document.metadata at all, so a rebuild would silently drop the override. Convert to or from xls first, then patch metadata on the package format." };
45
- if (target === "ppt" || source === "ppt") return { errorMessage: "'ppt' is not a supported setDocumentMetadata source or target -- ppt-codec's reader always returns empty metadata (document properties live in the compound file's own SummaryInformation stream, which it does not read) and its writer never references it either, so a rebuild would silently drop the override. Convert to or from ppt first, then patch metadata on the package format." };
46
- if (target === "epub" || source === "epub") return { errorMessage: "'epub' is not a supported setDocumentMetadata source or target -- epub-codec round-trips title/author/keywords/language through OPF Dublin Core elements, but 'subject' has no dc:description-equivalent mapping in either direction, so a rebuild would silently drop that one override. Convert to or from epub first, then patch metadata on the package format." };
40
+ if (target === "odf" || source === "odf") return { errorMessage: "'odf' (a standalone formula document) is not a supported setDocumentMetadata source or target — it has no write path back out at all" };
41
+ if (target === "csv" || source === "csv") return { errorMessage: "'csv' is not a supported setDocumentMetadata source or target — RFC 4180 text has no metadata container, so a rebuild would silently drop the override. Convert to or from csv first, then patch metadata on the package format." };
42
+ if (target === "svg" || source === "svg") return { errorMessage: "'svg' is not a supported setDocumentMetadata source or target — this package's SVG metadata surface is the root <title> element alone, so an author/subject/keywords override would be silently dropped by the rebuild. Convert to or from svg first, then patch metadata on the package format." };
43
+ if (target === "doc" || source === "doc") return { errorMessage: "'doc' is not a supported setDocumentMetadata source or target — doc-codec's reader always returns empty metadata and its writer never references document.metadata at all, so a rebuild would silently drop the override. Convert to or from doc first, then patch metadata on the package format." };
44
+ if (target === "xls" || source === "xls") return { errorMessage: "'xls' is not a supported setDocumentMetadata source or target — xls-codec's reader always returns empty metadata and its writer never references document.metadata at all, so a rebuild would silently drop the override. Convert to or from xls first, then patch metadata on the package format." };
45
+ if (target === "ppt" || source === "ppt") return { errorMessage: "'ppt' is not a supported setDocumentMetadata source or target — ppt-codec's reader always returns empty metadata (document properties live in the compound file's own SummaryInformation stream, which it does not read) and its writer never references it either, so a rebuild would silently drop the override. Convert to or from ppt first, then patch metadata on the package format." };
46
+ if (target === "epub" || source === "epub") return { errorMessage: "'epub' is not a supported setDocumentMetadata source or target — epub-codec round-trips title/author/keywords/language through OPF Dublin Core elements, but 'subject' has no dc:description-equivalent mapping in either direction, so a rebuild would silently drop that one override. Convert to or from epub first, then patch metadata on the package format." };
47
47
  const sourcePatchable = source === "docx" || isRebuildFormat(source);
48
48
  const targetPatchable = target === "docx" || isRebuildFormat(target);
49
- if (!sourcePatchable || !targetPatchable) return { errorMessage: `setDocumentMetadata only patches metadata in place; it does not convert format -- source ('${source}') and target ('${target}') must be the same format (or both 'pdf'). Convert first if you need a different target format.` };
50
- if (source !== target) return { errorMessage: `setDocumentMetadata only patches metadata in place; it does not convert format -- source ('${source}') and target ('${target}') must be the same format. Convert first if you need a different target format.` };
51
- if (!isRebuildFormat(source)) throw new Error(`classifyWritePath: unreachable -- '${source}' is patchable and matches its target but is neither 'docx' nor a RebuildFormat`);
49
+ if (!sourcePatchable || !targetPatchable) return { errorMessage: `setDocumentMetadata only patches metadata in place; it does not convert format — source ('${source}') and target ('${target}') must be the same format (or both 'pdf'). Convert first if you need a different target format.` };
50
+ if (source !== target) return { errorMessage: `setDocumentMetadata only patches metadata in place; it does not convert format — source ('${source}') and target ('${target}') must be the same format. Convert first if you need a different target format.` };
51
+ if (!isRebuildFormat(source)) throw new Error(`classifyWritePath: unreachable — '${source}' is patchable and matches its target but is neither 'docx' nor a RebuildFormat`);
52
52
  return {
53
53
  kind: "rebuild",
54
54
  format: source
package/dist/odb/csv.cjs CHANGED
@@ -5,7 +5,7 @@ const require_hsqldb_script = require("../hsqldb/script.cjs");
5
5
  var OdbTableNotSpecifiedError = class extends Error {
6
6
  availableTables;
7
7
  constructor(availableTables) {
8
- super(`odbToCsv: this .odb has more than one table (${availableTables.join(", ")}) -- pass { table: '<name>' } to select one`);
8
+ super(`odbToCsv: this .odb has more than one table (${availableTables.join(", ")}) — pass { table: '<name>' } to select one`);
9
9
  this.name = "OdbTableNotSpecifiedError";
10
10
  this.availableTables = availableTables;
11
11
  }
@@ -14,7 +14,7 @@ var OdbTableNotFoundError = class extends Error {
14
14
  table;
15
15
  availableTables;
16
16
  constructor(table, availableTables) {
17
- super(`odbToCsv: table "${table}" not found -- available table(s): ${availableTables.length === 0 ? "(none)" : availableTables.join(", ")}`);
17
+ super(`odbToCsv: table "${table}" not found — available table(s): ${availableTables.length === 0 ? "(none)" : availableTables.join(", ")}`);
18
18
  this.name = "OdbTableNotFoundError";
19
19
  this.table = table;
20
20
  this.availableTables = availableTables;
package/dist/odb/csv.js CHANGED
@@ -4,7 +4,7 @@ import { displayTextFor } from "../hsqldb/script.js";
4
4
  var OdbTableNotSpecifiedError = class extends Error {
5
5
  availableTables;
6
6
  constructor(availableTables) {
7
- super(`odbToCsv: this .odb has more than one table (${availableTables.join(", ")}) -- pass { table: '<name>' } to select one`);
7
+ super(`odbToCsv: this .odb has more than one table (${availableTables.join(", ")}) — pass { table: '<name>' } to select one`);
8
8
  this.name = "OdbTableNotSpecifiedError";
9
9
  this.availableTables = availableTables;
10
10
  }
@@ -13,7 +13,7 @@ var OdbTableNotFoundError = class extends Error {
13
13
  table;
14
14
  availableTables;
15
15
  constructor(table, availableTables) {
16
- super(`odbToCsv: table "${table}" not found -- available table(s): ${availableTables.length === 0 ? "(none)" : availableTables.join(", ")}`);
16
+ super(`odbToCsv: table "${table}" not found — available table(s): ${availableTables.length === 0 ? "(none)" : availableTables.join(", ")}`);
17
17
  this.name = "OdbTableNotFoundError";
18
18
  this.table = table;
19
19
  this.availableTables = availableTables;
@@ -8,7 +8,7 @@ var RptFormulaUnsupportedError = class extends Error {
8
8
  functionName;
9
9
  formula;
10
10
  constructor(functionName, formula) {
11
- super(`Report Builder formula: rpt:${functionName} is not supported by this bounded formula engine -- supported functions are HASCHANGED, LEFT, SUM, COUNT, AVG, MIN, MAX -- in formula: ${truncateForMessage(formula)}`);
11
+ super(`Report Builder formula: rpt:${functionName} is not supported by this bounded formula engine — supported functions are HASCHANGED, LEFT, SUM, COUNT, AVG, MIN, MAX — in formula: ${truncateForMessage(formula)}`);
12
12
  this.name = "RptFormulaUnsupportedError";
13
13
  this.functionName = functionName;
14
14
  this.formula = formula;
@@ -18,7 +18,7 @@ var RptFormulaParseError = class extends Error {
18
18
  formula;
19
19
  offset;
20
20
  constructor(message, formula, offset) {
21
- super(`Report Builder formula parse error at offset ${String(offset)}: ${message} -- in formula: ${truncateForMessage(formula)}`);
21
+ super(`Report Builder formula parse error at offset ${String(offset)}: ${message} — in formula: ${truncateForMessage(formula)}`);
22
22
  this.name = "RptFormulaParseError";
23
23
  this.formula = formula;
24
24
  this.offset = offset;
@@ -27,7 +27,7 @@ var RptFormulaParseError = class extends Error {
27
27
  var RptFormulaEvaluationError = class extends Error {
28
28
  formula;
29
29
  constructor(message, formula) {
30
- super(`Report Builder formula evaluation error: ${message} -- in formula: ${truncateForMessage(formula)}`);
30
+ super(`Report Builder formula evaluation error: ${message} — in formula: ${truncateForMessage(formula)}`);
31
31
  this.name = "RptFormulaEvaluationError";
32
32
  this.formula = formula;
33
33
  }
@@ -7,7 +7,7 @@ var RptFormulaUnsupportedError = class extends Error {
7
7
  functionName;
8
8
  formula;
9
9
  constructor(functionName, formula) {
10
- super(`Report Builder formula: rpt:${functionName} is not supported by this bounded formula engine -- supported functions are HASCHANGED, LEFT, SUM, COUNT, AVG, MIN, MAX -- in formula: ${truncateForMessage(formula)}`);
10
+ super(`Report Builder formula: rpt:${functionName} is not supported by this bounded formula engine — supported functions are HASCHANGED, LEFT, SUM, COUNT, AVG, MIN, MAX — in formula: ${truncateForMessage(formula)}`);
11
11
  this.name = "RptFormulaUnsupportedError";
12
12
  this.functionName = functionName;
13
13
  this.formula = formula;
@@ -17,7 +17,7 @@ var RptFormulaParseError = class extends Error {
17
17
  formula;
18
18
  offset;
19
19
  constructor(message, formula, offset) {
20
- super(`Report Builder formula parse error at offset ${String(offset)}: ${message} -- in formula: ${truncateForMessage(formula)}`);
20
+ super(`Report Builder formula parse error at offset ${String(offset)}: ${message} — in formula: ${truncateForMessage(formula)}`);
21
21
  this.name = "RptFormulaParseError";
22
22
  this.formula = formula;
23
23
  this.offset = offset;
@@ -26,7 +26,7 @@ var RptFormulaParseError = class extends Error {
26
26
  var RptFormulaEvaluationError = class extends Error {
27
27
  formula;
28
28
  constructor(message, formula) {
29
- super(`Report Builder formula evaluation error: ${message} -- in formula: ${truncateForMessage(formula)}`);
29
+ super(`Report Builder formula evaluation error: ${message} — in formula: ${truncateForMessage(formula)}`);
30
30
  this.name = "RptFormulaEvaluationError";
31
31
  this.formula = formula;
32
32
  }
@@ -59,7 +59,7 @@ var PreparedReport = class {
59
59
  for (const expression of this.groupExpressions) this.rejectAggregateDependency(expression, expression, /* @__PURE__ */ new Set());
60
60
  }
61
61
  rejectAggregateDependency(formula, expression, visiting) {
62
- if (formula.kind === "aggregate") fail(`a group expression cannot depend on the aggregate rpt:${formula.aggregate}(${formula.reference.name}) -- an aggregate's own rows are defined by the very group boundaries this expression decides`, expression.text);
62
+ if (formula.kind === "aggregate") fail(`a group expression cannot depend on the aggregate rpt:${formula.aggregate}(${formula.reference.name}) — an aggregate's own rows are defined by the very group boundaries this expression decides`, expression.text);
63
63
  const resolved = matchNamed([...this.namedFunctions.values()], (candidate) => candidate.name, formula.reference.name)[0];
64
64
  if (resolved === void 0) return;
65
65
  if (visiting.has(resolved.name)) fail(`rpt:function "${resolved.name}" refers to itself, directly or through another function`, expression.text);
@@ -70,7 +70,7 @@ var PreparedReport = class {
70
70
  if (cached !== void 0) return cached;
71
71
  const functionMatches = matchNamed([...this.namedFunctions.values()], (candidate) => candidate.name, reference.name);
72
72
  const columnMatches = matchNamed(this.columnNames, identity, reference.name);
73
- if (functionMatches.length + columnMatches.length > 1) fail(`reference "${reference.name}" is ambiguous -- it matches ${[...functionMatches.map((match) => `rpt:function ${match.name}`), ...columnMatches.map((match) => `column ${match}`)].join(", ")}`, formula);
73
+ if (functionMatches.length + columnMatches.length > 1) fail(`reference "${reference.name}" is ambiguous — it matches ${[...functionMatches.map((match) => `rpt:function ${match.name}`), ...columnMatches.map((match) => `column ${match}`)].join(", ")}`, formula);
74
74
  const resolved = this.resolveSingleMatch(reference, functionMatches[0], columnMatches[0], formula);
75
75
  this.resolutions.set(reference, resolved);
76
76
  return resolved;
@@ -80,7 +80,7 @@ var PreparedReport = class {
80
80
  kind: "function",
81
81
  resolved: named
82
82
  };
83
- if (columnName === void 0) fail(`reference "${reference.name}" names neither a declared rpt:function nor a column of the report's own data -- functions: ${this.namedFunctions.size === 0 ? "(none)" : [...this.namedFunctions.keys()].join(", ")}; columns: ${this.columnNames.length === 0 ? "(none)" : this.columnNames.join(", ")}`, formula);
83
+ if (columnName === void 0) fail(`reference "${reference.name}" names neither a declared rpt:function nor a column of the report's own data — functions: ${this.namedFunctions.size === 0 ? "(none)" : [...this.namedFunctions.keys()].join(", ")}; columns: ${this.columnNames.length === 0 ? "(none)" : this.columnNames.join(", ")}`, formula);
84
84
  return {
85
85
  kind: "column",
86
86
  index: this.columnNames.indexOf(columnName)
@@ -121,7 +121,7 @@ var RunState = class {
121
121
  function textOf(value, formula, what) {
122
122
  if (value.kind === "empty") return;
123
123
  const key = require_odb_values.cellComparisonKey(value);
124
- if (key?.valueClass !== "text") fail(`${what} requires a text value, but found a ${value.kind} value -- this engine does not format a number or a boolean into text, since a report's own number format lives in its band styles rather than in the formula`, formula);
124
+ if (key?.valueClass !== "text") fail(`${what} requires a text value, but found a ${value.kind} value — this engine does not format a number or a boolean into text, since a report's own number format lives in its band styles rather than in the formula`, formula);
125
125
  return key.text;
126
126
  }
127
127
  var FormulaEvaluator = class {
@@ -58,7 +58,7 @@ var PreparedReport = class {
58
58
  for (const expression of this.groupExpressions) this.rejectAggregateDependency(expression, expression, /* @__PURE__ */ new Set());
59
59
  }
60
60
  rejectAggregateDependency(formula, expression, visiting) {
61
- if (formula.kind === "aggregate") fail(`a group expression cannot depend on the aggregate rpt:${formula.aggregate}(${formula.reference.name}) -- an aggregate's own rows are defined by the very group boundaries this expression decides`, expression.text);
61
+ if (formula.kind === "aggregate") fail(`a group expression cannot depend on the aggregate rpt:${formula.aggregate}(${formula.reference.name}) — an aggregate's own rows are defined by the very group boundaries this expression decides`, expression.text);
62
62
  const resolved = matchNamed([...this.namedFunctions.values()], (candidate) => candidate.name, formula.reference.name)[0];
63
63
  if (resolved === void 0) return;
64
64
  if (visiting.has(resolved.name)) fail(`rpt:function "${resolved.name}" refers to itself, directly or through another function`, expression.text);
@@ -69,7 +69,7 @@ var PreparedReport = class {
69
69
  if (cached !== void 0) return cached;
70
70
  const functionMatches = matchNamed([...this.namedFunctions.values()], (candidate) => candidate.name, reference.name);
71
71
  const columnMatches = matchNamed(this.columnNames, identity, reference.name);
72
- if (functionMatches.length + columnMatches.length > 1) fail(`reference "${reference.name}" is ambiguous -- it matches ${[...functionMatches.map((match) => `rpt:function ${match.name}`), ...columnMatches.map((match) => `column ${match}`)].join(", ")}`, formula);
72
+ if (functionMatches.length + columnMatches.length > 1) fail(`reference "${reference.name}" is ambiguous — it matches ${[...functionMatches.map((match) => `rpt:function ${match.name}`), ...columnMatches.map((match) => `column ${match}`)].join(", ")}`, formula);
73
73
  const resolved = this.resolveSingleMatch(reference, functionMatches[0], columnMatches[0], formula);
74
74
  this.resolutions.set(reference, resolved);
75
75
  return resolved;
@@ -79,7 +79,7 @@ var PreparedReport = class {
79
79
  kind: "function",
80
80
  resolved: named
81
81
  };
82
- if (columnName === void 0) fail(`reference "${reference.name}" names neither a declared rpt:function nor a column of the report's own data -- functions: ${this.namedFunctions.size === 0 ? "(none)" : [...this.namedFunctions.keys()].join(", ")}; columns: ${this.columnNames.length === 0 ? "(none)" : this.columnNames.join(", ")}`, formula);
82
+ if (columnName === void 0) fail(`reference "${reference.name}" names neither a declared rpt:function nor a column of the report's own data — functions: ${this.namedFunctions.size === 0 ? "(none)" : [...this.namedFunctions.keys()].join(", ")}; columns: ${this.columnNames.length === 0 ? "(none)" : this.columnNames.join(", ")}`, formula);
83
83
  return {
84
84
  kind: "column",
85
85
  index: this.columnNames.indexOf(columnName)
@@ -120,7 +120,7 @@ var RunState = class {
120
120
  function textOf(value, formula, what) {
121
121
  if (value.kind === "empty") return;
122
122
  const key = cellComparisonKey(value);
123
- if (key?.valueClass !== "text") fail(`${what} requires a text value, but found a ${value.kind} value -- this engine does not format a number or a boolean into text, since a report's own number format lives in its band styles rather than in the formula`, formula);
123
+ if (key?.valueClass !== "text") fail(`${what} requires a text value, but found a ${value.kind} value — this engine does not format a number or a boolean into text, since a report's own number format lives in its band styles rather than in the formula`, formula);
124
124
  return key.text;
125
125
  }
126
126
  var FormulaEvaluator = class {
@@ -63,7 +63,7 @@ var FormulaScanner = class {
63
63
  const close = this.formula.indexOf("]", this.offset);
64
64
  if (close < 0) {
65
65
  this.offset = this.formula.length;
66
- this.fail("unterminated column reference -- no closing \"]\"");
66
+ this.fail("unterminated column reference — no closing \"]\"");
67
67
  }
68
68
  this.offset = close + 1;
69
69
  return {
@@ -75,7 +75,7 @@ var FormulaScanner = class {
75
75
  this.expect("\"", "the opening quote of a name reference");
76
76
  let name = "";
77
77
  for (;;) {
78
- if (this.offset >= this.formula.length) this.fail("unterminated name reference -- no closing double quote");
78
+ if (this.offset >= this.formula.length) this.fail("unterminated name reference — no closing double quote");
79
79
  const character = this.formula.charAt(this.offset);
80
80
  this.offset += 1;
81
81
  if (character !== "\"") {
@@ -62,7 +62,7 @@ var FormulaScanner = class {
62
62
  const close = this.formula.indexOf("]", this.offset);
63
63
  if (close < 0) {
64
64
  this.offset = this.formula.length;
65
- this.fail("unterminated column reference -- no closing \"]\"");
65
+ this.fail("unterminated column reference — no closing \"]\"");
66
66
  }
67
67
  this.offset = close + 1;
68
68
  return {
@@ -74,7 +74,7 @@ var FormulaScanner = class {
74
74
  this.expect("\"", "the opening quote of a name reference");
75
75
  let name = "";
76
76
  for (;;) {
77
- if (this.offset >= this.formula.length) this.fail("unterminated name reference -- no closing double quote");
77
+ if (this.offset >= this.formula.length) this.fail("unterminated name reference — no closing double quote");
78
78
  const character = this.formula.charAt(this.offset);
79
79
  this.offset += 1;
80
80
  if (character !== "\"") {
package/dist/odb/read.cjs CHANGED
@@ -8,7 +8,7 @@ let odf_js = require("odf.js");
8
8
  var OdbNoEmbeddedDataSourceError = class extends Error {
9
9
  url;
10
10
  constructor(url) {
11
- super(url === void 0 ? "readOdbTables: this .odb package has no embedded data source -- its office:database has no db:data-source/db:connection-data at all, so embedded vs external cannot be determined" : `readOdbTables: this .odb package has no embedded data source -- its connection ("${url}") points at an external datasource (MySQL/PostgreSQL/JDBC/ODBC or similar), which is permanently out of scope for readOdbTables`);
11
+ super(url === void 0 ? "readOdbTables: this .odb package has no embedded data source — its office:database has no db:data-source/db:connection-data at all, so embedded vs external cannot be determined" : `readOdbTables: this .odb package has no embedded data source — its connection ("${url}") points at an external datasource (MySQL/PostgreSQL/JDBC/ODBC or similar), which is permanently out of scope for readOdbTables`);
12
12
  this.name = "OdbNoEmbeddedDataSourceError";
13
13
  this.url = url;
14
14
  }
@@ -53,17 +53,17 @@ function readOdbTables(pkg, options) {
53
53
  const engine = url.slice(14);
54
54
  if (engine === "firebird") {
55
55
  const firebirdPart = pkg.parts[DATABASE_FIREBIRD_PART];
56
- if (firebirdPart === void 0) throw new OdbUnsupportedFormatError("unrecognised-engine", `an embedded Firebird engine with no ${DATABASE_FIREBIRD_PART} part -- an unrecognised embedded storage shape`);
57
- if (firebirdPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_FIREBIRD_PART} is not a binary part (found kind "${firebirdPart.kind}") -- malformed .odb package`);
56
+ if (firebirdPart === void 0) throw new OdbUnsupportedFormatError("unrecognised-engine", `an embedded Firebird engine with no ${DATABASE_FIREBIRD_PART} part — an unrecognised embedded storage shape`);
57
+ if (firebirdPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_FIREBIRD_PART} is not a binary part (found kind "${firebirdPart.kind}") — malformed .odb package`);
58
58
  const backupBytes = (0, odf_js.base64ToBytes)(firebirdPart.base64);
59
59
  return require_firebird_backup.readFirebirdBackup(backupBytes).tables;
60
60
  }
61
61
  if (engine !== "hsqldb") throw new OdbUnsupportedFormatError("unrecognised-engine", `the embedded "${engine}" database engine`);
62
62
  const manifestEntry = (0, odf_js.readManifest)(pkg).entries.find((entry) => entry.fullPath === DATABASE_SCRIPT_PART);
63
- if (manifestEntry !== void 0 && isXmlMediaType(manifestEntry.mediaType)) throw new Error(`readOdbTables: ${DATABASE_SCRIPT_PART} is declared as an XML sub-document in the manifest (media type "${manifestEntry.mediaType}") -- not a recognised HSQLDB script part`);
63
+ if (manifestEntry !== void 0 && isXmlMediaType(manifestEntry.mediaType)) throw new Error(`readOdbTables: ${DATABASE_SCRIPT_PART} is declared as an XML sub-document in the manifest (media type "${manifestEntry.mediaType}") — not a recognised HSQLDB script part`);
64
64
  const scriptPart = pkg.parts[DATABASE_SCRIPT_PART];
65
- if (scriptPart === void 0) throw new OdbUnsupportedFormatError("unrecognised-engine", `an embedded HSQLDB engine with no ${DATABASE_SCRIPT_PART} part -- an unrecognised embedded storage shape`);
66
- if (scriptPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_SCRIPT_PART} is not a binary part (found kind "${scriptPart.kind}") -- malformed .odb package`);
65
+ if (scriptPart === void 0) throw new OdbUnsupportedFormatError("unrecognised-engine", `an embedded HSQLDB engine with no ${DATABASE_SCRIPT_PART} part — an unrecognised embedded storage shape`);
66
+ if (scriptPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_SCRIPT_PART} is not a binary part (found kind "${scriptPart.kind}") — malformed .odb package`);
67
67
  const scriptBytes = (0, odf_js.base64ToBytes)(scriptPart.base64);
68
68
  const classification = classifyScriptBytes(scriptBytes);
69
69
  if (classification !== "text") {
@@ -77,10 +77,10 @@ function readOdbTables(pkg, options) {
77
77
  function withCachedTableRows(pkg, tables, scriptText, options) {
78
78
  const dataPart = pkg.parts[DATABASE_DATA_PART];
79
79
  if (dataPart === void 0) return tables;
80
- if (dataPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_DATA_PART} is not a binary part (found kind "${dataPart.kind}") -- malformed .odb package`);
80
+ if (dataPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_DATA_PART} is not a binary part (found kind "${dataPart.kind}") — malformed .odb package`);
81
81
  const propertiesPart = pkg.parts[DATABASE_PROPERTIES_PART];
82
- if (propertiesPart === void 0) throw new Error(`readOdbTables: ${DATABASE_DATA_PART} is present but ${DATABASE_PROPERTIES_PART} is not -- malformed .odb package (a CACHED-table row store always ships alongside its own properties file, which this decoder needs for the cache file's own scale)`);
83
- if (propertiesPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_PROPERTIES_PART} is not a binary part (found kind "${propertiesPart.kind}") -- malformed .odb package`);
82
+ if (propertiesPart === void 0) throw new Error(`readOdbTables: ${DATABASE_DATA_PART} is present but ${DATABASE_PROPERTIES_PART} is not — malformed .odb package (a CACHED-table row store always ships alongside its own properties file, which this decoder needs for the cache file's own scale)`);
83
+ if (propertiesPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_PROPERTIES_PART} is not a binary part (found kind "${propertiesPart.kind}") — malformed .odb package`);
84
84
  const dataBytes = (0, odf_js.base64ToBytes)(dataPart.base64);
85
85
  const propertiesText = new TextDecoder("utf-8", { fatal: true }).decode((0, odf_js.base64ToBytes)(propertiesPart.base64));
86
86
  return require_hsqldb_cache.decodeHsqldbCachedTables(tables, scriptText, dataBytes, propertiesText, options);
package/dist/odb/read.js CHANGED
@@ -7,7 +7,7 @@ import { base64ToBytes, readManifest, readOdbInventory } from "odf.js";
7
7
  var OdbNoEmbeddedDataSourceError = class extends Error {
8
8
  url;
9
9
  constructor(url) {
10
- super(url === void 0 ? "readOdbTables: this .odb package has no embedded data source -- its office:database has no db:data-source/db:connection-data at all, so embedded vs external cannot be determined" : `readOdbTables: this .odb package has no embedded data source -- its connection ("${url}") points at an external datasource (MySQL/PostgreSQL/JDBC/ODBC or similar), which is permanently out of scope for readOdbTables`);
10
+ super(url === void 0 ? "readOdbTables: this .odb package has no embedded data source — its office:database has no db:data-source/db:connection-data at all, so embedded vs external cannot be determined" : `readOdbTables: this .odb package has no embedded data source — its connection ("${url}") points at an external datasource (MySQL/PostgreSQL/JDBC/ODBC or similar), which is permanently out of scope for readOdbTables`);
11
11
  this.name = "OdbNoEmbeddedDataSourceError";
12
12
  this.url = url;
13
13
  }
@@ -52,17 +52,17 @@ function readOdbTables(pkg, options) {
52
52
  const engine = url.slice(14);
53
53
  if (engine === "firebird") {
54
54
  const firebirdPart = pkg.parts[DATABASE_FIREBIRD_PART];
55
- if (firebirdPart === void 0) throw new OdbUnsupportedFormatError("unrecognised-engine", `an embedded Firebird engine with no ${DATABASE_FIREBIRD_PART} part -- an unrecognised embedded storage shape`);
56
- if (firebirdPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_FIREBIRD_PART} is not a binary part (found kind "${firebirdPart.kind}") -- malformed .odb package`);
55
+ if (firebirdPart === void 0) throw new OdbUnsupportedFormatError("unrecognised-engine", `an embedded Firebird engine with no ${DATABASE_FIREBIRD_PART} part — an unrecognised embedded storage shape`);
56
+ if (firebirdPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_FIREBIRD_PART} is not a binary part (found kind "${firebirdPart.kind}") — malformed .odb package`);
57
57
  const backupBytes = base64ToBytes(firebirdPart.base64);
58
58
  return readFirebirdBackup(backupBytes).tables;
59
59
  }
60
60
  if (engine !== "hsqldb") throw new OdbUnsupportedFormatError("unrecognised-engine", `the embedded "${engine}" database engine`);
61
61
  const manifestEntry = readManifest(pkg).entries.find((entry) => entry.fullPath === DATABASE_SCRIPT_PART);
62
- if (manifestEntry !== void 0 && isXmlMediaType(manifestEntry.mediaType)) throw new Error(`readOdbTables: ${DATABASE_SCRIPT_PART} is declared as an XML sub-document in the manifest (media type "${manifestEntry.mediaType}") -- not a recognised HSQLDB script part`);
62
+ if (manifestEntry !== void 0 && isXmlMediaType(manifestEntry.mediaType)) throw new Error(`readOdbTables: ${DATABASE_SCRIPT_PART} is declared as an XML sub-document in the manifest (media type "${manifestEntry.mediaType}") — not a recognised HSQLDB script part`);
63
63
  const scriptPart = pkg.parts[DATABASE_SCRIPT_PART];
64
- if (scriptPart === void 0) throw new OdbUnsupportedFormatError("unrecognised-engine", `an embedded HSQLDB engine with no ${DATABASE_SCRIPT_PART} part -- an unrecognised embedded storage shape`);
65
- if (scriptPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_SCRIPT_PART} is not a binary part (found kind "${scriptPart.kind}") -- malformed .odb package`);
64
+ if (scriptPart === void 0) throw new OdbUnsupportedFormatError("unrecognised-engine", `an embedded HSQLDB engine with no ${DATABASE_SCRIPT_PART} part — an unrecognised embedded storage shape`);
65
+ if (scriptPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_SCRIPT_PART} is not a binary part (found kind "${scriptPart.kind}") — malformed .odb package`);
66
66
  const scriptBytes = base64ToBytes(scriptPart.base64);
67
67
  const classification = classifyScriptBytes(scriptBytes);
68
68
  if (classification !== "text") {
@@ -76,10 +76,10 @@ function readOdbTables(pkg, options) {
76
76
  function withCachedTableRows(pkg, tables, scriptText, options) {
77
77
  const dataPart = pkg.parts[DATABASE_DATA_PART];
78
78
  if (dataPart === void 0) return tables;
79
- if (dataPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_DATA_PART} is not a binary part (found kind "${dataPart.kind}") -- malformed .odb package`);
79
+ if (dataPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_DATA_PART} is not a binary part (found kind "${dataPart.kind}") — malformed .odb package`);
80
80
  const propertiesPart = pkg.parts[DATABASE_PROPERTIES_PART];
81
- if (propertiesPart === void 0) throw new Error(`readOdbTables: ${DATABASE_DATA_PART} is present but ${DATABASE_PROPERTIES_PART} is not -- malformed .odb package (a CACHED-table row store always ships alongside its own properties file, which this decoder needs for the cache file's own scale)`);
82
- if (propertiesPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_PROPERTIES_PART} is not a binary part (found kind "${propertiesPart.kind}") -- malformed .odb package`);
81
+ if (propertiesPart === void 0) throw new Error(`readOdbTables: ${DATABASE_DATA_PART} is present but ${DATABASE_PROPERTIES_PART} is not — malformed .odb package (a CACHED-table row store always ships alongside its own properties file, which this decoder needs for the cache file's own scale)`);
82
+ if (propertiesPart.kind !== "binary") throw new Error(`readOdbTables: ${DATABASE_PROPERTIES_PART} is not a binary part (found kind "${propertiesPart.kind}") — malformed .odb package`);
83
83
  const dataBytes = base64ToBytes(dataPart.base64);
84
84
  const propertiesText = new TextDecoder("utf-8", { fatal: true }).decode(base64ToBytes(propertiesPart.base64));
85
85
  return decodeHsqldbCachedTables(tables, scriptText, dataBytes, propertiesText, options);
@@ -6,7 +6,7 @@ let odf_js = require("odf.js");
6
6
  var OdbReportNotSpecifiedError = class extends Error {
7
7
  availableReports;
8
8
  constructor(availableReports) {
9
- super(availableReports.length === 0 ? "readOdbReportContent: this .odb declares no reports at all" : `readOdbReportContent: this .odb declares more than one report (${availableReports.join(", ")}) -- pass { report: '<name>' } to select one`);
9
+ super(availableReports.length === 0 ? "readOdbReportContent: this .odb declares no reports at all" : `readOdbReportContent: this .odb declares more than one report (${availableReports.join(", ")}) — pass { report: '<name>' } to select one`);
10
10
  this.name = "OdbReportNotSpecifiedError";
11
11
  this.availableReports = availableReports;
12
12
  }
@@ -5,7 +5,7 @@ import { readOdbInventory, readOdbReport } from "odf.js";
5
5
  var OdbReportNotSpecifiedError = class extends Error {
6
6
  availableReports;
7
7
  constructor(availableReports) {
8
- super(availableReports.length === 0 ? "readOdbReportContent: this .odb declares no reports at all" : `readOdbReportContent: this .odb declares more than one report (${availableReports.join(", ")}) -- pass { report: '<name>' } to select one`);
8
+ super(availableReports.length === 0 ? "readOdbReportContent: this .odb declares no reports at all" : `readOdbReportContent: this .odb declares more than one report (${availableReports.join(", ")}) — pass { report: '<name>' } to select one`);
9
9
  this.name = "OdbReportNotSpecifiedError";
10
10
  this.availableReports = availableReports;
11
11
  }
@@ -21,7 +21,7 @@ function quotedIdentifier(name) {
21
21
  }
22
22
  function savedQueryCommand(report, commandName, queries) {
23
23
  const query = queries.find((candidate) => candidate.name === commandName);
24
- if (query === void 0) throw new OdbReportDataSourceError(`rpt:command-type is "query" and rpt:command names "${commandName}", but this .odb declares no such saved query -- available quer${queries.length === 1 ? "y" : "ies"}: ${queries.length === 0 ? "(none)" : queries.map((candidate) => candidate.name).join(", ")}`, report);
24
+ if (query === void 0) throw new OdbReportDataSourceError(`rpt:command-type is "query" and rpt:command names "${commandName}", but this .odb declares no such saved query — available quer${queries.length === 1 ? "y" : "ies"}: ${queries.length === 0 ? "(none)" : queries.map((candidate) => candidate.name).join(", ")}`, report);
25
25
  return query.command;
26
26
  }
27
27
  function odbReportCommandSql(report, queries) {
@@ -20,7 +20,7 @@ function quotedIdentifier(name) {
20
20
  }
21
21
  function savedQueryCommand(report, commandName, queries) {
22
22
  const query = queries.find((candidate) => candidate.name === commandName);
23
- if (query === void 0) throw new OdbReportDataSourceError(`rpt:command-type is "query" and rpt:command names "${commandName}", but this .odb declares no such saved query -- available quer${queries.length === 1 ? "y" : "ies"}: ${queries.length === 0 ? "(none)" : queries.map((candidate) => candidate.name).join(", ")}`, report);
23
+ if (query === void 0) throw new OdbReportDataSourceError(`rpt:command-type is "query" and rpt:command names "${commandName}", but this .odb declares no such saved query — available quer${queries.length === 1 ? "y" : "ies"}: ${queries.length === 0 ? "(none)" : queries.map((candidate) => candidate.name).join(", ")}`, report);
24
24
  return query.command;
25
25
  }
26
26
  function odbReportCommandSql(report, queries) {
@@ -8,7 +8,7 @@ var HsqldbSqlUnsupportedError = class extends Error {
8
8
  construct;
9
9
  sql;
10
10
  constructor(construct, sql) {
11
- super(`HSQLDB SQL: ${construct} is not supported by this bounded query engine -- in statement: ${truncateForMessage(sql)}`);
11
+ super(`HSQLDB SQL: ${construct} is not supported by this bounded query engine — in statement: ${truncateForMessage(sql)}`);
12
12
  this.name = "HsqldbSqlUnsupportedError";
13
13
  this.construct = construct;
14
14
  this.sql = sql;
@@ -18,7 +18,7 @@ var HsqldbSqlParseError = class extends Error {
18
18
  sql;
19
19
  offset;
20
20
  constructor(message, sql, offset) {
21
- super(`HSQLDB SQL parse error at offset ${String(offset)}: ${message} -- in statement: ${truncateForMessage(sql)}`);
21
+ super(`HSQLDB SQL parse error at offset ${String(offset)}: ${message} — in statement: ${truncateForMessage(sql)}`);
22
22
  this.name = "HsqldbSqlParseError";
23
23
  this.sql = sql;
24
24
  this.offset = offset;
@@ -27,7 +27,7 @@ var HsqldbSqlParseError = class extends Error {
27
27
  var HsqldbSqlEvaluationError = class extends Error {
28
28
  sql;
29
29
  constructor(message, sql) {
30
- super(`HSQLDB SQL evaluation error: ${message} -- in statement: ${truncateForMessage(sql)}`);
30
+ super(`HSQLDB SQL evaluation error: ${message} — in statement: ${truncateForMessage(sql)}`);
31
31
  this.name = "HsqldbSqlEvaluationError";
32
32
  this.sql = sql;
33
33
  }
@@ -7,7 +7,7 @@ var HsqldbSqlUnsupportedError = class extends Error {
7
7
  construct;
8
8
  sql;
9
9
  constructor(construct, sql) {
10
- super(`HSQLDB SQL: ${construct} is not supported by this bounded query engine -- in statement: ${truncateForMessage(sql)}`);
10
+ super(`HSQLDB SQL: ${construct} is not supported by this bounded query engine — in statement: ${truncateForMessage(sql)}`);
11
11
  this.name = "HsqldbSqlUnsupportedError";
12
12
  this.construct = construct;
13
13
  this.sql = sql;
@@ -17,7 +17,7 @@ var HsqldbSqlParseError = class extends Error {
17
17
  sql;
18
18
  offset;
19
19
  constructor(message, sql, offset) {
20
- super(`HSQLDB SQL parse error at offset ${String(offset)}: ${message} -- in statement: ${truncateForMessage(sql)}`);
20
+ super(`HSQLDB SQL parse error at offset ${String(offset)}: ${message} — in statement: ${truncateForMessage(sql)}`);
21
21
  this.name = "HsqldbSqlParseError";
22
22
  this.sql = sql;
23
23
  this.offset = offset;
@@ -26,7 +26,7 @@ var HsqldbSqlParseError = class extends Error {
26
26
  var HsqldbSqlEvaluationError = class extends Error {
27
27
  sql;
28
28
  constructor(message, sql) {
29
- super(`HSQLDB SQL evaluation error: ${message} -- in statement: ${truncateForMessage(sql)}`);
29
+ super(`HSQLDB SQL evaluation error: ${message} — in statement: ${truncateForMessage(sql)}`);
30
30
  this.name = "HsqldbSqlEvaluationError";
31
31
  this.sql = sql;
32
32
  }