@tailor-platform/create-sdk 2.0.0-next.0 → 2.0.0-next.1

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 CHANGED
@@ -1,7 +1,13 @@
1
1
  # @tailor-platform/create-sdk
2
2
 
3
+ ## 2.0.0-next.1
4
+
3
5
  ## 2.0.0-next.0
4
6
 
7
+ ## 1.66.0
8
+
9
+ ## 1.65.0
10
+
5
11
  ## 1.64.0
6
12
 
7
13
  ## 1.63.0
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ const templateHints = {
23
23
  workflow: "Workflow patterns with job chaining and testing",
24
24
  executor: "Executor trigger types (record, resolver, schedule, webhook)",
25
25
  "static-web-site": "Static website with auth and IdP integration",
26
- generators: "Built-in generators: kysely, enums, files, seed"
26
+ generators: "Built-in generation plugins: kysely, enums, files, seed"
27
27
  };
28
28
  const validateName = (name) => {
29
29
  if (!name) return "Project name is required.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/create-sdk",
3
- "version": "2.0.0-next.0",
3
+ "version": "2.0.0-next.1",
4
4
  "description": "A CLI tool to quickly create a new Tailor Platform SDK project",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,11 +21,11 @@
21
21
  "execa": "9.6.1",
22
22
  "picocolors": "1.1.1",
23
23
  "pkg-types": "2.3.1",
24
- "politty": "0.5.1",
24
+ "politty": "0.6.0",
25
25
  "zod": "4.4.3"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/node": "24.13.1",
28
+ "@types/node": "24.13.2",
29
29
  "oxlint": "1.69.0",
30
30
  "oxlint-tsgolint": "0.23.0",
31
31
  "tsdown": "0.22.2",
@@ -14,8 +14,8 @@
14
14
  "typecheck": "tsc --noEmit"
15
15
  },
16
16
  "devDependencies": {
17
- "@tailor-platform/sdk": "2.0.0-next.0",
18
- "@types/node": "24.13.1",
17
+ "@tailor-platform/sdk": "2.0.0-next.1",
18
+ "@types/node": "24.13.2",
19
19
  "oxfmt": "0.54.0",
20
20
  "oxlint": "1.69.0",
21
21
  "oxlint-tsgolint": "0.23.0",
@@ -14,8 +14,8 @@
14
14
  "typecheck": "tsc --noEmit"
15
15
  },
16
16
  "devDependencies": {
17
- "@tailor-platform/sdk": "2.0.0-next.0",
18
- "@types/node": "24.13.1",
17
+ "@tailor-platform/sdk": "2.0.0-next.1",
18
+ "@types/node": "24.13.2",
19
19
  "oxfmt": "0.54.0",
20
20
  "oxlint": "1.69.0",
21
21
  "oxlint-tsgolint": "0.23.0",
@@ -12,8 +12,8 @@
12
12
  "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "devDependencies": {
15
- "@tailor-platform/sdk": "2.0.0-next.0",
16
- "@types/node": "24.13.1",
15
+ "@tailor-platform/sdk": "2.0.0-next.1",
16
+ "@types/node": "24.13.2",
17
17
  "oxfmt": "0.54.0",
18
18
  "oxlint": "1.69.0",
19
19
  "oxlint-tsgolint": "0.23.0",
@@ -12,8 +12,8 @@
12
12
  "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "devDependencies": {
15
- "@tailor-platform/sdk": "2.0.0-next.0",
16
- "@types/node": "24.13.1",
15
+ "@tailor-platform/sdk": "2.0.0-next.1",
16
+ "@types/node": "24.13.2",
17
17
  "oxfmt": "0.54.0",
18
18
  "oxlint": "1.69.0",
19
19
  "oxlint-tsgolint": "0.23.0",
@@ -1,6 +1,5 @@
1
1
  import { createExecutor, recordUpdatedTrigger } from "@tailor-platform/sdk";
2
2
  import { inventory } from "../db/inventory";
3
- import config from "../../tailor.config";
4
3
  import { getDB } from "../generated/kysely-tailordb";
5
4
 
6
5
  export default createExecutor({
@@ -22,6 +21,6 @@ export default createExecutor({
22
21
  })
23
22
  .execute();
24
23
  },
25
- invoker: config.auth.invoker("manager"),
24
+ authInvoker: "manager",
26
25
  },
27
26
  });
