@pikku/core 0.12.130 → 0.12.134
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/CHANGELOG.md +101 -0
- package/dist/middleware-runner.d.ts +4 -0
- package/dist/middleware-runner.js +52 -16
- package/dist/services/in-memory-lease-service.d.ts +13 -0
- package/dist/services/in-memory-lease-service.js +49 -0
- package/dist/services/in-memory-workflow-service.d.ts +11 -3
- package/dist/services/in-memory-workflow-service.js +53 -23
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +2 -0
- package/dist/services/lease-service.d.ts +61 -0
- package/dist/services/lease-service.js +110 -0
- package/dist/services/workflow-service.d.ts +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/service-tests/lease-service-tests.d.ts +3 -0
- package/dist/testing/service-tests/lease-service-tests.js +138 -0
- package/dist/testing/service-tests/workflow-fencing-tests.d.ts +18 -0
- package/dist/testing/service-tests/workflow-fencing-tests.js +216 -0
- package/dist/testing/service-tests.d.ts +5 -0
- package/dist/testing/service-tests.js +8 -0
- package/dist/types/core.types.d.ts +12 -8
- package/dist/utils/hmac.d.ts +14 -10
- package/dist/utils/hmac.js +29 -25
- package/dist/wirings/http/pikku-fetch-http-response.js +13 -0
- package/dist/wirings/secret/derive-oauth2-app-secrets.js +1 -0
- package/dist/wirings/secret/secret.types.d.ts +6 -0
- package/dist/wirings/trigger/index.d.ts +2 -2
- package/dist/wirings/trigger/index.js +1 -1
- package/dist/wirings/trigger/webhook-source-runner.js +52 -1
- package/dist/wirings/trigger/webhook-source.types.d.ts +50 -0
- package/dist/wirings/trigger/webhook-source.types.js +2 -0
- package/dist/wirings/workflow/graph/graph-runner.js +33 -14
- package/dist/wirings/workflow/index.d.ts +4 -3
- package/dist/wirings/workflow/index.js +3 -2
- package/dist/wirings/workflow/pikku-workflow-service.d.ts +57 -18
- package/dist/wirings/workflow/pikku-workflow-service.js +143 -140
- package/dist/wirings/workflow/workflow-constants.d.ts +28 -1
- package/dist/wirings/workflow/workflow-constants.js +28 -1
- package/dist/wirings/workflow/workflow-errors.d.ts +21 -0
- package/dist/wirings/workflow/workflow-errors.js +38 -0
- package/dist/wirings/workflow/workflow-queue-routing.d.ts +4 -2
- package/dist/wirings/workflow/workflow-queue-routing.js +9 -1
- package/dist/wirings/workflow/workflow-run-lease.d.ts +10 -0
- package/dist/wirings/workflow/workflow-run-lease.js +25 -0
- package/dist/wirings/workflow/workflow-run-status.d.ts +4 -0
- package/dist/wirings/workflow/workflow-run-status.js +37 -0
- package/dist/wirings/workflow/workflow-status-stream.d.ts +2 -1
- package/dist/wirings/workflow/workflow-status-stream.js +18 -1
- package/dist/wirings/workflow/workflow-step-claim.d.ts +13 -1
- package/dist/wirings/workflow/workflow-step-claim.js +29 -5
- package/dist/wirings/workflow/workflow-step-lease.d.ts +25 -0
- package/dist/wirings/workflow/workflow-step-lease.js +53 -0
- package/dist/wirings/workflow/workflow-step-retry.d.ts +14 -0
- package/dist/wirings/workflow/workflow-step-retry.js +33 -0
- package/dist/wirings/workflow/workflow-version-fallback.d.ts +11 -0
- package/dist/wirings/workflow/workflow-version-fallback.js +30 -0
- package/dist/wirings/workflow/workflow.types.d.ts +17 -0
- package/knowledge/decisions/internals/a-held-run-is-woken-later-not-retried.md +28 -0
- package/knowledge/decisions/internals/index.md +2 -1
- package/knowledge/decisions/internals/the-in-memory-workflow-service-is-inline-only-and-single-process.md +2 -2
- package/knowledge/decisions/internals/workflow-step-lock-is-held-only-to-claim-the-step.md +12 -5
- package/package.json +1 -1
- package/src/public-surface.json +18 -1
package/src/public-surface.json
CHANGED
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"wireChannel"
|
|
51
51
|
],
|
|
52
52
|
"./workflow": [
|
|
53
|
+
"DEFAULT_STEP_LEASE_MS",
|
|
53
54
|
"DEFAULT_STEP_RETRIES",
|
|
54
55
|
"PikkuWorkflowService",
|
|
55
56
|
"WorkflowApprovalForbiddenError",
|
|
@@ -60,6 +61,8 @@
|
|
|
60
61
|
"WorkflowRunForbiddenError",
|
|
61
62
|
"WorkflowRunNotFoundError",
|
|
62
63
|
"WorkflowStepFunctionMismatchError",
|
|
64
|
+
"WorkflowStepLeaseExpiredError",
|
|
65
|
+
"WorkflowStepSupersededError",
|
|
63
66
|
"WorkflowSuspendedException",
|
|
64
67
|
"addWorkflow",
|
|
65
68
|
"assertWorkflowRunOwner",
|
|
@@ -67,6 +70,8 @@
|
|
|
67
70
|
"createGraph",
|
|
68
71
|
"deriveInvocationId",
|
|
69
72
|
"isRef",
|
|
73
|
+
"isStepLeaseLive",
|
|
74
|
+
"leaseAttemptsExhausted",
|
|
70
75
|
"pikkuWorkflowGraph",
|
|
71
76
|
"reconstructFinalState",
|
|
72
77
|
"reconstructStateAt",
|
|
@@ -192,6 +197,7 @@
|
|
|
192
197
|
"runWebhookSourceLifecycle",
|
|
193
198
|
"subscribedWebhookEvents",
|
|
194
199
|
"teardownTriggerSources",
|
|
200
|
+
"webhookSecretCredentialName",
|
|
195
201
|
"wireTrigger",
|
|
196
202
|
"wireTriggerSource",
|
|
197
203
|
"wireTriggerWebhookSource"
|
|
@@ -424,6 +430,7 @@
|
|
|
424
430
|
"DEFAULT_WEBHOOK_RETRIES",
|
|
425
431
|
"FileScenarioRunStore",
|
|
426
432
|
"InMemoryAgentRunStateService",
|
|
433
|
+
"InMemoryLeaseService",
|
|
427
434
|
"InMemoryQueueService",
|
|
428
435
|
"InMemorySessionStore",
|
|
429
436
|
"InMemoryTriggerService",
|
|
@@ -436,10 +443,13 @@
|
|
|
436
443
|
"LocalGatewayService",
|
|
437
444
|
"LocalSecretService",
|
|
438
445
|
"LocalVariablesService",
|
|
446
|
+
"LeaseLostError",
|
|
447
|
+
"LeaseTakenError",
|
|
439
448
|
"LogLevel",
|
|
440
449
|
"NoopAuditService",
|
|
441
450
|
"PIKKU_OUTGOING_WEBHOOK_QUEUE_NAME",
|
|
442
451
|
"PikkuCredentialWireService",
|
|
452
|
+
"holdLease",
|
|
443
453
|
"PikkuSessionService",
|
|
444
454
|
"QueueWebhookService",
|
|
445
455
|
"REMOTE_JOBS_SECRET_HEADER",
|
|
@@ -521,7 +531,14 @@
|
|
|
521
531
|
"verifyWithKeyMaterial",
|
|
522
532
|
"wrapDEK"
|
|
523
533
|
],
|
|
524
|
-
"./hmac": [
|
|
534
|
+
"./hmac": [
|
|
535
|
+
"WebhookSigningSecret",
|
|
536
|
+
"hmacDigest",
|
|
537
|
+
"hmacSha256Hex",
|
|
538
|
+
"timingSafeStringEqual",
|
|
539
|
+
"verifyHmacSignature",
|
|
540
|
+
"verifyPublicKeySignature"
|
|
541
|
+
],
|
|
525
542
|
"./state": [
|
|
526
543
|
"addPackageServiceFactories",
|
|
527
544
|
"getAllPackageStates",
|