@toa.io/extensions.exposition 1.0.0-alpha.300 → 1.0.0-alpha.301

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.
Files changed (244) hide show
  1. package/components/exposition.octets/operations/delete.js +1 -3
  2. package/components/exposition.octets/operations/get.js +1 -3
  3. package/components/exposition.octets/operations/head.js +1 -3
  4. package/components/exposition.octets/operations/put.js +1 -3
  5. package/components/exposition.octets/package.json +2 -2
  6. package/components/identity.basic/source/add.ts +1 -1
  7. package/components/identity.basic/source/authenticate.ts +2 -2
  8. package/components/identity.basic/source/check.ts +1 -1
  9. package/components/identity.basic/source/delete.ts +1 -1
  10. package/components/identity.basic/source/incept.ts +2 -2
  11. package/components/identity.basic/source/info.ts +1 -1
  12. package/components/identity.basic/source/transit.ts +1 -1
  13. package/components/identity.basic/types/index.d.ts +1 -1
  14. package/components/identity.clients/source/describe.ts +2 -2
  15. package/components/identity.clients/source/lib/Context.ts +3 -4
  16. package/components/identity.clients/source/lib/canonical.ts +1 -1
  17. package/components/identity.clients/source/lib/cimd.ts +3 -3
  18. package/components/identity.clients/source/lib/index.ts +6 -6
  19. package/components/identity.clients/source/register.ts +2 -2
  20. package/components/identity.federation/source/authenticate.ts +2 -2
  21. package/components/identity.federation/source/create.ts +2 -2
  22. package/components/identity.federation/source/decode.ts +2 -2
  23. package/components/identity.federation/source/delete.ts +1 -1
  24. package/components/identity.federation/source/incept.ts +3 -3
  25. package/components/identity.federation/source/lib/Ctx.ts +2 -2
  26. package/components/identity.federation/source/lib/decode.ts +4 -4
  27. package/components/identity.federation/source/lib/discovery.ts +2 -2
  28. package/components/identity.federation/source/lib/exchange.ts +5 -5
  29. package/components/identity.federation/source/lib/index.ts +5 -5
  30. package/components/identity.federation/source/lib/principal.ts +1 -1
  31. package/components/identity.federation/source/lib/resolve.ts +5 -5
  32. package/components/identity.federation/source/list.ts +1 -1
  33. package/components/identity.federation/source/types/context.ts +2 -2
  34. package/components/identity.federation/source/types/index.ts +4 -4
  35. package/components/identity.grants/source/authorize.ts +2 -2
  36. package/components/identity.grants/source/exchange.ts +2 -2
  37. package/components/identity.grants/source/lib/code.ts +1 -1
  38. package/components/identity.grants/source/lib/index.ts +3 -3
  39. package/components/identity.grants/source/list.ts +1 -1
  40. package/components/identity.grants/source/revoke.ts +1 -1
  41. package/components/identity.grants/types/index.d.ts +2 -3
  42. package/components/identity.otp/source/authenticate.ts +1 -1
  43. package/components/identity.otp/source/issue.ts +1 -1
  44. package/components/identity.otp/source/lib/Context.ts +1 -1
  45. package/components/identity.otp/source/lib/index.ts +1 -1
  46. package/components/identity.passkeys/source/authenticate.ts +1 -1
  47. package/components/identity.passkeys/source/challenge.ts +2 -2
  48. package/components/identity.passkeys/source/create.ts +1 -1
  49. package/components/identity.passkeys/source/delete.ts +1 -1
  50. package/components/identity.passkeys/source/list.ts +2 -2
  51. package/components/identity.passkeys/source/types/Context.ts +3 -3
  52. package/components/identity.passkeys/source/types/index.ts +2 -2
  53. package/components/identity.passkeys/source/use.ts +1 -1
  54. package/components/identity.roles/manifest.toa.yaml +4 -8
  55. package/components/identity.roles/source/grant.ts +1 -1
  56. package/components/identity.roles/source/list.ts +1 -1
  57. package/components/identity.roles/source/principal.ts +2 -2
  58. package/components/identity.tokens/source/authenticate.ts +2 -2
  59. package/components/identity.tokens/source/decrypt.ts +2 -2
  60. package/components/identity.tokens/source/encrypt.ts +2 -2
  61. package/components/identity.tokens/source/issue.ts +1 -1
  62. package/components/identity.tokens/source/lib/index.ts +4 -4
  63. package/components/identity.tokens/source/revoke.ts +1 -1
  64. package/components/identity.tokens/types/index.d.ts +2 -8
  65. package/package.json +10 -10
  66. package/readme.md +2 -0
  67. package/transpiled/Branch.d.ts +2 -2
  68. package/transpiled/Composition.d.ts +1 -1
  69. package/transpiled/Context.d.ts +1 -1
  70. package/transpiled/Directive.d.ts +6 -6
  71. package/transpiled/Discovery/Explorer.d.ts +2 -2
  72. package/transpiled/Discovery/Site.d.ts +2 -2
  73. package/transpiled/Discovery/index.d.ts +3 -3
  74. package/transpiled/Discovery/tree.d.ts +3 -3
  75. package/transpiled/Discovery/trunk.d.ts +1 -1
  76. package/transpiled/Endpoint.d.ts +6 -6
  77. package/transpiled/Factory.d.ts +1 -1
  78. package/transpiled/Gateway.d.ts +6 -6
  79. package/transpiled/HTTP/Context.d.ts +4 -4
  80. package/transpiled/HTTP/Server.d.ts +6 -4
  81. package/transpiled/HTTP/Server.js.map +1 -1
  82. package/transpiled/HTTP/Timing.d.ts +1 -1
  83. package/transpiled/HTTP/address.d.ts +1 -1
  84. package/transpiled/HTTP/exceptions.d.ts +3 -0
  85. package/transpiled/HTTP/exceptions.js +5 -0
  86. package/transpiled/HTTP/exceptions.js.map +1 -1
  87. package/transpiled/HTTP/index.d.ts +6 -6
  88. package/transpiled/HTTP/messages.d.ts +2 -2
  89. package/transpiled/Interception.d.ts +2 -2
  90. package/transpiled/Introspection.d.ts +1 -1
  91. package/transpiled/MCP/Server.d.ts +2 -2
  92. package/transpiled/MCP/errors.d.ts +2 -2
  93. package/transpiled/MCP/index.d.ts +1 -1
  94. package/transpiled/MCP/schema.d.ts +2 -2
  95. package/transpiled/MCP/tools.d.ts +3 -3
  96. package/transpiled/Mapping.d.ts +6 -6
  97. package/transpiled/Query.d.ts +4 -4
  98. package/transpiled/RPC/Context.d.ts +2 -2
  99. package/transpiled/RPC/Dispatcher.d.ts +1 -1
  100. package/transpiled/RPC/errors.d.ts +1 -1
  101. package/transpiled/RPC/index.d.ts +1 -1
  102. package/transpiled/RPC/names.d.ts +2 -2
  103. package/transpiled/RTD/Context.d.ts +3 -3
  104. package/transpiled/RTD/Directives.d.ts +5 -5
  105. package/transpiled/RTD/Endpoint.d.ts +5 -5
  106. package/transpiled/RTD/Match.d.ts +1 -1
  107. package/transpiled/RTD/Method.d.ts +5 -5
  108. package/transpiled/RTD/Node.d.ts +7 -7
  109. package/transpiled/RTD/Route.d.ts +3 -3
  110. package/transpiled/RTD/Tree.d.ts +5 -5
  111. package/transpiled/RTD/factory.d.ts +3 -3
  112. package/transpiled/RTD/index.d.ts +8 -8
  113. package/transpiled/RTD/segment.d.ts +1 -1
  114. package/transpiled/Remotes.d.ts +1 -1
  115. package/transpiled/Tenant.d.ts +2 -2
  116. package/transpiled/directives/auth/Anonymous.d.ts +2 -2
  117. package/transpiled/directives/auth/Anyone.d.ts +2 -2
  118. package/transpiled/directives/auth/Assert.d.ts +1 -1
  119. package/transpiled/directives/auth/Authorization.d.ts +7 -7
  120. package/transpiled/directives/auth/Delegate.d.ts +2 -2
  121. package/transpiled/directives/auth/Echo.d.ts +2 -2
  122. package/transpiled/directives/auth/Federation.d.ts +3 -3
  123. package/transpiled/directives/auth/Id.d.ts +3 -3
  124. package/transpiled/directives/auth/Incept.d.ts +2 -2
  125. package/transpiled/directives/auth/Input.d.ts +2 -2
  126. package/transpiled/directives/auth/Role.d.ts +3 -3
  127. package/transpiled/directives/auth/Rule.d.ts +3 -3
  128. package/transpiled/directives/auth/Scheme.d.ts +1 -1
  129. package/transpiled/directives/auth/create.d.ts +1 -1
  130. package/transpiled/directives/auth/index.d.ts +1 -1
  131. package/transpiled/directives/auth/schemes.d.ts +1 -1
  132. package/transpiled/directives/auth/split.d.ts +1 -1
  133. package/transpiled/directives/auth/types.d.ts +4 -4
  134. package/transpiled/directives/cache/Cache.d.ts +4 -4
  135. package/transpiled/directives/cache/Control.d.ts +1 -1
  136. package/transpiled/directives/cache/Exact.d.ts +1 -1
  137. package/transpiled/directives/cache/index.d.ts +1 -1
  138. package/transpiled/directives/cache/types.d.ts +1 -1
  139. package/transpiled/directives/censor/Censor.d.ts +10 -0
  140. package/transpiled/directives/censor/Censor.js +20 -0
  141. package/transpiled/directives/censor/Censor.js.map +1 -0
  142. package/transpiled/directives/censor/index.d.ts +2 -0
  143. package/transpiled/directives/censor/index.js +3 -0
  144. package/transpiled/directives/censor/index.js.map +1 -0
  145. package/transpiled/directives/cors/CORS.d.ts +2 -2
  146. package/transpiled/directives/cors/index.d.ts +1 -1
  147. package/transpiled/directives/dev/Development.d.ts +3 -3
  148. package/transpiled/directives/dev/Faulty.d.ts +2 -2
  149. package/transpiled/directives/dev/Sleep.d.ts +2 -2
  150. package/transpiled/directives/dev/Stub.d.ts +2 -2
  151. package/transpiled/directives/dev/Throw.d.ts +2 -2
  152. package/transpiled/directives/dev/index.d.ts +1 -1
  153. package/transpiled/directives/dev/types.d.ts +1 -1
  154. package/transpiled/directives/flow/Compose.d.ts +2 -2
  155. package/transpiled/directives/flow/Fetch.d.ts +5 -5
  156. package/transpiled/directives/flow/Flow.d.ts +4 -4
  157. package/transpiled/directives/flow/index.d.ts +1 -1
  158. package/transpiled/directives/flow/types.d.ts +2 -2
  159. package/transpiled/directives/help/Family.d.ts +6 -7
  160. package/transpiled/directives/help/Parameters.d.ts +1 -1
  161. package/transpiled/directives/help/index.d.ts +9 -9
  162. package/transpiled/directives/index.d.ts +5 -4
  163. package/transpiled/directives/index.js +5 -3
  164. package/transpiled/directives/index.js.map +1 -1
  165. package/transpiled/directives/io/Directive.d.ts +4 -4
  166. package/transpiled/directives/io/IO.d.ts +5 -5
  167. package/transpiled/directives/io/Input.d.ts +2 -2
  168. package/transpiled/directives/io/Output.d.ts +2 -2
  169. package/transpiled/directives/io/Status.d.ts +2 -2
  170. package/transpiled/directives/io/Throttle.d.ts +4 -4
  171. package/transpiled/directives/io/index.d.ts +1 -1
  172. package/transpiled/directives/io/lib/throttle/Keys.d.ts +5 -5
  173. package/transpiled/directives/io/lib/throttle/Quotas.d.ts +5 -5
  174. package/transpiled/directives/io/lib/throttle/Sync.d.ts +1 -1
  175. package/transpiled/directives/io/lib/throttle/components/Component.d.ts +2 -2
  176. package/transpiled/directives/io/lib/throttle/components/IP.d.ts +2 -2
  177. package/transpiled/directives/io/lib/throttle/components/Identity.d.ts +2 -2
  178. package/transpiled/directives/io/lib/throttle/components/Path.d.ts +2 -2
  179. package/transpiled/directives/io/lib/throttle/components/Route.d.ts +1 -1
  180. package/transpiled/directives/io/lib/throttle/components/Segment.d.ts +3 -3
  181. package/transpiled/directives/io/lib/throttle/components/index.d.ts +3 -3
  182. package/transpiled/directives/io/lib/throttle/components/index.js.map +1 -1
  183. package/transpiled/directives/io/lib/throttle/conditions/Condition.d.ts +1 -1
  184. package/transpiled/directives/io/lib/throttle/conditions/Status.d.ts +2 -2
  185. package/transpiled/directives/io/lib/throttle/conditions/index.d.ts +3 -3
  186. package/transpiled/directives/io/lib/throttle/conditions/index.js.map +1 -1
  187. package/transpiled/directives/io/lib/throttle/index.d.ts +4 -4
  188. package/transpiled/directives/io/schemas.d.ts +4 -4
  189. package/transpiled/directives/map/Authority.d.ts +2 -2
  190. package/transpiled/directives/map/Buffer.d.ts +2 -2
  191. package/transpiled/directives/map/Claims.d.ts +3 -3
  192. package/transpiled/directives/map/Directive.d.ts +2 -2
  193. package/transpiled/directives/map/Headers.d.ts +3 -3
  194. package/transpiled/directives/map/Instance.d.ts +4 -4
  195. package/transpiled/directives/map/Language.d.ts +4 -4
  196. package/transpiled/directives/map/Languages.d.ts +1 -1
  197. package/transpiled/directives/map/Map.d.ts +7 -7
  198. package/transpiled/directives/map/Mapping.d.ts +5 -5
  199. package/transpiled/directives/map/Segments.d.ts +3 -3
  200. package/transpiled/directives/map/index.d.ts +1 -1
  201. package/transpiled/directives/mcp/MCP.d.ts +4 -4
  202. package/transpiled/directives/mcp/index.d.ts +3 -3
  203. package/transpiled/directives/oauth/Discovery.d.ts +3 -3
  204. package/transpiled/directives/oauth/index.d.ts +1 -1
  205. package/transpiled/directives/octets/Context.d.ts +2 -2
  206. package/transpiled/directives/octets/Delete.d.ts +6 -6
  207. package/transpiled/directives/octets/Directive.d.ts +4 -4
  208. package/transpiled/directives/octets/Get.d.ts +3 -3
  209. package/transpiled/directives/octets/Octets.d.ts +6 -6
  210. package/transpiled/directives/octets/Put.d.ts +7 -7
  211. package/transpiled/directives/octets/Workflow.d.ts +6 -6
  212. package/transpiled/directives/octets/index.d.ts +1 -1
  213. package/transpiled/directives/octets/schemas.d.ts +4 -4
  214. package/transpiled/directives/octets/types.d.ts +2 -2
  215. package/transpiled/directives/octets/workflows/Execution.d.ts +2 -2
  216. package/transpiled/directives/octets/workflows/Workflow.d.ts +3 -3
  217. package/transpiled/directives/octets/workflows/index.d.ts +2 -2
  218. package/transpiled/directives/require/Directive.d.ts +1 -1
  219. package/transpiled/directives/require/Headers.d.ts +2 -2
  220. package/transpiled/directives/require/Require.d.ts +3 -3
  221. package/transpiled/directives/require/index.d.ts +1 -1
  222. package/transpiled/exceptions.d.ts +1 -1
  223. package/transpiled/index.d.ts +5 -5
  224. package/transpiled/io.d.ts +1 -1
  225. package/transpiled/root.d.ts +1 -1
  226. package/transpiled/service.d.ts +1 -1
  227. package/ui/dist/_app/immutable/chunks/{DWKNKsnY.js → BE7eB5v5.js} +1 -1
  228. package/ui/dist/_app/immutable/chunks/{C_DmHQYW.js → D4j-xChx.js} +2 -2
  229. package/ui/dist/_app/immutable/chunks/VDPx7_k6.js +1 -0
  230. package/ui/dist/_app/immutable/chunks/{Bu6-PFR2.js → sa0pbjcV.js} +41 -41
  231. package/ui/dist/_app/immutable/entry/{app.BGsFlGMF.js → app.AkuFmFm5.js} +2 -2
  232. package/ui/dist/_app/immutable/entry/start.Bf-Wtlxj.js +1 -0
  233. package/ui/dist/_app/immutable/nodes/{0.CoZD8TUK.js → 0.tjrDhK2K.js} +1 -1
  234. package/ui/dist/_app/immutable/nodes/{1.CK_wvdhC.js → 1.BBstrUMk.js} +1 -1
  235. package/ui/dist/_app/immutable/nodes/{2.C8Ba-vjq.js → 2.kK-1mow1.js} +1 -1
  236. package/ui/dist/_app/immutable/nodes/3.DyUOxgbQ.js +1 -0
  237. package/ui/dist/_app/immutable/nodes/{4.Bbw5GORo.js → 4.DRJYPW3m.js} +1 -1
  238. package/ui/dist/_app/immutable/nodes/{5.B1Jp9o4B.js → 5.3gnA7sEW.js} +1 -1
  239. package/ui/dist/_app/immutable/nodes/{6.DeLSCU5t.js → 6.DNBe1ELW.js} +1 -1
  240. package/ui/dist/_app/version.json +1 -1
  241. package/ui/dist/index.html +10 -10
  242. package/ui/dist/_app/immutable/chunks/CxYJ7ZeC.js +0 -1
  243. package/ui/dist/_app/immutable/entry/start.Dy23hery.js +0 -1
  244. package/ui/dist/_app/immutable/nodes/3.DMVojOYg.js +0 -1