@@ -13,8 +13,8 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "devDependencies": {
16
- "@tailor-platform/sdk": "2.0.0-next.0",
17
- "@types/node": "24.13.1",
16
+ "@tailor-platform/sdk": "2.0.0-next.1",
17
+ "@types/node": "24.13.2",
18
18
  "oxfmt": "0.54.0",
19
19
  "oxlint": "1.69.0",
20
20
  "oxlint-tsgolint": "0.23.0",
@@ -14,8 +14,8 @@
14
14
  "typecheck": "tsc --noEmit"
15
15
  },
16
16
  "devDependencies": {
17
- "@tailor-platform/sdk": "2.0.0-next.0",
18
- "@types/node": "24.13.1",
17
+ "@tailor-platform/sdk": "2.0.0-next.1",
18
+ "@types/node": "24.13.2",
19
19
  "oxfmt": "0.54.0",
20
20
  "oxlint": "1.69.0",
21
21
  "oxlint-tsgolint": "0.23.0",
@@ -12,8 +12,8 @@
12
12
  "typecheck": "tsc --noEmit"
13
13
  },
14
14
  "devDependencies": {
15
- "@tailor-platform/sdk": "2.0.0-next.0",
16
- "@types/node": "24.13.1",
15
+ "@tailor-platform/sdk": "2.0.0-next.1",
16
+ "@types/node": "24.13.2",
17
17
  "oxfmt": "0.54.0",
18
18
  "oxlint": "1.69.0",
19
19
  "oxlint-tsgolint": "0.23.0",
@@ -14,8 +14,8 @@
14
14
  "typecheck": "tsc --noEmit"
15
15
  },
