@tailor-platform/sdk 2.0.0-next.6 → 2.0.0-next.7
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 +47 -0
- package/dist/{application-BJXRpQj5.mjs → application-GzW98_Xr.mjs} +199 -172
- package/dist/application-GzW98_Xr.mjs.map +1 -0
- package/dist/application-OM0taSPn.mjs +3 -0
- package/dist/cli/index.mjs +12 -9
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.mjs +2 -2
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/config/types.d.mts +5 -1
- package/dist/configure/index.mjs +16 -16
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/auth/types.d.mts +18 -23
- package/dist/configure/services/executor/operation.d.mts +1 -1
- package/dist/configure/services/workflow/job.d.mts +10 -10
- package/dist/configure/services/workflow/workflow.d.mts +6 -4
- package/dist/{globals-D-YbJKW-.mjs → globals-CBZ0egXT.mjs} +3 -6
- package/dist/globals-CBZ0egXT.mjs.map +1 -0
- package/dist/{register-ts-hook-DL31O2W9.mjs → register-ts-hook-DvEs6YsL.mjs} +35 -78
- package/dist/register-ts-hook-DvEs6YsL.mjs.map +1 -0
- package/dist/{registry-CC3CbQiF.mjs → registry-i7EdJ-D5.mjs} +10 -10
- package/dist/registry-i7EdJ-D5.mjs.map +1 -0
- package/dist/runtime/globals.d.mts +1 -4
- package/dist/runtime/index.mjs +1 -1
- package/dist/runtime/workflow.d.mts +1 -76
- package/dist/runtime/workflow.mjs +1 -1
- package/dist/service-BJAQ70e5.mjs +3 -0
- package/dist/{service-CnHz9rwz.mjs → service-Dmxa2I4i.mjs} +31 -17
- package/dist/service-Dmxa2I4i.mjs.map +1 -0
- package/dist/utils/test/index.mjs +11 -11
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/utils/test/mock.d.mts +6 -6
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.mjs +67 -99
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/workflow.d.mts +21 -41
- package/dist/vitest/setup.mjs +1 -1
- package/dist/vitest/workflow-local.d.mts +2 -2
- package/dist/workflow-CsBvRE3g.mjs +34 -0
- package/dist/workflow-CsBvRE3g.mjs.map +1 -0
- package/docs/cli/application.md +2 -0
- package/docs/cli/function.md +2 -2
- package/docs/cli/tailordb.md +2 -2
- package/docs/cli-reference.md +1 -1
- package/docs/configuration.md +2 -0
- package/docs/github-actions.md +2 -2
- package/docs/migration/v2.md +128 -11
- package/docs/runtime.md +1 -1
- package/docs/services/auth.md +7 -7
- package/docs/services/workflow.md +43 -43
- package/docs/testing.md +9 -9
- package/package.json +2 -2
- package/dist/application-BJXRpQj5.mjs.map +0 -1
- package/dist/application-BV-AXawv.mjs +0 -3
- package/dist/globals-D-YbJKW-.mjs.map +0 -1
- package/dist/register-ts-hook-DL31O2W9.mjs.map +0 -1
- package/dist/registry-CC3CbQiF.mjs.map +0 -1
- package/dist/service-CnHz9rwz.mjs.map +0 -1
- package/dist/service-nU6ITOHL.mjs +0 -3
- package/dist/workflow-9kHGKxF2.mjs +0 -64
- package/dist/workflow-9kHGKxF2.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 2.0.0-next.7
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1782](https://github.com/tailor-platform/sdk/pull/1782) [`c971797`](https://github.com/tailor-platform/sdk/commit/c971797c9bfa035a43771c46f2b1c3bd93f989a9) Thanks [@toiroakr](https://github.com/toiroakr)! - Rename `Workflow.trigger()` (returned by `createWorkflow()`) and `WorkflowJob.trigger()` (returned by `createWorkflowJob()`) to `.start()`, aligning the SDK's ergonomic verb with the platform's `start*` RPC vocabulary:
|
|
8
|
+
|
|
9
|
+
```diff
|
|
10
|
+
const inventory = checkInventory.trigger({ orderId: input.orderId });
|
|
11
|
+
+const inventory = checkInventory.start({ orderId: input.orderId });
|
|
12
|
+
|
|
13
|
+
-const workflowRunId = await orderProcessingWorkflow.trigger(args, { invoker: "manager" });
|
|
14
|
+
+const workflowRunId = await orderProcessingWorkflow.start(args, { invoker: "manager" });
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`mockWorkflow()`'s `wf.job(definition)` / `wf.workflow(definition)` now return a mock of the `.start` method, and `wf.setTriggerHandler` / `wf.triggeredJobs` are renamed to `wf.setStartHandler` / `wf.startedJobs`. No codemod ships for the `.trigger()` → `.start()` call-site rename itself — see the `v2/workflow-start-rename` migration guide entry for manual migration steps.
|
|
18
|
+
|
|
19
|
+
- [#1782](https://github.com/tailor-platform/sdk/pull/1782) [`c971797`](https://github.com/tailor-platform/sdk/commit/c971797c9bfa035a43771c46f2b1c3bd93f989a9) Thanks [@toiroakr](https://github.com/toiroakr)! - Remove the pre-alignment `tailor.workflow` names `triggerWorkflow`, `triggerJobFunction`, and `resumeWorkflow` (and their `TriggerWorkflowOptions` / `TriggerJobFunctionOptions` option types) from `@tailor-platform/sdk/runtime`, the ambient `@tailor-platform/sdk/runtime/globals` types, and the `mockWorkflow()` test facade. Use the canonical names instead:
|
|
20
|
+
|
|
21
|
+
```diff
|
|
22
|
+
import { workflow } from "@tailor-platform/sdk/runtime";
|
|
23
|
+
|
|
24
|
+
-await workflow.triggerWorkflow("myWorkflow", { data: "value" });
|
|
25
|
+
+await workflow.startWorkflow("myWorkflow", { data: "value" });
|
|
26
|
+
-workflow.triggerJobFunction("myJob", { data: "value" });
|
|
27
|
+
+workflow.startJobFunction("myJob", { data: "value" });
|
|
28
|
+
-await workflow.resumeWorkflow("execution-id");
|
|
29
|
+
+await workflow.resumeWorkflowExecution("execution-id");
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Run the `v2/workflow-trigger-rename` codemod to migrate call sites automatically.
|
|
33
|
+
|
|
34
|
+
### Minor Changes
|
|
35
|
+
|
|
36
|
+
- [#1800](https://github.com/tailor-platform/sdk/pull/1800) [`d07a82a`](https://github.com/tailor-platform/sdk/commit/d07a82aa4ded74c3d84e157b4bed5c37ef0ec239) Thanks [@toiroakr](https://github.com/toiroakr)! - Machine user attribute keys now mirror the field's optionality: attributes derived from optional user fields (or optional `machineUserAttributes` fields) can be omitted, and `null`/`undefined` values are treated as "attribute not set" instead of being rejected at deploy time. Attributes derived from required fields remain mandatory, and undeclared attribute keys are still rejected. The generated `AttributeMap` type used to read `user.attributes` in resolvers, executors, and workflows now mirrors this same optionality, so an attribute derived from an optional field is typed as possibly absent instead of always present.
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- [#1741](https://github.com/tailor-platform/sdk/pull/1741) [`f1cbda5`](https://github.com/tailor-platform/sdk/commit/f1cbda56df96670f18dccf2b7f2473430584f377) Thanks [@toiroakr](https://github.com/toiroakr)! - Resolve each config's `files` glob patterns and bundler `tsconfig` relative to that config file's own directory instead of the invocation `cwd`, so `--config a/tailor.config.ts,b/tailor.config.ts` no longer lets one app's file glob or path aliases bleed into another. If a `files` pattern matches nothing under the new directory, it falls back to resolving against `cwd` as before, so existing configs whose patterns were written against the invocation directory keep working.
|
|
41
|
+
|
|
42
|
+
- [#1767](https://github.com/tailor-platform/sdk/pull/1767) [`c870196`](https://github.com/tailor-platform/sdk/commit/c8701961f90d7bdcc887c793c806d4f26cc9b197) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix tsconfig `paths` alias resolution for dynamically loaded resolver, executor, workflow, HTTP adapter, and TailorDB type files. Previously, an import like `import { foo } from "@/utils"` in one of these files would fail to resolve when the file lived outside the directory tsx was registered from (e.g. in multi-app setups). Each file's `paths` aliases are now resolved as a fallback from its own tsconfig, based on the importing file's own directory.
|
|
43
|
+
|
|
44
|
+
- [#1788](https://github.com/tailor-platform/sdk/pull/1788) [`da7d0c4`](https://github.com/tailor-platform/sdk/commit/da7d0c49322deebc9343dee88652152620a7cef9) Thanks [@toiroakr](https://github.com/toiroakr)! - `tailor deploy` no longer automatically deletes on-disk bundle artifacts left by SDK versions predating the in-memory bundling approach; delete those specific stale files manually if any remain from a very old SDK version (do not delete the whole output directory, which also holds deploy state such as secrets and Auth Connection records)
|
|
45
|
+
|
|
46
|
+
- [#1785](https://github.com/tailor-platform/sdk/pull/1785) [`cb97bd4`](https://github.com/tailor-platform/sdk/commit/cb97bd45314c5897818233dc8bc3b84b83bea8a3) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency tsx to v4.23.1
|
|
47
|
+
|
|
48
|
+
- [#1801](https://github.com/tailor-platform/sdk/pull/1801) [`ee382c7`](https://github.com/tailor-platform/sdk/commit/ee382c7d5f5c0a14acf47c1dee6f12d8cecad92d) Thanks [@toiroakr](https://github.com/toiroakr)! - Update the `tailordb erd` plugin install hint to reference the renamed `@tailor-platform/sdk-plugin-tailordb-erd` package.
|
|
49
|
+
|
|
3
50
|
## 2.0.0-next.6
|
|
4
51
|
|
|
5
52
|
### Major Changes
|