@dxos/keys
Advanced tools
Comparing version 0.1.53-main.e7b89d1 to 0.1.53-main.eeb434b
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25939,"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}]},"packages/common/keys/src/types.ts":{"bytes":553,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":463,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement","original":"./public-key"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement","original":"./types"}]}},"outputs":{"packages/common/keys/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12540},"packages/common/keys/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/assert","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["PUBLIC_KEY_LENGTH","PublicKey","SECRET_KEY_LENGTH"],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/public-key.ts":{"bytesInOutput":6446},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":6622}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25970,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"tiny-invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}]},"packages/common/keys/src/types.ts":{"bytes":641,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":547,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement","original":"./public-key"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement","original":"./types"}]}},"outputs":{"packages/common/keys/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12645},"packages/common/keys/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"tiny-invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["PUBLIC_KEY_LENGTH","PublicKey","SECRET_KEY_LENGTH"],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/public-key.ts":{"bytesInOutput":6451},"packages/common/keys/src/index.ts":{"bytesInOutput":0}},"bytes":6628}}} |
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25939,"imports":[{"path":"node:assert","kind":"import-statement","external":true},{"path":"node:util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}]},"packages/common/keys/src/types.ts":{"bytes":553,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":463,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement","original":"./public-key"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement","original":"./types"}]}},"outputs":{"packages/common/keys/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12695},"packages/common/keys/dist/lib/node/index.cjs":{"imports":[{"path":"node:assert","kind":"require-call","external":true},{"path":"node:util","kind":"require-call","external":true},{"path":"randombytes","kind":"require-call","external":true},{"path":"@dxos/debug","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/index.ts":{"bytesInOutput":215},"packages/common/keys/src/public-key.ts":{"bytesInOutput":6634}},"bytes":8506}}} | ||
{"inputs":{"packages/common/keys/src/public-key.ts":{"bytes":25970,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"randombytes","kind":"import-statement","external":true},{"path":"tiny-invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}]},"packages/common/keys/src/types.ts":{"bytes":641,"imports":[]},"packages/common/keys/src/index.ts":{"bytes":547,"imports":[{"path":"packages/common/keys/src/public-key.ts","kind":"import-statement","original":"./public-key"},{"path":"packages/common/keys/src/types.ts","kind":"import-statement","original":"./types"}]}},"outputs":{"packages/common/keys/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12716},"packages/common/keys/dist/lib/node/index.cjs":{"imports":[{"path":"node:util","kind":"require-call","external":true},{"path":"randombytes","kind":"require-call","external":true},{"path":"tiny-invariant","kind":"require-call","external":true},{"path":"@dxos/debug","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/common/keys/src/index.ts","inputs":{"packages/common/keys/src/index.ts":{"bytesInOutput":215},"packages/common/keys/src/public-key.ts":{"bytesInOutput":6649}},"bytes":8521}}} |
{ | ||
"name": "@dxos/keys", | ||
"version": "0.1.53-main.e7b89d1", | ||
"version": "0.1.53-main.eeb434b", | ||
"description": "Key utils and definitions.", | ||
@@ -20,4 +20,5 @@ "homepage": "https://dxos.org", | ||
"randombytes": "^2.1.0", | ||
"@dxos/debug": "0.1.53-main.e7b89d1", | ||
"@dxos/node-std": "0.1.53-main.e7b89d1" | ||
"tiny-invariant": "^1.3.1", | ||
"@dxos/debug": "0.1.53-main.eeb434b", | ||
"@dxos/node-std": "0.1.53-main.eeb434b" | ||
}, | ||
@@ -24,0 +25,0 @@ "devDependencies": { |
@@ -5,5 +5,5 @@ // | ||
import assert from 'node:assert'; | ||
import { inspect, InspectOptionsStylized } from 'node:util'; | ||
import randomBytes from 'randombytes'; | ||
import invariant from 'tiny-invariant'; | ||
@@ -32,3 +32,3 @@ import { truncateKey, devtoolsFormatter, DevtoolsFormatter, equalsSymbol, Equatable } from '@dxos/debug'; | ||
static from(source: PublicKeyLike): PublicKey { | ||
assert(source); | ||
invariant(source); | ||
if (source instanceof PublicKey) { | ||
@@ -126,5 +126,5 @@ return source; | ||
static bufferize(str: string): Buffer { | ||
assert(typeof str === 'string', 'Invalid type'); | ||
invariant(typeof str === 'string', 'Invalid type'); | ||
const buffer = Buffer.from(str, 'hex'); | ||
// assert(buffer.length === PUBLIC_KEY_LENGTH || buffer.length === SECRET_KEY_LENGTH, | ||
// invariant(buffer.length === PUBLIC_KEY_LENGTH || buffer.length === SECRET_KEY_LENGTH, | ||
// `Invalid key length: ${buffer.length}`); | ||
@@ -146,3 +146,3 @@ return buffer; | ||
assert(key instanceof Buffer, 'Invalid type'); | ||
invariant(key instanceof Buffer, 'Invalid type'); | ||
return key.toString('hex'); | ||
@@ -149,0 +149,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60766
4
+ Addedtiny-invariant@^1.3.1
+ Added@dxos/debug@0.1.53-main.eeb434b(transitive)
+ Added@dxos/node-std@0.1.53-main.eeb434b(transitive)
+ Addedtiny-invariant@1.3.3(transitive)
- Removed@dxos/debug@0.1.53-main.e7b89d1(transitive)
- Removed@dxos/node-std@0.1.53-main.e7b89d1(transitive)
- Removeddebug@4.3.7(transitive)
- Removedms@2.1.3(transitive)