You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/sdk/docs/migration/v2.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,11 +217,11 @@ happen to use `--machineuser` alone.
217
217
218
218
</details>
219
219
220
-
## auth.invoker("name") → "name"
220
+
## auth.invoker("name") → invoker: "name"
221
221
222
222
**Migration:** Partially automatic
223
223
224
-
Replace `auth.invoker("name")`calls with the bare `"name"` string and drop the `auth` import when no other reference remains. The `auth.invoker()` helper is deprecated in v2 because importing `auth` from `tailor.config.ts` into runtime files pulls Node-only modules into the bundle.
224
+
Rename statically identified SDK `authInvoker` options to `invoker`, replace `auth.invoker("name")`there with the bare `"name"` string, and drop the `auth` import when no other reference remains. Ambiguous workflow `.trigger()` calls are left for manual review. The `auth.invoker()` helper is removed in v2 because importing `auth` from `tailor.config.ts` into runtime files pulls Node-only modules into the bundle.
In Tailor SDK v2 the auth.invoker() helper is removed; an invoker is now the
243
243
machine user name passed directly as a string. The codemod already rewrote the
244
-
string-literal form auth.invoker("name") to "name". These files still contain
245
-
auth.invoker(...) because the argument is not a plain string literal (a variable,
246
-
template literal, function call, or property access).
244
+
statically identified SDK option form authInvoker: auth.invoker("name") to invoker: "name" and renamed supported authInvoker option keys. These files still contain
245
+
auth.invoker(...) calls or authInvoker keys that need manual review.
247
246
248
247
For each remaining auth.invoker(<expr>) call:
249
-
1. Replace the whole call with <expr> as-is (e.g. auth.invoker(name) becomes name).
250
-
2. Make sure <expr> evaluates to the machine user name (a string); adjust it if it
251
-
resolves to an object or an auth config value instead.
248
+
1. Replace the whole call with <expr> only where the target option expects a
249
+
machine user name string; platform/runtime authInvoker payloads still expect
250
+
the object form.
251
+
2. Rename remaining authInvoker option keys to invoker only for SDK resolver,
252
+
executor, workflow.trigger(), or startWorkflow() options. Keep platform/runtime
253
+
payload keys such as tailor.workflow.triggerWorkflow(..., { authInvoker: ... }).
252
254
3. After removing every auth.invoker usage in a file, delete the now-unused auth
253
255
import (keeping it pulls Node-only config modules into runtime bundles); leave
254
256
the import if auth is still referenced elsewhere.
255
257
256
-
Do not change behavior beyond removing the auth.invoker() indirection.
258
+
Do not change behavior beyond the SDK option rename and auth.invoker() removal.
0 commit comments