Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xyo-network/huri

Package Overview
Dependencies
Maintainers
0
Versions
709
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xyo-network/huri - npm Package Compare versions

Comparing version 2.110.19 to 2.111.0

dist/browser/index.mjs

24

package.json

@@ -13,12 +13,12 @@ {

"dependencies": {
"@xylabs/assert": "^3.6.6",
"@xylabs/axios": "^3.6.6",
"@xylabs/hex": "^3.6.6",
"@xyo-network/account": "^2.110.19",
"@xyo-network/payload-model": "^2.110.19"
"@xylabs/assert": "^3.6.8",
"@xylabs/axios": "^3.6.8",
"@xylabs/hex": "^3.6.8",
"@xyo-network/account": "^2.111.0",
"@xyo-network/payload-model": "^2.111.0"
},
"devDependencies": {
"@xylabs/delay": "^3.6.6",
"@xylabs/ts-scripts-yarn3": "^3.14.1",
"@xylabs/tsconfig": "^3.14.1",
"@xylabs/delay": "^3.6.8",
"@xylabs/ts-scripts-yarn3": "^3.15.5",
"@xylabs/tsconfig": "^3.15.5",
"typescript": "^5.5.4"

@@ -36,3 +36,3 @@ },

"types": "./dist/browser/index.d.mts",
"default": "./dist/browser/index.js"
"default": "./dist/browser/index.mjs"
}

@@ -47,3 +47,3 @@ },

"types": "./dist/node/index.d.mts",
"default": "./dist/node/index.js"
"default": "./dist/node/index.mjs"
}

@@ -55,3 +55,3 @@ }

"main": "dist/node/index.cjs",
"module": "dist/node/index.js",
"module": "dist/node/index.mjs",
"homepage": "https://xyo.network",

@@ -68,4 +68,4 @@ "license": "LGPL-3.0-only",

"types": "dist/node/index.d.ts",
"version": "2.110.19",
"version": "2.111.0",
"type": "module"
}

@@ -11,3 +11,3 @@ import { assertEx } from '@xylabs/assert'

/*
/*
Valid Huri:

@@ -43,7 +43,9 @@

constructor(huri: Hash | Huri | string, { archivistUri, token }: HuriOptions = {}) {
const huriString =
Huri.isHuri(huri)?.href ??
(typeof huri === 'string' ? (huri as string)
: huri instanceof ArrayBuffer ? new AddressValue(huri).hex
: huri.href)
const huriString
= Huri.isHuri(huri)?.href
?? (typeof huri === 'string'
? (huri as string)
: huri instanceof ArrayBuffer
? new AddressValue(huri).hex
: huri.href)
this.originalHref = huriString

@@ -59,3 +61,3 @@

//if archivistUri sent, overwrite protocol and archivist
// if archivistUri sent, overwrite protocol and archivist
if (archivistUri) {

@@ -135,18 +137,19 @@ const archivistUriParts = archivistUri.split('://')

//if the protocol was found, then there is not allowed to be a leading /
// if the protocol was found, then there is not allowed to be a leading /
assertEx(!(hasProtocol && pathParts[0].length === 0), () => 'Invalid protocol separator')
//remove leading '/' if needed
// remove leading '/' if needed
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
pathParts[0].length === 0 ? pathParts.shift() : null
//hash is assumed to be the last part
// hash is assumed to be the last part
const hash = assertEx(pathParts.pop(), () => 'No hash specified')
//archivist is assumed to be the first part
// archivist is assumed to be the first part
this.archivist = pathParts.shift() ?? 'api.archivist.xyo.network'
//the archive is whatever is left
// the archive is whatever is left
this.archive = pathParts.pop()
//after we pull off all the path parts, there should be nothing left
// after we pull off all the path parts, there should be nothing left
assertEx(pathParts.length === 0, () => 'Too many path parts')

@@ -158,11 +161,11 @@

private validateParse() {
//the archivist should not be zero length
// the archivist should not be zero length
assertEx(this.archivist?.length !== 0, () => 'Invalid archivist length')
//the archivist should not be zero length (can be undefined)
// the archivist should not be zero length (can be undefined)
assertEx(this.archive?.length !== 0, () => 'Invalid archive length')
//the archive should not be set if the archivist is not set
// the archive should not be set if the archivist is not set
assertEx(!(this.archive && !this.archivist), () => 'If specifying archive, archivist is also required')
}
}

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc