@tailor-platform/sdk 1.14.0 → 1.14.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 1.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#587](https://github.com/tailor-platform/sdk/pull/587) [`014d8db`](https://github.com/tailor-platform/sdk/commit/014d8db10d2fb8a19ffff4a5c2d3c76c4f24f72d) Thanks [@toiroakr](https://github.com/toiroakr)! - Use tailor.idp.Client for IDP user seeding and truncation in seed generator
8
+
3
9
  ## 1.14.0
4
10
 
5
11
  ### Minor Changes
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import "../chunk-C3Kl5s5P.mjs";
3
3
  import "../schema-BmKdDzr1.mjs";
4
- import { $ as jobsCommand, $t as initOperatorClient, A as generateCommand, At as getMigrationFiles, C as resumeCommand, Et as formatMigrationNumber, F as removeCommand$1, G as generateCommand$1, Gt as fetchLatestToken, H as listCommand$6, I as listCommand$7, J as triggerCommand, Jt as readPlatformConfig, Kt as loadAccessToken, Mt as isValidMigrationNumber, N as showCommand, Nt as loadDiff, O as truncateCommand, Qt as initOAuth2Client, R as getCommand$2, Rt as getNamespacesWithMigrations, S as healthCommand, T as listCommand$8, V as tokenCommand, Vt as loadConfig, Wt as apiCommand, X as listCommand$5, Xt as fetchAll, Yt as writePlatformConfig, Zt as fetchUserInfo, _ as createCommand$3, a as listCommand$10, an as jsonArgs, b as listCommand$9, d as listCommand$11, en as readPackageJson, ft as applyCommand, gt as parseMigrationLabelNumber, h as deleteCommand$3, in as deploymentArgs, it as getCommand$3, j as logBetaWarning, kt as getMigrationFilePath, l as restoreCommand, lt as getCommand$1, nn as commonArgs, nt as startCommand, on as withCommonArgs, ot as executionsCommand, p as getCommand$4, q as webhookCommand, qt as loadWorkspaceId, r as removeCommand, rn as confirmationArgs, s as inviteCommand, sn as workspaceArgs, t as updateCommand$2, tn as PATScope, zt as trnPrefix } from "../update-BnKKm4aR.mjs";
4
+ import { $ as jobsCommand, $t as initOperatorClient, A as generateCommand, At as getMigrationFiles, C as resumeCommand, Et as formatMigrationNumber, F as removeCommand$1, G as generateCommand$1, Gt as fetchLatestToken, H as listCommand$6, I as listCommand$7, J as triggerCommand, Jt as readPlatformConfig, Kt as loadAccessToken, Mt as isValidMigrationNumber, N as showCommand, Nt as loadDiff, O as truncateCommand, Qt as initOAuth2Client, R as getCommand$2, Rt as getNamespacesWithMigrations, S as healthCommand, T as listCommand$8, V as tokenCommand, Vt as loadConfig, Wt as apiCommand, X as listCommand$5, Xt as fetchAll, Yt as writePlatformConfig, Zt as fetchUserInfo, _ as createCommand$3, a as listCommand$10, an as jsonArgs, b as listCommand$9, d as listCommand$11, en as readPackageJson, ft as applyCommand, gt as parseMigrationLabelNumber, h as deleteCommand$3, in as deploymentArgs, it as getCommand$3, j as logBetaWarning, kt as getMigrationFilePath, l as restoreCommand, lt as getCommand$1, nn as commonArgs, nt as startCommand, on as withCommonArgs, ot as executionsCommand, p as getCommand$4, q as webhookCommand, qt as loadWorkspaceId, r as removeCommand, rn as confirmationArgs, s as inviteCommand, sn as workspaceArgs, t as updateCommand$2, tn as PATScope, zt as trnPrefix } from "../update-2eb6jz9o.mjs";
5
5
  import { d as logger, f as styles } from "../application-DnWZVbDO.mjs";
6
6
  import { createRequire, register } from "node:module";
7
7
  import { arg, defineCommand, runCommand, runMain } from "politty";
@@ -1,5 +1,6 @@
1
1
  /// <reference path="./../user-defined.d.ts" />
2
- import { D as TypeSourceInfoEntry, E as TailorDBType, I as IdProviderConfig, Lt as Resolver, R as OAuth2ClientInput, ct as PluginBaseNamespace, lt as PluginBaseWithConfig, ot as PluginAttachment, p as Executor, r as AppConfig, st as PluginBase, t as Generator } from "../index-Bw_huFr7.mjs";
2
+ import { D as TypeSourceInfoEntry, E as TailorDBType, I as IdProviderConfig, Lt as Resolver, R as OAuth2ClientInput, ct as PluginBaseNamespace, lt as PluginBaseWithConfig, ot as PluginAttachment, p as Executor, r as AppConfig, st as PluginBase, t as Generator } from "../index-Bid18Opo.mjs";
3
+ import "politty";
3
4
  import { z } from "zod";
4
5
  import { OAuth2Client } from "@badgateway/oauth2-client";
5
6
  import { Duration, FieldMask, Timestamp, Value } from "@bufbuild/protobuf/wkt";
package/dist/cli/lib.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import "../chunk-C3Kl5s5P.mjs";
2
2
  import "../schema-BmKdDzr1.mjs";
