@toa.io/extensions.exposition 1.0.0-alpha.285 → 1.0.0-alpha.287
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 +1 -545
- package/components/exposition.octets/operations/delete.js +1 -1
- package/components/exposition.octets/operations/get.js +5 -2
- package/components/exposition.octets/operations/head.js +1 -1
- package/components/exposition.octets/operations/put.js +29 -37
- package/components/exposition.octets/types/toa.d.ts +1 -1
- package/components/identity.bans/manifest.toa.yaml +12 -13
- package/components/identity.bans/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.bans/operations/transit.js +1 -1
- package/components/identity.bans/source/transit.ts +1 -1
- package/components/identity.bans/tsconfig.tsbuildinfo +1 -1
- package/components/identity.bans/types/toa.d.ts +5 -5
- package/components/identity.basic/events/principal.js +3 -1
- package/components/identity.basic/manifest.toa.yaml +17 -23
- package/components/identity.basic/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.basic/migrations/0002-indexes.yaml +13 -0
- package/components/identity.basic/operations/add.js +1 -1
- package/components/identity.basic/operations/authenticate.js +2 -2
- package/components/identity.basic/operations/check.js +4 -2
- package/components/identity.basic/operations/delete.js +1 -1
- package/components/identity.basic/operations/incept.js +1 -1
- package/components/identity.basic/operations/info.js +1 -1
- package/components/identity.basic/operations/lib/credentials.js +1 -1
- package/components/identity.basic/operations/transit.js +7 -8
- package/components/identity.basic/source/add.ts +5 -2
- package/components/identity.basic/source/authenticate.ts +11 -13
- package/components/identity.basic/source/check.ts +9 -6
- package/components/identity.basic/source/delete.ts +4 -1
- package/components/identity.basic/source/incept.ts +13 -10
- package/components/identity.basic/source/info.ts +4 -1
- package/components/identity.basic/source/lib/credentials.ts +2 -3
- package/components/identity.basic/source/transit.ts +27 -21
- package/components/identity.basic/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/types/index.d.ts +7 -3
- package/components/identity.basic/types/toa.d.ts +5 -5
- package/components/identity.clients/manifest.toa.yaml +36 -40
- package/components/identity.clients/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.clients/migrations/0002-indexes.yaml +4 -0
- package/components/identity.clients/operations/describe.js +1 -1
- package/components/identity.clients/operations/lib/canonical.js +1 -1
- package/components/identity.clients/operations/lib/cimd.js +3 -2
- package/components/identity.clients/operations/lib/redirect.js +7 -4
- package/components/identity.clients/operations/register.js +2 -2
- package/components/identity.clients/source/describe.ts +6 -8
- package/components/identity.clients/source/lib/Context.ts +6 -3
- package/components/identity.clients/source/lib/Entity.ts +1 -1
- package/components/identity.clients/source/lib/canonical.ts +1 -1
- package/components/identity.clients/source/lib/cimd.test.ts +8 -6
- package/components/identity.clients/source/lib/cimd.ts +24 -19
- package/components/identity.clients/source/lib/redirect.test.ts +8 -2
- package/components/identity.clients/source/lib/redirect.ts +12 -8
- package/components/identity.clients/source/register.ts +18 -18
- package/components/identity.clients/tsconfig.tsbuildinfo +1 -1
- package/components/identity.clients/types/toa.d.ts +5 -5
- package/components/identity.credentials/manifest.toa.yaml +4 -4
- package/components/identity.credentials/operations/list.js +8 -4
- package/components/identity.credentials/source/list.test.ts +39 -20
- package/components/identity.credentials/source/list.ts +12 -8
- package/components/identity.credentials/tsconfig.tsbuildinfo +1 -1
- package/components/identity.credentials/types/toa.d.ts +2 -2
- package/components/identity.federation/manifest.toa.yaml +23 -32
- package/components/identity.federation/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.federation/migrations/0002-indexes.yaml +25 -0
- package/components/identity.federation/operations/authenticate.js +4 -2
- package/components/identity.federation/operations/create.js +2 -2
- package/components/identity.federation/operations/decode.js +1 -1
- package/components/identity.federation/operations/delete.js +1 -1
- package/components/identity.federation/operations/incept.js +1 -1
- package/components/identity.federation/operations/lib/decode.js +1 -1
- package/components/identity.federation/operations/lib/discovery.js +2 -2
- package/components/identity.federation/operations/lib/exchange.js +8 -4
- package/components/identity.federation/operations/lib/principal.js +1 -1
- package/components/identity.federation/operations/lib/resolve.js +1 -1
- package/components/identity.federation/operations/list.js +2 -2
- package/components/identity.federation/source/authenticate.ts +19 -17
- package/components/identity.federation/source/create.ts +6 -7
- package/components/identity.federation/source/decode.ts +4 -1
- package/components/identity.federation/source/delete.ts +4 -1
- package/components/identity.federation/source/incept.ts +2 -3
- package/components/identity.federation/source/lib/decode.ts +4 -7
- package/components/identity.federation/source/lib/discovery.test.ts +15 -5
- package/components/identity.federation/source/lib/discovery.ts +10 -9
- package/components/identity.federation/source/lib/exchange.ts +18 -15
- package/components/identity.federation/source/lib/jose.d.ts +1 -1
- package/components/identity.federation/source/lib/principal.ts +5 -3
- package/components/identity.federation/source/lib/resolve.ts +5 -1
- package/components/identity.federation/source/list.test.ts +26 -10
- package/components/identity.federation/source/list.ts +5 -2
- package/components/identity.federation/source/types/context.ts +5 -2
- package/components/identity.federation/source/types/entity.ts +2 -2
- package/components/identity.federation/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/types/toa.d.ts +5 -5
- package/components/identity.grants/manifest.toa.yaml +27 -31
- package/components/identity.grants/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.grants/migrations/0002-indexes.yaml +5 -0
- package/components/identity.grants/operations/authorize.js +1 -1
- package/components/identity.grants/operations/exchange.js +5 -2
- package/components/identity.grants/operations/lib/code.js +1 -1
- package/components/identity.grants/operations/lib/identify.js +1 -1
- package/components/identity.grants/operations/list.js +1 -1
- package/components/identity.grants/operations/revoke.js +3 -2
- package/components/identity.grants/source/authorize.ts +27 -19
- package/components/identity.grants/source/exchange.ts +15 -11
- package/components/identity.grants/source/lib/code.ts +20 -8
- package/components/identity.grants/source/lib/identify.ts +1 -1
- package/components/identity.grants/source/list.ts +2 -2
- package/components/identity.grants/source/revoke.ts +9 -7
- package/components/identity.grants/tsconfig.tsbuildinfo +1 -1
- package/components/identity.grants/types/index.d.ts +3 -3
- package/components/identity.grants/types/toa.d.ts +5 -5
- package/components/identity.keys/manifest.toa.yaml +18 -23
- package/components/identity.keys/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.keys/migrations/0002-indexes.yaml +4 -0
- package/components/identity.keys/operations/create.js +1 -1
- package/components/identity.keys/operations/disable.js +1 -1
- package/components/identity.keys/operations/revoke.js +1 -1
- package/components/identity.keys/source/create.ts +2 -3
- package/components/identity.keys/source/disable.ts +1 -1
- package/components/identity.keys/source/revoke.ts +2 -2
- package/components/identity.keys/tsconfig.tsbuildinfo +1 -1
- package/components/identity.keys/types/toa.d.ts +5 -5
- package/components/identity.otp/manifest.toa.yaml +16 -24
- package/components/identity.otp/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.otp/migrations/0002-indexes.yaml +5 -0
- package/components/identity.otp/operations/authenticate.js +1 -1
- package/components/identity.otp/operations/issue.js +1 -1
- package/components/identity.otp/source/authenticate.ts +4 -7
- package/components/identity.otp/source/issue.ts +1 -1
- package/components/identity.otp/source/lib/Context.ts +1 -1
- package/components/identity.otp/tsconfig.tsbuildinfo +1 -1
- package/components/identity.otp/types/toa.d.ts +5 -5
- package/components/identity.passkeys/manifest.toa.yaml +45 -53
- package/components/identity.passkeys/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.passkeys/migrations/0002-indexes.yaml +11 -0
- package/components/identity.passkeys/operations/authenticate.js +1 -1
- package/components/identity.passkeys/operations/challenge.js +6 -3
- package/components/identity.passkeys/operations/create.js +1 -1
- package/components/identity.passkeys/operations/delete.js +1 -1
- package/components/identity.passkeys/operations/list.js +1 -1
- package/components/identity.passkeys/operations/use.js +1 -1
- package/components/identity.passkeys/source/authenticate.ts +3 -4
- package/components/identity.passkeys/source/challenge.ts +29 -25
- package/components/identity.passkeys/source/create.ts +8 -6
- package/components/identity.passkeys/source/delete.ts +4 -1
- package/components/identity.passkeys/source/list.ts +4 -1
- package/components/identity.passkeys/source/types/Context.ts +1 -1
- package/components/identity.passkeys/source/use.ts +12 -10
- package/components/identity.passkeys/tsconfig.tsbuildinfo +1 -1
- package/components/identity.passkeys/types/toa.d.ts +5 -5
- package/components/identity.roles/manifest.toa.yaml +12 -16
- package/components/identity.roles/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.roles/migrations/0002-indexes.yaml +8 -0
- package/components/identity.roles/operations/grant.js +1 -1
- package/components/identity.roles/operations/list.js +1 -1
- package/components/identity.roles/operations/principal.js +2 -2
- package/components/identity.roles/source/grant.ts +7 -6
- package/components/identity.roles/source/list.ts +1 -1
- package/components/identity.roles/source/principal.ts +5 -7
- package/components/identity.roles/tsconfig.tsbuildinfo +1 -1
- package/components/identity.roles/types/toa.d.ts +5 -5
- package/components/identity.tokens/manifest.toa.yaml +17 -15
- package/components/identity.tokens/migrations/0001-system-properties.yaml +14 -0
- package/components/identity.tokens/operations/authenticate.js +2 -2
- package/components/identity.tokens/operations/decrypt.js +11 -5
- package/components/identity.tokens/operations/encrypt.js +2 -2
- package/components/identity.tokens/operations/issue.js +2 -4
- package/components/identity.tokens/operations/lib/form.js +1 -1
- package/components/identity.tokens/operations/lib/key.js +1 -1
- package/components/identity.tokens/operations/revoke.js +1 -1
- package/components/identity.tokens/source/authenticate.test.ts +22 -16
- package/components/identity.tokens/source/authenticate.ts +7 -10
- package/components/identity.tokens/source/decrypt.test.ts +62 -29
- package/components/identity.tokens/source/decrypt.ts +30 -27
- package/components/identity.tokens/source/encrypt.test.ts +21 -16
- package/components/identity.tokens/source/encrypt.ts +8 -11
- package/components/identity.tokens/source/issue.test.ts +4 -2
- package/components/identity.tokens/source/issue.ts +6 -8
- package/components/identity.tokens/source/lib/form.ts +5 -9
- package/components/identity.tokens/source/lib/jose.d.ts +1 -1
- package/components/identity.tokens/source/lib/key.ts +1 -1
- package/components/identity.tokens/source/lib/paseto.test.ts +17 -6
- package/components/identity.tokens/source/revoke.ts +1 -1
- package/components/identity.tokens/tsconfig.tsbuildinfo +1 -1
- package/components/identity.tokens/types/index.d.ts +13 -4
- package/components/identity.tokens/types/toa.d.ts +5 -5
- package/context.toa.yaml +2 -2
- package/cucumber.mjs +3 -0
- package/documentation/access.md +4 -3
- package/documentation/cache.md +17 -3
- package/documentation/components.md +2 -2
- package/documentation/credentials.md +2 -2
- package/documentation/identity.md +7 -9
- package/documentation/map.md +2 -2
- package/documentation/mcp.md +16 -16
- package/documentation/notes/peers.md +1 -1
- package/documentation/notes/throttling.md +1 -1
- package/documentation/octets.md +4 -4
- package/documentation/protocol.md +3 -3
- package/documentation/query.md +14 -8
- package/documentation/rpc.md +31 -21
- package/documentation/tracing.md +3 -3
- package/documentation/tree.md +1 -1
- package/features/auth.assert.feature +2 -2
- package/features/auth.bearer.feature +1 -1
- package/features/auth.claims.feature +5 -5
- package/features/auth.incept.feature +2 -2
- package/features/authorities.federation.feature +1 -1
- package/features/configuration.feature +3 -4
- package/features/credentials.feature +9 -9
- package/features/dev.feature +1 -0
- package/features/dynamic.feature +1 -0
- package/features/errors.feature +21 -0
- package/features/etag.feature +0 -86
- package/features/identity.bans.feature +3 -3
- package/features/identity.basic.feature +9 -9
- package/features/identity.federation.feature +11 -11
- package/features/identity.tokens.custom.feature +5 -5
- package/features/identity.tokens.feature +2 -2
- package/features/interruptions.feature +1 -0
- package/features/introspection.map.feature +4 -4
- package/features/io.throttle.feature +1 -0
- package/features/map.feature +2 -2
- package/features/octets.cloudinary.feature +1 -1
- package/features/octets.download.feature +1 -0
- package/features/require.feature +1 -2
- package/features/steps/Captures.ts +1 -1
- package/features/steps/Cloudinary.ts +1 -2
- package/features/steps/Common.ts +4 -5
- package/features/steps/Components.ts +17 -12
- package/features/steps/Database.ts +42 -23
- package/features/steps/Gateway.ts +55 -72
- package/features/steps/HTTP.ts +12 -15
- package/features/steps/IDP.ts +118 -94
- package/features/steps/Identity.ts +3 -3
- package/features/steps/OTP.ts +3 -3
- package/features/steps/Parameters.ts +20 -10
- package/features/steps/Probe.ts +9 -7
- package/features/steps/Realtime.ts +40 -22
- package/features/steps/Workspace.ts +10 -7
- package/features/steps/components/audit/operations/record.js +1 -1
- package/features/steps/components/echo/operations/affect.js +1 -1
- package/features/steps/components/echo/operations/compute.js +1 -1
- package/features/steps/components/echo/operations/echo.js +1 -1
- package/features/steps/components/echo/operations/error.js +1 -1
- package/features/steps/components/echo/operations/identity.js +1 -1
- package/features/steps/components/echo/operations/parameters.js +1 -1
- package/features/steps/components/echo/operations/ping.js +1 -1
- package/features/steps/components/echo/operations/unwrap.js +1 -1
- package/features/steps/components/greeter/operations/greet.js +1 -1
- package/features/steps/components/notify/operations/send.js +1 -1
- package/features/steps/components/octets.tester/operations/authority.js +1 -1
- package/features/steps/components/octets.tester/operations/bar.js +1 -1
- package/features/steps/components/octets.tester/operations/baz.js +1 -1
- package/features/steps/components/octets.tester/operations/concat.js +1 -1
- package/features/steps/components/octets.tester/operations/echo.js +1 -1
- package/features/steps/components/octets.tester/operations/err.js +1 -1
- package/features/steps/components/octets.tester/operations/foo.js +1 -1
- package/features/steps/components/octets.tester/operations/id.js +1 -1
- package/features/steps/components/octets.tester/operations/identity.js +1 -1
- package/features/steps/components/octets.tester/operations/redirect.js +6 -4
- package/features/steps/components/octets.tester/operations/yex.js +1 -1
- package/features/steps/components/octets.tester/operations/yield.js +1 -1
- package/features/steps/components/orders/manifest.toa.yaml +10 -12
- package/features/steps/components/orders/operations/create.js +4 -2
- package/features/steps/components/pots/manifest.toa.yaml +15 -20
- package/features/steps/components/pots/migrations/0002-indexes.yaml +4 -0
- package/features/steps/components/pricing/operations/quote.js +1 -1
- package/features/steps/components/sequences/manifest.toa.yaml +0 -1
- package/features/steps/components/sequences/operations/numbers.js +1 -1
- package/features/steps/components/sequences/operations/tokens.js +3 -3
- package/features/steps/components/users/manifest.toa.yaml +3 -5
- package/features/steps/components/users/operations/create.js +1 -1
- package/features/steps/components/users.properties/manifest.toa.yaml +5 -6
- package/features/steps/map.ts +2 -2
- package/features/timestamps.feature +1 -1
- package/package.json +7 -7
- package/readme.md +11 -11
- package/schemas/annotation.cos.yaml +1 -3
- package/schemas/method.cos.yaml +2 -0
- package/source/Branch.test.ts +2 -2
- package/source/Branch.ts +3 -5
- package/source/Composition.ts +5 -5
- package/source/Directive.test.ts +38 -20
- package/source/Directive.ts +61 -47
- package/source/Endpoint.test.ts +1 -1
- package/source/Endpoint.ts +27 -92
- package/source/Factory.ts +26 -12
- package/source/Gateway.ts +87 -76
- package/source/HTTP/Context.ts +23 -30
- package/source/HTTP/Probe.ts +7 -9
- package/source/HTTP/Server.ts +88 -69
- package/source/HTTP/Timing.ts +6 -21
- package/source/HTTP/address.test.ts +8 -2
- package/source/HTTP/address.ts +2 -3
- package/source/HTTP/exceptions.ts +20 -18
- package/source/HTTP/formats/form.ts +1 -1
- package/source/HTTP/formats/json.ts +2 -2
- package/source/HTTP/formats/msgpack.ts +3 -4
- package/source/HTTP/formats/text.ts +2 -2
- package/source/HTTP/formats/yaml.test.ts +4 -1
- package/source/HTTP/formats/yaml.ts +14 -11
- package/source/HTTP/messages.test.ts +38 -28
- package/source/HTTP/messages.ts +44 -98
- package/source/Interception.ts +3 -4
- package/source/Introspection.ts +26 -14
- package/source/MCP/Server.ts +114 -54
- package/source/MCP/discover.ts +6 -7
- package/source/MCP/errors.ts +7 -8
- package/source/MCP/schema.test.ts +9 -3
- package/source/MCP/schema.ts +12 -16
- package/source/MCP/tools.ts +33 -28
- package/source/Mapping.ts +25 -27
- package/source/Query.ts +58 -44
- package/source/RPC/Context.ts +8 -11
- package/source/RPC/Dispatcher.ts +46 -26
- package/source/RPC/errors.test.ts +41 -16
- package/source/RPC/errors.ts +9 -10
- package/source/RPC/names.test.ts +35 -16
- package/source/RPC/names.ts +22 -29
- package/source/RTD/Directives.ts +21 -10
- package/source/RTD/Endpoint.ts +4 -1
- package/source/RTD/Method.ts +8 -6
- package/source/RTD/Node.ts +32 -34
- package/source/RTD/Route.ts +18 -21
- package/source/RTD/Tree.ts +18 -18
- package/source/RTD/factory.ts +13 -16
- package/source/RTD/segment.ts +12 -10
- package/source/RTD/syntax/parse.test.ts +12 -6
- package/source/RTD/syntax/parse.ts +30 -26
- package/source/RTD/syntax/types.ts +17 -1
- package/source/RTD/walk.test.ts +59 -22
- package/source/Remotes.test.ts +25 -4
- package/source/Remotes.ts +9 -4
- package/source/Tenant.ts +12 -12
- package/source/deployment.ts +20 -20
- package/source/directives/auth/Anonymous.test.ts +8 -2
- package/source/directives/auth/Anonymous.ts +5 -8
- package/source/directives/auth/Anyone.ts +3 -3
- package/source/directives/auth/Assert.ts +10 -10
- package/source/directives/auth/Authorization.ts +83 -69
- package/source/directives/auth/Delegate.test.ts +2 -2
- package/source/directives/auth/Delegate.ts +8 -10
- package/source/directives/auth/Echo.ts +5 -8
- package/source/directives/auth/Federation.ts +30 -21
- package/source/directives/auth/Id.ts +7 -4
- package/source/directives/auth/Incept.ts +32 -26
- package/source/directives/auth/Input.ts +36 -20
- package/source/directives/auth/Role.test.ts +49 -23
- package/source/directives/auth/Role.ts +29 -22
- package/source/directives/auth/Rule.ts +13 -8
- package/source/directives/auth/Scheme.ts +7 -7
- package/source/directives/auth/create.ts +1 -1
- package/source/directives/auth/schemes.ts +1 -1
- package/source/directives/auth/split.ts +2 -3
- package/source/directives/auth/types.ts +5 -2
- package/source/directives/cache/Cache.ts +44 -9
- package/source/directives/cache/Control.ts +25 -26
- package/source/directives/cache/Exact.ts +1 -1
- package/source/directives/cache/etag.ts +38 -0
- package/source/directives/cors/CORS.ts +9 -7
- package/source/directives/dev/Development.ts +3 -4
- package/source/directives/dev/Faulty.ts +11 -6
- package/source/directives/dev/Sleep.ts +5 -7
- package/source/directives/dev/Stub.ts +2 -2
- package/source/directives/dev/Throw.ts +2 -2
- package/source/directives/flow/Compose.ts +26 -20
- package/source/directives/flow/Fetch.ts +15 -15
- package/source/directives/flow/Flow.ts +9 -8
- package/source/directives/index.ts +11 -2
- package/source/directives/io/IO.ts +29 -20
- package/source/directives/io/Input.ts +9 -12
- package/source/directives/io/Output.ts +20 -23
- package/source/directives/io/Status.test.ts +12 -8
- package/source/directives/io/Status.ts +9 -8
- package/source/directives/io/Throttle.ts +6 -7
- package/source/directives/io/lib/throttle/Configuration.test.ts +32 -23
- package/source/directives/io/lib/throttle/Configuration.ts +14 -9
- package/source/directives/io/lib/throttle/Keys.ts +15 -10
- package/source/directives/io/lib/throttle/Quotas.test.ts +33 -17
- package/source/directives/io/lib/throttle/Quotas.ts +20 -26
- package/source/directives/io/lib/throttle/Sync.test.ts +14 -10
- package/source/directives/io/lib/throttle/Sync.ts +9 -12
- package/source/directives/io/lib/throttle/Warning.ts +3 -4
- package/source/directives/io/lib/throttle/components/IP.ts +4 -5
- package/source/directives/io/lib/throttle/components/Identity.ts +1 -1
- package/source/directives/io/lib/throttle/components/Path.ts +1 -1
- package/source/directives/io/lib/throttle/components/Route.ts +2 -2
- package/source/directives/io/lib/throttle/components/Segment.ts +2 -2
- package/source/directives/io/lib/throttle/conditions/Status.ts +2 -2
- package/source/directives/io/schemas.test.ts +12 -6
- package/source/directives/map/Authority.ts +2 -2
- package/source/directives/map/Buffer.ts +2 -2
- package/source/directives/map/Claims.ts +25 -20
- package/source/directives/map/Headers.ts +17 -13
- package/source/directives/map/Language.ts +8 -5
- package/source/directives/map/Languages.ts +9 -3
- package/source/directives/map/Map.ts +25 -12
- package/source/directives/map/Mapping.ts +9 -6
- package/source/directives/map/Properties.ts +1 -1
- package/source/directives/map/Segments.ts +22 -15
- package/source/directives/mcp/MCP.ts +9 -7
- package/source/directives/mcp/Tool.test.ts +21 -9
- package/source/directives/mcp/Tool.ts +23 -11
- package/source/directives/oauth/Discovery.ts +7 -11
- package/source/directives/oauth/documents.ts +11 -14
- package/source/directives/octets/Context.ts +6 -3
- package/source/directives/octets/Delete.ts +33 -25
- package/source/directives/octets/Directive.ts +5 -1
- package/source/directives/octets/Get.ts +13 -21
- package/source/directives/octets/Octets.ts +20 -15
- package/source/directives/octets/Put.ts +62 -27
- package/source/directives/octets/Workflow.ts +18 -12
- package/source/directives/octets/bytes.ts +1 -1
- package/source/directives/octets/schemas.test.ts +8 -14
- package/source/directives/octets/workflows/Execution.ts +19 -21
- package/source/directives/octets/workflows/Workflow.ts +10 -7
- package/source/directives/require/Headers.ts +3 -4
- package/source/directives/require/Require.ts +3 -4
- package/source/exceptions.ts +19 -12
- package/source/index.ts +1 -1
- package/source/manifest.test.ts +4 -1
- package/source/manifest.ts +19 -13
- package/source/octets.d.ts +1 -1
- package/source/root.ts +3 -2
- package/source/schemas.test.ts +17 -3
- package/transpiled/Branch.js.map +1 -1
- package/transpiled/Composition.js.map +1 -1
- package/transpiled/Directive.js +6 -2
- package/transpiled/Directive.js.map +1 -1
- package/transpiled/Endpoint.d.ts +0 -2
- package/transpiled/Endpoint.js +11 -52
- package/transpiled/Endpoint.js.map +1 -1
- package/transpiled/Factory.d.ts +2 -1
- package/transpiled/Factory.js +1 -0
- package/transpiled/Factory.js.map +1 -1
- package/transpiled/Gateway.d.ts +2 -1
- package/transpiled/Gateway.js +24 -15
- package/transpiled/Gateway.js.map +1 -1
- package/transpiled/HTTP/Context.d.ts +0 -3
- package/transpiled/HTTP/Context.js +7 -9
- package/transpiled/HTTP/Context.js.map +1 -1
- package/transpiled/HTTP/Probe.js.map +1 -1
- package/transpiled/HTTP/Server.js +19 -4
- package/transpiled/HTTP/Server.js.map +1 -1
- package/transpiled/HTTP/Timing.d.ts +1 -2
- package/transpiled/HTTP/Timing.js +2 -10
- package/transpiled/HTTP/Timing.js.map +1 -1
- package/transpiled/HTTP/address.js.map +1 -1
- package/transpiled/HTTP/exceptions.js.map +1 -1
- package/transpiled/HTTP/formats/form.js.map +1 -1
- package/transpiled/HTTP/formats/json.js.map +1 -1
- package/transpiled/HTTP/formats/msgpack.js.map +1 -1
- package/transpiled/HTTP/formats/text.js.map +1 -1
- package/transpiled/HTTP/formats/yaml.js +4 -1
- package/transpiled/HTTP/formats/yaml.js.map +1 -1
- package/transpiled/HTTP/messages.d.ts +3 -2
- package/transpiled/HTTP/messages.js +1 -43
- package/transpiled/HTTP/messages.js.map +1 -1
- package/transpiled/Interception.js.map +1 -1
- package/transpiled/Introspection.js +13 -2
- package/transpiled/Introspection.js.map +1 -1
- package/transpiled/MCP/Server.js +15 -4
- package/transpiled/MCP/Server.js.map +1 -1
- package/transpiled/MCP/discover.js.map +1 -1
- package/transpiled/MCP/errors.js.map +1 -1
- package/transpiled/MCP/schema.js +1 -1
- package/transpiled/MCP/schema.js.map +1 -1
- package/transpiled/MCP/tools.js +10 -7
- package/transpiled/MCP/tools.js.map +1 -1
- package/transpiled/Mapping.d.ts +2 -2
- package/transpiled/Mapping.js +3 -5
- package/transpiled/Mapping.js.map +1 -1
- package/transpiled/Query.d.ts +6 -2
- package/transpiled/Query.js +23 -8
- package/transpiled/Query.js.map +1 -1
- package/transpiled/RPC/Context.js +0 -7
- package/transpiled/RPC/Context.js.map +1 -1
- package/transpiled/RPC/Dispatcher.js +4 -1
- package/transpiled/RPC/Dispatcher.js.map +1 -1
- package/transpiled/RPC/errors.js.map +1 -1
- package/transpiled/RPC/names.js.map +1 -1
- package/transpiled/RTD/Directives.d.ts +1 -1
- package/transpiled/RTD/Method.js +1 -3
- package/transpiled/RTD/Method.js.map +1 -1
- package/transpiled/RTD/Node.js +5 -4
- package/transpiled/RTD/Node.js.map +1 -1
- package/transpiled/RTD/Route.js +4 -1
- package/transpiled/RTD/Route.js.map +1 -1
- package/transpiled/RTD/Tree.js +1 -1
- package/transpiled/RTD/Tree.js.map +1 -1
- package/transpiled/RTD/factory.js.map +1 -1
- package/transpiled/RTD/segment.js.map +1 -1
- package/transpiled/RTD/syntax/parse.js.map +1 -1
- package/transpiled/RTD/syntax/types.d.ts +6 -0
- package/transpiled/RTD/syntax/types.js +10 -1
- package/transpiled/RTD/syntax/types.js.map +1 -1
- package/transpiled/Remotes.js.map +1 -1
- package/transpiled/Tenant.d.ts +1 -1
- package/transpiled/Tenant.js.map +1 -1
- package/transpiled/deployment.d.ts +3 -0
- package/transpiled/deployment.js +6 -1
- package/transpiled/deployment.js.map +1 -1
- package/transpiled/directives/auth/Anonymous.js +1 -3
- package/transpiled/directives/auth/Anonymous.js.map +1 -1
- package/transpiled/directives/auth/Anyone.js.map +1 -1
- package/transpiled/directives/auth/Assert.js.map +1 -1
- package/transpiled/directives/auth/Authorization.js +7 -3
- package/transpiled/directives/auth/Authorization.js.map +1 -1
- package/transpiled/directives/auth/Delegate.js.map +1 -1
- package/transpiled/directives/auth/Echo.js +1 -3
- package/transpiled/directives/auth/Echo.js.map +1 -1
- package/transpiled/directives/auth/Federation.js +3 -7
- package/transpiled/directives/auth/Federation.js.map +1 -1
- package/transpiled/directives/auth/Id.js.map +1 -1
- package/transpiled/directives/auth/Incept.js +1 -1
- package/transpiled/directives/auth/Incept.js.map +1 -1
- package/transpiled/directives/auth/Input.js.map +1 -1
- package/transpiled/directives/auth/Role.js.map +1 -1
- package/transpiled/directives/auth/Rule.js.map +1 -1
- package/transpiled/directives/auth/Scheme.js +1 -2
- package/transpiled/directives/auth/Scheme.js.map +1 -1
- package/transpiled/directives/auth/create.js.map +1 -1
- package/transpiled/directives/auth/schemes.js.map +1 -1
- package/transpiled/directives/auth/split.js.map +1 -1
- package/transpiled/directives/auth/types.d.ts +3 -1
- package/transpiled/directives/cache/Cache.js +28 -2
- package/transpiled/directives/cache/Cache.js.map +1 -1
- package/transpiled/directives/cache/Control.js +1 -1
- package/transpiled/directives/cache/Control.js.map +1 -1
- package/transpiled/directives/cache/etag.d.ts +10 -0
- package/transpiled/directives/cache/etag.js +30 -0
- package/transpiled/directives/cache/etag.js.map +1 -0
- package/transpiled/directives/cors/CORS.js.map +1 -1
- package/transpiled/directives/dev/Development.js.map +1 -1
- package/transpiled/directives/dev/Faulty.js.map +1 -1
- package/transpiled/directives/dev/Sleep.js.map +1 -1
- package/transpiled/directives/dev/Stub.js.map +1 -1
- package/transpiled/directives/dev/Throw.js.map +1 -1
- package/transpiled/directives/flow/Compose.js +7 -3
- package/transpiled/directives/flow/Compose.js.map +1 -1
- package/transpiled/directives/flow/Fetch.js.map +1 -1
- package/transpiled/directives/flow/Flow.js.map +1 -1
- package/transpiled/directives/index.js +11 -1
- package/transpiled/directives/index.js.map +1 -1
- package/transpiled/directives/io/IO.d.ts +1 -1
- package/transpiled/directives/io/IO.js.map +1 -1
- package/transpiled/directives/io/Input.js +1 -1
- package/transpiled/directives/io/Input.js.map +1 -1
- package/transpiled/directives/io/Output.js +3 -3
- package/transpiled/directives/io/Output.js.map +1 -1
- package/transpiled/directives/io/Status.js.map +1 -1
- package/transpiled/directives/io/Throttle.js +1 -1
- package/transpiled/directives/io/Throttle.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Configuration.js +8 -2
- package/transpiled/directives/io/lib/throttle/Configuration.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Keys.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Quotas.js +4 -3
- package/transpiled/directives/io/lib/throttle/Quotas.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Sync.d.ts +1 -1
- package/transpiled/directives/io/lib/throttle/Sync.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Warning.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/components/IP.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/components/Identity.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/components/Path.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/components/Route.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/components/Segment.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/conditions/Status.js.map +1 -1
- package/transpiled/directives/map/Authority.js.map +1 -1
- package/transpiled/directives/map/Buffer.js.map +1 -1
- package/transpiled/directives/map/Claims.js.map +1 -1
- package/transpiled/directives/map/Headers.js.map +1 -1
- package/transpiled/directives/map/Language.js.map +1 -1
- package/transpiled/directives/map/Languages.js.map +1 -1
- package/transpiled/directives/map/Map.js.map +1 -1
- package/transpiled/directives/map/Mapping.js.map +1 -1
- package/transpiled/directives/map/Properties.js.map +1 -1
- package/transpiled/directives/map/Segments.js.map +1 -1
- package/transpiled/directives/mcp/MCP.js +1 -1
- package/transpiled/directives/mcp/MCP.js.map +1 -1
- package/transpiled/directives/mcp/Tool.js +3 -1
- package/transpiled/directives/mcp/Tool.js.map +1 -1
- package/transpiled/directives/oauth/Discovery.js.map +1 -1
- package/transpiled/directives/oauth/documents.js.map +1 -1
- package/transpiled/directives/octets/Context.js +1 -1
- package/transpiled/directives/octets/Context.js.map +1 -1
- package/transpiled/directives/octets/Delete.js.map +1 -1
- package/transpiled/directives/octets/Directive.js.map +1 -1
- package/transpiled/directives/octets/Get.js.map +1 -1
- package/transpiled/directives/octets/Octets.js +1 -1
- package/transpiled/directives/octets/Octets.js.map +1 -1
- package/transpiled/directives/octets/Put.js.map +1 -1
- package/transpiled/directives/octets/Workflow.js.map +1 -1
- package/transpiled/directives/octets/bytes.js.map +1 -1
- package/transpiled/directives/octets/workflows/Execution.js +1 -2
- package/transpiled/directives/octets/workflows/Execution.js.map +1 -1
- package/transpiled/directives/octets/workflows/Workflow.js.map +1 -1
- package/transpiled/directives/require/Headers.js.map +1 -1
- package/transpiled/directives/require/Require.js.map +1 -1
- package/transpiled/exceptions.js.map +1 -1
- package/transpiled/index.d.ts +1 -1
- package/transpiled/index.js +1 -1
- package/transpiled/index.js.map +1 -1
- package/transpiled/manifest.js +5 -1
- package/transpiled/manifest.js.map +1 -1
- package/transpiled/root.js.map +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/source/redact.test.ts +0 -27
- package/source/redact.ts +0 -21
- package/transpiled/redact.d.ts +0 -5
- package/transpiled/redact.js +0 -17
- package/transpiled/redact.js.map +0 -1
|
@@ -8,15 +8,14 @@ export class Require implements DirectiveFamily {
|
|
|
8
8
|
public readonly name = 'require'
|
|
9
9
|
public readonly mandatory = false
|
|
10
10
|
|
|
11
|
-
public create
|
|
11
|
+
public create(name: string, value: unknown): Directive {
|
|
12
12
|
assert.ok(name in directives, `Unknown directive: require:${name}`)
|
|
13
13
|
|
|
14
14
|
return new directives[name](value)
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
public precall
|
|
18
|
-
for (const instance of instances)
|
|
19
|
-
instance.precall(context)
|
|
17
|
+
public precall(instances: Directive[], context: Input): null {
|
|
18
|
+
for (const instance of instances) instance.precall(context)
|
|
20
19
|
|
|
21
20
|
return null
|
|
22
21
|
}
|
package/source/exceptions.ts
CHANGED
|
@@ -4,26 +4,33 @@ import * as http from './HTTP/index.js'
|
|
|
4
4
|
import { Exception as HTTPException } from './HTTP/index.js'
|
|
5
5
|
import type { Exception } from '@toa.io/core'
|
|
6
6
|
|
|
7
|
-
export function rethrow
|
|
8
|
-
if (exception instanceof HTTPException)
|
|
9
|
-
throw exception
|
|
7
|
+
export function rethrow(exception: Exception | HTTPException): void {
|
|
8
|
+
if (exception instanceof HTTPException) throw exception
|
|
10
9
|
|
|
11
10
|
// see /runtime/core/src/exceptions.js
|
|
12
|
-
throw match(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
CORE_EXCEPTIONS.
|
|
17
|
-
|
|
18
|
-
CORE_EXCEPTIONS.
|
|
11
|
+
throw match(
|
|
12
|
+
exception.code,
|
|
13
|
+
badRequest,
|
|
14
|
+
() => new http.BadRequest(exception.message),
|
|
15
|
+
CORE_EXCEPTIONS.StateNotFound,
|
|
16
|
+
NOT_FOUND,
|
|
17
|
+
CORE_EXCEPTIONS.StatePrecondition,
|
|
18
|
+
PRECONDITION_FAILED,
|
|
19
|
+
CORE_EXCEPTIONS.Duplicate,
|
|
20
|
+
CONFLICT,
|
|
21
|
+
CORE_EXCEPTIONS.StateConcurrency,
|
|
22
|
+
CONFLICT,
|
|
23
|
+
CORE_EXCEPTIONS.EntityGuard,
|
|
24
|
+
CONFLICT,
|
|
19
25
|
() => {
|
|
20
26
|
console.error('Request processing exception', exception)
|
|
21
27
|
|
|
22
28
|
return exception
|
|
23
|
-
}
|
|
29
|
+
}
|
|
30
|
+
)
|
|
24
31
|
}
|
|
25
32
|
|
|
26
|
-
function badRequest
|
|
33
|
+
function badRequest(code: number): boolean {
|
|
27
34
|
return (code >= 200 && code < 210) || code === 221
|
|
28
35
|
}
|
|
29
36
|
|
package/source/index.ts
CHANGED
package/source/manifest.test.ts
CHANGED
|
@@ -38,7 +38,10 @@ it('should not create node for default namespace', async () => {
|
|
|
38
38
|
})
|
|
39
39
|
|
|
40
40
|
it('should throw on invalid declaration type', async () => {
|
|
41
|
-
assert.throws(
|
|
41
|
+
assert.throws(
|
|
42
|
+
() => manifest('hello' as unknown as object, mf),
|
|
43
|
+
(error: any) => /Exposition declaration must be an object/.test(error.message)
|
|
44
|
+
)
|
|
42
45
|
})
|
|
43
46
|
|
|
44
47
|
it('should set namespace and component', async () => {
|
package/source/manifest.ts
CHANGED
|
@@ -4,9 +4,11 @@ import { shortcuts } from './Directive.js'
|
|
|
4
4
|
import * as schemas from './schemas.js'
|
|
5
5
|
import type { Manifest } from '@toa.io/norm'
|
|
6
6
|
|
|
7
|
-
export function manifest
|
|
8
|
-
assert.ok(
|
|
9
|
-
|
|
7
|
+
export function manifest(declaration: object, manifest: Manifest): Node {
|
|
8
|
+
assert.ok(
|
|
9
|
+
typeof declaration === 'object' && declaration !== null,
|
|
10
|
+
'Exposition declaration must be an object'
|
|
11
|
+
)
|
|
10
12
|
|
|
11
13
|
declaration = wrap(declaration, manifest.namespace, manifest.name)
|
|
12
14
|
|
|
@@ -18,32 +20,36 @@ export function manifest (declaration: object, manifest: Manifest): Node {
|
|
|
18
20
|
return node
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
function wrap
|
|
22
|
-
const path =
|
|
23
|
-
'/' +
|
|
23
|
+
function wrap(declaration: object, namespace: string, name: string): object {
|
|
24
|
+
const path =
|
|
25
|
+
(namespace === undefined || namespace === 'default' ? '' : '/' + namespace) +
|
|
26
|
+
'/' +
|
|
27
|
+
name
|
|
24
28
|
|
|
25
29
|
return { [path]: declaration }
|
|
26
30
|
}
|
|
27
31
|
|
|
28
|
-
function specify
|
|
32
|
+
function specify(node: Node, manifest: Manifest): void {
|
|
29
33
|
for (const route of node.routes) {
|
|
30
|
-
for (const method of route.node.methods)
|
|
31
|
-
specifyMethod(method, manifest)
|
|
34
|
+
for (const method of route.node.methods) specifyMethod(method, manifest)
|
|
32
35
|
|
|
33
36
|
specify(route.node, manifest)
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
function specifyMethod
|
|
38
|
-
if (method.mapping?.endpoint === undefined)
|
|
39
|
-
return
|
|
40
|
+
function specifyMethod(method: Method, manifest: Manifest): void {
|
|
41
|
+
if (method.mapping?.endpoint === undefined) return
|
|
40
42
|
|
|
41
43
|
const operation = manifest.operations[method.mapping.endpoint]
|
|
42
44
|
|
|
43
45
|
assert.ok(operation !== undefined, `Operation '${method.mapping.endpoint}' not found`)
|
|
44
46
|
|
|
45
47
|
if (method.mapping.query === undefined)
|
|
46
|
-
method.mapping.query = operation.query === false ? null : {} as unknown as Query
|
|
48
|
+
method.mapping.query = operation.query === false ? null : ({} as unknown as Query)
|
|
49
|
+
|
|
50
|
+
// a page is taken of a collection, and of nothing else: an operation that answers one object
|
|
51
|
+
// takes no `omit` and no `limit`, and refuses a request that carries them
|
|
52
|
+
method.mapping.paged = operation.type === 'observation' && operation.scope === 'objects'
|
|
47
53
|
|
|
48
54
|
method.mapping.namespace = manifest.namespace
|
|
49
55
|
method.mapping.component = manifest.name
|
package/source/octets.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface WorkflowInput<
|
|
2
2
|
TParameters extends Record<string, string> = Record<string, string>,
|
|
3
|
-
TSteps extends Record<string, unknown> = Record<string, unknown
|
|
3
|
+
TSteps extends Record<string, unknown> = Record<string, unknown>
|
|
4
4
|
> {
|
|
5
5
|
authority: string
|
|
6
6
|
identity?: string
|
package/source/root.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { merge } from '@toa.io/generic'
|
|
2
2
|
import { syntax } from './RTD/index.js'
|
|
3
3
|
|
|
4
|
-
export function resolve
|
|
4
|
+
export function resolve(): syntax.Node {
|
|
5
5
|
const value = process.env.TOA_EXPOSITION
|
|
6
|
-
const root =
|
|
6
|
+
const root =
|
|
7
|
+
value !== undefined ? (JSON.parse(value) as syntax.Node) : syntax.createNode()
|
|
7
8
|
|
|
8
9
|
merge(root, PREDEFINED)
|
|
9
10
|
|
package/source/schemas.test.ts
CHANGED
|
@@ -7,11 +7,25 @@ const authorities = { nex: 'nex.toa.io' }
|
|
|
7
7
|
|
|
8
8
|
it('should require ip with bouncer', () => {
|
|
9
9
|
assert.throws(() => schemas.annotation.validate({ authorities, bouncer: {} }))
|
|
10
|
-
assert.doesNotThrow(() =>
|
|
10
|
+
assert.doesNotThrow(() =>
|
|
11
|
+
schemas.annotation.validate({ authorities, bouncer: {}, ip: 'x-real-ip' })
|
|
12
|
+
)
|
|
11
13
|
assert.doesNotThrow(() => schemas.annotation.validate({ authorities, ip: 'x-real-ip' }))
|
|
12
14
|
})
|
|
13
15
|
|
|
14
16
|
it('should default nothing in bouncer', () => {
|
|
15
|
-
assert.doesNotThrow(() =>
|
|
16
|
-
|
|
17
|
+
assert.doesNotThrow(() =>
|
|
18
|
+
schemas.annotation.validate({
|
|
19
|
+
authorities,
|
|
20
|
+
ip: 'x-real-ip',
|
|
21
|
+
bouncer: { attempts: 5 }
|
|
22
|
+
})
|
|
23
|
+
)
|
|
24
|
+
assert.throws(() =>
|
|
25
|
+
schemas.annotation.validate({
|
|
26
|
+
authorities,
|
|
27
|
+
ip: 'x-real-ip',
|
|
28
|
+
bouncer: { attempts: 0 }
|
|
29
|
+
})
|
|
30
|
+
)
|
|
17
31
|
})
|
package/transpiled/Branch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Branch.js","sourceRoot":"","sources":["../source/Branch.ts"],"names":[],"mappings":"AA4BA;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"Branch.js","sourceRoot":"","sources":["../source/Branch.ts"],"names":[],"mappings":"AA4BA;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,CAAC,OAAgB,EAAE,MAAc;IACrD,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM,CAAC,OAAO;QAAE,OAAO,SAAS,CAAA;IAExD,IAAI,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS;QAAE,OAAO,YAAY,CAAA;IAE7D,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Composition.js","sourceRoot":"","sources":["../source/Composition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxC,MAAM,OAAO,WAAY,SAAQ,SAAS;IACvB,IAAI,CAAM;IAE3B,
|
|
1
|
+
{"version":3,"file":"Composition.js","sourceRoot":"","sources":["../source/Composition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGxC,MAAM,OAAO,WAAY,SAAQ,SAAS;IACvB,IAAI,CAAM;IAE3B,YAAmB,IAAU;QAC3B,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAEkB,KAAK,CAAC,IAAI;QAC3B,MAAM,KAAK,GAAG,IAAI,EAAE,CAAA;QACpB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;QAEtD,MAAM,WAAW,CAAC,OAAO,EAAE,CAAA;QAE3B,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAC3B,CAAC;CACF;AAED,SAAS,IAAI;IACX,OAAO,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;AAC5D,CAAC;AAED,SAAS,OAAO;IACd,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IAE1D,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;AACvD,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,MAAM,KAAK,GAAa,EAAE,CAAA;IAE1B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,EAAE,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;QACzC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;IACvC,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AAC1B,CAAC;AAOD,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAA"}
|
package/transpiled/Directive.js
CHANGED
|
@@ -89,13 +89,17 @@ export class DirectivesFactory {
|
|
|
89
89
|
async preflight(context) {
|
|
90
90
|
for (const stage of this.stages)
|
|
91
91
|
if (stage.family.preflight !== undefined)
|
|
92
|
-
await console.span(stage.preflight, async () => {
|
|
92
|
+
await console.span(stage.preflight, async () => {
|
|
93
|
+
await stage.family.preflight(context);
|
|
94
|
+
});
|
|
93
95
|
}
|
|
94
96
|
/** Request-scoped, on the message going back. */
|
|
95
97
|
async depart(context, response) {
|
|
96
98
|
for (const stage of this.stages)
|
|
97
99
|
if (stage.family.depart !== undefined)
|
|
98
|
-
await console.span(stage.depart, async () => {
|
|
100
|
+
await console.span(stage.depart, async () => {
|
|
101
|
+
await stage.family.depart(context, response);
|
|
102
|
+
});
|
|
99
103
|
}
|
|
100
104
|
create(declarations, route = '') {
|
|
101
105
|
const groups = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Directive.js","sourceRoot":"","sources":["../source/Directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAoB,MAAM,UAAU,CAAA;AAQpD,MAAM,OAAO,UAAU;IACJ,IAAI,CAAoB;IAEzC,iFAAiF;IAChE,KAAK,CAAS;IAE/B,
|
|
1
|
+
{"version":3,"file":"Directive.js","sourceRoot":"","sources":["../source/Directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAoB,MAAM,UAAU,CAAA;AAQpD,MAAM,OAAO,UAAU;IACJ,IAAI,CAAoB;IAEzC,iFAAiF;IAChE,KAAK,CAAS;IAE/B,YAAmB,IAAwB;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC9B,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC;YAChC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC;YAC9B,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC;SACjC,CAAC,CAAC,CAAA;IACL,CAAC;IAEM,QAAQ,CAAI,MAAc;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,UAE/C,CAAA;IACf,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,OAAgB,EAAE,UAA2B;QAChE,IAAI,MAAM,GAAG,IAAI,CAAA;QAEjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAA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GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;QACjD,OAAO,CAAC,UAAU,GAAG,EAAE,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA;IAE/E,OAAO,OAAO,CAAA;AAChB,CAAC;AAcD,MAAM,CAAC,MAAM,SAAS,GAAyB,IAAI,GAAG,CAAC;IACrD,CAAC,WAAW,EAAE,gBAAgB,CAAC;IAC/B,CAAC,QAAQ,EAAE,aAAa,CAAC;IACzB,CAAC,IAAI,EAAE,SAAS,CAAC;IACjB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,QAAQ,EAAE,aAAa,CAAC;IACzB,CAAC,OAAO,EAAE,UAAU,CAAC;IACrB,CAAC,QAAQ,EAAE,WAAW,CAAC;IACvB,CAAC,WAAW,EAAE,eAAe,CAAC;CAC/B,CAAC,CAAA"}
|
package/transpiled/Endpoint.d.ts
CHANGED
|
@@ -23,9 +23,7 @@ export declare class Endpoint implements RTD.Endpoint {
|
|
|
23
23
|
*/
|
|
24
24
|
private introspect;
|
|
25
25
|
close(): Promise<void>;
|
|
26
|
-
private conditionalGet;
|
|
27
26
|
private query;
|
|
28
|
-
private matchVersion;
|
|
29
27
|
private version;
|
|
30
28
|
}
|
|
31
29
|
export declare class EndpointsFactory implements RTD.EndpointsFactory {
|
package/transpiled/Endpoint.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
|
-
import { console } from 'openspan';
|
|
3
2
|
import { Mapping } from './Mapping.js';
|
|
4
3
|
import { take } from './Introspection.js';
|
|
5
|
-
import {
|
|
4
|
+
import { parse } from './directives/cache/etag.js';
|
|
6
5
|
import * as http from './HTTP/index.js';
|
|
7
6
|
export class Endpoint {
|
|
8
7
|
endpoint;
|
|
@@ -21,27 +20,18 @@ export class Endpoint {
|
|
|
21
20
|
const query = this.query(context);
|
|
22
21
|
const request = this.mapping.fit(body, query, parameters);
|
|
23
22
|
this.remote ??= await this.discovery;
|
|
24
|
-
const endpoint = this.remote.locator.id + '.' + this.endpoint;
|
|
25
|
-
console.debug('Calling operation', { endpoint, request: redact(request) });
|
|
26
23
|
const reply = await this.remote.invoke(this.endpoint, request);
|
|
27
|
-
console.debug('Received reply', { endpoint, reply: reply instanceof Readable ? '[Readable stream]' : redact(reply) });
|
|
28
24
|
if (reply instanceof Error)
|
|
29
25
|
throw new http.UnprocessableEntity(reply);
|
|
30
|
-
const message = {};
|
|
31
|
-
//
|
|
32
|
-
if (reply !== null && reply
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
const message = { body: reply };
|
|
27
|
+
// what the reply carries for a cache to validate by; the `cache` family sets the headers
|
|
28
|
+
if (typeof reply === 'object' && reply !== null && !(reply instanceof Readable)) {
|
|
29
|
+
if ('VERSION' in reply)
|
|
30
|
+
message.version = reply.VERSION;
|
|
31
|
+
const modified = reply.UPDATED ?? reply.CREATED;
|
|
32
|
+
if (modified !== undefined)
|
|
33
|
+
message.modified = modified;
|
|
36
34
|
}
|
|
37
|
-
// last-modified
|
|
38
|
-
if (typeof reply === 'object' && reply !== null && ('_updated' in reply || '_created' in reply)) {
|
|
39
|
-
const timestamp = reply._updated ?? reply._created;
|
|
40
|
-
const date = new Date(timestamp);
|
|
41
|
-
message.headers ??= new Headers();
|
|
42
|
-
message.headers.set('last-modified', date.toUTCString());
|
|
43
|
-
}
|
|
44
|
-
message.body = reply;
|
|
45
35
|
return message;
|
|
46
36
|
}
|
|
47
37
|
async explain(parameters) {
|
|
@@ -84,30 +74,6 @@ export class Endpoint {
|
|
|
84
74
|
this.remote ??= await this.discovery;
|
|
85
75
|
await this.remote.disconnect(INTERRUPT);
|
|
86
76
|
}
|
|
87
|
-
conditionalGet(reply, etag, message) {
|
|
88
|
-
message.headers ??= new Headers();
|
|
89
|
-
if (typeof reply === 'object' && reply !== null && '_version' in reply) {
|
|
90
|
-
const version = reply._version;
|
|
91
|
-
const matched = etag === undefined ? null : this.matchVersion(etag);
|
|
92
|
-
if (etag !== undefined && matched !== null && version === matched) {
|
|
93
|
-
message.status = 304;
|
|
94
|
-
message.headers.set('etag', etag);
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
message.headers.set('etag', `"${version.toString()}"`);
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
if (reply instanceof Readable)
|
|
101
|
-
return false;
|
|
102
|
-
/*
|
|
103
|
-
* A reply that carries no version is tagged with a hash of its body. The body is
|
|
104
|
-
* serialized anyway when the response is written, so the tag is computed from what
|
|
105
|
-
* is actually sent rather than from a second serialization of the reply — which
|
|
106
|
-
* makes it specific to the negotiated representation, hence `vary: accept`.
|
|
107
|
-
*/
|
|
108
|
-
message.etag = true;
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
77
|
query(context) {
|
|
112
78
|
const query = Object.fromEntries(context.url.searchParams);
|
|
113
79
|
const etag = context.request.headers['if-match'];
|
|
@@ -115,14 +81,8 @@ export class Endpoint {
|
|
|
115
81
|
query.version = this.version(etag);
|
|
116
82
|
return query;
|
|
117
83
|
}
|
|
118
|
-
matchVersion(etag) {
|
|
119
|
-
const match = etag.match(ETAG);
|
|
120
|
-
if (match === null)
|
|
121
|
-
return null;
|
|
122
|
-
return Number.parseInt(match.groups.version);
|
|
123
|
-
}
|
|
124
84
|
version(etag) {
|
|
125
|
-
const version =
|
|
85
|
+
const version = parse(etag);
|
|
126
86
|
if (version === null)
|
|
127
87
|
throw new http.BadRequest('Invalid ETag');
|
|
128
88
|
return version;
|
|
@@ -136,7 +96,7 @@ export class EndpointsFactory {
|
|
|
136
96
|
create(method, context) {
|
|
137
97
|
if (method.mapping === undefined)
|
|
138
98
|
throw new Error('Cannot create Endpoint without mapping');
|
|
139
|
-
const mapping = Mapping.create(method.mapping.query);
|
|
99
|
+
const mapping = Mapping.create(method.mapping.query, method.mapping.paged);
|
|
140
100
|
const branch = context.extension;
|
|
141
101
|
const namespace = method.mapping.namespace ?? branch?.namespace;
|
|
142
102
|
const component = method.mapping.component ?? branch?.component;
|
|
@@ -146,6 +106,5 @@ export class EndpointsFactory {
|
|
|
146
106
|
return new Endpoint(method.mapping.endpoint, mapping, discovery);
|
|
147
107
|
}
|
|
148
108
|
}
|
|
149
|
-
const ETAG = /^(W\/)?"(?<version>\d{1,32})"$/;
|
|
150
109
|
const INTERRUPT = true;
|
|
151
110
|
//# sourceMappingURL=Endpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Endpoint.js","sourceRoot":"","sources":["../source/Endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Endpoint.js","sourceRoot":"","sources":["../source/Endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AAOvC,MAAM,OAAO,QAAQ;IACF,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,SAAS,CAAiB;IACnC,MAAM,GAAkB,IAAI,CAAA;IAEpC,kFAAkF;IAC1E,aAAa,GAAyB,IAAI,CAAA;IAElD,YAAmB,QAAgB,EAAE,OAAgB,EAAE,SAA0B;QAC/E,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,C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AAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;QAE9E,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;IAClE,CAAC;CACF;AAED,MAAM,SAAS,GAAG,IAAI,CAAA"}
|
package/transpiled/Factory.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { syntax } from './RTD/index.js';
|
|
2
|
-
import type { Connector, Locator
|
|
2
|
+
import type { Connector, Locator } from '@toa.io/core';
|
|
3
|
+
import type { extensions } from '@toa.io/core/types';
|
|
3
4
|
export declare class Factory implements extensions.Factory {
|
|
4
5
|
private readonly host;
|
|
5
6
|
constructor(host: Host);
|
package/transpiled/Factory.js
CHANGED
|
@@ -25,6 +25,7 @@ export class Factory {
|
|
|
25
25
|
const hash = createHash('sha256').update(JSON.stringify(node)).digest('hex');
|
|
26
26
|
// no timestamp: the tenant stamps each announcement with its own start time
|
|
27
27
|
const branch = {
|
|
28
|
+
// boot only ever hands a tenant a component's locator, which always has a namespace
|
|
28
29
|
namespace: locator.namespace,
|
|
29
30
|
component: locator.name,
|
|
30
31
|
isolated: locator.namespace === 'identity',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Factory.js","sourceRoot":"","sources":["../source/Factory.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAsC,MAAM,UAAU,CAAA;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,gB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O,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AACpD,CAAC"}
|
package/transpiled/Gateway.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Connector } from '@toa.io/core';
|
|
2
|
+
import type { bindings } from '@toa.io/core/types';
|
|
2
3
|
import * as http from './HTTP/index.js';
|
|
3
4
|
import type { Interception } from './Interception.js';
|
|
4
5
|
import type { Dispatcher } from './RPC/index.js';
|
package/transpiled/Gateway.js
CHANGED
|
@@ -33,14 +33,14 @@ export class Gateway extends Connector {
|
|
|
33
33
|
this.depends(broadcast);
|
|
34
34
|
}
|
|
35
35
|
async process(context) {
|
|
36
|
-
const interception = await
|
|
36
|
+
const interception = await this.interceptor.intercept(context);
|
|
37
37
|
if (interception !== null)
|
|
38
38
|
return interception;
|
|
39
39
|
// request-scoped, before anything is routed: this is where a credential is read
|
|
40
|
-
await
|
|
40
|
+
await this.directives.preflight(context).catch(rethrow);
|
|
41
41
|
const response = await this.endpoint(context);
|
|
42
42
|
// request-scoped, on whatever is going back: this is where a credential is re-issued
|
|
43
|
-
await
|
|
43
|
+
await this.directives.depart(context, response).catch(rethrow);
|
|
44
44
|
return response;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -50,9 +50,9 @@ export class Gateway extends Connector {
|
|
|
50
50
|
async endpoint(context) {
|
|
51
51
|
const route = async (call) => await this.route(call);
|
|
52
52
|
if (this.dispatcher !== null && context.url.pathname === RPC)
|
|
53
|
-
return await
|
|
53
|
+
return await this.dispatcher.dispatch(context, route);
|
|
54
54
|
if (this.mcp !== null && context.url.pathname === MCP)
|
|
55
|
-
return await
|
|
55
|
+
return await this.mcp.process(context, route);
|
|
56
56
|
return await this.route(context);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -69,10 +69,11 @@ export class Gateway extends Connector {
|
|
|
69
69
|
if (!(verb in node.methods))
|
|
70
70
|
throw new http.MethodNotAllowed();
|
|
71
71
|
const method = node.methods[verb];
|
|
72
|
-
const interruption = await
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
await
|
|
72
|
+
const interruption = await method.directives
|
|
73
|
+
.precall(context, parameters)
|
|
74
|
+
.catch(rethrow);
|
|
75
|
+
const response = interruption ?? (await this.call(method, context, parameters));
|
|
76
|
+
await method.directives.settle(context, response).catch(rethrow);
|
|
76
77
|
return response;
|
|
77
78
|
}
|
|
78
79
|
async open() {
|
|
@@ -83,7 +84,9 @@ export class Gateway extends Connector {
|
|
|
83
84
|
pinned.push(RPC);
|
|
84
85
|
if (this.mcp !== null)
|
|
85
86
|
pinned.push(MCP);
|
|
86
|
-
console.info('Gateway started', {
|
|
87
|
+
console.info('Gateway started', {
|
|
88
|
+
endpoints: pinned.length === 0 ? 'none' : pinned.join(' ')
|
|
89
|
+
});
|
|
87
90
|
}
|
|
88
91
|
/**
|
|
89
92
|
* Both of these reach into components, and a dependency is torn down only once this has
|
|
@@ -123,9 +126,9 @@ export class Gateway extends Connector {
|
|
|
123
126
|
throw new http.NotAcceptable();
|
|
124
127
|
if (method.endpoint === null)
|
|
125
128
|
throw new http.MethodNotAllowed();
|
|
126
|
-
return await method.endpoint
|
|
129
|
+
return (await method.endpoint
|
|
127
130
|
.call(context, parameters)
|
|
128
|
-
.catch(rethrow);
|
|
131
|
+
.catch(rethrow));
|
|
129
132
|
}
|
|
130
133
|
async explain(context, node, parameters) {
|
|
131
134
|
const body = await node.explain(context, parameters);
|
|
@@ -160,7 +163,8 @@ export class Gateway extends Connector {
|
|
|
160
163
|
if (this.stopped)
|
|
161
164
|
return;
|
|
162
165
|
this.lastPing = Date.now();
|
|
163
|
-
await this.broadcast
|
|
166
|
+
await this.broadcast
|
|
167
|
+
.transmit('ping', null)
|
|
164
168
|
.catch((exception) => console.error('Discovery ping failed', { message: exception.message }));
|
|
165
169
|
}
|
|
166
170
|
reping() {
|
|
@@ -172,8 +176,13 @@ export class Gateway extends Connector {
|
|
|
172
176
|
const deadline = Date.now() + SETTLE_TIMEOUT;
|
|
173
177
|
const abort = new AbortController();
|
|
174
178
|
// an uncancelled timer keeps the process alive long after the race is won
|
|
175
|
-
await Promise.race([
|
|
176
|
-
|
|
179
|
+
await Promise.race([
|
|
180
|
+
first,
|
|
181
|
+
setTimeout(SETTLE_TIMEOUT, undefined, { signal: abort.signal })
|
|
182
|
+
])
|
|
183
|
+
.finally(() => {
|
|
184
|
+
abort.abort();
|
|
185
|
+
})
|
|
177
186
|
.catch(() => { });
|
|
178
187
|
if (this.lastMerge === 0) {
|
|
179
188
|
console.warn('Discovery timed out waiting for the first expose');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gateway.js","sourceRoot":"","sources":["../source/Gateway.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"Gateway.js","sourceRoot":"","sources":["../source/Gateway.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAepC,MAAM,OAAO,OAAQ,SAAQ,SAAS;IACnB,SAAS,CAAW;IACpB,IAAI,CAAM;IACV,WAAW,CAAc;IACzB,UAAU,CAAkB;IAE7C,iEAAiE;IAChD,UAAU,CAAmB;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