betterstart-cli 0.0.102 → 0.0.103
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.
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
// Client-safe barrel: only types and server actions. Server-only modules are
|
|
2
|
-
// imported by path — emitWebhookEvent from './dispatch' and
|
|
3
|
-
// registerWebhookHooks from './register' — so client components can import
|
|
4
|
-
// this barrel without pulling node:crypto into the bundle.
|
|
5
|
-
|
|
6
1
|
export { createWebhook } from './create-webhook'
|
|
7
2
|
export { deleteWebhook } from './delete-webhook'
|
|
8
3
|
export { getWebhookDeliveries } from './get-webhook-deliveries'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use server'
|
|
2
2
|
|
|
3
3
|
import type { SendTestWebhookResult } from './types'
|
|
4
|
+
import { recordWebhookDelivery } from '@admin/actions/webhooks/record-webhook-delivery'
|
|
4
5
|
import { requireRole, UserRole } from '@admin/auth/middleware'
|
|
5
6
|
import db from '@admin/db'
|
|
6
7
|
import { webhooks } from '@admin/db/schema'
|
|
@@ -8,7 +9,6 @@ import { toActionError } from '@admin/utils/error/to-action-error'
|
|
|
8
9
|
import { createWebhookEventId } from '@admin/utils/webhook/create-webhook-event-id'
|
|
9
10
|
import { signWebhookPayload } from '@admin/utils/webhook/sign-webhook-payload'
|
|
10
11
|
import { eq } from 'drizzle-orm'
|
|
11
|
-
import { recordWebhookDelivery } from './dispatch'
|
|
12
12
|
|
|
13
13
|
const TEST_REQUEST_TIMEOUT_MS = 10_000
|
|
14
14
|
|
package/dist/cli.js
CHANGED
|
@@ -2746,7 +2746,7 @@ import * as p11 from "@clack/prompts";
|
|
|
2746
2746
|
var NEXT_ADAPTER_DEPS = [
|
|
2747
2747
|
"@hookform/resolvers",
|
|
2748
2748
|
"@tanstack/react-query",
|
|
2749
|
-
"@tanstack/react-table",
|
|
2749
|
+
"@tanstack/react-table@^8.21.3",
|
|
2750
2750
|
"@tanstack/react-virtual",
|
|
2751
2751
|
"better-auth",
|
|
2752
2752
|
"class-variance-authority",
|
|
@@ -31800,6 +31800,10 @@ var TEMPLATE_REGISTRY = {
|
|
|
31800
31800
|
relPath: "utils/webhook/sign-webhook-payload.ts",
|
|
31801
31801
|
content: () => readTemplate("utils/webhook/sign-webhook-payload.ts")
|
|
31802
31802
|
},
|
|
31803
|
+
"webhook-events-data": {
|
|
31804
|
+
relPath: "data/webhook-events.ts",
|
|
31805
|
+
content: () => readTemplate("data/webhook-events.ts")
|
|
31806
|
+
},
|
|
31803
31807
|
"dev-mode-code-block-height-utils": {
|
|
31804
31808
|
relPath: "utils/dev-mode/code-block-height.ts",
|
|
31805
31809
|
content: () => readTemplate("utils/dev-mode/code-block-height.ts")
|
|
@@ -31832,7 +31836,7 @@ var TEMPLATE_REGISTRY = {
|
|
|
31832
31836
|
"lifecycle-hooks-register": {
|
|
31833
31837
|
relPath: "lib/lifecycle-hooks/register.ts",
|
|
31834
31838
|
content: () => readTemplate("lib/lifecycle-hooks/register.ts"),
|
|
31835
|
-
dependencies: ["webhooks-register-
|
|
31839
|
+
dependencies: ["webhooks-register-webhook-hooks"]
|
|
31836
31840
|
},
|
|
31837
31841
|
"lifecycle-hooks-register-local": {
|
|
31838
31842
|
relPath: "lib/lifecycle-hooks/register.local.ts",
|
|
@@ -32361,7 +32365,14 @@ var TEMPLATE_REGISTRY = {
|
|
|
32361
32365
|
dependencies: [
|
|
32362
32366
|
"webhooks-action-types",
|
|
32363
32367
|
"internal-get-active-endpoints-action",
|
|
32364
|
-
"webhooks-
|
|
32368
|
+
"webhooks-deliver-to-endpoint",
|
|
32369
|
+
"webhooks-deliver-webhook-event",
|
|
32370
|
+
"webhooks-emit-webhook-event",
|
|
32371
|
+
"webhooks-entity-event-payload",
|
|
32372
|
+
"webhooks-prune-webhook-deliveries",
|
|
32373
|
+
"webhooks-read-webhook-subscriptions",
|
|
32374
|
+
"webhooks-record-webhook-delivery",
|
|
32375
|
+
"webhooks-register-webhook-hooks",
|
|
32365
32376
|
"get-webhooks-action",
|
|
32366
32377
|
"create-webhook-action",
|
|
32367
32378
|
"update-webhook-action",
|
|
@@ -32370,8 +32381,7 @@ var TEMPLATE_REGISTRY = {
|
|
|
32370
32381
|
"regenerate-webhook-secret-action",
|
|
32371
32382
|
"get-webhook-subscriptions-action",
|
|
32372
32383
|
"send-test-webhook-action",
|
|
32373
|
-
"get-webhook-deliveries-action"
|
|
32374
|
-
"webhooks-register-action"
|
|
32384
|
+
"get-webhook-deliveries-action"
|
|
32375
32385
|
]
|
|
32376
32386
|
},
|
|
32377
32387
|
"webhooks-action-types": {
|
|
@@ -32385,42 +32395,51 @@ var TEMPLATE_REGISTRY = {
|
|
|
32385
32395
|
"webhooks-deliver-to-endpoint": {
|
|
32386
32396
|
relPath: "lib/actions/webhooks/deliver-to-endpoint.ts",
|
|
32387
32397
|
content: () => readTemplate("lib/actions/webhooks/deliver-to-endpoint.ts"),
|
|
32388
|
-
dependencies: [
|
|
32398
|
+
dependencies: [
|
|
32399
|
+
"internal-get-active-endpoints-action",
|
|
32400
|
+
"webhooks-record-webhook-delivery",
|
|
32401
|
+
"webhook-sign-webhook-payload"
|
|
32402
|
+
]
|
|
32389
32403
|
},
|
|
32390
32404
|
"webhooks-deliver-webhook-event": {
|
|
32391
32405
|
relPath: "lib/actions/webhooks/deliver-webhook-event.ts",
|
|
32392
32406
|
content: () => readTemplate("lib/actions/webhooks/deliver-webhook-event.ts"),
|
|
32393
|
-
dependencies: ["
|
|
32407
|
+
dependencies: ["webhooks-deliver-to-endpoint", "internal-get-active-endpoints-action"]
|
|
32394
32408
|
},
|
|
32395
32409
|
"webhooks-emit-webhook-event": {
|
|
32396
32410
|
relPath: "lib/actions/webhooks/emit-webhook-event.ts",
|
|
32397
32411
|
content: () => readTemplate("lib/actions/webhooks/emit-webhook-event.ts"),
|
|
32398
|
-
dependencies: ["webhook-
|
|
32412
|
+
dependencies: ["webhooks-deliver-webhook-event", "webhook-create-webhook-event-id"]
|
|
32399
32413
|
},
|
|
32400
32414
|
"webhooks-entity-event-payload": {
|
|
32401
32415
|
relPath: "lib/actions/webhooks/entity-event-payload.ts",
|
|
32402
32416
|
content: () => readTemplate("lib/actions/webhooks/entity-event-payload.ts"),
|
|
32403
|
-
dependencies: ["
|
|
32417
|
+
dependencies: ["lifecycle-hooks-types"]
|
|
32404
32418
|
},
|
|
32405
32419
|
"webhooks-prune-webhook-deliveries": {
|
|
32406
32420
|
relPath: "lib/actions/webhooks/prune-webhook-deliveries.ts",
|
|
32407
|
-
content: () => readTemplate("lib/actions/webhooks/prune-webhook-deliveries.ts")
|
|
32408
|
-
dependencies: ["webhook-signature", "internal-get-active-endpoints-action"]
|
|
32421
|
+
content: () => readTemplate("lib/actions/webhooks/prune-webhook-deliveries.ts")
|
|
32409
32422
|
},
|
|
32410
32423
|
"webhooks-read-webhook-subscriptions": {
|
|
32411
32424
|
relPath: "lib/actions/webhooks/read-webhook-subscriptions.ts",
|
|
32412
32425
|
content: () => readTemplate("lib/actions/webhooks/read-webhook-subscriptions.ts"),
|
|
32413
|
-
dependencies: ["
|
|
32426
|
+
dependencies: ["webhooks-action-types"]
|
|
32414
32427
|
},
|
|
32415
32428
|
"webhooks-record-webhook-delivery": {
|
|
32416
32429
|
relPath: "lib/actions/webhooks/record-webhook-delivery.ts",
|
|
32417
32430
|
content: () => readTemplate("lib/actions/webhooks/record-webhook-delivery.ts"),
|
|
32418
|
-
dependencies: ["
|
|
32431
|
+
dependencies: ["webhooks-prune-webhook-deliveries"]
|
|
32419
32432
|
},
|
|
32420
32433
|
"webhooks-register-webhook-hooks": {
|
|
32421
32434
|
relPath: "lib/actions/webhooks/register-webhook-hooks.ts",
|
|
32422
32435
|
content: () => readTemplate("lib/actions/webhooks/register-webhook-hooks.ts"),
|
|
32423
|
-
dependencies: [
|
|
32436
|
+
dependencies: [
|
|
32437
|
+
"lifecycle-hooks-types",
|
|
32438
|
+
"lifecycle-hooks-registry",
|
|
32439
|
+
"webhooks-emit-webhook-event",
|
|
32440
|
+
"webhooks-entity-event-payload",
|
|
32441
|
+
"webhook-events-data"
|
|
32442
|
+
]
|
|
32424
32443
|
},
|
|
32425
32444
|
"get-webhooks-action": {
|
|
32426
32445
|
relPath: "lib/actions/webhooks/get-webhooks.ts",
|
|
@@ -32430,7 +32449,7 @@ var TEMPLATE_REGISTRY = {
|
|
|
32430
32449
|
"create-webhook-action": {
|
|
32431
32450
|
relPath: "lib/actions/webhooks/create-webhook.ts",
|
|
32432
32451
|
content: () => readTemplate("lib/actions/webhooks/create-webhook.ts"),
|
|
32433
|
-
dependencies: ["webhooks-action-types", "webhook-
|
|
32452
|
+
dependencies: ["webhooks-action-types", "webhook-generate-webhook-secret"]
|
|
32434
32453
|
},
|
|
32435
32454
|
"update-webhook-action": {
|
|
32436
32455
|
relPath: "lib/actions/webhooks/update-webhook.ts",
|
|
@@ -32450,17 +32469,22 @@ var TEMPLATE_REGISTRY = {
|
|
|
32450
32469
|
"regenerate-webhook-secret-action": {
|
|
32451
32470
|
relPath: "lib/actions/webhooks/regenerate-webhook-secret.ts",
|
|
32452
32471
|
content: () => readTemplate("lib/actions/webhooks/regenerate-webhook-secret.ts"),
|
|
32453
|
-
dependencies: ["webhooks-action-types", "webhook-
|
|
32472
|
+
dependencies: ["webhooks-action-types", "webhook-generate-webhook-secret"]
|
|
32454
32473
|
},
|
|
32455
32474
|
"get-webhook-subscriptions-action": {
|
|
32456
32475
|
relPath: "lib/actions/webhooks/get-webhook-subscriptions.ts",
|
|
32457
32476
|
content: () => readTemplate("lib/actions/webhooks/get-webhook-subscriptions.ts"),
|
|
32458
|
-
dependencies: ["webhooks-action-types"]
|
|
32477
|
+
dependencies: ["webhooks-action-types", "webhooks-read-webhook-subscriptions"]
|
|
32459
32478
|
},
|
|
32460
32479
|
"send-test-webhook-action": {
|
|
32461
32480
|
relPath: "lib/actions/webhooks/send-test-webhook.ts",
|
|
32462
32481
|
content: () => readTemplate("lib/actions/webhooks/send-test-webhook.ts"),
|
|
32463
|
-
dependencies: [
|
|
32482
|
+
dependencies: [
|
|
32483
|
+
"webhooks-action-types",
|
|
32484
|
+
"webhook-create-webhook-event-id",
|
|
32485
|
+
"webhook-sign-webhook-payload",
|
|
32486
|
+
"webhooks-record-webhook-delivery"
|
|
32487
|
+
]
|
|
32464
32488
|
},
|
|
32465
32489
|
"get-webhook-deliveries-action": {
|
|
32466
32490
|
relPath: "lib/actions/webhooks/get-webhook-deliveries.ts",
|