@tailor-platform/sdk 2.0.0-next.8 → 2.0.0-next.9
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-CtuzFhg8.mjs +3 -0
- package/dist/{application-GzW98_Xr.mjs → application-D_oSqto2.mjs} +2 -2
- package/dist/{application-GzW98_Xr.mjs.map → application-D_oSqto2.mjs.map} +1 -1
- package/dist/cli/commands/deploy/aigateway.d.mts +1 -1
- package/dist/cli/commands/deploy/application.d.mts +1 -1
- package/dist/cli/commands/deploy/auth.d.mts +1 -1
- package/dist/cli/commands/deploy/executor.d.mts +1 -1
- package/dist/cli/commands/deploy/function-registry.d.mts +1 -1
- package/dist/cli/commands/deploy/idp.d.mts +1 -1
- package/dist/cli/commands/deploy/resolver.d.mts +1 -1
- package/dist/cli/commands/deploy/secret-manager.d.mts +1 -1
- package/dist/cli/commands/deploy/staticwebsite.d.mts +1 -1
- package/dist/cli/commands/deploy/tailordb/index.d.mts +1 -1
- package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +1 -1
- package/dist/cli/commands/deploy/workflow.d.mts +1 -1
- package/dist/cli/index.mjs +22 -13
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +6 -4
- package/dist/cli/lib.mjs +110 -10
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/shared/script-executor.d.mts +6 -3
- package/dist/cli/shared/seed-chunker.d.mts +2 -7
- package/dist/cli/shared/seed-context.d.mts +49 -0
- package/dist/cli/shared/tailordb-namespaces.d.mts +7 -4
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +3 -2
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +19 -0
- package/dist/plugin/builtin/seed/types.d.mts +2 -0
- package/dist/{register-ts-hook-DvEs6YsL.mjs → register-ts-hook-DgnmGTCt.mjs} +32 -23
- package/dist/register-ts-hook-DgnmGTCt.mjs.map +1 -0
- package/dist/seed-LUVr7jHL.mjs +444 -0
- package/dist/seed-LUVr7jHL.mjs.map +1 -0
- package/dist/{service-Dmxa2I4i.mjs → service-CXFce28G.mjs} +1 -2
- package/dist/service-CXFce28G.mjs.map +1 -0
- package/dist/service-DjhjpJpm.mjs +3 -0
- package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +6 -1
- package/dist/types/tailordb.generated.d.mts +0 -2
- package/docs/cli-reference.md +7 -0
- package/docs/configuration.md +1 -1
- package/docs/migration/v2.md +106 -0
- package/package.json +1 -1
- package/dist/application-OM0taSPn.mjs +0 -3
- package/dist/register-ts-hook-DvEs6YsL.mjs.map +0 -1
- package/dist/seed-CRSQJI_z.mjs +0 -1170
- package/dist/seed-CRSQJI_z.mjs.map +0 -1
- package/dist/service-BJAQ70e5.mjs +0 -3
- package/dist/service-Dmxa2I4i.mjs.map +0 -1
|
@@ -2,8 +2,8 @@ import { t as db } from "./schema--xYWRGfe.mjs";
|
|
|
2
2
|
import { $ as CreateAuthIDPConfigRequestSchema, A as CreatePipelineResolverRequestSchema, At as TenantProviderConfig_TenantProviderType, B as IdPPermissionOperator, Bt as CreateAIGatewayRequestSchema, C as UpdateStaticWebsiteRequestSchema, Ct as AuthOAuth2Client_ClientType, D as CreateSecretManagerVaultRequestSchema, Dt as AuthSCIMAttribute_Uniqueness, E as CreateSecretManagerSecretRequestSchema, Et as AuthSCIMAttribute_Type, F as PipelineResolver_OperationType, Ft as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, G as CreateExecutorExecutorRequestSchema, Gt as ConditionSchema, H as FunctionExecution_Status, I as CreateIdPServiceRequestSchema, It as UpdateApplicationRequestSchema, J as ExecutorJobStatus, Jt as PageDirection, K as UpdateExecutorExecutorRequestSchema, Kt as Condition_Operator, L as UpdateIdPServiceRequestSchema, M as UpdatePipelineResolverRequestSchema, N as UpdatePipelineServiceRequestSchema, O as UpdateSecretManagerSecretRequestSchema, Ot as AuthSCIMConfig_AuthorizationType, Pt as CreateApplicationRequestSchema, Q as CreateAuthHookRequestSchema, Rt as ApplicationSchemaUpdateAttemptStatus, S as CreateStaticWebsiteRequestSchema, St as AuthInvokerSchema, Tt as AuthSCIMAttribute_Mutability, V as IdPPermissionPermit, Vt as UpdateAIGatewayRequestSchema, X as ExecutorTriggerType, Y as ExecutorTargetType, Z as CreateAuthConnectionRequestSchema, _ as TailorDBGQLPermission_Permit, a as CreateWorkflowRequestSchema, at as CreateTenantConfigRequestSchema, b as TailorDBType_PermitAction, bt as AuthHookPoint, ct as UpdateAuthHookRequestSchema, d as CreateTailorDBServiceRequestSchema, dt as UpdateAuthOAuth2ClientRequestSchema, et as CreateAuthMachineUserRequestSchema, f as CreateTailorDBTypeRequestSchema, ft as UpdateAuthSCIMConfigRequestSchema, g as TailorDBGQLPermission_Operator, gt as UpdateUserProfileConfigRequestSchema, h as TailorDBGQLPermission_Action, ht as UpdateTenantConfigRequestSchema, i as CreateWorkflowJobFunctionRequestSchema, it as CreateAuthServiceRequestSchema, j as CreatePipelineServiceRequestSchema, jt as UserProfileProviderConfig_UserProfileProviderType, l as WorkflowExecution_Status, lt as UpdateAuthIDPConfigRequestSchema, mt as UpdateAuthServiceRequestSchema, nt as CreateAuthSCIMConfigRequestSchema, o as UpdateWorkflowJobFunctionExecutionPolicyRequestSchema, ot as CreateUserProfileConfigRequestSchema, p as UpdateTailorDBTypeRequestSchema, pt as UpdateAuthSCIMResourceRequestSchema, qt as FilterSchema, r as CreateWorkflowJobFunctionExecutionPolicyRequestSchema, rt as CreateAuthSCIMResourceRequestSchema, s as UpdateWorkflowRequestSchema, st as UpdateAuthConnectionRequestSchema, t as WorkspacePlatformUserRole, tt as CreateAuthOAuth2ClientRequestSchema, u as WorkflowJobExecution_Status, ut as UpdateAuthMachineUserRequestSchema, v as TailorDBType_Permission_Operator, vt as AuthConnection_Status, wt as AuthOAuth2Client_GrantType, x as AddCustomDomainRequestSchema, xt as AuthIDPConfig_AuthType, y as TailorDBType_Permission_Permit, yt as AuthConnection_Type, z as IdPLang, zt as Subgraph_ServiceType } from "./workspace_resource_pb-Db3fv68L.mjs";
|
|
3
3
|
import { t as assertDefined } from "./assert-DBxo8jPo.mjs";
|
|
4
4
|
import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-BwS4ppwO.mjs";
|
|
5
|
-
import { A as fetchAllTolerant, B as initOperatorClient, C as createBundleCache, E as hashFile, F as getConsoleBaseUrl, G as byName, H as normalizeBaseUrl, I as getOAuth2ClientId, K as LOG_LEVELS, L as getOrNull, M as fetchPaged, O as defaultPlatformBaseUrl, P as fetchUserInfo, R as getPlatformBaseUrl, S as hasGenerationHooks, T as hashContent, U as rememberPlatformConfigForToken, V as isDefaultPlatform, W as resolveStaticWebsiteUrls, _ as platformBundleDefinePlugin, f as buildExecutorArgsExpr, g as stringifyFunction, h as assertUniqueTailorDBTypeNamesWithExternal, i as resolverBundleKey, j as fetchMachineUserToken, k as fetchAll, m as assertUniqueLocalTailorDBTypeNames, n as generatePluginFilesIfNeeded, o as getApplicationAuthNamespace, p as buildResolverOperationHookExpr, r as loadApplication, s as WorkflowJobFunctionExecutionPolicySchema, t as defineApplication, u as HTTP_METHODS, w as getDistDir, x as getPluginGenerationDependencies, z as initOAuth2Client } from "./application-
|
|
6
|
-
import { c as stripTailorDBTypeBuilderHelpers, g as functionSchema, h as loadFilesWithIgnores, t as createExecutorService, u as TailorDBTypeSchema } from "./service-
|
|
5
|
+
import { A as fetchAllTolerant, B as initOperatorClient, C as createBundleCache, E as hashFile, F as getConsoleBaseUrl, G as byName, H as normalizeBaseUrl, I as getOAuth2ClientId, K as LOG_LEVELS, L as getOrNull, M as fetchPaged, O as defaultPlatformBaseUrl, P as fetchUserInfo, R as getPlatformBaseUrl, S as hasGenerationHooks, T as hashContent, U as rememberPlatformConfigForToken, V as isDefaultPlatform, W as resolveStaticWebsiteUrls, _ as platformBundleDefinePlugin, f as buildExecutorArgsExpr, g as stringifyFunction, h as assertUniqueTailorDBTypeNamesWithExternal, i as resolverBundleKey, j as fetchMachineUserToken, k as fetchAll, m as assertUniqueLocalTailorDBTypeNames, n as generatePluginFilesIfNeeded, o as getApplicationAuthNamespace, p as buildResolverOperationHookExpr, r as loadApplication, s as WorkflowJobFunctionExecutionPolicySchema, t as defineApplication, u as HTTP_METHODS, w as getDistDir, x as getPluginGenerationDependencies, z as initOAuth2Client } from "./application-D_oSqto2.mjs";
|
|
6
|
+
import { c as stripTailorDBTypeBuilderHelpers, g as functionSchema, h as loadFilesWithIgnores, t as createExecutorService, u as TailorDBTypeSchema } from "./service-CXFce28G.mjs";
|
|
7
7
|
import { t as multiline } from "./multiline-sfHpTZZK.mjs";
|
|
8
8
|
import { t as readPackageJson } from "./package-json-8b0O9TlX.mjs";
|
|
9
9
|
import { t as userAgent } from "./user-agent-Bgsszb5I.mjs";
|
|
@@ -16533,6 +16533,32 @@ const listCommand$7 = defineAppCommand({
|
|
|
16533
16533
|
}
|
|
16534
16534
|
});
|
|
16535
16535
|
|
|
16536
|
+
//#endregion
|
|
16537
|
+
//#region src/cli/shared/auth-input.ts
|
|
16538
|
+
/**
|
|
16539
|
+
* Build the auth input passed to generator plugins from an application's
|
|
16540
|
+
* auth service.
|
|
16541
|
+
* @param application - Application instance to read the auth service from
|
|
16542
|
+
* @returns Auth input for generator plugins, or undefined when the config has no auth
|
|
16543
|
+
*/
|
|
16544
|
+
function getAuthInput(application) {
|
|
16545
|
+
const authService = application.authService;
|
|
16546
|
+
if (!authService) return void 0;
|
|
16547
|
+
const authConfig = authService.config;
|
|
16548
|
+
const userProfile = authService.userProfile;
|
|
16549
|
+
return {
|
|
16550
|
+
name: authConfig.name,
|
|
16551
|
+
userProfile: userProfile ? {
|
|
16552
|
+
typeName: userProfile.type.name,
|
|
16553
|
+
namespace: userProfile.namespace,
|
|
16554
|
+
usernameField: userProfile.usernameField
|
|
16555
|
+
} : void 0,
|
|
16556
|
+
machineUsers: authConfig.machineUsers,
|
|
16557
|
+
oauth2Clients: authConfig.oauth2Clients,
|
|
16558
|
+
idProvider: authConfig.idProvider
|
|
16559
|
+
};
|
|
16560
|
+
}
|
|
16561
|
+
|
|
16536
16562
|
//#endregion
|
|
16537
16563
|
//#region src/cli/commands/generate/service.ts
|
|
16538
16564
|
/**
|
|
@@ -16553,23 +16579,6 @@ function createGenerationManager(params) {
|
|
|
16553
16579
|
executor: {}
|
|
16554
16580
|
};
|
|
16555
16581
|
const generationPlugins = pluginManager?.getPluginsWithGenerationHooks() ?? [];
|
|
16556
|
-
function getAuthInput() {
|
|
16557
|
-
const authService = application.authService;
|
|
16558
|
-
if (!authService) return void 0;
|
|
16559
|
-
const authConfig = authService.config;
|
|
16560
|
-
const userProfile = authService.userProfile;
|
|
16561
|
-
return {
|
|
16562
|
-
name: authConfig.name,
|
|
16563
|
-
userProfile: userProfile ? {
|
|
16564
|
-
typeName: userProfile.type.name,
|
|
16565
|
-
namespace: userProfile.namespace,
|
|
16566
|
-
usernameField: userProfile.usernameField
|
|
16567
|
-
} : void 0,
|
|
16568
|
-
machineUsers: authConfig.machineUsers,
|
|
16569
|
-
oauth2Clients: authConfig.oauth2Clients,
|
|
16570
|
-
idProvider: authConfig.idProvider
|
|
16571
|
-
};
|
|
16572
|
-
}
|
|
16573
16582
|
/**
|
|
16574
16583
|
* Build TailorDB namespace data array from loaded services.
|
|
16575
16584
|
* @returns Array of TailorDB namespace data
|
|
@@ -16601,7 +16610,7 @@ function createGenerationManager(params) {
|
|
|
16601
16610
|
async function runPluginPhaseHook(plugin, hookName) {
|
|
16602
16611
|
if (!plugin[hookName]) return;
|
|
16603
16612
|
const pluginBaseDir = path.join(baseDir, plugin.id);
|
|
16604
|
-
const auth = getAuthInput();
|
|
16613
|
+
const auth = getAuthInput(application);
|
|
16605
16614
|
const tailordb = buildTailorDBData();
|
|
16606
16615
|
let result;
|
|
16607
16616
|
switch (hookName) {
|
|
@@ -18649,7 +18658,7 @@ async function generate(options) {
|
|
|
18649
18658
|
if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
|
|
18650
18659
|
let pluginManager;
|
|
18651
18660
|
if (plugins.length > 0) pluginManager = new PluginManager(plugins);
|
|
18652
|
-
const { defineApplication } = await import("./application-
|
|
18661
|
+
const { defineApplication } = await import("./application-CtuzFhg8.mjs");
|
|
18653
18662
|
const application = defineApplication({
|
|
18654
18663
|
config,
|
|
18655
18664
|
pluginManager
|
|
@@ -20744,5 +20753,5 @@ async function registerTsHook(tsHookUrl) {
|
|
|
20744
20753
|
}
|
|
20745
20754
|
|
|
20746
20755
|
//#endregion
|
|
20747
|
-
export { updateFolder as $,
|
|
20748
|
-
//# sourceMappingURL=register-ts-hook-
|
|
20756
|
+
export { updateFolder as $, resolveUserTokenKey as $n, waitForExecution as $t, generate as A, resourceTrn as An, jobsCommand as At, extractOwnedNamespaces as B, hasAnyUserTokenEntry as Bn, functionExecutionStatusToString as Bt, waitWorkflowExecution as C, reconstructSnapshotFromMigrations as Cn, webhookCommand as Ct, listWorkflows as D, formatMigrationDiff as Dn, listExecutors as Dt, listCommand$2 as E, formatDiffSummary as En, listCommand$8 as Et, openInConfiguredEditor as F, apiCall as Fn, getCommand$5 as Ft, updateOrganization as G, loadMachineUserName as Gn, listCommand$9 as Gt, remove as H, loadAccessToken as Hn, getExecutor as Ht, deployCommand as I, assertWritable as In, getWorkflow as It, listCommand$3 as J, loadWorkspaceId as Jn, createWorkspace$1 as Jt, organizationTree as K, loadPlatformClientConfig as Kn, listWorkspaces as Kt, deployStaticWebsite as L, loadConfig as Ln, executionsCommand as Lt, generateMigrationScript as M, PluginManager as Mn, watchExecutorJob as Mt, writeDbTypesFile as N, generateUserTypes as Nn, startCommand as Nt, truncate as O, hasChanges as On, getExecutorJob as Ot, getConfiguredEditorCommand as P, prompt as Pn, startWorkflow as Pt, updateCommand$2 as Q, resolveConfigUser as Qn, executeScript as Qt, show as R, deleteUserTokens as Rn, getWorkflowExecution as Rt, waitCommand as S, loadDiff as Sn, listWebhookExecutors as St, resumeWorkflow as T, parseMigrationNumberArg as Tn, triggerExecutor as Tt, removeCommand$1 as U, loadConfigPath as Un, deploy as Ut, logBetaWarning as V, hasUserTokenEntry as Vn, getCommand$6 as Vt, updateCommand$1 as W, loadConsoleBaseUrl as Wn, deployFromCLI as Wt, getCommand$1 as X, readPlatformConfig as Xn, workspaceNameSchema as Xt, listOrganizations as Y, platformConfigFromProfile as Yn, formatKeyValueTable as Yt, getOrganization as Z, removeLegacyUserAlias as Zn, ensureConfigId as Zt, deleteWorkspace as _, getMigrationDirPath as _n, getAuthInput as _t, updateUser as a, generateAllTypeManifestsFromSnapshot as an, confirmationArgs as ar, deleteFolder as at, getAppHealth as b, getNextMigrationNumber as bn, getCommand$4 as bt, listCommand as c, DIFF_FILE_NAME as cn, multiConfigArg as cr, listCommand$5 as ct, inviteUser as d, SCHEMA_FILE_NAME as dn, resolveMachineUserInputSource as dr, getOAuth2Client as dt, bundleMigrationScript as en, saveUserTokens as er, listCommand$4 as et, restoreCommand as f, assertValidMigrationFiles as fn, toPageDirection as fr, getMachineUserToken as ft, deleteCommand as g, getLatestMigrationNumber as gn, generate$1 as gt, getWorkspace as h, createSnapshotFromLocalTypes as hn, listMachineUsers as ht, updateCommand as i, compareSnapshotWithRemote as in, configArg as ir, deleteCommand$1 as it, generateCommand as j, sdkNameLabelKey as jn, listExecutorJobs as jt, truncateCommand as k, getNamespacesWithMigrations as kn, getExecutorWaitFailureMessage as kt, listUsers as l, INITIAL_SCHEMA_NUMBER as ln, pagedLogArgs as lr, listOAuth2Clients as lt, getCommand as m, compareSnapshots as mn, listCommand$6 as mt, query as n, handleOptionalToRequiredError as nn, defineAppCommand as nr, getCommand$2 as nt, removeCommand as o, protoGqlPermission as on, deploymentArgs as or, createCommand as ot, restoreWorkspace as p, compareLocalTypesWithSnapshot as pn, workspaceArgs as pr, tokenCommand as pt, treeCommand as q, loadStoredUserTokens as qn, createCommand$1 as qt, queryCommand as r, parseMigrationLabelNumber as rn, commonArgs as rr, getFolder as rt, removeUser as s, DB_TYPES_FILE_NAME as sn, isVerbose as sr, createFolder as st, registerTsHook as t, MIGRATION_LABEL_KEY as tn, writePlatformConfig as tr, listFolders as tt, inviteCommand as u, MIGRATE_FILE_NAME as un, paginationArgs as ur, getCommand$3 as ut, listApps as v, getMigrationFilePath as vn, listCommand$7 as vt, resumeCommand as w, formatMigrationNumber as wn, triggerCommand as wt, healthCommand as x, isValidMigrationNumber as xn, getFunctionRegistry as xt, listCommand$1 as y, getMigrationFiles as yn, listFunctionRegistries as yt, showCommand as z, fetchLatestToken as zn, listWorkflowExecutions as zt };
|
|
20757
|
+
//# sourceMappingURL=register-ts-hook-DgnmGTCt.mjs.map
|