@tailor-platform/sdk 1.60.2 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +1 -0
- package/dist/{application-pusdxz35.mjs → application-BezXGbrU.mjs} +73 -509
- package/dist/application-BezXGbrU.mjs.map +1 -0
- package/dist/application-DSXntqnV.mjs +4 -0
- package/dist/assert-CKfwrmCV.mjs +10 -0
- package/dist/assert-CKfwrmCV.mjs.map +1 -0
- package/dist/cli/index.mjs +376 -136
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +3 -1
- package/dist/cli/lib.mjs +13 -6
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/{client-B-jRdlC_.mjs → client-C68VWo4g.mjs} +1 -1
- package/dist/{client-W5P4NYYX.mjs → client-CobIRHl-.mjs} +207 -2
- package/dist/{client-W5P4NYYX.mjs.map → client-CobIRHl-.mjs.map} +1 -1
- package/dist/configure/index.mjs +2 -2
- package/dist/{crashreport-D3DvAzdg.mjs → crashreport-BhD0y14F.mjs} +2 -2
- package/dist/{crashreport-D3DvAzdg.mjs.map → crashreport-BhD0y14F.mjs.map} +1 -1
- package/dist/{crashreport-lnVTnbB5.mjs → crashreport-D1wKBJ8N.mjs} +1 -1
- package/dist/{mock-Dpu__UeJ.mjs → mock-DMgIygjE.mjs} +3 -2
- package/dist/mock-DMgIygjE.mjs.map +1 -0
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.mjs +1 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/registry-D0uB0OrK.mjs.map +1 -1
- package/dist/{repl-editor-Y9QJDL0K.mjs → repl-editor-CJG3sz7A.mjs} +11 -9
- package/dist/repl-editor-CJG3sz7A.mjs.map +1 -0
- package/dist/{runtime-CZpsV8vj.mjs → runtime-C6o4hiYq.mjs} +994 -590
- package/dist/runtime-C6o4hiYq.mjs.map +1 -0
- package/dist/{schema-DYKNTu-n.mjs → schema-1msIhXwA.mjs} +12 -7
- package/dist/schema-1msIhXwA.mjs.map +1 -0
- package/dist/{seed-C0fE2sJB.mjs → seed-BH2FbrPV.mjs} +4 -3
- package/dist/seed-BH2FbrPV.mjs.map +1 -0
- package/dist/service-BHQIerYh.mjs +4 -0
- package/dist/{service-aPT0fx3y.mjs → service-DMohAx8a2.mjs} +3 -3
- package/dist/service-DMohAx8a2.mjs.map +1 -0
- package/dist/service-wI3Hvrgx.mjs +460 -0
- package/dist/service-wI3Hvrgx.mjs.map +1 -0
- package/dist/{types-Ccwchyj5.mjs → types-2Be3wSMc.mjs} +1 -1
- package/dist/{types-BwGth3a1.mjs → types-CmzfQP_m.mjs} +3 -3
- package/dist/types-CmzfQP_m.mjs.map +1 -0
- package/dist/utils/test/index.mjs +1 -1
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/index.mjs +7 -4
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/setup.mjs +1 -1
- package/docs/cli/application.md +11 -10
- package/docs/cli/tailordb.md +54 -0
- package/docs/cli-reference.md +1 -0
- package/docs/configuration.md +2 -0
- package/docs/multi-environment.md +74 -0
- package/docs/services/staticwebsite.md +2 -0
- package/docs/services/tailordb-migration.md +17 -1
- package/package.json +2 -1
- package/dist/application-D4tRNn90.mjs +0 -4
- package/dist/application-pusdxz35.mjs.map +0 -1
- package/dist/mock-Dpu__UeJ.mjs.map +0 -1
- package/dist/repl-editor-Y9QJDL0K.mjs.map +0 -1
- package/dist/runtime-CZpsV8vj.mjs.map +0 -1
- package/dist/schema-DYKNTu-n.mjs.map +0 -1
- package/dist/seed-C0fE2sJB.mjs.map +0 -1
- package/dist/service-aPT0fx3y.mjs.map +0 -1
- package/dist/types-BwGth3a1.mjs.map +0 -1
package/dist/cli/lib.d.mts
CHANGED
|
@@ -19733,6 +19733,7 @@ interface DeployOptions {
|
|
|
19733
19733
|
dryRun?: boolean;
|
|
19734
19734
|
yes?: boolean;
|
|
19735
19735
|
noSchemaCheck?: boolean;
|
|
19736
|
+
noValidate?: boolean;
|
|
19736
19737
|
noCache?: boolean;
|
|
19737
19738
|
cleanCache?: boolean;
|
|
19738
19739
|
buildOnly?: boolean;
|
|
@@ -19906,6 +19907,7 @@ interface ShowOptions {
|
|
|
19906
19907
|
interface WorkspaceInfo$1 {
|
|
19907
19908
|
workspaceId: string;
|
|
19908
19909
|
workspaceName: string;
|
|
19910
|
+
workspaceFolderName?: string;
|
|
19909
19911
|
workspaceRegion?: string;
|
|
19910
19912
|
}
|
|
19911
19913
|
interface ApplicationInfo {
|
|
@@ -19944,6 +19946,7 @@ declare function remove(options?: RemoveOptions): Promise<void>;
|
|
|
19944
19946
|
interface WorkspaceInfo {
|
|
19945
19947
|
id: string;
|
|
19946
19948
|
name: string;
|
|
19949
|
+
folderName?: string;
|
|
19947
19950
|
region: string;
|
|
19948
19951
|
createdAt: Date | null;
|
|
19949
19952
|
updatedAt: Date | null;
|
|
@@ -20895,7 +20898,6 @@ type LoadWorkspaceIdOptions = {
|
|
|
20895
20898
|
profile?: string;
|
|
20896
20899
|
};
|
|
20897
20900
|
type LoadAccessTokenOptions = {
|
|
20898
|
-
useProfile?: boolean;
|
|
20899
20901
|
profile?: string;
|
|
20900
20902
|
};
|
|
20901
20903
|
/**
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
|
|
2
|
-
import { f as initOperatorClient } from "../client-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { f as initOperatorClient } from "../client-CobIRHl-.mjs";
|
|
3
|
+
import { t as assertDefined } from "../assert-CKfwrmCV.mjs";
|
|
4
|
+
import { $t as INITIAL_SCHEMA_NUMBER, A as truncate, Bt as getExecutor, Cn as generateUserTypes, Ct as triggerExecutor, D as resumeWorkflow, En as apiCall, Et as getExecutorJob, Ft as getWorkflowExecution, G as organizationTree, Gt as MIGRATION_LABEL_KEY, Ht as executeScript, It as listWorkflowExecutions, J as listOrganizations, M as generate$1, Nt as getWorkflow, Ot as listExecutorJobs, Q as updateFolder, Qt as DIFF_FILE_NAME, R as show, S as listApps, Tt as listExecutors, Ut as waitForExecution, V as remove, Vt as deploy, W as updateOrganization, Wt as bundleMigrationScript, X as getOrganization, Zt as DB_TYPES_FILE_NAME, _ as getWorkspace, _n as formatMigrationDiff, _t as listFunctionRegistries, a as updateUser, an as createSnapshotFromLocalTypes, bt as listWebhookExecutors, cn as getMigrationFilePath, ct as listOAuth2Clients, d as inviteUser, dt as getMachineUserToken, en as MIGRATE_FILE_NAME, et as listFolders, gn as formatDiffSummary, h as listWorkspaces, ht as generate, in as compareSnapshots, it as deleteFolder, jt as startWorkflow, k as listWorkflows, kt as watchExecutorJob, l as listUsers, ln as getMigrationFiles, mt as listMachineUsers, n as query, nt as getFolder, on as getLatestMigrationNumber, ot as createFolder, p as restoreWorkspace, pn as reconstructSnapshotFromMigrations, rn as compareLocalTypesWithSnapshot, s as removeUser, sn as getMigrationDirPath, t as isNativeTypeScriptRuntime, tn as SCHEMA_FILE_NAME, un as getNextMigrationNumber, ut as getOAuth2Client, vn as hasChanges, w as getAppHealth, x as createWorkspace, y as deleteWorkspace, yn as getNamespacesWithMigrations, yt as getFunctionRegistry } from "../runtime-C6o4hiYq.mjs";
|
|
5
|
+
import { C as loadConfig, E as loadAccessToken, O as loadWorkspaceId, b as getDistDir, h as platformBundleDefinePlugin } from "../application-BezXGbrU.mjs";
|
|
5
6
|
import { n as enumConstantsPlugin } from "../enum-constants-C7DaWeQo.mjs";
|
|
6
7
|
import { t as multiline } from "../multiline-Cf9ODpr1.mjs";
|
|
7
8
|
import { n as fileUtilsPlugin } from "../file-utils-BHPxPXmn.mjs";
|
|
8
9
|
import { n as kyselyTypePlugin } from "../kysely-type-D1e0Vwkd.mjs";
|
|
9
|
-
import { n as seedPlugin } from "../seed-
|
|
10
|
+
import { n as seedPlugin } from "../seed-BH2FbrPV.mjs";
|
|
10
11
|
import * as fs from "node:fs";
|
|
11
12
|
import * as path from "pathe";
|
|
12
13
|
import { resolveTSConfig } from "pkg-types";
|
|
13
14
|
import * as rolldown from "rolldown";
|
|
14
15
|
|
|
15
16
|
//#region src/cli/shared/seed-chunker.ts
|
|
17
|
+
/**
|
|
18
|
+
* Seed data chunker for splitting large seed data into manageable message sizes.
|
|
19
|
+
*
|
|
20
|
+
* When seed data exceeds the gRPC message size limit, this module splits the data
|
|
21
|
+
* into multiple chunks at type boundaries (or record boundaries for large types).
|
|
22
|
+
*/
|
|
16
23
|
/** Default maximum message size: 3.5MB (conservative limit for gRPC) */
|
|
17
24
|
const DEFAULT_MAX_MESSAGE_SIZE = 3.5 * 1024 * 1024;
|
|
18
25
|
/** Reserved bytes for message metadata overhead */
|
|
@@ -35,7 +42,7 @@ function chunkSeedData(options) {
|
|
|
35
42
|
const { data, order, codeByteSize, maxMessageSize = DEFAULT_MAX_MESSAGE_SIZE } = options;
|
|
36
43
|
const argBudget = maxMessageSize - codeByteSize - METADATA_OVERHEAD;
|
|
37
44
|
if (argBudget <= 0) throw new Error(`Code size (${codeByteSize} bytes) exceeds the message size limit (${maxMessageSize} bytes). No space left for seed data.`);
|
|
38
|
-
const typesWithData = order.filter((type) => data[type]
|
|
45
|
+
const typesWithData = order.filter((type) => (data[type]?.length ?? 0) > 0);
|
|
39
46
|
if (typesWithData.length === 0) return [];
|
|
40
47
|
if (byteSize(JSON.stringify({
|
|
41
48
|
data,
|
|
@@ -50,7 +57,7 @@ function chunkSeedData(options) {
|
|
|
50
57
|
let currentData = {};
|
|
51
58
|
let currentOrder = [];
|
|
52
59
|
for (const type of typesWithData) {
|
|
53
|
-
const typeRecords = data[type];
|
|
60
|
+
const typeRecords = assertDefined(data[type], `seed data missing for type: ${type}`);
|
|
54
61
|
if (currentOrder.length > 0) {
|
|
55
62
|
const testData = {
|
|
56
63
|
...currentData,
|
package/dist/cli/lib.mjs.map
CHANGED
|
@@ -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 * as path from \"pathe\";\nimport { resolveTSConfig } from \"pkg-types\";\nimport * as rolldown from \"rolldown\";\nimport { getDistDir } from \"@/cli/shared/dist-dir\";\nimport { platformBundleDefinePlugin } from \"@/cli/shared/platform-bundle-plugin\";\nimport ml from \"@/utils/multiline\";\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 plugins: [platformBundleDefinePlugin],\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.\n// tsx's own register() picks `module.registerHooks` on Node ≥ 24.11.1 / 25.1 / 26\n// (avoiding the DEP0205 deprecation) and falls back to `module.register` on older runtimes.\nif (!isNativeTypeScriptRuntime()) {\n const { register } = await import(\"tsx/esm/api\");\n register();\n}\n\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/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 { getFunctionRegistry, type GetFunctionRegistryOptions } from \"./commands/function/get\";\nexport {\n listFunctionRegistries,\n type ListFunctionRegistriesOptions,\n} from \"./commands/function/list\";\nexport type { FunctionRegistryInfo } from \"./commands/function/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 TailorDBSnapshotType,\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;CAClD,IAAI,aAAa,GACf,MAAM,IAAI,MACR,cAAc,aAAa,0CAA0C,eAAe,sCAEtF;CAIF,MAAM,gBAAgB,MAAM,QAAQ,SAAS,KAAK,SAAS,KAAK,KAAK,CAAC,SAAS,CAAC;CAEhF,IAAI,cAAc,WAAW,GAC3B,OAAO,CAAC;CAKV,IAAI,SADY,KAA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ACnD,GAAG,UAAU,WAAW,EAAE,WAAW,KAAK,CAAC;CAG3C,MAAM,YAAY,KAAK,KAAK,WAAW,QAAQ,UAAU,UAAU;CAGnE,MAAM,eAAe,0BAA0B,SAAS;CACxD,GAAG,cAAc,WAAW,YAAY;CAExC,IAAI;CACJ,IAAI;EACF,WAAW,MAAM,gBAAgB;CACnC,QAAQ;EACN,WAAW;CACb;CA+BA,OAAO;EACL;EACA,cAJkB,MA1BC,SAAS,MAAM;GAClC,SAAS,CAAC,0BAA0B;GACpC,OAAO;GACP,OAAO;GACP,QAAQ;IACN,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,eAAe;IACf,SAAS,EACP,UAAU,WACZ;GACF;GACA,UAAU,CAAC,UAAU;GACrB,SAAS,EACP,gBAAgB,CAAC,QAAQ,QAAQ,EACnC;GACA;GACA,WAAW;IACT,mBAAmB;IACnB,aAAa;IACb,0BAA0B;GAC5B;GACA,UAAU;EACZ,CAA0B,EAEA,CAAC,OAAO,EAAE,CAAC;EAKnC,eAAe;CACjB;AACF;;;;AC/JA,IAAI,CAAC,0BAA0B,GAAG;CAChC,MAAM,EAAE,aAAa,MAAM,OAAO;CAClC,SAAS;AACX"}
|
|
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\nimport { assertDefined } from \"@/utils/assert\";\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]?.length ?? 0) > 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 = assertDefined(data[type], `seed data missing for type: ${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 * as path from \"pathe\";\nimport { resolveTSConfig } from \"pkg-types\";\nimport * as rolldown from \"rolldown\";\nimport { getDistDir } from \"@/cli/shared/dist-dir\";\nimport { platformBundleDefinePlugin } from \"@/cli/shared/platform-bundle-plugin\";\nimport ml from \"@/utils/multiline\";\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 plugins: [platformBundleDefinePlugin],\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.\n// tsx's own register() picks `module.registerHooks` on Node ≥ 24.11.1 / 25.1 / 26\n// (avoiding the DEP0205 deprecation) and falls back to `module.register` on older runtimes.\nif (!isNativeTypeScriptRuntime()) {\n const { register } = await import(\"tsx/esm/api\");\n register();\n}\n\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/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 { getFunctionRegistry, type GetFunctionRegistryOptions } from \"./commands/function/get\";\nexport {\n listFunctionRegistries,\n type ListFunctionRegistriesOptions,\n} from \"./commands/function/list\";\nexport type { FunctionRegistryInfo } from \"./commands/function/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 TailorDBSnapshotType,\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":";;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,2BAA2B,MAAM,OAAO;;AAGrD,MAAM,oBAAoB;;;;;;;;;;;;;;;AAgB1B,SAAgB,cAAc,SAA4C;CACxE,MAAM,EAAE,MAAM,OAAO,cAAc,iBAAiB,6BAA6B;CAEjF,MAAM,YAAY,iBAAiB,eAAe;CAClD,IAAI,aAAa,GACf,MAAM,IAAI,MACR,cAAc,aAAa,0CAA0C,eAAe,sCAEtF;CAIF,MAAM,gBAAgB,MAAM,QAAQ,UAAU,KAAK,KAAK,EAAE,UAAU,KAAK,CAAC;CAE1E,IAAI,cAAc,WAAW,GAC3B,OAAO,CAAC;CAKV,IAAI,SADY,KAAK,UAAU;EAAE;EAAM;CAAM,CAC1B,CAAC,KAAK,WACvB,OAAO,CAAC;EAAE;EAAM;EAAO,OAAO;EAAG,OAAO;CAAE,CAAC;CAI7C,MAAM,SAAqC,CAAC;CAC5C,IAAI,cAAwB,CAAC;CAC7B,IAAI,eAAyB,CAAC;CAE9B,KAAK,MAAM,QAAQ,eAAe;EAChC,MAAM,cAAc,cAAc,KAAK,OAAO,+BAA+B,MAAM;EAGnF,IAAI,aAAa,SAAS,GAAG;GAC3B,MAAM,WAAW;IAAE,GAAG;KAAc,OAAO;GAAY;GACvD,MAAM,YAAY,CAAC,GAAG,cAAc,IA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;IACR,WAAW;IACX,QAAQ;IACR,eAAe;IACf,SAAS,EACP,UAAU,WACZ;GACF;GACA,UAAU,CAAC,UAAU;GACrB,SAAS,EACP,gBAAgB,CAAC,QAAQ,QAAQ,EACnC;GACA;GACA,WAAW;IACT,mBAAmB;IACnB,aAAa;IACb,0BAA0B;GAC5B;GACA,UAAU;EACZ,CAA0B,EAEA,CAAC,OAAO,EAAE,CAAC;EAKnC,eAAe;CACjB;AACF;;;;AC/JA,IAAI,CAAC,0BAA0B,GAAG;CAChC,MAAM,EAAE,aAAa,MAAM,OAAO;CAClC,SAAS;AACX"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import { _ as userAgent, a as fetchAll, c as fetchPlatformMachineUserToken, d as initOAuth2Client, f as initOperatorClient, g as retryInterceptor, h as resolveStaticWebsiteUrls, i as createTransport, l as fetchUserInfo, m as platformBaseUrl, n as RETRY_SAFE_CREATE_METHODS, o as fetchMachineUserToken, p as parseMethodName, r as closeConnectionPool, s as fetchPaged, t as MAX_PAGE_SIZE, u as formatRequestParams } from "./client-
|
|
2
|
+
import { _ as userAgent, a as fetchAll, c as fetchPlatformMachineUserToken, d as initOAuth2Client, f as initOperatorClient, g as retryInterceptor, h as resolveStaticWebsiteUrls, i as createTransport, l as fetchUserInfo, m as platformBaseUrl, n as RETRY_SAFE_CREATE_METHODS, o as fetchMachineUserToken, p as parseMethodName, r as closeConnectionPool, s as fetchPaged, t as MAX_PAGE_SIZE, u as formatRequestParams } from "./client-CobIRHl-.mjs";
|
|
3
3
|
|
|
4
4
|
export { userAgent };
|
|
@@ -140,6 +140,16 @@ const file_tailor_v1_application = /*@__PURE__*/ fileDesc("Cht0YWlsb3IvdjEvYXBwb
|
|
|
140
140
|
file_tailor_v1_resource
|
|
141
141
|
]);
|
|
142
142
|
/**
|
|
143
|
+
* Describes the message tailor.v1.CreateApplicationRequest.
|
|
144
|
+
* Use `create(CreateApplicationRequestSchema)` to create a new message.
|
|
145
|
+
*/
|
|
146
|
+
const CreateApplicationRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_application, 0);
|
|
147
|
+
/**
|
|
148
|
+
* Describes the message tailor.v1.UpdateApplicationRequest.
|
|
149
|
+
* Use `create(UpdateApplicationRequestSchema)` to create a new message.
|
|
150
|
+
*/
|
|
151
|
+
const UpdateApplicationRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_application, 2);
|
|
152
|
+
/**
|
|
143
153
|
* Describes the enum tailor.v1.GetApplicationSchemaHealthResponse.ApplicationSchemaHealthStatus.
|
|
144
154
|
*/
|
|
145
155
|
const GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatusSchema = /*@__PURE__*/ enumDesc(file_tailor_v1_application, 11, 0);
|
|
@@ -285,6 +295,101 @@ const file_tailor_v1_auth = /*@__PURE__*/ fileDesc("ChR0YWlsb3IvdjEvYXV0aC5wcm90
|
|
|
285
295
|
file_tailor_v1_auth_resource,
|
|
286
296
|
file_tailor_v1_resource
|
|
287
297
|
]);
|
|
298
|
+
/**
|
|
299
|
+
* Describes the message tailor.v1.CreateAuthServiceRequest.
|
|
300
|
+
* Use `create(CreateAuthServiceRequestSchema)` to create a new message.
|
|
301
|
+
*/
|
|
302
|
+
const CreateAuthServiceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 0);
|
|
303
|
+
/**
|
|
304
|
+
* Describes the message tailor.v1.UpdateAuthServiceRequest.
|
|
305
|
+
* Use `create(UpdateAuthServiceRequestSchema)` to create a new message.
|
|
306
|
+
*/
|
|
307
|
+
const UpdateAuthServiceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 2);
|
|
308
|
+
/**
|
|
309
|
+
* Describes the message tailor.v1.CreateAuthIDPConfigRequest.
|
|
310
|
+
* Use `create(CreateAuthIDPConfigRequestSchema)` to create a new message.
|
|
311
|
+
*/
|
|
312
|
+
const CreateAuthIDPConfigRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 10);
|
|
313
|
+
/**
|
|
314
|
+
* Describes the message tailor.v1.UpdateAuthIDPConfigRequest.
|
|
315
|
+
* Use `create(UpdateAuthIDPConfigRequestSchema)` to create a new message.
|
|
316
|
+
*/
|
|
317
|
+
const UpdateAuthIDPConfigRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 12);
|
|
318
|
+
/**
|
|
319
|
+
* Describes the message tailor.v1.CreateUserProfileConfigRequest.
|
|
320
|
+
* Use `create(CreateUserProfileConfigRequestSchema)` to create a new message.
|
|
321
|
+
*/
|
|
322
|
+
const CreateUserProfileConfigRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 20);
|
|
323
|
+
/**
|
|
324
|
+
* Describes the message tailor.v1.UpdateUserProfileConfigRequest.
|
|
325
|
+
* Use `create(UpdateUserProfileConfigRequestSchema)` to create a new message.
|
|
326
|
+
*/
|
|
327
|
+
const UpdateUserProfileConfigRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 22);
|
|
328
|
+
/**
|
|
329
|
+
* Describes the message tailor.v1.CreateTenantConfigRequest.
|
|
330
|
+
* Use `create(CreateTenantConfigRequestSchema)` to create a new message.
|
|
331
|
+
*/
|
|
332
|
+
const CreateTenantConfigRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 28);
|
|
333
|
+
/**
|
|
334
|
+
* Describes the message tailor.v1.UpdateTenantConfigRequest.
|
|
335
|
+
* Use `create(UpdateTenantConfigRequestSchema)` to create a new message.
|
|
336
|
+
*/
|
|
337
|
+
const UpdateTenantConfigRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 30);
|
|
338
|
+
/**
|
|
339
|
+
* Describes the message tailor.v1.CreateAuthMachineUserRequest.
|
|
340
|
+
* Use `create(CreateAuthMachineUserRequestSchema)` to create a new message.
|
|
341
|
+
*/
|
|
342
|
+
const CreateAuthMachineUserRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 42);
|
|
343
|
+
/**
|
|
344
|
+
* Describes the message tailor.v1.UpdateAuthMachineUserRequest.
|
|
345
|
+
* Use `create(UpdateAuthMachineUserRequestSchema)` to create a new message.
|
|
346
|
+
*/
|
|
347
|
+
const UpdateAuthMachineUserRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 44);
|
|
348
|
+
/**
|
|
349
|
+
* Describes the message tailor.v1.CreateAuthSCIMConfigRequest.
|
|
350
|
+
* Use `create(CreateAuthSCIMConfigRequestSchema)` to create a new message.
|
|
351
|
+
*/
|
|
352
|
+
const CreateAuthSCIMConfigRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 52);
|
|
353
|
+
/**
|
|
354
|
+
* Describes the message tailor.v1.UpdateAuthSCIMConfigRequest.
|
|
355
|
+
* Use `create(UpdateAuthSCIMConfigRequestSchema)` to create a new message.
|
|
356
|
+
*/
|
|
357
|
+
const UpdateAuthSCIMConfigRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 54);
|
|
358
|
+
/**
|
|
359
|
+
* Describes the message tailor.v1.CreateAuthSCIMResourceRequest.
|
|
360
|
+
* Use `create(CreateAuthSCIMResourceRequestSchema)` to create a new message.
|
|
361
|
+
*/
|
|
362
|
+
const CreateAuthSCIMResourceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 60);
|
|
363
|
+
/**
|
|
364
|
+
* Describes the message tailor.v1.UpdateAuthSCIMResourceRequest.
|
|
365
|
+
* Use `create(UpdateAuthSCIMResourceRequestSchema)` to create a new message.
|
|
366
|
+
*/
|
|
367
|
+
const UpdateAuthSCIMResourceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 62);
|
|
368
|
+
/**
|
|
369
|
+
* Describes the message tailor.v1.CreateAuthHookRequest.
|
|
370
|
+
* Use `create(CreateAuthHookRequestSchema)` to create a new message.
|
|
371
|
+
*/
|
|
372
|
+
const CreateAuthHookRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 70);
|
|
373
|
+
/**
|
|
374
|
+
* Describes the message tailor.v1.UpdateAuthHookRequest.
|
|
375
|
+
* Use `create(UpdateAuthHookRequestSchema)` to create a new message.
|
|
376
|
+
*/
|
|
377
|
+
const UpdateAuthHookRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 72);
|
|
378
|
+
/**
|
|
379
|
+
* Describes the message tailor.v1.CreateAuthConnectionRequest.
|
|
380
|
+
* Use `create(CreateAuthConnectionRequestSchema)` to create a new message.
|
|
381
|
+
*/
|
|
382
|
+
const CreateAuthConnectionRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 78);
|
|
383
|
+
/**
|
|
384
|
+
* Describes the message tailor.v1.CreateAuthOAuth2ClientRequest.
|
|
385
|
+
* Use `create(CreateAuthOAuth2ClientRequestSchema)` to create a new message.
|
|
386
|
+
*/
|
|
387
|
+
const CreateAuthOAuth2ClientRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 90);
|
|
388
|
+
/**
|
|
389
|
+
* Describes the message tailor.v1.UpdateAuthOAuth2ClientRequest.
|
|
390
|
+
* Use `create(UpdateAuthOAuth2ClientRequestSchema)` to create a new message.
|
|
391
|
+
*/
|
|
392
|
+
const UpdateAuthOAuth2ClientRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_auth, 92);
|
|
288
393
|
|
|
289
394
|
//#endregion
|
|
290
395
|
//#region ../tailor-proto/src/tailor/v1/events_resource_pb.js
|
|
@@ -354,6 +459,16 @@ const file_tailor_v1_executor = /*@__PURE__*/ fileDesc("Chh0YWlsb3IvdjEvZXhlY3V0
|
|
|
354
459
|
file_tailor_v1_executor_resource,
|
|
355
460
|
file_tailor_v1_resource
|
|
356
461
|
]);
|
|
462
|
+
/**
|
|
463
|
+
* Describes the message tailor.v1.CreateExecutorExecutorRequest.
|
|
464
|
+
* Use `create(CreateExecutorExecutorRequestSchema)` to create a new message.
|
|
465
|
+
*/
|
|
466
|
+
const CreateExecutorExecutorRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_executor, 0);
|
|
467
|
+
/**
|
|
468
|
+
* Describes the message tailor.v1.UpdateExecutorExecutorRequest.
|
|
469
|
+
* Use `create(UpdateExecutorExecutorRequestSchema)` to create a new message.
|
|
470
|
+
*/
|
|
471
|
+
const UpdateExecutorExecutorRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_executor, 2);
|
|
357
472
|
|
|
358
473
|
//#endregion
|
|
359
474
|
//#region ../tailor-proto/src/tailor/v1/function_resource_pb.js
|
|
@@ -449,6 +564,16 @@ const file_tailor_v1_idp = /*@__PURE__*/ fileDesc("ChN0YWlsb3IvdjEvaWRwLnByb3RvE
|
|
|
449
564
|
file_tailor_v1_idp_resource,
|
|
450
565
|
file_tailor_v1_resource
|
|
451
566
|
]);
|
|
567
|
+
/**
|
|
568
|
+
* Describes the message tailor.v1.CreateIdPServiceRequest.
|
|
569
|
+
* Use `create(CreateIdPServiceRequestSchema)` to create a new message.
|
|
570
|
+
*/
|
|
571
|
+
const CreateIdPServiceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_idp, 2);
|
|
572
|
+
/**
|
|
573
|
+
* Describes the message tailor.v1.UpdateIdPServiceRequest.
|
|
574
|
+
* Use `create(UpdateIdPServiceRequestSchema)` to create a new message.
|
|
575
|
+
*/
|
|
576
|
+
const UpdateIdPServiceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_idp, 4);
|
|
452
577
|
|
|
453
578
|
//#endregion
|
|
454
579
|
//#region ../tailor-proto/src/tailor/v1/metadata_resource_pb.js
|
|
@@ -506,6 +631,26 @@ const file_tailor_v1_pipeline = /*@__PURE__*/ fileDesc("Chh0YWlsb3IvdjEvcGlwZWxp
|
|
|
506
631
|
file_tailor_v1_pipeline_resource,
|
|
507
632
|
file_tailor_v1_resource
|
|
508
633
|
]);
|
|
634
|
+
/**
|
|
635
|
+
* Describes the message tailor.v1.CreatePipelineServiceRequest.
|
|
636
|
+
* Use `create(CreatePipelineServiceRequestSchema)` to create a new message.
|
|
637
|
+
*/
|
|
638
|
+
const CreatePipelineServiceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_pipeline, 0);
|
|
639
|
+
/**
|
|
640
|
+
* Describes the message tailor.v1.UpdatePipelineServiceRequest.
|
|
641
|
+
* Use `create(UpdatePipelineServiceRequestSchema)` to create a new message.
|
|
642
|
+
*/
|
|
643
|
+
const UpdatePipelineServiceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_pipeline, 2);
|
|
644
|
+
/**
|
|
645
|
+
* Describes the message tailor.v1.CreatePipelineResolverRequest.
|
|
646
|
+
* Use `create(CreatePipelineResolverRequestSchema)` to create a new message.
|
|
647
|
+
*/
|
|
648
|
+
const CreatePipelineResolverRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_pipeline, 10);
|
|
649
|
+
/**
|
|
650
|
+
* Describes the message tailor.v1.UpdatePipelineResolverRequest.
|
|
651
|
+
* Use `create(UpdatePipelineResolverRequestSchema)` to create a new message.
|
|
652
|
+
*/
|
|
653
|
+
const UpdatePipelineResolverRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_pipeline, 12);
|
|
509
654
|
|
|
510
655
|
//#endregion
|
|
511
656
|
//#region ../tailor-proto/src/tailor/v1/secret_manager_pb.js
|
|
@@ -517,6 +662,21 @@ const file_tailor_v1_secret_manager = /*@__PURE__*/ fileDesc("Ch50YWlsb3IvdjEvc2
|
|
|
517
662
|
file_tailor_v1_resource,
|
|
518
663
|
file_tailor_v1_secret_manager_resource
|
|
519
664
|
]);
|
|
665
|
+
/**
|
|
666
|
+
* Describes the message tailor.v1.CreateSecretManagerVaultRequest.
|
|
667
|
+
* Use `create(CreateSecretManagerVaultRequestSchema)` to create a new message.
|
|
668
|
+
*/
|
|
669
|
+
const CreateSecretManagerVaultRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_secret_manager, 0);
|
|
670
|
+
/**
|
|
671
|
+
* Describes the message tailor.v1.CreateSecretManagerSecretRequest.
|
|
672
|
+
* Use `create(CreateSecretManagerSecretRequestSchema)` to create a new message.
|
|
673
|
+
*/
|
|
674
|
+
const CreateSecretManagerSecretRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_secret_manager, 8);
|
|
675
|
+
/**
|
|
676
|
+
* Describes the message tailor.v1.UpdateSecretManagerSecretRequest.
|
|
677
|
+
* Use `create(UpdateSecretManagerSecretRequestSchema)` to create a new message.
|
|
678
|
+
*/
|
|
679
|
+
const UpdateSecretManagerSecretRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_secret_manager, 10);
|
|
520
680
|
|
|
521
681
|
//#endregion
|
|
522
682
|
//#region ../tailor-proto/src/tailor/v1/stateflow_resource_pb.js
|
|
@@ -565,6 +725,21 @@ const file_tailor_v1_staticwebsite = /*@__PURE__*/ fileDesc("Ch10YWlsb3IvdjEvc3R
|
|
|
565
725
|
file_tailor_v1_resource,
|
|
566
726
|
file_tailor_v1_staticwebsite_resource
|
|
567
727
|
]);
|
|
728
|
+
/**
|
|
729
|
+
* Describes the message tailor.v1.CreateStaticWebsiteRequest.
|
|
730
|
+
* Use `create(CreateStaticWebsiteRequestSchema)` to create a new message.
|
|
731
|
+
*/
|
|
732
|
+
const CreateStaticWebsiteRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_staticwebsite, 0);
|
|
733
|
+
/**
|
|
734
|
+
* Describes the message tailor.v1.UpdateStaticWebsiteRequest.
|
|
735
|
+
* Use `create(UpdateStaticWebsiteRequestSchema)` to create a new message.
|
|
736
|
+
*/
|
|
737
|
+
const UpdateStaticWebsiteRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_staticwebsite, 2);
|
|
738
|
+
/**
|
|
739
|
+
* Describes the message tailor.v1.AddCustomDomainRequest.
|
|
740
|
+
* Use `create(AddCustomDomainRequestSchema)` to create a new message.
|
|
741
|
+
*/
|
|
742
|
+
const AddCustomDomainRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_staticwebsite, 16);
|
|
568
743
|
|
|
569
744
|
//#endregion
|
|
570
745
|
//#region ../tailor-proto/src/tailor/v1/tailordb_resource_pb.js
|
|
@@ -638,6 +813,21 @@ const file_tailor_v1_tailordb = /*@__PURE__*/ fileDesc("Chh0YWlsb3IvdjEvdGFpbG9y
|
|
|
638
813
|
file_tailor_v1_resource,
|
|
639
814
|
file_tailor_v1_tailordb_resource
|
|
640
815
|
]);
|
|
816
|
+
/**
|
|
817
|
+
* Describes the message tailor.v1.CreateTailorDBServiceRequest.
|
|
818
|
+
* Use `create(CreateTailorDBServiceRequestSchema)` to create a new message.
|
|
819
|
+
*/
|
|
820
|
+
const CreateTailorDBServiceRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_tailordb, 2);
|
|
821
|
+
/**
|
|
822
|
+
* Describes the message tailor.v1.CreateTailorDBTypeRequest.
|
|
823
|
+
* Use `create(CreateTailorDBTypeRequestSchema)` to create a new message.
|
|
824
|
+
*/
|
|
825
|
+
const CreateTailorDBTypeRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_tailordb, 12);
|
|
826
|
+
/**
|
|
827
|
+
* Describes the message tailor.v1.UpdateTailorDBTypeRequest.
|
|
828
|
+
* Use `create(UpdateTailorDBTypeRequestSchema)` to create a new message.
|
|
829
|
+
*/
|
|
830
|
+
const UpdateTailorDBTypeRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_tailordb, 14);
|
|
641
831
|
|
|
642
832
|
//#endregion
|
|
643
833
|
//#region ../tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.js
|
|
@@ -701,6 +891,21 @@ const file_tailor_v1_workflow = /*@__PURE__*/ fileDesc("Chh0YWlsb3IvdjEvd29ya2Zs
|
|
|
701
891
|
file_tailor_v1_resource,
|
|
702
892
|
file_tailor_v1_workflow_resource
|
|
703
893
|
]);
|
|
894
|
+
/**
|
|
895
|
+
* Describes the message tailor.v1.CreateWorkflowRequest.
|
|
896
|
+
* Use `create(CreateWorkflowRequestSchema)` to create a new message.
|
|
897
|
+
*/
|
|
898
|
+
const CreateWorkflowRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_workflow, 0);
|
|
899
|
+
/**
|
|
900
|
+
* Describes the message tailor.v1.UpdateWorkflowRequest.
|
|
901
|
+
* Use `create(UpdateWorkflowRequestSchema)` to create a new message.
|
|
902
|
+
*/
|
|
903
|
+
const UpdateWorkflowRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_workflow, 2);
|
|
904
|
+
/**
|
|
905
|
+
* Describes the message tailor.v1.CreateWorkflowJobFunctionRequest.
|
|
906
|
+
* Use `create(CreateWorkflowJobFunctionRequestSchema)` to create a new message.
|
|
907
|
+
*/
|
|
908
|
+
const CreateWorkflowJobFunctionRequestSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_workflow, 12);
|
|
704
909
|
|
|
705
910
|
//#endregion
|
|
706
911
|
//#region ../tailor-proto/src/tailor/v1/workspace_resource_pb.js
|
|
@@ -1204,5 +1409,5 @@ async function closeConnectionPool() {
|
|
|
1204
1409
|
}
|
|
1205
1410
|
|
|
1206
1411
|
//#endregion
|
|
1207
|
-
export {
|
|
1208
|
-
//# sourceMappingURL=client-
|
|
1412
|
+
export { CreateExecutorExecutorRequestSchema as $, TailorDBGQLPermission_Permit as A, AuthSCIMAttribute_Type as At, UpdateSecretManagerSecretRequestSchema as B, Subgraph_ServiceType as Bt, WorkflowExecution_Status as C, AuthConnection_Type as Ct, UpdateTailorDBTypeRequestSchema as D, AuthOAuth2Client_ClientType as Dt, CreateTailorDBTypeRequestSchema as E, AuthInvokerSchema as Et, CreateStaticWebsiteRequestSchema as F, UserProfileProviderConfig_UserProfileProviderType as Ft, PipelineResolver_OperationType as G, CreatePipelineServiceRequestSchema as H, Condition_Operator as Ht, UpdateStaticWebsiteRequestSchema as I, CreateApplicationRequestSchema as It, IdPLang as J, CreateIdPServiceRequestSchema as K, CustomDomainStatus as L, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as Lt, TailorDBType_Permission_Permit as M, AuthSCIMConfig_AuthorizationType as Mt, TailorDBType_PermitAction as N, PATScope as Nt, TailorDBGQLPermission_Action as O, AuthOAuth2Client_GrantType as Ot, AddCustomDomainRequestSchema as P, TenantProviderConfig_TenantProviderType as Pt, FunctionExecution_Type as Q, CreateSecretManagerSecretRequestSchema as R, UpdateApplicationRequestSchema as Rt, UpdateWorkflowRequestSchema as S, UpdateUserProfileConfigRequestSchema as St, CreateTailorDBServiceRequestSchema as T, AuthIDPConfig_AuthType as Tt, UpdatePipelineResolverRequestSchema as U, FilterSchema as Ut, CreatePipelineResolverRequestSchema as V, ConditionSchema as Vt, UpdatePipelineServiceRequestSchema as W, PageDirection as Wt, IdPPermissionPermit as X, IdPPermissionOperator as Y, FunctionExecution_Status as Z, userAgent as _, UpdateAuthOAuth2ClientRequestSchema as _t, fetchAll as a, CreateAuthHookRequestSchema as at, CreateWorkflowJobFunctionRequestSchema as b, UpdateAuthServiceRequestSchema as bt, fetchPlatformMachineUserToken as c, CreateAuthOAuth2ClientRequestSchema as ct, initOAuth2Client as d, CreateAuthServiceRequestSchema as dt, UpdateExecutorExecutorRequestSchema as et, initOperatorClient as f, CreateTenantConfigRequestSchema as ft, retryInterceptor as g, UpdateAuthMachineUserRequestSchema as gt, resolveStaticWebsiteUrls as h, UpdateAuthIDPConfigRequestSchema as ht, createTransport as i, CreateAuthConnectionRequestSchema as it, TailorDBType_Permission_Operator as j, AuthSCIMAttribute_Uniqueness as jt, TailorDBGQLPermission_Operator as k, AuthSCIMAttribute_Mutability as kt, fetchUserInfo as l, CreateAuthSCIMConfigRequestSchema as lt, platformBaseUrl as m, UpdateAuthHookRequestSchema as mt, RETRY_SAFE_CREATE_METHODS as n, ExecutorTargetType as nt, fetchMachineUserToken as o, CreateAuthIDPConfigRequestSchema as ot, parseMethodName as p, CreateUserProfileConfigRequestSchema as pt, UpdateIdPServiceRequestSchema as q, closeConnectionPool as r, ExecutorTriggerType as rt, fetchPaged as s, CreateAuthMachineUserRequestSchema as st, MAX_PAGE_SIZE as t, ExecutorJobStatus as tt, formatRequestParams as u, CreateAuthSCIMResourceRequestSchema as ut, OperatorService as v, UpdateAuthSCIMConfigRequestSchema as vt, WorkflowJobExecution_Status as w, AuthHookPoint as wt, CreateWorkflowRequestSchema as x, UpdateTenantConfigRequestSchema as xt, WorkspacePlatformUserRole as y, UpdateAuthSCIMResourceRequestSchema as yt, CreateSecretManagerVaultRequestSchema as z, ApplicationSchemaUpdateAttemptStatus as zt };
|
|
1413
|
+
//# sourceMappingURL=client-CobIRHl-.mjs.map
|