@tailor-platform/create-sdk 0.17.0 → 0.18.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 +2 -0
- package/package.json +4 -4
- package/templates/hello-world/package.json +4 -4
- package/templates/hello-world/tsconfig.json +2 -1
- package/templates/inventory-management/package.json +4 -4
- package/templates/multi-application/package.json +4 -4
- package/templates/multi-application/tsconfig.json +2 -1
- package/templates/testing/e2e/globalSetup.ts +10 -10
- package/templates/testing/e2e/workflow.test.ts +3 -3
- package/templates/testing/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/create-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "A CLI tool to quickly create a new Tailor Platform SDK project",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"pkg-types": "2.3.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@eslint/js": "9.39.
|
|
29
|
-
"@types/node": "22.19.
|
|
30
|
-
"eslint": "9.39.
|
|
28
|
+
"@eslint/js": "9.39.2",
|
|
29
|
+
"@types/node": "22.19.3",
|
|
30
|
+
"eslint": "9.39.2",
|
|
31
31
|
"tsdown": "0.15.6",
|
|
32
32
|
"typescript": "5.9.3",
|
|
33
33
|
"typescript-eslint": "8.49.0"
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"typecheck": "tsc --noEmit"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@eslint/js": "9.39.
|
|
15
|
-
"@tailor-platform/sdk": "0.
|
|
16
|
-
"@types/node": "22.19.
|
|
17
|
-
"eslint": "9.39.
|
|
14
|
+
"@eslint/js": "9.39.2",
|
|
15
|
+
"@tailor-platform/sdk": "0.18.0",
|
|
16
|
+
"@types/node": "22.19.3",
|
|
17
|
+
"eslint": "9.39.2",
|
|
18
18
|
"prettier": "3.7.4",
|
|
19
19
|
"typescript": "5.9.3",
|
|
20
20
|
"typescript-eslint": "8.49.0"
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"kysely": "0.28.8"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@eslint/js": "9.39.
|
|
19
|
+
"@eslint/js": "9.39.2",
|
|
20
20
|
"@tailor-platform/function-types": "0.8.0",
|
|
21
|
-
"@tailor-platform/sdk": "0.
|
|
22
|
-
"@types/node": "22.19.
|
|
23
|
-
"eslint": "9.39.
|
|
21
|
+
"@tailor-platform/sdk": "0.18.0",
|
|
22
|
+
"@types/node": "22.19.3",
|
|
23
|
+
"eslint": "9.39.2",
|
|
24
24
|
"prettier": "3.7.4",
|
|
25
25
|
"typescript": "5.9.3",
|
|
26
26
|
"typescript-eslint": "8.49.0"
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"typecheck": "tsc --noEmit"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@eslint/js": "9.39.
|
|
17
|
-
"@tailor-platform/sdk": "0.
|
|
18
|
-
"@types/node": "22.19.
|
|
19
|
-
"eslint": "9.39.
|
|
16
|
+
"@eslint/js": "9.39.2",
|
|
17
|
+
"@tailor-platform/sdk": "0.18.0",
|
|
18
|
+
"@types/node": "22.19.3",
|
|
19
|
+
"eslint": "9.39.2",
|
|
20
20
|
"prettier": "3.7.4",
|
|
21
21
|
"typescript": "5.9.3",
|
|
22
22
|
"typescript-eslint": "8.49.0"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
apply,
|
|
3
|
-
|
|
3
|
+
getMachineUserToken,
|
|
4
4
|
show,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
createWorkspace,
|
|
6
|
+
deleteWorkspace,
|
|
7
7
|
type WorkspaceInfo,
|
|
8
8
|
} from "@tailor-platform/sdk/cli";
|
|
9
9
|
import type { TestProject } from "vitest/node";
|
|
@@ -17,9 +17,9 @@ declare module "vitest" {
|
|
|
17
17
|
|
|
18
18
|
let createdWorkspace: WorkspaceInfo | null = null;
|
|
19
19
|
|
|
20
|
-
async function
|
|
20
|
+
async function setupWorkspace(name: string, region: string) {
|
|
21
21
|
console.log(`Creating workspace "${name}" in region "${region}"...`);
|
|
22
|
-
const workspace = await
|
|
22
|
+
const workspace = await createWorkspace({ name, region });
|
|
23
23
|
console.log(`Workspace "${workspace.name}" created successfully.`);
|
|
24
24
|
return workspace;
|
|
25
25
|
}
|
|
@@ -30,9 +30,9 @@ async function deployApplication() {
|
|
|
30
30
|
console.log("Application deployed successfully.");
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
async function
|
|
33
|
+
async function cleanupWorkspace(workspaceId: string) {
|
|
34
34
|
console.log("Deleting workspace...");
|
|
35
|
-
await
|
|
35
|
+
await deleteWorkspace({ workspaceId });
|
|
36
36
|
console.log("Workspace deleted successfully.");
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -46,20 +46,20 @@ export async function setup(project: TestProject) {
|
|
|
46
46
|
"TAILOR_PLATFORM_WORKSPACE_NAME and TAILOR_PLATFORM_WORKSPACE_REGION must be set when CI=true",
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
-
createdWorkspace = await
|
|
49
|
+
createdWorkspace = await setupWorkspace(workspaceName, workspaceRegion);
|
|
50
50
|
process.env.TAILOR_PLATFORM_WORKSPACE_ID = createdWorkspace.id;
|
|
51
51
|
await deployApplication();
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
const app = await show();
|
|
55
|
-
const tokens = await
|
|
55
|
+
const tokens = await getMachineUserToken({ name: "admin" });
|
|
56
56
|
project.provide("url", app.url);
|
|
57
57
|
project.provide("token", tokens.accessToken);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export async function teardown() {
|
|
61
61
|
if (createdWorkspace) {
|
|
62
|
-
await
|
|
62
|
+
await cleanupWorkspace(createdWorkspace.id);
|
|
63
63
|
createdWorkspace = null;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { describe, expect, test } from "vitest";
|
|
3
|
-
import {
|
|
3
|
+
import { startWorkflow } from "@tailor-platform/sdk/cli";
|
|
4
4
|
|
|
5
5
|
describe.concurrent("workflow", () => {
|
|
6
6
|
test(
|
|
7
7
|
"simple-calculation: execute workflow and verify success",
|
|
8
8
|
{ timeout: 120000 },
|
|
9
9
|
async () => {
|
|
10
|
-
const { executionId, wait } = await
|
|
10
|
+
const { executionId, wait } = await startWorkflow({
|
|
11
11
|
nameOrId: "simple-calculation",
|
|
12
12
|
machineUser: "admin",
|
|
13
13
|
arg: { a: 2, b: 3 },
|
|
@@ -30,7 +30,7 @@ describe.concurrent("workflow", () => {
|
|
|
30
30
|
const uuid = randomUUID();
|
|
31
31
|
const testEmail = `workflow-test-${uuid}@example.com`;
|
|
32
32
|
|
|
33
|
-
const { executionId, wait } = await
|
|
33
|
+
const { executionId, wait } = await startWorkflow({
|
|
34
34
|
nameOrId: "user-profile-sync",
|
|
35
35
|
machineUser: "admin",
|
|
36
36
|
arg: {
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"kysely": "0.28.8"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@eslint/js": "9.39.
|
|
22
|
+
"@eslint/js": "9.39.2",
|
|
23
23
|
"@tailor-platform/function-types": "0.8.0",
|
|
24
|
-
"@tailor-platform/sdk": "0.
|
|
25
|
-
"@types/node": "22.19.
|
|
26
|
-
"eslint": "9.39.
|
|
27
|
-
"graphql-request": "7.
|
|
24
|
+
"@tailor-platform/sdk": "0.18.0",
|
|
25
|
+
"@types/node": "22.19.3",
|
|
26
|
+
"eslint": "9.39.2",
|
|
27
|
+
"graphql-request": "7.4.0",
|
|
28
28
|
"prettier": "3.7.4",
|
|
29
29
|
"typescript": "5.9.3",
|
|
30
30
|
"typescript-eslint": "8.49.0",
|