Skip to content

Commit 4d0f2ed

Browse files
os-zhuangclaude
andcommitted
chore(plugin-webhooks): drop the dead sys_webhook_delivery i18n blocks
`sys_webhook_delivery` was removed from @objectstack/plugin-webhooks when outbound delivery moved to @objectstack/service-messaging (`sys_http_delivery`, ADR-0018 M3), but its translation blocks lingered in all four generated locale bundles — loaded at runtime yet referenced by nothing. - Removed the `sys_webhook_delivery` node from each *.objects.generated.ts bundle (en/zh-CN/ja-JP/es-ES); WebhooksTranslations now carries only sys_webhook. - Fixed scripts/i18n-extract.config.ts, which still imported the deleted sys-webhook-delivery.object.js — a dangling import that broke the documented `os i18n extract` command. It now extracts SysWebhook only. - Corrected the stale ownership comment on SysWebhook that still named sys_webhook_delivery as a live sibling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 189854c commit 4d0f2ed

7 files changed

Lines changed: 26 additions & 451 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
"@objectstack/plugin-webhooks": patch
3+
---
4+
5+
chore(plugin-webhooks): drop the dead sys_webhook_delivery i18n blocks
6+
7+
`sys_webhook_delivery` was removed from `@objectstack/plugin-webhooks` when
8+
outbound delivery moved to `@objectstack/service-messaging` (`sys_http_delivery`,
9+
ADR-0018 M3), but its translation blocks lingered in all four generated locale
10+
bundles (en / zh-CN / ja-JP / es-ES) — loaded at runtime yet referenced by
11+
nothing, since the object no longer exists in this plugin.
12+
13+
- Removed the `sys_webhook_delivery` node from each `*.objects.generated.ts`
14+
bundle; `WebhooksTranslations` now carries only `sys_webhook`.
15+
- Fixed the i18n extract config (`scripts/i18n-extract.config.ts`), which still
16+
imported the deleted `sys-webhook-delivery.object.js` — a dangling import that
17+
broke the documented `os i18n extract` regeneration command. It now extracts
18+
`SysWebhook` only.
19+
- Corrected the stale ownership comment on `SysWebhook` that still named
20+
`sys_webhook_delivery` as a live sibling.

packages/plugins/plugin-webhooks/scripts/i18n-extract.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414

1515
import { defineStack } from '@objectstack/spec';
1616
import { SysWebhook } from '../src/sys-webhook.object.js';
17-
import { SysWebhookDelivery } from '../src/sys-webhook-delivery.object.js';
1817
import { enObjects } from '../src/translations/en.objects.generated.js';
1918
import { zhCNObjects } from '../src/translations/zh-CN.objects.generated.js';
2019
import { jaJPObjects } from '../src/translations/ja-JP.objects.generated.js';
2120
import { esESObjects } from '../src/translations/es-ES.objects.generated.js';
2221

2322
export default defineStack({
2423
name: 'plugin-webhooks-i18n-extract',
25-
objects: [SysWebhook, SysWebhookDelivery] as any,
24+
objects: [SysWebhook] as any,
2625
translations: [
2726
{ en: { objects: enObjects } },
2827
{ 'zh-CN': { objects: zhCNObjects } },

packages/plugins/plugin-webhooks/src/sys-webhook.object.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
1818
* record events fire.
1919
*
2020
* Ownership (ADR-0029 K2.a): this object is **owned by
21-
* `@objectstack/plugin-webhooks`** — the plugin that consumes these rows
22-
* alongside its sibling `sys_webhook_delivery`. It used to live in the
23-
* `@objectstack/platform-objects` monolith and be imported here; the
24-
* definition now lives with its owner so the plugin ships both data and
25-
* behavior as one unit.
21+
* `@objectstack/plugin-webhooks`** — the plugin that consumes these rows. It
22+
* used to live in the `@objectstack/platform-objects` monolith and be imported
23+
* here; the definition now lives with its owner so the plugin ships both data
24+
* and behavior as one unit. (Delivery state moved out to
25+
* `@objectstack/service-messaging` as `sys_http_delivery`, ADR-0018 M3.)
2626
*
2727
* Platform-wide on purpose: every project (standalone, single-tenant,
2828
* cloud) can integrate with external systems (Slack, Stripe, internal

packages/plugins/plugin-webhooks/src/translations/en.objects.generated.ts

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -72,116 +72,5 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
7272
label: "All"
7373
}
7474
}
75-
},
76-
sys_webhook_delivery: {
77-
label: "Webhook Delivery",
78-
pluralLabel: "Webhook Deliveries",
79-
description: "Durable outbox row for one webhook attempt. Managed by @objectstack/plugin-webhooks; do not write directly.",
80-
fields: {
81-
id: {
82-
label: "Delivery ID",
83-
help: "UUID — also doubles as the receiver-side idempotency key"
84-
},
85-
webhook_id: {
86-
label: "Webhook ID",
87-
help: "FK to sys_webhook.id (loosely coupled — denormalised URL/secret on row)"
88-
},
89-
event_id: {
90-
label: "Event ID",
91-
help: "Source event id; UNIQUE(event_id, webhook_id) for dedup"
92-
},
93-
event_type: {
94-
label: "Event Type",
95-
help: "e.g. data.record.created"
96-
},
97-
url: {
98-
label: "Target URL",
99-
help: "Snapshotted at enqueue so config edits do not rewrite live rows"
100-
},
101-
method: {
102-
label: "Method"
103-
},
104-
headers_json: {
105-
label: "Headers JSON"
106-
},
107-
secret: {
108-
label: "HMAC Secret"
109-
},
110-
timeout_ms: {
111-
label: "Timeout (ms)"
112-
},
113-
payload_json: {
114-
label: "Payload JSON"
115-
},
116-
partition_key: {
117-
label: "Partition",
118-
help: "hash(webhook_id) mod partitionCount — precomputed for cheap WHERE"
119-
},
120-
status: {
121-
label: "Status",
122-
help: "pending | in_flight | success | failed | dead"
123-
},
124-
attempts: {
125-
label: "Attempts",
126-
help: "Number of POST attempts made so far"
127-
},
128-
claimed_by: {
129-
label: "Claimed By"
130-
},
131-
claimed_at: {
132-
label: "Claimed At (ms)"
133-
},
134-
next_retry_at: {
135-
label: "Next Retry At (ms)"
136-
},
137-
last_attempted_at: {
138-
label: "Last Attempted At (ms)"
139-
},
140-
response_code: {
141-
label: "HTTP Status"
142-
},
143-
response_body: {
144-
label: "Response Body (capped)"
145-
},
146-
error: {
147-
label: "Error"
148-
},
149-
created_at: {
150-
label: "Created At (ms)"
151-
},
152-
updated_at: {
153-
label: "Updated At (ms)"
154-
}
155-
},
156-
_views: {
157-
recent: {
158-
label: "Recent"
159-
},
160-
failures: {
161-
label: "Failures"
162-
},
163-
in_flight: {
164-
label: "In Flight"
165-
},
166-
pending: {
167-
label: "Pending"
168-
},
169-
by_status: {
170-
label: "By Status"
171-
},
172-
by_webhook: {
173-
label: "By Webhook"
174-
},
175-
all_deliveries: {
176-
label: "All"
177-
}
178-
},
179-
_actions: {
180-
redeliver: {
181-
label: "Redeliver",
182-
confirmText: "Replay this delivery? The receiver will get the original payload again — they must be idempotent on the X-Objectstack-Delivery header.",
183-
successMessage: "Queued for redelivery"
184-
}
185-
}
18675
}
18776
};

packages/plugins/plugin-webhooks/src/translations/es-ES.objects.generated.ts

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -72,116 +72,5 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
7272
label: "Todos"
7373
}
7474
}
75-
},
76-
sys_webhook_delivery: {
77-
label: "Webhook Delivery",
78-
pluralLabel: "Webhook Deliveries",
79-
description: "Durable outbox row for one webhook attempt. Managed by @objectstack/plugin-webhooks; do not write directly.",
80-
fields: {
81-
id: {
82-
label: "Delivery ID",
83-
help: "UUID — also doubles as the receiver-side idempotency key"
84-
},
85-
webhook_id: {
86-
label: "Webhook ID",
87-
help: "FK to sys_webhook.id (loosely coupled — denormalised URL/secret on row)"
88-
},
89-
event_id: {
90-
label: "Event ID",
91-
help: "Source event id; UNIQUE(event_id, webhook_id) for dedup"
92-
},
93-
event_type: {
94-
label: "Event Type",
95-
help: "e.g. data.record.created"
96-
},
97-
url: {
98-
label: "Target URL",
99-
help: "Snapshotted at enqueue so config edits do not rewrite live rows"
100-
},
101-
method: {
102-
label: "Method"
103-
},
104-
headers_json: {
105-
label: "Headers JSON"
106-
},
107-
secret: {
108-
label: "HMAC Secret"
109-
},
110-
timeout_ms: {
111-
label: "Timeout (ms)"
112-
},
113-
payload_json: {
114-
label: "Payload JSON"
115-
},
116-
partition_key: {
117-
label: "Partition",
118-
help: "hash(webhook_id) mod partitionCount — precomputed for cheap WHERE"
119-
},
120-
status: {
121-
label: "Status",
122-
help: "pending | in_flight | success | failed | dead"
123-
},
124-
attempts: {
125-
label: "Attempts",
126-
help: "Number of POST attempts made so far"
127-
},
128-
claimed_by: {
129-
label: "Claimed By"
130-
},
131-
claimed_at: {
132-
label: "Claimed At (ms)"
133-
},
134-
next_retry_at: {
135-
label: "Next Retry At (ms)"
136-
},
137-
last_attempted_at: {
138-
label: "Last Attempted At (ms)"
139-
},
140-
response_code: {
141-
label: "HTTP Status"
142-
},
143-
response_body: {
144-
label: "Response Body (capped)"
145-
},
146-
error: {
147-
label: "Error"
148-
},
149-
created_at: {
150-
label: "Created At (ms)"
151-
},
152-
updated_at: {
153-
label: "Updated At (ms)"
154-
}
155-
},
156-
_views: {
157-
recent: {
158-
label: "Recent"
159-
},
160-
failures: {
161-
label: "Failures"
162-
},
163-
in_flight: {
164-
label: "In Flight"
165-
},
166-
pending: {
167-
label: "Pending"
168-
},
169-
by_status: {
170-
label: "By Status"
171-
},
172-
by_webhook: {
173-
label: "By Webhook"
174-
},
175-
all_deliveries: {
176-
label: "All"
177-
}
178-
},
179-
_actions: {
180-
redeliver: {
181-
label: "Redeliver",
182-
confirmText: "Replay this delivery? The receiver will get the original payload again — they must be idempotent on the X-Objectstack-Delivery header.",
183-
successMessage: "Queued for redelivery"
184-
}
185-
}
18675
}
18776
};

0 commit comments

Comments
 (0)