@tailor-platform/sdk 2.0.0-next.1 → 2.0.0-next.11
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 +1056 -24
- package/README.md +9 -9
- package/agent-skills/{tailor-sdk → tailor}/SKILL.md +3 -1
- package/dist/aigateway-DR4Kwuik.mjs +9 -0
- package/dist/aigateway-DR4Kwuik.mjs.map +1 -0
- package/dist/{application-DqS1yBg3.mjs → application-CM6hKnSK.mjs} +2155 -2008
- package/dist/application-CM6hKnSK.mjs.map +1 -0
- package/dist/application-CXNaUNhv.mjs +3 -0
- package/dist/authconnection-CZvi9ANm.mjs +9 -0
- package/dist/authconnection-CZvi9ANm.mjs.map +1 -0
- package/dist/brand-Eo4pLXPJ.mjs.map +1 -1
- package/dist/cli/cache/bundle-cache.d.mts +2 -0
- package/dist/cli/cache/store.d.mts +1 -0
- package/dist/cli/cache/types.d.mts +1 -0
- package/dist/cli/commands/api/api-call.d.mts +19 -0
- package/dist/cli/commands/api/index.d.mts +4 -0
- package/dist/cli/commands/deploy/aigateway.d.mts +5 -0
- package/dist/cli/commands/deploy/application.d.mts +7 -0
- package/dist/cli/commands/deploy/apply-phases.d.mts +14 -0
- package/dist/cli/commands/deploy/auth.d.mts +5 -0
- package/dist/cli/commands/deploy/deploy.d.mts +35 -0
- package/dist/cli/commands/deploy/executor.d.mts +7 -0
- package/dist/cli/commands/deploy/function-registry-types.d.mts +12 -0
- package/dist/cli/commands/deploy/function-registry.d.mts +6 -0
- package/dist/cli/commands/deploy/idp.d.mts +5 -0
- package/dist/cli/commands/deploy/label.d.mts +2 -0
- package/dist/cli/commands/deploy/resolver.d.mts +5 -0
- package/dist/cli/commands/deploy/secret-manager.d.mts +5 -0
- package/dist/cli/commands/deploy/staticwebsite.d.mts +5 -0
- package/dist/cli/commands/deploy/tailordb/index.d.mts +10 -0
- package/dist/cli/commands/deploy/types.d.mts +4 -0
- package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +2 -0
- package/dist/cli/commands/deploy/workflow.d.mts +4 -0
- package/dist/cli/commands/executor/get.d.mts +19 -0
- package/dist/cli/commands/executor/jobs.d.mts +85 -0
- package/dist/cli/commands/executor/list.d.mts +18 -0
- package/dist/cli/commands/executor/transform.d.mts +42 -0
- package/dist/cli/commands/executor/trigger.d.mts +30 -0
- package/dist/cli/commands/executor/webhook.d.mts +21 -0
- package/dist/cli/commands/function/get.d.mts +17 -0
- package/dist/cli/commands/function/list.d.mts +21 -0
- package/dist/cli/commands/function/transform.d.mts +12 -0
- package/dist/cli/commands/generate/options.d.mts +6 -0
- package/dist/cli/commands/generate/seed/bundler.d.mts +27 -0
- package/dist/cli/commands/generate/service.d.mts +15 -0
- package/dist/cli/commands/machineuser/list.d.mts +26 -0
- package/dist/cli/commands/machineuser/token.d.mts +21 -0
- package/dist/cli/commands/oauth2client/get.d.mts +17 -0
- package/dist/cli/commands/oauth2client/list.d.mts +19 -0
- package/dist/cli/commands/oauth2client/transform.d.mts +21 -0
- package/dist/cli/commands/organization/folder/create.d.mts +17 -0
- package/dist/cli/commands/organization/folder/delete.d.mts +15 -0
- package/dist/cli/commands/organization/folder/get.d.mts +16 -0
- package/dist/cli/commands/organization/folder/list.d.mts +21 -0
- package/dist/cli/commands/organization/folder/update.d.mts +17 -0
- package/dist/cli/commands/organization/get.d.mts +15 -0
- package/dist/cli/commands/organization/list.d.mts +14 -0
- package/dist/cli/commands/organization/transform.d.mts +29 -0
- package/dist/cli/commands/organization/tree.d.mts +24 -0
- package/dist/cli/commands/organization/update.d.mts +16 -0
- package/dist/cli/commands/remove.d.mts +15 -0
- package/dist/cli/commands/show.d.mts +39 -0
- package/dist/cli/commands/staticwebsite/deploy.d.mts +19 -0
- package/dist/cli/commands/tailordb/migrate/bundler.d.mts +29 -0
- package/dist/cli/commands/tailordb/migrate/config.d.mts +18 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +246 -0
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +16 -0
- package/dist/cli/commands/tailordb/migrate/schema-checks.d.mts +5 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +208 -0
- package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +98 -0
- package/dist/cli/commands/tailordb/migrate/types.d.mts +7 -0
- package/dist/cli/commands/tailordb/truncate.d.mts +18 -0
- package/dist/cli/commands/workflow/executions.d.mts +62 -0
- package/dist/cli/commands/workflow/get.d.mts +21 -0
- package/dist/cli/commands/workflow/list.d.mts +18 -0
- package/dist/cli/commands/workflow/resume.d.mts +22 -0
- package/dist/cli/commands/workflow/start.d.mts +48 -0
- package/dist/cli/commands/workflow/status.d.mts +6 -0
- package/dist/cli/commands/workflow/transform.d.mts +34 -0
- package/dist/cli/commands/workflow/wait.d.mts +15 -0
- package/dist/cli/commands/workflow/waiter.d.mts +23 -0
- package/dist/cli/commands/workspace/app/health.d.mts +17 -0
- package/dist/cli/commands/workspace/app/list.d.mts +21 -0
- package/dist/cli/commands/workspace/app/transform.d.mts +20 -0
- package/dist/cli/commands/workspace/create.d.mts +27 -0
- package/dist/cli/commands/workspace/delete.d.mts +14 -0
- package/dist/cli/commands/workspace/get.d.mts +16 -0
- package/dist/cli/commands/workspace/list.d.mts +17 -0
- package/dist/cli/commands/workspace/restore.d.mts +14 -0
- package/dist/cli/commands/workspace/transform.d.mts +20 -0
- package/dist/cli/commands/workspace/user/invite.d.mts +21 -0
- package/dist/cli/commands/workspace/user/list.d.mts +21 -0
- package/dist/cli/commands/workspace/user/remove.d.mts +16 -0
- package/dist/cli/commands/workspace/user/transform.d.mts +9 -0
- package/dist/cli/commands/workspace/user/update.d.mts +21 -0
- package/dist/cli/index.mjs +12 -5481
- package/dist/cli/lib.d.mts +86 -21048
- package/dist/cli/lib.mjs +245 -46
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.d.mts +23 -0
- package/dist/cli/main.mjs +6777 -0
- package/dist/cli/main.mjs.map +1 -0
- package/dist/cli/query/index.d.mts +38 -0
- package/dist/cli/services/application.d.mts +12 -0
- package/dist/cli/services/auth/service.d.mts +3 -0
- package/dist/cli/services/executor/service.d.mts +1 -0
- package/dist/cli/services/http-adapter/bundler.d.mts +4 -0
- package/dist/cli/services/http-adapter/service.d.mts +2 -0
- package/dist/cli/services/resolver/service.d.mts +1 -0
- package/dist/cli/services/tailordb/service.d.mts +3 -0
- package/dist/cli/services/workflow/bundler.d.mts +3 -0
- package/dist/cli/services/workflow/service.d.mts +1 -0
- package/dist/cli/shared/args.d.mts +13 -0
- package/dist/cli/shared/client.d.mts +1298 -0
- package/dist/cli/shared/config-loader.d.mts +32 -0
- package/dist/cli/shared/context.d.mts +29 -0
- package/dist/cli/shared/error-json.d.mts +23 -0
- package/dist/cli/shared/readonly-guard.d.mts +25 -0
- package/dist/cli/shared/script-executor.d.mts +77 -0
- package/dist/cli/shared/seed-chunker.d.mts +45 -0
- package/dist/cli/shared/seed-context.d.mts +49 -0
- package/dist/cli/shared/tailordb-namespaces.d.mts +40 -0
- package/dist/cli/shared/tsconfig-paths-plugin.d.mts +2 -0
- package/dist/cli/shared/type-generator.d.mts +20 -0
- package/dist/cli/shared/workspace-name.d.mts +1 -0
- package/dist/cli/ts-hook.d.mts +4 -0
- package/dist/cli/ts-hook.mjs +333 -0
- package/dist/completion/zsh-worker.zsh +1471 -1217
- package/dist/configure/config/index.d.mts +20 -0
- package/dist/configure/config/types.d.mts +134 -0
- package/dist/configure/index.d.mts +135 -8
- package/dist/configure/index.mjs +558 -36
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/aigateway/index.d.mts +16 -0
- package/dist/configure/services/aigateway/types.d.mts +10 -0
- package/dist/configure/services/auth/index.d.mts +33 -0
- package/dist/configure/services/auth/types.d.mts +168 -0
- package/dist/configure/services/executor/executor.d.mts +70 -0
- package/dist/configure/services/executor/index.d.mts +9 -0
- package/dist/configure/services/executor/operation.d.mts +50 -0
- package/dist/configure/services/executor/trigger/event.d.mts +514 -0
- package/dist/configure/services/executor/trigger/index.d.mts +7 -0
- package/dist/configure/services/executor/trigger/schedule.d.mts +24 -0
- package/dist/configure/services/executor/trigger/webhook.d.mts +43 -0
- package/dist/configure/services/executor/types.d.mts +2 -0
- package/dist/configure/services/http-adapter/http-adapter.d.mts +124 -0
- package/dist/configure/services/http-adapter/index.d.mts +2 -0
- package/dist/configure/services/idp/index.d.mts +60 -0
- package/dist/configure/services/idp/permission.d.mts +64 -0
- package/dist/configure/services/idp/types.d.mts +23 -0
- package/dist/configure/services/index.d.mts +40 -0
- package/dist/configure/services/resolver/index.d.mts +6 -0
- package/dist/configure/services/resolver/permission.d.mts +64 -0
- package/dist/configure/services/resolver/resolver.d.mts +88 -0
- package/dist/configure/services/resolver/types.d.mts +5 -0
- package/dist/configure/services/secrets/index.d.mts +37 -0
- package/dist/configure/services/secrets/types.d.mts +10 -0
- package/dist/configure/services/staticwebsite/index.d.mts +18 -0
- package/dist/configure/services/staticwebsite/types.d.mts +10 -0
- package/dist/configure/services/tailordb/index.d.mts +3 -0
- package/dist/configure/services/tailordb/permission.d.mts +103 -0
- package/dist/configure/services/tailordb/schema.d.mts +486 -0
- package/dist/configure/services/tailordb/types.d.mts +198 -0
- package/dist/configure/services/workflow/execution-policy.d.mts +70 -0
- package/dist/configure/services/workflow/execution-policy.types.d.mts +103 -0
- package/dist/configure/services/workflow/index.d.mts +9 -0
- package/dist/configure/services/workflow/job.d.mts +92 -0
- package/dist/configure/services/workflow/types.d.mts +2 -0
- package/dist/configure/services/workflow/wait-point.d.mts +72 -0
- package/dist/configure/services/workflow/workflow.d.mts +66 -0
- package/dist/configure/types/aigateway-name.d.mts +12 -0
- package/dist/configure/types/connection-name.d.mts +12 -0
- package/dist/configure/types/field.d.mts +8 -0
- package/dist/configure/types/field.types.d.mts +70 -0
- package/dist/configure/types/idp-name.d.mts +12 -0
- package/dist/configure/types/index.d.mts +5 -0
- package/dist/configure/types/machine-user.d.mts +2 -0
- package/dist/configure/types/permission-operand.types.d.mts +20 -0
- package/dist/configure/types/type.d.mts +73 -0
- package/dist/{context-Bd266-ru.mjs → context-DYQVYWqZ.mjs} +4 -5
- package/dist/context-DYQVYWqZ.mjs.map +1 -0
- package/dist/{crashreport-BsjAkFWw.mjs → crashreport-B5LqCTfF.mjs} +10 -11
- package/dist/{crashreport-BsjAkFWw.mjs.map → crashreport-B5LqCTfF.mjs.map} +1 -1
- package/dist/{crashreport-pr6Rhvza.mjs → crashreport-eI7ty7ok.mjs} +1 -1
- package/dist/{errors-Dtf2WPaW.mjs → errors-D7583Zz7.mjs} +18 -2
- package/dist/errors-D7583Zz7.mjs.map +1 -0
- package/dist/{file-_oUZo76X.mjs → file-BUcmVIH2.mjs} +12 -22
- package/dist/file-BUcmVIH2.mjs.map +1 -0
- package/dist/{globals-Crz8o65k.mjs → globals-TfAVItuK.mjs} +32 -55
- package/dist/globals-TfAVItuK.mjs.map +1 -0
- package/dist/iconv-QWaZh0TT.mjs +38 -0
- package/dist/iconv-QWaZh0TT.mjs.map +1 -0
- package/dist/{idp-BDbK5gjm.mjs → idp-RA_swu-h.mjs} +12 -5
- package/dist/idp-RA_swu-h.mjs.map +1 -0
- package/dist/{interceptor-D-q1rvRl.mjs → interceptor-e33JtsC-.mjs} +2 -2
- package/dist/interceptor-e33JtsC-.mjs.map +1 -0
- package/dist/kysely/index.d.mts +5 -7
- package/dist/logger-BtX0suGY.mjs +48 -0
- package/dist/logger-BtX0suGY.mjs.map +1 -0
- package/dist/logger-CXQq9YIp.mjs +317 -0
- package/dist/logger-CXQq9YIp.mjs.map +1 -0
- package/dist/node-builtins-CmaL2Cbq.mjs +36 -0
- package/dist/node-builtins-CmaL2Cbq.mjs.map +1 -0
- package/dist/parser/service/auth/index.d.mts +1 -0
- package/dist/parser/service/auth/schema.d.mts +3 -0
- package/dist/parser/service/http-adapter/index.d.mts +1 -0
- package/dist/parser/service/http-adapter/schema.d.mts +1 -0
- package/dist/parser/service/idp/types.d.mts +5 -0
- package/dist/parser/service/tailordb/type-source.d.mts +10 -0
- package/dist/parser/service/tailordb/types.d.mts +131 -0
- package/dist/platform-serialize-RoRtBS0v.mjs +46 -0
- package/dist/platform-serialize-RoRtBS0v.mjs.map +1 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +15 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +115 -2
- package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -0
- package/dist/plugin/builtin/file-utils/index.d.mts +15 -1
- package/dist/plugin/builtin/file-utils/index.mjs +149 -2
- package/dist/plugin/builtin/file-utils/index.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.d.mts +15 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +274 -2
- package/dist/plugin/builtin/kysely-type/index.mjs.map +1 -0
- package/dist/plugin/builtin/seed/index.d.mts +46 -2
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +21 -0
- package/dist/plugin/builtin/seed/types.d.mts +2 -0
- package/dist/plugin/get-generated-type.d.mts +16 -0
- package/dist/plugin/index.d.mts +3 -117
- package/dist/plugin/index.mjs +1 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/manager.d.mts +2 -0
- package/dist/plugin/types.d.mts +242 -0
- package/dist/plugin/with-context.d.mts +101 -0
- package/dist/{runtime-n9NCkjee.mjs → register-ts-hook-LYV7zH-e.mjs} +9652 -4479
- package/dist/register-ts-hook-LYV7zH-e.mjs.map +1 -0
- package/dist/{registry-DdsYlL_P.mjs → registry-BIGVUrMB.mjs} +12 -9
- package/dist/registry-BIGVUrMB.mjs.map +1 -0
- package/dist/{repl-editor-DmGr9zMw.mjs → repl-editor-BCozyiNq.mjs} +6 -5
- package/dist/{repl-editor-DmGr9zMw.mjs.map → repl-editor-BCozyiNq.mjs.map} +1 -1
- package/dist/runtime/aigateway.d.mts +25 -0
- package/dist/runtime/aigateway.mjs +3 -0
- package/dist/runtime/authconnection.d.mts +21 -2
- package/dist/runtime/authconnection.mjs +2 -2
- package/dist/runtime/context.d.mts +54 -2
- package/dist/runtime/context.mjs +2 -2
- package/dist/runtime/field-parse.d.mts +10 -0
- package/dist/runtime/file.d.mts +170 -2
- package/dist/runtime/file.mjs +2 -2
- package/dist/runtime/globals.d.mts +38 -20
- package/dist/runtime/iconv.d.mts +73 -2
- package/dist/runtime/iconv.mjs +2 -2
- package/dist/runtime/idp.d.mts +129 -2
- package/dist/runtime/idp.mjs +2 -2
- package/dist/runtime/index.d.mts +48 -9
- package/dist/runtime/index.mjs +10 -8
- package/dist/runtime/logger.d.mts +98 -0
- package/dist/runtime/logger.mjs +3 -0
- package/dist/runtime/secretmanager.d.mts +41 -2
- package/dist/runtime/secretmanager.mjs +2 -2
- package/dist/runtime/types.d.mts +25 -0
- package/dist/runtime/workflow.d.mts +106 -2
- package/dist/runtime/workflow.mjs +2 -2
- package/dist/{schema-BhkpP5Hw.mjs → schema--xYWRGfe.mjs} +288 -229
- package/dist/schema--xYWRGfe.mjs.map +1 -0
- package/dist/{secret-file-DBqZhjFQ.mjs → secret-file-C3J4Gy8r.mjs} +2 -2
- package/dist/{secret-file-DBqZhjFQ.mjs.map → secret-file-C3J4Gy8r.mjs.map} +1 -1
- package/dist/secretmanager-CYlpffsz.mjs +13 -0
- package/dist/secretmanager-CYlpffsz.mjs.map +1 -0
- package/dist/secretmanager-IY4UvinW.mjs +131 -0
- package/dist/secretmanager-IY4UvinW.mjs.map +1 -0
- package/dist/seed/index.d.mts +4 -4
- package/dist/seed-B-yckgQY.mjs +483 -0
- package/dist/seed-B-yckgQY.mjs.map +1 -0
- package/dist/{service-DU1mVzri.mjs → service-B5WynBHQ.mjs} +3 -3
- package/dist/{service-DU1mVzri.mjs.map → service-B5WynBHQ.mjs.map} +1 -1
- package/dist/service-M7OYziQP.mjs +3 -0
- package/dist/service-k1xy_A5G.mjs +864 -0
- package/dist/service-k1xy_A5G.mjs.map +1 -0
- package/dist/service_pb-D5--My_M.mjs +167 -0
- package/dist/service_pb-D5--My_M.mjs.map +1 -0
- package/dist/service_pb-i8CmnQP4.mjs +3 -0
- package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +203 -0
- package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +57 -0
- package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +420 -0
- package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +160 -0
- package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +2069 -0
- package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +865 -0
- package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +111 -0
- package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +68 -0
- package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +438 -0
- package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +586 -0
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +192 -0
- package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +450 -0
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +191 -0
- package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +49 -0
- package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +406 -0
- package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +429 -0
- package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +72 -0
- package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +16 -0
- package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +308 -0
- package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +590 -0
- package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +329 -0
- package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +112 -0
- package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +345 -0
- package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +53 -0
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +3658 -0
- package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +186 -0
- package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +28 -0
- package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +428 -0
- package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +89 -0
- package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +683 -0
- package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +796 -0
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +329 -0
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +207 -0
- package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +961 -0
- package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +330 -0
- package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +2014 -0
- package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +482 -0
- package/dist/{telemetry-CdqJEzkj.mjs → telemetry-BRVdwh14.mjs} +3 -3
- package/dist/telemetry-BRVdwh14.mjs.map +1 -0
- package/dist/telemetry-CkbkeJxl.mjs +3 -0
- package/dist/test-env-key-D7UkZp99.mjs +75 -0
- package/dist/test-env-key-D7UkZp99.mjs.map +1 -0
- package/dist/types/aigateway.generated.d.mts +12 -0
- package/dist/types/app-config.generated.d.mts +4 -0
- package/dist/types/auth-connection.generated.d.mts +33 -0
- package/dist/types/auth.generated.d.mts +188 -0
- package/dist/types/executor.generated.d.mts +229 -0
- package/dist/types/helpers.d.mts +40 -0
- package/dist/types/http-adapter.generated.d.mts +28 -0
- package/dist/types/idp.generated.d.mts +626 -0
- package/dist/types/resolver.generated.d.mts +82 -0
- package/dist/types/secrets.generated.d.mts +14 -0
- package/dist/types/staticwebsite.generated.d.mts +14 -0
- package/dist/types/tailordb.generated.d.mts +468 -0
- package/dist/types/workflow.generated.d.mts +17 -0
- package/dist/user-agent-Bgsszb5I.mjs +28 -0
- package/dist/user-agent-Bgsszb5I.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +5 -100
- package/dist/utils/test/index.mjs +38 -189
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/environment.d.mts +1 -2
- package/dist/vitest/environment.mjs +2 -2
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.d.mts +17 -431
- package/dist/vitest/index.mjs +1234 -67
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock-kysely.d.mts +61 -0
- package/dist/vitest/mock.d.mts +10 -0
- package/dist/vitest/mocks/aigateway.d.mts +40 -0
- package/dist/vitest/mocks/authconnection.d.mts +38 -0
- package/dist/vitest/mocks/file.d.mts +58 -0
- package/dist/vitest/mocks/iconv.d.mts +51 -0
- package/dist/vitest/mocks/idp.d.mts +60 -0
- package/dist/vitest/mocks/logger.d.mts +45 -0
- package/dist/vitest/mocks/secretmanager.d.mts +44 -0
- package/dist/vitest/mocks/tailordb.d.mts +115 -0
- package/dist/vitest/mocks/workflow.d.mts +148 -0
- package/dist/vitest/setup.d.mts +1 -2
- package/dist/vitest/setup.mjs +2 -2
- package/dist/vitest/workflow-local.d.mts +41 -0
- package/dist/workflow-Bamae_Yc.mjs +34 -0
- package/dist/workflow-Bamae_Yc.mjs.map +1 -0
- package/dist/{client-z_oHGVNy.mjs → workspace_resource_pb-DXnO2AT-.mjs} +57 -621
- package/dist/workspace_resource_pb-DXnO2AT-.mjs.map +1 -0
- package/docs/cli/application.md +150 -250
- package/docs/cli/auth.md +51 -295
- package/docs/cli/completion.md +1 -25
- package/docs/cli/crashreport.md +3 -61
- package/docs/cli/executor.md +72 -183
- package/docs/cli/function.md +16 -132
- package/docs/cli/organization.md +11 -221
- package/docs/cli/plugin.md +29 -0
- package/docs/cli/query.md +2 -22
- package/docs/cli/secret.md +71 -251
- package/docs/cli/setup.md +138 -40
- package/docs/cli/skills.md +50 -39
- package/docs/cli/staticwebsite.md +32 -180
- package/docs/cli/tailordb.md +89 -413
- package/docs/cli/upgrade.md +2 -22
- package/docs/cli/user.md +78 -247
- package/docs/cli/workflow.md +150 -172
- package/docs/cli/workspace.md +167 -538
- package/docs/cli-reference.md +214 -96
- package/docs/configuration.md +90 -6
- package/docs/github-actions.md +72 -24
- package/docs/migration/v2.md +1613 -0
- package/docs/multi-environment.md +29 -7
- package/docs/plugin/custom.md +4 -4
- package/docs/plugin/index.md +8 -8
- package/docs/quickstart.md +8 -7
- package/docs/runtime.md +18 -9
- package/docs/services/aigateway.md +20 -2
- package/docs/services/auth.md +51 -59
- package/docs/services/executor.md +91 -6
- package/docs/services/http-adapter.md +16 -1
- package/docs/services/idp.md +62 -7
- package/docs/services/resolver.md +67 -11
- package/docs/services/secret.md +11 -11
- package/docs/services/staticwebsite.md +8 -2
- package/docs/services/tailordb-migration.md +55 -29
- package/docs/services/tailordb.md +205 -102
- package/docs/services/workflow.md +163 -55
- package/docs/testing.md +244 -143
- package/package.json +61 -46
- package/postinstall.mjs +4 -6
- package/dist/application-DB2r36Et.mjs +0 -3
- package/dist/application-DqS1yBg3.mjs.map +0 -1
- package/dist/authconnection-D2MhtTN5.mjs +0 -15
- package/dist/authconnection-D2MhtTN5.mjs.map +0 -1
- package/dist/authconnection-DvUQAjQS.d.mts +0 -39
- package/dist/cli/erd-viewer-assets/app.js +0 -1181
- package/dist/cli/erd-viewer-assets/index.html +0 -73
- package/dist/cli/erd-viewer-assets/serve.json +0 -13
- package/dist/cli/erd-viewer-assets/styles.css +0 -789
- package/dist/cli/index.d.mts +0 -5
- package/dist/cli/index.mjs.map +0 -1
- package/dist/client-Dbohmtkv.mjs +0 -3
- package/dist/client-z_oHGVNy.mjs.map +0 -1
- package/dist/context-Bd266-ru.mjs.map +0 -1
- package/dist/context-BuuIb8CC.d.mts +0 -68
- package/dist/enum-constants-j9QBF0cB.mjs +0 -116
- package/dist/enum-constants-j9QBF0cB.mjs.map +0 -1
- package/dist/errors-Dtf2WPaW.mjs.map +0 -1
- package/dist/field-DOsJCPFa.mjs +0 -22
- package/dist/field-DOsJCPFa.mjs.map +0 -1
- package/dist/file-BB8Vs9O_.d.mts +0 -250
- package/dist/file-_oUZo76X.mjs.map +0 -1
- package/dist/file-utils-DcyIPFQh.mjs +0 -150
- package/dist/file-utils-DcyIPFQh.mjs.map +0 -1
- package/dist/globals-Crz8o65k.mjs.map +0 -1
- package/dist/http-adapter.generated-WgMnb7Sb.d.mts +0 -580
- package/dist/iconv-Co-TOPuH.d.mts +0 -122
- package/dist/iconv-D2vi8G36.mjs +0 -63
- package/dist/iconv-D2vi8G36.mjs.map +0 -1
- package/dist/idp-BDbK5gjm.mjs.map +0 -1
- package/dist/idp-DrhVrLmV.d.mts +0 -160
- package/dist/index-5vPyRu1y.d.mts +0 -18
- package/dist/index-B7AKc18V.d.mts +0 -47
- package/dist/index-BlpzXncY.d.mts +0 -1016
- package/dist/index-CK7u9isy.d.mts +0 -46
- package/dist/index-CNYe5lnW.d.mts +0 -18
- package/dist/index-DjUdWlzf.d.mts +0 -18
- package/dist/index-ZePLwxw7.d.mts +0 -208
- package/dist/interceptor-D-q1rvRl.mjs.map +0 -1
- package/dist/job-fuc3j1Ma.mjs +0 -53
- package/dist/job-fuc3j1Ma.mjs.map +0 -1
- package/dist/kysely-type-DR8uzZTA.mjs +0 -274
- package/dist/kysely-type-DR8uzZTA.mjs.map +0 -1
- package/dist/logger-CxF-Ex5d.mjs +0 -220
- package/dist/logger-CxF-Ex5d.mjs.map +0 -1
- package/dist/mock-BjFj5o1I.mjs +0 -804
- package/dist/mock-BjFj5o1I.mjs.map +0 -1
- package/dist/registry-DdsYlL_P.mjs.map +0 -1
- package/dist/rolldown-runtime-DXywRVcq.mjs +0 -20
- package/dist/runtime-n9NCkjee.mjs.map +0 -1
- package/dist/schema-BhkpP5Hw.mjs.map +0 -1
- package/dist/secretmanager-B3n4KHfm.d.mts +0 -55
- package/dist/secretmanager-BVxw3ih_.mjs +0 -24
- package/dist/secretmanager-BVxw3ih_.mjs.map +0 -1
- package/dist/seed-jf3008-h.mjs +0 -1160
- package/dist/seed-jf3008-h.mjs.map +0 -1
- package/dist/service-CCL8ruDf.mjs +0 -459
- package/dist/service-CCL8ruDf.mjs.map +0 -1
- package/dist/service-D6yonf2I.mjs +0 -3
- package/dist/telemetry-CdqJEzkj.mjs.map +0 -1
- package/dist/telemetry-ClwW5ohF.mjs +0 -3
- package/dist/test-env-key-D9kM6ETE.mjs +0 -49
- package/dist/test-env-key-D9kM6ETE.mjs.map +0 -1
- package/dist/types-B2RpYyA_.mjs +0 -371
- package/dist/types-B2RpYyA_.mjs.map +0 -1
- package/dist/types-ClhIrW_C.mjs +0 -4
- package/dist/types-DCUhgpyI.d.mts +0 -784
- package/dist/types-DhO_VEZd.d.mts +0 -574
- package/dist/types-DwDgacni.d.mts +0 -338
- package/dist/workflow-BbKvGLQg.d.mts +0 -96
- package/dist/workflow-DgemCAz3.mjs +0 -38
- package/dist/workflow-DgemCAz3.mjs.map +0 -1
- package/dist/workflow.generated-DtQwEo-x.d.mts +0 -671
package/docs/configuration.md
CHANGED
|
@@ -27,7 +27,7 @@ export default defineConfig({
|
|
|
27
27
|
cors: ["https://example.com"],
|
|
28
28
|
allowedIpAddresses: ["192.168.1.0/24"],
|
|
29
29
|
disableIntrospection: false,
|
|
30
|
-
logLevel: process.env.
|
|
30
|
+
logLevel: process.env.TAILOR_APP_LOG_LEVEL ?? "DEBUG",
|
|
31
31
|
});
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -41,16 +41,18 @@ export default defineConfig({
|
|
|
41
41
|
|
|
42
42
|
**Disable Introspection**: Disable GraphQL introspection. Default is `false`.
|
|
43
43
|
|
|
44
|
-
**Log Level**: Controls which `console.*` calls are kept when deployment functions are bundled. Supported values are `"DEBUG"`, `"INFO"`, `"WARN"`, `"ERROR"`, and `"SILENT"`. The default is `"DEBUG"` and keeps all
|
|
44
|
+
**Log Level**: Controls which `console.*` and `logger.*` (from `@tailor-platform/sdk/runtime`) calls are kept when deployment functions are bundled. Supported values are `"DEBUG"`, `"INFO"`, `"WARN"`, `"ERROR"`, and `"SILENT"`. The default is `"DEBUG"` and keeps all calls. `console.log` is treated as a DEBUG-level call (matching the platform's OpenTelemetry severity mapping), so it is dropped at `"INFO"` and above, alongside `console.debug` and `logger.debug`. `logger.setAttributes` has no severity and is never dropped, regardless of `logLevel`. For production deployments, use `"WARN"` to keep warn/error calls while dropping debug, log, and info calls:
|
|
45
45
|
|
|
46
46
|
```typescript
|
|
47
47
|
export default defineConfig({
|
|
48
48
|
name: "my-app",
|
|
49
|
-
logLevel: process.env.
|
|
49
|
+
logLevel: process.env.TAILOR_APP_LOG_LEVEL ?? "DEBUG",
|
|
50
50
|
});
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
This is a bundle-time setting. Changing `
|
|
53
|
+
This is a bundle-time setting. Changing `TAILOR_APP_LOG_LEVEL` affects newly bundled deployments; already deployed functions must be redeployed.
|
|
54
|
+
|
|
55
|
+
Only `logger.*` calls made through the SDK's `logger` wrapper (from `@tailor-platform/sdk/runtime` or its `@tailor-platform/sdk/runtime/logger` subpath), or written as `globalThis.tailor.logger.*`, are covered. Other equivalent forms — such as the bare `tailor.logger.*` global or `self.tailor.logger.*` — are not affected by `logLevel`.
|
|
54
56
|
|
|
55
57
|
### Service Configuration
|
|
56
58
|
|
|
@@ -82,6 +84,23 @@ export default defineConfig({
|
|
|
82
84
|
|
|
83
85
|
**ignores**: Glob patterns to exclude files. Optional. By default, `**/*.test.ts` and `**/*.spec.ts` are automatically ignored. If you explicitly specify `ignores`, the default patterns will not be applied. Use `ignores: []` to include all files including test files.
|
|
84
86
|
|
|
87
|
+
**Pattern resolution**: `files` and `ignores` patterns are resolved relative to the directory of the `tailor.config.ts` file that declares them, not the directory you run the command from. This matters when deploying [multiple configs](./cli/application.md#deploy) together — each config's patterns only match files under its own directory. If a config's _relative_ patterns match nothing under its own directory, the SDK falls back to resolving them from the directory you ran the command from and logs a warning (this fallback doesn't apply to already-absolute patterns, since their resolution can't change). Update such patterns to be relative to the config's own directory — this fallback will be removed in v2.
|
|
88
|
+
|
|
89
|
+
### Bundling
|
|
90
|
+
|
|
91
|
+
Resolvers, executors, workflow jobs, auth hooks, HTTP adapters, TailorDB hooks and validators, functions, seeds, queries, and migration scripts are all bundled before running locally or deploying. Bundling honors `compilerOptions.paths` aliases declared in a `tsconfig.json`, resolved against the importing file's own nearest `tsconfig.json` (the first one found walking up from that file's directory, following its `extends` chain) — so a path alias works the same whether it is imported directly or through another aliased import.
|
|
92
|
+
|
|
93
|
+
An import that cannot be resolved fails the command instead of shipping a broken bundle, naming the specifier, the importing file, and the tsconfig the build used:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
Error [UNRESOLVED_IMPORT]: Could not resolve "@lib/missing" imported from "/path/to/resolver.ts".
|
|
97
|
+
Suggestion: Check that each import path is correct, and that a `compilerOptions.paths`
|
|
98
|
+
entry covering it is declared in the importing file's own tsconfig.json or an ancestor.
|
|
99
|
+
The build used "/path/to/tsconfig.json".
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If the unresolved specifier is a Node.js built-in (e.g. `fs`, `crypto`, `path`), the suggestion explains that it is not available in the Tailor Platform runtime and, where one exists, names a Web-standard replacement (e.g. the Fetch API instead of `http`/`https`).
|
|
103
|
+
|
|
85
104
|
### External Resources
|
|
86
105
|
|
|
87
106
|
You can reference resources managed by Terraform or other SDK projects to include them in your application's subgraph. External resources are not deployed by this project but can be used for shared access across multiple applications.
|
|
@@ -108,7 +127,8 @@ When using external resources:
|
|
|
108
127
|
- The resource must be deployed and available before referencing it
|
|
109
128
|
- You can combine external resources with locally-defined resources
|
|
110
129
|
- TailorDB type names must remain unique across local and external TailorDB namespaces; `deploy` checks external TailorDB type names before applying changes
|
|
111
|
-
- Destructive operations like `tailordb truncate` (and `
|
|
130
|
+
- Destructive operations like `tailordb truncate` (and `tailor seed apply --truncate`) automatically exclude external resources to prevent accidental data loss in shared resources
|
|
131
|
+
- Subscribing an executor to an external resource's events requires the config that owns the resource in the same `deploy`. Publishing is then enabled automatically, and `deploy` records the dependency so a later deploy without that config asks for confirmation instead of silently turning publishing off
|
|
112
132
|
|
|
113
133
|
### Built-in IdP
|
|
114
134
|
|
|
@@ -118,8 +138,14 @@ Configure the Built-in IdP service using `defineIdp()`. See [IdP](./services/idp
|
|
|
118
138
|
import { defineIdp } from "@tailor-platform/sdk";
|
|
119
139
|
|
|
120
140
|
const idp = defineIdp("my-idp", {
|
|
121
|
-
authorization: "loggedIn",
|
|
122
141
|
clients: ["my-client"],
|
|
142
|
+
permission: {
|
|
143
|
+
create: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
144
|
+
read: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
145
|
+
update: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
146
|
+
delete: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
147
|
+
sendPasswordResetEmail: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
148
|
+
},
|
|
123
149
|
});
|
|
124
150
|
|
|
125
151
|
export default defineConfig({
|
|
@@ -263,6 +289,40 @@ export async function main(trx: Transaction, { env }: MigrationContext): Promise
|
|
|
263
289
|
}
|
|
264
290
|
```
|
|
265
291
|
|
|
292
|
+
#### Secret Detection
|
|
293
|
+
|
|
294
|
+
`env` values are deployed as plaintext, so loading a config fails when one of them looks like a credential:
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
✖ Secret detected in 'env' in /path/to/tailor.config.ts:
|
|
298
|
+
- env.SLACK_BOT_TOKEN (matched slack: SLACK_TOKEN)
|
|
299
|
+
https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-slack/README.md#SLACK_TOKEN
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Each finding names the pattern that matched and links to its description, so a value flagged as an AWS account id is distinguishable from one flagged as an AWS secret access key.
|
|
303
|
+
|
|
304
|
+
Move the value to [Secret Manager](./services/secret.md) to fix this. Detection recognizes the credential formats published by common providers, such as Slack, GitHub and AWS.
|
|
305
|
+
|
|
306
|
+
A value that is merely long and random-looking, with no recognizable provider format, is reported as a warning instead and does not fail the command.
|
|
307
|
+
|
|
308
|
+
When detection is wrong about a value, allow it in place with `allowSecretReason`, stating why the value is safe to deploy as plaintext:
|
|
309
|
+
|
|
310
|
+
```typescript
|
|
311
|
+
export default defineConfig({
|
|
312
|
+
name: "my-app",
|
|
313
|
+
env: {
|
|
314
|
+
slackRelayUrl: {
|
|
315
|
+
value: process.env.SLACK_RELAY_URL ?? "",
|
|
316
|
+
allowSecretReason: "Public relay endpoint; the token it proxies stays in Secret Manager.",
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
});
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
This silences both the failure and the warning, so it also covers a value that is random-looking without being a credential — say so in the reason. Only string and number values accept an allowance: a boolean is never flagged, so it never needs one.
|
|
323
|
+
|
|
324
|
+
Application code still reads `env.slackRelayUrl` as the value itself: the wrapper only carries the reason and does not reach the deployed application.
|
|
325
|
+
|
|
266
326
|
### Workflow Service
|
|
267
327
|
|
|
268
328
|
Configure Workflow service by specifying glob patterns for workflow files:
|
|
@@ -280,6 +340,30 @@ export default defineConfig({
|
|
|
280
340
|
|
|
281
341
|
**ignores**: Glob patterns to exclude files. Optional.
|
|
282
342
|
|
|
343
|
+
### Workflow Execution Policies
|
|
344
|
+
|
|
345
|
+
Register workspace-scoped execution policies that workflow job functions reference at runtime for per-key concurrency control. See [Execution Policies](./services/workflow.md#execution-policies) in the Workflow guide for the declaration API.
|
|
346
|
+
|
|
347
|
+
```typescript
|
|
348
|
+
import { defineWorkflowExecutionPolicies } from "@tailor-platform/sdk";
|
|
349
|
+
|
|
350
|
+
const executionPolicies = defineWorkflowExecutionPolicies((define) => ({
|
|
351
|
+
premium: define({ concurrencyPolicy: { maxConcurrentExecutions: 5 } }),
|
|
352
|
+
tenantApi: define({
|
|
353
|
+
name: "tenant-api",
|
|
354
|
+
matchType: "prefix",
|
|
355
|
+
concurrencyPolicy: { maxConcurrentExecutions: 3 },
|
|
356
|
+
}),
|
|
357
|
+
}));
|
|
358
|
+
|
|
359
|
+
export default defineConfig({
|
|
360
|
+
workflow: {
|
|
361
|
+
files: ["workflows/**/*.ts"],
|
|
362
|
+
executionPolicies,
|
|
363
|
+
},
|
|
364
|
+
});
|
|
365
|
+
```
|
|
366
|
+
|
|
283
367
|
### Plugins
|
|
284
368
|
|
|
285
369
|
Configure plugins using `definePlugins()`. Plugins must be exported as a named export.
|
package/docs/github-actions.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# GitHub Actions Integration
|
|
2
2
|
|
|
3
|
-
`tailor
|
|
3
|
+
`tailor setup` generates a GitHub Actions workflow that deploys your
|
|
4
4
|
Tailor Platform application automatically on push or tag.
|
|
5
5
|
|
|
6
6
|
> **Beta:** This command is under active development. CLI flags, the generated
|
|
7
|
-
> workflow, and the `.github/tailor
|
|
7
|
+
> workflow, and the `.github/tailor.lock` schema may change before general
|
|
8
8
|
> availability.
|
|
9
9
|
|
|
10
10
|
## Quick start
|
|
@@ -14,13 +14,16 @@ lives):
|
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
# Branch target: deploy to stg on every push to main
|
|
17
|
-
tailor
|
|
17
|
+
tailor setup -n my-app-stg
|
|
18
18
|
|
|
19
19
|
# Tag target: deploy to production when a tag is pushed, with an approval gate
|
|
20
|
-
tailor
|
|
20
|
+
tailor setup -n my-app-prod \
|
|
21
21
|
--tag --branch main --environment production
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
`setup` defaults to the GitHub provider; `--provider github` (`-p github`) is
|
|
25
|
+
accepted but optional, and other providers are not yet supported.
|
|
26
|
+
|
|
24
27
|
After running the command, follow the **Next steps** printed to the terminal to
|
|
25
28
|
set the required secrets, set the `TAILOR_PLATFORM_WORKSPACE_ID` variable, and
|
|
26
29
|
commit the generated files.
|
|
@@ -33,7 +36,7 @@ before the first deploy (see [Targeting a workspace](#targeting-a-workspace)).
|
|
|
33
36
|
## Targets
|
|
34
37
|
|
|
35
38
|
A _target_ is one workflow file that handles one deployment destination.
|
|
36
|
-
Run `setup
|
|
39
|
+
Run `setup` once per target.
|
|
37
40
|
|
|
38
41
|
### Branch target (recommended for staging)
|
|
39
42
|
|
|
@@ -41,9 +44,9 @@ The branch target fires on pull requests and pushes to the branch you specify
|
|
|
41
44
|
(defaulting to the repository's default branch when `--branch` is omitted):
|
|
42
45
|
|
|
43
46
|
```bash
|
|
44
|
-
tailor
|
|
47
|
+
tailor setup -n my-app-stg
|
|
45
48
|
# Equivalent to:
|
|
46
|
-
tailor
|
|
49
|
+
tailor setup -n my-app-stg --branch main
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
What it does:
|
|
@@ -60,13 +63,48 @@ What it does:
|
|
|
60
63
|
Fork pull requests cannot read repository secrets. For forks, the plan step is
|
|
61
64
|
automatically skipped; `generate-check` and other non-secret checks still run.
|
|
62
65
|
|
|
66
|
+
#### ERD preview artifacts
|
|
67
|
+
|
|
68
|
+
Pass `--erd-preview` on a branch target to add TailorDB ERD preview artifacts
|
|
69
|
+
to pull requests:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
tailor setup -n my-app-stg --erd-preview
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The generated workflow runs `tailor tailordb erd`, which is provided by the
|
|
76
|
+
`@tailor-platform/sdk-plugin-tailordb-erd` CLI plugin — install it as a
|
|
77
|
+
dev-dependency in your project:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm install -D @tailor-platform/sdk-plugin-tailordb-erd@next
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The generated workflow builds one self-contained ERD viewer HTML file for each
|
|
84
|
+
owned TailorDB namespace in `tailor.config.ts`. The viewer compares the pull
|
|
85
|
+
request merge result with the base branch, can switch between the current schema
|
|
86
|
+
and highlighted diff, uploads the HTML files as unarchived Actions artifacts,
|
|
87
|
+
and upserts a PR comment with artifact links.
|
|
88
|
+
|
|
89
|
+
ERD preview does not use Tailor Platform credentials. Fork pull requests still
|
|
90
|
+
build artifacts, but the comment step is skipped because fork tokens cannot
|
|
91
|
+
write PR comments.
|
|
92
|
+
|
|
93
|
+
`--erd-preview` is only available for branch targets with the plan job enabled;
|
|
94
|
+
it cannot be combined with `--tag` or `--no-plan`. The namespace list is
|
|
95
|
+
recorded in `.github/tailor.lock`; the pull request workflow compares the
|
|
96
|
+
head and base lock files so newly added or removed namespaces can still produce
|
|
97
|
+
all-added or all-removed viewer artifacts. Re-run `setup` after adding or
|
|
98
|
+
removing TailorDB namespaces. `setup check` reports drift when the recorded ERD
|
|
99
|
+
preview namespaces no longer match the current config.
|
|
100
|
+
|
|
63
101
|
### Tag target (recommended for production)
|
|
64
102
|
|
|
65
103
|
The tag target fires when a tag matching `--tag-pattern` (default `v*`) is
|
|
66
104
|
pushed:
|
|
67
105
|
|
|
68
106
|
```bash
|
|
69
|
-
tailor
|
|
107
|
+
tailor setup -n my-app-prod \
|
|
70
108
|
--tag --tag-pattern "v*" --branch main --environment production
|
|
71
109
|
```
|
|
72
110
|
|
|
@@ -115,7 +153,7 @@ Because the variable is scoped to a GitHub Environment, both the `plan` and
|
|
|
115
153
|
this is a manual step:
|
|
116
154
|
|
|
117
155
|
```bash
|
|
118
|
-
tailor
|
|
156
|
+
tailor workspace create # copy the printed workspace id
|
|
119
157
|
```
|
|
120
158
|
|
|
121
159
|
2. Set the id as the Environment variable (the environment name is your
|
|
@@ -136,7 +174,7 @@ environment is planned.)
|
|
|
136
174
|
|
|
137
175
|
## Generated files
|
|
138
176
|
|
|
139
|
-
Running `setup
|
|
177
|
+
Running `setup` creates or updates:
|
|
140
178
|
|
|
141
179
|
### `.github/workflows/tailor-<workspace-name>.yml`
|
|
142
180
|
|
|
@@ -148,17 +186,17 @@ edit or rename them — the SDK tracks them by id.
|
|
|
148
186
|
|
|
149
187
|
You can add your own jobs and steps around the managed ones. To add
|
|
150
188
|
project-specific setup (such as private registry authentication or a system
|
|
151
|
-
dependency), add a step _before_ the managed setup
|
|
152
|
-
extras (such as `playwright install`), add a step _after_
|
|
189
|
+
dependency), add a step _before_ the managed `tailor-setup` step. For
|
|
190
|
+
post-install extras (such as `playwright install`), add a step _after_ it.
|
|
153
191
|
|
|
154
|
-
Note that re-running `setup
|
|
192
|
+
Note that re-running `setup` currently regenerates the whole file: if
|
|
155
193
|
the file differs from what the SDK last wrote — whether you edited a managed
|
|
156
194
|
step or added your own — the command stops and reports the conflict. Pass
|
|
157
195
|
`--force` to discard your edits and regenerate from the current template, then
|
|
158
196
|
re-apply your own steps. (Preserving user-added steps across regeneration is
|
|
159
197
|
planned.)
|
|
160
198
|
|
|
161
|
-
### `.github/tailor
|
|
199
|
+
### `.github/tailor.lock`
|
|
162
200
|
|
|
163
201
|
A machine-owned JSON file that tracks which files the SDK manages, the inputs
|
|
164
202
|
they were generated from, and their content hashes. **Commit this file. Never
|
|
@@ -167,15 +205,15 @@ detect hand edits.
|
|
|
167
205
|
|
|
168
206
|
### `tailor.config.ts` (id injection)
|
|
169
207
|
|
|
170
|
-
If your config does not already have an `id` field, `setup
|
|
171
|
-
This `id` must be committed alongside the workflow file. In CI, `tailor
|
|
208
|
+
If your config does not already have an `id` field, `setup` injects one.
|
|
209
|
+
This `id` must be committed alongside the workflow file. In CI, `tailor
|
|
172
210
|
deploy` refuses to inject a new id — if the id were assigned fresh on each CI
|
|
173
211
|
run, every deploy would create a brand-new application and lose ownership of
|
|
174
212
|
previously deployed resources.
|
|
175
213
|
|
|
176
214
|
If your pipeline intentionally deploys a fresh, throwaway application on every
|
|
177
215
|
run (for example an end-to-end test harness that creates and deletes its own
|
|
178
|
-
workspace), set `
|
|
216
|
+
workspace), set `TAILOR_CI_ALLOW_ID_INJECTION=true` to opt back
|
|
179
217
|
into automatic id injection for that pipeline.
|
|
180
218
|
|
|
181
219
|
## Secrets
|
|
@@ -238,7 +276,7 @@ you can deploy any commit regardless of branch membership.
|
|
|
238
276
|
For a monorepo where your SDK app lives in a subdirectory, pass `--dir`:
|
|
239
277
|
|
|
240
278
|
```bash
|
|
241
|
-
tailor
|
|
279
|
+
tailor setup -n my-app --dir apps/backend
|
|
242
280
|
```
|
|
243
281
|
|
|
244
282
|
The generated workflow adds a `paths` filter on `apps/backend/**` so the
|
|
@@ -247,7 +285,7 @@ SDK commands is set accordingly.
|
|
|
247
285
|
|
|
248
286
|
## Rollback
|
|
249
287
|
|
|
250
|
-
`tailor
|
|
288
|
+
`tailor deploy` is declarative: redeploying a past configuration returns
|
|
251
289
|
the platform to that state. The recommended rollback approaches are:
|
|
252
290
|
|
|
253
291
|
### Option 1 — Revert the commit (branch target)
|
|
@@ -303,10 +341,10 @@ A typical setup with staging and production:
|
|
|
303
341
|
|
|
304
342
|
```bash
|
|
305
343
|
# Staging: main → stg (deploy on every push to main)
|
|
306
|
-
tailor
|
|
344
|
+
tailor setup -n my-app-stg
|
|
307
345
|
|
|
308
346
|
# Production: tagged commits → prod, with approval gate and branch guard
|
|
309
|
-
tailor
|
|
347
|
+
tailor setup -n my-app-prod \
|
|
310
348
|
--tag --branch main --environment production
|
|
311
349
|
```
|
|
312
350
|
|
|
@@ -324,14 +362,24 @@ gh secret set TAILOR_PLATFORM_MACHINE_USER_CLIENT_ID --env production
|
|
|
324
362
|
gh secret set TAILOR_PLATFORM_MACHINE_USER_CLIENT_SECRET --env production
|
|
325
363
|
```
|
|
326
364
|
|
|
327
|
-
Commit both workflow files and `.github/tailor
|
|
365
|
+
Commit both workflow files and `.github/tailor.lock`.
|
|
366
|
+
|
|
367
|
+
## Checking for drift
|
|
368
|
+
|
|
369
|
+
`tailor setup check` audits the workflows recorded in
|
|
370
|
+
`.github/tailor.lock` against your current config and repository, without
|
|
371
|
+
writing anything. It reports when a workflow file is missing or hand-edited, a
|
|
372
|
+
newer template is available, `tailor.config.ts` is no longer under the recorded
|
|
373
|
+
`--dir`, or the repository default branch no longer matches a branch target's
|
|
374
|
+
trigger. It exits non-zero when it finds drift, so you can run it in CI. Each
|
|
375
|
+
finding names a stable rule key for future suppression.
|
|
328
376
|
|
|
329
377
|
## Updating the generated workflow
|
|
330
378
|
|
|
331
|
-
When you upgrade the SDK, re-run `setup
|
|
379
|
+
When you upgrade the SDK, re-run `setup` with the same flags to pick up
|
|
332
380
|
template improvements. If the SDK detects that you have hand-edited a managed
|
|
333
381
|
section, it stops and asks you to use `--force` to overwrite your edits, or to
|
|
334
382
|
move your customizations into your own steps before regenerating.
|
|
335
383
|
|
|
336
|
-
The `.github/tailor
|
|
384
|
+
The `.github/tailor.lock` file records the flags used at generation time,
|
|
337
385
|
so you can check what arguments were used previously.
|