@flarum/cli 3.0.12 → 3.0.13

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.
Files changed (66) hide show
  1. package/README.md +33 -1
  2. package/boilerplate/skeleton/extension/composer.json +4 -0
  3. package/boilerplate/skeleton/extension/js/package.json +4 -4
  4. package/boilerplate/skeleton/extension/js/tsconfig.json +3 -0
  5. package/boilerplate/skeleton/extension/js/tsconfig.test.json +1 -0
  6. package/boilerplate/stubs/backend/advanced-api-resource.php +3 -3
  7. package/boilerplate/stubs/backend/model-factory.php +17 -0
  8. package/boilerplate/stubs/backend/model.php +3 -0
  9. package/lib/base-command.d.ts +21 -3
  10. package/lib/base-command.js +52 -5
  11. package/lib/commands/make/backend/model.js +10 -0
  12. package/lib/commands/upgrade/2.0.d.ts +43 -0
  13. package/lib/commands/upgrade/2.0.js +128 -2
  14. package/lib/steps/gen-ext-scaffolder.d.ts +5 -0
  15. package/lib/steps/gen-ext-scaffolder.js +17 -2
  16. package/lib/steps/stubs/backend/advanced-api-resource.js +1 -1
  17. package/lib/steps/stubs/backend/model-factory.d.ts +24 -0
  18. package/lib/steps/stubs/backend/model-factory.js +33 -0
  19. package/lib/steps/upgrade/twopointoh/backend/email-views.js +22 -30
  20. package/lib/steps/upgrade/twopointoh/backend/extension-models.d.ts +30 -0
  21. package/lib/steps/upgrade/twopointoh/backend/extension-models.js +34 -0
  22. package/lib/steps/upgrade/twopointoh/backend/json-api.d.ts +6 -0
  23. package/lib/steps/upgrade/twopointoh/backend/json-api.js +14 -0
  24. package/lib/steps/upgrade/twopointoh/backend/misc.d.ts +6 -0
  25. package/lib/steps/upgrade/twopointoh/backend/misc.js +19 -7
  26. package/lib/steps/upgrade/twopointoh/backend/model-factories.d.ts +18 -0
  27. package/lib/steps/upgrade/twopointoh/backend/model-factories.js +73 -0
  28. package/lib/steps/upgrade/twopointoh/backend/phpunit.d.ts +2 -0
  29. package/lib/steps/upgrade/twopointoh/backend/phpunit.js +16 -8
  30. package/lib/steps/upgrade/twopointoh/backend/search.d.ts +9 -0
  31. package/lib/steps/upgrade/twopointoh/backend/search.js +28 -10
  32. package/lib/steps/upgrade/twopointoh/base.d.ts +38 -0
  33. package/lib/steps/upgrade/twopointoh/base.js +73 -12
  34. package/lib/steps/upgrade/twopointoh/dependencies.d.ts +58 -1
  35. package/lib/steps/upgrade/twopointoh/dependencies.js +342 -19
  36. package/lib/steps/upgrade/twopointoh/frontend/admin-extender.d.ts +86 -0
  37. package/lib/steps/upgrade/twopointoh/frontend/admin-extender.js +842 -0
  38. package/lib/steps/upgrade/twopointoh/frontend/code-splitting/usage-of-lazy-modules.js +110 -18
  39. package/lib/steps/upgrade/twopointoh/frontend/export-registry/import-ext.js +13 -16
  40. package/lib/steps/upgrade/twopointoh/frontend/misc.d.ts +23 -0
  41. package/lib/steps/upgrade/twopointoh/frontend/misc.js +147 -8
  42. package/lib/steps/upgrade/twopointoh/infra.d.ts +16 -1
  43. package/lib/steps/upgrade/twopointoh/infra.js +87 -5
  44. package/lib/steps/upgrade/twopointoh/step-failures.d.ts +8 -0
  45. package/lib/steps/upgrade/twopointoh/step-failures.js +6 -0
  46. package/lib/steps/upgrade/twopointoh/todos.d.ts +22 -0
  47. package/lib/steps/upgrade/twopointoh/todos.js +57 -0
  48. package/lib/steps/upgrade/twopointoh/typescript-4-9.d.ts +12 -0
  49. package/lib/steps/upgrade/twopointoh/typescript-4-9.js +200 -0
  50. package/lib/utils/ast.js +3 -2
  51. package/lib/utils/babel-ts.d.ts +9 -0
  52. package/lib/utils/babel-ts.js +18 -0
  53. package/lib/utils/composer.d.ts +5 -0
  54. package/lib/utils/composer.js +10 -1
  55. package/lib/utils/terminal.d.ts +13 -0
  56. package/lib/utils/terminal.js +26 -0
  57. package/oclif.manifest.json +1 -1
  58. package/package.json +1 -1
  59. package/php-subsystem/index.php +12 -0
  60. package/php-subsystem/src/NodeUtil.php +19 -9
  61. package/php-subsystem/src/NodeVisitors/AddExtender.php +49 -1
  62. package/php-subsystem/src/Upgrade/TwoPointOh/JsonApi.php +2 -20
  63. package/php-subsystem/src/Upgrade/TwoPointOh/Misc.php +13 -17
  64. package/php-subsystem/src/Upgrade/TwoPointOh/ModelFactories.php +943 -0
  65. package/php-subsystem/src/Upgrade/TwoPointOh/PhpUnit.php +476 -71
  66. package/php-subsystem/src/Upgrade/TwoPointOh/Search.php +97 -13
