@meith/cli 0.25.1 → 0.26.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/bin/community.mjs +3 -3
- package/package.json +13 -13
- package/src/board-eject.ts +3 -3
- package/src/index.ts +2 -2
- package/src/plugin-manifest.ts +1 -1
- package/src/plugins.ts +2 -2
- package/src/upgrade.ts +1 -1
package/bin/community.mjs
CHANGED
|
@@ -21,12 +21,12 @@ function toPosixRelative(from, to) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
function materialize() {
|
|
24
|
-
const boardConfig = join(workspaceRoot, '
|
|
25
|
-
const boardPlugins = join(workspaceRoot, '
|
|
24
|
+
const boardConfig = join(workspaceRoot, 'meith.config.ts')
|
|
25
|
+
const boardPlugins = join(workspaceRoot, 'meith.plugins.ts')
|
|
26
26
|
|
|
27
27
|
if (!existsSync(boardConfig)) {
|
|
28
28
|
fail(
|
|
29
|
-
`no
|
|
29
|
+
`no meith.config.ts in ${workspaceRoot}. Run community from a board's own ` +
|
|
30
30
|
'directory — the one create-meith scaffolded, or one shaped like it.',
|
|
31
31
|
)
|
|
32
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meith/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "The operator CLI: migrations, backup and restore, imports, users and settings — and the community bin that runs it against an external board workspace.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"tsx": "^4.23.12",
|
|
26
|
-
"@meith/accounts": "0.
|
|
27
|
-
"@meith/core": "0.
|
|
28
|
-
"@meith/db": "0.
|
|
29
|
-
"@meith/demo": "0.
|
|
30
|
-
"@meith/drivers": "0.
|
|
31
|
-
"@meith/forums": "0.
|
|
32
|
-
"@meith/plugin-kit": "0.
|
|
33
|
-
"@meith/profile-fields": "0.
|
|
34
|
-
"@meith/runtime": "0.
|
|
35
|
-
"@meith/settings": "0.
|
|
36
|
-
"@meith/tasks": "0.
|
|
37
|
-
"create-meith": "0.
|
|
26
|
+
"@meith/accounts": "0.26.0",
|
|
27
|
+
"@meith/core": "0.26.0",
|
|
28
|
+
"@meith/db": "0.26.0",
|
|
29
|
+
"@meith/demo": "0.26.0",
|
|
30
|
+
"@meith/drivers": "0.26.0",
|
|
31
|
+
"@meith/forums": "0.26.0",
|
|
32
|
+
"@meith/plugin-kit": "0.26.0",
|
|
33
|
+
"@meith/profile-fields": "0.26.0",
|
|
34
|
+
"@meith/runtime": "0.26.0",
|
|
35
|
+
"@meith/settings": "0.26.0",
|
|
36
|
+
"@meith/tasks": "0.26.0",
|
|
37
|
+
"create-meith": "0.26.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"esbuild": "^0.28.2"
|
package/src/board-eject.ts
CHANGED
|
@@ -74,7 +74,7 @@ export function validateEjectManifest(plugins: readonly ManifestEntry[], path: s
|
|
|
74
74
|
if (!IDENTIFIER_PATTERN.test(identifier)) {
|
|
75
75
|
throw new ValidationError(
|
|
76
76
|
`${path}: "${entry.key}" is a valid plugin key, but the identifier ` +
|
|
77
|
-
`
|
|
77
|
+
`meith.plugins.ts would bind for it, "${identifier}", is not a valid TypeScript ` +
|
|
78
78
|
'identifier. Each hyphen must be followed by exactly one lower-case letter or digit, ' +
|
|
79
79
|
'and a key cannot end in a hyphen.',
|
|
80
80
|
)
|
|
@@ -84,7 +84,7 @@ export function validateEjectManifest(plugins: readonly ManifestEntry[], path: s
|
|
|
84
84
|
if (collidingKey !== undefined) {
|
|
85
85
|
throw new ValidationError(
|
|
86
86
|
`${path}: "${entry.key}" and "${collidingKey}" both generate the identifier ` +
|
|
87
|
-
`"${identifier}" for
|
|
87
|
+
`"${identifier}" for meith.plugins.ts. Rename one of the keys so the generated ` +
|
|
88
88
|
'imports do not collide.',
|
|
89
89
|
)
|
|
90
90
|
}
|
|
@@ -208,7 +208,7 @@ export async function boardEject(args: readonly string[]): Promise<number> {
|
|
|
208
208
|
}
|
|
209
209
|
files.set('package.json', mergePluginDependencies(packageJson, manifest.plugins))
|
|
210
210
|
files.set('board.plugins.json', `${JSON.stringify({ plugins: manifest.plugins }, null, 2)}\n`)
|
|
211
|
-
files.set('
|
|
211
|
+
files.set('meith.plugins.ts', renderInstalledPluginsModule(manifest.plugins))
|
|
212
212
|
|
|
213
213
|
for (const [relative, contents] of files) {
|
|
214
214
|
const path = join(target, relative)
|
package/src/index.ts
CHANGED
|
@@ -211,7 +211,7 @@ const commands: Command[] = [
|
|
|
211
211
|
|
|
212
212
|
{
|
|
213
213
|
name: 'plugin:add',
|
|
214
|
-
summary: 'Add a package to board.plugins.json and regenerate
|
|
214
|
+
summary: 'Add a package to board.plugins.json and regenerate meith.plugins.ts.',
|
|
215
215
|
usage: 'community plugin:add <package> [--key <key>] [--disabled]',
|
|
216
216
|
async run(args: readonly string[]) {
|
|
217
217
|
const { pluginAdd } = await import('./plugin-manifest')
|
|
@@ -221,7 +221,7 @@ const commands: Command[] = [
|
|
|
221
221
|
|
|
222
222
|
{
|
|
223
223
|
name: 'plugin:remove',
|
|
224
|
-
summary: 'Remove a plugin from board.plugins.json and regenerate
|
|
224
|
+
summary: 'Remove a plugin from board.plugins.json and regenerate meith.plugins.ts.',
|
|
225
225
|
usage: 'community plugin:remove <key>',
|
|
226
226
|
async run(args: readonly string[]) {
|
|
227
227
|
const { pluginRemove } = await import('./plugin-manifest')
|
package/src/plugin-manifest.ts
CHANGED
|
@@ -52,7 +52,7 @@ async function readManifestFor(board: Board): Promise<Manifest> {
|
|
|
52
52
|
'repository carries — apps/community and boards/stock — and reruns the generator, ' +
|
|
53
53
|
'so it needs a checkout of the repository, not the deployed image — run it where you ' +
|
|
54
54
|
'would run `pnpm add`, commit both board.plugins.json files and both ' +
|
|
55
|
-
'
|
|
55
|
+
'meith.plugins.ts files, then rebuild and redeploy.',
|
|
56
56
|
)
|
|
57
57
|
}
|
|
58
58
|
throw error
|
package/src/plugins.ts
CHANGED
|
@@ -17,7 +17,7 @@ export async function purge(options: PurgeOptions): Promise<number> {
|
|
|
17
17
|
options.log('')
|
|
18
18
|
options.log('Purging runs the plugin’s own onUninstall before dropping its data, so it')
|
|
19
19
|
options.log('has to happen while the code is still installed. Put the plugin back into')
|
|
20
|
-
options.log('
|
|
20
|
+
options.log('meith.plugins.ts, deploy, purge, and then remove it.')
|
|
21
21
|
return 1
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -53,7 +53,7 @@ export async function purge(options: PurgeOptions): Promise<number> {
|
|
|
53
53
|
`${result.navigation} navigation item(s).`,
|
|
54
54
|
)
|
|
55
55
|
options.log('')
|
|
56
|
-
options.log('Now take it out of
|
|
56
|
+
options.log('Now take it out of meith.plugins.ts, pnpm remove it, and redeploy.')
|
|
57
57
|
|
|
58
58
|
return 0
|
|
59
59
|
}
|
package/src/upgrade.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { type PluginDefinition, pluginNavigationPlacements } from '@meith/plugin
|
|
|
11
11
|
import { runPluginLifecycle } from '@meith/runtime'
|
|
12
12
|
import { type PluginUpgrade, planUpgrade, upgradeNotice } from '@meith/upgrade'
|
|
13
13
|
|
|
14
|
-
export const CODE_VERSION = '0.
|
|
14
|
+
export const CODE_VERSION = '0.26.0'
|
|
15
15
|
|
|
16
16
|
export function pluginUpgrades(plugins: readonly PluginDefinition[]): readonly PluginUpgrade[] {
|
|
17
17
|
return plugins.map((plugin) => ({
|