@tailor-platform/sdk 1.40.1 → 1.43.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 +44 -0
- package/README.md +23 -0
- package/dist/{actor-B2oEmlTc.d.mts → actor-DzCuoMlP.d.mts} +2 -2
- package/dist/{application-EvhIIVg0.mjs → application-DQpD_kHR.mjs} +87 -8
- package/dist/application-DQpD_kHR.mjs.map +1 -0
- package/dist/application-DUcmoFdc.mjs +4 -0
- package/dist/brand-Ll48SMXe.mjs.map +1 -1
- package/dist/cli/index.mjs +31 -26
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +49 -7
- package/dist/cli/lib.mjs +3 -3
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +83 -3
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-Chvw1Eod.d.mts → index-0Dk-fDWi.d.mts} +2 -2
- package/dist/{index-CiNNNpuH.d.mts → index-BEEL1-6Z.d.mts} +2 -2
- package/dist/{index-D_ezppY7.d.mts → index-Br4XCvX1.d.mts} +103 -86
- package/dist/{index-BtXZdz-F.d.mts → index-DdsUV-aA.d.mts} +2 -2
- package/dist/{index-reFAYSX7.d.mts → index-ZZYEd_0R.d.mts} +2 -2
- package/dist/{job-p6zf8Qpg.mjs → job-BOvKyNdT.mjs} +15 -9
- package/dist/job-BOvKyNdT.mjs.map +1 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/{runtime-B9R1TzLD.mjs → runtime-Bn68JXnL.mjs} +195 -77
- package/dist/runtime-Bn68JXnL.mjs.map +1 -0
- package/dist/{tailor-db-field-CoFKRCYW.d.mts → tailor-db-field-D_z185oq.d.mts} +36 -6
- package/dist/utils/test/index.d.mts +36 -3
- package/dist/utils/test/index.mjs +78 -9
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/{workflow.generated-Btz6srLR.d.mts → workflow.generated-CDCnZNkH.d.mts} +2 -2
- package/docs/cli/function.md +83 -1
- package/docs/cli-reference.md +3 -1
- package/docs/services/executor.md +4 -0
- package/docs/services/idp.md +16 -0
- package/docs/services/resolver.md +4 -2
- package/docs/services/workflow.md +117 -3
- package/docs/testing.md +95 -7
- package/package.json +17 -17
- package/dist/application-CE2s_a6w.mjs +0 -4
- package/dist/application-EvhIIVg0.mjs.map +0 -1
- package/dist/job-p6zf8Qpg.mjs.map +0 -1
- package/dist/runtime-B9R1TzLD.mjs.map +0 -1
|
@@ -3,7 +3,7 @@ import { $ as ApplicationSchemaUpdateAttemptStatus, A as FunctionExecution_Statu
|
|
|
3
3
|
import { t as db } from "./schema-CEcfEyPN.mjs";
|
|
4
4
|
import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-DTNAMYGy.mjs";
|
|
5
5
|
import { t as readPackageJson } from "./package-json-CWp8s9dE.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { C as loadWorkspaceId, D as writePlatformConfig, S as loadAccessToken, _ as getDistDir, d as buildResolverOperationHookExpr, f as OAuth2ClientSchema, g as createBundleCache, h as loadFilesWithIgnores, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as createExecutorService, t as defineApplication, u as buildExecutorArgsExpr, v as hashFile, w as readPlatformConfig, y as loadConfig } from "./application-DQpD_kHR.mjs";
|
|
7
7
|
import { r as withSpan } from "./telemetry-BuDto_2q.mjs";
|
|
8
8
|
import { n as isCLIError, t as createCLIError } from "./errors-ChWX5ZG8.mjs";
|
|
9
9
|
import { arg, createDefineCommand, defineCommand, runCommand } from "politty";
|
|
@@ -2351,9 +2351,9 @@ async function applyIdP(client, result, phase = "create-update") {
|
|
|
2351
2351
|
* @returns Planned changes and metadata
|
|
2352
2352
|
*/
|
|
2353
2353
|
async function planIdP(context) {
|
|
2354
|
-
const { client, workspaceId, application, forRemoval, forceApplyAll = false } = context;
|
|
2354
|
+
const { client, workspaceId, application, forRemoval, forceApplyAll = false, hasIdpUserTrigger = false } = context;
|
|
2355
2355
|
const idps = forRemoval ? [] : application.idpServices;
|
|
2356
|
-
const { changeSet: serviceChangeSet, conflicts, unmanaged, resourceOwners } = await planServices$3(client, workspaceId, application.name, idps);
|
|
2356
|
+
const { changeSet: serviceChangeSet, conflicts, unmanaged, resourceOwners } = await planServices$3(client, workspaceId, application.name, idps, hasIdpUserTrigger);
|
|
2357
2357
|
return {
|
|
2358
2358
|
changeSet: {
|
|
2359
2359
|
service: serviceChangeSet,
|
|
@@ -2440,7 +2440,7 @@ function areIdPServicesEqual(existing, desired) {
|
|
|
2440
2440
|
permission: normalizeComparablePermission(existing.permission)
|
|
2441
2441
|
}), desired);
|
|
2442
2442
|
}
|
|
2443
|
-
async function planServices$3(client, workspaceId, appName, idps) {
|
|
2443
|
+
async function planServices$3(client, workspaceId, appName, idps, hasIdpUserTrigger) {
|
|
2444
2444
|
const changeSet = createChangeSet("IdP services");
|
|
2445
2445
|
const conflicts = [];
|
|
2446
2446
|
const unmanaged = [];
|
|
@@ -2489,7 +2489,9 @@ async function planServices$3(client, workspaceId, appName, idps) {
|
|
|
2489
2489
|
}
|
|
2490
2490
|
const lang = convertLang(idp.lang);
|
|
2491
2491
|
const userAuthPolicy = idp.userAuthPolicy;
|
|
2492
|
-
const publishUserEvents = idp.publishUserEvents ??
|
|
2492
|
+
const publishUserEvents = idp.publishUserEvents ?? hasIdpUserTrigger;
|
|
2493
|
+
if (hasIdpUserTrigger && idp.publishUserEvents === void 0) logger.info(`IdP service "${namespaceName}": automatically enabled "publishUserEvents" because executors with idpUser triggers are defined. Set "publishUserEvents" explicitly to silence this message.`);
|
|
2494
|
+
else if (hasIdpUserTrigger && idp.publishUserEvents === false) logger.warn(`IdP service "${namespaceName}" has "publishUserEvents: false", but executors with idpUser triggers are defined. Those executors will not fire for this IdP. Set "publishUserEvents: true" to enable them.`);
|
|
2493
2495
|
const emailConfig = idp.emailConfig;
|
|
2494
2496
|
if (!idp.permission) logger.warn(`IdP service "${namespaceName}" has no permission configured.`);
|
|
2495
2497
|
const parsedPermission = parseIdPPermission(idp.permission);
|
|
@@ -3959,64 +3961,6 @@ async function confirmImportantResourceDeletion(resources, yes) {
|
|
|
3959
3961
|
`);
|
|
3960
3962
|
}
|
|
3961
3963
|
|
|
3962
|
-
//#endregion
|
|
3963
|
-
//#region src/cli/shared/runtime-args.ts
|
|
3964
|
-
/**
|
|
3965
|
-
* Runtime args transformation for all services.
|
|
3966
|
-
*
|
|
3967
|
-
* Each service transforms server-side args/context into SDK-friendly format:
|
|
3968
|
-
* - Executor: server-side expression evaluated by platform before calling function
|
|
3969
|
-
* - Resolver: operationHook expression evaluated by platform before calling function
|
|
3970
|
-
*
|
|
3971
|
-
* The user field mapping (server → SDK) shared across services is defined in
|
|
3972
|
-
* `@/parser/service/tailordb` as `tailorUserMap`.
|
|
3973
|
-
*/
|
|
3974
|
-
/**
|
|
3975
|
-
* Actor field transformation expression.
|
|
3976
|
-
*
|
|
3977
|
-
* Transforms the server's actor object to match the SDK's TailorActor type:
|
|
3978
|
-
* server `attributeMap` → SDK `attributes`
|
|
3979
|
-
* server `attributes` → SDK `attributeList`
|
|
3980
|
-
* other fields → passed through
|
|
3981
|
-
* null/undefined actor → null
|
|
3982
|
-
*/
|
|
3983
|
-
const ACTOR_TRANSFORM_EXPR = "actor: args.actor ? (({ attributeMap, attributes: attrList, ...rest }) => ({ ...rest, attributes: attributeMap, attributeList: attrList }))(args.actor) : null";
|
|
3984
|
-
/**
|
|
3985
|
-
* Build the JavaScript expression that transforms server-format executor event
|
|
3986
|
-
* args into SDK-format args at runtime.
|
|
3987
|
-
*
|
|
3988
|
-
* The Tailor Platform server delivers event args with server-side field names.
|
|
3989
|
-
* The SDK exposes different field names to user code. This function produces a
|
|
3990
|
-
* JavaScript expression string that performs the mapping when evaluated
|
|
3991
|
-
* server-side.
|
|
3992
|
-
* @param triggerKind - The trigger kind discriminant from the parsed executor
|
|
3993
|
-
* @param env - Application env record to embed in the expression
|
|
3994
|
-
* @returns A JavaScript expression string, e.g. `({ ...args, ... })`
|
|
3995
|
-
*/
|
|
3996
|
-
function buildExecutorArgsExpr(triggerKind, env) {
|
|
3997
|
-
const envExpr = `env: ${JSON.stringify(env)}`;
|
|
3998
|
-
switch (triggerKind) {
|
|
3999
|
-
case "schedule": return `({ ...args, appNamespace: args.namespaceName, ${ACTOR_TRANSFORM_EXPR}, ${envExpr} })`;
|
|
4000
|
-
case "resolverExecuted": return `({ ...args, appNamespace: args.namespaceName, ${ACTOR_TRANSFORM_EXPR}, success: !!args.succeeded, result: args.succeeded?.result.resolver, error: args.failed?.error, ${envExpr} })`;
|
|
4001
|
-
case "incomingWebhook": return `({ ...args, appNamespace: args.namespaceName, rawBody: args.raw_body, ${envExpr} })`;
|
|
4002
|
-
default: return `({ ...args, event: args.eventType?.split(".").pop(), rawEvent: args.eventType, appNamespace: args.namespaceName, ${ACTOR_TRANSFORM_EXPR}, ${envExpr} })`;
|
|
4003
|
-
}
|
|
4004
|
-
}
|
|
4005
|
-
/**
|
|
4006
|
-
* Build the operationHook expression for resolver pipelines.
|
|
4007
|
-
*
|
|
4008
|
-
* Transforms server context to SDK resolver context:
|
|
4009
|
-
* context.args → input
|
|
4010
|
-
* context.pipeline → spread into result
|
|
4011
|
-
* user (global var) → TailorUser (via tailorUserMap: workspace_id→workspaceId, attribute_map→attributes, attributes→attributeList)
|
|
4012
|
-
* env → injected as JSON
|
|
4013
|
-
* @param env - Application env record to embed in the expression
|
|
4014
|
-
* @returns A JavaScript expression string for the operationHook
|
|
4015
|
-
*/
|
|
4016
|
-
function buildResolverOperationHookExpr(env) {
|
|
4017
|
-
return `({ ...context.pipeline, input: context.args, user: ${tailorUserMap}, env: ${JSON.stringify(env)} });`;
|
|
4018
|
-
}
|
|
4019
|
-
|
|
4020
3964
|
//#endregion
|
|
4021
3965
|
//#region src/cli/commands/apply/auth-invoker.ts
|
|
4022
3966
|
/**
|
|
@@ -8514,6 +8458,7 @@ async function apply(options) {
|
|
|
8514
8458
|
const yes = options?.yes ?? false;
|
|
8515
8459
|
const forceApplyAll = await withSpan("plan.detectSdkVersionChange", () => shouldForceApplyAll(client, workspaceId, application, functionEntries));
|
|
8516
8460
|
const { functionRegistry, tailorDB, staticWebsite, idp, auth, pipeline, app, executor, workflow, secretManager } = await withSpan("plan", async () => {
|
|
8461
|
+
const hasIdpUserTrigger = Object.values(application.executorService?.executors ?? {}).some((executor) => executor.trigger.kind === "idpUser");
|
|
8517
8462
|
const ctx = {
|
|
8518
8463
|
client,
|
|
8519
8464
|
workspaceId,
|
|
@@ -8521,7 +8466,8 @@ async function apply(options) {
|
|
|
8521
8466
|
forRemoval: false,
|
|
8522
8467
|
config,
|
|
8523
8468
|
noSchemaCheck: options?.noSchemaCheck,
|
|
8524
|
-
forceApplyAll
|
|
8469
|
+
forceApplyAll,
|
|
8470
|
+
hasIdpUserTrigger
|
|
8525
8471
|
};
|
|
8526
8472
|
const functionRegistry = await withSpan("plan.functionRegistry", () => planFunctionRegistry(client, workspaceId, application.name, functionEntries));
|
|
8527
8473
|
const unchangedWorkflowJobs = new Set(functionRegistry.changeSet.unchanged.filter((entry) => entry.name.startsWith(WORKFLOW_PREFIX)).map((entry) => entry.name.slice(WORKFLOW_PREFIX.length)));
|
|
@@ -8967,7 +8913,7 @@ async function getExecutor(options) {
|
|
|
8967
8913
|
throw error;
|
|
8968
8914
|
}
|
|
8969
8915
|
}
|
|
8970
|
-
const getCommand$
|
|
8916
|
+
const getCommand$6 = defineAppCommand({
|
|
8971
8917
|
name: "get",
|
|
8972
8918
|
description: "Get executor details",
|
|
8973
8919
|
args: z.object({
|
|
@@ -9447,7 +9393,7 @@ async function getWorkflow(options) {
|
|
|
9447
9393
|
throw error;
|
|
9448
9394
|
}
|
|
9449
9395
|
}
|
|
9450
|
-
const getCommand$
|
|
9396
|
+
const getCommand$5 = defineAppCommand({
|
|
9451
9397
|
name: "get",
|
|
9452
9398
|
description: "Get workflow details.",
|
|
9453
9399
|
args: z.object({
|
|
@@ -10076,7 +10022,7 @@ async function listExecutors(options) {
|
|
|
10076
10022
|
return [executors, nextPageToken];
|
|
10077
10023
|
}, { limit: options?.limit })).map((e) => toExecutorListInfo(e));
|
|
10078
10024
|
}
|
|
10079
|
-
const listCommand$
|
|
10025
|
+
const listCommand$9 = defineAppCommand({
|
|
10080
10026
|
name: "list",
|
|
10081
10027
|
description: "List all executors",
|
|
10082
10028
|
args: z.object({
|
|
@@ -10367,6 +10313,157 @@ const webhookCommand = defineCommand({
|
|
|
10367
10313
|
}
|
|
10368
10314
|
});
|
|
10369
10315
|
|
|
10316
|
+
//#endregion
|
|
10317
|
+
//#region src/cli/commands/function/transform.ts
|
|
10318
|
+
const functionRegistryInfo = (fn) => {
|
|
10319
|
+
return {
|
|
10320
|
+
name: fn.name,
|
|
10321
|
+
description: fn.description,
|
|
10322
|
+
sizeBytes: fn.sizeBytes.toString(),
|
|
10323
|
+
contentHash: fn.contentHash,
|
|
10324
|
+
createdAt: formatTimestamp(fn.createdAt),
|
|
10325
|
+
updatedAt: formatTimestamp(fn.updatedAt)
|
|
10326
|
+
};
|
|
10327
|
+
};
|
|
10328
|
+
|
|
10329
|
+
//#endregion
|
|
10330
|
+
//#region src/cli/commands/function/get.ts
|
|
10331
|
+
const getFunctionRegistryOptionsSchema = z.object({
|
|
10332
|
+
workspaceId: z.uuid({ message: "workspace-id must be a valid UUID" }).optional(),
|
|
10333
|
+
profile: z.string().optional(),
|
|
10334
|
+
name: z.string().min(1, { message: "name is required" })
|
|
10335
|
+
});
|
|
10336
|
+
async function loadOptions$12(options) {
|
|
10337
|
+
const result = getFunctionRegistryOptionsSchema.safeParse(options);
|
|
10338
|
+
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
10339
|
+
return {
|
|
10340
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
10341
|
+
useProfile: true,
|
|
10342
|
+
profile: result.data.profile
|
|
10343
|
+
})),
|
|
10344
|
+
workspaceId: await loadWorkspaceId({
|
|
10345
|
+
workspaceId: result.data.workspaceId,
|
|
10346
|
+
profile: result.data.profile
|
|
10347
|
+
}),
|
|
10348
|
+
name: result.data.name
|
|
10349
|
+
};
|
|
10350
|
+
}
|
|
10351
|
+
/**
|
|
10352
|
+
* Get a function registry by name.
|
|
10353
|
+
* @param options - Function registry get options
|
|
10354
|
+
* @returns Function registry info
|
|
10355
|
+
*/
|
|
10356
|
+
async function getFunctionRegistry(options) {
|
|
10357
|
+
const { client, workspaceId, name } = await loadOptions$12(options);
|
|
10358
|
+
const notFoundErrorMessage = `Function registry "${name}" not found.`;
|
|
10359
|
+
try {
|
|
10360
|
+
const response = await client.getFunctionRegistry({
|
|
10361
|
+
workspaceId,
|
|
10362
|
+
name
|
|
10363
|
+
});
|
|
10364
|
+
if (!response.function) throw new Error(notFoundErrorMessage);
|
|
10365
|
+
return functionRegistryInfo(response.function);
|
|
10366
|
+
} catch (error) {
|
|
10367
|
+
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(notFoundErrorMessage, { cause: error });
|
|
10368
|
+
throw error;
|
|
10369
|
+
}
|
|
10370
|
+
}
|
|
10371
|
+
const getCommand$4 = defineAppCommand({
|
|
10372
|
+
name: "get",
|
|
10373
|
+
description: "Get a function registry by name",
|
|
10374
|
+
args: z.object({
|
|
10375
|
+
...workspaceArgs,
|
|
10376
|
+
name: arg(z.string(), {
|
|
10377
|
+
description: "Function name",
|
|
10378
|
+
alias: "n"
|
|
10379
|
+
})
|
|
10380
|
+
}).strict(),
|
|
10381
|
+
run: async (args) => {
|
|
10382
|
+
const fn = await getFunctionRegistry({
|
|
10383
|
+
workspaceId: args["workspace-id"],
|
|
10384
|
+
profile: args.profile,
|
|
10385
|
+
name: args.name
|
|
10386
|
+
});
|
|
10387
|
+
const formatted = args.json ? fn : {
|
|
10388
|
+
...fn,
|
|
10389
|
+
createdAt: humanizeRelativeTime(fn.createdAt),
|
|
10390
|
+
updatedAt: humanizeRelativeTime(fn.updatedAt)
|
|
10391
|
+
};
|
|
10392
|
+
logger.out(formatted);
|
|
10393
|
+
}
|
|
10394
|
+
});
|
|
10395
|
+
|
|
10396
|
+
//#endregion
|
|
10397
|
+
//#region src/cli/commands/function/list.ts
|
|
10398
|
+
const listFunctionRegistriesOptionsSchema = z.object({
|
|
10399
|
+
workspaceId: z.uuid({ message: "workspace-id must be a valid UUID" }).optional(),
|
|
10400
|
+
profile: z.string().optional(),
|
|
10401
|
+
order: z.enum(["asc", "desc"]).optional(),
|
|
10402
|
+
limit: z.coerce.number().int().nonnegative().optional()
|
|
10403
|
+
});
|
|
10404
|
+
async function loadOptions$11(options) {
|
|
10405
|
+
const result = listFunctionRegistriesOptionsSchema.safeParse(options);
|
|
10406
|
+
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
10407
|
+
return {
|
|
10408
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
10409
|
+
useProfile: true,
|
|
10410
|
+
profile: result.data.profile
|
|
10411
|
+
})),
|
|
10412
|
+
workspaceId: await loadWorkspaceId({
|
|
10413
|
+
workspaceId: result.data.workspaceId,
|
|
10414
|
+
profile: result.data.profile
|
|
10415
|
+
}),
|
|
10416
|
+
order: result.data.order,
|
|
10417
|
+
limit: result.data.limit
|
|
10418
|
+
};
|
|
10419
|
+
}
|
|
10420
|
+
/**
|
|
10421
|
+
* List function registries in a workspace with optional pagination.
|
|
10422
|
+
* @param options - Function registry listing options
|
|
10423
|
+
* @returns List of function registries
|
|
10424
|
+
*/
|
|
10425
|
+
async function listFunctionRegistries(options) {
|
|
10426
|
+
const { client, workspaceId, order, limit } = await loadOptions$11(options);
|
|
10427
|
+
const pageDirection = toPageDirection(order);
|
|
10428
|
+
return (await fetchPaged(async (pageToken, pageSize) => {
|
|
10429
|
+
try {
|
|
10430
|
+
const { functions, nextPageToken } = await client.listFunctionRegistries({
|
|
10431
|
+
workspaceId,
|
|
10432
|
+
pageToken,
|
|
10433
|
+
pageSize,
|
|
10434
|
+
sortBy: "updated_at",
|
|
10435
|
+
pageDirection
|
|
10436
|
+
});
|
|
10437
|
+
return [functions, nextPageToken];
|
|
10438
|
+
} catch (error) {
|
|
10439
|
+
if (error instanceof ConnectError && error.code === Code.NotFound) return [[], ""];
|
|
10440
|
+
throw error;
|
|
10441
|
+
}
|
|
10442
|
+
}, { limit })).map(functionRegistryInfo);
|
|
10443
|
+
}
|
|
10444
|
+
const listCommand$8 = defineAppCommand({
|
|
10445
|
+
name: "list",
|
|
10446
|
+
description: "List function registries in a workspace",
|
|
10447
|
+
args: z.object({
|
|
10448
|
+
...workspaceArgs,
|
|
10449
|
+
...paginationArgs()
|
|
10450
|
+
}).strict(),
|
|
10451
|
+
run: async (args) => {
|
|
10452
|
+
const registries = await listFunctionRegistries({
|
|
10453
|
+
workspaceId: args["workspace-id"],
|
|
10454
|
+
profile: args.profile,
|
|
10455
|
+
order: args.order,
|
|
10456
|
+
limit: args.limit
|
|
10457
|
+
});
|
|
10458
|
+
const formatted = args.json ? registries : registries.map(({ createdAt, updatedAt, ...rest }) => ({
|
|
10459
|
+
...rest,
|
|
10460
|
+
createdAt: humanizeRelativeTime(createdAt),
|
|
10461
|
+
updatedAt: humanizeRelativeTime(updatedAt)
|
|
10462
|
+
}));
|
|
10463
|
+
logger.out(formatted);
|
|
10464
|
+
}
|
|
10465
|
+
});
|
|
10466
|
+
|
|
10370
10467
|
//#endregion
|
|
10371
10468
|
//#region src/cli/commands/generate/types.ts
|
|
10372
10469
|
/**
|
|
@@ -12762,7 +12859,7 @@ async function generate(options) {
|
|
|
12762
12859
|
if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
|
|
12763
12860
|
let pluginManager;
|
|
12764
12861
|
if (plugins.length > 0) pluginManager = new PluginManager(plugins);
|
|
12765
|
-
const { defineApplication } = await import("./application-
|
|
12862
|
+
const { defineApplication } = await import("./application-DUcmoFdc.mjs");
|
|
12766
12863
|
const application = defineApplication({
|
|
12767
12864
|
config,
|
|
12768
12865
|
pluginManager
|
|
@@ -13275,7 +13372,10 @@ async function loadOptions$9(options) {
|
|
|
13275
13372
|
const result = healthOptionsSchema.safeParse(options);
|
|
13276
13373
|
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
13277
13374
|
return {
|
|
13278
|
-
client: await initOperatorClient(await loadAccessToken(
|
|
13375
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
13376
|
+
useProfile: true,
|
|
13377
|
+
profile: result.data.profile
|
|
13378
|
+
})),
|
|
13279
13379
|
workspaceId: await loadWorkspaceId({
|
|
13280
13380
|
workspaceId: result.data.workspaceId,
|
|
13281
13381
|
profile: result.data.profile
|
|
@@ -13331,7 +13431,10 @@ async function loadOptions$8(options) {
|
|
|
13331
13431
|
const result = listAppsOptionsSchema.safeParse(options);
|
|
13332
13432
|
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
13333
13433
|
return {
|
|
13334
|
-
client: await initOperatorClient(await loadAccessToken(
|
|
13434
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
13435
|
+
useProfile: true,
|
|
13436
|
+
profile: result.data.profile
|
|
13437
|
+
})),
|
|
13335
13438
|
workspaceId: await loadWorkspaceId({
|
|
13336
13439
|
workspaceId: result.data.workspaceId,
|
|
13337
13440
|
profile: result.data.profile
|
|
@@ -13589,7 +13692,10 @@ async function loadOptions$6(options) {
|
|
|
13589
13692
|
const result = getWorkspaceOptionsSchema.safeParse(options);
|
|
13590
13693
|
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
13591
13694
|
return {
|
|
13592
|
-
client: await initOperatorClient(await loadAccessToken(
|
|
13695
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
13696
|
+
useProfile: true,
|
|
13697
|
+
profile: result.data.profile
|
|
13698
|
+
})),
|
|
13593
13699
|
workspaceId: await loadWorkspaceId({
|
|
13594
13700
|
workspaceId: result.data.workspaceId,
|
|
13595
13701
|
profile: result.data.profile
|
|
@@ -13753,7 +13859,10 @@ async function loadOptions$4(options) {
|
|
|
13753
13859
|
const result = inviteUserOptionsSchema.safeParse(options);
|
|
13754
13860
|
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
13755
13861
|
return {
|
|
13756
|
-
client: await initOperatorClient(await loadAccessToken(
|
|
13862
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
13863
|
+
useProfile: true,
|
|
13864
|
+
profile: result.data.profile
|
|
13865
|
+
})),
|
|
13757
13866
|
workspaceId: await loadWorkspaceId({
|
|
13758
13867
|
workspaceId: result.data.workspaceId,
|
|
13759
13868
|
profile: result.data.profile
|
|
@@ -13808,7 +13917,10 @@ async function loadOptions$3(options) {
|
|
|
13808
13917
|
const result = listUsersOptionsSchema.safeParse(options);
|
|
13809
13918
|
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
13810
13919
|
return {
|
|
13811
|
-
client: await initOperatorClient(await loadAccessToken(
|
|
13920
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
13921
|
+
useProfile: true,
|
|
13922
|
+
profile: result.data.profile
|
|
13923
|
+
})),
|
|
13812
13924
|
workspaceId: await loadWorkspaceId({
|
|
13813
13925
|
workspaceId: result.data.workspaceId,
|
|
13814
13926
|
profile: result.data.profile
|
|
@@ -13874,7 +13986,10 @@ async function loadOptions$2(options) {
|
|
|
13874
13986
|
const result = removeUserOptionsSchema.safeParse(options);
|
|
13875
13987
|
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
13876
13988
|
return {
|
|
13877
|
-
client: await initOperatorClient(await loadAccessToken(
|
|
13989
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
13990
|
+
useProfile: true,
|
|
13991
|
+
profile: result.data.profile
|
|
13992
|
+
})),
|
|
13878
13993
|
workspaceId: await loadWorkspaceId({
|
|
13879
13994
|
workspaceId: result.data.workspaceId,
|
|
13880
13995
|
profile: result.data.profile
|
|
@@ -13930,7 +14045,10 @@ async function loadOptions$1(options) {
|
|
|
13930
14045
|
const result = updateUserOptionsSchema.safeParse(options);
|
|
13931
14046
|
if (!result.success) throw new Error(result.error.issues[0].message);
|
|
13932
14047
|
return {
|
|
13933
|
-
client: await initOperatorClient(await loadAccessToken(
|
|
14048
|
+
client: await initOperatorClient(await loadAccessToken({
|
|
14049
|
+
useProfile: true,
|
|
14050
|
+
profile: result.data.profile
|
|
14051
|
+
})),
|
|
13934
14052
|
workspaceId: await loadWorkspaceId({
|
|
13935
14053
|
workspaceId: result.data.workspaceId,
|
|
13936
14054
|
profile: result.data.profile
|
|
@@ -14917,5 +15035,5 @@ function isDeno() {
|
|
|
14917
15035
|
}
|
|
14918
15036
|
|
|
14919
15037
|
//#endregion
|
|
14920
|
-
export { deleteCommand$1 as $,
|
|
14921
|
-
//# sourceMappingURL=runtime-
|
|
15038
|
+
export { deleteCommand$1 as $, getMigrationDirPath as $t, truncate as A, executionsCommand as At, updateOrganization as B, MIGRATION_LABEL_KEY as Bt, listCommand$2 as C, toPageDirection as Cn, jobsCommand as Ct, resumeWorkflow as D, startWorkflow as Dt, resumeCommand as E, startCommand as Et, showCommand as F, getCommand$6 as Ft, getCommand$1 as G, INITIAL_SCHEMA_NUMBER as Gt, treeCommand as H, bundleMigrationScript as Ht, logBetaWarning as I, getExecutor as It, updateFolder as J, compareLocalTypesWithSnapshot as Jt, getOrganization as K, MIGRATE_FILE_NAME as Kt, remove as L, apply as Lt, generate as M, listWorkflowExecutions as Mt, generateCommand as N, functionExecutionStatusToString as Nt, listCommand$3 as O, getCommand$5 as Ot, show as P, formatKeyValueTable as Pt, getFolder as Q, getLatestMigrationNumber as Qt, removeCommand$1 as R, executeScript as Rt, listApps as S, paginationArgs as Sn, getExecutorJob as St, healthCommand as T, watchExecutorJob as Tt, listCommand$4 as U, DB_TYPES_FILE_NAME as Ut, organizationTree as V, parseMigrationLabelNumber as Vt, listOrganizations as W, DIFF_FILE_NAME as Wt, listFolders as X, createSnapshotFromLocalTypes as Xt, listCommand$5 as Y, compareSnapshots as Yt, getCommand$2 as Z, formatMigrationNumber as Zt, getWorkspace as _, commonArgs as _n, webhookCommand as _t, updateUser as a, reconstructSnapshotFromMigrations as an, getCommand$3 as at, createCommand as b, isVerbose as bn, listCommand$9 as bt, listCommand as c, hasChanges as cn, tokenCommand as ct, inviteUser as d, sdkNameLabelKey as dn, generate$1 as dt, getMigrationFilePath as en, deleteFolder as et, restoreCommand as f, trnPrefix as fn, listCommand$8 as ft, getCommand as g, defineAppCommand as gn, listWebhookExecutors as gt, listWorkspaces as h, apiCommand as hn, getFunctionRegistry as ht, updateCommand as i, loadDiff as in, listOAuth2Clients as it, truncateCommand as j, getWorkflowExecution as jt, listWorkflows as k, getWorkflow as kt, listUsers as l, getNamespacesWithMigrations as ln, listCommand$7 as lt, listCommand$1 as m, apiCall as mn, getCommand$4 as mt, query as n, getNextMigrationNumber as nn, createFolder as nt, removeCommand as o, formatDiffSummary as on, getOAuth2Client as ot, restoreWorkspace as p, generateUserTypes as pn, listFunctionRegistries as pt, updateCommand$2 as q, SCHEMA_FILE_NAME as qt, queryCommand as r, isValidMigrationNumber as rn, listCommand$6 as rt, removeUser as s, formatMigrationDiff as sn, getMachineUserToken as st, isNativeTypeScriptRuntime as t, getMigrationFiles as tn, createCommand$1 as tt, inviteCommand as u, prompt as un, listMachineUsers as ut, deleteCommand as v, confirmationArgs as vn, triggerCommand as vt, getAppHealth as w, workspaceArgs as wn, listExecutorJobs as wt, createWorkspace as x, pagedLogArgs as xn, listExecutors as xt, deleteWorkspace as y, deploymentArgs as yn, triggerExecutor as yt, updateCommand$1 as z, waitForExecution$1 as zt };
|
|
15039
|
+
//# sourceMappingURL=runtime-Bn68JXnL.mjs.map
|