@gmb/bitmark-parser 6.7.0 → 6.9.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.
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { createRequire } from "module";
10
10
  // src/generated/package_info.ts
11
11
  var PACKAGE_INFO = {
12
12
  "name": "@gmb/bitmark-parser",
13
- "version": "6.7.0",
13
+ "version": "6.9.0",
14
14
  "author": "Get More Brain Ltd <info@getmorebrain.com>",
15
15
  "license": "ISC",
16
16
  "description": "A parser for bitmark text, powered by WebAssembly."
@@ -581,8 +581,8 @@ var Builder = class {
581
581
  const wasm2 = getLegacyWasm();
582
582
  if (bitType !== void 0) {
583
583
  try {
584
- const info2 = JSON.parse(wasm2.info("bit", "json", bitType, false, 2));
585
- if (info2.error === void 0) return info2;
584
+ const info2 = JSON.parse(wasm2.info("bit", "json", bitType, false, 2, false, false, true));
585
+ if (info2.error === void 0) return { bodyFormat: info2.body?.format };
586
586
  } catch {
587
587
  }
588
588
  }
@@ -680,7 +680,7 @@ var BitmarkParserGenerator = class {
680
680
  const format = opts.outputFormat ?? "text";
681
681
  const { pretty, indent } = prettyIndent(opts.prettify);
682
682
  const coreFormat = format === "pojo" ? "json" : format;
683
- const out = wasm2.info(type, coreFormat, opts.bit ?? "", pretty, indent);
683
+ const out = wasm2.info(type, coreFormat, opts.bit ?? "", pretty, indent, false, false, true);
684
684
  this.throwOnError(out);
685
685
  if (format === "pojo") return JSON.parse(out);
686
686
  return out;
@@ -1263,7 +1263,7 @@ var bitTypeCache;
1263
1263
  function loadBitTypes() {
1264
1264
  if (!bitTypeCache) {
1265
1265
  const wasm2 = getLegacyWasm();
1266
- const all = JSON.parse(wasm2.info("all", "json", "", false, 2));
1266
+ const all = JSON.parse(wasm2.info("all", "json", "", false, 2, true, false, false));
1267
1267
  const map = { _standard: "_standard" };
1268
1268
  for (const { name } of all) {
1269
1269
  map[bitNameToKey(name)] = name;
@@ -1444,7 +1444,10 @@ function info(options = {}) {
1444
1444
  const bit = options.bit ?? "";
1445
1445
  const pretty = options.pretty ?? false;
1446
1446
  const indent = options.indent ?? 2;
1447
- return wasm.info(infoType, format, bit, pretty, indent);
1447
+ const includeDeprecated = options.includeDeprecated ?? false;
1448
+ const onlyDeprecated = options.onlyDeprecated ?? false;
1449
+ const full = options.full ?? false;
1450
+ return wasm.info(infoType, format, bit, pretty, indent, includeDeprecated, onlyDeprecated, full);
1448
1451
  }
1449
1452
  export {
1450
1453
  bitmarkToObjects,