@@ -1,5 +1,3 @@
1
- function del(input, context) {
1
+ export function effect(input, context) {
2
2
  return context.storages[input.storage].delete(input.path)
3
3
  }
4
-
5
- export { del as effect }
@@ -1,8 +1,6 @@
1
- async function get(input, context) {
1
+ export async function effect(input, context) {
2
2
  return await context.storages[input.storage].get(input.path, {
3
3
  range: input.range,
4
4
  agent: input.agent
5
5
  })
6
6
  }
7
-
8
- export { get as effect }
@@ -1,5 +1,3 @@
1
- async function head(input, context) {
1
+ export async function computation(input, context) {
2
2
  return await context.storages[input.storage].head(input.path)
3
3
  }
4
-
5
- export { head as computation }
@@ -2,7 +2,7 @@ import { Readable } from 'node:stream'
2
2
  import { posix } from 'node:path'
3
3
  import { match } from 'matchacho'
4
4
 
5
- async function put(input, context) {
5
+ export async function effect(input, context) {
6
6
  const { storage, request, location, accept, limit, trust } = input
7
7
  const url = request.url
8
8
  const id = request.headers['content-id']
@@ -138,5 +138,3 @@ const ID_RX = /^[a-zA-Z0-9-_]{1,32}$/
138
138
 
139
139
  /** @typedef {Array<string | RegExp>} Trust */
140
140
  /** @typedef {import('node:stream').Readable} Readable */
141
-
142
- export { put as effect }
@@ -3,8 +3,8 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@aws-sdk/client-s3": "3.1125.0",
7
- "@aws-sdk/lib-storage": "3.1125.0",
6
+ "@aws-sdk/client-s3": "3.1127.0",
7
+ "@aws-sdk/lib-storage": "3.1127.0",
8
8
  "cloudinary": "2.11.0"
9
9
  }
10
10
  }
@@ -1,4 +1,4 @@
1
- import type { AddInput, Context, TransitOutput } from '../types/index.js'
1
+ import type { AddInput, Context, TransitOutput } from '../types/index.d.ts'
2
2
  import type { Maybe } from '@toa.io/core/types'
3
3
 
4
4
  export async function effect(
@@ -1,8 +1,8 @@
1
1
  import { compare } from '@node-rs/bcrypt'
2
2
  import { quote } from '@toa.io/generic'
3
3
  import type { Query, Maybe } from '@toa.io/core/types'
4
- import { split } from './lib/credentials.js'
5
- import { type Context } from '../types/index.js'
4
+ import { split } from './lib/credentials.ts'
5
+ import type { Context } from '../types/index.d.ts'
6
6
 
7
7
  export async function computation(
8
8
  input: Input,
@@ -1,5 +1,5 @@
1
1
  import { quote } from '@toa.io/generic'
2
- import type { Context } from '../types/index.js'
2
+ import type { Context } from '../types/index.d.ts'
3
3
 
4
4
  export async function computation(
5
5
  input: Input,
@@ -1,4 +1,4 @@
1
- import type { Context, Entity } from '../types/index.js'
1
+ import type { Context, Entity } from '../types/index.d.ts'
2
2
 
3
3
  export async function effect(
4
4
  { authority, identity }: Input,
@@ -1,5 +1,5 @@
1
- import { split } from './lib/credentials.js'
2
- import type { Context } from '../types/index.js'
1
+ import { split } from './lib/credentials.ts'
2
+ import type { Context } from '../types/index.d.ts'
3
3
  import type { Maybe } from '@toa.io/core/types'
4
4
 
5
5
  export async function effect(input: Input, context: Context): Promise<Maybe<Output>> {
@@ -1,4 +1,4 @@
1
- import type { Context, Entity } from '../types/index.js'
1
+ import type { Context, Entity } from '../types/index.d.ts'
2
2
 
3
3
  export async function effect(
4
4
  { authority, identity }: Input,
@@ -7,7 +7,7 @@ import type {
7
7
  Principal,
8
8
  TransitInput,
9
9
  TransitOutput
10
- } from '../types/index.js'
10
+ } from '../types/index.d.ts'
11
11
 
12
12
  export class Transition implements Operation {
13
13
  private rounds: number = 10
@@ -3,7 +3,7 @@ export * from './toa.d.ts'
3
3
  // What a manifest does not state belongs here, and every run keeps it.
4
4
 
5
5
  import type { Query, RemoteError } from '@toa.io/core/types'
6
- import type { Component, Configuration } from './toa.js'
6
+ import type { Component, Configuration } from './toa.d.ts'
7
7
 
8
8
  /** Credentials whose Identity is granted the `system` role. */
9
9
  export type Principal = NonNullable<Configuration['principal']>
@@ -1,7 +1,7 @@
1
- import { ERR_UNKNOWN_CLIENT, permits, read } from './lib/index.js'
1
+ import { ERR_UNKNOWN_CLIENT, permits, read } from './lib/index.ts'
2
2
  import type { Maybe } from '@toa.io/core/types'
3
3
  import type { Operation } from '@toa.io/bridges.node'
4
- import type { Client, Context } from './lib/index.js'
4
+ import type { Client, Context } from './lib/index.ts'
5
5
 
6
6
  /**
7
7
  * What a client is, whichever way it came to be known: a `client_id` that is an https URL
@@ -1,7 +1,8 @@
1
- import type { Call, Observation, Transition } from '@toa.io/core/types'
1
+ import type { Call, Observation } from '@toa.io/core/types'
2
+ export type { Transition } from '@toa.io/core/types'
2
3
  import type { Stash } from '@toa.io/extensions.stash'
3
4
  import type { Logs } from '@toa.io/extensions.telemetry'
4
- import type { Entity } from './Entity.js'
5
+ import type { Entity } from './Entity.ts'
5
6
 
6
7
  export interface Context {
7
8
  stash: Stash
@@ -37,5 +38,3 @@ export interface Configuration {
37
38
  /** Milliseconds a document has to arrive. */
38
39
  readonly timeout: number
39
40
  }
40
-
41
- export type { Transition }
@@ -1,5 +1,5 @@
1
1
  import { createHash } from 'node:crypto'
2
- import type { Metadata } from './Entity.js'
2
+ import type { Metadata } from './Entity.ts'
3
3
 
4
4
  /**
5
5
  * The id of a registration: a hash of what it says, so identical metadata is one client
@@ -1,7 +1,7 @@
1
1
  import { createHash } from 'node:crypto'
2
- import { ERR_UNKNOWN_CLIENT } from './errors.js'
3
- import type { Context } from './Context.js'
4
- import type { Client, Metadata } from './Entity.js'
2
+ import { ERR_UNKNOWN_CLIENT } from './errors.ts'
3
+ import type { Context } from './Context.ts'
4
+ import type { Client, Metadata } from './Entity.ts'
5
5
 
6
6
  /**
7
7
  * A Client ID Metadata Document: the client publishes what it is at an https URL, and that
@@ -1,6 +1,6 @@
1
- export * from './canonical.js'
2
- export * from './cimd.js'
3
- export * from './Context.js'
4
- export * from './Entity.js'
5
- export * from './errors.js'
6
- export * from './redirect.js'
1
+ export * from './canonical.ts'
2
+ export * from './cimd.ts'
3
+ export * from './Context.ts'
4
+ export * from './Entity.ts'
5
+ export * from './errors.ts'
6
+ export * from './redirect.ts'
@@ -1,7 +1,7 @@
1
- import { identify } from './lib/index.js'
1
+ import { identify } from './lib/index.ts'
2
2
  import type { Maybe } from '@toa.io/core/types'
3
3
  import type { Operation } from '@toa.io/bridges.node'
4
- import type { Context, Metadata } from './lib/index.js'
4
+ import type { Context, Metadata } from './lib/index.ts'
5
5
 
6
6
  /**
7
7
  * Dynamic Client Registration, RFC 7591: the client sends what it is and is given an
@@ -1,8 +1,8 @@
1
1
  import { newid, quote } from '@toa.io/generic'
2
- import { principal, resolve } from './lib/index.js'
2
+ import { principal, resolve } from './lib/index.ts'
3
3
  import type { JWTPayload } from 'jose'
4
4
  import type { Maybe } from '@toa.io/core/types'
5
- import type { Context, Scheme } from './types/index.js'
5
+ import type { Context, Scheme } from './types/index.ts'
6
6
 
7
7
  export async function effect(
8
8
  { scheme, authority, credentials }: Input,
@@ -1,6 +1,6 @@
1
1
  import { quote } from '@toa.io/generic'
2
- import { resolve } from './lib/index.js'
3
- import type { Context, Entity, Scheme } from './types/index.js'
2
+ import { resolve } from './lib/index.ts'
3
+ import type { Context, Entity, Scheme } from './types/index.ts'
4
4
 
5
5
  export async function effect(input: Input, context: Context): Promise<Entity | Error> {
6
6
  const claims = await resolve(input.scheme, input.credentials, context)
@@ -1,6 +1,6 @@
1
- import { decode } from './lib/index.js'
1
+ import { decode } from './lib/index.ts'
2
2
  import type { JWTPayload } from 'jose'
3
- import type { Context } from './types/index.js'
3
+ import type { Context } from './types/index.ts'
4
4
 
5
5
  export async function effect(
6
6
  token: string,
@@ -1,4 +1,4 @@
1
- import type { Context } from './types/index.js'
1
+ import type { Context } from './types/index.ts'
2
2
 
3
3
  export async function effect(
4
4
  { authority, identity, credential }: Input,
@@ -1,6 +1,6 @@
1
- import { effect as create } from './create.js'
2
- import { principal } from './lib/index.js'
3
- import type { Context, Scheme } from './types/index.js'
1
+ import { effect as create } from './create.ts'
2
+ import { principal } from './lib/index.ts'
3
+ import type { Context, Scheme } from './types/index.ts'
4
4
 
5
5
  export async function effect(input: Input, context: Context): Promise<Output | Error> {
6
6
  const credential = await create(input, context)
@@ -1,6 +1,6 @@
1
1
  import type { Logs } from '@toa.io/extensions.telemetry'
2
- import type { Trust } from '../types/index.js'
3
- import type { Fetch } from '../types/context.js'
2
+ import type { Trust } from '../types/index.ts'
3
+ import type { Fetch } from '../types/context.ts'
4
4
 
5
5
  export interface Ctx {
6
6
  trust: Trust[]
@@ -1,9 +1,9 @@
1
1
  import { load } from './jose.js'
2
- import { createRemoteJWKSet } from './discovery.js'
3
- import { ERR_TRUST, ERR_ISS, ERR_SUB, ERR_TOKEN } from './errors.js'
2
+ import { createRemoteJWKSet } from './discovery.ts'
3
+ import { ERR_TRUST, ERR_ISS, ERR_SUB, ERR_TOKEN } from './errors.ts'
4
4
  import type { JWTPayload } from 'jose'
5
- import type { Ctx } from './Ctx.js'
6
- import type { Payload } from './Payload.js'
5
+ import type { Ctx } from './Ctx.ts'
6
+ import type { Payload } from './Payload.ts'
7
7
 
8
8
  export async function decode(token: string, ctx: Ctx): Promise<Payload | Error> {
9
9
  const jose = await load()
@@ -1,7 +1,7 @@
1
1
  import { load } from './jose.js'
2
2
  import type * as jose from 'jose'
3
- import type { Configuration } from './Configuration.js'
4
- import type { Fetch } from '../types/context.js'
3
+ import type { Configuration } from './Configuration.ts'
4
+ import type { Fetch } from '../types/context.ts'
5
5
 
6
6
  const cache = new Map<string, Configuration>()
7
7
  const resolvers = new WeakMap<Fetch, Map<string, Promise<jose.RemoteJWKSet>>>()
@@ -1,9 +1,9 @@
1
1
  import { load } from './jose.js'
2
- import { createRemoteJWKSet, discover } from './discovery.js'
3
- import * as errors from './errors.js'
4
- import type { Trust } from '../types/index.js'
5
- import type { Ctx } from './Ctx.js'
6
- import type { Payload } from './Payload.js'
2
+ import { createRemoteJWKSet, discover } from './discovery.ts'
3
+ import * as errors from './errors.ts'
4
+ import type { Trust } from '../types/index.ts'
5
+ import type { Ctx } from './Ctx.ts'
6
+ import type { Payload } from './Payload.ts'
7
7
 
8
8
  export async function exchange(credentials: string, ctx: Ctx): Promise<Payload | Error> {
9
9
  const jose = await load()
@@ -1,5 +1,5 @@
1
- export { decode } from './decode.js'
2
- export { exchange } from './exchange.js'
3
- export { principal } from './principal.js'
4
- export { resolve } from './resolve.js'
5
- export { type Ctx } from './Ctx.js'
1
+ export { decode } from './decode.ts'
2
+ export { exchange } from './exchange.ts'
3
+ export { principal } from './principal.ts'
4
+ export { resolve } from './resolve.ts'
5
+ export { type Ctx } from './Ctx.ts'
@@ -1,4 +1,4 @@
1
- import type { Context, Entity } from '../types/index.js'
1
+ import type { Context, Entity } from '../types/index.ts'
2
2
 
3
3
  /**
4
4
  * The `system` Role is granted where the credentials are created, before the reply that mints
@@ -1,8 +1,8 @@
1
- import { decode } from './decode.js'
2
- import { exchange } from './exchange.js'
3
- import type { Ctx } from './Ctx.js'
4
- import type { Payload } from './Payload.js'
5
- import type { Context, Scheme } from '../types/index.js'
1
+ import { decode } from './decode.ts'
2
+ import { exchange } from './exchange.ts'
3
+ import type { Ctx } from './Ctx.ts'
4
+ import type { Payload } from './Payload.ts'
5
+ import type { Context, Scheme } from '../types/index.ts'
6
6
 
7
7
  export async function resolve(
8
8
  scheme: Scheme,
@@ -1,5 +1,5 @@
1
1
  import { quote } from '@toa.io/generic'
2
- import type { Context, Entity } from './types/index.js'
2
+ import type { Context, Entity } from './types/index.ts'
3
3
 
4
4
  export async function computation(
5
5
  { authority, identity }: Input,
@@ -1,8 +1,8 @@
1
1
  import type { JWTPayload } from 'jose'
2
2
  import type { Call, Observation, Query, Transition } from '@toa.io/core/types'
3
3
  import type { Logs } from '@toa.io/extensions.telemetry'
4
- import type { Entity } from './entity.js'
5
- import type { Configuration } from './configuration.js'
4
+ import type { Entity } from './entity.ts'
5
+ import type { Configuration } from './configuration.ts'
6
6
 
7
7
  export interface Context {
8
8
  fetch: Fetch
@@ -1,4 +1,4 @@
1
- export * from './configuration.js'
2
- export * from './context.js'
3
- export * from './entity.js'
4
- export * from './Scheme.js'
1
+ export * from './configuration.ts'
2
+ export * from './context.ts'
3
+ export * from './entity.ts'
4
+ export * from './Scheme.ts'
@@ -1,7 +1,7 @@
1
- import { hold, identify } from './lib/index.js'
1
+ import { hold, identify } from './lib/index.ts'
2
2
  import type { Maybe } from '@toa.io/core/types'
3
3
  import type { Operation } from '@toa.io/bridges.node'
4
- import type { Context } from './lib/index.js'
4
+ import type { Context } from './lib/index.ts'
5
5
 
6
6
  /**
7
7
  * What the consent page calls when a user allows a client. The page holds the user's own
@@ -1,7 +1,7 @@
1
- import { identify, spend, verifies } from './lib/index.js'
1
+ import { identify, spend, verifies } from './lib/index.ts'
2
2
  import type { Maybe } from '@toa.io/core/types'
3
3
  import type { Operation } from '@toa.io/bridges.node'
4
- import type { Code, Context } from './lib/index.js'
4
+ import type { Code, Context } from './lib/index.ts'
5
5
 
6
6
  /**
7
7
  * The token endpoint, RFC 6749 §4.1.3. Anonymous, because the clients this server knows are
@@ -1,5 +1,5 @@
1
1
  import { createHash, randomBytes } from 'node:crypto'
2
- import type { Code, Context } from '../../types/index.js'
2
+ import type { Code, Context } from '../../types/index.d.ts'
3
3
 
4
4
  /**
5
5
  * An authorization code is a bearer credential that lives for seconds. It is held under a
@@ -1,3 +1,3 @@
1
- export * from './code.js'
2
- export * from './identify.js'
3
- export type * from '../../types/index.js'
1
+ export * from './code.ts'
2
+ export * from './identify.ts'
3
+ export type * from '../../types/index.d.ts'
@@ -1,6 +1,6 @@
1
1
  import { quote } from '@toa.io/generic'
2
2
  import type { Operation } from '@toa.io/bridges.node'
3
- import type { Context, Entity } from './lib/index.js'
3
+ import type { Context, Entity } from './lib/index.ts'
4
4
 
5
5
  /** What a user has allowed, for a screen that lets them take it back. */
6
6
  export class Computation implements Operation {
@@ -1,6 +1,6 @@
1
1
  import type { Maybe } from '@toa.io/core/types'
2
2
  import type { Operation } from '@toa.io/bridges.node'
3
- import type { Context, Entity } from './lib/index.js'
3
+ import type { Context, Entity } from './lib/index.ts'
4
4
 
5
5
  /**
6
6
  * Taking back what was allowed. The token itself is not deleted — it is out in the world —
@@ -3,9 +3,10 @@ export * from './toa.d.ts'
3
3
  // What a manifest does not state belongs here, and every run keeps it.
4
4
 
5
5
  import type { Query } from '@toa.io/core/types'
6
+ export type { Query } from '@toa.io/core/types'
6
7
  import type { Logs } from '@toa.io/extensions.telemetry'
7
8
  import type { Stash } from '@toa.io/extensions.stash'
8
- import type { Component, Configuration } from './toa.js'
9
+ import type { Component, Configuration } from './toa.d.ts'
9
10
 
10
11
  /** A client as `identity.clients` describes it. */
11
12
  export interface Client {
@@ -57,5 +58,3 @@ export interface Context {
57
58
  }
58
59
  configuration: Configuration
59
60
  }
60
-
61
- export type { Query }
@@ -1,4 +1,4 @@
1
- import type { Context } from './lib/index.js'
1
+ import type { Context } from './lib/index.ts'
2
2
 
3
3
  export async function effect(input: Input, context: Context): Promise<Output | Error> {
4
4
  const { authority, credentials } = input
@@ -1,5 +1,5 @@
1
1
  import { randomInt } from 'node:crypto'
2
- import type { Context } from './lib/index.js'
2
+ import type { Context } from './lib/index.ts'
3
3
 
4
4
  export async function effect(input: Input, context: Context): Promise<Output> {
5
5
  const { authority, username, identity } = input
@@ -1,7 +1,7 @@
1
1
  import type { Call, Observation } from '@toa.io/core/types'
2
2
  import type { Stash } from '@toa.io/extensions.stash'
3
3
  import type { Logs } from '@toa.io/extensions.telemetry'
4
- import type { Entity } from './Entity.js'
4
+ import type { Entity } from './Entity.ts'
5
5
 
6
6
  export interface Context {
7
7
  stash: Stash
@@ -1 +1 @@
1
- export type { Context } from './Context.js'
1
+ export type { Context } from './Context.ts'
@@ -1,5 +1,5 @@
1
1
  import { quote } from '@toa.io/generic'
2
- import type { Context } from './types/index.js'
2
+ import type { Context } from './types/index.ts'
3
3
  import type { AuthenticationResponseJSON } from '@simplewebauthn/server'
4
4
  import type { Operation } from '@toa.io/bridges.node'
5
5
 
@@ -1,8 +1,8 @@
1
1
  import { randomBytes } from 'node:crypto'
2
2
  import { newid, quote } from '@toa.io/generic'
3
- import { MAX_KEYS } from './lib/const.js'
3
+ import { MAX_KEYS } from './lib/const.ts'
4
4
  import type { Operation } from '@toa.io/bridges.node'
5
- import type { Context } from './types/index.js'
5
+ import type { Context } from './types/index.ts'
6
6
 
7
7
  export class Effect implements Operation {
8
8
  private timeout!: number
@@ -3,7 +3,7 @@ import {
3
3
  type RegistrationResponseJSON
4
4
  } from '@simplewebauthn/server'
5
5
  import type { Operation } from '@toa.io/bridges.node'
6
- import type { Context, Passkey } from './types/index.js'
6
+ import type { Context, Passkey } from './types/index.ts'
7
7
 
8
8
  // https://github.com/MasterKale/SimpleWebAuthn/blob/master/packages/server/src/registration/verifyRegistrationResponse.ts#L51
9
9
 
@@ -1,5 +1,5 @@
1
1
  import { quote } from '@toa.io/generic'
2
- import type { Context } from './types/index.js'
2
+ import type { Context } from './types/index.ts'
3
3
 
4
4
  export async function effect(
5
5
  { authority, identity, id }: Input,
@@ -1,6 +1,6 @@
1
1
  import { quote } from '@toa.io/generic'
2
- import { MAX_KEYS } from './lib/const.js'
3
- import type { Context, Passkey } from './types/index.js'
2
+ import { MAX_KEYS } from './lib/const.ts'
3
+ import type { Context, Passkey } from './types/index.ts'
4
4
 
5
5
  export async function computation(
6
6
  { authority, identity }: Input,
@@ -1,9 +1,9 @@
1
1
  import type { Observation, Transition } from '@toa.io/core/types'
2
2
  import type { Stash } from '@toa.io/extensions.stash'
3
3
  import type { Logs } from '@toa.io/extensions.telemetry'
4
- import type { Configuration } from './Configuration.js'
5
- import type { Passkey } from './Passkey.js'
6
- import type { Input as UseInput, Output as UseOutput } from '../use.js'
4
+ import type { Configuration } from './Configuration.ts'
5
+ import type { Passkey } from './Passkey.ts'
6
+ import type { Input as UseInput, Output as UseOutput } from '../use.ts'
7
7
 
8
8
  export interface Context {
9
9
  configuration: Configuration
@@ -1,2 +1,2 @@
1
- export type { Context } from './Context.js'
2
- export type { Passkey } from './Passkey.js'
1
+ export type { Context } from './Context.ts'
2
+ export type { Passkey } from './Passkey.ts'
@@ -4,7 +4,7 @@ import type {
4
4
  WebAuthnCredential
5
5
  } from '@simplewebauthn/server'
6
6
  import type { Operation } from '@toa.io/bridges.node'
7
- import type { Context, Passkey } from './types/index.js'
7
+ import type { Context, Passkey } from './types/index.ts'
8
8
 
9
9
  export class Transition implements Operation {
10
10
  private stash!: Context['stash']
@@ -5,10 +5,10 @@ entity:
5
5
  properties:
6
6
  grantor:
7
7
  type: string
8
- identity:
8
+ identity: &identity
9
9
  type: string
10
10
  pattern: '[a-z0-9]{32}'
11
- role:
11
+ role: &role
12
12
  type: string
13
13
  pattern: ^[a-zA-Z0-9]{0,32}(:[a-zA-Z0-9]{0,32}){0,8}$
14
14
  required:
@@ -29,12 +29,8 @@ operations:
29
29
  items:
30
30
  type: string
31
31
  type: object
32
- identity:
33
- type: string
34
- default: .
35
- role:
36
- type: string
37
- default: .
32
+ identity: *identity
33
+ role: *role
38
34
  type: object
39
35
  required:
40
36
  - identity
@@ -1,4 +1,4 @@
1
- import type { Entity } from './lib/Entity.js'
1
+ import type { Entity } from './lib/Entity.ts'
2
2
 
3
3
  export async function transition(input: Input, object: Entity): Promise<Entity | Error> {
4
4
  if (input.grantor === undefined) return Object.assign(object, input)
@@ -1,4 +1,4 @@
1
- import type { Entity } from './lib/Entity.js'
1
+ import type { Entity } from './lib/Entity.ts'
2
2
 
3
3
  export function observation(_: unknown, objects: Entity[]): string[] {
4
4
  return objects.map(({ role }) => role)
@@ -1,7 +1,7 @@
1
1
  import { quote } from '@toa.io/generic'
2
- import type { Entity } from './lib/Entity.js'
2
+ import type { Entity } from './lib/Entity.ts'
3
3
  import type { Call, Query } from '@toa.io/core/types'
4
- import type { Input as GrantInput } from './grant.js'
4
+ import type { Input as GrantInput } from './grant.ts'
5
5
 
6
6
  const SYSTEM = 'system'
7
7