diff --git a/README.md b/README.md index c9a0b60..857a153 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,68 @@ -# Instructions +# simple-cesr -- This project template uses `ts-node` and targets Node 20 -- However, both the`start` and the `test` scripts in `package.json` are overly complicated due a [bug](https://github.com/TypeStrong/ts-node/issues/1997) in `ts-node` related to Node 20. When the bug is resolved, you should be able to revert to `npx ts-node [file or glob]` without any need to invoke the ESM loader directly (it is enabled by `"esm": true` in the `ts-node` section in `tsconfig.json`). -- `no-emit` is set to `true` in `tsconfig.json` so don't expect any outputted javascript files. The `.ts` files are meant to be executed directly with `ts-node`. +`simple-cesr` is a simple, limited, true-to-spec implementation of [Composable Event Streaming Representation (CESR)](https://weboftrust.github.io/ietf-cesr/draft-ssmith-cesr.html). It is compatible with Node.js and major browsers. It has a simple API for encoding primitives and transforming them across the three [domain representations](https://weboftrust.github.io/ietf-cesr/draft-ssmith-cesr.html#name-concrete-domain-representat) (Raw, Text, and Binary). It conspicuously adheres to terminology from the spec and carefully avoids introducing any outside concepts beyond CESR. In this initial version, only a selected subset of primitives from the [small fixed](https://weboftrust.github.io/ietf-cesr/draft-ssmith-cesr.html#name-small-fixed-raw-size-tables) and [large fixed](https://weboftrust.github.io/ietf-cesr/draft-ssmith-cesr.html#name-large-fixed-raw-size-tables) raw size tables have been implemented. Specifically, these primitives have been implemented (full table of potential options [here](https://weboftrust.github.io/ietf-cesr/draft-ssmith-cesr.html#name-master-code-table)): + +| Code | Description | +| :--: | :-------------------------- | +| A | Seed of Ed25519 private key | +| B | Ed25519 non-transferable prefix public verification key | +| C | X25519 public encryption key | +| D | Ed25519 public verification key | +| E | Blake3-256 Digest | +| F | Blake2b-256 Digest | +| G | Blake2s-256 Digest | +| H | SHA3-256 Digest | +| I | SHA2-256 Digest | +| J | Seed of ECDSA secp256k1 private key | +| M | Short number 2 byte base-2 | +| N | Big number 8 byte base-2 | +| O | X25519 private decryption key | +| 0A | Random salt, seed, private key, or sequence number of length 128 bits | +| 0B | Ed25519 signature | +| 0C | ECDSA secp256k1 signature | +| 0D | Blake3-512 Digest | +| 0E | Blake2b-512 Digest | +| 0F | SHA3-512 Digest | +| 0G | SHA2-512 Digest | +| 0H | Long number 4 byte base-2 | +| 1AAA | ECDSA secp256k1 non-transferable prefix public verification key | +| 1AAB | ECDSA secp256k1 public verification or encryption key | +| 1AAC | Ed448 non-transferable prefix public verification key | +| 1AAD | Ed448 public verification key | +| 1AAE | Ed448 signature | +| 1AAF | Tag Base64 4 chars or 3 byte base-2 number | + +This implementation is consistent with the [1.0](https://weboftrust.github.io/ietf-cesr/draft-ssmith-cesr.html) spec housed at IETF and has not yet considered the soon-to-be-finished CESR [2.0](https://trustoverip.github.io/tswg-cesr-specification/) spec coming from the Trust Over IP Foundation. + +## Usage + +```bash +npm install @jrayback/simple-cesr +``` + +## Development + +Unit tests can be run with: + +```bash +npm test +``` + +Additionally, a high-level test that verifies the compatibility of `simple-cesr` with other CESR implementations, like [`cesr-ts`](https://github.com/webOfTrust/cesr-ts/) (derived from [`signify-ts`](https://github.com/WebOfTrust/signify-ts)) can be run with: + +```bash +npm run standards-test +``` +An all-inclusive run of tests can be done with: + +```bash +npm run all-tests +``` + +To get a feel for things: + +```bash +npm start +``` + +This will run `src/main.js` and is a good way to get oriented. diff --git a/index.ts b/index.ts index 4738ace..33a918a 100644 --- a/index.ts +++ b/index.ts @@ -1 +1,5 @@ -// TO BE FILLED WITH EXTERNAL API +/* eslint-disable @typescript-eslint/no-var-requires */ + +export * as cesr from './src/api/api.js' + +Object.assign(module.exports, require('./src/api/api.js')) // presumably for CommonJS diff --git a/jest.config.js b/jest.config.js index 310e8d8..5fedb7a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,22 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ export default { - preset: 'ts-jest', + // need esm preset to support esm modules + preset: 'ts-jest/presets/default-esm', testEnvironment: 'node', + // part of esm support, see: https://kulshekhar.github.io/ts-jest/docs/guides/esm-support/ + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1' + }, + transform: { + // allows jest to resolve module paths to a .ts source file using a .js extension + // see dox for more information on this setting: https://kulshekhar.github.io/ts-jest/docs/guides/esm-support/ + '^.+\\.[tj]sx?$': [ + 'ts-jest', + { + useESM: true + } + ] + }, + // use a fancier test reporter reporters: ['jest-ci-spec-reporter'] } diff --git a/package-lock.json b/package-lock.json index e8a656f..512a8ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,21 @@ { - "name": "jmr-cesr", - "version": "1.0.0", + "name": "@jrayback/simple-cesr", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "jmr-cesr", - "version": "1.0.0", + "name": "@jrayback/simple-cesr", + "version": "0.1.0", "license": "UNLICENSED", "dependencies": { "buffer": "^6.0.3", - "immer": "^10.0.3", "ts-pattern": "^5.0.6" }, "devDependencies": { - "@tsconfig/node20": "^20.1.2", + "@swc/cli": "^0.3.10", + "@swc/core": "^1.4.11", + "@tsconfig/node18": "^18.2.4", "@types/jest": "^29.5.5", "jest": "^29.7.0", "jest-ci-spec-reporter": "^1.0.3", @@ -23,6 +24,9 @@ "ts-standard": "^12.0.2", "tsx": "^4.7.1", "typescript": "^5.2.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1544,6 +1548,25 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@mole-inc/bin-wrapper": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@mole-inc/bin-wrapper/-/bin-wrapper-8.0.1.tgz", + "integrity": "sha512-sTGoeZnjI8N4KS+sW2AN95gDBErhAguvkw/tWdCjeM8bvxpz5lqrnd0vOJABA1A+Ic3zED7PYoLP/RANLgVotA==", + "dev": true, + "dependencies": { + "bin-check": "^4.1.0", + "bin-version-check": "^5.0.0", + "content-disposition": "^0.5.4", + "ext-name": "^5.0.0", + "file-type": "^17.1.6", + "filenamify": "^5.0.2", + "got": "^11.8.5", + "os-filter-obj": "^2.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1585,6 +1608,18 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", @@ -1603,6 +1638,337 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@swc/cli": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@swc/cli/-/cli-0.3.10.tgz", + "integrity": "sha512-YWfYo9kXdbmIuGwIPth9geKgb0KssCMTdZa44zAN5KoqcuCP2rTW9s60heQDSRNpbtCmUr7BKF1VivsoHXrvrQ==", + "dev": true, + "dependencies": { + "@mole-inc/bin-wrapper": "^8.0.1", + "@swc/counter": "^0.1.3", + "commander": "^8.3.0", + "fast-glob": "^3.2.5", + "minimatch": "^9.0.3", + "piscina": "^4.3.0", + "semver": "^7.3.8", + "slash": "3.0.0", + "source-map": "^0.7.3" + }, + "bin": { + "spack": "bin/spack.js", + "swc": "bin/swc.js", + "swcx": "bin/swcx.js" + }, + "engines": { + "node": ">= 16.14.0" + }, + "peerDependencies": { + "@swc/core": "^1.2.66", + "chokidar": "^3.5.1" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@swc/cli/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@swc/cli/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/cli/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@swc/cli/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/cli/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@swc/cli/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/@swc/core": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.11.tgz", + "integrity": "sha512-WKEakMZxkVwRdgMN4AMJ9K5nysY8g8npgQPczmjBeNK5In7QEAZAJwnyccrWwJZU0XjVeHn2uj+XbOKdDW17rg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@swc/counter": "^0.1.2", + "@swc/types": "^0.1.5" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.4.11", + "@swc/core-darwin-x64": "1.4.11", + "@swc/core-linux-arm-gnueabihf": "1.4.11", + "@swc/core-linux-arm64-gnu": "1.4.11", + "@swc/core-linux-arm64-musl": "1.4.11", + "@swc/core-linux-x64-gnu": "1.4.11", + "@swc/core-linux-x64-musl": "1.4.11", + "@swc/core-win32-arm64-msvc": "1.4.11", + "@swc/core-win32-ia32-msvc": "1.4.11", + "@swc/core-win32-x64-msvc": "1.4.11" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.11.tgz", + "integrity": "sha512-C1j1Qp/IHSelVWdEnT7f0iONWxQz6FAqzjCF2iaL+0vFg4V5f2nlgrueY8vj5pNNzSGhrAlxsMxEIp4dj1MXkg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.11.tgz", + "integrity": "sha512-0TTy3Ni8ncgaMCchSQ7FK8ZXQLlamy0FXmGWbR58c+pVZWYZltYPTmheJUvVcR0H2+gPAymRKyfC0iLszDALjg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.11.tgz", + "integrity": "sha512-XJLB71uw0rog4DjYAPxFGAuGCBQpgJDlPZZK6MTmZOvI/1t0+DelJ24IjHIxk500YYM26Yv47xPabqFPD7I2zQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.11.tgz", + "integrity": "sha512-vYQwzJvm/iu052d5Iw27UFALIN5xSrGkPZXxLNMHPySVko2QMNNBv35HLatkEQHbQ3X+VKSW9J9SkdtAvAVRAQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.11.tgz", + "integrity": "sha512-eV+KduiRYUFjPsvbZuJ9aknQH9Tj0U2/G9oIZSzLx/18WsYi+upzHbgxmIIHJ2VJgfd7nN40RI/hMtxNsUzR/g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.11.tgz", + "integrity": "sha512-WA1iGXZ2HpqM1OR9VCQZJ8sQ1KP2or9O4bO8vWZo6HZJIeoQSo7aa9waaCLRpkZvkng1ct/TF/l6ymqSNFXIzQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.11.tgz", + "integrity": "sha512-UkVJToKf0owwQYRnGvjHAeYVDfeimCEcx0VQSbJoN7Iy0ckRZi7YPlmWJU31xtKvikE2bQWCOVe0qbSDqqcWXA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.11.tgz", + "integrity": "sha512-35khwkyly7lF5NDSyvIrukBMzxPorgc5iTSDfVO/LvnmN5+fm4lTlrDr4tUfTdOhv3Emy7CsKlsNAeFRJ+Pm+w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.11.tgz", + "integrity": "sha512-Wx8/6f0ufgQF2pbVPsJ2dAmFLwIOW+xBE5fxnb7VnEbGkTgP1qMDWiiAtD9rtvDSuODG3i1AEmAak/2HAc6i6A==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.11.tgz", + "integrity": "sha512-0xRFW6K9UZQH2NVC/0pVB0GJXS45lY24f+6XaPBF1YnMHd8A8GoHl7ugyM5yNUTe2AKhSgk5fJV00EJt/XBtdQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true + }, + "node_modules/@swc/types": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.6.tgz", + "integrity": "sha512-/JLo/l2JsT/LRd80C3HfbmVpxOAJ11FO2RCEslFrgzLltoP9j8XIbsyDcfCt2WWyX+CM96rBoNM+IToAkFOugg==", + "dev": true, + "dependencies": { + "@swc/counter": "^0.1.3" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "dev": true, + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "dev": true + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -1627,10 +1993,10 @@ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true }, - "node_modules/@tsconfig/node20": { - "version": "20.1.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.2.tgz", - "integrity": "sha512-madaWq2k+LYMEhmcp0fs+OGaLFk0OenpHa4gmI4VEmCKX4PJntQ6fnnGADVFrVkBj0wIdAlQnK/MrlYTHsa1gQ==", + "node_modules/@tsconfig/node18": { + "version": "18.2.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-18.2.4.tgz", + "integrity": "sha512-5xxU8vVs9/FNcvm3gE07fPbn9tl6tqGGWA9tSlwsUEkBxtRnTsNmwrV8gasZ9F/EobaSv9+nu8AxUKccw77JpQ==", "dev": true }, "node_modules/@types/babel__core": { @@ -1674,6 +2040,18 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dev": true, + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -1683,6 +2061,12 @@ "@types/node": "*" } }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "dev": true + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -1729,6 +2113,15 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { "version": "20.11.20", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", @@ -1738,6 +2131,15 @@ "undici-types": "~5.26.4" } }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/semver": { "version": "7.5.8", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", @@ -2156,6 +2558,26 @@ "node": ">= 8" } }, + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", @@ -2407,79 +2829,275 @@ "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bin-check": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", + "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", + "dev": true, + "dependencies": { + "execa": "^0.7.0", + "executable": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/bin-check/node_modules/execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==", + "dev": true, + "dependencies": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-check/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/bin-check/node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/bin-check/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-check/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bin-check/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/bin-check/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, + "node_modules/bin-version": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-6.0.0.tgz", + "integrity": "sha512-nk5wEsP4RiKjG+vF+uG8lFsEn4d7Y6FVDamzzftSunXOoOcOOkzcWdKVlGgFFwlUQCj63SgnUkLLGF8v7lufhw==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "find-versions": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bin-version-check": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-5.1.0.tgz", + "integrity": "sha512-bYsvMqJ8yNGILLz1KP9zKLzQ6YpljV3ln1gqhuLkUtyfGi3qXKGuK2p+U4NAvjVFzDFiBBtOpCOSFNuYYEGZ5g==", + "dev": true, + "dependencies": { + "bin-version": "^6.0.0", + "semver": "^7.5.3", + "semver-truncate": "^3.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "node_modules/bin-version-check/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "yallist": "^4.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "engines": { + "node": ">=10" } }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "node_modules/bin-version-check/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" + "lru-cache": "^6.0.0" }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "bin": { + "semver": "bin/semver.js" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "engines": { + "node": ">=10" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "node_modules/bin-version-check/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2626,6 +3244,48 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "dev": true, + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -2743,6 +3403,18 @@ "node": ">=12" } }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2777,12 +3449,33 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2847,6 +3540,33 @@ } } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/dedent": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", @@ -2876,6 +3596,15 @@ "node": ">=0.10.0" } }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -2985,6 +3714,15 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -3866,6 +4604,27 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "dependencies": { + "pify": "^2.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/executable/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -3891,6 +4650,31 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "dev": true, + "dependencies": { + "mime-db": "^1.28.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "dev": true, + "dependencies": { + "ext-list": "^2.0.0", + "sort-keys-length": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3967,6 +4751,52 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-type": { + "version": "17.1.6", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", + "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", + "dev": true, + "dependencies": { + "readable-web-to-node-stream": "^3.0.2", + "strtok3": "^7.0.0-alpha.9", + "token-types": "^5.0.0-alpha.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, + "node_modules/filename-reserved-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-3.0.0.tgz", + "integrity": "sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/filenamify": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-5.1.1.tgz", + "integrity": "sha512-M45CbrJLGACfrPOkrTp3j2EcO9OBkKUYME0eiqOCa7i2poaklU0jhlIaMlr8ijLorT0uLAzrn3qXOp5684CkfA==", + "dev": true, + "dependencies": { + "filename-reserved-regex": "^3.0.0", + "strip-outer": "^2.0.0", + "trim-repeated": "^2.0.0" + }, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -3992,6 +4822,21 @@ "node": ">=8" } }, + "node_modules/find-versions": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-5.1.0.tgz", + "integrity": "sha512-+iwzCJ7C5v5KgcBuueqVoNiHVoQpwiUK5XFLjf0affFTep+Wcw93tPvmb8tqujDNmzhBDPddnWV/qgWSXgq+Hg==", + "dev": true, + "dependencies": { + "semver-regex": "^4.0.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -4264,6 +5109,31 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -4363,6 +5233,25 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "dev": true, + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -4400,15 +5289,6 @@ "node": ">= 4" } }, - "node_modules/immer": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/immer/-/immer-10.0.3.tgz", - "integrity": "sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/immer" - } - }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -4716,6 +5596,15 @@ "node": ">=8" } }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -5747,6 +6636,15 @@ "loose-envify": "cli.js" } }, + "node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -5844,7 +6742,16 @@ "picomatch": "^2.3.1" }, "engines": { - "node": ">=8.6" + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" } }, "node_modules/mimic-fn": { @@ -5856,6 +6763,15 @@ "node": ">=6" } }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5895,6 +6811,40 @@ "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, + "node_modules/nice-napi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", + "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "!win32" + ], + "dependencies": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2" + } + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true, + "optional": true + }, + "node_modules/node-gyp-build": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", + "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "dev": true, + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -5916,6 +6866,18 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -6088,6 +7050,36 @@ "node": ">= 0.8.0" } }, + "node_modules/os-filter-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", + "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", + "dev": true, + "dependencies": { + "arch": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -6211,6 +7203,19 @@ "node": ">=8" } }, + "node_modules/peek-readable": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -6247,6 +7252,15 @@ "node": ">= 6" } }, + "node_modules/piscina": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-4.4.0.tgz", + "integrity": "sha512-+AQduEJefrOApE4bV7KRmp3N2JnnyErlVqq4P/jmko4FPz9Z877BCccl/iB3FdrWSUkvbGV9Kan/KllJgat3Vg==", + "dev": true, + "optionalDependencies": { + "nice-napi": "^1.0.2" + } + }, "node_modules/pkg-conf": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz", @@ -6431,6 +7445,22 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -6476,12 +7506,54 @@ } ] }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readable-web-to-node-stream": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", + "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", + "dev": true, + "dependencies": { + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz", @@ -6559,6 +7631,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -6598,6 +7676,18 @@ "node": ">=10" } }, + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6664,6 +7754,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/safe-regex-test": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", @@ -6690,6 +7800,66 @@ "semver": "bin/semver.js" } }, + "node_modules/semver-regex": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-4.0.5.tgz", + "integrity": "sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/semver-truncate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-3.0.0.tgz", + "integrity": "sha512-LJWA9kSvMolR51oDE6PN3kALBNaUdkxzAGcexw8gjMA8xr5zUqK0JiR3CgARSqanYF3Z1YHvsErb1KDgh+v7Rg==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/semver-truncate/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-truncate/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-truncate/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/set-function-length": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", @@ -6782,6 +7952,30 @@ "node": ">=8" } }, + "node_modules/sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==", + "dev": true, + "dependencies": { + "is-plain-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw==", + "dev": true, + "dependencies": { + "sort-keys": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6969,6 +8163,15 @@ "node": ">=6" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -7082,6 +8285,15 @@ "node": ">=8" } }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -7103,6 +8315,35 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-outer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-2.0.0.tgz", + "integrity": "sha512-A21Xsm1XzUkK0qK1ZrytDUvqsQWict2Cykhvi0fBQntGG5JSprESasEyV1EZ/4CiR5WB5KjzLTrP/bO37B0wPg==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strtok3": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", + "dev": true, + "dependencies": { + "@tokenizer/token": "^0.3.0", + "peek-readable": "^5.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7174,6 +8415,47 @@ "node": ">=8.0" } }, + "node_modules/token-types": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", + "dev": true, + "dependencies": { + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/trim-repeated": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-2.0.0.tgz", + "integrity": "sha512-QUHBFTJGdOwmp0tbOG505xAgOp/YliZP/6UgafFXYZ26WT1bvQmSMJUvkeVSASuJJHbqsFbynTvkd5W8RBTipg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^5.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/trim-repeated/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ts-jest": { "version": "29.1.2", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", @@ -7579,6 +8861,12 @@ "punycode": "^2.1.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", diff --git a/package.json b/package.json index ce0355c..80be705 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,39 @@ { - "name": "jmr-cesr", + "name": "@jrayback/simple-cesr", "type": "module", - "version": "1.0.0", - "description": "An implementation of the CESR protocol.", - "main": "index.ts", + "version": "0.1.1", + "description": "A simple, limited, true-to-spec implementation of the CESR protocol.", + "main": "dist/index.js", + "files": [ + "dist" + ], "scripts": { + "build": "npx rimraf ./dist && npx swc src index.ts -d dist --ignore **/*.test.ts --ignore **/main.ts", "start": "npx tsx src/main.ts", "test": "jest ./src/api ./src/implementation", - "build": "npx tsc", - "standards-test": "jest ./test/standards", + "standards-test": "jest ./testing/standards", "all-tests": "jest", - "sizage": "npx tsx ./script.ts" + "formatting": "npx ts-standard --fix", + "full-build": "npm run all-tests && npm run formatting && npm run build" }, + "repository": { + "type": "git", + "url": "git+https://github.com/futureforging/simple-cesr.git" + }, + "keywords": [ + "KERI", + "CESR" + ], "author": "Jonathan Rayback", "license": "UNLICENSED", + "bugs": { + "url": "https://github.com/futureforging/simple-cesr/issues" + }, + "homepage": "https://github.com/futureforging/simple-cesr#readme", "devDependencies": { - "@tsconfig/node20": "^20.1.2", + "@swc/cli": "^0.3.10", + "@swc/core": "^1.4.11", + "@tsconfig/node18": "^18.2.4", "@types/jest": "^29.5.5", "jest": "^29.7.0", "jest-ci-spec-reporter": "^1.0.3", @@ -32,7 +50,9 @@ }, "dependencies": { "buffer": "^6.0.3", - "immer": "^10.0.3", "ts-pattern": "^5.0.6" + }, + "engines": { + "node": ">=18.0.0" } } diff --git a/src/api/api.test.ts b/src/api/api.test.ts new file mode 100644 index 0000000..130adf7 --- /dev/null +++ b/src/api/api.test.ts @@ -0,0 +1,20 @@ +import * as cesr from './api.js' + +describe('API', () => { + it('works...', () => { + const code = 'M' + const primitive = new Uint8Array([0, 1]) + expect(() => cesr.encodeRaw(code, primitive)).not.toThrow() + expect(() => cesr.encodeText(code, primitive)).not.toThrow() + expect(() => cesr.encodeBinary(code, primitive)).not.toThrow() + const raw = cesr.encodeRaw(code, primitive) + const text = cesr.encodeText(code, primitive) + const binary = cesr.encodeBinary(code, primitive) + expect(() => cesr.toRaw(text)).not.toThrow() + expect(() => cesr.toRaw(binary)).not.toThrow() + expect(() => cesr.toText(binary)).not.toThrow() + expect(() => cesr.toText(raw)).not.toThrow() + expect(() => cesr.toBinary(raw)).not.toThrow() + expect(() => cesr.toBinary(text)).not.toThrow() + }) +}) diff --git a/src/api/api.ts b/src/api/api.ts new file mode 100644 index 0000000..9d8f5bc --- /dev/null +++ b/src/api/api.ts @@ -0,0 +1,15 @@ +import { encodeBinary } from './encode/encoders/encodeBinary.js' +import { encodeText } from './encode/encoders/encodeText.js' +import { encodeRaw } from './encode/encoders/encodeRaw.js' +import { toBinary } from './transform/toBinary.js' +import { toText } from './transform/toText.js' +import { toRaw } from './transform/toRaw.js' + +export { + encodeBinary, + encodeText, + encodeRaw, + toBinary, + toText, + toRaw +} diff --git a/src/api/encode/asText.ts b/src/api/encode/asText.ts index eebddc2..3a2ea5f 100644 --- a/src/api/encode/asText.ts +++ b/src/api/encode/asText.ts @@ -1,8 +1,8 @@ -import { pipe } from '../../lib/util/pipe.ts' -import { swapInTypeCode } from './encoders/lib/swapInTypeCode.ts' -import { padUpFront } from './encoders/lib/padUpFront.ts' -import { convertToBase64 } from './encoders/lib/convertToBase64.ts' -import { Code } from '../../core/code/code.ts' +import { pipe } from '../../lib/util/pipe.js' +import { swapInTypeCode } from './encoders/lib/swapInTypeCode.js' +import { padUpFront } from './encoders/lib/padUpFront.js' +import { convertToBase64 } from './encoders/lib/convertToBase64.js' +import { Code } from '../../core/code/code.js' // builds the proper text encoding for the given primitive export const asText = (code: Code, primitive: Buffer): string => diff --git a/src/api/encode/encoders/encodeBinary.test.ts b/src/api/encode/encoders/encodeBinary.test.ts index c588824..8c7dc82 100644 --- a/src/api/encode/encoders/encodeBinary.test.ts +++ b/src/api/encode/encoders/encodeBinary.test.ts @@ -1,5 +1,5 @@ import { Buffer } from 'buffer' -import { encodeBinary } from './encodeBinary.ts' +import { encodeBinary } from './encodeBinary.js' describe('Binary encoder', () => { it('processes code "M" correctly', () => { diff --git a/src/api/encode/encoders/encodeBinary.ts b/src/api/encode/encoders/encodeBinary.ts index 8c701dc..c0c6698 100644 --- a/src/api/encode/encoders/encodeBinary.ts +++ b/src/api/encode/encoders/encodeBinary.ts @@ -1,9 +1,8 @@ -import { Code } from '../../../core/code/code.ts' -import { Binary, Text } from '../../../core/domain/domains.ts' -import { encodeText } from './encodeText.ts' -import { make } from '../../../implementation/make.ts' -import { asText } from '../asText.ts' -import { asBinary } from '../asBinary.ts' +import { Code } from '../../../core/code/code.js' +import { Binary } from '../../../core/domain/domains.js' +import { make } from '../../../implementation/make.js' +import { asText } from '../asText.js' +import { asBinary } from '../asBinary.js' // encodes a primitive in the Binary domain. needs the type code and the primitive as a byte array export const encodeBinary = (code: Code, primitive: Uint8Array): Binary => { diff --git a/src/api/encode/encoders/encodeRaw.test.ts b/src/api/encode/encoders/encodeRaw.test.ts index fee752e..fed51d3 100644 --- a/src/api/encode/encoders/encodeRaw.test.ts +++ b/src/api/encode/encoders/encodeRaw.test.ts @@ -1,5 +1,5 @@ import { Buffer } from 'buffer' -import { encodeRaw } from './encodeRaw.ts' +import { encodeRaw } from './encodeRaw.js' describe('Raw encoder', () => { it("encodes a one-character primitive: 'A'", () => { diff --git a/src/api/encode/encoders/encodeRaw.ts b/src/api/encode/encoders/encodeRaw.ts index 21095c9..43600a6 100644 --- a/src/api/encode/encoders/encodeRaw.ts +++ b/src/api/encode/encoders/encodeRaw.ts @@ -1,7 +1,7 @@ import { Buffer } from 'buffer' -import { make } from '../../../implementation/make.ts' -import { Code } from '../../../core/code/code.ts' -import { Raw } from '../../../core/domain/domains.ts' +import { make } from '../../../implementation/make.js' +import { Code } from '../../../core/code/code.js' +import { Raw } from '../../../core/domain/domains.js' export const encodeRaw = (code: Code, primitive: Uint8Array): Raw => // Make a Raw diff --git a/src/api/encode/encoders/encodeText.test.ts b/src/api/encode/encoders/encodeText.test.ts index a79711f..78126d1 100644 --- a/src/api/encode/encoders/encodeText.test.ts +++ b/src/api/encode/encoders/encodeText.test.ts @@ -1,5 +1,5 @@ import { Buffer } from 'buffer' -import { encodeText } from './encodeText.ts' +import { encodeText } from './encodeText.js' describe('Text Encoder', () => { it('gets "MAAB" from ["M", 1]', () => { diff --git a/src/api/encode/encoders/encodeText.ts b/src/api/encode/encoders/encodeText.ts index e9ff188..7f1fc8a 100644 --- a/src/api/encode/encoders/encodeText.ts +++ b/src/api/encode/encoders/encodeText.ts @@ -1,8 +1,8 @@ -import { Code } from '../../../core/code/code.ts' -import { Text } from '../../../core/domain/domains.ts' +import { Code } from '../../../core/code/code.js' +import { Text } from '../../../core/domain/domains.js' -import { make } from '../../../implementation/make.ts' -import { asText } from '../asText.ts' +import { make } from '../../../implementation/make.js' +import { asText } from '../asText.js' export const encodeText = (code: Code, primitive: Uint8Array): Text => { // requires two steps... diff --git a/src/api/encode/encoders/lib/padUpFront.ts b/src/api/encode/encoders/lib/padUpFront.ts index 8b8076f..db4fa5a 100644 --- a/src/api/encode/encoders/lib/padUpFront.ts +++ b/src/api/encode/encoders/lib/padUpFront.ts @@ -1,6 +1,6 @@ import { Buffer } from 'buffer' import { match } from 'ts-pattern' -import { padSize } from '../../../../lib/keri/padSize.ts' +import { padSize } from '../../../../lib/keri/padSize.js' // only valid pad sizes in KERI are 0, 1, or 2 type PadSize = 0 | 1 | 2 diff --git a/src/api/encode/encoders/lib/swapInTypeCode.ts b/src/api/encode/encoders/lib/swapInTypeCode.ts index 8638104..bb5c125 100644 --- a/src/api/encode/encoders/lib/swapInTypeCode.ts +++ b/src/api/encode/encoders/lib/swapInTypeCode.ts @@ -1,5 +1,5 @@ import { match } from 'ts-pattern' -import { Code, CodeLength } from '../../../../core/code/code.ts' +import { Code, CodeLength } from '../../../../core/code/code.js' type Swapper = (text: string) => string diff --git a/src/api/transform/lib/asRaw.ts b/src/api/transform/lib/asRaw.ts index 5d2aea2..35c04fe 100644 --- a/src/api/transform/lib/asRaw.ts +++ b/src/api/transform/lib/asRaw.ts @@ -1,5 +1,5 @@ -import { Raw } from '../../../core/domain/domains.ts' -import { Code } from '../../../core/code/code.ts' +import { Raw } from '../../../core/domain/domains.js' +import { Code } from '../../../core/code/code.js' export const asRaw = (code: Code) => (raw: Buffer): Raw => ( { diff --git a/src/api/transform/lib/readCodeFromString.ts b/src/api/transform/lib/readCodeFromString.ts index 7c180d1..59b79a7 100644 --- a/src/api/transform/lib/readCodeFromString.ts +++ b/src/api/transform/lib/readCodeFromString.ts @@ -1,6 +1,6 @@ import { match } from 'ts-pattern' -import { Text } from '../../../core/domain/domains.ts' -import { Code } from '../../../core/code/code.ts' +import { Text } from '../../../core/domain/domains.js' +import { Code } from '../../../core/code/code.js' const readOneCharCode = (text: Text): Code => text[0] as Code const readTwoCharCode = (text: Text): Code => text.substring(0, 2) as Code diff --git a/src/api/transform/lib/removeBytes.ts b/src/api/transform/lib/removeBytes.ts index 4adc993..3a3ff49 100644 --- a/src/api/transform/lib/removeBytes.ts +++ b/src/api/transform/lib/removeBytes.ts @@ -1,5 +1,5 @@ import { match } from 'ts-pattern' -import { CodeLength } from '../../../core/code/code.ts' +import { CodeLength } from '../../../core/code/code.js' export type PaddingRemover = (bytes: Buffer) => Buffer diff --git a/src/api/transform/lib/toBytes.ts b/src/api/transform/lib/toBytes.ts index 7715f39..7becb69 100644 --- a/src/api/transform/lib/toBytes.ts +++ b/src/api/transform/lib/toBytes.ts @@ -1,5 +1,5 @@ import { Buffer } from 'buffer' -import { Text } from '../../../core/domain/domains.ts' +import { Text } from '../../../core/domain/domains.js' // takes a type code and a CESR encoded string, and returns another transitional object export const toBytes = (text: Text): Buffer => Buffer.from(text, 'base64url') diff --git a/src/api/transform/toBinary.test.ts b/src/api/transform/toBinary.test.ts index 7afab0d..fbc260b 100644 --- a/src/api/transform/toBinary.test.ts +++ b/src/api/transform/toBinary.test.ts @@ -1,8 +1,8 @@ -import { Raw } from '../../core/domain/domains.ts' -import { encodeBinary } from '../encode/encoders/encodeBinary.ts' -import { encodeText } from '../encode/encoders/encodeText.ts' -import { toBinary } from './toBinary.ts' +import { Raw } from '../../core/domain/domains.js' +import { encodeBinary } from '../encode/encoders/encodeBinary.js' +import { encodeText } from '../encode/encoders/encodeText.js' +import { toBinary } from './toBinary.js' describe('Transform to Binary', () => { it('handles Text', () => { diff --git a/src/api/transform/toBinary.ts b/src/api/transform/toBinary.ts index 4a2cc50..b20d594 100644 --- a/src/api/transform/toBinary.ts +++ b/src/api/transform/toBinary.ts @@ -1,6 +1,6 @@ import { Buffer } from 'buffer' -import { Binary, Text, Raw } from '../../core/domain/domains.ts' -import { encodeBinary } from '../encode/encoders/encodeBinary.ts' +import { Binary, Text, Raw } from '../../core/domain/domains.js' +import { encodeBinary } from '../encode/encoders/encodeBinary.js' export function toBinary (text: Text): Binary export function toBinary (Raw: Raw): Binary diff --git a/src/api/transform/toRaw.test.ts b/src/api/transform/toRaw.test.ts index ffe1d6b..bd86e01 100644 --- a/src/api/transform/toRaw.test.ts +++ b/src/api/transform/toRaw.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Binary, Raw, Text } from '../../core/domain/domains.ts' -import { encodeBinary } from '../encode/encoders/encodeBinary.ts' -import { encodeText } from '../encode/encoders/encodeText.ts' -import { toRaw } from './toRaw.ts' +import { Binary, Raw, Text } from '../../core/domain/domains.js' +import { encodeBinary } from '../encode/encoders/encodeBinary.js' +import { encodeText } from '../encode/encoders/encodeText.js' +import { toRaw } from './toRaw.js' describe('Transform to Raw', () => { it('handles Text with one-character code', () => { diff --git a/src/api/transform/toRaw.ts b/src/api/transform/toRaw.ts index a5e916e..1df260d 100644 --- a/src/api/transform/toRaw.ts +++ b/src/api/transform/toRaw.ts @@ -1,12 +1,12 @@ import { match } from 'ts-pattern' -import { Binary, Raw, Text } from '../../core/domain/domains.ts' -import { pipe } from '../../lib/util/pipe.ts' -import { removeThreeBytes, removeOneByte, removeTwoBytes, PaddingRemover } from './lib/removeBytes.ts' -import { toBytes } from './lib/toBytes.ts' -import { readCodeFromString } from './lib/readCodeFromString.ts' -import { toText } from './toText.ts' -import { CodeLength } from '../../core/code/code.ts' -import { asRaw } from './lib/asRaw.ts' +import { Binary, Raw, Text } from '../../core/domain/domains.js' +import { pipe } from '../../lib/util/pipe.js' +import { removeThreeBytes, removeOneByte, removeTwoBytes, PaddingRemover } from './lib/removeBytes.js' +import { toBytes } from './lib/toBytes.js' +import { readCodeFromString } from './lib/readCodeFromString.js' +import { toText } from './toText.js' +import { CodeLength } from '../../core/code/code.js' +import { asRaw } from './lib/asRaw.js' // two function signatures: Text and Binary export function toRaw (text: Text): Raw diff --git a/src/api/transform/toText.test.ts b/src/api/transform/toText.test.ts index f85e8f5..f94d930 100644 --- a/src/api/transform/toText.test.ts +++ b/src/api/transform/toText.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Raw } from '../../core/domain/domains.ts' -import { encodeBinary } from '../encode/encoders/encodeBinary.ts' -import { encodeText } from '../encode/encoders/encodeText.ts' -import { toText } from './toText.ts' +import { Raw } from '../../core/domain/domains.js' +import { encodeBinary } from '../encode/encoders/encodeBinary.js' +import { encodeText } from '../encode/encoders/encodeText.js' +import { toText } from './toText.js' describe('Transform to Text', () => { it('handles Binary', () => { diff --git a/src/api/transform/toText.ts b/src/api/transform/toText.ts index 9d423e4..335b1b2 100644 --- a/src/api/transform/toText.ts +++ b/src/api/transform/toText.ts @@ -1,7 +1,7 @@ import { Buffer } from 'buffer' -import { Binary, Raw, Text } from '../../core/domain/domains.ts' -import { encodeText } from '../encode/encoders/encodeText.ts' +import { Binary, Raw, Text } from '../../core/domain/domains.js' +import { encodeText } from '../encode/encoders/encodeText.js' export function toText (binary: Binary): Text export function toText (raw: Raw): Text diff --git a/src/core/code/code.ts b/src/core/code/code.ts index a354993..048afad 100644 --- a/src/core/code/code.ts +++ b/src/core/code/code.ts @@ -1,4 +1,4 @@ -import { BasicFourCharacterCode, BasicOneCharacterCode, BasicTwoCharacterCode } from './codes.ts' +import { BasicFourCharacterCode, BasicOneCharacterCode, BasicTwoCharacterCode } from './codes.js' export type CodeLength = 1 | 2 | 4 diff --git a/src/core/domain/domain.ts b/src/core/domain/domain.ts index 1bec909..b566126 100644 --- a/src/core/domain/domain.ts +++ b/src/core/domain/domain.ts @@ -1,3 +1,3 @@ -import { Text, Raw, Binary } from './domains.ts' +import { Text, Raw, Binary } from './domains.js' export type Domain = Text | Binary | Raw diff --git a/src/core/domain/domains.ts b/src/core/domain/domains.ts index 3e06321..0fae019 100644 --- a/src/core/domain/domains.ts +++ b/src/core/domain/domains.ts @@ -1,5 +1,5 @@ import { Buffer } from 'buffer' -import { Code } from '../code/code.ts' +import { Code } from '../code/code.js' export type Text = string diff --git a/src/core/primitive/primitives.ts b/src/core/primitive/primitives.ts index caae5e0..a48c2b3 100644 --- a/src/core/primitive/primitives.ts +++ b/src/core/primitive/primitives.ts @@ -1,4 +1,4 @@ -import { Raw } from '../domain/domains.ts' +import { Raw } from '../domain/domains.js' // One Character Codes export type Ed25519Seed = Raw & { readonly code: 'A' } diff --git a/src/implementation/make.ts b/src/implementation/make.ts index 804d091..0c4d1a0 100644 --- a/src/implementation/make.ts +++ b/src/implementation/make.ts @@ -1,34 +1,34 @@ import { match } from 'ts-pattern' -import { Code } from '../core/code/code.ts' -import { Raw } from '../core/domain/domains.ts' -import { ecdsa256k1 } from './maker/makers/basicFour/ecdsa256k1.ts' -import { x25519 } from './maker/makers/basicOne/x25519.ts' -import { sha3512 } from './maker/makers/basicTwo/sha3512.ts' -import { big } from './maker/makers/basicOne/big.ts' -import { short } from './maker/makers/basicOne/short.ts' -import { ed25519Seed } from './maker/makers/basicOne/ed25519Seed.ts' -import { ed25519n } from './maker/makers/basicOne/ed25519n.ts' -import { ed25519 } from './maker/makers/basicOne/ed25519.ts' -import { blake3256 } from './maker/makers/basicOne/blake3256.ts' -import { sha3256 } from './maker/makers/basicOne/sha3256.ts' -import { sha2256 } from './maker/makers/basicOne/sha2256.ts' -import { ecdsa256k1Seed } from './maker/makers/basicOne/ecdsa256k1Seed.ts' -import { x25519Private } from './maker/makers/basicOne/x25519Private.ts' -import { blake2b256 } from './maker/makers/basicOne/blake2b256.ts' -import { blake2s256 } from './maker/makers/basicOne/blake2s256.ts' -import { salt128 } from './maker/makers/basicTwo/salt128.ts' -import { ed25519Sig } from './maker/makers/basicTwo/ed25519Sig.ts' -import { ecdsa256k1Sig } from './maker/makers/basicTwo/ecdsa256k1Sig.ts' -import { blake3512 } from './maker/makers/basicTwo/blake3512.ts' -import { blake2b512 } from './maker/makers/basicTwo/blake2b512.ts' -import { sha2512 } from './maker/makers/basicTwo/sha2512.ts' -import { long } from './maker/makers/basicTwo/long.ts' -import { ecdsa256k1n } from './maker/makers/basicFour/ecdsa256k1n.ts' -import { ed448n } from './maker/makers/basicFour/ed448n.ts' -import { ed448 } from './maker/makers/basicFour/ed448.ts' -import { ed448s } from './maker/makers/basicFour/ed448s.ts' -import { fourB64ThreeByte } from './maker/makers/basicFour/fourB64ThreeByte.ts' +import { Code } from '../core/code/code.js' +import { Raw } from '../core/domain/domains.js' +import { ecdsa256k1 } from './maker/makers/basicFour/ecdsa256k1.js' +import { x25519 } from './maker/makers/basicOne/x25519.js' +import { sha3512 } from './maker/makers/basicTwo/sha3512.js' +import { big } from './maker/makers/basicOne/big.js' +import { short } from './maker/makers/basicOne/short.js' +import { ed25519Seed } from './maker/makers/basicOne/ed25519Seed.js' +import { ed25519n } from './maker/makers/basicOne/ed25519n.js' +import { ed25519 } from './maker/makers/basicOne/ed25519.js' +import { blake3256 } from './maker/makers/basicOne/blake3256.js' +import { sha3256 } from './maker/makers/basicOne/sha3256.js' +import { sha2256 } from './maker/makers/basicOne/sha2256.js' +import { ecdsa256k1Seed } from './maker/makers/basicOne/ecdsa256k1Seed.js' +import { x25519Private } from './maker/makers/basicOne/x25519Private.js' +import { blake2b256 } from './maker/makers/basicOne/blake2b256.js' +import { blake2s256 } from './maker/makers/basicOne/blake2s256.js' +import { salt128 } from './maker/makers/basicTwo/salt128.js' +import { ed25519Sig } from './maker/makers/basicTwo/ed25519Sig.js' +import { ecdsa256k1Sig } from './maker/makers/basicTwo/ecdsa256k1Sig.js' +import { blake3512 } from './maker/makers/basicTwo/blake3512.js' +import { blake2b512 } from './maker/makers/basicTwo/blake2b512.js' +import { sha2512 } from './maker/makers/basicTwo/sha2512.js' +import { long } from './maker/makers/basicTwo/long.js' +import { ecdsa256k1n } from './maker/makers/basicFour/ecdsa256k1n.js' +import { ed448n } from './maker/makers/basicFour/ed448n.js' +import { ed448 } from './maker/makers/basicFour/ed448.js' +import { ed448s } from './maker/makers/basicFour/ed448s.js' +import { fourB64ThreeByte } from './maker/makers/basicFour/fourB64ThreeByte.js' // make a Raw holding the appropriate primitive export const make = (code: Code, primitive: any): Raw => diff --git a/src/implementation/maker/maker.ts b/src/implementation/maker/maker.ts index 2075fae..5abb8e4 100644 --- a/src/implementation/maker/maker.ts +++ b/src/implementation/maker/maker.ts @@ -1,4 +1,4 @@ -import { Raw } from '../../core/domain/domains.ts' +import { Raw } from '../../core/domain/domains.js' export type Maker = (primitive: any) => Raw diff --git a/src/implementation/maker/makers/basicFour/ecdsa256k1.test.ts b/src/implementation/maker/makers/basicFour/ecdsa256k1.test.ts index 4360274..d921695 100644 --- a/src/implementation/maker/makers/basicFour/ecdsa256k1.test.ts +++ b/src/implementation/maker/makers/basicFour/ecdsa256k1.test.ts @@ -1,9 +1,9 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' -import { prefixis02or03 } from '../test/check/checks/prefixIsCorrect.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' +import { prefixis02or03 } from '../test/check/checks/prefixIsCorrect.js' const configuration = { describe: 'With ECDSA public verification key', diff --git a/src/implementation/maker/makers/basicFour/ecdsa256k1.ts b/src/implementation/maker/makers/basicFour/ecdsa256k1.ts index d741b21..5969b6a 100644 --- a/src/implementation/maker/makers/basicFour/ecdsa256k1.ts +++ b/src/implementation/maker/makers/basicFour/ecdsa256k1.ts @@ -1,8 +1,8 @@ -import { Maker, PrimitiveInvalidInput } from '../../maker.ts' -import { Ecdsa256k1 } from '../../../../core/primitive/primitives.ts' -import { itIs33Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Validation } from '../../validation/validation.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' +import { Maker, PrimitiveInvalidInput } from '../../maker.js' +import { Ecdsa256k1 } from '../../../../core/primitive/primitives.js' +import { itIs33Bytes } from '../../validation/validations/lengthIsRight.js' +import { Validation } from '../../validation/validation.js' +import { makeSureThat } from '../../validation/makeSureThat.js' export const ecdsa256k1: Maker = (primitive: Buffer): Ecdsa256k1 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicFour/ecdsa256k1n.test.ts b/src/implementation/maker/makers/basicFour/ecdsa256k1n.test.ts index e2e63b0..8856933 100644 --- a/src/implementation/maker/makers/basicFour/ecdsa256k1n.test.ts +++ b/src/implementation/maker/makers/basicFour/ecdsa256k1n.test.ts @@ -1,9 +1,9 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' -import { prefixis02or03 } from '../test/check/checks/prefixIsCorrect.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' +import { prefixis02or03 } from '../test/check/checks/prefixIsCorrect.js' const configuration = { describe: 'With ECDSA secp256k1 verification key, basic derivation', diff --git a/src/implementation/maker/makers/basicFour/ecdsa256k1n.ts b/src/implementation/maker/makers/basicFour/ecdsa256k1n.ts index 2ce71ca..8482a8c 100644 --- a/src/implementation/maker/makers/basicFour/ecdsa256k1n.ts +++ b/src/implementation/maker/makers/basicFour/ecdsa256k1n.ts @@ -1,8 +1,8 @@ -import { Maker, PrimitiveInvalidInput } from '../../maker.ts' -import { Ecdsa256k1n } from '../../../../core/primitive/primitives.ts' -import { itIs33Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Validation } from '../../validation/validation.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' +import { Maker, PrimitiveInvalidInput } from '../../maker.js' +import { Ecdsa256k1n } from '../../../../core/primitive/primitives.js' +import { itIs33Bytes } from '../../validation/validations/lengthIsRight.js' +import { Validation } from '../../validation/validation.js' +import { makeSureThat } from '../../validation/makeSureThat.js' export const ecdsa256k1n: Maker = (primitive: Buffer): Ecdsa256k1n => { makeSureThat( diff --git a/src/implementation/maker/makers/basicFour/ed448.test.ts b/src/implementation/maker/makers/basicFour/ed448.test.ts index 7097804..8776172 100644 --- a/src/implementation/maker/makers/basicFour/ed448.test.ts +++ b/src/implementation/maker/makers/basicFour/ed448.test.ts @@ -1,9 +1,9 @@ // '9a768bfe3045cd2189abcdef1234567890fedcba9876543210abcdef1234567890abcd1234ef567890abcd1234ef567890abcd1234ef567890abcd1234ef5678' import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Ed448 public key', diff --git a/src/implementation/maker/makers/basicFour/ed448.ts b/src/implementation/maker/makers/basicFour/ed448.ts index da7428d..461a1b0 100644 --- a/src/implementation/maker/makers/basicFour/ed448.ts +++ b/src/implementation/maker/makers/basicFour/ed448.ts @@ -1,7 +1,7 @@ -import { Maker } from '../../maker.ts' -import { itIs57Bytes } from '../../validation/validations/lengthIsRight.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { Ed448 } from '../../../../core/primitive/primitives.ts' +import { Maker } from '../../maker.js' +import { itIs57Bytes } from '../../validation/validations/lengthIsRight.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { Ed448 } from '../../../../core/primitive/primitives.js' export const ed448: Maker = (primitive: Buffer): Ed448 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicFour/ed448n.test.ts b/src/implementation/maker/makers/basicFour/ed448n.test.ts index 127bc1b..628f7d2 100644 --- a/src/implementation/maker/makers/basicFour/ed448n.test.ts +++ b/src/implementation/maker/makers/basicFour/ed448n.test.ts @@ -1,9 +1,9 @@ // '9a768bfe3045cd2189abcdef1234567890fedcba9876543210abcdef1234567890abcd1234ef567890abcd1234ef567890abcd1234ef567890abcd1234ef5678' import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Ed448 non-transferable public key', diff --git a/src/implementation/maker/makers/basicFour/ed448n.ts b/src/implementation/maker/makers/basicFour/ed448n.ts index d99abb2..0894caf 100644 --- a/src/implementation/maker/makers/basicFour/ed448n.ts +++ b/src/implementation/maker/makers/basicFour/ed448n.ts @@ -1,7 +1,7 @@ -import { Maker } from '../../maker.ts' -import { Ed448n } from '../../../../core/primitive/primitives.ts' -import { itIs57Bytes } from '../../validation/validations/lengthIsRight.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' +import { Maker } from '../../maker.js' +import { Ed448n } from '../../../../core/primitive/primitives.js' +import { itIs57Bytes } from '../../validation/validations/lengthIsRight.js' +import { makeSureThat } from '../../validation/makeSureThat.js' export const ed448n: Maker = (primitive: Buffer): Ed448n => { makeSureThat( diff --git a/src/implementation/maker/makers/basicFour/ed448s.test.ts b/src/implementation/maker/makers/basicFour/ed448s.test.ts index b45d081..15b2728 100644 --- a/src/implementation/maker/makers/basicFour/ed448s.test.ts +++ b/src/implementation/maker/makers/basicFour/ed448s.test.ts @@ -1,9 +1,9 @@ // '9a768bfe3045cd2189abcdef1234567890fedcba9876543210abcdef1234567890abcd1234ef567890abcd1234ef567890abcd1234ef567890abcd1234ef5678' import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Ed448 public signature', diff --git a/src/implementation/maker/makers/basicFour/ed448s.ts b/src/implementation/maker/makers/basicFour/ed448s.ts index de0631e..813e585 100644 --- a/src/implementation/maker/makers/basicFour/ed448s.ts +++ b/src/implementation/maker/makers/basicFour/ed448s.ts @@ -1,7 +1,7 @@ -import { Maker } from '../../maker.ts' -import { itIs39Bytes } from '../../validation/validations/lengthIsRight.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { Ed448s } from '../../../../core/primitive/primitives.ts' +import { Maker } from '../../maker.js' +import { itIs39Bytes } from '../../validation/validations/lengthIsRight.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { Ed448s } from '../../../../core/primitive/primitives.js' export const ed448s: Maker = (primitive: Buffer): Ed448s => { makeSureThat( diff --git a/src/implementation/maker/makers/basicFour/fourB64ThreeByte.test.ts b/src/implementation/maker/makers/basicFour/fourB64ThreeByte.test.ts index 0603fa5..cbc610c 100644 --- a/src/implementation/maker/makers/basicFour/fourB64ThreeByte.test.ts +++ b/src/implementation/maker/makers/basicFour/fourB64ThreeByte.test.ts @@ -1,9 +1,9 @@ // '9a768bfe3045cd2189abcdef1234567890fedcba9876543210abcdef1234567890abcd1234ef567890abcd1234ef567890abcd1234ef567890abcd1234ef5678' import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With four base64chars or three bytes', diff --git a/src/implementation/maker/makers/basicFour/fourB64ThreeByte.ts b/src/implementation/maker/makers/basicFour/fourB64ThreeByte.ts index 0ed493a..9bfceff 100644 --- a/src/implementation/maker/makers/basicFour/fourB64ThreeByte.ts +++ b/src/implementation/maker/makers/basicFour/fourB64ThreeByte.ts @@ -1,7 +1,7 @@ -import { Maker } from '../../maker.ts' -import { FourB64ThreeByte } from '../../../../core/primitive/primitives.ts' -import { itIsThreeBytes } from '../../validation/validations/lengthIsRight.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' +import { Maker } from '../../maker.js' +import { FourB64ThreeByte } from '../../../../core/primitive/primitives.js' +import { itIsThreeBytes } from '../../validation/validations/lengthIsRight.js' +import { makeSureThat } from '../../validation/makeSureThat.js' // four Base64 characters or a 3-byte base-2 number export const fourB64ThreeByte: Maker = (primitive: Buffer): FourB64ThreeByte => { diff --git a/src/implementation/maker/makers/basicOne/big.test.ts b/src/implementation/maker/makers/basicOne/big.test.ts index 592c949..e94630a 100644 --- a/src/implementation/maker/makers/basicOne/big.test.ts +++ b/src/implementation/maker/makers/basicOne/big.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const example = '0110abcdef012345' // becomes 8 byte Buffer diff --git a/src/implementation/maker/makers/basicOne/big.ts b/src/implementation/maker/makers/basicOne/big.ts index 1aa4481..6c35bd0 100644 --- a/src/implementation/maker/makers/basicOne/big.ts +++ b/src/implementation/maker/makers/basicOne/big.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { Big } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIsEightBytes } from '../../validation/validations/lengthIsRight.ts' +import { Maker } from '../../maker.js' +import { Big } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIsEightBytes } from '../../validation/validations/lengthIsRight.js' // 8-byte base-2 number export const big: Maker = (raw: Buffer): Big => { diff --git a/src/implementation/maker/makers/basicOne/blake2b256.test.ts b/src/implementation/maker/makers/basicOne/blake2b256.test.ts index 727b5a3..8993454 100644 --- a/src/implementation/maker/makers/basicOne/blake2b256.test.ts +++ b/src/implementation/maker/makers/basicOne/blake2b256.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Blake2b self-addressing 256 bit digest', diff --git a/src/implementation/maker/makers/basicOne/blake2b256.ts b/src/implementation/maker/makers/basicOne/blake2b256.ts index e6a1c03..5d90655 100644 --- a/src/implementation/maker/makers/basicOne/blake2b256.ts +++ b/src/implementation/maker/makers/basicOne/blake2b256.ts @@ -1,7 +1,7 @@ -import { Blake2b256 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Blake2b256 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const blake2b256: Maker = (primitive: Buffer): Blake2b256 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/blake2s256.test.ts b/src/implementation/maker/makers/basicOne/blake2s256.test.ts index 2562dd0..f004112 100644 --- a/src/implementation/maker/makers/basicOne/blake2s256.test.ts +++ b/src/implementation/maker/makers/basicOne/blake2s256.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Blake2s self-addressing 256 bit digest', diff --git a/src/implementation/maker/makers/basicOne/blake2s256.ts b/src/implementation/maker/makers/basicOne/blake2s256.ts index d6734cb..dff5b6f 100644 --- a/src/implementation/maker/makers/basicOne/blake2s256.ts +++ b/src/implementation/maker/makers/basicOne/blake2s256.ts @@ -1,7 +1,7 @@ -import { Blake2s256 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Blake2s256 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const blake2s256: Maker = (primitive: Buffer): Blake2s256 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/blake3256.test.ts b/src/implementation/maker/makers/basicOne/blake3256.test.ts index 7ba977a..3bdd5e5 100644 --- a/src/implementation/maker/makers/basicOne/blake3256.test.ts +++ b/src/implementation/maker/makers/basicOne/blake3256.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Blake3 256 bit digest', diff --git a/src/implementation/maker/makers/basicOne/blake3256.ts b/src/implementation/maker/makers/basicOne/blake3256.ts index 507b5a9..c3a0d6d 100644 --- a/src/implementation/maker/makers/basicOne/blake3256.ts +++ b/src/implementation/maker/makers/basicOne/blake3256.ts @@ -1,7 +1,7 @@ -import { Blake3256 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Blake3256 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const blake3256: Maker = (primitive: Buffer): Blake3256 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/ecdsa256k1Seed.test.ts b/src/implementation/maker/makers/basicOne/ecdsa256k1Seed.test.ts index 0b2d0ef..de4f23e 100644 --- a/src/implementation/maker/makers/basicOne/ecdsa256k1Seed.test.ts +++ b/src/implementation/maker/makers/basicOne/ecdsa256k1Seed.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With ECDSA secp256k1 256 bit seed', diff --git a/src/implementation/maker/makers/basicOne/ecdsa256k1Seed.ts b/src/implementation/maker/makers/basicOne/ecdsa256k1Seed.ts index c5e060b..2489a1c 100644 --- a/src/implementation/maker/makers/basicOne/ecdsa256k1Seed.ts +++ b/src/implementation/maker/makers/basicOne/ecdsa256k1Seed.ts @@ -1,7 +1,7 @@ -import { Ecdsa256k1Seed } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Ecdsa256k1Seed } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const ecdsa256k1Seed: Maker = (primitive: Buffer): Ecdsa256k1Seed => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/ed25519.test.ts b/src/implementation/maker/makers/basicOne/ed25519.test.ts index 9548d74..d2632f3 100644 --- a/src/implementation/maker/makers/basicOne/ed25519.test.ts +++ b/src/implementation/maker/makers/basicOne/ed25519.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' -import { Code } from '../../../../core/code/code.ts' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' +import { Code } from '../../../../core/code/code.js' const configuration = { describe: 'With Ed25519 verification key', diff --git a/src/implementation/maker/makers/basicOne/ed25519.ts b/src/implementation/maker/makers/basicOne/ed25519.ts index a501c10..7736545 100644 --- a/src/implementation/maker/makers/basicOne/ed25519.ts +++ b/src/implementation/maker/makers/basicOne/ed25519.ts @@ -1,7 +1,7 @@ -import { Ed25519 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Ed25519 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const ed25519: Maker = (primitive: Buffer): Ed25519 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/ed25519Seed.test.ts b/src/implementation/maker/makers/basicOne/ed25519Seed.test.ts index fd551c5..26f75a4 100644 --- a/src/implementation/maker/makers/basicOne/ed25519Seed.test.ts +++ b/src/implementation/maker/makers/basicOne/ed25519Seed.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Ed25519 Seed', diff --git a/src/implementation/maker/makers/basicOne/ed25519Seed.ts b/src/implementation/maker/makers/basicOne/ed25519Seed.ts index 2430256..ac83fc4 100644 --- a/src/implementation/maker/makers/basicOne/ed25519Seed.ts +++ b/src/implementation/maker/makers/basicOne/ed25519Seed.ts @@ -1,7 +1,7 @@ -import { Ed25519Seed } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Ed25519Seed } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const ed25519Seed: Maker = (primitive: Buffer): Ed25519Seed => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/ed25519n.test.ts b/src/implementation/maker/makers/basicOne/ed25519n.test.ts index a9c0bac..b6cf0f7 100644 --- a/src/implementation/maker/makers/basicOne/ed25519n.test.ts +++ b/src/implementation/maker/makers/basicOne/ed25519n.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' -import { Code } from '../../../../core/code/code.ts' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' +import { Code } from '../../../../core/code/code.js' const configuration = { describe: 'With Ed25519N verification key', diff --git a/src/implementation/maker/makers/basicOne/ed25519n.ts b/src/implementation/maker/makers/basicOne/ed25519n.ts index 0d564de..fedf7b0 100644 --- a/src/implementation/maker/makers/basicOne/ed25519n.ts +++ b/src/implementation/maker/makers/basicOne/ed25519n.ts @@ -1,7 +1,7 @@ -import { Ed25519n } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Ed25519n } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const ed25519n: Maker = (primitive: Buffer): Ed25519n => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/sha2256.test.ts b/src/implementation/maker/makers/basicOne/sha2256.test.ts index e791985..9f5466d 100644 --- a/src/implementation/maker/makers/basicOne/sha2256.test.ts +++ b/src/implementation/maker/makers/basicOne/sha2256.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With SHA2 256 bit digest', diff --git a/src/implementation/maker/makers/basicOne/sha2256.ts b/src/implementation/maker/makers/basicOne/sha2256.ts index 9e767b5..1e69fb3 100644 --- a/src/implementation/maker/makers/basicOne/sha2256.ts +++ b/src/implementation/maker/makers/basicOne/sha2256.ts @@ -1,7 +1,7 @@ -import { Sha2256 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Sha2256 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const sha2256: Maker = (primitive: Buffer): Sha2256 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/sha3256.test.ts b/src/implementation/maker/makers/basicOne/sha3256.test.ts index 6653d6b..0b8bba5 100644 --- a/src/implementation/maker/makers/basicOne/sha3256.test.ts +++ b/src/implementation/maker/makers/basicOne/sha3256.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Sha3 256 bit digest', diff --git a/src/implementation/maker/makers/basicOne/sha3256.ts b/src/implementation/maker/makers/basicOne/sha3256.ts index db4b17a..2115104 100644 --- a/src/implementation/maker/makers/basicOne/sha3256.ts +++ b/src/implementation/maker/makers/basicOne/sha3256.ts @@ -1,7 +1,7 @@ -import { Sha3256 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { Sha3256 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const sha3256: Maker = (primitive: Buffer): Sha3256 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/short.test.ts b/src/implementation/maker/makers/basicOne/short.test.ts index 66833c5..17cfdb3 100644 --- a/src/implementation/maker/makers/basicOne/short.test.ts +++ b/src/implementation/maker/makers/basicOne/short.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' -import { Code } from '../../../../core/code/code.ts' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' +import { Code } from '../../../../core/code/code.js' const example = '011F' // becomes two byte Buffer diff --git a/src/implementation/maker/makers/basicOne/short.ts b/src/implementation/maker/makers/basicOne/short.ts index cd6174b..8f12207 100644 --- a/src/implementation/maker/makers/basicOne/short.ts +++ b/src/implementation/maker/makers/basicOne/short.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { Short } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIsTwoBytes } from '../../validation/validations/lengthIsRight.ts' +import { Maker } from '../../maker.js' +import { Short } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIsTwoBytes } from '../../validation/validations/lengthIsRight.js' // 2-byte base-2 number export const short: Maker = (raw: Buffer): Short => { diff --git a/src/implementation/maker/makers/basicOne/x25519.test.ts b/src/implementation/maker/makers/basicOne/x25519.test.ts index d93c5d1..70cd7cf 100644 --- a/src/implementation/maker/makers/basicOne/x25519.test.ts +++ b/src/implementation/maker/makers/basicOne/x25519.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With X25519 key', diff --git a/src/implementation/maker/makers/basicOne/x25519.ts b/src/implementation/maker/makers/basicOne/x25519.ts index b0b94d1..0682a23 100644 --- a/src/implementation/maker/makers/basicOne/x25519.ts +++ b/src/implementation/maker/makers/basicOne/x25519.ts @@ -1,7 +1,7 @@ -import { X25519 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { X25519 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const x25519: Maker = (primitive: Buffer): X25519 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicOne/x25519Private.test.ts b/src/implementation/maker/makers/basicOne/x25519Private.test.ts index 2b0ea21..0afdc26 100644 --- a/src/implementation/maker/makers/basicOne/x25519Private.test.ts +++ b/src/implementation/maker/makers/basicOne/x25519Private.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With X25519 private decryption key', diff --git a/src/implementation/maker/makers/basicOne/x25519Private.ts b/src/implementation/maker/makers/basicOne/x25519Private.ts index f24f072..f50e0da 100644 --- a/src/implementation/maker/makers/basicOne/x25519Private.ts +++ b/src/implementation/maker/makers/basicOne/x25519Private.ts @@ -1,7 +1,7 @@ -import { X25519Private } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs32Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Maker } from '../../maker.ts' +import { X25519Private } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs32Bytes } from '../../validation/validations/lengthIsRight.js' +import { Maker } from '../../maker.js' export const x25519Private: Maker = (primitive: Buffer): X25519Private => { makeSureThat( diff --git a/src/implementation/maker/makers/basicTwo/blake2b512.test.ts b/src/implementation/maker/makers/basicTwo/blake2b512.test.ts index 0b09601..01ef149 100644 --- a/src/implementation/maker/makers/basicTwo/blake2b512.test.ts +++ b/src/implementation/maker/makers/basicTwo/blake2b512.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Blake2b self-addressing 512 bit digest', diff --git a/src/implementation/maker/makers/basicTwo/blake2b512.ts b/src/implementation/maker/makers/basicTwo/blake2b512.ts index 5bf8671..1fa58cb 100644 --- a/src/implementation/maker/makers/basicTwo/blake2b512.ts +++ b/src/implementation/maker/makers/basicTwo/blake2b512.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { Blake2b512 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs64Bytes } from '../../validation/validations/lengthIsRight.ts' +import { Maker } from '../../maker.js' +import { Blake2b512 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs64Bytes } from '../../validation/validations/lengthIsRight.js' export const blake2b512: Maker = (primitive: Buffer): Blake2b512 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicTwo/blake3512.test.ts b/src/implementation/maker/makers/basicTwo/blake3512.test.ts index 04aca78..8be3111 100644 --- a/src/implementation/maker/makers/basicTwo/blake3512.test.ts +++ b/src/implementation/maker/makers/basicTwo/blake3512.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Blake3 self-addressing 512 bit digest', diff --git a/src/implementation/maker/makers/basicTwo/blake3512.ts b/src/implementation/maker/makers/basicTwo/blake3512.ts index 0179930..9982bbc 100644 --- a/src/implementation/maker/makers/basicTwo/blake3512.ts +++ b/src/implementation/maker/makers/basicTwo/blake3512.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs64Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Blake3512 } from '../../../../core/primitive/primitives.ts' +import { Maker } from '../../maker.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs64Bytes } from '../../validation/validations/lengthIsRight.js' +import { Blake3512 } from '../../../../core/primitive/primitives.js' export const blake3512: Maker = (primitive: Buffer): Blake3512 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicTwo/ecdsa256k1Sig.test.ts b/src/implementation/maker/makers/basicTwo/ecdsa256k1Sig.test.ts index 20d56f0..df0c80e 100644 --- a/src/implementation/maker/makers/basicTwo/ecdsa256k1Sig.test.ts +++ b/src/implementation/maker/makers/basicTwo/ecdsa256k1Sig.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With ECDSA secp256k1 signature', diff --git a/src/implementation/maker/makers/basicTwo/ecdsa256k1Sig.ts b/src/implementation/maker/makers/basicTwo/ecdsa256k1Sig.ts index 24121c5..5f484e2 100644 --- a/src/implementation/maker/makers/basicTwo/ecdsa256k1Sig.ts +++ b/src/implementation/maker/makers/basicTwo/ecdsa256k1Sig.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { Ecdsa256k1Sig } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs64Bytes } from '../../validation/validations/lengthIsRight.ts' +import { Maker } from '../../maker.js' +import { Ecdsa256k1Sig } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs64Bytes } from '../../validation/validations/lengthIsRight.js' export const ecdsa256k1Sig: Maker = (primitive: Buffer): Ecdsa256k1Sig => { makeSureThat( diff --git a/src/implementation/maker/makers/basicTwo/ed25519Sig.test.ts b/src/implementation/maker/makers/basicTwo/ed25519Sig.test.ts index 01c8fea..27fa7c2 100644 --- a/src/implementation/maker/makers/basicTwo/ed25519Sig.test.ts +++ b/src/implementation/maker/makers/basicTwo/ed25519Sig.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Ed25519 signature', diff --git a/src/implementation/maker/makers/basicTwo/ed25519Sig.ts b/src/implementation/maker/makers/basicTwo/ed25519Sig.ts index 9f9a5f2..2b94e1c 100644 --- a/src/implementation/maker/makers/basicTwo/ed25519Sig.ts +++ b/src/implementation/maker/makers/basicTwo/ed25519Sig.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs64Bytes } from '../../validation/validations/lengthIsRight.ts' -import { Ed25519Sig } from '../../../../core/primitive/primitives.ts' +import { Maker } from '../../maker.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs64Bytes } from '../../validation/validations/lengthIsRight.js' +import { Ed25519Sig } from '../../../../core/primitive/primitives.js' // SHA3 512-bit digest export const ed25519Sig: Maker = (primitive: Buffer): Ed25519Sig => { diff --git a/src/implementation/maker/makers/basicTwo/long.test.ts b/src/implementation/maker/makers/basicTwo/long.test.ts index 57e05a7..f33f207 100644 --- a/src/implementation/maker/makers/basicTwo/long.test.ts +++ b/src/implementation/maker/makers/basicTwo/long.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const example = '10bdf135' // becomes 4 byte Buffer diff --git a/src/implementation/maker/makers/basicTwo/long.ts b/src/implementation/maker/makers/basicTwo/long.ts index fdcd4da..afa17f9 100644 --- a/src/implementation/maker/makers/basicTwo/long.ts +++ b/src/implementation/maker/makers/basicTwo/long.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { Long } from '../../../../core/primitive/primitives.ts' -import { itIsFourBytes } from '../../validation/validations/lengthIsRight.ts' +import { Maker } from '../../maker.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { Long } from '../../../../core/primitive/primitives.js' +import { itIsFourBytes } from '../../validation/validations/lengthIsRight.js' // 4-byte base-2 number export const long: Maker = (primitive: Buffer): Long => { diff --git a/src/implementation/maker/makers/basicTwo/salt128.test.ts b/src/implementation/maker/makers/basicTwo/salt128.test.ts index 763a386..8548a1b 100644 --- a/src/implementation/maker/makers/basicTwo/salt128.test.ts +++ b/src/implementation/maker/makers/basicTwo/salt128.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With 128 bit random salt', diff --git a/src/implementation/maker/makers/basicTwo/salt128.ts b/src/implementation/maker/makers/basicTwo/salt128.ts index 98cba26..67b9f2f 100644 --- a/src/implementation/maker/makers/basicTwo/salt128.ts +++ b/src/implementation/maker/makers/basicTwo/salt128.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { Salt128 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs16Bytes } from '../../validation/validations/lengthIsRight.ts' +import { Maker } from '../../maker.js' +import { Salt128 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs16Bytes } from '../../validation/validations/lengthIsRight.js' // SHA3 512-bit digest export const salt128: Maker = (primitive: Buffer): Salt128 => { diff --git a/src/implementation/maker/makers/basicTwo/sha2512.test.ts b/src/implementation/maker/makers/basicTwo/sha2512.test.ts index 53c9102..6bc5ad1 100644 --- a/src/implementation/maker/makers/basicTwo/sha2512.test.ts +++ b/src/implementation/maker/makers/basicTwo/sha2512.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Sha2 self-addressing 512 bit digest', diff --git a/src/implementation/maker/makers/basicTwo/sha2512.ts b/src/implementation/maker/makers/basicTwo/sha2512.ts index dceab43..9879436 100644 --- a/src/implementation/maker/makers/basicTwo/sha2512.ts +++ b/src/implementation/maker/makers/basicTwo/sha2512.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { Sha2512 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs64Bytes } from '../../validation/validations/lengthIsRight.ts' +import { Maker } from '../../maker.js' +import { Sha2512 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs64Bytes } from '../../validation/validations/lengthIsRight.js' export const sha2512: Maker = (primitive: Buffer): Sha2512 => { makeSureThat( diff --git a/src/implementation/maker/makers/basicTwo/sha3512.test.ts b/src/implementation/maker/makers/basicTwo/sha3512.test.ts index ac48eee..6bb259a 100644 --- a/src/implementation/maker/makers/basicTwo/sha3512.test.ts +++ b/src/implementation/maker/makers/basicTwo/sha3512.test.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' -import { check } from '../test/check/check.ts' -import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.ts' -import { canMakeIt } from '../test/check/checks/canMakeIt.ts' +import { Code } from '../../../../core/code/code.js' +import { check } from '../test/check/check.js' +import { lengthNotWrong } from '../test/check/checks/lengthNotWrong.js' +import { canMakeIt } from '../test/check/checks/canMakeIt.js' const configuration = { describe: 'With Sha3 self-addressing 512 bit digest', diff --git a/src/implementation/maker/makers/basicTwo/sha3512.ts b/src/implementation/maker/makers/basicTwo/sha3512.ts index edd22ba..d22a4ae 100644 --- a/src/implementation/maker/makers/basicTwo/sha3512.ts +++ b/src/implementation/maker/makers/basicTwo/sha3512.ts @@ -1,8 +1,8 @@ import { Buffer } from 'buffer' -import { Maker } from '../../maker.ts' -import { Sha3512 } from '../../../../core/primitive/primitives.ts' -import { makeSureThat } from '../../validation/makeSureThat.ts' -import { itIs64Bytes } from '../../validation/validations/lengthIsRight.ts' +import { Maker } from '../../maker.js' +import { Sha3512 } from '../../../../core/primitive/primitives.js' +import { makeSureThat } from '../../validation/makeSureThat.js' +import { itIs64Bytes } from '../../validation/validations/lengthIsRight.js' // SHA3 512-bit digest export const sha3512: Maker = (primitive: Buffer): Sha3512 => { diff --git a/src/implementation/maker/makers/test/check/check.ts b/src/implementation/maker/makers/test/check/check.ts index 69263dc..12750bf 100644 --- a/src/implementation/maker/makers/test/check/check.ts +++ b/src/implementation/maker/makers/test/check/check.ts @@ -1,5 +1,5 @@ -import { Configuration } from '../configuration.ts' -import { Step } from '../step.ts' +import { Configuration } from '../configuration.js' +import { Step } from '../step.js' export const check = (configuration: Configuration, ...steps: Step[]): void => { describe(configuration.describe, () => { diff --git a/src/implementation/maker/makers/test/check/checks/canMakeIt.ts b/src/implementation/maker/makers/test/check/checks/canMakeIt.ts index ded41a1..cd5700e 100644 --- a/src/implementation/maker/makers/test/check/checks/canMakeIt.ts +++ b/src/implementation/maker/makers/test/check/checks/canMakeIt.ts @@ -1,5 +1,5 @@ -import { make } from '../../../../../make.ts' -import { Configuration } from '../../configuration.ts' +import { make } from '../../../../../make.js' +import { Configuration } from '../../configuration.js' export const canMakeIt = (configuration: Configuration): Configuration => { const { code, example } = configuration diff --git a/src/implementation/maker/makers/test/check/checks/lengthNotWrong.ts b/src/implementation/maker/makers/test/check/checks/lengthNotWrong.ts index 771abf4..082f4f4 100644 --- a/src/implementation/maker/makers/test/check/checks/lengthNotWrong.ts +++ b/src/implementation/maker/makers/test/check/checks/lengthNotWrong.ts @@ -1,6 +1,6 @@ -import { make } from '../../../../../make.ts' -import { PrimitiveWrongLength } from '../../../../maker.ts' -import { Configuration } from '../../configuration.ts' +import { make } from '../../../../../make.js' +import { PrimitiveWrongLength } from '../../../../maker.js' +import { Configuration } from '../../configuration.js' const oneTooLong = (primitive: Buffer): Buffer => Buffer.alloc(primitive.length + 1, 0) diff --git a/src/implementation/maker/makers/test/check/checks/prefixIsCorrect.ts b/src/implementation/maker/makers/test/check/checks/prefixIsCorrect.ts index 329a0e5..832f76d 100644 --- a/src/implementation/maker/makers/test/check/checks/prefixIsCorrect.ts +++ b/src/implementation/maker/makers/test/check/checks/prefixIsCorrect.ts @@ -1,9 +1,9 @@ import { Buffer } from 'buffer' -import { pipe } from '../../../../../../lib/util/pipe.ts' -import { make } from '../../../../../make.ts' -import { PrimitiveInvalidInput } from '../../../../maker.ts' -import { Configuration } from '../../configuration.ts' +import { pipe } from '../../../../../../lib/util/pipe.js' +import { make } from '../../../../../make.js' +import { PrimitiveInvalidInput } from '../../../../maker.js' +import { Configuration } from '../../configuration.js' const throwsErrorForWrongPrefix = (length: number) => (configuration: Configuration): Configuration => { const { code, example } = configuration diff --git a/src/implementation/maker/makers/test/configuration.ts b/src/implementation/maker/makers/test/configuration.ts index 4816b1a..baae30b 100644 --- a/src/implementation/maker/makers/test/configuration.ts +++ b/src/implementation/maker/makers/test/configuration.ts @@ -1,6 +1,6 @@ import { Buffer } from 'buffer' -import { Code } from '../../../../core/code/code.ts' +import { Code } from '../../../../core/code/code.js' export interface Configuration { describe: string // the description of the test diff --git a/src/implementation/maker/makers/test/step.ts b/src/implementation/maker/makers/test/step.ts index d547b27..412f8ae 100644 --- a/src/implementation/maker/makers/test/step.ts +++ b/src/implementation/maker/makers/test/step.ts @@ -1,3 +1,3 @@ -import { Configuration } from './configuration.ts' +import { Configuration } from './configuration.js' export type Step = (configuration: Configuration) => Configuration diff --git a/src/implementation/maker/validation/makeSureThat.ts b/src/implementation/maker/validation/makeSureThat.ts index 6a86f34..d67ed7e 100644 --- a/src/implementation/maker/validation/makeSureThat.ts +++ b/src/implementation/maker/validation/makeSureThat.ts @@ -1,4 +1,4 @@ -import { Validation } from './validation.ts' +import { Validation } from './validation.js' const validate = (...validations: Validation[]): boolean => validations diff --git a/src/implementation/maker/validation/validations/lengthIsRight.ts b/src/implementation/maker/validation/validations/lengthIsRight.ts index e89f9c3..8b769f7 100644 --- a/src/implementation/maker/validation/validations/lengthIsRight.ts +++ b/src/implementation/maker/validation/validations/lengthIsRight.ts @@ -1,5 +1,5 @@ -import { PrimitiveWrongLength } from '../../maker.ts' -import { Validation } from '../validation.ts' +import { PrimitiveWrongLength } from '../../maker.js' +import { Validation } from '../validation.js' const lengthIsRight = (length: number) => (primitive: Buffer): Validation => () => { if (primitive.length !== length) throw new PrimitiveWrongLength(length, primitive.length) diff --git a/src/lib/keri/numberOfCharacters.ts b/src/lib/keri/numberOfCharacters.ts index 03779c6..99dca4c 100644 --- a/src/lib/keri/numberOfCharacters.ts +++ b/src/lib/keri/numberOfCharacters.ts @@ -1,4 +1,4 @@ -import { padSize } from './padSize.ts' +import { padSize } from './padSize.js' const calculateCodeSize = (bytes: number): number => padSize(bytes) !== 0 diff --git a/src/main.ts b/src/main.ts index 58e2cd8..0a15704 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,43 +1,9 @@ -// import { makeSureThat } from './implementation/make/maker/lib/validate/validate.ts' -// import { itIsEightBytes } from './implementation/make/maker/lib/validate/validations/lengthIs.ts' +import { encodeText } from './api/encode/encoders/encodeText.js' -// const raw = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]) -// const rawIsCorrectLength = itIsEightBytes(raw) +console.log('Welcome to simple-cesr!') +console.log("We'll be doing amazing things like this:") -// const thisCheckPasses = (): boolean => true -// // const throwInAWrench = (): boolean => false - -// const result = makeSureThat( -// rawIsCorrectLength, -// thisCheckPasses -// // throwInAWrench -// ) - -// console.log(result) - -import { encodeText } from './api/encode/encoders/encodeText.ts' -import { toRaw } from './api/transform/toRaw.ts' -import { Raw, Text } from './core/domain/domains.ts' -import { numberOfBytes } from './lib/keri/numberOfBytes.ts' -import { numberOfCharacters } from './lib/keri/numberOfCharacters.ts' - -// expected sizes in bytes and chars for relevant examples -const refBytes = [32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 2, 8, 32, 16, 64, 64, 64, 64, 64, 64, 4, 33, 33, 57, 57, 39, 3] -const refChars = [44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 4, 12, 44, 24, 88, 88, 88, 88, 88, 88, 8, 48, 48, 80, 80, 56, 8] - -// data from Sizage charts in Matter -const sizes = [[1, 44], [1, 44], [1, 44], [1, 44], [1, 44], [1, 44], [1, 44], [1, 44], [1, 44], [1, 44], [1, 4], [1, 12], [1, 44], [2, 24], [2, 88], [2, 88], [2, 88], [2, 88], [2, 88], [2, 88], [2, 8], [4, 48], [4, 48], [4, 80], [4, 80], [4, 56], [4, 8]] - -// calculate bytes -const actualBytes = sizes.map(([codeLength, fullLength]) => numberOfBytes(codeLength, fullLength)) - -// is it right? -const areBytesCalculatedCorrectly = actualBytes.every((bytes, index) => bytes === refBytes[index]) -console.log(areBytesCalculatedCorrectly) - -// calculate chars -const actualChars = actualBytes.map((bytes) => numberOfCharacters(bytes)) - -// is it right? -const areCharsCalculatedCorrectly = actualChars.every((chars, index) => chars === refChars[index]) -console.log(areCharsCalculatedCorrectly) +const primitive = new Uint8Array([0x00, 0x01]) // two bytes +console.log('Primitive:', primitive) +const encoded = encodeText('M', primitive) +console.log('Encoded:', encoded) diff --git a/test/standardsTest/README.md b/test/standardsTest/README.md index f50291c..4ff4f50 100644 --- a/test/standardsTest/README.md +++ b/test/standardsTest/README.md @@ -2,4 +2,4 @@ The standards test confirms agreement of `simple-cesr`'s output with other implementations of CESR. -The examples in `standards.ts` are from the `Matter` class in [cesr-ts](https://github.com/weboftrust/cesr-ts) (derived from [signify-ts](https://github.com/weboftrust/signify-ts)) from [WebOfTrust](https://github.com/weboftrust). Given the same given inputs, `simple-cesr` should produce the same given outputs as `Matter`. +The examples in `standards.js` are from the `Matter` class in [cesr-ts](https://github.com/weboftrust/cesr-ts) (derived from [signify-ts](https://github.com/weboftrust/signify-ts)) from [WebOfTrust](https://github.com/weboftrust). Given the same given inputs, `simple-cesr` should produce the same given outputs as `Matter`. diff --git a/test/standardsTest/standards.test.ts b/test/standardsTest/standards.test.ts index a003d74..c5fabde 100644 --- a/test/standardsTest/standards.test.ts +++ b/test/standardsTest/standards.test.ts @@ -1,7 +1,7 @@ import { Buffer } from 'buffer' -import { standards } from './standards.ts' -import { encodeText } from '../../src/api/encode/encoders/encodeText.ts' -import { Code } from '../../src/core/code/code.ts' +import { standards } from './standards.js' +import { encodeText } from '../../src/api/encode/encoders/encodeText.js' +import { Code } from '../../src/core/code/code.js' // Test is only against Matter output for now const matter = standards.matter diff --git a/tsconfig.json b/tsconfig.json index be0247b..9b87cb9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,14 @@ { - "extends": "@tsconfig/node20/tsconfig.json", + "extends": "@tsconfig/node18/tsconfig.json", "ts-node": { "transpileOnly": true, // don't type-check, just transpile "esm": true }, "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ - "noEmit": true, // don't emit any files, just type-check + "noEmit": true, // don't emit any files -- we're using ts-node to run the code and swc to transpile it "module": "NodeNext", // the only valid options for a node project are "Node16" and "NodeNext", see inset text at https://www.typescriptlang.org/docs/handbook/modules/theory.html#the-module-output-format "moduleResolution": "NodeNext", - "allowImportingTsExtensions": true, // allow importing .ts files "forceConsistentCasingInFileNames": true, "strict": true, // enforce all strict type-checking options "skipLibCheck": true, // don't type-check declarations from other libraries