Package subscribers and recipes in sample/
What a package's own subscribers hear and emit, and how
jadpo package check compiles a package's recipes in its sample/ app.
- What a package's subscriber hears. A subscriber in a package's
subscribers/listens withon:for an event its webhooks bring: one of the package's events withwire_name:, its provider declaringwebhooks:, public or not. Any other event, the package's own events among them, issubscriber.event_invalid, so what a package makes of a webhook is for the app's subscribers. Itsrun:calls one of the package's own actions with the event or its fields (subscriber.run_invalidotherwise);retry:is as any subscriber's. - Through the connection it came in on. A package's subscriber hears
each connection that gives its package
webhooks: { secret: }, and only the events that came in on that connection: one delivery each, namedsubscriber <Package>.<name> <connection>(subscriber AcmePay.renewal payments), so a package connected twice runs its subscriber once per webhook, through the connection the webhook named. Its action's operations go through that connection, with its credential, host, timeout and fake; its changing calls are the delivery's steps, keyed by the delivery, as a subscriber's action's are; and a delivery is held while that connection's circuit breaker is open. - What a package's action emits. An action without
public, which only the package's subscribers run, emits the package's own events. An event a package's action emits and that gives nowire_name:is the package's own, and needs neitherwire_name:noroccurred_at;wire_name:marks an event the provider sends, and emitting one ispackage.action_invalid, since only a signed webhook brings it. An event with neitherwire_name:nor an action emitting it is stillpackage.wire_name_invalidin a package that receives webhooks. What it emits is kept where the package's webhooks are,events: { store: }or the only store of the app's records, and reaches the app's subscribers of its public events; a package's subscriber never hears it, and one withoutpublicreaches no one. - Recipes in
sample/.jadpo package checkcompiles each recipe on its own, copied into the one domain of the package'ssample/app (itsapp.jadpoanddomains/), with the package placed as the sample's own integration, as the bar places it for its own compile, so a recipe names the package as an app's own integration does; the migrations and records a recipe would need aren't asked for, since an app writes its own once it copies the recipe. Therecipesrow reads1 recipe compiles in sample/, or which didn't; a recipe's problem is shown atrecipes/<recipe>/<file>and a problem of the sample's own atsample/<file>, once. A package with recipes and nosample/app.jadpo, or a sample with no domain or several, ispublish.sample_missing. The row isn't shown for a package with no recipes, and waits when the package has errors. A recipe's own tests run insample/once a recipe has some.
Markdown for agents: /docs/package-subscribers-and-recipes-in-sample.md.Built from Jadpo main at a707efb.