@tailor-platform/sdk 1.21.0 → 1.23.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 +61 -0
- package/dist/application-CTQe2HSB.mjs +5723 -0
- package/dist/application-CTQe2HSB.mjs.map +1 -0
- package/dist/application-DdSu3baZ.mjs +8 -0
- package/dist/{brand-BZJCv6UY.mjs → brand-DyPrAzpM.mjs} +1 -1
- package/dist/{brand-BZJCv6UY.mjs.map → brand-DyPrAzpM.mjs.map} +1 -1
- package/dist/cli/index.d.mts +0 -1
- package/dist/cli/index.mjs +544 -57
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +49 -9
- package/dist/cli/lib.mjs +15 -16
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/skills.d.mts +0 -1
- package/dist/configure/index.d.mts +4 -5
- package/dist/configure/index.mjs +15 -4
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{enum-constants-CGVvu3dd.mjs → enum-constants-B5Nl-yzx.mjs} +1 -1
- package/dist/{enum-constants-CGVvu3dd.mjs.map → enum-constants-B5Nl-yzx.mjs.map} +1 -1
- package/dist/{file-utils-GX_tGWl4.mjs → file-utils-sEOwAdJ4.mjs} +1 -1
- package/dist/{file-utils-GX_tGWl4.mjs.map → file-utils-sEOwAdJ4.mjs.map} +1 -1
- package/dist/{index-oZXVKyfX.d.mts → index-BSXclved.d.mts} +2 -3
- package/dist/{index-BWVAwea4.d.mts → index-CO-jsOMb.d.mts} +2 -3
- package/dist/{index-CnHd6BNg.d.mts → index-CU2kZzKa.d.mts} +4 -11
- package/dist/{index-DxlmLUag.d.mts → index-DQlsfhpg.d.mts} +2 -3
- package/dist/{index-Dn61THJK.d.mts → index-lIALNMi_.d.mts} +2 -3
- package/dist/{interceptor-D8MeZOxX.mjs → interceptor-DiARwPfw.mjs} +1 -1
- package/dist/{interceptor-D8MeZOxX.mjs.map → interceptor-DiARwPfw.mjs.map} +1 -1
- package/dist/{job-2Q82qQ6N.mjs → job-CRavYLLk.mjs} +4 -24
- package/dist/job-CRavYLLk.mjs.map +1 -0
- package/dist/kysely/index.d.mts +2 -3
- package/dist/kysely/index.mjs +2 -2
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{kysely-type-Cpq5TNGY.mjs → kysely-type-CSlcwNFH.mjs} +1 -1
- package/dist/{kysely-type-Cpq5TNGY.mjs.map → kysely-type-CSlcwNFH.mjs.map} +1 -1
- package/dist/package-json-BI0ng3_5.mjs +3 -0
- package/dist/{package-json-3H5gfhA4.mjs → package-json-iVBhE5Ef.mjs} +1 -1
- package/dist/{package-json-3H5gfhA4.mjs.map → package-json-iVBhE5Ef.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +2 -3
- package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +2 -3
- package/dist/plugin/builtin/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -3
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +2 -3
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +1 -2
- package/dist/plugin/index.mjs +3 -3
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/{update-9MTRN1UA.mjs → query-BLQBOaAM.mjs} +1199 -198
- package/dist/query-BLQBOaAM.mjs.map +1 -0
- package/dist/{schema-D5Cpd8fQ.mjs → schema-Cjm-OvPF.mjs} +2 -2
- package/dist/schema-Cjm-OvPF.mjs.map +1 -0
- package/dist/{seed-D-rYCN5F.mjs → seed-CXvCW3Xc.mjs} +2 -2
- package/dist/{seed-D-rYCN5F.mjs.map → seed-CXvCW3Xc.mjs.map} +1 -1
- package/dist/telemetry-BAxP8-PR.mjs +3 -0
- package/dist/{telemetry-DuBhnd0X.mjs → telemetry-C46fds1l.mjs} +2 -2
- package/dist/{telemetry-DuBhnd0X.mjs.map → telemetry-C46fds1l.mjs.map} +1 -1
- package/dist/{types-QKq1usl7.d.mts → types--G4ilVmx.d.mts} +8 -9
- package/dist/{types-ClK_HJ0G.mjs → types-CBTSg-LK.mjs} +1 -1
- package/dist/{types-ClK_HJ0G.mjs.map → types-CBTSg-LK.mjs.map} +1 -1
- package/dist/{types-C0o90Cmb.d.mts → types-IR-hw0-y.d.mts} +6 -3
- package/dist/utils/test/index.d.mts +42 -5
- package/dist/utils/test/index.mjs +78 -3
- package/dist/utils/test/index.mjs.map +1 -1
- package/docs/cli/function.md +83 -3
- package/docs/services/auth.md +2 -2
- package/package.json +9 -7
- package/postinstall.mjs +4 -14
- package/dist/application-CEv5c7TU.mjs +0 -102207
- package/dist/application-CEv5c7TU.mjs.map +0 -1
- package/dist/application-DiCzM9b0.mjs +0 -9
- package/dist/chunk-CqAI0b6X.mjs +0 -47
- package/dist/jiti-DfS9jItj.mjs +0 -4482
- package/dist/jiti-DfS9jItj.mjs.map +0 -1
- package/dist/job-2Q82qQ6N.mjs.map +0 -1
- package/dist/package-json-DTDAqRRJ.mjs +0 -3
- package/dist/schema-D5Cpd8fQ.mjs.map +0 -1
- package/dist/src-Bb1UVstT.mjs +0 -1038
- package/dist/src-Bb1UVstT.mjs.map +0 -1
- package/dist/telemetry-Dhzj9Ncm.mjs +0 -3
- package/dist/update-9MTRN1UA.mjs.map +0 -1
- package/dist/user-defined.d.ts +0 -13
package/dist/cli/lib.d.mts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import { n as
|
|
6
|
-
import { n as
|
|
7
|
-
import { n as seedPlugin } from "../index-DxlmLUag.mjs";
|
|
1
|
+
import { At as Resolver, Q as IdProviderConfig, R as IncomingWebhookTrigger, V as ScheduleTriggerInput, d as PluginAttachment, et as OAuth2ClientInput, j as Executor, n as TypeSourceInfoEntry, t as TailorDBType, u as Plugin } from "../types--G4ilVmx.mjs";
|
|
2
|
+
import { t as AppConfig } from "../types-IR-hw0-y.mjs";
|
|
3
|
+
import { n as kyselyTypePlugin } from "../index-BSXclved.mjs";
|
|
4
|
+
import { n as enumConstantsPlugin } from "../index-CO-jsOMb.mjs";
|
|
5
|
+
import { n as fileUtilsPlugin } from "../index-lIALNMi_.mjs";
|
|
6
|
+
import { n as seedPlugin } from "../index-DQlsfhpg.mjs";
|
|
8
7
|
import "politty";
|
|
9
8
|
import { z } from "zod";
|
|
10
9
|
import { OAuth2Client } from "@badgateway/oauth2-client";
|
|
@@ -11345,12 +11344,21 @@ declare type IdPUserAuthPolicy = Message<"tailor.v1.IdPUserAuthPolicy"> & {
|
|
|
11345
11344
|
/**
|
|
11346
11345
|
* disable_password_auth disables password-based authentication for this namespace.
|
|
11347
11346
|
* When enabled, users cannot sign in or reset their password using email/password.
|
|
11348
|
-
* Requires allow_google_oauth to be enabled.
|
|
11347
|
+
* Requires allow_google_oauth or allow_microsoft_oauth to be enabled.
|
|
11349
11348
|
* Cannot be used with allow_self_password_reset.
|
|
11350
11349
|
*
|
|
11351
11350
|
* @generated from field: bool disable_password_auth = 11;
|
|
11352
11351
|
*/
|
|
11353
11352
|
disablePasswordAuth: boolean;
|
|
11353
|
+
|
|
11354
|
+
/**
|
|
11355
|
+
* allow_microsoft_oauth enables "Sign in with Microsoft" for this namespace.
|
|
11356
|
+
* Requires disable_password_auth to be true.
|
|
11357
|
+
* Cannot be enabled when use_non_email_identifier is true.
|
|
11358
|
+
*
|
|
11359
|
+
* @generated from field: bool allow_microsoft_oauth = 12;
|
|
11360
|
+
*/
|
|
11361
|
+
allowMicrosoftOauth: boolean;
|
|
11354
11362
|
};
|
|
11355
11363
|
/**
|
|
11356
11364
|
* IdPLang represents the IETF BCP 47 language subtag.
|
|
@@ -18005,6 +18013,38 @@ interface ApiCallResult {
|
|
|
18005
18013
|
*/
|
|
18006
18014
|
declare function apiCall(options: ApiCallOptions): Promise<ApiCallResult>;
|
|
18007
18015
|
//#endregion
|
|
18016
|
+
//#region src/cli/query/index.d.ts
|
|
18017
|
+
declare const queryOptionsSchema: z.ZodObject<{
|
|
18018
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
18019
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
18020
|
+
configPath: z.ZodOptional<z.ZodString>;
|
|
18021
|
+
engine: z.ZodEnum<{
|
|
18022
|
+
sql: "sql";
|
|
18023
|
+
gql: "gql";
|
|
18024
|
+
}>;
|
|
18025
|
+
machineUser: z.ZodString;
|
|
18026
|
+
query: z.ZodString;
|
|
18027
|
+
}, z.core.$strip>;
|
|
18028
|
+
type QueryOptions = z.input<typeof queryOptionsSchema>;
|
|
18029
|
+
type SQLQueryDispatchResult = {
|
|
18030
|
+
engine: "sql";
|
|
18031
|
+
namespace: string;
|
|
18032
|
+
query: string;
|
|
18033
|
+
result: unknown;
|
|
18034
|
+
};
|
|
18035
|
+
type GQLQueryDispatchResult = {
|
|
18036
|
+
engine: "gql";
|
|
18037
|
+
query: string;
|
|
18038
|
+
result: unknown;
|
|
18039
|
+
};
|
|
18040
|
+
type QueryDispatchResult = SQLQueryDispatchResult | GQLQueryDispatchResult;
|
|
18041
|
+
/**
|
|
18042
|
+
* Dispatch query execution.
|
|
18043
|
+
* @param options - Query command options
|
|
18044
|
+
* @returns Dispatch result
|
|
18045
|
+
*/
|
|
18046
|
+
declare function query(options: QueryOptions): Promise<QueryDispatchResult>;
|
|
18047
|
+
//#endregion
|
|
18008
18048
|
//#region src/cli/commands/tailordb/truncate.d.ts
|
|
18009
18049
|
interface TruncateOptions {
|
|
18010
18050
|
workspaceId?: string;
|
|
@@ -18573,5 +18613,5 @@ declare function waitForExecution(client: OperatorClient, workspaceId: string, e
|
|
|
18573
18613
|
*/
|
|
18574
18614
|
declare function executeScript(options: ScriptExecutionOptions): Promise<ScriptExecutionResult>;
|
|
18575
18615
|
//#endregion
|
|
18576
|
-
export { type AggregateArgs, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, type AppInfo, type ApplicationInfo, type ApplyOptions, type AuthInvoker, type BreakingChangeInfo, type ChunkSeedDataOptions, type CodeGenerator, type CreateWorkspaceOptions, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteWorkspaceOptions, type DependencyKind, type ExecutionWaitResult, type Executor, type ExecutorGenerator, type ExecutorInfo, type ExecutorInput, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type ExecutorListInfo, type FullCodeGenerator, type FullInput, type GenerateOptions, type GeneratorResult, type HealthOptions as GetAppHealthOptions, type GetExecutorJobOptions, type GetExecutorJobTypedOptions, type GetExecutorOptions, type GetExecutorTypedOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowOptions, type GetWorkflowTypedOptions, type GetWorkspaceOptions, INITIAL_SCHEMA_NUMBER, type InviteUserOptions, type ListAppsOptions, type ListExecutorJobsOptions, type ListExecutorJobsTypedOptions, type ListExecutorsOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListUsersOptions, type ListWebhookExecutorsOptions, type ListWorkflowExecutionsOptions, type ListWorkflowExecutionsTypedOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadedConfig, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationBundleResult, type MigrationDiff, type MigrationInfo, type NamespaceWithMigrations, type OAuth2ClientCredentials, type OAuth2ClientInfo, type OperatorClient, type PluginAttachment, type RemoveOptions, type RemoveUserOptions, type Resolver, type ResolverGenerator, type ResolverInput, type RestoreWorkspaceOptions, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ScriptExecutionOptions, type ScriptExecutionResult, type SeedBundleResult, type SeedChunk, type ShowOptions, type SnapshotFieldConfig, type SnapshotType, type StartWorkflowOptions, type StartWorkflowResultWithWait, type StartWorkflowTypedOptions, type TailorDBGenerator, type TailorDBInput, type TailorDBResolverGenerator, type TailorDBType, type TriggerExecutorOptions, type TriggerExecutorResult, type TriggerExecutorTypedOptions, type TruncateOptions, type TypeSourceInfoEntry, type UpdateUserOptions, type UserInfo, type WaitOptions, type WatchExecutorJobOptions, type WatchExecutorJobResult, type WatchExecutorJobTypedOptions, type WebhookExecutorInfo, type WorkflowExecutionInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkspaceDetails, type WorkspaceInfo, apiCall, apply, bundleMigrationScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, enumConstantsPlugin, executeScript, fileUtilsPlugin, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, kyselyTypePlugin, listApps, listExecutorJobs, listExecutors, listMachineUsers, listOAuth2Clients, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, seedPlugin, show, startWorkflow, triggerExecutor, truncate, updateUser, waitForExecution, watchExecutorJob };
|
|
18616
|
+
export { type AggregateArgs, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, type AppInfo, type ApplicationInfo, type ApplyOptions, type AuthInvoker, type BreakingChangeInfo, type ChunkSeedDataOptions, type CodeGenerator, type CreateWorkspaceOptions, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteWorkspaceOptions, type DependencyKind, type ExecutionWaitResult, type Executor, type ExecutorGenerator, type ExecutorInfo, type ExecutorInput, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type ExecutorListInfo, type FullCodeGenerator, type FullInput, type GenerateOptions, type GeneratorResult, type HealthOptions as GetAppHealthOptions, type GetExecutorJobOptions, type GetExecutorJobTypedOptions, type GetExecutorOptions, type GetExecutorTypedOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowOptions, type GetWorkflowTypedOptions, type GetWorkspaceOptions, INITIAL_SCHEMA_NUMBER, type InviteUserOptions, type ListAppsOptions, type ListExecutorJobsOptions, type ListExecutorJobsTypedOptions, type ListExecutorsOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListUsersOptions, type ListWebhookExecutorsOptions, type ListWorkflowExecutionsOptions, type ListWorkflowExecutionsTypedOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadedConfig, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationBundleResult, type MigrationDiff, type MigrationInfo, type NamespaceWithMigrations, type OAuth2ClientCredentials, type OAuth2ClientInfo, type OperatorClient, type PluginAttachment, type RemoveOptions, type RemoveUserOptions, type Resolver, type ResolverGenerator, type ResolverInput, type RestoreWorkspaceOptions, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ScriptExecutionOptions, type ScriptExecutionResult, type SeedBundleResult, type SeedChunk, type ShowOptions, type SnapshotFieldConfig, type SnapshotType, type StartWorkflowOptions, type StartWorkflowResultWithWait, type StartWorkflowTypedOptions, type TailorDBGenerator, type TailorDBInput, type TailorDBResolverGenerator, type TailorDBType, type TriggerExecutorOptions, type TriggerExecutorResult, type TriggerExecutorTypedOptions, type TruncateOptions, type TypeSourceInfoEntry, type UpdateUserOptions, type UserInfo, type WaitOptions, type WatchExecutorJobOptions, type WatchExecutorJobResult, type WatchExecutorJobTypedOptions, type WebhookExecutorInfo, type WorkflowExecutionInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkspaceDetails, type WorkspaceInfo, apiCall, apply, bundleMigrationScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, enumConstantsPlugin, executeScript, fileUtilsPlugin, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, kyselyTypePlugin, listApps, listExecutorJobs, listExecutors, listMachineUsers, listOAuth2Clients, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, query, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, seedPlugin, show, startWorkflow, triggerExecutor, truncate, updateUser, waitForExecution, watchExecutorJob };
|
|
18577
18617
|
//# sourceMappingURL=lib.d.mts.map
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import "../
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import { n as
|
|
10
|
-
import
|
|
11
|
-
import "../telemetry-DuBhnd0X.mjs";
|
|
1
|
+
import "../schema-Cjm-OvPF.mjs";
|
|
2
|
+
import "../brand-DyPrAzpM.mjs";
|
|
3
|
+
import { $ as getExecutorJob, At as getMigrationDirPath, Bt as getNamespacesWithMigrations, C as getAppHealth, Ct as MIGRATE_FILE_NAME, Dt as createSnapshotFromLocalTypes, E as resumeWorkflow, Et as compareSnapshots, G as listMachineUsers, H as getMachineUserToken, Ht as generateUserTypes, I as remove, It as reconstructSnapshotFromMigrations, K as generate, Lt as formatDiffSummary, Mt as getMigrationFiles, Nt as getNextMigrationNumber, O as listWorkflows, P as show, Q as listExecutors, Rt as formatMigrationDiff, St as INITIAL_SCHEMA_NUMBER, Tt as compareLocalTypesWithSnapshot, Ut as apiCall, V as getOAuth2Client, X as triggerExecutor, _t as MIGRATION_LABEL_KEY, b as createWorkspace, bt as DB_TYPES_FILE_NAME, c as listUsers, ct as getWorkflowExecution, f as restoreWorkspace, g as getWorkspace, gt as waitForExecution, ht as executeScript, i as updateUser, it as startWorkflow, j as generate$1, jt as getMigrationFilePath, k as truncate, kt as getLatestMigrationNumber, lt as listWorkflowExecutions, m as listWorkspaces, mt as apply, nt as watchExecutorJob, o as removeUser, ot as getWorkflow, pt as getExecutor, q as listWebhookExecutors, t as query, tt as listExecutorJobs, u as inviteUser, v as deleteWorkspace, wt as SCHEMA_FILE_NAME, x as listApps, xt as DIFF_FILE_NAME, yt as bundleMigrationScript, z as listOAuth2Clients, zt as hasChanges } from "../query-BLQBOaAM.mjs";
|
|
4
|
+
import { S as loadWorkspaceId, a as loadConfig, g as getDistDir, k as initOperatorClient, pt as logger, y as loadAccessToken } from "../application-CTQe2HSB.mjs";
|
|
5
|
+
import "../package-json-iVBhE5Ef.mjs";
|
|
6
|
+
import { n as enumConstantsPlugin } from "../enum-constants-B5Nl-yzx.mjs";
|
|
7
|
+
import { n as fileUtilsPlugin } from "../file-utils-sEOwAdJ4.mjs";
|
|
8
|
+
import { n as kyselyTypePlugin } from "../kysely-type-CSlcwNFH.mjs";
|
|
9
|
+
import { n as seedPlugin } from "../seed-CXvCW3Xc.mjs";
|
|
10
|
+
import "../telemetry-C46fds1l.mjs";
|
|
12
11
|
import { createRequire, register } from "node:module";
|
|
13
|
-
import * as fs
|
|
12
|
+
import * as fs from "node:fs";
|
|
14
13
|
import * as path from "pathe";
|
|
15
14
|
import { resolveTSConfig } from "pkg-types";
|
|
16
15
|
import ml from "multiline-ts";
|
|
@@ -248,11 +247,11 @@ function generateSeedScriptContent(namespace) {
|
|
|
248
247
|
async function bundleSeedScript(namespace, typeNames) {
|
|
249
248
|
checkSeedDependencies();
|
|
250
249
|
const outputDir = path.resolve(getDistDir(), "seed");
|
|
251
|
-
fs
|
|
250
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
252
251
|
const entryPath = path.join(outputDir, `seed_${namespace}.entry.ts`);
|
|
253
252
|
const outputPath = path.join(outputDir, `seed_${namespace}.js`);
|
|
254
253
|
const entryContent = generateSeedScriptContent(namespace);
|
|
255
|
-
fs
|
|
254
|
+
fs.writeFileSync(entryPath, entryContent);
|
|
256
255
|
let tsconfig;
|
|
257
256
|
try {
|
|
258
257
|
tsconfig = await resolveTSConfig();
|
|
@@ -281,7 +280,7 @@ async function bundleSeedScript(namespace, typeNames) {
|
|
|
281
280
|
}));
|
|
282
281
|
return {
|
|
283
282
|
namespace,
|
|
284
|
-
bundledCode: fs
|
|
283
|
+
bundledCode: fs.readFileSync(outputPath, "utf-8"),
|
|
285
284
|
typesIncluded: typeNames
|
|
286
285
|
};
|
|
287
286
|
}
|
|
@@ -291,5 +290,5 @@ async function bundleSeedScript(namespace, typeNames) {
|
|
|
291
290
|
register("tsx", import.meta.url, { data: {} });
|
|
292
291
|
|
|
293
292
|
//#endregion
|
|
294
|
-
export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, SCHEMA_FILE_NAME, apiCall, apply, bundleMigrationScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, enumConstantsPlugin, executeScript, fileUtilsPlugin, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, kyselyTypePlugin, listApps, listExecutorJobs, listExecutors, listMachineUsers, listOAuth2Clients, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, seedPlugin, show, startWorkflow, triggerExecutor, truncate, updateUser, waitForExecution, watchExecutorJob };
|
|
293
|
+
export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATION_LABEL_KEY, SCHEMA_FILE_NAME, apiCall, apply, bundleMigrationScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, createWorkspace, deleteWorkspace, enumConstantsPlugin, executeScript, fileUtilsPlugin, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, kyselyTypePlugin, listApps, listExecutorJobs, listExecutors, listMachineUsers, listOAuth2Clients, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadWorkspaceId, generate$1 as migrateGenerate, query, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, seedPlugin, show, startWorkflow, triggerExecutor, truncate, updateUser, waitForExecution, watchExecutorJob };
|
|
295
294
|
//# sourceMappingURL=lib.mjs.map
|
package/dist/cli/lib.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.mjs","names":["fs"],"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 { 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/shared/dist-dir\";\nimport { logger } from \"@/cli/shared/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 \"./commands/apply/apply\";\nexport type { ApplyOptions } from \"./commands/apply/apply\";\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 \"@/parser/service/tailordb/types\";\nexport type { Resolver } from \"@/parser/service/resolver\";\nexport type { Executor } from \"@/parser/service/executor\";\n\n/** @deprecated Import from '@tailor-platform/sdk/plugin/kysely-type' instead */\nexport { kyselyTypePlugin } from \"@/plugin/builtin/kysely-type\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/enum-constants' instead */\nexport { enumConstantsPlugin } from \"@/plugin/builtin/enum-constants\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/file-utils' instead */\nexport { fileUtilsPlugin } from \"@/plugin/builtin/file-utils\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/seed' instead */\nexport { seedPlugin } from \"@/plugin/builtin/seed\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport {\n getWorkflow,\n type GetWorkflowOptions,\n type GetWorkflowTypedOptions,\n} from \"./commands/workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./commands/workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport {\n triggerExecutor,\n type TriggerExecutorOptions,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n watchExecutorJob,\n type ListExecutorJobsOptions,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport {\n getExecutor,\n type GetExecutorOptions,\n type GetExecutorTypedOptions,\n} from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n DB_TYPES_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type SnapshotType,\n type SnapshotFieldConfig,\n type MigrationInfo,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport { chunkSeedData, type SeedChunk, type ChunkSeedDataOptions } from \"./shared/seed-chunker\";\nexport { bundleSeedScript, type SeedBundleResult } from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-proto/tailor/v1/auth_resource_pb\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqCA,MAAa,2BAA2B,MAAM,OAAO;;AAGrD,MAAM,oBAAoB;;;;;;;;;;;;;;;AAgB1B,SAAgB,cAAc,SAA4C;CACxE,MAAM,EAAE,MAAM,OAAO,cAAc,iBAAiB,6BAA6B;CAEjF,MAAM,YAAY,iBAAiB,eAAe;AAClD,KAAI,aAAa,EACf,OAAM,IAAI,MACR,cAAc,aAAa,0CAA0C,eAAe,uCAErF;CAIH,MAAM,gBAAgB,MAAM,QAAQ,SAAS,KAAK,SAAS,KAAK,MAAM,SAAS,EAAE;AAEjF,KAAI,cAAc,WAAW,EAC3B,QAAO,EAAE;AAKX,KAAI,SADY,KAAK,UAAU;EAAE;EAAM;EAAO,CAAC,CAC1B,IAAI,UACvB,QAAO,CAAC;EAAE;EAAM;EAAO,OAAO;EAAG,OAAO;EAAG,CAAC;CAI9C,MAAM,SAAqC,EAAE;CAC7C,IAAI,cAAwB,EAAE;CAC9B,IAAI,eAAyB,EAAE;AAE/B,MAAK,MAAM,QAAQ,eAAe;EAChC,MAAM,cAAc,KAAK;AAGzB,MAAI,aAAa,SAAS,GAAG;GAC3B,MAAM,WAAW;IAAE,GAAG;KAAc,OAAO;IAAa;GACxD,MAAM,YAAY,CAAC,GAAG,cAAc,KAAK;AACzC,OAAI,SAAS,KAAK,UAAU;IAAE,MAAM;IAAU,OAAO;IAAW,CAAC,CAAC,GAAG,WAAW;AAE9E,WAAO,KAAK;KAAE,MAAM;KAAa,OAAO;KAAc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,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
|
+
{"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 { 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/shared/dist-dir\";\nimport { logger } from \"@/cli/shared/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 \"./commands/apply/apply\";\nexport type { ApplyOptions } from \"./commands/apply/apply\";\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 \"@/parser/service/tailordb/types\";\nexport type { Resolver } from \"@/parser/service/resolver\";\nexport type { Executor } from \"@/parser/service/executor\";\n\n/** @deprecated Import from '@tailor-platform/sdk/plugin/kysely-type' instead */\nexport { kyselyTypePlugin } from \"@/plugin/builtin/kysely-type\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/enum-constants' instead */\nexport { enumConstantsPlugin } from \"@/plugin/builtin/enum-constants\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/file-utils' instead */\nexport { fileUtilsPlugin } from \"@/plugin/builtin/file-utils\";\n/** @deprecated Import from '@tailor-platform/sdk/plugin/seed' instead */\nexport { seedPlugin } from \"@/plugin/builtin/seed\";\n\nexport { show, type ShowOptions, type ApplicationInfo } from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport {\n getWorkflow,\n type GetWorkflowOptions,\n type GetWorkflowTypedOptions,\n} from \"./commands/workflow/get\";\nexport {\n startWorkflow,\n type StartWorkflowOptions,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsOptions,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n} from \"./commands/workflow/executions\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport {\n triggerExecutor,\n type TriggerExecutorOptions,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n watchExecutorJob,\n type ListExecutorJobsOptions,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport {\n getExecutor,\n type GetExecutorOptions,\n type GetExecutorTypedOptions,\n} from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n DB_TYPES_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type SnapshotType,\n type SnapshotFieldConfig,\n type MigrationInfo,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport { chunkSeedData, type SeedChunk, type ChunkSeedDataOptions } from \"./shared/seed-chunker\";\nexport { bundleSeedScript, type SeedBundleResult } from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-proto/tailor/v1/auth_resource_pb\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,MAAa,2BAA2B,MAAM,OAAO;;AAGrD,MAAM,oBAAoB;;;;;;;;;;;;;;;AAgB1B,SAAgB,cAAc,SAA4C;CACxE,MAAM,EAAE,MAAM,OAAO,cAAc,iBAAiB,6BAA6B;CAEjF,MAAM,YAAY,iBAAiB,eAAe;AAClD,KAAI,aAAa,EACf,OAAM,IAAI,MACR,cAAc,aAAa,0CAA0C,eAAe,uCAErF;CAIH,MAAM,gBAAgB,MAAM,QAAQ,SAAS,KAAK,SAAS,KA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/skills.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
|
|
5
|
-
export { AttributeList, AttributeMap, AuthAccessTokenArgs, AuthAccessTokenTrigger, AuthConfig, AuthExternalConfig, AuthInvoker, AuthOwnConfig, AuthServiceInput, BuiltinIdP, DefinedAuth, Env, ExecutorReadyContext, ExecutorServiceConfig, ExecutorServiceInput, FunctionOperation, GeneratorResult, GqlOperation, IDToken, IdPConfig, IdPExternalConfig, IdPGqlOperations, IdPGqlOperationsAliasQuery, IdPGqlOperationsConfig, IdProviderConfig, IdpUserArgs, IdpUserTrigger, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookTrigger, NamespacePluginOutput, OAuth2ClientInput as OAuth2Client, OAuth2ClientGrantType, OIDC, Operation, PermissionCondition, Plugin, PluginAttachment, PluginConfigs, PluginExecutorContext, PluginExecutorContextBase, PluginGeneratedExecutor, PluginGeneratedExecutorWithFile, PluginGeneratedResolver, PluginGeneratedType, PluginNamespaceProcessContext, PluginOutput, PluginProcessContext, QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordTrigger, RecordUpdatedArgs, Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, ResolverExternalConfig, ResolverNamespaceData, ResolverReadyContext, ResolverServiceConfig, ResolverServiceInput, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, ScheduleArgs, ScheduleTrigger, StaticWebsiteConfig, TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBNamespaceData, TailorDBReadyContext, TailorDBType, TailorDBTypeForPlugin, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, TenantProviderConfig, Trigger, TypePluginOutput, UserAttributeKey, UserAttributeListKey, UserAttributeMap, UsernameFieldKey, ValueOperand, WORKFLOW_TEST_ENV_KEY, WORKFLOW_TEST_USER_KEY, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowJobInput, WorkflowJobOutput, WorkflowOperation, WorkflowServiceConfig, WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, definePlugins, defineStaticWebSite, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
|
|
1
|
+
import { $ as OAuth2ClientGrantType, At as Resolver, C as TypePluginOutput, D as ResolverReadyContext, E as ResolverNamespaceData, G as AuthExternalConfig, Ht as AttributeMap, J as AuthServiceInput, N as ExecutorServiceConfig, Nt as ResolverServiceConfig, O as TailorDBNamespaceData, Ot as TailorField, P as ExecutorServiceInput, Pt as ResolverServiceInput, Q as IdProviderConfig, Rt as Env, S as TailorDBTypeForPlugin, T as GeneratorResult, Ut as TailorUser, Vt as AttributeList, W as AuthConfig, Wt as unauthenticatedTailorUser, X as DefinedAuth, Y as BuiltinIdP, Z as IDToken, _ as PluginGeneratedResolver, _t as TailorTypeGqlPermission, a as TailorDBField, at as SCIMAttributeType, b as PluginOutput, bt as unsafeAllowAllTypePermission, c as db, ct as SCIMResource, d as PluginAttachment, dt as UserAttributeListKey, et as OAuth2ClientInput, f as PluginConfigs, ft as UserAttributeMap, g as PluginGeneratedExecutorWithFile, gt as PermissionCondition, h as PluginGeneratedExecutor, i as TailorAnyDBType, it as SCIMAttributeMapping, jt as ResolverExternalConfig, k as TailorDBReadyContext, kt as QueryType, l as NamespacePluginOutput, lt as TenantProviderConfig, m as PluginExecutorContextBase, mt as ValueOperand, nt as SAML, o as TailorDBInstance, ot as SCIMAuthorization, p as PluginExecutorContext, pt as UsernameFieldKey, q as AuthOwnConfig, r as TailorAnyDBField, rt as SCIMAttribute, s as TailorDBType, st as SCIMConfig, tt as OIDC, u as Plugin, ut as UserAttributeKey, v as PluginGeneratedType, vt as TailorTypePermission, w as ExecutorReadyContext, x as PluginProcessContext, y as PluginNamespaceProcessContext, yt as unsafeAllowAllGqlPermission } from "../types--G4ilVmx.mjs";
|
|
2
|
+
import { a as IdPGqlOperationsAliasQuery, c as StaticWebsiteConfig, d as WorkflowServiceInput, i as IdPGqlOperations, l as defineStaticWebSite, n as IdPConfig, o as IdPGqlOperationsConfig, r as IdPExternalConfig, s as defineIdp, u as WorkflowServiceConfig } from "../types-IR-hw0-y.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 definePlugins, 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-CU2kZzKa.mjs";
|
|
4
|
+
export { AttributeList, AttributeMap, AuthAccessTokenArgs, AuthAccessTokenTrigger, AuthConfig, AuthExternalConfig, AuthInvoker, AuthOwnConfig, AuthServiceInput, BuiltinIdP, DefinedAuth, Env, ExecutorReadyContext, ExecutorServiceConfig, ExecutorServiceInput, FunctionOperation, GeneratorResult, GqlOperation, IDToken, IdPConfig, IdPExternalConfig, IdPGqlOperations, IdPGqlOperationsAliasQuery, IdPGqlOperationsConfig, IdProviderConfig, IdpUserArgs, IdpUserTrigger, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookTrigger, NamespacePluginOutput, OAuth2ClientInput as OAuth2Client, OAuth2ClientGrantType, OIDC, Operation, PermissionCondition, Plugin, PluginAttachment, PluginConfigs, PluginExecutorContext, PluginExecutorContextBase, PluginGeneratedExecutor, PluginGeneratedExecutorWithFile, PluginGeneratedResolver, PluginGeneratedType, PluginNamespaceProcessContext, PluginOutput, PluginProcessContext, QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordTrigger, RecordUpdatedArgs, Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, ResolverExternalConfig, ResolverNamespaceData, ResolverReadyContext, ResolverServiceConfig, ResolverServiceInput, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAttributeType, SCIMAuthorization, SCIMConfig, SCIMResource, ScheduleArgs, ScheduleTrigger, StaticWebsiteConfig, TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBNamespaceData, TailorDBReadyContext, TailorDBType, TailorDBTypeForPlugin, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, TenantProviderConfig, Trigger, TypePluginOutput, UserAttributeKey, UserAttributeListKey, UserAttributeMap, UsernameFieldKey, ValueOperand, WORKFLOW_TEST_ENV_KEY, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowJobInput, WorkflowJobOutput, WorkflowOperation, WorkflowServiceConfig, WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, definePlugins, defineStaticWebSite, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
|
package/dist/configure/index.mjs
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
import { i as t$1, n as unsafeAllowAllGqlPermission, r as unsafeAllowAllTypePermission, t as db } from "../schema-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
1
|
+
import { i as t$1, n as unsafeAllowAllGqlPermission, r as unsafeAllowAllTypePermission, t as db } from "../schema-Cjm-OvPF.mjs";
|
|
2
|
+
import { t as brandValue } from "../brand-DyPrAzpM.mjs";
|
|
3
|
+
import { n as createWorkflowJob, t as WORKFLOW_TEST_ENV_KEY } from "../job-CRavYLLk.mjs";
|
|
4
4
|
|
|
5
|
+
//#region src/configure/types/user.ts
|
|
6
|
+
/** Represents an unauthenticated user in the Tailor platform. */
|
|
7
|
+
const unauthenticatedTailorUser = {
|
|
8
|
+
id: "00000000-0000-0000-0000-000000000000",
|
|
9
|
+
type: "",
|
|
10
|
+
workspaceId: "00000000-0000-0000-0000-000000000000",
|
|
11
|
+
attributes: null,
|
|
12
|
+
attributeList: []
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
5
16
|
//#region src/configure/services/auth/index.ts
|
|
6
17
|
function defineAuth(name, config) {
|
|
7
18
|
const result = {
|
|
@@ -351,5 +362,5 @@ function definePlugins(...configs) {
|
|
|
351
362
|
const t = { ...t$1 };
|
|
352
363
|
|
|
353
364
|
//#endregion
|
|
354
|
-
export { WORKFLOW_TEST_ENV_KEY,
|
|
365
|
+
export { WORKFLOW_TEST_ENV_KEY, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, createExecutor, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, definePlugins, defineStaticWebSite, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, recordCreatedTrigger, recordDeletedTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
|
|
355
366
|
//# sourceMappingURL=index.mjs.map
|