3
- import { $t as initOperatorClient, At as getMigrationFiles, B as getMachineUserToken, Bt as generateUserTypes, Ct as compareLocalTypesWithSnapshot, D as truncate, Dt as getLatestMigrationNumber, E as listWorkflows, Ft as formatDiffSummary, Ht as getDistDir, It as formatMigrationDiff, K as listWebhookExecutors, Kt as loadAccessToken, L as listOAuth2Clients, Lt as hasChanges, M as show, Ot as getMigrationDirPath, P as remove, Pt as reconstructSnapshotFromMigrations, Q as getExecutorJob, Rt as getNamespacesWithMigrations, St as SCHEMA_FILE_NAME, Tt as createSnapshotFromLocalTypes, U as listMachineUsers, Ut as apiCall, Vt as loadConfig, W as generate, Y as triggerExecutor, Z as listExecutors, _t as bundleMigrationScript, at as getWorkflow, bt as INITIAL_SCHEMA_NUMBER, c as inviteUser, ct as listWorkflowExecutions, dt as apply, et as listExecutorJobs, f as listWorkspaces, g as deleteWorkspace, ht as MIGRATION_LABEL_KEY, i as removeUser, jt as getNextMigrationNumber, k as generate$1, kt as getMigrationFilePath, m as getWorkspace, mt as waitForExecution, n as updateUser, o as listUsers, pt as executeScript, qt as loadWorkspaceId, rt as startWorkflow, st as getWorkflowExecution, tt as watchExecutorJob, u as restoreWorkspace, ut as getExecutor, v as createWorkspace, vt as DB_TYPES_FILE_NAME, w as resumeWorkflow, wt as compareSnapshots, x as getAppHealth, xt as MIGRATE_FILE_NAME, y as listApps, yt as DIFF_FILE_NAME, z as getOAuth2Client } from "../update-BnKKm4aR.mjs";
3
+ import { $t as initOperatorClient, At as getMigrationFiles, B as getMachineUserToken, Bt as generateUserTypes, Ct as compareLocalTypesWithSnapshot, D as truncate, Dt as getLatestMigrationNumber, E as listWorkflows, Ft as formatDiffSummary, Ht as getDistDir, It as formatMigrationDiff, K as listWebhookExecutors, Kt as loadAccessToken, L as listOAuth2Clients, Lt as hasChanges, M as show, Ot as getMigrationDirPath, P as remove, Pt as reconstructSnapshotFromMigrations, Q as getExecutorJob, Rt as getNamespacesWithMigrations, St as SCHEMA_FILE_NAME, Tt as createSnapshotFromLocalTypes, U as listMachineUsers, Ut as apiCall, Vt as loadConfig, W as generate, Y as triggerExecutor, Z as listExecutors, _t as bundleMigrationScript, at as getWorkflow, bt as INITIAL_SCHEMA_NUMBER, c as inviteUser, ct as listWorkflowExecutions, dt as apply, et as listExecutorJobs, f as listWorkspaces, g as deleteWorkspace, ht as MIGRATION_LABEL_KEY, i as removeUser, jt as getNextMigrationNumber, k as generate$1, kt as getMigrationFilePath, m as getWorkspace, mt as waitForExecution, n as updateUser, o as listUsers, pt as executeScript, qt as loadWorkspaceId, rt as startWorkflow, st as getWorkflowExecution, tt as watchExecutorJob, u as restoreWorkspace, ut as getExecutor, v as createWorkspace, vt as DB_TYPES_FILE_NAME, w as resumeWorkflow, wt as compareSnapshots, x as getAppHealth, xt as MIGRATE_FILE_NAME, y as listApps, yt as DIFF_FILE_NAME, z as getOAuth2Client } from "../update-2eb6jz9o.mjs";
4
4
  import { d as logger } from "../application-DnWZVbDO.mjs";
5
5
  import { createRequire, register } from "node:module";
6
6
  import * as fs$1 from "node:fs";
@@ -1,5 +1,5 @@
1
1
  /// <reference path="./../user-defined.d.ts" />
2
- import { $ as TailorAnyDBField, B as SAML, Bt as ResolverServiceConfig, Ct as PermissionCondition, Dt as unsafeAllowAllTypePermission, Et as unsafeAllowAllGqlPermission, F as IDToken, Ft as TailorField, G as SCIMConfig, H as SCIMAttributeMapping, I as IdProviderConfig, It as QueryType, J as UserAttributeKey, K as SCIMResource, L as OAuth2ClientGrantType, Lt as Resolver, M as AuthServiceInput, N as BuiltinIdP, O as AuthConfig, P as DefinedAuth, Q as ValueOperand, R as OAuth2ClientInput, Rt as ResolverExternalConfig, St as TailorDBTypeForPlugin, Tt as TailorTypePermission, U as SCIMAttributeType, V as SCIMAttribute, Vt as ResolverServiceInput, W as SCIMAuthorization, X as UserAttributeMap, Y as UserAttributeListKey, Z as UsernameFieldKey, _t as PluginGeneratedType, a as IdPExternalConfig, at as NamespacePluginOutput, bt as PluginOutput, c as WorkflowServiceConfig, d as defineStaticWebSite, dt as PluginConfigs, et as TailorAnyDBType, ft as PluginExecutorContext, g as ExecutorServiceInput, gt as PluginGeneratedResolver, h as ExecutorServiceConfig, ht as PluginGeneratedExecutorWithFile, i as IdPConfig, it as db, j as AuthOwnConfig, k as AuthExternalConfig, l as WorkflowServiceInput, mt as PluginGeneratedExecutor, nt as TailorDBInstance, ot as PluginAttachment, pt as PluginExecutorContextBase, q as TenantProviderConfig, rt as TailorDBType, st as PluginBase, tt as TailorDBField, u as StaticWebsiteConfig, ut as PluginConfig, vt as PluginNamespaceGeneratedTypeEntry, wt as TailorTypeGqlPermission, xt as PluginProcessContext, yt as PluginNamespaceProcessContext, z as OIDC } from "../index-Bw_huFr7.mjs";
2
+ import { $ as TailorAnyDBField, B as SAML, Bt as ResolverServiceConfig, Ct as PermissionCondition, Dt as unsafeAllowAllTypePermission, Et as unsafeAllowAllGqlPermission, F as IDToken, Ft as TailorField, G as SCIMConfig, H as SCIMAttributeMapping, I as IdProviderConfig, It as QueryType, J as UserAttributeKey, K as SCIMResource, L as OAuth2ClientGrantType, Lt as Resolver, M as AuthServiceInput, N as BuiltinIdP, O as AuthConfig, P as DefinedAuth, Q as ValueOperand, R as OAuth2ClientInput, Rt as ResolverExternalConfig, St as TailorDBTypeForPlugin, Tt as TailorTypePermission, U as SCIMAttributeType, V as SCIMAttribute, Vt as ResolverServiceInput, W as SCIMAuthorization, X as UserAttributeMap, Y as UserAttributeListKey, Z as UsernameFieldKey, _t as PluginGeneratedType, a as IdPExternalConfig, at as NamespacePluginOutput, bt as PluginOutput, c as WorkflowServiceConfig, d as defineStaticWebSite, dt as PluginConfigs, et as TailorAnyDBType, ft as PluginExecutorContext, g as ExecutorServiceInput, gt as PluginGeneratedResolver, h as ExecutorServiceConfig, ht as PluginGeneratedExecutorWithFile, i as IdPConfig, it as db, j as AuthOwnConfig, k as AuthExternalConfig, l as WorkflowServiceInput, mt as PluginGeneratedExecutor, nt as TailorDBInstance, ot as PluginAttachment, pt as PluginExecutorContextBase, q as TenantProviderConfig, rt as TailorDBType, st as PluginBase, tt as TailorDBField, u as StaticWebsiteConfig, ut as PluginConfig, vt as PluginNamespaceGeneratedTypeEntry, wt as TailorTypeGqlPermission, xt as PluginProcessContext, yt as PluginNamespaceProcessContext, z as OIDC } from "../index-Bid18Opo.mjs";
3
3
  import { a as AttributeMap, c as unauthenticatedTailorUser, i as AttributeList, s as TailorUser, t as Env } from "../env-4RO7szrH.mjs";
