@tailor-platform/sdk 1.9.3 → 1.10.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 +20 -0
- package/dist/application-COnpGp0d.mjs +4 -0
- package/dist/{application-CVdIXWKF.mjs → application-R26DC-sK.mjs} +6 -2
- package/dist/{application-CVdIXWKF.mjs.map → application-R26DC-sK.mjs.map} +1 -1
- package/dist/cli/index.mjs +2 -2
- package/dist/cli/lib.d.mts +16993 -6
- package/dist/cli/lib.mjs +153 -4
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +2 -2
- package/dist/{index-x4xcWJm1.d.mts → index-DcOTucF6.d.mts} +10 -7
- package/dist/{index-B07hXFjo.d.mts → index-DnoS_Mi4.d.mts} +3 -2
- package/dist/{update-B9UIU-42.mjs → update-C877GWkA.mjs} +331 -164
- package/dist/update-C877GWkA.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/package.json +1 -1
- package/dist/application-r8pIjc4L.mjs +0 -4
- package/dist/update-B9UIU-42.mjs.map +0 -1
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,11 +1,160 @@
|
|
|
1
1
|
import "../chunk-CIV_ash9.mjs";
|
|
2
|
-
import { $ as startWorkflow, B as getMachineUserToken, D as truncate, Dt as
|
|
3
|
-
import "../application-
|
|
4
|
-
import { register } from "node:module";
|
|
2
|
+
import { $ as startWorkflow, At as hasChanges, B as getMachineUserToken, Bt as loadWorkspaceId, Ct as getMigrationFiles, D as truncate, Dt as reconstructSnapshotFromMigrations, E as listWorkflows, Ft as getDistDir, It as apiCall, J as getExecutorJob, Kt as initOperatorClient, L as listOAuth2Clients, M as show, Nt as generateUserTypes, Ot as formatDiffSummary, P as remove, Pt as loadConfig, St as getMigrationFilePath, U as listMachineUsers, W as generate, X as listExecutorJobs, Z as watchExecutorJob, _t as compareSnapshots, at as apply, bt as getLatestMigrationNumber, c as inviteUser, ct as waitForExecution, dt as DB_TYPES_FILE_NAME, f as listWorkspaces, ft as DIFF_FILE_NAME, g as deleteWorkspace, gt as compareLocalTypesWithSnapshot, ht as SCHEMA_FILE_NAME, i as removeUser, it as listWorkflowExecutions, jt as getNamespacesWithMigrations, k as generate$1, kt as formatMigrationDiff, lt as MIGRATION_LABEL_KEY, m as getWorkspace, mt as MIGRATE_FILE_NAME, n as updateUser, o as listUsers, pt as INITIAL_SCHEMA_NUMBER, q as triggerExecutor, rt as getWorkflowExecution, st as executeScript, tt as getWorkflow, u as restoreWorkspace, v as createWorkspace, vt as createSnapshotFromLocalTypes, w as resumeWorkflow, wt as getNextMigrationNumber, x as getAppHealth, xt as getMigrationDirPath, y as listApps, z as getOAuth2Client, zt as loadAccessToken } from "../update-C877GWkA.mjs";
|
|
3
|
+
import { u as logger } from "../application-R26DC-sK.mjs";
|
|
4
|
+
import { createRequire, register } from "node:module";
|
|
5
|
+
import * as fs$1 from "node:fs";
|
|
6
|
+
import * as path from "pathe";
|
|
7
|
+
import { resolveTSConfig } from "pkg-types";
|
|
8
|
+
import ml from "multiline-ts";
|
|
9
|
+
import * as rolldown from "rolldown";
|
|
5
10
|
|
|
11
|
+
//#region src/cli/bundler/seed/seed-bundler.ts
|
|
12
|
+
/**
|
|
13
|
+
* Seed script bundler for TailorDB seed data
|
|
14
|
+
*
|
|
15
|
+
* Bundles seed scripts to be executed via TestExecScript API
|
|
16
|
+
*/
|
|
17
|
+
const REQUIRED_PACKAGES = ["kysely", "@tailor-platform/function-kysely-tailordb"];
|
|
18
|
+
let dependencyCheckDone = false;
|
|
19
|
+
/**
|
|
20
|
+
* Check if required packages for seed bundling are installed.
|
|
21
|
+
* Logs a warning if any are missing.
|
|
22
|
+
*/
|
|
23
|
+
function checkSeedDependencies() {
|
|
24
|
+
if (dependencyCheckDone) return;
|
|
25
|
+
dependencyCheckDone = true;
|
|
26
|
+
const require = createRequire(path.resolve(process.cwd(), "package.json"));
|
|
27
|
+
const missing = [];
|
|
28
|
+
for (const pkg of REQUIRED_PACKAGES) try {
|
|
29
|
+
require.resolve(pkg);
|
|
30
|
+
} catch {
|
|
31
|
+
missing.push(pkg);
|
|
32
|
+
}
|
|
33
|
+
if (missing.length > 0) logger.warn(`Missing optional dependencies for seed bundling: ${missing.join(", ")}. Install them in your project: pnpm add -D ${missing.join(" ")}`);
|
|
34
|
+
}
|
|
35
|
+
const BATCH_SIZE = 100;
|
|
36
|
+
/**
|
|
37
|
+
* Generate seed script content for server-side execution
|
|
38
|
+
* @param namespace - TailorDB namespace
|
|
39
|
+
* @returns Generated seed script content
|
|
40
|
+
*/
|
|
41
|
+
function generateSeedScriptContent(namespace) {
|
|
42
|
+
return ml`
|
|
43
|
+
import { Kysely } from "kysely";
|
|
44
|
+
import { TailordbDialect } from "@tailor-platform/function-kysely-tailordb";
|
|
45
|
+
|
|
46
|
+
type SeedInput = {
|
|
47
|
+
data: Record<string, Record<string, unknown>[]>;
|
|
48
|
+
order: string[];
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
type SeedResult = {
|
|
52
|
+
success: boolean;
|
|
53
|
+
processed: Record<string, number>;
|
|
54
|
+
errors: string[];
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function getDB(namespace: string) {
|
|
58
|
+
const client = new tailordb.Client({ namespace });
|
|
59
|
+
return new Kysely<Record<string, Record<string, unknown>>>({
|
|
60
|
+
dialect: new TailordbDialect(client),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export async function main(input: SeedInput): Promise<SeedResult> {
|
|
65
|
+
const db = getDB("${namespace}");
|
|
66
|
+
const processed: Record<string, number> = {};
|
|
67
|
+
const errors: string[] = [];
|
|
68
|
+
const BATCH_SIZE = ${String(BATCH_SIZE)};
|
|
69
|
+
|
|
70
|
+
for (const typeName of input.order) {
|
|
71
|
+
const records = input.data[typeName];
|
|
72
|
+
if (!records || records.length === 0) {
|
|
73
|
+
console.log(\`[${namespace}] \${typeName}: skipped (no data)\`);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
processed[typeName] = 0;
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
for (let i = 0; i < records.length; i += BATCH_SIZE) {
|
|
81
|
+
const batch = records.slice(i, i + BATCH_SIZE);
|
|
82
|
+
await db.insertInto(typeName).values(batch).execute();
|
|
83
|
+
processed[typeName] += batch.length;
|
|
84
|
+
console.log(\`[${namespace}] \${typeName}: \${processed[typeName]}/\${records.length}\`);
|
|
85
|
+
}
|
|
86
|
+
} catch (error) {
|
|
87
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
88
|
+
errors.push(\`\${typeName}: \${message}\`);
|
|
89
|
+
console.error(\`[${namespace}] \${typeName}: failed - \${message}\`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
success: errors.length === 0,
|
|
95
|
+
processed,
|
|
96
|
+
errors,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
`;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Bundle a seed script for server-side execution
|
|
103
|
+
*
|
|
104
|
+
* Creates an entry that:
|
|
105
|
+
* 1. Defines getDB() function inline
|
|
106
|
+
* 2. Processes data in batches using Kysely
|
|
107
|
+
* 3. Reports progress via console.log
|
|
108
|
+
* 4. Exports as main() for TestExecScript
|
|
109
|
+
* @param namespace - TailorDB namespace
|
|
110
|
+
* @param typeNames - List of type names to include in the seed
|
|
111
|
+
* @returns Bundled seed script result
|
|
112
|
+
*/
|
|
113
|
+
async function bundleSeedScript(namespace, typeNames) {
|
|
114
|
+
checkSeedDependencies();
|
|
115
|
+
const outputDir = path.resolve(getDistDir(), "seed");
|
|
116
|
+
fs$1.mkdirSync(outputDir, { recursive: true });
|
|
117
|
+
const entryPath = path.join(outputDir, `seed_${namespace}.entry.ts`);
|
|
118
|
+
const outputPath = path.join(outputDir, `seed_${namespace}.js`);
|
|
119
|
+
const entryContent = generateSeedScriptContent(namespace);
|
|
120
|
+
fs$1.writeFileSync(entryPath, entryContent);
|
|
121
|
+
let tsconfig;
|
|
122
|
+
try {
|
|
123
|
+
tsconfig = await resolveTSConfig();
|
|
124
|
+
} catch {
|
|
125
|
+
tsconfig = void 0;
|
|
126
|
+
}
|
|
127
|
+
await rolldown.build(rolldown.defineConfig({
|
|
128
|
+
input: entryPath,
|
|
129
|
+
output: {
|
|
130
|
+
file: outputPath,
|
|
131
|
+
format: "esm",
|
|
132
|
+
sourcemap: false,
|
|
133
|
+
minify: false,
|
|
134
|
+
inlineDynamicImports: true,
|
|
135
|
+
globals: { tailordb: "tailordb" }
|
|
136
|
+
},
|
|
137
|
+
external: ["tailordb"],
|
|
138
|
+
resolve: { conditionNames: ["node", "import"] },
|
|
139
|
+
tsconfig,
|
|
140
|
+
treeshake: {
|
|
141
|
+
moduleSideEffects: false,
|
|
142
|
+
annotations: true,
|
|
143
|
+
unknownGlobalSideEffects: false
|
|
144
|
+
},
|
|
145
|
+
logLevel: "silent"
|
|
146
|
+
}));
|
|
147
|
+
return {
|
|
148
|
+
namespace,
|
|
149
|
+
bundledCode: fs$1.readFileSync(outputPath, "utf-8"),
|
|
150
|
+
typesIncluded: typeNames
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
//#endregion
|
|
6
155
|
//#region src/cli/lib.ts
|
|
7
156
|
register("tsx", import.meta.url, { data: {} });
|
|
8
157
|
|
|
9
158
|
//#endregion
|
|
10
|
-
export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, SCHEMA_FILE_NAME, apiCall, apply, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutorJob, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, inviteUser, listApps, listExecutorJobs, listMachineUsers, listOAuth2Clients, listUsers, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, show, startWorkflow, triggerExecutor, truncate, updateUser, watchExecutorJob };
|
|
159
|
+
export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, SCHEMA_FILE_NAME, apiCall, apply, bundleSeedScript, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, executeScript, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutorJob, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, listApps, listExecutorJobs, listMachineUsers, listOAuth2Clients, listUsers, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, show, startWorkflow, triggerExecutor, truncate, updateUser, waitForExecution, watchExecutorJob };
|
|
11
160
|
//# sourceMappingURL=lib.mjs.map
|
package/dist/cli/lib.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.mjs","names":[],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// 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 \"./apply/index\";\nexport type { ApplyOptions } from \"./apply/index\";\nexport { generate } from \"./generator/index\";\nexport type { GenerateOptions } from \"./generator/options\";\nexport { loadConfig, type LoadedConfig } from \"./config-loader\";\nexport { generateUserTypes } from \"./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} from \"./generator/types\";\nexport type { TailorDBType } from \"@/parser/service/tailordb/types\";\nexport type { Resolver } from \"@/parser/service/resolver\";\nexport type { Executor } from \"@/parser/service/executor\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./show\";\nexport { remove, type RemoveOptions } from \"./remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./workspace/user/remove\";\nexport type { UserInfo } from \"./workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./workspace/app/list\";\nexport { getAppHealth, type HealthOptions as GetAppHealthOptions } from \"./workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./workspace/app/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./workflow/list\";\nexport { getWorkflow, type GetWorkflowOptions } from \"./workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./workflow/transform\";\nexport {\n triggerExecutor,\n type TriggerExecutorOptions,\n type TriggerExecutorResult,\n} from \"./executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n watchExecutorJob,\n type ListExecutorJobsOptions,\n type GetExecutorJobOptions,\n type WatchExecutorJobOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./executor/jobs\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n} from \"./executor/transform\";\nexport { loadAccessToken, loadWorkspaceId } from \"./context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./api\";\nexport { truncate, type TruncateOptions } from \"./tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./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 \"./tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./tailordb/migrate/types\";\n"],"mappings":";;;;;;AAIA,SAAS,OAAO,OAAO,KAAK,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"lib.mjs","names":["fs"],"sources":["../../src/cli/bundler/seed/seed-bundler.ts","../../src/cli/lib.ts"],"sourcesContent":["/**\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 { createRequire } from \"node:module\";\nimport ml from \"multiline-ts\";\nimport * as path from \"pathe\";\nimport { resolveTSConfig } from \"pkg-types\";\nimport * as rolldown from \"rolldown\";\nimport { getDistDir } from \"@/cli/utils/dist-dir\";\nimport { logger } from \"@/cli/utils/logger\";\n\nexport type SeedBundleResult = {\n namespace: string;\n bundledCode: string;\n typesIncluded: string[];\n};\n\nconst REQUIRED_PACKAGES = [\"kysely\", \"@tailor-platform/function-kysely-tailordb\"] as const;\n\nlet dependencyCheckDone = false;\n\n/**\n * Check if required packages for seed bundling are installed.\n * Logs a warning if any are missing.\n */\nfunction checkSeedDependencies(): void {\n if (dependencyCheckDone) return;\n dependencyCheckDone = true;\n\n const require = createRequire(path.resolve(process.cwd(), \"package.json\"));\n const missing: string[] = [];\n\n for (const pkg of REQUIRED_PACKAGES) {\n try {\n require.resolve(pkg);\n } catch {\n missing.push(pkg);\n }\n }\n\n if (missing.length > 0) {\n logger.warn(\n `Missing optional dependencies for seed bundling: ${missing.join(\", \")}. ` +\n `Install them in your project: pnpm add -D ${missing.join(\" \")}`,\n );\n }\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 } from \"kysely\";\n import { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\n\n type SeedInput = {\n data: Record<string, Record<string, unknown>[]>;\n order: 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\n try {\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 } 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 // Check for required dependencies (only once per session)\n checkSeedDependencies();\n\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 const outputPath = path.join(outputDir, `seed_${namespace}.js`);\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\n await rolldown.build(\n rolldown.defineConfig({\n input: entryPath,\n output: {\n file: outputPath,\n format: \"esm\",\n sourcemap: false,\n minify: false,\n inlineDynamicImports: true,\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\n // Read bundled output\n const bundledCode = fs.readFileSync(outputPath, \"utf-8\");\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 \"./apply/index\";\nexport type { ApplyOptions } from \"./apply/index\";\nexport { generate } from \"./generator/index\";\nexport type { GenerateOptions } from \"./generator/options\";\nexport { loadConfig, type LoadedConfig } from \"./config-loader\";\nexport { generateUserTypes } from \"./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} from \"./generator/types\";\nexport type { TailorDBType } from \"@/parser/service/tailordb/types\";\nexport type { Resolver } from \"@/parser/service/resolver\";\nexport type { Executor } from \"@/parser/service/executor\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./show\";\nexport { remove, type RemoveOptions } from \"./remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./workspace/user/remove\";\nexport type { UserInfo } from \"./workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./workspace/app/list\";\nexport { getAppHealth, type HealthOptions as GetAppHealthOptions } from \"./workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./workspace/app/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./workflow/list\";\nexport { getWorkflow, type GetWorkflowOptions } from \"./workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./workflow/transform\";\nexport {\n triggerExecutor,\n type TriggerExecutorOptions,\n type TriggerExecutorResult,\n} from \"./executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n watchExecutorJob,\n type ListExecutorJobsOptions,\n type GetExecutorJobOptions,\n type WatchExecutorJobOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./executor/jobs\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n} from \"./executor/transform\";\nexport { loadAccessToken, loadWorkspaceId } from \"./context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./api\";\nexport { truncate, type TruncateOptions } from \"./tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./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 \"./tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./tailordb/migrate/types\";\n\n// Seed exports\nexport { bundleSeedScript, type SeedBundleResult } from \"./bundler/seed/seed-bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ExecutionWaitResult,\n} from \"./utils/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./client\";\nexport type { AuthInvoker } from \"@tailor-proto/tailor/v1/auth_resource_pb\";\n"],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAM,oBAAoB,CAAC,UAAU,4CAA4C;AAEjF,IAAI,sBAAsB;;;;;AAM1B,SAAS,wBAA8B;AACrC,KAAI,oBAAqB;AACzB,uBAAsB;CAEtB,MAAM,UAAU,cAAc,KAAK,QAAQ,QAAQ,KAAK,EAAE,eAAe,CAAC;CAC1E,MAAM,UAAoB,EAAE;AAE5B,MAAK,MAAM,OAAO,kBAChB,KAAI;AACF,UAAQ,QAAQ,IAAI;SACd;AACN,UAAQ,KAAK,IAAI;;AAIrB,KAAI,QAAQ,SAAS,EACnB,QAAO,KACL,oDAAoD,QAAQ,KAAK,KAAK,CAAC,8CACxB,QAAQ,KAAK,IAAI,GACjE;;AAIL,MAAM,aAAa;;;;;;AAOnB,SAAS,0BAA0B,WAA2B;AAC5D,QAAO,EAAY;;;;;;;;;;;;;;;;;;;;;;;0BAuBK,UAAU;;;2BAGT,OAAO,WAAW,CAAC;;;;;2BAKnB,UAAU;;;;;;;;;;;6BAWR,UAAU;;;;;6BAKV,UAAU;;;;;;;;;;;;;;;;;;;;;;;;AAyBvC,eAAsB,iBACpB,WACA,WAC2B;AAE3B,wBAAuB;CAGvB,MAAM,YAAY,KAAK,QAAQ,YAAY,EAAE,OAAO;AACpD,MAAG,UAAU,WAAW,EAAE,WAAW,MAAM,CAAC;CAG5C,MAAM,YAAY,KAAK,KAAK,WAAW,QAAQ,UAAU,WAAW;CACpE,MAAM,aAAa,KAAK,KAAK,WAAW,QAAQ,UAAU,KAAK;CAG/D,MAAM,eAAe,0BAA0B,UAAU;AACzD,MAAG,cAAc,WAAW,aAAa;CAEzC,IAAI;AACJ,KAAI;AACF,aAAW,MAAM,iBAAiB;SAC5B;AACN,aAAW;;AAIb,OAAM,SAAS,MACb,SAAS,aAAa;EACpB,OAAO;EACP,QAAQ;GACN,MAAM;GACN,QAAQ;GACR,WAAW;GACX,QAAQ;GACR,sBAAsB;GACtB,SAAS,EACP,UAAU,YACX;GACF;EACD,UAAU,CAAC,WAAW;EACtB,SAAS,EACP,gBAAgB,CAAC,QAAQ,SAAS,EACnC;EACD;EACA,WAAW;GACT,mBAAmB;GACnB,aAAa;GACb,0BAA0B;GAC3B;EACD,UAAU;EACX,CAAC,CACH;AAKD,QAAO;EACL;EACA,aAJkBA,KAAG,aAAa,YAAY,QAAQ;EAKtD,eAAe;EAChB;;;;;AC7LH,SAAS,OAAO,OAAO,KAAK,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference path="./../user-defined.d.ts" />
|
|
2
|
-
import { $ as TailorDBInstance, A as AuthOwnConfig, At as unauthenticatedTailorUser, B as SCIMAttribute, D as AuthConfig, Dt as AttributeList, F as IdProviderConfig, G as SCIMResource, H as SCIMAttributeType, I as OAuth2ClientGrantType, J as UserAttributeListKey, K as TenantProviderConfig, L as OAuth2ClientInput, M as BuiltinIdP, N as DefinedAuth, O as AuthExternalConfig, Ot as AttributeMap, P as IDToken, Q as TailorDBField, R as OIDC, U as SCIMAuthorization, V as SCIMAttributeMapping, W as SCIMConfig, X as UsernameFieldKey, Y as UserAttributeMap, Z as ValueOperand, _t as ResolverExternalConfig, a as IdPExternalConfig, at as unsafeAllowAllGqlPermission, bt as ResolverServiceInput, c as WorkflowServiceConfig, d as defineStaticWebSite, et as TailorDBType, g as ExecutorServiceInput, gt as Resolver, h as ExecutorServiceConfig, ht as QueryType, i as IdPConfig, it as TailorTypePermission, j as AuthServiceInput, kt as TailorUser, l as WorkflowServiceInput, mt as TailorField, nt as PermissionCondition, ot as unsafeAllowAllTypePermission, q as UserAttributeKey, rt as TailorTypeGqlPermission, tt as db, u as StaticWebsiteConfig, wt as Env, yt as ResolverServiceConfig, z as SAML } from "../index-
|
|
3
|
-
import { A as idpUserDeletedTrigger, B as WorkflowOperation, C as RecordUpdatedArgs, D as authAccessTokenRefreshedTrigger, E as authAccessTokenIssuedTrigger, F as resolverExecutedTrigger, G as WorkflowJob, H as WorkflowConfig, I as FunctionOperation, J as WorkflowJobOutput, K as WorkflowJobContext, L as GqlOperation, M as recordCreatedTrigger, N as recordDeletedTrigger, O as authAccessTokenRevokedTrigger, P as recordUpdatedTrigger, Q as defineAuth, R as Operation, S as RecordTrigger, T as ResolverExecutedTrigger, U as createWorkflow, V as Workflow, W as WORKFLOW_TEST_ENV_KEY, X as createResolver, Y as createWorkflowJob, Z as AuthInvoker, _ as AuthAccessTokenTrigger, a as defineGenerators, b as RecordCreatedArgs, c as Trigger, d as IncomingWebhookTrigger, f as incomingWebhookTrigger, g as AuthAccessTokenArgs, h as scheduleTrigger, i as defineConfig, j as idpUserUpdatedTrigger, k as idpUserCreatedTrigger, l as IncomingWebhookArgs, m as ScheduleTrigger, n as output, o as defineIdp, p as ScheduleArgs, q as WorkflowJobInput, r as t, s as createExecutor, t as infer, u as IncomingWebhookRequest, v as IdpUserArgs, w as ResolverExecutedArgs, x as RecordDeletedArgs, y as IdpUserTrigger, z as WebhookOperation } from "../index-
|
|
2
|
+
import { $ as TailorDBInstance, A as AuthOwnConfig, At as unauthenticatedTailorUser, B as SCIMAttribute, D as AuthConfig, Dt as AttributeList, F as IdProviderConfig, G as SCIMResource, H as SCIMAttributeType, I as OAuth2ClientGrantType, J as UserAttributeListKey, K as TenantProviderConfig, L as OAuth2ClientInput, M as BuiltinIdP, N as DefinedAuth, O as AuthExternalConfig, Ot as AttributeMap, P as IDToken, Q as TailorDBField, R as OIDC, U as SCIMAuthorization, V as SCIMAttributeMapping, W as SCIMConfig, X as UsernameFieldKey, Y as UserAttributeMap, Z as ValueOperand, _t as ResolverExternalConfig, a as IdPExternalConfig, at as unsafeAllowAllGqlPermission, bt as ResolverServiceInput, c as WorkflowServiceConfig, d as defineStaticWebSite, et as TailorDBType, g as ExecutorServiceInput, gt as Resolver, h as ExecutorServiceConfig, ht as QueryType, i as IdPConfig, it as TailorTypePermission, j as AuthServiceInput, kt as TailorUser, l as WorkflowServiceInput, mt as TailorField, nt as PermissionCondition, ot as unsafeAllowAllTypePermission, q as UserAttributeKey, rt as TailorTypeGqlPermission, tt as db, u as StaticWebsiteConfig, wt as Env, yt as ResolverServiceConfig, z as SAML } from "../index-DcOTucF6.mjs";
|
|
3
|
+
import { A as idpUserDeletedTrigger, B as WorkflowOperation, C as RecordUpdatedArgs, D as authAccessTokenRefreshedTrigger, E as authAccessTokenIssuedTrigger, F as resolverExecutedTrigger, G as WorkflowJob, H as WorkflowConfig, I as FunctionOperation, J as WorkflowJobOutput, K as WorkflowJobContext, L as GqlOperation, M as recordCreatedTrigger, N as recordDeletedTrigger, O as authAccessTokenRevokedTrigger, P as recordUpdatedTrigger, Q as defineAuth, R as Operation, S as RecordTrigger, T as ResolverExecutedTrigger, U as createWorkflow, V as Workflow, W as WORKFLOW_TEST_ENV_KEY, X as createResolver, Y as createWorkflowJob, Z as AuthInvoker, _ as AuthAccessTokenTrigger, a as defineGenerators, b as RecordCreatedArgs, c as Trigger, d as IncomingWebhookTrigger, f as incomingWebhookTrigger, g as AuthAccessTokenArgs, h as scheduleTrigger, i as defineConfig, j as idpUserUpdatedTrigger, k as idpUserCreatedTrigger, l as IncomingWebhookArgs, m as ScheduleTrigger, n as output, o as defineIdp, p as ScheduleArgs, q as WorkflowJobInput, r as t, s as createExecutor, t as infer, u as IncomingWebhookRequest, v as IdpUserArgs, w as ResolverExecutedArgs, x as RecordDeletedArgs, y as IdpUserTrigger, z as WebhookOperation } from "../index-DnoS_Mi4.mjs";
|
|
4
4
|
export { AttributeList, AttributeMap, AuthAccessTokenArgs, AuthAccessTokenTrigger, AuthConfig, AuthExternalConfig, AuthInvoker, AuthOwnConfig, AuthServiceInput, BuiltinIdP, DefinedAuth, Env, ExecutorServiceConfig, ExecutorServiceInput, FunctionOperation, GqlOperation, IDToken, IdPConfig, IdPExternalConfig, IdProviderConfig, IdpUserArgs, IdpUserTrigger, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookTrigger, OAuth2ClientInput as OAuth2Client, OAuth2ClientGrantType, OIDC, Operation, PermissionCondition, QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordTrigger, RecordUpdatedArgs, Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, ScheduleArgs, ScheduleTrigger, StaticWebsiteConfig, TailorDBField, TailorDBInstance, TailorDBType, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, TenantProviderConfig, Trigger, UserAttributeKey, UserAttributeListKey, UserAttributeMap, UsernameFieldKey, ValueOperand, WORKFLOW_TEST_ENV_KEY, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowJobInput, WorkflowJobOutput, WorkflowOperation, WorkflowServiceConfig, WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, defineStaticWebSite, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
|
|
@@ -169,11 +169,11 @@ declare const TailorFieldSchema: z.ZodObject<{
|
|
|
169
169
|
type: z.ZodEnum<{
|
|
170
170
|
string: "string";
|
|
171
171
|
boolean: "boolean";
|
|
172
|
-
date: "date";
|
|
173
|
-
enum: "enum";
|
|
174
172
|
uuid: "uuid";
|
|
175
173
|
integer: "integer";
|
|
176
174
|
float: "float";
|
|
175
|
+
enum: "enum";
|
|
176
|
+
date: "date";
|
|
177
177
|
datetime: "datetime";
|
|
178
178
|
time: "time";
|
|
179
179
|
nested: "nested";
|
|
@@ -202,11 +202,11 @@ declare const ResolverSchema: z.ZodObject<{
|
|
|
202
202
|
type: z.ZodEnum<{
|
|
203
203
|
string: "string";
|
|
204
204
|
boolean: "boolean";
|
|
205
|
-
date: "date";
|
|
206
|
-
enum: "enum";
|
|
207
205
|
uuid: "uuid";
|
|
208
206
|
integer: "integer";
|
|
209
207
|
float: "float";
|
|
208
|
+
enum: "enum";
|
|
209
|
+
date: "date";
|
|
210
210
|
datetime: "datetime";
|
|
211
211
|
time: "time";
|
|
212
212
|
nested: "nested";
|
|
@@ -232,11 +232,11 @@ declare const ResolverSchema: z.ZodObject<{
|
|
|
232
232
|
type: z.ZodEnum<{
|
|
233
233
|
string: "string";
|
|
234
234
|
boolean: "boolean";
|
|
235
|
-
date: "date";
|
|
236
|
-
enum: "enum";
|
|
237
235
|
uuid: "uuid";
|
|
238
236
|
integer: "integer";
|
|
239
237
|
float: "float";
|
|
238
|
+
enum: "enum";
|
|
239
|
+
date: "date";
|
|
240
240
|
datetime: "datetime";
|
|
241
241
|
time: "time";
|
|
242
242
|
nested: "nested";
|
|
@@ -1611,6 +1611,7 @@ declare const IdPSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
|
1611
1611
|
passwordRequireNumeric: z.ZodOptional<z.ZodBoolean>;
|
|
1612
1612
|
passwordMinLength: z.ZodOptional<z.ZodNumber>;
|
|
1613
1613
|
passwordMaxLength: z.ZodOptional<z.ZodNumber>;
|
|
1614
|
+
allowedEmailDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1614
1615
|
}, z.core.$strip>, z.ZodTransform<{
|
|
1615
1616
|
useNonEmailIdentifier?: boolean | undefined;
|
|
1616
1617
|
allowSelfPasswordReset?: boolean | undefined;
|
|
@@ -1620,6 +1621,7 @@ declare const IdPSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
|
1620
1621
|
passwordRequireNumeric?: boolean | undefined;
|
|
1621
1622
|
passwordMinLength?: number | undefined;
|
|
1622
1623
|
passwordMaxLength?: number | undefined;
|
|
1624
|
+
allowedEmailDomains?: string[] | undefined;
|
|
1623
1625
|
}, {
|
|
1624
1626
|
useNonEmailIdentifier?: boolean | undefined;
|
|
1625
1627
|
allowSelfPasswordReset?: boolean | undefined;
|
|
@@ -1629,6 +1631,7 @@ declare const IdPSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
|
1629
1631
|
passwordRequireNumeric?: boolean | undefined;
|
|
1630
1632
|
passwordMinLength?: number | undefined;
|
|
1631
1633
|
passwordMaxLength?: number | undefined;
|
|
1634
|
+
allowedEmailDomains?: string[] | undefined;
|
|
1632
1635
|
}>>>;
|
|
1633
1636
|
publishUserEvents: z.ZodOptional<z.ZodBoolean>;
|
|
1634
1637
|
}, z.core.$strip>, "IdPConfig", "out">;
|
|
@@ -1770,4 +1773,4 @@ type GeneratorConfigSchemaType = ReturnType<typeof createGeneratorConfigSchema>;
|
|
|
1770
1773
|
type Generator = z.output<GeneratorConfigSchemaType>;
|
|
1771
1774
|
//#endregion
|
|
1772
1775
|
export { TailorDBInstance as $, AuthOwnConfig as A, unauthenticatedTailorUser as At, SCIMAttribute as B, ScheduleTriggerInput as C, output as Ct, AuthConfig as D, AttributeList as Dt, TailorDBType as E, TailorActor as Et, IdProviderConfig as F, SCIMResource as G, SCIMAttributeType as H, OAuth2ClientGrantType as I, UserAttributeListKey as J, TenantProviderConfig as K, OAuth2ClientInput as L, BuiltinIdP as M, AllowedValuesOutput as Mt, DefinedAuth as N, AuthExternalConfig as O, AttributeMap as Ot, IDToken as P, TailorDBField as Q, OIDC as R, ResolverExecutedTrigger as S, JsonCompatible as St, WorkflowOperation as T, TailorEnv as Tt, SCIMAuthorization as U, SCIMAttributeMapping as V, SCIMConfig as W, UsernameFieldKey as X, UserAttributeMap as Y, ValueOperand as Z, FunctionOperation as _, ResolverExternalConfig as _t, IdPExternalConfig as a, unsafeAllowAllGqlPermission as at, IncomingWebhookTrigger as b, ResolverServiceInput as bt, WorkflowServiceConfig as c, DefinedFieldMetadata as ct, defineStaticWebSite as d, FieldOutput$1 as dt, TailorDBType$1 as et, AuthAccessTokenTrigger as f, TailorFieldType as ft, ExecutorServiceInput as g, Resolver as gt, ExecutorServiceConfig as h, QueryType as ht, IdPConfig as i, TailorTypePermission as it, AuthServiceInput as j, AllowedValues as jt, AuthInvoker as k, TailorUser as kt, WorkflowServiceInput as l, FieldMetadata as lt, ExecutorInput as m, TailorField as mt, GeneratorConfig as n, PermissionCondition as nt, IdPInput as o, unsafeAllowAllTypePermission as ot, Executor as p, TailorAnyField as pt, UserAttributeKey as q, AppConfig as r, TailorTypeGqlPermission as rt, IdpDefinitionBrand as s, ArrayFieldOutput as st, Generator as t, db as tt, StaticWebsiteConfig as u, FieldOptions as ut, GqlOperation as v, ResolverInput as vt, WebhookOperation as w, Env as wt, RecordTrigger as x, InferFieldsOutput as xt, IdpUserTrigger as y, ResolverServiceConfig as yt, SAML as z };
|
|
1773
|
-
//# sourceMappingURL=index-
|
|
1776
|
+
//# sourceMappingURL=index-DcOTucF6.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference path="./user-defined.d.ts" />
|
|
2
|
-
import { $ as TailorDBInstance, C as ScheduleTriggerInput, Ct as output$1, Et as TailorActor, J as UserAttributeListKey, Mt as AllowedValuesOutput, N as DefinedAuth, S as ResolverExecutedTrigger$1, St as JsonCompatible, T as WorkflowOperation$1, Tt as TailorEnv, Y as UserAttributeMap, _ as FunctionOperation$1, b as IncomingWebhookTrigger$1, ct as DefinedFieldMetadata, dt as FieldOutput, et as TailorDBType, f as AuthAccessTokenTrigger$1, ft as TailorFieldType, j as AuthServiceInput, jt as AllowedValues, k as AuthInvoker$1, kt as TailorUser, lt as FieldMetadata, m as ExecutorInput, mt as TailorField, n as GeneratorConfig, o as IdPInput, pt as TailorAnyField, r as AppConfig, s as IdpDefinitionBrand, st as ArrayFieldOutput, ut as FieldOptions, v as GqlOperation$1, vt as ResolverInput, w as WebhookOperation$1, x as RecordTrigger$1, xt as InferFieldsOutput, y as IdpUserTrigger$1 } from "./index-
|
|
2
|
+
import { $ as TailorDBInstance, C as ScheduleTriggerInput, Ct as output$1, Et as TailorActor, J as UserAttributeListKey, Mt as AllowedValuesOutput, N as DefinedAuth, S as ResolverExecutedTrigger$1, St as JsonCompatible, T as WorkflowOperation$1, Tt as TailorEnv, Y as UserAttributeMap, _ as FunctionOperation$1, b as IncomingWebhookTrigger$1, ct as DefinedFieldMetadata, dt as FieldOutput, et as TailorDBType, f as AuthAccessTokenTrigger$1, ft as TailorFieldType, j as AuthServiceInput, jt as AllowedValues, k as AuthInvoker$1, kt as TailorUser, lt as FieldMetadata, m as ExecutorInput, mt as TailorField, n as GeneratorConfig, o as IdPInput, pt as TailorAnyField, r as AppConfig, s as IdpDefinitionBrand, st as ArrayFieldOutput, ut as FieldOptions, v as GqlOperation$1, vt as ResolverInput, w as WebhookOperation$1, x as RecordTrigger$1, xt as InferFieldsOutput, y as IdpUserTrigger$1 } from "./index-DcOTucF6.mjs";
|
|
3
3
|
import * as zod38 from "zod";
|
|
4
4
|
import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
|
|
5
5
|
import * as zod_v4_core33 from "zod/v4/core";
|
|
@@ -467,6 +467,7 @@ declare function defineIdp<const TClients extends string[]>(name: string, config
|
|
|
467
467
|
passwordRequireNumeric?: boolean | undefined;
|
|
468
468
|
passwordMinLength?: number | undefined;
|
|
469
469
|
passwordMaxLength?: number | undefined;
|
|
470
|
+
allowedEmailDomains?: string[] | undefined;
|
|
470
471
|
} | undefined;
|
|
471
472
|
readonly publishUserEvents?: boolean | undefined;
|
|
472
473
|
readonly clients: TClients;
|
|
@@ -578,4 +579,4 @@ declare namespace t {
|
|
|
578
579
|
}
|
|
579
580
|
//#endregion
|
|
580
581
|
export { idpUserDeletedTrigger as A, WorkflowOperation as B, RecordUpdatedArgs as C, authAccessTokenRefreshedTrigger as D, authAccessTokenIssuedTrigger as E, resolverExecutedTrigger as F, WorkflowJob as G, WorkflowConfig as H, FunctionOperation as I, WorkflowJobOutput as J, WorkflowJobContext as K, GqlOperation as L, recordCreatedTrigger as M, recordDeletedTrigger as N, authAccessTokenRevokedTrigger as O, recordUpdatedTrigger as P, defineAuth as Q, Operation as R, RecordTrigger as S, ResolverExecutedTrigger as T, createWorkflow as U, Workflow as V, WORKFLOW_TEST_ENV_KEY as W, createResolver as X, createWorkflowJob as Y, AuthInvoker as Z, AuthAccessTokenTrigger as _, defineGenerators as a, RecordCreatedArgs as b, Trigger as c, IncomingWebhookTrigger as d, incomingWebhookTrigger as f, AuthAccessTokenArgs as g, scheduleTrigger as h, defineConfig as i, idpUserUpdatedTrigger as j, idpUserCreatedTrigger as k, IncomingWebhookArgs as l, ScheduleTrigger as m, output as n, defineIdp as o, ScheduleArgs as p, WorkflowJobInput as q, t as r, createExecutor as s, infer as t, IncomingWebhookRequest as u, IdpUserArgs as v, ResolverExecutedArgs as w, RecordDeletedArgs as x, IdpUserTrigger as y, WebhookOperation as z };
|
|
581
|
-
//# sourceMappingURL=index-
|
|
582
|
+
//# sourceMappingURL=index-DnoS_Mi4.d.mts.map
|