@tailor-platform/sdk 2.36.0 → 2.37.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 +72 -0
- package/dist/{application-DaJbleMi.mjs → application-83WVdH85.mjs} +1 -1
- package/dist/{application-BbORWCj-.mjs → application-Cida-j1g.mjs} +36 -36
- package/dist/application-Cida-j1g.mjs.map +1 -0
- package/dist/cli/commands/deploy/deploy.d.mts +6 -1
- package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +1 -0
- package/dist/cli/commands/executor/jobs.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/config.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +10 -0
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +28 -2
- package/dist/cli/commands/tailordb/migrate/hints.d.mts +1 -0
- package/dist/cli/commands/tailordb/migrate/remote-state.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/schema-checks.d.mts +3 -1
- package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +44 -6
- package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +8 -0
- package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -0
- package/dist/cli/commands/workspace/create.d.mts +1 -1
- package/dist/cli/lib.d.mts +2 -2
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +52 -51
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/client.d.mts +26 -0
- package/dist/cli/shared/function-execution.d.mts +2 -0
- package/dist/cli/shared/prompt.d.mts +9 -4
- package/dist/completion/zsh-worker.zsh +21 -13
- package/dist/configure/config/index.d.mts +2 -0
- package/dist/configure/config/types.d.mts +2 -0
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/tailordb/schema.d.mts +1 -0
- package/dist/configure/services/tailordb/types.d.mts +3 -0
- package/dist/crashreport-C2AcQNTe.mjs +1 -0
- package/dist/{crashreport-DGU6lwiX.mjs → crashreport-D_wf4GZh.mjs} +4 -4
- package/dist/{crashreport-DGU6lwiX.mjs.map → crashreport-D_wf4GZh.mjs.map} +1 -1
- package/dist/date-representation-Cr7W7Pn2.mjs.map +1 -1
- package/dist/{errors-BXmGBX-7.mjs → errors-Dmdnq0zi.mjs} +2 -2
- package/dist/errors-Dmdnq0zi.mjs.map +1 -0
- package/dist/{kysely-type-B0ri1-Xs.mjs → kysely-type-DVL90_oX.mjs} +6 -6
- package/dist/kysely-type-DVL90_oX.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -3
- package/dist/plugin/get-generated-table.d.mts +4 -0
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/types.d.mts +55 -3
- package/dist/plugin/with-context.d.mts +16 -0
- package/dist/register-ts-hook-Ht4zCseV.mjs +1115 -0
- package/dist/register-ts-hook-Ht4zCseV.mjs.map +1 -0
- package/dist/schema-BU1aIQ63.mjs.map +1 -1
- package/dist/{secret-file-BxZ-J_Nz.mjs → secret-file-DiuEcLFP.mjs} +2 -2
- package/dist/{secret-file-BxZ-J_Nz.mjs.map → secret-file-DiuEcLFP.mjs.map} +1 -1
- package/dist/service-CZ0EdD2-.mjs +10 -0
- package/dist/service-CZ0EdD2-.mjs.map +1 -0
- package/dist/service-DDrbdyd-.mjs +2 -0
- package/dist/{service-CaGmqg0r.mjs.map → service-DDrbdyd-.mjs.map} +1 -1
- package/dist/service-WhSyhaho.mjs +1 -0
- package/dist/service_pb-BMHhVot2.mjs +1 -0
- package/dist/service_pb-BxMSK0gg.mjs +2 -0
- package/dist/service_pb-BxMSK0gg.mjs.map +1 -0
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +3 -3
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +92 -0
- package/dist/tailor-proto/src/tailor/v1/notification_pb.d.mts +176 -0
- package/dist/tailor-proto/src/tailor/v1/notification_resource_pb.d.mts +172 -0
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +78 -0
- package/dist/types/app-config.generated.d.mts +1 -1
- package/dist/types/auth-connection.generated.d.mts +2 -2
- package/dist/types/auth.generated.d.mts +13 -13
- package/dist/types/executor.generated.d.mts +25 -25
- package/dist/types/field.generated.d.mts +2 -2
- package/dist/types/http-adapter.generated.d.mts +4 -4
- package/dist/types/idp.generated.d.mts +272 -272
- package/dist/types/resolver.generated.d.mts +10 -10
- package/dist/types/tailordb.generated.d.mts +84 -80
- package/dist/types/workflow.generated.d.mts +2 -2
- package/dist/vitest/date-representation.d.mts +2 -0
- package/dist/vitest/environment.d.mts +1 -0
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/migration-steps.d.mts +13 -2
- package/dist/vitest/mock-kysely.d.mts +12 -2
- package/dist/vitest/mocks/aigateway.d.mts +7 -1
- package/dist/vitest/mocks/authconnection.d.mts +7 -1
- package/dist/vitest/mocks/file.d.mts +8 -2
- package/dist/vitest/mocks/iconv.d.mts +7 -1
- package/dist/vitest/mocks/idp.d.mts +7 -1
- package/dist/vitest/mocks/logger.d.mts +7 -1
- package/dist/vitest/mocks/secretmanager.d.mts +7 -1
- package/dist/vitest/mocks/tailordb-pglite.d.mts +12 -2
- package/dist/vitest/mocks/tailordb.d.mts +22 -4
- package/dist/vitest/mocks/workflow.d.mts +2 -1
- package/dist/vitest/pglite-kysely.d.mts +18 -2
- package/dist/vitest/pglite-temporal.d.mts +5 -1
- package/dist/vitest/workflow-local.d.mts +7 -0
- package/dist/{workspace_resource_pb-C4CkoYww.mjs → workspace_resource_pb-7smKERdZ.mjs} +2 -2
- package/dist/workspace_resource_pb-7smKERdZ.mjs.map +1 -0
- package/docs/cli/application.md +51 -21
- package/docs/cli/executor.md +2 -0
- package/docs/cli/function.md +3 -1
- package/docs/cli/tailordb.md +30 -22
- package/docs/cli/workflow.md +2 -0
- package/docs/cli/workspace.md +19 -17
- package/docs/cli-reference.md +5 -4
- package/docs/configuration.md +2 -2
- package/docs/data-clone.md +1 -1
- package/docs/github-actions.md +104 -15
- package/docs/plugin/custom.md +4 -4
- package/docs/runtime.md +1 -1
- package/docs/services/auth.md +2 -0
- package/docs/services/idp.md +2 -0
- package/docs/services/tailordb/index.md +7 -2
- package/docs/services/tailordb/migration.md +71 -30
- package/docs/services/workflow.md +1 -1
- package/docs/testing.md +9 -9
- package/package.json +13 -13
- package/dist/application-BbORWCj-.mjs.map +0 -1
- package/dist/crashreport-WsYAWARW.mjs +0 -1
- package/dist/errors-BXmGBX-7.mjs.map +0 -1
- package/dist/kysely-type-B0ri1-Xs.mjs.map +0 -1
- package/dist/register-ts-hook-iAcG1dfz.mjs +0 -1057
- package/dist/register-ts-hook-iAcG1dfz.mjs.map +0 -1
- package/dist/service-CaGmqg0r.mjs +0 -2
- package/dist/service-DTrVVaDJ.mjs +0 -1
- package/dist/service-hIarp2Gl.mjs +0 -8
- package/dist/service-hIarp2Gl.mjs.map +0 -1
- package/dist/service_pb-6EkMfdOb.mjs +0 -2
- package/dist/service_pb-6EkMfdOb.mjs.map +0 -1
- package/dist/service_pb-CsJKokDl.mjs +0 -1
- package/dist/workspace_resource_pb-C4CkoYww.mjs.map +0 -1
|
@@ -3,11 +3,15 @@ import { TailorEnv, TailorPrincipal } from "../runtime/types.mjs";
|
|
|
3
3
|
* Plugin executor factory function type.
|
|
4
4
|
* Takes context and returns an executor configuration.
|
|
5
5
|
* Returns unknown since the exact return type depends on createExecutor's generic params.
|
|
6
|
+
*
|
|
7
|
+
* **Beta:** This API may change in future releases.
|
|
6
8
|
*/
|
|
7
9
|
export type PluginExecutorFactory<Ctx> = (ctx: Ctx) => unknown;
|
|
8
10
|
/**
|
|
9
11
|
* Base args for plugin executor function operations.
|
|
10
12
|
* Provides typed access to runtime context without requiring specific record types.
|
|
13
|
+
*
|
|
14
|
+
* **Beta:** This API may change in future releases.
|
|
11
15
|
*/
|
|
12
16
|
export interface PluginFunctionArgs {
|
|
13
17
|
/** Workspace ID where the executor runs */
|
|
@@ -25,6 +29,8 @@ export interface PluginFunctionArgs {
|
|
|
25
29
|
}
|
|
26
30
|
/**
|
|
27
31
|
* Args for plugin executors triggered on record creation.
|
|
32
|
+
*
|
|
33
|
+
* **Beta:** This API may change in future releases.
|
|
28
34
|
*/
|
|
29
35
|
export interface PluginRecordCreatedArgs extends PluginFunctionArgs {
|
|
30
36
|
/** The newly created record */
|
|
@@ -32,6 +38,8 @@ export interface PluginRecordCreatedArgs extends PluginFunctionArgs {
|
|
|
32
38
|
}
|
|
33
39
|
/**
|
|
34
40
|
* Args for plugin executors triggered on record update.
|
|
41
|
+
*
|
|
42
|
+
* **Beta:** This API may change in future releases.
|
|
35
43
|
*/
|
|
36
44
|
export interface PluginRecordUpdatedArgs extends PluginFunctionArgs {
|
|
37
45
|
/** The record after update */
|
|
@@ -41,6 +49,8 @@ export interface PluginRecordUpdatedArgs extends PluginFunctionArgs {
|
|
|
41
49
|
}
|
|
42
50
|
/**
|
|
43
51
|
* Args for plugin executors triggered on record deletion.
|
|
52
|
+
*
|
|
53
|
+
* **Beta:** This API may change in future releases.
|
|
44
54
|
*/
|
|
45
55
|
export interface PluginRecordDeletedArgs extends PluginFunctionArgs {
|
|
46
56
|
/** The deleted record */
|
|
@@ -49,11 +59,15 @@ export interface PluginRecordDeletedArgs extends PluginFunctionArgs {
|
|
|
49
59
|
/**
|
|
50
60
|
* Database schema type for plugins.
|
|
51
61
|
* Since plugins work with dynamic types, the schema uses Record types.
|
|
62
|
+
*
|
|
63
|
+
* **Beta:** This API may change in future releases.
|
|
52
64
|
*/
|
|
53
65
|
export type PluginDBSchema = Record<string, Record<string, unknown>>;
|
|
54
66
|
/**
|
|
55
67
|
* Base record type for TailorDB records.
|
|
56
68
|
* All records have an id field.
|
|
69
|
+
*
|
|
70
|
+
* **Beta:** This API may change in future releases.
|
|
57
71
|
*/
|
|
58
72
|
export type PluginRecord = {
|
|
59
73
|
id: string;
|
|
@@ -62,6 +76,8 @@ export type PluginRecord = {
|
|
|
62
76
|
* Define a plugin executor that receives context at runtime.
|
|
63
77
|
* This allows executor definitions to be in separate files while
|
|
64
78
|
* still receiving dynamic values like typeName, generated types, and namespace.
|
|
79
|
+
*
|
|
80
|
+
* **Beta:** This API may change in future releases.
|
|
65
81
|
* @param factory - Function that takes context and returns executor configuration
|
|
66
82
|
* @returns The same factory function (for type inference)
|
|
67
83
|
* @example
|