rimecms 1.2.0 → 1.3.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/dist/adapter-sqlite/constant.d.ts +16 -0
- package/dist/adapter-sqlite/constant.js +16 -0
- package/dist/adapter-sqlite/db-move.server.d.ts +31 -0
- package/dist/adapter-sqlite/db-move.server.js +102 -0
- package/dist/adapter-sqlite/drizzle-config.server.d.ts +9 -0
- package/dist/adapter-sqlite/drizzle-config.server.js +39 -0
- package/dist/adapter-sqlite/generate-schema/write.server.js +7 -3
- package/dist/adapter-sqlite/hooks.server.d.ts +3 -0
- package/dist/adapter-sqlite/hooks.server.js +64 -0
- package/dist/adapter-sqlite/index.server.d.ts +9 -1
- package/dist/adapter-sqlite/index.server.js +18 -2
- package/dist/core/adapter.d.ts +27 -0
- package/dist/core/auth/better-auth-tables.server.d.ts +4 -1
- package/dist/core/auth/better-auth-tables.server.js +4 -1
- package/dist/core/auth/handler/index.server.js +35 -9
- package/dist/core/auth/user.server.d.ts +8 -3
- package/dist/core/auth/user.server.js +8 -3
- package/dist/core/boot.server.js +7 -2
- package/dist/core/codegen.server.d.ts +2 -3
- package/dist/core/codegen.server.js +10 -14
- package/dist/core/config/types.d.ts +4 -2
- package/dist/core/dev/cli/commands/build.d.ts +2 -2
- package/dist/core/dev/cli/commands/build.js +22 -11
- package/dist/core/dev/cli/commands/clear.server.d.ts +5 -0
- package/dist/core/dev/cli/commands/clear.server.js +17 -4
- package/dist/core/dev/cli/commands/init.server.d.ts +3 -1
- package/dist/core/dev/cli/commands/init.server.js +11 -46
- package/dist/core/dev/cli/commands/uploads-move.server.js +3 -0
- package/dist/core/dev/cli/index.js +19 -3
- package/dist/core/dev/cli/templates/init.d.ts +5 -9
- package/dist/core/dev/cli/templates/init.js +5 -38
- package/dist/core/dev/cli/util/adapter-hooks.server.d.ts +15 -0
- package/dist/core/dev/cli/util/adapter-hooks.server.js +17 -0
- package/dist/core/dev/cli/util/package-manager.server.d.ts +5 -1
- package/dist/core/dev/cli/util/package-manager.server.js +8 -10
- package/dist/core/dev/deny-storage.server.d.ts +2 -2
- package/dist/core/dev/deny-storage.server.js +2 -2
- package/dist/core/dev/ensure.server.js +0 -18
- package/dist/core/dev/vite.server.js +8 -4
- package/dist/panel/pages/dashboard/DashboardRow.svelte +13 -0
- package/dist/panel/style/font.css +2 -2
- package/dist/panel/style/index.css +2 -2
- package/package.json +6 -1
|
@@ -46,14 +46,6 @@ function ensureEnv() {
|
|
|
46
46
|
if (!existsSync(envFile))
|
|
47
47
|
throw new Error('Missing .env file');
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Ensure drizzle config exists
|
|
51
|
-
*/
|
|
52
|
-
function ensureDirzzle() {
|
|
53
|
-
const drizzleConfigFile = path.resolve(projectRoot, './drizzle.config.ts');
|
|
54
|
-
if (!existsSync(drizzleConfigFile))
|
|
55
|
-
throw new Error('Missing drizzle.config.ts file');
|
|
56
|
-
}
|
|
57
49
|
/**
|
|
58
50
|
* Ensure hooks.server exists
|
|
59
51
|
*/
|
|
@@ -62,19 +54,9 @@ function ensureHooks() {
|
|
|
62
54
|
if (!existsSync(hooksServerFile))
|
|
63
55
|
throw new Error('Missing src/hooks.server.ts file');
|
|
64
56
|
}
|
|
65
|
-
/**
|
|
66
|
-
* Ensure db directory exists
|
|
67
|
-
*/
|
|
68
|
-
function ensureDatabase() {
|
|
69
|
-
const dbDirectory = path.resolve(projectRoot, './db');
|
|
70
|
-
if (!existsSync(dbDirectory))
|
|
71
|
-
throw new Error('Missing db directory');
|
|
72
|
-
}
|
|
73
57
|
export const ensureHasInit = () => {
|
|
74
58
|
ensureEnv();
|
|
75
|
-
ensureDirzzle();
|
|
76
59
|
ensureHooks();
|
|
77
|
-
ensureDatabase();
|
|
78
60
|
ensureUserConfigExist();
|
|
79
61
|
ensureGeneratedConfig();
|
|
80
62
|
ensureSchema();
|
|
@@ -79,7 +79,7 @@ export function rime() {
|
|
|
79
79
|
return {
|
|
80
80
|
name: 'virtual-rime',
|
|
81
81
|
configureServer(server) {
|
|
82
|
-
// Ahead of Vite's own middlewares: no request reaches storage/, the uploads
|
|
82
|
+
// Ahead of Vite's own middlewares: no request reaches storage/, the uploads and the database
|
|
83
83
|
server.middlewares.use(denyStorage);
|
|
84
84
|
// Add a listener for when the server starts
|
|
85
85
|
server.httpServer?.once('listening', () => {
|
|
@@ -105,8 +105,8 @@ export function rime() {
|
|
|
105
105
|
// Add a watcher for sanitizing config changes and triggering schema/routes/types
|
|
106
106
|
// generation. Debounced + single-flight: a config change is rarely one file (e.g. a
|
|
107
107
|
// plugin swap copying several files under +rime/ at once) — without this, each file
|
|
108
|
-
// fires its own overlapping sanitize()+generate()+migrate() run against the same
|
|
109
|
-
//
|
|
108
|
+
// fires its own overlapping sanitize()+generate()+migrate() run against the same database,
|
|
109
|
+
// racing each other.
|
|
110
110
|
let reloadTimer = null;
|
|
111
111
|
let reloadInFlight = null;
|
|
112
112
|
let reloadQueued = false;
|
|
@@ -159,6 +159,10 @@ export function rime() {
|
|
|
159
159
|
});
|
|
160
160
|
},
|
|
161
161
|
config() {
|
|
162
|
+
// The project's own storage/, the database and the uploads: not a folder named storage
|
|
163
|
+
// deeper in the tree, such as src/lib/server/storage/
|
|
164
|
+
const storage = path.resolve(process.cwd(), 'storage');
|
|
165
|
+
const inStorage = (file) => file === storage || file.startsWith(`${storage}${path.sep}`);
|
|
162
166
|
return {
|
|
163
167
|
// `bun:sqlite` only exists at runtime under Bun (adapterSqlite driver 'bun').
|
|
164
168
|
ssr: {
|
|
@@ -176,7 +180,7 @@ export function rime() {
|
|
|
176
180
|
},
|
|
177
181
|
server: {
|
|
178
182
|
watch: {
|
|
179
|
-
ignored: [
|
|
183
|
+
ignored: [inStorage, '**/logs/**']
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
};
|
|
@@ -73,6 +73,19 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
.rz-dashboard-row:has(.rz-dashboard-row__description) {
|
|
77
|
+
min-height: calc(15 * var(--rz-unit));
|
|
78
|
+
align-items: flex-start;
|
|
79
|
+
padding-block: var(--rz-size-3-5);
|
|
80
|
+
|
|
81
|
+
.rz-dashboard-row__description {
|
|
82
|
+
margin-top: var(--rz-size-1-5);
|
|
83
|
+
white-space: unset;
|
|
84
|
+
overflow: unset;
|
|
85
|
+
text-overflow: unset;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
76
89
|
.rz-dashboard-row__text {
|
|
77
90
|
display: flex;
|
|
78
91
|
flex: 1;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'geist';
|
|
3
|
-
src: url('
|
|
3
|
+
src: url('../fonts/Geist-VariableFont_wght.ttf') format('truetype');
|
|
4
4
|
font-weight: 100 1000;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
@font-face {
|
|
8
8
|
font-family: 'geist-mono';
|
|
9
|
-
src: url('
|
|
9
|
+
src: url('../fonts/GeistMono-VariableFont_wght.ttf') format('truetype');
|
|
10
10
|
font-weight: 100 1000;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -458,13 +458,13 @@ video {
|
|
|
458
458
|
}
|
|
459
459
|
@font-face {
|
|
460
460
|
font-family: 'geist';
|
|
461
|
-
src: url('
|
|
461
|
+
src: url('../fonts/Geist-VariableFont_wght.ttf') format('truetype');
|
|
462
462
|
font-weight: 100 1000;
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
@font-face {
|
|
466
466
|
font-family: 'geist-mono';
|
|
467
|
-
src: url('
|
|
467
|
+
src: url('../fonts/GeistMono-VariableFont_wght.ttf') format('truetype');
|
|
468
468
|
font-weight: 100 1000;
|
|
469
469
|
}
|
|
470
470
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rimecms",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"homepage": "https://github.com/bienbiendev/rime",
|
|
5
5
|
"packageManager": "bun@1.3.0",
|
|
6
6
|
"scripts": {
|
|
@@ -56,6 +56,11 @@
|
|
|
56
56
|
"import": "./dist/adapter-sqlite/index.server.js",
|
|
57
57
|
"default": "./dist/adapter-sqlite/index.server.js"
|
|
58
58
|
},
|
|
59
|
+
"./adapter-sqlite/hooks": {
|
|
60
|
+
"types": "./dist/adapter-sqlite/hooks.server.d.ts",
|
|
61
|
+
"import": "./dist/adapter-sqlite/hooks.server.js",
|
|
62
|
+
"default": "./dist/adapter-sqlite/hooks.server.js"
|
|
63
|
+
},
|
|
59
64
|
"./config": {
|
|
60
65
|
"types": "./dist/core/config/index.d.ts",
|
|
61
66
|
"import": "./dist/core/config/index.js",
|