@ucanto/server
Advanced tools
Comparing version 5.0.0 to 6.0.0
@@ -39,9 +39,8 @@ export function create<Service extends Record<string, any>>(options: API.Server<Service>): API.ServerView<Service>; | ||
*/ | ||
constructor({ id, service, encoder, decoder, principal, canIssue, ...rest }: API.Server<Service>); | ||
constructor({ id, service, encoder, decoder, principal, ...rest }: API.Server<Service>); | ||
context: { | ||
my?: ((issuer: `did:${string}:${string}`) => API.Capability<API.Ability, `${string}:${string}`, unknown>[]) | undefined; | ||
canIssue?: ((capability: API.ParsedCapability<API.Ability, API.URI<`${string}:`>, {}>, issuer: `did:${string}:${string}`) => boolean) | undefined; | ||
resolve?: ((proof: API.UCANLink<API.Capabilities, API.MulticodecCode<number, string>, API.SigAlg>) => API.Await<API.Result<API.Delegation<API.Capabilities>, API.UnavailableProof>>) | undefined; | ||
id: API.Verifier<`did:${string}:${string}`, API.SigAlg>; | ||
principal: API.PrincipalParser; | ||
canIssue: (capability: API.ParsedCapability<API.Ability, API.URI<`${string}:`>, {}>, issuer: `did:${string}:${string}`) => boolean; | ||
}; | ||
@@ -48,0 +47,0 @@ service: Service; |
{ | ||
"name": "@ucanto/server", | ||
"description": "UCAN RPC Server", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"types": "./dist/src/lib.d.ts", | ||
@@ -23,5 +23,5 @@ "main": "./src/lib.js", | ||
"dependencies": { | ||
"@ucanto/core": "^5.0.0", | ||
"@ucanto/interface": "^5.0.0", | ||
"@ucanto/validator": "^5.0.0" | ||
"@ucanto/core": "^5.1.0", | ||
"@ucanto/interface": "^6.0.0", | ||
"@ucanto/validator": "^6.0.0" | ||
}, | ||
@@ -31,6 +31,6 @@ "devDependencies": { | ||
"@types/chai-subset": "^1.3.3", | ||
"@types/mocha": "^9.1.0", | ||
"@types/mocha": "^10.0.1", | ||
"@web-std/fetch": "^4.1.0", | ||
"@web-std/file": "^3.0.2", | ||
"c8": "^7.11.0", | ||
"c8": "^7.13.0", | ||
"chai": "^4.3.6", | ||
@@ -41,7 +41,7 @@ "chai-subset": "^1.6.0", | ||
"nyc": "^15.1.0", | ||
"playwright-test": "^8.1.1", | ||
"typescript": "^4.9.4", | ||
"@ucanto/client": "^5.0.0", | ||
"@ucanto/principal": "^5.0.0", | ||
"@ucanto/transport": "^5.0.0" | ||
"playwright-test": "^8.2.0", | ||
"typescript": "^4.9.5", | ||
"@ucanto/client": "^5.1.0", | ||
"@ucanto/principal": "^5.1.0", | ||
"@ucanto/transport": "^5.1.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "exports": { |
@@ -35,8 +35,6 @@ import * as API from '@ucanto/interface' | ||
principal = Verifier, | ||
canIssue = (capability, issuer) => | ||
capability.with === issuer || issuer === id.did(), | ||
...rest | ||
}) { | ||
const { catch: fail, ...context } = rest | ||
this.context = { id, principal, canIssue, ...context } | ||
this.context = { id, principal, ...context } | ||
this.service = service | ||
@@ -43,0 +41,0 @@ this.encoder = encoder |
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
17715
409
+ Added@ucanto/validator@6.1.0(transitive)
- Removed@ipld/dag-cbor@8.0.1(transitive)
- Removed@ucanto/interface@5.0.0(transitive)
- Removed@ucanto/validator@5.0.0(transitive)
- Removedcborg@1.10.2(transitive)
Updated@ucanto/core@^5.1.0
Updated@ucanto/interface@^6.0.0
Updated@ucanto/validator@^6.0.0