@flarum/cli 2.0.0-beta.1 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/steps/js/base.js +3 -2
- package/lib/steps/update/js-imports.js +4 -3
- package/oclif.manifest.json +1 -1
- package/package.json +4 -7
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.2 linux-x64 node-v16.13.0
|
|
41
41
|
$ flarum-cli --help [COMMAND]
|
|
42
42
|
USAGE
|
|
43
43
|
$ flarum-cli COMMAND
|
package/lib/steps/js/base.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseJsStep = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const globby_1 = (0, tslib_1.__importDefault)(require("globby"));
|
|
5
6
|
const mem_fs_editor_1 = require("mem-fs-editor");
|
|
6
7
|
const IMPORTS_REGEX = /((^import\s+(?:([\s\w*,{}]+)\s+from)?\s*["']?([\s\w./@\\-]+)\3?["']?\s*;?\s*)*)(.*)/m;
|
|
7
8
|
const INIT_REGEX = /^(app\.initializers\.add\('[^']+',\s*\(\)\s*=>\s*{)$/m;
|
|
@@ -18,7 +19,7 @@ class BaseJsStep {
|
|
|
18
19
|
frontends = ['admin', 'forum'];
|
|
19
20
|
}
|
|
20
21
|
for (const frontend of frontends) {
|
|
21
|
-
const fsSrcFilePaths =
|
|
22
|
+
const fsSrcFilePaths = globby_1.default.sync(paths.package(`js/src/${frontend}/*.{js,jsx,ts,tsx}`));
|
|
22
23
|
fsSrcFilePaths.forEach(async (match) => {
|
|
23
24
|
/**
|
|
24
25
|
* @TODO look into using https://esprima.org/ instead
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateJSImports = void 0;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const globby_1 = (0, tslib_1.__importDefault)(require("globby"));
|
|
5
6
|
const mem_fs_editor_1 = require("mem-fs-editor");
|
|
6
7
|
const CORE_JS_NAMESPACES = ['admin', 'common', 'forum'];
|
|
7
8
|
const CORE_NAMESPACE_REGEX = new RegExp(`^(${CORE_JS_NAMESPACES.join('|')})/`);
|
|
@@ -18,7 +19,7 @@ class UpdateJSImports {
|
|
|
18
19
|
const jsSrcDir = paths.package('vendor/flarum/core/js/src');
|
|
19
20
|
const vendorRegex = new RegExp(`${jsSrcDir}/.*(js|jsx|ts|tsx)`);
|
|
20
21
|
const fsVendorFilePaths = fs.all().map(file => file.path).filter(path => path && vendorRegex.test(path));
|
|
21
|
-
const persistedVendorFilePaths =
|
|
22
|
+
const persistedVendorFilePaths = globby_1.default.sync(`${jsSrcDir}/**/*.{js,jsx,ts,tsx}`);
|
|
22
23
|
for (const currPath of [...fsVendorFilePaths, ...persistedVendorFilePaths]) {
|
|
23
24
|
const withNamespace = currPath.slice(jsSrcDir.length + 1).replace(/\.(js|jsx|ts|tsx)$/, '');
|
|
24
25
|
const noNamespace = withNamespace.replace(CORE_NAMESPACE_REGEX, '');
|
|
@@ -26,7 +27,7 @@ class UpdateJSImports {
|
|
|
26
27
|
}
|
|
27
28
|
const srcRegex = new RegExp(`${paths.package('js/src')}/.*(js|jsx|ts|tsx)`);
|
|
28
29
|
const fsSrcFilePaths = fs.all().map(file => file.path).filter(path => path && srcRegex.test(path));
|
|
29
|
-
const persistedSrcFilePaths =
|
|
30
|
+
const persistedSrcFilePaths = globby_1.default.sync(paths.package('js/src/**/*.{js,jsx,ts,tsx}'));
|
|
30
31
|
for (const match of [...fsSrcFilePaths, ...persistedSrcFilePaths]) {
|
|
31
32
|
let fileCounted = false;
|
|
32
33
|
const currContents = fsEditor.read(match);
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.0.0-beta.1","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},"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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},"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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.2","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},"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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},"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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":{"defaults":{"name":"defaults","type":"boolean","char":"d","description":"Assume default responses to prompts where possible.","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?"}]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flarum/cli",
|
|
3
3
|
"description": "A CLI for developing Flarum extensions",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.2",
|
|
5
5
|
"author": "Flarum Team",
|
|
6
6
|
"bin": {
|
|
7
7
|
"fl": "bin/run",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"bugs": "https://github.com/flarum/cli/issues",
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@babel/core": "^7",
|
|
12
|
+
"@babel/core": "^7.0.0",
|
|
13
|
+
"@babel/preset-env": "^7.14.2",
|
|
13
14
|
"@oclif/dev-cli": "^1.26.0",
|
|
14
15
|
"@oclif/test": "^1.2.8",
|
|
15
16
|
"@types/chai": "^4.2.20",
|
|
@@ -32,7 +33,6 @@
|
|
|
32
33
|
"eslint-import-resolver-babel-module": "^5.3.1",
|
|
33
34
|
"eslint-import-resolver-typescript": "^2.5.0",
|
|
34
35
|
"eslint-plugin-import": "^2.25.3",
|
|
35
|
-
"globby": "^10.0.2",
|
|
36
36
|
"jest": "^27.4.5",
|
|
37
37
|
"jest-extended": "^1.2.0",
|
|
38
38
|
"ts-jest": "^27.1.2",
|
|
@@ -101,7 +101,6 @@
|
|
|
101
101
|
},
|
|
102
102
|
"types": "lib/index.d.ts",
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"@babel/preset-env": "^7.14.2",
|
|
105
104
|
"@oclif/core": "^1.0.11",
|
|
106
105
|
"@oclif/errors": "^1.3.5",
|
|
107
106
|
"@oclif/plugin-help": "^5",
|
|
@@ -110,11 +109,9 @@
|
|
|
110
109
|
"chalk": "^2.4.2",
|
|
111
110
|
"cli-ux": "^6.0.6",
|
|
112
111
|
"ejs": "^3.1.6",
|
|
113
|
-
"
|
|
114
|
-
"just-safe-get": "^2.1.2",
|
|
112
|
+
"globby": "^10.0.2",
|
|
115
113
|
"mem-fs": "^2.2.1",
|
|
116
114
|
"mem-fs-editor": "^8.0.0",
|
|
117
|
-
"modern-async": "^1.0.2",
|
|
118
115
|
"module-alias": "^2.2.2",
|
|
119
116
|
"pick-deep": "^1.0.0",
|
|
120
117
|
"pluralize": "^8.0.0",
|