create-mikstack 0.1.37 → 0.1.38
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/dist/index.mjs
CHANGED
|
@@ -381,12 +381,14 @@ async function cli() {
|
|
|
381
381
|
]
|
|
382
382
|
});
|
|
383
383
|
const cols = process.stdout.columns || 80;
|
|
384
|
+
const stripAnsi = (s) => s.replace(/\x1b\[[0-9;]*m/g, "");
|
|
384
385
|
const handleData = (data) => {
|
|
385
386
|
if (!onLine) return;
|
|
386
387
|
const line = data.toString().trim().split("\n").pop();
|
|
387
388
|
if (!line) return;
|
|
389
|
+
const clean = stripAnsi(line);
|
|
388
390
|
const maxLen = cols - 5;
|
|
389
|
-
onLine(
|
|
391
|
+
onLine(clean.length > maxLen ? clean.slice(0, maxLen - 1) + "…" : clean);
|
|
390
392
|
};
|
|
391
393
|
child.stdout.on("data", handleData);
|
|
392
394
|
child.stderr.on("data", handleData);
|
package/package.json
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
FROM node:22-slim AS base
|
|
2
2
|
WORKDIR /app
|
|
3
|
+
# {{#if:pmIsPnpm}}
|
|
4
|
+
RUN corepack enable
|
|
5
|
+
# {{/if:pmIsPnpm}}
|
|
6
|
+
# {{#if:pmIsBun}}
|
|
7
|
+
RUN npm i -g bun
|
|
8
|
+
# {{/if:pmIsBun}}
|
|
3
9
|
|
|
4
10
|
FROM base AS deps
|
|
5
11
|
COPY package.json {{lockfile}} ./
|
|
@@ -7,10 +13,10 @@ COPY package.json {{lockfile}} ./
|
|
|
7
13
|
RUN npm ci
|
|
8
14
|
# {{/if:pmIsNpm}}
|
|
9
15
|
# {{#if:pmIsPnpm}}
|
|
10
|
-
RUN
|
|
16
|
+
RUN pnpm install --frozen-lockfile
|
|
11
17
|
# {{/if:pmIsPnpm}}
|
|
12
18
|
# {{#if:pmIsBun}}
|
|
13
|
-
RUN
|
|
19
|
+
RUN bun install --frozen-lockfile
|
|
14
20
|
# {{/if:pmIsBun}}
|
|
15
21
|
|
|
16
22
|
FROM base AS build
|
|
@@ -22,11 +28,11 @@ RUN npm run build
|
|
|
22
28
|
RUN npm prune --omit=dev
|
|
23
29
|
# {{/if:pmIsNpm}}
|
|
24
30
|
# {{#if:pmIsPnpm}}
|
|
25
|
-
RUN
|
|
31
|
+
RUN pnpm run build
|
|
26
32
|
RUN pnpm prune --prod
|
|
27
33
|
# {{/if:pmIsPnpm}}
|
|
28
34
|
# {{#if:pmIsBun}}
|
|
29
|
-
RUN
|
|
35
|
+
RUN bun run build
|
|
30
36
|
RUN bun install --production
|
|
31
37
|
# {{/if:pmIsBun}}
|
|
32
38
|
|
|
@@ -19,7 +19,7 @@ export const session = pgTable("session", {
|
|
|
19
19
|
userAgent: text(),
|
|
20
20
|
userId: text()
|
|
21
21
|
.notNull()
|
|
22
|
-
.references(() => user.id),
|
|
22
|
+
.references(() => user.id, { onDelete: "cascade" }),
|
|
23
23
|
createdAt: timestamp().notNull().defaultNow(),
|
|
24
24
|
updatedAt: timestamp().notNull().defaultNow(),
|
|
25
25
|
});
|
|
@@ -30,7 +30,7 @@ export const account = pgTable("account", {
|
|
|
30
30
|
providerId: text().notNull(),
|
|
31
31
|
userId: text()
|
|
32
32
|
.notNull()
|
|
33
|
-
.references(() => user.id),
|
|
33
|
+
.references(() => user.id, { onDelete: "cascade" }),
|
|
34
34
|
accessToken: text(),
|
|
35
35
|
refreshToken: text(),
|
|
36
36
|
idToken: text(),
|
|
@@ -56,7 +56,7 @@ export const notificationDelivery = pgTable("notification_delivery", {
|
|
|
56
56
|
id: text()
|
|
57
57
|
.primaryKey()
|
|
58
58
|
.$defaultFn(() => crypto.randomUUID()),
|
|
59
|
-
userId: text().references(() => user.id),
|
|
59
|
+
userId: text().references(() => user.id, { onDelete: "set null" }),
|
|
60
60
|
type: text().notNull(),
|
|
61
61
|
channel: text().notNull(),
|
|
62
62
|
status: text({ enum: ["pending", "sent", "delivered", "failed"] })
|
|
@@ -78,7 +78,7 @@ export const inAppNotification = pgTable("in_app_notification", {
|
|
|
78
78
|
.$defaultFn(() => crypto.randomUUID()),
|
|
79
79
|
userId: text()
|
|
80
80
|
.notNull()
|
|
81
|
-
.references(() => user.id),
|
|
81
|
+
.references(() => user.id, { onDelete: "cascade" }),
|
|
82
82
|
type: text().notNull(),
|
|
83
83
|
title: text().notNull(),
|
|
84
84
|
body: text(),
|
|
@@ -94,7 +94,7 @@ export const notificationPreference = pgTable("notification_preference", {
|
|
|
94
94
|
.$defaultFn(() => crypto.randomUUID()),
|
|
95
95
|
userId: text()
|
|
96
96
|
.notNull()
|
|
97
|
-
.references(() => user.id),
|
|
97
|
+
.references(() => user.id, { onDelete: "cascade" }),
|
|
98
98
|
notificationType: text().notNull(),
|
|
99
99
|
channel: text().notNull(),
|
|
100
100
|
enabled: boolean().notNull(),
|
|
@@ -109,7 +109,7 @@ export const note = pgTable("note", {
|
|
|
109
109
|
content: text().notNull().default(""),
|
|
110
110
|
userId: text()
|
|
111
111
|
.notNull()
|
|
112
|
-
.references(() => user.id),
|
|
112
|
+
.references(() => user.id, { onDelete: "cascade" }),
|
|
113
113
|
createdAt: timestamp().notNull(),
|
|
114
114
|
updatedAt: timestamp().notNull(),
|
|
115
115
|
});
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
import { initI18n } from "$lib/i18n";
|
|
6
6
|
|
|
7
7
|
let { children, data }: { children: Snippet; data: { locale: string } } = $props();
|
|
8
|
-
|
|
8
|
+
$effect(() => {
|
|
9
|
+
initI18n(data.locale);
|
|
10
|
+
});
|
|
9
11
|
// {{/if:i18n}}
|
|
10
12
|
// {{#if:!i18n}}
|
|
11
13
|
let { children }: { children: Snippet } = $props();
|