@tailor-platform/create-sdk 2.0.0-next.3 → 2.0.0-next.4
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 +27 -0
- package/package.json +1 -1
- package/templates/executor/package.json +1 -1
- package/templates/executor/src/db/auditLog.ts +1 -1
- package/templates/executor/src/db/notification.ts +1 -1
- package/templates/executor/src/db/user.ts +1 -1
- package/templates/generators/package.json +1 -1
- package/templates/generators/src/db/category.ts +1 -1
- package/templates/generators/src/db/order.ts +1 -1
- package/templates/generators/src/db/product.ts +1 -1
- package/templates/generators/src/db/user.ts +1 -1
- package/templates/generators/src/generated/files.ts +1 -1
- package/templates/hello-world/package.json +1 -1
- package/templates/hello-world/src/db/user.ts +1 -1
- package/templates/inventory-management/package.json +1 -1
- package/templates/inventory-management/src/db/category.ts +1 -1
- package/templates/inventory-management/src/db/contact.ts +1 -1
- package/templates/inventory-management/src/db/inventory.ts +1 -1
- package/templates/inventory-management/src/db/notification.ts +1 -1
- package/templates/inventory-management/src/db/order.ts +1 -1
- package/templates/inventory-management/src/db/orderItem.ts +1 -1
- package/templates/inventory-management/src/db/product.ts +1 -1
- package/templates/inventory-management/src/db/user.ts +1 -1
- package/templates/multi-application/apps/admin/db/adminNote.ts +1 -1
- package/templates/multi-application/apps/user/db/user.ts +1 -1
- package/templates/multi-application/package.json +1 -1
- package/templates/resolver/package.json +1 -1
- package/templates/resolver/src/db/user.ts +1 -1
- package/templates/static-web-site/package.json +1 -1
- package/templates/static-web-site/src/db/user.ts +1 -1
- package/templates/tailordb/README.md +1 -1
- package/templates/tailordb/package.json +1 -1
- package/templates/tailordb/src/db/category.ts +1 -1
- package/templates/tailordb/src/db/comment.ts +1 -1
- package/templates/tailordb/src/db/task.ts +1 -1
- package/templates/tailordb/src/db/user.ts +1 -1
- package/templates/workflow/package.json +1 -1
- package/templates/workflow/src/db/order.ts +1 -1
- package/templates/workflow/src/db/user.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @tailor-platform/create-sdk
|
|
2
2
|
|
|
3
|
+
## 2.0.0-next.4
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1693](https://github.com/tailor-platform/sdk/pull/1693) [`4751214`](https://github.com/tailor-platform/sdk/commit/4751214c0923e094a844f9ce322279a47e871075) Thanks [@dqn](https://github.com/dqn)! - Rename the TailorDB schema builder from `db.type()` to `db.table()`.
|
|
8
|
+
|
|
9
|
+
Update TailorDB definitions:
|
|
10
|
+
|
|
11
|
+
```diff
|
|
12
|
+
import { db } from "@tailor-platform/sdk";
|
|
13
|
+
|
|
14
|
+
-export const user = db.type("User", {
|
|
15
|
+
+export const user = db.table("User", {
|
|
16
|
+
name: db.string(),
|
|
17
|
+
});
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#1704](https://github.com/tailor-platform/sdk/pull/1704) [`9c81d9c`](https://github.com/tailor-platform/sdk/commit/9c81d9c18b1d29b3e9307ea17fe54c8ce55f4dda) Thanks [@dqn](https://github.com/dqn)! - Remove flat value and default exports from `@tailor-platform/sdk/runtime/*` subpath modules. Import each subpath through its self-named namespace export instead, for example `import { iconv } from "@tailor-platform/sdk/runtime/iconv"`.
|
|
23
|
+
|
|
24
|
+
The aggregate `@tailor-platform/sdk/runtime` entry remains named-only, and its deprecated `file.deleteFile` alias is removed in favor of `file.delete`. The v2 codemod rewrites straightforward namespace-star subpath imports, flat named value imports, and aggregate `file.deleteFile` calls to the new namespace-object style.
|
|
25
|
+
|
|
26
|
+
`TailorContextAPI` and `TailorWorkflowAPI` now describe the SDK wrapper objects. Code that types the platform-provided `globalThis.tailor.context` or `globalThis.tailor.workflow` objects directly must use `PlatformContextAPI` or `PlatformWorkflowAPI` instead.
|
|
27
|
+
|
|
3
28
|
## 2.0.0-next.3
|
|
4
29
|
|
|
5
30
|
### Major Changes
|
|
@@ -61,6 +86,8 @@
|
|
|
61
86
|
|
|
62
87
|
## 1.71.0
|
|
63
88
|
|
|
89
|
+
## 1.75.0
|
|
90
|
+
|
|
64
91
|
## 1.74.1
|
|
65
92
|
|
|
66
93
|
## 1.74.0
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { db } from "@tailor-platform/sdk";
|
|
2
2
|
|
|
3
3
|
export const auditLog = db
|
|
4
|
-
.
|
|
4
|
+
.table("AuditLog", "Records system events for auditing", {
|
|
5
5
|
action: db.string(),
|
|
6
6
|
entityType: db.string(),
|
|
7
7
|
entityId: db.uuid(),
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "@tailor-platform/sdk";
|
|
6
6
|
|
|
7
7
|
export const user = db
|
|
8
|
-
.
|
|
8
|
+
.table("User", {
|
|
9
9
|
name: db.string().description("Name of the user"),
|
|
10
10
|
email: db.string().unique().description("Email address of the user"),
|
|
11
11
|
role: db.enum(["MANAGER", "STAFF"]),
|
|
@@ -2,7 +2,7 @@ import { db } from "@tailor-platform/sdk";
|
|
|
2
2
|
import { gqlPermissionManager, permissionManager } from "./common/permission";
|
|
3
3
|
|
|
4
4
|
export const category = db
|
|
5
|
-
.
|
|
5
|
+
.table("Category", {
|
|
6
6
|
name: db.string().description("Name of the category").unique(),
|
|
7
7
|
description: db.string({ optional: true }).description("Description of the category"),
|
|
8
8
|
...db.fields.timestamps(),
|
|
@@ -2,7 +2,7 @@ import { db } from "@tailor-platform/sdk";
|
|
|
2
2
|
import { gqlPermissionManager, permissionManager } from "./common/permission";
|
|
3
3
|
|
|
4
4
|
export const contact = db
|
|
5
|
-
.
|
|
5
|
+
.table("Contact", {
|
|
6
6
|
name: db.string().description("Name of the contact"),
|
|
7
7
|
email: db.string().unique().description("Email address of the contact"),
|
|
8
8
|
phone: db.string({ optional: true }).description("Phone number of the contact"),
|
|
@@ -2,7 +2,7 @@ import { db } from "@tailor-platform/sdk";
|
|
|
2
2
|
import { loggedIn, managerRole, permissionManager } from "./common/permission";
|
|
3
3
|
|
|
4
4
|
export const notification = db
|
|
5
|
-
.
|
|
5
|
+
.table("Notification", {
|
|
6
6
|
message: db.string().description("Notification message"),
|
|
7
7
|
...db.fields.timestamps(),
|
|
8
8
|
})
|
|
@@ -3,7 +3,7 @@ import { contact } from "./contact";
|
|
|
3
3
|
import { gqlPermissionLoggedIn, permissionLoggedIn } from "./common/permission";
|
|
4
4
|
|
|
5
5
|
export const order = db
|
|
6
|
-
.
|
|
6
|
+
.table("Order", {
|
|
7
7
|
name: db.string().description("Name of the order"),
|
|
8
8
|
description: db.string({ optional: true }).description("Description of the order"),
|
|
9
9
|
orderDate: db.datetime().description("Date of the order"),
|
|
@@ -3,7 +3,7 @@ import { category } from "./category";
|
|
|
3
3
|
import { gqlPermissionManager, permissionManager } from "./common/permission";
|
|
4
4
|
|
|
5
5
|
export const product = db
|
|
6
|
-
.
|
|
6
|
+
.table("Product", {
|
|
7
7
|
name: db.string().description("Name of the product"),
|
|
8
8
|
description: db.string({ optional: true }).description("Description of the product"),
|
|
9
9
|
categoryId: db
|
|
@@ -2,7 +2,7 @@ import { db } from "@tailor-platform/sdk";
|
|
|
2
2
|
import { gqlPermissionManager, permissionManager } from "./common/permission";
|
|
3
3
|
|
|
4
4
|
export const user = db
|
|
5
|
-
.
|
|
5
|
+
.table("User", {
|
|
6
6
|
name: db.string().description("Name of the user"),
|
|
7
7
|
email: db.string().unique().description("Email address of the user"),
|
|
8
8
|
role: db.enum(["MANAGER", "STAFF"]),
|
|
@@ -2,7 +2,7 @@ import { db } from "@tailor-platform/sdk";
|
|
|
2
2
|
import { allPermission, allGqlPermission } from "./permission";
|
|
3
3
|
|
|
4
4
|
export const category = db
|
|
5
|
-
.
|
|
5
|
+
.table("Category", "Task category with hierarchical structure", {
|
|
6
6
|
name: db.string(),
|
|
7
7
|
description: db.string({ optional: true }),
|
|
8
8
|
parentCategoryId: db.uuid({ optional: true }).relation({
|
|
@@ -4,7 +4,7 @@ import { task } from "./task";
|
|
|
4
4
|
import { user } from "./user";
|
|
5
5
|
|
|
6
6
|
export const comment = db
|
|
7
|
-
.
|
|
7
|
+
.table("Comment", "A comment on a task", {
|
|
8
8
|
body: db.string().validate([({ value }) => value.length >= 1, "Comment must not be empty"]),
|
|
9
9
|
taskId: db.uuid().relation({
|
|
10
10
|
type: "n-1",
|
|
@@ -4,7 +4,7 @@ import { rolePermission, roleGqlPermission } from "./permission";
|
|
|
4
4
|
import { user } from "./user";
|
|
5
5
|
|
|
6
6
|
export const task = db
|
|
7
|
-
.
|
|
7
|
+
.table("Task", "A task with comprehensive features", {
|
|
8
8
|
title: db
|
|
9
9
|
.string()
|
|
10
10
|
.validate(
|