@meith/cli 0.34.0 → 0.35.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meith/cli",
3
- "version": "0.34.0",
3
+ "version": "0.35.1",
4
4
  "description": "The operator CLI: migrations, backup and restore, imports, users and settings — and the meith bin that runs it against an external board workspace.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,19 +24,19 @@
24
24
  "dependencies": {
25
25
  "@aws-sdk/client-s3": "3.1111.0",
26
26
  "tsx": "^4.23.12",
27
- "@meith/accounts": "0.34.0",
28
- "@meith/backup": "0.34.0",
29
- "@meith/core": "0.34.0",
30
- "@meith/db": "0.34.0",
31
- "@meith/demo": "0.34.0",
32
- "@meith/drivers": "0.34.0",
33
- "@meith/forums": "0.34.0",
34
- "@meith/plugin-kit": "0.34.0",
35
- "@meith/profile-fields": "0.34.0",
36
- "@meith/runtime": "0.34.0",
37
- "@meith/settings": "0.34.0",
38
- "@meith/tasks": "0.34.0",
39
- "create-meith": "0.34.0"
27
+ "@meith/accounts": "0.35.1",
28
+ "@meith/backup": "0.35.1",
29
+ "@meith/core": "0.35.1",
30
+ "@meith/db": "0.35.1",
31
+ "@meith/demo": "0.35.1",
32
+ "@meith/drivers": "0.35.1",
33
+ "@meith/forums": "0.35.1",
34
+ "@meith/plugin-kit": "0.35.1",
35
+ "@meith/profile-fields": "0.35.1",
36
+ "@meith/runtime": "0.35.1",
37
+ "@meith/settings": "0.35.1",
38
+ "@meith/tasks": "0.35.1",
39
+ "create-meith": "0.35.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "esbuild": "^0.28.2"
@@ -244,6 +244,7 @@ export async function boardEject(args: readonly string[]): Promise<number> {
244
244
  ' # to the pushed image (or docker-compose.yaml instead, which builds on the server)',
245
245
  )
246
246
  console.log(' # redeploy — same database, same uploads, same secrets, new image source')
247
+ console.log(' # no panel? docker-compose.byhand.yaml is the same board without Coolify')
247
248
  console.log('')
248
249
  console.log(
249
250
  'See docs/customization/marketplace.md, "Moving to a custom board", for the full walkthrough.',
package/src/commands.ts CHANGED
@@ -61,11 +61,13 @@ export async function userCreate(args: readonly string[]): Promise<number> {
61
61
  const password = await readPassword(flags)
62
62
 
63
63
  const ctx = await createContext()
64
- const result = await ctx.identity.register({ username, email, password })
65
64
 
66
65
  const groupRef = optional(flags, 'group')
67
- if (groupRef !== undefined) {
68
- const group = await findGroup(ctx, groupRef)
66
+ const group = groupRef === undefined ? null : await findGroup(ctx, groupRef)
67
+
68
+ const result = await ctx.identity.register({ username, email, password })
69
+
70
+ if (group !== null) {
69
71
  await ctx.admin.setPrimaryGroup(result.account.id, group.id)
70
72
  console.log(`Created user ${username} (id ${result.account.id}) in group ${group.key}.`)
71
73
  } else {
@@ -76,22 +76,24 @@ export class UploadsDirCopier implements ImportFileCopier {
76
76
  return { outcome: 'failed', reason: `avatar ${input.path} is not a png or jpeg` }
77
77
  }
78
78
 
79
+ let processed: Awaited<ReturnType<ImageProcessor['process']>>
79
80
  try {
80
- const processed = await this.images.process({
81
+ processed = await this.images.process({
81
82
  bytes,
82
83
  codec: type.codec,
83
84
  fit: AVATAR_BOX,
84
85
  thumbnail: false,
85
86
  })
86
- const key = storageKey('avatars', input.legacyUserId, EXTENSIONS[processed.contentType] ?? '')
87
- await this.files.put(key, processed.bytes, {
88
- contentType: processed.contentType,
89
- visibility: 'public',
90
- })
91
- return { outcome: 'ready', key, width: processed.width, height: processed.height }
92
87
  } catch {
93
88
  return { outcome: 'failed', reason: `avatar ${input.path} could not be decoded` }
94
89
  }
90
+
91
+ const key = storageKey('avatars', input.legacyUserId, EXTENSIONS[processed.contentType] ?? '')
92
+ await this.files.put(key, processed.bytes, {
93
+ contentType: processed.contentType,
94
+ visibility: 'public',
95
+ })
96
+ return { outcome: 'ready', key, width: processed.width, height: processed.height }
95
97
  }
96
98
 
97
99
  async #reencode(
@@ -104,34 +106,36 @@ export class UploadsDirCopier implements ImportFileCopier {
104
106
  return { outcome: 'failed', reason: `file ${path} could not be decoded` }
105
107
  }
106
108
 
109
+ let processed: Awaited<ReturnType<ImageProcessor['process']>>
107
110
  try {
108
- const processed = await this.images.process({ bytes, codec: type.codec })
109
- const key = storageKey('attachments', legacyId, EXTENSIONS[processed.contentType] ?? '')
110
- await this.files.put(key, processed.bytes, {
111
- contentType: processed.contentType,
111
+ processed = await this.images.process({ bytes, codec: type.codec })
112
+ } catch {
113
+ return { outcome: 'failed', reason: `file ${path} could not be decoded` }
114
+ }
115
+
116
+ const key = storageKey('attachments', legacyId, EXTENSIONS[processed.contentType] ?? '')
117
+ await this.files.put(key, processed.bytes, {
118
+ contentType: processed.contentType,
119
+ visibility: 'private',
120
+ })
121
+
122
+ let thumbnailKey: string | null = null
123
+ if (processed.thumbnail !== undefined) {
124
+ thumbnailKey = storageKey('attachments', legacyId, '.thumb.jpg')
125
+ await this.files.put(thumbnailKey, processed.thumbnail.bytes, {
126
+ contentType: processed.thumbnail.contentType,
112
127
  visibility: 'private',
113
128
  })
129
+ }
114
130
 
115
- let thumbnailKey: string | null = null
116
- if (processed.thumbnail !== undefined) {
117
- thumbnailKey = storageKey('attachments', legacyId, '.thumb.jpg')
118
- await this.files.put(thumbnailKey, processed.thumbnail.bytes, {
119
- contentType: processed.thumbnail.contentType,
120
- visibility: 'private',
121
- })
122
- }
123
-
124
- return {
125
- outcome: 'ready',
126
- storageKey: key,
127
- thumbnailKey,
128
- contentType: processed.contentType,
129
- sizeBytes: processed.bytes.byteLength,
130
- width: processed.width,
131
- height: processed.height,
132
- }
133
- } catch {
134
- return { outcome: 'failed', reason: `file ${path} could not be decoded` }
131
+ return {
132
+ outcome: 'ready',
133
+ storageKey: key,
134
+ thumbnailKey,
135
+ contentType: processed.contentType,
136
+ sizeBytes: processed.bytes.byteLength,
137
+ width: processed.width,
138
+ height: processed.height,
135
139
  }
136
140
  }
137
141
 
package/src/upgrade.ts CHANGED
@@ -12,7 +12,7 @@ import { type PluginDefinition, pluginNavigationPlacements } from '@meith/plugin
12
12
  import { backupBeforeMigrating, runPluginLifecycle } from '@meith/runtime'
13
13
  import { type PluginUpgrade, planUpgrade, upgradeNotice } from '@meith/upgrade'
14
14
 
15
- export const CODE_VERSION = '0.34.0'
15
+ export const CODE_VERSION = '0.35.1'
16
16
 
17
17
  export function pluginUpgrades(plugins: readonly PluginDefinition[]): readonly PluginUpgrade[] {
18
18
  return plugins.map((plugin) => ({