@flarum/cli 2.0.0-beta.14 → 2.0.0-beta.15

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 CHANGED
@@ -51,7 +51,7 @@ $ npm install -g @flarum/cli
51
51
  $ flarum-cli COMMAND
52
52
  running command...
53
53
  $ flarum-cli (-v|--version|version)
54
- @flarum/cli/2.0.0-beta.14 linux-x64 node-v16.14.0
54
+ @flarum/cli/2.0.0-beta.15 linux-x64 node-v16.14.0
55
55
  $ flarum-cli --help [COMMAND]
56
56
  USAGE
57
57
  $ flarum-cli COMMAND
package/bin/run CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ const { resolve } = require('path');
2
3
 
3
- require('module-alias').addAlias('boilersmith', `${__dirname}/../lib/boilersmith`);
4
+ require('module-alias').addAlias('boilersmith', resolve(__dirname, '..', 'lib', 'boilersmith'));
4
5
 
5
6
  const oclif = require('@oclif/core');
6
7
 
Binary file
Binary file
@@ -4,10 +4,10 @@ exports.LocationType = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@oclif/core");
6
6
  const cli_ux_1 = (0, tslib_1.__importDefault)(require("cli-ux"));
7
- const node_path_1 = require("node:path");
7
+ const path_1 = require("path");
8
8
  const globby_1 = (0, tslib_1.__importDefault)(require("globby"));
9
- const node_child_process_1 = require("node:child_process");
10
- const node_fs_1 = require("node:fs");
9
+ const child_process_1 = require("child_process");
10
+ const fs_1 = require("fs");
11
11
  const io_1 = require("boilersmith/io");
12
12
  const step_manager_1 = require("boilersmith/step-manager");
13
13
  const paths_1 = require("boilersmith/paths");
@@ -25,7 +25,7 @@ var LocationType;
25
25
  class BaseCommand extends core_1.Command {
26
26
  constructor() {
27
27
  super(...arguments);
28
- this.STUB_PATH = (0, node_path_1.resolve)(__dirname, '../boilerplate/stubs/');
28
+ this.STUB_PATH = (0, path_1.resolve)(__dirname, '../boilerplate/stubs/');
29
29
  this.dry = false;
30
30
  this.requireExistingExtension = true;
31
31
  }
@@ -53,7 +53,7 @@ class BaseCommand extends core_1.Command {
53
53
  requestedDir: path,
54
54
  package: extRoot,
55
55
  });
56
- const phpProvider = new php_provider_1.PhpSubsystemProvider((0, node_path_1.resolve)(__dirname, '../php-subsystem/index.php'));
56
+ const phpProvider = new php_provider_1.PhpSubsystemProvider((0, path_1.resolve)(__dirname, '../php-subsystem/index.php'));
57
57
  const out = await this.steps(new step_manager_1.StepManager(), extRoot).run(paths, this.genIO(), { php: phpProvider }, this.dry);
58
58
  const errorMessages = out.messages.filter((m) => m.type === 'error');
59
59
  this.log('\n\n');
@@ -134,12 +134,12 @@ class BaseCommand extends core_1.Command {
134
134
  }
135
135
  }
136
136
  isFlarumMonorepo(path) {
137
- return (0, node_fs_1.existsSync)((0, node_path_1.resolve)(path, 'flarum-monorepo.json'));
137
+ return (0, fs_1.existsSync)((0, path_1.resolve)(path, 'flarum-monorepo.json'));
138
138
  }
