@flarum/cli 2.0.0-beta.10 → 2.0.0-beta.11
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/README.md +1 -1
- package/boilerplate/skeleton/extension/js/admin.ts +2 -0
- package/boilerplate/skeleton/extension/js/forum.ts +2 -0
- package/boilerplate/skeleton/extension/js/src/admin/index.ts +5 -0
- package/boilerplate/skeleton/extension/js/src/common/index.ts +5 -0
- package/boilerplate/skeleton/extension/js/src/forum/index.ts +5 -0
- package/lib/boilersmith/scaffolding/module.d.ts +11 -2
- package/lib/boilersmith/scaffolding/module.js +9 -4
- package/lib/steps/gen-ext-scaffolder.js +50 -8
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ $ npm install -g @flarum/cli
|
|
|
37
37
|
$ flarum-cli COMMAND
|
|
38
38
|
running command...
|
|
39
39
|
$ flarum-cli (-v|--version|version)
|
|
40
|
-
@flarum/cli/2.0.0-beta.
|
|
40
|
+
@flarum/cli/2.0.0-beta.11 linux-x64 node-v16.13.0
|
|
41
41
|
$ flarum-cli --help [COMMAND]
|
|
42
42
|
USAGE
|
|
43
43
|
$ flarum-cli COMMAND
|
|
@@ -11,9 +11,12 @@ interface FileOwnership {
|
|
|
11
11
|
*/
|
|
12
12
|
destPath?: string;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Depends on other modules being enabled (or disabled).
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
moduleDeps?: (string | {
|
|
17
|
+
module: string;
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
})[];
|
|
17
20
|
/**
|
|
18
21
|
* If in a monorepo, should the file be placed relative to the monorepo root, and if so, where?
|
|
19
22
|
* If provided, takes priority over destPath.
|
|
@@ -60,6 +63,12 @@ interface TogglableModule<N extends string> extends CommonModule<N> {
|
|
|
60
63
|
* Can only be enabled if these other modules are enabled.
|
|
61
64
|
*/
|
|
62
65
|
dependsOn: string[];
|
|
66
|
+
/**
|
|
67
|
+
* On an existing installation, if no information about whether this
|
|
68
|
+
* module is enabled or disabled is cached, infer whether it's enabled
|
|
69
|
+
* based on the current installation's state.
|
|
70
|
+
*/
|
|
71
|
+
inferEnabled?: (fs: Store, paths: Paths) => Promise<boolean | undefined>;
|
|
63
72
|
}
|
|
64
73
|
export declare type Module<N extends string = string> = UntoggleableModule<N> | TogglableModule<N>;
|
|
65
74
|
export declare type ModuleStatusCache<N extends string> = {
|
|
@@ -43,12 +43,13 @@ async function promptModulesEnabled(modules, io) {
|
|
|
43
43
|
}
|
|
44
44
|
exports.promptModulesEnabled = promptModulesEnabled;
|
|
45
45
|
async function currModulesEnabled(modules, fs, paths, cache) {
|
|
46
|
+
var _a, _b;
|
|
46
47
|
const modulesEnabled = {};
|
|
47
48
|
for (const m of modules) {
|
|
48
49
|
if (m.togglable) {
|
|
49
50
|
// eslint-disable-next-line no-await-in-loop
|
|
50
|
-
const
|
|
51
|
-
modulesEnabled[m.name] =
|
|
51
|
+
const isEnabled = (_a = await (cache === null || cache === void 0 ? void 0 : cache.get(m, fs, paths))) !== null && _a !== void 0 ? _a : await ((_b = m.inferEnabled) === null || _b === void 0 ? void 0 : _b.call(m, fs, paths));
|
|
52
|
+
modulesEnabled[m.name] = isEnabled !== null && isEnabled !== void 0 ? isEnabled : m.defaultEnabled;
|
|
52
53
|
}
|
|
53
54
|
else {
|
|
54
55
|
modulesEnabled[m.name] = true;
|
|
@@ -91,8 +92,12 @@ async function applyModule(module, modulesEnabled, paramVals, scaffoldDir, fs, p
|
|
|
91
92
|
const tplDataFlat = Object.assign(Object.assign({}, (0, rename_keys_1.renameKeys)(tplData.modules, k => `modules.${k}`)), (0, rename_keys_1.renameKeys)(tplData.params, k => `params.${k}`));
|
|
92
93
|
for (const file of module.filesToReplace) {
|
|
93
94
|
const path = typeof file === 'string' ? file : file.path;
|
|
94
|
-
const
|
|
95
|
-
if (!excludeFiles.includes(path) && !
|
|
95
|
+
const moduleDeps = typeof file === 'string' ? [] : (_a = file.moduleDeps) !== null && _a !== void 0 ? _a : [];
|
|
96
|
+
if (!excludeFiles.includes(path) && !moduleDeps.some(dep => {
|
|
97
|
+
const depName = typeof dep === 'string' ? dep : dep.module;
|
|
98
|
+
const enabled = modulesEnabled[depName];
|
|
99
|
+
return typeof dep === 'string' || dep.enabled ? !enabled : enabled;
|
|
100
|
+
})) {
|
|
96
101
|
const copyToIfMonorepo = typeof file !== 'string' && file.monorepoPath ? paths.monorepo((0, clone_and_fill_1.cloneAndFill)(file.monorepoPath, tplDataFlat)) : undefined;
|
|
97
102
|
const copyTo = copyToIfMonorepo !== null && copyToIfMonorepo !== void 0 ? copyToIfMonorepo : paths.package(typeof file !== 'string' && file.destPath ? (0, clone_and_fill_1.cloneAndFill)(file.destPath, tplDataFlat) : path);
|
|
98
103
|
fsEditor.copyTpl((0, node_path_1.resolve)(scaffoldDir, path), copyTo, tplData);
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const scaffolder_1 = require("boilersmith/scaffolding/scaffolder");
|
|
6
6
|
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
7
7
|
const mem_fs_editor_1 = require("mem-fs-editor");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
8
9
|
const node_path_1 = require("node:path");
|
|
9
10
|
const simple_git_1 = (0, tslib_1.__importDefault)(require("simple-git"));
|
|
10
11
|
const simple_1 = (0, tslib_1.__importDefault)(require("spdx-license-list/simple"));
|
|
@@ -226,9 +227,12 @@ function moduleNameToDef(name) {
|
|
|
226
227
|
'extend.php',
|
|
227
228
|
'README.md',
|
|
228
229
|
'LICENSE.md',
|
|
229
|
-
{ path: 'js/src/admin/index.js',
|
|
230
|
-
{ path: 'js/src/forum/index.js',
|
|
231
|
-
{ path: 'js/src/common/index.js',
|
|
230
|
+
{ path: 'js/src/admin/index.js', moduleDeps: ['js', { module: 'typescript', enabled: false }] },
|
|
231
|
+
{ path: 'js/src/forum/index.js', moduleDeps: ['js', { module: 'typescript', enabled: false }] },
|
|
232
|
+
{ path: 'js/src/common/index.js', moduleDeps: ['js', 'jsCommon', { module: 'typescript', enabled: false }] },
|
|
233
|
+
{ path: 'js/src/admin/index.ts', moduleDeps: ['js', { module: 'typescript', enabled: true }] },
|
|
234
|
+
{ path: 'js/src/forum/index.ts', moduleDeps: ['js', { module: 'typescript', enabled: true }] },
|
|
235
|
+
{ path: 'js/src/common/index.ts', moduleDeps: ['js', 'jsCommon', { module: 'typescript', enabled: true }] },
|
|
232
236
|
],
|
|
233
237
|
jsonToAugment: {
|
|
234
238
|
'composer.json': [
|
|
@@ -279,7 +283,13 @@ function moduleNameToDef(name) {
|
|
|
279
283
|
shortDescription: 'Javascript',
|
|
280
284
|
longDescription: "Files, tools, and scripts to build Flarum's frontend.",
|
|
281
285
|
dependsOn: [],
|
|
282
|
-
filesToReplace: [
|
|
286
|
+
filesToReplace: [
|
|
287
|
+
'js/webpack.config.js',
|
|
288
|
+
{ path: 'js/admin.js', moduleDeps: [{ module: 'typescript', enabled: false }] },
|
|
289
|
+
{ path: 'js/forum.js', moduleDeps: [{ module: 'typescript', enabled: false }] },
|
|
290
|
+
{ path: 'js/admin.ts', moduleDeps: [{ module: 'typescript', enabled: true }] },
|
|
291
|
+
{ path: 'js/forum.ts', moduleDeps: [{ module: 'typescript', enabled: true }] },
|
|
292
|
+
],
|
|
283
293
|
jsonToAugment: {
|
|
284
294
|
'js/package.json': [
|
|
285
295
|
'name',
|
|
@@ -293,6 +303,9 @@ function moduleNameToDef(name) {
|
|
|
293
303
|
],
|
|
294
304
|
},
|
|
295
305
|
needsTemplateParams: ['packageName'],
|
|
306
|
+
inferEnabled: async (_fs, paths) => {
|
|
307
|
+
return (0, node_fs_1.existsSync)(paths.package('js'));
|
|
308
|
+
},
|
|
296
309
|
};
|
|
297
310
|
case 'jsCommon':
|
|
298
311
|
return {
|
|
@@ -303,9 +316,17 @@ function moduleNameToDef(name) {
|
|
|
303
316
|
shortDescription: 'JS common code',
|
|
304
317
|
longDescription: 'Shared code between the forum and the admin frontends',
|
|
305
318
|
dependsOn: ['js'],
|
|
306
|
-
filesToReplace: [
|
|
319
|
+
filesToReplace: [
|
|
320
|
+
{ path: 'js/admin.js', moduleDeps: [{ module: 'typescript', enabled: false }] },
|
|
321
|
+
{ path: 'js/forum.js', moduleDeps: [{ module: 'typescript', enabled: false }] },
|
|
322
|
+
{ path: 'js/admin.ts', moduleDeps: [{ module: 'typescript', enabled: true }] },
|
|
323
|
+
{ path: 'js/forum.ts', moduleDeps: [{ module: 'typescript', enabled: true }] },
|
|
324
|
+
],
|
|
307
325
|
jsonToAugment: {},
|
|
308
326
|
needsTemplateParams: [],
|
|
327
|
+
inferEnabled: async (_fs, paths) => {
|
|
328
|
+
return (0, node_fs_1.existsSync)(paths.package('js/src/common'));
|
|
329
|
+
},
|
|
309
330
|
};
|
|
310
331
|
case 'css':
|
|
311
332
|
return {
|
|
@@ -319,6 +340,9 @@ function moduleNameToDef(name) {
|
|
|
319
340
|
filesToReplace: ['less/admin.less', 'less/forum.less'],
|
|
320
341
|
jsonToAugment: {},
|
|
321
342
|
needsTemplateParams: [],
|
|
343
|
+
inferEnabled: async (_fs, paths) => {
|
|
344
|
+
return (0, node_fs_1.existsSync)(paths.package('less'));
|
|
345
|
+
},
|
|
322
346
|
};
|
|
323
347
|
case 'locale':
|
|
324
348
|
return {
|
|
@@ -332,6 +356,9 @@ function moduleNameToDef(name) {
|
|
|
332
356
|
filesToReplace: ['locale/en.yml'],
|
|
333
357
|
jsonToAugment: {},
|
|
334
358
|
needsTemplateParams: [],
|
|
359
|
+
inferEnabled: async (_fs, paths) => {
|
|
360
|
+
return (0, node_fs_1.existsSync)(paths.package('locale'));
|
|
361
|
+
},
|
|
335
362
|
};
|
|
336
363
|
case 'gitConf':
|
|
337
364
|
return {
|
|
@@ -342,7 +369,7 @@ function moduleNameToDef(name) {
|
|
|
342
369
|
shortDescription: 'Git Configuration',
|
|
343
370
|
longDescription: 'Git config files (e.g. .gitignore, .gitattributes).',
|
|
344
371
|
dependsOn: [],
|
|
345
|
-
filesToReplace: [{ path: 'gitignore', destPath: '.gitignore' }, { path: 'js/gitignore',
|
|
372
|
+
filesToReplace: [{ path: 'gitignore', destPath: '.gitignore' }, { path: 'js/gitignore', moduleDeps: ['js'], destPath: 'js/.gitignore' }, '.gitattributes'],
|
|
346
373
|
jsonToAugment: {},
|
|
347
374
|
needsTemplateParams: [],
|
|
348
375
|
};
|
|
@@ -375,6 +402,12 @@ function moduleNameToDef(name) {
|
|
|
375
402
|
'js/package.json': ['prettier', 'devDependencies.prettier', 'devDependencies.@flarum/prettier-config', 'scripts.format', 'scripts.format-check'],
|
|
376
403
|
},
|
|
377
404
|
needsTemplateParams: [],
|
|
405
|
+
inferEnabled: async (_fs, paths) => {
|
|
406
|
+
if (!(0, node_fs_1.existsSync)(paths.package('js/package.json'))) {
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
return (0, node_fs_1.readFileSync)('js/package.json').includes('prettier');
|
|
410
|
+
},
|
|
378
411
|
};
|
|
379
412
|
case 'typescript':
|
|
380
413
|
return {
|
|
@@ -396,6 +429,9 @@ function moduleNameToDef(name) {
|
|
|
396
429
|
],
|
|
397
430
|
},
|
|
398
431
|
needsTemplateParams: [],
|
|
432
|
+
inferEnabled: async (_fs, paths) => {
|
|
433
|
+
return (0, node_fs_1.existsSync)(paths.package('js/tsconfig.json'));
|
|
434
|
+
},
|
|
399
435
|
};
|
|
400
436
|
case 'bundlewatch':
|
|
401
437
|
return {
|
|
@@ -408,6 +444,9 @@ function moduleNameToDef(name) {
|
|
|
408
444
|
filesToReplace: ['js/.bundlewatch.config.json'],
|
|
409
445
|
jsonToAugment: {},
|
|
410
446
|
needsTemplateParams: [],
|
|
447
|
+
inferEnabled: async (_fs, paths) => {
|
|
448
|
+
return (0, node_fs_1.existsSync)(paths.package('js/.bundlewatch.config.json'));
|
|
449
|
+
},
|
|
411
450
|
};
|
|
412
451
|
case 'backendTesting':
|
|
413
452
|
return {
|
|
@@ -439,6 +478,9 @@ function moduleNameToDef(name) {
|
|
|
439
478
|
],
|
|
440
479
|
},
|
|
441
480
|
needsTemplateParams: ['packageNamespaceEscapedSlash'],
|
|
481
|
+
inferEnabled: async (_fs, paths) => {
|
|
482
|
+
return (0, node_fs_1.existsSync)(paths.package('tests'));
|
|
483
|
+
},
|
|
442
484
|
};
|
|
443
485
|
case 'editorConfig':
|
|
444
486
|
return {
|
|
@@ -475,9 +517,9 @@ function genExtScaffolder() {
|
|
|
475
517
|
return cached;
|
|
476
518
|
const moduleStatusCache = {
|
|
477
519
|
get: async (module, fs, paths) => {
|
|
478
|
-
var _a, _b, _c
|
|
520
|
+
var _a, _b, _c;
|
|
479
521
|
const json = (0, composer_1.getComposerJson)(fs, paths);
|
|
480
|
-
return !module.togglable || ((
|
|
522
|
+
return !module.togglable || ((_c = (_b = (_a = json === null || json === void 0 ? void 0 : json.extra) === null || _a === void 0 ? void 0 : _a['flarum-cli']) === null || _b === void 0 ? void 0 : _b.modules) === null || _c === void 0 ? void 0 : _c[module.name]);
|
|
481
523
|
},
|
|
482
524
|
set: async (module, enabled, fs, paths) => {
|
|
483
525
|
const json = {
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.0.0-beta.10","commands":{"infra":{"id":"infra","description":"Add/Update infrastructure to the latest scaffolding for some module in an extension. For example, you can use this to add/update TypeScript, backend testing, GitHub Actions, and other features.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"module","description":"The name of the module to enable/update.","required":true,"options":["core","icon","js","jsCommon","css","locale","gitConf","githubActions","prettier","typescript","bundlewatch","backendTesting","editorConfig","styleci"]},{"name":"path","description":"Where should this command be executed?"}]},"init":{"id":"init","description":"Create a new Flarum extension","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"audit:infra":{"id":"audit:infra","description":"Check for outdated config files, infrastructure, setup, etc.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"fix":{"name":"fix","type":"boolean","char":"f","allowNo":false},"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"update:js-imports":{"id":"update:js-imports","description":"Updates JS imports from core to use proper namespaces","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-controller":{"id":"make:backend:api-controller","description":"Generate an API controller class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer-attributes":{"id":"make:backend:api-serializer-attributes","description":"Generate an API serializer attributes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer":{"id":"make:backend:api-serializer","description":"Generate an API serializer class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:command":{"id":"make:backend:command","description":"Generate a console command class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:event-listener":{"id":"make:backend:event-listener","description":"Generate an event listener class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:handler":{"id":"make:backend:handler","description":"Generate a domain logic handler class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:integration-test":{"id":"make:backend:integration-test","description":"Generate an integration test class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:job":{"id":"make:backend:job","description":"Generate a job class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:migration":{"id":"make:backend:migration","description":"Generate a migration","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:model":{"id":"make:backend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:policy":{"id":"make:backend:policy","description":"Generate a policy class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:repository":{"id":"make:backend:repository","description":"Generate a repository class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:route":{"id":"make:backend:route","description":"Generate a routes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:service-provider":{"id":"make:backend:service-provider","description":"Generate a service provider class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:validator":{"id":"make:backend:validator","description":"Generate a validator class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:component":{"id":"make:frontend:component","description":"Generate a frontend component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:modal":{"id":"make:frontend:modal","description":"Generate a modal component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:model":{"id":"make:frontend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]}}}
|
|
1
|
+
{"version":"2.0.0-beta.11","commands":{"infra":{"id":"infra","description":"Add/Update infrastructure to the latest scaffolding for some module in an extension. For example, you can use this to add/update TypeScript, backend testing, GitHub Actions, and other features.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"module","description":"The name of the module to enable/update.","required":true,"options":["core","icon","js","jsCommon","css","locale","gitConf","githubActions","prettier","typescript","bundlewatch","backendTesting","editorConfig","styleci"]},{"name":"path","description":"Where should this command be executed?"}]},"init":{"id":"init","description":"Create a new Flarum extension","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"audit:infra":{"id":"audit:infra","description":"Check for outdated config files, infrastructure, setup, etc.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"fix":{"name":"fix","type":"boolean","char":"f","allowNo":false},"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"update:js-imports":{"id":"update:js-imports","description":"Updates JS imports from core to use proper namespaces","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-controller":{"id":"make:backend:api-controller","description":"Generate an API controller class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer-attributes":{"id":"make:backend:api-serializer-attributes","description":"Generate an API serializer attributes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer":{"id":"make:backend:api-serializer","description":"Generate an API serializer class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:command":{"id":"make:backend:command","description":"Generate a console command class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:event-listener":{"id":"make:backend:event-listener","description":"Generate an event listener class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:handler":{"id":"make:backend:handler","description":"Generate a domain logic handler class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:integration-test":{"id":"make:backend:integration-test","description":"Generate an integration test class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:job":{"id":"make:backend:job","description":"Generate a job class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:migration":{"id":"make:backend:migration","description":"Generate a migration","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:model":{"id":"make:backend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:policy":{"id":"make:backend:policy","description":"Generate a policy class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:repository":{"id":"make:backend:repository","description":"Generate a repository class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:route":{"id":"make:backend:route","description":"Generate a routes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:service-provider":{"id":"make:backend:service-provider","description":"Generate a service provider class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:validator":{"id":"make:backend:validator","description":"Generate a validator class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:component":{"id":"make:frontend:component","description":"Generate a frontend component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:modal":{"id":"make:frontend:modal","description":"Generate a modal component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:model":{"id":"make:frontend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]}}}
|