@tailor-platform/sdk 2.0.0-next.0 → 2.0.0-next.10
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 +972 -0
- 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-DArFTTJ9.mjs +3 -0
- package/dist/{application-76hhIhnJ.mjs → application-miwiXtB4.mjs} +1963 -1953
- package/dist/application-miwiXtB4.mjs.map +1 -0
- package/dist/{assert-CKfwrmCV.mjs → assert-DBxo8jPo.mjs} +1 -2
- package/dist/{assert-CKfwrmCV.mjs.map → assert-DBxo8jPo.mjs.map} +1 -1
- package/dist/authconnection-CZvi9ANm.mjs +9 -0
- package/dist/authconnection-CZvi9ANm.mjs.map +1 -0
- package/dist/{brand-DlnJ375c.mjs → brand-Eo4pLXPJ.mjs} +1 -2
- package/dist/brand-Eo4pLXPJ.mjs.map +1 -0
- 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 +34 -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 +7 -0
- package/dist/cli/commands/deploy/idp.d.mts +5 -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 +9 -0
- package/dist/cli/commands/deploy/types.d.mts +3 -0
- package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +3 -0
- package/dist/cli/commands/deploy/workflow.d.mts +4 -0
- package/dist/cli/commands/executor/get.d.mts +28 -0
- package/dist/cli/commands/executor/jobs.d.mts +122 -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 +40 -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 +26 -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/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 +74 -0
- package/dist/cli/commands/workflow/get.d.mts +30 -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 +60 -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 -5534
- package/dist/cli/lib.d.mts +90 -21180
- package/dist/cli/lib.mjs +157 -16
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.d.mts +23 -0
- package/dist/cli/main.mjs +6583 -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 +3 -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 +2 -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 +1273 -0
- package/dist/cli/shared/config-loader.d.mts +25 -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/type-generator.d.mts +19 -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 +4223 -0
- package/dist/configure/config/index.d.mts +20 -0
- package/dist/configure/config/types.d.mts +111 -0
- package/dist/configure/index.d.mts +135 -7
- package/dist/configure/index.mjs +409 -56
- 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 +271 -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 +4 -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 +83 -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 +56 -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-s0lxhu8_.mjs → context-DYQVYWqZ.mjs} +4 -6
- package/dist/context-DYQVYWqZ.mjs.map +1 -0
- package/dist/{crashreport-BhD0y14F.mjs → crashreport-B5LqCTfF.mjs} +25 -17
- package/dist/{crashreport-BhD0y14F.mjs.map → crashreport-B5LqCTfF.mjs.map} +1 -1
- package/dist/{crashreport-D1wKBJ8N.mjs → crashreport-eI7ty7ok.mjs} +1 -2
- package/dist/{enum-constants-C7DaWeQo.mjs → enum-constants-j9QBF0cB.mjs} +1 -2
- package/dist/enum-constants-j9QBF0cB.mjs.map +1 -0
- package/dist/{errors-EsY4XO6O.mjs → errors-D7583Zz7.mjs} +18 -3
- package/dist/errors-D7583Zz7.mjs.map +1 -0
- package/dist/{file-B58Dm-2P.mjs → file-BUcmVIH2.mjs} +12 -23
- package/dist/file-BUcmVIH2.mjs.map +1 -0
- package/dist/{file-utils-BHPxPXmn.mjs → file-utils-yEiIS4nJ.mjs} +7 -8
- package/dist/file-utils-yEiIS4nJ.mjs.map +1 -0
- package/dist/{globals-ByrCoDip.mjs → globals-DQotNuwK.mjs} +32 -6
- package/dist/globals-DQotNuwK.mjs.map +1 -0
- package/dist/iconv-QWaZh0TT.mjs +38 -0
- package/dist/iconv-QWaZh0TT.mjs.map +1 -0
- package/dist/{idp-Ch95ag8h.mjs → idp-RA_swu-h.mjs} +12 -6
- package/dist/idp-RA_swu-h.mjs.map +1 -0
- package/dist/{interceptor-DOqRkCya.mjs → interceptor-e33JtsC-.mjs} +2 -3
- package/dist/interceptor-e33JtsC-.mjs.map +1 -0
- package/dist/kysely/index.d.mts +5 -7
- package/dist/kysely/index.mjs +0 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-DqIRgDYR.mjs} +6 -6
- package/dist/kysely-type-DqIRgDYR.mjs.map +1 -0
- 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/{multiline-Cf9ODpr1.mjs → multiline-sfHpTZZK.mjs} +1 -2
- package/dist/{multiline-Cf9ODpr1.mjs.map → multiline-sfHpTZZK.mjs.map} +1 -1
- package/dist/{package-json-DcQApfPQ.mjs → package-json-8b0O9TlX.mjs} +1 -2
- package/dist/{package-json-DcQApfPQ.mjs.map → package-json-8b0O9TlX.mjs.map} +1 -1
- package/dist/package-json-Cv2Z-TqQ.mjs +3 -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 +1 -2
- package/dist/plugin/builtin/file-utils/index.d.mts +15 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -2
- package/dist/plugin/builtin/kysely-type/index.d.mts +15 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
- package/dist/plugin/builtin/seed/index.d.mts +46 -2
- package/dist/plugin/builtin/seed/index.mjs +1 -2
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +19 -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 -119
- package/dist/plugin/index.mjs +1 -2
- 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-C7qTBDD2.mjs → register-ts-hook-BAHMwxfG.mjs} +12374 -8672
- package/dist/register-ts-hook-BAHMwxfG.mjs.map +1 -0
- package/dist/registry-BIGVUrMB.mjs +54 -0
- package/dist/registry-BIGVUrMB.mjs.map +1 -0
- package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-BCozyiNq.mjs} +7 -7
- package/dist/{repl-editor-CJG3sz7A.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 -3
- package/dist/runtime/context.d.mts +54 -2
- package/dist/runtime/context.mjs +2 -3
- package/dist/runtime/field-parse.d.mts +10 -0
- package/dist/runtime/file.d.mts +170 -2
- package/dist/runtime/file.mjs +2 -3
- package/dist/runtime/globals.d.mts +38 -53
- package/dist/runtime/globals.mjs +0 -1
- package/dist/runtime/iconv.d.mts +73 -2
- package/dist/runtime/iconv.mjs +2 -3
- package/dist/runtime/idp.d.mts +129 -2
- package/dist/runtime/idp.mjs +2 -3
- package/dist/runtime/index.d.mts +48 -9
- package/dist/runtime/index.mjs +10 -9
- 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 -3
- package/dist/runtime/types.d.mts +25 -0
- package/dist/runtime/workflow.d.mts +124 -2
- package/dist/runtime/workflow.mjs +2 -3
- package/dist/{schema-1msIhXwA.mjs → schema--xYWRGfe.mjs} +289 -231
- package/dist/schema--xYWRGfe.mjs.map +1 -0
- package/dist/{secret-file-CWzF8rry.mjs → secret-file-C3J4Gy8r.mjs} +2 -3
- package/dist/{secret-file-CWzF8rry.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/index.mjs +0 -1
- package/dist/seed/index.mjs.map +1 -1
- package/dist/seed-LUVr7jHL.mjs +444 -0
- package/dist/seed-LUVr7jHL.mjs.map +1 -0
- package/dist/{service-DMohAx8a2.mjs → service-B5WynBHQ.mjs} +3 -4
- package/dist/service-B5WynBHQ.mjs.map +1 -0
- package/dist/service-BNtPsK9Q.mjs +837 -0
- package/dist/service-BNtPsK9Q.mjs.map +1 -0
- package/dist/service-D5jn05ZI.mjs +3 -0
- package/dist/service_pb-BwZRiNug.mjs +167 -0
- package/dist/service_pb-BwZRiNug.mjs.map +1 -0
- package/dist/service_pb-wRkxUta6.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 +315 -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 +563 -0
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +144 -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 +3575 -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 +182 -0
- package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +861 -0
- package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +309 -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-BQbbVo2t.mjs → telemetry-BRVdwh14.mjs} +4 -5
- 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/type-source-DH_LH20p.mjs +13 -0
- package/dist/type-source-DH_LH20p.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 +209 -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 +6 -99
- package/dist/utils/test/index.mjs +60 -40
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/utils/test/mock.d.mts +86 -0
- package/dist/vitest/environment.d.mts +1 -2
- package/dist/vitest/environment.mjs +2 -3
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.d.mts +15 -392
- package/dist/vitest/index.mjs +1347 -9
- 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 +157 -0
- package/dist/vitest/setup.d.mts +1 -2
- package/dist/vitest/setup.mjs +2 -3
- package/dist/vitest/setup.mjs.map +1 -1
- package/dist/vitest/workflow-local.d.mts +41 -0
- package/dist/workflow-CsaQ9qK-.mjs +42 -0
- package/dist/workflow-CsaQ9qK-.mjs.map +1 -0
- package/dist/{client-CobIRHl-.mjs → workspace_resource_pb-UGK1SSn_.mjs} +55 -616
- package/dist/workspace_resource_pb-UGK1SSn_.mjs.map +1 -0
- package/docs/cli/application.md +150 -252
- package/docs/cli/auth.md +51 -295
- package/docs/cli/completion.md +4 -25
- package/docs/cli/crashreport.md +3 -63
- package/docs/cli/executor.md +72 -183
- package/docs/cli/function.md +17 -133
- 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 +71 -427
- 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 +213 -96
- package/docs/configuration.md +40 -8
- package/docs/github-actions.md +72 -24
- package/docs/migration/v2.md +1316 -0
- package/docs/multi-environment.md +29 -7
- package/docs/plugin/custom.md +6 -6
- package/docs/plugin/index.md +9 -9
- package/docs/quickstart.md +8 -7
- package/docs/runtime.md +21 -12
- package/docs/services/aigateway.md +115 -0
- package/docs/services/auth.md +70 -61
- package/docs/services/executor.md +8 -5
- package/docs/services/http-adapter.md +16 -1
- package/docs/services/idp.md +55 -2
- package/docs/services/resolver.md +63 -11
- package/docs/services/secret.md +11 -11
- package/docs/services/staticwebsite.md +8 -2
- package/docs/services/tailordb-migration.md +43 -28
- package/docs/services/tailordb.md +200 -99
- package/docs/services/workflow.md +135 -59
- package/docs/testing.md +253 -145
- package/package.json +61 -47
- package/postinstall.mjs +4 -6
- package/dist/actor-J2gJ0eK5.d.mts +0 -24
- package/dist/application-76hhIhnJ.mjs.map +0 -1
- package/dist/application-av2raLs6.mjs +0 -4
- package/dist/authconnection-BIYzEh2p.d.mts +0 -39
- package/dist/authconnection-D8SJGMpj.mjs +0 -16
- package/dist/authconnection-D8SJGMpj.mjs.map +0 -1
- package/dist/brand-DlnJ375c.mjs.map +0 -1
- package/dist/chunk-BkoGK1jX.mjs +0 -21
- 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/cli/skills.d.mts +0 -1
- package/dist/cli/skills.mjs +0 -22
- package/dist/cli/skills.mjs.map +0 -1
- package/dist/client-C68VWo4g.mjs +0 -4
- package/dist/client-CobIRHl-.mjs.map +0 -1
- package/dist/context-CUBwSBq4.d.mts +0 -68
- package/dist/context-s0lxhu8_.mjs.map +0 -1
- package/dist/enum-constants-C7DaWeQo.mjs.map +0 -1
- package/dist/env-B-g-qgE4.d.mts +0 -7
- package/dist/errors-EsY4XO6O.mjs.map +0 -1
- package/dist/field-C4zdJLW5.mjs +0 -23
- package/dist/field-C4zdJLW5.mjs.map +0 -1
- package/dist/file-B58Dm-2P.mjs.map +0 -1
- package/dist/file-BzK8z3X-.d.mts +0 -250
- package/dist/file-utils-BHPxPXmn.mjs.map +0 -1
- package/dist/globals-ByrCoDip.mjs.map +0 -1
- package/dist/iconv-DreIffeM.mjs +0 -64
- package/dist/iconv-DreIffeM.mjs.map +0 -1
- package/dist/iconv-kwrmd1U_.d.mts +0 -122
- package/dist/idp-BlBPtXJ-.d.mts +0 -160
- package/dist/idp-Ch95ag8h.mjs.map +0 -1
- package/dist/index-CLxubakC.d.mts +0 -1225
- package/dist/index-CPRnOjjt.d.mts +0 -18
- package/dist/index-CQZVJ5SX.d.mts +0 -18
- package/dist/index-CfRFkXIO.d.mts +0 -47
- package/dist/index-DRhMpdnA.d.mts +0 -46
- package/dist/index-DUupuPhZ.d.mts +0 -18
- package/dist/interceptor-DOqRkCya.mjs.map +0 -1
- package/dist/job-BpsFXPbi.mjs +0 -54
- package/dist/job-BpsFXPbi.mjs.map +0 -1
- package/dist/kysely-type-D1e0Vwkd.mjs.map +0 -1
- package/dist/logger-DpJyJvNz.mjs +0 -221
- package/dist/logger-DpJyJvNz.mjs.map +0 -1
- package/dist/mock-DMgIygjE.mjs +0 -806
- package/dist/mock-DMgIygjE.mjs.map +0 -1
- package/dist/package-json-wzO6nV9O.mjs +0 -4
- package/dist/plugin-C_FyVSdl.d.mts +0 -634
- package/dist/registry-D0uB0OrK.mjs +0 -178
- package/dist/registry-D0uB0OrK.mjs.map +0 -1
- package/dist/runtime-C7qTBDD2.mjs.map +0 -1
- package/dist/schema-1msIhXwA.mjs.map +0 -1
- package/dist/secretmanager-B9h-U_8U.mjs +0 -25
- package/dist/secretmanager-B9h-U_8U.mjs.map +0 -1
- package/dist/secretmanager-CKLB3wAQ.d.mts +0 -55
- package/dist/seed-BH2FbrPV.mjs +0 -1171
- package/dist/seed-BH2FbrPV.mjs.map +0 -1
- package/dist/service-BHQIerYh.mjs +0 -4
- package/dist/service-DMohAx8a2.mjs.map +0 -1
- package/dist/service-wI3Hvrgx.mjs +0 -460
- package/dist/service-wI3Hvrgx.mjs.map +0 -1
- package/dist/tailordb-BlBGmQK-.d.mts +0 -863
- package/dist/telemetry-BQbbVo2t.mjs.map +0 -1
- package/dist/telemetry-w92bvGdC.mjs +0 -4
- package/dist/types-2Be3wSMc.mjs +0 -5
- package/dist/types-CmzfQP_m.mjs +0 -372
- package/dist/types-CmzfQP_m.mjs.map +0 -1
- package/dist/workflow--aPbA8Uq.mjs +0 -39
- package/dist/workflow--aPbA8Uq.mjs.map +0 -1
- package/dist/workflow-CMamswkK.d.mts +0 -96
- package/dist/workflow.generated-Bf1tWylx.d.mts +0 -1416
- package/docs/generator/builtin.md +0 -257
- package/docs/generator/custom.md +0 -147
- package/docs/generator/index.md +0 -66
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { MockInstance } from "vitest";
|
|
2
|
+
//#region src/vitest/mocks/iconv.d.ts
|
|
3
|
+
type IconvResolver = (method: string, args: unknown[]) => unknown;
|
|
4
|
+
type IconvMethod = "convert" | "convertBuffer" | "decode" | "encode" | "encodings";
|
|
5
|
+
interface IconvCall {
|
|
6
|
+
method: IconvMethod;
|
|
7
|
+
args: unknown[];
|
|
8
|
+
}
|
|
9
|
+
type ConversionResult = string | Uint8Array;
|
|
10
|
+
type ConvertMockProcedure = (input: string | Uint8Array | ArrayBuffer, fromEncoding: string, toEncoding: string) => ConversionResult;
|
|
11
|
+
type ConvertBufferMockProcedure = (input: Uint8Array | ArrayBuffer, fromEncoding: string, toEncoding: string) => ConversionResult;
|
|
12
|
+
type EncodeMockProcedure = (input: string, encoding: string) => ConversionResult;
|
|
13
|
+
type TypedOperationMock<RuntimeProcedure, MockProcedure extends (...args: never[]) => unknown> = RuntimeProcedure & MockInstance<MockProcedure>;
|
|
14
|
+
/** Controls how unconfigured Iconv operations are handled. */
|
|
15
|
+
interface MockIconvOptions {
|
|
16
|
+
/** Return an empty type-compatible value or throw when no behavior is configured. */
|
|
17
|
+
onUnhandled?: "fallback" | "error";
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Acquire a disposable mock for `tailor.iconv`. Restored on dispose.
|
|
21
|
+
* @param options - Fallback behavior for unconfigured operations
|
|
22
|
+
* @returns Disposable Iconv mock control object
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import { mockIconv } from "@tailor-platform/sdk/vitest";
|
|
26
|
+
*
|
|
27
|
+
* test("mock encoding conversion", () => {
|
|
28
|
+
* using iconv = mockIconv();
|
|
29
|
+
* iconv.decode.mockReturnValue("decoded-text");
|
|
30
|
+
* // …
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
declare function mockIconv(options?: MockIconvOptions): {
|
|
35
|
+
/** The `convert` `vi.fn`. */
|
|
36
|
+
convert: TypedOperationMock<(<T extends string>(str: string | Uint8Array | ArrayBuffer, fromEncoding: string, toEncoding: T) => T extends "UTF8" | "UTF-8" ? string : Uint8Array), ConvertMockProcedure>;
|
|
37
|
+
/** The `convertBuffer` `vi.fn`. */
|
|
38
|
+
convertBuffer: TypedOperationMock<(<T extends string>(buffer: Uint8Array | ArrayBuffer, fromEncoding: string, toEncoding: T) => T extends "UTF8" | "UTF-8" ? string : Uint8Array), ConvertBufferMockProcedure>;
|
|
39
|
+
/** The `decode` `vi.fn`. */
|
|
40
|
+
decode: import("vitest").Mock<(input: Uint8Array | ArrayBuffer, encoding: string) => string>;
|
|
41
|
+
/** The `encode` `vi.fn`. */
|
|
42
|
+
encode: TypedOperationMock<(<T extends string>(str: string, encoding: T) => T extends "UTF8" | "UTF-8" ? string : Uint8Array), EncodeMockProcedure>;
|
|
43
|
+
/** The `encodings` `vi.fn`. */
|
|
44
|
+
encodings: import("vitest").Mock<() => string[]>;
|
|
45
|
+
setResolver(value: IconvResolver): void;
|
|
46
|
+
readonly calls: IconvCall[];
|
|
47
|
+
clear: () => void;
|
|
48
|
+
reset(): void;
|
|
49
|
+
} & Disposable;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { MockIconvOptions, mockIconv };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IdpClientConstructor, IdpClientInstance } from "../../runtime/idp.mjs";
|
|
2
|
+
import { Mock } from "vitest";
|
|
3
|
+
//#region src/vitest/mocks/idp.d.ts
|
|
4
|
+
type IdpMethod = keyof IdpClientInstance;
|
|
5
|
+
type IdpResolver = (method: string, args: unknown[], namespace: string) => unknown;
|
|
6
|
+
interface IdpCall {
|
|
7
|
+
method: string;
|
|
8
|
+
args: unknown[];
|
|
9
|
+
namespace: string;
|
|
10
|
+
}
|
|
11
|
+
/** Controls fallback behavior for IdP calls without a configured result. */
|
|
12
|
+
interface MockIdpOptions {
|
|
13
|
+
/** Return a type-compatible fixture or throw when no behavior is configured. */
|
|
14
|
+
onUnhandled?: "fallback" | "error";
|
|
15
|
+
}
|
|
16
|
+
type IdpNamespaceMocks = { [Method in IdpMethod]: Mock<IdpClientInstance[Method]>; };
|
|
17
|
+
/**
|
|
18
|
+
* Acquire a disposable mock for `tailor.idp`. Restored on dispose.
|
|
19
|
+
* @param options - Controls behavior for calls without a configured result
|
|
20
|
+
* @returns Disposable IDP mock control object
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* import { mockIdp } from "@tailor-platform/sdk/vitest";
|
|
24
|
+
*
|
|
25
|
+
* test("returns a user", async () => {
|
|
26
|
+
* using idp = mockIdp();
|
|
27
|
+
* idp.namespace("my-idp").user.mockResolvedValue({
|
|
28
|
+
* id: "u-1",
|
|
29
|
+
* name: "alice",
|
|
30
|
+
* disabled: false,
|
|
31
|
+
* mfaEnrolled: false,
|
|
32
|
+
* mfaFactorIds: [],
|
|
33
|
+
* });
|
|
34
|
+
* // …
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function mockIdp(options?: MockIdpOptions): {
|
|
39
|
+
/** The mock IDP `Client` constructor (`vi.fn`). */
|
|
40
|
+
Client: Mock<IdpClientConstructor>;
|
|
41
|
+
namespace: (name: string) => IdpNamespaceMocks;
|
|
42
|
+
setResolver(value: IdpResolver): void;
|
|
43
|
+
/**
|
|
44
|
+
* Enqueue a single result for the next IDP call.
|
|
45
|
+
* The queue is shared across all methods and namespaces.
|
|
46
|
+
* @param result - Result to return from the next IDP call
|
|
47
|
+
*/
|
|
48
|
+
enqueueResult(result: unknown): void;
|
|
49
|
+
/**
|
|
50
|
+
* Enqueue results for multiple subsequent IDP calls.
|
|
51
|
+
* The queue is shared across all methods and namespaces.
|
|
52
|
+
* @param results - Results to enqueue, one per upcoming call
|
|
53
|
+
*/
|
|
54
|
+
enqueueResults(...results: unknown[]): void;
|
|
55
|
+
readonly calls: IdpCall[];
|
|
56
|
+
clear(): void;
|
|
57
|
+
reset(): void;
|
|
58
|
+
} & Disposable;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { MockIdpOptions, mockIdp };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LogAttributes } from "../../runtime/logger.mjs";
|
|
2
|
+
//#region src/vitest/mocks/logger.d.ts
|
|
3
|
+
type LogSeverity = "debug" | "info" | "warn" | "error";
|
|
4
|
+
/** A recorded `debug`/`info`/`warn`/`error` call. */
|
|
5
|
+
interface LogCall {
|
|
6
|
+
severity: LogSeverity;
|
|
7
|
+
message: string;
|
|
8
|
+
attributes?: LogAttributes;
|
|
9
|
+
}
|
|
10
|
+
/** Initial fixtures for a logger mock. */
|
|
11
|
+
interface MockLoggerOptions {}
|
|
12
|
+
/**
|
|
13
|
+
* Acquire a disposable mock for `tailor.logger`. Each method is a `vi.fn`, so
|
|
14
|
+
* calls can be asserted directly; `calls` returns the `debug`/`info`/`warn`/
|
|
15
|
+
* `error` entries in the order they were emitted. Restored on dispose.
|
|
16
|
+
* @param _options - Reserved for future initial fixtures
|
|
17
|
+
* @returns Disposable logger mock control object
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { mockLogger } from "@tailor-platform/sdk/vitest";
|
|
21
|
+
*
|
|
22
|
+
* test("logs the processed order", () => {
|
|
23
|
+
* using logger = mockLogger();
|
|
24
|
+
* // …run code that calls tailor.logger.info…
|
|
25
|
+
* expect(logger.info).toHaveBeenCalledWith("order processed", { orderId: "o-1" });
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function mockLogger(_options?: MockLoggerOptions): {
|
|
30
|
+
/** The `debug` `vi.fn`. */
|
|
31
|
+
debug: import("vitest").Mock<(_message: string, _attributes?: LogAttributes) => void>;
|
|
32
|
+
/** The `info` `vi.fn`. */
|
|
33
|
+
info: import("vitest").Mock<(_message: string, _attributes?: LogAttributes) => void>;
|
|
34
|
+
/** The `warn` `vi.fn`. */
|
|
35
|
+
warn: import("vitest").Mock<(_message: string, _attributes?: LogAttributes) => void>;
|
|
36
|
+
/** The `error` `vi.fn`. */
|
|
37
|
+
error: import("vitest").Mock<(_message: string, _attributes?: LogAttributes) => void>;
|
|
38
|
+
/** The `setAttributes` `vi.fn`. */
|
|
39
|
+
setAttributes: import("vitest").Mock<(_attributes: LogAttributes) => void>;
|
|
40
|
+
readonly calls: LogCall[];
|
|
41
|
+
clear(): void;
|
|
42
|
+
reset(): void;
|
|
43
|
+
} & Disposable;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { MockLoggerOptions, mockLogger };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/vitest/mocks/secretmanager.d.ts
|
|
2
|
+
interface SecretCall {
|
|
3
|
+
method: "getSecret" | "getSecrets";
|
|
4
|
+
vault: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
names?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
/** Initial fixtures for a Secret Manager mock. */
|
|
9
|
+
interface MockSecretmanagerOptions {
|
|
10
|
+
/** Secrets to merge over fixtures inherited from the currently installed mock. */
|
|
11
|
+
secrets?: Record<string, Record<string, string>>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Acquire a disposable mock for `tailor.secretmanager`. The secret store is
|
|
15
|
+
* inherited (cloned) from the currently-installed mock on acquisition and
|
|
16
|
+
* restored on dispose, so secrets seeded outside the test survive across
|
|
17
|
+
* `using` scopes while per-test `setSecrets()` overrides stay isolated.
|
|
18
|
+
* @param options - Initial Secret Manager fixtures
|
|
19
|
+
* @returns Disposable SecretManager mock control object
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import { mockSecretmanager } from "@tailor-platform/sdk/vitest";
|
|
23
|
+
*
|
|
24
|
+
* test("reads secrets from vault", async () => {
|
|
25
|
+
* using sm = mockSecretmanager({ secrets: { "my-vault": { API_KEY: "sk-123" } } });
|
|
26
|
+
* sm.setSecret("my-vault", "API_KEY", "replacement");
|
|
27
|
+
* // …
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare function mockSecretmanager(options?: MockSecretmanagerOptions): {
|
|
32
|
+
/** The `getSecret` `vi.fn`. */
|
|
33
|
+
getSecret: import("vitest").Mock<(vault: string, name: string) => Promise<string | undefined>>;
|
|
34
|
+
/** The `getSecrets` `vi.fn`. */
|
|
35
|
+
getSecrets: import("vitest").Mock<(<const T extends readonly string[]>(vault: string, names: T) => Promise<Partial<Record<T[number], string>>>)>;
|
|
36
|
+
setSecrets(secrets: Record<string, Record<string, string>>): void;
|
|
37
|
+
setSecret(vault: string, name: string, value: string): void;
|
|
38
|
+
mergeSecrets(vault: string, secrets: Record<string, string>): void;
|
|
39
|
+
readonly calls: SecretCall[];
|
|
40
|
+
clear(): void;
|
|
41
|
+
reset(): void;
|
|
42
|
+
} & Disposable;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { MockSecretmanagerOptions, mockSecretmanager };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
//#region src/vitest/mocks/tailordb.d.ts
|
|
2
|
+
type QueryResolver = (query: string, params: unknown[]) => unknown[] | undefined;
|
|
3
|
+
/** Controls how unmatched TailorDB queries are handled. */
|
|
4
|
+
interface MockTailordbOptions {
|
|
5
|
+
/** Return an empty result or throw when no configured query behavior matches. */
|
|
6
|
+
onUnhandled?: "fallback" | "error";
|
|
7
|
+
}
|
|
8
|
+
/** Matches a TailorDB query by SQL text and optionally by parameters. */
|
|
9
|
+
interface QueryMatch {
|
|
10
|
+
/** Exact SQL text or regular expression to match. */
|
|
11
|
+
sql: string | RegExp;
|
|
12
|
+
/** Exact parameters or a predicate for parameter matching. */
|
|
13
|
+
params?: readonly unknown[] | ((params: unknown[]) => boolean);
|
|
14
|
+
}
|
|
15
|
+
/** Selects TailorDB queries that receive a configured response. */
|
|
16
|
+
type QueryMatcher = string | RegExp | QueryMatch | ((query: string, params: unknown[]) => boolean);
|
|
17
|
+
/** Configures persistent and one-time responses for matched queries. */
|
|
18
|
+
interface QueryBehavior<Row> {
|
|
19
|
+
/** Return these rows for every matching query after one-time responses are consumed. */
|
|
20
|
+
returnsRows(rows: Row[]): QueryBehavior<Row>;
|
|
21
|
+
/** Return these rows for the next matching query. */
|
|
22
|
+
returnsRowsOnce(rows: Row[]): QueryBehavior<Row>;
|
|
23
|
+
/** Reject every matching query after one-time responses are consumed. */
|
|
24
|
+
rejects(error: unknown): QueryBehavior<Row>;
|
|
25
|
+
/** Reject the next matching query. */
|
|
26
|
+
rejectsOnce(error: unknown): QueryBehavior<Row>;
|
|
27
|
+
}
|
|
28
|
+
interface ExecutedQuery {
|
|
29
|
+
query: string;
|
|
30
|
+
params: unknown[];
|
|
31
|
+
}
|
|
32
|
+
interface CreatedClient {
|
|
33
|
+
namespace: string | undefined;
|
|
34
|
+
ended: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare class MockQueryResult {
|
|
37
|
+
command: string;
|
|
38
|
+
rowCount: number;
|
|
39
|
+
rows: unknown[];
|
|
40
|
+
constructor(rows: unknown[]);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Acquire a disposable mock for TailorDB operations. Installs a mock
|
|
44
|
+
* `tailordb.Client` whose `queryObject` is a shared `vi.fn()` (so query
|
|
45
|
+
* responses can be staged before the client is constructed). Restored on
|
|
46
|
+
* dispose.
|
|
47
|
+
* @param options - Query fallback behavior
|
|
48
|
+
* @returns Disposable TailorDB mock control object
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* import { mockTailordb } from "@tailor-platform/sdk/vitest";
|
|
52
|
+
*
|
|
53
|
+
* test("query-based", async () => {
|
|
54
|
+
* using db = mockTailordb();
|
|
55
|
+
* db.onQuery({ sql: /FROM users/, params: ["u-1"] }).returnsRows([{ age: 30 }]);
|
|
56
|
+
* // …
|
|
57
|
+
* expect(db.queryObject).toHaveBeenCalled();
|
|
58
|
+
* expect(db.Client).toHaveBeenCalledWith({ namespace: "tailordb" });
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
declare function mockTailordb(options?: MockTailordbOptions): {
|
|
63
|
+
/** The mock `tailordb.Client` constructor (`vi.fn`). */
|
|
64
|
+
Client: import("vitest").Mock<(this: any, config?: {
|
|
65
|
+
namespace?: string;
|
|
66
|
+
}) => void>;
|
|
67
|
+
/** The shared `queryObject` `vi.fn` used by every client and transaction. */
|
|
68
|
+
queryObject: import("vitest").Mock<(query: string, params?: unknown[]) => Promise<MockQueryResult>>;
|
|
69
|
+
/**
|
|
70
|
+
* Set a fallback query resolver. Called when the enqueue queue is empty.
|
|
71
|
+
* @param resolver - Function that returns rows for a given query and params
|
|
72
|
+
*/
|
|
73
|
+
setQueryResolver(resolver: QueryResolver): void;
|
|
74
|
+
/**
|
|
75
|
+
* Configure responses for queries matching SQL text, parameters, or a predicate.
|
|
76
|
+
* More recently registered matchers take precedence.
|
|
77
|
+
* Do not combine matchers with a direct `queryObject.mockImplementation()` override.
|
|
78
|
+
* @param matcher - Query matcher
|
|
79
|
+
* @returns Chainable query behavior
|
|
80
|
+
*/
|
|
81
|
+
onQuery<Row = unknown>(matcher: QueryMatcher): QueryBehavior<Row>;
|
|
82
|
+
/**
|
|
83
|
+
* Enqueue rows for the next `queryObject` call (FIFO; takes priority over
|
|
84
|
+
* `setQueryResolver`). Call with no arguments for an empty result.
|
|
85
|
+
* @param rows - Row objects to return from the next `queryObject` call
|
|
86
|
+
*/
|
|
87
|
+
enqueueResult(...rows: unknown[]): void;
|
|
88
|
+
/**
|
|
89
|
+
* Enqueue rows for multiple subsequent `queryObject` calls (FIFO).
|
|
90
|
+
* @param rowsList - Rows arrays, one per upcoming query
|
|
91
|
+
*/
|
|
92
|
+
enqueueResults(...rowsList: unknown[][]): void;
|
|
93
|
+
/**
|
|
94
|
+
* Enqueue row arrays for subsequent queries whose exact order is under test.
|
|
95
|
+
* @param rowsList - Rows arrays, one per upcoming query
|
|
96
|
+
*/
|
|
97
|
+
enqueueRows(...rowsList: unknown[][]): void;
|
|
98
|
+
/**
|
|
99
|
+
* All queries executed via `queryObject`, in order, derived from the vi.fn
|
|
100
|
+
* call records.
|
|
101
|
+
* @returns Executed queries array
|
|
102
|
+
*/
|
|
103
|
+
readonly executedQueries: ExecutedQuery[];
|
|
104
|
+
/**
|
|
105
|
+
* All TailorDB clients created, with their namespace and end state.
|
|
106
|
+
* @returns Created clients array
|
|
107
|
+
*/
|
|
108
|
+
readonly createdClients: CreatedClient[];
|
|
109
|
+
/** Clear recorded calls while preserving configured query behavior. */
|
|
110
|
+
clear(): void;
|
|
111
|
+
/** Reset query responses and recorded calls (keeps the mock installed). */
|
|
112
|
+
reset(): void;
|
|
113
|
+
} & Disposable;
|
|
114
|
+
//#endregion
|
|
115
|
+
export { MockTailordbOptions, QueryBehavior, QueryMatch, QueryMatcher, mockTailordb };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { TailorEnv } from "../../runtime/types.mjs";
|
|
2
|
+
import { ExecJobFunctionOptions, StartWorkflowOptions } from "../../runtime/workflow.mjs";
|
|
3
|
+
import { WorkflowJob } from "../../configure/services/workflow/job.mjs";
|
|
4
|
+
import { Workflow } from "../../configure/services/workflow/workflow.mjs";
|
|
5
|
+
import { WaitPointInstance } from "../../configure/services/workflow/wait-point.mjs";
|
|
6
|
+
import { Mock } from "vitest";
|
|
7
|
+
//#region src/vitest/mocks/workflow.d.ts
|
|
8
|
+
type JobHandler = (jobName: string, args: unknown, options?: ExecJobFunctionOptions) => unknown;
|
|
9
|
+
type StartHandlerFn = (workflowName: string, args: unknown, options?: StartWorkflowOptions) => string;
|
|
10
|
+
type ResumeHandlerFn = (executionId: string) => string;
|
|
11
|
+
type WaitHandlerFn = (key: string, payload: unknown) => unknown;
|
|
12
|
+
type ResolveHandler = (executionId: string, key: string, callback: (payload: unknown) => unknown) => unknown | Promise<unknown>;
|
|
13
|
+
type SetWaitHandler = {
|
|
14
|
+
(handler: WaitHandlerFn): void;
|
|
15
|
+
(handler: unknown): void;
|
|
16
|
+
};
|
|
17
|
+
interface StartedJob {
|
|
18
|
+
jobName: string;
|
|
19
|
+
args: unknown;
|
|
20
|
+
options?: ExecJobFunctionOptions;
|
|
21
|
+
}
|
|
22
|
+
type WaitPayload<Payload> = [Payload] extends [undefined] ? undefined : Payload;
|
|
23
|
+
/**
|
|
24
|
+
* Acquire a disposable mock for workflow operations (`tailor.workflow`).
|
|
25
|
+
* Restored on dispose.
|
|
26
|
+
*
|
|
27
|
+
* The canonical `execJobFunction` and its `startJobFunction` alias share the
|
|
28
|
+
* same underlying `vi.fn`, so calls through either name are recorded once and
|
|
29
|
+
* handlers configured on either name apply to both.
|
|
30
|
+
* @returns Disposable workflow mock control object
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* import { mockWorkflow } from "@tailor-platform/sdk/vitest";
|
|
34
|
+
*
|
|
35
|
+
* test("job start", async () => {
|
|
36
|
+
* using wf = mockWorkflow();
|
|
37
|
+
* const job = wf.job(validateOrder);
|
|
38
|
+
* job.mockResolvedValue({ valid: true });
|
|
39
|
+
* await runWorkflowUnderTest();
|
|
40
|
+
* expect(job).toHaveBeenCalled();
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare function mockWorkflow(): {
|
|
45
|
+
/** The `execJobFunction` `vi.fn`. */
|
|
46
|
+
execJobFunction: Mock<(jobName: string, _args?: unknown, _options?: ExecJobFunctionOptions) => unknown>;
|
|
47
|
+
/**
|
|
48
|
+
* Alias of `execJobFunction` (same `vi.fn` reference).
|
|
49
|
+
* @deprecated Use `execJobFunction` instead.
|
|
50
|
+
*/
|
|
51
|
+
startJobFunction: Mock<(jobName: string, _args?: unknown, _options?: ExecJobFunctionOptions) => unknown>;
|
|
52
|
+
/** The `startWorkflow` `vi.fn`. */
|
|
53
|
+
startWorkflow: Mock<(_workflowName: string, _args?: unknown, _options?: StartWorkflowOptions) => Promise<string>>;
|
|
54
|
+
/** The `resumeWorkflowExecution` `vi.fn`. */
|
|
55
|
+
resumeWorkflowExecution: Mock<(executionId: string) => Promise<string>>;
|
|
56
|
+
/** The `wait` `vi.fn`. */
|
|
57
|
+
wait: Mock<(_key: string, _payload?: unknown) => unknown>;
|
|
58
|
+
/** The `resolve` `vi.fn`. */
|
|
59
|
+
resolve: Mock<(_executionId: string, _key: string, _callback: (payload: unknown) => unknown) => Promise<void>>;
|
|
60
|
+
/**
|
|
61
|
+
* Get a stable, typed mock for a workflow job's `start` method.
|
|
62
|
+
* The real start behavior is used until an implementation or result is configured.
|
|
63
|
+
* @param definition - Workflow job definition to mock
|
|
64
|
+
* @returns Typed `start` mock for the definition
|
|
65
|
+
*/
|
|
66
|
+
job<Name extends string, Input, Output>(definition: WorkflowJob<Name, Input, Output>): Mock<WorkflowJob<Name, Input, Output>["start"]>;
|
|
67
|
+
/**
|
|
68
|
+
* Get a stable, typed mock for a workflow definition's `start` method.
|
|
69
|
+
* The real start behavior is used until an implementation or result is configured.
|
|
70
|
+
* @param definition - Workflow definition to mock
|
|
71
|
+
* @returns Typed `start` mock for the definition
|
|
72
|
+
*/
|
|
73
|
+
workflow<Definition extends Workflow>(definition: Definition): Mock<Definition["start"]>;
|
|
74
|
+
/**
|
|
75
|
+
* Get stable, typed mocks for a wait point's `wait` and `resolve` methods.
|
|
76
|
+
* @param definition - Wait point definition to mock
|
|
77
|
+
* @returns Typed wait point mock control object
|
|
78
|
+
*/
|
|
79
|
+
waitPoint<Payload, Result>(definition: WaitPointInstance<Payload, Result>): {
|
|
80
|
+
wait: Mock<WaitPointInstance<Payload, Result>["wait"]>;
|
|
81
|
+
resolve: Mock<WaitPointInstance<Payload, Result>["resolve"]>;
|
|
82
|
+
setResolvePayload(payload: WaitPayload<Payload>): void;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Set a fallback job handler. Called when the enqueue queue is empty.
|
|
86
|
+
* @param handler - Function returning a result for a job name, args, and options
|
|
87
|
+
*/
|
|
88
|
+
setJobHandler(handler: JobHandler): void;
|
|
89
|
+
/**
|
|
90
|
+
* Enqueue a single result for the next `execJobFunction` call (FIFO;
|
|
91
|
+
* takes priority over `setJobHandler`).
|
|
92
|
+
* @param result - Result to return from the next call
|
|
93
|
+
*/
|
|
94
|
+
enqueueResult(result: unknown): void;
|
|
95
|
+
/**
|
|
96
|
+
* Enqueue results for multiple subsequent `execJobFunction` calls (FIFO).
|
|
97
|
+
* @param results - Results to enqueue, one per upcoming call
|
|
98
|
+
*/
|
|
99
|
+
enqueueResults(...results: unknown[]): void;
|
|
100
|
+
/**
|
|
101
|
+
* All jobs executed via `execJobFunction`, in order.
|
|
102
|
+
* @returns Started jobs array
|
|
103
|
+
*/
|
|
104
|
+
readonly startedJobs: StartedJob[];
|
|
105
|
+
/**
|
|
106
|
+
* Configure what `startWorkflow` returns. Pass a string (same id every
|
|
107
|
+
* call) or `(name, args, options) => string`. Default: a placeholder UUID.
|
|
108
|
+
* @param handler - Static execution ID or a function returning one
|
|
109
|
+
*/
|
|
110
|
+
setStartHandler(handler: string | StartHandlerFn): void;
|
|
111
|
+
/**
|
|
112
|
+
* Configure what `resumeWorkflowExecution` returns. Pass a string (same id
|
|
113
|
+
* every call) or `(executionId) => string`. Default: echoes the input executionId.
|
|
114
|
+
* @param handler - Static execution ID or a function returning one
|
|
115
|
+
*/
|
|
116
|
+
setResumeHandler(handler: string | ResumeHandlerFn): void;
|
|
117
|
+
/**
|
|
118
|
+
* Configure what `wait` returns. Pass `(key, payload) => unknown` or any
|
|
119
|
+
* other value to return it for every call. Default: `null`.
|
|
120
|
+
* @param handler - Static value or a function returning one
|
|
121
|
+
*/
|
|
122
|
+
setWaitHandler: SetWaitHandler;
|
|
123
|
+
/**
|
|
124
|
+
* Set the `env` passed to job bodies invoked via `createWorkflowJob().start()`.
|
|
125
|
+
* Cleared on dispose / reset.
|
|
126
|
+
* @param env - Env passed to job bodies.
|
|
127
|
+
*/
|
|
128
|
+
setEnv(env: TailorEnv): void;
|
|
129
|
+
/**
|
|
130
|
+
* Configure how `resolve` runs the user-supplied callback. Default: callback
|
|
131
|
+
* is not invoked (records the call only).
|
|
132
|
+
* @param handler - Function invoked per `resolve` call
|
|
133
|
+
*/
|
|
134
|
+
setResolveHandler(handler: ResolveHandler): void;
|
|
135
|
+
/**
|
|
136
|
+
* `wait` calls reshaped as `{ key, payload }` for assertions.
|
|
137
|
+
* @returns Wait call records
|
|
138
|
+
*/
|
|
139
|
+
readonly waitCalls: {
|
|
140
|
+
key: string;
|
|
141
|
+
payload: unknown;
|
|
142
|
+
}[];
|
|
143
|
+
/**
|
|
144
|
+
* `resolve` calls reshaped as `{ executionId, key }` for assertions.
|
|
145
|
+
* @returns Resolve call records
|
|
146
|
+
*/
|
|
147
|
+
readonly resolveCalls: {
|
|
148
|
+
executionId: string;
|
|
149
|
+
key: string;
|
|
150
|
+
}[];
|
|
151
|
+
/** Clear recorded calls while preserving configured responses. */
|
|
152
|
+
clear(): void;
|
|
153
|
+
/** Reset all workflow responses and recorded calls (keeps the mock installed). */
|
|
154
|
+
reset(): void;
|
|
155
|
+
} & Disposable;
|
|
156
|
+
//#endregion
|
|
157
|
+
export { mockWorkflow };
|
package/dist/vitest/setup.d.mts
CHANGED
|
@@ -59,5 +59,4 @@ declare function removeBlockedGlobals(globalObj: Record<string, unknown>, keys:
|
|
|
59
59
|
*/
|
|
60
60
|
declare function restoreBlockedGlobals(globalObj: Record<string, unknown>, saved: SavedGlobals): void;
|
|
61
61
|
//#endregion
|
|
62
|
-
export { createBlockedGlobalsLifecycle, extractVaultStore, loadSecretsFromConfig, removeBlockedGlobals, restoreBlockedGlobals };
|
|
63
|
-
//# sourceMappingURL=setup.d.mts.map
|
|
62
|
+
export { createBlockedGlobalsLifecycle, extractVaultStore, loadSecretsFromConfig, removeBlockedGlobals, restoreBlockedGlobals };
|
package/dist/vitest/setup.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { t as
|
|
3
|
-
import { a as mockSecretmanager } from "../mock-DMgIygjE.mjs";
|
|
1
|
+
import { t as RUNTIME_FLAG_KEY } from "../globals-DQotNuwK.mjs";
|
|
2
|
+
import { t as mockSecretmanager } from "../secretmanager-IY4UvinW.mjs";
|
|
4
3
|
import { pathToFileURL } from "node:url";
|
|
5
4
|
import { afterEach, beforeAll, beforeEach } from "vitest";
|
|
6
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.mjs","names":[],"sources":["../../src/vitest/setup.ts"],"sourcesContent":["/**\n * Vitest setup file that removes Node.js globals which Vitest depends on\n * but are not available in the Tailor Platform runtime.\n *\n * These globals cannot be removed in the environment's setup() because\n * Vitest's runner needs them during initialization. By using beforeEach/afterEach,\n * they are only removed during user test code execution.\n *\n * This file is auto-injected by tailorRuntime() but only activates when\n * the tailor-runtime environment is active (detected via __tailorRuntimeActive,\n * a flag set by injectMocks() during environment setup).\n */\nimport { pathToFileURL } from \"node:url\";\nimport { afterEach, beforeAll, beforeEach } from \"vitest\";\nimport { RUNTIME_FLAG_KEY, mockSecretmanager } from \"./mock\";\n\n// Globals that Vitest internals depend on but don't exist in the platform runtime.\n// Removed before each test, restored after.\nconst BLOCKED_GLOBALS = [\"performance\"] as const;\n\ntype SavedGlobals = Record<string, PropertyDescriptor | undefined>;\n\n/**\n * Reference-counted lifecycle for blocked globals.\n *\n * Concurrent tests in the same Vitest worker (`test.concurrent`) interleave\n * their beforeEach/afterEach hooks: a naive `let saved` shared across hooks\n * would let one test's `afterEach` restore `performance` mid-execution of\n * another test. Reference counting keeps the globals removed for the union\n * of all overlapping test scopes — the property is removed on first entry\n * and restored only when the last test exits.\n * @returns Lifecycle hooks\n */\nexport function createBlockedGlobalsLifecycle(): {\n enter: (globalObj: Record<string, unknown>, keys: readonly string[]) => void;\n exit: (globalObj: Record<string, unknown>) => void;\n readonly active: number;\n} {\n let active = 0;\n let saved: SavedGlobals = {};\n return {\n get active() {\n return active;\n },\n enter(globalObj, keys) {\n if (active === 0) saved = removeBlockedGlobals(globalObj, keys);\n active++;\n },\n exit(globalObj) {\n // Defensive guard — in practice every `enter` is paired with `exit`,\n // but a hook crash could desync the counter.\n if (active === 0) return;\n active--;\n if (active === 0) {\n restoreBlockedGlobals(globalObj, saved);\n saved = {};\n }\n },\n };\n}\n\nconst lifecycle = createBlockedGlobalsLifecycle();\n\nfunction isTailorRuntime(): boolean {\n return RUNTIME_FLAG_KEY in globalThis;\n}\n\n/**\n * Extract a vault store from a secrets-shaped value.\n *\n * `defineSecretManager()` returns `{ vaults, options, get, getAll }` (get/getAll\n * are non-enumerable). When that shape is present, the actual vaults live\n * under `.vaults`. Otherwise fall back to treating the object itself as the\n * vault map (for plain object configs).\n * @param secrets - Value from `appConfig.secrets` or `config.secrets`\n * @returns Vault store, or null if the value is unusable\n */\nexport function extractVaultStore(secrets: unknown): Record<string, Record<string, string>> | null {\n if (!secrets || typeof secrets !== \"object\") return null;\n\n const source =\n \"vaults\" in secrets &&\n typeof (secrets as { vaults?: unknown }).vaults === \"object\" &&\n (secrets as { vaults?: unknown }).vaults !== null\n ? ((secrets as { vaults: Record<string, unknown> }).vaults as Record<string, unknown>)\n : (secrets as Record<string, unknown>);\n\n const store: Record<string, Record<string, string>> = {};\n for (const [vaultName, vaultData] of Object.entries(source)) {\n if (typeof vaultData === \"object\" && vaultData !== null) {\n store[vaultName] = { ...(vaultData as Record<string, string>) };\n }\n }\n return Object.keys(store).length > 0 ? store : null;\n}\n\n/**\n * Load and parse secrets from a tailor.config.ts file.\n *\n * Returns a vault store on success, or `null` on any failure (missing config,\n * import failure, missing/invalid secrets shape). Errors are swallowed so a\n * misconfigured project still boots — the user can set secrets manually via\n * `mockSecretmanager().setSecrets()`.\n * @param configPath - Absolute path to tailor.config.ts\n * @returns Vault store keyed by vault name, or null if unavailable\n */\nexport async function loadSecretsFromConfig(\n configPath: string,\n): Promise<Record<string, Record<string, string>> | null> {\n try {\n // Convert to file URL so absolute Windows paths (e.g. \"C:\\...\") parse as\n // valid ESM specifiers.\n const config = await import(pathToFileURL(configPath).href);\n const appConfig = config.default;\n const secrets = appConfig?.secrets ?? config.secrets;\n return extractVaultStore(secrets);\n } catch {\n return null;\n }\n}\n\n// Load secrets from tailor.config.ts if config path is provided via env var\nbeforeAll(async () => {\n if (!isTailorRuntime()) return;\n const configPath = process.env.__TAILOR_RUNTIME_CONFIG;\n if (!configPath) return;\n\n const store = await loadSecretsFromConfig(configPath);\n if (store) {\n // Acquire without `using`: this is a one-time global seed that must persist\n // across tests, so we deliberately do not dispose (which would reset it).\n mockSecretmanager().setSecrets(store);\n }\n});\n\n/**\n * Remove the given globals from `globalObj`, returning the descriptors that\n * were actually deleted so `restoreBlockedGlobals` can put them back.\n *\n * Mirrors environment.ts: non-configurable properties are skipped instead of\n * deleted, so `delete` never throws in strict-mode runtimes that lock them\n * down. Only properties whose deletion actually happened are returned, so the\n * caller restores nothing for the skipped case.\n * @param globalObj - Target object (typically `globalThis`)\n * @param keys - Property names to remove\n * @returns Map of removed descriptors keyed by property name\n */\nexport function removeBlockedGlobals(\n globalObj: Record<string, unknown>,\n keys: readonly string[],\n): SavedGlobals {\n const removed: SavedGlobals = {};\n for (const key of keys) {\n const descriptor = Object.getOwnPropertyDescriptor(globalObj, key);\n if (descriptor?.configurable) {\n removed[key] = descriptor;\n delete globalObj[key];\n }\n }\n return removed;\n}\n\n/**\n * Restore previously-removed globals onto `globalObj` from a `SavedGlobals`\n * map produced by `removeBlockedGlobals`.\n * @param globalObj - Target object (typically `globalThis`)\n * @param saved - Descriptors to re-define\n */\nexport function restoreBlockedGlobals(\n globalObj: Record<string, unknown>,\n saved: SavedGlobals,\n): void {\n for (const [key, descriptor] of Object.entries(saved)) {\n if (descriptor) {\n Object.defineProperty(globalObj, key, descriptor);\n }\n }\n}\n\nbeforeEach(() => {\n if (!isTailorRuntime()) return;\n lifecycle.enter(globalThis as Record<string, unknown>, BLOCKED_GLOBALS);\n});\n\nafterEach(() => {\n if (!isTailorRuntime()) return;\n lifecycle.exit(globalThis as Record<string, unknown>);\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.mjs","names":[],"sources":["../../src/vitest/setup.ts"],"sourcesContent":["/**\n * Vitest setup file that removes Node.js globals which Vitest depends on\n * but are not available in the Tailor Platform runtime.\n *\n * These globals cannot be removed in the environment's setup() because\n * Vitest's runner needs them during initialization. By using beforeEach/afterEach,\n * they are only removed during user test code execution.\n *\n * This file is auto-injected by tailorRuntime() but only activates when\n * the tailor-runtime environment is active (detected via __tailorRuntimeActive,\n * a flag set by injectMocks() during environment setup).\n */\nimport { pathToFileURL } from \"node:url\";\nimport { afterEach, beforeAll, beforeEach } from \"vitest\";\nimport { RUNTIME_FLAG_KEY, mockSecretmanager } from \"./mock\";\n\n// Globals that Vitest internals depend on but don't exist in the platform runtime.\n// Removed before each test, restored after.\nconst BLOCKED_GLOBALS = [\"performance\"] as const;\n\ntype SavedGlobals = Record<string, PropertyDescriptor | undefined>;\n\n/**\n * Reference-counted lifecycle for blocked globals.\n *\n * Concurrent tests in the same Vitest worker (`test.concurrent`) interleave\n * their beforeEach/afterEach hooks: a naive `let saved` shared across hooks\n * would let one test's `afterEach` restore `performance` mid-execution of\n * another test. Reference counting keeps the globals removed for the union\n * of all overlapping test scopes — the property is removed on first entry\n * and restored only when the last test exits.\n * @returns Lifecycle hooks\n */\nexport function createBlockedGlobalsLifecycle(): {\n enter: (globalObj: Record<string, unknown>, keys: readonly string[]) => void;\n exit: (globalObj: Record<string, unknown>) => void;\n readonly active: number;\n} {\n let active = 0;\n let saved: SavedGlobals = {};\n return {\n get active() {\n return active;\n },\n enter(globalObj, keys) {\n if (active === 0) saved = removeBlockedGlobals(globalObj, keys);\n active++;\n },\n exit(globalObj) {\n // Defensive guard — in practice every `enter` is paired with `exit`,\n // but a hook crash could desync the counter.\n if (active === 0) return;\n active--;\n if (active === 0) {\n restoreBlockedGlobals(globalObj, saved);\n saved = {};\n }\n },\n };\n}\n\nconst lifecycle = createBlockedGlobalsLifecycle();\n\nfunction isTailorRuntime(): boolean {\n return RUNTIME_FLAG_KEY in globalThis;\n}\n\n/**\n * Extract a vault store from a secrets-shaped value.\n *\n * `defineSecretManager()` returns `{ vaults, options, get, getAll }` (get/getAll\n * are non-enumerable). When that shape is present, the actual vaults live\n * under `.vaults`. Otherwise fall back to treating the object itself as the\n * vault map (for plain object configs).\n * @param secrets - Value from `appConfig.secrets` or `config.secrets`\n * @returns Vault store, or null if the value is unusable\n */\nexport function extractVaultStore(secrets: unknown): Record<string, Record<string, string>> | null {\n if (!secrets || typeof secrets !== \"object\") return null;\n\n const source =\n \"vaults\" in secrets &&\n typeof (secrets as { vaults?: unknown }).vaults === \"object\" &&\n (secrets as { vaults?: unknown }).vaults !== null\n ? ((secrets as { vaults: Record<string, unknown> }).vaults as Record<string, unknown>)\n : (secrets as Record<string, unknown>);\n\n const store: Record<string, Record<string, string>> = {};\n for (const [vaultName, vaultData] of Object.entries(source)) {\n if (typeof vaultData === \"object\" && vaultData !== null) {\n store[vaultName] = { ...(vaultData as Record<string, string>) };\n }\n }\n return Object.keys(store).length > 0 ? store : null;\n}\n\n/**\n * Load and parse secrets from a tailor.config.ts file.\n *\n * Returns a vault store on success, or `null` on any failure (missing config,\n * import failure, missing/invalid secrets shape). Errors are swallowed so a\n * misconfigured project still boots — the user can set secrets manually via\n * `mockSecretmanager().setSecrets()`.\n * @param configPath - Absolute path to tailor.config.ts\n * @returns Vault store keyed by vault name, or null if unavailable\n */\nexport async function loadSecretsFromConfig(\n configPath: string,\n): Promise<Record<string, Record<string, string>> | null> {\n try {\n // Convert to file URL so absolute Windows paths (e.g. \"C:\\...\") parse as\n // valid ESM specifiers.\n const config = await import(pathToFileURL(configPath).href);\n const appConfig = config.default;\n const secrets = appConfig?.secrets ?? config.secrets;\n return extractVaultStore(secrets);\n } catch {\n return null;\n }\n}\n\n// Load secrets from tailor.config.ts if config path is provided via env var\nbeforeAll(async () => {\n if (!isTailorRuntime()) return;\n const configPath = process.env.__TAILOR_RUNTIME_CONFIG;\n if (!configPath) return;\n\n const store = await loadSecretsFromConfig(configPath);\n if (store) {\n // Acquire without `using`: this is a one-time global seed that must persist\n // across tests, so we deliberately do not dispose (which would reset it).\n mockSecretmanager().setSecrets(store);\n }\n});\n\n/**\n * Remove the given globals from `globalObj`, returning the descriptors that\n * were actually deleted so `restoreBlockedGlobals` can put them back.\n *\n * Mirrors environment.ts: non-configurable properties are skipped instead of\n * deleted, so `delete` never throws in strict-mode runtimes that lock them\n * down. Only properties whose deletion actually happened are returned, so the\n * caller restores nothing for the skipped case.\n * @param globalObj - Target object (typically `globalThis`)\n * @param keys - Property names to remove\n * @returns Map of removed descriptors keyed by property name\n */\nexport function removeBlockedGlobals(\n globalObj: Record<string, unknown>,\n keys: readonly string[],\n): SavedGlobals {\n const removed: SavedGlobals = {};\n for (const key of keys) {\n const descriptor = Object.getOwnPropertyDescriptor(globalObj, key);\n if (descriptor?.configurable) {\n removed[key] = descriptor;\n delete globalObj[key];\n }\n }\n return removed;\n}\n\n/**\n * Restore previously-removed globals onto `globalObj` from a `SavedGlobals`\n * map produced by `removeBlockedGlobals`.\n * @param globalObj - Target object (typically `globalThis`)\n * @param saved - Descriptors to re-define\n */\nexport function restoreBlockedGlobals(\n globalObj: Record<string, unknown>,\n saved: SavedGlobals,\n): void {\n for (const [key, descriptor] of Object.entries(saved)) {\n if (descriptor) {\n Object.defineProperty(globalObj, key, descriptor);\n }\n }\n}\n\nbeforeEach(() => {\n if (!isTailorRuntime()) return;\n lifecycle.enter(globalThis as Record<string, unknown>, BLOCKED_GLOBALS);\n});\n\nafterEach(() => {\n if (!isTailorRuntime()) return;\n lifecycle.exit(globalThis as Record<string, unknown>);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,kBAAkB,CAAC,aAAa;;;;;;;;;;;;AAetC,SAAgB,gCAId;CACA,IAAI,SAAS;CACb,IAAI,QAAsB,CAAC;CAC3B,OAAO;EACL,IAAI,SAAS;GACX,OAAO;EACT;EACA,MAAM,WAAW,MAAM;GACrB,IAAI,WAAW,GAAG,QAAQ,qBAAqB,WAAW,IAAI;GAC9D;EACF;EACA,KAAK,WAAW;GAGd,IAAI,WAAW,GAAG;GAClB;GACA,IAAI,WAAW,GAAG;IAChB,sBAAsB,WAAW,KAAK;IACtC,QAAQ,CAAC;GACX;EACF;CACF;AACF;AAEA,MAAM,YAAY,8BAA8B;AAEhD,SAAS,kBAA2B;CAClC,OAAO,oBAAoB;AAC7B;;;;;;;;;;;AAYA,SAAgB,kBAAkB,SAAiE;CACjG,IAAI,CAAC,WAAW,OAAO,YAAY,UAAU,OAAO;CAEpD,MAAM,SACJ,YAAY,WACZ,OAAQ,QAAiC,WAAW,YACnD,QAAiC,WAAW,OACvC,QAAgD,SACjD;CAEP,MAAM,QAAgD,CAAC;CACvD,KAAK,MAAM,CAAC,WAAW,cAAc,OAAO,QAAQ,MAAM,GACxD,IAAI,OAAO,cAAc,YAAY,cAAc,MACjD,MAAM,aAAa,EAAE,GAAI,UAAqC;CAGlE,OAAO,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,IAAI,QAAQ;AACjD;;;;;;;;;;;AAYA,eAAsB,sBACpB,YACwD;CACxD,IAAI;EAGF,MAAM,SAAS,MAAM,OAAO,cAAc,UAAU,CAAC,CAAC;EAGtD,OAAO,kBAFW,OAAO,SACE,WAAW,OAAO,OACb;CAClC,QAAQ;EACN,OAAO;CACT;AACF;AAGA,UAAU,YAAY;CACpB,IAAI,CAAC,gBAAgB,GAAG;CACxB,MAAM,aAAa,QAAQ,IAAI;CAC/B,IAAI,CAAC,YAAY;CAEjB,MAAM,QAAQ,MAAM,sBAAsB,UAAU;CACpD,IAAI,OAGF,kBAAkB,CAAC,CAAC,WAAW,KAAK;AAExC,CAAC;;;;;;;;;;;;;AAcD,SAAgB,qBACd,WACA,MACc;CACd,MAAM,UAAwB,CAAC;CAC/B,KAAK,MAAM,OAAO,MAAM;EACtB,MAAM,aAAa,OAAO,yBAAyB,WAAW,GAAG;EACjE,IAAI,YAAY,cAAc;GAC5B,QAAQ,OAAO;GACf,OAAO,UAAU;EACnB;CACF;CACA,OAAO;AACT;;;;;;;AAQA,SAAgB,sBACd,WACA,OACM;CACN,KAAK,MAAM,CAAC,KAAK,eAAe,OAAO,QAAQ,KAAK,GAClD,IAAI,YACF,OAAO,eAAe,WAAW,KAAK,UAAU;AAGtD;AAEA,iBAAiB;CACf,IAAI,CAAC,gBAAgB,GAAG;CACxB,UAAU,MAAM,YAAuC,eAAe;AACxE,CAAC;AAED,gBAAgB;CACd,IAAI,CAAC,gBAAgB,GAAG;CACxB,UAAU,KAAK,UAAqC;AACtD,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TailorEnv } from "../runtime/types.mjs";
|
|
2
|
+
import { WorkflowJob } from "../configure/services/workflow/job.mjs";
|
|
3
|
+
import { Workflow } from "../configure/services/workflow/workflow.mjs";
|
|
4
|
+
import "../configure/services/workflow/index.mjs";
|
|
5
|
+
//#region src/vitest/workflow-local.d.ts
|
|
6
|
+
type AnyWorkflowJob = WorkflowJob<string, any, any>;
|
|
7
|
+
type AnyWorkflow = Workflow<AnyWorkflowJob>;
|
|
8
|
+
type WorkflowInput<W extends AnyWorkflow> = W["mainJob"] extends WorkflowJob<string, infer I, any> ? I : never;
|
|
9
|
+
type WorkflowOutput<W extends AnyWorkflow> = W["mainJob"] extends WorkflowJob<string, any, infer O> ? Awaited<O> : never;
|
|
10
|
+
interface RunWorkflowLocallyOptions {
|
|
11
|
+
/** Env passed to workflow job bodies during this local run. */
|
|
12
|
+
env?: TailorEnv;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Run a workflow's main job and dependent job starts locally with real job bodies.
|
|
16
|
+
*
|
|
17
|
+
* Use this for local full-chain workflow tests. Regular `.start()` calls
|
|
18
|
+
* delegate to the platform workflow runtime and should be mocked with
|
|
19
|
+
* `mockWorkflow()` when you are not intentionally running the local chain.
|
|
20
|
+
* @param workflow - Workflow definition to run
|
|
21
|
+
* @returns The main job output
|
|
22
|
+
*/
|
|
23
|
+
declare function runWorkflowLocally<W extends Workflow<WorkflowJob<string, undefined, any>>>(workflow: W): Promise<WorkflowOutput<W>>;
|
|
24
|
+
/**
|
|
25
|
+
* Run a no-input workflow locally with optional runner settings.
|
|
26
|
+
* @param workflow - Workflow definition to run
|
|
27
|
+
* @param args - Must be `undefined` for no-input workflows
|
|
28
|
+
* @param options - Local runner options
|
|
29
|
+
* @returns The main job output
|
|
30
|
+
*/
|
|
31
|
+
declare function runWorkflowLocally<W extends Workflow<WorkflowJob<string, undefined, any>>>(workflow: W, args: undefined, options?: RunWorkflowLocallyOptions): Promise<WorkflowOutput<W>>;
|
|
32
|
+
/**
|
|
33
|
+
* Run a workflow locally with real job bodies.
|
|
34
|
+
* @param workflow - Workflow definition to run
|
|
35
|
+
* @param args - Arguments passed to the workflow's main job
|
|
36
|
+
* @param options - Local runner options
|
|
37
|
+
* @returns The main job output
|
|
38
|
+
*/
|
|
39
|
+
declare function runWorkflowLocally<W extends AnyWorkflow>(workflow: W, args: WorkflowInput<W>, options?: RunWorkflowLocallyOptions): Promise<WorkflowOutput<W>>;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { RunWorkflowLocallyOptions, runWorkflowLocally };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region src/runtime/workflow.ts
|
|
2
|
+
const api = () => globalThis.tailor.workflow;
|
|
3
|
+
/**
|
|
4
|
+
* See {@link PlatformWorkflowAPI.startWorkflow}.
|
|
5
|
+
* @param args - Forwarded to {@link PlatformWorkflowAPI.startWorkflow}
|
|
6
|
+
* @returns The execution ID of the started workflow
|
|
7
|
+
*/
|
|
8
|
+
const startWorkflow = (...args) => api().startWorkflow(...args);
|
|
9
|
+
/**
|
|
10
|
+
* See {@link PlatformWorkflowAPI.resumeWorkflowExecution}.
|
|
11
|
+
* @param args - Forwarded to {@link PlatformWorkflowAPI.resumeWorkflowExecution}
|
|
12
|
+
* @returns The execution ID of the resumed workflow
|
|
13
|
+
*/
|
|
14
|
+
const resumeWorkflowExecution = (...args) => api().resumeWorkflowExecution(...args);
|
|
15
|
+
/**
|
|
16
|
+
* See {@link PlatformWorkflowAPI.execJobFunction}.
|
|
17
|
+
* @param args - Forwarded to {@link PlatformWorkflowAPI.execJobFunction}
|
|
18
|
+
* @returns The job's return value
|
|
19
|
+
*/
|
|
20
|
+
const execJobFunction = (...args) => api().execJobFunction(...args);
|
|
21
|
+
/**
|
|
22
|
+
* Alias for {@link execJobFunction}. Kept for backward compatibility.
|
|
23
|
+
* @deprecated Use {@link execJobFunction} instead.
|
|
24
|
+
* @param args - Forwarded to {@link PlatformWorkflowAPI.execJobFunction}
|
|
25
|
+
* @returns The job's return value
|
|
26
|
+
*/
|
|
27
|
+
const startJobFunction = (...args) => api().execJobFunction(...args);
|
|
28
|
+
const wait = (...args) => api().wait(...args);
|
|
29
|
+
const resolve = (...args) => api().resolve(...args);
|
|
30
|
+
/** Runtime wrapper namespace for `tailor.workflow`. */
|
|
31
|
+
const workflow = {
|
|
32
|
+
startWorkflow,
|
|
33
|
+
resumeWorkflowExecution,
|
|
34
|
+
execJobFunction,
|
|
35
|
+
startJobFunction,
|
|
36
|
+
wait,
|
|
37
|
+
resolve
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { workflow as t };
|
|
42
|
+
//# sourceMappingURL=workflow-CsaQ9qK-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-CsaQ9qK-.mjs","names":[],"sources":["../src/runtime/workflow.ts"],"sourcesContent":["/**\n * Workflow utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.workflow` runtime API.\n * At runtime this delegates to `globalThis.tailor.workflow`. Use `mockWorkflow`\n * from `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n *\n * The canonical names (`startWorkflow`, `execJobFunction`,\n * `resumeWorkflowExecution`) mirror the public `tailor.v1` RPC vocabulary:\n * `Exec*` is a blocking call that returns the job's result, while `Start*`\n * returns only an execution ID. `startJobFunction` is kept as an alias of\n * `execJobFunction` for code written against earlier v2 prereleases.\n * @example\n * import { workflow } from \"@tailor-platform/sdk/runtime\";\n *\n * const executionId = await workflow.startWorkflow(\"myWorkflow\", { data: \"value\" });\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Specifies the machine user that should be used to execute the workflow.\n * This allows workflows to run with specific authentication context.\n */\nexport interface Invoker {\n /** The namespace where the machine user is defined */\n namespace: string;\n /** The name of the machine user to use for workflow execution */\n machineUserName: string;\n}\n\n/** Options for {@link startWorkflow}. */\nexport interface StartWorkflowOptions {\n /** Optional authentication invoker to specify which machine user should execute the workflow */\n authInvoker?: Invoker;\n}\n\ndeclare const executionPolicyKeyBrand: unique symbol;\n\n/**\n * A concrete runtime key produced by an execution policy instance — either an\n * exact-match policy's `.key`, or a wildcard policy's `.keyFor(suffix)` (see\n * `defineWorkflowExecutionPolicies`). Branded so an arbitrary string that\n * wasn't derived from a declared policy can't be passed as `executionPolicyKey`.\n */\nexport type ExecutionPolicyKey = string & { readonly [executionPolicyKeyBrand]: never };\n\n/** Options for {@link execJobFunction}. */\nexport interface ExecJobFunctionOptions {\n /**\n * Execution policy key matched by the platform against the policies\n * declared with `defineWorkflowExecutionPolicies` in `tailor.config.ts`.\n */\n executionPolicyKey?: ExecutionPolicyKey;\n}\n\n/**\n * Alias for {@link ExecJobFunctionOptions}. Kept for backward compatibility.\n * @deprecated Use {@link ExecJobFunctionOptions} instead.\n */\nexport type StartJobFunctionOptions = ExecJobFunctionOptions;\n\n/**\n * Platform API surface for `tailor.workflow`. Describes the shape the platform\n * runtime injects on `globalThis.tailor.workflow`.\n */\nexport interface PlatformWorkflowAPI {\n /**\n * Starts a workflow and returns its execution ID.\n * @param workflowName - Workflow name as defined in tailor.config\n * @param args - Arguments forwarded to the workflow's main job\n * @param options - Optional start options (e.g. `authInvoker`)\n * @returns The execution ID of the started workflow\n */\n startWorkflow(workflowName: string, args?: any, options?: StartWorkflowOptions): Promise<string>;\n\n /**\n * Resumes a failed or pending-retry workflow execution and returns its execution ID.\n * @param executionId - The execution to resume\n * @returns The execution ID of the resumed workflow\n */\n resumeWorkflowExecution(executionId: string): Promise<string>;\n\n /**\n * Executes a job function and returns its result via durable suspend/replay.\n *\n * Canonical name under the platform verb convention: `Exec*` blocks and\n * returns the job's result, while `Start*` returns only an execution ID.\n * {@link startJobFunction} is an alias that resolves to the same platform\n * implementation.\n * @param jobName - Job name as defined in the workflow\n * @param args - Arguments forwarded to the job\n * @param options - Optional execution options (e.g. `executionPolicyKey`)\n * @returns The job's return value\n */\n execJobFunction(jobName: string, args?: any, options?: ExecJobFunctionOptions): any;\n\n /**\n * Alias for {@link execJobFunction}. Kept for backward compatibility.\n * @deprecated Use {@link execJobFunction} instead.\n * @param jobName - Job name as defined in the workflow\n * @param args - Arguments forwarded to the job\n * @param options - Optional execution options (e.g. `executionPolicyKey`)\n * @returns The job's return value\n */\n startJobFunction(jobName: string, args?: any, options?: StartJobFunctionOptions): any;\n\n /**\n * Suspends the current workflow execution and waits for an external signal to resume.\n * @param key - Wait point key\n * @param payload - Optional payload to record with the wait point\n * @returns The payload supplied by the corresponding `resolve` call\n */\n wait(key: string, payload?: any): any;\n\n /**\n * Resolves a waiting workflow execution, causing it to resume.\n * @param executionId - The execution to resume\n * @param key - Wait point key to resolve\n * @param callback - Callback receiving the wait payload; its return value is forwarded to `wait`\n * @returns A promise that resolves once the resolve has been recorded\n */\n resolve(executionId: string, key: string, callback: (waitPayload: any) => any): Promise<void>;\n}\n\nconst api = (): PlatformWorkflowAPI =>\n (globalThis as unknown as { tailor: { workflow: PlatformWorkflowAPI } }).tailor.workflow;\n\n/**\n * See {@link PlatformWorkflowAPI.startWorkflow}.\n * @param args - Forwarded to {@link PlatformWorkflowAPI.startWorkflow}\n * @returns The execution ID of the started workflow\n */\nconst startWorkflow: PlatformWorkflowAPI[\"startWorkflow\"] = (...args) =>\n api().startWorkflow(...args);\n\n/**\n * See {@link PlatformWorkflowAPI.resumeWorkflowExecution}.\n * @param args - Forwarded to {@link PlatformWorkflowAPI.resumeWorkflowExecution}\n * @returns The execution ID of the resumed workflow\n */\nconst resumeWorkflowExecution: PlatformWorkflowAPI[\"resumeWorkflowExecution\"] = (...args) =>\n api().resumeWorkflowExecution(...args);\n\n/**\n * See {@link PlatformWorkflowAPI.execJobFunction}.\n * @param args - Forwarded to {@link PlatformWorkflowAPI.execJobFunction}\n * @returns The job's return value\n */\nconst execJobFunction: PlatformWorkflowAPI[\"execJobFunction\"] = (...args) =>\n api().execJobFunction(...args);\n\n/**\n * Alias for {@link execJobFunction}. Kept for backward compatibility.\n * @deprecated Use {@link execJobFunction} instead.\n * @param args - Forwarded to {@link PlatformWorkflowAPI.execJobFunction}\n * @returns The job's return value\n */\nconst startJobFunction: PlatformWorkflowAPI[\"startJobFunction\"] = (...args) =>\n api().execJobFunction(...args);\n\nconst wait: PlatformWorkflowAPI[\"wait\"] = (...args) => api().wait(...args);\n\nconst resolve: PlatformWorkflowAPI[\"resolve\"] = (...args) => api().resolve(...args);\n\n/** Runtime wrapper namespace for `tailor.workflow`. */\nexport const workflow = {\n startWorkflow,\n resumeWorkflowExecution,\n execJobFunction,\n startJobFunction,\n wait,\n resolve,\n} as const satisfies PlatformWorkflowAPI;\n"],"mappings":";AA6HA,MAAM,YACH,WAAwE,OAAO;;;;;;AAOlF,MAAM,iBAAuD,GAAG,SAC9D,IAAI,CAAC,CAAC,cAAc,GAAG,IAAI;;;;;;AAO7B,MAAM,2BAA2E,GAAG,SAClF,IAAI,CAAC,CAAC,wBAAwB,GAAG,IAAI;;;;;;AAOvC,MAAM,mBAA2D,GAAG,SAClE,IAAI,CAAC,CAAC,gBAAgB,GAAG,IAAI;;;;;;;AAQ/B,MAAM,oBAA6D,GAAG,SACpE,IAAI,CAAC,CAAC,gBAAgB,GAAG,IAAI;AAE/B,MAAM,QAAqC,GAAG,SAAS,IAAI,CAAC,CAAC,KAAK,GAAG,IAAI;AAEzE,MAAM,WAA2C,GAAG,SAAS,IAAI,CAAC,CAAC,QAAQ,GAAG,IAAI;;AAGlF,MAAa,WAAW;CACtB;CACA;CACA;CACA;CACA;CACA;AACF"}
|