@tailor-platform/sdk 1.37.0 → 1.38.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 +56 -0
- package/dist/application-C1ipG5Q6.mjs +4 -0
- package/dist/{application-qRGMV8Tr.mjs → application-DhQrXEld.mjs} +13 -5
- package/dist/{application-qRGMV8Tr.mjs.map → application-DhQrXEld.mjs.map} +1 -1
- package/dist/cli/index.mjs +364 -123
- 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-424n_3T9.mjs → client-BWAbbA1C.mjs} +1 -1
- package/dist/{client-DllDLYmZ.mjs → client-xzPXtc_e.mjs} +9 -3
- package/dist/{client-DllDLYmZ.mjs.map → client-xzPXtc_e.mjs.map} +1 -1
- package/dist/configure/index.d.mts +4 -5
- package/dist/configure/index.mjs +4 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-aHnky_xH.mjs → crash-report-BEAiCSCl.mjs} +1 -1
- package/dist/{crash-report-CDQ2JvgR.mjs → crash-report-DXhPL8Ue.mjs} +3 -3
- package/dist/{crash-report-CDQ2JvgR.mjs.map → crash-report-DXhPL8Ue.mjs.map} +1 -1
- package/dist/errors-D9f2UJpT.mjs +43 -0
- package/dist/errors-D9f2UJpT.mjs.map +1 -0
- package/dist/{index-CeS4FA9o.d.mts → index-CHo73Aat.d.mts} +2 -2
- package/dist/{index-DnIg_LfT.d.mts → index-CIIXsk3E.d.mts} +2 -2
- package/dist/{index-BUT18Kak.d.mts → index-Cln_TTZn.d.mts} +2 -2
- package/dist/{index-BVJQLjyN.d.mts → index-Cs3fwmLu.d.mts} +22 -17
- package/dist/{index-C3kcXHXJ.d.mts → index-D_W9-Lvk.d.mts} +2 -2
- package/dist/{interceptor-dSNiQq71.mjs → interceptor-CzaH2Ur6.mjs} +1 -1
- package/dist/{interceptor-dSNiQq71.mjs.map → interceptor-CzaH2Ur6.mjs.map} +1 -1
- package/dist/{logger-C8qBDCKO.mjs → logger-5_JMzHmw.mjs} +42 -3
- package/dist/logger-5_JMzHmw.mjs.map +1 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/index.d.mts +1 -2
- package/dist/{plugin-D6P4g_2L.d.mts → plugin-D84blivd.d.mts} +54 -3
- package/dist/{runtime-D9ejnCm6.mjs → runtime-ChpwtPut.mjs} +26 -54
- package/dist/runtime-ChpwtPut.mjs.map +1 -0
- package/dist/service-Bcp6JB3w.mjs +132 -0
- package/dist/service-Bcp6JB3w.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs +6 -2
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/{workflow.generated-Bj_DVqGh.d.mts → workflow.generated-BRdcCWfC.d.mts} +2 -2
- package/docs/cli/function.md +42 -16
- package/docs/cli/upgrade.md +51 -0
- package/docs/cli/user.md +1 -1
- package/docs/cli/workflow.md +10 -10
- package/docs/cli-reference.md +23 -14
- package/docs/configuration.md +9 -7
- package/docs/services/executor.md +39 -0
- package/docs/services/tailordb.md +20 -0
- package/package.json +7 -7
- package/dist/application-ILhZq_oW.mjs +0 -4
- package/dist/env-04IQXqsl.d.mts +0 -30
- package/dist/logger-C8qBDCKO.mjs.map +0 -1
- package/dist/runtime-D9ejnCm6.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 1.38.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#941](https://github.com/tailor-platform/sdk/pull/941) [`0a1b538`](https://github.com/tailor-platform/sdk/commit/0a1b53886ac738347e0e7fcb4f94e4c713fad316) Thanks [@toiroakr](https://github.com/toiroakr)! - Add `upgrade` command with codemod.com-based architecture for automated SDK version migrations. Codemod execution is handled by the new `@tailor-platform/sdk-codemod` package.
|
|
8
|
+
|
|
9
|
+
- [#986](https://github.com/tailor-platform/sdk/pull/986) [`7de5d91`](https://github.com/tailor-platform/sdk/commit/7de5d91703f7bdd56bf433f60123da7322a6e361) Thanks [@toiroakr](https://github.com/toiroakr)! - Unify machine-user CLI flag naming and add `TAILOR_PLATFORM_MACHINE_USER_NAME` env variable
|
|
10
|
+
|
|
11
|
+
- Add `--machine-user` flag to `query`, `workflow start`, and `login` to align with `function test-run` and the rest of the CLI's kebab-case convention. The previous `--machineuser` flag continues to work as a hidden alias.
|
|
12
|
+
- Add `TAILOR_PLATFORM_MACHINE_USER_NAME` environment variable as a default machine user name for `query`, `workflow start`, and `function test-run`.
|
|
13
|
+
|
|
14
|
+
- [#990](https://github.com/tailor-platform/sdk/pull/990) [`6e9a062`](https://github.com/tailor-platform/sdk/commit/6e9a062b5ac6de3a7f0cd3e11a5d66d4ca85cd87) Thanks [@dqn](https://github.com/dqn)! - `tailor-sdk function logs <executionId>` now displays error details for failed executions. When `getFunctionExecution` returns a stack trace, the deployed script is downloaded automatically and frames are mapped back to the original source files via the inline sourcemap (with clickable file links and code snippets, matching the existing `function test-run` output). When the script cannot be downloaded, the stack trace is missing, or the function has been redeployed after the execution (detected by comparing the registry entry's `updatedAt` against the execution start time), the command falls back to a plain-text `Name: message` display with the raw stack trace to avoid showing misleading source locations.
|
|
15
|
+
|
|
16
|
+
- [#977](https://github.com/tailor-platform/sdk/pull/977) [`44a0781`](https://github.com/tailor-platform/sdk/commit/44a07817272eabe87f9a4f25400fec5231f59e58) Thanks [@haru0017](https://github.com/haru0017)! - Add response customization for incoming webhook trigger executor
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [#993](https://github.com/tailor-platform/sdk/pull/993) [`d978a9d`](https://github.com/tailor-platform/sdk/commit/d978a9d26534533bfca78e7c6415cab16279d977) Thanks [@toiroakr](https://github.com/toiroakr)! - Accept a wider range of boolean values for environment variables
|
|
21
|
+
|
|
22
|
+
The following environment variables now accept common truthy/falsy spellings
|
|
23
|
+
(case-insensitive): `true/false`, `1/0`, `yes/no`, `on/off`, `t/f`, `y/n`.
|
|
24
|
+
|
|
25
|
+
- `TAILOR_ENABLE_INLINE_SOURCEMAP`
|
|
26
|
+
- `TAILOR_PLATFORM_SDK_BUILD_ONLY`
|
|
27
|
+
- `DEBUG`
|
|
28
|
+
|
|
29
|
+
Previously only the literal string `"true"` enabled these flags.
|
|
30
|
+
|
|
31
|
+
- [#995](https://github.com/tailor-platform/sdk/pull/995) [`d6bc33c`](https://github.com/tailor-platform/sdk/commit/d6bc33c9b9aee0fdf9cb1edeea58b3cd0bb45f15) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix `createTailorDBHook` to correctly handle `db.object({...}, { array: true })` fields. Previously, array values (and `null`/omitted values for optional array fields) were treated as a single nested object and processed recursively, corrupting the value and causing seed validation to fail with "Expected an array". Array elements are now recursed per element, and non-array values are passed through unchanged.
|
|
32
|
+
|
|
33
|
+
- [#963](https://github.com/tailor-platform/sdk/pull/963) [`0ed350f`](https://github.com/tailor-platform/sdk/commit/0ed350fa90c97634cf7d70ae055550bc021ed1b8) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update vitest to v4.1.4
|
|
34
|
+
|
|
35
|
+
- [#975](https://github.com/tailor-platform/sdk/pull/975) [`120ef30`](https://github.com/tailor-platform/sdk/commit/120ef304e6d4a0593745ad8a0e484aa2cc21202c) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update anthropics/claude-code-action action to v1.0.97
|
|
36
|
+
|
|
37
|
+
- [#976](https://github.com/tailor-platform/sdk/pull/976) [`08897a3`](https://github.com/tailor-platform/sdk/commit/08897a32b90388ed1adcbc07395d445f22ab92ce) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency turbo to v2.9.6
|
|
38
|
+
|
|
39
|
+
- [#979](https://github.com/tailor-platform/sdk/pull/979) [`1e0eb8c`](https://github.com/tailor-platform/sdk/commit/1e0eb8c1b5d25e51b3c846f54cf7133dbddd1509) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency kysely to v0.28.16
|
|
40
|
+
|
|
41
|
+
- [#981](https://github.com/tailor-platform/sdk/pull/981) [`2cc18f5`](https://github.com/tailor-platform/sdk/commit/2cc18f5e3d30e25da02bce70d0263af3fa73df19) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency aquaproj/aqua-registry to v4.494.1
|
|
42
|
+
|
|
43
|
+
- [#982](https://github.com/tailor-platform/sdk/pull/982) [`8ad0591`](https://github.com/tailor-platform/sdk/commit/8ad0591f7934351b4559bced1f46a3dabdeffc48) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency knip to v6.4.0
|
|
44
|
+
|
|
45
|
+
- [#983](https://github.com/tailor-platform/sdk/pull/983) [`b1cb7d3`](https://github.com/tailor-platform/sdk/commit/b1cb7d332ef471ea845011ea9d42819a3e426621) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update pnpm/action-setup action to v6
|
|
46
|
+
|
|
47
|
+
- [#988](https://github.com/tailor-platform/sdk/pull/988) [`484033d`](https://github.com/tailor-platform/sdk/commit/484033d4d17b8f76299102332a972816b8bed877) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency vitest to v4.1.4
|
|
48
|
+
|
|
49
|
+
- [#989](https://github.com/tailor-platform/sdk/pull/989) [`13be969`](https://github.com/tailor-platform/sdk/commit/13be969ad22d2609f974f866c98a23d6100c31fa) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency bufbuild/buf to v1.68.1
|
|
50
|
+
|
|
51
|
+
- [#992](https://github.com/tailor-platform/sdk/pull/992) [`f13ad71`](https://github.com/tailor-platform/sdk/commit/f13ad71475dc444aaf40dd56609c104aa1487677) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency globals to v17.5.0
|
|
52
|
+
|
|
53
|
+
- [#997](https://github.com/tailor-platform/sdk/pull/997) [`61d5c34`](https://github.com/tailor-platform/sdk/commit/61d5c3466962c270410df07fa6d614c36b2ced2e) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update flatt-security/setup-takumi-guard-npm digest to 9a5d797
|
|
54
|
+
|
|
55
|
+
- [#999](https://github.com/tailor-platform/sdk/pull/999) [`4ad6aaf`](https://github.com/tailor-platform/sdk/commit/4ad6aaf4374ecb48f6509cd783cdf597b0a116ee) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update dependency tsdown to v0.21.8
|
|
56
|
+
|
|
57
|
+
- [#994](https://github.com/tailor-platform/sdk/pull/994) [`3622294`](https://github.com/tailor-platform/sdk/commit/36222949efd98d8d5b8ae6d5482d2089d0e2a1f2) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix `tailor-sdk function test-run` showing stack trace paths with a spurious `../` prefix (e.g. `../.tailor-sdk/test-run/test-run--add.entry.js`). Sourcemap `sources` are now emitted relative to the current working directory, and cwd-relative paths that start with a dotfile directory (e.g. `.tailor-sdk/...`) are explicitly prefixed with `./` in the display.
|
|
58
|
+
|
|
3
59
|
## 1.37.0
|
|
4
60
|
|
|
5
61
|
### Minor Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import { l as initOAuth2Client } from "./client-
|
|
2
|
+
import { l as initOAuth2Client } from "./client-xzPXtc_e.mjs";
|
|
3
3
|
import { n as isSdkBranded } from "./brand-D-d15jx3.mjs";
|
|
4
|
-
import { n as logger, r as styles } from "./logger-
|
|
4
|
+
import { a as parseBoolean, n as logger, r as styles } from "./logger-5_JMzHmw.mjs";
|
|
5
5
|
import { t as readPackageJson } from "./package-json-BHViVisJ.mjs";
|
|
6
6
|
import { n as seedPlugin, r as isPluginGeneratedType, t as SeedGeneratorID } from "./seed-DrbB1VXd.mjs";
|
|
7
7
|
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "./enum-constants-Dx82rSjf.mjs";
|
|
@@ -3479,7 +3479,14 @@ const ScheduleTriggerSchema = z.object({
|
|
|
3479
3479
|
cron: z.string().describe("CRON expression for the schedule"),
|
|
3480
3480
|
timezone: z.string().optional().default("UTC").describe("Timezone for the CRON schedule (default: UTC)")
|
|
3481
3481
|
});
|
|
3482
|
-
const
|
|
3482
|
+
const IncomingWebhookTriggerResponseSchema = z.object({
|
|
3483
|
+
body: functionSchema.optional().describe("Function returning the response body"),
|
|
3484
|
+
statusCode: z.number().int().optional().describe("HTTP status code for the response")
|
|
3485
|
+
});
|
|
3486
|
+
const IncomingWebhookTriggerSchema = z.object({
|
|
3487
|
+
kind: z.literal("incomingWebhook"),
|
|
3488
|
+
response: IncomingWebhookTriggerResponseSchema.optional().describe("Response configuration")
|
|
3489
|
+
});
|
|
3483
3490
|
const IdpUserTriggerSchema = z.object({
|
|
3484
3491
|
kind: z.literal("idpUser").describe("IdP user event trigger"),
|
|
3485
3492
|
events: z.array(z.enum([
|
|
@@ -4595,7 +4602,8 @@ async function loadConfig(configPath) {
|
|
|
4595
4602
|
*/
|
|
4596
4603
|
function resolveInlineSourcemap(configValue) {
|
|
4597
4604
|
if (configValue !== void 0) return configValue;
|
|
4598
|
-
|
|
4605
|
+
const envValue = parseBoolean(process.env.TAILOR_ENABLE_INLINE_SOURCEMAP);
|
|
4606
|
+
if (envValue !== void 0) return envValue;
|
|
4599
4607
|
return true;
|
|
4600
4608
|
}
|
|
4601
4609
|
|
|
@@ -5080,4 +5088,4 @@ async function loadApplication(params) {
|
|
|
5080
5088
|
|
|
5081
5089
|
//#endregion
|
|
5082
5090
|
export { resolveTokens as C, readPlatformConfig as S, writePlatformConfig as T, hashFile as _, loadConfig as a, loadAccessToken as b, createExecutorService as c, TailorDBTypeSchema as d, stringifyFunction as f, getDistDir as g, createBundleCache as h, resolveInlineSourcemap as i, ExecutorSchema as l, loadFilesWithIgnores as m, generatePluginFilesIfNeeded as n, WorkflowJobSchema as o, tailorUserMap as p, loadApplication as r, ResolverSchema as s, defineApplication as t, OAuth2ClientSchema as u, deleteUserTokens as v, saveUserTokens as w, loadWorkspaceId as x, fetchLatestToken as y };
|
|
5083
|
-
//# sourceMappingURL=application-
|
|
5091
|
+
//# sourceMappingURL=application-DhQrXEld.mjs.map
|