@toa.io/definitions 1.0.0-alpha.298 → 1.0.0-alpha.300

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 (50) hide show
  1. package/digest/extensions.cadence.json +1 -1
  2. package/digest/extensions.configuration.json +1 -1
  3. package/digest/extensions.exposition.json +1 -1
  4. package/digest/extensions.introspection.json +1 -1
  5. package/digest/extensions.realtime.json +1 -1
  6. package/package.json +5 -5
  7. package/schemas/extensions.cadence/annotation.cos.yaml +12 -0
  8. package/transpiled/definition.js +1 -0
  9. package/transpiled/definition.js.map +1 -1
  10. package/transpiled/extensions.cadence/const.d.ts +14 -0
  11. package/transpiled/extensions.cadence/const.js +20 -0
  12. package/transpiled/extensions.cadence/const.js.map +1 -1
  13. package/transpiled/extensions.cadence/deployment.js +5 -1
  14. package/transpiled/extensions.cadence/deployment.js.map +1 -1
  15. package/transpiled/extensions.cadence/types.d.ts +13 -0
  16. package/transpiled/extensions.configuration/deployment.js +5 -3
  17. package/transpiled/extensions.configuration/deployment.js.map +1 -1
  18. package/transpiled/extensions.configuration/secrets.js +2 -2
  19. package/transpiled/extensions.configuration/secrets.js.map +1 -1
  20. package/transpiled/extensions.convergence/const.d.ts +10 -0
  21. package/transpiled/extensions.convergence/const.js +11 -0
  22. package/transpiled/extensions.convergence/const.js.map +1 -0
  23. package/transpiled/extensions.convergence/declaration.d.ts +20 -0
  24. package/transpiled/extensions.convergence/declaration.js +2 -0
  25. package/transpiled/extensions.convergence/declaration.js.map +1 -0
  26. package/transpiled/extensions.convergence/deployment.d.ts +10 -0
  27. package/transpiled/extensions.convergence/deployment.js +37 -0
  28. package/transpiled/extensions.convergence/deployment.js.map +1 -0
  29. package/transpiled/extensions.convergence/index.d.ts +5 -0
  30. package/transpiled/extensions.convergence/index.js +4 -0
  31. package/transpiled/extensions.convergence/index.js.map +1 -0
  32. package/transpiled/extensions.convergence/topology.d.ts +34 -0
  33. package/transpiled/extensions.convergence/topology.js +76 -0
  34. package/transpiled/extensions.convergence/topology.js.map +1 -0
  35. package/transpiled/extensions.exposition/deployment.js +2 -2
  36. package/transpiled/extensions.exposition/deployment.js.map +1 -1
  37. package/transpiled/extensions.exposition/manifest.js +4 -3
  38. package/transpiled/extensions.exposition/manifest.js.map +1 -1
  39. package/transpiled/extensions.storages/Annotation.js +7 -5
  40. package/transpiled/extensions.storages/Annotation.js.map +1 -1
  41. package/transpiled/extensions.storages/deployment.js +3 -3
  42. package/transpiled/extensions.storages/deployment.js.map +1 -1
  43. package/transpiled/extensions.telemetry/deployment.js +6 -4
  44. package/transpiled/extensions.telemetry/deployment.js.map +1 -1
  45. package/transpiled/index.d.ts +1 -0
  46. package/transpiled/index.js +1 -0
  47. package/transpiled/index.js.map +1 -1
  48. package/transpiled/predefined.d.ts +10 -0
  49. package/transpiled/predefined.js +15 -0
  50. package/transpiled/predefined.js.map +1 -0
