@tailor-platform/sdk 2.0.0-next.1 → 2.0.0-next.2
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 +56 -0
- package/dist/application-Dtqap5jM.mjs +3 -0
- package/dist/{client-z_oHGVNy.mjs → application-XuMWK4eq.mjs} +5861 -20
- package/dist/application-XuMWK4eq.mjs.map +1 -0
- package/dist/cli/index.mjs +179 -122
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +75 -16
- package/dist/cli/lib.mjs +5 -6
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/completion/zsh-worker.zsh +105 -26
- package/dist/configure/index.d.mts +9 -8
- package/dist/configure/index.mjs +56 -19
- package/dist/configure/index.mjs.map +1 -1
- package/dist/context-Bd266-ru.mjs.map +1 -1
- package/dist/{context-BuuIb8CC.d.mts → context-C2lEi9uw.d.mts} +7 -28
- package/dist/{crashreport-pr6Rhvza.mjs → crashreport-BMWcxeSE.mjs} +1 -1
- package/dist/{crashreport-BsjAkFWw.mjs → crashreport-DFq-vsU0.mjs} +5 -7
- package/dist/{crashreport-BsjAkFWw.mjs.map → crashreport-DFq-vsU0.mjs.map} +1 -1
- package/dist/{file-_oUZo76X.mjs → file-BbdFGdMV.mjs} +2 -10
- package/dist/file-BbdFGdMV.mjs.map +1 -0
- package/dist/{file-BB8Vs9O_.d.mts → file-Dq3NIt_F.d.mts} +3 -42
- package/dist/{file-utils-DcyIPFQh.mjs → file-utils-CYZnO1pX.mjs} +5 -5
- package/dist/file-utils-CYZnO1pX.mjs.map +1 -0
- package/dist/{globals-Crz8o65k.mjs → globals-Cf0sxIt8.mjs} +2 -2
- package/dist/{globals-Crz8o65k.mjs.map → globals-Cf0sxIt8.mjs.map} +1 -1
- package/dist/{http-adapter.generated-WgMnb7Sb.d.mts → http-adapter.generated-DFsXDdm5.d.mts} +11 -10
- package/dist/{index-BlpzXncY.d.mts → index-BI-_j9Z3.d.mts} +29 -32
- package/dist/{index-DjUdWlzf.d.mts → index-C4JirJH8.d.mts} +2 -2
- package/dist/{index-5vPyRu1y.d.mts → index-CZfWhr0a.d.mts} +2 -2
- package/dist/{index-CK7u9isy.d.mts → index-Cg8VKAdN.d.mts} +4 -4
- package/dist/{index-B7AKc18V.d.mts → index-DYRjoLXD.d.mts} +2 -2
- package/dist/{index-ZePLwxw7.d.mts → index-lFpcjHPU.d.mts} +8 -15
- package/dist/{index-CNYe5lnW.d.mts → index-nW7hE6oE.d.mts} +2 -2
- package/dist/{mock-BjFj5o1I.mjs → mock-FPxmnt-y.mjs} +4 -49
- package/dist/{mock-BjFj5o1I.mjs.map → mock-FPxmnt-y.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +4 -3
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/{registry-DdsYlL_P.mjs → registry-DH4m7eYo.mjs} +4 -2
- package/dist/registry-DH4m7eYo.mjs.map +1 -0
- package/dist/runtime/context.d.mts +1 -1
- package/dist/runtime/file.d.mts +2 -2
- package/dist/runtime/file.mjs +2 -2
- package/dist/runtime/globals.d.mts +6 -6
- package/dist/runtime/index.d.mts +4 -4
- package/dist/runtime/index.mjs +2 -2
- package/dist/runtime/workflow.d.mts +2 -2
- package/dist/runtime/workflow.mjs +1 -1
- package/dist/{runtime-n9NCkjee.mjs → runtime-CY4JvrDj.mjs} +777 -234
- package/dist/runtime-CY4JvrDj.mjs.map +1 -0
- package/dist/{schema-BhkpP5Hw.mjs → schema-Dtw9Orye.mjs} +16 -13
- package/dist/schema-Dtw9Orye.mjs.map +1 -0
- package/dist/{secret-file-DBqZhjFQ.mjs → secret-file-VSVGy1V0.mjs} +27 -2
- package/dist/{secret-file-DBqZhjFQ.mjs.map → secret-file-VSVGy1V0.mjs.map} +1 -1
- package/dist/{seed-jf3008-h.mjs → seed-izIEyP3z.mjs} +3 -4
- package/dist/seed-izIEyP3z.mjs.map +1 -0
- package/dist/service-DCqIWibD.mjs +3 -0
- package/dist/{service-DU1mVzri.mjs → service-DU1mVzri2.mjs} +1 -1
- package/dist/service-DU1mVzri2.mjs.map +1 -0
- package/dist/{service-CCL8ruDf.mjs → service-DjyqbCaJ.mjs} +7 -7
- package/dist/{service-CCL8ruDf.mjs.map → service-DjyqbCaJ.mjs.map} +1 -1
- package/dist/test-env-key-D7UkZp99.mjs +75 -0
- package/dist/test-env-key-D7UkZp99.mjs.map +1 -0
- package/dist/{types-ClhIrW_C.mjs → types-74etvaxy.mjs} +1 -1
- package/dist/{types-DhO_VEZd.d.mts → types-BDRml5C3.d.mts} +12 -12
- package/dist/{types-B2RpYyA_.mjs → types-BQijbo4m.mjs} +9 -9
- package/dist/types-BQijbo4m.mjs.map +1 -0
- package/dist/{types-DwDgacni.d.mts → types-BX4q6Mo6.d.mts} +3 -2
- package/dist/types-BZ7QKVE8.d.mts +21 -0
- package/dist/{types-DCUhgpyI.d.mts → types-CdcQh4Z2.d.mts} +5 -76
- package/dist/utils/test/index.d.mts +6 -15
- package/dist/utils/test/index.mjs +4 -13
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.d.mts +2 -2
- package/dist/vitest/index.mjs +4 -4
- package/dist/vitest/setup.mjs +2 -2
- package/dist/{workflow-DgemCAz3.mjs → workflow-BOmaZwwG.mjs} +8 -3
- package/dist/workflow-BOmaZwwG.mjs.map +1 -0
- package/dist/{workflow-BbKvGLQg.d.mts → workflow-BVy4XWjS.d.mts} +15 -10
- package/dist/{workflow.generated-DtQwEo-x.d.mts → workflow.generated-ClEjBYhm.d.mts} +3 -3
- package/docs/cli/executor.md +53 -0
- package/docs/cli/setup.md +35 -33
- package/docs/cli/workflow.md +157 -20
- package/docs/cli-reference.md +26 -20
- package/docs/github-actions.md +29 -16
- package/docs/migration/v2.md +475 -0
- package/docs/runtime.md +1 -1
- package/docs/services/auth.md +12 -12
- package/docs/services/executor.md +3 -3
- package/docs/services/resolver.md +6 -6
- package/docs/services/tailordb.md +14 -12
- package/docs/services/workflow.md +4 -4
- package/docs/testing.md +59 -47
- package/package.json +7 -7
- package/dist/application-DB2r36Et.mjs +0 -3
- package/dist/application-DqS1yBg3.mjs +0 -5680
- package/dist/application-DqS1yBg3.mjs.map +0 -1
- package/dist/client-Dbohmtkv.mjs +0 -3
- package/dist/client-z_oHGVNy.mjs.map +0 -1
- package/dist/file-_oUZo76X.mjs.map +0 -1
- package/dist/file-utils-DcyIPFQh.mjs.map +0 -1
- package/dist/job-fuc3j1Ma.mjs +0 -53
- package/dist/job-fuc3j1Ma.mjs.map +0 -1
- package/dist/registry-DdsYlL_P.mjs.map +0 -1
- package/dist/runtime-n9NCkjee.mjs.map +0 -1
- package/dist/schema-BhkpP5Hw.mjs.map +0 -1
- package/dist/seed-jf3008-h.mjs.map +0 -1
- package/dist/service-D6yonf2I.mjs +0 -3
- package/dist/service-DU1mVzri.mjs.map +0 -1
- package/dist/test-env-key-D9kM6ETE.mjs +0 -49
- package/dist/test-env-key-D9kM6ETE.mjs.map +0 -1
- package/dist/types-B2RpYyA_.mjs.map +0 -1
- package/dist/workflow-DgemCAz3.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# politty-completion-version: 1
|
|
2
|
-
# politty-bin-sig:
|
|
2
|
+
# politty-bin-sig: 1782195524
|
|
3
3
|
# politty-bin-path: /home/runner/work/sdk/sdk/node_modules/.bin/tailor-sdk
|
|
4
4
|
# program: tailor-sdk
|
|
5
5
|
# shell: zsh
|
|
@@ -544,10 +544,12 @@ __tailor_sdk_worker_opt_takes_value() {
|
|
|
544
544
|
executor:trigger:--data|executor:trigger:-d|executor:trigger:--d) return 0 ;;
|
|
545
545
|
executor:trigger:--header|executor:trigger:-H|executor:trigger:--H) return 0 ;;
|
|
546
546
|
executor:trigger:--interval|executor:trigger:-i|executor:trigger:--i) return 0 ;;
|
|
547
|
+
executor:trigger:--timeout|executor:trigger:-t|executor:trigger:--t) return 0 ;;
|
|
547
548
|
executor:jobs:--workspace-id|executor:jobs:--workspaceId|executor:jobs:-w|executor:jobs:--w) return 0 ;;
|
|
548
549
|
executor:jobs:--profile|executor:jobs:-p|executor:jobs:--p) return 0 ;;
|
|
549
550
|
executor:jobs:--status|executor:jobs:-s|executor:jobs:--s) return 0 ;;
|
|
550
551
|
executor:jobs:--interval|executor:jobs:-i|executor:jobs:--i) return 0 ;;
|
|
552
|
+
executor:jobs:--timeout|executor:jobs:-t|executor:jobs:--t) return 0 ;;
|
|
551
553
|
executor:jobs:--order) return 0 ;;
|
|
552
554
|
executor:jobs:--limit) return 0 ;;
|
|
553
555
|
executor:list:--workspace-id|executor:list:--workspaceId|executor:list:-w|executor:list:--w) return 0 ;;
|
|
@@ -668,11 +670,12 @@ __tailor_sdk_worker_opt_takes_value() {
|
|
|
668
670
|
secret:delete:--profile|secret:delete:-p|secret:delete:--p) return 0 ;;
|
|
669
671
|
secret:delete:--vault-name|secret:delete:--vaultName|secret:delete:-V|secret:delete:--V) return 0 ;;
|
|
670
672
|
secret:delete:--name|secret:delete:-n|secret:delete:--n) return 0 ;;
|
|
671
|
-
setup
|
|
672
|
-
setup
|
|
673
|
-
setup
|
|
674
|
-
setup
|
|
675
|
-
setup
|
|
673
|
+
setup:--provider|setup:-p|setup:--p) return 0 ;;
|
|
674
|
+
setup:--workspace-name|setup:--workspaceName|setup:-n|setup:--n) return 0 ;;
|
|
675
|
+
setup:--branch) return 0 ;;
|
|
676
|
+
setup:--tag-pattern|setup:--tagPattern) return 0 ;;
|
|
677
|
+
setup:--environment) return 0 ;;
|
|
678
|
+
setup:--dir|setup:-d|setup:--d) return 0 ;;
|
|
676
679
|
show:--workspace-id|show:--workspaceId|show:-w|show:--w) return 0 ;;
|
|
677
680
|
show:--profile|show:-p|show:--p) return 0 ;;
|
|
678
681
|
show:--config|show:-c|show:--c) return 0 ;;
|
|
@@ -737,6 +740,13 @@ __tailor_sdk_worker_opt_takes_value() {
|
|
|
737
740
|
workflow:start:--machine-user|workflow:start:--machineUser|workflow:start:-m|workflow:start:--m) return 0 ;;
|
|
738
741
|
workflow:start:--arg|workflow:start:-a|workflow:start:--a) return 0 ;;
|
|
739
742
|
workflow:start:--interval|workflow:start:-i|workflow:start:--i) return 0 ;;
|
|
743
|
+
workflow:start:--timeout|workflow:start:-t|workflow:start:--t) return 0 ;;
|
|
744
|
+
workflow:start:--until|workflow:start:-u|workflow:start:--u) return 0 ;;
|
|
745
|
+
workflow:wait:--workspace-id|workflow:wait:--workspaceId|workflow:wait:-w|workflow:wait:--w) return 0 ;;
|
|
746
|
+
workflow:wait:--profile|workflow:wait:-p|workflow:wait:--p) return 0 ;;
|
|
747
|
+
workflow:wait:--interval|workflow:wait:-i|workflow:wait:--i) return 0 ;;
|
|
748
|
+
workflow:wait:--timeout|workflow:wait:-t|workflow:wait:--t) return 0 ;;
|
|
749
|
+
workflow:wait:--until|workflow:wait:-u|workflow:wait:--u) return 0 ;;
|
|
740
750
|
workflow:executions:--workspace-id|workflow:executions:--workspaceId|workflow:executions:-w|workflow:executions:--w) return 0 ;;
|
|
741
751
|
workflow:executions:--profile|workflow:executions:-p|workflow:executions:--p) return 0 ;;
|
|
742
752
|
workflow:executions:--order) return 0 ;;
|
|
@@ -744,9 +754,13 @@ __tailor_sdk_worker_opt_takes_value() {
|
|
|
744
754
|
workflow:executions:--workflow-name|workflow:executions:--workflowName|workflow:executions:-n|workflow:executions:--n) return 0 ;;
|
|
745
755
|
workflow:executions:--status|workflow:executions:-s|workflow:executions:--s) return 0 ;;
|
|
746
756
|
workflow:executions:--interval|workflow:executions:-i|workflow:executions:--i) return 0 ;;
|
|
757
|
+
workflow:executions:--timeout|workflow:executions:-t|workflow:executions:--t) return 0 ;;
|
|
758
|
+
workflow:executions:--until|workflow:executions:-u|workflow:executions:--u) return 0 ;;
|
|
747
759
|
workflow:resume:--workspace-id|workflow:resume:--workspaceId|workflow:resume:-w|workflow:resume:--w) return 0 ;;
|
|
748
760
|
workflow:resume:--profile|workflow:resume:-p|workflow:resume:--p) return 0 ;;
|
|
749
761
|
workflow:resume:--interval|workflow:resume:-i|workflow:resume:--i) return 0 ;;
|
|
762
|
+
workflow:resume:--timeout|workflow:resume:-t|workflow:resume:--t) return 0 ;;
|
|
763
|
+
workflow:resume:--until|workflow:resume:-u|workflow:resume:--u) return 0 ;;
|
|
750
764
|
workspace:app:health:--workspace-id|workspace:app:health:--workspaceId|workspace:app:health:-w|workspace:app:health:--w) return 0 ;;
|
|
751
765
|
workspace:app:health:--profile|workspace:app:health:-p|workspace:app:health:--p) return 0 ;;
|
|
752
766
|
workspace:app:health:--name|workspace:app:health:-n|workspace:app:health:--n) return 0 ;;
|
|
@@ -873,7 +887,7 @@ __tailor_sdk_worker_is_subcmd() {
|
|
|
873
887
|
secret:list) return 0 ;;
|
|
874
888
|
secret:delete) return 0 ;;
|
|
875
889
|
:secret) return 0 ;;
|
|
876
|
-
setup:
|
|
890
|
+
setup:check) return 0 ;;
|
|
877
891
|
:setup) return 0 ;;
|
|
878
892
|
:show) return 0 ;;
|
|
879
893
|
skills:install) return 0 ;;
|
|
@@ -910,6 +924,7 @@ __tailor_sdk_worker_is_subcmd() {
|
|
|
910
924
|
workflow:list) return 0 ;;
|
|
911
925
|
workflow:get) return 0 ;;
|
|
912
926
|
workflow:start) return 0 ;;
|
|
927
|
+
workflow:wait) return 0 ;;
|
|
913
928
|
workflow:executions) return 0 ;;
|
|
914
929
|
workflow:resume) return 0 ;;
|
|
915
930
|
:workflow) return 0 ;;
|
|
@@ -1318,6 +1333,7 @@ __tailor_sdk_worker_complete_executor_trigger() {
|
|
|
1318
1333
|
_opts+=("--header:Request header (format\: 'Key\: Value', can be specified multiple times)")
|
|
1319
1334
|
__tailor_sdk_worker_not_used "--wait" "-W" "--W" && _opts+=("--wait:Wait for job completion and downstream execution (workflow/function) if applicable")
|
|
1320
1335
|
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when using --wait (e.g., '3s', '500ms', '1m')")
|
|
1336
|
+
__tailor_sdk_worker_not_used "--timeout" "-t" "--t" && _opts+=("--timeout:Maximum time to wait when using --wait (e.g., '30s', '5m')")
|
|
1321
1337
|
__tailor_sdk_worker_not_used "--logs" "-l" "--l" && _opts+=("--logs:Display function execution logs after completion (requires --wait)")
|
|
1322
1338
|
__tailor_sdk_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
1323
1339
|
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
@@ -1355,6 +1371,7 @@ __tailor_sdk_worker_complete_executor_jobs() {
|
|
|
1355
1371
|
__tailor_sdk_worker_not_used "--attempts" && _opts+=("--attempts:Show job attempts (only with job ID) (detail mode only)")
|
|
1356
1372
|
__tailor_sdk_worker_not_used "--wait" "-W" "--W" && _opts+=("--wait:Wait for job completion and downstream execution (workflow/function) if applicable (detail mode only)")
|
|
1357
1373
|
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when using --wait (e.g., '3s', '500ms', '1m')")
|
|
1374
|
+
__tailor_sdk_worker_not_used "--timeout" "-t" "--t" && _opts+=("--timeout:Maximum time to wait when using --wait (e.g., '30s', '5m')")
|
|
1358
1375
|
__tailor_sdk_worker_not_used "--order" && _opts+=("--order:Sort order (asc or desc)")
|
|
1359
1376
|
__tailor_sdk_worker_not_used "--limit" && _opts+=("--limit:Maximum number of jobs to list (0\: unlimited, default\: 50) (list mode only)")
|
|
1360
1377
|
__tailor_sdk_worker_not_used "--logs" "-l" "--l" && _opts+=("--logs:Display function execution logs after completion (requires --wait)")
|
|
@@ -2473,20 +2490,12 @@ __tailor_sdk_worker_complete_secret() {
|
|
|
2473
2490
|
__tailor_sdk_worker_cdescribe 'subcommands' _subs
|
|
2474
2491
|
}
|
|
2475
2492
|
|
|
2476
|
-
|
|
2493
|
+
__tailor_sdk_worker_complete_setup_check() {
|
|
2477
2494
|
local -a _vals=()
|
|
2478
|
-
if __tailor_sdk_worker_opt_takes_value "setup:
|
|
2495
|
+
if __tailor_sdk_worker_opt_takes_value "setup:check" "${words[CURRENT-1]}"; then return 0; fi
|
|
2479
2496
|
if (( _after_dd )); then return 0; fi
|
|
2480
2497
|
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2481
2498
|
local -a _opts=()
|
|
2482
|
-
__tailor_sdk_worker_not_used "--workspace-name" "--workspaceName" "-n" "--n" && _opts+=("--workspace-name:Workspace name (defaults to the config 'name')")
|
|
2483
|
-
__tailor_sdk_worker_not_used "--branch" && _opts+=("--branch:Branch target\: deploy trigger branch (defaults to the detected default branch). Tag target\: tag-reachability guard branch (no guard when omitted)")
|
|
2484
|
-
__tailor_sdk_worker_not_used "--tag" && _opts+=("--tag:Generate a tag target (deploy on tag push)")
|
|
2485
|
-
__tailor_sdk_worker_not_used "--tag-pattern" "--tagPattern" && _opts+=("--tag-pattern:Tag glob to match (requires --tag; defaults to v*)")
|
|
2486
|
-
__tailor_sdk_worker_not_used "--environment" && _opts+=("--environment:GitHub Environment for the plan/deploy jobs (defaults to the workspace name)")
|
|
2487
|
-
__tailor_sdk_worker_not_used "--no-plan" "--noPlan" && _opts+=("--no-plan:Disable the plan job for a branch target (cannot be combined with --tag)")
|
|
2488
|
-
__tailor_sdk_worker_not_used "--dir" "-d" "--d" && _opts+=("--dir:App directory (for monorepo setups)")
|
|
2489
|
-
__tailor_sdk_worker_not_used "--force" && _opts+=("--force:Discard hand edits / take over unmanaged files and regenerate")
|
|
2490
2499
|
__tailor_sdk_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
2491
2500
|
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
2492
2501
|
return 0
|
|
@@ -2495,15 +2504,30 @@ __tailor_sdk_worker_complete_setup_github() {
|
|
|
2495
2504
|
|
|
2496
2505
|
__tailor_sdk_worker_complete_setup() {
|
|
2497
2506
|
local -a _vals=()
|
|
2507
|
+
case "${words[CURRENT-1]}" in
|
|
2508
|
+
--provider|-p|--p)
|
|
2509
|
+
_vals=("github")
|
|
2510
|
+
__tailor_sdk_worker_cdescribe 'completions' _vals
|
|
2511
|
+
return 0 ;;
|
|
2512
|
+
esac
|
|
2498
2513
|
if __tailor_sdk_worker_opt_takes_value "setup" "${words[CURRENT-1]}"; then return 0; fi
|
|
2499
2514
|
if (( _after_dd )); then return 0; fi
|
|
2500
2515
|
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2501
2516
|
local -a _opts=()
|
|
2517
|
+
__tailor_sdk_worker_not_used "--provider" "-p" "--p" && _opts+=("--provider:CI provider to generate for (only 'github' is supported)")
|
|
2518
|
+
__tailor_sdk_worker_not_used "--workspace-name" "--workspaceName" "-n" "--n" && _opts+=("--workspace-name:Workspace name (defaults to the config 'name')")
|
|
2519
|
+
__tailor_sdk_worker_not_used "--branch" && _opts+=("--branch:Branch target\: deploy trigger branch (defaults to the detected default branch). Tag target\: tag-reachability guard branch (no guard when omitted)")
|
|
2520
|
+
__tailor_sdk_worker_not_used "--tag" && _opts+=("--tag:Generate a tag target (deploy on tag push)")
|
|
2521
|
+
__tailor_sdk_worker_not_used "--tag-pattern" "--tagPattern" && _opts+=("--tag-pattern:Tag glob to match (requires --tag; defaults to v*)")
|
|
2522
|
+
__tailor_sdk_worker_not_used "--environment" && _opts+=("--environment:GitHub Environment for the plan/deploy jobs (defaults to the workspace name)")
|
|
2523
|
+
__tailor_sdk_worker_not_used "--no-plan" "--noPlan" && _opts+=("--no-plan:Disable the plan job for a branch target (cannot be combined with --tag)")
|
|
2524
|
+
__tailor_sdk_worker_not_used "--dir" "-d" "--d" && _opts+=("--dir:App directory (for monorepo setups)")
|
|
2525
|
+
__tailor_sdk_worker_not_used "--force" && _opts+=("--force:Discard hand edits / take over unmanaged files and regenerate")
|
|
2502
2526
|
__tailor_sdk_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
2503
2527
|
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
2504
2528
|
return 0
|
|
2505
2529
|
fi
|
|
2506
|
-
local -a _subs=("
|
|
2530
|
+
local -a _subs=("check:Audit generated workflows for drift against the current config/repo (read-only).")
|
|
2507
2531
|
__tailor_sdk_worker_cdescribe 'subcommands' _subs
|
|
2508
2532
|
}
|
|
2509
2533
|
|
|
@@ -3460,6 +3484,10 @@ __tailor_sdk_worker_complete_workflow_start() {
|
|
|
3460
3484
|
done
|
|
3461
3485
|
done
|
|
3462
3486
|
return 0 ;;
|
|
3487
|
+
--until|-u|--u)
|
|
3488
|
+
_vals=("success" "suspended" "terminal")
|
|
3489
|
+
__tailor_sdk_worker_cdescribe 'completions' _vals
|
|
3490
|
+
return 0 ;;
|
|
3463
3491
|
esac
|
|
3464
3492
|
if __tailor_sdk_worker_opt_takes_value "workflow:start" "${words[CURRENT-1]}"; then return 0; fi
|
|
3465
3493
|
if (( _after_dd )); then
|
|
@@ -3477,8 +3505,44 @@ __tailor_sdk_worker_complete_workflow_start() {
|
|
|
3477
3505
|
__tailor_sdk_worker_not_used "--machine-user" "--machineUser" "-m" "--m" && _opts+=("--machine-user:Machine user name. Falls back to the active profile's default machine user.")
|
|
3478
3506
|
__tailor_sdk_worker_not_used "--arg" "-a" "--a" && _opts+=("--arg:Workflow argument (JSON string)")
|
|
3479
3507
|
__tailor_sdk_worker_not_used "--wait" "-W" "--W" && _opts+=("--wait:Wait for execution to complete")
|
|
3480
|
-
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when
|
|
3481
|
-
__tailor_sdk_worker_not_used "--
|
|
3508
|
+
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when waiting (e.g., '3s', '500ms', '1m')")
|
|
3509
|
+
__tailor_sdk_worker_not_used "--timeout" "-t" "--t" && _opts+=("--timeout:Maximum time to wait (e.g., '30s', '10m')")
|
|
3510
|
+
__tailor_sdk_worker_not_used "--until" "-u" "--u" && _opts+=("--until:Wait target (success, suspended, terminal)")
|
|
3511
|
+
__tailor_sdk_worker_not_used "--logs" "-l" "--l" && _opts+=("--logs:Display job execution logs after completion")
|
|
3512
|
+
__tailor_sdk_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
3513
|
+
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
3514
|
+
return 0
|
|
3515
|
+
fi
|
|
3516
|
+
case "$_pos_count" in
|
|
3517
|
+
0)
|
|
3518
|
+
;;
|
|
3519
|
+
esac
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3522
|
+
__tailor_sdk_worker_complete_workflow_wait() {
|
|
3523
|
+
local -a _vals=()
|
|
3524
|
+
case "${words[CURRENT-1]}" in
|
|
3525
|
+
--until|-u|--u)
|
|
3526
|
+
_vals=("success" "suspended" "terminal")
|
|
3527
|
+
__tailor_sdk_worker_cdescribe 'completions' _vals
|
|
3528
|
+
return 0 ;;
|
|
3529
|
+
esac
|
|
3530
|
+
if __tailor_sdk_worker_opt_takes_value "workflow:wait" "${words[CURRENT-1]}"; then return 0; fi
|
|
3531
|
+
if (( _after_dd )); then
|
|
3532
|
+
case "$_pos_count" in
|
|
3533
|
+
0)
|
|
3534
|
+
;;
|
|
3535
|
+
esac
|
|
3536
|
+
return 0
|
|
3537
|
+
fi
|
|
3538
|
+
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
3539
|
+
local -a _opts=()
|
|
3540
|
+
__tailor_sdk_worker_not_used "--workspace-id" "--workspaceId" "-w" "--w" && _opts+=("--workspace-id:Workspace ID")
|
|
3541
|
+
__tailor_sdk_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
|
|
3542
|
+
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when waiting (e.g., '3s', '500ms', '1m')")
|
|
3543
|
+
__tailor_sdk_worker_not_used "--timeout" "-t" "--t" && _opts+=("--timeout:Maximum time to wait (e.g., '30s', '10m')")
|
|
3544
|
+
__tailor_sdk_worker_not_used "--until" "-u" "--u" && _opts+=("--until:Wait target (success, suspended, terminal)")
|
|
3545
|
+
__tailor_sdk_worker_not_used "--logs" "-l" "--l" && _opts+=("--logs:Display job execution logs after completion")
|
|
3482
3546
|
__tailor_sdk_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
3483
3547
|
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
3484
3548
|
return 0
|
|
@@ -3496,6 +3560,10 @@ __tailor_sdk_worker_complete_workflow_executions() {
|
|
|
3496
3560
|
_vals=("asc" "desc")
|
|
3497
3561
|
__tailor_sdk_worker_cdescribe 'completions' _vals
|
|
3498
3562
|
return 0 ;;
|
|
3563
|
+
--until|-u|--u)
|
|
3564
|
+
_vals=("success" "suspended" "terminal")
|
|
3565
|
+
__tailor_sdk_worker_cdescribe 'completions' _vals
|
|
3566
|
+
return 0 ;;
|
|
3499
3567
|
esac
|
|
3500
3568
|
if __tailor_sdk_worker_opt_takes_value "workflow:executions" "${words[CURRENT-1]}"; then return 0; fi
|
|
3501
3569
|
if (( _after_dd )); then
|
|
@@ -3514,7 +3582,9 @@ __tailor_sdk_worker_complete_workflow_executions() {
|
|
|
3514
3582
|
__tailor_sdk_worker_not_used "--workflow-name" "--workflowName" "-n" "--n" && _opts+=("--workflow-name:Filter by workflow name (list mode only)")
|
|
3515
3583
|
__tailor_sdk_worker_not_used "--status" "-s" "--s" && _opts+=("--status:Filter by status (list mode only)")
|
|
3516
3584
|
__tailor_sdk_worker_not_used "--wait" "-W" "--W" && _opts+=("--wait:Wait for execution to complete")
|
|
3517
|
-
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when
|
|
3585
|
+
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when waiting (e.g., '3s', '500ms', '1m')")
|
|
3586
|
+
__tailor_sdk_worker_not_used "--timeout" "-t" "--t" && _opts+=("--timeout:Maximum time to wait (e.g., '30s', '10m')")
|
|
3587
|
+
__tailor_sdk_worker_not_used "--until" "-u" "--u" && _opts+=("--until:Wait target (success, suspended, terminal)")
|
|
3518
3588
|
__tailor_sdk_worker_not_used "--logs" && _opts+=("--logs:Display job execution logs (detail mode only)")
|
|
3519
3589
|
__tailor_sdk_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
3520
3590
|
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
@@ -3528,6 +3598,12 @@ __tailor_sdk_worker_complete_workflow_executions() {
|
|
|
3528
3598
|
|
|
3529
3599
|
__tailor_sdk_worker_complete_workflow_resume() {
|
|
3530
3600
|
local -a _vals=()
|
|
3601
|
+
case "${words[CURRENT-1]}" in
|
|
3602
|
+
--until|-u|--u)
|
|
3603
|
+
_vals=("success" "suspended" "terminal")
|
|
3604
|
+
__tailor_sdk_worker_cdescribe 'completions' _vals
|
|
3605
|
+
return 0 ;;
|
|
3606
|
+
esac
|
|
3531
3607
|
if __tailor_sdk_worker_opt_takes_value "workflow:resume" "${words[CURRENT-1]}"; then return 0; fi
|
|
3532
3608
|
if (( _after_dd )); then
|
|
3533
3609
|
case "$_pos_count" in
|
|
@@ -3541,8 +3617,10 @@ __tailor_sdk_worker_complete_workflow_resume() {
|
|
|
3541
3617
|
__tailor_sdk_worker_not_used "--workspace-id" "--workspaceId" "-w" "--w" && _opts+=("--workspace-id:Workspace ID")
|
|
3542
3618
|
__tailor_sdk_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
|
|
3543
3619
|
__tailor_sdk_worker_not_used "--wait" "-W" "--W" && _opts+=("--wait:Wait for execution to complete")
|
|
3544
|
-
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when
|
|
3545
|
-
__tailor_sdk_worker_not_used "--
|
|
3620
|
+
__tailor_sdk_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when waiting (e.g., '3s', '500ms', '1m')")
|
|
3621
|
+
__tailor_sdk_worker_not_used "--timeout" "-t" "--t" && _opts+=("--timeout:Maximum time to wait (e.g., '30s', '10m')")
|
|
3622
|
+
__tailor_sdk_worker_not_used "--until" "-u" "--u" && _opts+=("--until:Wait target (success, suspended, terminal)")
|
|
3623
|
+
__tailor_sdk_worker_not_used "--logs" "-l" "--l" && _opts+=("--logs:Display job execution logs after completion")
|
|
3546
3624
|
__tailor_sdk_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
3547
3625
|
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
3548
3626
|
return 0
|
|
@@ -3563,7 +3641,7 @@ __tailor_sdk_worker_complete_workflow() {
|
|
|
3563
3641
|
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
3564
3642
|
return 0
|
|
3565
3643
|
fi
|
|
3566
|
-
local -a _subs=("list:List all workflows in the workspace." "get:Get workflow details." "start:Start a workflow execution." "executions:List or get workflow executions." "resume:Resume a failed or pending workflow execution.")
|
|
3644
|
+
local -a _subs=("list:List all workflows in the workspace." "get:Get workflow details." "start:Start a workflow execution." "wait:Wait for a workflow execution." "executions:List or get workflow executions." "resume:Resume a failed or pending workflow execution.")
|
|
3567
3645
|
__tailor_sdk_worker_cdescribe 'subcommands' _subs
|
|
3568
3646
|
}
|
|
3569
3647
|
|
|
@@ -3857,7 +3935,7 @@ __tailor_sdk_worker_complete_root() {
|
|
|
3857
3935
|
__tailor_sdk_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
3858
3936
|
__tailor_sdk_worker_cdescribe 'options' _opts
|
|
3859
3937
|
else
|
|
3860
|
-
local -a _subs=("api:Call Tailor Platform API endpoints directly." "authconnection:Manage auth connections." "crashreport:Manage crash reports." "deploy:Deploy your application by applying the Tailor configuration." "executor:Manage executors" "function:Manage functions" "generate:Generate files using Tailor configuration." "init:Initialize a new project using create-sdk." "login:Login to Tailor Platform." "logout:Logout from Tailor Platform." "machineuser:Manage machine users in your Tailor Platform application." "oauth2client:Manage OAuth2 clients in your Tailor Platform application." "open:Open Tailor Platform Console." "organization:Manage Tailor Platform organizations." "profile:Manage workspace profiles (user + workspace combinations)." "query:Run SQL/GraphQL query." "remove:Remove all resources managed by the application from the workspace." "secret:Manage Secret Manager vaults and secrets." "setup:
|
|
3938
|
+
local -a _subs=("api:Call Tailor Platform API endpoints directly." "authconnection:Manage auth connections." "crashreport:Manage crash reports." "deploy:Deploy your application by applying the Tailor configuration." "executor:Manage executors" "function:Manage functions" "generate:Generate files using Tailor configuration." "init:Initialize a new project using create-sdk." "login:Login to Tailor Platform." "logout:Logout from Tailor Platform." "machineuser:Manage machine users in your Tailor Platform application." "oauth2client:Manage OAuth2 clients in your Tailor Platform application." "open:Open Tailor Platform Console." "organization:Manage Tailor Platform organizations." "profile:Manage workspace profiles (user + workspace combinations)." "query:Run SQL/GraphQL query." "remove:Remove all resources managed by the application from the workspace." "secret:Manage Secret Manager vaults and secrets." "setup:Generate a CI deploy workflow for your project. (beta)" "show:Show information about the deployed application." "skills:Manage Tailor SDK agent skills." "staticwebsite:Manage static websites in your workspace." "tailordb:Manage TailorDB tables and data." "upgrade:Run codemods to upgrade your project to a newer SDK version." "user:Manage Tailor Platform users." "workflow:Manage workflows and workflow executions." "workspace:Manage Tailor Platform workspaces." "completion:Generate shell completion script")
|
|
3861
3939
|
__tailor_sdk_worker_cdescribe 'subcommands' _subs
|
|
3862
3940
|
fi
|
|
3863
3941
|
}
|
|
@@ -3967,7 +4045,7 @@ _tailor_sdk_worker_completions() {
|
|
|
3967
4045
|
secret:list) __tailor_sdk_worker_complete_secret_list ;;
|
|
3968
4046
|
secret:delete) __tailor_sdk_worker_complete_secret_delete ;;
|
|
3969
4047
|
secret) __tailor_sdk_worker_complete_secret ;;
|
|
3970
|
-
setup:
|
|
4048
|
+
setup:check) __tailor_sdk_worker_complete_setup_check ;;
|
|
3971
4049
|
setup) __tailor_sdk_worker_complete_setup ;;
|
|
3972
4050
|
show) __tailor_sdk_worker_complete_show ;;
|
|
3973
4051
|
skills:install) __tailor_sdk_worker_complete_skills_install ;;
|
|
@@ -4004,6 +4082,7 @@ _tailor_sdk_worker_completions() {
|
|
|
4004
4082
|
workflow:list) __tailor_sdk_worker_complete_workflow_list ;;
|
|
4005
4083
|
workflow:get) __tailor_sdk_worker_complete_workflow_get ;;
|
|
4006
4084
|
workflow:start) __tailor_sdk_worker_complete_workflow_start ;;
|
|
4085
|
+
workflow:wait) __tailor_sdk_worker_complete_workflow_wait ;;
|
|
4007
4086
|
workflow:executions) __tailor_sdk_worker_complete_workflow_executions ;;
|
|
4008
4087
|
workflow:resume) __tailor_sdk_worker_complete_workflow_resume ;;
|
|
4009
4088
|
workflow) __tailor_sdk_worker_complete_workflow ;;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { _ as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { n as AttributeMap, o as TailorPrincipal, r as Env, t as AttributeList } from "../types-BZ7QKVE8.mjs";
|
|
2
|
+
import { s as PluginAttachment } from "../types-CdcQh4Z2.mjs";
|
|
3
|
+
import { A as SCIMAuthorization, C as IdProvider, D as SAML, E as OIDC, F as AuthConnectionOAuth2Config, M as SCIMResource, N as TenantProvider, O as SCIMAttribute, P as AuthConnectionConfig, S as IDToken, T as OAuth2ClientInput, _ as UserAttributeListKey, a as AuthServiceInput, b as ValueOperand, c as DefinedAuth, d as FederatedIdentityProvider, f as MachineUserName, g as UserAttributeKey, h as SCIMAttributeType, i as AuthOwnConfig, j as SCIMConfig, k as SCIMAttributeMapping, l as FederatedIdentity, m as OAuth2ClientGrantType, n as AuthConnectionTokenResult, o as BeforeLoginClaims, p as MachineUserNameRegistry, r as AuthExternalConfig, s as BeforeLoginHookArgs, t as AuthConfig, u as FederatedIdentityClaims, v as UserAttributeMap, x as BuiltinIdP, y as UsernameFieldKey } from "../types-BX4q6Mo6.mjs";
|
|
4
|
+
import { _ as TailorDBNamespaceData, a as PluginConfigs, b as TypePluginOutput, c as PluginGeneratedExecutor, d as PluginGeneratedType, f as PluginNamespaceProcessContext, g as ResolverReadyContext, h as ResolverNamespaceData, i as Plugin, l as PluginGeneratedExecutorWithFile, m as PluginProcessContext, n as GeneratorResult, o as PluginExecutorContext, p as PluginOutput, r as NamespacePluginOutput, s as PluginExecutorContextBase, t as ExecutorReadyContext, u as PluginGeneratedResolver, v as TailorDBReadyContext, x as Resolver, y as TailorDBTypeForPlugin } from "../types-BDRml5C3.mjs";
|
|
5
|
+
import { a as TailorDBInstance, c as PermissionCondition, d as unsafeAllowAllGqlPermission, f as unsafeAllowAllTypePermission, i as TailorDBField, l as TailorTypeGqlPermission, n as TailorAnyDBField, o as TailorDBType, r as TailorAnyDBType, s as db, u as TailorTypePermission } from "../http-adapter.generated-DFsXDdm5.mjs";
|
|
6
|
+
import { C as AIGatewayConfig, _ as IdPExternalConfig, a as ExecutorServiceInput, b as IdPGqlOperations, c as ResolverServiceInput, d as StaticWebsiteConfig, g as IdPConfig, i as ExecutorServiceConfig, l as WorkflowServiceConfig, m as SecretsConfig, n as RetryPolicy, o as ResolverExternalConfig, s as ResolverServiceConfig, t as ConcurrencyPolicy, u as WorkflowServiceInput, x as IdPGqlOperationsInput, y as IdPEmailConfig } from "../workflow.generated-ClEjBYhm.mjs";
|
|
7
|
+
import { a as WorkflowConfig, c as WorkflowJobContext, i as Workflow, l as createWorkflowJob, n as defineWaitPoint, o as createWorkflow, r as defineWaitPoints, s as WorkflowJob, t as WaitPointInstance } from "../index-lFpcjHPU.mjs";
|
|
8
|
+
import { $ as authAccessTokenTrigger, A as incomingWebhookTrigger, B as IdpUserCreatedArgs, C as Trigger, D as IncomingWebhookResponseConfig, E as IncomingWebhookResponse, F as AuthAccessTokenIssuedArgs, G as RecordDeletedArgs, H as IdpUserTrigger, I as AuthAccessTokenRefreshedArgs, J as ResolverExecutedTrigger, K as RecordUpdatedArgs, L as AuthAccessTokenRevokedArgs, M as ScheduleTrigger, N as scheduleTrigger, O as IncomingWebhookTrigger, P as AuthAccessTokenArgs, Q as authAccessTokenRevokedTrigger, R as AuthAccessTokenTrigger, S as createExecutor, T as IncomingWebhookRequest, U as IdpUserUpdatedArgs, V as IdpUserDeletedArgs, W as RecordCreatedArgs, X as authAccessTokenIssuedTrigger, Y as TailorDBTrigger, Z as authAccessTokenRefreshedTrigger, _ as IdPPermission, _t as IdpName, a as definePlugins, at as recordDeletedTrigger, b as defineAIGateway, c as HttpAdapterGraphQLResponse, ct as resolverExecutedTrigger, d as HttpAdapterOutputFn, dt as Operation, et as idpUserCreatedTrigger, f as HttpAdapterRequest, ft as WebhookOperation, g as defineIdp, gt as defineAuth, h as defineSecretManager, ht as createResolver, i as defineConfig, it as recordCreatedTrigger, j as ScheduleArgs, k as IncomingWebhookTriggerOptions, l as HttpAdapterInput, lt as FunctionOperation, m as createHttpAdapter, mt as QueryType, n as output, nt as idpUserTrigger, o as HttpAdapter, ot as recordTrigger, p as HttpAdapterResponse, pt as WorkflowOperation, q as ResolverExecutedArgs, r as t, rt as idpUserUpdatedTrigger, s as HttpAdapterGraphQLRequest, st as recordUpdatedTrigger, t as __Infer, tt as idpUserDeletedTrigger, u as HttpAdapterInputFn, ut as GqlOperation, v as IdPPermissionCondition, vt as IdpNameRegistry, w as IncomingWebhookArgs, x as defineStaticWebSite, y as unsafeAllowAllIdPPermission, yt as TailorField, z as IdpUserArgs } from "../index-BI-_j9Z3.mjs";
|
|
9
|
+
export { type AIGatewayConfig, type AttributeList, type AttributeMap, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginClaims, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type DefinedAuth, type Env, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, type IDToken, type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, type IdProvider as IdProviderConfig, type IdpName, type IdpNameRegistry, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, type MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, type PermissionCondition, type Plugin, type PluginAttachment, type PluginConfigs, type PluginExecutorContext, type PluginExecutorContextBase, type PluginGeneratedExecutor, type PluginGeneratedExecutorWithFile, type PluginGeneratedResolver, type PluginGeneratedType, type PluginNamespaceProcessContext, type PluginOutput, type PluginProcessContext, type QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, type Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, type ResolverReadyContext, type ResolverServiceConfig, type ResolverServiceInput, type RetryPolicy, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleArgs, ScheduleTrigger, type SecretsConfig, type StaticWebsiteConfig, type TailorAnyDBField, type TailorAnyDBType, type TailorDBField, type TailorDBInstance, type TailorDBNamespaceData, type TailorDBReadyContext, TailorDBTrigger, type TailorDBType, type TailorDBTypeForPlugin, type TailorField, type TailorPrincipal, type TailorTypeGqlPermission, type TailorTypePermission, type TenantProvider as TenantProviderConfig, Trigger, type TypePluginOutput, type UserAttributeKey, type UserAttributeListKey, type UserAttributeMap, type UsernameFieldKey, type ValueOperand, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
|
package/dist/configure/index.mjs
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import { t as t$1 } from "../types-
|
|
1
|
+
import { t as t$1 } from "../types-BQijbo4m.mjs";
|
|
2
2
|
import { t as brandValue } from "../brand-Eo4pLXPJ.mjs";
|
|
3
|
-
import { t as db } from "../schema-
|
|
4
|
-
import { r as dispatchTriggerWorkflow } from "../registry-
|
|
5
|
-
import {
|
|
6
|
-
import { t as createWorkflowJob } from "../job-fuc3j1Ma.mjs";
|
|
3
|
+
import { t as db } from "../schema-Dtw9Orye.mjs";
|
|
4
|
+
import { a as registerJob, n as dispatchTriggerJob, r as dispatchTriggerWorkflow } from "../registry-DH4m7eYo.mjs";
|
|
5
|
+
import { i as withWorkflowTestInvoker } from "../test-env-key-D7UkZp99.mjs";
|
|
7
6
|
|
|
8
|
-
//#region src/configure/user.ts
|
|
9
|
-
/** Represents an unauthenticated user in the Tailor platform. */
|
|
10
|
-
const unauthenticatedTailorUser = {
|
|
11
|
-
id: "00000000-0000-0000-0000-000000000000",
|
|
12
|
-
type: "",
|
|
13
|
-
workspaceId: "00000000-0000-0000-0000-000000000000",
|
|
14
|
-
attributes: null,
|
|
15
|
-
attributeList: []
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
7
|
//#region src/configure/services/auth/index.ts
|
|
20
8
|
/* @__NO_SIDE_EFFECTS__ */
|
|
21
9
|
function defineAuth(name, config) {
|
|
@@ -74,7 +62,7 @@ const unsafeAllowAllGqlPermission = [{
|
|
|
74
62
|
* Create a resolver definition for the Tailor SDK.
|
|
75
63
|
*
|
|
76
64
|
* The `body` function receives a context with `input` (typed from `config.input`),
|
|
77
|
-
* `
|
|
65
|
+
* `caller`, `invoker` (reflects configured machine-user delegation), and `env`.
|
|
78
66
|
* The return value of `body` must match the `output` type.
|
|
79
67
|
*
|
|
80
68
|
* `output` accepts either a single TailorField (e.g. `t.string()`) or a
|
|
@@ -97,7 +85,7 @@ const unsafeAllowAllGqlPermission = [{
|
|
|
97
85
|
* input: {
|
|
98
86
|
* id: t.string(),
|
|
99
87
|
* },
|
|
100
|
-
* body: async ({ input,
|
|
88
|
+
* body: async ({ input, caller }) => {
|
|
101
89
|
* const db = getDB("tailordb");
|
|
102
90
|
* const result = await db.selectFrom("User").selectAll().where("id", "=", input.id).executeTakeFirst();
|
|
103
91
|
* return { name: result?.name ?? "", email: result?.email ?? "" };
|
|
@@ -364,6 +352,55 @@ function incomingWebhookTrigger(options) {
|
|
|
364
352
|
};
|
|
365
353
|
}
|
|
366
354
|
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region src/configure/services/workflow/job.ts
|
|
357
|
+
/**
|
|
358
|
+
* Create a workflow job definition.
|
|
359
|
+
*
|
|
360
|
+
* All jobs must be named exports from the workflow file.
|
|
361
|
+
* Job names must be unique across the entire project.
|
|
362
|
+
*
|
|
363
|
+
* Input and output must be JsonValue-compatible (primitives, plain objects, arrays).
|
|
364
|
+
* Functions and objects with a `toJSON` method are rejected at the type level;
|
|
365
|
+
* class instances exposing methods are rejected via the property walk.
|
|
366
|
+
* @param config - Job configuration with name and body function.
|
|
367
|
+
* @param config.name - Unique job name across the project.
|
|
368
|
+
* @param config.body - Function that processes the job input.
|
|
369
|
+
* @returns A WorkflowJob that can be triggered from other jobs.
|
|
370
|
+
* @example
|
|
371
|
+
* // Simple job with async body:
|
|
372
|
+
* export const fetchData = createWorkflowJob({
|
|
373
|
+
* name: "fetch-data",
|
|
374
|
+
* body: async (input: { id: string }) => {
|
|
375
|
+
* const db = getDB("tailordb");
|
|
376
|
+
* return await db.selectFrom("Table").selectAll().where("id", "=", input.id).executeTakeFirst();
|
|
377
|
+
* },
|
|
378
|
+
* });
|
|
379
|
+
* @example
|
|
380
|
+
* // Orchestrator job that fans out to other jobs.
|
|
381
|
+
* export const orchestrate = createWorkflowJob({
|
|
382
|
+
* name: "orchestrate",
|
|
383
|
+
* body: (input: { orderId: string }) => {
|
|
384
|
+
* const inventory = checkInventory.trigger({ orderId: input.orderId });
|
|
385
|
+
* const payment = processPayment.trigger({ orderId: input.orderId });
|
|
386
|
+
* return { inventory, payment };
|
|
387
|
+
* },
|
|
388
|
+
* });
|
|
389
|
+
*/
|
|
390
|
+
function createWorkflowJob(config) {
|
|
391
|
+
const userBody = config.body;
|
|
392
|
+
const body = process.env.TAILOR_PLATFORM_BUNDLE ? userBody : (input, context) => withWorkflowTestInvoker(context.invoker, () => userBody(input, context));
|
|
393
|
+
if (!process.env.TAILOR_PLATFORM_BUNDLE) registerJob(config.name, body);
|
|
394
|
+
const trigger = process.env.TAILOR_PLATFORM_BUNDLE ? () => {
|
|
395
|
+
throw new Error("This workflow job's .trigger() is rewritten at build time and is unavailable in the bundle");
|
|
396
|
+
} : (args) => dispatchTriggerJob(config.name, args);
|
|
397
|
+
return brandValue({
|
|
398
|
+
name: config.name,
|
|
399
|
+
trigger,
|
|
400
|
+
body
|
|
401
|
+
}, "workflow-job");
|
|
402
|
+
}
|
|
403
|
+
|
|
367
404
|
//#endregion
|
|
368
405
|
//#region src/configure/services/workflow/wait-point.ts
|
|
369
406
|
function getPlatformWorkflow() {
|
|
@@ -675,5 +712,5 @@ function definePlugins(...configs) {
|
|
|
675
712
|
const t = t$1;
|
|
676
713
|
|
|
677
714
|
//#endregion
|
|
678
|
-
export {
|
|
715
|
+
export { authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
|
|
679
716
|
//# sourceMappingURL=index.mjs.map
|