@@ -1,3 +1,7 @@
1
+ export type Failure = {
2
+ file: string;
3
+ reason: string;
4
+ };
1
5
  /**
2
6
  * The files a single upgrade step could not transform.
3
7
  *
@@ -12,6 +16,10 @@ export declare class StepFailures {
12
16
  record(file: string, error: unknown): void;
13
17
  any(): boolean;
14
18
  count(): number;
19
+ /**
20
+ * The failures as data, for a program driving the upgrade.
21
+ */
22
+ list(): Failure[];
15
23
  /**
16
24
  * The failures, formatted for the author: which file, and why.
17
25
  */
@@ -25,6 +25,12 @@ class StepFailures {
25
25
  count() {
26
26
  return this.failures.length;
27
27
  }
28
+ /**
29
+ * The failures as data, for a program driving the upgrade.
30
+ */
31
+ list() {
32
+ return this.failures.map((failure) => (Object.assign({}, failure)));
33
+ }
28
34
  /**
29
35
  * The failures, formatted for the author: which file, and why.
30
36
  */
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The marker the upgrade leaves on code it could not change itself.
3
+ */
4
+ export declare const TODO_MARKER = "@TODO";
5
+ export type Todo = {
6
+ file: string;
7
+ /** Null for work a step leaves without a @TODO comment in the file to show for it. */
8
+ line: number | null;
9
+ text: string;
10
+ };
11
+ /**
12
+ * The TODOs a diff adds, from `git show --unified=0`.
13
+ *
14
+ * A line that is only reformatted or moved shows up as removed and added
15
+ * again. When the same text was removed from the file, the TODO isn't new, so
16
+ * an extension's own TODOs aren't reported as work the upgrade left.
17
+ */
18
+ export declare function todosInDiff(diff: string): Todo[];
19
+ /**
20
+ * The TODOs a commit added.
21
+ */
22
+ export declare function todosAddedBy(dir: string, commit: string): Promise<Todo[]>;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.todosAddedBy = exports.todosInDiff = exports.TODO_MARKER = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const simple_git_1 = tslib_1.__importDefault(require("simple-git"));
6
+ /**
7
+ * The marker the upgrade leaves on code it could not change itself.
8
+ */
9
+ exports.TODO_MARKER = '@TODO';
10
+ /**
11
+ * The TODOs a diff adds, from `git show --unified=0`.
12
+ *
13
+ * A line that is only reformatted or moved shows up as removed and added
14
+ * again. When the same text was removed from the file, the TODO isn't new, so
15
+ * an extension's own TODOs aren't reported as work the upgrade left.
16
+ */
17
+ function todosInDiff(diff) {
18
+ var _a;
19
+ const added = [];
20
+ const removed = new Map();
21
+ let file = null;
22
+ let line = 0;
23
+ for (const row of diff.split('\n')) {
24
+ if (row.startsWith('+++ ')) {
25
+ file = row === '+++ /dev/null' ? null : row.slice(4).replace(/^b\//, '');
26
+ continue;
27
+ }
28
+ if (row.startsWith('--- '))
29
+ continue;
30
+ const hunk = row.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/);
31
+ if (hunk) {
32
+ line = Number(hunk[1]);
33
+ continue;
34
+ }
35
+ if (file === null)
36
+ continue;
37
+ if (row.startsWith('+')) {
38
+ if (row.includes(exports.TODO_MARKER)) {
39
+ added.push({ file, line, text: row.slice(1).trim() });
40
+ }
41
+ line++;
42
+ }
43
+ else if (row.startsWith('-')) {
44
+ removed.set(file, [...((_a = removed.get(file)) !== null && _a !== void 0 ? _a : []), row.slice(1).trim()]);
45
+ }
46
+ }
47
+ return added.filter((todo) => { var _a; return !((_a = removed.get(todo.file)) === null || _a === void 0 ? void 0 : _a.includes(todo.text)); });
48
+ }
49
+ exports.todosInDiff = todosInDiff;
50
+ /**
51
+ * The TODOs a commit added.
52
+ */
53
+ async function todosAddedBy(dir, commit) {
54
+ const diff = await (0, simple_git_1.default)(dir).show([commit, '--format=', '--unified=0', '--no-color', '--no-ext-diff', '--no-renames']);
55
+ return todosInDiff(diff);
56
+ }
57
+ exports.todosAddedBy = todosAddedBy;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The compiler options TypeScript 4.9 knows, which Flarum 2.0 builds with, and
3
+ * the values it accepts for those that take one of a set. A tsconfig.json has
4
+ * to spell an option exactly so; its values may be in any case, so they are
5
+ * listed lowercase.
6
+ *
7
+ * Generated from typescript@4.9.5: `ts.optionDeclarations`, each name mapped
8
+ * to true, or to the keys of its type when that is a Map; the libs are the
9
+ * keys of the `lib` option's element type.
10
+ */
11
+ export declare const compilerOptions: Record<string, true | string[]>;
12
+ export declare const libs: string[];
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.libs = exports.compilerOptions = void 0;
4
+ /**
5
+ * The compiler options TypeScript 4.9 knows, which Flarum 2.0 builds with, and
6
+ * the values it accepts for those that take one of a set. A tsconfig.json has
7
+ * to spell an option exactly so; its values may be in any case, so they are
8
+ * listed lowercase.
9
+ *
10
+ * Generated from typescript@4.9.5: `ts.optionDeclarations`, each name mapped
11
+ * to true, or to the keys of its type when that is a Map; the libs are the
12
+ * keys of the `lib` option's element type.
13
+ */
14
+ exports.compilerOptions = {
15
+ all: true,
16
+ allowJs: true,
17
+ allowSyntheticDefaultImports: true,
18
+ allowUmdGlobalAccess: true,
19
+ allowUnreachableCode: true,
20
+ allowUnusedLabels: true,
21
+ alwaysStrict: true,
22
+ assumeChangesOnlyAffectDirectDependencies: true,
23
+ baseUrl: true,
24
+ build: true,
25
+ charset: true,
26
+ checkJs: true,
27
+ composite: true,
28
+ declaration: true,
29
+ declarationDir: true,
30
+ declarationMap: true,
31
+ diagnostics: true,
32
+ disableReferencedProjectLoad: true,
33
+ disableSizeLimit: true,
34
+ disableSolutionSearching: true,
35
+ disableSourceOfProjectReferenceRedirect: true,
36
+ downlevelIteration: true,
37
+ emitBOM: true,
38
+ emitDeclarationOnly: true,
39
+ emitDecoratorMetadata: true,
40
+ esModuleInterop: true,
41
+ exactOptionalPropertyTypes: true,
42
+ experimentalDecorators: true,
43
+ explainFiles: true,
44
+ extendedDiagnostics: true,
45
+ forceConsistentCasingInFileNames: true,
46
+ generateCpuProfile: true,
47
+ generateTrace: true,
48
+ help: true,
49
+ ignoreDeprecations: true,
50
+ importHelpers: true,
51
+ importsNotUsedAsValues: ['error', 'preserve', 'remove'],
52
+ incremental: true,
53
+ init: true,
54
+ inlineSourceMap: true,
55
+ inlineSources: true,
56
+ isolatedModules: true,
57
+ jsx: ['preserve', 'react', 'react-jsx', 'react-jsxdev', 'react-native'],
58
+ jsxFactory: true,
59
+ jsxFragmentFactory: true,
60
+ jsxImportSource: true,
61
+ keyofStringsOnly: true,
62
+ lib: true,
63
+ listEmittedFiles: true,
64
+ listFiles: true,
65
+ listFilesOnly: true,
66
+ locale: true,
67
+ mapRoot: true,
68
+ maxNodeModuleJsDepth: true,
69
+ module: ['amd', 'commonjs', 'es2015', 'es2020', 'es2022', 'es6', 'esnext', 'node16', 'nodenext', 'none', 'system', 'umd'],
70
+ moduleDetection: ['auto', 'force', 'legacy'],
71
+ moduleResolution: ['classic', 'node', 'node16', 'nodenext'],
72
+ moduleSuffixes: true,
73
+ newLine: ['crlf', 'lf'],
74
+ noEmit: true,
75
+ noEmitHelpers: true,
76
+ noEmitOnError: true,
77
+ noErrorTruncation: true,
78
+ noFallthroughCasesInSwitch: true,
79
+ noImplicitAny: true,
80
+ noImplicitOverride: true,
81
+ noImplicitReturns: true,
82
+ noImplicitThis: true,
83
+ noImplicitUseStrict: true,
84
+ noLib: true,
85
+ noPropertyAccessFromIndexSignature: true,
86
+ noResolve: true,
87
+ noStrictGenericChecks: true,
88
+ noUncheckedIndexedAccess: true,
89
+ noUnusedLocals: true,
90
+ noUnusedParameters: true,
91
+ out: true,
92
+ outDir: true,
93
+ outFile: true,
94
+ paths: true,
95
+ plugins: true,
96
+ preserveConstEnums: true,
97
+ preserveSymlinks: true,
98
+ preserveValueImports: true,
99
+ preserveWatchOutput: true,
100
+ pretty: true,
101
+ project: true,
102
+ reactNamespace: true,
103
+ removeComments: true,
104
+ resolveJsonModule: true,
105
+ rootDir: true,
106
+ rootDirs: true,
107
+ showConfig: true,
108
+ skipDefaultLibCheck: true,
109
+ skipLibCheck: true,
110
+ sourceMap: true,
111
+ sourceRoot: true,
112
+ strict: true,
113
+ strictBindCallApply: true,
114
+ strictFunctionTypes: true,
115
+ strictNullChecks: true,
116
+ strictPropertyInitialization: true,
117
+ stripInternal: true,
118
+ suppressExcessPropertyErrors: true,
119
+ suppressImplicitAnyIndexErrors: true,
120
+ target: ['es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es3', 'es5', 'es6', 'esnext'],
121
+ traceResolution: true,
122
+ tsBuildInfoFile: true,
123
+ typeRoots: true,
124
+ types: true,
125
+ useDefineForClassFields: true,
126
+ useUnknownInCatchVariables: true,
127
+ version: true,
128
+ watch: true,
129
+ };
130
+ exports.libs = [
131
+ 'dom',
132
+ 'dom.iterable',
133
+ 'es2015',
134
+ 'es2015.collection',
135
+ 'es2015.core',
136
+ 'es2015.generator',
137
+ 'es2015.iterable',
138
+ 'es2015.promise',
139
+ 'es2015.proxy',
140
+ 'es2015.reflect',
141
+ 'es2015.symbol',
142
+ 'es2015.symbol.wellknown',
143
+ 'es2016',
144
+ 'es2016.array.include',
145
+ 'es2017',
146
+ 'es2017.intl',
147
+ 'es2017.object',
148
+ 'es2017.sharedmemory',
149
+ 'es2017.string',
150
+ 'es2017.typedarrays',
151
+ 'es2018',
152
+ 'es2018.asyncgenerator',
153
+ 'es2018.asynciterable',
154
+ 'es2018.intl',
155
+ 'es2018.promise',
156
+ 'es2018.regexp',
157
+ 'es2019',
158
+ 'es2019.array',
159
+ 'es2019.intl',
160
+ 'es2019.object',
161
+ 'es2019.string',
162
+ 'es2019.symbol',
163
+ 'es2020',
164
+ 'es2020.bigint',
165
+ 'es2020.date',
166
+ 'es2020.intl',
167
+ 'es2020.number',
168
+ 'es2020.promise',
169
+ 'es2020.sharedmemory',
170
+ 'es2020.string',
171
+ 'es2020.symbol.wellknown',
172
+ 'es2021',
173
+ 'es2021.intl',
174
+ 'es2021.promise',
175
+ 'es2021.string',
176
+ 'es2021.weakref',
177
+ 'es2022',
178
+ 'es2022.array',
179
+ 'es2022.error',
180
+ 'es2022.intl',
181
+ 'es2022.object',
182
+ 'es2022.sharedmemory',
183
+ 'es2022.string',
184
+ 'es5',
185
+ 'es6',
186
+ 'es7',
187
+ 'esnext',
188
+ 'esnext.array',
189
+ 'esnext.asynciterable',
190
+ 'esnext.bigint',
191
+ 'esnext.intl',
192
+ 'esnext.promise',
193
+ 'esnext.string',
194
+ 'esnext.symbol',
195
+ 'esnext.weakref',
196
+ 'scripthost',
197
+ 'webworker',
198
+ 'webworker.importscripts',
199
+ 'webworker.iterable',
200
+ ];
package/lib/utils/ast.js CHANGED
@@ -9,16 +9,17 @@ const prettierrc_json_1 = tslib_1.__importDefault(require("@flarum/prettier-conf
9
9
  // import { parse } from '@babel/parser';
10
10
  // import generate from '@babel/generator';
11
11
  const recast = tslib_1.__importStar(require("recast"));
12
+ const babelTs = tslib_1.__importStar(require("./babel-ts"));
12
13
  function parseCode(code) {
13
14
  return recast.parse(code, {
14
- parser: require('recast/parsers/babel-ts'),
15
+ parser: babelTs,
15
16
  });
16
17
  }
17
18
  exports.parseCode = parseCode;
18
19
  async function generateCode(ast, extenders = false) {
19
20
  // @ts-ignore
20
21
  const generatedCode = recast.print(ast, {
21
- parser: require('recast/parsers/babel-ts'),
22
+ parser: babelTs,
22
23
  }).code;
23
24
  // Format the code
24
25
  return formatCode(generatedCode, extenders);
@@ -0,0 +1,9 @@
1
+ import { ParseResult } from '@babel/parser';
2
+ import * as t from '@babel/types';
3
+ /**
4
+ * Recast's babel-ts parser, which also accepts an export of a name it can't see
5
+ * declared, as Prettier does. Babel reports one for every `export { name }` in
6
+ * an ambient `declare module` block, which is valid TypeScript. The upgrade
7
+ * rewrites code rather than checking it: the extension's own build does that.
8
+ */
9
+ export declare function parse(source: string): ParseResult<t.File>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parse = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const parser_1 = require("@babel/parser");
6
+ const _babel_options_1 = tslib_1.__importDefault(require("recast/parsers/_babel_options"));
7
+ /**
8
+ * Recast's babel-ts parser, which also accepts an export of a name it can't see
9
+ * declared, as Prettier does. Babel reports one for every `export { name }` in
10
+ * an ambient `declare module` block, which is valid TypeScript. The upgrade
11
+ * rewrites code rather than checking it: the extension's own build does that.
12
+ */
13
+ function parse(source) {
14
+ const options = (0, _babel_options_1.default)();
15
+ options.plugins.push('jsx', 'typescript');
16
+ return (0, parser_1.parse)(source, Object.assign(Object.assign({}, options), { allowUndeclaredExports: true }));
17
+ }
18
+ exports.parse = parse;
@@ -63,3 +63,8 @@ export type ComposerJsonSchema = {
63
63
  };
64
64
  };
65
65
  export declare function getComposerJson(fs: Store, paths: Paths): ComposerJsonSchema;
66
+ /**
67
+ * An extension's ID, from its package name, as core makes it: `vendor-package`,
68
+ * without a `flarum-ext-` or `flarum-` in the package's part.
69
+ */
70
+ export declare function extensionId(packageName: string): string;
@@ -1,8 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getComposerJson = void 0;
3
+ exports.extensionId = exports.getComposerJson = void 0;
4
4
  const mem_fs_editor_1 = require("mem-fs-editor");
5
5
  function getComposerJson(fs, paths) {
6
6
  return (0, mem_fs_editor_1.create)(fs).readJSON(paths.package('composer.json'));
7
7
  }
8
8
  exports.getComposerJson = getComposerJson;
9
+ /**
10
+ * An extension's ID, from its package name, as core makes it: `vendor-package`,
11
+ * without a `flarum-ext-` or `flarum-` in the package's part.
12
+ */
13
+ function extensionId(packageName) {
14
+ const [vendor, pkg] = packageName.includes('/') ? packageName.split('/', 2) : [packageName, packageName];
15
+ return `${vendor}-${pkg.replace(/flarum-ext-/g, '').replace(/flarum-/g, '')}`;
16
+ }
17
+ exports.extensionId = extensionId;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Whether output goes to a terminal, rather than to a file or another program.
3
+ */
4
+ export declare function isTerminal(): boolean;
5
+ /**
6
+ * Moves the cursor up a line, so the next one overwrites it. Only in a
7
+ * terminal: anywhere else the escape code is noise.
8
+ */
9
+ export declare function overwrite(): string;
10
+ /**
11
+ * The text without colours or cursor movement.
12
+ */
13
+ export declare function stripAnsi(text: string): string;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripAnsi = exports.overwrite = exports.isTerminal = void 0;
4
+ /**
5
+ * Whether output goes to a terminal, rather than to a file or another program.
6
+ */
7
+ function isTerminal() {
8
+ return Boolean(process.stdout.isTTY);
9
+ }
10
+ exports.isTerminal = isTerminal;
11
+ /**
12
+ * Moves the cursor up a line, so the next one overwrites it. Only in a
13
+ * terminal: anywhere else the escape code is noise.
14
+ */
15
+ function overwrite() {
16
+ return isTerminal() ? '\u001B[A' : '';
17
+ }
18
+ exports.overwrite = overwrite;
19
+ /**
20
+ * The text without colours or cursor movement.
21
+ */
22
+ function stripAnsi(text) {
23
+ // eslint-disable-next-line no-control-regex
24
+ return text.replace(/\u001B\[[\d;]*[A-Za-z]/g, '');
25
+ }
26
+ exports.stripAnsi = stripAnsi;
@@ -1 +1 @@
1
- {"version":"3.0.12","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","admin","forum","js","jsCommon","css","locale","gitConf","githubActions","prettier","typescript","bundlewatch","frontendTesting","backendTesting","phpstan","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?"}]},"flarum:change":{"id":"flarum:change","description":"Related Flarum version information.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"flarum:info":{"id":"flarum:info","description":"Related Flarum version information.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"make:locale":{"id":"make:locale","description":"Generate new locale key value pair.","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":"key","description":"The nested key of the locale (e.g. `forum.custom_modal.title`).","required":false},{"name":"value","description":"The value of the locale.","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:model":{"id":"make: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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:notification":{"id":"make:notification","description":"Generate a new notification","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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:post-type":{"id":"make:post-type","description":"Generate a new post type","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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"monorepo:create":{"id":"monorepo:create","description":"Create a monorepo of Flarum extensions.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","char":"c","required":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?"}]},"monorepo:split":{"id":"monorepo:split","description":"Split monorepo changes into subrepos.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","required":false,"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?"}]},"upgrade:2.0":{"id":"upgrade:2.0","description":"Upgrade an extension to Flarum 2.0","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},"step":{"name":"step","type":"option","description":"Optionally specify a specific step to run","required":false},"force-steps":{"name":"force-steps","type":"boolean","description":"Force run steps even if already ran","required":false,"allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-resource":{"id":"make:backend:api-resource","description":"Generate an API resource 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:controller":{"id":"make:backend:controller","description":"Generate a 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":"className","description":"The name of the class to generate","required":false},{"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:filter":{"id":"make:backend:filter","description":"Generate a filter 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":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:mail-driver":{"id":"make:backend:mail-driver","description":"Generate a mail driver 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:middleware":{"id":"make:backend:middleware","description":"Generate a middleware","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":"name","description":"The name of the migration","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:notification-blueprint":{"id":"make:backend:notification-blueprint","description":"Generate a notification blueprint 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:notification-driver":{"id":"make:backend:notification-driver","description":"Generate a notification driver 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":"className","description":"The name of the class to generate","required":false},{"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:post-type":{"id":"make:backend:post-type","description":"Generate a new backend post type 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":"className","description":"The name of the class to generate","required":false},{"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:search-driver":{"id":"make:backend:search-driver","description":"Generate a search driver","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":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"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":"frontend","description":"The frontend name","required":false},{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:forum-page":{"id":"make:frontend:forum-page","description":"Generate a forum page 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":"className","description":"The name of the class to generate","required":false},{"name":"routeName","description":"Route name (unique)","required":false},{"name":"routePath","description":"Route path","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:gambit":{"id":"make:frontend:gambit","description":"Generate a frontend gambit 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: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":"frontend","description":"The frontend name","required":false},{"name":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:notification":{"id":"make:frontend:notification","description":"Generate a frontend notification 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:post-type":{"id":"make:frontend:post-type","description":"Generate a frontend post type 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]}}}
1
+ {"version":"3.0.13","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","admin","forum","js","jsCommon","css","locale","gitConf","githubActions","prettier","typescript","bundlewatch","frontendTesting","backendTesting","phpstan","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?"}]},"flarum:change":{"id":"flarum:change","description":"Related Flarum version information.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"flarum:info":{"id":"flarum:info","description":"Related Flarum version information.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"make:locale":{"id":"make:locale","description":"Generate new locale key value pair.","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":"key","description":"The nested key of the locale (e.g. `forum.custom_modal.title`).","required":false},{"name":"value","description":"The value of the locale.","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:model":{"id":"make: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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:notification":{"id":"make:notification","description":"Generate a new notification","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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:post-type":{"id":"make:post-type","description":"Generate a new post type","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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"monorepo:create":{"id":"monorepo:create","description":"Create a monorepo of Flarum extensions.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","char":"c","required":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?"}]},"monorepo:split":{"id":"monorepo:split","description":"Split monorepo changes into subrepos.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"f","required":false,"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?"}]},"upgrade:2.0":{"id":"upgrade:2.0","description":"Upgrade an extension to Flarum 2.0","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"Report each step's outcome, failures, notes and the @TODOs it left as JSON, for a program driving the upgrade. Implies --no-interaction.","required":false,"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},"step":{"name":"step","type":"option","description":"Optionally specify a specific step to run","required":false},"force-steps":{"name":"force-steps","type":"boolean","description":"Force run steps even if already ran","required":false,"allowNo":false},"check":{"name":"check","type":"boolean","description":"Report what the upgrade would change, such as on an extension already on Flarum 2.0, without changing it: the steps run on the last commit, in a temporary git worktree that is removed afterwards. Implies --force-steps and --no-interaction.","required":false,"allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-resource":{"id":"make:backend:api-resource","description":"Generate an API resource 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:controller":{"id":"make:backend:controller","description":"Generate a 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":"className","description":"The name of the class to generate","required":false},{"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:filter":{"id":"make:backend:filter","description":"Generate a filter 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":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:mail-driver":{"id":"make:backend:mail-driver","description":"Generate a mail driver 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:middleware":{"id":"make:backend:middleware","description":"Generate a middleware","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":"name","description":"The name of the migration","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:notification-blueprint":{"id":"make:backend:notification-blueprint","description":"Generate a notification blueprint 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:backend:notification-driver":{"id":"make:backend:notification-driver","description":"Generate a notification driver 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":"className","description":"The name of the class to generate","required":false},{"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:post-type":{"id":"make:backend:post-type","description":"Generate a new backend post type 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":"className","description":"The name of the class to generate","required":false},{"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:search-driver":{"id":"make:backend:search-driver","description":"Generate a search driver","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":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"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":"frontend","description":"The frontend name","required":false},{"name":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:forum-page":{"id":"make:frontend:forum-page","description":"Generate a forum page 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":"className","description":"The name of the class to generate","required":false},{"name":"routeName","description":"Route name (unique)","required":false},{"name":"routePath","description":"Route path","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:gambit":{"id":"make:frontend:gambit","description":"Generate a frontend gambit 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: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":"frontend","description":"The frontend name","required":false},{"name":"className","description":"The name of the class to generate","required":false},{"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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:notification":{"id":"make:frontend:notification","description":"Generate a frontend notification 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:post-type":{"id":"make:frontend:post-type","description":"Generate a frontend post type 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":"className","description":"The name of the class to generate","required":false},{"name":"path","description":"Where should this command be executed?"}]}}}