@@ -1 +1 @@
1
- [{"label":"introspection-edges","manifest":{"namespace":"introspection","name":"edges","entity":{"associated":true,"properties":{"src":{"description":"What caused the call — another operation, an event, or a service","type":"object","properties":{"namespace":{"type":"string"},"component":{"type":"string"},"operation":{"type":"string"},"event":{"type":"string"},"service":{"type":"string"}}},"dst":{"description":"What was called","type":"object","required":["namespace","component","operation"],"properties":{"namespace":{"type":"string"},"component":{"type":"string"},"operation":{"type":"string"}}},"sample":{"description":"The last call observed on this edge","type":"object","required":["at","outcome"],"properties":{"at":{"type":"integer"},"input":{},"outcome":{"type":"string"}}},"id":{"type":"string","pattern":"^[a-fA-F0-9]{32}$"},"VERSION":{"type":"integer","minimum":0},"CREATED":{"type":"integer","format":"epoch-millis"},"UPDATED":{"type":"integer","format":"epoch-millis"},"DELETED":{"type":"integer","format":"epoch-millis","nullable":true}},"required":["src","dst","id"],"storage":"@toa.io/storages.mongodb","migrations":[{"id":"system:0000-property-names","steps":[{"update":{"filter":{"_version":{"$exists":true}},"update":{"$rename":{"_version":"VERSION","_created":"CREATED","_updated":"UPDATED","_deleted":"DELETED"}}}}],"prototype":"system"},{"id":"system:0001-epoch-millis","steps":[{"update":{"filter":{"CREATED":{"$type":"number"}},"update":[{"$set":{"CREATED":{"$toDate":{"$toLong":"$CREATED"}},"UPDATED":{"$toDate":{"$toLong":"$UPDATED"}},"DELETED":{"$toDate":{"$toLong":"$DELETED"}}}}]}}],"prototype":"system"}],"custom":false},"operations":{"merge":{"concurrency":"retry","input":{"type":"object","properties":{"edges":{"description":"What each replica observed since its last flush, by edge id","type":"object","additionalProperties":{"type":"object","properties":{"src":{"description":"What caused the call — another operation, an event, or a service","type":"object","properties":{"namespace":{"type":"string"},"component":{"type":"string"},"operation":{"type":"string"},"event":{"type":"string"},"service":{"type":"string"}}},"dst":{"description":"What was called","type":"object","required":["namespace","component","operation"],"properties":{"namespace":{"type":"string"},"component":{"type":"string"},"operation":{"type":"string"}}},"sample":{"description":"The last call observed on this edge","type":"object","required":["at","outcome"],"properties":{"at":{"type":"integer"},"input":{},"outcome":{"type":"string"}}}},"required":["src","dst"]}}},"required":["edges"]},"type":"transition","scope":"objects","bridge":"@toa.io/bridges.node","output":{},"bindings":["@toa.io/bindings.amqp"]},"assign":{"type":"assignment","scope":"changeset","output":{},"bindings":["@toa.io/bindings.amqp"]},"ensure":{"type":"effect","scope":"object","output":{},"bindings":["@toa.io/bindings.amqp"]},"enumerate":{"type":"observation","scope":"objects","output":{},"bindings":["@toa.io/bindings.amqp"]},"observe":{"type":"observation","scope":"object","output":{},"bindings":["@toa.io/bindings.amqp"]},"stream":{"type":"observation","scope":"stream","output":{},"bindings":["@toa.io/bindings.amqp"]},"terminate":{"type":"assignment","scope":"changeset","output":{},"bindings":["@toa.io/bindings.amqp"]}},"path":"@toa.io/extensions.introspection/components/introspection.edges","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","extensions":{"@toa.io/extensions.telemetry":null,"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":false,"@toa.io/extensions.exposition":{"routes":[{"path":"/introspection/edges","node":{"routes":[{"path":"/","node":{"routes":[{"path":"/:id","node":{"routes":[],"methods":[{"verb":"GET","mapping":{"endpoint":"observe","query":{},"paged":false,"namespace":"introspection","component":"edges"},"directives":[]}],"directives":[]}}],"methods":[{"verb":"GET","mapping":{"endpoint":"enumerate","query":{"limit":{"value":10000,"range":[1,10000]}},"paged":true,"namespace":"introspection","component":"edges"},"directives":[]}],"directives":[{"family":"auth","name":"role","value":"system:introspection"},{"family":"io","name":"output","value":true},{"family":"cache","name":"control","value":"max-age=60, public"}]}}],"methods":[],"directives":[],"isolated":true}}],"methods":[],"directives":[]}},"version":"dd4f7aaa","prototype":{"prototype":null,"path":"@toa.io/prototype","operations":{"transit":{"bridge":"@toa.io/bridges.node"},"assign":{"bridge":"@toa.io/bridges.node"},"ensure":{"bridge":"@toa.io/bridges.node"},"enumerate":{"bridge":"@toa.io/bridges.node"},"observe":{"bridge":"@toa.io/bridges.node"},"stream":{"bridge":"@toa.io/bridges.node"},"terminate":{"bridge":"@toa.io/bridges.node"}}},"events":{"created":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"deleted":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"sync":{"conditioned":false,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"updated":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"}}}},{"label":"introspection-nodes","manifest":{"namespace":"introspection","name":"nodes","entity":{"associated":true,"properties":{"version":{"type":"string"},"entity":{},"operations":{},"events":{},"receivers":{},"extensions":{},"namespace":{"type":"string"},"component":{"type":"string"},"id":{"type":"string","pattern":"^[a-fA-F0-9]{32}$"},"VERSION":{"type":"integer","minimum":0},"CREATED":{"type":"integer","format":"epoch-millis"},"UPDATED":{"type":"integer","format":"epoch-millis"},"DELETED":{"type":"integer","format":"epoch-millis","nullable":true}},"required":["namespace","component","id"],"storage":"@toa.io/storages.mongodb","migrations":[{"id":"system:0000-property-names","steps":[{"update":{"filter":{"_version":{"$exists":true}},"update":{"$rename":{"_version":"VERSION","_created":"CREATED","_updated":"UPDATED","_deleted":"DELETED"}}}}],"prototype":"system"},{"id":"system:0001-epoch-millis","steps":[{"update":{"filter":{"CREATED":{"$type":"number"}},"update":[{"$set":{"CREATED":{"$toDate":{"$toLong":"$CREATED"}},"UPDATED":{"$toDate":{"$toLong":"$UPDATED"}},"DELETED":{"$toDate":{"$toLong":"$DELETED"}}}}]}}],"prototype":"system"}],"custom":false},"operations":{"merge":{"concurrency":"retry","input":{"type":"object","properties":{"nodes":{"description":"What each announced component describes of itself, by its id","type":"object","additionalProperties":{"type":"object","properties":{"version":{"type":"string"},"entity":{},"operations":{},"events":{},"receivers":{},"extensions":{},"namespace":{"type":"string"},"component":{"type":"string"}},"required":["namespace","component"]}}},"required":["nodes"]},"type":"transition","scope":"objects","bridge":"@toa.io/bridges.node","output":{},"bindings":["@toa.io/bindings.amqp"]},"assign":{"type":"assignment","scope":"changeset","output":{},"bindings":["@toa.io/bindings.amqp"]},"ensure":{"type":"effect","scope":"object","output":{},"bindings":["@toa.io/bindings.amqp"]},"enumerate":{"type":"observation","scope":"objects","output":{},"bindings":["@toa.io/bindings.amqp"]},"observe":{"type":"observation","scope":"object","output":{},"bindings":["@toa.io/bindings.amqp"]},"stream":{"type":"observation","scope":"stream","output":{},"bindings":["@toa.io/bindings.amqp"]},"terminate":{"type":"assignment","scope":"changeset","output":{},"bindings":["@toa.io/bindings.amqp"]}},"path":"@toa.io/extensions.introspection/components/introspection.nodes","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","extensions":{"@toa.io/extensions.telemetry":null,"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":false,"@toa.io/extensions.exposition":{"routes":[{"path":"/introspection/nodes","node":{"routes":[{"path":"/","node":{"routes":[{"path":"/:id","node":{"routes":[],"methods":[{"verb":"GET","mapping":{"endpoint":"observe","query":{},"paged":false,"namespace":"introspection","component":"nodes"},"directives":[]}],"directives":[]}}],"methods":[{"verb":"GET","mapping":{"endpoint":"enumerate","query":{"limit":{"value":1000,"range":[1,1000]}},"paged":true,"namespace":"introspection","component":"nodes"},"directives":[]}],"directives":[{"family":"auth","name":"role","value":"system:introspection"},{"family":"io","name":"output","value":true},{"family":"cache","name":"control","value":"max-age=60, public"}]}}],"methods":[],"directives":[],"isolated":true}}],"methods":[],"directives":[]}},"version":"c1b78a37","prototype":{"prototype":null,"path":"@toa.io/prototype","operations":{"transit":{"bridge":"@toa.io/bridges.node"},"assign":{"bridge":"@toa.io/bridges.node"},"ensure":{"bridge":"@toa.io/bridges.node"},"enumerate":{"bridge":"@toa.io/bridges.node"},"observe":{"bridge":"@toa.io/bridges.node"},"stream":{"bridge":"@toa.io/bridges.node"},"terminate":{"bridge":"@toa.io/bridges.node"}}},"events":{"created":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"deleted":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"sync":{"conditioned":false,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"updated":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"}}}}]
1
+ [{"label":"introspection-edges","manifest":{"namespace":"introspection","name":"edges","entity":{"associated":true,"properties":{"src":{"description":"What caused the call — another operation, an event, or a service","type":"object","properties":{"namespace":{"type":"string"},"component":{"type":"string"},"operation":{"type":"string"},"event":{"type":"string"},"service":{"type":"string"}}},"dst":{"description":"What was called","type":"object","required":["namespace","component","operation"],"properties":{"namespace":{"type":"string"},"component":{"type":"string"},"operation":{"type":"string"}}},"sample":{"description":"The last call observed on this edge","type":"object","required":["at","outcome"],"properties":{"at":{"type":"integer"},"input":{},"outcome":{"type":"string"}}},"id":{"type":"string","pattern":"^[a-fA-F0-9]{32}$"},"VERSION":{"type":"integer","minimum":0},"CREATED":{"type":"integer","format":"epoch-millis"},"UPDATED":{"type":"integer","format":"epoch-millis"},"DELETED":{"type":"integer","format":"epoch-millis","nullable":true},"REGION":{"type":"integer","minimum":0}},"required":["src","dst","id","VERSION","CREATED","UPDATED","DELETED","REGION"],"storage":"@toa.io/storages.mongodb","migrations":[{"id":"system:0000-property-names","steps":[{"update":{"filter":{"_version":{"$exists":true}},"update":{"$rename":{"_version":"VERSION","_created":"CREATED","_updated":"UPDATED","_deleted":"DELETED"}}}}],"prototype":"system"},{"id":"system:0001-epoch-millis","steps":[{"update":{"filter":{"CREATED":{"$type":"number"}},"update":[{"$set":{"CREATED":{"$toDate":{"$toLong":"$CREATED"}},"UPDATED":{"$toDate":{"$toLong":"$UPDATED"}},"DELETED":{"$toDate":{"$toLong":"$DELETED"}}}}]}}],"prototype":"system"},{"id":"system:0002-region","steps":[{"update":{"filter":{"REGION":{"$exists":false}},"update":{"$set":{"REGION":0}}}}],"prototype":"system"}],"custom":false},"operations":{"merge":{"concurrency":"retry","input":{"type":"object","properties":{"edges":{"description":"What each replica observed since its last flush, by edge id","type":"object","additionalProperties":{"type":"object","properties":{"src":{"description":"What caused the call — another operation, an event, or a service","type":"object","properties":{"namespace":{"type":"string"},"component":{"type":"string"},"operation":{"type":"string"},"event":{"type":"string"},"service":{"type":"string"}}},"dst":{"description":"What was called","type":"object","required":["namespace","component","operation"],"properties":{"namespace":{"type":"string"},"component":{"type":"string"},"operation":{"type":"string"}}},"sample":{"description":"The last call observed on this edge","type":"object","required":["at","outcome"],"properties":{"at":{"type":"integer"},"input":{},"outcome":{"type":"string"}}}},"required":["src","dst"]}}},"required":["edges"]},"type":"transition","scope":"objects","bridge":"@toa.io/bridges.node","output":{},"bindings":["@toa.io/bindings.amqp"]},"assign":{"type":"assignment","scope":"changeset","output":{},"bindings":["@toa.io/bindings.amqp"]},"ensure":{"type":"effect","scope":"object","output":{},"bindings":["@toa.io/bindings.amqp"]},"enumerate":{"type":"observation","scope":"objects","output":{},"bindings":["@toa.io/bindings.amqp"]},"observe":{"type":"observation","scope":"object","output":{},"bindings":["@toa.io/bindings.amqp"]},"stream":{"type":"observation","scope":"stream","output":{},"bindings":["@toa.io/bindings.amqp"]},"terminate":{"type":"assignment","scope":"changeset","output":{},"bindings":["@toa.io/bindings.amqp"]}},"path":"@toa.io/extensions.introspection/components/introspection.edges","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","extensions":{"@toa.io/extensions.telemetry":null,"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":false,"@toa.io/extensions.exposition":{"routes":[{"path":"/introspection/edges","node":{"routes":[{"path":"/","node":{"routes":[{"path":"/:id","node":{"routes":[],"methods":[{"verb":"GET","mapping":{"endpoint":"observe","query":{},"paged":false,"namespace":"introspection","component":"edges"},"directives":[]}],"directives":[]}}],"methods":[{"verb":"GET","mapping":{"endpoint":"enumerate","query":{"limit":{"value":10000,"range":[1,10000]}},"paged":true,"namespace":"introspection","component":"edges"},"directives":[]}],"directives":[{"family":"auth","name":"role","value":"system:introspection"},{"family":"io","name":"output","value":true},{"family":"cache","name":"control","value":"max-age=60, public"}]}}],"methods":[],"directives":[],"isolated":true}}],"methods":[],"directives":[]}},"version":"6b41cce8","prototype":{"prototype":null,"path":"@toa.io/prototype","operations":{"transit":{"bridge":"@toa.io/bridges.node"},"assign":{"bridge":"@toa.io/bridges.node"},"ensure":{"bridge":"@toa.io/bridges.node"},"enumerate":{"bridge":"@toa.io/bridges.node"},"observe":{"bridge":"@toa.io/bridges.node"},"stream":{"bridge":"@toa.io/bridges.node"},"terminate":{"bridge":"@toa.io/bridges.node"}}},"events":{"created":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"deleted":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"sync":{"conditioned":false,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"updated":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"}}}},{"label":"introspection-nodes","manifest":{"namespace":"introspection","name":"nodes","entity":{"associated":true,"properties":{"version":{"type":"string"},"entity":{},"operations":{},"events":{},"receivers":{},"extensions":{},"namespace":{"type":"string"},"component":{"type":"string"},"id":{"type":"string","pattern":"^[a-fA-F0-9]{32}$"},"VERSION":{"type":"integer","minimum":0},"CREATED":{"type":"integer","format":"epoch-millis"},"UPDATED":{"type":"integer","format":"epoch-millis"},"DELETED":{"type":"integer","format":"epoch-millis","nullable":true},"REGION":{"type":"integer","minimum":0}},"required":["namespace","component","id","VERSION","CREATED","UPDATED","DELETED","REGION"],"storage":"@toa.io/storages.mongodb","migrations":[{"id":"system:0000-property-names","steps":[{"update":{"filter":{"_version":{"$exists":true}},"update":{"$rename":{"_version":"VERSION","_created":"CREATED","_updated":"UPDATED","_deleted":"DELETED"}}}}],"prototype":"system"},{"id":"system:0001-epoch-millis","steps":[{"update":{"filter":{"CREATED":{"$type":"number"}},"update":[{"$set":{"CREATED":{"$toDate":{"$toLong":"$CREATED"}},"UPDATED":{"$toDate":{"$toLong":"$UPDATED"}},"DELETED":{"$toDate":{"$toLong":"$DELETED"}}}}]}}],"prototype":"system"},{"id":"system:0002-region","steps":[{"update":{"filter":{"REGION":{"$exists":false}},"update":{"$set":{"REGION":0}}}}],"prototype":"system"}],"custom":false},"operations":{"merge":{"concurrency":"retry","input":{"type":"object","properties":{"nodes":{"description":"What each announced component describes of itself, by its id","type":"object","additionalProperties":{"type":"object","properties":{"version":{"type":"string"},"entity":{},"operations":{},"events":{},"receivers":{},"extensions":{},"namespace":{"type":"string"},"component":{"type":"string"}},"required":["namespace","component"]}}},"required":["nodes"]},"type":"transition","scope":"objects","bridge":"@toa.io/bridges.node","output":{},"bindings":["@toa.io/bindings.amqp"]},"assign":{"type":"assignment","scope":"changeset","output":{},"bindings":["@toa.io/bindings.amqp"]},"ensure":{"type":"effect","scope":"object","output":{},"bindings":["@toa.io/bindings.amqp"]},"enumerate":{"type":"observation","scope":"objects","output":{},"bindings":["@toa.io/bindings.amqp"]},"observe":{"type":"observation","scope":"object","output":{},"bindings":["@toa.io/bindings.amqp"]},"stream":{"type":"observation","scope":"stream","output":{},"bindings":["@toa.io/bindings.amqp"]},"terminate":{"type":"assignment","scope":"changeset","output":{},"bindings":["@toa.io/bindings.amqp"]}},"path":"@toa.io/extensions.introspection/components/introspection.nodes","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","extensions":{"@toa.io/extensions.telemetry":null,"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":false,"@toa.io/extensions.exposition":{"routes":[{"path":"/introspection/nodes","node":{"routes":[{"path":"/","node":{"routes":[{"path":"/:id","node":{"routes":[],"methods":[{"verb":"GET","mapping":{"endpoint":"observe","query":{},"paged":false,"namespace":"introspection","component":"nodes"},"directives":[]}],"directives":[]}}],"methods":[{"verb":"GET","mapping":{"endpoint":"enumerate","query":{"limit":{"value":1000,"range":[1,1000]}},"paged":true,"namespace":"introspection","component":"nodes"},"directives":[]}],"directives":[{"family":"auth","name":"role","value":"system:introspection"},{"family":"io","name":"output","value":true},{"family":"cache","name":"control","value":"max-age=60, public"}]}}],"methods":[],"directives":[],"isolated":true}}],"methods":[],"directives":[]}},"version":"9f17d367","prototype":{"prototype":null,"path":"@toa.io/prototype","operations":{"transit":{"bridge":"@toa.io/bridges.node"},"assign":{"bridge":"@toa.io/bridges.node"},"ensure":{"bridge":"@toa.io/bridges.node"},"enumerate":{"bridge":"@toa.io/bridges.node"},"observe":{"bridge":"@toa.io/bridges.node"},"stream":{"bridge":"@toa.io/bridges.node"},"terminate":{"bridge":"@toa.io/bridges.node"}}},"events":{"created":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"deleted":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"sync":{"conditioned":false,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"},"updated":{"conditioned":true,"subjective":false,"path":"@toa.io/prototype","bridge":"@toa.io/bridges.node","binding":"@toa.io/bindings.amqp"}}}}]
@@ -1 +1 @@
1
- [{"label":"realtime-streams","manifest":{"namespace":"realtime","name":"streams","operations":{"create":{"input":{"properties":{"key":{"type":"string"},"token":{"type":"string"}},"type":"object"},"type":"effect","scope":"none","bridge":"@toa.io/bridges.node","query":false,"output":{},"bindings":["@toa.io/bindings.amqp"]},"push":{"output":{"type":"null"},"bindings":[],"input":{"properties":{"data":{},"key":{"type":"string"},"event":{"type":"string"}},"type":"object","required":["key","event"]},"type":"effect","scope":"none","bridge":"@toa.io/bridges.node","query":false}},"path":"@toa.io/extensions.realtime/components/realtime.streams","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","prototype":null,"extensions":{"@toa.io/extensions.telemetry":null,"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":{},"@toa.io/extensions.exposition":{"routes":[{"path":"/realtime/streams","node":{"routes":[{"path":"/:key","node":{"routes":[],"methods":[{"verb":"GET","mapping":{"endpoint":"create","query":null,"paged":false,"namespace":"realtime","component":"streams"},"directives":[]}],"directives":[{"family":"auth","name":"id","value":"key"}]}}],"methods":[],"directives":[]}}],"methods":[],"directives":[]},"@toa.io/extensions.configuration":{"schema":{"properties":{"maxlen":{"type":"number"},"expire":{"type":"number"}},"type":"object","required":["maxlen","expire"]},"defaults":{"maxlen":1000,"expire":300}},"@toa.io/extensions.state":null,"@toa.io/extensions.stash":null},"version":"08f82fc1"}}]
1
+ [{"label":"realtime-streams","manifest":{"namespace":"realtime","name":"streams","operations":{"create":{"input":{"properties":{"key":{"type":"string"},"token":{"type":"string"}},"type":"object"},"type":"effect","scope":"none","bridge":"@toa.io/bridges.node","query":false,"output":{},"bindings":["@toa.io/bindings.amqp"]},"push":{"output":{"type":"null"},"bindings":[],"input":{"properties":{"data":{},"key":{"type":"string"},"event":{"type":"string"}},"type":"object","required":["key","event"]},"type":"effect","scope":"none","bridge":"@toa.io/bridges.node","query":false}},"path":"@toa.io/extensions.realtime/components/realtime.streams","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","prototype":null,"extensions":{"@toa.io/extensions.telemetry":null,"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":{},"@toa.io/extensions.exposition":{"routes":[{"path":"/realtime/streams","node":{"routes":[{"path":"/:key","node":{"routes":[],"methods":[{"verb":"GET","mapping":{"endpoint":"create","query":null,"paged":false,"namespace":"realtime","component":"streams"},"directives":[]}],"directives":[{"family":"auth","name":"id","value":"key"}]}}],"methods":[],"directives":[]}}],"methods":[],"directives":[]},"@toa.io/extensions.configuration":{"schema":{"properties":{"maxlen":{"type":"number"},"expire":{"type":"number"}},"type":"object","required":["maxlen","expire"]},"defaults":{"maxlen":1000,"expire":300}},"@toa.io/extensions.state":null,"@toa.io/extensions.stash":null},"version":"fb7a8671"}}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/definitions",
3
- "version": "1.0.0-alpha.298",
3
+ "version": "1.0.0-alpha.300",
4
4
  "type": "module",
5
5
  "description": "What Toa packages declare, read without running them",
6
6
  "author": "temich <tema.gurtovoy@gmail.com>",
@@ -31,8 +31,8 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@toa.io/generic": "1.0.0-alpha.292",
34
- "@toa.io/pointer": "1.0.0-alpha.293",
35
- "@toa.io/schemas": "1.0.0-alpha.293"
34
+ "@toa.io/pointer": "1.0.0-alpha.299",
35
+ "@toa.io/schemas": "1.0.0-alpha.299"
36
36
  },
