@tailor-platform/sdk 1.76.0 → 1.76.2
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 +52 -0
- package/dist/application-6zsDLGKv.mjs +3 -0
- package/dist/{application-BUfYmf0O.mjs → application-CqjCcZ2n.mjs} +372 -1673
- package/dist/application-CqjCcZ2n.mjs.map +1 -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 +5 -0
- 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 +0 -1
- 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 +0 -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 +0 -1
- package/dist/cli/commands/workspace/restore.d.mts +0 -1
- package/dist/cli/commands/workspace/transform.d.mts +2 -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 +599 -42
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +2 -0
- package/dist/cli/lib.mjs +3 -3
- 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/completion/zsh-worker.zsh +1 -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 +54 -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 +0 -1
- 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 +24 -14
- 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-DZDr-TvH.mjs} +3 -2
- package/dist/{crashreport-ayWANEZ6.mjs.map → crashreport-DZDr-TvH.mjs.map} +1 -1
- package/dist/{crashreport-Dy4ZzSkd.mjs → crashreport-np4-_DX2.mjs} +1 -1
- package/dist/{field-runtime-9bfXBAOK.mjs → field-runtime-D4QWRiB1.mjs} +66 -46
- package/dist/field-runtime-D4QWRiB1.mjs.map +1 -0
- package/dist/{globals-CcU1ONiK.mjs → globals-z6zYMjlr.mjs} +2 -2
- package/dist/{globals-CcU1ONiK.mjs.map → globals-z6zYMjlr.mjs.map} +1 -1
- package/dist/kysely/index.d.mts +3 -4
- 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-CTgoVWc_.mjs} +4 -49
- package/dist/registry-CTgoVWc_.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-DlklyuHN.mjs} +1301 -716
- package/dist/runtime-DlklyuHN.mjs.map +1 -0
- package/dist/{schema-DrVyN-LP.mjs → schema-DbTR1c6M.mjs} +3 -2
- package/dist/schema-DbTR1c6M.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/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_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-IPapa1KJ.mjs +49 -0
- package/dist/test-env-key-IPapa1KJ.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 +111 -51
- package/dist/types/executor.generated.d.mts +59 -27
- 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 +20 -9
- package/dist/types/resolver.generated.d.mts +19 -9
- package/dist/types/staticwebsite.generated.d.mts +7 -3
- package/dist/types/tailordb.generated.d.mts +47 -22
- package/dist/types/workflow.generated.d.mts +9 -4
- package/dist/{types-BwzB2okW.mjs → types-BzJ7A_fn.mjs} +2 -2
- package/dist/{types-BwzB2okW.mjs.map → types-BzJ7A_fn.mjs.map} +1 -1
- package/dist/types-CG9H7HuE.mjs +4 -0
- 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 +1 -1
- package/dist/vitest/index.mjs +2 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock-kysely.d.mts +0 -1
- package/dist/vitest/mocks/aigateway.d.mts +2 -2
- package/dist/vitest/mocks/authconnection.d.mts +2 -2
- package/dist/vitest/mocks/idp.d.mts +2 -2
- package/dist/vitest/mocks/secretmanager.d.mts +3 -1
- package/dist/vitest/mocks/tailordb.d.mts +6 -3
- package/dist/vitest/mocks/workflow.d.mts +11 -6
- package/dist/vitest/setup.mjs +1 -1
- 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/services/tailordb.md +10 -1
- package/package.json +18 -18
- 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/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/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/seed-fm0LeYP2.mjs.map +0 -1
- package/dist/service_pb-B5w9rjPY.mjs.map +0 -1
- package/dist/types-KlawuVKa.mjs +0 -4
package/dist/cli/lib.d.mts
CHANGED
|
@@ -6,6 +6,7 @@ import { Resolver } from "../types/resolver.generated.mjs";
|
|
|
6
6
|
import { LoadedConfig, loadConfig } from "./shared/config-loader.mjs";
|
|
7
7
|
import { AuthInvoker } from "../tailor-proto/src/tailor/v1/auth_resource_pb.mjs";
|
|
8
8
|
import { OperatorClient, initOperatorClient } from "./shared/client.mjs";
|
|
9
|
+
import "./commands/deploy/function-registry.mjs";
|
|
9
10
|
import { NormalizedSchemaSnapshot, SchemaSnapshot, SnapshotFieldConfig, TailorDBSnapshotType } from "./commands/tailordb/migrate/snapshot-types.mjs";
|
|
10
11
|
import { BreakingChangeInfo, MigrationDiff, formatDiffSummary, formatMigrationDiff, hasChanges } from "./commands/tailordb/migrate/diff-calculator.mjs";
|
|
11
12
|
import { MIGRATION_LABEL_KEY } from "./commands/tailordb/migrate/types.mjs";
|
|
@@ -69,6 +70,7 @@ import { UpdateFolderOptions, updateFolder } from "./commands/organization/folde
|
|
|
69
70
|
import { DeleteFolderOptions, deleteFolder } from "./commands/organization/folder/delete.mjs";
|
|
70
71
|
import { loadAccessToken, loadWorkspaceId } from "./shared/context.mjs";
|
|
71
72
|
import { ApiCallOptions, ApiCallResult, apiCall } from "./commands/api/api-call.mjs";
|
|
73
|
+
import "./commands/api/index.mjs";
|
|
72
74
|
import { query } from "./query/index.mjs";
|
|
73
75
|
import { TruncateOptions, truncate } from "./commands/tailordb/truncate.mjs";
|
|
74
76
|
import { GenerateOptions as GenerateOptions$1, generate as generate$1 } from "./commands/tailordb/migrate/generate.mjs";
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as assertDefined } from "../assert-DBxo8jPo.mjs";
|
|
2
|
-
import { D as
|
|
3
|
-
import {
|
|
2
|
+
import { $ as getOrganization, An as apiCall, At as getExecutorWaitFailureMessage, B as show, Bt as listWorkflowExecutions, Cn as hasChanges, Ct as listWebhookExecutors, D as waitWorkflowExecution, Et as triggerExecutor, Ft as startWorkflow, Gt as deploy, J as organizationTree, Jt as waitForExecution, Ln as loadAccessToken, Lt as getWorkflow, M as truncate, Mn as loadConfig, Mt as listExecutorJobs, Nt as watchExecutorJob, On as generateUserTypes, Ot as listExecutors, P as generate$1, S as listApps, Sn as formatMigrationDiff, St as getFunctionRegistry, Vn as loadWorkspaceId, W as remove, Wt as getExecutor, Xt as MIGRATION_LABEL_KEY, Yt as bundleMigrationScript, Z as listOrganizations, _ as getWorkspace, _t as listMachineUsers, a as updateUser, an as MIGRATE_FILE_NAME, at as getFolder, bt as listFunctionRegistries, cn as compareLocalTypesWithSnapshot, d as inviteUser, dn as getLatestMigrationNumber, dt as listOAuth2Clients, fn as getMigrationDirPath, h as listWorkspaces, hn as getNextMigrationNumber, in as INITIAL_SCHEMA_NUMBER, j as listWorkflows, k as resumeWorkflow, kt as getExecutorJob, l as listUsers, ln as compareSnapshots, lt as createFolder, mn as getMigrationFiles, mt as getMachineUserToken, n as query, nn as DB_TYPES_FILE_NAME, on as SCHEMA_FILE_NAME, p as restoreWorkspace, pn as getMigrationFilePath, pt as getOAuth2Client, q as updateOrganization, qt as executeScript, rn as DIFF_FILE_NAME, rt as listFolders, s as removeUser, st as deleteFolder, t as isNativeTypeScriptRuntime, tt as updateFolder, un as createSnapshotFromLocalTypes, vn as reconstructSnapshotFromMigrations, vt as generate, w as getAppHealth, wn as getNamespacesWithMigrations, x as createWorkspace, xn as formatDiffSummary, y as deleteWorkspace, zt as getWorkflowExecution } from "../runtime-DlklyuHN.mjs";
|
|
3
|
+
import { B as initOperatorClient, _ as platformBundleDefinePlugin, w as getDistDir } from "../application-CqjCcZ2n.mjs";
|
|
4
4
|
import { n as enumConstantsPlugin } from "../enum-constants-j9QBF0cB.mjs";
|
|
5
5
|
import { t as multiline } from "../multiline-sfHpTZZK.mjs";
|
|
6
6
|
import { n as fileUtilsPlugin } from "../file-utils-DcyIPFQh.mjs";
|
|
7
7
|
import { n as kyselyTypePlugin } from "../kysely-type-D-zflMGf.mjs";
|
|
8
|
-
import { n as seedPlugin } from "../seed-
|
|
8
|
+
import { n as seedPlugin } from "../seed-DFFigL8V.mjs";
|
|
9
9
|
import * as fs from "node:fs";
|
|
10
10
|
import * as path from "pathe";
|
|
11
11
|
import { resolveTSConfig } from "pkg-types";
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../plugin/manager.mjs";
|
|
2
|
+
import "./tailordb/service.mjs";
|
|
3
|
+
import "./auth/service.mjs";
|
|
4
|
+
import "../../configure/config/types.mjs";
|
|
5
|
+
import "./executor/service.mjs";
|
|
6
|
+
import "../cache/bundle-cache.mjs";
|
|
7
|
+
import "./http-adapter/bundler.mjs";
|
|
8
|
+
import "./http-adapter/service.mjs";
|
|
9
|
+
import "./resolver/service.mjs";
|
|
10
|
+
import "./workflow/bundler.mjs";
|
|
11
|
+
import "./workflow/service.mjs";
|
|
12
|
+
import "../shared/config-loader.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../../configure/config/types.mjs";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../../configure/config/types.mjs";
|
|
2
|
+
import "../../../parser/service/http-adapter/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../../configure/config/types.mjs";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../../configure/config/types.mjs";
|
|
2
|
+
import "../../cache/bundle-cache.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "../../../configure/config/types.mjs";
|
|
@@ -17,8 +17,8 @@ import { CreateWorkflowJobFunctionExecutionPolicyRequestSchema, CreateWorkflowJo
|
|
|
17
17
|
import { GetMetadataRequestSchema, GetMetadataResponseSchema, SetMetadataRequestSchema, SetMetadataResponseSchema } from "../../tailor-proto/src/tailor/v1/metadata_pb.mjs";
|
|
18
18
|
import { CreateOTLPExporterRequestSchema, CreateOTLPExporterResponseSchema, CreateResourceAttributesConfigRequestSchema, CreateResourceAttributesConfigResponseSchema, DeleteOTLPExporterRequestSchema, DeleteOTLPExporterResponseSchema, DeleteResourceAttributesConfigRequestSchema, DeleteResourceAttributesConfigResponseSchema, GetOTLPExporterRequestSchema, GetOTLPExporterResponseSchema, GetResourceAttributesConfigRequestSchema, GetResourceAttributesConfigResponseSchema, ListOTLPExportersRequestSchema, ListOTLPExportersResponseSchema, TestOTLPExporterRequestSchema, TestOTLPExporterResponseSchema, UpdateOTLPExporterRequestSchema, UpdateOTLPExporterResponseSchema, UpdateResourceAttributesConfigRequestSchema, UpdateResourceAttributesConfigResponseSchema } from "../../tailor-proto/src/tailor/v1/telemetryrouter_pb.mjs";
|
|
19
19
|
import { OperatorService, PingRequestSchema, PingResponseSchema } from "../../tailor-proto/src/tailor/v1/service_pb.mjs";
|
|
20
|
+
import "@badgateway/oauth2-client";
|
|
20
21
|
import { Client } from "@connectrpc/connect";
|
|
21
|
-
|
|
22
22
|
//#region src/cli/shared/client.d.ts
|
|
23
23
|
type PlatformClientConfig = {
|
|
24
24
|
platformUrl?: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AuthInvoker } from "../../tailor-proto/src/tailor/v1/auth_resource_pb.mjs";
|
|
2
2
|
import { FunctionExecution_Status } from "../../tailor-proto/src/tailor/v1/function_resource_pb.mjs";
|
|
3
3
|
import { OperatorClient } from "./client.mjs";
|
|
4
|
-
|
|
5
4
|
//#region src/cli/shared/script-executor.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Options for script execution
|
|
@@ -22,9 +22,13 @@ type SeedChunk = {
|
|
|
22
22
|
* Options for chunking seed data.
|
|
23
23
|
*/
|
|
24
24
|
type ChunkSeedDataOptions = {
|
|
25
|
-
/** Seed data keyed by type name */
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/** Seed data keyed by type name */
|
|
26
|
+
data: SeedData;
|
|
27
|
+
/** Ordered list of type names (dependency order) */
|
|
28
|
+
order: string[];
|
|
29
|
+
/** Byte size of the bundled seed script code */
|
|
30
|
+
codeByteSize: number;
|
|
31
|
+
/** Maximum gRPC message size in bytes (default: 3.5MB) */
|
|
28
32
|
maxMessageSize?: number;
|
|
29
33
|
};
|
|
30
34
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BaseGeneratorConfig } from "../../types/generator-config.generated.mjs";
|
|
2
2
|
import { GeneratorConfig, Plugin } from "../../plugin/types.mjs";
|
|
3
3
|
import { AppConfig } from "./types.mjs";
|
|
4
|
-
|
|
5
4
|
//#region src/configure/config/index.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Define a Tailor SDK application configuration with shallow exactness.
|
|
@@ -6,7 +6,6 @@ import { SecretsConfig } from "../services/secrets/types.mjs";
|
|
|
6
6
|
import { StaticWebsiteConfig } from "../services/staticwebsite/types.mjs";
|
|
7
7
|
import { ExecutionPolicyInstance } from "../services/workflow/execution-policy.types.mjs";
|
|
8
8
|
import { LogLevelEnum } from "../../types/app-config.generated.mjs";
|
|
9
|
-
|
|
10
9
|
//#region src/configure/config/types.d.ts
|
|
11
10
|
type LogLevel = LogLevelEnum;
|
|
12
11
|
type LogLevelInput = LogLevel | (string & {});
|
|
@@ -33,7 +32,8 @@ type WorkflowServiceConfig = {
|
|
|
33
32
|
files: string[];
|
|
34
33
|
job_files?: string[];
|
|
35
34
|
ignores?: string[];
|
|
36
|
-
job_ignores?: string[];
|
|
35
|
+
job_ignores?: string[];
|
|
36
|
+
/** Workspace-level execution policies for workflow job functions. */
|
|
37
37
|
executionPolicies?: Record<string, ExecutionPolicyInstance>;
|
|
38
38
|
};
|
|
39
39
|
type WorkflowServiceInput = WorkflowServiceConfig;
|
|
@@ -21,6 +21,7 @@ import { ExecutorServiceConfig, ExecutorServiceInput, ResolverExternalConfig, Re
|
|
|
21
21
|
import { ConcurrencyPolicy, RetryPolicy } from "../types/workflow.generated.mjs";
|
|
22
22
|
import { TailorAnyField, TailorField } from "./types/type.mjs";
|
|
23
23
|
import { MachineUserName, MachineUserNameRegistry } from "./types/machine-user.mjs";
|
|
24
|
+
import "./types/index.mjs";
|
|
24
25
|
import { unauthenticatedTailorUser } from "./user.mjs";
|
|
25
26
|
import { IdpName, IdpNameRegistry } from "./types/idp-name.mjs";
|
|
26
27
|
import { ConnectionName, ConnectionNameRegistry } from "./types/connection-name.mjs";
|
|
@@ -45,8 +46,8 @@ import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } fr
|
|
|
45
46
|
import { defineIdp } from "./services/idp/index.mjs";
|
|
46
47
|
import { defineSecretManager } from "./services/secrets/index.mjs";
|
|
47
48
|
import { HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, createHttpAdapter } from "./services/http-adapter/http-adapter.mjs";
|
|
49
|
+
import "./services/index.mjs";
|
|
48
50
|
import { defineConfig, defineGenerators, definePlugins } from "./config/index.mjs";
|
|
49
|
-
|
|
50
51
|
//#region src/configure/index.d.ts
|
|
51
52
|
type TailorOutput<T> = output$1<T>;
|
|
52
53
|
type infer<T> = TailorOutput<T>;
|
package/dist/configure/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as t$1 } from "../types-
|
|
1
|
+
import { t as t$1 } from "../types-BzJ7A_fn.mjs";
|
|
2
2
|
import { t as brandValue } from "../brand-Eo4pLXPJ.mjs";
|
|
3
|
-
import { t as db } from "../schema-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
3
|
+
import { t as db } from "../schema-DbTR1c6M.mjs";
|
|
4
|
+
import { n as dispatchTriggerJob, o as registerJob, r as dispatchTriggerWorkflow, s as registerWorkflow } from "../registry-CTgoVWc_.mjs";
|
|
5
|
+
import { t as WORKFLOW_TEST_ENV_KEY } from "../test-env-key-IPapa1KJ.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/configure/user.ts
|
|
8
8
|
/** Represents an unauthenticated user in the Tailor platform. */
|
|
@@ -477,6 +477,56 @@ function defineWorkflowExecutionPolicies(builder, options) {
|
|
|
477
477
|
return result;
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
+
//#endregion
|
|
481
|
+
//#region src/configure/services/workflow/job.ts
|
|
482
|
+
/**
|
|
483
|
+
* Create a workflow job definition.
|
|
484
|
+
*
|
|
485
|
+
* All jobs must be named exports from the workflow file.
|
|
486
|
+
* Job names must be unique across the entire project.
|
|
487
|
+
*
|
|
488
|
+
* Input and output must be JsonValue-compatible (primitives, plain objects, arrays).
|
|
489
|
+
* Functions and objects with a `toJSON` method are rejected at the type level;
|
|
490
|
+
* class instances exposing methods are rejected via the property walk.
|
|
491
|
+
* @param config - Job configuration with name and body function.
|
|
492
|
+
* @param config.name - Unique job name across the project.
|
|
493
|
+
* @param config.body - Async function that processes the job input.
|
|
494
|
+
* @returns A WorkflowJob that can be triggered from other jobs.
|
|
495
|
+
* @example
|
|
496
|
+
* // Simple job with async body:
|
|
497
|
+
* export const fetchData = createWorkflowJob({
|
|
498
|
+
* name: "fetch-data",
|
|
499
|
+
* body: async (input: { id: string }) => {
|
|
500
|
+
* const db = getDB("tailordb");
|
|
501
|
+
* return await db.selectFrom("Table").selectAll().where("id", "=", input.id).executeTakeFirst();
|
|
502
|
+
* },
|
|
503
|
+
* });
|
|
504
|
+
* @example
|
|
505
|
+
* // Orchestrator job that fans out to other jobs.
|
|
506
|
+
* export const orchestrate = createWorkflowJob({
|
|
507
|
+
* name: "orchestrate",
|
|
508
|
+
* body: async (input: { orderId: string }) => {
|
|
509
|
+
* const inventory = await checkInventory.trigger({ orderId: input.orderId });
|
|
510
|
+
* const payment = await processPayment.trigger({ orderId: input.orderId });
|
|
511
|
+
* return { inventory, payment };
|
|
512
|
+
* },
|
|
513
|
+
* });
|
|
514
|
+
*/
|
|
515
|
+
function createWorkflowJob(config) {
|
|
516
|
+
const body = config.body;
|
|
517
|
+
if (!process.env.TAILOR_PLATFORM_BUNDLE) registerJob(config.name, body);
|
|
518
|
+
const trigger = process.env.TAILOR_PLATFORM_BUNDLE ? async () => {
|
|
519
|
+
throw new Error("This workflow job's .trigger() is rewritten at build time and is unavailable in the bundle");
|
|
520
|
+
} : async function trigger(args, options) {
|
|
521
|
+
return arguments.length >= 2 ? await dispatchTriggerJob(config.name, args, options) : await dispatchTriggerJob(config.name, args);
|
|
522
|
+
};
|
|
523
|
+
return brandValue({
|
|
524
|
+
name: config.name,
|
|
525
|
+
trigger,
|
|
526
|
+
body
|
|
527
|
+
}, "workflow-job");
|
|
528
|
+
}
|
|
529
|
+
|
|
480
530
|
//#endregion
|
|
481
531
|
//#region src/configure/services/workflow/wait-point.ts
|
|
482
532
|
function getPlatformWorkflow() {
|