@tailor-platform/sdk 2.37.0 → 2.39.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/CHANGELOG.md +124 -0
- package/dist/{application-83WVdH85.mjs → application-OeNMQzOC.mjs} +1 -1
- package/dist/application-mNOJx9Y2.mjs +207 -0
- package/dist/application-mNOJx9Y2.mjs.map +1 -0
- package/dist/cli/commands/deploy/deploy.d.mts +1 -0
- package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +2 -0
- package/dist/cli/commands/executor/trigger.d.mts +1 -0
- package/dist/cli/commands/generate/seed/bundler.d.mts +7 -5
- package/dist/cli/commands/workspace/transform.d.mts +1 -2
- package/dist/cli/lib.d.mts +5 -3
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +67 -61
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/args.d.mts +14 -5
- package/dist/cli/shared/build-options.d.mts +13 -0
- package/dist/cli/shared/client.d.mts +15 -3
- package/dist/cli/shared/error-json.d.mts +12 -26
- package/dist/cli/shared/script-workflow.d.mts +65 -0
- package/dist/cli/shared/seed-chunker.d.mts +3 -3
- package/dist/client-CqiPQgMG.mjs +2 -0
- package/dist/client-CqiPQgMG.mjs.map +1 -0
- package/dist/client-DO2_Xz_z.mjs +1 -0
- package/dist/completion/zsh-worker.zsh +193 -74
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/auth/types.d.mts +20 -3
- package/dist/configure/services/executor/operation.d.mts +5 -4
- package/dist/configure/services/executor/trigger/webhook.d.mts +8 -1
- package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -1
- package/dist/configure/services/index.d.mts +0 -1
- package/dist/configure/services/tailordb/types.d.mts +9 -0
- package/dist/context-CYBcQZyO.mjs +1 -0
- package/dist/context-aAgFGDBD.mjs +23 -0
- package/dist/context-aAgFGDBD.mjs.map +1 -0
- package/dist/{crashreport-D_wf4GZh.mjs → crashreport-CQTAlnbA.mjs} +2 -2
- package/dist/{crashreport-D_wf4GZh.mjs.map → crashreport-CQTAlnbA.mjs.map} +1 -1
- package/dist/crashreport-GRnWyDnF.mjs +1 -0
- package/dist/{errors-Dmdnq0zi.mjs → errors-9OOL3xOM.mjs} +6 -5
- package/dist/errors-9OOL3xOM.mjs.map +1 -0
- package/dist/field_behavior_pb-B196sUx6.mjs +2 -0
- package/dist/field_behavior_pb-B196sUx6.mjs.map +1 -0
- package/dist/{kysely-type-DVL90_oX.mjs → kysely-type-DhAZqdQg.mjs} +14 -10
- package/dist/kysely-type-DhAZqdQg.mjs.map +1 -0
- package/dist/notification_resource_pb-BZ0hCA01.mjs +1 -0
- package/dist/notification_resource_pb-Dwzah7gO.mjs +2 -0
- package/dist/notification_resource_pb-Dwzah7gO.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/register-ts-hook-CORbtrSN.mjs +1105 -0
- package/dist/register-ts-hook-CORbtrSN.mjs.map +1 -0
- package/dist/repl-editor-Bposemei.mjs +2 -0
- package/dist/repl-editor-Bposemei.mjs.map +1 -0
- package/dist/resource_pb-elY668ZB.mjs +2 -0
- package/dist/resource_pb-elY668ZB.mjs.map +1 -0
- package/dist/{secret-file-DiuEcLFP.mjs → secret-file-CSXzcg4c.mjs} +2 -2
- package/dist/{secret-file-DiuEcLFP.mjs.map → secret-file-CSXzcg4c.mjs.map} +1 -1
- package/dist/service-B2vx6CGM.mjs +2 -0
- package/dist/{service-DDrbdyd-.mjs.map → service-B2vx6CGM.mjs.map} +1 -1
- package/dist/service-Bkz_TB5v.mjs +9 -0
- package/dist/service-Bkz_TB5v.mjs.map +1 -0
- package/dist/service-Dffd4how.mjs +1 -0
- package/dist/service_pb-Bethc2NW.mjs +1 -0
- package/dist/service_pb-CfpSriCy.mjs +2 -0
- package/dist/service_pb-CfpSriCy.mjs.map +1 -0
- package/dist/syntax-diagnostic-BQgOV8Fz.mjs +2 -0
- package/dist/syntax-diagnostic-BQgOV8Fz.mjs.map +1 -0
- package/dist/validation-errors-ChvCG6wT.mjs +3 -0
- package/dist/validation-errors-ChvCG6wT.mjs.map +1 -0
- package/{LICENSE → dist/vendor/graphql/LICENSE} +6 -6
- package/dist/vendor/graphql/language/KindTypeMap.d.mts +3 -0
- package/dist/vendor/graphql/language/ast.d.mts +784 -0
- package/dist/vendor/graphql/language/kinds_.d.mts +203 -0
- package/dist/vendor/graphql/language/source.d.mts +46 -0
- package/dist/vendor/graphql/language/tokenKind.d.mts +35 -0
- package/dist/vitest/index.mjs +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/workspace_resource_pb-Cow7mrJY.mjs +2 -0
- package/dist/workspace_resource_pb-Cow7mrJY.mjs.map +1 -0
- package/docs/cli/application.md +16 -12
- package/docs/cli/executor.md +13 -17
- package/docs/cli/function.md +1 -1
- package/docs/cli/notification.md +128 -0
- package/docs/cli/tailordb.md +26 -57
- package/docs/cli/workspace.md +3 -4
- package/docs/cli-reference.md +228 -48
- package/docs/configuration.md +28 -0
- package/docs/github-actions.md +241 -38
- package/docs/migration/v2.md +5 -3
- package/docs/services/auth.md +5 -0
- package/docs/services/executor.md +2 -0
- package/docs/services/tailordb/index.md +6 -2
- package/docs/services/tailordb/migration.md +54 -57
- package/docs/testing.md +0 -1
- package/package.json +25 -21
- package/dist/application-Cida-j1g.mjs +0 -207
- package/dist/application-Cida-j1g.mjs.map +0 -1
- package/dist/configure/services/http-adapter/index.d.mts +0 -2
- package/dist/crashreport-C2AcQNTe.mjs +0 -1
- package/dist/errors-Dmdnq0zi.mjs.map +0 -1
- package/dist/kysely-type-DVL90_oX.mjs.map +0 -1
- package/dist/register-ts-hook-Ht4zCseV.mjs +0 -1115
- package/dist/register-ts-hook-Ht4zCseV.mjs.map +0 -1
- package/dist/repl-editor-DkrCZmmg.mjs +0 -2
- package/dist/repl-editor-DkrCZmmg.mjs.map +0 -1
- package/dist/service-CZ0EdD2-.mjs +0 -10
- package/dist/service-CZ0EdD2-.mjs.map +0 -1
- package/dist/service-DDrbdyd-.mjs +0 -2
- package/dist/service-WhSyhaho.mjs +0 -1
- package/dist/service_pb-BMHhVot2.mjs +0 -1
- package/dist/service_pb-BxMSK0gg.mjs +0 -2
- package/dist/service_pb-BxMSK0gg.mjs.map +0 -1
- package/dist/workspace_resource_pb-7smKERdZ.mjs +0 -2
- package/dist/workspace_resource_pb-7smKERdZ.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# politty-completion-version: 1
|
|
2
|
-
# politty-bin-sig:
|
|
2
|
+
# politty-bin-sig: 1794188138
|
|
3
3
|
# politty-bin-path: /home/runner/work/sdk/sdk/node_modules/.bin/tailor
|
|
4
4
|
# program: tailor
|
|
5
5
|
# shell: zsh
|
|
@@ -669,6 +669,15 @@ __tailor_worker_opt_takes_value() {
|
|
|
669
669
|
machineuser:token:--workspace-id|machineuser:token:--workspaceId|machineuser:token:-w|machineuser:token:--w) return 0 ;;
|
|
670
670
|
machineuser:token:--profile|machineuser:token:-p|machineuser:token:--p) return 0 ;;
|
|
671
671
|
machineuser:token:--config|machineuser:token:-c|machineuser:token:--c) return 0 ;;
|
|
672
|
+
notification:list:--order) return 0 ;;
|
|
673
|
+
notification:list:--limit|notification:list:-l|notification:list:--l) return 0 ;;
|
|
674
|
+
notification:list:--profile|notification:list:-p|notification:list:--p) return 0 ;;
|
|
675
|
+
notification:list:--category) return 0 ;;
|
|
676
|
+
notification:list:--severity) return 0 ;;
|
|
677
|
+
notification:list:--scope-workspace|notification:list:--scopeWorkspace) return 0 ;;
|
|
678
|
+
notification:list:--scope-organization|notification:list:--scopeOrganization) return 0 ;;
|
|
679
|
+
notification:read:--profile|notification:read:-p|notification:read:--p) return 0 ;;
|
|
680
|
+
notification:dismiss:--profile|notification:dismiss:-p|notification:dismiss:--p) return 0 ;;
|
|
672
681
|
oauth2client:list:--workspace-id|oauth2client:list:--workspaceId|oauth2client:list:-w|oauth2client:list:--w) return 0 ;;
|
|
673
682
|
oauth2client:list:--profile|oauth2client:list:-p|oauth2client:list:--p) return 0 ;;
|
|
674
683
|
oauth2client:list:--config|oauth2client:list:-c|oauth2client:list:--c) return 0 ;;
|
|
@@ -794,10 +803,6 @@ __tailor_worker_opt_takes_value() {
|
|
|
794
803
|
tailordb:migration:script:--config|tailordb:migration:script:-c|tailordb:migration:script:--c) return 0 ;;
|
|
795
804
|
tailordb:migration:script:--namespace|tailordb:migration:script:-n|tailordb:migration:script:--n) return 0 ;;
|
|
796
805
|
tailordb:migration:script:--reason) return 0 ;;
|
|
797
|
-
tailordb:migration:set:--workspace-id|tailordb:migration:set:--workspaceId|tailordb:migration:set:-w|tailordb:migration:set:--w) return 0 ;;
|
|
798
|
-
tailordb:migration:set:--profile|tailordb:migration:set:-p|tailordb:migration:set:--p) return 0 ;;
|
|
799
|
-
tailordb:migration:set:--config|tailordb:migration:set:-c|tailordb:migration:set:--c) return 0 ;;
|
|
800
|
-
tailordb:migration:set:--namespace|tailordb:migration:set:-n|tailordb:migration:set:--n) return 0 ;;
|
|
801
806
|
tailordb:migration:status:--workspace-id|tailordb:migration:status:--workspaceId|tailordb:migration:status:-w|tailordb:migration:status:--w) return 0 ;;
|
|
802
807
|
tailordb:migration:status:--profile|tailordb:migration:status:-p|tailordb:migration:status:--p) return 0 ;;
|
|
803
808
|
tailordb:migration:status:--config|tailordb:migration:status:-c|tailordb:migration:status:--c) return 0 ;;
|
|
@@ -822,6 +827,7 @@ __tailor_worker_opt_takes_value() {
|
|
|
822
827
|
tailordb:migration:validate:--profile|tailordb:migration:validate:-p|tailordb:migration:validate:--p) return 0 ;;
|
|
823
828
|
tailordb:migration:validate:--config|tailordb:migration:validate:-c|tailordb:migration:validate:--c) return 0 ;;
|
|
824
829
|
tailordb:migration:validate:--namespace|tailordb:migration:validate:-n|tailordb:migration:validate:--n) return 0 ;;
|
|
830
|
+
tailordb:migration:validate:--migration-skip-steps|tailordb:migration:validate:--migrationSkipSteps) return 0 ;;
|
|
825
831
|
upgrade:--from) return 0 ;;
|
|
826
832
|
upgrade:--path) return 0 ;;
|
|
827
833
|
user:current:--profile|user:current:-p|user:current:--p) return 0 ;;
|
|
@@ -1012,6 +1018,10 @@ __tailor_worker_is_subcmd() {
|
|
|
1012
1018
|
machineuser:list) return 0 ;;
|
|
1013
1019
|
machineuser:token) return 0 ;;
|
|
1014
1020
|
:machineuser) return 0 ;;
|
|
1021
|
+
notification:list) return 0 ;;
|
|
1022
|
+
notification:read) return 0 ;;
|
|
1023
|
+
notification:dismiss) return 0 ;;
|
|
1024
|
+
:notification) return 0 ;;
|
|
1015
1025
|
oauth2client:list) return 0 ;;
|
|
1016
1026
|
oauth2client:get) return 0 ;;
|
|
1017
1027
|
:oauth2client) return 0 ;;
|
|
@@ -1058,7 +1068,6 @@ __tailor_worker_is_subcmd() {
|
|
|
1058
1068
|
tailordb:migration:rebaseline) return 0 ;;
|
|
1059
1069
|
tailordb:migration:resolve) return 0 ;;
|
|
1060
1070
|
tailordb:migration:script) return 0 ;;
|
|
1061
|
-
tailordb:migration:set) return 0 ;;
|
|
1062
1071
|
tailordb:migration:status) return 0 ;;
|
|
1063
1072
|
tailordb:migration:sync) return 0 ;;
|
|
1064
1073
|
tailordb:migration:test) return 0 ;;
|
|
@@ -1714,7 +1723,7 @@ __tailor_worker_complete_executor_trigger() {
|
|
|
1714
1723
|
__tailor_worker_not_used "--workspace-id" "--workspaceId" "-w" "--w" && _opts+=("--workspace-id:Workspace ID")
|
|
1715
1724
|
__tailor_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
|
|
1716
1725
|
__tailor_worker_not_used "--data" "-d" "--d" && _opts+=("--data:Request body (JSON string)")
|
|
1717
|
-
_opts+=("--header:
|
|
1726
|
+
_opts+=("--header:Ignored, as the executor receives empty headers (format\: 'Key\: Value', can be specified multiple times)")
|
|
1718
1727
|
__tailor_worker_not_used "--wait" "-W" "--W" && _opts+=("--wait:Wait for job completion and downstream execution (workflow/function) if applicable")
|
|
1719
1728
|
__tailor_worker_not_used "--interval" "-i" "--i" && _opts+=("--interval:Polling interval when using --wait (e.g., '3s', '500ms', '1m')")
|
|
1720
1729
|
__tailor_worker_not_used "--timeout" "-t" "--t" && _opts+=("--timeout:Maximum time to wait when using --wait (e.g., '30s', '5m')")
|
|
@@ -1981,6 +1990,34 @@ __tailor_worker_complete_function_logs() {
|
|
|
1981
1990
|
|
|
1982
1991
|
__tailor_worker_complete_function_run() {
|
|
1983
1992
|
local -a _vals=()
|
|
1993
|
+
case "${words[CURRENT-1]}" in
|
|
1994
|
+
--config|-c|--c)
|
|
1995
|
+
setopt local_options null_glob
|
|
1996
|
+
local _cur="${words[CURRENT]:-}" _dir _prefix _f _out
|
|
1997
|
+
local -a _exts=("ts")
|
|
1998
|
+
if [[ -z "$_cur" || "$_cur" != */* ]]; then
|
|
1999
|
+
_dir="."
|
|
2000
|
+
_prefix="$_cur"
|
|
2001
|
+
elif [[ "$_cur" == */ ]]; then
|
|
2002
|
+
_dir="${_cur%/}"
|
|
2003
|
+
_prefix=""
|
|
2004
|
+
else
|
|
2005
|
+
_dir="${_cur%/*}"
|
|
2006
|
+
_prefix="${_cur##*/}"
|
|
2007
|
+
fi
|
|
2008
|
+
for _f in "$_dir"/"$_prefix"*(N/); do
|
|
2009
|
+
_out="${_f#./}"
|
|
2010
|
+
__tailor_worker_add_path_candidate "$_out"
|
|
2011
|
+
done
|
|
2012
|
+
local _ext
|
|
2013
|
+
for _f in "$_dir"/"$_prefix"*(N.); do
|
|
2014
|
+
_out="${_f#./}"
|
|
2015
|
+
for _ext in "${_exts[@]}"; do
|
|
2016
|
+
[[ -n "$_ext" && "$_out" == *."$_ext" ]] && { __tailor_worker_add_path_candidate "$_out"; break; }
|
|
2017
|
+
done
|
|
2018
|
+
done
|
|
2019
|
+
return 0 ;;
|
|
2020
|
+
esac
|
|
1984
2021
|
if __tailor_worker_opt_takes_value "function:run" "${words[CURRENT-1]}"; then return 0; fi
|
|
1985
2022
|
if (( _after_dd )); then
|
|
1986
2023
|
case "$_pos_count" in
|
|
@@ -1996,7 +2033,7 @@ __tailor_worker_complete_function_run() {
|
|
|
1996
2033
|
__tailor_worker_not_used "--name" "-n" "--n" && _opts+=("--name:Workflow job name to run (matches the \`name\` field of createWorkflowJob)")
|
|
1997
2034
|
__tailor_worker_not_used "--arg" "-a" "--a" && _opts+=("--arg:JSON argument to pass to the function")
|
|
1998
2035
|
__tailor_worker_not_used "--machine-user" "--machineUser" "-m" "--m" && _opts+=("--machine-user:Machine user name for authentication. Falls back to the active profile's default machine user.")
|
|
1999
|
-
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to
|
|
2036
|
+
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to Tailor config file")
|
|
2000
2037
|
__tailor_worker_not_used "--allow-schema-drift" "--allowSchemaDrift" && _opts+=("--allow-schema-drift:Run a scaffolded script even when its schema snapshot no longer matches")
|
|
2001
2038
|
if (( ! _any_opt_used )); then
|
|
2002
2039
|
_opts+=("--help:Show help")
|
|
@@ -2091,11 +2128,39 @@ __tailor_worker_complete_function() {
|
|
|
2091
2128
|
|
|
2092
2129
|
__tailor_worker_complete_generate() {
|
|
2093
2130
|
local -a _vals=()
|
|
2131
|
+
case "${words[CURRENT-1]}" in
|
|
2132
|
+
--config|-c|--c)
|
|
2133
|
+
setopt local_options null_glob
|
|
2134
|
+
local _cur="${words[CURRENT]:-}" _dir _prefix _f _out
|
|
2135
|
+
local -a _exts=("ts")
|
|
2136
|
+
if [[ -z "$_cur" || "$_cur" != */* ]]; then
|
|
2137
|
+
_dir="."
|
|
2138
|
+
_prefix="$_cur"
|
|
2139
|
+
elif [[ "$_cur" == */ ]]; then
|
|
2140
|
+
_dir="${_cur%/}"
|
|
2141
|
+
_prefix=""
|
|
2142
|
+
else
|
|
2143
|
+
_dir="${_cur%/*}"
|
|
2144
|
+
_prefix="${_cur##*/}"
|
|
2145
|
+
fi
|
|
2146
|
+
for _f in "$_dir"/"$_prefix"*(N/); do
|
|
2147
|
+
_out="${_f#./}"
|
|
2148
|
+
__tailor_worker_add_path_candidate "$_out"
|
|
2149
|
+
done
|
|
2150
|
+
local _ext
|
|
2151
|
+
for _f in "$_dir"/"$_prefix"*(N.); do
|
|
2152
|
+
_out="${_f#./}"
|
|
2153
|
+
for _ext in "${_exts[@]}"; do
|
|
2154
|
+
[[ -n "$_ext" && "$_out" == *."$_ext" ]] && { __tailor_worker_add_path_candidate "$_out"; break; }
|
|
2155
|
+
done
|
|
2156
|
+
done
|
|
2157
|
+
return 0 ;;
|
|
2158
|
+
esac
|
|
2094
2159
|
if __tailor_worker_opt_takes_value "generate" "${words[CURRENT-1]}"; then return 0; fi
|
|
2095
2160
|
if (( _after_dd )); then return 0; fi
|
|
2096
2161
|
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2097
2162
|
local -a _opts=()
|
|
2098
|
-
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to
|
|
2163
|
+
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to Tailor config file")
|
|
2099
2164
|
if (( ! _any_opt_used )); then
|
|
2100
2165
|
_opts+=("--help:Show help")
|
|
2101
2166
|
_opts+=("--help-all:Show help with all subcommand options")
|
|
@@ -2298,6 +2363,117 @@ __tailor_worker_complete_machineuser() {
|
|
|
2298
2363
|
__tailor_worker_cdescribe 'subcommands' _subs
|
|
2299
2364
|
}
|
|
2300
2365
|
|
|
2366
|
+
__tailor_worker_complete_notification_list() {
|
|
2367
|
+
local -a _vals=()
|
|
2368
|
+
case "${words[CURRENT-1]}" in
|
|
2369
|
+
--order)
|
|
2370
|
+
_vals=("asc" "desc")
|
|
2371
|
+
__tailor_worker_cdescribe 'completions' _vals
|
|
2372
|
+
return 0 ;;
|
|
2373
|
+
--category)
|
|
2374
|
+
_vals=("alert" "incident" "maintenance" "announcement")
|
|
2375
|
+
__tailor_worker_cdescribe 'completions' _vals
|
|
2376
|
+
return 0 ;;
|
|
2377
|
+
--severity)
|
|
2378
|
+
_vals=("info" "warning" "critical")
|
|
2379
|
+
__tailor_worker_cdescribe 'completions' _vals
|
|
2380
|
+
return 0 ;;
|
|
2381
|
+
esac
|
|
2382
|
+
if __tailor_worker_opt_takes_value "notification:list" "${words[CURRENT-1]}"; then return 0; fi
|
|
2383
|
+
if (( _after_dd )); then return 0; fi
|
|
2384
|
+
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2385
|
+
local -a _opts=()
|
|
2386
|
+
__tailor_worker_not_used "--order" && _opts+=("--order:Sort order (asc or desc)")
|
|
2387
|
+
__tailor_worker_not_used "--limit" "-l" "--l" && _opts+=("--limit:Maximum number of items to return (0\: unlimited)")
|
|
2388
|
+
__tailor_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
|
|
2389
|
+
__tailor_worker_not_used "--category" && _opts+=("--category:Only this category (alert, incident, maintenance, announcement)")
|
|
2390
|
+
__tailor_worker_not_used "--severity" && _opts+=("--severity:Only this severity or higher (info, warning, critical)")
|
|
2391
|
+
__tailor_worker_not_used "--unread" && _opts+=("--unread:Only unread notifications")
|
|
2392
|
+
__tailor_worker_not_used "--scope-workspace" "--scopeWorkspace" && _opts+=("--scope-workspace:Only notifications about this workspace ID")
|
|
2393
|
+
__tailor_worker_not_used "--scope-organization" "--scopeOrganization" && _opts+=("--scope-organization:Only notifications about this organization ID")
|
|
2394
|
+
if (( ! _any_opt_used )); then
|
|
2395
|
+
_opts+=("--help:Show help")
|
|
2396
|
+
_opts+=("--help-all:Show help with all subcommand options")
|
|
2397
|
+
_opts+=("--help-json:Show help as JSON")
|
|
2398
|
+
fi
|
|
2399
|
+
__tailor_worker_cdescribe 'options' _opts
|
|
2400
|
+
return 0
|
|
2401
|
+
fi
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
__tailor_worker_complete_notification_read() {
|
|
2405
|
+
local -a _vals=()
|
|
2406
|
+
if __tailor_worker_opt_takes_value "notification:read" "${words[CURRENT-1]}"; then return 0; fi
|
|
2407
|
+
if (( _after_dd )); then
|
|
2408
|
+
case "$_pos_count" in
|
|
2409
|
+
0|*)
|
|
2410
|
+
;;
|
|
2411
|
+
esac
|
|
2412
|
+
return 0
|
|
2413
|
+
fi
|
|
2414
|
+
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2415
|
+
local -a _opts=()
|
|
2416
|
+
__tailor_worker_not_used "--no-mark-read" "--noMarkRead" && _opts+=("--no-mark-read:Show the notification without marking it as read")
|
|
2417
|
+
__tailor_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
|
|
2418
|
+
if (( ! _any_opt_used )); then
|
|
2419
|
+
_opts+=("--help:Show help")
|
|
2420
|
+
_opts+=("--help-all:Show help with all subcommand options")
|
|
2421
|
+
_opts+=("--help-json:Show help as JSON")
|
|
2422
|
+
fi
|
|
2423
|
+
__tailor_worker_cdescribe 'options' _opts
|
|
2424
|
+
return 0
|
|
2425
|
+
fi
|
|
2426
|
+
case "$_pos_count" in
|
|
2427
|
+
0|*)
|
|
2428
|
+
;;
|
|
2429
|
+
esac
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
__tailor_worker_complete_notification_dismiss() {
|
|
2433
|
+
local -a _vals=()
|
|
2434
|
+
if __tailor_worker_opt_takes_value "notification:dismiss" "${words[CURRENT-1]}"; then return 0; fi
|
|
2435
|
+
if (( _after_dd )); then
|
|
2436
|
+
case "$_pos_count" in
|
|
2437
|
+
0)
|
|
2438
|
+
;;
|
|
2439
|
+
esac
|
|
2440
|
+
return 0
|
|
2441
|
+
fi
|
|
2442
|
+
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2443
|
+
local -a _opts=()
|
|
2444
|
+
__tailor_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
|
|
2445
|
+
if (( ! _any_opt_used )); then
|
|
2446
|
+
_opts+=("--help:Show help")
|
|
2447
|
+
_opts+=("--help-all:Show help with all subcommand options")
|
|
2448
|
+
_opts+=("--help-json:Show help as JSON")
|
|
2449
|
+
fi
|
|
2450
|
+
__tailor_worker_cdescribe 'options' _opts
|
|
2451
|
+
return 0
|
|
2452
|
+
fi
|
|
2453
|
+
case "$_pos_count" in
|
|
2454
|
+
0)
|
|
2455
|
+
;;
|
|
2456
|
+
esac
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
__tailor_worker_complete_notification() {
|
|
2460
|
+
local -a _vals=()
|
|
2461
|
+
if __tailor_worker_opt_takes_value "notification" "${words[CURRENT-1]}"; then return 0; fi
|
|
2462
|
+
if (( _after_dd )); then return 0; fi
|
|
2463
|
+
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2464
|
+
local -a _opts=()
|
|
2465
|
+
if (( ! _any_opt_used )); then
|
|
2466
|
+
_opts+=("--help:Show help")
|
|
2467
|
+
_opts+=("--help-all:Show help with all subcommand options")
|
|
2468
|
+
_opts+=("--help-json:Show help as JSON")
|
|
2469
|
+
fi
|
|
2470
|
+
__tailor_worker_cdescribe 'options' _opts
|
|
2471
|
+
return 0
|
|
2472
|
+
fi
|
|
2473
|
+
local -a _subs=("list:List the notifications in your inbox." "read:Show a notification and mark it as read." "dismiss:Remove a notification from your inbox.")
|
|
2474
|
+
__tailor_worker_cdescribe 'subcommands' _subs
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2301
2477
|
__tailor_worker_complete_oauth2client_list() {
|
|
2302
2478
|
local -a _vals=()
|
|
2303
2479
|
case "${words[CURRENT-1]}" in
|
|
@@ -3683,66 +3859,6 @@ __tailor_worker_complete_tailordb_migration_script() {
|
|
|
3683
3859
|
esac
|
|
3684
3860
|
}
|
|
3685
3861
|
|
|
3686
|
-
__tailor_worker_complete_tailordb_migration_set() {
|
|
3687
|
-
local -a _vals=()
|
|
3688
|
-
case "${words[CURRENT-1]}" in
|
|
3689
|
-
--config|-c|--c)
|
|
3690
|
-
setopt local_options null_glob
|
|
3691
|
-
local _cur="${words[CURRENT]:-}" _dir _prefix _f _out
|
|
3692
|
-
local -a _exts=("ts")
|
|
3693
|
-
if [[ -z "$_cur" || "$_cur" != */* ]]; then
|
|
3694
|
-
_dir="."
|
|
3695
|
-
_prefix="$_cur"
|
|
3696
|
-
elif [[ "$_cur" == */ ]]; then
|
|
3697
|
-
_dir="${_cur%/}"
|
|
3698
|
-
_prefix=""
|
|
3699
|
-
else
|
|
3700
|
-
_dir="${_cur%/*}"
|
|
3701
|
-
_prefix="${_cur##*/}"
|
|
3702
|
-
fi
|
|
3703
|
-
for _f in "$_dir"/"$_prefix"*(N/); do
|
|
3704
|
-
_out="${_f#./}"
|
|
3705
|
-
__tailor_worker_add_path_candidate "$_out"
|
|
3706
|
-
done
|
|
3707
|
-
local _ext
|
|
3708
|
-
for _f in "$_dir"/"$_prefix"*(N.); do
|
|
3709
|
-
_out="${_f#./}"
|
|
3710
|
-
for _ext in "${_exts[@]}"; do
|
|
3711
|
-
[[ -n "$_ext" && "$_out" == *."$_ext" ]] && { __tailor_worker_add_path_candidate "$_out"; break; }
|
|
3712
|
-
done
|
|
3713
|
-
done
|
|
3714
|
-
return 0 ;;
|
|
3715
|
-
esac
|
|
3716
|
-
if __tailor_worker_opt_takes_value "tailordb:migration:set" "${words[CURRENT-1]}"; then return 0; fi
|
|
3717
|
-
if (( _after_dd )); then
|
|
3718
|
-
case "$_pos_count" in
|
|
3719
|
-
0)
|
|
3720
|
-
;;
|
|
3721
|
-
esac
|
|
3722
|
-
return 0
|
|
3723
|
-
fi
|
|
3724
|
-
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
3725
|
-
local -a _opts=()
|
|
3726
|
-
__tailor_worker_not_used "--workspace-id" "--workspaceId" "-w" "--w" && _opts+=("--workspace-id:Workspace ID")
|
|
3727
|
-
__tailor_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
|
|
3728
|
-
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to Tailor config file")
|
|
3729
|
-
__tailor_worker_not_used "--yes" "-y" "--y" && _opts+=("--yes:Skip confirmation prompts")
|
|
3730
|
-
__tailor_worker_not_used "--namespace" "-n" "--n" && _opts+=("--namespace:Target TailorDB namespace (required if multiple namespaces exist)")
|
|
3731
|
-
__tailor_worker_not_used "--force" && _opts+=("--force:Proceed even when the namespace records a migration history ID other than the local one")
|
|
3732
|
-
if (( ! _any_opt_used )); then
|
|
3733
|
-
_opts+=("--help:Show help")
|
|
3734
|
-
_opts+=("--help-all:Show help with all subcommand options")
|
|
3735
|
-
_opts+=("--help-json:Show help as JSON")
|
|
3736
|
-
fi
|
|
3737
|
-
__tailor_worker_cdescribe 'options' _opts
|
|
3738
|
-
return 0
|
|
3739
|
-
fi
|
|
3740
|
-
case "$_pos_count" in
|
|
3741
|
-
0)
|
|
3742
|
-
;;
|
|
3743
|
-
esac
|
|
3744
|
-
}
|
|
3745
|
-
|
|
3746
3862
|
__tailor_worker_complete_tailordb_migration_status() {
|
|
3747
3863
|
local -a _vals=()
|
|
3748
3864
|
case "${words[CURRENT-1]}" in
|
|
@@ -3978,6 +4094,7 @@ __tailor_worker_complete_tailordb_migration_validate() {
|
|
|
3978
4094
|
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to Tailor config file")
|
|
3979
4095
|
__tailor_worker_not_used "--namespace" "-n" "--n" && _opts+=("--namespace:Target TailorDB namespace (validates all namespaces if not specified)")
|
|
3980
4096
|
__tailor_worker_not_used "--strict" && _opts+=("--strict:Also fail when a pending migration can drop data without an acknowledgment")
|
|
4097
|
+
__tailor_worker_not_used "--migration-skip-steps" "--migrationSkipSteps" && _opts+=("--migration-skip-steps:Also check that 'deploy --migration-skip-steps' can skip these steps of a partially applied multi-step migration, as comma-separated namespace/step entries")
|
|
3981
4098
|
if (( ! _any_opt_used )); then
|
|
3982
4099
|
_opts+=("--help:Show help")
|
|
3983
4100
|
_opts+=("--help-all:Show help with all subcommand options")
|
|
@@ -4002,7 +4119,7 @@ __tailor_worker_complete_tailordb_migration() {
|
|
|
4002
4119
|
__tailor_worker_cdescribe 'options' _opts
|
|
4003
4120
|
return 0
|
|
4004
4121
|
fi
|
|
4005
|
-
local -a _subs=("generate:Generate migration files by detecting schema differences between current local tables and the previous migration snapshot." "rebaseline:Collapse the full migration history into a new 0000 baseline." "resolve:Settle a migration that a failed deploy left partially applied, or whose run a deploy could not confirm." "script:Add a migration script (migrate.ts) template to an existing migration directory, or record with --no-script that a migration intentionally has none." "
|
|
4122
|
+
local -a _subs=("generate:Generate migration files by detecting schema differences between current local tables and the previous migration snapshot." "rebaseline:Collapse the full migration history into a new 0000 baseline." "resolve:Settle a migration that a failed deploy left partially applied, or whose run a deploy could not confirm." "script:Add a migration script (migrate.ts) template to an existing migration directory, or record with --no-script that a migration intentionally has none." "status:Show the current migration status for TailorDB namespaces, including applied and pending migrations." "sync:Sync remote TailorDB schema and checkpoint to a local migration snapshot to recover from schema drift or a checkpoint outside the local history." "test:Test pending migrations with seed fixtures or cloned data in a temporary workspace." "validate:Run the migration and schema-drift checks that 'deploy' runs before changing anything, without deploying, and exit with a non-zero code when issues are found.")
|
|
4006
4123
|
__tailor_worker_cdescribe 'subcommands' _subs
|
|
4007
4124
|
}
|
|
4008
4125
|
|
|
@@ -4700,10 +4817,9 @@ __tailor_worker_complete_workspace_prune() {
|
|
|
4700
4817
|
local -a _opts=()
|
|
4701
4818
|
_opts+=("--name:Select workspaces whose whole name matches this regular expression (repeatable)")
|
|
4702
4819
|
__tailor_worker_not_used "--older-than" "--olderThan" && _opts+=("--older-than:Minimum age since creation, such as 30m, 24h, or 7d. 0s disables the age check and requires a location. Required unless --expired is given")
|
|
4703
|
-
__tailor_worker_not_used "--expired" && _opts+=("--expired:Select workspaces whose own --ttl expiry has passed, instead of by name and age. Requires --organization-root
|
|
4820
|
+
__tailor_worker_not_used "--expired" && _opts+=("--expired:Select workspaces whose own --ttl expiry has passed, instead of by name and age. Requires --organization-root or --folder-id")
|
|
4704
4821
|
_opts+=("--organization-root:Consider the workspaces directly under this organization, excluding those in its folders (repeatable)")
|
|
4705
4822
|
_opts+=("--folder-id:Consider the workspaces in this folder (repeatable)")
|
|
4706
|
-
__tailor_worker_not_used "--personal" && _opts+=("--personal:Consider the workspaces belonging to no organization and no folder")
|
|
4707
4823
|
_opts+=("--exclude:Keep a workspace with this exact name even when it matches (repeatable)")
|
|
4708
4824
|
__tailor_worker_not_used "--limit" && _opts+=("--limit:Abort when more workspaces match than this, without deleting anything. 0 removes the cap")
|
|
4709
4825
|
__tailor_worker_not_used "--dry-run" "--dryRun" && _opts+=("--dry-run:List the workspaces that would be deleted without deleting them")
|
|
@@ -5078,7 +5194,7 @@ __tailor_worker_complete_root() {
|
|
|
5078
5194
|
fi
|
|
5079
5195
|
__tailor_worker_cdescribe 'options' _opts
|
|
5080
5196
|
else
|
|
5081
|
-
local -a _subs=("api:Call Tailor Platform API endpoints directly." "auth:Authentication helpers for scripts and plugins." "authconnection:Manage auth connections." "crashreport:Manage crash reports." "data:Manage application data across workspaces." "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." "plugin:Manage and inspect CLI plugins (beta)." "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." "show:Show information about the deployed application." "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." "skills:Manage Tailor SDK agent skills." "completion:Generate shell completion script")
|
|
5197
|
+
local -a _subs=("api:Call Tailor Platform API endpoints directly." "auth:Authentication helpers for scripts and plugins." "authconnection:Manage auth connections." "crashreport:Manage crash reports." "data:Manage application data across workspaces." "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." "notification:Read the platform notifications sent to you." "oauth2client:Manage OAuth2 clients in your Tailor Platform application." "open:Open Tailor Platform Console." "organization:Manage Tailor Platform organizations." "plugin:Manage and inspect CLI plugins (beta)." "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." "show:Show information about the deployed application." "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." "skills:Manage Tailor SDK agent skills." "completion:Generate shell completion script")
|
|
5082
5198
|
__tailor_worker_cdescribe 'subcommands' _subs
|
|
5083
5199
|
fi
|
|
5084
5200
|
}
|
|
@@ -5171,6 +5287,10 @@ _tailor_worker_completions() {
|
|
|
5171
5287
|
machineuser:list) __tailor_worker_complete_machineuser_list ;;
|
|
5172
5288
|
machineuser:token) __tailor_worker_complete_machineuser_token ;;
|
|
5173
5289
|
machineuser) __tailor_worker_complete_machineuser ;;
|
|
5290
|
+
notification:list) __tailor_worker_complete_notification_list ;;
|
|
5291
|
+
notification:read) __tailor_worker_complete_notification_read ;;
|
|
5292
|
+
notification:dismiss) __tailor_worker_complete_notification_dismiss ;;
|
|
5293
|
+
notification) __tailor_worker_complete_notification ;;
|
|
5174
5294
|
oauth2client:list) __tailor_worker_complete_oauth2client_list ;;
|
|
5175
5295
|
oauth2client:get) __tailor_worker_complete_oauth2client_get ;;
|
|
5176
5296
|
oauth2client) __tailor_worker_complete_oauth2client ;;
|
|
@@ -5217,7 +5337,6 @@ _tailor_worker_completions() {
|
|
|
5217
5337
|
tailordb:migration:rebaseline) __tailor_worker_complete_tailordb_migration_rebaseline ;;
|
|
5218
5338
|
tailordb:migration:resolve) __tailor_worker_complete_tailordb_migration_resolve ;;
|
|
5219
5339
|
tailordb:migration:script) __tailor_worker_complete_tailordb_migration_script ;;
|
|
5220
|
-
tailordb:migration:set) __tailor_worker_complete_tailordb_migration_set ;;
|
|
5221
5340
|
tailordb:migration:status) __tailor_worker_complete_tailordb_migration_status ;;
|
|
5222
5341
|
tailordb:migration:sync) __tailor_worker_complete_tailordb_migration_sync ;;
|
|
5223
5342
|
tailordb:migration:test) __tailor_worker_complete_tailordb_migration_test ;;
|
package/dist/configure/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import{i as e}from"../field-parse-BQhUAbpM.mjs";import{n as t,t as n}from"../schema-BU1aIQ63.mjs";import{t as r}from"../brand-C8nMKhJC.mjs";import{a as i,n as a,r as o}from"../registry-BijIDRVA.mjs";import{l as s,n as c,r as l,t as u}from"../wait-point-invoker-eiP-IIux.mjs";import{a as d,i as f,o as p,r as m}from"../wait-point-registry-B-ESkTZX.mjs";function createTailorField(n,r,i,a,o){let s=o?{...o,...o.allowedValues&&{allowedValues:o.allowedValues.map(e=>({...e}))},...o.validate&&{validate:o.validate.map(e=>Array.isArray(e)?[...e]:e)}}:{required:!0};o||(r&&(r.optional===!0&&(s.required=!1),r.array===!0&&(s.array=!0)),a&&(s.allowedValues=t(a)));function parseInternal$1(t){return e({...t,field:c})}function cloneWith(e){let t=c.clone();return Object.assign(t._metadata,e),t}let c={type:n,fields:i??{},_defined:void 0,_output:void 0,_metadata:s,get metadata(){return{...this._metadata}},description(e){return cloneWith({description:e})},typeName(e){return cloneWith({typeName:e})},validate(...e){return cloneWith({validate:e})},parse(e){return parseInternal$1({value:e.value,data:e.data,invoker:e.invoker,pathArray:[]})},clone(){let e=i;if(i){let t={};for(let[e,n]of Object.entries(i))t[e]=n.clone();e=t}return createTailorField(n,r,e,a,this._metadata)}};return c}function uuid(e){return createTailorField(`uuid`,e)}function string(e){return createTailorField(`string`,e)}function bool(e){return createTailorField(`boolean`,e)}function int(e){return createTailorField(`integer`,e)}function float(e){return createTailorField(`float`,e)}function decimal(e){return createTailorField(`decimal`,e)}function date(...e){let[t]=e,n=createTailorField(`date`,t);return n._metadata.as=t?.as??`default`,n}function datetime(...e){let[t]=e,n=createTailorField(`datetime`,t);return n._metadata.as=t?.as??`default`,n}function time(...e){let[t]=e,n=createTailorField(`time`,t);return n._metadata.as=t?.as??`default`,n}function _enum(e,t){return createTailorField(`enum`,t,void 0,e)}function object(e,t){return createTailorField(`nested`,t,e)}const h={uuid,string,bool,int,float,decimal,date,datetime,time,enum:_enum,object};/* @__NO_SIDE_EFFECTS__ */
|
|
2
|
-
function defineAuth(e,t){
|
|
2
|
+
function defineAuth(e,t){let n={...t,name:e};return Object.defineProperty(n,"asExternal",{value:()=>({name:e,external:!0,machineUsers:t.machineUsers??{}})}),n}const g={create:[{conditions:[],permit:!0}],read:[{conditions:[],permit:!0}],update:[{conditions:[],permit:!0}],delete:[{conditions:[],permit:!0}]},_=[{conditions:[],actions:`all`,permit:!0}];/* @__NO_SIDE_EFFECTS__ */
|
|
3
3
|
function createResolver(e){let t=(e=>typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`)(e.output)?e.output:h.object(e.output);return r({...e,output:t},`resolver`)}/* @__NO_SIDE_EFFECTS__ */
|
|
4
4
|
function createExecutor(e){return r(e,`executor`)}const v={created:`tailordb.type_record.created`,updated:`tailordb.type_record.updated`,deleted:`tailordb.type_record.deleted`};function recordCreatedTrigger(e){let{type:t,condition:n}=e;return{kind:`tailordb`,events:[`tailordb.type_record.created`],tableName:t.name,condition:n,__args:{}}}function recordUpdatedTrigger(e){let{type:t,condition:n}=e;return{kind:`tailordb`,events:[`tailordb.type_record.updated`],tableName:t.name,condition:n,__args:{}}}function recordDeletedTrigger(e){let{type:t,condition:n}=e;return{kind:`tailordb`,events:[`tailordb.type_record.deleted`],tableName:t.name,condition:n,__args:{}}}function recordTrigger(e){let{type:t,events:n,condition:r}=e;return{kind:`tailordb`,events:n.map(e=>v[e]),tableName:t.name,condition:r,__args:{}}}function resolverExecutedTrigger(e){let{resolver:t,condition:n}=e;return{kind:`resolverExecuted`,resolverName:t.name,condition:n,__args:{}}}const y={created:`idp.user.created`,updated:`idp.user.updated`,deleted:`idp.user.deleted`};function idpUserCreatedTrigger(e){return{kind:`idpUser`,events:[`idp.user.created`],...e?.idp==null?{}:{idp:e.idp},__args:{}}}function idpUserUpdatedTrigger(e){return{kind:`idpUser`,events:[`idp.user.updated`],...e?.idp==null?{}:{idp:e.idp},__args:{}}}function idpUserDeletedTrigger(e){return{kind:`idpUser`,events:[`idp.user.deleted`],...e?.idp==null?{}:{idp:e.idp},__args:{}}}function idpUserTrigger(e){let{events:t,idp:n}=e;return{kind:`idpUser`,events:t.map(e=>y[e]),...n==null?{}:{idp:n},__args:{}}}const b={issued:`auth.access_token.issued`,refreshed:`auth.access_token.refreshed`,revoked:`auth.access_token.revoked`};function authAccessTokenIssuedTrigger(){return{kind:`authAccessToken`,events:[`auth.access_token.issued`],__args:{}}}function authAccessTokenRefreshedTrigger(){return{kind:`authAccessToken`,events:[`auth.access_token.refreshed`],__args:{}}}function authAccessTokenRevokedTrigger(){return{kind:`authAccessToken`,events:[`auth.access_token.revoked`],__args:{}}}function authAccessTokenTrigger(e){let{events:t}=e;return{kind:`authAccessToken`,events:t.map(e=>b[e]),__args:{}}}const x={started:`workflow.workflow_execution.started`,completed:`workflow.workflow_execution.completed`,retried:`workflow.workflow_execution.retried`,resumed:`workflow.workflow_execution.resumed`,wait_started:`workflow.workflow_execution.wait_started`,wait_resolved:`workflow.workflow_execution.wait_resolved`};function workflowExecutionTriggerConfig(e,t){return{kind:`workflowExecution`,events:e,workflowName:t.workflow.name,condition:t.condition,__args:{}}}function workflowExecutionStartedTrigger(e){return workflowExecutionTriggerConfig([`workflow.workflow_execution.started`],e)}function workflowExecutionCompletedTrigger(e){return workflowExecutionTriggerConfig([`workflow.workflow_execution.completed`],e)}function workflowExecutionRetriedTrigger(e){return workflowExecutionTriggerConfig([`workflow.workflow_execution.retried`],e)}function workflowExecutionResumedTrigger(e){return workflowExecutionTriggerConfig([`workflow.workflow_execution.resumed`],e)}function workflowExecutionWaitStartedTrigger(e){return workflowExecutionTriggerConfig([`workflow.workflow_execution.wait_started`],e)}function workflowExecutionWaitResolvedTrigger(e){return workflowExecutionTriggerConfig([`workflow.workflow_execution.wait_resolved`],e)}function workflowExecutionTrigger(e){let{events:t,workflow:n,condition:r}=e;return workflowExecutionTriggerConfig(t.map(e=>x[e]),{workflow:n,condition:r})}const S={started:`workflow.workflow_execution.job_execution.started`,completed:`workflow.workflow_execution.job_execution.completed`,wait_started:`workflow.workflow_execution.job_execution.wait_started`,wait_resolved:`workflow.workflow_execution.job_execution.wait_resolved`};function workflowJobExecutionTriggerConfig(e,t){return{kind:`workflowJobExecution`,events:e,workflowName:t.workflow.name,condition:t.condition,__args:{}}}function workflowJobExecutionStartedTrigger(e){return workflowJobExecutionTriggerConfig([`workflow.workflow_execution.job_execution.started`],e)}function workflowJobExecutionCompletedTrigger(e){return workflowJobExecutionTriggerConfig([`workflow.workflow_execution.job_execution.completed`],e)}function workflowJobExecutionWaitStartedTrigger(e){return workflowJobExecutionTriggerConfig([`workflow.workflow_execution.job_execution.wait_started`],e)}function workflowJobExecutionWaitResolvedTrigger(e){return workflowJobExecutionTriggerConfig([`workflow.workflow_execution.job_execution.wait_resolved`],e)}function workflowJobExecutionTrigger(e){let{events:t,workflow:n,condition:r}=e;return workflowJobExecutionTriggerConfig(t.map(e=>S[e]),{workflow:n,condition:r})}function scheduleTrigger(e){let{cron:t,timezone:n}=e;return{kind:`schedule`,cron:t,timezone:n,__args:{}}}function incomingWebhookTrigger(e){let t=typeof e?.response==`function`?{body:e.response}:e?.response;return{kind:`incomingWebhook`,...t?{response:t}:{},__args:{}}}const C=/^[a-z0-9][a-z0-9_:.-]{0,62}[a-z0-9]$/;function createExecutionPolicyInstance(e,t,n,i,a,o,s){let c=i===`prefix`,l={name:e,key:t,matchType:i,...n&&{concurrencyPolicy:n},...c&&{keyFor:e=>{let t=`${l.key}${a}${e}`;if(!C.test(t))throw Error(`Invalid execution policy key "${t}" built by keyFor("${e}"): must match [a-z0-9_:.-] (2-64 chars; must start and end with [a-z0-9]).`);return t}}};return{instance:r(l,`execution-policy`),setName:o?e=>{l.name=e}:void 0,setKey:s?e=>{l.key=e}:void 0}}/* @__NO_SIDE_EFFECTS__ */
|
|
5
5
|
function defineWorkflowExecutionPolicy(e,t){return createExecutionPolicyInstance(e,t?.key??e,t?.concurrencyPolicy,t?.matchType??`exact`,t?.separator??`.`,!1,!1).instance}/* @__NO_SIDE_EFFECTS__ */
|