@atproto/identity 0.4.11 → 0.5.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/did/atproto-data.d.ts +1 -1
- package/dist/did/atproto-data.d.ts.map +1 -1
- package/dist/did/atproto-data.js +16 -61
- package/dist/did/atproto-data.js.map +1 -1
- package/dist/did/base-resolver.d.ts +1 -1
- package/dist/did/base-resolver.d.ts.map +1 -1
- package/dist/did/base-resolver.js +11 -53
- package/dist/did/base-resolver.js.map +1 -1
- package/dist/did/did-resolver.d.ts +2 -2
- package/dist/did/did-resolver.d.ts.map +1 -1
- package/dist/did/did-resolver.js +10 -20
- package/dist/did/did-resolver.js.map +1 -1
- package/dist/did/index.d.ts +5 -5
- package/dist/did/index.d.ts.map +1 -1
- package/dist/did/index.js +5 -21
- package/dist/did/index.js.map +1 -1
- package/dist/did/memory-cache.d.ts +1 -1
- package/dist/did/memory-cache.d.ts.map +1 -1
- package/dist/did/memory-cache.js +5 -26
- package/dist/did/memory-cache.js.map +1 -1
- package/dist/did/plc-resolver.d.ts +2 -2
- package/dist/did/plc-resolver.d.ts.map +1 -1
- package/dist/did/plc-resolver.js +7 -26
- package/dist/did/plc-resolver.js.map +1 -1
- package/dist/did/util.js +1 -4
- package/dist/did/util.js.map +1 -1
- package/dist/did/web-resolver.d.ts +2 -2
- package/dist/did/web-resolver.d.ts.map +1 -1
- package/dist/did/web-resolver.js +11 -25
- package/dist/did/web-resolver.js.map +1 -1
- package/dist/errors.js +11 -49
- package/dist/errors.js.map +1 -1
- package/dist/handle/index.d.ts +1 -1
- package/dist/handle/index.d.ts.map +1 -1
- package/dist/handle/index.js +6 -31
- package/dist/handle/index.js.map +1 -1
- package/dist/id-resolver.d.ts +3 -3
- package/dist/id-resolver.d.ts.map +1 -1
- package/dist/id-resolver.js +5 -21
- package/dist/id-resolver.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -21
- package/dist/index.js.map +1 -1
- package/dist/types.js +1 -5
- package/dist/types.js.map +1 -1
- package/{jest.config.js → jest.config.cjs} +8 -2
- package/package.json +15 -9
- package/src/did/atproto-data.ts +1 -1
- package/src/did/base-resolver.ts +3 -3
- package/src/did/did-resolver.ts +8 -5
- package/src/did/index.ts +5 -5
- package/src/did/memory-cache.ts +1 -1
- package/src/did/plc-resolver.ts +3 -3
- package/src/did/web-resolver.ts +7 -4
- package/src/handle/index.ts +2 -2
- package/src/id-resolver.ts +3 -3
- package/src/index.ts +5 -5
- package/test.log +60 -0
- package/tests/did-cache.test.ts +2 -2
- package/tests/did-document.test.ts +1 -1
- package/tests/did-resolver.test.ts +3 -3
- package/tests/handle-resolver.test.ts +5 -3
- package/tests/web/db.ts +1 -1
- package/tests/web/server.ts +5 -5
- package/tsconfig.build.tsbuildinfo +1 -1
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './did'
|
|
2
|
-
export * from './handle'
|
|
3
|
-
export * from './id-resolver'
|
|
4
|
-
export * from './errors'
|
|
5
|
-
export * from './types'
|
|
1
|
+
export * from './did/index.js'
|
|
2
|
+
export * from './handle/index.js'
|
|
3
|
+
export * from './id-resolver.js'
|
|
4
|
+
export * from './errors.js'
|
|
5
|
+
export * from './types.js'
|
package/test.log
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{"level":30,"time":1689275840930,"pid":71480,"hostname":"dicorcia.local","req":{"id":1,"method":"POST","url":"/did%3Aplc%3Awal42s6ti6sjc6frkwilq5hv","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/1.3.4","content-length":"433","accept-encoding":"gzip, compress, deflate, br","host":"localhost:59978","connection":"close"},"remoteAddress":"::1","remotePort":59979},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"2","etag":"W/\"2-nOO9QiTIwXgNtWtBJezz8kv3SLc\""}},"responseTime":26,"msg":"request completed"}
|
|
2
|
+
{"level":30,"time":1689275840954,"pid":71480,"hostname":"dicorcia.local","req":{"id":2,"method":"GET","url":"/did%3Aplc%3Awal42s6ti6sjc6frkwilq5hv","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59978","connection":"close"},"remoteAddress":"::1","remotePort":59980},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-RJkkO5YJwpIfpAOUfQbM1GWVX6I\""}},"responseTime":4,"msg":"request completed"}
|
|
3
|
+
{"level":30,"time":1689275840963,"pid":71480,"hostname":"dicorcia.local","req":{"id":3,"method":"GET","url":"/did%3Aplc%3Awal42s6ti6sjc6frkwilq5hv","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59978","connection":"close"},"remoteAddress":"::1","remotePort":59981},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-RJkkO5YJwpIfpAOUfQbM1GWVX6I\""}},"responseTime":4,"msg":"request completed"}
|
|
4
|
+
{"level":30,"time":1689275840967,"pid":71480,"hostname":"dicorcia.local","req":{"id":4,"method":"GET","url":"/did%3Aplc%3Awal42s6ti6sjc6frkwilq5hv","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59978","connection":"close"},"remoteAddress":"::1","remotePort":59982},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-RJkkO5YJwpIfpAOUfQbM1GWVX6I\""}},"responseTime":3,"msg":"request completed"}
|
|
5
|
+
{"level":30,"time":1689275840978,"pid":71480,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Awal42s6ti6sjc6frkwilq5hv","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59978","connection":"close"},"remoteAddress":"::1","remotePort":59983},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-RJkkO5YJwpIfpAOUfQbM1GWVX6I\""}},"responseTime":3,"msg":"request completed"}
|
|
6
|
+
{"level":30,"time":1689275840983,"pid":71480,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc%3Awal42s6ti6sjc6frkwilq5hv","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59978","connection":"close"},"remoteAddress":"::1","remotePort":59984},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-RJkkO5YJwpIfpAOUfQbM1GWVX6I\""}},"responseTime":3,"msg":"request completed"}
|
|
7
|
+
{"level":30,"time":1689275840994,"pid":71480,"hostname":"dicorcia.local","req":{"id":7,"method":"GET","url":"/did%3Aplc%3Awal42s6ti6sjc6frkwilq5hv","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59978","connection":"close"},"remoteAddress":"::1","remotePort":59985},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-RJkkO5YJwpIfpAOUfQbM1GWVX6I\""}},"responseTime":4,"msg":"request completed"}
|
|
8
|
+
{"level":30,"time":1689275841162,"pid":71479,"hostname":"dicorcia.local","req":{"id":1,"method":"POST","url":"/did%3Aplc%3A32jih6tnrtjjx36i4c4oybll","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/1.3.4","content-length":"434","accept-encoding":"gzip, compress, deflate, br","host":"localhost:59987","connection":"close"},"remoteAddress":"::1","remotePort":59988},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"2","etag":"W/\"2-nOO9QiTIwXgNtWtBJezz8kv3SLc\""}},"responseTime":26,"msg":"request completed"}
|
|
9
|
+
{"level":30,"time":1689275841170,"pid":71479,"hostname":"dicorcia.local","req":{"id":2,"method":"GET","url":"/did%3Aplc%3A32jih6tnrtjjx36i4c4oybll","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/1.3.4","accept-encoding":"gzip, compress, deflate, br","host":"localhost:59987","connection":"close"},"remoteAddress":"::1","remotePort":59989},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-LdbiZSnfZPKdYJIe++nRQRpnIho\""}},"responseTime":4,"msg":"request completed"}
|
|
10
|
+
{"level":30,"time":1689275841225,"pid":71479,"hostname":"dicorcia.local","req":{"id":3,"method":"GET","url":"/did%3Aplc%3A32jih6tnrtjjx36i4c4oybll","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59987","connection":"close"},"remoteAddress":"::1","remotePort":59992},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-LdbiZSnfZPKdYJIe++nRQRpnIho\""}},"responseTime":3,"msg":"request completed"}
|
|
11
|
+
{"level":30,"time":1689275841230,"pid":71479,"hostname":"dicorcia.local","req":{"id":4,"method":"GET","url":"/did%3Aplc%3A32jih6tnrtjjx36i4c4oybll","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59987","connection":"close"},"remoteAddress":"::1","remotePort":59993},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-LdbiZSnfZPKdYJIe++nRQRpnIho\""}},"responseTime":3,"msg":"request completed"}
|
|
12
|
+
{"level":30,"time":1689275841233,"pid":71479,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aasdf","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59987","connection":"close"},"remoteAddress":"::1","remotePort":59994},"err":{"type":"ServerError","message":"DID not registered: did:plc:asdf","stack":"Error: DID not registered: did:plc:asdf\n at /Users/devinivy/Documents/bluesky/atproto/node_modules/@did-plc/server/dist/index.js:78306:13\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","status":404},"msg":"handled server error"}
|
|
13
|
+
{"level":30,"time":1689275841591,"pid":71479,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aasdf","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59987","connection":"close"},"remoteAddress":"::1","remotePort":59994},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"46","etag":"W/\"2e-ouyx9dlGpAF6gs2puC1AAUwbx84\""}},"responseTime":358,"msg":"request completed"}
|
|
14
|
+
{"level":30,"time":1689275841592,"pid":71479,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59987","connection":"close"},"remoteAddress":"::1","remotePort":59995},"err":{"type":"ServerError","message":"DID not registered: did:plc","stack":"Error: DID not registered: did:plc\n at /Users/devinivy/Documents/bluesky/atproto/node_modules/@did-plc/server/dist/index.js:78306:13\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","status":404},"msg":"handled server error"}
|
|
15
|
+
{"level":30,"time":1689275841593,"pid":71479,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:59987","connection":"close"},"remoteAddress":"::1","remotePort":59995},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"41","etag":"W/\"29-pS6VolLLFKlzTQkRVMexS+2oUm8\""}},"responseTime":1,"msg":"request completed"}
|
|
16
|
+
{"level":30,"time":1689278983516,"pid":75490,"hostname":"dicorcia.local","req":{"id":1,"method":"POST","url":"/did%3Aplc%3A6rzcre3todeexytbodbzsa6p","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/1.3.4","content-length":"433","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60292","connection":"close"},"remoteAddress":"::1","remotePort":60293},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"2","etag":"W/\"2-nOO9QiTIwXgNtWtBJezz8kv3SLc\""}},"responseTime":28,"msg":"request completed"}
|
|
17
|
+
{"level":30,"time":1689278983531,"pid":75490,"hostname":"dicorcia.local","req":{"id":2,"method":"GET","url":"/did%3Aplc%3A6rzcre3todeexytbodbzsa6p","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60292","connection":"close"},"remoteAddress":"::1","remotePort":60294},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-h6DF5AIlxTEEJBAcBzUIuDrzi+U\""}},"responseTime":5,"msg":"request completed"}
|
|
18
|
+
{"level":30,"time":1689278983539,"pid":75490,"hostname":"dicorcia.local","req":{"id":3,"method":"GET","url":"/did%3Aplc%3A6rzcre3todeexytbodbzsa6p","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60292","connection":"close"},"remoteAddress":"::1","remotePort":60295},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-h6DF5AIlxTEEJBAcBzUIuDrzi+U\""}},"responseTime":3,"msg":"request completed"}
|
|
19
|
+
{"level":30,"time":1689278983545,"pid":75490,"hostname":"dicorcia.local","req":{"id":4,"method":"GET","url":"/did%3Aplc%3A6rzcre3todeexytbodbzsa6p","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60292","connection":"close"},"remoteAddress":"::1","remotePort":60296},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-h6DF5AIlxTEEJBAcBzUIuDrzi+U\""}},"responseTime":4,"msg":"request completed"}
|
|
20
|
+
{"level":30,"time":1689278983555,"pid":75490,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3A6rzcre3todeexytbodbzsa6p","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60292","connection":"close"},"remoteAddress":"::1","remotePort":60298},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-h6DF5AIlxTEEJBAcBzUIuDrzi+U\""}},"responseTime":3,"msg":"request completed"}
|
|
21
|
+
{"level":30,"time":1689278983559,"pid":75490,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc%3A6rzcre3todeexytbodbzsa6p","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60292","connection":"close"},"remoteAddress":"::1","remotePort":60300},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-h6DF5AIlxTEEJBAcBzUIuDrzi+U\""}},"responseTime":2,"msg":"request completed"}
|
|
22
|
+
{"level":30,"time":1689278983570,"pid":75490,"hostname":"dicorcia.local","req":{"id":7,"method":"GET","url":"/did%3Aplc%3A6rzcre3todeexytbodbzsa6p","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60292","connection":"close"},"remoteAddress":"::1","remotePort":60301},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-h6DF5AIlxTEEJBAcBzUIuDrzi+U\""}},"responseTime":3,"msg":"request completed"}
|
|
23
|
+
{"level":30,"time":1689278983622,"pid":75489,"hostname":"dicorcia.local","req":{"id":1,"method":"POST","url":"/did%3Aplc%3Avmeendn3be7mv7gew3pxmjsk","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/1.3.4","content-length":"434","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60299","connection":"close"},"remoteAddress":"::1","remotePort":60302},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"2","etag":"W/\"2-nOO9QiTIwXgNtWtBJezz8kv3SLc\""}},"responseTime":26,"msg":"request completed"}
|
|
24
|
+
{"level":30,"time":1689278983631,"pid":75489,"hostname":"dicorcia.local","req":{"id":2,"method":"GET","url":"/did%3Aplc%3Avmeendn3be7mv7gew3pxmjsk","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/1.3.4","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60299","connection":"close"},"remoteAddress":"::1","remotePort":60303},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-CpesPuFJ48PxQH7Pq+pCxCxM4PE\""}},"responseTime":4,"msg":"request completed"}
|
|
25
|
+
{"level":30,"time":1689278983680,"pid":75489,"hostname":"dicorcia.local","req":{"id":3,"method":"GET","url":"/did%3Aplc%3Avmeendn3be7mv7gew3pxmjsk","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60299","connection":"close"},"remoteAddress":"::1","remotePort":60306},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-CpesPuFJ48PxQH7Pq+pCxCxM4PE\""}},"responseTime":4,"msg":"request completed"}
|
|
26
|
+
{"level":30,"time":1689278983685,"pid":75489,"hostname":"dicorcia.local","req":{"id":4,"method":"GET","url":"/did%3Aplc%3Avmeendn3be7mv7gew3pxmjsk","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60299","connection":"close"},"remoteAddress":"::1","remotePort":60307},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-CpesPuFJ48PxQH7Pq+pCxCxM4PE\""}},"responseTime":3,"msg":"request completed"}
|
|
27
|
+
{"level":30,"time":1689278983687,"pid":75489,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aasdf","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60299","connection":"close"},"remoteAddress":"::1","remotePort":60308},"err":{"type":"ServerError","message":"DID not registered: did:plc:asdf","stack":"Error: DID not registered: did:plc:asdf\n at /Users/devinivy/Documents/bluesky/atproto/node_modules/@did-plc/server/dist/index.js:78306:13\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","status":404},"msg":"handled server error"}
|
|
28
|
+
{"level":30,"time":1689278984045,"pid":75489,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aasdf","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60299","connection":"close"},"remoteAddress":"::1","remotePort":60308},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"46","etag":"W/\"2e-ouyx9dlGpAF6gs2puC1AAUwbx84\""}},"responseTime":358,"msg":"request completed"}
|
|
29
|
+
{"level":30,"time":1689278984047,"pid":75489,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60299","connection":"close"},"remoteAddress":"::1","remotePort":60309},"err":{"type":"ServerError","message":"DID not registered: did:plc","stack":"Error: DID not registered: did:plc\n at /Users/devinivy/Documents/bluesky/atproto/node_modules/@did-plc/server/dist/index.js:78306:13\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","status":404},"msg":"handled server error"}
|
|
30
|
+
{"level":30,"time":1689278984048,"pid":75489,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60299","connection":"close"},"remoteAddress":"::1","remotePort":60309},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"41","etag":"W/\"29-pS6VolLLFKlzTQkRVMexS+2oUm8\""}},"responseTime":1,"msg":"request completed"}
|
|
31
|
+
{"level":30,"time":1689279026156,"pid":75628,"hostname":"dicorcia.local","req":{"id":1,"method":"POST","url":"/did%3Aplc%3Aykqfxtz3ac47rdtvoijy7uyp","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/1.3.4","content-length":"433","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60317","connection":"close"},"remoteAddress":"::1","remotePort":60318},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"2","etag":"W/\"2-nOO9QiTIwXgNtWtBJezz8kv3SLc\""}},"responseTime":27,"msg":"request completed"}
|
|
32
|
+
{"level":30,"time":1689279026170,"pid":75628,"hostname":"dicorcia.local","req":{"id":2,"method":"GET","url":"/did%3Aplc%3Aykqfxtz3ac47rdtvoijy7uyp","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60317","connection":"close"},"remoteAddress":"::1","remotePort":60321},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-EMSn9/hKLGml1ERLLqPdSo2Qd6M\""}},"responseTime":5,"msg":"request completed"}
|
|
33
|
+
{"level":30,"time":1689279026179,"pid":75628,"hostname":"dicorcia.local","req":{"id":3,"method":"GET","url":"/did%3Aplc%3Aykqfxtz3ac47rdtvoijy7uyp","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60317","connection":"close"},"remoteAddress":"::1","remotePort":60322},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-EMSn9/hKLGml1ERLLqPdSo2Qd6M\""}},"responseTime":3,"msg":"request completed"}
|
|
34
|
+
{"level":30,"time":1689279026184,"pid":75628,"hostname":"dicorcia.local","req":{"id":4,"method":"GET","url":"/did%3Aplc%3Aykqfxtz3ac47rdtvoijy7uyp","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60317","connection":"close"},"remoteAddress":"::1","remotePort":60323},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-EMSn9/hKLGml1ERLLqPdSo2Qd6M\""}},"responseTime":3,"msg":"request completed"}
|
|
35
|
+
{"level":30,"time":1689279026193,"pid":75628,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aykqfxtz3ac47rdtvoijy7uyp","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60317","connection":"close"},"remoteAddress":"::1","remotePort":60325},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-EMSn9/hKLGml1ERLLqPdSo2Qd6M\""}},"responseTime":3,"msg":"request completed"}
|
|
36
|
+
{"level":30,"time":1689279026198,"pid":75628,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc%3Aykqfxtz3ac47rdtvoijy7uyp","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60317","connection":"close"},"remoteAddress":"::1","remotePort":60326},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-EMSn9/hKLGml1ERLLqPdSo2Qd6M\""}},"responseTime":3,"msg":"request completed"}
|
|
37
|
+
{"level":30,"time":1689279026208,"pid":75628,"hostname":"dicorcia.local","req":{"id":7,"method":"GET","url":"/did%3Aplc%3Aykqfxtz3ac47rdtvoijy7uyp","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60317","connection":"close"},"remoteAddress":"::1","remotePort":60327},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-EMSn9/hKLGml1ERLLqPdSo2Qd6M\""}},"responseTime":2,"msg":"request completed"}
|
|
38
|
+
{"level":30,"time":1689279026211,"pid":75627,"hostname":"dicorcia.local","req":{"id":1,"method":"POST","url":"/did%3Aplc%3Amgtoznwm7fd7ilrh36tr462f","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/1.3.4","content-length":"434","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60320","connection":"close"},"remoteAddress":"::1","remotePort":60324},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"2","etag":"W/\"2-nOO9QiTIwXgNtWtBJezz8kv3SLc\""}},"responseTime":26,"msg":"request completed"}
|
|
39
|
+
{"level":30,"time":1689279026220,"pid":75627,"hostname":"dicorcia.local","req":{"id":2,"method":"GET","url":"/did%3Aplc%3Amgtoznwm7fd7ilrh36tr462f","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/1.3.4","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60320","connection":"close"},"remoteAddress":"::1","remotePort":60328},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-+m13Z3hRO2ZPxgN+apn35LpI39k\""}},"responseTime":5,"msg":"request completed"}
|
|
40
|
+
{"level":30,"time":1689279026267,"pid":75627,"hostname":"dicorcia.local","req":{"id":3,"method":"GET","url":"/did%3Aplc%3Amgtoznwm7fd7ilrh36tr462f","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60320","connection":"close"},"remoteAddress":"::1","remotePort":60331},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-+m13Z3hRO2ZPxgN+apn35LpI39k\""}},"responseTime":4,"msg":"request completed"}
|
|
41
|
+
{"level":30,"time":1689279026271,"pid":75627,"hostname":"dicorcia.local","req":{"id":4,"method":"GET","url":"/did%3Aplc%3Amgtoznwm7fd7ilrh36tr462f","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60320","connection":"close"},"remoteAddress":"::1","remotePort":60332},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-+m13Z3hRO2ZPxgN+apn35LpI39k\""}},"responseTime":3,"msg":"request completed"}
|
|
42
|
+
{"level":30,"time":1689279026273,"pid":75627,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aasdf","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60320","connection":"close"},"remoteAddress":"::1","remotePort":60333},"err":{"type":"ServerError","message":"DID not registered: did:plc:asdf","stack":"Error: DID not registered: did:plc:asdf\n at /Users/devinivy/Documents/bluesky/atproto/node_modules/@did-plc/server/dist/index.js:78306:13\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","status":404},"msg":"handled server error"}
|
|
43
|
+
{"level":30,"time":1689279026623,"pid":75627,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aasdf","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60320","connection":"close"},"remoteAddress":"::1","remotePort":60333},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"46","etag":"W/\"2e-ouyx9dlGpAF6gs2puC1AAUwbx84\""}},"responseTime":350,"msg":"request completed"}
|
|
44
|
+
{"level":30,"time":1689279026625,"pid":75627,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60320","connection":"close"},"remoteAddress":"::1","remotePort":60334},"err":{"type":"ServerError","message":"DID not registered: did:plc","stack":"Error: DID not registered: did:plc\n at /Users/devinivy/Documents/bluesky/atproto/node_modules/@did-plc/server/dist/index.js:78306:13\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","status":404},"msg":"handled server error"}
|
|
45
|
+
{"level":30,"time":1689279026626,"pid":75627,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60320","connection":"close"},"remoteAddress":"::1","remotePort":60334},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"41","etag":"W/\"29-pS6VolLLFKlzTQkRVMexS+2oUm8\""}},"responseTime":1,"msg":"request completed"}
|
|
46
|
+
{"level":30,"time":1689279097637,"pid":75799,"hostname":"dicorcia.local","req":{"id":1,"method":"POST","url":"/did%3Aplc%3Aahrhjewkjjmbmsbru6kloszb","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/1.3.4","content-length":"433","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60344","connection":"close"},"remoteAddress":"::1","remotePort":60345},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"2","etag":"W/\"2-nOO9QiTIwXgNtWtBJezz8kv3SLc\""}},"responseTime":26,"msg":"request completed"}
|
|
47
|
+
{"level":30,"time":1689279097650,"pid":75799,"hostname":"dicorcia.local","req":{"id":2,"method":"GET","url":"/did%3Aplc%3Aahrhjewkjjmbmsbru6kloszb","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60344","connection":"close"},"remoteAddress":"::1","remotePort":60348},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-vl6/JGFwlRkbuXAmqQC22NecDyE\""}},"responseTime":5,"msg":"request completed"}
|
|
48
|
+
{"level":30,"time":1689279097658,"pid":75799,"hostname":"dicorcia.local","req":{"id":3,"method":"GET","url":"/did%3Aplc%3Aahrhjewkjjmbmsbru6kloszb","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60344","connection":"close"},"remoteAddress":"::1","remotePort":60349},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-vl6/JGFwlRkbuXAmqQC22NecDyE\""}},"responseTime":3,"msg":"request completed"}
|
|
49
|
+
{"level":30,"time":1689279097663,"pid":75799,"hostname":"dicorcia.local","req":{"id":4,"method":"GET","url":"/did%3Aplc%3Aahrhjewkjjmbmsbru6kloszb","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60344","connection":"close"},"remoteAddress":"::1","remotePort":60350},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-vl6/JGFwlRkbuXAmqQC22NecDyE\""}},"responseTime":3,"msg":"request completed"}
|
|
50
|
+
{"level":30,"time":1689279097674,"pid":75799,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aahrhjewkjjmbmsbru6kloszb","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60344","connection":"close"},"remoteAddress":"::1","remotePort":60351},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-vl6/JGFwlRkbuXAmqQC22NecDyE\""}},"responseTime":3,"msg":"request completed"}
|
|
51
|
+
{"level":30,"time":1689279097679,"pid":75799,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc%3Aahrhjewkjjmbmsbru6kloszb","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60344","connection":"close"},"remoteAddress":"::1","remotePort":60353},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-vl6/JGFwlRkbuXAmqQC22NecDyE\""}},"responseTime":3,"msg":"request completed"}
|
|
52
|
+
{"level":30,"time":1689279097689,"pid":75799,"hostname":"dicorcia.local","req":{"id":7,"method":"GET","url":"/did%3Aplc%3Aahrhjewkjjmbmsbru6kloszb","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60344","connection":"close"},"remoteAddress":"::1","remotePort":60354},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"526","etag":"W/\"20e-vl6/JGFwlRkbuXAmqQC22NecDyE\""}},"responseTime":3,"msg":"request completed"}
|
|
53
|
+
{"level":30,"time":1689279097706,"pid":75798,"hostname":"dicorcia.local","req":{"id":1,"method":"POST","url":"/did%3Aplc%3Aysbphh7uga6uydsoxgbqmxla","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","content-type":"application/json","user-agent":"axios/1.3.4","content-length":"434","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60347","connection":"close"},"remoteAddress":"::1","remotePort":60352},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"2","etag":"W/\"2-nOO9QiTIwXgNtWtBJezz8kv3SLc\""}},"responseTime":27,"msg":"request completed"}
|
|
54
|
+
{"level":30,"time":1689279097719,"pid":75798,"hostname":"dicorcia.local","req":{"id":2,"method":"GET","url":"/did%3Aplc%3Aysbphh7uga6uydsoxgbqmxla","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/1.3.4","accept-encoding":"gzip, compress, deflate, br","host":"localhost:60347","connection":"close"},"remoteAddress":"::1","remotePort":60355},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-glwwWunaLV47EyhcSr+de00CK80\""}},"responseTime":5,"msg":"request completed"}
|
|
55
|
+
{"level":30,"time":1689279097770,"pid":75798,"hostname":"dicorcia.local","req":{"id":3,"method":"GET","url":"/did%3Aplc%3Aysbphh7uga6uydsoxgbqmxla","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60347","connection":"close"},"remoteAddress":"::1","remotePort":60358},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-glwwWunaLV47EyhcSr+de00CK80\""}},"responseTime":4,"msg":"request completed"}
|
|
56
|
+
{"level":30,"time":1689279097775,"pid":75798,"hostname":"dicorcia.local","req":{"id":4,"method":"GET","url":"/did%3Aplc%3Aysbphh7uga6uydsoxgbqmxla","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60347","connection":"close"},"remoteAddress":"::1","remotePort":60359},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/did+ld+json; charset=utf-8","content-length":"527","etag":"W/\"20f-glwwWunaLV47EyhcSr+de00CK80\""}},"responseTime":3,"msg":"request completed"}
|
|
57
|
+
{"level":30,"time":1689279097778,"pid":75798,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aasdf","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60347","connection":"close"},"remoteAddress":"::1","remotePort":60360},"err":{"type":"ServerError","message":"DID not registered: did:plc:asdf","stack":"Error: DID not registered: did:plc:asdf\n at /Users/devinivy/Documents/bluesky/atproto/node_modules/@did-plc/server/dist/index.js:78306:13\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","status":404},"msg":"handled server error"}
|
|
58
|
+
{"level":30,"time":1689279098126,"pid":75798,"hostname":"dicorcia.local","req":{"id":5,"method":"GET","url":"/did%3Aplc%3Aasdf","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60347","connection":"close"},"remoteAddress":"::1","remotePort":60360},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"46","etag":"W/\"2e-ouyx9dlGpAF6gs2puC1AAUwbx84\""}},"responseTime":348,"msg":"request completed"}
|
|
59
|
+
{"level":30,"time":1689279098128,"pid":75798,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60347","connection":"close"},"remoteAddress":"::1","remotePort":60362},"err":{"type":"ServerError","message":"DID not registered: did:plc","stack":"Error: DID not registered: did:plc\n at /Users/devinivy/Documents/bluesky/atproto/node_modules/@did-plc/server/dist/index.js:78306:13\n at processTicksAndRejections (node:internal/process/task_queues:95:5)","status":404},"msg":"handled server error"}
|
|
60
|
+
{"level":30,"time":1689279098128,"pid":75798,"hostname":"dicorcia.local","req":{"id":6,"method":"GET","url":"/did%3Aplc","query":{},"params":{},"headers":{"accept":"application/json, text/plain, */*","user-agent":"axios/0.27.2","host":"localhost:60347","connection":"close"},"remoteAddress":"::1","remotePort":60362},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"41","etag":"W/\"29-pS6VolLLFKlzTQkRVMexS+2oUm8\""}},"responseTime":0,"msg":"request completed"}
|
package/tests/did-cache.test.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Database as DidPlcDb, PlcServer } from '@did-plc/server'
|
|
|
3
3
|
import getPort from 'get-port'
|
|
4
4
|
import { wait } from '@atproto/common-web'
|
|
5
5
|
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { MemoryCache } from '../src/did/memory-cache.js'
|
|
7
|
+
import { DidResolver } from '../src/index.js'
|
|
8
8
|
|
|
9
9
|
describe('did cache', () => {
|
|
10
10
|
let close: () => Promise<void>
|
|
@@ -2,9 +2,9 @@ import * as plc from '@did-plc/lib'
|
|
|
2
2
|
import { Database as DidPlcDb, PlcServer } from '@did-plc/server'
|
|
3
3
|
import getPort from 'get-port'
|
|
4
4
|
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
5
|
-
import { DidDocument, DidResolver } from '../src'
|
|
6
|
-
import { DidWebDb } from './web/db'
|
|
7
|
-
import { DidWebServer } from './web/server'
|
|
5
|
+
import { DidDocument, DidResolver } from '../src/index.js'
|
|
6
|
+
import { DidWebDb } from './web/db.js'
|
|
7
|
+
import { DidWebServer } from './web/server.js'
|
|
8
8
|
|
|
9
9
|
describe('did resolver', () => {
|
|
10
10
|
let close: () => Promise<void>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jest } from '@jest/globals'
|
|
2
2
|
|
|
3
|
-
jest.
|
|
3
|
+
jest.unstable_mockModule('node:dns/promises', () => {
|
|
4
4
|
return {
|
|
5
5
|
resolveTxt: (handle: string) => {
|
|
6
6
|
if (handle === '_atproto.simple.test') {
|
|
@@ -36,8 +36,10 @@ jest.mock('node:dns/promises', () => {
|
|
|
36
36
|
}
|
|
37
37
|
})
|
|
38
38
|
|
|
39
|
+
const { HandleResolver } = await import('../src/index.js')
|
|
40
|
+
|
|
39
41
|
describe('handle resolver', () => {
|
|
40
|
-
let resolver: HandleResolver
|
|
42
|
+
let resolver: InstanceType<typeof HandleResolver>
|
|
41
43
|
|
|
42
44
|
beforeAll(async () => {
|
|
43
45
|
resolver = new HandleResolver()
|
package/tests/web/db.ts
CHANGED
package/tests/web/server.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import http from 'node:http'
|
|
2
2
|
import cors from 'cors'
|
|
3
|
-
import express from 'express'
|
|
4
|
-
import { DidDocument } from '../../src'
|
|
5
|
-
import { DidWebDb } from './db'
|
|
3
|
+
import express, { Router, json } from 'express'
|
|
4
|
+
import { DidDocument } from '../../src/index.js'
|
|
5
|
+
import { DidWebDb } from './db.js'
|
|
6
6
|
|
|
7
7
|
const DOC_PATH = '/.well-known/did.json'
|
|
8
8
|
|
|
9
|
-
const routes =
|
|
9
|
+
const routes = Router()
|
|
10
10
|
|
|
11
11
|
// Get DID Doc
|
|
12
12
|
routes.get('/*', async (req, res) => {
|
|
@@ -60,7 +60,7 @@ export class DidWebServer {
|
|
|
60
60
|
const app = express()
|
|
61
61
|
|
|
62
62
|
app.use(cors())
|
|
63
|
-
app.use(
|
|
63
|
+
app.use(json())
|
|
64
64
|
app.use((_req, res, next) => {
|
|
65
65
|
res.locals.db = db
|
|
66
66
|
next()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/errors.ts","./src/id-resolver.ts","./src/index.ts","./src/types.ts","./src/did/atproto-data.ts","./src/did/base-resolver.ts","./src/did/did-resolver.ts","./src/did/index.ts","./src/did/memory-cache.ts","./src/did/plc-resolver.ts","./src/did/util.ts","./src/did/web-resolver.ts","./src/handle/index.ts"],"version":"
|
|
1
|
+
{"root":["./src/errors.ts","./src/id-resolver.ts","./src/index.ts","./src/types.ts","./src/did/atproto-data.ts","./src/did/base-resolver.ts","./src/did/did-resolver.ts","./src/did/index.ts","./src/did/memory-cache.ts","./src/did/plc-resolver.ts","./src/did/util.ts","./src/did/web-resolver.ts","./src/handle/index.ts"],"version":"6.0.3"}
|