@tailor-platform/create-sdk 1.50.1 → 1.51.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 +4 -0
- package/package.json +4 -4
- package/templates/executor/package.json +2 -2
- package/templates/generators/package.json +2 -2
- package/templates/generators/src/generated/files.ts +13 -5
- package/templates/generators/src/seed/exec.mjs +5 -0
- package/templates/hello-world/package.json +2 -2
- package/templates/inventory-management/package.json +2 -2
- package/templates/multi-application/package.json +2 -2
- package/templates/resolver/package.json +2 -2
- package/templates/static-web-site/package.json +2 -2
- package/templates/tailordb/package.json +2 -2
- package/templates/workflow/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/create-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.51.1",
|
|
4
4
|
"description": "A CLI tool to quickly create a new Tailor Platform SDK project",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
],
|
|
18
18
|
"type": "module",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@clack/prompts": "1.
|
|
20
|
+
"@clack/prompts": "1.4.0",
|
|
21
21
|
"execa": "9.6.1",
|
|
22
22
|
"picocolors": "1.1.1",
|
|
23
23
|
"pkg-types": "2.3.1",
|
|
24
24
|
"politty": "0.4.15",
|
|
25
|
-
"zod": "4.3
|
|
25
|
+
"zod": "4.4.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "24.12.4",
|
|
29
29
|
"oxlint": "1.61.0",
|
|
30
|
-
"oxlint-tsgolint": "0.
|
|
30
|
+
"oxlint-tsgolint": "0.23.0",
|
|
31
31
|
"tsdown": "0.22.0",
|
|
32
32
|
"typescript": "5.9.3"
|
|
33
33
|
},
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"typecheck": "tsc --noEmit"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@tailor-platform/sdk": "1.
|
|
17
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
18
18
|
"@types/node": "24.12.4",
|
|
19
19
|
"oxfmt": "0.46.0",
|
|
20
20
|
"oxlint": "1.61.0",
|
|
21
|
-
"oxlint-tsgolint": "0.
|
|
21
|
+
"oxlint-tsgolint": "0.23.0",
|
|
22
22
|
"typescript": "5.9.3",
|
|
23
23
|
"vitest": "4.1.6"
|
|
24
24
|
}
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"typecheck": "tsc --noEmit"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@tailor-platform/sdk": "1.
|
|
17
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
18
18
|
"@types/node": "24.12.4",
|
|
19
19
|
"oxfmt": "0.46.0",
|
|
20
20
|
"oxlint": "1.61.0",
|
|
21
|
-
"oxlint-tsgolint": "0.
|
|
21
|
+
"oxlint-tsgolint": "0.23.0",
|
|
22
22
|
"typescript": "5.9.3",
|
|
23
23
|
"vitest": "4.1.6"
|
|
24
24
|
}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import * as file from "@tailor-platform/sdk/runtime/file";
|
|
2
|
+
import type {
|
|
3
|
+
FileUploadOptions,
|
|
4
|
+
FileUploadResponse,
|
|
5
|
+
FileMetadata,
|
|
6
|
+
FileStreamIterator,
|
|
7
|
+
} from "@tailor-platform/sdk/runtime/file";
|
|
8
|
+
|
|
1
9
|
export interface TypeWithFiles {
|
|
2
10
|
Product: {
|
|
3
11
|
fields: "image";
|
|
@@ -13,7 +21,7 @@ export async function downloadFile<T extends keyof TypeWithFiles>(
|
|
|
13
21
|
field: TypeWithFiles[T]["fields"],
|
|
14
22
|
recordId: string,
|
|
15
23
|
) {
|
|
16
|
-
return await
|
|
24
|
+
return await file.download(namespaces[type], type, field, recordId);
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
export async function uploadFile<T extends keyof TypeWithFiles>(
|
|
@@ -23,7 +31,7 @@ export async function uploadFile<T extends keyof TypeWithFiles>(
|
|
|
23
31
|
data: string | ArrayBuffer | Uint8Array<ArrayBufferLike> | number[],
|
|
24
32
|
options?: FileUploadOptions,
|
|
25
33
|
): Promise<FileUploadResponse> {
|
|
26
|
-
return await
|
|
34
|
+
return await file.upload(namespaces[type], type, field, recordId, data, options);
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
export async function deleteFile<T extends keyof TypeWithFiles>(
|
|
@@ -31,7 +39,7 @@ export async function deleteFile<T extends keyof TypeWithFiles>(
|
|
|
31
39
|
field: TypeWithFiles[T]["fields"],
|
|
32
40
|
recordId: string,
|
|
33
41
|
): Promise<void> {
|
|
34
|
-
return await
|
|
42
|
+
return await file.delete(namespaces[type], type, field, recordId);
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
export async function getFileMetadata<T extends keyof TypeWithFiles>(
|
|
@@ -39,7 +47,7 @@ export async function getFileMetadata<T extends keyof TypeWithFiles>(
|
|
|
39
47
|
field: TypeWithFiles[T]["fields"],
|
|
40
48
|
recordId: string,
|
|
41
49
|
): Promise<FileMetadata> {
|
|
42
|
-
return await
|
|
50
|
+
return await file.getMetadata(namespaces[type], type, field, recordId);
|
|
43
51
|
}
|
|
44
52
|
|
|
45
53
|
export async function openFileDownloadStream<T extends keyof TypeWithFiles>(
|
|
@@ -47,5 +55,5 @@ export async function openFileDownloadStream<T extends keyof TypeWithFiles>(
|
|
|
47
55
|
field: TypeWithFiles[T]["fields"],
|
|
48
56
|
recordId: string,
|
|
49
57
|
): Promise<FileStreamIterator> {
|
|
50
|
-
return await
|
|
58
|
+
return await file.openDownloadStream(namespaces[type], type, field, recordId);
|
|
51
59
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @generated
|
|
3
|
+
* This file is auto-generated by @tailor-platform/sdk's seedPlugin.
|
|
4
|
+
* Do not edit by hand: changes will be overwritten on the next `sdk generate`.
|
|
5
|
+
*/
|
|
1
6
|
import { readFileSync } from "node:fs";
|
|
2
7
|
import { join, isAbsolute } from "node:path";
|
|
3
8
|
import { parseArgs, styleText } from "node:util";
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"typecheck": "tsc --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@tailor-platform/sdk": "1.
|
|
15
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
16
16
|
"@types/node": "24.12.4",
|
|
17
17
|
"oxfmt": "0.46.0",
|
|
18
18
|
"oxlint": "1.61.0",
|
|
19
|
-
"oxlint-tsgolint": "0.
|
|
19
|
+
"oxlint-tsgolint": "0.23.0",
|
|
20
20
|
"typescript": "5.9.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"typecheck": "tsc --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@tailor-platform/sdk": "1.
|
|
15
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
16
16
|
"@types/node": "24.12.4",
|
|
17
17
|
"oxfmt": "0.46.0",
|
|
18
18
|
"oxlint": "1.61.0",
|
|
19
|
-
"oxlint-tsgolint": "0.
|
|
19
|
+
"oxlint-tsgolint": "0.23.0",
|
|
20
20
|
"typescript": "5.9.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"typecheck": "tsc --noEmit"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@tailor-platform/sdk": "1.
|
|
16
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
17
17
|
"@types/node": "24.12.4",
|
|
18
18
|
"oxfmt": "0.46.0",
|
|
19
19
|
"oxlint": "1.61.0",
|
|
20
|
-
"oxlint-tsgolint": "0.
|
|
20
|
+
"oxlint-tsgolint": "0.23.0",
|
|
21
21
|
"typescript": "5.9.3"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"typecheck": "tsc --noEmit"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@tailor-platform/sdk": "1.
|
|
17
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
18
18
|
"@types/node": "24.12.4",
|
|
19
19
|
"oxfmt": "0.46.0",
|
|
20
20
|
"oxlint": "1.61.0",
|
|
21
|
-
"oxlint-tsgolint": "0.
|
|
21
|
+
"oxlint-tsgolint": "0.23.0",
|
|
22
22
|
"typescript": "5.9.3",
|
|
23
23
|
"vitest": "4.1.6"
|
|
24
24
|
}
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"typecheck": "tsc --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@tailor-platform/sdk": "1.
|
|
15
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
16
16
|
"@types/node": "24.12.4",
|
|
17
17
|
"oxfmt": "0.46.0",
|
|
18
18
|
"oxlint": "1.61.0",
|
|
19
|
-
"oxlint-tsgolint": "0.
|
|
19
|
+
"oxlint-tsgolint": "0.23.0",
|
|
20
20
|
"typescript": "5.9.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"typecheck": "tsc --noEmit"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@tailor-platform/sdk": "1.
|
|
17
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
18
18
|
"@types/node": "24.12.4",
|
|
19
19
|
"oxfmt": "0.46.0",
|
|
20
20
|
"oxlint": "1.61.0",
|
|
21
|
-
"oxlint-tsgolint": "0.
|
|
21
|
+
"oxlint-tsgolint": "0.23.0",
|
|
22
22
|
"typescript": "5.9.3",
|
|
23
23
|
"vitest": "4.1.6"
|
|
24
24
|
}
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"typecheck": "tsc --noEmit"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@tailor-platform/sdk": "1.
|
|
18
|
+
"@tailor-platform/sdk": "1.51.1",
|
|
19
19
|
"@types/node": "24.12.4",
|
|
20
|
-
"graphql": "16.
|
|
20
|
+
"graphql": "16.14.0",
|
|
21
21
|
"graphql-request": "7.4.0",
|
|
22
22
|
"oxfmt": "0.46.0",
|
|
23
23
|
"oxlint": "1.61.0",
|
|
24
|
-
"oxlint-tsgolint": "0.
|
|
24
|
+
"oxlint-tsgolint": "0.23.0",
|
|
25
25
|
"typescript": "5.9.3",
|
|
26
26
|
"vitest": "4.1.6"
|
|
27
27
|
}
|