create-m5kdev 0.31.9 → 0.32.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/package.json +1 -1
- package/templates/minimal-app/apps/server/drizzle/0001_third_ink.sql +1 -0
- package/templates/minimal-app/apps/server/drizzle/meta/0001_snapshot.json.tpl +1910 -0
- package/templates/minimal-app/apps/server/drizzle/meta/_journal.json.tpl +19 -12
- package/templates/minimal-app/apps/server/src/modules/posts/posts.db.ts.tpl +4 -1
- package/templates/minimal-app/apps/server/src/modules/posts/posts.service.ts.tpl +1 -0
- package/templates/minimal-app/pnpm-workspace.yaml.tpl +6 -6
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "7",
|
|
3
|
-
"dialect": "sqlite",
|
|
4
|
-
"entries": [
|
|
5
|
-
{
|
|
6
|
-
"idx": 0,
|
|
7
|
-
"version": "6",
|
|
8
|
-
"when": 1783931793066,
|
|
9
|
-
"tag": "0000_wealthy_absorbing_man",
|
|
10
|
-
"breakpoints": true
|
|
11
|
-
}
|
|
12
|
-
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"idx": 0,
|
|
7
|
+
"version": "6",
|
|
8
|
+
"when": 1783931793066,
|
|
9
|
+
"tag": "0000_wealthy_absorbing_man",
|
|
10
|
+
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "6",
|
|
15
|
+
"when": 1785171166863,
|
|
16
|
+
"tag": "0001_third_ink",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
}
|
|
19
|
+
]
|
|
13
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { organizations, teams, users } from "@m5kdev/backend/modules/auth/auth.db";
|
|
1
|
+
import { members, organizations, teams, users } from "@m5kdev/backend/modules/auth/auth.db";
|
|
2
2
|
import { integer, sqliteTable as table, text } from "drizzle-orm/sqlite-core";
|
|
3
3
|
import { v4 as uuidv4 } from "uuid";
|
|
4
4
|
|
|
@@ -7,6 +7,9 @@ export const posts = table("posts", {
|
|
|
7
7
|
authorUserId: text("author_user_id").references(() => users.id, {
|
|
8
8
|
onDelete: "set null",
|
|
9
9
|
}),
|
|
10
|
+
memberId: text("member_id").references(() => members.id, {
|
|
11
|
+
onDelete: "set null",
|
|
12
|
+
}),
|
|
10
13
|
organizationId: text("organization_id").references(() => organizations.id, {
|
|
11
14
|
onDelete: "set null",
|
|
12
15
|
}),
|
|
@@ -47,6 +47,7 @@ export class PostsService extends BasePermissionService<
|
|
|
47
47
|
|
|
48
48
|
return this.repository.posts.create({
|
|
49
49
|
authorUserId: ctx.user.id,
|
|
50
|
+
memberId: ctx.actor.memberId ?? null,
|
|
50
51
|
organizationId: ctx.session.activeOrganizationId ?? null,
|
|
51
52
|
teamId: ctx.session.activeTeamId ?? null,
|
|
52
53
|
title: input.title.trim(),
|
|
@@ -5,12 +5,12 @@ catalog:
|
|
|
5
5
|
"@heroui/react": 3.0.3
|
|
6
6
|
"@heroui/styles": 3.0.3
|
|
7
7
|
"@libsql/client": 0.17.4
|
|
8
|
-
"@m5kdev/backend": 0.
|
|
9
|
-
"@m5kdev/commons": 0.
|
|
10
|
-
"@m5kdev/config": 0.
|
|
11
|
-
"@m5kdev/email": 0.
|
|
12
|
-
"@m5kdev/frontend": 0.
|
|
13
|
-
"@m5kdev/web-ui": 0.
|
|
8
|
+
"@m5kdev/backend": 0.32.0
|
|
9
|
+
"@m5kdev/commons": 0.32.0
|
|
10
|
+
"@m5kdev/config": 0.32.0
|
|
11
|
+
"@m5kdev/email": 0.32.0
|
|
12
|
+
"@m5kdev/frontend": 0.32.0
|
|
13
|
+
"@m5kdev/web-ui": 0.32.0
|
|
14
14
|
"@playwright/test": 1.57.0
|
|
15
15
|
"@react-email/components": 1.0.1
|
|
16
16
|
"@tailwindcss/vite": 4.1.11
|