4
- import { $ as defineAuth, A as idpUserCreatedTrigger, B as WebhookOperation, C as RecordTrigger, D as authAccessTokenIssuedTrigger, E as ResolverExecutedTrigger, F as recordUpdatedTrigger, G as WORKFLOW_TEST_ENV_KEY, H as Workflow, I as resolverExecutedTrigger, J as WorkflowJobInput, K as WorkflowJob, L as FunctionOperation, M as idpUserUpdatedTrigger, N as recordCreatedTrigger, O as authAccessTokenRefreshedTrigger, P as recordDeletedTrigger, Q as AuthInvoker, R as GqlOperation, S as RecordDeletedArgs, T as ResolverExecutedArgs, U as WorkflowConfig, V as WorkflowOperation, W as createWorkflow, X as createWorkflowJob, Y as WorkflowJobOutput, Z as createResolver, _ as AuthAccessTokenArgs, a as defineGenerators, b as IdpUserTrigger, c as createExecutor, d as IncomingWebhookRequest, f as IncomingWebhookTrigger, g as scheduleTrigger, h as ScheduleTrigger, i as defineConfig, j as idpUserDeletedTrigger, k as authAccessTokenRevokedTrigger, l as Trigger, m as ScheduleArgs, n as output, o as definePlugins, p as incomingWebhookTrigger, q as WorkflowJobContext, r as t, s as defineIdp, t as infer, u as IncomingWebhookArgs, v as AuthAccessTokenTrigger, w as RecordUpdatedArgs, x as RecordCreatedArgs, y as IdpUserArgs, z as Operation } from "../index-DMoFYBhB.mjs";
4
+ import { $ as defineAuth, A as idpUserCreatedTrigger, B as WebhookOperation, C as RecordTrigger, D as authAccessTokenIssuedTrigger, E as ResolverExecutedTrigger, F as recordUpdatedTrigger, G as WORKFLOW_TEST_ENV_KEY, H as Workflow, I as resolverExecutedTrigger, J as WorkflowJobInput, K as WorkflowJob, L as FunctionOperation, M as idpUserUpdatedTrigger, N as recordCreatedTrigger, O as authAccessTokenRefreshedTrigger, P as recordDeletedTrigger, Q as AuthInvoker, R as GqlOperation, S as RecordDeletedArgs, T as ResolverExecutedArgs, U as WorkflowConfig, V as WorkflowOperation, W as createWorkflow, X as createWorkflowJob, Y as WorkflowJobOutput, Z as createResolver, _ as AuthAccessTokenArgs, a as defineGenerators, b as IdpUserTrigger, c as createExecutor, d as IncomingWebhookRequest, f as IncomingWebhookTrigger, g as scheduleTrigger, h as ScheduleTrigger, i as defineConfig, j as idpUserDeletedTrigger, k as authAccessTokenRevokedTrigger, l as Trigger, m as ScheduleArgs, n as output, o as definePlugins, p as incomingWebhookTrigger, q as WorkflowJobContext, r as t, s as defineIdp, t as infer, u as IncomingWebhookArgs, v as AuthAccessTokenTrigger, w as RecordUpdatedArgs, x as RecordCreatedArgs, y as IdpUserArgs, z as Operation } from "../index-BlUBAAvu.mjs";
5
5
  export { AttributeList, AttributeMap, AuthAccessTokenArgs, AuthAccessTokenTrigger, AuthConfig, AuthExternalConfig, AuthInvoker, AuthOwnConfig, AuthServiceInput, BuiltinIdP, DefinedAuth, Env, ExecutorServiceConfig, ExecutorServiceInput, FunctionOperation, GqlOperation, IDToken, IdPConfig, IdPExternalConfig, IdProviderConfig, IdpUserArgs, IdpUserTrigger, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookTrigger, NamespacePluginOutput, OAuth2ClientInput as OAuth2Client, OAuth2ClientGrantType, OIDC, Operation, PermissionCondition, PluginAttachment, PluginBase, PluginConfig, PluginConfigs, PluginExecutorContext, PluginExecutorContextBase, PluginGeneratedExecutor, PluginGeneratedExecutorWithFile, PluginGeneratedResolver, PluginGeneratedType, PluginNamespaceGeneratedTypeEntry, PluginNamespaceProcessContext, PluginOutput, PluginProcessContext, QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordTrigger, RecordUpdatedArgs, Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, ScheduleArgs, ScheduleTrigger, StaticWebsiteConfig, TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, TailorDBTypeForPlugin, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, TenantProviderConfig, Trigger, UserAttributeKey, UserAttributeListKey, UserAttributeMap, UsernameFieldKey, ValueOperand, WORKFLOW_TEST_ENV_KEY, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowJobInput, WorkflowJobOutput, WorkflowOperation, WorkflowServiceConfig, WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, definePlugins, defineStaticWebSite, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
@@ -107,11 +107,11 @@ declare const TailorFieldSchema: z.ZodObject<{
107
107
  type: z.ZodEnum<{
108
108
  string: "string";
109
109
  boolean: "boolean";
110
- date: "date";
111
- enum: "enum";
112
110
  uuid: "uuid";
113
111
  integer: "integer";
114
112
  float: "float";
113
+ enum: "enum";
114
+ date: "date";
115
115
  datetime: "datetime";
116
116
  time: "time";
117
117
  nested: "nested";
@@ -140,11 +140,11 @@ declare const ResolverSchema: z.ZodObject<{
140
140
  type: z.ZodEnum<{
141
141
  string: "string";
142
142
  boolean: "boolean";
143
- date: "date";
144
- enum: "enum";
145
143
  uuid: "uuid";
146
144
  integer: "integer";
147
145
  float: "float";
146
+ enum: "enum";
147
+ date: "date";
148
148
  datetime: "datetime";
149
149
  time: "time";
150
150
  nested: "nested";
@@ -170,11 +170,11 @@ declare const ResolverSchema: z.ZodObject<{
170
170
  type: z.ZodEnum<{
171
171
  string: "string";
172
172
  boolean: "boolean";
173
- date: "date";
174
- enum: "enum";
175
173
  uuid: "uuid";
176
174
  integer: "integer";
177
175
  float: "float";
176
+ enum: "enum";
177
+ date: "date";
178
178
  datetime: "datetime";
179
179
  time: "time";
180
180
  nested: "nested";
@@ -2162,4 +2162,4 @@ type GeneratorConfigSchemaType = ReturnType<typeof createGeneratorConfigSchema>;
2162
2162
  type Generator = z.output<GeneratorConfigSchemaType>;
2163
2163
  //#endregion
2164
2164
  export { TailorAnyDBField as $, AuthInvoker as A, FieldMetadata as At, SAML as B, ResolverServiceConfig as Bt, ScheduleTriggerInput as C, PermissionCondition as Ct, TypeSourceInfoEntry as D, unsafeAllowAllTypePermission as Dt, TailorDBType as E, unsafeAllowAllGqlPermission as Et, IDToken as F, TailorField as Ft, SCIMConfig as G, AllowedValues as Gt, SCIMAttributeMapping as H, InferFieldsOutput as Ht, IdProviderConfig as I, QueryType as It, UserAttributeKey as J, SCIMResource as K, AllowedValuesOutput as Kt, OAuth2ClientGrantType as L, Resolver as Lt, AuthServiceInput as M, FieldOutput$1 as Mt, BuiltinIdP as N, TailorFieldType as Nt, AuthConfig as O, ArrayFieldOutput as Ot, DefinedAuth as P, TailorAnyField as Pt, ValueOperand as Q, OAuth2ClientInput as R, ResolverExternalConfig as Rt, ResolverExecutedTrigger as S, TailorDBTypeForPlugin as St, WorkflowOperation as T, TailorTypePermission as Tt, SCIMAttributeType as U, JsonCompatible as Ut, SCIMAttribute as V, ResolverServiceInput as Vt, SCIMAuthorization as W, output as Wt, UserAttributeMap as X, UserAttributeListKey as Y, UsernameFieldKey as Z, FunctionOperation as _, PluginGeneratedType as _t, IdPExternalConfig as a, NamespacePluginOutput as at, IncomingWebhookTrigger as b, PluginOutput as bt, WorkflowServiceConfig as c, PluginBaseNamespace as ct, defineStaticWebSite as d, PluginConfigs as dt, TailorAnyDBType as et, AuthAccessTokenTrigger as f, PluginExecutorContext as ft, ExecutorServiceInput as g, PluginGeneratedResolver as gt, ExecutorServiceConfig as h, PluginGeneratedExecutorWithFile as ht, IdPConfig as i, db as it, AuthOwnConfig as j, FieldOptions as jt, AuthExternalConfig as k, DefinedFieldMetadata as kt, WorkflowServiceInput as l, PluginBaseWithConfig as lt, ExecutorInput as m, PluginGeneratedExecutor as mt, GeneratorConfig as n, TailorDBInstance as nt, IdPInput as o, PluginAttachment as ot, Executor as p, PluginExecutorContextBase as pt, TenantProviderConfig as q, AppConfig as r, TailorDBType$1 as rt, IdpDefinitionBrand as s, PluginBase as st, Generator as t, TailorDBField as tt, StaticWebsiteConfig as u, PluginConfig as ut, GqlOperation as v, PluginNamespaceGeneratedTypeEntry as vt, WebhookOperation as w, TailorTypeGqlPermission as wt, RecordTrigger as x, PluginProcessContext as xt, IdpUserTrigger as y, PluginNamespaceProcessContext as yt, OIDC as z, ResolverInput as zt };
2165
- //# sourceMappingURL=index-Bw_huFr7.d.mts.map
2165
+ //# sourceMappingURL=index-Bid18Opo.d.mts.map
@@ -1,9 +1,9 @@
1
1
  /// <reference path="./user-defined.d.ts" />
2
- import { A as AuthInvoker$1, At as FieldMetadata, C as ScheduleTriggerInput, Ft as TailorField, Gt as AllowedValues, Ht as InferFieldsOutput, Kt as AllowedValuesOutput, M as AuthServiceInput, Mt as FieldOutput, Nt as TailorFieldType, Ot as ArrayFieldOutput, P as DefinedAuth, Pt as TailorAnyField, S as ResolverExecutedTrigger$1, T as WorkflowOperation$1, Ut as JsonCompatible, Wt as output$1, X as UserAttributeMap, Y as UserAttributeListKey, _ as FunctionOperation$1, b as IncomingWebhookTrigger$1, f as AuthAccessTokenTrigger$1, jt as FieldOptions, kt as DefinedFieldMetadata, m as ExecutorInput, n as GeneratorConfig, nt as TailorDBInstance, o as IdPInput, r as AppConfig, rt as TailorDBType, s as IdpDefinitionBrand, ut as PluginConfig, v as GqlOperation$1, w as WebhookOperation$1, x as RecordTrigger$1, y as IdpUserTrigger$1, zt as ResolverInput } from "./index-Bw_huFr7.mjs";
2
+ import { A as AuthInvoker$1, At as FieldMetadata, C as ScheduleTriggerInput, Ft as TailorField, Gt as AllowedValues, Ht as InferFieldsOutput, Kt as AllowedValuesOutput, M as AuthServiceInput, Mt as FieldOutput, Nt as TailorFieldType, Ot as ArrayFieldOutput, P as DefinedAuth, Pt as TailorAnyField, S as ResolverExecutedTrigger$1, T as WorkflowOperation$1, Ut as JsonCompatible, Wt as output$1, X as UserAttributeMap, Y as UserAttributeListKey, _ as FunctionOperation$1, b as IncomingWebhookTrigger$1, f as AuthAccessTokenTrigger$1, jt as FieldOptions, kt as DefinedFieldMetadata, m as ExecutorInput, n as GeneratorConfig, nt as TailorDBInstance, o as IdPInput, r as AppConfig, rt as TailorDBType, s as IdpDefinitionBrand, ut as PluginConfig, v as GqlOperation$1, w as WebhookOperation$1, x as RecordTrigger$1, y as IdpUserTrigger$1, zt as ResolverInput } from "./index-Bid18Opo.mjs";
3
3
  import { n as TailorEnv, r as TailorActor, s as TailorUser } from "./env-4RO7szrH.mjs";
4
- import * as zod38 from "zod";
4
+ import * as zod0 from "zod";
5
5
  import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
6
- import * as zod_v4_core33 from "zod/v4/core";
6
+ import * as zod_v4_core0 from "zod/v4/core";
7
7
  import { Client } from "@urql/core";
8
8
  import { StandardCRON } from "ts-cron-validator";
9
9
 
@@ -500,12 +500,12 @@ declare function defineGenerators(...configs: GeneratorConfig[]): (["@tailor-pla
500
500
  id: string;
501
501
  description: string;
502
502
  dependencies: ("executor" | "tailordb" | "resolver")[];
503
- aggregate: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod38.ZodAny>;
504
- processType?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
505
- processResolver?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
506
- processExecutor?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
507
- processTailorDBNamespace?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
508
- processResolverNamespace?: zod_v4_core33.$InferInnerFunctionType<zod_v4_core33.$ZodFunctionArgs, zod_v4_core33.$ZodFunctionOut> | undefined;
503
+ aggregate: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod0.ZodAny>;
504
+ processType?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
505
+ processResolver?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
506
+ processExecutor?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
507
+ processTailorDBNamespace?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
508
+ processResolverNamespace?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
509
509
  })[];
510
510
  /**
511
511
  * Define plugins to be used with the Tailor SDK.
@@ -588,4 +588,4 @@ declare namespace t {
588
588
  }
589
589
  //#endregion
590
590
  export { defineAuth as $, idpUserCreatedTrigger as A, WebhookOperation as B, RecordTrigger as C, authAccessTokenIssuedTrigger as D, ResolverExecutedTrigger as E, recordUpdatedTrigger as F, WORKFLOW_TEST_ENV_KEY as G, Workflow as H, resolverExecutedTrigger as I, WorkflowJobInput as J, WorkflowJob as K, FunctionOperation as L, idpUserUpdatedTrigger as M, recordCreatedTrigger as N, authAccessTokenRefreshedTrigger as O, recordDeletedTrigger as P, AuthInvoker as Q, GqlOperation as R, RecordDeletedArgs as S, ResolverExecutedArgs as T, WorkflowConfig as U, WorkflowOperation as V, createWorkflow as W, createWorkflowJob as X, WorkflowJobOutput as Y, createResolver as Z, AuthAccessTokenArgs as _, defineGenerators as a, IdpUserTrigger as b, createExecutor as c, IncomingWebhookRequest as d, IncomingWebhookTrigger as f, scheduleTrigger as g, ScheduleTrigger as h, defineConfig as i, idpUserDeletedTrigger as j, authAccessTokenRevokedTrigger as k, Trigger as l, ScheduleArgs as m, output as n, definePlugins as o, incomingWebhookTrigger as p, WorkflowJobContext as q, t as r, defineIdp as s, infer as t, IncomingWebhookArgs as u, AuthAccessTokenTrigger as v, RecordUpdatedArgs as w, RecordCreatedArgs as x, IdpUserArgs as y, Operation as z };
591
- //# sourceMappingURL=index-DMoFYBhB.d.mts.map
591
+ //# sourceMappingURL=index-BlUBAAvu.d.mts.map
@@ -3407,12 +3407,7 @@ function processIdpUser(auth) {
3407
3407
  name: "_User",
3408
3408
  dependencies: [typeName],
3409
3409
  dataFile: "data/_User.jsonl",
3410
- mutation: `mutation CreateUser($input: _CreateUserInput!) {
3411
- _createUser(input: $input) {
3412
- id
3413
- }
3414
- }
3415
- `,
3410
+ idpNamespace: auth.idProvider.namespace,
3416
3411
  schema: {
3417
3412
  usernameField,
3418
3413
  userTypeName: typeName
@@ -3420,6 +3415,84 @@ function processIdpUser(auth) {
3420
3415
  };
3421
3416
  }
3422
3417
  /**
3418
+ * Generates the server-side IDP seed script code for testExecScript execution.
3419
+ * Uses the global tailor.idp.Client - no bundling required.
3420
+ * @param idpNamespace - The IDP namespace name
3421
+ * @returns Script code string
3422
+ */
3423
+ function generateIdpSeedScriptCode(idpNamespace) {
3424
+ return ml`
3425
+ export async function main(input) {
3426
+ const client = new tailor.idp.Client({ namespace: "${idpNamespace}" });
3427
+ const errors = [];
3428
+ let processed = 0;
3429
+
3430
+ for (let i = 0; i < input.users.length; i++) {
3431
+ try {
3432
+ await client.createUser(input.users[i]);
3433
+ processed++;
3434
+ console.log(\`[_User] \${i + 1}/\${input.users.length}: \${input.users[i].name}\`);
3435
+ } catch (error) {
3436
+ const message = error instanceof Error ? error.message : String(error);
3437
+ errors.push(\`Row \${i} (\${input.users[i].name}): \${message}\`);
3438
+ console.error(\`[_User] Row \${i} failed: \${message}\`);
3439
+ }
3440
+ }
3441
+
3442
+ return {
3443
+ success: errors.length === 0,
3444
+ processed,
3445
+ errors,
3446
+ };
3447
+ }
3448
+ `;
3449
+ }
3450
+ /**
3451
+ * Generates the server-side IDP truncation script code for testExecScript execution.
3452
+ * Lists all users with pagination and deletes each one.
3453
+ * @param idpNamespace - The IDP namespace name
3454
+ * @returns Script code string
3455
+ */
3456
+ function generateIdpTruncateScriptCode(idpNamespace) {
3457
+ return ml`
3458
+ export async function main() {
3459
+ const client = new tailor.idp.Client({ namespace: "${idpNamespace}" });
3460
+ const errors = [];
3461
+ let deleted = 0;
3462
+
3463
+ // List all users with pagination
3464
+ let nextToken = undefined;
3465
+ const allUsers = [];
3466
+ do {
3467
+ const response = await client.users(nextToken ? { nextToken } : undefined);
3468
+ allUsers.push(...(response.users || []));
3469
+ nextToken = response.nextToken;
3470
+ } while (nextToken);
3471
+
3472
+ console.log(\`Found \${allUsers.length} IDP users to delete\`);
3473
+
3474
+ for (const user of allUsers) {
3475
+ try {
3476
+ await client.deleteUser(user.id);
3477
+ deleted++;
3478
+ console.log(\`[_User] Deleted \${deleted}/\${allUsers.length}: \${user.name}\`);
3479
+ } catch (error) {
3480
+ const message = error instanceof Error ? error.message : String(error);
3481
+ errors.push(\`User \${user.id} (\${user.name}): \${message}\`);
3482
+ console.error(\`[_User] Delete failed for \${user.name}: \${message}\`);
3483
+ }
3484
+ }
3485
+
3486
+ return {
3487
+ success: errors.length === 0,
3488
+ deleted,
3489
+ total: allUsers.length,
3490
+ errors,
3491
+ };
3492
+ }
3493
+ `;
3494
+ }
3495
+ /**
3423
3496
  * Generates the schema file content for IdP users with foreign key
3424
3497
  * @param usernameField - Username field name
3425
3498
  * @param userTypeName - TailorDB user type name
@@ -3680,16 +3753,17 @@ function processSeedTypeInfo(type, namespace) {
3680
3753
  //#region src/cli/generator/builtin/seed/index.ts
3681
3754
  const SeedGeneratorID = "@tailor-platform/seed";
3682
3755
  /**
3683
- * Generate the IdP user seed function code
3756
+ * Generate the IdP user seed function code using tailor.idp.Client via testExecScript
3684
3757
  * @param hasIdpUser - Whether IdP user is included
3758
+ * @param idpNamespace - The IDP namespace name
3685
3759
  * @returns JavaScript code for IdP user seeding function
3686
3760
  */
3687
- function generateIdpUserSeedFunction(hasIdpUser) {
3688
- if (!hasIdpUser) return "";
3761
+ function generateIdpUserSeedFunction(hasIdpUser, idpNamespace) {
3762
+ if (!hasIdpUser || !idpNamespace) return "";
3689
3763
  return ml`
3690
- // Seed _User via GraphQL mutation
3764
+ // Seed _User via tailor.idp.Client (server-side)
3691
3765
  const seedIdpUser = async () => {
3692
- console.log(styleText("cyan", " Seeding _User via GraphQL mutation..."));
3766
+ console.log(styleText("cyan", " Seeding _User via tailor.idp.Client..."));
3693
3767
  const dataDir = join(configDir, "data");
3694
3768
  const data = loadSeedData(dataDir, ["_User"]);
3695
3769
  const rows = data["_User"] || [];
@@ -3697,34 +3771,54 @@ function generateIdpUserSeedFunction(hasIdpUser) {
3697
3771
  console.log(styleText("dim", " No _User data to seed"));
3698
3772
  return { success: true };
3699
3773
  }
3700
- console.log(styleText("dim", \` Processing _User...\`));
3701
- const mutation = \`mutation CreateUser($input: _CreateUserInput!) { _createUser(input: $input) { id } }\`;
3702
- let successCount = 0;
3703
- let failCount = 0;
3704
- for (let i = 0; i < rows.length; i++) {
3774
+ console.log(styleText("dim", \` Processing \${rows.length} _User records...\`));
3775
+
3776
+ const idpSeedCode = \/* js *\/\`${generateIdpSeedScriptCode(idpNamespace).replace(/`/g, "\\`").replace(/\$/g, "\\$")}\`;
3777
+
3778
+ const result = await executeScript({
3779
+ client: operatorClient,
3780
+ workspaceId,
3781
+ name: "seed-idp-user.ts",
3782
+ code: idpSeedCode,
3783
+ arg: JSON.stringify({ users: rows }),
3784
+ invoker: {
3785
+ namespace: authNamespace,
3786
+ machineUserName,
3787
+ },
3788
+ });
3789
+
3790
+ if (result.logs) {
3791
+ for (const line of result.logs.split("\\n").filter(Boolean)) {
3792
+ console.log(styleText("dim", \` \${line}\`));
3793
+ }
3794
+ }
3795
+
3796
+ if (result.success) {
3797
+ let parsed;
3705
3798
  try {
3706
- const response = await fetch(endpoint, {
3707
- method: "POST",
3708
- headers: { "Content-Type": "application/json", Authorization: \`Bearer \${tokenInfo.accessToken}\` },
3709
- body: JSON.stringify({ query: mutation, variables: { input: rows[i] } }),
3710
- });
3711
- const result = await response.json();
3712
- if (result.errors) {
3713
- failCount++;
3714
- console.error(styleText("red", \` ✗ Row \${i} in _User failed: \${result.errors[0].message}\`));
3715
- } else {
3716
- successCount++;
3799
+ parsed = JSON.parse(result.result || "{}");
3800
+ } catch (e) {
3801
+ console.error(styleText("red", \` ✗ Failed to parse seed result: \${e.message}\`));
3802
+ return { success: false };
3803
+ }
3804
+
3805
+ if (parsed.processed) {
3806
+ console.log(styleText("green", \` ✓ _User: \${parsed.processed} rows processed\`));
3807
+ }
3808
+
3809
+ if (!parsed.success) {
3810
+ const errors = Array.isArray(parsed.errors) ? parsed.errors : [];
3811
+ for (const err of errors) {
3812
+ console.error(styleText("red", \` ✗ \${err}\`));
3717
3813
  }
3718
- } catch (error) {
3719
- failCount++;
3720
- console.error(styleText("red", \` ✗ Row \${i} in _User failed: \${error.message}\`));
3814
+ return { success: false };
3721
3815
  }
3816
+
3817
+ return { success: true };
3818
+ } else {
3819
+ console.error(styleText("red", \` ✗ Seed failed: \${result.error}\`));
3820
+ return { success: false };
3722
3821
  }
3723
- console.log(styleText("green", \` ✓ _User: \${successCount} rows processed\`));
3724
- if (failCount > 0) {
3725
- console.error(styleText("red", \` ✗ _User: \${failCount} rows failed\`));
3726
- }
3727
- return { success: failCount === 0 };
3728
3822
  };
3729
3823
  `;
3730
3824
  }
@@ -3747,15 +3841,97 @@ function generateIdpUserSeedCall(hasIdpUser) {
3747
3841
  `;
3748
3842
  }
3749
3843
  /**
3844
+ * Generate the IdP user truncation function code using tailor.idp.Client via testExecScript
3845
+ * @param hasIdpUser - Whether IdP user is included
3846
+ * @param idpNamespace - The IDP namespace name
3847
+ * @returns JavaScript code for IdP user truncation function
3848
+ */
3849
+ function generateIdpUserTruncateFunction(hasIdpUser, idpNamespace) {
3850
+ if (!hasIdpUser || !idpNamespace) return "";
3851
+ return ml`
3852
+ // Truncate _User via tailor.idp.Client (server-side)
3853
+ const truncateIdpUser = async () => {
3854
+ console.log(styleText("cyan", "Truncating _User via tailor.idp.Client..."));
3855
+
3856
+ const idpTruncateCode = \/* js *\/\`${generateIdpTruncateScriptCode(idpNamespace).replace(/`/g, "\\`").replace(/\$/g, "\\$")}\`;
3857
+
3858
+ const result = await executeScript({
3859
+ client: operatorClient,
3860
+ workspaceId,
3861
+ name: "truncate-idp-user.ts",
3862
+ code: idpTruncateCode,
3863
+ arg: JSON.stringify({}),
3864
+ invoker: {
3865
+ namespace: authNamespace,
3866
+ machineUserName,
3867
+ },
3868
+ });
3869
+
3870
+ if (result.logs) {
3871
+ for (const line of result.logs.split("\\n").filter(Boolean)) {
3872
+ console.log(styleText("dim", \` \${line}\`));
3873
+ }
3874
+ }
3875
+
3876
+ if (result.success) {
3877
+ let parsed;
3878
+ try {
3879
+ parsed = JSON.parse(result.result || "{}");
3880
+ } catch (e) {
3881
+ console.error(styleText("red", \` ✗ Failed to parse truncation result: \${e.message}\`));
3882
+ return { success: false };
3883
+ }
3884
+
3885
+ if (parsed.deleted !== undefined) {
3886
+ console.log(styleText("green", \` ✓ _User: \${parsed.deleted} users deleted\`));
3887
+ }
3888
+
3889
+ if (!parsed.success) {
3890
+ const errors = Array.isArray(parsed.errors) ? parsed.errors : [];
3891
+ for (const err of errors) {
3892
+ console.error(styleText("red", \` ✗ \${err}\`));
3893
+ }
3894
+ return { success: false };
3895
+ }
3896
+
3897
+ return { success: true };
3898
+ } else {
3899
+ console.error(styleText("red", \` ✗ Truncation failed: \${result.error}\`));
3900
+ return { success: false };
3901
+ }
3902
+ };
3903
+ `;
3904
+ }
3905
+ /**
3906
+ * Generate the IdP user truncation call code within the truncate block
3907
+ * @param hasIdpUser - Whether IdP user is included
3908
+ * @returns JavaScript code for calling IdP user truncation
3909
+ */
3910
+ function generateIdpUserTruncateCall(hasIdpUser) {
3911
+ if (!hasIdpUser) return "";
3912
+ return ml`
3913
+ // Truncate _User if applicable
3914
+ const shouldTruncateUser = !skipIdp && !hasNamespace && (!hasTypes || entitiesToProcess.includes("_User"));
3915
+ if (hasIdpUser && shouldTruncateUser) {
3916
+ const truncResult = await truncateIdpUser();
3917
+ if (!truncResult.success) {
3918
+ console.error(styleText("red", "IDP user truncation failed."));
3919
+ process.exit(1);
3920
+ }
3921
+ }
3922
+ `;
3923
+ }
3924
+ /**
3750
3925
  * Generates the exec.mjs script content using testExecScript API for TailorDB types
3751
- * and GraphQL mutation for _User (IdP managed)
3926
+ * and tailor.idp.Client for _User (IdP managed)
3752
3927
  * @param defaultMachineUserName - Default machine user name from generator config (can be overridden at runtime)
3753
3928
  * @param relativeConfigPath - Config path relative to exec script
3754
3929
  * @param namespaceConfigs - Namespace configurations with types and dependencies
3755
3930
  * @param hasIdpUser - Whether _User is included
3931
+ * @param idpNamespace - The IDP namespace name, or null if not applicable
3756
3932
  * @returns exec.mjs file contents
3757
3933
  */
3758
- function generateExecScript(defaultMachineUserName, relativeConfigPath, namespaceConfigs, hasIdpUser) {
3934
+ function generateExecScript(defaultMachineUserName, relativeConfigPath, namespaceConfigs, hasIdpUser, idpNamespace) {
3759
3935
  const namespaceEntitiesEntries = namespaceConfigs.map(({ namespace, types }) => {
3760
3936
  return ` "${namespace}": [\n${types.map((e) => ` "${e}",`).join("\n")}\n ]`;
3761
3937
  }).join(",\n");
@@ -3769,7 +3945,6 @@ function generateExecScript(defaultMachineUserName, relativeConfigPath, namespac
3769
3945
  import { createInterface } from "node:readline";
3770
3946
  import {
3771
3947
  show,
3772
- getMachineUserToken,
3773
3948
  truncate,
3774
3949
  bundleSeedScript,
3775
3950
  chunkSeedData,
@@ -3923,6 +4098,17 @@ ${namespaceDepsEntries}
3923
4098
  }
3924
4099
  }
3925
4100
 
4101
+ // Get application info
4102
+ const appInfo = await show({ configPath, profile: values.profile });
4103
+ const authNamespace = appInfo.auth;
4104
+
4105
+ // Initialize operator client (once for all namespaces)
4106
+ const accessToken = await loadAccessToken({ profile: values.profile, useProfile: true });
4107
+ const workspaceId = await loadWorkspaceId({ profile: values.profile });
4108
+ const operatorClient = await initOperatorClient(accessToken);
4109
+
4110
+ ${generateIdpUserTruncateFunction(hasIdpUser, idpNamespace)}
4111
+
3926
4112
  // Truncate tables if requested
3927
4113
  if (values.truncate) {
3928
4114
  const answer = values.yes ? "y" : await promptConfirmation("Are you sure you want to truncate? (y/n): ");
@@ -3958,11 +4144,14 @@ ${namespaceDepsEntries}
3958
4144
  all: true,
3959
4145
  });
3960
4146
  }
3961
- console.log(styleText("green", "Truncate completed."));
3962
4147
  } catch (error) {
3963
4148
  console.error(styleText("red", \`Truncate failed: \${error.message}\`));
3964
4149
  process.exit(1);
3965
4150
  }
4151
+
4152
+ ${generateIdpUserTruncateCall(hasIdpUser)}
4153
+
4154
+ console.log(styleText("green", "Truncate completed."));
3966
4155
  }
3967
4156
 
3968
4157
  console.log(styleText("cyan", "\\nStarting seed data generation..."));
@@ -3970,18 +4159,6 @@ ${namespaceDepsEntries}
3970
4159
  console.log(styleText("dim", \` Skipping IdP user (_User)\`));
3971
4160
  }
3972
4161
 
3973
- // Get application info
3974
- const appInfo = await show({ configPath, profile: values.profile });
3975
- const endpoint = \`\${appInfo.url}/query\`;
3976
- const authNamespace = appInfo.auth;
3977
-
3978
- // Get machine user token
3979
- const tokenInfo = await getMachineUserToken({
3980
- name: machineUserName,
3981
- configPath,
3982
- profile: values.profile,
3983
- });
3984
-
3985
4162
  // Load seed data from JSONL files
3986
4163
  const loadSeedData = (dataDir, typeNames) => {
3987
4164
  const data = {};
@@ -4028,11 +4205,6 @@ ${namespaceDepsEntries}
4028
4205
  return result;
4029
4206
  };
4030
4207
 
4031
- // Initialize operator client (once for all namespaces)
4032
- const accessToken = await loadAccessToken({ profile: values.profile, useProfile: true });
4033
- const workspaceId = await loadWorkspaceId({ profile: values.profile });
4034
- const operatorClient = await initOperatorClient(accessToken);
4035
-
4036
4208
  // Seed TailorDB types via testExecScript
4037
4209
  const seedViaTestExecScript = async (namespace, typesToSeed, deps) => {
4038
4210
  const dataDir = join(configDir, "data");
@@ -4118,8 +4290,8 @@ ${namespaceDepsEntries}
4118
4290
  if (!parsed.success) {
4119
4291
  const errors = Array.isArray(parsed.errors) ? parsed.errors : [];
4120
4292
  const errorMessage =
4121
- errors.length > 0 ? errors.join("\\n") : "Seed script reported failure";
4122
- console.error(styleText("red", \` ✗ Seed failed: \${errorMessage}\`));
4293
+ errors.length > 0 ? errors.join("\\n ") : "Seed script reported failure";
4294
+ console.error(styleText("red", \` ✗ Seed failed:\\n \${errorMessage}\`));
4123
4295
  hasError = true;
4124
4296
  allErrors.push(errorMessage);
4125
4297
  }
@@ -4136,7 +4308,7 @@ ${namespaceDepsEntries}
4136
4308
  return { success: true, processed: allProcessed };
4137
4309
  };
4138
4310
 
4139
- ${generateIdpUserSeedFunction(hasIdpUser)}
4311
+ ${generateIdpUserSeedFunction(hasIdpUser, idpNamespace)}
4140
4312
 
4141
4313
  // Main execution
4142
4314
  try {
@@ -4188,7 +4360,7 @@ ${namespaceDepsEntries}
4188
4360
  function createSeedGenerator(options) {
4189
4361
  return {
4190
4362
  id: SeedGeneratorID,
4191
- description: "Generates seed data files (Kysely batch insert + GraphQL mutation for _User)",
4363
+ description: "Generates seed data files (Kysely batch insert + tailor.idp.Client for _User)",
4192
4364
  dependencies: ["tailordb"],
4193
4365
  processType: ({ type, source, namespace }) => {
4194
4366
  return {
@@ -4268,7 +4440,7 @@ function createSeedGenerator(options) {
4268
4440
  const relativeConfigPath = path.relative(options.distPath, configPath);
4269
4441
  files.push({
4270
4442
  path: path.join(options.distPath, "exec.mjs"),
4271
- content: generateExecScript(options.machineUserName, relativeConfigPath, namespaceConfigs, hasIdpUser)
4443
+ content: generateExecScript(options.machineUserName, relativeConfigPath, namespaceConfigs, hasIdpUser, idpUser?.idpNamespace ?? null)
4272
4444
  });
4273
4445
  return { files };
4274
4446
  }
@@ -15255,4 +15427,4 @@ const updateCommand = defineCommand({
15255
15427
 
15256
15428
  //#endregion
15257
15429
  export { jobsCommand as $, initOperatorClient as $t, generateCommand as A, getMigrationFiles as At, getMachineUserToken as B, generateUserTypes as Bt, resumeCommand as C, compareLocalTypesWithSnapshot as Ct, truncate as D, getLatestMigrationNumber as Dt, listWorkflows as E, formatMigrationNumber as Et, removeCommand$1 as F, formatDiffSummary as Ft, generateCommand$1 as G, fetchLatestToken as Gt, listCommand$5 as H, getDistDir as Ht, listCommand$4 as I, formatMigrationDiff as It, triggerCommand as J, readPlatformConfig as Jt, listWebhookExecutors as K, loadAccessToken as Kt, listOAuth2Clients as L, hasChanges as Lt, show as M, isValidMigrationNumber as Mt, showCommand as N, loadDiff as Nt, truncateCommand as O, getMigrationDirPath as Ot, remove as P, reconstructSnapshotFromMigrations as Pt, getExecutorJob as Q, initOAuth2Client as Qt, getCommand$1 as R, getNamespacesWithMigrations as Rt, healthCommand as S, SCHEMA_FILE_NAME as St, listCommand$3 as T, createSnapshotFromLocalTypes as Tt, listMachineUsers as U, apiCall as Ut, tokenCommand as V, loadConfig as Vt, generate$1 as W, apiCommand as Wt, listCommand$6 as X, fetchAll as Xt, triggerExecutor as Y, writePlatformConfig as Yt, listExecutors as Z, fetchUserInfo as Zt, createCommand as _, bundleMigrationScript as _t, listCommand as a, jsonArgs as an, getWorkflow as at, listCommand$2 as b, INITIAL_SCHEMA_NUMBER as bt, inviteUser as c, listWorkflowExecutions as ct, listCommand$1 as d, apply as dt, readPackageJson as en, listExecutorJobs as et, listWorkspaces as f, applyCommand as ft, deleteWorkspace as g, parseMigrationLabelNumber as gt, deleteCommand as h, MIGRATION_LABEL_KEY as ht, removeUser as i, deploymentArgs as in, getCommand$2 as it, logBetaWarning as j, getNextMigrationNumber as jt, generate as k, getMigrationFilePath as kt, restoreCommand as l, getCommand$3 as lt, getWorkspace as m, waitForExecution$1 as mt, updateUser as n, commonArgs as nn, startCommand as nt, listUsers as o, withCommonArgs as on, executionsCommand as ot, getCommand as p, executeScript as pt, webhookCommand as q, loadWorkspaceId as qt, removeCommand as r, confirmationArgs as rn, startWorkflow as rt, inviteCommand as s, workspaceArgs as sn, getWorkflowExecution as st, updateCommand as t, PATScope as tn, watchExecutorJob as tt, restoreWorkspace as u, getExecutor as ut, createWorkspace as v, DB_TYPES_FILE_NAME as vt, resumeWorkflow as w, compareSnapshots as wt, getAppHealth as x, MIGRATE_FILE_NAME as xt, listApps as y, DIFF_FILE_NAME as yt, getOAuth2Client as z, trnPrefix as zt };
15258
- //# sourceMappingURL=update-BnKKm4aR.mjs.map
15430
+ //# sourceMappingURL=update-2eb6jz9o.mjs.map