Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"add-erd-plugin-package",
"apply-deploy-source-strings",
"auth-attributes-rename",
"calm-tools-lint",
"cli-plugin-schema-api",
"cli-plugins",
"codemod-llm-review",
Expand All @@ -17,9 +18,12 @@
"extract-erd-plugin",
"field-parse-runtime-layer",
"fix-mockfile-open-download-stream",
"fix-multi-config-cwd",
"fix-next5-codemod-boundaries",
"fix-rename-bin-source-files",
"fix-ts-hook-dotted-basename",
"fix-ts-hook-paths-without-baseurl",
"fix-user-file-tsconfig-paths",
"fix-v2-prerelease-codemods",
"fix-validate-issues-generic-field",
"forward-relation-name",
Expand All @@ -28,6 +32,7 @@
"isolate-concurrent-deployment-bundles",
"keyring-default-storage",
"kysely-date-timestamp",
"machine-user-optional-attributes",
"open-download-review-scope",
"parser-schema-strict",
"politty-skill-command-cleanup",
Expand All @@ -41,6 +46,7 @@
"remove-define-generators",
"remove-function-test-run-input-wrapper",
"remove-generate-watch",
"remove-legacy-bundle-cleanup",
"remove-open-download-stream",
"remove-runtime-globals-compatibility",
"remove-tailor-sdk-skills-shim",
Expand All @@ -49,9 +55,12 @@
"remove-v2-cli-aliases",
"remove-workflow-test-env-fallback",
"rename-bin-command",
"rename-erd-plugin-to-sdk-plugin-tailordb-erd",
"rename-tailor-cli-env",
"renovate-1785",
"require-function-log-content-hash",
"require-tailordb-permission-config",
"resolve-pending-codemod-boundaries",
"revert-strict-scalar-strings",
"runtime-global-source-strings",
"runtime-globals-import",
Expand All @@ -63,11 +72,14 @@
"tailor-principal-type",
"tailordb-shared-now-hook",
"timestamps-updated-at-create",
"update-erd-plugin-install-hint-name",
"user-profile-type-schema",
"v2-baseline",
"wait-point-rename",
"workflow-canonical-names",
"workflow-executor-args-contract",
"workflow-trigger-dispatch"
"workflow-start-rename",
"workflow-trigger-dispatch",
"workflow-trigger-rename"
]
}
20 changes: 20 additions & 0 deletions packages/create-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# @tailor-platform/create-sdk

## 2.0.0-next.7

### Major Changes

