@toa.io/extensions.exposition 1.0.0-alpha.273 → 1.0.0-alpha.276

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +209 -0
  2. package/components/identity.basic/manifest.toa.yaml +1 -1
  3. package/components/identity.basic/operations/authenticate.js +1 -1
  4. package/components/identity.basic/operations/authenticate.js.map +1 -1
  5. package/components/identity.basic/operations/transit.js +1 -1
  6. package/components/identity.basic/operations/transit.js.map +1 -1
  7. package/components/identity.basic/operations/tsconfig.tsbuildinfo +1 -1
  8. package/components/identity.basic/operations/types.d.ts +2 -2
  9. package/components/identity.basic/source/authenticate.ts +1 -1
  10. package/components/identity.basic/source/transit.ts +1 -1
  11. package/components/identity.basic/source/types.ts +2 -2
  12. package/components/identity.credentials/operations/tsconfig.tsbuildinfo +1 -1
  13. package/components/identity.federation/operations/lib/exchange.js +2 -2
  14. package/components/identity.federation/operations/lib/exchange.js.map +1 -1
  15. package/components/identity.federation/operations/tsconfig.tsbuildinfo +1 -1
  16. package/components/identity.federation/operations/types/configuration.d.ts +3 -2
  17. package/components/identity.federation/source/lib/exchange.ts +2 -2
  18. package/components/identity.federation/source/types/configuration.ts +4 -2
  19. package/components/identity.keys/operations/tsconfig.tsbuildinfo +1 -1
  20. package/components/identity.otp/operations/tsconfig.tsbuildinfo +1 -1
  21. package/components/identity.passkeys/operations/tsconfig.tsbuildinfo +1 -1
  22. package/components/identity.roles/operations/tsconfig.tsbuildinfo +1 -1
  23. package/components/identity.tokens/operations/decrypt.js +1 -1
  24. package/components/identity.tokens/operations/decrypt.js.map +1 -1
  25. package/components/identity.tokens/operations/encrypt.js +1 -1
  26. package/components/identity.tokens/operations/encrypt.js.map +1 -1
  27. package/components/identity.tokens/operations/lib/types.d.ts +3 -2
  28. package/components/identity.tokens/operations/tsconfig.tsbuildinfo +1 -1
  29. package/components/identity.tokens/source/authenticate.test.ts +7 -2
  30. package/components/identity.tokens/source/decrypt.test.ts +13 -7
  31. package/components/identity.tokens/source/decrypt.ts +1 -1
  32. package/components/identity.tokens/source/encrypt.test.ts +9 -4
  33. package/components/identity.tokens/source/encrypt.ts +1 -1
  34. package/components/identity.tokens/source/lib/types.ts +3 -2
  35. package/context.toa.yaml +2 -2
  36. package/documentation/components.md +1 -1
  37. package/documentation/protocol.md +24 -0
  38. package/features/configuration.feature +207 -0
  39. package/features/identity.federation.feature +15 -7
  40. package/features/introspection.map.feature +16 -0
  41. package/features/octets.cloudinary.feature +8 -2
  42. package/features/octets.download.feature +3 -1
  43. package/features/probes.feature +8 -4
  44. package/features/steps/Common.ts +24 -1
  45. package/features/steps/Components.ts +29 -0
  46. package/features/steps/Gateway.ts +57 -11
  47. package/features/steps/Parameters.ts +4 -0
  48. package/features/steps/Probe.ts +34 -0
  49. package/package.json +4 -3
  50. package/readme.md +7 -13
  51. package/schemas/annotation.cos.yaml +11 -0
  52. package/source/Annotation.ts +11 -0
  53. package/source/HTTP/Context.ts +1 -6
  54. package/source/HTTP/Probe.ts +112 -0
  55. package/source/HTTP/Server.ts +123 -74
  56. package/source/HTTP/Timing.ts +1 -1
  57. package/source/HTTP/formats/yaml.test.ts +6 -0
  58. package/source/HTTP/formats/yaml.ts +21 -1
  59. package/source/HTTP/index.ts +2 -0
  60. package/source/HTTP/messages.test.ts +2 -5
  61. package/source/HTTP/messages.ts +38 -42
  62. package/source/HTTP/types.ts +39 -0
  63. package/source/deployment.ts +12 -4
  64. package/source/directives/octets/Get.ts +3 -3
  65. package/transpiled/Annotation.d.ts +10 -0
  66. package/transpiled/HTTP/Context.d.ts +1 -6
  67. package/transpiled/HTTP/Context.js.map +1 -1
  68. package/transpiled/HTTP/Probe.d.ts +36 -0
  69. package/transpiled/HTTP/Probe.js +117 -0
  70. package/transpiled/HTTP/Probe.js.map +1 -0
  71. package/transpiled/HTTP/Server.d.ts +11 -7
  72. package/transpiled/HTTP/Server.js +92 -58
  73. package/transpiled/HTTP/Server.js.map +1 -1
  74. package/transpiled/HTTP/Timing.d.ts +1 -2
  75. package/transpiled/HTTP/formats/yaml.js +15 -1
  76. package/transpiled/HTTP/formats/yaml.js.map +1 -1
  77. package/transpiled/HTTP/index.d.ts +2 -0
  78. package/transpiled/HTTP/index.js +2 -0
  79. package/transpiled/HTTP/index.js.map +1 -1
  80. package/transpiled/HTTP/messages.d.ts +8 -3
  81. package/transpiled/HTTP/messages.js +31 -37
  82. package/transpiled/HTTP/messages.js.map +1 -1
  83. package/transpiled/HTTP/types.d.ts +40 -0
  84. package/transpiled/HTTP/types.js +3 -0
  85. package/transpiled/HTTP/types.js.map +1 -0
  86. package/transpiled/deployment.js +8 -2
  87. package/transpiled/deployment.js.map +1 -1
  88. package/transpiled/directives/octets/Get.js +3 -3
  89. package/transpiled/directives/octets/Get.js.map +1 -1
  90. package/transpiled/tsconfig.tsbuildinfo +1 -1
