@toa.io/definitions 1.0.0-alpha.288

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 (378) hide show
  1. package/digest/extensions.cadence.json +1 -0
  2. package/digest/extensions.configuration.json +1 -0
  3. package/digest/extensions.exposition.json +1 -0
  4. package/digest/extensions.introspection.json +1 -0
  5. package/digest/extensions.realtime.json +1 -0
  6. package/package.json +42 -0
  7. package/readme.md +75 -0
  8. package/schemas/extensions.cadence/annotation.cos.yaml +9 -0
  9. package/schemas/extensions.cadence/declaration.cos.yaml +20 -0
  10. package/schemas/extensions.configuration/annotation.cos.yaml +29 -0
  11. package/schemas/extensions.configuration/manifest.cos.yaml +9 -0
  12. package/schemas/extensions.exposition/annotation.cos.yaml +125 -0
  13. package/schemas/extensions.exposition/call.cos.yaml +18 -0
  14. package/schemas/extensions.exposition/directive.cos.yaml +7 -0
  15. package/schemas/extensions.exposition/method.cos.yaml +23 -0
  16. package/schemas/extensions.exposition/node.cos.yaml +22 -0
  17. package/schemas/extensions.exposition/query.cos.yaml +31 -0
  18. package/schemas/extensions.exposition/querystring.cos.yaml +19 -0
  19. package/schemas/extensions.exposition/range.cos.yaml +10 -0
  20. package/schemas/extensions.exposition/route.cos.yaml +6 -0
  21. package/schemas/extensions.introspection/annotation.cos.yaml +31 -0
  22. package/schemas/extensions.introspection/declaration.cos.yaml +5 -0
  23. package/schemas/extensions.storages/annotation.cos.yaml +11 -0
  24. package/schemas/extensions.storages/cloudinary.cos.yaml +38 -0
  25. package/schemas/extensions.storages/fs.cos.yaml +13 -0
  26. package/schemas/extensions.storages/s3.cos.yaml +17 -0
  27. package/schemas/extensions.storages/spaces.cos.yaml +16 -0
  28. package/schemas/extensions.storages/test.cos.yaml +10 -0
  29. package/schemas/extensions.storages/tmp.cos.yaml +10 -0
  30. package/source/bindings.amqp/annotation.ts +26 -0
  31. package/source/bindings.amqp/context.ts +68 -0
  32. package/source/bindings.amqp/deployment.ts +14 -0
  33. package/source/bindings.amqp/index.ts +9 -0
  34. package/source/bindings.amqp/instance.ts +3 -0
  35. package/source/bindings.amqp/sources.ts +39 -0
  36. package/source/bindings.loop/index.ts +3 -0
  37. package/source/bridges.bash/const.ts +2 -0
  38. package/source/bridges.bash/define.ts +38 -0
  39. package/source/bridges.bash/index.ts +2 -0
  40. package/source/bridges.node/define.ts +69 -0
  41. package/source/bridges.node/exports.ts +175 -0
  42. package/source/bridges.node/index.ts +6 -0
  43. package/source/bridges.node/operations.ts +127 -0
  44. package/source/bridges.node/sources.ts +44 -0
  45. package/source/definition.ts +38 -0
  46. package/source/digest/generate.ts +77 -0
  47. package/source/digest/read.ts +39 -0
  48. package/source/extensions.cadence/components.ts +6 -0
  49. package/source/extensions.cadence/const.ts +31 -0
  50. package/source/extensions.cadence/context.ts +10 -0
  51. package/source/extensions.cadence/deployment.ts +37 -0
  52. package/source/extensions.cadence/index.ts +8 -0
  53. package/source/extensions.cadence/manifest.ts +64 -0
  54. package/source/extensions.cadence/schemas.ts +10 -0
  55. package/source/extensions.cadence/types.ts +41 -0
  56. package/source/extensions.configuration/components.ts +6 -0
  57. package/source/extensions.configuration/const.ts +30 -0
  58. package/source/extensions.configuration/context.ts +13 -0
  59. package/source/extensions.configuration/deployment.ts +159 -0
  60. package/source/extensions.configuration/epoch.ts +22 -0
  61. package/source/extensions.configuration/index.ts +10 -0
  62. package/source/extensions.configuration/manifest.ts +12 -0
  63. package/source/extensions.configuration/schemas.ts +9 -0
  64. package/source/extensions.exposition/Annotation.ts +91 -0
  65. package/source/extensions.exposition/components.ts +6 -0
  66. package/source/extensions.exposition/const.ts +45 -0
  67. package/source/extensions.exposition/deployment.ts +95 -0
  68. package/source/extensions.exposition/index.ts +16 -0
  69. package/source/extensions.exposition/manifest.ts +56 -0
  70. package/source/extensions.exposition/schemas.ts +16 -0
  71. package/source/extensions.exposition/shortcuts.ts +14 -0
  72. package/source/extensions.exposition/syntax/index.ts +2 -0
  73. package/source/extensions.exposition/syntax/parse.ts +171 -0
  74. package/source/extensions.exposition/syntax/types.ts +69 -0
  75. package/source/extensions.fetch/context.ts +10 -0
  76. package/source/extensions.fetch/index.ts +1 -0
  77. package/source/extensions.introspection/annotation.ts +87 -0
  78. package/source/extensions.introspection/components.ts +13 -0
  79. package/source/extensions.introspection/const.ts +46 -0
  80. package/source/extensions.introspection/deployment.ts +48 -0
  81. package/source/extensions.introspection/index.ts +6 -0
  82. package/source/extensions.introspection/manifest.ts +18 -0
  83. package/source/extensions.introspection/schemas.ts +12 -0
  84. package/source/extensions.realtime/components.ts +5 -0
  85. package/source/extensions.realtime/deployment.ts +89 -0
  86. package/source/extensions.realtime/index.ts +4 -0
  87. package/source/extensions.stash/context.ts +10 -0
  88. package/source/extensions.stash/deployment.ts +22 -0
  89. package/source/extensions.stash/index.ts +2 -0
  90. package/source/extensions.state/context.ts +9 -0
  91. package/source/extensions.state/index.ts +1 -0
  92. package/source/extensions.storages/Annotation.ts +57 -0
  93. package/source/extensions.storages/context.ts +14 -0
  94. package/source/extensions.storages/deployment.ts +91 -0
  95. package/source/extensions.storages/index.ts +9 -0
  96. package/source/extensions.storages/manifest.ts +7 -0
  97. package/source/extensions.storages/schemas.ts +15 -0
  98. package/source/extensions.storages/secrets.ts +22 -0
  99. package/source/extensions.telemetry/const.ts +6 -0
  100. package/source/extensions.telemetry/context.ts +11 -0
  101. package/source/extensions.telemetry/deployment.ts +91 -0
  102. package/source/extensions.telemetry/index.ts +5 -0
  103. package/source/extensions.telemetry/ready.ts +33 -0
  104. package/source/index.ts +2 -0
  105. package/source/storages.mongodb/deployment.ts +22 -0
  106. package/source/storages.mongodb/index.ts +1 -0
  107. package/source/version.ts +10 -0
  108. package/transpiled/bindings.amqp/annotation.d.ts +10 -0
  109. package/transpiled/bindings.amqp/annotation.js +16 -0
  110. package/transpiled/bindings.amqp/annotation.js.map +1 -0
  111. package/transpiled/bindings.amqp/annotation.test.d.ts +1 -0
  112. package/transpiled/bindings.amqp/annotation.test.js +36 -0
  113. package/transpiled/bindings.amqp/annotation.test.js.map +1 -0
  114. package/transpiled/bindings.amqp/context.d.ts +7 -0
  115. package/transpiled/bindings.amqp/context.js +47 -0
  116. package/transpiled/bindings.amqp/context.js.map +1 -0
  117. package/transpiled/bindings.amqp/deployment.d.ts +4 -0
  118. package/transpiled/bindings.amqp/deployment.js +11 -0
  119. package/transpiled/bindings.amqp/deployment.js.map +1 -0
  120. package/transpiled/bindings.amqp/index.d.ts +6 -0
  121. package/transpiled/bindings.amqp/index.js +5 -0
  122. package/transpiled/bindings.amqp/index.js.map +1 -0
  123. package/transpiled/bindings.amqp/instance.d.ts +2 -0
  124. package/transpiled/bindings.amqp/instance.js +2 -0
  125. package/transpiled/bindings.amqp/instance.js.map +1 -0
  126. package/transpiled/bindings.amqp/properties.test.d.ts +1 -0
  127. package/transpiled/bindings.amqp/properties.test.js +7 -0
  128. package/transpiled/bindings.amqp/properties.test.js.map +1 -0
  129. package/transpiled/bindings.amqp/sources.d.ts +7 -0
  130. package/transpiled/bindings.amqp/sources.js +27 -0
  131. package/transpiled/bindings.amqp/sources.js.map +1 -0
  132. package/transpiled/bindings.loop/index.d.ts +2 -0
  133. package/transpiled/bindings.loop/index.js +2 -0
  134. package/transpiled/bindings.loop/index.js.map +1 -0
  135. package/transpiled/bindings.loop/properties.test.d.ts +1 -0
  136. package/transpiled/bindings.loop/properties.test.js +7 -0
  137. package/transpiled/bindings.loop/properties.test.js.map +1 -0
  138. package/transpiled/bridges.bash/const.d.ts +2 -0
  139. package/transpiled/bridges.bash/const.js +3 -0
  140. package/transpiled/bridges.bash/const.js.map +1 -0
  141. package/transpiled/bridges.bash/define.d.ts +3 -0
  142. package/transpiled/bridges.bash/define.js +25 -0
  143. package/transpiled/bridges.bash/define.js.map +1 -0
  144. package/transpiled/bridges.bash/index.d.ts +2 -0
  145. package/transpiled/bridges.bash/index.js +3 -0
  146. package/transpiled/bridges.bash/index.js.map +1 -0
  147. package/transpiled/bridges.node/define.d.ts +18 -0
  148. package/transpiled/bridges.node/define.js +46 -0
  149. package/transpiled/bridges.node/define.js.map +1 -0
  150. package/transpiled/bridges.node/exports.d.ts +16 -0
  151. package/transpiled/bridges.node/exports.js +134 -0
  152. package/transpiled/bridges.node/exports.js.map +1 -0
  153. package/transpiled/bridges.node/exports.test.d.ts +1 -0
  154. package/transpiled/bridges.node/exports.test.js +88 -0
  155. package/transpiled/bridges.node/exports.test.js.map +1 -0
  156. package/transpiled/bridges.node/index.d.ts +5 -0
  157. package/transpiled/bridges.node/index.js +4 -0
  158. package/transpiled/bridges.node/index.js.map +1 -0
  159. package/transpiled/bridges.node/operations.d.ts +13 -0
  160. package/transpiled/bridges.node/operations.js +96 -0
  161. package/transpiled/bridges.node/operations.js.map +1 -0
  162. package/transpiled/bridges.node/operations.test.d.ts +1 -0
  163. package/transpiled/bridges.node/operations.test.js +108 -0
  164. package/transpiled/bridges.node/operations.test.js.map +1 -0
  165. package/transpiled/bridges.node/sources.d.ts +7 -0
  166. package/transpiled/bridges.node/sources.js +36 -0
  167. package/transpiled/bridges.node/sources.js.map +1 -0
  168. package/transpiled/definition.d.ts +7 -0
  169. package/transpiled/definition.js +34 -0
  170. package/transpiled/definition.js.map +1 -0
  171. package/transpiled/digest/generate.d.ts +1 -0
  172. package/transpiled/digest/generate.js +60 -0
  173. package/transpiled/digest/generate.js.map +1 -0
  174. package/transpiled/digest/read.d.ts +16 -0
  175. package/transpiled/digest/read.js +22 -0
  176. package/transpiled/digest/read.js.map +1 -0
  177. package/transpiled/extensions.cadence/components.d.ts +3 -0
  178. package/transpiled/extensions.cadence/components.js +6 -0
  179. package/transpiled/extensions.cadence/components.js.map +1 -0
  180. package/transpiled/extensions.cadence/const.d.ts +21 -0
  181. package/transpiled/extensions.cadence/const.js +26 -0
  182. package/transpiled/extensions.cadence/const.js.map +1 -0
  183. package/transpiled/extensions.cadence/context.d.ts +3 -0
  184. package/transpiled/extensions.cadence/context.js +9 -0
  185. package/transpiled/extensions.cadence/context.js.map +1 -0
  186. package/transpiled/extensions.cadence/deployment.d.ts +9 -0
  187. package/transpiled/extensions.cadence/deployment.js +28 -0
  188. package/transpiled/extensions.cadence/deployment.js.map +1 -0
  189. package/transpiled/extensions.cadence/index.d.ts +7 -0
  190. package/transpiled/extensions.cadence/index.js +7 -0
  191. package/transpiled/extensions.cadence/index.js.map +1 -0
  192. package/transpiled/extensions.cadence/manifest.d.ts +11 -0
  193. package/transpiled/extensions.cadence/manifest.js +42 -0
  194. package/transpiled/extensions.cadence/manifest.js.map +1 -0
  195. package/transpiled/extensions.cadence/manifest.test.d.ts +1 -0
  196. package/transpiled/extensions.cadence/manifest.test.js +41 -0
  197. package/transpiled/extensions.cadence/manifest.test.js.map +1 -0
  198. package/transpiled/extensions.cadence/schemas.d.ts +4 -0
  199. package/transpiled/extensions.cadence/schemas.js +7 -0
  200. package/transpiled/extensions.cadence/schemas.js.map +1 -0
  201. package/transpiled/extensions.cadence/types.d.ts +34 -0
  202. package/transpiled/extensions.cadence/types.js +2 -0
  203. package/transpiled/extensions.cadence/types.js.map +1 -0
  204. package/transpiled/extensions.configuration/components.d.ts +3 -0
  205. package/transpiled/extensions.configuration/components.js +6 -0
  206. package/transpiled/extensions.configuration/components.js.map +1 -0
  207. package/transpiled/extensions.configuration/const.d.ts +18 -0
  208. package/transpiled/extensions.configuration/const.js +22 -0
  209. package/transpiled/extensions.configuration/const.js.map +1 -0
  210. package/transpiled/extensions.configuration/context.d.ts +4 -0
  211. package/transpiled/extensions.configuration/context.js +9 -0
  212. package/transpiled/extensions.configuration/context.js.map +1 -0
  213. package/transpiled/extensions.configuration/deployment.d.ts +17 -0
  214. package/transpiled/extensions.configuration/deployment.js +106 -0
  215. package/transpiled/extensions.configuration/deployment.js.map +1 -0
  216. package/transpiled/extensions.configuration/deployment.test.d.ts +1 -0
  217. package/transpiled/extensions.configuration/deployment.test.js +74 -0
  218. package/transpiled/extensions.configuration/deployment.test.js.map +1 -0
  219. package/transpiled/extensions.configuration/epoch.d.ts +2 -0
  220. package/transpiled/extensions.configuration/epoch.js +19 -0
  221. package/transpiled/extensions.configuration/epoch.js.map +1 -0
  222. package/transpiled/extensions.configuration/index.d.ts +9 -0
  223. package/transpiled/extensions.configuration/index.js +8 -0
  224. package/transpiled/extensions.configuration/index.js.map +1 -0
  225. package/transpiled/extensions.configuration/manifest.d.ts +5 -0
  226. package/transpiled/extensions.configuration/manifest.js +6 -0
  227. package/transpiled/extensions.configuration/manifest.js.map +1 -0
  228. package/transpiled/extensions.configuration/manifest.test.d.ts +1 -0
  229. package/transpiled/extensions.configuration/manifest.test.js +14 -0
  230. package/transpiled/extensions.configuration/manifest.test.js.map +1 -0
  231. package/transpiled/extensions.configuration/schemas.d.ts +3 -0
  232. package/transpiled/extensions.configuration/schemas.js +7 -0
  233. package/transpiled/extensions.configuration/schemas.js.map +1 -0
  234. package/transpiled/extensions.exposition/Annotation.d.ts +71 -0
  235. package/transpiled/extensions.exposition/Annotation.js +2 -0
  236. package/transpiled/extensions.exposition/Annotation.js.map +1 -0
  237. package/transpiled/extensions.exposition/components.d.ts +3 -0
  238. package/transpiled/extensions.exposition/components.js +6 -0
  239. package/transpiled/extensions.exposition/components.js.map +1 -0
  240. package/transpiled/extensions.exposition/const.d.ts +36 -0
  241. package/transpiled/extensions.exposition/const.js +37 -0
  242. package/transpiled/extensions.exposition/const.js.map +1 -0
  243. package/transpiled/extensions.exposition/deployment.d.ts +6 -0
  244. package/transpiled/extensions.exposition/deployment.js +75 -0
  245. package/transpiled/extensions.exposition/deployment.js.map +1 -0
  246. package/transpiled/extensions.exposition/index.d.ts +8 -0
  247. package/transpiled/extensions.exposition/index.js +8 -0
  248. package/transpiled/extensions.exposition/index.js.map +1 -0
  249. package/transpiled/extensions.exposition/manifest.d.ts +3 -0
  250. package/transpiled/extensions.exposition/manifest.js +39 -0
  251. package/transpiled/extensions.exposition/manifest.js.map +1 -0
  252. package/transpiled/extensions.exposition/manifest.test.d.ts +1 -0
  253. package/transpiled/extensions.exposition/manifest.test.js +38 -0
  254. package/transpiled/extensions.exposition/manifest.test.js.map +1 -0
  255. package/transpiled/extensions.exposition/schemas.d.ts +7 -0
  256. package/transpiled/extensions.exposition/schemas.js +10 -0
  257. package/transpiled/extensions.exposition/schemas.js.map +1 -0
  258. package/transpiled/extensions.exposition/schemas.test.d.ts +1 -0
  259. package/transpiled/extensions.exposition/schemas.test.js +22 -0
  260. package/transpiled/extensions.exposition/schemas.test.js.map +1 -0
  261. package/transpiled/extensions.exposition/shortcuts.d.ts +3 -0
  262. package/transpiled/extensions.exposition/shortcuts.js +13 -0
  263. package/transpiled/extensions.exposition/shortcuts.js.map +1 -0
  264. package/transpiled/extensions.exposition/syntax/index.d.ts +2 -0
  265. package/transpiled/extensions.exposition/syntax/index.js +3 -0
  266. package/transpiled/extensions.exposition/syntax/index.js.map +1 -0
  267. package/transpiled/extensions.exposition/syntax/parse.d.ts +4 -0
  268. package/transpiled/extensions.exposition/syntax/parse.js +112 -0
  269. package/transpiled/extensions.exposition/syntax/parse.js.map +1 -0
  270. package/transpiled/extensions.exposition/syntax/parse.test.d.ts +1 -0
  271. package/transpiled/extensions.exposition/syntax/parse.test.js +156 -0
  272. package/transpiled/extensions.exposition/syntax/parse.test.js.map +1 -0
  273. package/transpiled/extensions.exposition/syntax/types.d.ts +52 -0
  274. package/transpiled/extensions.exposition/syntax/types.js +11 -0
  275. package/transpiled/extensions.exposition/syntax/types.js.map +1 -0
  276. package/transpiled/extensions.fetch/context.d.ts +3 -0
  277. package/transpiled/extensions.fetch/context.js +9 -0
  278. package/transpiled/extensions.fetch/context.js.map +1 -0
  279. package/transpiled/extensions.fetch/index.d.ts +1 -0
  280. package/transpiled/extensions.fetch/index.js +2 -0
  281. package/transpiled/extensions.fetch/index.js.map +1 -0
  282. package/transpiled/extensions.introspection/annotation.d.ts +40 -0
  283. package/transpiled/extensions.introspection/annotation.js +39 -0
  284. package/transpiled/extensions.introspection/annotation.js.map +1 -0
  285. package/transpiled/extensions.introspection/components.d.ts +8 -0
  286. package/transpiled/extensions.introspection/components.js +12 -0
  287. package/transpiled/extensions.introspection/components.js.map +1 -0
  288. package/transpiled/extensions.introspection/const.d.ts +30 -0
  289. package/transpiled/extensions.introspection/const.js +35 -0
  290. package/transpiled/extensions.introspection/const.js.map +1 -0
  291. package/transpiled/extensions.introspection/deployment.d.ts +14 -0
  292. package/transpiled/extensions.introspection/deployment.js +41 -0
  293. package/transpiled/extensions.introspection/deployment.js.map +1 -0
  294. package/transpiled/extensions.introspection/index.d.ts +6 -0
  295. package/transpiled/extensions.introspection/index.js +7 -0
  296. package/transpiled/extensions.introspection/index.js.map +1 -0
  297. package/transpiled/extensions.introspection/manifest.d.ts +9 -0
  298. package/transpiled/extensions.introspection/manifest.js +16 -0
  299. package/transpiled/extensions.introspection/manifest.js.map +1 -0
  300. package/transpiled/extensions.introspection/schemas.d.ts +4 -0
  301. package/transpiled/extensions.introspection/schemas.js +7 -0
  302. package/transpiled/extensions.introspection/schemas.js.map +1 -0
  303. package/transpiled/extensions.realtime/components.d.ts +2 -0
  304. package/transpiled/extensions.realtime/components.js +5 -0
  305. package/transpiled/extensions.realtime/components.js.map +1 -0
  306. package/transpiled/extensions.realtime/deployment.d.ts +22 -0
  307. package/transpiled/extensions.realtime/deployment.js +53 -0
  308. package/transpiled/extensions.realtime/deployment.js.map +1 -0
  309. package/transpiled/extensions.realtime/index.d.ts +3 -0
  310. package/transpiled/extensions.realtime/index.js +3 -0
  311. package/transpiled/extensions.realtime/index.js.map +1 -0
  312. package/transpiled/extensions.stash/context.d.ts +3 -0
  313. package/transpiled/extensions.stash/context.js +9 -0
  314. package/transpiled/extensions.stash/context.js.map +1 -0
  315. package/transpiled/extensions.stash/deployment.d.ts +5 -0
  316. package/transpiled/extensions.stash/deployment.js +14 -0
  317. package/transpiled/extensions.stash/deployment.js.map +1 -0
  318. package/transpiled/extensions.stash/index.d.ts +2 -0
  319. package/transpiled/extensions.stash/index.js +3 -0
  320. package/transpiled/extensions.stash/index.js.map +1 -0
  321. package/transpiled/extensions.state/context.d.ts +6 -0
  322. package/transpiled/extensions.state/context.js +8 -0
  323. package/transpiled/extensions.state/context.js.map +1 -0
  324. package/transpiled/extensions.state/index.d.ts +1 -0
  325. package/transpiled/extensions.state/index.js +2 -0
  326. package/transpiled/extensions.state/index.js.map +1 -0
  327. package/transpiled/extensions.storages/Annotation.d.ts +8 -0
  328. package/transpiled/extensions.storages/Annotation.js +31 -0
  329. package/transpiled/extensions.storages/Annotation.js.map +1 -0
  330. package/transpiled/extensions.storages/context.d.ts +3 -0
  331. package/transpiled/extensions.storages/context.js +12 -0
  332. package/transpiled/extensions.storages/context.js.map +1 -0
  333. package/transpiled/extensions.storages/deployment.d.ts +5 -0
  334. package/transpiled/extensions.storages/deployment.js +64 -0
  335. package/transpiled/extensions.storages/deployment.js.map +1 -0
  336. package/transpiled/extensions.storages/index.d.ts +8 -0
  337. package/transpiled/extensions.storages/index.js +7 -0
  338. package/transpiled/extensions.storages/index.js.map +1 -0
  339. package/transpiled/extensions.storages/manifest.d.ts +1 -0
  340. package/transpiled/extensions.storages/manifest.js +8 -0
  341. package/transpiled/extensions.storages/manifest.js.map +1 -0
  342. package/transpiled/extensions.storages/schemas.d.ts +9 -0
  343. package/transpiled/extensions.storages/schemas.js +12 -0
  344. package/transpiled/extensions.storages/schemas.js.map +1 -0
  345. package/transpiled/extensions.storages/schemas.test.d.ts +1 -0
  346. package/transpiled/extensions.storages/schemas.test.js +59 -0
  347. package/transpiled/extensions.storages/schemas.test.js.map +1 -0
  348. package/transpiled/extensions.storages/secrets.d.ts +10 -0
  349. package/transpiled/extensions.storages/secrets.js +16 -0
  350. package/transpiled/extensions.storages/secrets.js.map +1 -0
  351. package/transpiled/extensions.telemetry/const.d.ts +4 -0
  352. package/transpiled/extensions.telemetry/const.js +6 -0
  353. package/transpiled/extensions.telemetry/const.js.map +1 -0
  354. package/transpiled/extensions.telemetry/context.d.ts +3 -0
  355. package/transpiled/extensions.telemetry/context.js +9 -0
  356. package/transpiled/extensions.telemetry/context.js.map +1 -0
  357. package/transpiled/extensions.telemetry/deployment.d.ts +18 -0
  358. package/transpiled/extensions.telemetry/deployment.js +49 -0
  359. package/transpiled/extensions.telemetry/deployment.js.map +1 -0
  360. package/transpiled/extensions.telemetry/index.d.ts +5 -0
  361. package/transpiled/extensions.telemetry/index.js +5 -0
  362. package/transpiled/extensions.telemetry/index.js.map +1 -0
  363. package/transpiled/extensions.telemetry/ready.d.ts +14 -0
  364. package/transpiled/extensions.telemetry/ready.js +16 -0
  365. package/transpiled/extensions.telemetry/ready.js.map +1 -0
  366. package/transpiled/index.d.ts +2 -0
  367. package/transpiled/index.js +3 -0
  368. package/transpiled/index.js.map +1 -0
  369. package/transpiled/storages.mongodb/deployment.d.ts +5 -0
  370. package/transpiled/storages.mongodb/deployment.js +14 -0
  371. package/transpiled/storages.mongodb/deployment.js.map +1 -0
  372. package/transpiled/storages.mongodb/index.d.ts +1 -0
  373. package/transpiled/storages.mongodb/index.js +2 -0
  374. package/transpiled/storages.mongodb/index.js.map +1 -0
  375. package/transpiled/version.d.ts +5 -0
  376. package/transpiled/version.js +8 -0
  377. package/transpiled/version.js.map +1 -0
  378. package/tsconfig.json +10 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../source/extensions.cadence/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAI1C,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,kCAAkC,CAAC,CAAA;AAC7E,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AAEzC,MAAM,CAAC,MAAM,WAAW,GAAwB,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,CAAA;AAC/E,MAAM,CAAC,MAAM,UAAU,GAAuB,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA"}
