@reallyme/codec 0.1.9 → 0.1.20

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/cbor.js CHANGED
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import { ReallyMeCodecError } from "./errors.js";
5
- import { ensureBytesInput, ensureStringInput, ensureStringValue, readBooleanProperty, readBytesOutput, readObjectOutput, readProtoResultOutput, readStringOutput, readStringProperty, readStringValueProperty, readNumberOutput, } from "./readOutput.js";
5
+ import { ensureBytesInput, ensureStringValue, readBooleanProperty, readBytesOutput, readObjectOutput, readProtoResultOutput, readStringOutput, readStringProperty, readStringValueProperty, readNumberOutput, } from "./readOutput.js";
6
6
  import { requireReallyMeCodecWasmProvider } from "./wasmProvider.js";
7
7
  const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
8
8
  const i64Min = -(1n << 63n);
@@ -148,17 +148,17 @@ export const dagCborComputeCid = (bytes) => {
148
148
  return readStringOutput(requireReallyMeCodecWasmProvider().dagCborComputeCid(bytes));
149
149
  };
150
150
  export const dagCborVerifyCid = (cid, bytes) => {
151
- ensureStringInput(cid);
151
+ ensureStringValue(cid);
152
152
  ensureBytesInput(bytes);
153
153
  return readCidVerification(requireReallyMeCodecWasmProvider().dagCborVerifyCid(cid, bytes));
154
154
  };
155
155
  export const dagCborVerifyCidProto = (cid, bytes) => {
156
- ensureStringInput(cid);
156
+ ensureStringValue(cid);
157
157
  ensureBytesInput(bytes);
158
158
  return readBytesOutput(requireReallyMeCodecWasmProvider().dagCborVerifyCidProto(cid, bytes));
159
159
  };
160
160
  export const dagCborVerifyCidProtoResult = (cid, bytes) => {
161
- ensureStringInput(cid);
161
+ ensureStringValue(cid);
162
162
  ensureBytesInput(bytes);
163
163
  return readProtoResultOutput(requireReallyMeCodecWasmProvider().dagCborVerifyCidProtoResult(cid, bytes));
164
164
  };
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  import { ReallyMeCodecError } from "./errors.js";
5
- import { ensureBytesInput, ensureStringInput, readBooleanOutput, readBytesOutput, readBytesProperty, readObjectOutput, readProtoResultOutput, readOptionalLengthProperty, readStringOutput, readStringProperty, } from "./readOutput.js";
5
+ import { ensureBytesInput, ensureStringInput, ensureStringValue, readBooleanOutput, readBytesOutput, readBytesProperty, readObjectOutput, readProtoResultOutput, readOptionalLengthProperty, readStringOutput, readStringProperty, } from "./readOutput.js";
6
6
  import { requireReallyMeCodecWasmProvider } from "./wasmProvider.js";
7
7
  const validTags = new Set([
8
8
  "encryption",
@@ -87,7 +87,7 @@ export const base58btcEncode = (bytes) => {
87
87
  return readStringOutput(requireReallyMeCodecWasmProvider().base58btcEncode(bytes));
88
88
  };
89
89
  export const base58btcDecode = (encoded) => {
90
- ensureStringInput(encoded);
90
+ ensureStringValue(encoded);
91
91
  return readBytesOutput(requireReallyMeCodecWasmProvider().base58btcDecode(encoded));
92
92
  };
93
93
  export const multibaseBase64urlEncode = (bytes) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reallyme/codec",
3
- "version": "0.1.9",
3
+ "version": "0.1.20",
4
4
  "description": "TypeScript facade for the ReallyMe codec WASM package.",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -32,6 +32,7 @@
32
32
  "scripts": {
33
33
  "build": "node scripts/clean-dist.mjs && npm run build:wasm && tsc",
34
34
  "build:wasm": "node scripts/build-wasm.mjs",
35
+ "prepack": "npm run build",
35
36
  "typecheck": "tsc --noEmit",
36
37
  "test": "npm run build && node --test \"test/*.test.mjs\""
37
38
  },