@tailor-platform/create-sdk 2.13.0 → 2.14.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 +16 -0
- package/package.json +2 -2
- package/templates/executor/package.json +3 -3
- package/templates/generators/package.json +3 -3
- package/templates/generators/src/seed/data/Order.schema.ts +2 -2
- package/templates/generators/src/seed/data/Product.schema.ts +2 -2
- package/templates/generators/src/seed/data/User.schema.ts +2 -2
- package/templates/hello-world/README.md +13 -5
- package/templates/hello-world/package.json +3 -3
- package/templates/hello-world/src/db/user.ts +2 -0
- package/templates/inventory-management/README.md +5 -5
- package/templates/inventory-management/package.json +3 -3
- package/templates/multi-application/README.md +13 -4
- package/templates/multi-application/package.json +3 -3
- package/templates/resolver/package.json +3 -3
- package/templates/static-web-site/package.json +3 -3
- package/templates/tailordb/package.json +3 -3
- package/templates/workflow/package.json +3 -3
- package/templates/executor/.prettierrc +0 -1
- package/templates/hello-world/.prettierrc +0 -1
- package/templates/inventory-management/.prettierrc +0 -1
- package/templates/multi-application/.prettierrc +0 -1
- package/templates/resolver/.prettierrc +0 -1
- package/templates/static-web-site/.prettierrc +0 -1
- package/templates/tailordb/.prettierrc +0 -1
- package/templates/workflow/.prettierrc +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @tailor-platform/create-sdk
|
|
2
2
|
|
|
3
|
+
## 2.14.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2270](https://github.com/tailor-platform/sdk/pull/2270) [`1023fc5`](https://github.com/tailor-platform/sdk/commit/1023fc5f12462a2753a4452760c9ed2e0fa7bc07) Thanks [@tailor-bobbin](https://github.com/apps/tailor-bobbin)! - Document why the `hello-world` template ships with fully open permissions: `src/db/user.ts` now explains that the template defines no auth and that production projects should define conditions in `.permission()` / `.gqlPermission()`, and the README gained a Security section listing the open `unsafeAllowAll*Permission` grants and the `allowAnonymous` resolver default that must be replaced before real use.
|
|
8
|
+
|
|
9
|
+
- [#2270](https://github.com/tailor-platform/sdk/pull/2270) [`bc46936`](https://github.com/tailor-platform/sdk/commit/bc4693632116451935a83fb7b39d487c66e3a093) Thanks [@tailor-bobbin](https://github.com/apps/tailor-bobbin)! - Document why the `multi-application` template ships with fully open permissions: the README gained a Security section listing the open `unsafeAllowAllTypePermission` / `unsafeAllowAllGqlPermission` grants on the `User` and `AdminNote` tables and pointing at the TailorDB Permission documentation for what to replace them with.
|
|
10
|
+
|
|
11
|
+
## 2.13.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#2263](https://github.com/tailor-platform/sdk/pull/2263) [`ec80f8c`](https://github.com/tailor-platform/sdk/commit/ec80f8c7fbb5878010cc702a6336f6cb5b3d9bfb) Thanks [@tailor-bobbin](https://github.com/apps/tailor-bobbin)! - Fix the `hello-world` template docs so they match the tooling the template actually ships: the README now documents `oxfmt` / `oxlint` (instead of Prettier / ESLint) and the `generate` script, and the setup commands use `npx @tailor-platform/sdk <command>`. The unused empty `.prettierrc` is no longer generated.
|
|
16
|
+
|
|
17
|
+
- [#2263](https://github.com/tailor-platform/sdk/pull/2263) [`9495e4e`](https://github.com/tailor-platform/sdk/commit/9495e4e2b77a0a3e680fff22dda0cb5493756c6c) Thanks [@tailor-bobbin](https://github.com/apps/tailor-bobbin)! - Fix the same stale-tooling docs issue across the remaining `create-sdk` templates (executor, inventory-management, multi-application, resolver, static-web-site, tailordb, workflow): remove the unused empty `.prettierrc` files, and update the `inventory-management` / `multi-application` READMEs' Scripts sections to document `oxfmt` / `oxlint` (instead of Prettier / ESLint), matching the tooling their `package.json` actually ships. The `inventory-management` README's Scripts section also referenced a nonexistent `gen` script; it now documents the actual `generate` script.
|
|
18
|
+
|
|
3
19
|
## 2.13.0
|
|
4
20
|
|
|
5
21
|
## 2.12.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/create-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "A CLI tool to quickly create a new Tailor Platform SDK project",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "24.13.3",
|
|
29
29
|
"eslint-plugin-zod": "4.12.0",
|
|
30
|
-
"oxlint": "1.
|
|
30
|
+
"oxlint": "1.81.0",
|
|
31
31
|
"oxlint-tsgolint": "7.0.2001",
|
|
32
32
|
"tsdown": "0.22.14",
|
|
33
33
|
"typescript": "6.0.3"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
18
|
-
"@tailor-platform/sdk": "2.
|
|
18
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
19
19
|
"@types/node": "24.13.3",
|
|
20
|
-
"oxfmt": "0.
|
|
21
|
-
"oxlint": "1.
|
|
20
|
+
"oxfmt": "0.66.0",
|
|
21
|
+
"oxlint": "1.81.0",
|
|
22
22
|
"oxlint-tsgolint": "7.0.2001",
|
|
23
23
|
"typescript": "6.0.3",
|
|
24
24
|
"vitest": "4.1.11"
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
21
|
-
"@tailor-platform/sdk": "2.
|
|
21
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
22
22
|
"@tailor-platform/sdk-plugin-seed": "0.2.7",
|
|
23
23
|
"@types/node": "24.13.3",
|
|
24
|
-
"oxfmt": "0.
|
|
25
|
-
"oxlint": "1.
|
|
24
|
+
"oxfmt": "0.66.0",
|
|
25
|
+
"oxlint": "1.81.0",
|
|
26
26
|
"oxlint-tsgolint": "7.0.2001",
|
|
27
27
|
"typescript": "6.0.3",
|
|
28
28
|
"vitest": "4.1.11"
|
|
@@ -4,8 +4,8 @@ import { createTailorDBHook, createStandardSchema } from "@tailor-platform/sdk/t
|
|
|
4
4
|
import { order } from "../../db/order";
|
|
5
5
|
|
|
6
6
|
const schemaType = t.object({
|
|
7
|
-
...order.pickFields(["id"], { optional: true }),
|
|
8
|
-
...order.omitFields(["id"]),
|
|
7
|
+
...order.pickFields(["id","createdAt","updatedAt"], { optional: true }),
|
|
8
|
+
...order.omitFields(["id","createdAt","updatedAt"]),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export const hook = createTailorDBHook(order);
|
|
@@ -4,8 +4,8 @@ import { createTailorDBHook, createStandardSchema } from "@tailor-platform/sdk/t
|
|
|
4
4
|
import { product } from "../../db/product";
|
|
5
5
|
|
|
6
6
|
const schemaType = t.object({
|
|
7
|
-
...product.pickFields(["id"], { optional: true }),
|
|
8
|
-
...product.omitFields(["id"]),
|
|
7
|
+
...product.pickFields(["id","createdAt","updatedAt"], { optional: true }),
|
|
8
|
+
...product.omitFields(["id","createdAt","updatedAt"]),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export const hook = createTailorDBHook(product);
|
|
@@ -4,8 +4,8 @@ import { createTailorDBHook, createStandardSchema } from "@tailor-platform/sdk/t
|
|
|
4
4
|
import { user } from "../../db/user";
|
|
5
5
|
|
|
6
6
|
const schemaType = t.object({
|
|
7
|
-
...user.pickFields(["id"], { optional: true }),
|
|
8
|
-
...user.omitFields(["id"]),
|
|
7
|
+
...user.pickFields(["id","createdAt","updatedAt"], { optional: true }),
|
|
8
|
+
...user.omitFields(["id","createdAt","updatedAt"]),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export const hook = createTailorDBHook(user);
|
|
@@ -49,13 +49,21 @@ query {
|
|
|
49
49
|
# }
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
## Security
|
|
53
|
+
|
|
54
|
+
This template is a tutorial project: it defines no auth, and its permissions are fully open so you can deploy and query it right away. Replace both of the following before using it for anything real:
|
|
55
|
+
|
|
56
|
+
- `src/db/user.ts` grants `unsafeAllowAllTypePermission` / `unsafeAllowAllGqlPermission`, which allow every operation on the `User` table. Define conditions that match your requirements instead — see the [TailorDB Permission documentation](https://docs.tailor.tech/guides/tailordb/permission).
|
|
57
|
+
- `tailor.config.ts` sets `defaultPermission: "allowAnonymous"` for `main-resolver`, so its resolvers are callable without a token.
|
|
58
|
+
|
|
52
59
|
## Scripts
|
|
53
60
|
|
|
54
61
|
In the project directory, you can run:
|
|
55
62
|
|
|
56
|
-
- `deploy`: Deploy the project to Tailor Platform
|
|
57
|
-
- `
|
|
58
|
-
- `format
|
|
59
|
-
- `
|
|
60
|
-
- `lint
|
|
63
|
+
- `deploy`: Deploy the project to Tailor Platform (`tailor deploy`)
|
|
64
|
+
- `generate`: Generate types for the project (`tailor generate`)
|
|
65
|
+
- `format`: Format the code using oxfmt
|
|
66
|
+
- `format:check`: Check code formatting using oxfmt
|
|
67
|
+
- `lint`: Lint the code using oxlint
|
|
68
|
+
- `lint:fix`: Fix linting issues using oxlint
|
|
61
69
|
- `typecheck`: Run TypeScript type checks
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
16
|
-
"@tailor-platform/sdk": "2.
|
|
16
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
17
17
|
"@types/node": "24.13.3",
|
|
18
|
-
"oxfmt": "0.
|
|
19
|
-
"oxlint": "1.
|
|
18
|
+
"oxfmt": "0.66.0",
|
|
19
|
+
"oxlint": "1.81.0",
|
|
20
20
|
"oxlint-tsgolint": "7.0.2001",
|
|
21
21
|
"typescript": "6.0.3"
|
|
22
22
|
}
|
|
@@ -14,5 +14,7 @@ export const user = db
|
|
|
14
14
|
.features({
|
|
15
15
|
gqlOperations: "query",
|
|
16
16
|
})
|
|
17
|
+
// This template defines no auth, so its data is public by design.
|
|
18
|
+
// In production, define conditions in .permission() / .gqlPermission() instead.
|
|
17
19
|
.permission(unsafeAllowAllTypePermission)
|
|
18
20
|
.gqlPermission(unsafeAllowAllGqlPermission);
|
|
@@ -55,11 +55,11 @@ npx @tailor-platform/sdk machineuser token staff --workspace-id <your-workspace-
|
|
|
55
55
|
In the project directory, you can run:
|
|
56
56
|
|
|
57
57
|
- `deploy`: Deploy the project to Tailor Platform
|
|
58
|
-
- `
|
|
59
|
-
- `format`: Format the code using
|
|
60
|
-
- `format:check`: Check code formatting using
|
|
61
|
-
- `lint`: Lint the code using
|
|
62
|
-
- `lint:fix`: Fix linting issues using
|
|
58
|
+
- `generate`: Generate TypeScript types
|
|
59
|
+
- `format`: Format the code using oxfmt
|
|
60
|
+
- `format:check`: Check code formatting using oxfmt
|
|
61
|
+
- `lint`: Lint the code using oxlint
|
|
62
|
+
- `lint:fix`: Fix linting issues using oxlint
|
|
63
63
|
- `typecheck`: Run TypeScript type checks
|
|
64
64
|
|
|
65
65
|
## Examples
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
16
|
-
"@tailor-platform/sdk": "2.
|
|
16
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
17
17
|
"@types/node": "24.13.3",
|
|
18
|
-
"oxfmt": "0.
|
|
19
|
-
"oxlint": "1.
|
|
18
|
+
"oxfmt": "0.66.0",
|
|
19
|
+
"oxlint": "1.81.0",
|
|
20
20
|
"oxlint-tsgolint": "7.0.2001",
|
|
21
21
|
"typescript": "6.0.3"
|
|
22
22
|
}
|
|
@@ -33,13 +33,22 @@ This deploys both applications in order: `user` first, then `admin`.
|
|
|
33
33
|
- Two applications (`user` and `admin`) exist in your workspace
|
|
34
34
|
- In `admin` application's GraphQL Playground, `User` type from `shared-db` is available
|
|
35
35
|
|
|
36
|
+
## Security
|
|
37
|
+
|
|
38
|
+
This template is a tutorial project: its permissions are fully open so you can deploy and query it right away. Replace both of the following before using it for anything real:
|
|
39
|
+
|
|
40
|
+
- `apps/user/db/user.ts` grants `unsafeAllowAllTypePermission` / `unsafeAllowAllGqlPermission`, which allow every operation on the `User` table.
|
|
41
|
+
- `apps/admin/db/adminNote.ts` grants `unsafeAllowAllTypePermission` / `unsafeAllowAllGqlPermission`, which allow every operation on the `AdminNote` table.
|
|
42
|
+
|
|
43
|
+
Define conditions that match your requirements instead — see the [TailorDB Permission documentation](https://docs.tailor.tech/guides/tailordb/permission).
|
|
44
|
+
|
|
36
45
|
## Scripts
|
|
37
46
|
|
|
38
47
|
- `deploy`: Deploy all applications to Tailor Platform
|
|
39
48
|
- `deploy:user`: Deploy user application only
|
|
40
49
|
- `deploy:admin`: Deploy admin application only
|
|
41
|
-
- `format`: Format the code using
|
|
42
|
-
- `format:check`: Check code formatting using
|
|
43
|
-
- `lint`: Lint the code using
|
|
44
|
-
- `lint:fix`: Fix linting issues using
|
|
50
|
+
- `format`: Format the code using oxfmt
|
|
51
|
+
- `format:check`: Check code formatting using oxfmt
|
|
52
|
+
- `lint`: Lint the code using oxlint
|
|
53
|
+
- `lint:fix`: Fix linting issues using oxlint
|
|
45
54
|
- `typecheck`: Run TypeScript type checks
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
17
|
-
"@tailor-platform/sdk": "2.
|
|
17
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
18
18
|
"@types/node": "24.13.3",
|
|
19
|
-
"oxfmt": "0.
|
|
20
|
-
"oxlint": "1.
|
|
19
|
+
"oxfmt": "0.66.0",
|
|
20
|
+
"oxlint": "1.81.0",
|
|
21
21
|
"oxlint-tsgolint": "7.0.2001",
|
|
22
22
|
"typescript": "6.0.3"
|
|
23
23
|
}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
18
|
-
"@tailor-platform/sdk": "2.
|
|
18
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
19
19
|
"@types/node": "24.13.3",
|
|
20
|
-
"oxfmt": "0.
|
|
21
|
-
"oxlint": "1.
|
|
20
|
+
"oxfmt": "0.66.0",
|
|
21
|
+
"oxlint": "1.81.0",
|
|
22
22
|
"oxlint-tsgolint": "7.0.2001",
|
|
23
23
|
"typescript": "6.0.3",
|
|
24
24
|
"vitest": "4.1.11"
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
16
|
-
"@tailor-platform/sdk": "2.
|
|
16
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
17
17
|
"@types/node": "24.13.3",
|
|
18
|
-
"oxfmt": "0.
|
|
19
|
-
"oxlint": "1.
|
|
18
|
+
"oxfmt": "0.66.0",
|
|
19
|
+
"oxlint": "1.81.0",
|
|
20
20
|
"oxlint-tsgolint": "7.0.2001",
|
|
21
21
|
"typescript": "6.0.3"
|
|
22
22
|
}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
18
|
-
"@tailor-platform/sdk": "2.
|
|
18
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
19
19
|
"@types/node": "24.13.3",
|
|
20
|
-
"oxfmt": "0.
|
|
21
|
-
"oxlint": "1.
|
|
20
|
+
"oxfmt": "0.66.0",
|
|
21
|
+
"oxlint": "1.81.0",
|
|
22
22
|
"oxlint-tsgolint": "7.0.2001",
|
|
23
23
|
"typescript": "6.0.3",
|
|
24
24
|
"vitest": "4.1.11"
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@tailor-platform/eslint-plugin-sdk": "0.2.3",
|
|
19
|
-
"@tailor-platform/sdk": "2.
|
|
19
|
+
"@tailor-platform/sdk": "2.14.0",
|
|
20
20
|
"@types/node": "24.13.3",
|
|
21
21
|
"graphql": "17.0.2",
|
|
22
22
|
"graphql-request": "7.4.0",
|
|
23
|
-
"oxfmt": "0.
|
|
24
|
-
"oxlint": "1.
|
|
23
|
+
"oxfmt": "0.66.0",
|
|
24
|
+
"oxlint": "1.81.0",
|
|
25
25
|
"oxlint-tsgolint": "7.0.2001",
|
|
26
26
|
"typescript": "6.0.3",
|
|
27
27
|
"vitest": "4.1.11"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|