@tailor-platform/sdk 1.30.0 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +3 -1
  3. package/dist/{application-Bf8SUAtR.mjs → application-B8vok3w2.mjs} +257 -42
  4. package/dist/application-B8vok3w2.mjs.map +1 -0
  5. package/dist/{application-DAQVP9CS.mjs → application-DHifc-oA.mjs} +2 -2
  6. package/dist/cli/index.mjs +67 -70
  7. package/dist/cli/index.mjs.map +1 -1
  8. package/dist/cli/lib.d.mts +8 -8
  9. package/dist/cli/lib.mjs +8 -6
  10. package/dist/cli/lib.mjs.map +1 -1
  11. package/dist/client-B0wrLUVK.mjs +6 -0
  12. package/dist/{client-CZmQBXAY.mjs → client-DfdgRZlQ.mjs} +25 -13
  13. package/dist/{client-CZmQBXAY.mjs.map → client-DfdgRZlQ.mjs.map} +1 -1
  14. package/dist/configure/index.d.mts +4 -4
  15. package/dist/configure/index.mjs +1 -1
  16. package/dist/{crash-report-CYrETw1c.mjs → crash-report-BMEhRxeg.mjs} +1 -1
  17. package/dist/{crash-report-DizNMVnm.mjs → crash-report-wNxS0IUJ.mjs} +2 -2
  18. package/dist/{crash-report-DizNMVnm.mjs.map → crash-report-wNxS0IUJ.mjs.map} +1 -1
  19. package/dist/{env-DiWYe80_.d.mts → env-BgdHfWDn.d.mts} +2 -2
  20. package/dist/{index-BU7Cd5I4.d.mts → index-BAud4CE7.d.mts} +15 -15
  21. package/dist/{index-HvMUWjvV.d.mts → index-CdDzh-T2.d.mts} +2 -2
  22. package/dist/{index-rH_De6hM.d.mts → index-CxgBnxKM.d.mts} +2 -2
  23. package/dist/{index-DCEMVfJA.d.mts → index-D4Y81vh1.d.mts} +2 -2
  24. package/dist/{index-2WQbf_LH.d.mts → index-FZMBoUWm.d.mts} +2 -2
  25. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  26. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  27. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  28. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  29. package/dist/plugin/index.d.mts +2 -2
  30. package/dist/{plugin-C-UdAM8C.d.mts → plugin-DyVYXZWz.d.mts} +7 -7
  31. package/dist/{query-C3oQTLvb.mjs → runtime-DbX_UxlC.mjs} +67 -39
  32. package/dist/runtime-DbX_UxlC.mjs.map +1 -0
  33. package/dist/{schema-BePzTFBV.mjs → schema-CNWt2FKQ.mjs} +3 -14
  34. package/dist/schema-CNWt2FKQ.mjs.map +1 -0
  35. package/dist/utils/test/index.d.mts +8 -3
  36. package/dist/utils/test/index.mjs +15 -1
  37. package/dist/utils/test/index.mjs.map +1 -1
  38. package/dist/{workflow.generated-C5wMcCjB.d.mts → workflow.generated-DMQ-cjyT.d.mts} +2 -2
  39. package/docs/quickstart.md +12 -0
  40. package/docs/services/resolver.md +72 -0
  41. package/docs/services/tailordb.md +78 -6
  42. package/package.json +15 -12
  43. package/dist/application-Bf8SUAtR.mjs.map +0 -1
  44. package/dist/client-CW4Oh3iz.mjs +0 -6
  45. package/dist/query-C3oQTLvb.mjs.map +0 -1
  46. package/dist/schema-BePzTFBV.mjs.map +0 -1
@@ -1,9 +1,9 @@
1
- import { C as TailorDBType, Ct as IncomingWebhookTrigger, Et as ScheduleTriggerInput, Mt as IdProvider, Nt as OAuth2ClientInput, mt as Resolver, n as Plugin, r as PluginAttachment, vt as Executor, w as TypeSourceInfoEntry } from "../plugin-C-UdAM8C.mjs";
2
- import { n as AppConfig } from "../workflow.generated-C5wMcCjB.mjs";
3
- import { n as kyselyTypePlugin } from "../index-rH_De6hM.mjs";
4
- import { n as enumConstantsPlugin } from "../index-2WQbf_LH.mjs";
5
- import { n as fileUtilsPlugin } from "../index-DCEMVfJA.mjs";
6
- import { n as seedPlugin } from "../index-HvMUWjvV.mjs";
1
+ import { C as TailorDBType, Ct as IncomingWebhookTrigger, Et as ScheduleTriggerInput, Mt as IdProvider, Nt as OAuth2ClientInput, mt as Resolver, n as Plugin, r as PluginAttachment, vt as Executor, w as TypeSourceInfoEntry } from "../plugin-DyVYXZWz.mjs";
2
+ import { n as AppConfig } from "../workflow.generated-DMQ-cjyT.mjs";
3
+ import { n as kyselyTypePlugin } from "../index-CxgBnxKM.mjs";
4
+ import { n as enumConstantsPlugin } from "../index-FZMBoUWm.mjs";
5
+ import { n as fileUtilsPlugin } from "../index-D4Y81vh1.mjs";
6
+ import { n as seedPlugin } from "../index-CdDzh-T2.mjs";
7
7
  import { z } from "zod";
8
8
  import { OAuth2Client } from "@badgateway/oauth2-client";
9
9
  import { Duration, FieldMask, Timestamp, Value } from "@bufbuild/protobuf/wkt";
@@ -18083,7 +18083,7 @@ type LoadAccessTokenOptions = {
18083
18083
  profile?: string;
18084
18084
  };
18085
18085
  /**
18086
- * Read Tailor Platform CLI configuration, migrating from tailorctl if necessary.
18086
+ * Read Tailor Platform CLI configuration, migrating from tailorctl or v1 if necessary.
18087
18087
  * @returns Parsed platform configuration
18088
18088
  */
18089
18089
  /**
@@ -18093,7 +18093,7 @@ type LoadAccessTokenOptions = {
18093
18093
  * @param opts - Workspace and profile options
18094
18094
  * @returns Resolved workspace ID
18095
18095
  */
