@tailor-platform/sdk 1.53.0 → 1.54.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/{actor-DwAh0Dij.d.mts → actor-Cjae_LGD.d.mts} +2 -2
  3. package/dist/{application-DF74unzA.mjs → application-BfGje3iZ.mjs} +12 -5
  4. package/dist/application-BfGje3iZ.mjs.map +1 -0
  5. package/dist/application-BsipSxp3.mjs +4 -0
  6. package/dist/cli/index.mjs +2 -2
  7. package/dist/cli/lib.d.mts +8 -7
  8. package/dist/cli/lib.mjs +2 -2
  9. package/dist/configure/index.d.mts +3 -3
  10. package/dist/idp-Ch95ag8h.mjs.map +1 -1
  11. package/dist/{idp-CbxR6A_0.d.mts → idp-Di9N4FSJ.d.mts} +1 -2
  12. package/dist/{index-UySZfxON.d.mts → index-BTLgs0DP.d.mts} +4 -4
  13. package/dist/{index-BL5LQnBX.d.mts → index-Cf1Lo_XT.d.mts} +2 -2
  14. package/dist/{index-BIbKrme4.d.mts → index-CyyoHrPK.d.mts} +2 -2
  15. package/dist/{index-ECerapTN.d.mts → index-DTSQthwF.d.mts} +2 -2
  16. package/dist/{index-BCJtNXKo.d.mts → index-DrYHpTja.d.mts} +2 -2
  17. package/dist/{index-DW6gAGmC.d.mts → index-qQYMbkT-.d.mts} +2 -2
  18. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  19. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  20. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  21. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  22. package/dist/plugin/index.d.mts +2 -2
  23. package/dist/runtime/globals.d.mts +2 -2
  24. package/dist/runtime/idp.d.mts +1 -1
  25. package/dist/runtime/index.d.mts +2 -2
  26. package/dist/{runtime-D-3AE1x-.mjs → runtime-DLFzjgEo.mjs} +35 -23
  27. package/dist/runtime-DLFzjgEo.mjs.map +1 -0
  28. package/dist/{tailor-db-field-Y_zEoGu1.d.mts → tailor-db-field-D0qg8s4U.d.mts} +4 -2
  29. package/dist/utils/test/index.d.mts +3 -3
  30. package/dist/vitest/index.d.mts +41 -5
  31. package/dist/vitest/index.mjs +124 -1
  32. package/dist/vitest/index.mjs.map +1 -1
  33. package/dist/{workflow.generated-BIY41La-.d.mts → workflow.generated-dBixCwUo.d.mts} +2 -2
  34. package/docs/configuration.md +10 -0
  35. package/docs/services/auth.md +3 -2
  36. package/docs/services/idp.md +6 -0
  37. package/docs/services/tailordb-migration.md +18 -1
  38. package/docs/testing.md +53 -0
  39. package/package.json +5 -5
  40. package/dist/application-Cmz1Y7X_.mjs +0 -4
  41. package/dist/application-DF74unzA.mjs.map +0 -1
  42. package/dist/runtime-D-3AE1x-.mjs.map +0 -1
@@ -0,0 +1,4 @@
1
+
2
+ import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-BfGje3iZ.mjs";
3
+
4
+ export { defineApplication };
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { G as PATScope, R as AuthInvokerSchema, c as fetchUserInfo, d as initOperatorClient, h as userAgent, i as fetchAll, j as FunctionExecution_Type, n as closeConnectionPool, o as fetchPaged, s as fetchPlatformMachineUserToken, u as initOAuth2Client } from "../client-CGO7gniI.mjs";
4
4
  import { n as logger, r as styles } from "../logger-DpJyJvNz.mjs";
5
- import { $ as listCommand$10, An as workspaceArgs, At as startCommand, B as logBetaWarning, C as listCommand$13, Cn as configArg, Dn as pagedLogArgs, Dt as jobsCommand, E as resumeCommand, En as isVerbose, F as writeDbTypesFile, Gt as parseMigrationLabelNumber, H as removeCommand$1, Ht as executeScript, I as getConfiguredEditorCommand, K as treeCommand, L as openInConfiguredEditor, Lt as functionExecutionStatusToString, Mt as getCommand$6, N as generateCommand$1, O as listCommand$12, On as paginationArgs, P as generateMigrationScript, Pt as executionsCommand, Rt as formatKeyValueTable, Sn as commonArgs, St as triggerCommand, T as healthCommand, Tn as deploymentArgs, U as updateCommand$3, Vt as deploy, Y as getCommand$5, Yt as INITIAL_SCHEMA_NUMBER, Z as updateCommand$2, _n as prompt, an as getMigrationFiles, at as createCommand$3, b as createCommand$4, bn as assertWritable, c as listCommand$14, cn as loadDiff, f as restoreCommand, ft as tokenCommand, g as getCommand$7, gt as listCommand$7, hn as trnPrefix, ht as generate, i as updateCommand$4, in as getMigrationFilePath, j as truncateCommand, kn as toPageDirection, ln as reconstructSnapshotFromMigrations, lt as getCommand$3, m as listCommand$15, mn as sdkNameLabelKey, o as removeCommand, pn as getNamespacesWithMigrations, pt as listCommand$8, q as listCommand$11, r as queryCommand, rt as deleteCommand$3, sn as isValidMigrationNumber, st as listCommand$9, t as isNativeTypeScriptRuntime, tn as formatMigrationNumber, tt as getCommand$4, u as inviteCommand, v as deleteCommand$4, vn as apiCommand, vt as getCommand$2, wn as confirmationArgs, wt as listCommand$6, xn as defineAppCommand, xt as webhookCommand, z as showCommand, zt as getCommand$1 } from "../runtime-D-3AE1x-.mjs";
6
- import { D as saveUserTokens, E as resolveTokens, O as writePlatformConfig, S as loadAccessToken, T as readPlatformConfig, _ as getDistDir, a as WorkflowJobSchema, b as deleteUserTokens, c as ExecutorSchema, i as resolveInlineSourcemap, l as INVOKER_EXPR, o as ResolverSchema, w as loadWorkspaceId, x as fetchLatestToken, y as loadConfig } from "../application-DF74unzA.mjs";
5
+ import { $ as listCommand$10, An as workspaceArgs, At as startCommand, B as logBetaWarning, C as listCommand$13, Cn as configArg, Dn as pagedLogArgs, Dt as jobsCommand, E as resumeCommand, En as isVerbose, F as writeDbTypesFile, Gt as parseMigrationLabelNumber, H as removeCommand$1, Ht as executeScript, I as getConfiguredEditorCommand, K as treeCommand, L as openInConfiguredEditor, Lt as functionExecutionStatusToString, Mt as getCommand$6, N as generateCommand$1, O as listCommand$12, On as paginationArgs, P as generateMigrationScript, Pt as executionsCommand, Rt as formatKeyValueTable, Sn as commonArgs, St as triggerCommand, T as healthCommand, Tn as deploymentArgs, U as updateCommand$3, Vt as deploy, Y as getCommand$5, Yt as INITIAL_SCHEMA_NUMBER, Z as updateCommand$2, _n as prompt, an as getMigrationFiles, at as createCommand$3, b as createCommand$4, bn as assertWritable, c as listCommand$14, cn as loadDiff, f as restoreCommand, ft as tokenCommand, g as getCommand$7, gt as listCommand$7, hn as trnPrefix, ht as generate, i as updateCommand$4, in as getMigrationFilePath, j as truncateCommand, kn as toPageDirection, ln as reconstructSnapshotFromMigrations, lt as getCommand$3, m as listCommand$15, mn as sdkNameLabelKey, o as removeCommand, pn as getNamespacesWithMigrations, pt as listCommand$8, q as listCommand$11, r as queryCommand, rt as deleteCommand$3, sn as isValidMigrationNumber, st as listCommand$9, t as isNativeTypeScriptRuntime, tn as formatMigrationNumber, tt as getCommand$4, u as inviteCommand, v as deleteCommand$4, vn as apiCommand, vt as getCommand$2, wn as confirmationArgs, wt as listCommand$6, xn as defineAppCommand, xt as webhookCommand, z as showCommand, zt as getCommand$1 } from "../runtime-DLFzjgEo.mjs";
6
+ import { D as saveUserTokens, E as resolveTokens, O as writePlatformConfig, S as loadAccessToken, T as readPlatformConfig, _ as getDistDir, a as WorkflowJobSchema, b as deleteUserTokens, c as ExecutorSchema, i as resolveInlineSourcemap, l as INVOKER_EXPR, o as ResolverSchema, w as loadWorkspaceId, x as fetchLatestToken, y as loadConfig } from "../application-BfGje3iZ.mjs";
7
7
  import { t as multiline } from "../multiline-Cf9ODpr1.mjs";
8
8
  import { t as readPackageJson } from "../package-json-DcQApfPQ.mjs";
9
9
  import { n as isCLIError } from "../errors-EsY4XO6O.mjs";