- [#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:

```diff
const inventory = checkInventory.trigger({ orderId: input.orderId });
+const inventory = checkInventory.start({ orderId: input.orderId });

-const workflowRunId = await orderProcessingWorkflow.trigger(args, { invoker: "manager" });
+const workflowRunId = await orderProcessingWorkflow.start(args, { invoker: "manager" });
```

`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.

### Minor Changes

- [#1737](https://github.com/tailor-platform/sdk/pull/1737) [`e349b9e`](https://github.com/tailor-platform/sdk/commit/e349b9e3d9c61f324f21dea92dd08055493a2c6d) Thanks [@dqn](https://github.com/dqn)! - Add lint rules that flag the external /api prefix in HTTP adapter path patterns and permission settings that grant access unconditionally, and enable them in newly scaffolded projects.

## 2.0.0-next.6

## 2.0.0-next.5
Expand Down
2 changes: 1 addition & 1 deletion packages/create-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tailor-platform/create-sdk",
"version": "2.0.0-next.6",
"version": "2.0.0-next.7",
"description": "A CLI tool to quickly create a new Tailor Platform SDK project",
"license": "MIT",
"repository": {
Expand Down
7 changes: 7 additions & 0 deletions packages/eslint-plugin-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @tailor-platform/eslint-plugin-sdk

## 0.1.0-next.0

### Minor Changes

- [#1737](https://github.com/tailor-platform/sdk/pull/1737) [`e349b9e`](https://github.com/tailor-platform/sdk/commit/e349b9e3d9c61f324f21dea92dd08055493a2c6d) Thanks [@dqn](https://github.com/dqn)! - Add lint rules that flag the external /api prefix in HTTP adapter path patterns and permission settings that grant access unconditionally, and enable them in newly scaffolded projects.
2 changes: 1 addition & 1 deletion packages/eslint-plugin-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tailor-platform/eslint-plugin-sdk",
"version": "0.0.0",
"version": "0.1.0-next.0",
"description": "Lint rules for Tailor Platform SDK applications",
"license": "MIT",
"repository": {
Expand Down
35 changes: 35 additions & 0 deletions packages/sdk-codemod/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# @tailor-platform/sdk-codemod

## 0.3.0-next.7

### Patch Changes

- [#1787](https://github.com/tailor-platform/sdk/pull/1787) [`898d0b0`](https://github.com/tailor-platform/sdk/commit/898d0b0f809d15ea883a32a78a247eda4ca7caa7) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix `tailor upgrade` reporting zero codemods across several v2 prerelease boundaries. `v2/db-type-to-table` and `v2/runtime-subpath-namespace` now trigger at `2.0.0-next.4` (where they actually shipped) instead of `2.0.0-next.3`, and `v2/forward-relation-name`, `v2/tailordb-validate-simplify`, and `v2/tailordb-hook-redesign` now trigger at `2.0.0-next.5` instead of `2.0.0-next.4`.

- [#1787](https://github.com/tailor-platform/sdk/pull/1787) [`6653afd`](https://github.com/tailor-platform/sdk/commit/6653afd5a0be52f8c9a1dc6fa50e445f0f678dc0) Thanks [@toiroakr](https://github.com/toiroakr)! - Add a `V2_NEXT_PENDING` placeholder `prereleaseUntil` for codemods whose exact `2.0.0-next.N` release boundary isn't known yet at implementation time, plus a `pnpm codemod:resolve-pending` step (wired into the release workflow) that resolves it to the real version constant once the release PR bumps `@tailor-platform/sdk`'s version. Prevents codemod boundaries from drifting out of sync with the version they actually ship in, which previously required a manual follow-up fix after each release.

- [#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:

```diff
const inventory = checkInventory.trigger({ orderId: input.orderId });
+const inventory = checkInventory.start({ orderId: input.orderId });

-const workflowRunId = await orderProcessingWorkflow.trigger(args, { invoker: "manager" });
+const workflowRunId = await orderProcessingWorkflow.start(args, { invoker: "manager" });
```

`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.

- [#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:

```diff
import { workflow } from "@tailor-platform/sdk/runtime";

-await workflow.triggerWorkflow("myWorkflow", { data: "value" });
+await workflow.startWorkflow("myWorkflow", { data: "value" });
-workflow.triggerJobFunction("myJob", { data: "value" });
+workflow.startJobFunction("myJob", { data: "value" });
-await workflow.resumeWorkflow("execution-id");
+await workflow.resumeWorkflowExecution("execution-id");
```

Run the `v2/workflow-trigger-rename` codemod to migrate call sites automatically.

## 0.3.0-next.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tailor-platform/sdk-codemod",
"version": "0.3.0-next.6",
"version": "0.3.0-next.7",
"description": "Codemod runner for Tailor Platform SDK upgrades",
"license": "MIT",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion packages/sdk-codemod/src/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const V2_NEXT_2 = "2.0.0-next.2";
const V2_NEXT_4 = "2.0.0-next.4";
const V2_NEXT_5 = "2.0.0-next.5";
const V2_NEXT_6 = "2.0.0-next.6";
const V2_NEXT_7 = "2.0.0-next.7";
/**
* Sentinel `prereleaseUntil` for a codemod whose exact `2.0.0-next.N` release is not
* known yet. `pnpm codemod:resolve-pending`, run in CI against the release PR, replaces
Expand Down Expand Up @@ -917,7 +918,7 @@ export const allCodemods: CodemodPackage[] = [
"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. No codemod ships for this rename: distinguishing a workflow/job `.trigger()` call from an unrelated object's own `.trigger()` method requires resolving the receiver back to a `createWorkflow`/`createWorkflowJob` result across files, which the SDK's own CLI bundler already does for build-time rewriting. Reusing that logic in a standalone script is a nontrivial lift, and — unlike the bundler, which fails loudly when it cannot rewrite a call — a codemod false positive would silently rewrite an unrelated `.trigger()` call with no error. For the call-site volume this rename typically involves, manual review guided by the prompt below is the safer trade-off.",
since: "1.0.0",
until: "2.0.0",
prereleaseUntil: V2_NEXT_PENDING,
prereleaseUntil: V2_NEXT_7,
filePatterns: ["**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"],
suspiciousPatterns: [".trigger("],
examples: [
Expand Down
11 changes: 11 additions & 0 deletions packages/sdk-plugin-tailordb-erd/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @tailor-platform/sdk-tailordb-erd-plugin

## 0.1.0-next.1

### Minor Changes

- [#1801](https://github.com/tailor-platform/sdk/pull/1801) [`ee382c7`](https://github.com/tailor-platform/sdk/commit/ee382c7d5f5c0a14acf47c1dee6f12d8cecad92d) Thanks [@toiroakr](https://github.com/toiroakr)! - Renamed the package from `@tailor-platform/sdk-tailordb-erd-plugin` to `@tailor-platform/sdk-plugin-tailordb-erd`, following the `eslint-plugin-*`-style naming convention used for CLI plugin packages. Update your dependency to the new name; the `tailor-tailordb-erd` executable and the `tailor tailordb erd` commands are unchanged.

### Patch Changes

- Updated dependencies [[`f1cbda5`](https://github.com/tailor-platform/sdk/commit/f1cbda56df96670f18dccf2b7f2473430584f377), [`c870196`](https://github.com/tailor-platform/sdk/commit/c8701961f90d7bdcc887c793c806d4f26cc9b197), [`d07a82a`](https://github.com/tailor-platform/sdk/commit/d07a82aa4ded74c3d84e157b4bed5c37ef0ec239), [`da7d0c4`](https://github.com/tailor-platform/sdk/commit/da7d0c49322deebc9343dee88652152620a7cef9), [`cb97bd4`](https://github.com/tailor-platform/sdk/commit/cb97bd45314c5897818233dc8bc3b84b83bea8a3), [`ee382c7`](https://github.com/tailor-platform/sdk/commit/ee382c7d5f5c0a14acf47c1dee6f12d8cecad92d), [`c971797`](https://github.com/tailor-platform/sdk/commit/c971797c9bfa035a43771c46f2b1c3bd93f989a9), [`c971797`](https://github.com/tailor-platform/sdk/commit/c971797c9bfa035a43771c46f2b1c3bd93f989a9)]:
- @tailor-platform/sdk@2.0.0-next.7

## 0.1.0-next.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-plugin-tailordb-erd/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tailor-platform/sdk-plugin-tailordb-erd",
"version": "0.1.0-next.0",
"version": "0.1.0-next.1",
"description": "Tailor CLI plugin providing the `tailor tailordb erd` commands (TailorDB ERD viewer)",
"license": "MIT",
"repository": {
Expand Down
47 changes: 47 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# @tailor-platform/sdk

## 2.0.0-next.7

### Major Changes

- [#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:

```diff
const inventory = checkInventory.trigger({ orderId: input.orderId });
+const inventory = checkInventory.start({ orderId: input.orderId });

-const workflowRunId = await orderProcessingWorkflow.trigger(args, { invoker: "manager" });
+const workflowRunId = await orderProcessingWorkflow.start(args, { invoker: "manager" });
```

`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.

- [#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:

```diff
import { workflow } from "@tailor-platform/sdk/runtime";

-await workflow.triggerWorkflow("myWorkflow", { data: "value" });
+await workflow.startWorkflow("myWorkflow", { data: "value" });
-workflow.triggerJobFunction("myJob", { data: "value" });
+workflow.startJobFunction("myJob", { data: "value" });
-await workflow.resumeWorkflow("execution-id");
+await workflow.resumeWorkflowExecution("execution-id");
```

Run the `v2/workflow-trigger-rename` codemod to migrate call sites automatically.

### Minor Changes

- [#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.

### Patch Changes

- [#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.

- [#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.

- [#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)

- [#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

- [#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.

## 2.0.0-next.6

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tailor-platform/sdk",
"version": "2.0.0-next.6",
"version": "2.0.0-next.7",
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
"license": "MIT",
"repository": {
Expand Down
Loading