139
139
  isFlarumCore(path) {
140
140
  try {
141
- const composerJsonPath = (0, node_path_1.resolve)(path, 'composer.json');
142
- const val = JSON.parse((0, node_fs_1.readFileSync)(composerJsonPath, 'utf8'));
141
+ const composerJsonPath = (0, path_1.resolve)(path, 'composer.json');
142
+ const val = JSON.parse((0, fs_1.readFileSync)(composerJsonPath, 'utf8'));
143
143
  return val.name === 'flarum/core';
144
144
  }
145
145
  catch (_a) {
@@ -147,25 +147,25 @@ class BaseCommand extends core_1.Command {
147
147
  }
148
148
  }
149
149
  jsPackageManager(currDir) {
150
- if (!(0, node_fs_1.existsSync)((0, node_path_1.resolve)(currDir, 'js')))
150
+ if (!(0, fs_1.existsSync)((0, path_1.resolve)(currDir, 'js')))
151
151
  return null;
152
- return (0, node_fs_1.existsSync)((0, node_path_1.resolve)(currDir, 'js/yarn.lock')) ? 'yarn' : 'npm';
152
+ return (0, fs_1.existsSync)((0, path_1.resolve)(currDir, 'js/yarn.lock')) ? 'yarn' : 'npm';
153
153
  }
154
154
  async getFlarumExtensionRoot(currDir) {
155
- let currPath = (0, node_path_1.resolve)(currDir);
155
+ let currPath = (0, path_1.resolve)(currDir);
156
156
  while (currPath !== '/') {
157
- if ((0, node_fs_1.existsSync)((0, node_path_1.resolve)(currPath, 'flarum-monorepo.json'))) {
157
+ if ((0, fs_1.existsSync)((0, path_1.resolve)(currPath, 'flarum-monorepo.json'))) {
158
158
  return { path: currPath, type: LocationType.FLARUM_MONOREPO };
159
159
  }
160
- if ((0, node_fs_1.existsSync)((0, node_path_1.resolve)(currPath, 'composer.json')) && (0, node_fs_1.existsSync)((0, node_path_1.resolve)(currPath, 'extend.php'))) {
160
+ if ((0, fs_1.existsSync)((0, path_1.resolve)(currPath, 'composer.json')) && (0, fs_1.existsSync)((0, path_1.resolve)(currPath, 'extend.php'))) {
161
161
  return { path: currPath, type: LocationType.FLARUM_EXTENSION };
162
162
  }
163
163
  if (this.isFlarumCore(currPath)) {
164
164
  return { path: currPath, type: LocationType.FLARUM_CORE };
165
165
  }
166
- currPath = (0, node_path_1.resolve)(currPath, '..');
166
+ currPath = (0, path_1.resolve)(currPath, '..');
167
167
  }
168
- this.error(`${(0, node_path_1.resolve)(currDir)} is not located in a valid Flarum package!
168
+ this.error(`${(0, path_1.resolve)(currDir)} is not located in a valid Flarum package!
169
169
  - Flarum extensions must contain (at a minimum) 'extend.php' and 'composer.json' files.
170
170
  - Flarum core must contain a 'composer.json' file with the name 'flarum/core'.
171
171
  - Flarum monorepos must have a valid 'flarum-monorepo.json' file`);
@@ -174,14 +174,14 @@ class BaseCommand extends core_1.Command {
174
174
  const verify = await this.genIO().getParam({
175
175
  name: 'verify',
176
176
  type: 'confirm',
177
- message: `Work in Flarum package located at ${(0, node_path_1.resolve)(extRoot)}?`,
177
+ message: `Work in Flarum package located at ${(0, path_1.resolve)(extRoot)}?`,
178
178
  initial: true,
179
179
  });
180
180
  if (!verify)
181
181
  this.exit();
182
182
  }
183
183
  async ensureComposerInstallRan(extRoot) {
184
- if ((0, node_fs_1.existsSync)((0, node_path_1.resolve)(extRoot, 'vendor/flarum/core/composer.json')))
184
+ if ((0, fs_1.existsSync)((0, path_1.resolve)(extRoot, 'vendor/flarum/core/composer.json')))
185
185
  return;
186
186
  this.log("This command requires `composer install` to have been ran in your extension's root directory.");
187
187
  const composer = await this.genIO().getParam({
@@ -192,7 +192,7 @@ class BaseCommand extends core_1.Command {
192
192
  });
193
193
  if (composer) {
194
194
  cli_ux_1.default.action.start('Installing composer packages');
195
- (0, node_child_process_1.execSync)('composer install', { cwd: extRoot });
195
+ (0, child_process_1.execSync)('composer install', { cwd: extRoot });
196
196
  cli_ux_1.default.action.stop();
197
197
  }
198
198
  else {
@@ -206,7 +206,7 @@ class BaseCommand extends core_1.Command {
206
206
  */
207
207
  async confirmOverrideFiles(dir, pattern, confirmationMessage) {
208
208
  const paths = Array.isArray(pattern) ? pattern : [pattern];
209
- const files = await (0, globby_1.default)(paths.map((p) => (0, node_path_1.resolve)(dir, p)));
209
+ const files = await (0, globby_1.default)(paths.map((p) => (0, path_1.resolve)(dir, p)));
210
210
  const empty = files.length === 0 || (files.length === 1 && files[0] === '.git');
211
211
  if (empty)
212
212
  return false;
@@ -221,8 +221,8 @@ class BaseCommand extends core_1.Command {
221
221
  return true;
222
222
  }
223
223
  async deleteFiles(dir, pattern) {
224
- const pathsToDelete = await (0, globby_1.default)((0, node_path_1.resolve)(dir, pattern));
225
- pathsToDelete.forEach(node_fs_1.unlinkSync);
224
+ const pathsToDelete = await (0, globby_1.default)((0, path_1.resolve)(dir, pattern));
225
+ pathsToDelete.forEach(fs_1.unlinkSync);
226
226
  }
227
227
  }
228
228
  exports.default = BaseCommand;
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodePaths = void 0;
4
- const node_path_1 = require("node:path");
4
+ const path_1 = require("path");
5
5
  class NodePaths {
6
6
  constructor(paths) {
7
7
  this.paths = paths;
8
8
  }
9
9
  cwd(...path) {
10
- return (0, node_path_1.resolve)(process.cwd(), ...path);
10
+ return (0, path_1.resolve)(process.cwd(), ...path);
11
11
  }
12
12
  package(...path) {
13
- return (0, node_path_1.resolve)(this.paths.package, ...path);
13
+ return (0, path_1.resolve)(this.paths.package, ...path);
14
14
  }
15
15
  requestedDir(...path) {
16
16
  if (!this.paths.requestedDir)
17
17
  return null;
18
- return (0, node_path_1.resolve)(this.paths.requestedDir, ...path);
18
+ return (0, path_1.resolve)(this.paths.requestedDir, ...path);
19
19
  }
20
20
  monorepo(...path) {
21
21
  if (!this.paths.monorepo)
22
22
  return null;
23
- return (0, node_path_1.resolve)(this.paths.monorepo, ...path);
23
+ return (0, path_1.resolve)(this.paths.monorepo, ...path);
24
24
  }
25
25
  onMonorepoSub(packagePath, monorepoPath) {
26
26
  return new NodePaths(Object.assign(Object.assign({}, this.paths), { monorepo: monorepoPath !== null && monorepoPath !== void 0 ? monorepoPath : this.paths.package, package: packagePath }));
@@ -8,7 +8,7 @@ const module_1 = require("./module");
8
8
  const template_param_1 = require("./template-param");
9
9
  const cond_format_1 = require("boilersmith/utils/cond-format");
10
10
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
11
- const node_fs_1 = require("node:fs");
11
+ const fs_1 = require("fs");
12
12
  function auditStepFactory(dry, scaffoldDir, modules, templateParams, excludeScaffoldingFunc, moduleStatusCache) {
13
13
  let modulesEnabled;
14
14
  return {
@@ -24,7 +24,7 @@ function auditStepFactory(dry, scaffoldDir, modules, templateParams, excludeScaf
24
24
  io.info((0, cond_format_1.condFormat)(io.supportsAnsiColor, (m) => chalk_1.default.dim(chalk_1.default.green(m)), `✓ ${m.name}: ${m.shortDescription}`), true);
25
25
  }
26
26
  else if (m.updatable) {
27
- io.info((0, cond_format_1.condFormat)(io.supportsAnsiColor, (m) => chalk_1.default.dim(chalk_1.default.red(m)), `𐄂 ${m.name}: ${m.shortDescription} (disabled)`), true);
27
+ io.info((0, cond_format_1.condFormat)(io.supportsAnsiColor, (m) => chalk_1.default.dim(chalk_1.default.red(m)), `✕ ${m.name}: ${m.shortDescription} (disabled)`), true);
28
28
  }
29
29
  }
30
30
  for (const m of actionableModules) {
@@ -35,7 +35,7 @@ function auditStepFactory(dry, scaffoldDir, modules, templateParams, excludeScaf
35
35
  const filesWithChanges = fs
36
36
  .all()
37
37
  .filter((f) => f.state && f.state !== 'deleted')
38
- .filter((f) => { var _a; return !(0, node_fs_1.existsSync)(f.path) || (0, node_fs_1.readFileSync)(f.path, 'utf8').toString() !== ((_a = f.contents) === null || _a === void 0 ? void 0 : _a.toString()); });
38
+ .filter((f) => { var _a; return !(0, fs_1.existsSync)(f.path) || (0, fs_1.readFileSync)(f.path, 'utf8').toString() !== ((_a = f.contents) === null || _a === void 0 ? void 0 : _a.toString()); });
39
39
  if (filesWithChanges.length > 0) {
40
40
  io.error(`Module ${m.name} has ${filesWithChanges.length} changed files: ${filesWithChanges
41
41
  .map((f) => f.path.replace(paths.package() + '/', ''))
@@ -4,7 +4,7 @@ exports.applyModule = exports.setModuleValue = exports.currModulesEnabled = expo
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
6
  const mem_fs_editor_1 = require("mem-fs-editor");
7
- const node_path_1 = require("node:path");
7
+ const path_1 = require("path");
8
8
  const pick_deep_1 = (0, tslib_1.__importDefault)(require("pick-deep"));
9
9
  const read_tpl_1 = require("boilersmith/utils/read-tpl");
10
10
  const clone_and_fill_1 = require("boilersmith/utils/clone-and-fill");
@@ -113,11 +113,11 @@ excludeScaffolding = { files: [], configKeys: {} }, isInitial = false) {
113
113
  })) {
114
114
  continue;
115
115
  }
116
- fsEditor.copyTpl((0, node_path_1.resolve)(scaffoldDir, path), copyTo, tplData);
116
+ fsEditor.copyTpl((0, path_1.resolve)(scaffoldDir, path), copyTo, tplData);
117
117
  }
118
118
  const jsonPaths = (0, clone_and_fill_1.cloneAndFill)(module.jsonToAugment, tplDataFlat);
119
119
  for (const jsonPath of Object.keys(jsonPaths)) {
120
- const scaffoldContents = (0, read_tpl_1.readTpl)((0, node_path_1.resolve)(scaffoldDir, jsonPath), tplData);
120
+ const scaffoldContents = (0, read_tpl_1.readTpl)((0, path_1.resolve)(scaffoldDir, jsonPath), tplData);
121
121
  const scaffoldContentsJson = JSON.parse(scaffoldContents);
122
122
  const excludeKeys = (0, clone_and_fill_1.cloneAndFill)((_b = excludeScaffolding.configKeys[jsonPath]) !== null && _b !== void 0 ? _b : [], tplDataFlat);
123
123
  const fieldsToAugment = jsonPaths[jsonPath].filter((key) => !excludeKeys.includes(key));
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Scaffolder = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const globby_1 = (0, tslib_1.__importDefault)(require("globby"));
6
- const node_path_1 = require("node:path");
6
+ const path_1 = require("path");
7
7
  const json_leaf_paths_1 = require("boilersmith/utils/json-leaf-paths");
8
8
  const read_tpl_1 = require("boilersmith/utils/read-tpl");
9
9
  const init_step_factory_1 = require("./init-step-factory");
@@ -117,7 +117,7 @@ class Scaffolder {
117
117
  errors.push(`File "${path}" is owned by modules: "${fileModules}". However, it also has keys that are owned by modules: "${keyModules}".`);
118
118
  });
119
119
  // Ensure that all owned files exist in the filesystem.
120
- const scaffoldingFilePaths = new Set((await (0, globby_1.default)((0, node_path_1.resolve)(this.scaffoldDir, '**/*'), { dot: true })).map((p) => p.replace(`${this.scaffoldDir}/`, '')).filter((p) => p !== ''));
120
+ const scaffoldingFilePaths = new Set((await (0, globby_1.default)((0, path_1.resolve)(this.scaffoldDir, '**/*'), { dot: true })).map((p) => p.replace(`${this.scaffoldDir}/`, '')).filter((p) => p !== ''));
121
121
  moduleOwnedFiles
122
122
  .filter((path) => !scaffoldingFilePaths.has(path))
123
123
  .forEach((path) => {
@@ -164,7 +164,7 @@ class Scaffolder {
164
164
  if (errors.length > 0) {
165
165
  throw new Error(errors.join('\n'));
166
166
  }
167
- const contents = (0, read_tpl_1.readTpl)((0, node_path_1.resolve)(this.scaffoldDir, path), tplData);
167
+ const contents = (0, read_tpl_1.readTpl)((0, path_1.resolve)(this.scaffoldDir, path), tplData);
168
168
  let json;
169
169
  try {
170
170
  json = JSON.parse(contents);
@@ -196,7 +196,7 @@ class Scaffolder {
196
196
  }
197
197
  // Ensure that all files can be resolved with ejs using provided template variables.
198
198
  scaffoldingFilePaths.forEach((path) => {
199
- (0, read_tpl_1.readTpl)((0, node_path_1.resolve)(this.scaffoldDir, path), tplData);
199
+ (0, read_tpl_1.readTpl)((0, path_1.resolve)(this.scaffoldDir, path), tplData);
200
200
  });
201
201
  }
202
202
  }
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const pick_deep_1 = (0, tslib_1.__importDefault)(require("pick-deep"));
6
6
  const mem_fs_editor_1 = require("mem-fs-editor");
7
7
  const clone_and_fill_1 = require("../utils/clone-and-fill");
8
- const node_path_1 = require("node:path");
8
+ const path_1 = require("path");
9
9
  class BaseStubStep {
10
10
  constructor(stubDir, scaffolder) {
11
11
  this.composable = true;
@@ -27,7 +27,7 @@ class BaseStubStep {
27
27
  const newFileName = await this.getFileName(fs, paths, io);
28
28
  const newFilePath = paths.package(this.schema.root || this.defaultRoot, this.subdir, newFileName);
29
29
  const stub = (0, clone_and_fill_1.cloneAndFill)(this.schema.sourceFile, this.params);
30
- fsEditor.copyTpl((0, node_path_1.resolve)(this.stubDir, stub), newFilePath, this.params);
30
+ fsEditor.copyTpl((0, path_1.resolve)(this.stubDir, stub), newFilePath, this.params);
31
31
  return fs;
32
32
  }
33
33
  getExposed(_paths, _paramProvider) {
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.readTpl = void 0;
4
4
  const ejs_1 = require("ejs");
5
- const node_fs_1 = require("node:fs");
5
+ const fs_1 = require("fs");
6
6
  function readTpl(path, data, options) {
7
- const template = (0, node_fs_1.readFileSync)(path, 'utf8');
7
+ const template = (0, fs_1.readFileSync)(path, 'utf8');
8
8
  return (0, ejs_1.render)(template, data, Object.assign(Object.assign({ filename: path }, options), { async: false }));
9
9
  }
10
10
  exports.readTpl = readTpl;
@@ -0,0 +1,15 @@
1
+ import { StepManager } from 'boilersmith/step-manager';
2
+ import BaseCommand from '../../base-command';
3
+ import { FlarumProviders } from '../../providers';
4
+ export default class Split extends BaseCommand {
5
+ static description: string;
6
+ static flags: {
7
+ config: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
8
+ };
9
+ static args: {
10
+ name: string;
11
+ description: string;
12
+ }[];
13
+ protected requireExistingExtension: boolean;
14
+ protected steps(stepManager: StepManager<FlarumProviders>): StepManager<FlarumProviders>;
15
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const base_command_1 = (0, tslib_1.__importDefault)(require("../../base-command"));
5
+ const core_1 = require("@oclif/core");
6
+ const split_1 = require("../../steps/monorepo/split");
7
+ class Split extends base_command_1.default {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.requireExistingExtension = false;
11
+ }
12
+ steps(stepManager) {
13
+ return stepManager.step(new split_1.MonorepoSplit());
14
+ }
15
+ }
16
+ exports.default = Split;
17
+ Split.description = 'Split monorepo changes into subrepos.';
18
+ Split.flags = Object.assign({ config: core_1.Flags.string({ char: 'c', required: false }) }, base_command_1.default.flags);
19
+ Split.args = [...base_command_1.default.args];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PhpSubsystemProvider = exports.ParamTypeType = exports.ExpressionType = void 0;
4
- const node_child_process_1 = require("node:child_process");
4
+ const child_process_1 = require("child_process");
5
5
  var ExpressionType;
6
6
  (function (ExpressionType) {
7
7
  ExpressionType["SCALAR"] = "scalar";
@@ -24,7 +24,7 @@ class PhpSubsystemProvider {
24
24
  op: 'extender.add',
25
25
  params: extenderDef,
26
26
  });
27
- const res = (0, node_child_process_1.execSync)(`php ${this.phpPath}`, { input });
27
+ const res = (0, child_process_1.execSync)(`php ${this.phpPath}`, { input });
28
28
  if (!res) {
29
29
  throw new Error(`The PHP subsystem returned an invalid value: ${res}`);
30
30
  }
@@ -5,9 +5,9 @@ const tslib_1 = require("tslib");
5
5
  const scaffolder_1 = require("boilersmith/scaffolding/scaffolder");
6
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
7
  const mem_fs_editor_1 = require("mem-fs-editor");
8
- const node_child_process_1 = require("node:child_process");
9
- const node_fs_1 = require("node:fs");
10
- const node_path_1 = require("node:path");
8
+ const child_process_1 = require("child_process");
9
+ const fs_1 = require("fs");
10
+ const path_1 = require("path");
11
11
  const simple_git_1 = (0, tslib_1.__importDefault)(require("simple-git"));
12
12
  const simple_1 = (0, tslib_1.__importDefault)(require("spdx-license-list/simple"));
13
13
  const composer_1 = require("../utils/composer");
@@ -180,9 +180,9 @@ function paramNamesToDef(name) {
180
180
  var _a, _b;
181
181
  const cwd = (_a = paths.monorepo()) !== null && _a !== void 0 ? _a : paths.package();
182
182
  try {
183
- const remotes = (0, node_child_process_1.execSync)('git remote', { cwd, timeout: 2000 }).toString().split('\n');
183
+ const remotes = (0, child_process_1.execSync)('git remote', { cwd, timeout: 2000 }).toString().split('\n');
184
184
  if (remotes.includes('origin')) {
185
- return (0, node_child_process_1.execSync)("git remote show origin | grep 'HEAD branch' | cut -d' ' -f5", { cwd }).toString();
185
+ return (0, child_process_1.execSync)("git remote show origin | grep 'HEAD branch' | cut -d' ' -f5", { cwd }).toString();
186
186
  }
187
187
  }
188
188
  catch (_c) { }
@@ -195,7 +195,7 @@ function paramNamesToDef(name) {
195
195
  name,
196
196
  type: 'select',
197
197
  message: 'JS Package Manager',
198
- initial: 'yarn',
198
+ initial: 0,
199
199
  choices: [
200
200
  { title: 'Yarn', value: 'yarn' },
201
201
  { title: 'NPM', value: 'npm' },
@@ -312,9 +312,9 @@ function moduleNameToDef(name) {
312
312
  jsonToAugment: {},
313
313
  needsTemplateParams: [],
314
314
  inferEnabled: async (_fs, paths) => {
315
- if (!(0, node_fs_1.existsSync)(paths.package('js')))
315
+ if (!(0, fs_1.existsSync)(paths.package('js')))
316
316
  undefined;
317
- return (0, node_fs_1.existsSync)(paths.package('js/src/admin'));
317
+ return (0, fs_1.existsSync)(paths.package('js/src/admin'));
318
318
  },
319
319
  };
320
320
  case 'forum':
@@ -334,9 +334,9 @@ function moduleNameToDef(name) {
334
334
  jsonToAugment: {},
335
335
  needsTemplateParams: [],
336
336
  inferEnabled: async (_fs, paths) => {
337
- if (!(0, node_fs_1.existsSync)(paths.package('js')))
337
+ if (!(0, fs_1.existsSync)(paths.package('js')))
338
338
  undefined;
339
- return (0, node_fs_1.existsSync)(paths.package('js/src/forum'));
339
+ return (0, fs_1.existsSync)(paths.package('js/src/forum'));
340
340
  },
341
341
  };
342
342
  case 'js':
@@ -375,7 +375,7 @@ function moduleNameToDef(name) {
375
375
  },
376
376
  needsTemplateParams: ['packageName', 'jsPackageManager'],
377
377
  inferEnabled: async (_fs, paths) => {
378
- return (0, node_fs_1.existsSync)(paths.package('js'));
378
+ return (0, fs_1.existsSync)(paths.package('js'));
379
379
  },
380
380
  };
381
381
  case 'jsCommon':
@@ -398,7 +398,7 @@ function moduleNameToDef(name) {
398
398
  jsonToAugment: {},
399
399
  needsTemplateParams: [],
400
400
  inferEnabled: async (_fs, paths) => {
401
- return (0, node_fs_1.existsSync)(paths.package('js/src/common'));
401
+ return (0, fs_1.existsSync)(paths.package('js/src/common'));
402
402
  },
403
403
  };
404
404
  case 'css':
@@ -417,7 +417,7 @@ function moduleNameToDef(name) {
417
417
  jsonToAugment: {},
418
418
  needsTemplateParams: [],
419
419
  inferEnabled: async (_fs, paths) => {
420
- return (0, node_fs_1.existsSync)(paths.package('less'));
420
+ return (0, fs_1.existsSync)(paths.package('less'));
421
421
  },
422
422
  };
423
423
  case 'locale':
@@ -433,7 +433,7 @@ function moduleNameToDef(name) {
433
433
  jsonToAugment: {},
434
434
  needsTemplateParams: [],
435
435
  inferEnabled: async (_fs, paths) => {
436
- return (0, node_fs_1.existsSync)(paths.package('locale'));
436
+ return (0, fs_1.existsSync)(paths.package('locale'));
437
437
  },
438
438
  };
439
439
  case 'gitConf':
@@ -498,10 +498,10 @@ function moduleNameToDef(name) {
498
498
  },
499
499
  needsTemplateParams: [],
500
500
  inferEnabled: async (_fs, paths) => {
501
- if (!(0, node_fs_1.existsSync)(paths.package('js/package.json'))) {
501
+ if (!(0, fs_1.existsSync)(paths.package('js/package.json'))) {
502
502
  return false;
503
503
  }
504
- return (0, node_fs_1.readFileSync)(paths.package('js/package.json')).includes('prettier');
504
+ return (0, fs_1.readFileSync)(paths.package('js/package.json')).includes('prettier');
505
505
  },
506
506
  };
507
507
  case 'typescript':
@@ -527,7 +527,7 @@ function moduleNameToDef(name) {
527
527
  },
528
528
  needsTemplateParams: [],
529
529
  inferEnabled: async (_fs, paths) => {
530
- return (0, node_fs_1.existsSync)(paths.package('js/tsconfig.json'));
530
+ return (0, fs_1.existsSync)(paths.package('js/tsconfig.json'));
531
531
  },
532
532
  };
533
533
  case 'bundlewatch':
@@ -542,7 +542,7 @@ function moduleNameToDef(name) {
542
542
  jsonToAugment: {},
543
543
  needsTemplateParams: [],
544
544
  inferEnabled: async (_fs, paths) => {
545
- return (0, node_fs_1.existsSync)(paths.package('js/.bundlewatch.config.json'));
545
+ return (0, fs_1.existsSync)(paths.package('js/.bundlewatch.config.json'));
546
546
  },
547
547
  };
548
548
  case 'backendTesting':
@@ -576,7 +576,7 @@ function moduleNameToDef(name) {
576
576
  },
577
577
  needsTemplateParams: ['packageNamespaceEscapedSlash'],
578
578
  inferEnabled: async (_fs, paths) => {
579
- return (0, node_fs_1.existsSync)(paths.package('tests'));
579
+ return (0, fs_1.existsSync)(paths.package('tests'));
580
580
  },
581
581
  };
582
582
  case 'editorConfig':
@@ -637,7 +637,7 @@ function genExtScaffolder() {
637
637
  configKeys: (_f = (_e = (_d = json === null || json === void 0 ? void 0 : json.extra) === null || _d === void 0 ? void 0 : _d['flarum-cli']) === null || _e === void 0 ? void 0 : _e.excludeScaffoldingConfigKeys) !== null && _f !== void 0 ? _f : {},
638
638
  };
639
639
  };
640
- const scaffolder = new scaffolder_1.Scaffolder((0, node_path_1.resolve)(__dirname, '../../boilerplate/skeleton/extension'), moduleStatusCache, excludeScaffoldingFunc);
640
+ const scaffolder = new scaffolder_1.Scaffolder((0, path_1.resolve)(__dirname, '../../boilerplate/skeleton/extension'), moduleStatusCache, excludeScaffoldingFunc);
641
641
  for (const name of exports.EXTENSION_MODULES) {
642
642
  scaffolder.registerModule(moduleNameToDef(name));
643
643
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ComposerInstall = void 0;
4
- const node_child_process_1 = require("node:child_process");
4
+ const child_process_1 = require("child_process");
5
5
  class ComposerInstall {
6
6
  constructor() {
7
7
  this.type = 'Run composer install/update';
@@ -9,7 +9,7 @@ class ComposerInstall {
9
9
  this.exposes = [];
10
10
  }
11
11
  async run(fs, paths, _paramProvider, _providers) {
12
- (0, node_child_process_1.execSync)('composer update', { cwd: paths.package('') });
12
+ (0, child_process_1.execSync)('composer update', { cwd: paths.package('') });
13
13
  return fs;
14
14
  }
15
15
  getExposed() {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NpmInstall = void 0;
4
- const node_child_process_1 = require("node:child_process");
4
+ const child_process_1 = require("child_process");
5
5
  class NpmInstall {
6
6
  constructor() {
7
7
  this.type = 'Run npm install';
@@ -9,7 +9,7 @@ class NpmInstall {
9
9
  this.exposes = [];
10
10
  }
11
11
  async run(fs, paths, _paramProvider, _providers) {
12
- (0, node_child_process_1.execSync)('npm install', { cwd: paths.package('js') });
12
+ (0, child_process_1.execSync)('npm install', { cwd: paths.package('js') });
13
13
  return fs;
14
14
  }
15
15
  getExposed() {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.YarnInstall = void 0;
4
- const node_child_process_1 = require("node:child_process");
4
+ const child_process_1 = require("child_process");
5
5
  class YarnInstall {
6
6
  constructor() {
7
7
  this.type = 'Run yarn install';
@@ -9,7 +9,7 @@ class YarnInstall {
9
9
  this.exposes = [];
10
10
  }
11
11
  async run(fs, paths, _paramProvider, _providers) {
12
- (0, node_child_process_1.execSync)('yarn install', { cwd: paths.package('js') });
12
+ (0, child_process_1.execSync)('yarn install', { cwd: paths.package('js') });
13
13
  return fs;
14
14
  }
15
15
  getExposed() {
@@ -3,35 +3,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MonorepoCreate = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /* eslint-disable no-await-in-loop */
6
- const node_child_process_1 = require("node:child_process");
6
+ const child_process_1 = require("child_process");
7
7
  const monorepo_1 = require("../../utils/monorepo");
8
8
  const cond_format_1 = require("boilersmith/utils/cond-format");
9
9
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
10
- const node_fs_1 = require("node:fs");
11
- const node_path_1 = require("node:path");
12
- const node_os_1 = require("node:os");
10
+ const fs_1 = require("fs");
11
+ const path_1 = require("path");
12
+ const os_1 = require("os");
13
13
  const simple_git_1 = (0, tslib_1.__importDefault)(require("simple-git"));
14
14
  const mem_fs_editor_1 = require("mem-fs-editor");
15
15
  const commit_async_1 = require("boilersmith/utils/commit-async");
16
16
  const validation_1 = require("../../utils/validation");
17
- async function addGitPackage(cwd, path, remote) {
18
- const tmpDir = (0, node_fs_1.mkdtempSync)((0, node_path_1.resolve)((0, node_os_1.tmpdir)(), `${path.replace('/', '_')}-`));
19
- (0, node_child_process_1.execSync)(`git clone ${remote} ${tmpDir}`, { cwd });
20
- (0, node_child_process_1.execSync)(`git filter-repo --to-subdirectory-filter ${path}`, { cwd: tmpDir });
17
+ async function addGitPackage(cwd, path, remote, mainBranch = 'main') {
18
+ const tmpDir = (0, fs_1.mkdtempSync)((0, path_1.resolve)((0, os_1.tmpdir)(), `${path.replace('/', '_')}-`));
19
+ (0, child_process_1.execSync)(`git clone ${remote} ${tmpDir} --verbose --branch ${mainBranch} --single-branch`, { cwd });
20
+ (0, child_process_1.execSync)(`git filter-repo --to-subdirectory-filter ${path}`, { cwd: tmpDir });
21
+ if (mainBranch) {
22
+ await (0, simple_git_1.default)(tmpDir).checkout(mainBranch);
23
+ }
21
24
  await (0, simple_git_1.default)(tmpDir).branch(['REWRITE']);
22
25
  await (0, simple_git_1.default)(tmpDir).checkout('REWRITE');
23
26
  // Merge from remote
24
27
  const remoteName = path.replace('/', '_').replace('-', '_');
25
28
  await (0, simple_git_1.default)(cwd).addRemote(remoteName, tmpDir);
26
- (0, node_child_process_1.execSync)(`git fetch ${remoteName}`, { cwd });
27
- (0, node_child_process_1.execSync)(`git merge ${remoteName}/REWRITE --allow-unrelated-histories --no-edit`, { cwd });
29
+ (0, child_process_1.execSync)(`git fetch ${remoteName}`, { cwd });
30
+ (0, child_process_1.execSync)(`git merge ${remoteName}/REWRITE --allow-unrelated-histories --no-edit`, { cwd });
28
31
  await (0, simple_git_1.default)(cwd).removeRemote(remoteName);
29
- (0, node_fs_1.rmSync)(tmpDir, { recursive: true, force: true });
32
+ (0, fs_1.rmSync)(tmpDir, { recursive: true, force: true });
30
33
  }
31
34
  function makeRunCommitStep(cwd, fs, io, paths, providers) {
32
35
  return async function (packagePaths, step, message) {
33
36
  for (const path of packagePaths) {
34
- await step.run(fs, paths.onMonorepoSub((0, node_path_1.resolve)(cwd, path), cwd), io, providers);
37
+ await step.run(fs, paths.onMonorepoSub((0, path_1.resolve)(cwd, path), cwd), io, providers);
35
38
  }
36
39
  await (0, commit_async_1.commitAsync)(fs);
37
40
  await commitAll(cwd, message);
@@ -40,7 +43,7 @@ function makeRunCommitStep(cwd, fs, io, paths, providers) {
40
43
  async function getMonorepoConf(io, monorepoConfPath) {
41
44
  var _a;
42
45
  if (monorepoConfPath) {
43
- return JSON.parse((0, node_fs_1.readFileSync)(monorepoConfPath, 'utf8'));
46
+ return JSON.parse((0, fs_1.readFileSync)(monorepoConfPath, 'utf8'));
44
47
  }
45
48
  const packages = { extensions: [], composer: [], npm: [] };
46
49
  // eslint-disable-next-line no-constant-condition
@@ -119,56 +122,58 @@ class MonorepoCreate {
119
122
  }
120
123
  const conf = await getMonorepoConf(io, this.monorepoConfPath ? paths.cwd(this.monorepoConfPath) : undefined);
121
124
  const runCommitStep = makeRunCommitStep(target, fs, io, paths, providers);
122
- (0, node_fs_1.rmSync)(target, { recursive: true, force: true });
123
- (0, node_fs_1.mkdirSync)(target);
125
+ (0, fs_1.rmSync)(target, { recursive: true, force: true });
126
+ (0, fs_1.mkdirSync)(target);
124
127
  await (0, simple_git_1.default)(target).init();
125
128
  for (const lib of (_b = conf.packages.npm) !== null && _b !== void 0 ? _b : []) {
126
- await addGitPackage(target, (0, monorepo_1.npmPath)(lib.name), lib.gitRemote);
129
+ await addGitPackage(target, (0, monorepo_1.npmPath)(lib.name), lib.gitRemote, lib.mainBranch);
127
130
  }
128
131
  for (const lib of (_c = conf.packages.composer) !== null && _c !== void 0 ? _c : []) {
129
- await addGitPackage(target, (0, monorepo_1.composerPath)(lib.name), lib.gitRemote);
132
+ await addGitPackage(target, (0, monorepo_1.composerPath)(lib.name), lib.gitRemote, lib.mainBranch);
130
133
  }
131
134
  for (const ext of (_d = conf.packages.extensions) !== null && _d !== void 0 ? _d : []) {
132
- await addGitPackage(target, (0, monorepo_1.extensionPath)(ext.name), ext.gitRemote);
135
+ await addGitPackage(target, (0, monorepo_1.extensionPath)(ext.name), ext.gitRemote, ext.mainBranch);
133
136
  }
134
- if (conf.packages.core) {
135
- await addGitPackage(target, (0, monorepo_1.corePath)(conf.packages.core.name), conf.packages.core.gitRemote);
137
+ const corePkg = conf.packages.core;
138
+ if (corePkg) {
139
+ await addGitPackage(target, (0, monorepo_1.corePath)(corePkg.name), corePkg.gitRemote, corePkg.mainBranch);
136
140
  }
137
141
  const npmPaths = (_f = (_e = conf.packages.npm) === null || _e === void 0 ? void 0 : _e.map((lib) => (0, monorepo_1.npmPath)(lib.name))) !== null && _f !== void 0 ? _f : [];
138
142
  const composerPaths = (_h = (_g = conf.packages.composer) === null || _g === void 0 ? void 0 : _g.map((lib) => (0, monorepo_1.composerPath)(lib.name))) !== null && _h !== void 0 ? _h : [];
139
143
  const flarumPaths = (_k = (_j = conf.packages.extensions) === null || _j === void 0 ? void 0 : _j.map((ext) => (0, monorepo_1.extensionPath)(ext.name))) !== null && _k !== void 0 ? _k : [];
140
- if (conf.packages.core) {
141
- flarumPaths.push((0, monorepo_1.corePath)(conf.packages.core.name));
144
+ if (corePkg) {
145
+ flarumPaths.push((0, monorepo_1.corePath)(corePkg.name));
142
146
  }
143
147
  flarumPaths.forEach((path) => {
144
- (0, node_fs_1.rmSync)((0, node_path_1.resolve)(target, path, '.github'), { force: true, recursive: true });
148
+ (0, fs_1.rmSync)((0, path_1.resolve)(target, path, '.github'), { force: true, recursive: true });
145
149
  });
146
150
  [...npmPaths, ...composerPaths, ...flarumPaths].forEach((path) => {
147
- (0, node_fs_1.rmSync)((0, node_path_1.resolve)(target, path, '.styleci.yml'), { force: true });
151
+ (0, fs_1.rmSync)((0, path_1.resolve)(target, path, '.styleci.yml'), { force: true });
148
152
  });
149
153
  await commitAll(target, [
150
154
  'chore: remove centralizable repo config',
151
155
  '- Remove .github conf folder from Flarum packages',
152
156
  '- Remove styleci config from all packages',
153
157
  ]);
154
- (0, mem_fs_editor_1.create)(fs).writeJSON((0, node_path_1.resolve)(target, 'flarum-monorepo.json'), conf);
158
+ (0, mem_fs_editor_1.create)(fs).writeJSON((0, path_1.resolve)(target, 'flarum-monorepo.json'), conf);
155
159
  await (0, commit_async_1.commitAsync)(fs);
156
160
  await commitAll(target, 'chore: add monorepo config file');
157
161
  [...composerPaths, ...flarumPaths].forEach((path) => {
158
- const cwd = (0, node_path_1.resolve)(target, path);
159
- (0, node_child_process_1.execSync)('composer config repositories.0 path "../*"', { cwd });
160
- (0, node_child_process_1.execSync)('composer config minimum-stability dev', { cwd });
161
- (0, node_child_process_1.execSync)('composer config prefer-stable true', { cwd });
162
- const composerJsonPath = (0, node_path_1.resolve)(cwd, 'composer.json');
163
- const composerJson = (0, node_fs_1.readFileSync)(composerJsonPath);
164
- (0, node_fs_1.writeFileSync)(composerJsonPath, composerJson.toString().replace('"dev-master": "1.x-dev"', '"dev-main": "1.x-dev"'));
162
+ const cwd = (0, path_1.resolve)(target, path);
163
+ const relRepoPath = path.includes('/') ? '../../*/*' : './../*/*';
164
+ (0, child_process_1.execSync)(`composer config repositories.0 path "${relRepoPath}"`, { cwd });
165
+ (0, child_process_1.execSync)('composer config minimum-stability dev', { cwd });
166
+ (0, child_process_1.execSync)('composer config prefer-stable true', { cwd });
167
+ const composerJsonPath = (0, path_1.resolve)(cwd, 'composer.json');
168
+ const composerJson = (0, fs_1.readFileSync)(composerJsonPath);
169
+ (0, fs_1.writeFileSync)(composerJsonPath, composerJson.toString().replace('"dev-master": "1.x-dev"', '"dev-main": "1.x-dev"'));
165
170
  });
166
171
  [...composerPaths, ...flarumPaths].forEach((path) => {
167
- const cwd = (0, node_path_1.resolve)(target, path);
168
- (0, node_child_process_1.execSync)('composer install --dry-run --no-interaction --no-ansi --no-progress --no-scripts --no-autoloader', { cwd });
172
+ const cwd = (0, path_1.resolve)(target, path);
173
+ (0, child_process_1.execSync)('composer install --dry-run --no-interaction --no-ansi --no-progress --no-scripts --no-autoloader', { cwd });
169
174
  });
170
175
  await commitAll(target, 'chore: set up composer path repos');
171
- (0, mem_fs_editor_1.create)(fs).writeJSON((0, node_path_1.resolve)(target, 'flarum-monorepo.json'), conf);
176
+ (0, mem_fs_editor_1.create)(fs).writeJSON((0, path_1.resolve)(target, 'flarum-monorepo.json'), conf);
172
177
  await (0, commit_async_1.commitAsync)(fs);
173
178
  await commitAll(target, 'chore: add monorepo config file');
174
179
  await runCommitStep(flarumPaths, this.scaffolder.genAuditStep(false), 'chore: flarum-cli audit infra --fix');
@@ -0,0 +1,12 @@
1
+ import { IO } from 'boilersmith/io';
2
+ import { Paths } from 'boilersmith/paths';
3
+ import { Step } from 'boilersmith/step-manager';
4
+ import { Store } from 'mem-fs';
5
+ import { FlarumProviders } from '../../providers';
6
+ export declare class MonorepoSplit implements Step<FlarumProviders> {
7
+ type: string;
8
+ composable: boolean;
9
+ exposes: never[];
10
+ run(fs: Store, paths: Paths, io: IO, _providers: FlarumProviders): Promise<Store>;
11
+ getExposed(): Record<string, unknown>;
12
+ }
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MonorepoSplit = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const child_process_1 = require("child_process");
6
+ const path_1 = require("path");
7
+ const simple_git_1 = (0, tslib_1.__importDefault)(require("simple-git"));
8
+ const monorepo_1 = require("../../utils/monorepo");
9
+ async function addRemote(cwd, name, remote) {
10
+ try {
11
+ await (0, simple_git_1.default)(cwd).addRemote(name, remote);
12
+ }
13
+ catch (_a) {
14
+ // ignore, remote already exists.
15
+ }
16
+ }
17
+ async function splitAndPush(cwd, splitExecPath, splitPath, remoteName, remoteBranch) {
18
+ const sha1 = (0, child_process_1.execSync)(`${splitExecPath} --prefix=${splitPath}`, { cwd, stdio: ['pipe', 'pipe', 'ignore'] })
19
+ .toString()
20
+ .trim();
21
+ (0, child_process_1.execSync)(`git push ${remoteName} "${sha1}:refs/heads/${remoteBranch || 'main'}"`, { cwd });
22
+ }
23
+ async function removeRemote(cwd, name) {
24
+ await (0, simple_git_1.default)(cwd).removeRemote(name);
25
+ }
26
+ class MonorepoSplit {
27
+ constructor() {
28
+ this.type = 'Split monorepo changes to the respective cloned repos.';
29
+ this.composable = false;
30
+ this.exposes = [];
31
+ }
32
+ async run(fs, paths, io, _providers) {
33
+ var _a, _b, _c, _d;
34
+ const platform = process.platform;
35
+ if (platform !== 'linux' && platform !== 'darwin') {
36
+ io.error(`Your platform, "${platform}", is not supported. Split can only be run on linux and mac`, true);
37
+ return fs;
38
+ }
39
+ const splitExec = (0, path_1.resolve)(__dirname, `../../../bin/splitsh-lite-${platform}`);
40
+ const target = (_a = paths.requestedDir()) !== null && _a !== void 0 ? _a : paths.package();
41
+ await (0, simple_git_1.default)(target).pull();
42
+ const conf = (0, monorepo_1.getMonorepoConf)(fs, paths);
43
+ const corePkg = conf.packages.core;
44
+ // Add Remotes
45
+ for (const lib of (_b = conf.packages.npm) !== null && _b !== void 0 ? _b : []) {
46
+ await addRemote(target, lib.name, lib.gitRemote);
47
+ await splitAndPush(target, splitExec, (0, monorepo_1.npmPath)(lib.name), lib.name, lib.mainBranch).finally(() => {
48
+ return removeRemote(target, lib.name);
49
+ });
50
+ }
51
+ for (const lib of (_c = conf.packages.composer) !== null && _c !== void 0 ? _c : []) {
52
+ await addRemote(target, lib.name, lib.gitRemote);
53
+ await splitAndPush(target, splitExec, (0, monorepo_1.composerPath)(lib.name), lib.name, lib.mainBranch).finally(() => {
54
+ return removeRemote(target, lib.name);
55
+ });
56
+ }
57
+ for (const ext of (_d = conf.packages.extensions) !== null && _d !== void 0 ? _d : []) {
58
+ await addRemote(target, ext.name, ext.gitRemote);
59
+ await splitAndPush(target, splitExec, (0, monorepo_1.extensionPath)(ext.name), ext.name, ext.mainBranch).finally(() => {
60
+ return removeRemote(target, ext.name);
61
+ });
62
+ }
63
+ if (corePkg) {
64
+ await addRemote(target, corePkg.name, corePkg.gitRemote);
65
+ await splitAndPush(target, splitExec, (0, monorepo_1.corePath)(corePkg.name), corePkg.name, corePkg.mainBranch).finally(() => {
66
+ return removeRemote(target, corePkg.name);
67
+ });
68
+ }
69
+ return fs;
70
+ }
71
+ getExposed() {
72
+ throw new Error('Method not implemented.');
73
+ }
74
+ }
75
+ exports.MonorepoSplit = MonorepoSplit;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GenerateMigrationStub = void 0;
4
- const node_fs_1 = require("node:fs");
4
+ const fs_1 = require("fs");
5
5
  const validation_1 = require("../../../utils/validation");
6
6
  const migration_1 = require("../../../utils/migration");
7
7
  const php_base_1 = require("../php-base");
@@ -36,7 +36,7 @@ class GenerateMigrationStub extends php_base_1.BasePhpStubStep {
36
36
  async getFileName(fs, paths, _paramProvider) {
37
37
  let persistedMigrations;
38
38
  try {
39
- persistedMigrations = (0, node_fs_1.readdirSync)(paths.package('migrations'));
39
+ persistedMigrations = (0, fs_1.readdirSync)(paths.package('migrations'));
40
40
  }
41
41
  catch (_a) {
42
42
  persistedMigrations = [];
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getMonorepoConf = exports.corePath = exports.extensionPath = exports.composerPath = exports.npmPath = void 0;
4
4
  const mem_fs_editor_1 = require("mem-fs-editor");
5
5
  function npmPath(name) {
6
- return `packages/lib-${name}`;
6
+ return `js-packages/${name}`;
7
7
  }
8
8
  exports.npmPath = npmPath;
9
9
  function composerPath(name) {
10
- return `packages/lib-${name}`;
10
+ return `php-packages/${name}`;
11
11
  }
12
12
  exports.composerPath = composerPath;
13
13
  function extensionPath(name) {
14
- return `packages/ext-${name}`;
14
+ return `extensions/${name}`;
15
15
  }
16
16
  exports.extensionPath = extensionPath;
17
17
  function corePath(_name) {
18
- return 'packages/core';
18
+ return 'framework/core';
19
19
  }
20
20
  exports.corePath = corePath;
21
21
  function getMonorepoConf(fs, paths) {
@@ -1 +1 @@
1
- {"version":"2.0.0-beta.14","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","backendTesting","editorConfig","styleci"]},{"name":"path","description":"Where should this command be executed?"}]},"init":{"id":"init","description":"Create a new Flarum extension","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"audit:infra":{"id":"audit:infra","description":"Check for outdated config files, infrastructure, setup, etc.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"fix":{"name":"fix","type":"boolean","char":"f","allowNo":false},"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"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?"}]},"update:js-imports":{"id":"update:js-imports","description":"Updates JS imports from core to use proper namespaces","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-controller":{"id":"make:backend:api-controller","description":"Generate an API controller class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer-attributes":{"id":"make:backend:api-serializer-attributes","description":"Generate an API serializer attributes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer":{"id":"make:backend:api-serializer","description":"Generate an API serializer class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:command":{"id":"make:backend:command","description":"Generate a console command class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:event-listener":{"id":"make:backend:event-listener","description":"Generate an event listener class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:handler":{"id":"make:backend:handler","description":"Generate a domain logic handler class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:integration-test":{"id":"make:backend:integration-test","description":"Generate an integration test class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:job":{"id":"make:backend:job","description":"Generate a job class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:migration":{"id":"make:backend:migration","description":"Generate a migration","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:model":{"id":"make:backend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:policy":{"id":"make:backend:policy","description":"Generate a policy class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:repository":{"id":"make:backend:repository","description":"Generate a repository class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:route":{"id":"make:backend:route","description":"Generate a routes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:service-provider":{"id":"make:backend:service-provider","description":"Generate a service provider class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:validator":{"id":"make:backend:validator","description":"Generate a validator class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:component":{"id":"make:frontend:component","description":"Generate a frontend component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:modal":{"id":"make:frontend:modal","description":"Generate a modal component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:model":{"id":"make:frontend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]}}}
1
+ {"version":"2.0.0-beta.15","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","backendTesting","editorConfig","styleci"]},{"name":"path","description":"Where should this command be executed?"}]},"init":{"id":"init","description":"Create a new Flarum extension","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"audit:infra":{"id":"audit:infra","description":"Check for outdated config files, infrastructure, setup, etc.","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"fix":{"name":"fix","type":"boolean","char":"f","allowNo":false},"monorepo":{"name":"monorepo","type":"boolean","char":"m","allowNo":false},"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"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":{"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?"}]},"update:js-imports":{"id":"update:js-imports","description":"Updates JS imports from core to use proper namespaces","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-controller":{"id":"make:backend:api-controller","description":"Generate an API controller class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer-attributes":{"id":"make:backend:api-serializer-attributes","description":"Generate an API serializer attributes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:api-serializer":{"id":"make:backend:api-serializer","description":"Generate an API serializer class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:command":{"id":"make:backend:command","description":"Generate a console command class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:event-listener":{"id":"make:backend:event-listener","description":"Generate an event listener class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:handler":{"id":"make:backend:handler","description":"Generate a domain logic handler class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:integration-test":{"id":"make:backend:integration-test","description":"Generate an integration test class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:job":{"id":"make:backend:job","description":"Generate a job class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:migration":{"id":"make:backend:migration","description":"Generate a migration","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:model":{"id":"make:backend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:policy":{"id":"make:backend:policy","description":"Generate a policy class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:repository":{"id":"make:backend:repository","description":"Generate a repository class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:route":{"id":"make:backend:route","description":"Generate a routes extender","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:service-provider":{"id":"make:backend:service-provider","description":"Generate a service provider class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:backend:validator":{"id":"make:backend:validator","description":"Generate a validator class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:component":{"id":"make:frontend:component","description":"Generate a frontend component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:modal":{"id":"make:frontend:modal","description":"Generate a modal component","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]},"make:frontend:model":{"id":"make:frontend:model","description":"Generate a model class","pluginName":"@flarum/cli","pluginType":"core","aliases":[],"flags":{"no-interaction":{"name":"no-interaction","type":"boolean","char":"n","description":"Do not ask any interactive questions, assume defaults. When impossible, error.","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"path","description":"Where should this command be executed?"}]}}}
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.14",
4
+ "version": "2.0.0-beta.15",
5
5
  "author": "Flarum Team",
6
6
  "bin": {
7
7
  "fl": "bin/run",