@vxil/cli 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_vxil-feature-configs.d.ts +2 -2
- package/dist/config.d.ts +9 -6
- package/dist/vxil.js +746 -129
- package/package.json +4 -4
|
@@ -824,12 +824,12 @@ export type AuthHookEvent = (typeof AUTH_HOOK_EVENTS)[number];
|
|
|
824
824
|
/** The events a `cmsHook` function binding may name — the closed union
|
|
825
825
|
* `packages/config` types on the `cmsHook` trigger, and the keys of the
|
|
826
826
|
* functions-v1 receiver's CMS_HOOK_EVENTS_FOR (beforeCreate → created,
|
|
827
|
-
* beforeUpdate → updated, beforeWrite → both). Omitted = beforeWrite. Anything
|
|
827
|
+
* beforeUpdate → updated, beforeWrite → both, afterPublish → published). Omitted = beforeWrite. Anything
|
|
828
828
|
* else is refused at config write (E-CMSHOOK, 2026-10-01): an unknown name used
|
|
829
829
|
* to fall back to beforeWrite at delivery, so a typo like 'afterCreate' or
|
|
830
830
|
* 'beforeDelete' silently subscribed the function to creates AND updates.
|
|
831
831
|
* A CI gate pins every copy to this list. */
|
|
832
|
-
export declare const CMS_HOOK_EVENTS: readonly ["beforeCreate", "beforeUpdate", "beforeWrite"];
|
|
832
|
+
export declare const CMS_HOOK_EVENTS: readonly ["beforeCreate", "beforeUpdate", "beforeWrite", "afterPublish"];
|
|
833
833
|
export type CmsHookEvent = (typeof CMS_HOOK_EVENTS)[number];
|
|
834
834
|
/** The ONE refusal text for an unknown cmsHook binding event (the config
|
|
835
835
|
* validator and the deploy route's early 422 both use it). */
|
package/dist/config.d.ts
CHANGED
|
@@ -206,21 +206,24 @@ export type FunctionTrigger = {
|
|
|
206
206
|
* name — lowercase dotted segments, ≤64 chars, validated at deploy — and is
|
|
207
207
|
* also enforced at delivery: a non-matching event is ACK-200 skipped.
|
|
208
208
|
* Declaring the binding is what opts the function into event delivery; a
|
|
209
|
-
* receiver that declares only `cron` keeps the older cron+{} wake.
|
|
209
|
+
* receiver that declares only `cron` keeps the older cron+{} wake.
|
|
210
|
+
* `source` is optional: a bare `{ kind: 'webhook' }` receives every event. */
|
|
210
211
|
| {
|
|
211
212
|
kind: 'webhook';
|
|
212
|
-
source
|
|
213
|
+
source?: string;
|
|
213
214
|
retry?: FunctionTriggerRetry;
|
|
214
215
|
}
|
|
215
216
|
/** `cmsHook`: fires after a CMS write in `collection`. The platform filters
|
|
216
217
|
* deliveries on the binding (2026-09-19): `beforeCreate` → created only,
|
|
217
|
-
* `beforeUpdate` → updated only, `beforeWrite` → created|updated
|
|
218
|
-
*
|
|
219
|
-
*
|
|
218
|
+
* `beforeUpdate` → updated only, `beforeWrite` → created|updated,
|
|
219
|
+
* `afterPublish` → published (a draft→published transition is its own event,
|
|
220
|
+
* not an update); a write to another collection never wakes the function.
|
|
221
|
+
* Deleted/bulk events are not delivered to a cmsHook binding. `event`
|
|
222
|
+
* defaults to `beforeWrite`. */
|
|
220
223
|
| {
|
|
221
224
|
kind: 'cmsHook';
|
|
222
225
|
collection: string;
|
|
223
|
-
event
|
|
226
|
+
event?: 'beforeCreate' | 'beforeUpdate' | 'beforeWrite' | 'afterPublish';
|
|
224
227
|
retry?: FunctionTriggerRetry;
|
|
225
228
|
} | {
|
|
226
229
|
kind: 'authHook';
|