@tailor-platform/sdk 1.32.1 → 1.33.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 +37 -0
- package/dist/{application-p2GujXmg.mjs → application-CfAom-vi.mjs} +33 -25
- package/dist/application-CfAom-vi.mjs.map +1 -0
- package/dist/{application-Cwt_ifTT.mjs → application-ChVyhwe-.mjs} +4 -4
- package/dist/cli/index.mjs +9 -9
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +9 -6
- package/dist/cli/lib.mjs +7 -7
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +81 -11
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{enum-constants-CkKARYb7.mjs → enum-constants-Piv_E-2M.mjs} +2 -1
- package/dist/{enum-constants-CkKARYb7.mjs.map → enum-constants-Piv_E-2M.mjs.map} +1 -1
- package/dist/{env-BZLTIlIo.d.mts → env-CSZ9CKg7.d.mts} +2 -2
- package/dist/{file-utils-D2TxR_kj.mjs → file-utils-B7xME5IK.mjs} +2 -1
- package/dist/{file-utils-D2TxR_kj.mjs.map → file-utils-B7xME5IK.mjs.map} +1 -1
- package/dist/{index-BYk_9R3S.d.mts → index-BdlrrjvD.d.mts} +133 -24
- package/dist/{index-BQKAzTPA.d.mts → index-Dlpe_4Nd.d.mts} +3 -2
- package/dist/{index-vVGamLOw.d.mts → index-IHl7P_9I.d.mts} +3 -2
- package/dist/{index-CgMytw2A.d.mts → index-dg3Sf-No.d.mts} +3 -2
- package/dist/{index-CoReoodF.d.mts → index-uNv9YJgx.d.mts} +3 -2
- package/dist/{kysely-type-BK0b4Rqt.mjs → kysely-type-t5MbP7iJ.mjs} +2 -1
- package/dist/{kysely-type-BK0b4Rqt.mjs.map → kysely-type-t5MbP7iJ.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/{plugin-IIDZW9GG.d.mts → plugin-BC7WQrjm.d.mts} +24 -13
- package/dist/{runtime-7DOyTTxR.mjs → runtime-3P9JFpe9.mjs} +1018 -303
- package/dist/runtime-3P9JFpe9.mjs.map +1 -0
- package/dist/{schema-BITbkmq3.mjs → schema-D27cW0Ca.mjs} +2 -1
- package/dist/{schema-BITbkmq3.mjs.map → schema-D27cW0Ca.mjs.map} +1 -1
- package/dist/{seed-BXrSEJbv.mjs → seed-DtYgudLq.mjs} +11 -3
- package/dist/seed-DtYgudLq.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/{workflow.generated-C2A5Ye0m.d.mts → workflow.generated-Cd5dsFnf.d.mts} +2 -2
- package/docs/cli/application.md +17 -0
- package/docs/services/executor.md +54 -0
- package/package.json +8 -8
- package/dist/application-p2GujXmg.mjs.map +0 -1
- package/dist/runtime-7DOyTTxR.mjs.map +0 -1
- package/dist/seed-BXrSEJbv.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 1.33.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#814](https://github.com/tailor-platform/sdk/pull/814) [`d5b2702`](https://github.com/tailor-platform/sdk/commit/d5b2702162a7344f1c53d373219d8482acac142d) Thanks [@toiroakr](https://github.com/toiroakr)! - Add multi-event executor trigger support with `recordTrigger`, `idpUserTrigger`, and `authAccessTokenTrigger` factory functions that accept an `events` array to handle multiple event types in a single executor. Args include `event` (short name) and `rawEvent` (full event type string) for runtime type narrowing.
|
|
8
|
+
|
|
9
|
+
- [#769](https://github.com/tailor-platform/sdk/pull/769) [`85e3053`](https://github.com/tailor-platform/sdk/commit/85e30538c981bd666680ce52cb2f986d94780593) Thanks [@r253hmdryou](https://github.com/r253hmdryou)! - Improve apply planning by adding stable no-op detection and plan summaries.
|
|
10
|
+
|
|
11
|
+
- Mark resources as `unchanged` when requested configuration already matches remote state, and keep update/create/delete behavior unchanged for drift, ownership mismatch, or missing resources.
|
|
12
|
+
- Add a consolidated plan summary line (create/update/delete/replace/unchanged) to `apply` output and include unchanged counts in plan reporting.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#844](https://github.com/tailor-platform/sdk/pull/844) [`4f62742`](https://github.com/tailor-platform/sdk/commit/4f62742bea1d9de3e181af80a2fc14b78ac6ea21) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: add bidirectional foreign key between IDP user and userProfile type in seed schema
|
|
17
|
+
|
|
18
|
+
When auth.userProfile is configured, the seed plugin now generates a foreign key from the userProfile type back to `_User`, ensuring seed data validation catches mismatches in both directions. Also bumps @toiroakr/lines-db to 0.9.1 which supports circular FK validation.
|
|
19
|
+
|
|
20
|
+
- [#857](https://github.com/tailor-platform/sdk/pull/857) [`8ed7e2a`](https://github.com/tailor-platform/sdk/commit/8ed7e2a2b23112c35f844f915f0f6eca6bef2c72) Thanks [@dqn](https://github.com/dqn)! - Add JSDoc documentation to previously undocumented public API exports for improved IDE intellisense.
|
|
21
|
+
|
|
22
|
+
- [#822](https://github.com/tailor-platform/sdk/pull/822) [`52f72bb`](https://github.com/tailor-platform/sdk/commit/52f72bb8a82f6e32889505d934ad0918391cd52e) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency oxlint-tsgolint to v0.17.2
|
|
23
|
+
|
|
24
|
+
- [#833](https://github.com/tailor-platform/sdk/pull/833) [`dfc7216`](https://github.com/tailor-platform/sdk/commit/dfc7216a7e6d639610d9e68ae422b08f15857bb7) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency @typescript/native-preview to v7.0.0-dev.20260325.1
|
|
25
|
+
|
|
26
|
+
- [#834](https://github.com/tailor-platform/sdk/pull/834) [`fecd40b`](https://github.com/tailor-platform/sdk/commit/fecd40bed724c39d5e4b12a219a3733693b06cd4) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency knip to v6.0.3
|
|
27
|
+
|
|
28
|
+
- [#840](https://github.com/tailor-platform/sdk/pull/840) [`3dfb55f`](https://github.com/tailor-platform/sdk/commit/3dfb55f96aab68e355f10ccd993cc21141441724) Thanks [@renovate](https://github.com/apps/renovate)! - Update @clack/prompts to v1, adjusting validate callback signatures for the new API
|
|
29
|
+
|
|
30
|
+
- [#845](https://github.com/tailor-platform/sdk/pull/845) [`7976c0a`](https://github.com/tailor-platform/sdk/commit/7976c0a516cc09b3a4f1f183ab98360eefd449b2) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update anthropics/claude-code-action action to v1.0.81
|
|
31
|
+
|
|
32
|
+
- [#846](https://github.com/tailor-platform/sdk/pull/846) [`ab16815`](https://github.com/tailor-platform/sdk/commit/ab16815674196d50b1f14b37935e1c7ade255d14) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency knip to v6.0.6
|
|
33
|
+
|
|
34
|
+
- [#847](https://github.com/tailor-platform/sdk/pull/847) [`9b60ae2`](https://github.com/tailor-platform/sdk/commit/9b60ae2a3b3ccc10839867ba7a49ef59e649287e) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency typescript-eslint to v8.57.2
|
|
35
|
+
|
|
36
|
+
- [#848](https://github.com/tailor-platform/sdk/pull/848) [`0c8aeac`](https://github.com/tailor-platform/sdk/commit/0c8aeac85680352e9e9f0c560e37c2e22b1ee1cc) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update vitest monorepo to v4.1.1
|
|
37
|
+
|
|
38
|
+
- [#849](https://github.com/tailor-platform/sdk/pull/849) [`b1c9814`](https://github.com/tailor-platform/sdk/commit/b1c981432a4753d3868d482123931921a0e9bf74) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency rolldown to v1.0.0-rc.12
|
|
39
|
+
|
|
3
40
|
## 1.32.1
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
|
@@ -3,10 +3,10 @@ import { n as isSdkBranded } from "./brand-0SscafcY.mjs";
|
|
|
3
3
|
import { n as logger, r as styles } from "./logger-qz-Y4sBV.mjs";
|
|
4
4
|
import { l as initOAuth2Client } from "./client-D5P1myz0.mjs";
|
|
5
5
|
import { t as readPackageJson } from "./package-json-VqyFvGiP.mjs";
|
|
6
|
-
import { n as seedPlugin, r as isPluginGeneratedType, t as SeedGeneratorID } from "./seed-
|
|
7
|
-
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "./enum-constants-
|
|
8
|
-
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "./file-utils-
|
|
9
|
-
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "./kysely-type-
|
|
6
|
+
import { n as seedPlugin, r as isPluginGeneratedType, t as SeedGeneratorID } from "./seed-DtYgudLq.mjs";
|
|
7
|
+
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "./enum-constants-Piv_E-2M.mjs";
|
|
8
|
+
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "./file-utils-B7xME5IK.mjs";
|
|
9
|
+
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "./kysely-type-t5MbP7iJ.mjs";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import * as fs$1 from "node:fs";
|
|
@@ -836,10 +836,9 @@ function generateInjectDeclarations(inject) {
|
|
|
836
836
|
*/
|
|
837
837
|
function generateTriggerCode(trigger) {
|
|
838
838
|
switch (trigger.kind) {
|
|
839
|
-
case "
|
|
840
|
-
case "recordUpdated":
|
|
841
|
-
case "recordDeleted": return `{
|
|
839
|
+
case "tailordb": return `{
|
|
842
840
|
kind: ${JSON.stringify(trigger.kind)},
|
|
841
|
+
events: ${JSON.stringify(trigger.events)},
|
|
843
842
|
typeName: ${JSON.stringify(trigger.typeName)},
|
|
844
843
|
}`;
|
|
845
844
|
case "schedule": return `{
|
|
@@ -3426,12 +3425,13 @@ function createAuthService(config, tailorDBServices, externalTailorDBNamespaces)
|
|
|
3426
3425
|
|
|
3427
3426
|
//#endregion
|
|
3428
3427
|
//#region src/parser/service/executor/schema.ts
|
|
3429
|
-
const
|
|
3430
|
-
kind: z.
|
|
3431
|
-
|
|
3432
|
-
"
|
|
3433
|
-
"
|
|
3434
|
-
|
|
3428
|
+
const TailorDBTriggerSchema = z.object({
|
|
3429
|
+
kind: z.literal("tailordb").describe("TailorDB record event trigger"),
|
|
3430
|
+
events: z.array(z.enum([
|
|
3431
|
+
"tailordb.type_record.created",
|
|
3432
|
+
"tailordb.type_record.updated",
|
|
3433
|
+
"tailordb.type_record.deleted"
|
|
3434
|
+
])).min(1).transform((arr) => [...new Set(arr)]).describe("TailorDB event types to trigger on"),
|
|
3435
3435
|
typeName: z.string().describe("TailorDB type name to watch for events"),
|
|
3436
3436
|
condition: functionSchema.optional().describe("Condition function to filter events")
|
|
3437
3437
|
});
|
|
@@ -3446,18 +3446,24 @@ const ScheduleTriggerSchema = z.object({
|
|
|
3446
3446
|
timezone: z.string().optional().default("UTC").describe("Timezone for the CRON schedule (default: UTC)")
|
|
3447
3447
|
});
|
|
3448
3448
|
const IncomingWebhookTriggerSchema = z.object({ kind: z.literal("incomingWebhook") });
|
|
3449
|
-
const IdpUserTriggerSchema = z.object({
|
|
3450
|
-
"
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
"
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3449
|
+
const IdpUserTriggerSchema = z.object({
|
|
3450
|
+
kind: z.literal("idpUser").describe("IdP user event trigger"),
|
|
3451
|
+
events: z.array(z.enum([
|
|
3452
|
+
"idp.user.created",
|
|
3453
|
+
"idp.user.updated",
|
|
3454
|
+
"idp.user.deleted"
|
|
3455
|
+
])).min(1).transform((arr) => [...new Set(arr)]).describe("IdP user event types to trigger on")
|
|
3456
|
+
});
|
|
3457
|
+
const AuthAccessTokenTriggerSchema = z.object({
|
|
3458
|
+
kind: z.literal("authAccessToken").describe("Auth access token event trigger"),
|
|
3459
|
+
events: z.array(z.enum([
|
|
3460
|
+
"auth.access_token.issued",
|
|
3461
|
+
"auth.access_token.refreshed",
|
|
3462
|
+
"auth.access_token.revoked"
|
|
3463
|
+
])).min(1).transform((arr) => [...new Set(arr)]).describe("Auth access token event types to trigger on")
|
|
3464
|
+
});
|
|
3459
3465
|
const TriggerSchema = z.discriminatedUnion("kind", [
|
|
3460
|
-
|
|
3466
|
+
TailorDBTriggerSchema,
|
|
3461
3467
|
ResolverExecutedTriggerSchema,
|
|
3462
3468
|
ScheduleTriggerSchema,
|
|
3463
3469
|
IncomingWebhookTriggerSchema,
|
|
@@ -4049,6 +4055,7 @@ async function bundleWorkflowJobs(allJobs, mainJobNames, env = {}, triggerContex
|
|
|
4049
4055
|
logger.warn("No workflow jobs to bundle");
|
|
4050
4056
|
return {
|
|
4051
4057
|
mainJobDeps: {},
|
|
4058
|
+
usedJobNames: [],
|
|
4052
4059
|
bundledCode: /* @__PURE__ */ new Map()
|
|
4053
4060
|
};
|
|
4054
4061
|
}
|
|
@@ -4073,6 +4080,7 @@ async function bundleWorkflowJobs(allJobs, mainJobNames, env = {}, triggerContex
|
|
|
4073
4080
|
logger.log(`${styles.success("Bundled")} ${styles.info("\"workflow-job\"")}`);
|
|
4074
4081
|
return {
|
|
4075
4082
|
mainJobDeps,
|
|
4083
|
+
usedJobNames: usedJobs.map((job) => job.name),
|
|
4076
4084
|
bundledCode
|
|
4077
4085
|
};
|
|
4078
4086
|
}
|
|
@@ -4934,4 +4942,4 @@ async function loadApplication(params) {
|
|
|
4934
4942
|
|
|
4935
4943
|
//#endregion
|
|
4936
4944
|
export { resolveTokens as C, readPlatformConfig as S, writePlatformConfig as T, hashFile as _, loadConfig as a, loadAccessToken as b, ExecutorSchema as c, TailorDBTypeSchema as d, stringifyFunction as f, getDistDir as g, createBundleCache as h, resolveInlineSourcemap as i, OAuth2ClientSchema as l, loadFilesWithIgnores as m, generatePluginFilesIfNeeded as n, WorkflowJobSchema as o, tailorUserMap as p, loadApplication as r, createExecutorService as s, defineApplication as t, ResolverSchema as u, deleteUserTokens as v, saveUserTokens as w, loadWorkspaceId as x, fetchLatestToken as y };
|
|
4937
|
-
//# sourceMappingURL=application-
|
|
4945
|
+
//# sourceMappingURL=application-CfAom-vi.mjs.map
|