@@ -1,9 +1,9 @@
1
- import { N as TailorDBType, P as TypeSourceInfoEntry, Q as Resolver, _t as IdProvider, ct as IncomingWebhookTrigger, o as Plugin, rt as Executor, s as PluginAttachment, ut as ScheduleTriggerInput, vt as OAuth2ClientInput } from "../tailor-db-field-Y_zEoGu1.mjs";
2
- import { r as AppConfig } from "../workflow.generated-BIY41La-.mjs";
3
- import { n as kyselyTypePlugin } from "../index-BIbKrme4.mjs";
4
- import { n as enumConstantsPlugin } from "../index-DW6gAGmC.mjs";
5
- import { n as fileUtilsPlugin } from "../index-BL5LQnBX.mjs";
6
- import { n as seedPlugin } from "../index-BCJtNXKo.mjs";
1
+ import { N as TailorDBType, P as TypeSourceInfoEntry, Q as Resolver, _t as IdProvider, ct as IncomingWebhookTrigger, o as Plugin, rt as Executor, s as PluginAttachment, ut as ScheduleTriggerInput, vt as OAuth2ClientInput } from "../tailor-db-field-D0qg8s4U.mjs";
2
+ import { r as AppConfig } from "../workflow.generated-dBixCwUo.mjs";
3
+ import { n as kyselyTypePlugin } from "../index-CyyoHrPK.mjs";
4
+ import { n as enumConstantsPlugin } from "../index-qQYMbkT-.mjs";
5
+ import { n as fileUtilsPlugin } from "../index-Cf1Lo_XT.mjs";
6
+ import { n as seedPlugin } from "../index-DrYHpTja.mjs";
7
7
  import { z } from "zod";
8
8
  import { JsonObject, Message } from "@bufbuild/protobuf";
