@toa.io/extensions.exposition 1.0.0-alpha.4 → 1.0.0-alpha.40
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/components/context.toa.yaml +2 -2
- package/components/identity.bans/manifest.toa.yaml +15 -7
- package/components/identity.bans/operations/transit.d.ts +14 -0
- package/components/identity.bans/operations/transit.js +11 -0
- package/components/identity.bans/operations/transit.js.map +1 -0
- package/components/identity.bans/operations/tsconfig.tsbuildinfo +1 -0
- package/components/identity.bans/source/transit.ts +21 -0
- package/components/identity.bans/tsconfig.json +9 -0
- package/components/identity.basic/manifest.toa.yaml +22 -9
- package/components/identity.basic/operations/authenticate.d.ts +5 -1
- package/components/identity.basic/operations/authenticate.js +5 -2
- package/components/identity.basic/operations/authenticate.js.map +1 -1
- package/components/identity.basic/operations/incept.d.ts +12 -0
- package/components/identity.basic/operations/incept.js +26 -0
- package/components/identity.basic/operations/incept.js.map +1 -0
- package/components/identity.basic/operations/transit.d.ts +4 -4
- package/components/identity.basic/operations/transit.js +5 -3
- package/components/identity.basic/operations/transit.js.map +1 -1
- package/components/identity.basic/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/operations/types.d.ts +8 -4
- package/components/identity.basic/source/authenticate.ts +16 -5
- package/components/identity.basic/source/incept.ts +38 -0
- package/components/identity.basic/source/transit.ts +8 -6
- package/components/identity.basic/source/types.ts +8 -4
- package/components/identity.federation/manifest.toa.yaml +28 -22
- package/components/identity.federation/operations/authenticate.d.ts +2 -2
- package/components/identity.federation/operations/authenticate.js +3 -10
- package/components/identity.federation/operations/authenticate.js.map +1 -1
- package/components/identity.federation/operations/incept.d.ts +11 -0
- package/components/identity.federation/operations/{create.js → incept.js} +6 -7
- package/components/identity.federation/operations/incept.js.map +1 -0
- package/components/identity.federation/operations/lib/jwt.d.ts +4 -5
- package/components/identity.federation/operations/lib/jwt.js +3 -3
- package/components/identity.federation/operations/lib/jwt.js.map +1 -1
- package/components/identity.federation/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/operations/types/configuration.d.ts +14 -0
- package/components/identity.federation/operations/types/configuration.js +3 -0
- package/components/identity.federation/operations/types/configuration.js.map +1 -0
- package/components/identity.federation/operations/{types.d.ts → types/context.d.ts} +13 -6
- package/components/identity.federation/operations/types/context.js +3 -0
- package/components/identity.federation/operations/types/context.js.map +1 -0
- package/components/identity.federation/operations/types/entity.d.ts +6 -0
- package/components/identity.federation/operations/{types.js → types/entity.js} +1 -1
- package/components/identity.federation/operations/types/entity.js.map +1 -0
- package/components/identity.federation/operations/types/index.d.ts +3 -0
- package/components/identity.federation/operations/types/index.js +20 -0
- package/components/identity.federation/operations/types/index.js.map +1 -0
- package/components/identity.federation/source/authenticate.ts +5 -18
- package/components/identity.federation/source/{create.ts → incept.ts} +10 -9
- package/components/identity.federation/source/lib/jwt.test.ts +2 -2
- package/components/identity.federation/source/lib/jwt.ts +7 -8
- package/components/identity.federation/source/types/configuration.ts +15 -0
- package/components/identity.federation/source/{types.ts → types/context.ts} +15 -5
- package/components/identity.federation/source/types/entity.ts +6 -0
- package/components/identity.federation/source/types/index.ts +3 -0
- package/components/identity.federation/tsconfig.json +2 -2
- package/components/identity.roles/manifest.toa.yaml +18 -6
- package/components/identity.roles/operations/grant.d.ts +10 -0
- package/components/identity.roles/operations/grant.js +21 -0
- package/components/identity.roles/operations/grant.js.map +1 -0
- package/components/identity.roles/operations/lib/Entity.d.ts +5 -0
- package/components/identity.roles/operations/lib/Entity.js +3 -0
- package/components/identity.roles/operations/lib/Entity.js.map +1 -0
- package/components/identity.roles/operations/list.d.ts +1 -4
- package/components/identity.roles/operations/list.js.map +1 -1
- package/components/identity.roles/operations/principal.d.ts +4 -6
- package/components/identity.roles/operations/principal.js +6 -1
- package/components/identity.roles/operations/principal.js.map +1 -1
- package/components/identity.roles/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.roles/source/grant.ts +32 -0
- package/components/identity.roles/source/lib/Entity.ts +5 -0
- package/components/identity.roles/source/list.ts +2 -4
- package/components/identity.roles/source/principal.ts +10 -8
- package/components/identity.tokens/manifest.toa.yaml +19 -5
- package/components/identity.tokens/operations/authenticate.d.ts +2 -2
- package/components/identity.tokens/operations/authenticate.js +10 -4
- package/components/identity.tokens/operations/authenticate.js.map +1 -1
- package/components/identity.tokens/operations/decrypt.js +1 -0
- package/components/identity.tokens/operations/decrypt.js.map +1 -1
- package/components/identity.tokens/operations/encrypt.js +5 -1
- package/components/identity.tokens/operations/encrypt.js.map +1 -1
- package/components/identity.tokens/operations/tsconfig.tsbuildinfo +1 -1
- package/components/identity.tokens/operations/types.d.ts +8 -2
- package/components/identity.tokens/receivers/identity.bans.created.js +3 -0
- package/components/identity.tokens/source/authenticate.test.ts +11 -4
- package/components/identity.tokens/source/authenticate.ts +12 -5
- package/components/identity.tokens/source/decrypt.test.ts +5 -3
- package/components/identity.tokens/source/decrypt.ts +9 -8
- package/components/identity.tokens/source/encrypt.test.ts +26 -2
- package/components/identity.tokens/source/encrypt.ts +5 -1
- package/components/identity.tokens/source/types.ts +9 -2
- package/components/octets.storage/manifest.toa.yaml +0 -7
- package/documentation/access.md +27 -16
- package/documentation/authorities.md +53 -0
- package/documentation/cache.md +8 -1
- package/documentation/components.md +47 -22
- package/documentation/identity.md +17 -22
- package/documentation/io.md +56 -0
- package/documentation/protocol.md +3 -0
- package/documentation/query.md +17 -11
- package/documentation/require.md +15 -0
- package/documentation/tree.md +22 -4
- package/documentation/vary.md +14 -14
- package/features/access.feature +89 -47
- package/features/annotation.feature +2 -0
- package/features/authorities.basic.feature +141 -0
- package/features/authorities.feature +32 -0
- package/features/authorities.federation.feature +99 -0
- package/features/authorities.tokens.feature +118 -0
- package/features/body.feature +4 -0
- package/features/cache.feature +112 -5
- package/features/cors.feature +7 -2
- package/features/debug.feature +34 -0
- package/features/directives.feature +5 -0
- package/features/dynamic.feature +18 -7
- package/features/errors.feature +18 -4
- package/features/etag.feature +18 -1
- package/features/identity.bans.feature +137 -0
- package/features/identity.basic.feature +142 -19
- package/features/identity.feature +7 -2
- package/features/identity.federation.feature +67 -14
- package/features/identity.roles.feature +220 -4
- package/features/identity.tokens.feature +57 -4
- package/features/io.feature +205 -0
- package/features/octets.entries.feature +10 -0
- package/features/octets.feature +60 -64
- package/features/octets.meta.feature +7 -3
- package/features/octets.workflows.feature +14 -0
- package/features/probes.feature +14 -0
- package/features/{queries.feature → query.feature} +50 -3
- package/features/require.feature +67 -0
- package/features/response.feature +12 -3
- package/features/routes.feature +25 -12
- package/features/steps/Database.ts +17 -10
- package/features/steps/Gateway.ts +23 -6
- package/features/steps/IdP.ts +28 -23
- package/features/steps/components/echo/manifest.toa.yaml +5 -1
- package/features/steps/components/echo/operations/identity.js +7 -0
- package/features/steps/components/pots/manifest.toa.yaml +2 -0
- package/features/steps/components/users.properties/manifest.toa.yaml +2 -1
- package/features/streams.feature +1 -0
- package/features/timing.feature +27 -1
- package/features/vary.feature +105 -3
- package/package.json +12 -11
- package/readme.md +19 -14
- package/schemas/annotation.cos.yaml +1 -1
- package/schemas/io/input.cos.yaml +3 -0
- package/schemas/io/message.cos.yaml +5 -0
- package/schemas/io/output.cos.yaml +5 -0
- package/source/Annotation.ts +3 -3
- package/source/Context.ts +6 -4
- package/source/Directive.test.ts +4 -4
- package/source/Directive.ts +11 -38
- package/source/Endpoint.ts +43 -8
- package/source/Factory.ts +11 -7
- package/source/Gateway.ts +16 -44
- package/source/HTTP/Context.ts +24 -2
- package/source/HTTP/Server.ts +56 -43
- package/source/HTTP/exceptions.ts +7 -1
- package/source/HTTP/messages.ts +1 -1
- package/source/Mapping.ts +6 -1
- package/source/Query.test.ts +1 -1
- package/source/Query.ts +35 -24
- package/source/RTD/Context.ts +7 -10
- package/source/RTD/Directives.ts +28 -4
- package/source/RTD/Endpoint.ts +6 -4
- package/source/RTD/Match.ts +2 -7
- package/source/RTD/Method.ts +7 -13
- package/source/RTD/Node.ts +13 -14
- package/source/RTD/Tree.ts +17 -16
- package/source/RTD/factory.ts +3 -6
- package/source/Tenant.ts +0 -8
- package/source/deployment.ts +32 -22
- package/source/directives/auth/Authorization.ts +38 -19
- package/source/directives/auth/Delegate.ts +42 -0
- package/source/directives/auth/Incept.ts +3 -2
- package/source/directives/auth/Role.test.ts +53 -6
- package/source/directives/auth/Role.ts +22 -14
- package/source/directives/auth/types.ts +1 -1
- package/source/directives/cache/Cache.ts +15 -8
- package/source/directives/cache/Control.ts +42 -16
- package/source/directives/cors/CORS.ts +13 -7
- package/source/directives/dev/Development.ts +4 -4
- package/source/directives/index.ts +6 -4
- package/source/directives/io/Directive.ts +11 -0
- package/source/directives/io/IO.ts +43 -0
- package/source/directives/io/Input.ts +50 -0
- package/source/directives/io/Message.ts +1 -0
- package/source/directives/io/Output.ts +69 -0
- package/source/directives/io/index.ts +3 -0
- package/source/directives/io/schemas.ts +12 -0
- package/source/directives/octets/Context.ts +4 -3
- package/source/directives/octets/Delete.ts +4 -2
- package/source/directives/octets/Directive.ts +10 -0
- package/source/directives/octets/Fetch.ts +4 -3
- package/source/directives/octets/List.ts +4 -2
- package/source/directives/octets/Octets.ts +6 -8
- package/source/directives/octets/Store.ts +12 -4
- package/source/directives/octets/Workflow.ts +10 -3
- package/source/directives/octets/types.ts +0 -7
- package/source/directives/require/Directive.ts +5 -0
- package/source/directives/require/Headers.ts +20 -0
- package/source/directives/require/Require.ts +28 -0
- package/source/directives/require/index.ts +3 -0
- package/source/directives/vary/Directive.ts +2 -1
- package/source/directives/vary/Embed.ts +14 -8
- package/source/directives/vary/Vary.ts +7 -5
- package/source/directives/vary/embeddings/Authority.ts +8 -0
- package/source/directives/vary/embeddings/Embedding.ts +2 -1
- package/source/directives/vary/embeddings/Header.ts +8 -6
- package/source/directives/vary/embeddings/Language.ts +1 -1
- package/source/directives/vary/embeddings/Parameter.ts +14 -0
- package/source/directives/vary/embeddings/index.ts +6 -4
- package/source/exceptions.ts +22 -11
- package/source/root.ts +5 -0
- package/source/schemas.ts +1 -1
- package/transpiled/Annotation.d.ts +3 -3
- package/transpiled/Context.d.ts +6 -4
- package/transpiled/Directive.d.ts +4 -17
- package/transpiled/Directive.js +4 -7
- package/transpiled/Directive.js.map +1 -1
- package/transpiled/Endpoint.d.ts +5 -3
- package/transpiled/Endpoint.js +30 -5
- package/transpiled/Endpoint.js.map +1 -1
- package/transpiled/Factory.js +9 -4
- package/transpiled/Factory.js.map +1 -1
- package/transpiled/Gateway.d.ts +1 -4
- package/transpiled/Gateway.js +10 -26
- package/transpiled/Gateway.js.map +1 -1
- package/transpiled/HTTP/Context.d.ts +8 -1
- package/transpiled/HTTP/Context.js +15 -2
- package/transpiled/HTTP/Context.js.map +1 -1
- package/transpiled/HTTP/Server.d.ts +13 -2
- package/transpiled/HTTP/Server.js +41 -35
- package/transpiled/HTTP/Server.js.map +1 -1
- package/transpiled/HTTP/exceptions.d.ts +4 -1
- package/transpiled/HTTP/exceptions.js +7 -1
- package/transpiled/HTTP/exceptions.js.map +1 -1
- package/transpiled/HTTP/messages.js +1 -1
- package/transpiled/HTTP/messages.js.map +1 -1
- package/transpiled/Mapping.js +4 -1
- package/transpiled/Mapping.js.map +1 -1
- package/transpiled/Query.d.ts +1 -0
- package/transpiled/Query.js +21 -20
- package/transpiled/Query.js.map +1 -1
- package/transpiled/RTD/Context.d.ts +7 -6
- package/transpiled/RTD/Directives.d.ts +19 -4
- package/transpiled/RTD/Endpoint.d.ts +6 -4
- package/transpiled/RTD/Match.d.ts +2 -4
- package/transpiled/RTD/Method.d.ts +7 -7
- package/transpiled/RTD/Method.js.map +1 -1
- package/transpiled/RTD/Node.d.ts +4 -6
- package/transpiled/RTD/Node.js +2 -1
- package/transpiled/RTD/Node.js.map +1 -1
- package/transpiled/RTD/Tree.d.ts +6 -6
- package/transpiled/RTD/Tree.js +4 -1
- package/transpiled/RTD/Tree.js.map +1 -1
- package/transpiled/RTD/factory.d.ts +2 -4
- package/transpiled/RTD/factory.js +1 -1
- package/transpiled/RTD/factory.js.map +1 -1
- package/transpiled/Tenant.d.ts +0 -1
- package/transpiled/Tenant.js +0 -6
- package/transpiled/Tenant.js.map +1 -1
- package/transpiled/deployment.d.ts +1 -1
- package/transpiled/deployment.js +28 -20
- package/transpiled/deployment.js.map +1 -1
- package/transpiled/directives/auth/Authorization.d.ts +2 -3
- package/transpiled/directives/auth/Authorization.js +26 -12
- package/transpiled/directives/auth/Authorization.js.map +1 -1
- package/transpiled/directives/auth/Delegate.d.ts +10 -0
- package/transpiled/directives/auth/Delegate.js +34 -0
- package/transpiled/directives/auth/Delegate.js.map +1 -0
- package/transpiled/directives/auth/Incept.js +3 -2
- package/transpiled/directives/auth/Incept.js.map +1 -1
- package/transpiled/directives/auth/Role.d.ts +4 -1
- package/transpiled/directives/auth/Role.js +20 -14
- package/transpiled/directives/auth/Role.js.map +1 -1
- package/transpiled/directives/cache/Cache.d.ts +5 -5
- package/transpiled/directives/cache/Cache.js +10 -4
- package/transpiled/directives/cache/Cache.js.map +1 -1
- package/transpiled/directives/cache/Control.d.ts +2 -1
- package/transpiled/directives/cache/Control.js +29 -12
- package/transpiled/directives/cache/Control.js.map +1 -1
- package/transpiled/directives/cors/CORS.d.ts +2 -3
- package/transpiled/directives/cors/CORS.js +13 -7
- package/transpiled/directives/cors/CORS.js.map +1 -1
- package/transpiled/directives/dev/Development.d.ts +3 -3
- package/transpiled/directives/dev/Development.js +1 -1
- package/transpiled/directives/dev/Development.js.map +1 -1
- package/transpiled/directives/index.d.ts +2 -2
- package/transpiled/directives/index.js +5 -3
- package/transpiled/directives/index.js.map +1 -1
- package/transpiled/directives/io/Directive.d.ts +8 -0
- package/transpiled/directives/io/Directive.js +3 -0
- package/transpiled/directives/io/Directive.js.map +1 -0
- package/transpiled/directives/io/IO.d.ts +9 -0
- package/transpiled/directives/io/IO.js +33 -0
- package/transpiled/directives/io/IO.js.map +1 -0
- package/transpiled/directives/io/Input.d.ts +11 -0
- package/transpiled/directives/{octets/Permute.js → io/Input.js} +33 -26
- package/transpiled/directives/io/Input.js.map +1 -0
- package/transpiled/directives/io/Message.d.ts +1 -0
- package/transpiled/directives/io/Message.js +3 -0
- package/transpiled/directives/io/Message.js.map +1 -0
- package/transpiled/directives/io/Output.d.ts +13 -0
- package/transpiled/directives/io/Output.js +76 -0
- package/transpiled/directives/io/Output.js.map +1 -0
- package/transpiled/directives/io/index.d.ts +2 -0
- package/transpiled/directives/io/index.js +6 -0
- package/transpiled/directives/io/index.js.map +1 -0
- package/transpiled/directives/io/schemas.d.ts +7 -0
- package/transpiled/directives/io/schemas.js +14 -0
- package/transpiled/directives/io/schemas.js.map +1 -0
- package/transpiled/directives/octets/Context.d.ts +3 -3
- package/transpiled/directives/octets/Context.js +4 -2
- package/transpiled/directives/octets/Context.js.map +1 -1
- package/transpiled/directives/octets/Delete.d.ts +3 -2
- package/transpiled/directives/octets/Delete.js +3 -1
- package/transpiled/directives/octets/Delete.js.map +1 -1
- package/transpiled/directives/octets/Directive.d.ts +8 -0
- package/transpiled/directives/octets/Directive.js +8 -0
- package/transpiled/directives/octets/Directive.js.map +1 -0
- package/transpiled/directives/octets/Fetch.d.ts +3 -2
- package/transpiled/directives/octets/Fetch.js +3 -1
- package/transpiled/directives/octets/Fetch.js.map +1 -1
- package/transpiled/directives/octets/List.d.ts +3 -2
- package/transpiled/directives/octets/List.js +3 -1
- package/transpiled/directives/octets/List.js.map +1 -1
- package/transpiled/directives/octets/Octets.d.ts +4 -4
- package/transpiled/directives/octets/Octets.js +2 -4
- package/transpiled/directives/octets/Octets.js.map +1 -1
- package/transpiled/directives/octets/Store.d.ts +3 -2
- package/transpiled/directives/octets/Store.js +10 -3
- package/transpiled/directives/octets/Store.js.map +1 -1
- package/transpiled/directives/octets/Workflow.d.ts +3 -2
- package/transpiled/directives/octets/Workflow.js +9 -2
- package/transpiled/directives/octets/Workflow.js.map +1 -1
- package/transpiled/directives/octets/types.d.ts +0 -5
- package/transpiled/directives/require/Directive.d.ts +4 -0
- package/transpiled/directives/require/Directive.js +3 -0
- package/transpiled/directives/require/Directive.js.map +1 -0
- package/transpiled/directives/require/Headers.d.ts +7 -0
- package/transpiled/directives/require/Headers.js +19 -0
- package/transpiled/directives/require/Headers.js.map +1 -0
- package/transpiled/directives/require/Require.d.ts +9 -0
- package/transpiled/directives/require/Require.js +27 -0
- package/transpiled/directives/require/Require.js.map +1 -0
- package/transpiled/directives/require/index.d.ts +2 -0
- package/transpiled/directives/require/index.js +6 -0
- package/transpiled/directives/require/index.js.map +1 -0
- package/transpiled/directives/vary/Directive.d.ts +2 -1
- package/transpiled/directives/vary/Embed.d.ts +2 -1
- package/transpiled/directives/vary/Embed.js +8 -6
- package/transpiled/directives/vary/Embed.js.map +1 -1
- package/transpiled/directives/vary/Vary.d.ts +3 -3
- package/transpiled/directives/vary/Vary.js +3 -3
- package/transpiled/directives/vary/Vary.js.map +1 -1
- package/transpiled/directives/vary/embeddings/Authority.d.ts +5 -0
- package/transpiled/directives/vary/embeddings/Authority.js +10 -0
- package/transpiled/directives/vary/embeddings/Authority.js.map +1 -0
- package/transpiled/directives/vary/embeddings/Embedding.d.ts +2 -1
- package/transpiled/directives/vary/embeddings/Header.js +8 -6
- package/transpiled/directives/vary/embeddings/Header.js.map +1 -1
- package/transpiled/directives/vary/embeddings/Language.js +1 -1
- package/transpiled/directives/vary/embeddings/Language.js.map +1 -1
- package/transpiled/directives/vary/embeddings/Parameter.d.ts +7 -0
- package/transpiled/directives/vary/embeddings/Parameter.js +14 -0
- package/transpiled/directives/vary/embeddings/Parameter.js.map +1 -0
- package/transpiled/directives/vary/embeddings/index.d.ts +2 -2
- package/transpiled/directives/vary/embeddings/index.js +8 -4
- package/transpiled/directives/vary/embeddings/index.js.map +1 -1
- package/transpiled/exceptions.d.ts +3 -2
- package/transpiled/exceptions.js +13 -7
- package/transpiled/exceptions.js.map +1 -1
- package/transpiled/root.js +5 -0
- package/transpiled/root.js.map +1 -1
- package/transpiled/schemas.d.ts +1 -1
- package/transpiled/schemas.js +2 -2
- package/transpiled/schemas.js.map +1 -1
- package/transpiled/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/operations/create.d.ts +0 -10
- package/components/identity.basic/operations/create.js +0 -10
- package/components/identity.basic/operations/create.js.map +0 -1
- package/components/identity.basic/source/create.ts +0 -18
- package/components/identity.federation/operations/create.d.ts +0 -10
- package/components/identity.federation/operations/create.js.map +0 -1
- package/components/identity.federation/operations/schemas.d.ts +0 -59
- package/components/identity.federation/operations/schemas.js +0 -9
- package/components/identity.federation/operations/schemas.js.map +0 -1
- package/components/identity.federation/operations/types.js.map +0 -1
- package/components/identity.federation/source/schemas.ts +0 -61
- package/components/octets.storage/operations/permute.js +0 -7
- package/source/HTTP/Server.test.ts +0 -126
- package/source/directives/octets/Permute.ts +0 -43
- package/transpiled/directives/octets/Permute.d.ts +0 -10
- package/transpiled/directives/octets/Permute.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Authority.js","sourceRoot":"","sources":["../../../../source/directives/vary/embeddings/Authority.ts"],"names":[],"mappings":";;;AAGA,MAAa,SAAS;IACb,OAAO,CAAE,OAAc;QAC5B,OAAO,OAAO,CAAC,SAAS,CAAA;IAC1B,CAAC;CACF;AAJD,8BAIC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Properties } from '../Properties';
|
|
2
2
|
import type { Input } from '../../../io';
|
|
3
|
+
import type { Parameter } from '../../../RTD';
|
|
3
4
|
export interface Embedding {
|
|
4
|
-
resolve: (input: Input, properties: Properties) => string | undefined;
|
|
5
|
+
resolve: (input: Input, properties: Properties, parameters: Parameter[]) => string | undefined;
|
|
5
6
|
}
|
|
@@ -5,17 +5,19 @@ const cors_1 = require("../../cors");
|
|
|
5
5
|
class Header {
|
|
6
6
|
name;
|
|
7
7
|
constructor(name) {
|
|
8
|
-
this.name = name;
|
|
9
|
-
|
|
8
|
+
this.name = name.toLowerCase();
|
|
9
|
+
if (this.name !== 'host')
|
|
10
|
+
cors_1.cors.allow(this.name);
|
|
10
11
|
}
|
|
11
12
|
resolve(input) {
|
|
12
13
|
const value = input.request.headers[this.name];
|
|
13
14
|
if (value === undefined)
|
|
14
15
|
return value;
|
|
15
|
-
|
|
16
|
-
response.
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
if (this.name !== 'host')
|
|
17
|
+
input.pipelines.response.push((response) => {
|
|
18
|
+
response.headers ??= new Headers();
|
|
19
|
+
response.headers.append('vary', this.name);
|
|
20
|
+
});
|
|
19
21
|
if (Array.isArray(value))
|
|
20
22
|
return value.join(', ');
|
|
21
23
|
else
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../source/directives/vary/embeddings/Header.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAIjC,MAAa,MAAM;IACA,IAAI,CAAQ;IAE7B,YAAoB,IAAY;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../source/directives/vary/embeddings/Header.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AAIjC,MAAa,MAAM;IACA,IAAI,CAAQ;IAE7B,YAAoB,IAAY;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;QAE9B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;YACtB,WAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;IAEM,OAAO,CAAE,KAAY;QAC1B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAE9C,IAAI,KAAK,KAAK,SAAS;YACrB,OAAO,KAAK,CAAA;QAEd,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;YACtB,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACzC,QAAQ,CAAC,OAAO,KAAK,IAAI,OAAO,EAAE,CAAA;gBAClC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YAC5C,CAAC,CAAC,CAAA;QAEJ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YACtB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;;YAEvB,OAAO,KAAK,CAAA;IAChB,CAAC;CACF;AA3BD,wBA2BC"}
|
|
@@ -9,7 +9,7 @@ const negotiator_1 = __importDefault(require("negotiator"));
|
|
|
9
9
|
const cors_1 = require("../../cors");
|
|
10
10
|
class Language {
|
|
11
11
|
constructor() {
|
|
12
|
-
cors_1.cors.
|
|
12
|
+
cors_1.cors.allow('accept-language');
|
|
13
13
|
}
|
|
14
14
|
resolve(input, properties) {
|
|
15
15
|
node_assert_1.default.ok(properties.languages !== undefined, 'Supported languages are not defined. Use `vary:languages` directive.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Language.js","sourceRoot":"","sources":["../../../../source/directives/vary/embeddings/Language.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAgC;AAChC,4DAAmC;AACnC,qCAAiC;AAKjC,MAAa,QAAQ;IACnB;QACE,WAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"Language.js","sourceRoot":"","sources":["../../../../source/directives/vary/embeddings/Language.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAgC;AAChC,4DAAmC;AACnC,qCAAiC;AAKjC,MAAa,QAAQ;IACnB;QACE,WAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;IAC/B,CAAC;IAEM,OAAO,CAAE,KAAY,EAAE,UAAsB;QAClD,qBAAM,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,KAAK,SAAS,EAC1C,sEAAsE,CAAC,CAAA;QAEzE,qBAAM,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EACvC,uCAAuC,CAAC,CAAA;QAE1C,MAAM,UAAU,GAAG,IAAI,oBAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAChD,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;QAErF,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACzC,QAAQ,CAAC,OAAO,KAAK,IAAI,OAAO,EAAE,CAAA;YAClC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAA;YAClD,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;QACpD,CAAC,CAAC,CAAA;QAEF,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAvBD,4BAuBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Embedding } from './Embedding';
|
|
2
|
+
import type * as RTD from '../../../RTD';
|
|
3
|
+
export declare class Parameter implements Embedding {
|
|
4
|
+
private readonly name;
|
|
5
|
+
constructor(name: string);
|
|
6
|
+
resolve(_: unknown, __: unknown, parameters: RTD.Parameter[]): string | undefined;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Parameter = void 0;
|
|
4
|
+
class Parameter {
|
|
5
|
+
name;
|
|
6
|
+
constructor(name) {
|
|
7
|
+
this.name = name;
|
|
8
|
+
}
|
|
9
|
+
resolve(_, __, parameters) {
|
|
10
|
+
return parameters.find((parameter) => parameter.name === this.name)?.value;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.Parameter = Parameter;
|
|
14
|
+
//# sourceMappingURL=Parameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../source/directives/vary/embeddings/Parameter.ts"],"names":[],"mappings":";;;AAGA,MAAa,SAAS;IACH,IAAI,CAAQ;IAE7B,YAAoB,IAAY;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAEM,OAAO,CAAE,CAAU,EAAE,EAAW,EAAE,UAA2B;QAClE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,CAAA;IAC5E,CAAC;CACF;AAVD,8BAUC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Header } from './Header';
|
|
2
1
|
import type { Embedding } from './Embedding';
|
|
3
2
|
export declare const embeddings: Record<string, new () => Embedding>;
|
|
4
|
-
export { Header };
|
|
5
3
|
export type { Embedding };
|
|
4
|
+
export { Header } from './Header';
|
|
5
|
+
export { Parameter } from './Parameter';
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Header = exports.embeddings = void 0;
|
|
3
|
+
exports.Parameter = exports.Header = exports.embeddings = void 0;
|
|
4
4
|
const Language_1 = require("./Language");
|
|
5
|
-
const
|
|
6
|
-
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return Header_1.Header; } });
|
|
5
|
+
const Authority_1 = require("./Authority");
|
|
7
6
|
exports.embeddings = {
|
|
8
|
-
language: Language_1.Language
|
|
7
|
+
language: Language_1.Language,
|
|
8
|
+
authority: Authority_1.Authority
|
|
9
9
|
};
|
|
10
|
+
var Header_1 = require("./Header");
|
|
11
|
+
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return Header_1.Header; } });
|
|
12
|
+
var Parameter_1 = require("./Parameter");
|
|
13
|
+
Object.defineProperty(exports, "Parameter", { enumerable: true, get: function () { return Parameter_1.Parameter; } });
|
|
10
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/directives/vary/embeddings/index.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/directives/vary/embeddings/index.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AACrC,2CAAuC;AAG1B,QAAA,UAAU,GAAwC;IAC7D,QAAQ,EAAE,mBAAQ;IAClB,SAAS,EAAE,qBAAS;CACrB,CAAA;AAID,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,yCAAuC;AAA9B,sGAAA,SAAS,OAAA"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Exception as HTTPException } from './HTTP';
|
|
2
|
+
import type { Exception } from '@toa.io/core';
|
|
3
|
+
export declare function rethrow(exception: Exception | HTTPException): void;
|
package/transpiled/exceptions.js
CHANGED
|
@@ -24,16 +24,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.rethrow = void 0;
|
|
27
|
+
const matchacho_1 = require("matchacho");
|
|
27
28
|
const http = __importStar(require("./HTTP"));
|
|
29
|
+
const HTTP_1 = require("./HTTP");
|
|
28
30
|
function rethrow(exception) {
|
|
31
|
+
if (exception instanceof HTTP_1.Exception)
|
|
32
|
+
throw exception;
|
|
29
33
|
// see /runtime/core/src/exceptions.js
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (exception.code === 303)
|
|
35
|
-
throw new http.PreconditionFailed();
|
|
36
|
-
throw exception;
|
|
34
|
+
throw (0, matchacho_1.match)(exception.code, badRequest, () => new http.BadRequest(exception.message), 302, NOT_FOUND, 303, PRECONDITION_FAILED, 306, () => new http.Conflict(), () => {
|
|
35
|
+
console.error(exception);
|
|
36
|
+
return exception;
|
|
37
|
+
});
|
|
37
38
|
}
|
|
38
39
|
exports.rethrow = rethrow;
|
|
40
|
+
function badRequest(code) {
|
|
41
|
+
return (code >= 200 && code < 210) || code === 221;
|
|
42
|
+
}
|
|
43
|
+
const NOT_FOUND = new http.NotFound();
|
|
44
|
+
const PRECONDITION_FAILED = new http.PreconditionFailed();
|
|
39
45
|
//# sourceMappingURL=exceptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../source/exceptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../source/exceptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAiC;AACjC,6CAA8B;AAC9B,iCAAmD;AAGnD,SAAgB,OAAO,CAAE,SAAoC;IAC3D,IAAI,SAAS,YAAY,gBAAa;QACpC,MAAM,SAAS,CAAA;IAEjB,sCAAsC;IACtC,MAAM,IAAA,iBAAK,EAAC,SAAS,CAAC,IAAI,EACxB,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,EACxD,GAAG,EAAE,SAAS,EACd,GAAG,EAAE,mBAAmB,EACxB,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAC9B,GAAG,EAAE;QACH,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;QAExB,OAAO,SAAS,CAAA;IAClB,CAAC,CAAC,CAAA;AACN,CAAC;AAfD,0BAeC;AAED,SAAS,UAAU,CAAE,IAAY;IAC/B,OAAO,CAAC,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,KAAK,GAAG,CAAA;AACpD,CAAC;AAED,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAA;AACrC,MAAM,mBAAmB,GAAG,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAA"}
|
package/transpiled/root.js
CHANGED
package/transpiled/root.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../source/root.ts"],"names":[],"mappings":";;;AAAA,6CAA+C;AAC/C,+BAA8B;AAE9B,SAAgB,OAAO;IACrB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAA;IACxC,MAAM,IAAI,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAA,gBAAM,EAAc,KAAK,CAAC,CAAC,CAAC,CAAC,YAAM,CAAC,UAAU,EAAE,CAAA;IAEnF,IAAA,eAAK,EAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAEvB,OAAO,IAAI,CAAA;AACb,CAAC;AAPD,0BAOC;AAED,MAAM,UAAU,GAAgB;IAC9B,MAAM,EAAE;QACN;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE;gBACJ,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,EAAE;gBACV,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,KAAK;wBACX,UAAU,EAAE;4BACV;gCACE,MAAM,EAAE,MAAM;gCACd,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE,IAAI;6BACZ;yBACF;qBACF;iBACF;gBACD,UAAU,EAAE,EAAE;aACf;SACF;KACF;IACD,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,EAAE;CACf,CAAA"}
|
|
1
|
+
{"version":3,"file":"root.js","sourceRoot":"","sources":["../source/root.ts"],"names":[],"mappings":";;;AAAA,6CAA+C;AAC/C,+BAA8B;AAE9B,SAAgB,OAAO;IACrB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAA;IACxC,MAAM,IAAI,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAA,gBAAM,EAAc,KAAK,CAAC,CAAC,CAAC,CAAC,YAAM,CAAC,UAAU,EAAE,CAAA;IAEnF,IAAA,eAAK,EAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IAEvB,OAAO,IAAI,CAAA;AACb,CAAC;AAPD,0BAOC;AAED,MAAM,UAAU,GAAgB;IAC9B,MAAM,EAAE;QACN;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE;gBACJ,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,EAAE;gBACV,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,KAAK;wBACX,UAAU,EAAE;4BACV;gCACE,MAAM,EAAE,MAAM;gCACd,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE,IAAI;6BACZ;4BACD;gCACE,MAAM,EAAE,IAAI;gCACZ,IAAI,EAAE,QAAQ;gCACd,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;6BACvB;yBACF;qBACF;iBACF;gBACD,UAAU,EAAE,EAAE;aACf;SACF;KACF;IACD,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,EAAE;CACf,CAAA"}
|
package/transpiled/schemas.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { Node } from './RTD';
|
|
|
3
3
|
import type { Schema } from '@toa.io/schemas';
|
|
4
4
|
import type { Annotation } from './Annotation';
|
|
5
5
|
export declare const querystring: Schema<Query>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const annotation: Schema<Annotation>;
|
|
7
7
|
export declare const node: Schema<Node>;
|
package/transpiled/schemas.js
CHANGED
|
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.node = exports.
|
|
6
|
+
exports.node = exports.annotation = exports.querystring = void 0;
|
|
7
7
|
const node_path_1 = require("node:path");
|
|
8
8
|
const schemas_1 = __importDefault(require("@toa.io/schemas"));
|
|
9
9
|
const path = (0, node_path_1.resolve)(__dirname, '../schemas');
|
|
10
10
|
const namespace = schemas_1.default.namespace(path);
|
|
11
11
|
exports.querystring = namespace.schema('querystring');
|
|
12
|
-
exports.
|
|
12
|
+
exports.annotation = namespace.schema('annotation');
|
|
13
13
|
exports.node = namespace.schema('node');
|
|
14
14
|
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../source/schemas.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAmC;AACnC,8DAAqC;AAMrC,MAAM,IAAI,GAAG,IAAA,mBAAO,EAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AAC7C,MAAM,SAAS,GAAG,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AAE5B,QAAA,WAAW,GAAkB,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AAC5D,QAAA,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../source/schemas.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAmC;AACnC,8DAAqC;AAMrC,MAAM,IAAI,GAAG,IAAA,mBAAO,EAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AAC7C,MAAM,SAAS,GAAG,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AAE5B,QAAA,WAAW,GAAkB,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AAC5D,QAAA,UAAU,GAAuB,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;AAC/D,QAAA,IAAI,GAAiB,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA"}
|