@tailor-platform/sdk 2.0.0 → 2.0.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 +18 -0
- package/README.md +2 -2
- package/dist/cli/main.mjs +7 -7
- package/dist/cli/main.mjs.map +1 -1
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/docs/migration/v2.md +6 -3
- package/docs/quickstart.md +5 -5
- package/package.json +4 -4
|
@@ -46,10 +46,10 @@ declare function mockFile(options?: MockFileOptions): {
|
|
|
46
46
|
calls: FileCall[];
|
|
47
47
|
clear(): void;
|
|
48
48
|
reset(): void;
|
|
49
|
-
delete: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<void>>;
|
|
50
49
|
upload: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string, data: string | ArrayBuffer | Uint8Array | number[], options?: FileUploadOptions) => Promise<FileUploadResponse>>;
|
|
51
50
|
download: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileDownloadResponse>>;
|
|
52
51
|
downloadAsBase64: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileDownloadAsBase64Response>>;
|
|
52
|
+
delete: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<void>>;
|
|
53
53
|
getMetadata: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileMetadata>>;
|
|
54
54
|
downloadStream: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileDownloadStreamResponse>>;
|
|
55
55
|
uploadStream: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string, readableStream: ReadableStream<Uint8Array | ArrayBuffer>, options?: FileUploadStreamOptions) => Promise<FileUploadResponse>>;
|
package/docs/migration/v2.md
CHANGED
|
@@ -97,7 +97,7 @@ npx tailor-sdk-skills
|
|
|
97
97
|
After:
|
|
98
98
|
|
|
99
99
|
```sh
|
|
100
|
-
tailor skills add
|
|
100
|
+
npx @tailor-platform/sdk skills add
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
<details>
|
|
@@ -107,7 +107,10 @@ tailor skills add
|
|
|
107
107
|
The standalone tailor-sdk-skills binary is removed in v2; call the skills add
|
|
108
108
|
subcommand on the main tailor CLI instead. Replace any remaining
|
|
109
109
|
tailor-sdk-skills invocations the codemod did not rewrite with
|
|
110
|
-
`tailor skills add
|
|
110
|
+
`tailor skills add`, or `npx @tailor-platform/sdk skills add` when the
|
|
111
|
+
invocation runs through a package runner (npx, bunx, pnpm/yarn dlx, npm exec)
|
|
112
|
+
— those resolve a package name, and `npx tailor` reaches an unrelated
|
|
113
|
+
`tailor` package on npm.
|
|
111
114
|
```
|
|
112
115
|
|
|
113
116
|
</details>
|
|
@@ -1401,7 +1404,7 @@ CLI plugin (@tailor-platform/sdk-plugin-seed) replaces it:
|
|
|
1401
1404
|
typically fork the runner and await a hand-rolled Promise around
|
|
1402
1405
|
`child.on("close", ...)`). The plugin is a CLI-dispatched binary rather
|
|
1403
1406
|
than a forkable JS module, so call it synchronously instead —
|
|
1404
|
-
`execSync("npx tailor seed apply", { env, stdio: "inherit" })` — keeping
|
|
1407
|
+
`execSync("npx @tailor-platform/sdk seed apply", { env, stdio: "inherit" })` — keeping
|
|
1405
1408
|
the original `env` and `stdio` forwarding, and unwind the surrounding
|
|
1406
1409
|
Promise wrapper (drop the now-unused `await`, and the `async` keyword when
|
|
1407
1410
|
nothing else in the function awaits). Note that `execSync` throws on a
|
package/docs/quickstart.md
CHANGED
|
@@ -33,13 +33,13 @@ cd example-app
|
|
|
33
33
|
Before deploying your app, you need to create a workspace:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
npx tailor login
|
|
37
|
-
npx tailor workspace create --name <workspace-name> --region <workspace-region>
|
|
38
|
-
npx tailor workspace list
|
|
36
|
+
npx @tailor-platform/sdk login
|
|
37
|
+
npx @tailor-platform/sdk workspace create --name <workspace-name> --region <workspace-region>
|
|
38
|
+
npx @tailor-platform/sdk workspace list
|
|
39
39
|
|
|
40
40
|
# Or with Bun:
|
|
41
|
-
#
|
|
42
|
-
#
|
|
41
|
+
# bun tailor login
|
|
42
|
+
# bun tailor workspace create --name <workspace-name> --region <workspace-region>
|
|
43
43
|
|
|
44
44
|
# OR
|
|
45
45
|
# Create a new workspace using Tailor Platform Console
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -168,10 +168,10 @@
|
|
|
168
168
|
"@secretlint/secretlint-rule-preset-recommend": "13.0.4",
|
|
169
169
|
"@standard-schema/spec": "1.1.0",
|
|
170
170
|
"@tailor-platform/function-kysely-tailordb": "0.1.3",
|
|
171
|
-
"@toiroakr/lines-db": "0.
|
|
171
|
+
"@toiroakr/lines-db": "0.11.0",
|
|
172
172
|
"@toiroakr/read-multiline": "0.4.1",
|
|
173
173
|
"@urql/core": "6.0.3",
|
|
174
|
-
"amaro": "1.1.
|
|
174
|
+
"amaro": "1.1.11",
|
|
175
175
|
"chalk": "5.6.2",
|
|
176
176
|
"confbox": "0.2.4",
|
|
177
177
|
"date-fns": "4.4.0",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"@types/semver": "7.7.1",
|
|
208
208
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
209
209
|
"@vitest/coverage-v8": "4.1.10",
|
|
210
|
-
"eslint-plugin-zod": "4.
|
|
210
|
+
"eslint-plugin-zod": "4.9.0",
|
|
211
211
|
"oxfmt": "0.61.0",
|
|
212
212
|
"oxlint": "1.76.0",
|
|
213
213
|
"oxlint-tsgolint": "7.0.2001",
|