@toa.io/extensions.origins 0.10.0-dev.9 → 0.20.0-alpha.0

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 (96) hide show
  1. package/package.json +17 -11
  2. package/readme.md +70 -67
  3. package/schemas/annotation.cos.yaml +3 -0
  4. package/schemas/manifest.cos.yaml +4 -0
  5. package/source/Factory.ts +88 -0
  6. package/source/annotation.test.ts +150 -0
  7. package/source/annotation.ts +83 -0
  8. package/source/extension.test.ts +161 -0
  9. package/source/extension.ts +60 -0
  10. package/source/index.ts +2 -0
  11. package/source/manifest.test.ts +30 -0
  12. package/source/manifest.ts +11 -0
  13. package/source/protocols/amqp/.test/aspect.fixtures.js +1 -1
  14. package/source/protocols/amqp/.test/mock.comq.js +2 -2
  15. package/source/protocols/amqp/aspect.js +17 -24
  16. package/source/protocols/amqp/deployment.js +8 -2
  17. package/source/protocols/http/.aspect/permissions.js +20 -15
  18. package/source/protocols/http/aspect.js +18 -38
  19. package/source/protocols/index.ts +16 -0
  20. package/transpiled/Factory.d.ts +17 -0
  21. package/transpiled/Factory.js +65 -0
  22. package/transpiled/Factory.js.map +1 -0
  23. package/transpiled/annotation.d.ts +10 -0
  24. package/transpiled/annotation.js +91 -0
  25. package/transpiled/annotation.js.map +1 -0
  26. package/transpiled/constants.d.ts +1 -0
  27. package/transpiled/constants.js +3 -0
  28. package/transpiled/constants.js.map +1 -0
  29. package/transpiled/env.d.ts +5 -0
  30. package/transpiled/env.js +40 -0
  31. package/transpiled/env.js.map +1 -0
  32. package/transpiled/extension.d.ts +10 -0
  33. package/transpiled/extension.js +49 -0
  34. package/transpiled/extension.js.map +1 -0
  35. package/transpiled/index.d.ts +2 -0
  36. package/transpiled/index.js +9 -0
  37. package/transpiled/index.js.map +1 -0
  38. package/transpiled/manifest.d.ts +2 -0
  39. package/transpiled/manifest.js +36 -0
  40. package/transpiled/manifest.js.map +1 -0
  41. package/transpiled/protocols/amqp/aspect.d.ts +11 -0
  42. package/transpiled/protocols/amqp/aspect.js +53 -0
  43. package/transpiled/protocols/amqp/aspect.js.map +1 -0
  44. package/transpiled/protocols/amqp/deployment.d.ts +5 -0
  45. package/transpiled/protocols/amqp/deployment.js +55 -0
  46. package/transpiled/protocols/amqp/deployment.js.map +1 -0
  47. package/transpiled/protocols/amqp/id.d.ts +1 -0
  48. package/transpiled/protocols/amqp/id.js +3 -0
  49. package/transpiled/protocols/amqp/id.js.map +1 -0
  50. package/transpiled/protocols/amqp/index.d.ts +5 -0
  51. package/transpiled/protocols/amqp/index.js +10 -0
  52. package/transpiled/protocols/amqp/index.js.map +1 -0
  53. package/transpiled/protocols/amqp/protocols.d.ts +2 -0
  54. package/transpiled/protocols/amqp/protocols.js +3 -0
  55. package/transpiled/protocols/amqp/protocols.js.map +1 -0
  56. package/transpiled/protocols/http/.aspect/permissions.d.ts +7 -0
  57. package/transpiled/protocols/http/.aspect/permissions.js +52 -0
  58. package/transpiled/protocols/http/.aspect/permissions.js.map +1 -0
  59. package/transpiled/protocols/http/aspect.d.ts +11 -0
  60. package/transpiled/protocols/http/aspect.js +88 -0
  61. package/transpiled/protocols/http/aspect.js.map +1 -0
  62. package/transpiled/protocols/http/id.d.ts +1 -0
  63. package/transpiled/protocols/http/id.js +3 -0
  64. package/transpiled/protocols/http/id.js.map +1 -0
  65. package/transpiled/protocols/http/index.d.ts +4 -0
  66. package/transpiled/protocols/http/index.js +8 -0
  67. package/transpiled/protocols/http/index.js.map +1 -0
  68. package/transpiled/protocols/http/protocols.d.ts +2 -0
  69. package/transpiled/protocols/http/protocols.js +3 -0
  70. package/transpiled/protocols/http/protocols.js.map +1 -0
  71. package/transpiled/protocols/index.d.ts +9 -0
  72. package/transpiled/protocols/index.js +10 -0
  73. package/transpiled/protocols/index.js.map +1 -0
  74. package/transpiled/tsconfig.tsbuildinfo +1 -0
  75. package/tsconfig.json +12 -0
  76. package/source/.deployment/index.js +0 -5
  77. package/source/.deployment/uris.js +0 -37
  78. package/source/.test/constants.js +0 -3
  79. package/source/.test/deployment.fixtures.js +0 -20
  80. package/source/.test/factory.fixtures.js +0 -13
  81. package/source/deployment.js +0 -28
  82. package/source/deployment.test.js +0 -173
  83. package/source/factory.js +0 -46
  84. package/source/factory.test.js +0 -140
  85. package/source/index.js +0 -9
  86. package/source/manifest.js +0 -38
  87. package/source/manifest.test.js +0 -75
  88. package/source/protocols/amqp/aspect.test.js +0 -119
  89. package/source/protocols/http/aspect.test.js +0 -239
  90. package/source/protocols/index.js +0 -6
  91. package/source/schemas/annotations.cos.yaml +0 -1
  92. package/source/schemas/index.js +0 -8
  93. package/source/schemas/manifest.cos.yaml +0 -2
  94. package/types/amqp.d.ts +0 -9
  95. package/types/deployment.d.ts +0 -7
  96. package/types/http.d.ts +0 -28
@@ -1,7 +0,0 @@
1
- declare namespace toa.origins {
2
-
3
- type Manifest = Record<string, string>
4
-
5
- type Annotations = Record<string, Manifest>
6
-
7
- }
package/types/http.d.ts DELETED
@@ -1,28 +0,0 @@
1
- import * as fetch from 'node-fetch'
2
- import * as _extensions from '@toa.io/core/types/extensions'
3
- import * as _retry from '@toa.io/generic/types/retry'
4
-
5
- declare namespace toa.origins.http {
6
-
7
- namespace invocation {
8
- type Options = {
9
- substitutions?: string[]
10
- retry?: _retry.Options
11
- }
12
- }
13
-
14
- type Properties = Record<string | null, boolean>
15
-
16
- interface Permissions {
17
- test(url: string): boolean
18
- }
19
-
20
- interface Aspect extends _extensions.Aspect {
21
- invoke(origin: string, path: string, request?: fetch.RequestInit, options?: invocation.Options): Promise<fetch.Response>
22
-
23
- invoke(url: string, request?: fetch.RequestInit): Promise<fetch.Response>
24
- }
25
-
26
- }
27
-
28
- export type Aspect = toa.origins.http.Aspect