* nsid: reduce 'name' length from 128 chars to 63 chars * nsid: remove 'nsid-ns' (glob pattern) from main NSID syntax validation This special variant syntax should be handled separately. Eg, an "nsid-ns" should not be accepted as an NSID in Lexicons looking for a regular NSID. * nsid: update syntax check to match domain rules This is to be closer to actual underlying specification needs. For example, domains are allowed to start with a digit (like 4chan.org), and can't start *or* end with a hyphen. Restricts the "name" part further, to be alphabetic only. Note that starts-with-digit domains could break some lang auto-generation variable name rules. The docs/spec strongly recommend against such domains for use with NSID, but it seems incorrect to restrict at the standard/lexicon level without a clear pan-language consistent set of rules. * did-resolver: disallow did:web with path segments * identifier: reduce max length of DID from 8 KB to 2 KB * identifier: add DID test with escaped ':' in identifier * did-resolver: have prettier run on tests/ * identifier: add additional punycode test cases * identifiers: small tweaks from review - type in did:web comment - include actual max DID string length in error message * xrpc-server tests: remove digits from NSIDs * identity: fix import and function errors * xrpc-server tests: remove digits from NSIDs * xrpc-server: include tests/ in prettier:fix * xrpc-server: lint fix
48 lines
1.4 KiB
JSON
48 lines
1.4 KiB
JSON
{
|
|
"name": "@atproto/xrpc-server",
|
|
"version": "0.2.0",
|
|
"main": "src/index.ts",
|
|
"scripts": {
|
|
"test": "jest",
|
|
"prettier": "prettier --check src/ tests/",
|
|
"prettier:fix": "prettier --write src/ tests/",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"lint:fix": "yarn lint --fix",
|
|
"verify": "run-p prettier lint",
|
|
"verify:fix": "yarn prettier:fix && yarn lint:fix",
|
|
"build": "node ./build.js",
|
|
"postbuild": "tsc --build tsconfig.build.json",
|
|
"update-main-to-dist": "node ./update-pkg.js --update-main-to-dist",
|
|
"update-main-to-src": "node ./update-pkg.js --update-main-to-src",
|
|
"prepublish": "npm run update-main-to-dist",
|
|
"postpublish": "npm run update-main-to-src"
|
|
},
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/bluesky-social/atproto.git",
|
|
"directory": "packages/xrpc-server"
|
|
},
|
|
"dependencies": {
|
|
"@atproto/common": "*",
|
|
"@atproto/crypto": "*",
|
|
"@atproto/lexicon": "*",
|
|
"cbor-x": "^1.5.1",
|
|
"express": "^4.17.2",
|
|
"http-errors": "^2.0.0",
|
|
"mime-types": "^2.1.35",
|
|
"uint8arrays": "3.0.0",
|
|
"ws": "^8.12.0",
|
|
"zod": "^3.21.4"
|
|
},
|
|
"devDependencies": {
|
|
"@atproto/crypto": "*",
|
|
"@atproto/xrpc": "*",
|
|
"@types/express": "^4.17.13",
|
|
"@types/http-errors": "^2.0.1",
|
|
"@types/ws": "^8.5.4",
|
|
"get-port": "^6.1.2",
|
|
"multiformats": "^9.6.4"
|
|
}
|
|
}
|