@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,8 +1,8 @@
1
- import { type Context } from './Context.js';
2
- import type * as http from '../HTTP/index.js';
3
- import type * as syntax from './syntax/index.js';
4
- import type * as RTD from './index.js';
5
- import type { Introspection, Schema } from '../Introspection.js';
1
+ import { type Context } from './Context.ts';
2
+ import type * as http from '../HTTP/index.ts';
3
+ import type * as syntax from './syntax/index.ts';
4
+ import type * as RTD from './index.ts';
5
+ import type { Introspection, Schema } from '../Introspection.ts';
6
6
  export interface Endpoint {
7
7
  call: (context: http.Context, parameters: RTD.Parameter[]) => Promise<http.OutgoingMessage>;
8
8
  explain: (parameters: RTD.Parameter[]) => Promise<Introspection>;
@@ -1,4 +1,4 @@
1
- import { type Node } from './Node.js';
1
+ import { type Node } from './Node.ts';
2
2
  export interface Match {
3
3
  node: Node;
4
4
  parameters: Parameter[];
@@ -1,8 +1,8 @@
1
- import type { Parameter } from './Match.js';
2
- import type { Endpoint } from './Endpoint.js';
3
- import type { Directives } from './Directives.js';
4
- import type { Context } from '../HTTP/index.js';
5
- import type { Introspection } from '../Introspection.js';
1
+ import type { Parameter } from './Match.ts';
2
+ import type { Endpoint } from './Endpoint.ts';
3
+ import type { Directives } from './Directives.ts';
4
+ import type { Context } from '../HTTP/index.ts';
5
+ import type { Introspection } from '../Introspection.ts';
6
6
  export declare class Method {
7
7
  readonly endpoint: Endpoint | null;
8
8
  readonly directives: Directives;
@@ -1,10 +1,10 @@
1
- import { type Route } from './Route.js';
2
- import { type Method, type Methods } from './Method.js';
3
- import { type Match, type Parameter } from './Match.js';
4
- import type { Segment } from './segment.js';
5
- import type { Context } from '../HTTP/index.js';
6
- import { type Described } from '../directives/help/index.js';
7
- import type { Introspection } from '../Introspection.js';
1
+ import { type Route } from './Route.ts';
2
+ import { type Method, type Methods } from './Method.ts';
3
+ import { type Match, type Parameter } from './Match.ts';
4
+ import type { Segment } from './segment.ts';
5
+ import type { Context } from '../HTTP/index.ts';
6
+ import { type Described } from '../directives/help/index.ts';
7
+ import type { Introspection } from '../Introspection.ts';
8
8
  export declare class Node {
9
9
  intermediate: boolean;
10
10
  forward: string | null;
@@ -1,6 +1,6 @@
1
- import { type Segment } from './segment.js';
2
- import { type Match, type Parameter } from './Match.js';
3
- import type { Mount, Node } from './Node.js';
1
+ import { type Segment } from './segment.ts';
2
+ import { type Match, type Parameter } from './Match.ts';
3
+ import type { Mount, Node } from './Node.ts';
4
4
  export declare class Route {
5
5
  readonly root: boolean;
6
6
  readonly variables: number;
@@ -1,8 +1,8 @@
1
- import type { Mount, Node } from './Node.js';
2
- import type { Match } from './Match.js';
3
- import type { DirectiveFactory } from './Directives.js';
4
- import type { EndpointsFactory } from './Endpoint.js';
5
- import type * as syntax from './syntax/index.js';
1
+ import type { Mount, Node } from './Node.ts';
2
+ import type { Match } from './Match.ts';
3
+ import type { DirectiveFactory } from './Directives.ts';
4
+ import type { EndpointsFactory } from './Endpoint.ts';
5
+ import type * as syntax from './syntax/index.ts';
6
6
  export declare class Tree {
7
7
  private readonly root;
8
8
  private readonly trunk;
@@ -1,5 +1,5 @@
1
- import { Node } from './Node.js';
2
- import type { Context } from './Context.js';
3
- import type * as syntax from './syntax/index.js';
1
+ import { Node } from './Node.ts';
2
+ import type { Context } from './Context.ts';
3
+ import type * as syntax from './syntax/index.ts';
4
4
  export declare function createNode(node: syntax.Node, context: Context): Node;
5
5
  export declare function branchTTL(): number;
@@ -1,8 +1,8 @@
1
- export * from './Tree.js';
2
- export * from './Node.js';
3
- export * from './Match.js';
4
- export * from './Method.js';
5
- export * from './Context.js';
6
- export * from './Endpoint.js';
7
- export * from './Directives.js';
8
- export * as syntax from './syntax/index.js';
1
+ export * from './Tree.ts';
2
+ export * from './Node.ts';
3
+ export * from './Match.ts';
4
+ export * from './Method.ts';
5
+ export * from './Context.ts';
6
+ export * from './Endpoint.ts';
7
+ export * from './Directives.ts';
8
+ export * as syntax from './syntax/index.ts';
@@ -1,4 +1,4 @@
1
- import type { Parameter } from './Match.js';
1
+ import type { Parameter } from './Match.ts';
2
2
  export declare function segment(path: string): Segment[];
3
3
  export declare function fragment(path: string): string[];
4
4
  export type Segment = {
@@ -1,5 +1,5 @@
1
1
  import { Connector, type Remote } from '@toa.io/core';
2
- import { type Host } from './Factory.js';
2
+ import { type Host } from './Factory.ts';
3
3
  export declare class Remotes extends Connector {
4
4
  private readonly host;
5
5
  private readonly cache;
@@ -1,7 +1,7 @@
1
1
  import { Connector } from '@toa.io/core';
2
2
  import type { bindings } from '@toa.io/core/types';
3
- import type { Label } from './discovery.js';
4
- import type { Branch } from './Branch.js';
3
+ import type { Label } from './discovery.ts';
4
+ import type { Branch } from './Branch.ts';
5
5
  export declare class Tenant extends Connector {
6
6
  private readonly broadcast;
7
7
  private readonly branch;
@@ -1,5 +1,5 @@
1
- import { type Directive, type Context } from './types.js';
2
- import type { Introspection } from '../../Introspection.js';
1
+ import { type Directive, type Context } from './types.ts';
2
+ import type { Introspection } from '../../Introspection.ts';
3
3
  export declare class Anonymous implements Directive {
4
4
  private readonly allow;
5
5
  constructor(allow: boolean);
@@ -1,5 +1,5 @@
1
- import { type Directive, type Context } from './types.js';
2
- import type { Introspection } from '../../Introspection.js';
1
+ import { type Directive, type Context } from './types.ts';
2
+ import type { Introspection } from '../../Introspection.ts';
3
3
  export declare class Anyone implements Directive {
4
4
  private readonly allow;
5
5
  constructor(allow: boolean);
@@ -1,4 +1,4 @@
1
- import type { Context, Directive, Identity } from './types.js';
1
+ import type { Context, Directive, Identity } from './types.ts';
2
2
  export declare class Assert implements Directive {
3
3
  private readonly disabled;
4
4
  constructor(enabled: boolean);
@@ -1,10 +1,10 @@
1
- import * as http from '../../HTTP/index.js';
2
- import type { Output } from '../../io.js';
3
- import type { Introspection } from '../../Introspection.js';
4
- import type { Remotes } from '../../Remotes.js';
5
- import type { Parameter, DirectiveFamily } from '../../RTD/index.js';
6
- import type { Host } from '../../Factory.js';
7
- import type { Directive, Extension, Context } from './types.js';
1
+ import * as http from '../../HTTP/index.ts';
2
+ import type { Output } from '../../io.ts';
3
+ import type { Introspection } from '../../Introspection.ts';
4
+ import type { Remotes } from '../../Remotes.ts';
5
+ import type { Parameter, DirectiveFamily } from '../../RTD/index.ts';
6
+ import type { Host } from '../../Factory.ts';
7
+ import type { Directive, Extension, Context } from './types.ts';
8
8
  export declare class Authorization implements DirectiveFamily<Directive, Extension> {
9
9
  readonly depends: string[];
10
10
  readonly name: string;
@@ -1,5 +1,5 @@
1
- import type { Introspection } from '../../Introspection.js';
2
- import type { Context, Directive, Identity } from './types.js';
1
+ import type { Introspection } from '../../Introspection.ts';
2
+ import type { Context, Directive, Identity } from './types.ts';
3
3
  import type { Component } from '@toa.io/core';
4
4
  export declare class Delegate implements Directive {
5
5
  private readonly property;
@@ -1,5 +1,5 @@
1
- import type { OutgoingMessage } from '../../HTTP/index.js';
2
- import type { Directive, Identity, Context } from './types.js';
1
+ import type { OutgoingMessage } from '../../HTTP/index.ts';
2
+ import type { Directive, Identity, Context } from './types.ts';
3
3
  export declare class Echo implements Directive {
4
4
  authorize(identity: Identity | null, context: Context): boolean;
5
5
  /** What `authorize` answers, without inventing the identity it would go on to invent. */
@@ -1,6 +1,6 @@
1
- import type { Directive, Identity, Context } from './types.js';
2
- import type { Introspection } from '../../Introspection.js';
3
- import type { Parameter } from '../../RTD/index.js';
1
+ import type { Directive, Identity, Context } from './types.ts';
2
+ import type { Introspection } from '../../Introspection.ts';
3
+ import type { Parameter } from '../../RTD/index.ts';
4
4
  export declare class Federation implements Directive {
5
5
  private readonly matchers;
6
6
  constructor(options: Options);
@@ -1,6 +1,6 @@
1
- import { type Parameter } from '../../RTD/index.js';
2
- import { type Directive, type Identity } from './types.js';
3
- import type { Introspection } from '../../Introspection.js';
1
+ import { type Parameter } from '../../RTD/index.ts';
2
+ import { type Directive, type Identity } from './types.ts';
3
+ import type { Introspection } from '../../Introspection.ts';
4
4
  export declare class Id implements Directive {
5
5
  private readonly parameter;
6
6
  constructor(parameter: string);
@@ -1,5 +1,5 @@
1
- import * as http from '../../HTTP/index.js';
2
- import type { Directive, Discovery, Identity, Context } from './types.js';
1
+ import * as http from '../../HTTP/index.ts';
2
+ import type { Directive, Discovery, Identity, Context } from './types.ts';
3
3
  export declare class Incept implements Directive {
4
4
  private static readonly components;
5
5
  private static discovery;
@@ -1,5 +1,5 @@
1
- import type { Parameter } from '../../RTD/index.js';
2
- import type { Context, Directive, Identity, Create } from './types.js';
1
+ import type { Parameter } from '../../RTD/index.ts';
2
+ import type { Context, Directive, Identity, Create } from './types.ts';
3
3
  export declare class Input implements Directive {
4
4
  priority: number;
5
5
  private readonly statements;
@@ -1,7 +1,7 @@
1
1
  import { type Component } from '@toa.io/core';
2
- import { type Directive, type Identity } from './types.js';
3
- import type { Parameter } from '../../RTD/index.js';
4
- import type { Introspection } from '../../Introspection.js';
2
+ import { type Directive, type Identity } from './types.ts';
3
+ import type { Parameter } from '../../RTD/index.ts';
4
+ import type { Introspection } from '../../Introspection.ts';
5
5
  export declare class Role implements Directive {
6
6
  static remote: Component | null;
7
7
  private readonly roles;
@@ -1,6 +1,6 @@
1
- import { type Parameter } from '../../RTD/index.js';
2
- import type { Introspection } from '../../Introspection.js';
3
- import type { Context, Directive, Identity, Create } from './types.js';
1
+ import { type Parameter } from '../../RTD/index.ts';
2
+ import type { Introspection } from '../../Introspection.ts';
3
+ import type { Context, Directive, Identity, Create } from './types.ts';
4
4
  export declare class Rule implements Directive {
5
5
  private readonly directives;
6
6
  constructor(directives: Record<string, any>, create: Create);
@@ -1,4 +1,4 @@
1
- import { type Directive, type Identity, type Context } from './types.js';
1
+ import { type Directive, type Identity, type Context } from './types.ts';
2
2
  export declare class Scheme implements Directive {
3
3
  private readonly scheme;
4
4
  private readonly Scheme;
@@ -1,2 +1,2 @@
1
- import type { Identity } from './types.js';
1
+ import type { Identity } from './types.ts';
2
2
  export declare function create(credentials?: string): Identity;
@@ -1,2 +1,2 @@
1
- import { Authorization } from './Authorization.js';
1
+ import { Authorization } from './Authorization.ts';
2
2
  export declare const authorization: Authorization;
@@ -1,4 +1,4 @@
1
- import type { Remote, Scheme } from './types.js';
1
+ import type { Remote, Scheme } from './types.ts';
2
2
  /**
3
3
  * The providers of a scheme, in the order they are asked. More than one claims `Bearer`:
4
4
  * an OpenID `id_token` is federated, and a token this gateway issued is presented that way
@@ -1,2 +1,2 @@
1
- import { type Scheme } from './types.js';
1
+ import { type Scheme } from './types.ts';
2
2
  export declare function split(authorization: string): [Scheme, string];
@@ -1,9 +1,9 @@
1
1
  import { type Component } from '@toa.io/core';
2
2
  import type { Maybe } from '@toa.io/core/types';
3
- import { type Parameter } from '../../RTD/index.js';
4
- import type { Introspection } from '../../Introspection.js';
5
- import type * as http from '../../HTTP/index.js';
6
- import type * as io from '../../io.js';
3
+ import { type Parameter } from '../../RTD/index.ts';
4
+ import type { Introspection } from '../../Introspection.ts';
5
+ import type * as http from '../../HTTP/index.ts';
6
+ import type * as io from '../../io.ts';
7
7
  export interface Directive {
8
8
  priority?: number;
9
9
  authorize: (identity: Identity | null, context: Context, parameters: Parameter[]) => boolean | Promise<boolean>;
@@ -1,7 +1,7 @@
1
- import type { Output } from '../../io.js';
2
- import type { AuthenticatedContext, Directive } from './types.js';
3
- import type { DirectiveFamily } from '../../RTD/index.js';
4
- import type * as http from '../../HTTP/index.js';
1
+ import type { Output } from '../../io.ts';
2
+ import type { AuthenticatedContext, Directive } from './types.ts';
3
+ import type { DirectiveFamily } from '../../RTD/index.ts';
4
+ import type * as http from '../../HTTP/index.ts';
5
5
  export declare class Cache implements DirectiveFamily<Directive> {
6
6
  readonly name: string;
7
7
  readonly mandatory: boolean;
@@ -1,4 +1,4 @@
1
- import type { AuthenticatedContext, Directive } from './types.js';
1
+ import type { AuthenticatedContext, Directive } from './types.ts';
2
2
  export declare class Control implements Directive {
3
3
  protected readonly value: string;
4
4
  private control;
@@ -1,4 +1,4 @@
1
- import { Control } from './Control.js';
1
+ import { Control } from './Control.ts';
2
2
  export declare class Exact extends Control {
3
3
  protected resolve(): string;
4
4
  }
@@ -1,2 +1,2 @@
1
- import { Cache } from './Cache.js';
1
+ import { Cache } from './Cache.ts';
2
2
  export declare const cache: Cache;
@@ -1,4 +1,4 @@
1
- import type { Input } from '../../io.js';
1
+ import type { Input } from '../../io.ts';
2
2
  export interface Directive {
3
3
  set: (input: Input, headers: Headers) => void;
4
4
  }
@@ -0,0 +1,10 @@
1
+ import * as http from '../../HTTP/index.ts';
2
+ import type { Input, Output } from '../../io.ts';
3
+ import type { Interceptor } from '../../Interception.ts';
4
+ export declare class Censor implements Interceptor {
5
+ readonly name = "censor";
6
+ private header;
7
+ private values;
8
+ mount(options: http.Options): void;
9
+ intercept(input: Input): Output;
10
+ }
@@ -0,0 +1,20 @@
1
+ import * as http from '../../HTTP/index.js';
2
+ export class Censor {
3
+ name = 'censor';
4
+ header = null;
5
+ values = new Set();
6
+ mount(options) {
7
+ // header names arrive lower-cased, so one declared in any other case would never match
8
+ this.header = options.censor?.header.toLowerCase() ?? null;
9
+ this.values = new Set(options.censor?.values);
10
+ }
11
+ intercept(input) {
12
+ if (this.header === null)
13
+ return null;
14
+ const value = input.request.headers[this.header];
15
+ if (typeof value === 'string' && this.values.has(value))
16
+ throw new http.UnavailableForLegalReasons();
17
+ return null;
18
+ }
19
+ }
20
+ //# sourceMappingURL=Censor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Censor.js","sourceRoot":"","sources":["../../../source/directives/censor/Censor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,qBAAqB,CAAA;AAI3C,MAAM,OAAO,MAAM;IACD,IAAI,GAAG,QAAQ,CAAA;IAEvB,MAAM,GAAkB,IAAI,CAAA;IAC5B,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;IAE3B,KAAK,CAAC,OAAqB;QAChC,uFAAuF;QACvF,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,IAAI,IAAI,CAAA;QAC1D,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/C,CAAC;IAEM,SAAS,CAAC,KAAY;QAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI;YAAE,OAAO,IAAI,CAAA;QAErC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAEhD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;YACrD,MAAM,IAAI,IAAI,CAAC,0BAA0B,EAAE,CAAA;QAE7C,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ import { Censor } from './Censor.ts';
2
+ export declare const censor: Censor;
@@ -0,0 +1,3 @@
1
+ import { Censor } from './Censor.js';
2
+ export const censor = new Censor();
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/directives/censor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
- import type { Input, Output } from '../../io.js';
2
- import type { Interceptor } from '../../Interception.js';
1
+ import type { Input, Output } from '../../io.ts';
2
+ import type { Interceptor } from '../../Interception.ts';
3
3
  export declare class CORS implements Interceptor {
4
4
  readonly name = "cors";
5
5
  private requestHeaders;
@@ -1,2 +1,2 @@
1
- import { CORS } from './CORS.js';
1
+ import { CORS } from './CORS.ts';
2
2
  export declare const cors: CORS;
@@ -1,6 +1,6 @@
1
- import { type Directive } from './types.js';
2
- import type { Input, Output } from '../../io.js';
3
- import type { DirectiveFamily } from '../../RTD/index.js';
1
+ import { type Directive } from './types.ts';
2
+ import type { Input, Output } from '../../io.ts';
3
+ import type { DirectiveFamily } from '../../RTD/index.ts';
4
4
  export declare class Development implements DirectiveFamily<Directive> {
5
5
  readonly name: string;
6
6
  readonly mandatory: boolean;
@@ -1,5 +1,5 @@
1
- import type { Output } from '../../io.js';
2
- import type { Directive } from './types.js';
1
+ import type { Output } from '../../io.ts';
2
+ import type { Directive } from './types.ts';
3
3
  export declare class Faulty implements Directive {
4
4
  private static readonly warned;
5
5
  private readonly probability;
@@ -1,5 +1,5 @@
1
- import type { Directive } from './types.js';
2
- import type { Input, Output } from '../../io.js';
1
+ import type { Directive } from './types.ts';
2
+ import type { Input, Output } from '../../io.ts';
3
3
  export declare class Sleep implements Directive {
4
4
  private static warned;
5
5
  private readonly maximum;
@@ -1,5 +1,5 @@
1
- import type { Output } from '../../io.js';
2
- import type { Directive } from './types.js';
1
+ import type { Output } from '../../io.ts';
2
+ import type { Directive } from './types.ts';
3
3
  export declare class Stub implements Directive {
4
4
  private readonly value;
5
5
  constructor(value: unknown);
@@ -1,5 +1,5 @@
1
- import type { Output } from '../../io.js';
2
- import type { Directive } from './types.js';
1
+ import type { Output } from '../../io.ts';
2
+ import type { Directive } from './types.ts';
3
3
  export declare class Throw implements Directive {
4
4
  private readonly message;
5
5
  constructor(message: string);
@@ -1,2 +1,2 @@
1
- import { Development } from './Development.js';
1
+ import { Development } from './Development.ts';
2
2
  export declare const dev: Development;
@@ -1,4 +1,4 @@
1
- import type { Input, Output } from '../../io.js';
1
+ import type { Input, Output } from '../../io.ts';
2
2
  export interface Directive {
3
3
  apply: (input: Input) => Promise<Output> | Output;
4
4
  }
@@ -1,5 +1,5 @@
1
- import type { Directive } from './types.js';
2
- import type { Input as Context } from '../../io.js';
1
+ import type { Directive } from './types.ts';
2
+ import type { Input as Context } from '../../io.ts';
3
3
  export declare class Compose implements Directive {
4
4
  private readonly expressions;
5
5
  constructor(composition: any);
@@ -1,8 +1,8 @@
1
- import type { Directive } from './types.js';
2
- import type { Remotes } from '../../Remotes.js';
3
- import type { Output } from '../../io.js';
4
- import type { Input } from '../octets/types.js';
5
- import type { Parameter } from '../../RTD/index.js';
1
+ import type { Directive } from './types.ts';
2
+ import type { Remotes } from '../../Remotes.ts';
3
+ import type { Output } from '../../io.ts';
4
+ import type { Input } from '../octets/types.ts';
5
+ import type { Parameter } from '../../RTD/index.ts';
6
6
  export declare class Fetch implements Directive {
7
7
  private readonly connecting;
8
8
  private remote;
@@ -1,7 +1,7 @@
1
- import type { Directive } from './types.js';
2
- import type { Input, Output } from '../../io.js';
3
- import type { DirectiveFamily, Parameter } from '../../RTD/index.js';
4
- import type { Remotes } from '../../Remotes.js';
1
+ import type { Directive } from './types.ts';
2
+ import type { Input, Output } from '../../io.ts';
3
+ import type { DirectiveFamily, Parameter } from '../../RTD/index.ts';
4
+ import type { Remotes } from '../../Remotes.ts';
5
5
  export declare class Flow implements DirectiveFamily<Directive> {
6
6
  readonly name: string;
7
7
  readonly mandatory: boolean;
@@ -1,2 +1,2 @@
1
- import { Flow } from './Flow.js';
1
+ import { Flow } from './Flow.ts';
2
2
  export declare const flow: Flow;
@@ -1,5 +1,5 @@
1
- import type { Input as Context, Input, Output } from '../../io.js';
2
- import type { Parameter } from '../../RTD/index.js';
1
+ import type { Input as Context, Input, Output } from '../../io.ts';
2
+ import type { Parameter } from '../../RTD/index.ts';
3
3
  export interface Directive {
4
4
  apply?: (input: Input, parameters: Parameter[]) => Promise<Output>;
5
5
  attach?: (context: Context) => void;
@@ -1,9 +1,9 @@
1
- import { Help } from './Help.js';
2
- import { Parameters } from './Parameters.js';
3
- import type { Introspection } from '../../Introspection.js';
4
- import type { Described } from './described.js';
5
- import type { Context } from '../../HTTP/index.js';
6
- import type { DirectiveFamily } from '../../RTD/index.js';
1
+ import { Help } from './Help.ts';
2
+ import { Parameters } from './Parameters.ts';
3
+ import type { Introspection } from '../../Introspection.ts';
4
+ export type { Described } from './described.ts';
5
+ import type { Context } from '../../HTTP/index.ts';
6
+ import type { DirectiveFamily } from '../../RTD/index.ts';
7
7
  /** The name the family is declared under, and what a consumer of one asks a method for. */
8
8
  export declare const FAMILY = "help";
9
9
  export type Directive = Help | Parameters;
@@ -25,4 +25,3 @@ export declare class Family implements DirectiveFamily<Directive> {
25
25
  /** What the route states this method and its parameters are. */
26
26
  explain(directives: Directive[], _: Context, introspection: Introspection): Introspection | null;
27
27
  }
28
- export type { Described };
@@ -1,4 +1,4 @@
1
- import { type Described } from './described.js';
1
+ import { type Described } from './described.ts';
2
2
  /**
3
3
  * What the parameters of a method are, by name: a route variable, or one of the
4
4
  * querystring. Written where the method is, because what a variable means is what the
@@ -1,7 +1,7 @@
1
- import { Family } from './Family.js';
2
- import type { Described } from './described.js';
3
- import type { Directives } from '../../RTD/index.js';
4
- import type { Introspection } from '../../Introspection.js';
1
+ import { Family } from './Family.ts';
2
+ import type { Described } from './described.ts';
3
+ import type { Directives } from '../../RTD/index.ts';
4
+ import type { Introspection } from '../../Introspection.ts';
5
5
  export declare const help: Family;
6
6
  /**
7
7
  * What the resource a method is on says of itself, or nothing where it says nothing. Read
@@ -15,8 +15,8 @@ export declare function resource(directives: Directives): Described | null;
15
15
  * one icon by.
16
16
  */
17
17
  export declare function guarded(methods: Record<string, Introspection>): Described;
18
- export { FAMILY, Family } from './Family.js';
19
- export { Help } from './Help.js';
20
- export { Parameters } from './Parameters.js';
21
- export type { Directive } from './Family.js';
22
- export type { Described } from './described.js';
18
+ export { FAMILY, Family } from './Family.ts';
19
+ export { Help } from './Help.ts';
20
+ export { Parameters } from './Parameters.ts';
21
+ export type { Directive } from './Family.ts';
22
+ export type { Described } from './described.ts';
@@ -1,8 +1,9 @@
1
- import type { DirectiveFamily } from '../RTD/index.js';
2
- import type { Interceptor } from '../Interception.js';
1
+ import type { DirectiveFamily } from '../RTD/index.ts';
2
+ import type { Interceptor } from '../Interception.ts';
3
3
  export declare const families: DirectiveFamily[];
4
4
  /**
5
- * `cors` first, so a preflight is answered before anything reads the request; the page is
6
- * last, and claims its own prefix.
5
+ * `cors` first, so a preflight is answered before anything reads the request; `censor` next,
6
+ * so a refusal carries the CORS headers a page needs to read it; the page is last, and claims
7
+ * its own prefix.
7
8
  */
8
9
  export declare const interceptors: Interceptor[];