@ucanto/server
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -39,3 +39,3 @@ export function create<Service extends Record<string, any>>(options: API.Server<Service>): API.ServerView<Service>; | ||
*/ | ||
constructor({ id, service, encoder, decoder, catch, principal, canIssue, ...context }: API.Server<Service>); | ||
constructor({ id, service, encoder, decoder, principal, canIssue, ...rest }: API.Server<Service>); | ||
context: { | ||
@@ -42,0 +42,0 @@ my?: ((issuer: `did:${string}`) => API.Capability<API.Ability, `${string}:${string}`>[]) | undefined; |
{ | ||
"name": "@ucanto/server", | ||
"description": "UCAN RPC Server", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"types": "./dist/src/lib.d.ts", | ||
@@ -22,10 +22,2 @@ "main": "./src/lib.js", | ||
"homepage": "https://github.com/web3-storage/ucanto", | ||
"scripts": { | ||
"test:web": "playwright-test test/**/*.spec.js --cov && nyc report", | ||
"test:node": "c8 --check-coverage --branches 100 --functions 100 --lines 100 mocha test/**/*.spec.js", | ||
"test": "npm run test:node", | ||
"coverage": "c8 --reporter=html mocha test/**/*.spec.js && npm_config_yes=true npx st -d coverage -p 8080", | ||
"typecheck": "tsc --build", | ||
"build": "tsc --build" | ||
}, | ||
"dependencies": { | ||
@@ -65,3 +57,11 @@ "@ucanto/core": "^1.0.0", | ||
"type": "module", | ||
"license": "(Apache-2.0 AND MIT)" | ||
} | ||
"license": "(Apache-2.0 AND MIT)", | ||
"scripts": { | ||
"test:web": "playwright-test test/**/*.spec.js --cov && nyc report", | ||
"test:node": "c8 --check-coverage --branches 100 --functions 100 --lines 100 mocha test/**/*.spec.js", | ||
"test": "npm run test:node", | ||
"coverage": "c8 --reporter=html mocha test/**/*.spec.js && npm_config_yes=true npx st -d coverage -p 8080", | ||
"typecheck": "tsc --build", | ||
"build": "tsc --build" | ||
} | ||
} |
@@ -34,8 +34,8 @@ import * as API from '@ucanto/interface' | ||
decoder, | ||
catch: fail, | ||
principal = Principal, | ||
canIssue = (capability, issuer) => | ||
capability.with === issuer || issuer === id.did(), | ||
...context | ||
...rest | ||
}) { | ||
const { catch: fail, ...context } = rest | ||
this.context = { id, principal, canIssue, ...context } | ||
@@ -42,0 +42,0 @@ this.service = service |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17755
0