18096
- declare function loadWorkspaceId(opts?: LoadWorkspaceIdOptions): string;
18096
+ declare function loadWorkspaceId(opts?: LoadWorkspaceIdOptions): Promise<string>;
18097
18097
  /**
18098
18098
  * Load access token from environment variables, command options, or platform config.
18099
18099
  * In CLI context, profile env fallback is also handled by politty's arg env option.
package/dist/cli/lib.mjs CHANGED
@@ -1,17 +1,16 @@
1
1
  import "../chunk-DEt8GZDa.mjs";
2
- import "../schema-BePzTFBV.mjs";
2
+ import "../schema-CNWt2FKQ.mjs";
3
3
  import "../brand-GZnI4eYb.mjs";
4
4
  import "../logger-CqezTedh.mjs";
5
- import { A as truncate, B as updateOrganization, Bt as DIFF_FILE_NAME, Ct as startWorkflow, D as resumeWorkflow, Dt as getWorkflowExecution, Ft as waitForExecution, Gt as compareSnapshots, Ht as MIGRATE_FILE_NAME, It as MIGRATION_LABEL_KEY, J as updateFolder, Jt as getLatestMigrationNumber, K as getOrganization, Kt as createSnapshotFromLocalTypes, L as remove, M as generate$1, Mt as getExecutor, Nt as apply, Ot as listWorkflowExecutions, P as show, Pt as executeScript, Q as getFolder, Qt as getNextMigrationNumber, Rt as bundleMigrationScript, S as listApps, Tt as getWorkflow, Ut as SCHEMA_FILE_NAME, V as organizationTree, Vt as INITIAL_SCHEMA_NUMBER, W as listOrganizations, Wt as compareLocalTypesWithSnapshot, X as listFolders, Xt as getMigrationFilePath, Yt as getMigrationDirPath, Zt as getMigrationFiles, _ as getWorkspace, _t as listExecutors, a as updateUser, an as getNamespacesWithMigrations, bt as listExecutorJobs, d as inviteUser, dt as generate, et as deleteFolder, ft as listWebhookExecutors, h as listWorkspaces, ht as triggerExecutor, in as hasChanges, it as listOAuth2Clients, k as listWorkflows, l as listUsers, ln as generateUserTypes, nn as formatDiffSummary, nt as createFolder, ot as getOAuth2Client, p as restoreWorkspace, rn as formatMigrationDiff, s as removeUser, st as getMachineUserToken, t as query, tn as reconstructSnapshotFromMigrations, un as apiCall, ut as listMachineUsers, vt as getExecutorJob, w as getAppHealth, x as createWorkspace, xt as watchExecutorJob, y as deleteWorkspace, zt as DB_TYPES_FILE_NAME } from "../query-C3oQTLvb.mjs";
6
- import { l as initOperatorClient } from "../client-CZmQBXAY.mjs";
5
+ import { $ as getFolder, $t as getNextMigrationNumber, A as listWorkflows, Bt as DB_TYPES_FILE_NAME, C as listApps, Et as getWorkflow, F as show, Ft as executeScript, G as listOrganizations, Gt as compareLocalTypesWithSnapshot, H as organizationTree, Ht as INITIAL_SCHEMA_NUMBER, It as waitForExecution, Kt as compareSnapshots, Lt as MIGRATION_LABEL_KEY, N as generate$1, Nt as getExecutor, O as resumeWorkflow, Ot as getWorkflowExecution, Pt as apply, Qt as getMigrationFiles, R as remove, S as createWorkspace, St as watchExecutorJob, T as getAppHealth, Ut as MIGRATE_FILE_NAME, V as updateOrganization, Vt as DIFF_FILE_NAME, Wt as SCHEMA_FILE_NAME, Xt as getMigrationDirPath, Y as updateFolder, Yt as getLatestMigrationNumber, Z as listFolders, Zt as getMigrationFilePath, an as hasChanges, at as listOAuth2Clients, b as deleteWorkspace, c as removeUser, ct as getMachineUserToken, dn as apiCall, dt as listMachineUsers, f as inviteUser, ft as generate, g as listWorkspaces, gt as triggerExecutor, in as formatMigrationDiff, j as truncate, kt as listWorkflowExecutions, m as restoreWorkspace, n as query, nn as reconstructSnapshotFromMigrations, o as updateUser, on as getNamespacesWithMigrations, pt as listWebhookExecutors, q as getOrganization, qt as createSnapshotFromLocalTypes, rn as formatDiffSummary, rt as createFolder, st as getOAuth2Client, t as isNativeTypeScriptRuntime, tt as deleteFolder, u as listUsers, un as generateUserTypes, v as getWorkspace, vt as listExecutors, wt as startWorkflow, xt as listExecutorJobs, yt as getExecutorJob, zt as bundleMigrationScript } from "../runtime-DbX_UxlC.mjs";
6
+ import { u as initOperatorClient } from "../client-DfdgRZlQ.mjs";
7
7
  import "../package-json-D3x2nBPB.mjs";
8
- import { a as loadConfig, b as loadWorkspaceId, g as getDistDir, y as loadAccessToken } from "../application-Bf8SUAtR.mjs";
8
+ import { a as loadConfig, b as loadAccessToken, g as getDistDir, x as loadWorkspaceId } from "../application-B8vok3w2.mjs";
9
9
  import { n as seedPlugin } from "../seed-CWkIDWMb.mjs";
10
10
  import { n as enumConstantsPlugin } from "../enum-constants-D1nfn0qD.mjs";
11
11
  import { n as fileUtilsPlugin } from "../file-utils-Bctuzn3x.mjs";
12
12
  import { n as kyselyTypePlugin } from "../kysely-type-B_IecdK9.mjs";
13
13
  import "../telemetry-BSUlYTs-.mjs";
14
- import { register } from "node:module";
15
14
  import * as fs from "node:fs";
16
15
  import * as path from "pathe";
17
16
  import { resolveTSConfig } from "pkg-types";
@@ -279,7 +278,10 @@ async function bundleSeedScript(namespace, typeNames) {
279
278
 
280
279
  //#endregion
281
280
  //#region src/cli/lib.ts
282
- register("tsx", import.meta.url, { data: {} });
281
+ if (!isNativeTypeScriptRuntime()) {
282
+ const { register } = await import("node:module");
283
+ register("tsx", import.meta.url, { data: {} });
284
+ }
283
285
 
284
286
  //#endregion
285
287
  export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, SCHEMA_FILE_NAME, apiCall, apply, bundleMigrationScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, createFolder, createSnapshotFromLocalTypes, createWorkspace, deleteFolder, deleteWorkspace, enumConstantsPlugin, executeScript, fileUtilsPlugin, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getFolder, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getOrganization, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, kyselyTypePlugin, listApps, listExecutorJobs, listExecutors, listFolders, listMachineUsers, listOAuth2Clients, listOrganizations, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, organizationTree, query, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, seedPlugin, show, startWorkflow, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, watchExecutorJob };
@@ -1 +1 @@
1
- {"version":3,"file":"lib.mjs","names":[],"sources":["../../src/cli/shared/seed-chunker.ts","../../src/cli/commands/generate/seed/bundler.ts","../../src/cli/lib.ts"],"sourcesContent":["/**\n * Seed data chunker for splitting large seed data into manageable message sizes.\n *\n * When seed data exceeds the gRPC message size limit, this module splits the data\n * into multiple chunks at type boundaries (or record boundaries for large types).\n */\n\n/**\n * Seed data keyed by type name, with an array of records per type.\n */\nexport type SeedData = Record<string, Record<string, unknown>[]>;\n\n/**\n * A single chunk of seed data with metadata for ordered execution.\n */\nexport type SeedChunk = {\n data: SeedData;\n order: string[];\n index: number;\n total: number;\n};\n\n/**\n * Options for chunking seed data.\n */\nexport type ChunkSeedDataOptions = {\n /** Seed data keyed by type name */\n data: SeedData;\n /** Ordered list of type names (dependency order) */\n order: string[];\n /** Byte size of the bundled seed script code */\n codeByteSize: number;\n /** Maximum gRPC message size in bytes (default: 3.5MB) */\n maxMessageSize?: number;\n};\n\n/** Default maximum message size: 3.5MB (conservative limit for gRPC) */\nexport const DEFAULT_MAX_MESSAGE_SIZE = 3.5 * 1024 * 1024;\n\n/** Reserved bytes for message metadata overhead */\nconst METADATA_OVERHEAD = 1024;\n\n/**\n * Split seed data into chunks that fit within the gRPC message size limit.\n *\n * Algorithm:\n * 1. Calculate the available budget for the arg field (maxMessageSize - codeByteSize - overhead)\n * 2. If all data fits in one message, return a single chunk\n * 3. Otherwise, iterate through types in dependency order:\n * - If a type fits in the current chunk, add it\n * - If adding a type would exceed the budget, finalize the current chunk and start a new one\n * - If a single type exceeds the budget, split its records across multiple chunks\n * - If a single record exceeds the budget, throw an error\n * @param options - Chunking options\n * @returns Array of seed chunks\n */\nexport function chunkSeedData(options: ChunkSeedDataOptions): SeedChunk[] {\n const { data, order, codeByteSize, maxMessageSize = DEFAULT_MAX_MESSAGE_SIZE } = options;\n\n const argBudget = maxMessageSize - codeByteSize - METADATA_OVERHEAD;\n if (argBudget <= 0) {\n throw new Error(\n `Code size (${codeByteSize} bytes) exceeds the message size limit (${maxMessageSize} bytes). ` +\n `No space left for seed data.`,\n );\n }\n\n // Filter to types that have data\n const typesWithData = order.filter((type) => data[type] && data[type].length > 0);\n\n if (typesWithData.length === 0) {\n return [];\n }\n\n // Check if all data fits in a single message\n const fullArg = JSON.stringify({ data, order });\n if (byteSize(fullArg) <= argBudget) {\n return [{ data, order, index: 0, total: 1 }];\n }\n\n // Split into multiple chunks\n const chunks: Omit<SeedChunk, \"total\">[] = [];\n let currentData: SeedData = {};\n let currentOrder: string[] = [];\n\n for (const type of typesWithData) {\n const typeRecords = data[type];\n\n // Check if the type fits in the current chunk\n if (currentOrder.length > 0) {\n const testData = { ...currentData, [type]: typeRecords };\n const testOrder = [...currentOrder, type];\n if (byteSize(JSON.stringify({ data: testData, order: testOrder })) > argBudget) {\n // Finalize the current chunk\n chunks.push({ data: currentData, order: currentOrder, index: chunks.length });\n currentData = {};\n currentOrder = [];\n }\n }\n\n // Check if the entire type fits in an empty chunk\n if (byteSize(JSON.stringify({ data: { [type]: typeRecords }, order: [type] })) <= argBudget) {\n currentData[type] = typeRecords;\n currentOrder.push(type);\n continue;\n }\n\n // Type is too large — split by records\n if (currentOrder.length > 0) {\n chunks.push({ data: currentData, order: currentOrder, index: chunks.length });\n currentData = {};\n currentOrder = [];\n }\n\n let recordBatch: Record<string, unknown>[] = [];\n for (const record of typeRecords) {\n if (byteSize(JSON.stringify({ data: { [type]: [record] }, order: [type] })) > argBudget) {\n const singleRecordSize = byteSize(JSON.stringify(record));\n throw new Error(\n `A single record in type \"${type}\" (${singleRecordSize} bytes) exceeds the message size budget ` +\n `(${argBudget} bytes). Consider increasing maxMessageSize or reducing the record size.`,\n );\n }\n\n const testBatch = [...recordBatch, record];\n const testData = { ...currentData, [type]: testBatch };\n const testOrder = currentOrder.includes(type) ? currentOrder : [...currentOrder, type];\n const testSize = byteSize(JSON.stringify({ data: testData, order: testOrder }));\n\n if (testSize > argBudget && recordBatch.length > 0) {\n // Finalize current chunk with accumulated records\n currentData[type] = recordBatch;\n if (!currentOrder.includes(type)) {\n currentOrder.push(type);\n }\n chunks.push({ data: currentData, order: currentOrder, index: chunks.length });\n currentData = {};\n currentOrder = [];\n recordBatch = [record];\n } else {\n recordBatch = testBatch;\n }\n }\n\n // Add remaining records\n if (recordBatch.length > 0) {\n currentData[type] = recordBatch;\n if (!currentOrder.includes(type)) {\n currentOrder.push(type);\n }\n }\n }\n\n // Finalize the last chunk\n if (currentOrder.length > 0) {\n chunks.push({ data: currentData, order: currentOrder, index: chunks.length });\n }\n\n const total = chunks.length;\n return chunks.map((chunk) => ({ ...chunk, total }));\n}\n\nfunction byteSize(str: string): number {\n return new TextEncoder().encode(str).length;\n}\n","/**\n * Seed script bundler for TailorDB seed data\n *\n * Bundles seed scripts to be executed via TestExecScript API\n */\n\nimport * as fs from \"node:fs\";\nimport ml from \"multiline-ts\";\nimport * as path from \"pathe\";\nimport { resolveTSConfig } from \"pkg-types\";\nimport * as rolldown from \"rolldown\";\nimport { getDistDir } from \"@/cli/shared/dist-dir\";\n\nexport type SeedBundleResult = {\n namespace: string;\n bundledCode: string;\n typesIncluded: string[];\n};\n\nconst BATCH_SIZE = 100;\n\n/**\n * Generate seed script content for server-side execution\n * @param namespace - TailorDB namespace\n * @returns Generated seed script content\n */\nfunction generateSeedScriptContent(namespace: string): string {\n return ml /* ts */ `\n import { Kysely, TailordbDialect } from \"@tailor-platform/sdk/kysely\";\n\n type SeedInput = {\n data: Record<string, Record<string, unknown>[]>;\n order: string[];\n selfRefTypes: string[];\n };\n\n type SeedResult = {\n success: boolean;\n processed: Record<string, number>;\n errors: string[];\n };\n\n function getDB(namespace: string) {\n const client = new tailordb.Client({ namespace });\n return new Kysely<Record<string, Record<string, unknown>>>({\n dialect: new TailordbDialect(client),\n });\n }\n\n export async function main(input: SeedInput): Promise<SeedResult> {\n const db = getDB(\"${namespace}\");\n const processed: Record<string, number> = {};\n const errors: string[] = [];\n const BATCH_SIZE = ${String(BATCH_SIZE)};\n\n for (const typeName of input.order) {\n const records = input.data[typeName];\n if (!records || records.length === 0) {\n console.log(\\`[${namespace}] \\${typeName}: skipped (no data)\\`);\n continue;\n }\n\n processed[typeName] = 0;\n const hasSelfRef = (input.selfRefTypes || []).includes(typeName);\n\n try {\n if (hasSelfRef) {\n // Insert one-by-one to respect self-referencing foreign key order\n for (const record of records) {\n await db.insertInto(typeName).values(record).execute();\n processed[typeName] += 1;\n }\n console.log(\\`[${namespace}] \\${typeName}: \\${processed[typeName]}/\\${records.length} (one-by-one)\\`);\n } else {\n for (let i = 0; i < records.length; i += BATCH_SIZE) {\n const batch = records.slice(i, i + BATCH_SIZE);\n await db.insertInto(typeName).values(batch).execute();\n processed[typeName] += batch.length;\n console.log(\\`[${namespace}] \\${typeName}: \\${processed[typeName]}/\\${records.length}\\`);\n }\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n errors.push(\\`\\${typeName}: \\${message}\\`);\n console.error(\\`[${namespace}] \\${typeName}: failed - \\${message}\\`);\n }\n }\n\n return {\n success: errors.length === 0,\n processed,\n errors,\n };\n }\n `;\n}\n\n/**\n * Bundle a seed script for server-side execution\n *\n * Creates an entry that:\n * 1. Defines getDB() function inline\n * 2. Processes data in batches using Kysely\n * 3. Reports progress via console.log\n * 4. Exports as main() for TestExecScript\n * @param namespace - TailorDB namespace\n * @param typeNames - List of type names to include in the seed\n * @returns Bundled seed script result\n */\nexport async function bundleSeedScript(\n namespace: string,\n typeNames: string[],\n): Promise<SeedBundleResult> {\n // Output directory in .tailor-sdk (relative to project root)\n const outputDir = path.resolve(getDistDir(), \"seed\");\n fs.mkdirSync(outputDir, { recursive: true });\n\n // Entry file in output directory\n const entryPath = path.join(outputDir, `seed_${namespace}.entry.ts`);\n\n // Generate seed script content\n const entryContent = generateSeedScriptContent(namespace);\n fs.writeFileSync(entryPath, entryContent);\n\n let tsconfig: string | undefined;\n try {\n tsconfig = await resolveTSConfig();\n } catch {\n tsconfig = undefined;\n }\n\n // Bundle with tree-shaking (write: false to avoid unnecessary disk I/O)\n const result = await rolldown.build({\n input: entryPath,\n write: false,\n output: {\n format: \"esm\",\n sourcemap: false,\n minify: false,\n codeSplitting: false,\n globals: {\n tailordb: \"tailordb\",\n },\n },\n external: [\"tailordb\"],\n resolve: {\n conditionNames: [\"node\", \"import\"],\n },\n tsconfig,\n treeshake: {\n moduleSideEffects: false,\n annotations: true,\n unknownGlobalSideEffects: false,\n },\n logLevel: \"silent\",\n } as rolldown.BuildOptions);\n\n const bundledCode = result.output[0].code;\n\n return {\n namespace,\n bundledCode,\n typesIncluded: typeNames,\n };\n}\n","// CLI API exports for programmatic usage\nimport { register } from \"node:module\";\n\n// Register tsx to handle TypeScript files when using CLI API programmatically\nregister(\"tsx\", import.meta.url, { data: {} });\n\nexport { apply } from \"./commands/apply/apply\";\nexport type { ApplyOptions } from \"./commands/apply/apply\";\nexport type { BundledScripts } from \"./commands/apply/function-registry\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport type {\n CodeGenerator,\n TailorDBGenerator,\n ResolverGenerator,\n ExecutorGenerator,\n TailorDBResolverGenerator,\n FullCodeGenerator,\n TailorDBInput,\n ResolverInput,\n ExecutorInput,\n FullInput,\n AggregateArgs,\n GeneratorResult,\n DependencyKind,\n PluginAttachment,\n TypeSourceInfoEntry,\n} from \"./commands/generate/types\";\nexport type { TailorDBType } from \"@/types/tailordb\";\nexport type { Resolver } from \"@/types/resolver.generated\";\nexport type { Executor } from \"@/types/executor.generated\";\n\n/** @deprecated Import from '@tailor-platform/sdk/plugin/kysely-type' instead */\nexport { kyselyTypePlugin } from \"@/plugin/builtin/kysely-type\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/enum-constants' instead */\nexport { enumConstantsPlugin } from \"@/plugin/builtin/enum-constants\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/file-utils' instead */\nexport { fileUtilsPlugin } from \"@/plugin/builtin/file-utils\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/seed' instead */\nexport { seedPlugin } from \"@/plugin/builtin/seed\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport {\n getWorkflow,\n type GetWorkflowOptions,\n type GetWorkflowTypedOptions,\n} from \"./commands/workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./commands/workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport {\n triggerExecutor,\n type TriggerExecutorOptions,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n watchExecutorJob,\n type ListExecutorJobsOptions,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport {\n getExecutor,\n type GetExecutorOptions,\n type GetExecutorTypedOptions,\n} from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { listOrganizations, type ListOrganizationsOptions } from \"./commands/organization/list\";\nexport { getOrganization, type GetOrganizationOptions } from \"./commands/organization/get\";\nexport { updateOrganization, type UpdateOrganizationOptions } from \"./commands/organization/update\";\nexport { organizationTree, type OrganizationTreeOptions } from \"./commands/organization/tree\";\nexport type {\n UserOrganizationInfo,\n OrganizationInfo,\n FolderListInfo,\n FolderInfo,\n} from \"./commands/organization/transform\";\nexport { listFolders, type ListFoldersOptions } from \"./commands/organization/folder/list\";\nexport { getFolder, type GetFolderOptions } from \"./commands/organization/folder/get\";\nexport { createFolder, type CreateFolderOptions } from \"./commands/organization/folder/create\";\nexport { updateFolder, type UpdateFolderOptions } from \"./commands/organization/folder/update\";\nexport { deleteFolder, type DeleteFolderOptions } from \"./commands/organization/folder/delete\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n DB_TYPES_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type SnapshotType,\n type SnapshotFieldConfig,\n type MigrationInfo,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport { chunkSeedData, type SeedChunk, type ChunkSeedDataOptions } from \"./shared/seed-chunker\";\nexport { bundleSeedScript, type SeedBundleResult } from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-proto/tailor/v1/auth_resource_pb\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAa,2BAA2B,MAAM,OAAO;;AAGrD,MAAM,oBAAoB;;;;;;;;;;;;;;;AAgB1B,SAAgB,cAAc,SAA4C;CACxE,MAAM,EAAE,MAAM,OAAO,cAAc,iBAAiB,6BAA6B;CAEjF,MAAM,YAAY,iBAAiB,eAAe;AAClD,KAAI,aAAa,EACf,OAAM,IAAI,MACR,cAAc,aAAa,0CAA0C,eAAe,uCAErF;CAIH,MAAM,gBAAgB,MAAM,QAAQ,SAAS,KAAK,SAAS,KAAK,MAAM,SAAS,EAAE;AAEjF,KAAI,cAAc,WAAW,EAC3B,QAAO,EAAE;AAKX,KAAI,SADY,KAAK,UAAU;EAAE;EAAM;EAAO,CAAC,CAC1B,IAAI,UACvB,QAAO,CAAC;EAAE;EAAM;EAAO,OAAO;EAAG,OAAO;EAAG,CAAC;CAI9C,MAAM,SAAqC,EAAE;CAC7C,IAAI,cAAwB,EAAE;CAC9B,IAAI,eAAyB,EAAE;AAE/B,MAAK,MAAM,QAAQ,eAAe;EAChC,MAAM,cAAc,KAAK;AAGzB,MAAI,aAAa,SAAS,GAAG;GAC3B,MAAM,WAAW;IAAE,GAAG;KAAc,OAAO;IAAa;GACxD,MAAM,YAAY,CAAC,GAAG,cAAc,KAAK;AACzC,OAAI,SAAS,KAAK,UAAU;IAAE,MAAM;IAAU,OAAO;IAAW,CAAC,CAAC,GAAG,WAAW;AAE9E,WAAO,KAAK;KAAE,MAAM;KAAa,OAAO;KAAc,OAAO,OAAO;KAAQ,CAAC;AAC7E,kBAAc,EAAE;AAChB,mBAAe,EAAE;;;AAKrB,MAAI,SAAS,KAAK,UAAU;GAAE,MAAM,GAAG,OAAO,aAAa;GAAE,OAAO,CAAC,KAAK;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js","names":[],"sources":["../../src/cli/shared/seed-chunker.ts","../../src/cli/commands/generate/seed/bundler.ts","../../src/cli/lib.ts"],"sourcesContent":["/**\n * Seed data chunker for splitting large seed data into manageable message sizes.\n *\n * When seed data exceeds the gRPC message size limit, this module splits the data\n * into multiple chunks at type boundaries (or record boundaries for large types).\n */\n\n/**\n * Seed data keyed by type name, with an array of records per type.\n */\nexport type SeedData = Record<string, Record<string, unknown>[]>;\n\n/**\n * A single chunk of seed data with metadata for ordered execution.\n */\nexport type SeedChunk = {\n data: SeedData;\n order: string[];\n index: number;\n total: number;\n};\n\n/**\n * Options for chunking seed data.\n */\nexport type ChunkSeedDataOptions = {\n /** Seed data keyed by type name */\n data: SeedData;\n /** Ordered list of type names (dependency order) */\n order: string[];\n /** Byte size of the bundled seed script code */\n codeByteSize: number;\n /** Maximum gRPC message size in bytes (default: 3.5MB) */\n maxMessageSize?: number;\n};\n\n/** Default maximum message size: 3.5MB (conservative limit for gRPC) */\nexport const DEFAULT_MAX_MESSAGE_SIZE = 3.5 * 1024 * 1024;\n\n/** Reserved bytes for message metadata overhead */\nconst METADATA_OVERHEAD = 1024;\n\n/**\n * Split seed data into chunks that fit within the gRPC message size limit.\n *\n * Algorithm:\n * 1. Calculate the available budget for the arg field (maxMessageSize - codeByteSize - overhead)\n * 2. If all data fits in one message, return a single chunk\n * 3. Otherwise, iterate through types in dependency order:\n * - If a type fits in the current chunk, add it\n * - If adding a type would exceed the budget, finalize the current chunk and start a new one\n * - If a single type exceeds the budget, split its records across multiple chunks\n * - If a single record exceeds the budget, throw an error\n * @param options - Chunking options\n * @returns Array of seed chunks\n */\nexport function chunkSeedData(options: ChunkSeedDataOptions): SeedChunk[] {\n const { data, order, codeByteSize, maxMessageSize = DEFAULT_MAX_MESSAGE_SIZE } = options;\n\n const argBudget = maxMessageSize - codeByteSize - METADATA_OVERHEAD;\n if (argBudget <= 0) {\n throw new Error(\n `Code size (${codeByteSize} bytes) exceeds the message size limit (${maxMessageSize} bytes). ` +\n `No space left for seed data.`,\n );\n }\n\n // Filter to types that have data\n const typesWithData = order.filter((type) => data[type] && data[type].length > 0);\n\n if (typesWithData.length === 0) {\n return [];\n }\n\n // Check if all data fits in a single message\n const fullArg = JSON.stringify({ data, order });\n if (byteSize(fullArg) <= argBudget) {\n return [{ data, order, index: 0, total: 1 }];\n }\n\n // Split into multiple chunks\n const chunks: Omit<SeedChunk, \"total\">[] = [];\n let currentData: SeedData = {};\n let currentOrder: string[] = [];\n\n for (const type of typesWithData) {\n const typeRecords = data[type];\n\n // Check if the type fits in the current chunk\n if (currentOrder.length > 0) {\n const testData = { ...currentData, [type]: typeRecords };\n const testOrder = [...currentOrder, type];\n if (byteSize(JSON.stringify({ data: testData, order: testOrder })) > argBudget) {\n // Finalize the current chunk\n chunks.push({ data: currentData, order: currentOrder, index: chunks.length });\n currentData = {};\n currentOrder = [];\n }\n }\n\n // Check if the entire type fits in an empty chunk\n if (byteSize(JSON.stringify({ data: { [type]: typeRecords }, order: [type] })) <= argBudget) {\n currentData[type] = typeRecords;\n currentOrder.push(type);\n continue;\n }\n\n // Type is too large — split by records\n if (currentOrder.length > 0) {\n chunks.push({ data: currentData, order: currentOrder, index: chunks.length });\n currentData = {};\n currentOrder = [];\n }\n\n let recordBatch: Record<string, unknown>[] = [];\n for (const record of typeRecords) {\n if (byteSize(JSON.stringify({ data: { [type]: [record] }, order: [type] })) > argBudget) {\n const singleRecordSize = byteSize(JSON.stringify(record));\n throw new Error(\n `A single record in type \"${type}\" (${singleRecordSize} bytes) exceeds the message size budget ` +\n `(${argBudget} bytes). Consider increasing maxMessageSize or reducing the record size.`,\n );\n }\n\n const testBatch = [...recordBatch, record];\n const testData = { ...currentData, [type]: testBatch };\n const testOrder = currentOrder.includes(type) ? currentOrder : [...currentOrder, type];\n const testSize = byteSize(JSON.stringify({ data: testData, order: testOrder }));\n\n if (testSize > argBudget && recordBatch.length > 0) {\n // Finalize current chunk with accumulated records\n currentData[type] = recordBatch;\n if (!currentOrder.includes(type)) {\n currentOrder.push(type);\n }\n chunks.push({ data: currentData, order: currentOrder, index: chunks.length });\n currentData = {};\n currentOrder = [];\n recordBatch = [record];\n } else {\n recordBatch = testBatch;\n }\n }\n\n // Add remaining records\n if (recordBatch.length > 0) {\n currentData[type] = recordBatch;\n if (!currentOrder.includes(type)) {\n currentOrder.push(type);\n }\n }\n }\n\n // Finalize the last chunk\n if (currentOrder.length > 0) {\n chunks.push({ data: currentData, order: currentOrder, index: chunks.length });\n }\n\n const total = chunks.length;\n return chunks.map((chunk) => ({ ...chunk, total }));\n}\n\nfunction byteSize(str: string): number {\n return new TextEncoder().encode(str).length;\n}\n","/**\n * Seed script bundler for TailorDB seed data\n *\n * Bundles seed scripts to be executed via TestExecScript API\n */\n\nimport * as fs from \"node:fs\";\nimport ml from \"multiline-ts\";\nimport * as path from \"pathe\";\nimport { resolveTSConfig } from \"pkg-types\";\nimport * as rolldown from \"rolldown\";\nimport { getDistDir } from \"@/cli/shared/dist-dir\";\n\nexport type SeedBundleResult = {\n namespace: string;\n bundledCode: string;\n typesIncluded: string[];\n};\n\nconst BATCH_SIZE = 100;\n\n/**\n * Generate seed script content for server-side execution\n * @param namespace - TailorDB namespace\n * @returns Generated seed script content\n */\nfunction generateSeedScriptContent(namespace: string): string {\n return ml /* ts */ `\n import { Kysely, TailordbDialect } from \"@tailor-platform/sdk/kysely\";\n\n type SeedInput = {\n data: Record<string, Record<string, unknown>[]>;\n order: string[];\n selfRefTypes: string[];\n };\n\n type SeedResult = {\n success: boolean;\n processed: Record<string, number>;\n errors: string[];\n };\n\n function getDB(namespace: string) {\n const client = new tailordb.Client({ namespace });\n return new Kysely<Record<string, Record<string, unknown>>>({\n dialect: new TailordbDialect(client),\n });\n }\n\n export async function main(input: SeedInput): Promise<SeedResult> {\n const db = getDB(\"${namespace}\");\n const processed: Record<string, number> = {};\n const errors: string[] = [];\n const BATCH_SIZE = ${String(BATCH_SIZE)};\n\n for (const typeName of input.order) {\n const records = input.data[typeName];\n if (!records || records.length === 0) {\n console.log(\\`[${namespace}] \\${typeName}: skipped (no data)\\`);\n continue;\n }\n\n processed[typeName] = 0;\n const hasSelfRef = (input.selfRefTypes || []).includes(typeName);\n\n try {\n if (hasSelfRef) {\n // Insert one-by-one to respect self-referencing foreign key order\n for (const record of records) {\n await db.insertInto(typeName).values(record).execute();\n processed[typeName] += 1;\n }\n console.log(\\`[${namespace}] \\${typeName}: \\${processed[typeName]}/\\${records.length} (one-by-one)\\`);\n } else {\n for (let i = 0; i < records.length; i += BATCH_SIZE) {\n const batch = records.slice(i, i + BATCH_SIZE);\n await db.insertInto(typeName).values(batch).execute();\n processed[typeName] += batch.length;\n console.log(\\`[${namespace}] \\${typeName}: \\${processed[typeName]}/\\${records.length}\\`);\n }\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n errors.push(\\`\\${typeName}: \\${message}\\`);\n console.error(\\`[${namespace}] \\${typeName}: failed - \\${message}\\`);\n }\n }\n\n return {\n success: errors.length === 0,\n processed,\n errors,\n };\n }\n `;\n}\n\n/**\n * Bundle a seed script for server-side execution\n *\n * Creates an entry that:\n * 1. Defines getDB() function inline\n * 2. Processes data in batches using Kysely\n * 3. Reports progress via console.log\n * 4. Exports as main() for TestExecScript\n * @param namespace - TailorDB namespace\n * @param typeNames - List of type names to include in the seed\n * @returns Bundled seed script result\n */\nexport async function bundleSeedScript(\n namespace: string,\n typeNames: string[],\n): Promise<SeedBundleResult> {\n // Output directory in .tailor-sdk (relative to project root)\n const outputDir = path.resolve(getDistDir(), \"seed\");\n fs.mkdirSync(outputDir, { recursive: true });\n\n // Entry file in output directory\n const entryPath = path.join(outputDir, `seed_${namespace}.entry.ts`);\n\n // Generate seed script content\n const entryContent = generateSeedScriptContent(namespace);\n fs.writeFileSync(entryPath, entryContent);\n\n let tsconfig: string | undefined;\n try {\n tsconfig = await resolveTSConfig();\n } catch {\n tsconfig = undefined;\n }\n\n // Bundle with tree-shaking (write: false to avoid unnecessary disk I/O)\n const result = await rolldown.build({\n input: entryPath,\n write: false,\n output: {\n format: \"esm\",\n sourcemap: false,\n minify: false,\n codeSplitting: false,\n globals: {\n tailordb: \"tailordb\",\n },\n },\n external: [\"tailordb\"],\n resolve: {\n conditionNames: [\"node\", \"import\"],\n },\n tsconfig,\n treeshake: {\n moduleSideEffects: false,\n annotations: true,\n unknownGlobalSideEffects: false,\n },\n logLevel: \"silent\",\n } as rolldown.BuildOptions);\n\n const bundledCode = result.output[0].code;\n\n return {\n namespace,\n bundledCode,\n typesIncluded: typeNames,\n };\n}\n","// CLI API exports for programmatic usage\nimport { isNativeTypeScriptRuntime } from \"./shared/runtime\";\n\n// Register tsx to handle TypeScript files when using CLI API programmatically.\n// Bun and Deno handle TypeScript natively, so registration is skipped.\nif (!isNativeTypeScriptRuntime()) {\n const { register } = await import(\"node:module\");\n register(\"tsx\", import.meta.url, { data: {} });\n}\n\nexport { apply } from \"./commands/apply/apply\";\nexport type { ApplyOptions } from \"./commands/apply/apply\";\nexport type { BundledScripts } from \"./commands/apply/function-registry\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport type {\n CodeGenerator,\n TailorDBGenerator,\n ResolverGenerator,\n ExecutorGenerator,\n TailorDBResolverGenerator,\n FullCodeGenerator,\n TailorDBInput,\n ResolverInput,\n ExecutorInput,\n FullInput,\n AggregateArgs,\n GeneratorResult,\n DependencyKind,\n PluginAttachment,\n TypeSourceInfoEntry,\n} from \"./commands/generate/types\";\nexport type { TailorDBType } from \"@/types/tailordb\";\nexport type { Resolver } from \"@/types/resolver.generated\";\nexport type { Executor } from \"@/types/executor.generated\";\n\n/** @deprecated Import from '@tailor-platform/sdk/plugin/kysely-type' instead */\nexport { kyselyTypePlugin } from \"@/plugin/builtin/kysely-type\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/enum-constants' instead */\nexport { enumConstantsPlugin } from \"@/plugin/builtin/enum-constants\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/file-utils' instead */\nexport { fileUtilsPlugin } from \"@/plugin/builtin/file-utils\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/seed' instead */\nexport { seedPlugin } from \"@/plugin/builtin/seed\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport {\n getWorkflow,\n type GetWorkflowOptions,\n type GetWorkflowTypedOptions,\n} from \"./commands/workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./commands/workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport {\n triggerExecutor,\n type TriggerExecutorOptions,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n watchExecutorJob,\n type ListExecutorJobsOptions,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport {\n getExecutor,\n type GetExecutorOptions,\n type GetExecutorTypedOptions,\n} from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { listOrganizations, type ListOrganizationsOptions } from \"./commands/organization/list\";\nexport { getOrganization, type GetOrganizationOptions } from \"./commands/organization/get\";\nexport { updateOrganization, type UpdateOrganizationOptions } from \"./commands/organization/update\";\nexport { organizationTree, type OrganizationTreeOptions } from \"./commands/organization/tree\";\nexport type {\n UserOrganizationInfo,\n OrganizationInfo,\n FolderListInfo,\n FolderInfo,\n} from \"./commands/organization/transform\";\nexport { listFolders, type ListFoldersOptions } from \"./commands/organization/folder/list\";\nexport { getFolder, type GetFolderOptions } from \"./commands/organization/folder/get\";\nexport { createFolder, type CreateFolderOptions } from \"./commands/organization/folder/create\";\nexport { updateFolder, type UpdateFolderOptions } from \"./commands/organization/folder/update\";\nexport { deleteFolder, type DeleteFolderOptions } from \"./commands/organization/folder/delete\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n DB_TYPES_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type SnapshotType,\n type SnapshotFieldConfig,\n type MigrationInfo,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport { chunkSeedData, type SeedChunk, type ChunkSeedDataOptions } from \"./shared/seed-chunker\";\nexport { bundleSeedScript, type SeedBundleResult } from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-proto/tailor/v1/auth_resource_pb\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqCA,MAAa,2BAA2B,MAAM,OAAO;;AAGrD,MAAM,oBAAoB;;;;;;;;;;;;;;;AAgB1B,SAAgB,cAAc,SAA4C;CACxE,MAAM,EAAE,MAAM,OAAO,cAAc,iBAAiB,6BAA6B;CAEjF,MAAM,YAAY,iBAAiB,eAAe;AAClD,KAAI,aAAa,EACf,OAAM,IAAI,MACR,cAAc,aAAa,0CAA0C,eAAe,uCAErF;CAIH,MAAM,gBAAgB,MAAM,QAAQ,SAAS,KAAK,SAAS,KAAK,MAAM,SAAS,EAAE;AAEjF,KAAI,cAAc,WAAW,EAC3B,QAAO,EAAE;AAKX,KAAI,SADY,KAAK,UAAU;EAAE;EAAM;EAAO,CAAC,CAC1B,IAAI,UACvB,QAAO,CAAC;EAAE;EAAM;EAAO,OAAO;EAAG,OAAO;EAAG,CAAC;CAI9C,MAAM,SAAqC,EAAE;CAC7C,IAAI,cAAwB,EAAE;CAC9B,IAAI,eAAyB,EAAE;AAE/B,MAAK,MAAM,QAAQ,eAAe;EAChC,MAAM,cAAc,KAAK;AAGzB,MAAI,aAAa,SAAS,GAAG;GAC3B,MAAM,WAAW;IAAE,GAAG;KAAc,OAAO;IAAa;GACxD,MA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f,SAAS,EACP,UAAU,YACX;IACF;GACD,UAAU,CAAC,WAAW;GACtB,SAAS,EACP,gBAAgB,CAAC,QAAQ,SAAS,EACnC;GACD;GACA,WAAW;IACT,mBAAmB;IACnB,aAAa;IACb,0BAA0B;IAC3B;GACD,UAAU;GACX,CAA0B,EAEA,OAAO,GAAG;EAKnC,eAAe;EAChB;;;;;AC9JH,IAAI,CAAC,2BAA2B,EAAE;CAChC,MAAM,EAAE,aAAa,MAAM,OAAO;AAClC,UAAS,OAAO,OAAO,KAAK,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import "./chunk-DEt8GZDa.mjs";
2
+ import "./logger-CqezTedh.mjs";
3
+ import { a as fetchMachineUserToken, c as formatRequestParams, d as parseMethodName, f as platformBaseUrl, i as fetchAll, l as initOAuth2Client, m as userAgent, n as closeConnectionPool, o as fetchPlatformMachineUserToken, p as resolveStaticWebsiteUrls, r as createTransport, s as fetchUserInfo, t as MAX_PAGE_SIZE, u as initOperatorClient } from "./client-DfdgRZlQ.mjs";
4
+ import "./package-json-D3x2nBPB.mjs";
5
+
6
+ export { userAgent };
@@ -5,7 +5,6 @@ import { z } from "zod";
5
5
  import { OAuth2Client } from "@badgateway/oauth2-client";
6
6
  import { MethodOptions_IdempotencyLevel, file_google_protobuf_descriptor, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
7
7
  import { Code, ConnectError, createClient } from "@connectrpc/connect";
8
- import { createConnectTransport } from "@connectrpc/connect-node";
9
8
  import { enumDesc, fileDesc, messageDesc, serviceDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
10
9
 
11
10
  //#region ../tailor-proto/src/buf/validate/validate_pb.js
@@ -16025,17 +16024,30 @@ function initOAuth2Client() {
16025
16024
  */
16026
16025
  async function initOperatorClient(accessToken) {
16027
16026
  const { createTracingInterceptor } = await import("./interceptor-DgQNmwWJ.mjs");
16028
- return createClient(OperatorService, createConnectTransport({
16027
+ return createClient(OperatorService, await createTransport(platformBaseUrl, [
16028
+ await userAgentInterceptor(),
16029
+ await bearerTokenInterceptor(accessToken),
16030
+ retryInterceptor(),
16031
+ errorHandlingInterceptor(),
16032
+ createTracingInterceptor()
16033
+ ]));
16034
+ }
16035
+ /**
16036
+ * Create a Connect transport using connect-node (HTTP/2).
16037
+ *
16038
+ * connect-node works on both Node.js and Bun. connect-web is not used because
16039
+ * it does not support client_streaming, which is required for function uploads.
16040
+ * @param baseUrl - Base URL for the transport
16041
+ * @param interceptors - Request interceptors
16042
+ * @returns Configured transport
16043
+ */
16044
+ async function createTransport(baseUrl, interceptors) {
16045
+ const { createConnectTransport } = await import("@connectrpc/connect-node");
16046
+ return createConnectTransport({
16029
16047
  httpVersion: "2",
16030
- baseUrl: platformBaseUrl,
16031
- interceptors: [
16032
- await userAgentInterceptor(),
16033
- await bearerTokenInterceptor(accessToken),
16034
- retryInterceptor(),
16035
- errorHandlingInterceptor(),
16036
- createTracingInterceptor()
16037
- ]
16038
- }));
16048
+ baseUrl,
16049
+ interceptors
16050
+ });
16039
16051
  }
16040
16052
  /**
16041
16053
  * Create an interceptor that sets a User-Agent header.
@@ -16290,5 +16302,5 @@ async function closeConnectionPool() {
16290
16302
  }
16291
16303
 
16292
16304
  //#endregion
16293
- export { AuthHookPoint as A, TenantProviderConfig_TenantProviderType as B, PipelineResolver_OperationType as C, ExecutorJobStatus as D, FunctionExecution_Type as E, AuthSCIMAttribute_Mutability as F, FilterSchema as G, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as H, AuthSCIMAttribute_Type as I, Subgraph_ServiceType as J, PageDirection as K, AuthSCIMAttribute_Uniqueness as L, AuthInvokerSchema as M, AuthOAuth2Client_ClientType as N, ExecutorTargetType as O, AuthOAuth2Client_GrantType as P, AuthSCIMConfig_AuthorizationType as R, TailorDBType_PermitAction as S, FunctionExecution_Status as T, ConditionSchema as U, UserProfileProviderConfig_UserProfileProviderType as V, Condition_Operator as W, TailorDBGQLPermission_Action as _, fetchPlatformMachineUserToken as a, TailorDBType_Permission_Operator as b, initOAuth2Client as c, platformBaseUrl as d, resolveStaticWebsiteUrls as f, WorkflowJobExecution_Status as g, WorkflowExecution_Status as h, fetchMachineUserToken as i, AuthIDPConfig_AuthType as j, ExecutorTriggerType as k, initOperatorClient as l, WorkspacePlatformUserRole as m, closeConnectionPool as n, fetchUserInfo as o, userAgent as p, ApplicationSchemaUpdateAttemptStatus as q, fetchAll as r, formatRequestParams as s, MAX_PAGE_SIZE as t, parseMethodName as u, TailorDBGQLPermission_Operator as v, IdPLang as w, TailorDBType_Permission_Permit as x, TailorDBGQLPermission_Permit as y, PATScope as z };
16294
- //# sourceMappingURL=client-CZmQBXAY.mjs.map
16305
+ export { ExecutorTriggerType as A, PATScope as B, TailorDBType_PermitAction as C, FunctionExecution_Type as D, FunctionExecution_Status as E, AuthOAuth2Client_GrantType as F, Condition_Operator as G, UserProfileProviderConfig_UserProfileProviderType as H, AuthSCIMAttribute_Mutability as I, ApplicationSchemaUpdateAttemptStatus as J, FilterSchema as K, AuthSCIMAttribute_Type as L, AuthIDPConfig_AuthType as M, AuthInvokerSchema as N, ExecutorJobStatus as O, AuthOAuth2Client_ClientType as P, AuthSCIMAttribute_Uniqueness as R, TailorDBType_Permission_Permit as S, IdPLang as T, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as U, TenantProviderConfig_TenantProviderType as V, ConditionSchema as W, Subgraph_ServiceType as Y, WorkflowJobExecution_Status as _, fetchMachineUserToken as a, TailorDBGQLPermission_Permit as b, formatRequestParams as c, parseMethodName as d, platformBaseUrl as f, WorkflowExecution_Status as g, WorkspacePlatformUserRole as h, fetchAll as i, AuthHookPoint as j, ExecutorTargetType as k, initOAuth2Client as l, userAgent as m, closeConnectionPool as n, fetchPlatformMachineUserToken as o, resolveStaticWebsiteUrls as p, PageDirection as q, createTransport as r, fetchUserInfo as s, MAX_PAGE_SIZE as t, initOperatorClient as u, TailorDBGQLPermission_Action as v, PipelineResolver_OperationType as w, TailorDBType_Permission_Operator as x, TailorDBGQLPermission_Operator as y, AuthSCIMConfig_AuthorizationType as z };
16306
+ //# sourceMappingURL=client-DfdgRZlQ.mjs.map