@tailor-platform/sdk 1.55.1 → 1.55.2
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 +8 -0
- package/dist/application-D6znmyMd.mjs +4 -0
- package/dist/{application-DzUlASfA.mjs → application-MY7YJJ-C.mjs} +13 -17
- package/dist/application-MY7YJJ-C.mjs.map +1 -0
- package/dist/cli/index.mjs +2 -2
- package/dist/cli/lib.d.mts +10 -10
- package/dist/cli/lib.mjs +2 -2
- package/dist/configure/index.d.mts +3 -3
- package/dist/configure/index.mjs +2 -8
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-BLsnrEtc.d.mts → index-1APcOP9X.d.mts} +3 -3
- package/dist/{index-BE-fpxIo.d.mts → index-CPRnOjjt.d.mts} +2 -2
- package/dist/{index-S6-FtUpA.d.mts → index-CQZVJ5SX.d.mts} +2 -2
- package/dist/{index-D9xG-a6Y.d.mts → index-CfRFkXIO.d.mts} +2 -2
- package/dist/{index-cHqh66cF.d.mts → index-DUupuPhZ.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-BuE5ZOnW.d.mts → plugin-C_FyVSdl.d.mts} +3 -3
- package/dist/{runtime-CgGeIoxi.mjs → runtime-DH5F_z8A.mjs} +70 -30
- package/dist/runtime-DH5F_z8A.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/{workflow.generated-CQg1_Ami.d.mts → workflow.generated-BGLDYJOq.d.mts} +2 -2
- package/docs/services/auth.md +11 -0
- package/package.json +1 -1
- package/dist/application-DM8q9GDI.mjs +0 -4
- package/dist/application-DzUlASfA.mjs.map +0 -1
- package/dist/runtime-CgGeIoxi.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 1.55.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1190](https://github.com/tailor-platform/sdk/pull/1190) [`6f891e8`](https://github.com/tailor-platform/sdk/commit/6f891e8a0f948ca2b58bb7e1d4ad19efc31cc38c) Thanks [@toiroakr](https://github.com/toiroakr)! - Validate auth service configuration during `deploy` / `generate`, consistent with how IdP, TailorDB, and static websites are already handled. Configs that set both `userProfile` and `machineUserAttributes` now fail with a clearer message: "Specify either `userProfile` or `machineUserAttributes`, not both."
|
|
8
|
+
|
|
9
|
+
- [#1332](https://github.com/tailor-platform/sdk/pull/1332) [`aa898b7`](https://github.com/tailor-platform/sdk/commit/aa898b7f369c441077973848a92a09152f6bed4f) Thanks [@dqn](https://github.com/dqn)! - Fix `executor get --json` to include typed event trigger metadata such as event types, namespaces, target names, and conditions.
|
|
10
|
+
|
|
3
11
|
## 1.55.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -3651,6 +3651,7 @@ const TenantProviderSchema = z.object({
|
|
|
3651
3651
|
signatureField: z.string().describe("Field used as the tenant signature")
|
|
3652
3652
|
});
|
|
3653
3653
|
const UserProfileSchema = z.object({
|
|
3654
|
+
namespace: z.string().optional().describe("TailorDB namespace where the user type is defined"),
|
|
3654
3655
|
type: z.object({
|
|
3655
3656
|
name: z.string(),
|
|
3656
3657
|
fields: z.any(),
|
|
@@ -3693,16 +3694,17 @@ const AuthConfigBaseSchema = z.object({
|
|
|
3693
3694
|
connections: z.record(z.string(), AuthConnectionConfigSchema).optional().describe("Auth connection definitions for external OAuth2 providers"),
|
|
3694
3695
|
publishSessionEvents: z.boolean().optional().describe("Enable publishing session events")
|
|
3695
3696
|
});
|
|
3696
|
-
const AuthConfigSchema = z.
|
|
3697
|
-
userProfile:
|
|
3698
|
-
machineUserAttributes: z.undefined().optional()
|
|
3699
|
-
}), z.xor([AuthConfigBaseSchema.extend({
|
|
3700
|
-
userProfile: UserProfileSchema,
|
|
3697
|
+
const AuthConfigSchema = z.xor([AuthConfigBaseSchema.extend({
|
|
3698
|
+
userProfile: UserProfileSchema.optional().describe("User profile configuration"),
|
|
3701
3699
|
machineUserAttributes: z.undefined().optional()
|
|
3702
3700
|
}), AuthConfigBaseSchema.extend({
|
|
3703
3701
|
userProfile: z.undefined().optional(),
|
|
3704
|
-
machineUserAttributes: z.record(z.string(), TailorFieldSchema)
|
|
3705
|
-
})]
|
|
3702
|
+
machineUserAttributes: z.record(z.string(), TailorFieldSchema).describe("Machine user attribute fields")
|
|
3703
|
+
})], { error: (iss) => {
|
|
3704
|
+
if (iss.code !== "invalid_union") return void 0;
|
|
3705
|
+
if (iss.errors.length < 2) return void 0;
|
|
3706
|
+
if (iss.errors.every((variantErrors) => variantErrors.every((e) => e.path.length === 1 && (e.path[0] === "userProfile" || e.path[0] === "machineUserAttributes")))) return "Specify either `userProfile` or `machineUserAttributes`, not both.";
|
|
3707
|
+
} }).brand("AuthConfig");
|
|
3706
3708
|
|
|
3707
3709
|
//#endregion
|
|
3708
3710
|
//#region src/cli/services/auth/service.ts
|
|
@@ -3714,18 +3716,12 @@ const AuthConfigSchema = z.union([AuthConfigBaseSchema.extend({
|
|
|
3714
3716
|
* @returns A new AuthService instance
|
|
3715
3717
|
*/
|
|
3716
3718
|
function createAuthService(config, tailorDBServices, externalTailorDBNamespaces) {
|
|
3717
|
-
const
|
|
3718
|
-
...config,
|
|
3719
|
-
idProvider: IdProviderSchema.optional().parse(config.idProvider)
|
|
3720
|
-
};
|
|
3721
|
-
const connections = {};
|
|
3722
|
-
if (config.connections) for (const [name, connConfig] of Object.entries(config.connections)) connections[name] = AuthConnectionConfigSchema.parse(connConfig);
|
|
3719
|
+
const connections = config.connections ? { ...config.connections } : {};
|
|
3723
3720
|
let userProfile;
|
|
3724
3721
|
return {
|
|
3725
3722
|
config,
|
|
3726
3723
|
tailorDBServices,
|
|
3727
3724
|
externalTailorDBNamespaces,
|
|
3728
|
-
parsedConfig,
|
|
3729
3725
|
connections,
|
|
3730
3726
|
get userProfile() {
|
|
3731
3727
|
return userProfile;
|
|
@@ -5473,7 +5469,7 @@ function defineAuth(config, tailorDBServices, externalTailorDBNamespaces) {
|
|
|
5473
5469
|
subgraphs
|
|
5474
5470
|
};
|
|
5475
5471
|
let authService;
|
|
5476
|
-
if (!("external" in config)) authService = createAuthService(config, tailorDBServices, externalTailorDBNamespaces);
|
|
5472
|
+
if (!("external" in config)) authService = createAuthService(AuthConfigSchema.parse(config), tailorDBServices, externalTailorDBNamespaces);
|
|
5477
5473
|
subgraphs.push({
|
|
5478
5474
|
Type: "auth",
|
|
5479
5475
|
Name: config.name
|
|
@@ -5716,5 +5712,5 @@ async function loadApplication(params) {
|
|
|
5716
5712
|
}
|
|
5717
5713
|
|
|
5718
5714
|
//#endregion
|
|
5719
|
-
export {
|
|
5720
|
-
//# sourceMappingURL=application-
|
|
5715
|
+
export { loadConfigPath as C, saveUserTokens as D, resolveTokens as E, writePlatformConfig as O, loadAccessToken as S, readPlatformConfig as T, getDistDir as _, WorkflowJobSchema as a, deleteUserTokens as b, createExecutorService as c, buildExecutorArgsExpr as d, buildResolverOperationHookExpr as f, createBundleCache as g, loadFilesWithIgnores as h, resolveInlineSourcemap as i, ExecutorSchema as l, stringifyFunction as m, generatePluginFilesIfNeeded as n, ResolverSchema as o, TailorDBTypeSchema as p, loadApplication as r, HTTP_METHODS as s, defineApplication as t, INVOKER_EXPR as u, hashFile as v, loadWorkspaceId as w, fetchLatestToken as x, loadConfig as y };
|
|
5716
|
+
//# sourceMappingURL=application-MY7YJJ-C.mjs.map
|