@tailor-platform/sdk 1.76.1 → 1.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/dist/{application-BUfYmf0O.mjs → application-CUxVA7Fs.mjs} +378 -1679
- package/dist/application-CUxVA7Fs.mjs.map +1 -0
- package/dist/application-Dp_-ioiP.mjs +3 -0
- package/dist/cli/cache/bundle-cache.d.mts +2 -1
- package/dist/cli/cache/store.d.mts +1 -1
- package/dist/cli/commands/api/index.d.mts +1 -0
- package/dist/cli/commands/deploy/aigateway.d.mts +5 -1
- package/dist/cli/commands/deploy/application.d.mts +7 -1
- package/dist/cli/commands/deploy/apply-phases.d.mts +14 -1
- package/dist/cli/commands/deploy/auth.d.mts +5 -1
- package/dist/cli/commands/deploy/deploy.d.mts +13 -3
- package/dist/cli/commands/deploy/executor.d.mts +7 -1
- package/dist/cli/commands/deploy/function-registry.d.mts +5 -0
- package/dist/cli/commands/deploy/idp.d.mts +5 -1
- package/dist/cli/commands/deploy/resolver.d.mts +5 -1
- package/dist/cli/commands/deploy/secret-manager.d.mts +5 -1
- package/dist/cli/commands/deploy/staticwebsite.d.mts +5 -1
- package/dist/cli/commands/deploy/tailordb/index.d.mts +8 -1
- package/dist/cli/commands/deploy/types.d.mts +3 -1
- package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +3 -1
- package/dist/cli/commands/deploy/workflow.d.mts +4 -1
- package/dist/cli/commands/executor/get.d.mts +0 -1
- package/dist/cli/commands/executor/jobs.d.mts +0 -1
- package/dist/cli/commands/executor/list.d.mts +0 -1
- package/dist/cli/commands/executor/transform.d.mts +1 -0
- package/dist/cli/commands/executor/trigger.d.mts +0 -1
- package/dist/cli/commands/executor/webhook.d.mts +0 -1
- package/dist/cli/commands/function/get.d.mts +0 -1
- package/dist/cli/commands/function/list.d.mts +0 -1
- package/dist/cli/commands/function/transform.d.mts +1 -0
- package/dist/cli/commands/generate/service.d.mts +5 -1
- package/dist/cli/commands/generate/types.d.mts +3 -1
- package/dist/cli/commands/machineuser/list.d.mts +0 -1
- package/dist/cli/commands/machineuser/token.d.mts +0 -1
- package/dist/cli/commands/oauth2client/get.d.mts +0 -1
- package/dist/cli/commands/oauth2client/list.d.mts +0 -1
- package/dist/cli/commands/oauth2client/transform.d.mts +1 -0
- package/dist/cli/commands/organization/folder/create.d.mts +0 -1
- package/dist/cli/commands/organization/folder/delete.d.mts +0 -1
- package/dist/cli/commands/organization/folder/get.d.mts +0 -1
- package/dist/cli/commands/organization/folder/list.d.mts +0 -1
- package/dist/cli/commands/organization/folder/update.d.mts +0 -1
- package/dist/cli/commands/organization/get.d.mts +0 -1
- package/dist/cli/commands/organization/list.d.mts +0 -1
- package/dist/cli/commands/organization/transform.d.mts +2 -0
- package/dist/cli/commands/organization/tree.d.mts +0 -1
- package/dist/cli/commands/organization/update.d.mts +0 -1
- package/dist/cli/commands/remove.d.mts +0 -1
- package/dist/cli/commands/show.d.mts +9 -4
- package/dist/cli/commands/tailordb/migrate/config.d.mts +0 -1
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +0 -1
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +0 -1
- package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +1 -1
- package/dist/cli/commands/tailordb/truncate.d.mts +0 -1
- package/dist/cli/commands/workflow/executions.d.mts +0 -1
- package/dist/cli/commands/workflow/get.d.mts +2 -1
- package/dist/cli/commands/workflow/list.d.mts +0 -1
- package/dist/cli/commands/workflow/resume.d.mts +0 -1
- package/dist/cli/commands/workflow/start.d.mts +0 -1
- package/dist/cli/commands/workflow/status.d.mts +1 -0
- package/dist/cli/commands/workflow/transform.d.mts +1 -0
- package/dist/cli/commands/workflow/wait.d.mts +0 -1
- package/dist/cli/commands/workflow/waiter.d.mts +1 -1
- package/dist/cli/commands/workspace/app/health.d.mts +0 -1
- package/dist/cli/commands/workspace/app/list.d.mts +0 -1
- package/dist/cli/commands/workspace/app/transform.d.mts +2 -0
- package/dist/cli/commands/workspace/create.d.mts +3 -1
- package/dist/cli/commands/workspace/delete.d.mts +0 -1
- package/dist/cli/commands/workspace/get.d.mts +0 -1
- package/dist/cli/commands/workspace/list.d.mts +1 -1
- package/dist/cli/commands/workspace/restore.d.mts +0 -1
- package/dist/cli/commands/workspace/transform.d.mts +4 -0
- package/dist/cli/commands/workspace/user/invite.d.mts +0 -1
- package/dist/cli/commands/workspace/user/list.d.mts +0 -1
- package/dist/cli/commands/workspace/user/remove.d.mts +0 -1
- package/dist/cli/commands/workspace/user/transform.d.mts +1 -0
- package/dist/cli/commands/workspace/user/update.d.mts +0 -1
- package/dist/cli/index.d.mts +3 -1
- package/dist/cli/index.mjs +660 -56
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +4 -2
- package/dist/cli/lib.mjs +3 -3
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/query/index.d.mts +0 -1
- package/dist/cli/services/application.d.mts +12 -1
- package/dist/cli/services/auth/service.d.mts +2 -0
- package/dist/cli/services/executor/service.d.mts +1 -1
- package/dist/cli/services/http-adapter/bundler.d.mts +3 -1
- package/dist/cli/services/http-adapter/service.d.mts +2 -1
- package/dist/cli/services/resolver/service.d.mts +1 -1
- package/dist/cli/services/tailordb/service.d.mts +3 -1
- package/dist/cli/services/workflow/bundler.d.mts +2 -1
- package/dist/cli/services/workflow/service.d.mts +1 -1
- package/dist/cli/shared/args.d.mts +1 -1
- package/dist/cli/shared/client.d.mts +1 -1
- package/dist/cli/shared/config-loader.d.mts +0 -1
- package/dist/cli/shared/context.d.mts +2 -1
- package/dist/cli/shared/script-executor.d.mts +0 -1
- package/dist/cli/shared/seed-chunker.d.mts +7 -3
- package/dist/cli/shared/type-generator.d.mts +0 -1
- package/dist/cli/shared/workspace-name.d.mts +1 -0
- package/dist/cli/skills.mjs +1 -1
- package/dist/completion/zsh-worker.zsh +18 -1
- package/dist/configure/config/index.d.mts +0 -1
- package/dist/configure/config/types.d.mts +2 -2
- package/dist/configure/index.d.mts +2 -1
- package/dist/configure/index.mjs +248 -4
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/aigateway/index.d.mts +0 -1
- package/dist/configure/services/aigateway/types.d.mts +0 -1
- package/dist/configure/services/auth/index.d.mts +0 -1
- package/dist/configure/services/auth/types.d.mts +14 -13
- package/dist/configure/services/executor/executor.d.mts +0 -1
- package/dist/configure/services/executor/index.d.mts +1 -0
- package/dist/configure/services/executor/operation.d.mts +1 -2
- package/dist/configure/services/executor/trigger/event.d.mts +0 -1
- package/dist/configure/services/executor/trigger/index.d.mts +0 -1
- package/dist/configure/services/executor/trigger/schedule.d.mts +0 -1
- package/dist/configure/services/executor/trigger/webhook.d.mts +0 -1
- package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -2
- package/dist/configure/services/idp/index.d.mts +1 -5
- package/dist/configure/services/idp/permission.d.mts +4 -5
- package/dist/configure/services/idp/types.d.mts +0 -1
- package/dist/configure/services/index.d.mts +5 -0
- package/dist/configure/services/resolver/resolver.d.mts +0 -1
- package/dist/configure/services/resolver/types.d.mts +0 -1
- package/dist/configure/services/secrets/index.d.mts +0 -1
- package/dist/configure/services/secrets/types.d.mts +0 -1
- package/dist/configure/services/staticwebsite/index.d.mts +0 -1
- package/dist/configure/services/staticwebsite/types.d.mts +0 -1
- package/dist/configure/services/tailordb/permission.d.mts +4 -5
- package/dist/configure/services/tailordb/schema.d.mts +21 -8
- package/dist/configure/services/tailordb/types.d.mts +4 -5
- package/dist/configure/services/workflow/execution-policy.d.mts +0 -1
- package/dist/configure/services/workflow/execution-policy.types.d.mts +0 -1
- package/dist/configure/services/workflow/index.d.mts +1 -0
- package/dist/configure/services/workflow/job.d.mts +0 -1
- package/dist/configure/services/workflow/wait-point.d.mts +0 -1
- package/dist/configure/services/workflow/workflow.d.mts +0 -1
- package/dist/configure/types/field-runtime.d.mts +1 -1
- package/dist/configure/types/field.d.mts +1 -2
- package/dist/configure/types/field.types.d.mts +1 -2
- package/dist/configure/types/type.d.mts +1 -1
- package/dist/configure/user.d.mts +0 -1
- package/dist/{crashreport-ayWANEZ6.mjs → crashreport-BNWUM6Kf.mjs} +4 -3
- package/dist/{crashreport-ayWANEZ6.mjs.map → crashreport-BNWUM6Kf.mjs.map} +1 -1
- package/dist/{crashreport-Dy4ZzSkd.mjs → crashreport-BafWvjjX.mjs} +1 -1
- package/dist/errors-DVFS0AZk.mjs +100 -0
- package/dist/errors-DVFS0AZk.mjs.map +1 -0
- package/dist/{globals-CcU1ONiK.mjs → globals-CvizbGLY.mjs} +2 -2
- package/dist/{globals-CcU1ONiK.mjs.map → globals-CvizbGLY.mjs.map} +1 -1
- package/dist/kysely/index.d.mts +3 -4
- package/dist/{logger-BEiZZ3qT.mjs → logger-BwS4ppwO.mjs} +3 -3
- package/dist/logger-BwS4ppwO.mjs.map +1 -0
- package/dist/parser/service/auth/index.d.mts +1 -1
- package/dist/parser/service/auth/schema.d.mts +1 -0
- package/dist/parser/service/http-adapter/index.d.mts +1 -1
- package/dist/parser/service/idp/types.d.mts +1 -0
- package/dist/parser/service/tailordb/types.d.mts +0 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +0 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +0 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +0 -1
- package/dist/plugin/builtin/seed/index.d.mts +0 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/get-generated-type.d.mts +0 -1
- package/dist/plugin/manager.d.mts +3 -1
- package/dist/plugin/types.d.mts +0 -1
- package/dist/plugin/with-context.d.mts +0 -1
- package/dist/{registry-NfSW0BRo.mjs → registry-CYBRvfaU.mjs} +4 -49
- package/dist/registry-CYBRvfaU.mjs.map +1 -0
- package/dist/runtime/aigateway.d.mts +0 -2
- package/dist/runtime/authconnection.d.mts +0 -2
- package/dist/runtime/globals.d.mts +0 -1
- package/dist/runtime/index.d.mts +0 -1
- package/dist/runtime/types.d.mts +16 -7
- package/dist/{runtime-_vUgjiqT.mjs → runtime-BD2vYJFT.mjs} +2382 -1167
- package/dist/runtime-BD2vYJFT.mjs.map +1 -0
- package/dist/{schema-DrVyN-LP.mjs → schema-U6DxoZ8D.mjs} +204 -3
- package/dist/schema-U6DxoZ8D.mjs.map +1 -0
- package/dist/{secret-file-VSVGy1V0.mjs → secret-file-DBqZhjFQ.mjs} +2 -27
- package/dist/{secret-file-VSVGy1V0.mjs.map → secret-file-DBqZhjFQ.mjs.map} +1 -1
- package/dist/{secretmanager-Bd45j7an.mjs → secretmanager-IY4UvinW.mjs} +42 -9
- package/dist/secretmanager-IY4UvinW.mjs.map +1 -0
- package/dist/seed/index.d.mts +3 -2
- package/dist/{seed-fm0LeYP2.mjs → seed-DFFigL8V.mjs} +3 -13
- package/dist/seed-DFFigL8V.mjs.map +1 -0
- package/dist/service-CghpdV-9.mjs +3 -0
- package/dist/{service-DBFZQloR.mjs → service-Cp0I7ZFe.mjs} +3 -3
- package/dist/{service-DBFZQloR.mjs.map → service-Cp0I7ZFe.mjs.map} +1 -1
- package/dist/{service-BCRJ-3NV.mjs → service-D12iQGcS.mjs} +2 -2
- package/dist/{service-BCRJ-3NV.mjs.map → service-D12iQGcS.mjs.map} +1 -1
- package/dist/service_pb-BoLM0X4K.mjs +167 -0
- package/dist/service_pb-BoLM0X4K.mjs.map +1 -0
- package/dist/{service_pb-B2FF59sP.mjs → service_pb-r1T7kpJc.mjs} +1 -1
- package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +0 -1
- package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +0 -1
- package/dist/test-env-key-DuZycyWM.mjs +49 -0
- package/dist/test-env-key-DuZycyWM.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 +5 -2
- package/dist/types/auth-connection.generated.d.mts +11 -5
- package/dist/types/auth.generated.d.mts +118 -85
- package/dist/types/executor.generated.d.mts +76 -84
- package/dist/types/helpers.d.mts +5 -5
- package/dist/types/http-adapter.generated.d.mts +11 -5
- package/dist/types/idp.generated.d.mts +536 -524
- package/dist/types/resolver.generated.d.mts +24 -10
- package/dist/types/staticwebsite.generated.d.mts +7 -3
- package/dist/types/tailordb.generated.d.mts +55 -29
- package/dist/types/workflow.generated.d.mts +9 -4
- package/dist/user-agent-DX2Jnw0-.mjs +28 -0
- package/dist/user-agent-DX2Jnw0-.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +0 -1
- package/dist/utils/test/index.mjs +1 -1
- package/dist/utils/test/mock.d.mts +0 -1
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.d.mts +9 -9
- package/dist/vitest/index.mjs +600 -185
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock-kysely.d.mts +0 -1
- package/dist/vitest/mock.d.mts +8 -8
- package/dist/vitest/mocks/aigateway.d.mts +16 -6
- package/dist/vitest/mocks/authconnection.d.mts +16 -6
- package/dist/vitest/mocks/file.d.mts +24 -6
- package/dist/vitest/mocks/iconv.d.mts +28 -4
- package/dist/vitest/mocks/idp.d.mts +26 -10
- package/dist/vitest/mocks/secretmanager.d.mts +16 -5
- package/dist/vitest/mocks/tailordb.d.mts +54 -10
- package/dist/vitest/mocks/workflow.d.mts +48 -11
- package/dist/vitest/setup.mjs +2 -2
- package/dist/{service_pb-B5w9rjPY.mjs → workspace_resource_pb-Db3fv68L.mjs} +57 -165
- package/dist/workspace_resource_pb-Db3fv68L.mjs.map +1 -0
- package/docs/cli/application.md +58 -11
- package/docs/cli/setup.md +1 -1
- package/docs/cli/workspace.md +6 -4
- package/docs/cli-reference.md +12 -8
- package/docs/runtime.md +3 -4
- package/docs/services/aigateway.md +2 -0
- package/docs/services/tailordb.md +52 -1
- package/docs/services/workflow.md +1 -1
- package/docs/testing.md +103 -89
- package/package.json +16 -16
- package/dist/application-BUfYmf0O.mjs.map +0 -1
- package/dist/application-DbvD5UUz.mjs +0 -3
- package/dist/cli/shared/trigger-context.d.mts +0 -1
- package/dist/errors-Dtf2WPaW.mjs +0 -42
- package/dist/errors-Dtf2WPaW.mjs.map +0 -1
- package/dist/field-runtime-9bfXBAOK.mjs +0 -183
- package/dist/field-runtime-9bfXBAOK.mjs.map +0 -1
- package/dist/job-D-PbD1P3.mjs +0 -55
- package/dist/job-D-PbD1P3.mjs.map +0 -1
- package/dist/logger-BEiZZ3qT.mjs.map +0 -1
- package/dist/registry-NfSW0BRo.mjs.map +0 -1
- package/dist/resource_pb-BRv7AMXK.mjs +0 -49
- package/dist/resource_pb-BRv7AMXK.mjs.map +0 -1
- package/dist/runtime-_vUgjiqT.mjs.map +0 -1
- package/dist/schema-DrVyN-LP.mjs.map +0 -1
- package/dist/secretmanager-Bd45j7an.mjs.map +0 -1
- package/dist/seed-fm0LeYP2.mjs.map +0 -1
- package/dist/service-CPMlIg3X.mjs +0 -3
- package/dist/service_pb-B5w9rjPY.mjs.map +0 -1
- package/dist/types-BwzB2okW.mjs +0 -199
- package/dist/types-BwzB2okW.mjs.map +0 -1
- package/dist/types-KlawuVKa.mjs +0 -4
package/docs/testing.md
CHANGED
|
@@ -67,18 +67,23 @@ import { mockTailordb } from "@tailor-platform/sdk/vitest";
|
|
|
67
67
|
|
|
68
68
|
test("...", () => {
|
|
69
69
|
using db = mockTailordb();
|
|
70
|
-
db.
|
|
70
|
+
db.onQuery(/SELECT age/).returnsRows([{ age: 30 }]);
|
|
71
71
|
// …
|
|
72
72
|
}); // reset automatically here
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
Runtime operations are exposed as typed Vitest mocks wherever the platform API has a stable operation shape. For example, use `file.download.mockResolvedValue(...)`, `iconv.decode.mockReturnValue(...)`, or `wf.job(myJob).mockResolvedValue(...)`, then assert with native Vitest matchers. Service-specific helpers cover stateful fixtures and query matching.
|
|
76
|
+
|
|
77
|
+
Every controller provides two lifecycle methods when manual reuse is useful:
|
|
78
|
+
|
|
79
|
+
- `clear()` removes call history but preserves configured behavior.
|
|
80
|
+
- `reset()` removes call history and configured behavior, restoring the controller's default behavior.
|
|
76
81
|
|
|
77
82
|
> **Requirements:** `using` requires TypeScript ≥ 5.2 and a runtime that provides `Symbol.dispose` (Node ≥ 20.4 — the SDK already targets Node ≥ 22, and Vitest's transformer downlevels the syntax for you).
|
|
78
83
|
>
|
|
79
84
|
> **Acquire what you use:** a namespace is only mocked while you hold it with `using`, so code under test that calls a platform API (e.g. `tailor.workflow`, `tailordb.Client`) must run inside a test that has acquired the matching `mockX()`. The error classes and `tailor.context` are always present.
|
|
80
85
|
>
|
|
81
|
-
> **Seeded secrets survive:** secrets seeded from `tailor.config.ts` stay available across tests;
|
|
86
|
+
> **Seeded secrets survive:** secrets seeded from `tailor.config.ts` stay available across tests; per-test fixtures passed to `mockSecretmanager({ secrets: ... })` apply only within that test.
|
|
82
87
|
|
|
83
88
|
### TailorDB Mock
|
|
84
89
|
|
|
@@ -89,8 +94,8 @@ import { mockTailordb } from "@tailor-platform/sdk/vitest";
|
|
|
89
94
|
|
|
90
95
|
test("resolver queries the database", async () => {
|
|
91
96
|
using db = mockTailordb();
|
|
92
|
-
//
|
|
93
|
-
db.
|
|
97
|
+
// Use an explicit queue when transaction order is part of the test.
|
|
98
|
+
db.enqueueRows(
|
|
94
99
|
[], // BEGIN (empty result)
|
|
95
100
|
[{ age: 30 }], // SELECT (one row)
|
|
96
101
|
[], // COMMIT
|
|
@@ -104,19 +109,15 @@ test("resolver queries the database", async () => {
|
|
|
104
109
|
});
|
|
105
110
|
```
|
|
106
111
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- **`enqueueResult(...rows)`** — Order-based, single query. Arguments are the row objects returned by the next `queryObject` call (`enqueueResult()` for empty, `enqueueResult({ id: "1" })` for one row, `enqueueResult({ a: 1 }, { a: 2 })` for multiple rows). Consumed in FIFO order.
|
|
110
|
-
- **`enqueueResults(...rowsArrays)`** — Order-based, multiple queries. Each argument is a rows array for one upcoming query. Equivalent to calling `enqueueResult` for each entry but easier to read for transactional sequences.
|
|
111
|
-
- **`setQueryResolver((query, params) => rows)`** — Content-based fallback. Called when the queue is empty.
|
|
112
|
+
Match queries by SQL text, a regular expression, SQL plus parameters, or a predicate. The most recently registered matcher wins:
|
|
112
113
|
|
|
113
114
|
```typescript
|
|
114
115
|
test("content-based mock", async () => {
|
|
115
116
|
using db = mockTailordb();
|
|
116
|
-
db.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
db.onQuery({ sql: /FROM users/i, params: ["1"] }).returnsRows([{ id: "1", name: "test" }]);
|
|
118
|
+
db.onQuery(/FROM audit_logs/i)
|
|
119
|
+
.returnsRowsOnce([{ id: "first" }])
|
|
120
|
+
.returnsRows([{ id: "later" }]);
|
|
120
121
|
|
|
121
122
|
const result = await resolver.body({ input: { userId: "1" } });
|
|
122
123
|
|
|
@@ -124,40 +125,46 @@ test("content-based mock", async () => {
|
|
|
124
125
|
});
|
|
125
126
|
```
|
|
126
127
|
|
|
128
|
+
Within one `mockTailordb()` instance, use either `onQuery()` matchers or a direct `queryObject.mockImplementation()` override. A direct override replaces matcher-based behavior, so do not combine the two styles.
|
|
129
|
+
|
|
130
|
+
`returnsRowsOnce` and `rejectsOnce` configure one-time responses before the persistent `returnsRows` or `rejects` response. `enqueueRows(...rowArrays)` remains available for transaction sequences whose exact call order is under test. The existing `enqueueResult`, `enqueueResults`, and `setQueryResolver` helpers remain supported for compatibility.
|
|
131
|
+
|
|
132
|
+
Pass `{ onUnhandled: "error" }` to make an unmatched query fail instead of returning an empty result.
|
|
133
|
+
|
|
127
134
|
### Workflow Mock
|
|
128
135
|
|
|
129
|
-
`.trigger()` runs
|
|
136
|
+
`.trigger()` runs real job bodies locally out of the box (see [Running a full workflow locally](#running-a-full-workflow-locally)). Use `job(definition)` or `workflow(definition)` to get a stable, fully typed Vitest mock for one definition:
|
|
130
137
|
|
|
131
138
|
```typescript
|
|
132
139
|
import { mockWorkflow } from "@tailor-platform/sdk/vitest";
|
|
140
|
+
import { processPayment, validateOrder } from "./jobs";
|
|
133
141
|
|
|
134
142
|
test("workflow triggers jobs", async () => {
|
|
135
143
|
using wf = mockWorkflow();
|
|
136
|
-
wf.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
});
|
|
144
|
+
const validate = wf.job(validateOrder);
|
|
145
|
+
const payment = wf.job(processPayment);
|
|
146
|
+
validate.mockResolvedValue({ valid: true });
|
|
147
|
+
payment.mockResolvedValue({ txnId: "txn-1" });
|
|
141
148
|
|
|
142
149
|
const result = await main({ input: { orderId: "o-1" } });
|
|
143
150
|
|
|
144
|
-
expect(
|
|
145
|
-
|
|
146
|
-
{ jobName: "process-payment", args: { orderId: "o-1" } },
|
|
147
|
-
]);
|
|
151
|
+
expect(validate).toHaveBeenCalledWith({ orderId: "o-1" });
|
|
152
|
+
expect(payment).toHaveBeenCalledWith({ orderId: "o-1" });
|
|
148
153
|
});
|
|
149
154
|
```
|
|
150
155
|
|
|
151
|
-
`
|
|
156
|
+
Unconfigured definition mocks continue to run their real implementations. The lower-level `triggerJobFunction`, `triggerWorkflow`, `resumeWorkflow`, `wait`, and `resolve` mocks and the existing `setJobHandler`, `enqueueResult`, `enqueueResults`, and call-record helpers remain available.
|
|
157
|
+
|
|
158
|
+
Use `waitPoint(definition)` for typed wait-point control:
|
|
152
159
|
|
|
153
160
|
```typescript
|
|
154
161
|
using wf = mockWorkflow();
|
|
162
|
+
const approvalMock = wf.waitPoint(approvalWaitPoint);
|
|
155
163
|
|
|
156
|
-
|
|
157
|
-
|
|
164
|
+
approvalMock.wait.mockResolvedValue({ approved: true });
|
|
165
|
+
await approvalWaitPoint.wait({ message: "Please approve" });
|
|
158
166
|
|
|
159
|
-
|
|
160
|
-
wf.enqueueResults({ valid: true }, { txnId: "txn-1" });
|
|
167
|
+
expect(approvalMock.wait).toHaveBeenCalledWith({ message: "Please approve" });
|
|
161
168
|
```
|
|
162
169
|
|
|
163
170
|
### SecretManager Mock
|
|
@@ -166,13 +173,14 @@ wf.enqueueResults({ valid: true }, { txnId: "txn-1" });
|
|
|
166
173
|
import { mockSecretmanager } from "@tailor-platform/sdk/vitest";
|
|
167
174
|
|
|
168
175
|
test("reads secrets from vault", async () => {
|
|
169
|
-
using sm = mockSecretmanager(
|
|
170
|
-
|
|
171
|
-
"my-vault": { API_KEY: "sk-123", DB_PASS: "secret" },
|
|
176
|
+
using sm = mockSecretmanager({
|
|
177
|
+
secrets: { "my-vault": { API_KEY: "sk-123" } },
|
|
172
178
|
});
|
|
179
|
+
sm.setSecret("my-vault", "API_KEY", "override");
|
|
180
|
+
sm.mergeSecrets("my-vault", { DB_PASS: "secret" });
|
|
173
181
|
|
|
174
182
|
const key = await tailor.secretmanager.getSecret("my-vault", "API_KEY");
|
|
175
|
-
expect(key).toBe("
|
|
183
|
+
expect(key).toBe("override");
|
|
176
184
|
expect(sm.calls).toEqual([{ method: "getSecret", vault: "my-vault", name: "API_KEY" }]);
|
|
177
185
|
});
|
|
178
186
|
```
|
|
@@ -183,65 +191,65 @@ test("reads secrets from vault", async () => {
|
|
|
183
191
|
import { mockAuthconnection } from "@tailor-platform/sdk/vitest";
|
|
184
192
|
|
|
185
193
|
test("returns configured token", async () => {
|
|
186
|
-
using ac = mockAuthconnection(
|
|
187
|
-
|
|
188
|
-
|
|
194
|
+
using ac = mockAuthconnection({
|
|
195
|
+
tokens: { google: { access_token: "ya29.xxx" } },
|
|
196
|
+
onUnhandled: "error",
|
|
189
197
|
});
|
|
198
|
+
ac.setToken("google", { access_token: "replacement" });
|
|
190
199
|
|
|
191
200
|
const token = await tailor.authconnection.getConnectionToken("google");
|
|
192
|
-
expect(token.access_token).toBe("
|
|
201
|
+
expect(token.access_token).toBe("replacement");
|
|
193
202
|
});
|
|
194
203
|
```
|
|
195
204
|
|
|
196
|
-
|
|
205
|
+
By default, an unconfigured connection returns `{ access_token: "mock-token" }`. Pass `onUnhandled: "error"` to fail instead.
|
|
197
206
|
|
|
198
207
|
### IDP Mock
|
|
199
208
|
|
|
200
209
|
```typescript
|
|
201
210
|
import { mockIdp } from "@tailor-platform/sdk/vitest";
|
|
202
211
|
|
|
203
|
-
test("
|
|
204
|
-
using idp = mockIdp();
|
|
205
|
-
idp.
|
|
206
|
-
|
|
207
|
-
|
|
212
|
+
test("namespace-specific mock", async () => {
|
|
213
|
+
using idp = mockIdp({ onUnhandled: "error" });
|
|
214
|
+
const customerIdp = idp.namespace("my-ns");
|
|
215
|
+
customerIdp.user.mockResolvedValue({
|
|
216
|
+
id: "u-1",
|
|
217
|
+
name: "alice",
|
|
218
|
+
disabled: false,
|
|
219
|
+
mfaEnrolled: false,
|
|
220
|
+
mfaFactorIds: [],
|
|
208
221
|
});
|
|
209
222
|
|
|
210
223
|
const client = new tailor.idp.Client({ namespace: "my-ns" });
|
|
211
224
|
const user = await client.user("u-1");
|
|
212
225
|
expect(user.name).toBe("alice");
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
test("queue-based", async () => {
|
|
216
|
-
using idp = mockIdp();
|
|
217
|
-
idp.enqueueResult({ id: "u-1", name: "alice", disabled: false });
|
|
218
|
-
|
|
219
|
-
const client = new tailor.idp.Client({ namespace: "my-ns" });
|
|
220
|
-
const user = await client.user("u-1");
|
|
221
|
-
expect(user.name).toBe("alice");
|
|
222
|
-
expect(idp.calls).toMatchObject([{ method: "user", namespace: "my-ns" }]);
|
|
226
|
+
expect(customerIdp.user).toHaveBeenCalledWith("u-1");
|
|
223
227
|
});
|
|
224
228
|
```
|
|
225
229
|
|
|
230
|
+
Each namespace exposes typed mocks for `users`, `user`, `userByName`, `createUser`, `updateUser`, `deleteUser`, `sendPasswordResetEmail`, and `unenrollMfa`. The existing resolver, queue, and aggregate `calls` APIs remain supported.
|
|
231
|
+
|
|
226
232
|
### File Mock
|
|
227
233
|
|
|
228
234
|
```typescript
|
|
229
235
|
import { mockFile } from "@tailor-platform/sdk/vitest";
|
|
230
236
|
|
|
231
237
|
test("mock file download", async () => {
|
|
232
|
-
using file = mockFile();
|
|
233
|
-
file.
|
|
238
|
+
using file = mockFile({ onUnhandled: "error" });
|
|
239
|
+
file.download.mockResolvedValue({
|
|
234
240
|
data: new Uint8Array([1, 2, 3]),
|
|
235
241
|
metadata: { contentType: "image/png", fileSize: 3, sha256sum: "abc", lastUploadedAt: "" },
|
|
236
242
|
});
|
|
237
243
|
|
|
238
244
|
const result = await tailordb.file.download("ns", "Doc", "attachment", "r-1");
|
|
239
245
|
expect(result.data).toEqual(new Uint8Array([1, 2, 3]));
|
|
240
|
-
expect(file.
|
|
246
|
+
expect(file.download).toHaveBeenCalledWith("ns", "Doc", "attachment", "r-1");
|
|
241
247
|
});
|
|
242
248
|
```
|
|
243
249
|
|
|
244
|
-
|
|
250
|
+
All File operations are typed Vitest mocks: `upload`, `download`, `downloadAsBase64`, `delete`, `getMetadata`, `openDownloadStream`, `downloadStream`, and `uploadStream`. Use native methods such as `mockResolvedValueOnce` and `mockRejectedValueOnce` to model success and failure. The existing resolver, queue, and aggregate `calls` APIs remain supported.
|
|
251
|
+
|
|
252
|
+
For `downloadStream`, configure a `FileDownloadStreamResponse` object with a `ReadableStream` body and metadata:
|
|
245
253
|
|
|
246
254
|
```typescript
|
|
247
255
|
test("mock file download stream", async () => {
|
|
@@ -252,7 +260,7 @@ test("mock file download stream", async () => {
|
|
|
252
260
|
controller.close();
|
|
253
261
|
},
|
|
254
262
|
});
|
|
255
|
-
file.
|
|
263
|
+
file.downloadStream.mockResolvedValue({
|
|
256
264
|
body,
|
|
257
265
|
metadata: { contentType: "image/png", fileSize: 3, sha256sum: "abc", lastUploadedAt: "" },
|
|
258
266
|
});
|
|
@@ -262,7 +270,7 @@ test("mock file download stream", async () => {
|
|
|
262
270
|
});
|
|
263
271
|
```
|
|
264
272
|
|
|
265
|
-
For the deprecated `openDownloadStream`,
|
|
273
|
+
For the deprecated `openDownloadStream`, `enqueueResult` can adapt an iterable of `StreamValue` items — `metadata`, one or more `chunk` items, and a terminal `complete`. Raw `Uint8Array` / `ArrayBuffer` chunks are rejected so tests stay aligned with the platform's structured stream contract.
|
|
266
274
|
|
|
267
275
|
```typescript
|
|
268
276
|
test("mock file download stream (deprecated openDownloadStream)", async () => {
|
|
@@ -291,10 +299,7 @@ import { mockIconv } from "@tailor-platform/sdk/vitest";
|
|
|
291
299
|
|
|
292
300
|
test("mock encoding conversion", () => {
|
|
293
301
|
using iconv = mockIconv();
|
|
294
|
-
iconv.
|
|
295
|
-
if (method === "decode") return "decoded-text";
|
|
296
|
-
return null; // falls back to default empty string
|
|
297
|
-
});
|
|
302
|
+
iconv.decode.mockReturnValue("decoded-text");
|
|
298
303
|
|
|
299
304
|
const result = tailor.iconv.decode(new Uint8Array([0x48, 0x69]), "UTF-8");
|
|
300
305
|
expect(result).toBe("decoded-text");
|
|
@@ -302,22 +307,26 @@ test("mock encoding conversion", () => {
|
|
|
302
307
|
});
|
|
303
308
|
```
|
|
304
309
|
|
|
310
|
+
`convert`, `convertBuffer`, `decode`, `encode`, and `encodings` are all typed Vitest mocks. Pass `{ onUnhandled: "error" }` to fail calls without a configured implementation. The existing resolver and aggregate `calls` APIs remain supported.
|
|
311
|
+
|
|
305
312
|
### AI Gateway Mock
|
|
306
313
|
|
|
307
314
|
```typescript
|
|
308
315
|
import { mockAigateway } from "@tailor-platform/sdk/vitest";
|
|
309
316
|
|
|
310
317
|
test("resolves an AI Gateway URL", async () => {
|
|
311
|
-
using aigateway = mockAigateway(
|
|
312
|
-
|
|
318
|
+
using aigateway = mockAigateway({
|
|
319
|
+
urls: { "my-aigateway": "https://my-aigateway.example.com" },
|
|
320
|
+
});
|
|
321
|
+
aigateway.setUrl("my-aigateway", "https://replacement.example.com");
|
|
313
322
|
|
|
314
323
|
const { url } = await tailor.aigateway.get("my-aigateway");
|
|
315
|
-
expect(url).toBe("https://
|
|
324
|
+
expect(url).toBe("https://replacement.example.com");
|
|
316
325
|
expect(aigateway.calls).toEqual([{ name: "my-aigateway" }]);
|
|
317
326
|
});
|
|
318
327
|
```
|
|
319
328
|
|
|
320
|
-
Calling `get` for a name that
|
|
329
|
+
Calling `get` for a name that has not been registered throws. `setUrls` remains available when replacing the complete URL fixture.
|
|
321
330
|
|
|
322
331
|
### Loading Secrets from Config
|
|
323
332
|
|
|
@@ -330,7 +339,7 @@ export default defineConfig({
|
|
|
330
339
|
});
|
|
331
340
|
```
|
|
332
341
|
|
|
333
|
-
This makes `tailor.secretmanager.getSecret("vault", "key")` return the values defined in your config. You can still override with `
|
|
342
|
+
This makes `tailor.secretmanager.getSecret("vault", "key")` return the values defined in your config. You can still override with `mockSecretmanager({ secrets: ... })` in individual tests: a per-test overlay applies only within that test, and the config-loaded secrets remain available to every other test.
|
|
334
343
|
|
|
335
344
|
### Per-Project Configuration
|
|
336
345
|
|
|
@@ -555,20 +564,22 @@ Reach for [`mockTailordb`](#mocking-the-tailordb-client) instead when you want t
|
|
|
555
564
|
|
|
556
565
|
#### Resolvers that resume a workflow
|
|
557
566
|
|
|
558
|
-
Resolvers that call `waitPoint.resolve(...)` delegate to `tailor.workflow.resolve` at runtime. With the `tailor-runtime` environment active, use `mockWorkflow().
|
|
567
|
+
Resolvers that call `waitPoint.resolve(...)` delegate to `tailor.workflow.resolve` at runtime. With the `tailor-runtime` environment active, use `mockWorkflow().waitPoint(definition)` to invoke the callback with the payload that originally suspended the job:
|
|
559
568
|
|
|
560
569
|
```typescript
|
|
561
570
|
import { unauthenticatedTailorUser } from "@tailor-platform/sdk/test";
|
|
562
571
|
import { mockWorkflow } from "@tailor-platform/sdk/vitest";
|
|
563
572
|
import { describe, expect, test } from "vitest";
|
|
573
|
+
import { approval } from "../workflow/approval";
|
|
564
574
|
import resolver from "./resolveApproval";
|
|
565
575
|
|
|
566
576
|
describe("resolveApproval resolver", () => {
|
|
567
577
|
test("resolves approval with approved=true", async () => {
|
|
568
578
|
using wf = mockWorkflow();
|
|
569
|
-
wf.
|
|
570
|
-
|
|
571
|
-
|
|
579
|
+
const approvalMock = wf.waitPoint(approval);
|
|
580
|
+
approvalMock.setResolvePayload({
|
|
581
|
+
message: "Please approve order order-1",
|
|
582
|
+
orderId: "order-1",
|
|
572
583
|
});
|
|
573
584
|
|
|
574
585
|
const result = await resolver.body({
|
|
@@ -578,12 +589,12 @@ describe("resolveApproval resolver", () => {
|
|
|
578
589
|
});
|
|
579
590
|
|
|
580
591
|
expect(result).toEqual({ resolved: true });
|
|
581
|
-
expect(
|
|
592
|
+
expect(approvalMock.resolve).toHaveBeenCalledWith("exec-1", expect.any(Function));
|
|
582
593
|
});
|
|
583
594
|
});
|
|
584
595
|
```
|
|
585
596
|
|
|
586
|
-
`
|
|
597
|
+
`setResolvePayload` is typed from the wait-point definition. The lower-level `setResolveHandler` and `resolveCalls` APIs remain available when a test must control several wait points together.
|
|
587
598
|
|
|
588
599
|
#### Resolvers that resume failed workflows
|
|
589
600
|
|
|
@@ -683,24 +694,26 @@ describe("validateOrder", () => {
|
|
|
683
694
|
|
|
684
695
|
#### Jobs that trigger other jobs
|
|
685
696
|
|
|
686
|
-
|
|
697
|
+
Use `mockWorkflow().job(definition)` to replace dependent jobs with deterministic results:
|
|
687
698
|
|
|
688
699
|
```typescript
|
|
689
|
-
import {
|
|
700
|
+
import { mockWorkflow } from "@tailor-platform/sdk/vitest";
|
|
701
|
+
import { describe, expect, test } from "vitest";
|
|
690
702
|
import { fulfillOrder, processPayment, sendConfirmation, validateOrder } from "./order-fulfillment";
|
|
691
703
|
|
|
692
704
|
describe("fulfillOrder", () => {
|
|
693
705
|
test("chains validate → pay → confirm", async () => {
|
|
694
|
-
using
|
|
706
|
+
using wf = mockWorkflow();
|
|
707
|
+
const validate = wf.job(validateOrder).mockResolvedValue({
|
|
695
708
|
valid: true,
|
|
696
709
|
orderId: "order-1",
|
|
697
710
|
});
|
|
698
|
-
|
|
711
|
+
wf.job(processPayment).mockResolvedValue({
|
|
699
712
|
transactionId: "txn-order-1",
|
|
700
713
|
amount: 100,
|
|
701
714
|
status: "completed",
|
|
702
715
|
});
|
|
703
|
-
|
|
716
|
+
wf.job(sendConfirmation).mockResolvedValue({
|
|
704
717
|
orderId: "order-1",
|
|
705
718
|
transactionId: "txn-order-1",
|
|
706
719
|
confirmed: true,
|
|
@@ -708,7 +721,7 @@ describe("fulfillOrder", () => {
|
|
|
708
721
|
|
|
709
722
|
const result = await fulfillOrder.body({ orderId: "order-1", amount: 100 }, { env: {} });
|
|
710
723
|
|
|
711
|
-
expect(
|
|
724
|
+
expect(validate).toHaveBeenCalledWith({ orderId: "order-1", amount: 100 });
|
|
712
725
|
expect(result).toMatchObject({ confirmed: true, paymentStatus: "completed" });
|
|
713
726
|
});
|
|
714
727
|
});
|
|
@@ -718,30 +731,31 @@ describe("fulfillOrder", () => {
|
|
|
718
731
|
|
|
719
732
|
#### Jobs that wait on approval
|
|
720
733
|
|
|
721
|
-
`.wait()` calls delegate to `tailor.workflow.wait`. With the `tailor-runtime` environment active, use `mockWorkflow().
|
|
734
|
+
`.wait()` calls delegate to `tailor.workflow.wait`. With the `tailor-runtime` environment active, use `mockWorkflow().waitPoint(definition)` to drive each branch with a typed mock:
|
|
722
735
|
|
|
723
736
|
```typescript
|
|
724
737
|
import { mockWorkflow } from "@tailor-platform/sdk/vitest";
|
|
725
738
|
import { describe, expect, test } from "vitest";
|
|
726
|
-
import { processWithApproval } from "./approval";
|
|
739
|
+
import { approval, processWithApproval } from "./approval";
|
|
727
740
|
|
|
728
741
|
describe("processWithApproval", () => {
|
|
729
742
|
test("returns approved status when .wait() resolves positively", async () => {
|
|
730
743
|
using wf = mockWorkflow();
|
|
731
|
-
wf.
|
|
744
|
+
const approvalMock = wf.waitPoint(approval);
|
|
745
|
+
approvalMock.wait.mockResolvedValue({ approved: true });
|
|
732
746
|
|
|
733
747
|
const result = await processWithApproval.body({ orderId: "order-1" }, { env: {} });
|
|
734
748
|
|
|
735
749
|
expect(result).toEqual({ orderId: "order-1", status: "approved" });
|
|
736
|
-
expect(
|
|
737
|
-
|
|
738
|
-
|
|
750
|
+
expect(approvalMock.wait).toHaveBeenCalledWith({
|
|
751
|
+
message: "Please approve order order-1",
|
|
752
|
+
orderId: "order-1",
|
|
739
753
|
});
|
|
740
754
|
});
|
|
741
755
|
|
|
742
756
|
test("returns rejected status when .wait() resolves negatively", async () => {
|
|
743
757
|
using wf = mockWorkflow();
|
|
744
|
-
wf.
|
|
758
|
+
wf.waitPoint(approval).wait.mockResolvedValue({ approved: false });
|
|
745
759
|
|
|
746
760
|
const result = await processWithApproval.body({ orderId: "order-2" }, { env: {} });
|
|
747
761
|
|
|
@@ -750,7 +764,7 @@ describe("processWithApproval", () => {
|
|
|
750
764
|
});
|
|
751
765
|
```
|
|
752
766
|
|
|
753
|
-
`setWaitHandler`
|
|
767
|
+
The lower-level `setWaitHandler` and `waitCalls` APIs remain available when one handler must cover several wait points.
|
|
754
768
|
|
|
755
769
|
#### Running a full workflow locally
|
|
756
770
|
|
|
@@ -769,7 +783,7 @@ describe("order-fulfillment workflow", () => {
|
|
|
769
783
|
});
|
|
770
784
|
```
|
|
771
785
|
|
|
772
|
-
Acquire `mockWorkflow()` only when you need to override a dependent
|
|
786
|
+
Acquire `mockWorkflow()` only when you need to override a dependent definition with `wf.job(...)` / `wf.workflow(...)` (the rest still run their real bodies), control the env via `wf.setEnv(...)`, or assert on calls.
|
|
773
787
|
|
|
774
788
|
**Use when:** you want to verify orchestration end to end without the cost of a real deployment.
|
|
775
789
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.78.0",
|
|
4
4
|
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
"@opentelemetry/exporter-trace-otlp-proto": "0.220.0",
|
|
159
159
|
"@opentelemetry/resources": "2.9.0",
|
|
160
160
|
"@opentelemetry/sdk-trace-node": "2.9.0",
|
|
161
|
-
"@opentelemetry/semantic-conventions": "1.
|
|
162
|
-
"@oxc-project/types": "0.
|
|
161
|
+
"@opentelemetry/semantic-conventions": "1.43.0",
|
|
162
|
+
"@oxc-project/types": "0.139.0",
|
|
163
163
|
"@standard-schema/spec": "1.1.0",
|
|
164
164
|
"@tailor-platform/function-kysely-tailordb": "0.1.3",
|
|
165
165
|
"@toiroakr/lines-db": "0.10.1",
|
|
@@ -178,21 +178,21 @@
|
|
|
178
178
|
"madge": "8.0.0",
|
|
179
179
|
"mime-types": "3.0.2",
|
|
180
180
|
"open": "11.0.0",
|
|
181
|
-
"oxc-parser": "0.
|
|
181
|
+
"oxc-parser": "0.139.0",
|
|
182
182
|
"p-limit": "7.3.0",
|
|
183
183
|
"pathe": "2.0.3",
|
|
184
184
|
"pgsql-ast-parser": "12.0.2",
|
|
185
185
|
"pkg-types": "2.3.1",
|
|
186
|
-
"politty": "0.11.
|
|
187
|
-
"rolldown": "1.1.
|
|
186
|
+
"politty": "0.11.2",
|
|
187
|
+
"rolldown": "1.1.5",
|
|
188
188
|
"semver": "7.8.5",
|
|
189
189
|
"sql-highlight": "6.1.0",
|
|
190
|
-
"std-env": "4.
|
|
190
|
+
"std-env": "4.2.0",
|
|
191
191
|
"table": "6.9.0",
|
|
192
192
|
"ts-cron-validator": "1.1.5",
|
|
193
193
|
"tsx": "4.23.0",
|
|
194
|
-
"type-fest": "5.
|
|
195
|
-
"undici": "8.
|
|
194
|
+
"type-fest": "5.8.0",
|
|
195
|
+
"undici": "8.7.0",
|
|
196
196
|
"xdg-basedir": "5.1.0",
|
|
197
197
|
"zod": "4.4.3"
|
|
198
198
|
},
|
|
@@ -200,18 +200,18 @@
|
|
|
200
200
|
"@opentelemetry/sdk-trace-base": "2.9.0",
|
|
201
201
|
"@types/madge": "5.0.3",
|
|
202
202
|
"@types/mime-types": "3.0.1",
|
|
203
|
-
"@types/node": "24.13.
|
|
203
|
+
"@types/node": "24.13.3",
|
|
204
204
|
"@types/semver": "7.7.1",
|
|
205
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
205
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
206
206
|
"@vitest/coverage-v8": "4.1.10",
|
|
207
|
-
"oxfmt": "0.
|
|
208
|
-
"oxlint": "1.
|
|
207
|
+
"oxfmt": "0.58.0",
|
|
208
|
+
"oxlint": "1.73.0",
|
|
209
209
|
"oxlint-tsgolint": "0.24.0",
|
|
210
210
|
"sonda": "0.14.0",
|
|
211
|
-
"tsdown": "0.22.
|
|
211
|
+
"tsdown": "0.22.5",
|
|
212
212
|
"typescript": "6.0.3",
|
|
213
213
|
"vitest": "4.1.10",
|
|
214
|
-
"zinfer": "0.2.
|
|
214
|
+
"zinfer": "0.2.5",
|
|
215
215
|
"@tailor-platform/tailor-proto": "^0.0.0"
|
|
216
216
|
},
|
|
217
217
|
"peerDependencies": {
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
"check:import-cycles": "tsx scripts/check-import-cycles.ts",
|
|
245
245
|
"lint:fix": "oxlint --type-aware . --fix",
|
|
246
246
|
"typecheck": "tsc --noEmit",
|
|
247
|
-
"typecheck:go": "tsgo",
|
|
247
|
+
"typecheck:go": "tsgo --tsBuildInfoFile ./.tsgo.tsbuildinfo",
|
|
248
248
|
"perf:typecheck": "bash scripts/perf/exec.sh",
|
|
249
249
|
"perf:runtime": "bash scripts/perf/runtime-perf.sh",
|
|
250
250
|
"prepublish": "pnpm run build",
|