@meith/web 0.33.1 → 0.33.2
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 +49 -49
- package/src/server/upgrade-notice.ts +33 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meith/web",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.2",
|
|
4
4
|
"description": "The board itself: the Next.js app, and the forum-web bin that materializes it into an external board workspace.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,54 +43,54 @@
|
|
|
43
43
|
"react-dom": "19.2.8",
|
|
44
44
|
"tailwindcss": "^4.3.3",
|
|
45
45
|
"typescript": "7.0.2",
|
|
46
|
-
"@meith/accounts": "0.33.
|
|
47
|
-
"@meith/admin": "0.33.
|
|
48
|
-
"@meith/antispam": "0.33.
|
|
49
|
-
"@meith/api": "0.33.
|
|
50
|
-
"@meith/attachments": "0.33.
|
|
51
|
-
"@meith/authorization": "0.33.
|
|
52
|
-
"@meith/avatars": "0.33.
|
|
53
|
-
"@meith/board-digest": "0.33.
|
|
54
|
-
"@meith/core": "0.33.
|
|
55
|
-
"@meith/db": "0.33.
|
|
56
|
-
"@meith/demo": "0.33.
|
|
57
|
-
"@meith/drafts": "0.33.
|
|
58
|
-
"@meith/drivers": "0.33.
|
|
59
|
-
"@meith/events": "0.33.
|
|
60
|
-
"@meith/forums": "0.33.
|
|
61
|
-
"@meith/groups": "0.33.
|
|
62
|
-
"@meith/i18n": "0.33.
|
|
63
|
-
"@meith/import": "0.33.
|
|
64
|
-
"@meith/install": "0.33.
|
|
65
|
-
"@meith/mail": "0.33.
|
|
66
|
-
"@meith/markdown": "0.33.
|
|
67
|
-
"@meith/marketplace": "0.33.
|
|
68
|
-
"@meith/messages": "0.33.
|
|
69
|
-
"@meith/moderation": "0.33.
|
|
70
|
-
"@meith/notifications": "0.33.
|
|
71
|
-
"@meith/plugin-calendar": "0.33.
|
|
72
|
-
"@meith/plugin-dues": "0.33.
|
|
73
|
-
"@meith/plugin-kit": "0.33.
|
|
74
|
-
"@meith/polls": "0.33.
|
|
75
|
-
"@meith/posts": "0.33.
|
|
76
|
-
"@meith/profile-fields": "0.33.
|
|
77
|
-
"@meith/relations": "0.33.
|
|
78
|
-
"@meith/reputation": "0.33.
|
|
79
|
-
"@meith/runtime": "0.33.
|
|
80
|
-
"@meith/search": "0.33.
|
|
81
|
-
"@meith/settings": "0.33.
|
|
82
|
-
"@meith/signatures": "0.33.
|
|
83
|
-
"@meith/subscriptions": "0.33.
|
|
84
|
-
"@meith/tasks": "0.33.
|
|
85
|
-
"@meith/theme-clubhouse": "0.33.
|
|
86
|
-
"@meith/theme-default": "0.33.
|
|
87
|
-
"@meith/theme-kit": "0.33.
|
|
88
|
-
"@meith/theme-midnight": "0.33.
|
|
89
|
-
"@meith/theme-phasebook": "0.33.
|
|
90
|
-
"@meith/theme-raidframe": "0.33.
|
|
91
|
-
"@meith/threads": "0.33.
|
|
92
|
-
"@meith/ui": "0.33.
|
|
93
|
-
"@meith/upgrade": "0.33.
|
|
46
|
+
"@meith/accounts": "0.33.2",
|
|
47
|
+
"@meith/admin": "0.33.2",
|
|
48
|
+
"@meith/antispam": "0.33.2",
|
|
49
|
+
"@meith/api": "0.33.2",
|
|
50
|
+
"@meith/attachments": "0.33.2",
|
|
51
|
+
"@meith/authorization": "0.33.2",
|
|
52
|
+
"@meith/avatars": "0.33.2",
|
|
53
|
+
"@meith/board-digest": "0.33.2",
|
|
54
|
+
"@meith/core": "0.33.2",
|
|
55
|
+
"@meith/db": "0.33.2",
|
|
56
|
+
"@meith/demo": "0.33.2",
|
|
57
|
+
"@meith/drafts": "0.33.2",
|
|
58
|
+
"@meith/drivers": "0.33.2",
|
|
59
|
+
"@meith/events": "0.33.2",
|
|
60
|
+
"@meith/forums": "0.33.2",
|
|
61
|
+
"@meith/groups": "0.33.2",
|
|
62
|
+
"@meith/i18n": "0.33.2",
|
|
63
|
+
"@meith/import": "0.33.2",
|
|
64
|
+
"@meith/install": "0.33.2",
|
|
65
|
+
"@meith/mail": "0.33.2",
|
|
66
|
+
"@meith/markdown": "0.33.2",
|
|
67
|
+
"@meith/marketplace": "0.33.2",
|
|
68
|
+
"@meith/messages": "0.33.2",
|
|
69
|
+
"@meith/moderation": "0.33.2",
|
|
70
|
+
"@meith/notifications": "0.33.2",
|
|
71
|
+
"@meith/plugin-calendar": "0.33.2",
|
|
72
|
+
"@meith/plugin-dues": "0.33.2",
|
|
73
|
+
"@meith/plugin-kit": "0.33.2",
|
|
74
|
+
"@meith/polls": "0.33.2",
|
|
75
|
+
"@meith/posts": "0.33.2",
|
|
76
|
+
"@meith/profile-fields": "0.33.2",
|
|
77
|
+
"@meith/relations": "0.33.2",
|
|
78
|
+
"@meith/reputation": "0.33.2",
|
|
79
|
+
"@meith/runtime": "0.33.2",
|
|
80
|
+
"@meith/search": "0.33.2",
|
|
81
|
+
"@meith/settings": "0.33.2",
|
|
82
|
+
"@meith/signatures": "0.33.2",
|
|
83
|
+
"@meith/subscriptions": "0.33.2",
|
|
84
|
+
"@meith/tasks": "0.33.2",
|
|
85
|
+
"@meith/theme-clubhouse": "0.33.2",
|
|
86
|
+
"@meith/theme-default": "0.33.2",
|
|
87
|
+
"@meith/theme-kit": "0.33.2",
|
|
88
|
+
"@meith/theme-midnight": "0.33.2",
|
|
89
|
+
"@meith/theme-phasebook": "0.33.2",
|
|
90
|
+
"@meith/theme-raidframe": "0.33.2",
|
|
91
|
+
"@meith/threads": "0.33.2",
|
|
92
|
+
"@meith/ui": "0.33.2",
|
|
93
|
+
"@meith/upgrade": "0.33.2"
|
|
94
94
|
},
|
|
95
95
|
"scripts": {
|
|
96
96
|
"dev": "next dev",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import 'server-only'
|
|
2
2
|
|
|
3
|
-
import { env, logger, ValidationError } from '@meith/core'
|
|
3
|
+
import { ConfigurationError, env, logger, ValidationError } from '@meith/core'
|
|
4
4
|
import {
|
|
5
5
|
appliedPluginMigrations,
|
|
6
6
|
applyPluginMigration,
|
|
7
7
|
getDb,
|
|
8
8
|
PostgresNavigationRepository,
|
|
9
|
+
pendingCoreMigrations,
|
|
9
10
|
readVersion,
|
|
10
11
|
recordVersion,
|
|
11
12
|
} from '@meith/db'
|
|
@@ -16,12 +17,29 @@ import { planUpgrade, type UpgradeState, upgradeNotice } from '@meith/upgrade'
|
|
|
16
17
|
|
|
17
18
|
import { activeDefinitions } from './plugin-host'
|
|
18
19
|
|
|
19
|
-
export const CODE_VERSION = '0.33.
|
|
20
|
+
export const CODE_VERSION = '0.33.2'
|
|
20
21
|
|
|
21
22
|
export interface UpgradeApplied {
|
|
22
23
|
readonly plugins: readonly string[]
|
|
23
24
|
}
|
|
24
25
|
|
|
26
|
+
let coreMigrationsUnreadable = false
|
|
27
|
+
|
|
28
|
+
async function missingCoreMigrations(db: ReturnType<typeof getDb>): Promise<readonly string[]> {
|
|
29
|
+
if (coreMigrationsUnreadable) return []
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
return await pendingCoreMigrations(db)
|
|
33
|
+
} catch (error) {
|
|
34
|
+
if (error instanceof ConfigurationError) coreMigrationsUnreadable = true
|
|
35
|
+
logger().warn(
|
|
36
|
+
{ err: String(error) },
|
|
37
|
+
'could not read the pending core migrations, comparing versions only',
|
|
38
|
+
)
|
|
39
|
+
return []
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
25
43
|
export async function applyPendingUpgrade(): Promise<UpgradeApplied> {
|
|
26
44
|
const db = getDb()
|
|
27
45
|
const definitions = activeDefinitions()
|
|
@@ -31,10 +49,12 @@ export async function applyPendingUpgrade(): Promise<UpgradeApplied> {
|
|
|
31
49
|
applied[plugin.key] = await appliedPluginMigrations(db, plugin.key)
|
|
32
50
|
}
|
|
33
51
|
|
|
52
|
+
const pendingCore = await missingCoreMigrations(db)
|
|
53
|
+
|
|
34
54
|
const state: UpgradeState = {
|
|
35
55
|
recordedVersion: (await readVersion(db, 'core')) ?? CODE_VERSION,
|
|
36
56
|
codeVersion: CODE_VERSION,
|
|
37
|
-
pendingCoreMigrations:
|
|
57
|
+
pendingCoreMigrations: pendingCore,
|
|
38
58
|
plugins: definitions.map((plugin) => ({
|
|
39
59
|
key: plugin.key,
|
|
40
60
|
version: plugin.version,
|
|
@@ -52,6 +72,15 @@ export async function applyPendingUpgrade(): Promise<UpgradeApplied> {
|
|
|
52
72
|
: new ValidationError(notice)
|
|
53
73
|
}
|
|
54
74
|
|
|
75
|
+
if (pendingCore.length > 0) {
|
|
76
|
+
throw new ValidationError(
|
|
77
|
+
msg('error.app.core-migrations-pending', {
|
|
78
|
+
count: pendingCore.length,
|
|
79
|
+
migrations: pendingCore.join(', '),
|
|
80
|
+
}),
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
55
84
|
const fresh = new Set<string>()
|
|
56
85
|
for (const plugin of definitions) {
|
|
57
86
|
if ((await readVersion(db, `plugin:${plugin.key}`)) === null) fresh.add(plugin.key)
|
|
@@ -101,7 +130,7 @@ export async function pendingUpgradeNotice(): Promise<string | null> {
|
|
|
101
130
|
const state: UpgradeState = {
|
|
102
131
|
recordedVersion: (await readVersion(db, 'core')) ?? CODE_VERSION,
|
|
103
132
|
codeVersion: CODE_VERSION,
|
|
104
|
-
pendingCoreMigrations:
|
|
133
|
+
pendingCoreMigrations: await missingCoreMigrations(db),
|
|
105
134
|
plugins: plugins.map((plugin) => ({
|
|
106
135
|
key: plugin.key,
|
|
107
136
|
version: plugin.version,
|