@@ -0,0 +1,34 @@
1
+ /** What one component declares under `cadence:`, by the operation each one calls. */
2
+ export type Declaration = Record<string, Pulse>;
3
+ export interface Pulse {
4
+ /** seconds one whole cycle takes */
5
+ cycle: number;
6
+ /** intervals the cycle is split into; the gap between calls is `cycle / intervals` */
7
+ intervals: number;
8
+ }
9
+ /** `context.delay` — a call to be made later, answering the id that cancels it. */
10
+ export interface Delay {
11
+ (endpoint: string, request: object | null, options: Options): Promise<string>;
12
+ /** Raises where the id was never issued. */
13
+ cancel: (id: string) => Promise<void>;
14
+ }
15
+ export interface Options {
16
+ /** milliseconds from now */
17
+ interval: number;
18
+ /**
19
+ * Milliseconds the call may be late and still be made, or `null` for no bound at all.
20
+ *
21
+ * Stated rather than defaulted, because only the caller knows whether a late call is still
22
+ * the right call: an unpaid order expires on time or not at all, and a report is wanted
23
+ * whenever it can be had. Nothing else in the system can tell those apart.
24
+ *
25
+ * An upper bound on lateness, not a promise of timeliness. It is bounded below by how often
26
+ * a dispatcher scans, so a bound shorter than that is one nothing can honour.
27
+ */
28
+ overdue: number | null;
29
+ }
30
+ /** What an application states under `cadence:` in its context. */
31
+ export interface Annotation {
32
+ /** seconds between passes over the calls waiting to be made */
33
+ discreteness?: number;
34
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../source/extensions.cadence/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { type Components } from '../digest/read.js';
2
+ /** The values component, which runs in the service of its own. */
3
+ export declare function components(): Components;
@@ -0,0 +1,6 @@
1
+ import { components as digest } from '../digest/read.js';
2
+ /** The values component, which runs in the service of its own. */
3
+ export function components() {
4
+ return digest('extensions.configuration');
5
+ }
6
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../../source/extensions.configuration/components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,MAAM,EAAmB,MAAM,mBAAmB,CAAA;AAEzE,kEAAkE;AAClE,MAAM,UAAU,UAAU;IACxB,OAAO,MAAM,CAAC,0BAA0B,CAAC,CAAA;AAC3C,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { Source } from '@toa.io/core/types';
2
+ /** Per-component variables: the local override and the secrets. */
3
+ export declare const PREFIX = "TOA_CONFIGURATION_";
4
+ /** The map of every configured component, on the values service. */
5
+ export declare const VALUES = "TOA_CONFIGURATION_VALUES";
6
+ export declare const SECRET_RX: RegExp;
7
+ /** Where the UI is mounted; `/configuration/*` belongs to the component's own API. */
8
+ export declare const UI_PATH = "/.configuration";
9
+ export declare const UI_PORT = 8003;
10
+ /**
11
+ * The port the UI is served on. `UI_PORT` is what a deployment publishes and what the chart
12
+ * renders; the variable is for a machine that runs more than one Toa process — a Toa checkout
13
+ * beside an application, or two applications — where one of them has to give it up.
14
+ */
15
+ export declare const UI_PORT_ENV = "TOA_CONFIGURATION_UI_PORT";
16
+ export declare function uiPort(): number;
17
+ export declare const EVENT = "configuration.values.created";
18
+ export declare const SOURCE: Source;
@@ -0,0 +1,22 @@
1
+ import { environment } from '@toa.io/generic';
2
+ /** Per-component variables: the local override and the secrets. */
3
+ export const PREFIX = 'TOA_CONFIGURATION_';
4
+ /** The map of every configured component, on the values service. */
5
+ export const VALUES = 'TOA_CONFIGURATION_VALUES';
6
+ export const SECRET_RX = /^\$(?<variable>[A-Z0-9_]{1,32})$/;
7
+ /** Where the UI is mounted; `/configuration/*` belongs to the component's own API. */
8
+ export const UI_PATH = '/.configuration';
9
+ export const UI_PORT = 8003;
10
+ /**
11
+ * The port the UI is served on. `UI_PORT` is what a deployment publishes and what the chart
12
+ * renders; the variable is for a machine that runs more than one Toa process — a Toa checkout
13
+ * beside an application, or two applications — where one of them has to give it up.
14
+ */
15
+ export const UI_PORT_ENV = 'TOA_CONFIGURATION_UI_PORT';
16
+ export function uiPort() {
17
+ const value = environment.get(UI_PORT_ENV);
18
+ return value === undefined ? UI_PORT : Number(value);
19
+ }
20
+ export const EVENT = 'configuration.values.created';
21
+ export const SOURCE = { service: 'configuration' };
22
+ //# sourceMappingURL=const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["../../source/extensions.configuration/const.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAG7C,mEAAmE;AACnE,MAAM,CAAC,MAAM,MAAM,GAAG,oBAAoB,CAAA;AAE1C,oEAAoE;AACpE,MAAM,CAAC,MAAM,MAAM,GAAG,0BAA0B,CAAA;AAEhD,MAAM,CAAC,MAAM,SAAS,GAAG,kCAAkC,CAAA;AAE3D,sFAAsF;AACtF,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAA;AACxC,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAA;AAE3B;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,2BAA2B,CAAA;AACtD,MAAM,UAAU,MAAM;IACpB,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IAE1C,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACtD,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,8BAA8B,CAAA;AAEnD,MAAM,CAAC,MAAM,MAAM,GAAW,EAAE,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { Manifest } from './manifest.js';
2
+ import type { Contribution } from '@toa.io/core/types';
3
+ /** What this extension puts on the context of a component that declares it. */
4
+ export declare function context(declaration: Manifest): Contribution;
@@ -0,0 +1,9 @@
1
+ /** What this extension puts on the context of a component that declares it. */
2
+ export function context(declaration) {
3
+ const contribution = { name: 'configuration', schema: declaration.schema };
4
+ // a value the schema declares a secret is one on the context, not a string
5
+ if (JSON.stringify(declaration.schema).includes('"secret"'))
6
+ contribution.imports = { '@toa.io/extensions.configuration': ['Secret'] };
7
+ return contribution;
8
+ }
9
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../source/extensions.configuration/context.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,MAAM,UAAU,OAAO,CAAC,WAAqB;IAC3C,MAAM,YAAY,GAAiB,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,CAAA;IAExF,2EAA2E;IAC3E,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QACzD,YAAY,CAAC,OAAO,GAAG,EAAE,kCAAkC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAA;IAE3E,OAAO,YAAY,CAAA;AACrB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type Dependency } from '@toa.io/operations';
2
+ import type { Manifest } from './manifest.js';
3
+ import type { context } from '@toa.io/norm';
4
+ /** Where Toa's release publishes this service's image. An application takes it
5
+ * instead of building one when its context says `registry.services: published`. */
6
+ export declare const image = "ghcr.io/toa-io/extension-configuration-values";
7
+ export declare function deployment(instances: Instance[], annotation?: Annotation): Dependency;
8
+ /** What the values service is given: the epoch, the schema and the defaults of every component. */
9
+ export declare function describe(instances: Instance[], annotation?: Annotation): Values;
10
+ export type Annotation = Record<string, object>;
11
+ export type Instance = context.Dependency<Manifest>;
12
+ export type Values = Record<string, Entry>;
13
+ export interface Entry {
14
+ epoch: string;
15
+ schema: object;
16
+ defaults?: object;
17
+ }
@@ -0,0 +1,106 @@
1
+ import assert from 'node:assert';
2
+ import { add } from '@toa.io/generic';
3
+ import { components } from './components.js';
4
+ import { version } from '../version.js';
5
+ import { EVENT, PREFIX, SECRET_RX, UI_PATH, UI_PORT, VALUES } from './const.js';
6
+ import { epoch } from './epoch.js';
7
+ import * as validators from './schemas.js';
8
+ /** Where Toa's release publishes this service's image. An application takes it
9
+ * instead of building one when its context says `registry.services: published`. */
10
+ export const image = 'ghcr.io/toa-io/extension-configuration-values';
11
+ export function deployment(instances, annotation = {}) {
12
+ const { resources, values } = split(annotation);
13
+ annotation = prepare(values, instances);
14
+ const variables = {};
15
+ for (const instance of instances) {
16
+ const values = annotation[instance.locator.id];
17
+ if (values === undefined)
18
+ continue;
19
+ const secrets = createSecrets(values);
20
+ if (secrets.length > 0)
21
+ variables[instance.locator.label] = secrets;
22
+ }
23
+ const service = {
24
+ group: 'configuration',
25
+ name: 'values',
26
+ image,
27
+ version,
28
+ components: components().labels,
29
+ resources,
30
+ // the service that holds the values also serves the page that reads them
31
+ port: UI_PORT,
32
+ ingress: { path: UI_PATH },
33
+ variables: [
34
+ {
35
+ name: VALUES,
36
+ value: JSON.stringify(describe(instances, annotation))
37
+ }
38
+ ]
39
+ };
40
+ return { services: [service], variables, events: [EVENT] };
41
+ }
42
+ /** What the values service is given: the epoch, the schema and the defaults of every component. */
43
+ export function describe(instances, annotation = {}) {
44
+ annotation = prepare(split(annotation).values, instances);
45
+ const values = {};
46
+ for (const { locator, manifest } of instances) {
47
+ const deployed = annotation[locator.id];
48
+ values[locator.id] = {
49
+ epoch: epoch(manifest.schema),
50
+ schema: manifest.schema,
51
+ // what the Context says stands over what the manifest declares, value by value: a
52
+ // deployment that names one of them does not thereby unset the rest
53
+ defaults: deployed === undefined
54
+ ? manifest.defaults
55
+ : add(structuredClone(deployed), manifest.defaults ?? {})
56
+ };
57
+ }
58
+ return values;
59
+ }
60
+ function createSecrets(values) {
61
+ const secrets = [];
62
+ for (const value of Object.values(values)) {
63
+ if (typeof value === 'object' && value !== null)
64
+ secrets.push(...createSecrets(value));
65
+ if (typeof value !== 'string')
66
+ continue;
67
+ const match = value.match(SECRET_RX);
68
+ if (match === null)
69
+ continue;
70
+ const name = match.groups?.variable;
71
+ assert.ok(name !== undefined);
72
+ secrets.push({
73
+ name: PREFIX + '_' + name,
74
+ secret: {
75
+ name: 'toa-configuration',
76
+ key: name
77
+ }
78
+ });
79
+ }
80
+ return secrets;
81
+ }
82
+ /**
83
+ * The service's own resources, and the component values that are the rest of the annotation.
84
+ *
85
+ * Every key here names a component, so the one option the service has of its own needs a
86
+ * name that cannot be mistaken for one. `resources` is reserved: a component actually
87
+ * called that is written with its namespace, `default.resources`, which is what an id is
88
+ * anyway — the bare form is the shorthand.
89
+ */
90
+ function split(annotation) {
91
+ validators.annotation.validate(annotation);
92
+ const { resources, ...values } = annotation;
93
+ return { resources, values };
94
+ }
95
+ /** Validated, keyed by full component ids, and checked against the components that ask. */
96
+ function prepare(annotation, instances) {
97
+ const normalized = {};
98
+ const requested = instances.map((instance) => instance.locator.id);
99
+ for (const [key, values] of Object.entries(annotation)) {
100
+ const id = key.includes('.') ? key : 'default.' + key;
101
+ assert.ok(requested.includes(id), `Component '${id}' does not request configuration or does not exist.`);
102
+ normalized[id] = values;
103
+ }
104
+ return normalized;
105
+ }
106
+ //# sourceMappingURL=deployment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment.js","sourceRoot":"","sources":["../../source/extensions.configuration/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAQhC,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAI1C;oFACoF;AACpF,MAAM,CAAC,MAAM,KAAK,GA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C,IAAI,CAAC;YACX,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI;YACzB,MAAM,EAAE;gBACN,IAAI,EAAE,mBAAmB;gBACzB,GAAG,EAAE,IAAI;aACV;SACF,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,KAAK,CAAC,UAAsB;IACnC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;IAE1C,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,GAAG,UAAoD,CAAA;IAErF,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,CAAA;AAC9B,CAAC;AAED,2FAA2F;AAC3F,SAAS,OAAO,CAAC,UAAsB,EAAE,SAAqB;IAC5D,MAAM,UAAU,GAAe,EAAE,CAAA;IACjC,MAAM,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAElE,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACvD,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,GAAG,GAAG,CAAA;QAErD,MAAM,CAAC,EAAE,CACP,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,EACtB,cAAc,EAAE,qDAAqD,CACtE,CAAA;QAED,UAAU,CAAC,EAAE,CAAC,GAAG,MAAM,CAAA;IACzB,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { it } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { Locator } from '@toa.io/core';
4
+ import { deployment, describe as map } from './deployment.js';
5
+ import { epoch } from './epoch.js';
6
+ import { EVENT, VALUES } from './const.js';
7
+ const schema = {
8
+ type: 'object',
9
+ properties: { foo: { type: 'string' }, key: { type: 'string' } }
10
+ };
11
+ function instance(name, defaults) {
12
+ return {
13
+ locator: new Locator(name, 'configuration'),
14
+ manifest: { schema, defaults },
15
+ component: {}
16
+ };
17
+ }
18
+ it('should validate annotation', async () => {
19
+ const wrongType = 'not ok';
20
+ assert.throws(() => deployment([], wrongType), (error) => /object/.test(error.message));
21
+ });
22
+ it('should reject unknown components', async () => {
23
+ assert.throws(() => deployment([instance('base')], { 'configuration.nope': {} }), (error) => /Component 'configuration\.nope' does not request configuration/.test(error.message));
24
+ });
25
+ it('should deploy the values service with the map', async () => {
26
+ const instances = [instance('base', { foo: 'hello' }), instance('other')];
27
+ const annotation = { 'configuration.other': { foo: 'set' } };
28
+ const dependency = deployment(instances, annotation);
29
+ assert.deepStrictEqual(dependency.events, [EVENT]);
30
+ assert.strictEqual(dependency.services?.length, 1);
31
+ const service = dependency.services[0];
32
+ assert.deepStrictEqual(service.group, 'configuration');
33
+ assert.deepStrictEqual(service.name, 'values');
34
+ assert.deepStrictEqual(service.components, ['configuration-values']);
35
+ const variable = service.variables.find((variable) => variable.name === VALUES);
36
+ assert.notStrictEqual(variable, undefined);
37
+ assert.deepStrictEqual(JSON.parse(variable.value), map(instances, annotation));
38
+ });
39
+ it('should describe every component', async () => {
40
+ const instances = [instance('base', { foo: 'hello' }), instance('other')];
41
+ const values = map(instances, { 'configuration.other': { foo: 'set' } });
42
+ assert.deepStrictEqual(values, {
43
+ 'configuration.base': { epoch: epoch(schema), schema, defaults: { foo: 'hello' } },
44
+ 'configuration.other': { epoch: epoch(schema), schema, defaults: { foo: 'set' } }
45
+ });
46
+ });
47
+ it('should prefer the context over the manifest defaults', async () => {
48
+ const values = map([instance('base', { foo: 'hello' })], {
49
+ 'configuration.base': { foo: 'bye' }
50
+ });
51
+ assert.deepStrictEqual(values['configuration.base'].defaults, { foo: 'bye' });
52
+ });
53
+ it('should not map values to the component', async () => {
54
+ const dependency = deployment([instance('base')], {
55
+ 'configuration.base': { foo: 'set' }
56
+ });
57
+ assert.deepStrictEqual(dependency.variables, {});
58
+ });
59
+ it('should map secrets to the component', async () => {
60
+ const dependency = deployment([instance('base')], {
61
+ 'configuration.base': { key: '$KEY' }
62
+ });
63
+ assert.deepStrictEqual(dependency.variables, {
64
+ 'configuration-base': [
65
+ {
66
+ name: 'TOA_CONFIGURATION__KEY',
67
+ secret: { name: 'toa-configuration', key: 'KEY' }
68
+ }
69
+ ]
70
+ });
71
+ // the service holds the reference, not the secret
72
+ assert.deepStrictEqual(map([instance('base')], { 'configuration.base': { key: '$KEY' } })['configuration.base'].defaults, { key: '$KEY' });
73
+ });
74
+ //# sourceMappingURL=deployment.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment.test.js","sourceRoot":"","sources":["../../source/extensions.configuration/deployment.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAC9B,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAGL,UAAU,EACV,QAAQ,IAAI,GAAG,EAChB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAE1C,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;CACjE,CAAA;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,QAAkC;IAChE,OAAO;QACL,OAAO,EAAE,IAAI,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC;QAC3C,QAAQ,EAAE,EAAE,MAAM,EAAE,QAA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G,EAAE,MAAM,EAAE,EAAE,CAAC,CAChE,oBAAoB,CACrB,CAAC,QAAQ,EACV,EAAE,GAAG,EAAE,MAAM,EAAE,CAChB,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ /** The same for the same schema, whatever the key order it was written in. */
2
+ export declare function epoch(schema: object): string;
@@ -0,0 +1,19 @@
1
+ import { createHash } from 'node:crypto';
2
+ /** The same for the same schema, whatever the key order it was written in. */
3
+ export function epoch(schema) {
4
+ return createHash('sha256').update(canonical(schema)).digest('hex');
5
+ }
6
+ function canonical(value) {
7
+ if (Array.isArray(value))
8
+ return '[' + value.map(canonical).join(',') + ']';
9
+ if (value !== null && typeof value === 'object') {
10
+ const object = value;
11
+ const keys = Object.keys(object)
12
+ .filter((key) => object[key] !== undefined)
13
+ .sort();
14
+ const entries = keys.map((key) => JSON.stringify(key) + ':' + canonical(object[key]));
15
+ return '{' + entries.join(',') + '}';
16
+ }
17
+ return JSON.stringify(value) ?? 'null';
18
+ }
19
+ //# sourceMappingURL=epoch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"epoch.js","sourceRoot":"","sources":["../../source/extensions.configuration/epoch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,8EAA8E;AAC9E,MAAM,UAAU,KAAK,CAAC,MAAc;IAClC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACrE,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;IAE3E,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,KAAgC,CAAA;QAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;aAC7B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;aAC1C,IAAI,EAAE,CAAA;QACT,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAErF,OAAO,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;IACtC,CAAC;IAED,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAA;AACxC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { manifest } from './manifest.js';
2
+ export { components } from './components.js';
3
+ export { deployment, describe, image } from './deployment.js';
4
+ export { epoch } from './epoch.js';
5
+ export { context } from './context.js';
6
+ export * from './const.js';
7
+ export * as schemas from './schemas.js';
8
+ export type { Manifest } from './manifest.js';
9
+ export type { Annotation, Entry, Instance, Values } from './deployment.js';
@@ -0,0 +1,8 @@
1
+ export { manifest } from './manifest.js';
2
+ export { components } from './components.js';
3
+ export { deployment, describe, image } from './deployment.js';
4
+ export { epoch } from './epoch.js';
5
+ export { context } from './context.js';
6
+ export * from './const.js';
7
+ export * as schemas from './schemas.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/extensions.configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,cAAc,YAAY,CAAA;AAC1B,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare function manifest(manifest: Manifest): Manifest;
2
+ export interface Manifest {
3
+ schema: object;
4
+ defaults?: Record<string, unknown>;
5
+ }
@@ -0,0 +1,6 @@
1
+ import * as schemas from './schemas.js';
2
+ export function manifest(manifest) {
3
+ schemas.manifest.validate(manifest);
4
+ return manifest;
5
+ }
6
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../source/extensions.configuration/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,MAAM,UAAU,QAAQ,CAAC,QAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAEnC,OAAO,QAAQ,CAAA;AACjB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { it } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { manifest } from './manifest.js';
4
+ it('should validate', async () => {
5
+ const additional = { schema: {}, foo: 'bar' };
6
+ assert.throws(() => {
7
+ manifest(additional);
8
+ }, (error) => /not expected/.test(error.message));
9
+ const wrongType = { schema: 'not ok' };
10
+ assert.throws(() => {
11
+ manifest(wrongType);
12
+ }, (error) => /object/.test(error.message));
13
+ });
14
+ //# sourceMappingURL=manifest.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.test.js","sourceRoot":"","sources":["../../source/extensions.configuration/manifest.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAC9B,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAEvC,OAAO,EAAiB,QAAQ,EAAE,MAAM,eAAe,CAAA;AAEvD,EAAE,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE;IAC/B,MAAM,UAAU,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAyB,CAAA;IAEpE,MAAM,CAAC,MAAM,CACX,GAAG,EAAE;QACH,QAAQ,CAAC,UAAU,CAAC,CAAA;IACtB,CAAC,EACD,CAAC,KAAU,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CACnD,CAAA;IAED,MAAM,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAyB,CAAA;IAE7D,MAAM,CAAC,MAAM,CACX,GAAG,EAAE;QACH,QAAQ,CAAC,SAAS,CAAC,CAAA;IACrB,CAAC,EACD,CAAC,KAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAC7C,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Schema } from '@toa.io/schemas';
2
+ export declare const manifest: Schema<any>;
3
+ export declare const annotation: Schema<any>;
@@ -0,0 +1,7 @@
1
+ import { resolve } from 'node:path';
2
+ import * as schemas from '@toa.io/schemas';
3
+ const path = resolve(import.meta.dirname, '../../schemas/extensions.configuration');
4
+ const namespace = schemas.namespace(path);
5
+ export const manifest = namespace.schema('manifest');
6
+ export const annotation = namespace.schema('annotation');
7
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../source/extensions.configuration/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAG1C,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE,wCAAwC,CAAC,CAAA;AACnF,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AAEzC,MAAM,CAAC,MAAM,QAAQ,GAAgB,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;AACjE,MAAM,CAAC,MAAM,UAAU,GAAgB,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA"}
@@ -0,0 +1,71 @@
1
+ import type { Resources } from '@toa.io/operations';
2
+ /** What the gateway speaks upstream. */
3
+ export type Protocol = 'h1' | 'h2c';
4
+ export interface Annotation {
5
+ authorities: Record<string, string>;
6
+ /**
7
+ * `h2c` requires an ingress controller that proxies cleartext HTTP/2 upstream.
8
+ * See `documentation/protocol.md`.
9
+ */
10
+ protocol?: Protocol;
11
+ class?: string;
12
+ resources?: Resources;
13
+ annotations?: Record<string, string>;
14
+ /** The Service, as opposed to the Ingress that `annotations` above describes. */
15
+ service?: {
16
+ annotations?: Record<string, string>;
17
+ };
18
+ debug?: boolean;
19
+ /** The header the client address is read from; the connection's without one. See `ip.md`. */
20
+ ip?: string;
21
+ /** Failed authentications an address may make; none are metered unless set. See `identity.md`. */
22
+ bouncer?: Bouncer;
23
+ /** The authorization server this context exposes; none is exposed without it. */
24
+ oauth?: OAuth;
25
+ /** JSON-RPC at `/.rpc`; none is served without it. See `documentation/rpc.md`. */
26
+ rpc?: RPC;
27
+ /** MCP at `/.mcp`; none is served without it. See `documentation/mcp.md`. */
28
+ mcp?: MCP;
29
+ '/'?: object;
30
+ }
31
+ export interface OAuth {
32
+ /**
33
+ * Where a client sends the user to consent. The one endpoint of the flow that needs a
34
+ * person, and so the one this extension does not serve: an application builds it.
35
+ */
36
+ authorize: string;
37
+ /** Paths a token may be restricted to, each advertised as a protected resource. */
38
+ resources?: string[];
39
+ /** What a client may ask for. Each is a role, or a scope within one. */
40
+ scopes?: string[];
41
+ /** Origins whose Client ID Metadata Documents may be read. None are without it. */
42
+ trust?: string[];
43
+ /** Dynamic Client Registration, off unless opened. */
44
+ registration?: 'open' | 'closed';
45
+ }
46
+ export interface RPC {
47
+ /**
48
+ * Calls one request may carry, 32 by default. One request is one authentication and one
49
+ * reply however many calls it makes, so what a caller may ask for at once is bounded.
50
+ */
51
+ batch?: number;
52
+ }
53
+ export interface MCP {
54
+ /** What the server calls itself, which a client shows a user. */
55
+ name: string;
56
+ /** What a model is told before it calls anything here. */
57
+ instructions?: string;
58
+ /**
59
+ * Browser origins the endpoint answers, which the revision requires against DNS rebinding.
60
+ * None are admitted without it; a request carrying no `Origin` is not a browser's.
61
+ */
62
+ origins?: string[];
63
+ /** Whether the endpoint answers without a credential. It does not unless it says so. */
64
+ anonymous?: boolean;
65
+ }
66
+ export interface Bouncer {
67
+ /** what an address may fail at once, 20 by default */
68
+ attempts?: number;
69
+ /** seconds it takes to earn them back, 60 by default */
70
+ interval?: number;
71
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Annotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Annotation.js","sourceRoot":"","sources":["../../source/extensions.exposition/Annotation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { type Components } from '../digest/read.js';
2
+ /** The identity components, which run inside the gateway. */
3
+ export declare function components(): Components;
@@ -0,0 +1,6 @@
1
+ import { components as digest } from '../digest/read.js';
2
+ /** The identity components, which run inside the gateway. */
3
+ export function components() {
4
+ return digest('extensions.exposition');
5
+ }
6
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../../source/extensions.exposition/components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,MAAM,EAAmB,MAAM,mBAAmB,CAAA;AAEzE,6DAA6D;AAC7D,MAAM,UAAU,UAAU;IACxB,OAAO,MAAM,CAAC,uBAAuB,CAAC,CAAA;AACxC,CAAC"}
@@ -0,0 +1,36 @@
1
+ export declare const BRANCH_TTL = 1800000;
2
+ /** The broadcast the gateway and its tenants share. */
3
+ export declare const CHANNEL = "exposition";
4
+ /** The replicas of the gateway decide together, whatever context they serve. */
5
+ export declare const ATOM_GROUP = "exposition";
6
+ /**
7
+ * Where JSON-RPC is served, for every procedure at once. Pinned rather than configured: a
8
+ * path an application could choose is a path it could collide with a route of its own.
9
+ */
10
+ export declare const RPC = "/.rpc";
11
+ /** Calls one request may carry where the annotation does not say. */
12
+ export declare const BATCH = 32;
13
+ /**
14
+ * Where the Model Context Protocol is served. Pinned for the reason `/.rpc` is: a path an
15
+ * application could choose is a path it could collide with a route of its own.
16
+ */
17
+ export declare const MCP = "/.mcp";
18
+ /**
19
+ * Where the resource tree and the page that reads it are served. Pinned for the reason
20
+ * `/.rpc` is: a path an application could choose is a path it could collide with a route of
21
+ * its own. Unlike those two it is not annotated — every entry it carries is what `OPTIONS`
22
+ * on that path already answers to the same caller, and what it adds is the enumeration.
23
+ */
24
+ export declare const DISCOVERY = "/.discovery";
25
+ /** Where the gateway serves. */
26
+ export declare const PORT = 8000;
27
+ /**
28
+ * Reserved for the readiness probe. `8001` is the Telemetry readiness probe's, and `toa export`
29
+ * refuses a port claimed twice — `toa mono` and a local run put every service in one process.
30
+ */
31
+ export declare const PROBE = 8004;
32
+ /**
33
+ * The initial delay of the readiness probe. The server does not sleep for it: whoever
34
+ * probes is the one that waits, and doing it here as well only delayed the process twice.
35
+ */
36
+ export declare const DELAY = 3;