16
16
  "devDependencies": {
17
- "@tailor-platform/sdk": "2.0.0-next.0",
18
- "@types/node": "24.13.1",
17
+ "@tailor-platform/sdk": "2.0.0-next.1",
18
+ "@types/node": "24.13.2",
19
19
  "oxfmt": "0.54.0",
20
20
  "oxlint": "1.69.0",
21
21
  "oxlint-tsgolint": "0.23.0",
@@ -7,7 +7,7 @@ Demonstrates workflow patterns with job chaining, trigger testing, and dependenc
7
7
  - Workflow with multiple jobs (`createWorkflow`, `createWorkflowJob`)
8
8
  - Job chaining via `.trigger()`
9
9
  - Database operations in workflow jobs (DI pattern)
10
- - Integration testing with `workflow.mainJob.trigger()`
10
+ - Integration testing with `runWorkflowLocally()`
11
11
 
12
12
  ## Getting Started
13
13
 
@@ -1,7 +1,6 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import { describe, expect, test } from "vitest";
3
3
  import { startWorkflow } from "@tailor-platform/sdk/cli";
4
- import config from "../tailor.config";
5
4
  import userProfileSyncWorkflow from "../src/workflow/sync-profile";
6
5
 
7
6
  describe("workflow", () => {
@@ -11,7 +10,7 @@ describe("workflow", () => {
11
10
 
12
11
  const { executionId, wait } = await startWorkflow({
13
12
  workflow: userProfileSyncWorkflow,
14
- authInvoker: config.auth.invoker("admin"),
13
+ authInvoker: "admin",
15
14
  arg: {
16
15
  name: "workflow-test-user",
17
16
  email: testEmail,
@@ -15,9 +15,9 @@
15
15
  "typecheck": "tsc --noEmit"
16
16
  },
17
17
  "devDependencies": {
18
- "@tailor-platform/sdk": "2.0.0-next.0",
19
- "@types/node": "24.13.1",
20
- "graphql": "16.14.1",
18
+ "@tailor-platform/sdk": "2.0.0-next.1",
19
+ "@types/node": "24.13.2",
20
+ "graphql": "16.14.2",
21
21
  "graphql-request": "7.4.0",
22
22
  "oxfmt": "0.54.0",
23
23
  "oxlint": "1.69.0",
@@ -1,3 +1,4 @@
1
+ import { runWorkflowLocally } from "@tailor-platform/sdk/vitest";
1
2
  import { describe, expect, test, vi } from "vitest";
2
3
  import workflow, {
3
4
  fulfillOrder,
@@ -43,16 +44,16 @@ describe("order fulfillment workflow", () => {
43
44
 
44
45
  describe("orchestration tests with mocked triggers", () => {
45
46
  test("fulfillOrder chains all jobs", async () => {
46
- using _validateSpy = vi.spyOn(validateOrder, "trigger").mockResolvedValue({
47
+ using _validateSpy = vi.spyOn(validateOrder, "trigger").mockReturnValue({
47
48
  valid: true,
48
49
  orderId: "order-1",
49
50
  });
50
- using _paymentSpy = vi.spyOn(processPayment, "trigger").mockResolvedValue({
51
+ using _paymentSpy = vi.spyOn(processPayment, "trigger").mockReturnValue({
51
52
  transactionId: "txn-order-1",
52
53
  amount: 100,
53
54
  status: "completed" as const,
54
55
  });
55
- using _confirmSpy = vi.spyOn(sendConfirmation, "trigger").mockResolvedValue({
56
+ using _confirmSpy = vi.spyOn(sendConfirmation, "trigger").mockReturnValue({
56
57
  orderId: "order-1",
57
58
  transactionId: "txn-order-1",
58
59
  confirmed: true,
@@ -81,16 +82,16 @@ describe("order fulfillment workflow", () => {
81
82
  });
82
83
 
83
84
  test("workflow.mainJob.body() chains all jobs", async () => {
84
- using _validateSpy = vi.spyOn(validateOrder, "trigger").mockResolvedValue({
85
+ using _validateSpy = vi.spyOn(validateOrder, "trigger").mockReturnValue({
85
86
  valid: true,
86
87
  orderId: "order-2",
87
88
  });
88
- using _paymentSpy = vi.spyOn(processPayment, "trigger").mockResolvedValue({
89
+ using _paymentSpy = vi.spyOn(processPayment, "trigger").mockReturnValue({
89
90
  transactionId: "txn-order-2",
90
91
  amount: 200,
91
92
  status: "completed" as const,
92
93
  });
93
- using _confirmSpy = vi.spyOn(sendConfirmation, "trigger").mockResolvedValue({
94
+ using _confirmSpy = vi.spyOn(sendConfirmation, "trigger").mockReturnValue({
94
95
  orderId: "order-2",
95
96
  transactionId: "txn-order-2",
96
97
  confirmed: true,
@@ -107,9 +108,9 @@ describe("order fulfillment workflow", () => {
107
108
  });
108
109
  });
109
110
 
110
- describe("integration tests with .trigger()", () => {
111
- test("workflow.mainJob.trigger() executes all jobs", async () => {
112
- const result = await workflow.mainJob.trigger({
111
+ describe("integration tests with runWorkflowLocally()", () => {
112
+ test("runWorkflowLocally() executes all jobs", async () => {
113
+ const result = await runWorkflowLocally(workflow, {
113
114
  orderId: "order-3",
114
115
  amount: 300,
115
116
  });
@@ -34,8 +34,8 @@ export const sendConfirmation = createWorkflowJob({
34
34
 
35
35
  export const fulfillOrder = createWorkflowJob({
36
36
  name: "fulfill-order",
37
- body: async (input: { orderId: string; amount: number }) => {
38
- const validation = await validateOrder.trigger({
37
+ body: (input: { orderId: string; amount: number }) => {
38
+ const validation = validateOrder.trigger({
39
39
  orderId: input.orderId,
40
40
  amount: input.amount,
41
41
  });
@@ -44,12 +44,12 @@ export const fulfillOrder = createWorkflowJob({
44
44
  throw new Error("Order validation failed");
45
45
  }
46
46
 
47
- const payment = await processPayment.trigger({
47
+ const payment = processPayment.trigger({
48
48
  orderId: input.orderId,
49
49
  amount: input.amount,
50
50
  });
51
51
 
52
- const confirmation = await sendConfirmation.trigger({
52
+ const confirmation = sendConfirmation.trigger({
53
53
  orderId: input.orderId,
54
54
  transactionId: payment.transactionId,
55
55
  });
@@ -20,6 +20,7 @@ export default defineConfig({
20
20
  name: { label: "e2e", color: "green" },
21
21
  include: ["e2e/**/*.test.ts"],
22
22
  globalSetup: "e2e/globalSetup.ts",
23
+ testTimeout: 60_000,
23
24
  },
24
25
  },
25
26
  ],