@tailor-platform/sdk 1.33.1 → 1.34.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 +14 -0
- package/dist/application-CLKuNo-l.mjs +4 -0
- package/dist/{application-CYPU-WIc.mjs → application-CluuzA0-.mjs} +18 -2
- package/dist/application-CluuzA0-.mjs.map +1 -0
- package/dist/cli/index.mjs +291 -40
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +6 -6
- package/dist/cli/lib.mjs +3 -3
- package/dist/{client-ea1w8SmG.mjs → client-BmQP4kKS.mjs} +1 -1
- package/dist/{client-CYGsf3Zl.mjs → client-CA2NM_4R.mjs} +10 -2
- package/dist/{client-CYGsf3Zl.mjs.map → client-CA2NM_4R.mjs.map} +1 -1
- package/dist/configure/index.d.mts +4 -5
- package/dist/configure/index.mjs +3 -0
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-CbueUPaP.mjs → crash-report-Bd2T8BhU.mjs} +1 -1
- package/dist/{crash-report-OXafT1iS.mjs → crash-report-CPkI2-cp.mjs} +2 -2
- package/dist/{crash-report-OXafT1iS.mjs.map → crash-report-CPkI2-cp.mjs.map} +1 -1
- package/dist/{index-DlivLpTN.d.mts → index--9iVDOXn.d.mts} +7 -8
- package/dist/{index-mAV9kYJA.d.mts → index-D4pBPp65.d.mts} +2 -2
- package/dist/{index-0H-YH8Ya.d.mts → index-DTJkkO-t.d.mts} +2 -2
- package/dist/{index-BM2SqNfO.d.mts → index-niQ9Qblw.d.mts} +2 -2
- package/dist/{index-BU6fmwJC.d.mts → index-qVqjEYnr.d.mts} +2 -2
- 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 +1 -2
- package/dist/{plugin-DQqzlulP.d.mts → plugin-D8hKE6rZ.d.mts} +59 -3
- package/dist/{runtime-CDvdBV66.mjs → runtime-8G74KN_M.mjs} +293 -61
- package/dist/runtime-8G74KN_M.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/{workflow.generated-u9MgzqbM.d.mts → workflow.generated-DMt8PNVd.d.mts} +2 -2
- package/docs/cli/auth.md +162 -1
- package/docs/cli-reference.md +9 -6
- package/docs/services/auth.md +115 -0
- package/package.json +1 -1
- package/dist/application-CYPU-WIc.mjs.map +0 -1
- package/dist/application-dnB8CQiT.mjs +0 -4
- package/dist/env-BvIWsJxg.d.mts +0 -30
- package/dist/runtime-CDvdBV66.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as Plugin } from "./plugin-
|
|
2
|
+
import { n as Plugin } from "./plugin-D8hKE6rZ.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/kysely-type/index.d.ts
|
|
5
5
|
/** Unique identifier for the Kysely type generator plugin. */
|
|
@@ -16,4 +16,4 @@ type KyselyTypePluginOptions = {
|
|
|
16
16
|
declare function kyselyTypePlugin(options: KyselyTypePluginOptions): Plugin<unknown, KyselyTypePluginOptions>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { kyselyTypePlugin as n, KyselyGeneratorID as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-DTJkkO-t.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as Plugin } from "./plugin-
|
|
2
|
+
import { n as Plugin } from "./plugin-D8hKE6rZ.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/enum-constants/index.d.ts
|
|
5
5
|
/** Unique identifier for the enum constants generator plugin. */
|
|
@@ -16,4 +16,4 @@ type EnumConstantsPluginOptions = {
|
|
|
16
16
|
declare function enumConstantsPlugin(options: EnumConstantsPluginOptions): Plugin<unknown, EnumConstantsPluginOptions>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { enumConstantsPlugin as n, EnumConstantsGeneratorID as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-niQ9Qblw.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as Plugin } from "./plugin-
|
|
2
|
+
import { n as Plugin } from "./plugin-D8hKE6rZ.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/seed/index.d.ts
|
|
5
5
|
/** Unique identifier for the seed generator plugin. */
|
|
@@ -18,4 +18,4 @@ type SeedPluginOptions = {
|
|
|
18
18
|
declare function seedPlugin(options: SeedPluginOptions): Plugin<unknown, SeedPluginOptions>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { seedPlugin as n, SeedGeneratorID as t };
|
|
21
|
-
//# sourceMappingURL=index-
|
|
21
|
+
//# sourceMappingURL=index-qVqjEYnr.d.mts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-
|
|
2
|
+
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-niQ9Qblw.mjs";
|
|
3
3
|
export { EnumConstantsGeneratorID, enumConstantsPlugin };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-
|
|
2
|
+
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-D4pBPp65.mjs";
|
|
3
3
|
export { FileUtilsGeneratorID, fileUtilsPlugin };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-
|
|
2
|
+
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-DTJkkO-t.mjs";
|
|
3
3
|
export { KyselyGeneratorID, kyselyTypePlugin };
|
package/dist/plugin/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import {
|
|
3
|
-
import { n as TailorEnv, r as TailorActor } from "../env-BvIWsJxg.mjs";
|
|
2
|
+
import { B as TailorAnyDBType, ct as TailorEnv, lt as TailorActor } from "../plugin-D8hKE6rZ.mjs";
|
|
4
3
|
|
|
5
4
|
//#region src/plugin/with-context.d.ts
|
|
6
5
|
/**
|
|
@@ -377,6 +377,25 @@ type Resolver = {
|
|
|
377
377
|
};
|
|
378
378
|
type ResolverInput = Resolver;
|
|
379
379
|
//#endregion
|
|
380
|
+
//#region src/types/auth-connection.generated.d.ts
|
|
381
|
+
type AuthConnectionOAuth2Config = {
|
|
382
|
+
/** OAuth2 provider URL */providerUrl: string; /** OAuth2 issuer URL */
|
|
383
|
+
issuerUrl: string; /** OAuth2 client ID */
|
|
384
|
+
clientId: string; /** OAuth2 client secret */
|
|
385
|
+
clientSecret: string; /** OAuth2 authorization endpoint override */
|
|
386
|
+
authUrl?: string | undefined; /** OAuth2 token endpoint override */
|
|
387
|
+
tokenUrl?: string | undefined;
|
|
388
|
+
};
|
|
389
|
+
type AuthConnectionConfig = {
|
|
390
|
+
type: "oauth2";
|
|
391
|
+
providerUrl: string;
|
|
392
|
+
issuerUrl: string;
|
|
393
|
+
clientId: string;
|
|
394
|
+
clientSecret: string;
|
|
395
|
+
authUrl?: string | undefined;
|
|
396
|
+
tokenUrl?: string | undefined;
|
|
397
|
+
};
|
|
398
|
+
//#endregion
|
|
380
399
|
//#region src/configure/types/field.d.ts
|
|
381
400
|
type AllowedValue = EnumValue;
|
|
382
401
|
type AllowedValues = readonly [string | EnumValue, ...(string | EnumValue)[]];
|
|
@@ -418,6 +437,31 @@ type TailorUser = {
|
|
|
418
437
|
/** Represents an unauthenticated user in the Tailor platform. */
|
|
419
438
|
declare const unauthenticatedTailorUser: TailorUser;
|
|
420
439
|
//#endregion
|
|
440
|
+
//#region src/configure/types/actor.d.ts
|
|
441
|
+
/** User type enum values from the Tailor Platform server. */
|
|
442
|
+
type TailorActorType = "USER_TYPE_USER" | "USER_TYPE_MACHINE_USER" | "USER_TYPE_UNSPECIFIED";
|
|
443
|
+
/** Represents an actor in event triggers. */
|
|
444
|
+
type TailorActor = {
|
|
445
|
+
/** The ID of the workspace the user belongs to. */workspaceId: string; /** The ID of the user. */
|
|
446
|
+
userId: string;
|
|
447
|
+
/**
|
|
448
|
+
* A map of the user's attributes.
|
|
449
|
+
* Maps from server's `attributeMap` field.
|
|
450
|
+
*/
|
|
451
|
+
attributes: InferredAttributeMap | null;
|
|
452
|
+
/**
|
|
453
|
+
* A list of the user's attributes.
|
|
454
|
+
* Maps from server's `attributes` field.
|
|
455
|
+
*/
|
|
456
|
+
attributeList: InferredAttributeList; /** The type of the user. */
|
|
457
|
+
userType: TailorActorType;
|
|
458
|
+
};
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region src/configure/types/env.d.ts
|
|
461
|
+
interface Env {}
|
|
462
|
+
/** Represents environment variables in the Tailor platform. */
|
|
463
|
+
type TailorEnv = keyof Env extends never ? Record<string, string> : Env;
|
|
464
|
+
//#endregion
|
|
421
465
|
//#region src/configure/types/helpers.d.ts
|
|
422
466
|
type Prettify<T> = { [K in keyof T as string extends K ? never : K]: T[K] } & {};
|
|
423
467
|
type DeepWritable<T> = T extends Date | RegExp | Function ? T : T extends object ? { -readonly [P in keyof T]: DeepWritable<T[P]> } & {} : T;
|
|
@@ -1525,6 +1569,13 @@ type SCIMAttributeType = SCIMAttribute["type"];
|
|
|
1525
1569
|
type AuthInvokerWithName<M extends string> = Omit<AuthInvoker, "machineUserName"> & {
|
|
1526
1570
|
machineUserName: M;
|
|
1527
1571
|
};
|
|
1572
|
+
/** Result of retrieving a connection token at runtime. */
|
|
1573
|
+
type AuthConnectionTokenResult = {
|
|
1574
|
+
access_token: string;
|
|
1575
|
+
refresh_token?: string;
|
|
1576
|
+
token_type?: string;
|
|
1577
|
+
expiry?: string;
|
|
1578
|
+
};
|
|
1528
1579
|
type ValueOperand = string | boolean | string[] | boolean[];
|
|
1529
1580
|
type AuthAttributeValue = ValueOperand | null | undefined;
|
|
1530
1581
|
type UserFieldKeys<User extends TailorDBInstance> = keyof output<User> & string;
|
|
@@ -1608,7 +1659,7 @@ type BeforeLoginHook<MachineUserNames extends string> = {
|
|
|
1608
1659
|
type AuthHooks<MachineUserNames extends string> = {
|
|
1609
1660
|
beforeLogin?: BeforeLoginHook<MachineUserNames>;
|
|
1610
1661
|
};
|
|
1611
|
-
type AuthServiceInput<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[], MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields | undefined = MachineUserAttributeFields | undefined> = {
|
|
1662
|
+
type AuthServiceInput<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[], MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields | undefined = MachineUserAttributeFields | undefined, ConnectionNames extends string = string> = {
|
|
1612
1663
|
hooks?: AuthHooks<MachineUserNames>;
|
|
1613
1664
|
userProfile?: UserProfile<User, AttributeMap, AttributeList>;
|
|
1614
1665
|
machineUserAttributes?: MachineUserAttributes;
|
|
@@ -1617,15 +1668,20 @@ type AuthServiceInput<User extends TailorDBInstance, AttributeMap extends UserAt
|
|
|
1617
1668
|
idProvider?: IdProvider;
|
|
1618
1669
|
scim?: SCIMConfig;
|
|
1619
1670
|
tenantProvider?: TenantProvider;
|
|
1671
|
+
connections?: Record<ConnectionNames, AuthConnectionConfig>;
|
|
1620
1672
|
publishSessionEvents?: boolean;
|
|
1621
1673
|
};
|
|
1622
1674
|
declare const authDefinitionBrand: unique symbol;
|
|
1623
1675
|
type AuthDefinitionBrand = {
|
|
1624
1676
|
readonly [authDefinitionBrand]: true;
|
|
1625
1677
|
};
|
|
1678
|
+
type ConnectionNames<Config> = Config extends {
|
|
1679
|
+
connections?: Record<infer K, unknown>;
|
|
1680
|
+
} ? K & string : string;
|
|
1626
1681
|
type DefinedAuth<Name extends string, Config, MachineUserNames extends string> = Config & {
|
|
1627
1682
|
name: Name;
|
|
1628
1683
|
invoker<M extends MachineUserNames>(machineUser: M): AuthInvokerWithName<M>;
|
|
1684
|
+
getConnectionToken<C extends ConnectionNames<Config>>(connectionName: C): Promise<AuthConnectionTokenResult>;
|
|
1629
1685
|
} & AuthDefinitionBrand;
|
|
1630
1686
|
type AuthExternalConfig = {
|
|
1631
1687
|
name: string;
|
|
@@ -2037,5 +2093,5 @@ interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
|
|
|
2037
2093
|
onExecutorReady?(context: ExecutorReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
|
|
2038
2094
|
}
|
|
2039
2095
|
//#endregion
|
|
2040
|
-
export {
|
|
2041
|
-
//# sourceMappingURL=plugin-
|
|
2096
|
+
export { FieldOptions as $, BeforeLoginHookArgs as A, TailorDBTrigger as At, TailorAnyDBType as B, SCIMAttribute as Bt, TailorDBType as C, ExecutorInput as Ct, AuthExternalConfig as D, IncomingWebhookTrigger as Dt, AuthConnectionTokenResult as E, IdpUserTrigger as Et, UserAttributeListKey as F, IDToken as Ft, PermissionCondition as G, TenantProvider as Gt, TailorDBInstance as H, SCIMAuthorization as Ht, UserAttributeMap as I, IdProvider as It, unsafeAllowAllGqlPermission as J, TailorTypeGqlPermission as K, UsernameFieldKey as L, OAuth2ClientInput as Lt, OAuth2ClientGrantType as M, WorkflowOperation as Mt, SCIMAttributeType as N, AuthInvoker as Nt, AuthOwnConfig as O, ResolverExecutedTrigger as Ot, UserAttributeKey as P, BuiltinIdP as Pt, FieldMetadata as Q, ValueOperand as R, OIDC as Rt, TailorDBServiceInput as S, Executor as St, AuthConfig as T, GqlOperation as Tt, TailorDBType$1 as U, SCIMConfig as Ut, TailorDBField as V, SCIMAttributeMapping as Vt, db as W, SCIMResource as Wt, ArrayFieldOutput as X, unsafeAllowAllTypePermission as Y, DefinedFieldMetadata as Z, GeneratorResult as _, AuthConnectionOAuth2Config as _t, PluginExecutorContext as a, JsonCompatible as at, TailorDBNamespaceData as b, GeneratorConfig as bt, PluginGeneratedExecutorWithFile as c, TailorEnv as ct, PluginNamespaceProcessContext as d, AttributeMap as dt, FieldOutput$1 as et, PluginOutput as f, TailorUser as ft, ExecutorReadyContext as g, AuthConnectionConfig as gt, TypePluginOutput as h, AllowedValuesOutput as ht, PluginConfigs as i, InferFieldsOutput as it, DefinedAuth as j, WebhookOperation as jt, AuthServiceInput as k, ScheduleTriggerInput as kt, PluginGeneratedResolver as l, TailorActor as lt, TailorDBTypeForPlugin as m, AllowedValues as mt, Plugin as n, TailorAnyField as nt, PluginExecutorContextBase as o, output as ot, PluginProcessContext as p, unauthenticatedTailorUser as pt, TailorTypePermission as q, PluginAttachment as r, TailorField as rt, PluginGeneratedExecutor as s, Env as st, NamespacePluginOutput as t, TailorFieldType as tt, PluginGeneratedType as u, AttributeList as ut, ResolverNamespaceData as v, Resolver as vt, TypeSourceInfoEntry as w, FunctionOperation as wt, TailorDBReadyContext as x, AuthAccessTokenTrigger as xt, ResolverReadyContext as y, ResolverInput as yt, TailorAnyDBField as z, SAML as zt };
|
|
2097
|
+
//# sourceMappingURL=plugin-D8hKE6rZ.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as ExecutorTriggerType, C as TailorDBType_PermitAction, E as FunctionExecution_Status, F as
|
|
2
|
+
import { A as ExecutorTriggerType, B as AuthSCIMConfig_AuthorizationType, C as TailorDBType_PermitAction, E as FunctionExecution_Status, F as AuthOAuth2Client_ClientType, G as ConditionSchema, H as TenantProviderConfig_TenantProviderType, I as AuthOAuth2Client_GrantType, J as PageDirection, K as Condition_Operator, L as AuthSCIMAttribute_Mutability, M as AuthHookPoint, N as AuthIDPConfig_AuthType, O as ExecutorJobStatus, P as AuthInvokerSchema, R as AuthSCIMAttribute_Type, S as TailorDBType_Permission_Permit, T as IdPLang, U as UserProfileProviderConfig_UserProfileProviderType, W as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, X as Subgraph_ServiceType, Y as ApplicationSchemaUpdateAttemptStatus, _ as WorkflowJobExecution_Status, a as fetchMachineUserToken, b as TailorDBGQLPermission_Permit, f as platformBaseUrl, g as WorkflowExecution_Status, h as WorkspacePlatformUserRole, i as fetchAll, j as AuthConnection_Type, k as ExecutorTargetType, m as userAgent, p as resolveStaticWebsiteUrls, q as FilterSchema, u as initOperatorClient, v as TailorDBGQLPermission_Action, w as PipelineResolver_OperationType, x as TailorDBType_Permission_Operator, y as TailorDBGQLPermission_Operator, z as AuthSCIMAttribute_Uniqueness } from "./client-CA2NM_4R.mjs";
|
|
3
3
|
import { t as db } from "./schema-D27cW0Ca.mjs";
|
|
4
4
|
import { i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-qz-Y4sBV.mjs";
|
|
5
5
|
import { t as readPackageJson } from "./package-json-CfUqjJaQ.mjs";
|
|
6
|
-
import { S as readPlatformConfig, T as writePlatformConfig, _ as hashFile, a as loadConfig, b as loadAccessToken, c as createExecutorService, d as TailorDBTypeSchema, f as stringifyFunction, g as getDistDir, h as createBundleCache, m as loadFilesWithIgnores, n as generatePluginFilesIfNeeded, p as tailorUserMap, r as loadApplication, t as defineApplication, u as OAuth2ClientSchema, x as loadWorkspaceId } from "./application-
|
|
6
|
+
import { S as readPlatformConfig, T as writePlatformConfig, _ as hashFile, a as loadConfig, b as loadAccessToken, c as createExecutorService, d as TailorDBTypeSchema, f as stringifyFunction, g as getDistDir, h as createBundleCache, m as loadFilesWithIgnores, n as generatePluginFilesIfNeeded, p as tailorUserMap, r as loadApplication, t as defineApplication, u as OAuth2ClientSchema, x as loadWorkspaceId } from "./application-CluuzA0-.mjs";
|
|
7
7
|
import { r as withSpan } from "./telemetry-CREcGK8y.mjs";
|
|
8
8
|
import { arg, createDefineCommand, defineCommand, runCommand } from "politty";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -37,7 +37,7 @@ import { spawn } from "node:child_process";
|
|
|
37
37
|
import { watch } from "chokidar";
|
|
38
38
|
import * as madgeModule from "madge";
|
|
39
39
|
import { createInterface } from "node:readline/promises";
|
|
40
|
-
import { astVisitor, parse
|
|
40
|
+
import { astVisitor, parse } from "pgsql-ast-parser";
|
|
41
41
|
import { parse as parse$1 } from "@0no-co/graphql.web";
|
|
42
42
|
|
|
43
43
|
//#region src/cli/shared/args.ts
|
|
@@ -1217,6 +1217,276 @@ function protoSubgraph(subgraph) {
|
|
|
1217
1217
|
};
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
|
+
//#endregion
|
|
1221
|
+
//#region src/cli/commands/apply/secrets-state.ts
|
|
1222
|
+
const SecretsStateSchema = z.object({
|
|
1223
|
+
vaults: z.record(z.string(), z.record(z.string(), z.string())),
|
|
1224
|
+
connections: z.record(z.string(), z.string()).optional()
|
|
1225
|
+
});
|
|
1226
|
+
/**
|
|
1227
|
+
* Get the file path for the secrets state JSON.
|
|
1228
|
+
* @returns Absolute path to secrets-state.json
|
|
1229
|
+
*/
|
|
1230
|
+
function getSecretsStatePath() {
|
|
1231
|
+
return path.join(getDistDir(), "secrets-state.json");
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Load secrets hash state from disk.
|
|
1235
|
+
* @returns Persisted state, or empty state if file is missing or corrupted
|
|
1236
|
+
*/
|
|
1237
|
+
function loadSecretsState() {
|
|
1238
|
+
const filePath = getSecretsStatePath();
|
|
1239
|
+
if (!existsSync(filePath)) return { vaults: {} };
|
|
1240
|
+
try {
|
|
1241
|
+
const raw = readFileSync(filePath, "utf-8");
|
|
1242
|
+
return SecretsStateSchema.parse(JSON.parse(raw));
|
|
1243
|
+
} catch {
|
|
1244
|
+
return { vaults: {} };
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* Save secrets hash state to disk.
|
|
1249
|
+
* @param state - The secrets state to persist
|
|
1250
|
+
*/
|
|
1251
|
+
function saveSecretsState(state) {
|
|
1252
|
+
const filePath = getSecretsStatePath();
|
|
1253
|
+
mkdirSync(path.dirname(filePath), { recursive: true });
|
|
1254
|
+
writeFileSync(filePath, JSON.stringify(state, null, 2), "utf-8");
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Compute SHA-256 hex digest of a value.
|
|
1258
|
+
* @param value - The string to hash
|
|
1259
|
+
* @returns Hex-encoded SHA-256 hash
|
|
1260
|
+
*/
|
|
1261
|
+
function hashValue(value) {
|
|
1262
|
+
return createHash("sha256").update(value).digest("hex");
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
//#endregion
|
|
1266
|
+
//#region src/cli/commands/apply/auth-connection.ts
|
|
1267
|
+
function connectionTrn(workspaceId, name) {
|
|
1268
|
+
return `${trnPrefix(workspaceId)}:auth-connection:${name}`;
|
|
1269
|
+
}
|
|
1270
|
+
function buildConnectionRequest(workspaceId, name, config) {
|
|
1271
|
+
return {
|
|
1272
|
+
workspaceId,
|
|
1273
|
+
connection: {
|
|
1274
|
+
name,
|
|
1275
|
+
type: AuthConnection_Type.OAUTH2,
|
|
1276
|
+
config: {
|
|
1277
|
+
case: "oauth2",
|
|
1278
|
+
value: {
|
|
1279
|
+
providerUrl: config.providerUrl,
|
|
1280
|
+
issuerUrl: config.issuerUrl,
|
|
1281
|
+
clientId: config.clientId,
|
|
1282
|
+
clientSecret: config.clientSecret,
|
|
1283
|
+
authUrl: config.authUrl ?? "",
|
|
1284
|
+
tokenUrl: config.tokenUrl ?? ""
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Compute a hash of the full connection config for change detection.
|
|
1292
|
+
* @param config - Auth connection config
|
|
1293
|
+
* @returns SHA-256 hex digest
|
|
1294
|
+
*/
|
|
1295
|
+
function hashConnectionConfig(config) {
|
|
1296
|
+
return hashValue(JSON.stringify({
|
|
1297
|
+
type: config.type,
|
|
1298
|
+
providerUrl: config.providerUrl,
|
|
1299
|
+
issuerUrl: config.issuerUrl,
|
|
1300
|
+
clientId: config.clientId,
|
|
1301
|
+
clientSecret: config.clientSecret,
|
|
1302
|
+
authUrl: config.authUrl ?? "",
|
|
1303
|
+
tokenUrl: config.tokenUrl ?? ""
|
|
1304
|
+
}));
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Check whether the non-secret fields of an existing connection differ from the desired config.
|
|
1308
|
+
* @param existing - Existing connection from the server
|
|
1309
|
+
* @param desired - Desired connection config
|
|
1310
|
+
* @returns true if any non-secret field has changed
|
|
1311
|
+
*/
|
|
1312
|
+
function hasNonSecretFieldChanged(existing, desired) {
|
|
1313
|
+
if (existing.config.case !== "oauth2") return true;
|
|
1314
|
+
const oauth2 = existing.config.value;
|
|
1315
|
+
return oauth2.providerUrl !== desired.providerUrl || oauth2.issuerUrl !== desired.issuerUrl || oauth2.clientId !== desired.clientId || oauth2.authUrl !== (desired.authUrl ?? "") || oauth2.tokenUrl !== (desired.tokenUrl ?? "");
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* Plan auth connection changes based on current and desired state.
|
|
1319
|
+
* @param client - Operator client instance
|
|
1320
|
+
* @param workspaceId - Workspace ID
|
|
1321
|
+
* @param appName - Application name for ownership
|
|
1322
|
+
* @param auths - Auth services with connection configs
|
|
1323
|
+
* @returns Planned changes for auth connections
|
|
1324
|
+
*/
|
|
1325
|
+
async function planAuthConnections(client, workspaceId, appName, auths) {
|
|
1326
|
+
const changeSet = createChangeSet("Auth connections");
|
|
1327
|
+
const conflicts = [];
|
|
1328
|
+
const unmanaged = [];
|
|
1329
|
+
const resourceOwners = /* @__PURE__ */ new Set();
|
|
1330
|
+
const desiredConnections = {};
|
|
1331
|
+
for (const auth of auths) if (auth.connections) for (const [name, config] of Object.entries(auth.connections)) desiredConnections[name] = config;
|
|
1332
|
+
const existingList = await fetchAll(async (pageToken, maxPageSize) => {
|
|
1333
|
+
try {
|
|
1334
|
+
const { connections, nextPageToken } = await client.listAuthConnections({
|
|
1335
|
+
workspaceId,
|
|
1336
|
+
pageToken,
|
|
1337
|
+
pageSize: maxPageSize
|
|
1338
|
+
});
|
|
1339
|
+
return [connections, nextPageToken];
|
|
1340
|
+
} catch (error) {
|
|
1341
|
+
if (error instanceof ConnectError && error.code === Code.NotFound) return [[], ""];
|
|
1342
|
+
throw error;
|
|
1343
|
+
}
|
|
1344
|
+
});
|
|
1345
|
+
const existingConnections = {};
|
|
1346
|
+
let metadataSupported = true;
|
|
1347
|
+
await Promise.all(existingList.map(async (resource) => {
|
|
1348
|
+
try {
|
|
1349
|
+
const { metadata } = await client.getMetadata({ trn: connectionTrn(workspaceId, resource.name) });
|
|
1350
|
+
existingConnections[resource.name] = {
|
|
1351
|
+
resource,
|
|
1352
|
+
label: metadata?.labels[sdkNameLabelKey]
|
|
1353
|
+
};
|
|
1354
|
+
} catch (error) {
|
|
1355
|
+
if (error instanceof ConnectError && error.code === Code.InvalidArgument) {
|
|
1356
|
+
metadataSupported = false;
|
|
1357
|
+
existingConnections[resource.name] = {
|
|
1358
|
+
resource,
|
|
1359
|
+
label: void 0
|
|
1360
|
+
};
|
|
1361
|
+
} else throw error;
|
|
1362
|
+
}
|
|
1363
|
+
}));
|
|
1364
|
+
const state = loadSecretsState();
|
|
1365
|
+
for (const [name, config] of Object.entries(desiredConnections)) {
|
|
1366
|
+
const existing = existingConnections[name];
|
|
1367
|
+
const metaRequest = metadataSupported ? await buildMetaRequest(connectionTrn(workspaceId, name), appName) : void 0;
|
|
1368
|
+
if (existing) {
|
|
1369
|
+
if (metadataSupported && !existing.label) unmanaged.push({
|
|
1370
|
+
resourceType: "Auth connection",
|
|
1371
|
+
resourceName: name
|
|
1372
|
+
});
|
|
1373
|
+
else if (existing.label && existing.label !== appName) conflicts.push({
|
|
1374
|
+
resourceType: "Auth connection",
|
|
1375
|
+
resourceName: name,
|
|
1376
|
+
currentOwner: existing.label
|
|
1377
|
+
});
|
|
1378
|
+
const currentHash = hashConnectionConfig(config);
|
|
1379
|
+
const storedHash = state.connections?.[name];
|
|
1380
|
+
if (hasNonSecretFieldChanged(existing.resource, config) || currentHash !== storedHash) changeSet.replaces.push({
|
|
1381
|
+
name,
|
|
1382
|
+
revokeRequest: {
|
|
1383
|
+
workspaceId,
|
|
1384
|
+
connectionName: name
|
|
1385
|
+
},
|
|
1386
|
+
createRequest: buildConnectionRequest(workspaceId, name, config),
|
|
1387
|
+
metaRequest
|
|
1388
|
+
});
|
|
1389
|
+
else changeSet.unchanged.push({ name });
|
|
1390
|
+
delete existingConnections[name];
|
|
1391
|
+
} else changeSet.creates.push({
|
|
1392
|
+
name,
|
|
1393
|
+
request: buildConnectionRequest(workspaceId, name, config),
|
|
1394
|
+
metaRequest
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
for (const [name, entry] of Object.entries(existingConnections)) {
|
|
1398
|
+
if (!entry) continue;
|
|
1399
|
+
if (entry.label && entry.label !== appName) {
|
|
1400
|
+
resourceOwners.add(entry.label);
|
|
1401
|
+
continue;
|
|
1402
|
+
}
|
|
1403
|
+
if (entry.label === appName || !metadataSupported) changeSet.deletes.push({
|
|
1404
|
+
name,
|
|
1405
|
+
request: {
|
|
1406
|
+
workspaceId,
|
|
1407
|
+
connectionName: name
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1410
|
+
}
|
|
1411
|
+
return {
|
|
1412
|
+
changeSet,
|
|
1413
|
+
conflicts,
|
|
1414
|
+
unmanaged,
|
|
1415
|
+
resourceOwners
|
|
1416
|
+
};
|
|
1417
|
+
}
|
|
1418
|
+
/**
|
|
1419
|
+
* Attempt to set metadata, silently ignoring InvalidArgument errors
|
|
1420
|
+
* when the platform does not yet support auth-connection TRNs.
|
|
1421
|
+
* @param client - Operator client instance
|
|
1422
|
+
* @param metaRequest - Metadata request to send
|
|
1423
|
+
*/
|
|
1424
|
+
async function trySetMetadata(client, metaRequest) {
|
|
1425
|
+
try {
|
|
1426
|
+
await client.setMetadata(metaRequest);
|
|
1427
|
+
} catch (error) {
|
|
1428
|
+
if (error instanceof ConnectError && error.code === Code.InvalidArgument) return;
|
|
1429
|
+
throw error;
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
function extractOAuth2Config(connection) {
|
|
1433
|
+
if (!connection) return void 0;
|
|
1434
|
+
const config = connection.config;
|
|
1435
|
+
if (!config || config.case !== "oauth2" || !config.value) return void 0;
|
|
1436
|
+
const v = config.value;
|
|
1437
|
+
return {
|
|
1438
|
+
type: "oauth2",
|
|
1439
|
+
providerUrl: v.providerUrl ?? "",
|
|
1440
|
+
issuerUrl: v.issuerUrl ?? "",
|
|
1441
|
+
clientId: v.clientId ?? "",
|
|
1442
|
+
clientSecret: v.clientSecret ?? "",
|
|
1443
|
+
authUrl: v.authUrl || void 0,
|
|
1444
|
+
tokenUrl: v.tokenUrl || void 0
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Apply auth connection changes for the given phase.
|
|
1449
|
+
* @param client - Operator client instance
|
|
1450
|
+
* @param result - Planned auth connection changes
|
|
1451
|
+
* @param phase - Apply phase
|
|
1452
|
+
*/
|
|
1453
|
+
async function applyAuthConnections(client, result, phase) {
|
|
1454
|
+
const { changeSet } = result;
|
|
1455
|
+
if (phase === "create-update") {
|
|
1456
|
+
await Promise.all(changeSet.creates.map(async (create) => {
|
|
1457
|
+
await client.createAuthConnection(create.request);
|
|
1458
|
+
if (create.metaRequest) await trySetMetadata(client, create.metaRequest);
|
|
1459
|
+
}));
|
|
1460
|
+
for (const replace of changeSet.replaces) {
|
|
1461
|
+
await client.revokeAuthConnection(replace.revokeRequest);
|
|
1462
|
+
await client.createAuthConnection(replace.createRequest);
|
|
1463
|
+
if (replace.metaRequest) await trySetMetadata(client, replace.metaRequest);
|
|
1464
|
+
}
|
|
1465
|
+
const state = loadSecretsState();
|
|
1466
|
+
if (!state.connections) state.connections = {};
|
|
1467
|
+
for (const create of changeSet.creates) {
|
|
1468
|
+
const oauth2 = extractOAuth2Config(create.request.connection);
|
|
1469
|
+
if (oauth2) state.connections[create.name] = hashConnectionConfig(oauth2);
|
|
1470
|
+
}
|
|
1471
|
+
for (const replace of changeSet.replaces) {
|
|
1472
|
+
const oauth2 = extractOAuth2Config(replace.createRequest.connection);
|
|
1473
|
+
if (oauth2) state.connections[replace.name] = hashConnectionConfig(oauth2);
|
|
1474
|
+
}
|
|
1475
|
+
saveSecretsState(state);
|
|
1476
|
+
} else if (phase === "delete-resources" || phase === "delete") {
|
|
1477
|
+
await Promise.all(changeSet.deletes.map(async (del) => {
|
|
1478
|
+
await client.revokeAuthConnection(del.request);
|
|
1479
|
+
}));
|
|
1480
|
+
if (changeSet.deletes.length > 0) {
|
|
1481
|
+
const state = loadSecretsState();
|
|
1482
|
+
if (state.connections) {
|
|
1483
|
+
for (const del of changeSet.deletes) delete state.connections[del.name];
|
|
1484
|
+
saveSecretsState(state);
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1220
1490
|
//#endregion
|
|
1221
1491
|
//#region src/cli/commands/apply/function-registry.ts
|
|
1222
1492
|
const CHUNK_SIZE = 64 * 1024;
|
|
@@ -1869,6 +2139,7 @@ async function applyAuth(client, result, phase = "create-update") {
|
|
|
1869
2139
|
await client.updateAuthService(update.request);
|
|
1870
2140
|
await client.setMetadata(update.metaRequest);
|
|
1871
2141
|
})]);
|
|
2142
|
+
if (changeSet.connection) await applyAuthConnections(client, { changeSet: changeSet.connection }, "create-update");
|
|
1872
2143
|
await Promise.all([...changeSet.idpConfig.creates.map(async (create) => {
|
|
1873
2144
|
if (create.idpConfig.kind === "BuiltInIdP") create.request.idpConfig.config = await protoBuiltinIdPConfig(client, create.request.workspaceId, create.idpConfig);
|
|
1874
2145
|
return client.createAuthIDPConfig(create.request);
|
|
@@ -1903,6 +2174,7 @@ async function applyAuth(client, result, phase = "create-update") {
|
|
|
1903
2174
|
await Promise.all(changeSet.tenantConfig.deletes.map((del) => client.deleteTenantConfig(del.request)));
|
|
1904
2175
|
await Promise.all(changeSet.userProfileConfig.deletes.map((del) => client.deleteUserProfileConfig(del.request)));
|
|
1905
2176
|
await Promise.all(changeSet.idpConfig.deletes.map((del) => client.deleteAuthIDPConfig(del.request)));
|
|
2177
|
+
if (changeSet.connection) await applyAuthConnections(client, { changeSet: changeSet.connection }, "delete-resources");
|
|
1906
2178
|
} else if (phase === "delete-services") await Promise.all(changeSet.service.deletes.map((del) => client.deleteAuthService(del.request)));
|
|
1907
2179
|
}
|
|
1908
2180
|
/**
|
|
@@ -1919,7 +2191,7 @@ async function planAuth(context) {
|
|
|
1919
2191
|
}
|
|
1920
2192
|
const { changeSet: serviceChangeSet, conflicts, unmanaged, resourceOwners } = await planServices$2(client, workspaceId, application.name, auths, forceApplyAll);
|
|
1921
2193
|
const deletedServices = serviceChangeSet.deletes.map((del) => del.name);
|
|
1922
|
-
const [idpConfigChangeSet, userProfileConfigChangeSet, tenantConfigChangeSet, machineUserChangeSet, authHookChangeSet, oauth2ClientChangeSet, scimChangeSet, scimResourceChangeSet] = await Promise.all([
|
|
2194
|
+
const [idpConfigChangeSet, userProfileConfigChangeSet, tenantConfigChangeSet, machineUserChangeSet, authHookChangeSet, oauth2ClientChangeSet, scimChangeSet, scimResourceChangeSet, connectionResult] = await Promise.all([
|
|
1923
2195
|
planIdPConfigs(client, workspaceId, auths, deletedServices, forceApplyAll),
|
|
1924
2196
|
planUserProfileConfigs(client, workspaceId, auths, deletedServices, forceApplyAll),
|
|
1925
2197
|
planTenantConfigs(client, workspaceId, auths, deletedServices, forceApplyAll),
|
|
@@ -1927,7 +2199,8 @@ async function planAuth(context) {
|
|
|
1927
2199
|
planAuthHooks(client, workspaceId, auths, deletedServices, forceApplyAll),
|
|
1928
2200
|
planOAuth2Clients(client, workspaceId, auths, deletedServices, forceApplyAll),
|
|
1929
2201
|
planSCIMConfigs(client, workspaceId, auths, deletedServices),
|
|
1930
|
-
planSCIMResources(client, workspaceId, auths, deletedServices)
|
|
2202
|
+
planSCIMResources(client, workspaceId, auths, deletedServices),
|
|
2203
|
+
planAuthConnections(client, workspaceId, application.name, auths)
|
|
1931
2204
|
]);
|
|
1932
2205
|
serviceChangeSet.print();
|
|
1933
2206
|
idpConfigChangeSet.print();
|
|
@@ -1938,6 +2211,7 @@ async function planAuth(context) {
|
|
|
1938
2211
|
oauth2ClientChangeSet.print();
|
|
1939
2212
|
scimChangeSet.print();
|
|
1940
2213
|
scimResourceChangeSet.print();
|
|
2214
|
+
connectionResult.changeSet.print();
|
|
1941
2215
|
return {
|
|
1942
2216
|
changeSet: {
|
|
1943
2217
|
service: serviceChangeSet,
|
|
@@ -1948,11 +2222,12 @@ async function planAuth(context) {
|
|
|
1948
2222
|
authHook: authHookChangeSet,
|
|
1949
2223
|
oauth2Client: oauth2ClientChangeSet,
|
|
1950
2224
|
scim: scimChangeSet,
|
|
1951
|
-
scimResource: scimResourceChangeSet
|
|
2225
|
+
scimResource: scimResourceChangeSet,
|
|
2226
|
+
connection: connectionResult.changeSet
|
|
1952
2227
|
},
|
|
1953
|
-
conflicts,
|
|
1954
|
-
unmanaged,
|
|
1955
|
-
resourceOwners
|
|
2228
|
+
conflicts: [...conflicts, ...connectionResult.conflicts],
|
|
2229
|
+
unmanaged: [...unmanaged, ...connectionResult.unmanaged],
|
|
2230
|
+
resourceOwners: new Set([...resourceOwners, ...connectionResult.resourceOwners])
|
|
1956
2231
|
};
|
|
1957
2232
|
}
|
|
1958
2233
|
function trn$4(workspaceId, name) {
|
|
@@ -3832,48 +4107,6 @@ function protoFields(fields, baseName, isInput) {
|
|
|
3832
4107
|
});
|
|
3833
4108
|
}
|
|
3834
4109
|
|
|
3835
|
-
//#endregion
|
|
3836
|
-
//#region src/cli/commands/apply/secrets-state.ts
|
|
3837
|
-
const SecretsStateSchema = z.object({ vaults: z.record(z.string(), z.record(z.string(), z.string())) });
|
|
3838
|
-
/**
|
|
3839
|
-
* Get the file path for the secrets state JSON.
|
|
3840
|
-
* @returns Absolute path to secrets-state.json
|
|
3841
|
-
*/
|
|
3842
|
-
function getSecretsStatePath() {
|
|
3843
|
-
return path.join(getDistDir(), "secrets-state.json");
|
|
3844
|
-
}
|
|
3845
|
-
/**
|
|
3846
|
-
* Load secrets hash state from disk.
|
|
3847
|
-
* @returns Persisted state, or empty state if file is missing or corrupted
|
|
3848
|
-
*/
|
|
3849
|
-
function loadSecretsState() {
|
|
3850
|
-
const filePath = getSecretsStatePath();
|
|
3851
|
-
if (!existsSync(filePath)) return { vaults: {} };
|
|
3852
|
-
try {
|
|
3853
|
-
const raw = readFileSync(filePath, "utf-8");
|
|
3854
|
-
return SecretsStateSchema.parse(JSON.parse(raw));
|
|
3855
|
-
} catch {
|
|
3856
|
-
return { vaults: {} };
|
|
3857
|
-
}
|
|
3858
|
-
}
|
|
3859
|
-
/**
|
|
3860
|
-
* Save secrets hash state to disk.
|
|
3861
|
-
* @param state - The secrets state to persist
|
|
3862
|
-
*/
|
|
3863
|
-
function saveSecretsState(state) {
|
|
3864
|
-
const filePath = getSecretsStatePath();
|
|
3865
|
-
mkdirSync(path.dirname(filePath), { recursive: true });
|
|
3866
|
-
writeFileSync(filePath, JSON.stringify(state, null, 2), "utf-8");
|
|
3867
|
-
}
|
|
3868
|
-
/**
|
|
3869
|
-
* Compute SHA-256 hex digest of a value.
|
|
3870
|
-
* @param value - The string to hash
|
|
3871
|
-
* @returns Hex-encoded SHA-256 hash
|
|
3872
|
-
*/
|
|
3873
|
-
function hashValue(value) {
|
|
3874
|
-
return createHash("sha256").update(value).digest("hex");
|
|
3875
|
-
}
|
|
3876
|
-
|
|
3877
4110
|
//#endregion
|
|
3878
4111
|
//#region src/cli/commands/apply/secret-manager.ts
|
|
3879
4112
|
/**
|
|
@@ -7403,6 +7636,7 @@ function printPlanSummary(results) {
|
|
|
7403
7636
|
results.auth.changeSet.authHook,
|
|
7404
7637
|
results.auth.changeSet.scim,
|
|
7405
7638
|
results.auth.changeSet.scimResource,
|
|
7639
|
+
...results.auth.changeSet.connection ? [results.auth.changeSet.connection] : [],
|
|
7406
7640
|
results.pipeline.changeSet.service,
|
|
7407
7641
|
results.pipeline.changeSet.resolver,
|
|
7408
7642
|
results.app,
|
|
@@ -11691,7 +11925,7 @@ async function generate(options) {
|
|
|
11691
11925
|
if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
|
|
11692
11926
|
let pluginManager;
|
|
11693
11927
|
if (plugins.length > 0) pluginManager = new PluginManager(plugins);
|
|
11694
|
-
const { defineApplication } = await import("./application-
|
|
11928
|
+
const { defineApplication } = await import("./application-CLKuNo-l.mjs");
|
|
11695
11929
|
const application = defineApplication({
|
|
11696
11930
|
config,
|
|
11697
11931
|
pluginManager
|
|
@@ -13819,14 +14053,12 @@ function printSingleSqlResult(execResult, options = {}) {
|
|
|
13819
14053
|
logger.out(`rows: ${execResult.rowCount}`);
|
|
13820
14054
|
}
|
|
13821
14055
|
function splitSqlStatements(query) {
|
|
13822
|
-
|
|
13823
|
-
|
|
13824
|
-
|
|
13825
|
-
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
return trimmed.length > 0 ? [trimmed] : [];
|
|
13829
|
-
}
|
|
14056
|
+
const statements = parse(query, { locationTracking: true });
|
|
14057
|
+
return statements.map((s, i) => {
|
|
14058
|
+
const start = s._location.start;
|
|
14059
|
+
const end = i + 1 < statements.length ? statements[i + 1]._location.start : query.length;
|
|
14060
|
+
return query.substring(start, end);
|
|
14061
|
+
});
|
|
13830
14062
|
}
|
|
13831
14063
|
function isSQLExecutionResultArray(value) {
|
|
13832
14064
|
return Array.isArray(value) && value.length > 0 && value.every(isSQLExecutionResult);
|
|
@@ -13896,4 +14128,4 @@ function isDeno() {
|
|
|
13896
14128
|
|
|
13897
14129
|
//#endregion
|
|
13898
14130
|
export { getFolder as $, getNextMigrationNumber as $t, listWorkflows as A, functionExecutionStatusToString as At, updateCommand$1 as B, DB_TYPES_FILE_NAME as Bt, listApps as C, startCommand as Ct, resumeCommand as D, executionsCommand as Dt, healthCommand as E, getWorkflow as Et, show as F, executeScript as Ft, listOrganizations as G, compareLocalTypesWithSnapshot as Gt, organizationTree as H, INITIAL_SCHEMA_NUMBER as Ht, showCommand as I, waitForExecution$1 as It, updateCommand$2 as J, formatMigrationNumber as Jt, getCommand$1 as K, compareSnapshots as Kt, logBetaWarning as L, MIGRATION_LABEL_KEY as Lt, truncateCommand as M, getCommand$5 as Mt, generate as N, getExecutor as Nt, resumeWorkflow as O, getWorkflowExecution as Ot, generateCommand as P, apply as Pt, getCommand$2 as Q, getMigrationFiles as Qt, remove as R, parseMigrationLabelNumber as Rt, createWorkspace as S, watchExecutorJob as St, getAppHealth as T, getCommand$4 as Tt, treeCommand as U, MIGRATE_FILE_NAME as Ut, updateOrganization as V, DIFF_FILE_NAME as Vt, listCommand$4 as W, SCHEMA_FILE_NAME as Wt, listCommand$5 as X, getMigrationDirPath as Xt, updateFolder as Y, getLatestMigrationNumber as Yt, listFolders as Z, getMigrationFilePath as Zt, getCommand as _, isVerbose as _n, listCommand$8 as _t, updateCommand as a, hasChanges as an, listOAuth2Clients as at, deleteWorkspace as b, jobsCommand as bt, removeUser as c, sdkNameLabelKey as cn, getMachineUserToken as ct, inviteCommand as d, apiCall as dn, listMachineUsers as dt, isValidMigrationNumber as en, deleteCommand$1 as et, inviteUser as f, apiCommand as fn, generate$1 as ft, listWorkspaces as g, deploymentArgs as gn, triggerExecutor as gt, listCommand$1 as h, confirmationArgs as hn, triggerCommand as ht, isCLIError as i, formatMigrationDiff as in, listCommand$6 as it, truncate as j, formatKeyValueTable as jt, listCommand$3 as k, listWorkflowExecutions as kt, listCommand as l, trnPrefix as ln, tokenCommand as lt, restoreWorkspace as m, commonArgs as mn, webhookCommand as mt, query as n, reconstructSnapshotFromMigrations as nn, createCommand$1 as nt, updateUser as o, getNamespacesWithMigrations as on, getCommand$3 as ot, restoreCommand as p, defineAppCommand as pn, listWebhookExecutors as pt, getOrganization as q, createSnapshotFromLocalTypes as qt, queryCommand as r, formatDiffSummary as rn, createFolder as rt, removeCommand as s, prompt as sn, getOAuth2Client as st, isNativeTypeScriptRuntime as t, loadDiff as tn, deleteFolder as tt, listUsers as u, generateUserTypes as un, listCommand$7 as ut, getWorkspace as v, workspaceArgs as vn, listExecutors as vt, listCommand$2 as w, startWorkflow as wt, createCommand as x, listExecutorJobs as xt, deleteCommand as y, getExecutorJob as yt, removeCommand$1 as z, bundleMigrationScript as zt };
|
|
13899
|
-
//# sourceMappingURL=runtime-
|
|
14131
|
+
//# sourceMappingURL=runtime-8G74KN_M.mjs.map
|