37
37
  "scripts": {
38
38
  "transpile": "tsc",
@@ -44,7 +44,7 @@
44
44
  "./*": "./transpiled/*/index.js"
45
45
  },
46
46
  "devDependencies": {
47
- "@toa.io/core": "1.0.0-alpha.293",
47
+ "@toa.io/core": "1.0.0-alpha.300",
48
48
  "openspan": "1.0.0-alpha.293",
49
49
  "oxc-parser": "0.149.0"
50
50
  },
@@ -56,5 +56,5 @@
56
56
  "optional": true
57
57
  }
58
58
  },
59
- "gitHead": "334fad8726adfa7507462c33b509ce7db9db853f"
59
+ "gitHead": "f91131a9aeb29aa271f177c4055ddcf0cda8c75e"
60
60
  }
@@ -6,4 +6,16 @@ properties:
6
6
  description: Seconds between passes over the calls waiting to be made
7
7
  type: integer
8
8
  minimum: 1
9
+ regions:
10
+ description: >
11
+ The regions whose delayed calls this deployment makes, as their ranks. It makes its own
12
+ by default, so a call is made by the region that asked for it and by no other; naming
13
+ another region's rank is how a surviving region takes over the calls of one that is
14
+ gone. Two regions naming one rank make every call of it twice, and nothing can see that.
15
+ type: array
16
+ minItems: 1
17
+ uniqueItems: true
18
+ items:
19
+ type: integer
20
+ minimum: 0
9
21
  additionalProperties: false