@@ -1,4 +1,4 @@
1
- import { type Call, type Maybe, type Observation, type Query, type Transition } from '@toa.io/types';
1
+ import { type Call, type Maybe, type Observation, type Query, type Secret, type Transition } from '@toa.io/types';
2
2
  export interface Context {
3
3
  local: {
4
4
  observe: Observation<Maybe<Entity>>;
@@ -15,7 +15,7 @@ export interface Context {
15
15
  };
16
16
  configuration: {
17
17
  readonly rounds: number;
18
- readonly pepper: string;
18
+ readonly pepper?: Secret;
19
19
  readonly principal?: string;
20
20
  readonly username: string[];
21
21
  readonly password: string[];
@@ -17,7 +17,7 @@ export async function computation (input: Input, context: Context): Promise<Mayb
17
17
  if (credentials === null)
18
18
  return ERR_NOT_FOUND
19
19
 
20
- const spicy = password + context.configuration.pepper
20
+ const spicy = password + (context.configuration.pepper?.unwrap() ?? '')
21
21
  const match = await compare(spicy, credentials.password)
22
22
 
23
23
  if (match)
@@ -12,7 +12,7 @@ export class Transition implements Operation {
12
12
 
13
13
  public mount (context: Context): void {
14
14
  this.rounds = context.configuration.rounds
15
- this.pepper = context.configuration.pepper
15
+ this.pepper = context.configuration.pepper?.unwrap() ?? ''
16
16
  this.principal = context.configuration.principal
17
17
  this.tokens = context.remote.identity.tokens
18
18
 
@@ -1,4 +1,4 @@
1
- import { type Call, type Maybe, type Observation, type Query, type Transition } from '@toa.io/types'
1
+ import { type Call, type Maybe, type Observation, type Query, type Secret, type Transition } from '@toa.io/types'
2
2
 
3
3
  export interface Context {
4
4
  local: {
@@ -16,7 +16,7 @@ export interface Context {
16
16
  }
17
17
  configuration: {
18
18
  readonly rounds: number
19
- readonly pepper: string
19
+ readonly pepper?: Secret
20
20
  readonly principal?: string
21
21
  readonly username: string[]
22
22
  readonly password: string[]