9
9
  import { GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
@@ -19365,9 +19365,10 @@ interface MigrationBundleResult {
19365
19365
  * @param {string} sourceFile - Path to the migration script file
19366
19366
  * @param {string} namespace - TailorDB namespace
19367
19367
  * @param {number} migrationNumber - Migration number
19368
+ * @param {Record<string, string | number | boolean>} env - Environment variables to inject into the migration context
19368
19369
  * @returns {Promise<MigrationBundleResult>} Bundled migration result
19369
19370
  */
19370
- declare function bundleMigrationScript(sourceFile: string, namespace: string, migrationNumber: number): Promise<MigrationBundleResult>;
19371
+ declare function bundleMigrationScript(sourceFile: string, namespace: string, migrationNumber: number, env?: Record<string, string | number | boolean>): Promise<MigrationBundleResult>;
19371
19372
  //#endregion
19372
19373
  //#region src/cli/shared/script-executor.d.ts
19373
19374
  /**
package/dist/cli/lib.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { d as initOperatorClient } from "../client-CGO7gniI.mjs";
3
- import { $t as compareSnapshots, A as truncate, Bt as getExecutor, Ct as triggerExecutor, D as resumeWorkflow, Et as getExecutorJob, Ft as getWorkflowExecution, G as organizationTree, Ht as executeScript, It as listWorkflowExecutions, J as listOrganizations, Jt as DIFF_FILE_NAME, Kt as bundleMigrationScript, M as generate$1, Nt as getWorkflow, Ot as listExecutorJobs, Q as updateFolder, Qt as compareLocalTypesWithSnapshot, R as show, S as listApps, Tt as listExecutors, Ut as waitForExecution, V as remove, Vt as deploy, W as updateOrganization, Wt as MIGRATION_LABEL_KEY, X as getOrganization, Xt as MIGRATE_FILE_NAME, Yt as INITIAL_SCHEMA_NUMBER, Zt as SCHEMA_FILE_NAME, _ as getWorkspace, _t as listFunctionRegistries, a as updateUser, an as getMigrationFiles, bt as listWebhookExecutors, ct as listOAuth2Clients, d as inviteUser, dn as formatMigrationDiff, dt as getMachineUserToken, en as createSnapshotFromLocalTypes, et as listFolders, fn as hasChanges, gn as generateUserTypes, h as listWorkspaces, ht as generate, in as getMigrationFilePath, it as deleteFolder, jt as startWorkflow, k as listWorkflows, kt as watchExecutorJob, l as listUsers, ln as reconstructSnapshotFromMigrations, mt as listMachineUsers, n as query, nn as getLatestMigrationNumber, nt as getFolder, on as getNextMigrationNumber, ot as createFolder, p as restoreWorkspace, pn as getNamespacesWithMigrations, qt as DB_TYPES_FILE_NAME, rn as getMigrationDirPath, s as removeUser, t as isNativeTypeScriptRuntime, un as formatDiffSummary, ut as getOAuth2Client, w as getAppHealth, x as createWorkspace, y as deleteWorkspace, yn as apiCall, yt as getFunctionRegistry } from "../runtime-D-3AE1x-.mjs";
4
- import { S as loadAccessToken, _ as getDistDir, w as loadWorkspaceId, y as loadConfig } from "../application-DF74unzA.mjs";
3
+ import { $t as compareSnapshots, A as truncate, Bt as getExecutor, Ct as triggerExecutor, D as resumeWorkflow, Et as getExecutorJob, Ft as getWorkflowExecution, G as organizationTree, Ht as executeScript, It as listWorkflowExecutions, J as listOrganizations, Jt as DIFF_FILE_NAME, Kt as bundleMigrationScript, M as generate$1, Nt as getWorkflow, Ot as listExecutorJobs, Q as updateFolder, Qt as compareLocalTypesWithSnapshot, R as show, S as listApps, Tt as listExecutors, Ut as waitForExecution, V as remove, Vt as deploy, W as updateOrganization, Wt as MIGRATION_LABEL_KEY, X as getOrganization, Xt as MIGRATE_FILE_NAME, Yt as INITIAL_SCHEMA_NUMBER, Zt as SCHEMA_FILE_NAME, _ as getWorkspace, _t as listFunctionRegistries, a as updateUser, an as getMigrationFiles, bt as listWebhookExecutors, ct as listOAuth2Clients, d as inviteUser, dn as formatMigrationDiff, dt as getMachineUserToken, en as createSnapshotFromLocalTypes, et as listFolders, fn as hasChanges, gn as generateUserTypes, h as listWorkspaces, ht as generate, in as getMigrationFilePath, it as deleteFolder, jt as startWorkflow, k as listWorkflows, kt as watchExecutorJob, l as listUsers, ln as reconstructSnapshotFromMigrations, mt as listMachineUsers, n as query, nn as getLatestMigrationNumber, nt as getFolder, on as getNextMigrationNumber, ot as createFolder, p as restoreWorkspace, pn as getNamespacesWithMigrations, qt as DB_TYPES_FILE_NAME, rn as getMigrationDirPath, s as removeUser, t as isNativeTypeScriptRuntime, un as formatDiffSummary, ut as getOAuth2Client, w as getAppHealth, x as createWorkspace, y as deleteWorkspace, yn as apiCall, yt as getFunctionRegistry } from "../runtime-DLFzjgEo.mjs";
4
+ import { S as loadAccessToken, _ as getDistDir, w as loadWorkspaceId, y as loadConfig } from "../application-BfGje3iZ.mjs";
5
5
  import { n as enumConstantsPlugin } from "../enum-constants-C7DaWeQo.mjs";
6
6
  import { t as multiline } from "../multiline-Cf9ODpr1.mjs";
7
7
  import { n as fileUtilsPlugin } from "../file-utils-BHPxPXmn.mjs";
@@ -1,6 +1,6 @@
1
1
  /// <reference types="@tailor-platform/sdk/runtime/globals" />
2
- import { B as BeforeLoginHookArgs, C as ResolverReadyContext, Ct as SCIMAuthorization, Et as TenantProvider, F as AuthConfig, G as UserAttributeListKey, H as OAuth2ClientGrantType, Ht as TailorUser, I as AuthConnectionTokenResult, J as ValueOperand, K as UserAttributeMap, L as AuthExternalConfig, Lt as AttributeList, Q as Resolver, R as AuthOwnConfig, Rt as AttributeMap, S as ResolverNamespaceData, St as SCIMAttributeMapping, T as TailorDBReadyContext, Tt as SCIMResource, U as SCIMAttributeType, Ut as unauthenticatedTailorUser, V as DefinedAuth, Vt as TailorInvoker, W as UserAttributeKey, X as AuthConnectionConfig, Z as AuthConnectionOAuth2Config, _ as PluginProcessContext, _t as IdProvider, a as NamespacePluginOutput, b as ExecutorReadyContext, bt as SAML, c as PluginConfigs, d as PluginGeneratedExecutor, f as PluginGeneratedExecutorWithFile, g as PluginOutput, gt as IDToken, h as PluginNamespaceProcessContext, ht as BuiltinIdP, l as PluginExecutorContext, m as PluginGeneratedType, o as Plugin, p as PluginGeneratedResolver, q as UsernameFieldKey, s as PluginAttachment, u as PluginExecutorContextBase, v as TailorDBTypeForPlugin, vt as OAuth2ClientInput, w as TailorDBNamespaceData, wt as SCIMConfig, x as GeneratorResult, xt as SCIMAttribute, y as TypePluginOutput, yt as OIDC, z as AuthServiceInput } from "../tailor-db-field-Y_zEoGu1.mjs";
3
- import { A as PermissionCondition, D as TailorDBInstance, E as TailorDBField, M as TailorTypePermission, N as unsafeAllowAllGqlPermission, O as TailorDBType, P as unsafeAllowAllTypePermission, S as IdPGqlOperationsInput, T as TailorAnyDBType, _ as IdPExternalConfig, a as ExecutorServiceInput, b as IdPEmailConfig, c as ResolverServiceInput, d as StaticWebsiteConfig, g as IdPConfig, i as ExecutorServiceConfig, j as TailorTypeGqlPermission, k as db, l as WorkflowServiceConfig, m as SecretsConfig, n as RetryPolicy, o as ResolverExternalConfig, s as ResolverServiceConfig, t as ConcurrencyPolicy, u as WorkflowServiceInput, w as TailorAnyDBField, x as IdPGqlOperations } from "../workflow.generated-BIY41La-.mjs";
4
- import { $ as recordDeletedTrigger, A as AuthAccessTokenRefreshedArgs, B as RecordUpdatedArgs, C as IncomingWebhookTriggerOptions, Ct as MachineUserNameRegistry, D as scheduleTrigger, E as ScheduleTrigger, F as IdpUserDeletedArgs, G as authAccessTokenRefreshedTrigger, H as ResolverExecutedTrigger, I as IdpUserTrigger, J as idpUserCreatedTrigger, K as authAccessTokenRevokedTrigger, L as IdpUserUpdatedArgs, M as AuthAccessTokenTrigger, N as IdpUserArgs, O as AuthAccessTokenArgs, P as IdpUserCreatedArgs, Q as recordCreatedTrigger, R as RecordCreatedArgs, S as IncomingWebhookTrigger, St as MachineUserName, T as ScheduleArgs, U as TailorDBTrigger, V as ResolverExecutedArgs, W as authAccessTokenIssuedTrigger, X as idpUserTrigger, Y as idpUserDeletedTrigger, Z as idpUserUpdatedTrigger, _ as Trigger, _t as AuthInvoker, a as defineGenerators, at as Operation, b as IncomingWebhookResponse, bt as IdpNameRegistry, c as defineIdp, ct as Workflow, d as unsafeAllowAllIdPPermission, dt as WORKFLOW_TEST_ENV_KEY, et as recordTrigger, f as defineStaticWebSite, ft as WorkflowJob, g as createExecutor, gt as createResolver, h as defineWaitPoints, ht as QueryType, i as defineConfig, it as GqlOperation, j as AuthAccessTokenRevokedArgs, k as AuthAccessTokenIssuedArgs, l as IdPPermission, lt as WorkflowConfig, m as defineWaitPoint, mt as createWorkflowJob, n as output, nt as resolverExecutedTrigger, o as definePlugins, ot as WebhookOperation, p as WaitPointInstance, pt as WorkflowJobContext, q as authAccessTokenTrigger, r as t, rt as FunctionOperation, s as defineSecretManager, st as WorkflowOperation, t as __Infer, tt as recordUpdatedTrigger, u as IdPPermissionCondition, ut as createWorkflow, v as IncomingWebhookArgs, vt as defineAuth, w as incomingWebhookTrigger, x as IncomingWebhookResponseConfig, xt as TailorField, y as IncomingWebhookRequest, yt as IdpName, z as RecordDeletedArgs } from "../index-UySZfxON.mjs";
2
+ import { B as BeforeLoginHookArgs, C as ResolverReadyContext, Ct as SCIMAuthorization, Et as TenantProvider, F as AuthConfig, G as UserAttributeListKey, H as OAuth2ClientGrantType, Ht as TailorUser, I as AuthConnectionTokenResult, J as ValueOperand, K as UserAttributeMap, L as AuthExternalConfig, Lt as AttributeList, Q as Resolver, R as AuthOwnConfig, Rt as AttributeMap, S as ResolverNamespaceData, St as SCIMAttributeMapping, T as TailorDBReadyContext, Tt as SCIMResource, U as SCIMAttributeType, Ut as unauthenticatedTailorUser, V as DefinedAuth, Vt as TailorInvoker, W as UserAttributeKey, X as AuthConnectionConfig, Z as AuthConnectionOAuth2Config, _ as PluginProcessContext, _t as IdProvider, a as NamespacePluginOutput, b as ExecutorReadyContext, bt as SAML, c as PluginConfigs, d as PluginGeneratedExecutor, f as PluginGeneratedExecutorWithFile, g as PluginOutput, gt as IDToken, h as PluginNamespaceProcessContext, ht as BuiltinIdP, l as PluginExecutorContext, m as PluginGeneratedType, o as Plugin, p as PluginGeneratedResolver, q as UsernameFieldKey, s as PluginAttachment, u as PluginExecutorContextBase, v as TailorDBTypeForPlugin, vt as OAuth2ClientInput, w as TailorDBNamespaceData, wt as SCIMConfig, x as GeneratorResult, xt as SCIMAttribute, y as TypePluginOutput, yt as OIDC, z as AuthServiceInput } from "../tailor-db-field-D0qg8s4U.mjs";
3
+ import { A as PermissionCondition, D as TailorDBInstance, E as TailorDBField, M as TailorTypePermission, N as unsafeAllowAllGqlPermission, O as TailorDBType, P as unsafeAllowAllTypePermission, S as IdPGqlOperationsInput, T as TailorAnyDBType, _ as IdPExternalConfig, a as ExecutorServiceInput, b as IdPEmailConfig, c as ResolverServiceInput, d as StaticWebsiteConfig, g as IdPConfig, i as ExecutorServiceConfig, j as TailorTypeGqlPermission, k as db, l as WorkflowServiceConfig, m as SecretsConfig, n as RetryPolicy, o as ResolverExternalConfig, s as ResolverServiceConfig, t as ConcurrencyPolicy, u as WorkflowServiceInput, w as TailorAnyDBField, x as IdPGqlOperations } from "../workflow.generated-dBixCwUo.mjs";
5
4
  import { t as Env } from "../env-B-g-qgE4.mjs";
5
+ import { $ as recordDeletedTrigger, A as AuthAccessTokenRefreshedArgs, B as RecordUpdatedArgs, C as IncomingWebhookTriggerOptions, Ct as MachineUserNameRegistry, D as scheduleTrigger, E as ScheduleTrigger, F as IdpUserDeletedArgs, G as authAccessTokenRefreshedTrigger, H as ResolverExecutedTrigger, I as IdpUserTrigger, J as idpUserCreatedTrigger, K as authAccessTokenRevokedTrigger, L as IdpUserUpdatedArgs, M as AuthAccessTokenTrigger, N as IdpUserArgs, O as AuthAccessTokenArgs, P as IdpUserCreatedArgs, Q as recordCreatedTrigger, R as RecordCreatedArgs, S as IncomingWebhookTrigger, St as MachineUserName, T as ScheduleArgs, U as TailorDBTrigger, V as ResolverExecutedArgs, W as authAccessTokenIssuedTrigger, X as idpUserTrigger, Y as idpUserDeletedTrigger, Z as idpUserUpdatedTrigger, _ as Trigger, _t as AuthInvoker, a as defineGenerators, at as Operation, b as IncomingWebhookResponse, bt as IdpNameRegistry, c as defineIdp, ct as Workflow, d as unsafeAllowAllIdPPermission, dt as WORKFLOW_TEST_ENV_KEY, et as recordTrigger, f as defineStaticWebSite, ft as WorkflowJob, g as createExecutor, gt as createResolver, h as defineWaitPoints, ht as QueryType, i as defineConfig, it as GqlOperation, j as AuthAccessTokenRevokedArgs, k as AuthAccessTokenIssuedArgs, l as IdPPermission, lt as WorkflowConfig, m as defineWaitPoint, mt as createWorkflowJob, n as output, nt as resolverExecutedTrigger, o as definePlugins, ot as WebhookOperation, p as WaitPointInstance, pt as WorkflowJobContext, q as authAccessTokenTrigger, r as t, rt as FunctionOperation, s as defineSecretManager, st as WorkflowOperation, t as __Infer, tt as recordUpdatedTrigger, u as IdPPermissionCondition, ut as createWorkflow, v as IncomingWebhookArgs, vt as defineAuth, w as incomingWebhookTrigger, x as IncomingWebhookResponseConfig, xt as TailorField, y as IncomingWebhookRequest, yt as IdpName, z as RecordDeletedArgs } from "../index-BTLgs0DP.mjs";
6
6
  export { type AttributeList, type AttributeMap, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, AuthInvoker, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type DefinedAuth, type Env, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, FunctionOperation, type GeneratorResult, GqlOperation, type IDToken, type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, type IdProvider as IdProviderConfig, type IdpName, type IdpNameRegistry, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, type MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, type PermissionCondition, type Plugin, type PluginAttachment, type PluginConfigs, type PluginExecutorContext, type PluginExecutorContextBase, type PluginGeneratedExecutor, type PluginGeneratedExecutorWithFile, type PluginGeneratedResolver, type PluginGeneratedType, type PluginNamespaceProcessContext, type PluginOutput, type PluginProcessContext, type QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, type Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, type ResolverReadyContext, type ResolverServiceConfig, type ResolverServiceInput, type RetryPolicy, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleArgs, ScheduleTrigger, type SecretsConfig, type StaticWebsiteConfig, type TailorAnyDBField, type TailorAnyDBType, type TailorDBField, type TailorDBInstance, type TailorDBNamespaceData, type TailorDBReadyContext, TailorDBTrigger, type TailorDBType, type TailorDBTypeForPlugin, type TailorField, type TailorInvoker, type TailorTypeGqlPermission, type TailorTypePermission, type TailorUser, type TenantProvider as TenantProviderConfig, Trigger, type TypePluginOutput, type UserAttributeKey, type UserAttributeListKey, type UserAttributeMap, type UsernameFieldKey, type ValueOperand, WORKFLOW_TEST_ENV_KEY, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
@@ -1 +1 @@
1
- {"version":3,"file":"idp-Ch95ag8h.mjs","names":["#impl"],"sources":["../src/runtime/idp.ts"],"sourcesContent":["/**\n * IDP (Identity Provider) utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.idp` runtime API.\n * At runtime this delegates to `globalThis.tailor.idp`. Use `idpMock` from\n * `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n * @example\n * import { idp } from \"@tailor-platform/sdk/runtime\";\n *\n * const client = new idp.Client({ namespace: \"my-namespace\" });\n * const { users } = await client.users({ first: 10 });\n */\n\n/** Configuration object for {@link Client}. */\nexport interface ClientConfig {\n namespace: string;\n}\n\n/** User record returned by IDP operations. */\nexport interface User {\n id: string;\n name: string;\n disabled: boolean;\n createdAt?: string;\n updatedAt?: string;\n}\n\n/** Filter options for {@link Client.users}. */\nexport interface UserQuery {\n /** Filter by user IDs */\n ids?: string[];\n /** Filter by user names */\n names?: string[];\n}\n\n/** Pagination/filter options for {@link Client.users}. */\nexport interface ListUsersOptions {\n /** Maximum number of users to return */\n first?: number;\n /** Page token for pagination */\n after?: string;\n /** Query filter for users */\n query?: UserQuery;\n}\n\n/** Response shape for {@link Client.users}. */\nexport interface ListUsersResponse {\n users: User[];\n nextPageToken: string | null;\n totalCount: number;\n}\n\n/** Input for {@link Client.createUser}. */\nexport interface CreateUserInput {\n /** The user's name (typically email) */\n name: string;\n /** The user's password. If omitted, the user is created without a password (cannot log in with any password). */\n password?: string;\n /** Whether the user is disabled */\n disabled?: boolean;\n}\n\n/** Input for {@link Client.updateUser}. */\nexport interface UpdateUserInput {\n /** The user's ID */\n id: string;\n /** New name for the user */\n name?: string;\n /** New password for the user. Cannot be used with clearPassword. */\n password?: string;\n /** If true, remove the user's password. Cannot be used with password. */\n clearPassword?: boolean;\n /** New disabled status for the user */\n disabled?: boolean;\n}\n\n/** Input for {@link Client.sendPasswordResetEmail}. */\nexport interface SendPasswordResetEmailInput {\n /** The ID of the user */\n userId: string;\n /** The URI to redirect to after password reset */\n redirectUri: string;\n /** The sender display name. Defaults to 'Tailor Platform IdP'. */\n fromName?: string;\n /** The email subject line. Defaults to the localized default subject. */\n subject?: string;\n}\n\n/** Instance methods exposed by `tailor.idp.Client`. */\nexport interface IdpClientInstance {\n users(options?: ListUsersOptions): Promise<ListUsersResponse>;\n user(userId: string): Promise<User>;\n userByName(name: string): Promise<User>;\n createUser(input: CreateUserInput): Promise<User>;\n updateUser(input: UpdateUserInput): Promise<User>;\n deleteUser(userId: string): Promise<boolean>;\n sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean>;\n}\n\n/**\n * Constructor shape for `tailor.idp.Client`.\n * @internal\n */\nexport interface IdpClientConstructor {\n new (config: ClientConfig): IdpClientInstance;\n}\n\n/**\n * Platform API surface for `tailor.idp`. Describes the shape the platform\n * runtime injects on `globalThis.tailor.idp`.\n * @internal\n */\nexport interface TailorIdpAPI {\n Client: IdpClientConstructor;\n}\n\n/**\n * IDP Client for user management operations.\n *\n * Wraps the platform-provided `tailor.idp.Client` and exposes the same surface.\n */\nexport class Client {\n #impl: IdpClientInstance;\n\n constructor(config: ClientConfig) {\n this.#impl = new (globalThis as { tailor: { idp: TailorIdpAPI } }).tailor.idp.Client(config);\n }\n\n /**\n * List users in the namespace with optional filtering and pagination.\n * @param options - Pagination and filter options\n * @returns Page of users with `nextPageToken` and `totalCount`\n */\n users(options?: ListUsersOptions): Promise<ListUsersResponse> {\n return this.#impl.users(options);\n }\n\n /**\n * Get a user by ID.\n * @param userId - IDP user ID\n * @returns The matching user\n */\n user(userId: string): Promise<User> {\n return this.#impl.user(userId);\n }\n\n /**\n * Get a user by name.\n * @param name - IDP user name\n * @returns The matching user\n */\n userByName(name: string): Promise<User> {\n return this.#impl.userByName(name);\n }\n\n /**\n * Create a new user.\n * @param input - User attributes\n * @returns The newly created user\n */\n createUser(input: CreateUserInput): Promise<User> {\n return this.#impl.createUser(input);\n }\n\n /**\n * Update an existing user.\n * @param input - User ID plus attributes to update\n * @returns The updated user\n */\n updateUser(input: UpdateUserInput): Promise<User> {\n return this.#impl.updateUser(input);\n }\n\n /**\n * Delete a user by ID.\n * @param userId - IDP user ID\n * @returns `true` when the user was deleted\n */\n deleteUser(userId: string): Promise<boolean> {\n return this.#impl.deleteUser(userId);\n }\n\n /**\n * Send a password reset email to a user.\n * @param input - Target user ID and redirect URI\n * @returns `true` when the email was queued\n */\n sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean> {\n return this.#impl.sendPasswordResetEmail(input);\n }\n}\n"],"mappings":";;;;;;;;;;AAyHA,IAAa,SAAb,MAAoB;CAClB;CAEA,YAAY,QAAsB;EAChC,KAAKA,QAAQ,IAAK,WAAiD,OAAO,IAAI,OAAO,MAAM;CAC7F;;;;;;CAOA,MAAM,SAAwD;EAC5D,OAAO,KAAKA,MAAM,MAAM,OAAO;CACjC;;;;;;CAOA,KAAK,QAA+B;EAClC,OAAO,KAAKA,MAAM,KAAK,MAAM;CAC/B;;;;;;CAOA,WAAW,MAA6B;EACtC,OAAO,KAAKA,MAAM,WAAW,IAAI;CACnC;;;;;;CAOA,WAAW,OAAuC;EAChD,OAAO,KAAKA,MAAM,WAAW,KAAK;CACpC;;;;;;CAOA,WAAW,OAAuC;EAChD,OAAO,KAAKA,MAAM,WAAW,KAAK;CACpC;;;;;;CAOA,WAAW,QAAkC;EAC3C,OAAO,KAAKA,MAAM,WAAW,MAAM;CACrC;;;;;;CAOA,uBAAuB,OAAsD;EAC3E,OAAO,KAAKA,MAAM,uBAAuB,KAAK;CAChD;AACF"}
1
+ {"version":3,"file":"idp-Ch95ag8h.mjs","names":["#impl"],"sources":["../src/runtime/idp.ts"],"sourcesContent":["/**\n * IDP (Identity Provider) utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.idp` runtime API.\n * At runtime this delegates to `globalThis.tailor.idp`. Use `idpMock` from\n * `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n * @example\n * import { idp } from \"@tailor-platform/sdk/runtime\";\n *\n * const client = new idp.Client({ namespace: \"my-namespace\" });\n * const { users } = await client.users({ first: 10 });\n */\n\n/** Configuration object for {@link Client}. */\nexport interface ClientConfig {\n namespace: string;\n}\n\n/** User record returned by IDP operations. */\nexport interface User {\n id: string;\n name: string;\n disabled: boolean;\n createdAt?: string;\n}\n\n/** Filter options for {@link Client.users}. */\nexport interface UserQuery {\n /** Filter by user IDs */\n ids?: string[];\n /** Filter by user names */\n names?: string[];\n}\n\n/** Pagination/filter options for {@link Client.users}. */\nexport interface ListUsersOptions {\n /** Maximum number of users to return */\n first?: number;\n /** Page token for pagination */\n after?: string;\n /** Query filter for users */\n query?: UserQuery;\n}\n\n/** Response shape for {@link Client.users}. */\nexport interface ListUsersResponse {\n users: User[];\n nextPageToken: string | null;\n totalCount: number;\n}\n\n/** Input for {@link Client.createUser}. */\nexport interface CreateUserInput {\n /** The user's name (typically email) */\n name: string;\n /** The user's password. If omitted, the user is created without a password (cannot log in with any password). */\n password?: string;\n /** Whether the user is disabled */\n disabled?: boolean;\n}\n\n/** Input for {@link Client.updateUser}. */\nexport interface UpdateUserInput {\n /** The user's ID */\n id: string;\n /** New name for the user */\n name?: string;\n /** New password for the user. Cannot be used with clearPassword. */\n password?: string;\n /** If true, remove the user's password. Cannot be used with password. */\n clearPassword?: boolean;\n /** New disabled status for the user */\n disabled?: boolean;\n}\n\n/** Input for {@link Client.sendPasswordResetEmail}. */\nexport interface SendPasswordResetEmailInput {\n /** The ID of the user */\n userId: string;\n /** The URI to redirect to after password reset */\n redirectUri: string;\n /** The sender display name. Defaults to 'Tailor Platform IdP'. */\n fromName?: string;\n /** The email subject line. Defaults to the localized default subject. */\n subject?: string;\n}\n\n/** Instance methods exposed by `tailor.idp.Client`. */\nexport interface IdpClientInstance {\n users(options?: ListUsersOptions): Promise<ListUsersResponse>;\n user(userId: string): Promise<User>;\n userByName(name: string): Promise<User>;\n createUser(input: CreateUserInput): Promise<User>;\n updateUser(input: UpdateUserInput): Promise<User>;\n deleteUser(userId: string): Promise<boolean>;\n sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean>;\n}\n\n/**\n * Constructor shape for `tailor.idp.Client`.\n * @internal\n */\nexport interface IdpClientConstructor {\n new (config: ClientConfig): IdpClientInstance;\n}\n\n/**\n * Platform API surface for `tailor.idp`. Describes the shape the platform\n * runtime injects on `globalThis.tailor.idp`.\n * @internal\n */\nexport interface TailorIdpAPI {\n Client: IdpClientConstructor;\n}\n\n/**\n * IDP Client for user management operations.\n *\n * Wraps the platform-provided `tailor.idp.Client` and exposes the same surface.\n */\nexport class Client {\n #impl: IdpClientInstance;\n\n constructor(config: ClientConfig) {\n this.#impl = new (globalThis as { tailor: { idp: TailorIdpAPI } }).tailor.idp.Client(config);\n }\n\n /**\n * List users in the namespace with optional filtering and pagination.\n * @param options - Pagination and filter options\n * @returns Page of users with `nextPageToken` and `totalCount`\n */\n users(options?: ListUsersOptions): Promise<ListUsersResponse> {\n return this.#impl.users(options);\n }\n\n /**\n * Get a user by ID.\n * @param userId - IDP user ID\n * @returns The matching user\n */\n user(userId: string): Promise<User> {\n return this.#impl.user(userId);\n }\n\n /**\n * Get a user by name.\n * @param name - IDP user name\n * @returns The matching user\n */\n userByName(name: string): Promise<User> {\n return this.#impl.userByName(name);\n }\n\n /**\n * Create a new user.\n * @param input - User attributes\n * @returns The newly created user\n */\n createUser(input: CreateUserInput): Promise<User> {\n return this.#impl.createUser(input);\n }\n\n /**\n * Update an existing user.\n * @param input - User ID plus attributes to update\n * @returns The updated user\n */\n updateUser(input: UpdateUserInput): Promise<User> {\n return this.#impl.updateUser(input);\n }\n\n /**\n * Delete a user by ID.\n * @param userId - IDP user ID\n * @returns `true` when the user was deleted\n */\n deleteUser(userId: string): Promise<boolean> {\n return this.#impl.deleteUser(userId);\n }\n\n /**\n * Send a password reset email to a user.\n * @param input - Target user ID and redirect URI\n * @returns `true` when the email was queued\n */\n sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean> {\n return this.#impl.sendPasswordResetEmail(input);\n }\n}\n"],"mappings":";;;;;;;;;;AAwHA,IAAa,SAAb,MAAoB;CAClB;CAEA,YAAY,QAAsB;EAChC,KAAKA,QAAQ,IAAK,WAAiD,OAAO,IAAI,OAAO,MAAM;CAC7F;;;;;;CAOA,MAAM,SAAwD;EAC5D,OAAO,KAAKA,MAAM,MAAM,OAAO;CACjC;;;;;;CAOA,KAAK,QAA+B;EAClC,OAAO,KAAKA,MAAM,KAAK,MAAM;CAC/B;;;;;;CAOA,WAAW,MAA6B;EACtC,OAAO,KAAKA,MAAM,WAAW,IAAI;CACnC;;;;;;CAOA,WAAW,OAAuC;EAChD,OAAO,KAAKA,MAAM,WAAW,KAAK;CACpC;;;;;;CAOA,WAAW,OAAuC;EAChD,OAAO,KAAKA,MAAM,WAAW,KAAK;CACpC;;;;;;CAOA,WAAW,QAAkC;EAC3C,OAAO,KAAKA,MAAM,WAAW,MAAM;CACrC;;;;;;CAOA,uBAAuB,OAAsD;EAC3E,OAAO,KAAKA,MAAM,uBAAuB,KAAK;CAChD;AACF"}
@@ -23,7 +23,6 @@ interface User {
23
23
  name: string;
24
24
  disabled: boolean;
25
25
  createdAt?: string;
26
- updatedAt?: string;
27
26
  }
28
27
  /** Filter options for {@link Client.users}. */
29
28
  interface UserQuery {
@@ -158,4 +157,4 @@ declare class Client {
158
157
  }
159
158
  //#endregion
160
159
  export { IdpClientInstance as a, SendPasswordResetEmailInput as c, User as d, UserQuery as f, IdpClientConstructor as i, TailorIdpAPI as l, ClientConfig as n, ListUsersOptions as o, idp_d_exports as p, CreateUserInput as r, ListUsersResponse as s, Client as t, UpdateUserInput as u };
161
- //# sourceMappingURL=idp-CbxR6A_0.d.mts.map
160
+ //# sourceMappingURL=idp-Di9N4FSJ.d.mts.map
@@ -1,7 +1,7 @@
1
- import { $ as ResolverInput, At as FieldMetadata, Bt as InferredAttributeMap, Dt as ArrayFieldOutput, Ft as FieldValidateInput, G as UserAttributeListKey, Gt as JsonCompatible, Ht as TailorUser, Jt as output$1, K as UserAttributeMap, Kt as JsonValue, Mt as FieldOutput, Nt as TailorFieldType, Ot as DefinedFieldMetadata, Q as Resolver, V as DefinedAuth, Vt as TailorInvoker, Wt as InferFieldsOutput, Y as TailorField$1, at as FunctionOperation$1, ct as IncomingWebhookTrigger$1, dt as TailorDBTrigger$1, et as GeneratorConfig, ft as WebhookOperation$1, it as ExecutorInput, jt as FieldOptions, lt as ResolverExecutedTrigger$1, mt as AuthInvoker$1, nt as AuthAccessTokenTrigger$1, o as Plugin, ot as GqlOperation$1, pt as WorkflowOperation$1, qt as Prettify, st as IdpUserTrigger$1, tt as BaseGeneratorConfig, ut as ScheduleTriggerInput, z as AuthServiceInput } from "./tailor-db-field-Y_zEoGu1.mjs";
2
- import { C as IdPInput, D as TailorDBInstance, F as AllowedValues, I as AllowedValuesOutput, O as TailorDBType, f as StaticWebsiteDefinitionBrand, h as SecretsDefinitionBrand, n as RetryPolicy, p as StaticWebsiteInput, r as AppConfig, t as ConcurrencyPolicy, v as IdPUserField, y as IdpDefinitionBrand } from "./workflow.generated-BIY41La-.mjs";
1
+ import { $ as ResolverInput, At as FieldMetadata, Bt as InferredAttributeMap, Dt as ArrayFieldOutput, Ft as FieldValidateInput, G as UserAttributeListKey, Gt as JsonCompatible, Ht as TailorUser, Jt as output$1, K as UserAttributeMap, Kt as JsonValue, Mt as FieldOutput, Nt as TailorFieldType, Ot as DefinedFieldMetadata, Q as Resolver, V as DefinedAuth, Vt as TailorInvoker, Wt as InferFieldsOutput, Y as TailorField$1, at as FunctionOperation$1, ct as IncomingWebhookTrigger$1, dt as TailorDBTrigger$1, et as GeneratorConfig, ft as WebhookOperation$1, it as ExecutorInput, jt as FieldOptions, lt as ResolverExecutedTrigger$1, mt as AuthInvoker$1, nt as AuthAccessTokenTrigger$1, o as Plugin, ot as GqlOperation$1, pt as WorkflowOperation$1, qt as Prettify, st as IdpUserTrigger$1, tt as BaseGeneratorConfig, ut as ScheduleTriggerInput, z as AuthServiceInput } from "./tailor-db-field-D0qg8s4U.mjs";
2
+ import { C as IdPInput, D as TailorDBInstance, F as AllowedValues, I as AllowedValuesOutput, O as TailorDBType, f as StaticWebsiteDefinitionBrand, h as SecretsDefinitionBrand, n as RetryPolicy, p as StaticWebsiteInput, r as AppConfig, t as ConcurrencyPolicy, v as IdPUserField, y as IdpDefinitionBrand } from "./workflow.generated-dBixCwUo.mjs";
3
3
  import { n as TailorEnv } from "./env-B-g-qgE4.mjs";
4
- import { t as TailorActor } from "./actor-DwAh0Dij.mjs";
4
+ import { t as TailorActor } from "./actor-Cjae_LGD.mjs";
5
5
  import { StandardSchemaV1 } from "@standard-schema/spec";
6
6
  import { Client } from "@urql/core";
7
7
  import { StandardCRON } from "ts-cron-validator";
@@ -1122,4 +1122,4 @@ declare namespace t {
1122
1122
  }
1123
1123
  //#endregion
1124
1124
  export { recordDeletedTrigger as $, AuthAccessTokenRefreshedArgs as A, RecordUpdatedArgs as B, IncomingWebhookTriggerOptions as C, MachineUserNameRegistry as Ct, scheduleTrigger as D, ScheduleTrigger as E, IdpUserDeletedArgs as F, authAccessTokenRefreshedTrigger as G, ResolverExecutedTrigger as H, IdpUserTrigger as I, idpUserCreatedTrigger as J, authAccessTokenRevokedTrigger as K, IdpUserUpdatedArgs as L, AuthAccessTokenTrigger as M, IdpUserArgs as N, AuthAccessTokenArgs as O, IdpUserCreatedArgs as P, recordCreatedTrigger as Q, RecordCreatedArgs as R, IncomingWebhookTrigger as S, MachineUserName as St, ScheduleArgs as T, TailorDBTrigger as U, ResolverExecutedArgs as V, authAccessTokenIssuedTrigger as W, idpUserTrigger as X, idpUserDeletedTrigger as Y, idpUserUpdatedTrigger as Z, Trigger as _, AuthInvoker as _t, defineGenerators as a, Operation as at, IncomingWebhookResponse as b, IdpNameRegistry as bt, defineIdp as c, Workflow as ct, unsafeAllowAllIdPPermission as d, WORKFLOW_TEST_ENV_KEY as dt, recordTrigger as et, defineStaticWebSite as f, WorkflowJob as ft, createExecutor as g, createResolver as gt, defineWaitPoints as h, QueryType as ht, defineConfig as i, GqlOperation as it, AuthAccessTokenRevokedArgs as j, AuthAccessTokenIssuedArgs as k, IdPPermission as l, WorkflowConfig as lt, defineWaitPoint as m, createWorkflowJob as mt, output as n, resolverExecutedTrigger as nt, definePlugins as o, WebhookOperation as ot, WaitPointInstance as p, WorkflowJobContext as pt, authAccessTokenTrigger as q, t as r, FunctionOperation as rt, defineSecretManager as s, WorkflowOperation as st, infer as t, recordUpdatedTrigger as tt, IdPPermissionCondition as u, createWorkflow as ut, IncomingWebhookArgs as v, defineAuth as vt, incomingWebhookTrigger as w, IncomingWebhookResponseConfig as x, TailorField as xt, IncomingWebhookRequest as y, IdpName as yt, RecordDeletedArgs as z };
1125
- //# sourceMappingURL=index-UySZfxON.d.mts.map
1125
+ //# sourceMappingURL=index-BTLgs0DP.d.mts.map
@@ -1,4 +1,4 @@
1
- import { o as Plugin } from "./tailor-db-field-Y_zEoGu1.mjs";
1
+ import { o as Plugin } from "./tailor-db-field-D0qg8s4U.mjs";
2
2
 
3
3
  //#region src/plugin/builtin/file-utils/index.d.ts
4
4
  /** Unique identifier for the file utilities generator plugin. */
@@ -15,4 +15,4 @@ type FileUtilsPluginOptions = {
15
15
  declare function fileUtilsPlugin(options: FileUtilsPluginOptions): Plugin<unknown, FileUtilsPluginOptions>;
16
16
  //#endregion
17
17
  export { fileUtilsPlugin as n, FileUtilsGeneratorID as t };
18
- //# sourceMappingURL=index-BL5LQnBX.d.mts.map
18
+ //# sourceMappingURL=index-Cf1Lo_XT.d.mts.map
@@ -1,4 +1,4 @@
1
- import { o as Plugin } from "./tailor-db-field-Y_zEoGu1.mjs";
1
+ import { o as Plugin } from "./tailor-db-field-D0qg8s4U.mjs";
2
2
 
3
3
  //#region src/plugin/builtin/kysely-type/index.d.ts
4
4
  /** Unique identifier for the Kysely type generator plugin. */
@@ -15,4 +15,4 @@ type KyselyTypePluginOptions = {
15
15
  declare function kyselyTypePlugin(options: KyselyTypePluginOptions): Plugin<unknown, KyselyTypePluginOptions>;
16
16
  //#endregion
17
17
  export { kyselyTypePlugin as n, KyselyGeneratorID as t };
18
- //# sourceMappingURL=index-BIbKrme4.d.mts.map
18
+ //# sourceMappingURL=index-CyyoHrPK.d.mts.map
@@ -2,7 +2,7 @@ import { t as TailorAuthconnectionAPI } from "./authconnection-TsdLYaLs.mjs";
2
2
  import { r as TailorContextAPI } from "./context-CUBwSBq4.mjs";
3
3
  import { f as TailorDBFileAPI } from "./file-VTJbbOL3.mjs";
4
4
  import { i as TailorIconvAPI } from "./iconv-Chu6Hit2.mjs";
5
- import { l as TailorIdpAPI } from "./idp-CbxR6A_0.mjs";
5
+ import { l as TailorIdpAPI } from "./idp-Di9N4FSJ.mjs";
6
6
  import { t as TailorSecretmanagerAPI } from "./secretmanager-BhpDmxwT.mjs";
7
7
  import { n as TailorWorkflowAPI } from "./workflow-dYYH7QFa.mjs";
8
8
 
@@ -43,4 +43,4 @@ interface TailordbRuntime {
43
43
  }
44
44
  //#endregion
45
45
  export { TailordbQueryResult as a, TailordbCommandType as i, TailordbClientConstructor as n, TailordbRuntime as o, TailordbClientInstance as r, TailorRuntime as t };
46
- //# sourceMappingURL=index-ECerapTN.d.mts.map
46
+ //# sourceMappingURL=index-DTSQthwF.d.mts.map
@@ -1,4 +1,4 @@
1
- import { o as Plugin } from "./tailor-db-field-Y_zEoGu1.mjs";
1
+ import { o as Plugin } from "./tailor-db-field-D0qg8s4U.mjs";
2
2
 
3
3
  //#region src/plugin/builtin/seed/index.d.ts
4
4
  /** Unique identifier for the seed generator plugin. */
@@ -44,4 +44,4 @@ type SeedPluginOptions = {
44
44
  declare function seedPlugin(options: SeedPluginOptions): Plugin<unknown, SeedPluginOptions>;
45
45
  //#endregion
46
46
  export { seedPlugin as n, SeedGeneratorID as t };
47
- //# sourceMappingURL=index-BCJtNXKo.d.mts.map
47
+ //# sourceMappingURL=index-DrYHpTja.d.mts.map
@@ -1,4 +1,4 @@
1
- import { o as Plugin } from "./tailor-db-field-Y_zEoGu1.mjs";
1
+ import { o as Plugin } from "./tailor-db-field-D0qg8s4U.mjs";
2
2
 
3
3
  //#region src/plugin/builtin/enum-constants/index.d.ts
4
4
  /** Unique identifier for the enum constants generator plugin. */
@@ -15,4 +15,4 @@ type EnumConstantsPluginOptions = {
15
15
  declare function enumConstantsPlugin(options: EnumConstantsPluginOptions): Plugin<unknown, EnumConstantsPluginOptions>;
16
16
  //#endregion
17
17
  export { enumConstantsPlugin as n, EnumConstantsGeneratorID as t };
18
- //# sourceMappingURL=index-DW6gAGmC.d.mts.map
18
+ //# sourceMappingURL=index-qQYMbkT-.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-DW6gAGmC.mjs";
1
+ import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-qQYMbkT-.mjs";
2
2
  export { EnumConstantsGeneratorID, enumConstantsPlugin };
@@ -1,2 +1,2 @@
1
- import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-BL5LQnBX.mjs";
1
+ import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-Cf1Lo_XT.mjs";
2
2
  export { FileUtilsGeneratorID, fileUtilsPlugin };
@@ -1,2 +1,2 @@
1
- import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-BIbKrme4.mjs";
1
+ import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-CyyoHrPK.mjs";
2
2
  export { KyselyGeneratorID, kyselyTypePlugin };
@@ -1,2 +1,2 @@
1
- import { n as seedPlugin, t as SeedGeneratorID } from "../../../index-BCJtNXKo.mjs";
1
+ import { n as seedPlugin, t as SeedGeneratorID } from "../../../index-DrYHpTja.mjs";
2
2
  export { SeedGeneratorID, seedPlugin };
@@ -1,6 +1,6 @@
1
- import { n as TailorAnyDBType } from "../tailor-db-field-Y_zEoGu1.mjs";
1
+ import { n as TailorAnyDBType } from "../tailor-db-field-D0qg8s4U.mjs";
2
2
  import { n as TailorEnv } from "../env-B-g-qgE4.mjs";
3
- import { t as TailorActor } from "../actor-DwAh0Dij.mjs";
3
+ import { t as TailorActor } from "../actor-Cjae_LGD.mjs";
4
4
 
5
5
  //#region src/plugin/with-context.d.ts
6
6
  /**
@@ -1,9 +1,9 @@
1
1
  import { t as ContextInvoker } from "../context-CUBwSBq4.mjs";
2
2
  import { m as TailorDBFileErrorCode } from "../file-VTJbbOL3.mjs";
3
3
  import { r as IconvInstance } from "../iconv-Chu6Hit2.mjs";
4
- import { a as IdpClientInstance, c as SendPasswordResetEmailInput, d as User, f as UserQuery, n as ClientConfig, o as ListUsersOptions, r as CreateUserInput, s as ListUsersResponse, u as UpdateUserInput } from "../idp-CbxR6A_0.mjs";
4
+ import { a as IdpClientInstance, c as SendPasswordResetEmailInput, d as User, f as UserQuery, n as ClientConfig, o as ListUsersOptions, r as CreateUserInput, s as ListUsersResponse, u as UpdateUserInput } from "../idp-Di9N4FSJ.mjs";
5
5
  import { r as TriggerWorkflowOptions, t as AuthInvoker } from "../workflow-dYYH7QFa.mjs";
6
- import { a as TailordbQueryResult, i as TailordbCommandType, o as TailordbRuntime, r as TailordbClientInstance, t as TailorRuntime } from "../index-ECerapTN.mjs";
6
+ import { a as TailordbQueryResult, i as TailordbCommandType, o as TailordbRuntime, r as TailordbClientInstance, t as TailorRuntime } from "../index-DTSQthwF.mjs";
7
7
 
8
8
  //#region src/runtime/globals.d.ts
9
9
  declare global {
@@ -1,2 +1,2 @@
1
- import { a as IdpClientInstance, c as SendPasswordResetEmailInput, d as User, f as UserQuery, i as IdpClientConstructor, l as TailorIdpAPI, n as ClientConfig, o as ListUsersOptions, r as CreateUserInput, s as ListUsersResponse, t as Client, u as UpdateUserInput } from "../idp-CbxR6A_0.mjs";
1
+ import { a as IdpClientInstance, c as SendPasswordResetEmailInput, d as User, f as UserQuery, i as IdpClientConstructor, l as TailorIdpAPI, n as ClientConfig, o as ListUsersOptions, r as CreateUserInput, s as ListUsersResponse, t as Client, u as UpdateUserInput } from "../idp-Di9N4FSJ.mjs";
2
2
  export { Client, ClientConfig, CreateUserInput, IdpClientConstructor, IdpClientInstance, ListUsersOptions, ListUsersResponse, SendPasswordResetEmailInput, TailorIdpAPI, UpdateUserInput, User, UserQuery };
@@ -2,8 +2,8 @@ import { n as authconnection_d_exports } from "../authconnection-TsdLYaLs.mjs";
2
2
  import { i as context_d_exports } from "../context-CUBwSBq4.mjs";
3
3
  import { b as file_d_exports } from "../file-VTJbbOL3.mjs";
4
4
  import { u as iconv_d_exports } from "../iconv-Chu6Hit2.mjs";
5
- import { p as idp_d_exports } from "../idp-CbxR6A_0.mjs";
5
+ import { p as idp_d_exports } from "../idp-Di9N4FSJ.mjs";
6
6
  import { i as secretmanager_d_exports } from "../secretmanager-BhpDmxwT.mjs";
7
7
  import { c as workflow_d_exports } from "../workflow-dYYH7QFa.mjs";
8
- import { a as TailordbQueryResult, i as TailordbCommandType, n as TailordbClientConstructor, o as TailordbRuntime, r as TailordbClientInstance, t as TailorRuntime } from "../index-ECerapTN.mjs";
8
+ import { a as TailordbQueryResult, i as TailordbCommandType, n as TailordbClientConstructor, o as TailordbRuntime, r as TailordbClientInstance, t as TailorRuntime } from "../index-DTSQthwF.mjs";
9
9
  export { TailorRuntime, TailordbClientConstructor, TailordbClientInstance, TailordbCommandType, TailordbQueryResult, TailordbRuntime, authconnection_d_exports as authconnection, context_d_exports as context, file_d_exports as file, iconv_d_exports as iconv, idp_d_exports as idp, secretmanager_d_exports as secretmanager, workflow_d_exports as workflow };
@@ -2,7 +2,7 @@
2
2
  import { t as db } from "./schema-CQrYG_55.mjs";
3
3
  import { $ as FilterSchema, A as FunctionExecution_Status, B as AuthOAuth2Client_GrantType, C as TailorDBType_Permission_Operator, D as IdPLang, E as PipelineResolver_OperationType, F as AuthConnection_Type, H as AuthSCIMAttribute_Type, I as AuthHookPoint, J as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, K as TenantProviderConfig_TenantProviderType, L as AuthIDPConfig_AuthType, M as ExecutorJobStatus, N as ExecutorTargetType, O as IdPPermissionOperator, P as ExecutorTriggerType, Q as Condition_Operator, R as AuthInvokerSchema, S as TailorDBGQLPermission_Permit, T as TailorDBType_PermitAction, U as AuthSCIMAttribute_Uniqueness, V as AuthSCIMAttribute_Mutability, W as AuthSCIMConfig_AuthorizationType, X as Subgraph_ServiceType, Y as ApplicationSchemaUpdateAttemptStatus, Z as ConditionSchema, _ as WorkspacePlatformUserRole, a as fetchMachineUserToken, b as TailorDBGQLPermission_Action, d as initOperatorClient, et as PageDirection, g as OperatorService, h as userAgent, i as fetchAll, k as IdPPermissionPermit, m as resolveStaticWebsiteUrls, o as fetchPaged, p as platformBaseUrl, q as UserProfileProviderConfig_UserProfileProviderType, v as WorkflowExecution_Status, w as TailorDBType_Permission_Permit, x as TailorDBGQLPermission_Operator, y as WorkflowJobExecution_Status, z as AuthOAuth2Client_ClientType } from "./client-CGO7gniI.mjs";
4
4
  import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-DpJyJvNz.mjs";
5
- import { C as loadConfigPath, O as writePlatformConfig, S as loadAccessToken, T as readPlatformConfig, _ as getDistDir, d as buildResolverOperationHookExpr, f as OAuth2ClientSchema, g as createBundleCache, h as loadFilesWithIgnores, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as createExecutorService, t as defineApplication, u as buildExecutorArgsExpr, v as hashFile, w as loadWorkspaceId, y as loadConfig } from "./application-DF74unzA.mjs";
5
+ import { C as loadConfigPath, O as writePlatformConfig, S as loadAccessToken, T as readPlatformConfig, _ as getDistDir, d as buildResolverOperationHookExpr, f as OAuth2ClientSchema, g as createBundleCache, h as loadFilesWithIgnores, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as createExecutorService, t as defineApplication, u as buildExecutorArgsExpr, v as hashFile, w as loadWorkspaceId, y as loadConfig } from "./application-BfGje3iZ.mjs";
6
6
  import { t as multiline } from "./multiline-Cf9ODpr1.mjs";
7
7
  import { t as readPackageJson } from "./package-json-DcQApfPQ.mjs";
8
8
  import { n as isCLIError, t as createCLIError } from "./errors-EsY4XO6O.mjs";
@@ -1857,16 +1857,11 @@ async function planApplication(context) {
1857
1857
  }
1858
1858
  });
1859
1859
  if (forRemoval) {
1860
- const ownedAppNames = /* @__PURE__ */ new Set();
1861
- if (existingApplications.some((app) => app.name === application.name)) ownedAppNames.add(application.name);
1862
- if (application.id) {
1863
- const others = existingApplications.filter((app) => !ownedAppNames.has(app.name));
1864
- const owned = await Promise.all(others.map(async (app) => {
1865
- return isOwnedByApp(await fetchAppLabels(client, workspaceId, app.name), application.name, application.id) ? app.name : null;
1866
- }));
1867
- for (const name of owned) if (name) ownedAppNames.add(name);
1868
- }
1869
- for (const name of ownedAppNames) changeSet.deletes.push({
1860
+ const candidates = application.id ? existingApplications : existingApplications.filter((app) => app.name === application.name);
1861
+ const owned = await Promise.all(candidates.map(async (app) => {
1862
+ return isOwnedByApp(await fetchAppLabels(client, workspaceId, app.name), application.name, application.id) ? app.name : null;
1863
+ }));
1864
+ for (const name of owned) if (name) changeSet.deletes.push({
1870
1865
  name,
1871
1866
  request: {
1872
1867
  workspaceId,
@@ -3065,7 +3060,7 @@ function normalizeComparablePermission(permission) {
3065
3060
  right: c.right ? { kind: c.right.kind } : void 0
3066
3061
  })),
3067
3062
  permit: policy.permit,
3068
- description: policy.description
3063
+ description: policy.description || void 0
3069
3064
  });
3070
3065
  return {
3071
3066
  create: permission.create.map(normalizePolicy),
@@ -4054,6 +4049,7 @@ function normalizeComparableOAuth2Client(client) {
4054
4049
  const refreshTokenLifetime = oauth2LifetimeToSeconds(client.refreshTokenLifetime);
4055
4050
  return normalizeProtoConfig({
4056
4051
  ...client,
4052
+ description: client.description || void 0,
4057
4053
  redirectUris: normalizeStringArray(client.redirectUris),
4058
4054
  grantTypes: [...client.grantTypes ?? []].sort((left, right) => left - right),
4059
4055
  accessTokenLifetime: accessTokenLifetime ?? 86400,
@@ -7442,9 +7438,10 @@ function applyPreMigrationFieldAdjustments(fields, typeChanges) {
7442
7438
  * @param {string} sourceFile - Path to the migration script file
7443
7439
  * @param {string} namespace - TailorDB namespace
7444
7440
  * @param {number} migrationNumber - Migration number
7441
+ * @param {Record<string, string | number | boolean>} env - Environment variables to inject into the migration context
7445
7442
  * @returns {Promise<MigrationBundleResult>} Bundled migration result
7446
7443
  */
7447
- async function bundleMigrationScript(sourceFile, namespace, migrationNumber) {
7444
+ async function bundleMigrationScript(sourceFile, namespace, migrationNumber, env = {}) {
7448
7445
  const outputDir = path.resolve(getDistDir(), "migrations");
7449
7446
  fs$1.mkdirSync(outputDir, { recursive: true });
7450
7447
  const entryPath = path.join(outputDir, `migration_${namespace}_${migrationNumber}.entry.js`);
@@ -7460,9 +7457,10 @@ async function bundleMigrationScript(sourceFile, namespace, migrationNumber) {
7460
7457
  }
7461
7458
 
7462
7459
  export async function main(input) {
7460
+ const env = ${JSON.stringify(env)};
7463
7461
  const db = getDB("${namespace}");
7464
7462
  await db.transaction().execute(async (trx) => {
7465
- await _migrationMain(trx);
7463
+ await _migrationMain(trx, { env });
7466
7464
  });
7467
7465
  return { success: true };
7468
7466
  }
@@ -7831,12 +7829,12 @@ async function detectPendingMigrations(client, workspaceId, namespacesWithMigrat
7831
7829
  * @returns {Promise<ExecutionResult>} Execution result
7832
7830
  */
7833
7831
  async function executeSingleMigration(options, migration) {
7834
- const { client, workspaceId, authInvoker } = options;
7832
+ const { client, workspaceId, authInvoker, env } = options;
7835
7833
  const result = await executeScript({
7836
7834
  client,
7837
7835
  workspaceId,
7838
7836
  name: `migration-${migration.namespace}-${formatMigrationNumber(migration.number)}.js`,
7839
- code: (await bundleMigrationScript(migration.scriptPath, migration.namespace, migration.number)).bundledCode,
7837
+ code: (await bundleMigrationScript(migration.scriptPath, migration.namespace, migration.number, env)).bundledCode,
7840
7838
  invoker: authInvoker
7841
7839
  });
7842
7840
  return {
@@ -7889,7 +7887,8 @@ async function executeMigrations(context, migrations) {
7889
7887
  const options = {
7890
7888
  client: context.client,
7891
7889
  workspaceId: context.workspaceId,
7892
- authInvoker
7890
+ authInvoker,
7891
+ env: context.env
7893
7892
  };
7894
7893
  logger.info(`Using machine user: ${styles.bold(machineUserName)} for namespace '${namespace}'`);
7895
7894
  for (const migration of namespaceMigrations) {
@@ -8130,7 +8129,8 @@ function buildMigrationContextForScripts(client, migrationContext, migrationsReq
8130
8129
  workspaceId: migrationContext.workspaceId,
8131
8130
  authNamespace: authService.config.name,
8132
8131
  machineUsers: authService.config.machineUsers ? Object.keys(authService.config.machineUsers) : void 0,
8133
- dbConfig: dbConfigMap
8132
+ dbConfig: dbConfigMap,
8133
+ env: migrationContext.config.env ?? {}
8134
8134
  };
8135
8135
  }
8136
8136
  /**
@@ -8748,7 +8748,7 @@ function normalizeTailorDBCompareValue(value, path) {
8748
8748
  if (value === void 0 || value === null) return value;
8749
8749
  if (typeof value === "number" || typeof value === "bigint" || typeof value === "string") {
8750
8750
  if (matchesNumericStringPath(path) && isNumericLikeValue(value)) return String(value);
8751
- if (path.at(-1) === "expr" && value === tailordbCompareKnownDefaults.emptyExpression) return;
8751
+ if ((path.at(-1) === "expr" || path.at(-1) === "description") && value === tailordbCompareKnownDefaults.emptyExpression) return;
8752
8752
  return value;
8753
8753
  }
8754
8754
  if (Array.isArray(value)) return value.map((item, index) => normalizeTailorDBCompareValue(item, [...path, index])).filter((item) => item !== void 0);
@@ -13819,6 +13819,7 @@ function generateDbTypesFromSnapshot(snapshot, diff) {
13819
13819
  " */",
13820
13820
  "",
13821
13821
  `import { ${imports.join(", ")} } from "@tailor-platform/sdk/kysely";`,
13822
+ "import type { Env } from \"@tailor-platform/sdk\";",
13822
13823
  "",
13823
13824
  ...utilityTypeDeclarations,
13824
13825
  "",
@@ -13826,7 +13827,12 @@ function generateDbTypesFromSnapshot(snapshot, diff) {
13826
13827
  ...typeDefinitions,
13827
13828
  "}",
13828
13829
  "",
13829
- "export type Transaction = KyselyTransaction<Database>;"
13830
+ "export type Transaction = KyselyTransaction<Database>;",
13831
+ "",
13832
+ "/** Context passed as the second argument to the migration's `main` function. */",
13833
+ "export type MigrationContext = {",
13834
+ " env: keyof Env extends never ? Record<string, string | number | boolean> : Env;",
13835
+ "};"
13830
13836
  ].join("\n") + "\n";
13831
13837
  }
13832
13838
  /**
@@ -13844,11 +13850,17 @@ function generateEmptyDbTypes(namespace) {
13844
13850
  " */",
13845
13851
  "",
13846
13852
  "import { type Transaction as KyselyTransaction } from \"@tailor-platform/sdk/kysely\";",
13853
+ "import type { Env } from \"@tailor-platform/sdk\";",
13847
13854
  "",
13848
13855
  "// eslint-disable-next-line @typescript-eslint/no-empty-object-type",
13849
13856
  "interface Database {}",
13850
13857
  "",
13851
- "export type Transaction = KyselyTransaction<Database>;"
13858
+ "export type Transaction = KyselyTransaction<Database>;",
13859
+ "",
13860
+ "/** Context passed as the second argument to the migration's `main` function. */",
13861
+ "export type MigrationContext = {",
13862
+ " env: keyof Env extends never ? Record<string, string | number | boolean> : Env;",
13863
+ "};"
13852
13864
  ].join("\n") + "\n";
13853
13865
  }
13854
13866
  /**
@@ -14246,7 +14258,7 @@ async function generate(options) {
14246
14258
  if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
14247
14259
  let pluginManager;
14248
14260
  if (plugins.length > 0) pluginManager = new PluginManager(plugins);
14249
- const { defineApplication } = await import("./application-Cmz1Y7X_.mjs");
14261
+ const { defineApplication } = await import("./application-BsipSxp3.mjs");
14250
14262
  const application = defineApplication({
14251
14263
  config,
14252
14264
  pluginManager
@@ -16433,4 +16445,4 @@ function isDeno() {
16433
16445
 
16434
16446
  //#endregion
16435
16447
  export { listCommand$5 as $, compareSnapshots as $t, truncate as A, workspaceArgs as An, startCommand as At, logBetaWarning as B, getExecutor as Bt, listCommand$2 as C, configArg as Cn, triggerExecutor as Ct, resumeWorkflow as D, pagedLogArgs as Dn, jobsCommand as Dt, resumeCommand as E, isVerbose as En, getExecutorJob as Et, writeDbTypesFile as F, getWorkflowExecution as Ft, organizationTree as G, parseMigrationLabelNumber as Gt, removeCommand$1 as H, executeScript as Ht, getConfiguredEditorCommand as I, listWorkflowExecutions as It, listOrganizations as J, DIFF_FILE_NAME as Jt, treeCommand as K, bundleMigrationScript as Kt, openInConfiguredEditor as L, functionExecutionStatusToString as Lt, generate as M, getCommand$5 as Mt, generateCommand as N, getWorkflow as Nt, listCommand$3 as O, paginationArgs as On, listExecutorJobs as Ot, generateMigrationScript as P, executionsCommand as Pt, updateFolder as Q, compareLocalTypesWithSnapshot as Qt, show as R, formatKeyValueTable as Rt, listApps as S, commonArgs as Sn, triggerCommand as St, healthCommand as T, deploymentArgs as Tn, listExecutors as Tt, updateCommand$1 as U, waitForExecution$1 as Ut, remove as V, deploy as Vt, updateOrganization as W, MIGRATION_LABEL_KEY as Wt, getOrganization as X, MIGRATE_FILE_NAME as Xt, getCommand$1 as Y, INITIAL_SCHEMA_NUMBER as Yt, updateCommand$2 as Z, SCHEMA_FILE_NAME as Zt, getWorkspace as _, prompt as _n, listFunctionRegistries as _t, updateUser as a, getMigrationFiles as an, createCommand$1 as at, createCommand as b, assertWritable as bn, listWebhookExecutors as bt, listCommand as c, loadDiff as cn, listOAuth2Clients as ct, inviteUser as d, formatMigrationDiff as dn, getMachineUserToken as dt, createSnapshotFromLocalTypes as en, listFolders as et, restoreCommand as f, hasChanges as fn, tokenCommand as ft, getCommand as g, generateUserTypes as gn, listCommand$8 as gt, listWorkspaces as h, trnPrefix as hn, generate$1 as ht, updateCommand as i, getMigrationFilePath as in, deleteFolder as it, truncateCommand as j, startWorkflow as jt, listWorkflows as k, toPageDirection as kn, watchExecutorJob as kt, listUsers as l, reconstructSnapshotFromMigrations as ln, getCommand$3 as lt, listCommand$1 as m, sdkNameLabelKey as mn, listMachineUsers as mt, query as n, getLatestMigrationNumber as nn, getFolder as nt, removeCommand as o, getNextMigrationNumber as on, createFolder as ot, restoreWorkspace as p, getNamespacesWithMigrations as pn, listCommand$7 as pt, listCommand$4 as q, DB_TYPES_FILE_NAME as qt, queryCommand as r, getMigrationDirPath as rn, deleteCommand$1 as rt, removeUser as s, isValidMigrationNumber as sn, listCommand$6 as st, isNativeTypeScriptRuntime as t, formatMigrationNumber as tn, getCommand$2 as tt, inviteCommand as u, formatDiffSummary as un, getOAuth2Client as ut, deleteCommand as v, apiCommand as vn, getCommand$4 as vt, getAppHealth as w, confirmationArgs as wn, listCommand$9 as wt, createWorkspace as x, defineAppCommand as xn, webhookCommand as xt, deleteWorkspace as y, apiCall as yn, getFunctionRegistry as yt, showCommand as z, getCommand$6 as zt };
16436
- //# sourceMappingURL=runtime-D-3AE1x-.mjs.map
16448
+ //# sourceMappingURL=runtime-DLFzjgEo.mjs.map