@@ -21,6 +21,7 @@ export const DEFINED = new Set([
21
21
  'bridges.node',
22
22
  'extensions.cadence',
23
23
  'extensions.configuration',
24
+ 'extensions.convergence',
24
25
  'extensions.exposition',
25
26
  'extensions.fetch',
26
27
  'extensions.introspection',
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../source/definition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,SAAiB;IAChD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAA;IAElD,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;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e;IACf,eAAe;IACf,cAAc;IACd,cAAc;IACd,oBAAoB;IACpB,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;IACvB,kBAAkB;IAClB,0BAA0B;IAC1B,qBAAqB;IACrB,kBAAkB;IAClB,kBAAkB;IAClB,qBAAqB;IACrB,sBAAsB;IACtB,kBAAkB;CACnB,CAAC,CAAA"}
@@ -19,3 +19,17 @@ export declare const DISCRETENESS = 60;
19
19
  export declare const BATCH = 200;
20
20
  /** A number from the environment, where a deployment or a test suite states one. */
21
21
  export declare function number(variable: string, fallback: number): number;
22
+ /** What a deployment is given of the regions whose calls it makes. */
23
+ export declare const REGIONS = "TOA_CADENCE_REGIONS";
24
+ /**
25
+ * The ranks whose delayed calls this deployment makes.
26
+ *
27
+ * Its own by default — a row carries the region that wrote it, so a call is made by the region
28
+ * that asked for it and by no other, however many hold the row. Naming another region's rank
29
+ * is how a surviving region takes over the calls of one that is gone; two deployments naming
30
+ * one rank make every call of it twice, and nothing detects that.
31
+ *
32
+ * A deployment that is no region at all reads the same as region zero, which is what its rows
33
+ * carry.
34
+ */
35
+ export declare function regions(): number[];
@@ -1,4 +1,5 @@
1
1
  import { environment } from '@toa.io/generic';
2
+ import { REGION } from '../extensions.convergence/const.js';
2
3
  /** The component the extension ships to hold delayed calls. */
3
4
  export const NAMESPACE = 'cadence';
4
5
  export const COMPONENT = 'metronome';
@@ -23,4 +24,23 @@ export function number(variable, fallback) {
23
24
  const value = Number(environment.get(variable));
24
25
  return Number.isNaN(value) || value <= 0 ? fallback : value;
25
26
  }
27
+ /** What a deployment is given of the regions whose calls it makes. */
28
+ export const REGIONS = 'TOA_CADENCE_REGIONS';
29
+ /**
30
+ * The ranks whose delayed calls this deployment makes.
31
+ *
32
+ * Its own by default — a row carries the region that wrote it, so a call is made by the region
33
+ * that asked for it and by no other, however many hold the row. Naming another region's rank
34
+ * is how a surviving region takes over the calls of one that is gone; two deployments naming
35
+ * one rank make every call of it twice, and nothing detects that.
36
+ *
37
+ * A deployment that is no region at all reads the same as region zero, which is what its rows
38
+ * carry.
39
+ */
40
+ export function regions() {
41
+ const declared = environment.get(REGIONS);
42
+ if (declared === undefined)
43
+ return [Number(environment.get(REGION) ?? 0)];
44
+ return declared.split(' ').map(Number);
45
+ }
26
46
  //# sourceMappingURL=const.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"const.js","sourceRoot":"","sources":["../../source/extensions.cadence/const.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,+DAA+D;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAA;AAClC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAA;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;AAExB,+FAA+F;AAC/F,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAA;AAE9B,gCAAgC;AAChC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;AAExB,oFAAoF;AACpF,MAAM,UAAU,MAAM,CAAC,QAAgB,EAAE,QAAgB;IACvD,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAA;IAE/C,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAA;AAC7D,CAAC"}
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["../../source/extensions.cadence/const.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAA;AAE3D,+DAA+D;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAA;AAClC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAA;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;AAExB,+FAA+F;AAC/F,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAA;AAE9B,gCAAgC;AAChC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;AAExB,oFAAoF;AACpF,MAAM,UAAU,MAAM,CAAC,QAAgB,EAAE,QAAgB;IACvD,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAA;IAE/C,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAA;AAC7D,CAAC;AAED,sEAAsE;AACtE,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAA;AAE5C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,OAAO;IACrB,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAEzC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAEzE,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACxC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { components } from './components.js';
2
2
  import { version } from '../version.js';
3
- import { DISCRETENESS, NAMESPACE } from './const.js';
3
+ import { DISCRETENESS, NAMESPACE, REGIONS } from './const.js';
4
4
  import * as schemas from './schemas.js';
5
5
  /**
6
6
  * The component that keeps delayed calls runs in a service of its own, the way the identity
@@ -14,6 +14,10 @@ export function deployment(_, annotation) {
14
14
  const variables = [
15
15
  { name: 'TOA_CADENCE_DISCRETENESS', value: String(discreteness) }
16
16
  ];
17
+ // absent, the metronome makes the calls of the region it is deployed as, which is what a
18
+ // deployment that has never heard of regions does anyway
19
+ if (annotation?.regions !== undefined)
20
+ variables.push({ name: REGIONS, value: annotation.regions.join(' ') });
17
21
  const service = {
18
22
  group: NAMESPACE,
19
23
  name: 'metronome',
@@ -1 +1 @@
1
- {"version":3,"file":"deployment.js","sourceRoot":"","sources":["../../source/extensions.cadence/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAIvC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,CAAU,EAAE,UAA8B;IACnE,OAAO,CAAC,UAAU,CAAC,QAAQ,CACzB,UAAU,IAAI,IAAI,EAClB,4BAA4B,CAC7B,CAAA;IAED,4FAA4F;IAC5F,uCAAuC;IACvC,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,YAAY,IAAI,YAAY,CAAC,GAAG,IAAI,CAAA;IACtE,MAAM,SAAS,GAAe;QAC5B,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE;KAClE,CAAA;IAED,MAAM,OAAO,GAAY;QACvB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,WAAW;QACjB,OAAO;QACP,UAAU,EAAE,UAAU,EAAE,CAAC,MAAM;QAC/B,SAAS;KACV,CAAA;IAED,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAA;AAChC,CAAC;AAED,8FAA8F;AAC9F,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAA"}
1
+ {"version":3,"file":"deployment.js","sourceRoot":"","sources":["../../source/extensions.cadence/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAIvC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,CAAU,EAAE,UAA8B;IACnE,OAAO,CAAC,UAAU,CAAC,QAAQ,CACzB,UAAU,IAAI,IAAI,EAClB,4BAA4B,CAC7B,CAAA;IAED,4FAA4F;IAC5F,uCAAuC;IACvC,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,YAAY,IAAI,YAAY,CAAC,GAAG,IAAI,CAAA;IACtE,MAAM,SAAS,GAAe;QAC5B,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE;KAClE,CAAA;IAED,yFAAyF;IACzF,yDAAyD;IACzD,IAAI,UAAU,EAAE,OAAO,KAAK,SAAS;QACnC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IAExE,MAAM,OAAO,GAAY;QACvB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,WAAW;QACjB,OAAO;QACP,UAAU,EAAE,UAAU,EAAE,CAAC,MAAM;QAC/B,SAAS;KACV,CAAA;IAED,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAA;AAChC,CAAC;AAED,8FAA8F;AAC9F,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAA"}
@@ -26,9 +26,22 @@ export interface Options {
26
26
  * a dispatcher scans, so a bound shorter than that is one nothing can honour.
27
27
  */
28
28
  overdue: number | null;
29
+ /**
30
+ * Whether this call begins a chain of its own rather than continuing the one arming it.
31
+ *
32
+ * A delay is a hop like any other, so an operation that arms a call to its own endpoint is
33
+ * going round in a circle and is refused on the third round. That is right where it has gone
34
+ * round by mistake and wrong where the recurrence is meant, which only the caller knows.
35
+ *
36
+ * It does not make the call repeat: a delayed call is made once either way. What repeats is
37
+ * the operation arming the next one as it runs, and this is what keeps that from counting.
38
+ */
39
+ detached?: boolean;
29
40
  }
30
41
  /** What an application states under `cadence:` in its context. */
31
42
  export interface Annotation {
32
43
  /** seconds between passes over the calls waiting to be made */
33
44
  discreteness?: number;
45
+ /** the ranks of the regions whose delayed calls this deployment makes; its own by default */
46
+ regions?: number[];
34
47
  }
@@ -1,4 +1,3 @@
1
- import assert from 'node:assert';
2
1
  import { add } from '@toa.io/generic';
3
2
  import { components } from './components.js';
4
3
  import { version } from '../version.js';
@@ -69,7 +68,9 @@ function createSecrets(values) {
69
68
  if (match === null)
70
69
  continue;
71
70
  const name = match.groups?.variable;
72
- assert.ok(name !== undefined);
71
+ // the pattern that matched has the group, so this is a change to one of the two
72
+ if (name === undefined)
73
+ throw new Error(`Secret reference '${value}' names no variable`);
73
74
  secrets.push({
74
75
  name: PREFIX + '_' + name,
75
76
  secret: {
@@ -99,7 +100,8 @@ function prepare(annotation, instances) {
99
100
  for (const [key, values] of Object.entries(annotation)) {
100
101
  const id = key.includes('.') ? key : 'default.' + key;
101
102
  const instance = instances.find((instance) => instance.locator.id === id);
102
- assert.ok(instance !== undefined, `Component '${id}' does not request configuration or does not exist.`);
103
+ if (instance === undefined)
104
+ throw new Error(`Component '${id}' does not request configuration or does not exist.`);
103
105
  assertSecrets(instance.manifest.schema, values);
104
106
  normalized[id] = values;
105
107
  }
@@ -1 +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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AAE,MAAM,EAAE,CAAA;AAC9B,CAAC;AAED,2FAA2F;AAC3F,SAAS,OAAO,CAAC,UAAsB,EAAE,SAAqB;IAC5D,MAAM,UAAU,GAAe,EAAE,CAAA;IAEjC,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;QACrD,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;QAEzE,IAAI,QAAQ,KAAK,SAAS;YACxB,MAAM,IAAI,KAAK,CACb,cAAc,EAAE,qDAAqD,CACtE,CAAA;QAEH,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAE/C,UAAU,CAAC,EAAE,CAAC,GAAG,MAAM,CAAA;IACzB,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
@@ -1,4 +1,3 @@
1
- import assert from 'node:assert';
2
1
  import { SECRET_RX } from './const.js';
3
2
  /**
4
3
  * A property declared `format: secret` is a `$NAME` reference, not a string.
@@ -7,7 +6,8 @@ export function assertSecrets(schema, value, path = '') {
7
6
  if (format(schema) === 'secret') {
8
7
  if (value === undefined)
9
8
  return;
10
- assert.ok(typeof value === 'string' && SECRET_RX.test(value), `'${path || '.'}' is a secret and must be given as a $NAME reference.`);
9
+ if (!(typeof value === 'string' && SECRET_RX.test(value)))
10
+ throw new Error(`'${path || '.'}' is a secret and must be given as a $NAME reference.`);
11
11
  return;
12
12
  }
13
13
  if (typeof value !== 'object' || value === null)
@@ -1 +1 @@
1
- {"version":3,"file":"secrets.js","sourceRoot":"","sources":["../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;AAC/C,CAAC;AAED,SAAS,IAAI,CAAC,IAAY,EAAE,GAAW;IACrC,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,GAAG,GAAG,CAAA;AAC7C,CAAC"}
@@ -0,0 +1,10 @@
1
+ /** What the pointer to this region's brokers is deployed and resolved under. */
2
+ export declare const ID = "convergence";
3
+ /** The one selector of that pointer: a region has one set of brokers. */
4
+ export declare const BROKERS = "brokers";
5
+ /** The rank of this region, which is what the runtime stamps on a record it writes. */
6
+ export declare const REGION = "TOA_REGION";
7
+ /** The binding that carries the channel. */
8
+ export declare const BINDING = "TOA_CONVERGENCE_BINDING";
9
+ /** What the channel is called, and so what its exchanges and queues are named after. */
10
+ export declare const CHANNEL = "convergence";
@@ -0,0 +1,11 @@
1
+ /** What the pointer to this region's brokers is deployed and resolved under. */
2
+ export const ID = 'convergence';
3
+ /** The one selector of that pointer: a region has one set of brokers. */
4
+ export const BROKERS = 'brokers';
5
+ /** The rank of this region, which is what the runtime stamps on a record it writes. */
6
+ export const REGION = 'TOA_REGION';
7
+ /** The binding that carries the channel. */
8
+ export const BINDING = 'TOA_CONVERGENCE_BINDING';
9
+ /** What the channel is called, and so what its exchanges and queues are named after. */
10
+ export const CHANNEL = 'convergence';
11
+ //# sourceMappingURL=const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["../../source/extensions.convergence/const.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,CAAC,MAAM,EAAE,GAAG,aAAa,CAAA;AAE/B,yEAAyE;AACzE,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAA;AAEhC,uFAAuF;AACvF,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAA;AAElC,4CAA4C;AAC5C,MAAM,CAAC,MAAM,OAAO,GAAG,yBAAyB,CAAA;AAEhD,wFAAwF;AACxF,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAA"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * What a context declares of the region it is deployed as. The environment names the region,
3
+ * so a context declares one of these per region and shares nothing between them:
4
+ *
5
+ * ```yaml
6
+ * convergence@eu:
7
+ * priority: 0
8
+ * binding: { provider: amqp, pointer: amqp://cnv-eu.example.com }
9
+ * ```
10
+ */
11
+ export interface Declaration {
12
+ /** a rank: zero outranks one, and it is read only where two regions wrote one version */
13
+ priority: number;
14
+ binding: {
15
+ /** the binding that carries the channel; `amqp`, which is the only one */
16
+ provider?: string;
17
+ /** the brokers of this region, as a URL or a list of them */
18
+ pointer: string | string[];
19
+ };
20
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=declaration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declaration.js","sourceRoot":"","sources":["../../source/extensions.convergence/declaration.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { Declaration } from './declaration.js';
2
+ import type { context } from '@toa.io/norm';
3
+ import type { Dependency } from '@toa.io/operations';
4
+ /**
5
+ * A deployment is one region, and the environment is which one: what a context declares under
6
+ * `convergence@eu` is what deploying `eu` reads, and the regions share nothing. So there is
7
+ * no table here and none reaches the runtime — the rank to stamp, the binding, and this
8
+ * region's brokers do, and a record says for itself which region wrote it.
9
+ */
10
+ export declare function deployment(_: context.Dependency[], annotation: Declaration): Dependency;
@@ -0,0 +1,37 @@
1
+ import { createVariables, normalize } from '@toa.io/pointer';
2
+ import { BINDING, BROKERS, ID, REGION } from './const.js';
3
+ /**
4
+ * A deployment is one region, and the environment is which one: what a context declares under
5
+ * `convergence@eu` is what deploying `eu` reads, and the regions share nothing. So there is
6
+ * no table here and none reaches the runtime — the rank to stamp, the binding, and this
7
+ * region's brokers do, and a record says for itself which region wrote it.
8
+ */
9
+ export function deployment(_, annotation) {
10
+ const region = read(annotation);
11
+ const global = [
12
+ { name: REGION, value: String(region.priority) },
13
+ { name: BINDING, value: provider(region) }
14
+ ];
15
+ const variables = createVariables(ID, normalize({ [BROKERS]: region.binding.pointer }), [
16
+ { group: GLOBAL, selectors: [BROKERS] }
17
+ ]);
18
+ variables[GLOBAL] = (variables[GLOBAL] ?? []).concat(global);
19
+ return { variables };
20
+ }
21
+ function read(annotation) {
22
+ if (!Number.isInteger(annotation?.priority) || annotation.priority < 0)
23
+ throw new Error('Convergence declares a priority, which is this region\'s rank: a whole number where ' +
24
+ 'zero outranks one, and the same in every region.');
25
+ if (annotation.binding?.pointer === undefined)
26
+ throw new Error('Convergence declares the brokers this region converges over.');
27
+ return annotation;
28
+ }
29
+ function provider(region) {
30
+ const declared = region.binding.provider ?? AMQP;
31
+ return PROVIDERS[declared] ?? declared;
32
+ }
33
+ const GLOBAL = 'global';
34
+ const AMQP = 'amqp';
35
+ /** RabbitMQ is the only binding that carries a channel. */
36
+ const PROVIDERS = { [AMQP]: '@toa.io/bindings.amqp' };
37
+ //# sourceMappingURL=deployment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment.js","sourceRoot":"","sources":["../../source/extensions.convergence/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAKzD;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,CAAuB,EAAE,UAAuB;IACzE,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAA;IAE/B,MAAM,MAAM,GAAe;QACzB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;QAChD,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE;KAC3C,CAAA;IAED,MAAM,SAAS,GAAG,eAAe,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE;QACtF,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE;KACxC,CAAC,CAAA;IAEF,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAE5D,OAAO,EAAE,SAAS,EAAE,CAAA;AACtB,CAAC;AAED,SAAS,IAAI,CAAC,UAAuB;IACnC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,UAAU,CAAC,QAAQ,GAAG,CAAC;QACpE,MAAM,IAAI,KAAK,CACb,sFAAsF;YACpF,kDAAkD,CACrD,CAAA;IAEH,IAAI,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,SAAS;QAC3C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAA;IAEjF,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,SAAS,QAAQ,CAAC,MAAmB;IACnC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAA;IAEhD,OAAO,SAAS,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAA;AACxC,CAAC;AAED,MAAM,MAAM,GAAG,QAAQ,CAAA;AACvB,MAAM,IAAI,GAAG,MAAM,CAAA;AAEnB,2DAA2D;AAC3D,MAAM,SAAS,GAA2B,EAAE,CAAC,IAAI,CAAC,EAAE,uBAAuB,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { deployment } from './deployment.js';
2
+ export { BINDING, BROKERS, CHANNEL, ID, REGION } from './const.js';
3
+ export { commands, queue, topology, vhost, INBOUND, OUTBOUND } from './topology.js';
4
+ export type { Declaration } from './declaration.js';
5
+ export type { Topology } from './topology.js';
@@ -0,0 +1,4 @@
1
+ export { deployment } from './deployment.js';
2
+ export { BINDING, BROKERS, CHANNEL, ID, REGION } from './const.js';
3
+ export { commands, queue, topology, vhost, INBOUND, OUTBOUND } from './topology.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/extensions.convergence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * What a region's convergence broker must carry for the components a context converges, as
3
+ * the broker's own definitions.
4
+ *
5
+ * A queue has to exist before the region it is for runs anything: federation propagates a
6
+ * downstream binding up to the upstream, and until it does, what the other regions publish is
7
+ * routed nowhere and dropped rather than held. So this is what an operator declares — when a
8
+ * region is added, and before a converging component is deployed anywhere.
9
+ *
10
+ * The names are the binding's, and `connectors/bindings.amqp` asserts the same ones from the
11
+ * same channel: a queue that already exists with other arguments makes that assertion fail,
12
+ * which is why nothing here is settable.
13
+ */
14
+ export declare function topology(labels: string[], vhost?: string): Topology;
15
+ /**
16
+ * The same thing as `rabbitmqadmin` invocations, for a broker whose management API is not
17
+ * reachable. This is the tool's v1 grammar; v2, which ships with RabbitMQ 4, takes another
18
+ * one entirely — which is why the definitions above are what this command answers with by
19
+ * default, and these are asked for.
20
+ */
21
+ export declare function commands(labels: string[], vhost?: string): string[];
22
+ /** The vhost of a broker the pointer names, which is where a definition goes. */
23
+ export declare function vhost(pointer: string | string[]): string;
24
+ /** The queue one component's records are consumed from. */
25
+ export declare function queue(label: string): string;
26
+ export interface Topology {
27
+ exchanges: object[];
28
+ queues: object[];
29
+ bindings: object[];
30
+ }
31
+ /** Where records from the other regions arrive, federated from each of their `out`. */
32
+ export declare const INBOUND = "convergence.in";
33
+ /** Where a region publishes its own, and what the other regions federate from. */
34
+ export declare const OUTBOUND = "convergence.out";
@@ -0,0 +1,76 @@
1
+ import { CHANNEL } from './const.js';
2
+ /**
3
+ * What a region's convergence broker must carry for the components a context converges, as
4
+ * the broker's own definitions.
5
+ *
6
+ * A queue has to exist before the region it is for runs anything: federation propagates a
7
+ * downstream binding up to the upstream, and until it does, what the other regions publish is
8
+ * routed nowhere and dropped rather than held. So this is what an operator declares — when a
9
+ * region is added, and before a converging component is deployed anywhere.
10
+ *
11
+ * The names are the binding's, and `connectors/bindings.amqp` asserts the same ones from the
12
+ * same channel: a queue that already exists with other arguments makes that assertion fail,
13
+ * which is why nothing here is settable.
14
+ */
15
+ export function topology(labels, vhost = DEFAULT) {
16
+ const exchanges = [INBOUND, OUTBOUND].map((name) => ({
17
+ name,
18
+ vhost,
19
+ type: 'direct',
20
+ durable: true,
21
+ auto_delete: false,
22
+ internal: false,
23
+ arguments: {}
24
+ }));
25
+ const queues = labels.map((label) => ({
26
+ name: queue(label),
27
+ vhost,
28
+ durable: true,
29
+ auto_delete: false,
30
+ arguments: {}
31
+ }));
32
+ const bindings = labels.map((label) => ({
33
+ source: INBOUND,
34
+ vhost,
35
+ destination: queue(label),
36
+ destination_type: 'queue',
37
+ routing_key: label,
38
+ arguments: {}
39
+ }));
40
+ return { exchanges, queues, bindings };
41
+ }
42
+ /**
43
+ * The same thing as `rabbitmqadmin` invocations, for a broker whose management API is not
44
+ * reachable. This is the tool's v1 grammar; v2, which ships with RabbitMQ 4, takes another
45
+ * one entirely — which is why the definitions above are what this command answers with by
46
+ * default, and these are asked for.
47
+ */
48
+ export function commands(labels, vhost = DEFAULT) {
49
+ const at = vhost === DEFAULT ? '' : ` --vhost=${vhost}`;
50
+ const lines = [];
51
+ for (const exchange of [INBOUND, OUTBOUND])
52
+ lines.push(`rabbitmqadmin${at} declare exchange name=${exchange} type=direct durable=true`);
53
+ for (const label of labels) {
54
+ lines.push(`rabbitmqadmin${at} declare queue name=${queue(label)} durable=true`);
55
+ lines.push(`rabbitmqadmin${at} declare binding source=${INBOUND} ` +
56
+ `destination=${queue(label)} routing_key=${label}`);
57
+ }
58
+ return lines;
59
+ }
60
+ /** The vhost of a broker the pointer names, which is where a definition goes. */
61
+ export function vhost(pointer) {
62
+ const uri = typeof pointer === 'string' ? pointer : pointer[0];
63
+ const { pathname } = new URL(uri);
64
+ // an AMQP URI names the vhost in its path, and one without a path is the default
65
+ return pathname === '' ? DEFAULT : decodeURIComponent(pathname.slice(1));
66
+ }
67
+ /** The queue one component's records are consumed from. */
68
+ export function queue(label) {
69
+ return `${CHANNEL}.${label}`;
70
+ }
71
+ /** Where records from the other regions arrive, federated from each of their `out`. */
72
+ export const INBOUND = `${CHANNEL}.in`;
73
+ /** Where a region publishes its own, and what the other regions federate from. */
74
+ export const OUTBOUND = `${CHANNEL}.out`;
75
+ const DEFAULT = '/';
76
+ //# sourceMappingURL=topology.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topology.js","sourceRoot":"","sources":["../../source/extensions.convergence/topology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAgB,EAAE,KAAK,GAAG,OAAO;IACxD,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACnD,IAAI;QACJ,KAAK;QACL,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,EAAE;KACd,CAAC,CAAC,CAAA;IAEH,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAA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C,MAAM,GAAG,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC9D,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IAEjC,iFAAiF;IACjF,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;AAC1E,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,KAAK,CAAC,KAAa;IACjC,OAAO,GAAG,OAAO,IAAI,KAAK,EAAE,CAAA;AAC9B,CAAC;AAQD,uFAAuF;AACvF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,OAAO,KAAK,CAAA;AAEtC,kFAAkF;AAClF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,OAAO,MAAM,CAAA;AAExC,MAAM,OAAO,GAAG,GAAG,CAAA"}
@@ -1,4 +1,3 @@
1
- import assert from 'node:assert';
2
1
  import * as schemas from './schemas.js';
3
2
  import { shortcuts } from './shortcuts.js';
4
3
  import { components } from './components.js';
@@ -9,7 +8,8 @@ import { version } from '../version.js';
9
8
  * instead of building one when its context says `registry.services: published`. */
10
9
  export const image = 'ghcr.io/toa-io/extension-exposition-gateway';
11
10
  export function deployment(_, annotation) {
12
- assert.ok(annotation !== undefined, 'Exposition context annotation is required');
11
+ if (annotation === undefined)
12
+ throw new Error('Exposition context annotation is required');
13
13
  schemas.annotation.validate(annotation);
14
14
  const labels = components().labels;
15
15
  const service = {