@tailor-platform/sdk 1.35.1 → 1.36.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 +52 -0
- package/dist/application-BB5TqXWY.mjs +4 -0
- package/dist/{application-BnJRroGX.mjs → application-BwboBFcU.mjs} +102 -17
- package/dist/application-BwboBFcU.mjs.map +1 -0
- package/dist/cli/index.mjs +303 -17
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +190 -6
- package/dist/cli/lib.mjs +3 -3
- package/dist/{client-BmQP4kKS.mjs → client-B6icVEv4.mjs} +1 -1
- package/dist/{client-CA2NM_4R.mjs → client-CN15WgW2.mjs} +25 -8
- package/dist/client-CN15WgW2.mjs.map +1 -0
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +38 -9
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-Bd2T8BhU.mjs → crash-report-CB1UtT3O.mjs} +1 -1
- package/dist/{crash-report-CPkI2-cp.mjs → crash-report-CdxPj_SW.mjs} +2 -2
- package/dist/{crash-report-CPkI2-cp.mjs.map → crash-report-CdxPj_SW.mjs.map} +1 -1
- package/dist/{env-MSlwZt8l.d.mts → env-_ce3IYbl.d.mts} +2 -2
- package/dist/{index-B1Fgxi8D.d.mts → index-C7vIBAg8.d.mts} +2 -2
- package/dist/{index-wCoQup4y.d.mts → index-CYaunQeL.d.mts} +76 -6
- package/dist/{index-D-tMAFVp.d.mts → index-CxSLivW7.d.mts} +2 -2
- package/dist/{index-BG7YCyXF.d.mts → index-DDCyefuU.d.mts} +2 -2
- package/dist/{index-BBlE_vQF.d.mts → index-DZN1QFLM.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 +2 -2
- package/dist/{plugin-CZaJ3_QR.d.mts → plugin-CiPUxkyN.d.mts} +3 -2
- package/dist/{runtime-D4O-RfcH.mjs → runtime-C7RRDaB3.mjs} +230 -22
- package/dist/runtime-C7RRDaB3.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/{workflow.generated-IZ3kLjC_.d.mts → workflow.generated-8BeGQsVU.d.mts} +212 -4
- package/docs/cli/function.md +2 -2
- package/docs/services/idp.md +50 -0
- package/docs/services/resolver.md +1 -1
- package/docs/services/secret.md +25 -0
- package/docs/services/workflow.md +48 -0
- package/package.json +9 -8
- package/dist/application-BnJRroGX.mjs.map +0 -1
- package/dist/application-mGasp_EX.mjs +0 -4
- package/dist/client-CA2NM_4R.mjs.map +0 -1
- package/dist/runtime-D4O-RfcH.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-CiPUxkyN.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-C7vIBAg8.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { $ as FieldOptions, At as WebhookOperation$1, Ct as FunctionOperation$1, Dt as ResolverExecutedTrigger$1, Et as IncomingWebhookTrigger$1, F as UserAttributeListKey, H as TailorDBInstance, I as UserAttributeMap, Mt as AuthInvoker$1, Ot as ScheduleTriggerInput, Q as FieldMetadata, St as ExecutorInput, Tt as IdpUserTrigger$1, U as TailorDBType, X as ArrayFieldOutput, Z as DefinedFieldMetadata, _t as Resolver, at as JsonCompatible, bt as AuthAccessTokenTrigger$1, dt as TailorUser, et as FieldOutput, it as InferFieldsOutput, j as DefinedAuth, jt as WorkflowOperation$1, k as AuthServiceInput, kt as TailorDBTrigger$1, mt as AllowedValuesOutput, n as Plugin, nt as TailorAnyField, ot as output$1, pt as AllowedValues, rt as TailorField, tt as TailorFieldType, vt as ResolverInput, wt as GqlOperation$1, yt as GeneratorConfig } from "./plugin-
|
|
3
|
-
import { n as TailorEnv, r as TailorActor } from "./env-
|
|
4
|
-
import {
|
|
2
|
+
import { $ as FieldOptions, At as WebhookOperation$1, Ct as FunctionOperation$1, Dt as ResolverExecutedTrigger$1, Et as IncomingWebhookTrigger$1, F as UserAttributeListKey, H as TailorDBInstance, I as UserAttributeMap, Mt as AuthInvoker$1, Ot as ScheduleTriggerInput, Q as FieldMetadata, St as ExecutorInput, Tt as IdpUserTrigger$1, U as TailorDBType, X as ArrayFieldOutput, Z as DefinedFieldMetadata, _t as Resolver, at as JsonCompatible, bt as AuthAccessTokenTrigger$1, dt as TailorUser, et as FieldOutput, it as InferFieldsOutput, j as DefinedAuth, jt as WorkflowOperation$1, k as AuthServiceInput, kt as TailorDBTrigger$1, mt as AllowedValuesOutput, n as Plugin, nt as TailorAnyField, ot as output$1, pt as AllowedValues, rt as TailorField, tt as TailorFieldType, ut as InferredAttributeMap, vt as ResolverInput, wt as GqlOperation$1, yt as GeneratorConfig } from "./plugin-CiPUxkyN.mjs";
|
|
3
|
+
import { n as TailorEnv, r as TailorActor } from "./env-_ce3IYbl.mjs";
|
|
4
|
+
import { _ as IdpDefinitionBrand, g as IdPUserField, n as AppConfig, t as RetryPolicy, x as IdPInput } from "./workflow.generated-8BeGQsVU.mjs";
|
|
5
5
|
import * as _$zod from "zod";
|
|
6
6
|
import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
|
|
7
7
|
import { Client } from "@urql/core";
|
|
@@ -698,6 +698,74 @@ declare function createExecutor<Args, O extends Operation<Args> | {
|
|
|
698
698
|
workflow: Workflow;
|
|
699
699
|
}>(config: Executor<Trigger<Args>, O>): Executor<Trigger<Args>, O>;
|
|
700
700
|
//#endregion
|
|
701
|
+
//#region src/configure/services/idp/permission.d.ts
|
|
702
|
+
type EqualityOperator = "=" | "!=";
|
|
703
|
+
type ContainsOperator = "in" | "not in";
|
|
704
|
+
type StringFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string ? K : never }[keyof User];
|
|
705
|
+
type StringArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string[] ? K : never }[keyof User];
|
|
706
|
+
type BooleanFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean ? K : never }[keyof User];
|
|
707
|
+
type BooleanArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean[] ? K : never }[keyof User];
|
|
708
|
+
type UserStringOperand<User extends object = InferredAttributeMap> = {
|
|
709
|
+
user: StringFieldKeys<User> | "id";
|
|
710
|
+
};
|
|
711
|
+
type UserStringArrayOperand<User extends object = InferredAttributeMap> = {
|
|
712
|
+
user: StringArrayFieldKeys<User>;
|
|
713
|
+
};
|
|
714
|
+
type UserBooleanOperand<User extends object = InferredAttributeMap> = {
|
|
715
|
+
user: BooleanFieldKeys<User> | "_loggedIn";
|
|
716
|
+
};
|
|
717
|
+
type UserBooleanArrayOperand<User extends object = InferredAttributeMap> = {
|
|
718
|
+
user: BooleanArrayFieldKeys<User>;
|
|
719
|
+
};
|
|
720
|
+
type IdPUserOperand<Update extends boolean = false> = Update extends true ? {
|
|
721
|
+
oldIdpUser: IdPUserField;
|
|
722
|
+
} | {
|
|
723
|
+
newIdpUser: IdPUserField;
|
|
724
|
+
} : {
|
|
725
|
+
idpUser: IdPUserField;
|
|
726
|
+
};
|
|
727
|
+
type StringEqualityCondition<User extends object, Update extends boolean> = readonly [string, EqualityOperator, string] | readonly [UserStringOperand<User>, EqualityOperator, string] | readonly [string, EqualityOperator, UserStringOperand<User>] | readonly [IdPUserOperand<Update>, EqualityOperator, string | UserStringOperand<User> | IdPUserOperand<Update>] | readonly [string | UserStringOperand<User>, EqualityOperator, IdPUserOperand<Update>];
|
|
728
|
+
type BooleanEqualityCondition<User extends object, Update extends boolean> = readonly [boolean, EqualityOperator, boolean] | readonly [UserBooleanOperand<User>, EqualityOperator, boolean] | readonly [boolean, EqualityOperator, UserBooleanOperand<User>] | readonly [IdPUserOperand<Update>, EqualityOperator, boolean | UserBooleanOperand<User> | IdPUserOperand<Update>] | readonly [boolean | UserBooleanOperand<User>, EqualityOperator, IdPUserOperand<Update>];
|
|
729
|
+
type EqualityCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = StringEqualityCondition<User, Update> | BooleanEqualityCondition<User, Update>;
|
|
730
|
+
type StringContainsCondition<User extends object, Update extends boolean> = readonly [string, ContainsOperator, string[]] | readonly [UserStringOperand<User>, ContainsOperator, string[]] | readonly [string, ContainsOperator, UserStringArrayOperand<User>] | readonly [IdPUserOperand<Update>, ContainsOperator, string[] | UserStringArrayOperand<User>];
|
|
731
|
+
type BooleanContainsCondition<User extends object, Update extends boolean> = readonly [boolean, ContainsOperator, boolean[]] | readonly [UserBooleanOperand<User>, ContainsOperator, boolean[]] | readonly [boolean, ContainsOperator, UserBooleanArrayOperand<User>] | readonly [IdPUserOperand<Update>, ContainsOperator, boolean[] | UserBooleanArrayOperand<User>];
|
|
732
|
+
type ContainsCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = StringContainsCondition<User, Update> | BooleanContainsCondition<User, Update>;
|
|
733
|
+
type IdPPermissionCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = EqualityCondition<User, Update> | ContainsCondition<User, Update>;
|
|
734
|
+
type IdPActionPermission<User extends object = InferredAttributeMap, Update extends boolean = boolean> = {
|
|
735
|
+
conditions: IdPPermissionCondition<User, Update> | readonly IdPPermissionCondition<User, Update>[];
|
|
736
|
+
description?: string | undefined;
|
|
737
|
+
permit?: boolean;
|
|
738
|
+
} | readonly [...IdPPermissionCondition<User, Update>, ...([] | [boolean])] | readonly [...IdPPermissionCondition<User, Update>[], ...([] | [boolean])];
|
|
739
|
+
/**
|
|
740
|
+
* Per-operation permission policies for an IdP service.
|
|
741
|
+
* Defines create, read, update, delete, and sendPasswordResetEmail permissions.
|
|
742
|
+
*
|
|
743
|
+
* For update operations, use `newIdpUser`/`oldIdpUser` operands instead of `idpUser`.
|
|
744
|
+
* @example
|
|
745
|
+
* const permission: IdPPermission = {
|
|
746
|
+
* create: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
|
|
747
|
+
* read: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
748
|
+
* update: [{ conditions: [[{ newIdpUser: "name" }, "=", { user: "id" }]], permit: true }],
|
|
749
|
+
* delete: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
|
|
750
|
+
* sendPasswordResetEmail: [{ conditions: [], permit: true }],
|
|
751
|
+
* };
|
|
752
|
+
*/
|
|
753
|
+
type IdPPermission<User extends object = InferredAttributeMap> = {
|
|
754
|
+
create: readonly IdPActionPermission<User, false>[];
|
|
755
|
+
read: readonly IdPActionPermission<User, false>[];
|
|
756
|
+
update: readonly IdPActionPermission<User, true>[];
|
|
757
|
+
delete: readonly IdPActionPermission<User, false>[];
|
|
758
|
+
sendPasswordResetEmail: readonly IdPActionPermission<User, false>[];
|
|
759
|
+
};
|
|
760
|
+
/**
|
|
761
|
+
* Grants full IdP permission access without any conditions.
|
|
762
|
+
*
|
|
763
|
+
* Unsafe and intended only for local development, prototyping, or tests.
|
|
764
|
+
* Do not use this in production environments, as it effectively disables
|
|
765
|
+
* authorization checks.
|
|
766
|
+
*/
|
|
767
|
+
declare const unsafeAllowAllIdPPermission: IdPPermission;
|
|
768
|
+
//#endregion
|
|
701
769
|
//#region src/configure/services/idp/index.d.ts
|
|
702
770
|
/**
|
|
703
771
|
* Define an IdP service configuration for the Tailor SDK.
|
|
@@ -706,8 +774,9 @@ declare function createExecutor<Args, O extends Operation<Args> | {
|
|
|
706
774
|
* @param config - IdP configuration
|
|
707
775
|
* @returns Defined IdP service
|
|
708
776
|
*/
|
|
709
|
-
declare function defineIdp<const TClients extends string[]>(name: string, config: Omit<IdPInput, "name" | "clients"> & {
|
|
777
|
+
declare function defineIdp<const TClients extends string[]>(name: string, config: Omit<IdPInput, "name" | "clients" | "permission"> & {
|
|
710
778
|
clients: TClients;
|
|
779
|
+
permission?: IdPPermission;
|
|
711
780
|
}): {
|
|
712
781
|
readonly name: string;
|
|
713
782
|
readonly provider: (providerName: string, clientName: TClients[number]) => {
|
|
@@ -747,6 +816,7 @@ declare function defineIdp<const TClients extends string[]>(name: string, config
|
|
|
747
816
|
passwordResetSubject?: string | undefined;
|
|
748
817
|
} | undefined;
|
|
749
818
|
readonly clients: TClients;
|
|
819
|
+
readonly permission?: IdPPermission;
|
|
750
820
|
} & IdpDefinitionBrand;
|
|
751
821
|
//#endregion
|
|
752
822
|
//#region src/configure/config.d.ts
|
|
@@ -870,5 +940,5 @@ declare namespace t {
|
|
|
870
940
|
type infer<T> = TailorOutput<T>;
|
|
871
941
|
}
|
|
872
942
|
//#endregion
|
|
873
|
-
export {
|
|
874
|
-
//# sourceMappingURL=index-
|
|
943
|
+
export { WorkflowOperation as $, RecordCreatedArgs as A, idpUserCreatedTrigger as B, AuthAccessTokenRevokedArgs as C, IdpUserDeletedArgs as D, IdpUserCreatedArgs as E, TailorDBTrigger as F, recordDeletedTrigger as G, idpUserTrigger as H, authAccessTokenIssuedTrigger as I, resolverExecutedTrigger as J, recordTrigger as K, authAccessTokenRefreshedTrigger as L, RecordUpdatedArgs as M, ResolverExecutedArgs as N, IdpUserTrigger as O, ResolverExecutedTrigger as P, WebhookOperation as Q, authAccessTokenRevokedTrigger as R, AuthAccessTokenRefreshedArgs as S, IdpUserArgs as T, idpUserUpdatedTrigger as U, idpUserDeletedTrigger as V, recordCreatedTrigger as W, GqlOperation as X, FunctionOperation as Y, Operation as Z, ScheduleArgs as _, defineGenerators as a, WorkflowJobContext as at, AuthAccessTokenArgs as b, IdPPermission as c, createWorkflowJob as ct, createExecutor as d, AuthInvoker as dt, Workflow as et, Trigger as f, defineAuth as ft, incomingWebhookTrigger as g, IncomingWebhookTrigger as h, defineConfig as i, WorkflowJob as it, RecordDeletedArgs as j, IdpUserUpdatedArgs as k, IdPPermissionCondition as l, QueryType as lt, IncomingWebhookRequest as m, output as n, createWorkflow as nt, definePlugins as o, WorkflowJobInput as ot, IncomingWebhookArgs as p, recordUpdatedTrigger as q, t as r, WORKFLOW_TEST_ENV_KEY as rt, defineIdp as s, WorkflowJobOutput as st, infer as t, WorkflowConfig as tt, unsafeAllowAllIdPPermission as u, createResolver as ut, ScheduleTrigger as v, AuthAccessTokenTrigger as w, AuthAccessTokenIssuedArgs as x, scheduleTrigger as y, authAccessTokenTrigger as z };
|
|
944
|
+
//# sourceMappingURL=index-CYaunQeL.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-CiPUxkyN.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-CxSLivW7.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-CiPUxkyN.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/file-utils/index.d.ts
|
|
5
5
|
/** Unique identifier for the file utilities generator plugin. */
|
|
@@ -16,4 +16,4 @@ type FileUtilsPluginOptions = {
|
|
|
16
16
|
declare function fileUtilsPlugin(options: FileUtilsPluginOptions): Plugin<unknown, FileUtilsPluginOptions>;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { fileUtilsPlugin as n, FileUtilsGeneratorID as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-DDCyefuU.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-CiPUxkyN.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-DZN1QFLM.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-DZN1QFLM.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-DDCyefuU.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-C7vIBAg8.mjs";
|
|
3
3
|
export { KyselyGeneratorID, kyselyTypePlugin };
|
package/dist/plugin/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { B as TailorAnyDBType } from "../plugin-
|
|
3
|
-
import { n as TailorEnv, r as TailorActor } from "../env-
|
|
2
|
+
import { B as TailorAnyDBType } from "../plugin-CiPUxkyN.mjs";
|
|
3
|
+
import { n as TailorEnv, r as TailorActor } from "../env-_ce3IYbl.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin/with-context.d.ts
|
|
6
6
|
/**
|
|
@@ -51,7 +51,8 @@ type SAML = {
|
|
|
51
51
|
kind: "SAML"; /** Enable signing of SAML requests */
|
|
52
52
|
enableSignRequest: boolean; /** URL to fetch SAML metadata (mutually exclusive with rawMetadata) */
|
|
53
53
|
metadataURL?: string | undefined; /** Raw SAML metadata XML (mutually exclusive with metadataURL) */
|
|
54
|
-
rawMetadata?: string | undefined;
|
|
54
|
+
rawMetadata?: string | undefined; /** URL to redirect to when SAML ACS receives a response with an empty RelayState. */
|
|
55
|
+
defaultRedirectURL?: string | undefined;
|
|
55
56
|
};
|
|
56
57
|
type IDToken = {
|
|
57
58
|
/** Identity provider name */name: string;
|
|
@@ -2069,4 +2070,4 @@ interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
|
|
|
2069
2070
|
}
|
|
2070
2071
|
//#endregion
|
|
2071
2072
|
export { FieldOptions as $, BeforeLoginHookArgs as A, WebhookOperation as At, TailorAnyDBType as B, SCIMAttributeMapping as Bt, TailorDBType as C, FunctionOperation as Ct, AuthExternalConfig as D, ResolverExecutedTrigger as Dt, AuthConnectionTokenResult as E, IncomingWebhookTrigger as Et, UserAttributeListKey as F, IdProvider as Ft, PermissionCondition as G, TailorDBInstance as H, SCIMConfig as Ht, UserAttributeMap as I, OAuth2ClientInput as It, unsafeAllowAllGqlPermission as J, TailorTypeGqlPermission as K, UsernameFieldKey as L, OIDC as Lt, OAuth2ClientGrantType as M, AuthInvoker as Mt, SCIMAttributeType as N, BuiltinIdP as Nt, AuthOwnConfig as O, ScheduleTriggerInput as Ot, UserAttributeKey as P, IDToken as Pt, FieldMetadata as Q, ValueOperand as R, SAML as Rt, TailorDBServiceInput as S, ExecutorInput as St, AuthConfig as T, IdpUserTrigger as Tt, TailorDBType$1 as U, SCIMResource as Ut, TailorDBField as V, SCIMAuthorization as Vt, db as W, TenantProvider as Wt, ArrayFieldOutput as X, unsafeAllowAllTypePermission as Y, DefinedFieldMetadata as Z, GeneratorResult as _, Resolver as _t, PluginExecutorContext as a, JsonCompatible as at, TailorDBNamespaceData as b, AuthAccessTokenTrigger as bt, PluginGeneratedExecutorWithFile as c, AttributeMap as ct, PluginNamespaceProcessContext as d, TailorUser as dt, FieldOutput$1 as et, PluginOutput as f, unauthenticatedTailorUser as ft, ExecutorReadyContext as g, AuthConnectionOAuth2Config as gt, TypePluginOutput as h, AuthConnectionConfig as ht, PluginConfigs as i, InferFieldsOutput as it, DefinedAuth as j, WorkflowOperation as jt, AuthServiceInput as k, TailorDBTrigger as kt, PluginGeneratedResolver as l, InferredAttributeList as lt, TailorDBTypeForPlugin as m, AllowedValuesOutput as mt, Plugin as n, TailorAnyField as nt, PluginExecutorContextBase as o, output as ot, PluginProcessContext as p, AllowedValues as pt, TailorTypePermission as q, PluginAttachment as r, TailorField as rt, PluginGeneratedExecutor as s, AttributeList as st, NamespacePluginOutput as t, TailorFieldType as tt, PluginGeneratedType as u, InferredAttributeMap as ut, ResolverNamespaceData as v, ResolverInput as vt, TypeSourceInfoEntry as w, GqlOperation as wt, TailorDBReadyContext as x, Executor as xt, ResolverReadyContext as y, GeneratorConfig as yt, TailorAnyDBField as z, SCIMAttribute as zt };
|
|
2072
|
-
//# sourceMappingURL=plugin-
|
|
2073
|
+
//# sourceMappingURL=plugin-CiPUxkyN.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as ExecutorJobStatus, B as AuthSCIMAttribute_Type, C as TailorDBType_PermitAction, D as IdPPermissionPermit, E as IdPPermissionOperator, F as AuthIDPConfig_AuthType, G as UserProfileProviderConfig_UserProfileProviderType, H as AuthSCIMConfig_AuthorizationType, I as AuthInvokerSchema, J as Condition_Operator, K as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, L as AuthOAuth2Client_ClientType, M as ExecutorTriggerType, N as AuthConnection_Type, O as FunctionExecution_Status, P as AuthHookPoint, Q as Subgraph_ServiceType, R as AuthOAuth2Client_GrantType, S as TailorDBType_Permission_Permit, T as IdPLang, V as AuthSCIMAttribute_Uniqueness, W as TenantProviderConfig_TenantProviderType, X as PageDirection, Y as FilterSchema, Z 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 ExecutorTargetType, m as userAgent, p as resolveStaticWebsiteUrls, q as ConditionSchema, u as initOperatorClient, v as TailorDBGQLPermission_Action, w as PipelineResolver_OperationType, x as TailorDBType_Permission_Operator, y as TailorDBGQLPermission_Operator, z as AuthSCIMAttribute_Mutability } from "./client-CN15WgW2.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-BwboBFcU.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";
|
|
@@ -1763,6 +1763,99 @@ async function applyFunctionRegistry(client, workspaceId, result, phase = "creat
|
|
|
1763
1763
|
})));
|
|
1764
1764
|
}
|
|
1765
1765
|
|
|
1766
|
+
//#endregion
|
|
1767
|
+
//#region src/parser/service/idp/permission.ts
|
|
1768
|
+
const operatorMap = {
|
|
1769
|
+
"=": "eq",
|
|
1770
|
+
"!=": "ne",
|
|
1771
|
+
in: "in",
|
|
1772
|
+
"not in": "nin"
|
|
1773
|
+
};
|
|
1774
|
+
function normalizeOperand(operand) {
|
|
1775
|
+
if (typeof operand === "object" && !Array.isArray(operand) && "user" in operand) return { user: operand.user === "id" ? "_id" : operand.user };
|
|
1776
|
+
return operand;
|
|
1777
|
+
}
|
|
1778
|
+
function normalizeConditions(conditions) {
|
|
1779
|
+
return conditions.map((cond) => {
|
|
1780
|
+
const [left, operator, right] = cond;
|
|
1781
|
+
return [
|
|
1782
|
+
normalizeOperand(left),
|
|
1783
|
+
operatorMap[operator],
|
|
1784
|
+
normalizeOperand(right)
|
|
1785
|
+
];
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
function isObjectFormat(p) {
|
|
1789
|
+
return typeof p === "object" && p !== null && "conditions" in p;
|
|
1790
|
+
}
|
|
1791
|
+
function isSingleArrayConditionFormat(cond) {
|
|
1792
|
+
return cond.length >= 2 && typeof cond[1] === "string";
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Normalize a single IdP action permission into the standard format.
|
|
1796
|
+
* @param permission - Raw permission definition
|
|
1797
|
+
* @returns Normalized action permission
|
|
1798
|
+
*/
|
|
1799
|
+
function normalizeIdPActionPermission(permission) {
|
|
1800
|
+
if (isObjectFormat(permission)) {
|
|
1801
|
+
const conditions = permission.conditions;
|
|
1802
|
+
return {
|
|
1803
|
+
conditions: normalizeConditions(isSingleArrayConditionFormat(conditions) ? [conditions] : conditions),
|
|
1804
|
+
permit: permission.permit ? "allow" : "deny",
|
|
1805
|
+
description: permission.description
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1808
|
+
if (!Array.isArray(permission)) throw new Error("Invalid permission format");
|
|
1809
|
+
if (isSingleArrayConditionFormat(permission)) {
|
|
1810
|
+
const [op1, operator, op2, permit] = [...permission, true];
|
|
1811
|
+
return {
|
|
1812
|
+
conditions: normalizeConditions([[
|
|
1813
|
+
op1,
|
|
1814
|
+
operator,
|
|
1815
|
+
op2
|
|
1816
|
+
]]),
|
|
1817
|
+
permit: permit ? "allow" : "deny"
|
|
1818
|
+
};
|
|
1819
|
+
}
|
|
1820
|
+
const conditions = [];
|
|
1821
|
+
const conditionArray = permission;
|
|
1822
|
+
let conditionArrayPermit = true;
|
|
1823
|
+
for (const item of conditionArray) {
|
|
1824
|
+
if (typeof item === "boolean") {
|
|
1825
|
+
conditionArrayPermit = item;
|
|
1826
|
+
continue;
|
|
1827
|
+
}
|
|
1828
|
+
conditions.push(item);
|
|
1829
|
+
}
|
|
1830
|
+
return {
|
|
1831
|
+
conditions: normalizeConditions(conditions),
|
|
1832
|
+
permit: conditionArrayPermit ? "allow" : "deny"
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
/**
|
|
1836
|
+
* Normalize raw IdP permission into standard form.
|
|
1837
|
+
* @param permission - Raw IdP permission from user config
|
|
1838
|
+
* @returns Normalized IdP permission
|
|
1839
|
+
*/
|
|
1840
|
+
function normalizeIdPPermission(permission) {
|
|
1841
|
+
return {
|
|
1842
|
+
create: permission.create.map((p) => normalizeIdPActionPermission(p)),
|
|
1843
|
+
read: permission.read.map((p) => normalizeIdPActionPermission(p)),
|
|
1844
|
+
update: permission.update.map((p) => normalizeIdPActionPermission(p)),
|
|
1845
|
+
delete: permission.delete.map((p) => normalizeIdPActionPermission(p)),
|
|
1846
|
+
sendPasswordResetEmail: permission.sendPasswordResetEmail.map((p) => normalizeIdPActionPermission(p))
|
|
1847
|
+
};
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Parse raw IdP permission, returning undefined if not set.
|
|
1851
|
+
* @param rawPermission - Raw permission from parsed config
|
|
1852
|
+
* @returns Normalized permission or undefined
|
|
1853
|
+
*/
|
|
1854
|
+
function parseIdPPermission(rawPermission) {
|
|
1855
|
+
if (!rawPermission) return;
|
|
1856
|
+
return normalizeIdPPermission(rawPermission);
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1766
1859
|
//#endregion
|
|
1767
1860
|
//#region src/cli/commands/apply/idp.ts
|
|
1768
1861
|
/**
|
|
@@ -1910,7 +2003,27 @@ function normalizeComparableIdPService(input) {
|
|
|
1910
2003
|
userAuthPolicy: input.userAuthPolicy,
|
|
1911
2004
|
publishUserEvents: input.publishUserEvents,
|
|
1912
2005
|
disableGqlOperations: input.disableGqlOperations,
|
|
1913
|
-
emailConfig: input.emailConfig
|
|
2006
|
+
emailConfig: input.emailConfig,
|
|
2007
|
+
permission: input.permission
|
|
2008
|
+
};
|
|
2009
|
+
}
|
|
2010
|
+
function normalizeComparablePermission(permission) {
|
|
2011
|
+
if (!permission) return;
|
|
2012
|
+
const normalizePolicy = (policy) => ({
|
|
2013
|
+
conditions: policy.conditions.map((c) => ({
|
|
2014
|
+
left: c.left ? { kind: c.left.kind } : void 0,
|
|
2015
|
+
operator: c.operator,
|
|
2016
|
+
right: c.right ? { kind: c.right.kind } : void 0
|
|
2017
|
+
})),
|
|
2018
|
+
permit: policy.permit,
|
|
2019
|
+
description: policy.description
|
|
2020
|
+
});
|
|
2021
|
+
return {
|
|
2022
|
+
create: permission.create.map(normalizePolicy),
|
|
2023
|
+
read: permission.read.map(normalizePolicy),
|
|
2024
|
+
update: permission.update.map(normalizePolicy),
|
|
2025
|
+
delete: permission.delete.map(normalizePolicy),
|
|
2026
|
+
sendPasswordResetEmail: permission.sendPasswordResetEmail.map(normalizePolicy)
|
|
1914
2027
|
};
|
|
1915
2028
|
}
|
|
1916
2029
|
function areIdPServicesEqual(existing, desired) {
|
|
@@ -1920,7 +2033,8 @@ function areIdPServicesEqual(existing, desired) {
|
|
|
1920
2033
|
userAuthPolicy: normalizeComparableUserAuthPolicy(existing.userAuthPolicy),
|
|
1921
2034
|
publishUserEvents: existing.publishUserEvents,
|
|
1922
2035
|
disableGqlOperations: normalizeComparableDisableGqlOperations(existing.disableGqlOperations),
|
|
1923
|
-
emailConfig: normalizeComparableEmailConfig(existing.emailConfig)
|
|
2036
|
+
emailConfig: normalizeComparableEmailConfig(existing.emailConfig),
|
|
2037
|
+
permission: normalizeComparablePermission(existing.permission)
|
|
1924
2038
|
}), desired);
|
|
1925
2039
|
}
|
|
1926
2040
|
async function planServices$3(client, workspaceId, appName, idps) {
|
|
@@ -1971,13 +2085,17 @@ async function planServices$3(client, workspaceId, appName, idps) {
|
|
|
1971
2085
|
const userAuthPolicy = idp.userAuthPolicy;
|
|
1972
2086
|
const publishUserEvents = idp.publishUserEvents ?? false;
|
|
1973
2087
|
const emailConfig = idp.emailConfig;
|
|
2088
|
+
if (!idp.permission) logger.warn(`IdP service "${namespaceName}" has no permission configured.`);
|
|
2089
|
+
const parsedPermission = parseIdPPermission(idp.permission);
|
|
2090
|
+
const protoPermission = parsedPermission ? protoIdPPermission(parsedPermission) : void 0;
|
|
1974
2091
|
const desired = normalizeComparableIdPService({
|
|
1975
2092
|
authorization,
|
|
1976
2093
|
lang,
|
|
1977
2094
|
userAuthPolicy: normalizeComparableUserAuthPolicy(userAuthPolicy),
|
|
1978
2095
|
publishUserEvents,
|
|
1979
2096
|
disableGqlOperations: normalizeComparableDisableGqlOperations(convertGqlOperationsToDisable(idp.gqlOperations)),
|
|
1980
|
-
emailConfig: normalizeComparableEmailConfig(emailConfig)
|
|
2097
|
+
emailConfig: normalizeComparableEmailConfig(emailConfig),
|
|
2098
|
+
permission: protoPermission
|
|
1981
2099
|
});
|
|
1982
2100
|
const request = {
|
|
1983
2101
|
workspaceId,
|
|
@@ -1987,7 +2105,8 @@ async function planServices$3(client, workspaceId, appName, idps) {
|
|
|
1987
2105
|
userAuthPolicy,
|
|
1988
2106
|
publishUserEvents,
|
|
1989
2107
|
disableGqlOperations: convertGqlOperationsToDisable(idp.gqlOperations),
|
|
1990
|
-
emailConfig
|
|
2108
|
+
emailConfig,
|
|
2109
|
+
permission: protoPermission
|
|
1991
2110
|
};
|
|
1992
2111
|
if (existing) {
|
|
1993
2112
|
const isManagedByApp = existing.label === appName;
|
|
@@ -2119,6 +2238,81 @@ function convertGqlOperationsToDisable(gqlOperations) {
|
|
|
2119
2238
|
sendPasswordResetEmail: gqlOperations.sendPasswordResetEmail === false
|
|
2120
2239
|
};
|
|
2121
2240
|
}
|
|
2241
|
+
function protoIdPPermission(permission) {
|
|
2242
|
+
return {
|
|
2243
|
+
create: permission.create.map((p) => protoIdPPolicy(p)),
|
|
2244
|
+
read: permission.read.map((p) => protoIdPPolicy(p)),
|
|
2245
|
+
update: permission.update.map((p) => protoIdPPolicy(p)),
|
|
2246
|
+
delete: permission.delete.map((p) => protoIdPPolicy(p)),
|
|
2247
|
+
sendPasswordResetEmail: permission.sendPasswordResetEmail.map((p) => protoIdPPolicy(p))
|
|
2248
|
+
};
|
|
2249
|
+
}
|
|
2250
|
+
function protoIdPPolicy(policy) {
|
|
2251
|
+
let permit;
|
|
2252
|
+
switch (policy.permit) {
|
|
2253
|
+
case "allow":
|
|
2254
|
+
permit = IdPPermissionPermit.ALLOW;
|
|
2255
|
+
break;
|
|
2256
|
+
case "deny":
|
|
2257
|
+
permit = IdPPermissionPermit.DENY;
|
|
2258
|
+
break;
|
|
2259
|
+
default: throw new Error(`Unknown permission: ${policy.permit}`);
|
|
2260
|
+
}
|
|
2261
|
+
return {
|
|
2262
|
+
conditions: policy.conditions.map((cond) => protoIdPCondition(cond)),
|
|
2263
|
+
permit,
|
|
2264
|
+
description: policy.description
|
|
2265
|
+
};
|
|
2266
|
+
}
|
|
2267
|
+
function protoIdPCondition(condition) {
|
|
2268
|
+
const [left, operator, right] = condition;
|
|
2269
|
+
const l = protoIdPOperand(left);
|
|
2270
|
+
const r = protoIdPOperand(right);
|
|
2271
|
+
let op;
|
|
2272
|
+
switch (operator) {
|
|
2273
|
+
case "eq":
|
|
2274
|
+
op = IdPPermissionOperator.EQ;
|
|
2275
|
+
break;
|
|
2276
|
+
case "ne":
|
|
2277
|
+
op = IdPPermissionOperator.NE;
|
|
2278
|
+
break;
|
|
2279
|
+
case "in":
|
|
2280
|
+
op = IdPPermissionOperator.IN;
|
|
2281
|
+
break;
|
|
2282
|
+
case "nin":
|
|
2283
|
+
op = IdPPermissionOperator.NIN;
|
|
2284
|
+
break;
|
|
2285
|
+
default: throw new Error(`Unknown operator: ${operator}`);
|
|
2286
|
+
}
|
|
2287
|
+
return {
|
|
2288
|
+
left: l,
|
|
2289
|
+
operator: op,
|
|
2290
|
+
right: r
|
|
2291
|
+
};
|
|
2292
|
+
}
|
|
2293
|
+
function protoIdPOperand(operand) {
|
|
2294
|
+
if (typeof operand === "object" && !Array.isArray(operand)) if ("user" in operand) return { kind: {
|
|
2295
|
+
case: "userField",
|
|
2296
|
+
value: operand.user
|
|
2297
|
+
} };
|
|
2298
|
+
else if ("idpUser" in operand) return { kind: {
|
|
2299
|
+
case: "idpUserField",
|
|
2300
|
+
value: operand.idpUser
|
|
2301
|
+
} };
|
|
2302
|
+
else if ("newIdpUser" in operand) return { kind: {
|
|
2303
|
+
case: "newIdpUserField",
|
|
2304
|
+
value: operand.newIdpUser
|
|
2305
|
+
} };
|
|
2306
|
+
else if ("oldIdpUser" in operand) return { kind: {
|
|
2307
|
+
case: "oldIdpUserField",
|
|
2308
|
+
value: operand.oldIdpUser
|
|
2309
|
+
} };
|
|
2310
|
+
else throw new Error(`Unknown operand: ${JSON.stringify(operand)}`);
|
|
2311
|
+
return { kind: {
|
|
2312
|
+
case: "value",
|
|
2313
|
+
value: fromJson(ValueSchema, operand)
|
|
2314
|
+
} };
|
|
2315
|
+
}
|
|
2122
2316
|
|
|
2123
2317
|
//#endregion
|
|
2124
2318
|
//#region src/cli/commands/apply/auth.ts
|
|
@@ -2447,7 +2641,8 @@ function protoIdPConfig(idpConfig) {
|
|
|
2447
2641
|
case: "saml",
|
|
2448
2642
|
value: {
|
|
2449
2643
|
...idpConfig.metadataURL !== void 0 ? { metadataUrl: idpConfig.metadataURL } : { rawMetadata: idpConfig.rawMetadata },
|
|
2450
|
-
enableSignRequest: idpConfig.enableSignRequest
|
|
2644
|
+
enableSignRequest: idpConfig.enableSignRequest,
|
|
2645
|
+
defaultRedirectUrl: idpConfig.defaultRedirectURL
|
|
2451
2646
|
}
|
|
2452
2647
|
} }
|
|
2453
2648
|
};
|
|
@@ -4145,6 +4340,7 @@ async function planSecretManager(context) {
|
|
|
4145
4340
|
};
|
|
4146
4341
|
}));
|
|
4147
4342
|
const state = loadSecretsState();
|
|
4343
|
+
const skippedSecrets = [];
|
|
4148
4344
|
await Promise.all(secretVaults.map(async (vault) => {
|
|
4149
4345
|
const vaultName = vault.vaultName;
|
|
4150
4346
|
const existing = existingVaults[vaultName];
|
|
@@ -4185,24 +4381,31 @@ async function planSecretManager(context) {
|
|
|
4185
4381
|
}
|
|
4186
4382
|
})).map((s) => s.name);
|
|
4187
4383
|
const existingSet = new Set(existingSecrets);
|
|
4188
|
-
for (const secret of vault.secrets)
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4384
|
+
for (const secret of vault.secrets) {
|
|
4385
|
+
if (secret.value == null) {
|
|
4386
|
+
existingSet.delete(secret.name);
|
|
4387
|
+
skippedSecrets.push(`${vaultName}/${secret.name}`);
|
|
4388
|
+
continue;
|
|
4389
|
+
}
|
|
4390
|
+
if (existingSet.has(secret.name)) {
|
|
4391
|
+
const currentHash = hashValue(secret.value);
|
|
4392
|
+
const storedHash = state.vaults[vaultName]?.[secret.name];
|
|
4393
|
+
if (forceApplyAll || currentHash !== storedHash) secretChangeSet.updates.push({
|
|
4394
|
+
name: `${vaultName}/${secret.name}`,
|
|
4395
|
+
secretName: secret.name,
|
|
4396
|
+
workspaceId,
|
|
4397
|
+
vaultName,
|
|
4398
|
+
value: secret.value
|
|
4399
|
+
});
|
|
4400
|
+
existingSet.delete(secret.name);
|
|
4401
|
+
} else secretChangeSet.creates.push({
|
|
4192
4402
|
name: `${vaultName}/${secret.name}`,
|
|
4193
4403
|
secretName: secret.name,
|
|
4194
4404
|
workspaceId,
|
|
4195
4405
|
vaultName,
|
|
4196
4406
|
value: secret.value
|
|
4197
4407
|
});
|
|
4198
|
-
|
|
4199
|
-
} else secretChangeSet.creates.push({
|
|
4200
|
-
name: `${vaultName}/${secret.name}`,
|
|
4201
|
-
secretName: secret.name,
|
|
4202
|
-
workspaceId,
|
|
4203
|
-
vaultName,
|
|
4204
|
-
value: secret.value
|
|
4205
|
-
});
|
|
4408
|
+
}
|
|
4206
4409
|
for (const orphanName of existingSet) secretChangeSet.deletes.push({
|
|
4207
4410
|
name: `${vaultName}/${orphanName}`,
|
|
4208
4411
|
secretName: orphanName,
|
|
@@ -4243,9 +4446,14 @@ async function planSecretManager(context) {
|
|
|
4243
4446
|
}
|
|
4244
4447
|
vaultChangeSet.print();
|
|
4245
4448
|
secretChangeSet.print();
|
|
4449
|
+
if (skippedSecrets.length > 0) {
|
|
4450
|
+
logger.log(styles.bold("Secret Manager secrets (skipped - no value provided):"));
|
|
4451
|
+
for (const name of skippedSecrets) logger.log(` ${styles.dim("○")} ${name}`);
|
|
4452
|
+
}
|
|
4246
4453
|
return {
|
|
4247
4454
|
vaultChangeSet,
|
|
4248
4455
|
secretChangeSet,
|
|
4456
|
+
skippedSecrets,
|
|
4249
4457
|
conflicts,
|
|
4250
4458
|
unmanaged,
|
|
4251
4459
|
resourceOwners
|
|
@@ -4295,7 +4503,7 @@ async function applySecretManager(client, result, phase = "create-update", appli
|
|
|
4295
4503
|
const state = loadSecretsState();
|
|
4296
4504
|
for (const vault of application.secrets) {
|
|
4297
4505
|
if (!state.vaults[vault.vaultName]) state.vaults[vault.vaultName] = {};
|
|
4298
|
-
for (const secret of vault.secrets) state.vaults[vault.vaultName][secret.name] = hashValue(secret.value);
|
|
4506
|
+
for (const secret of vault.secrets) if (secret.value != null) state.vaults[vault.vaultName][secret.name] = hashValue(secret.value);
|
|
4299
4507
|
}
|
|
4300
4508
|
saveSecretsState(state);
|
|
4301
4509
|
}
|
|
@@ -11925,7 +12133,7 @@ async function generate(options) {
|
|
|
11925
12133
|
if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
|
|
11926
12134
|
let pluginManager;
|
|
11927
12135
|
if (plugins.length > 0) pluginManager = new PluginManager(plugins);
|
|
11928
|
-
const { defineApplication } = await import("./application-
|
|
12136
|
+
const { defineApplication } = await import("./application-BB5TqXWY.mjs");
|
|
11929
12137
|
const application = defineApplication({
|
|
11930
12138
|
config,
|
|
11931
12139
|
pluginManager
|
|
@@ -14128,4 +14336,4 @@ function isDeno() {
|
|
|
14128
14336
|
|
|
14129
14337
|
//#endregion
|
|
14130
14338
|
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 };
|
|
14131
|
-
//# sourceMappingURL=runtime-
|
|
14339
|
+
//# sourceMappingURL=runtime-C7RRDaB3.mjs.map
|