rman 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/cli.js CHANGED
@@ -19,6 +19,7 @@ const run_command_1 = require("./commands/run-command");
19
19
  const version_command_1 = require("./commands/version-command");
20
20
  const publish_command_1 = require("./commands/publish-command");
21
21
  const ci_command_1 = require("./commands/ci-command");
22
+ const build_command_1 = require("./commands/build-command");
22
23
  async function runCli(options) {
23
24
  const s = path_1.default.resolve((0, utils_1.getDirname)(), '../package.json');
24
25
  const pkgJson = JSON.parse(await promises_1.default.readFile(s, 'utf-8'));
@@ -50,6 +51,7 @@ async function runCli(options) {
50
51
  version_command_1.VersionCommand.initCli(repository, program);
51
52
  publish_command_1.PublishCommand.initCli(repository, program);
52
53
  ci_command_1.CleanInstallCommand.initCli(repository, program);
54
+ build_command_1.BuildCommand.initCli(repository, program);
53
55
  if (!_argv.length)
54
56
  program.showHelp();
55
57
  else
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BuildCommand = void 0;
4
+ const command_1 = require("../core/command");
5
+ const run_command_1 = require("./run-command");
6
+ class BuildCommand extends run_command_1.RunCommand {
7
+ constructor(repository, options) {
8
+ super(repository, 'build', options);
9
+ this.repository = repository;
10
+ }
11
+ }
12
+ exports.BuildCommand = BuildCommand;
13
+ BuildCommand.commandName = 'changed';
14
+ (function (BuildCommand) {
15
+ function initCli(repository, program) {
16
+ program.command({
17
+ command: 'build [options...]',
18
+ describe: 'Alias for "run build"',
19
+ builder: (cmd) => {
20
+ return cmd
21
+ .example("$0 build", "# Builds packages")
22
+ .option(BuildCommand.cliCommandOptions);
23
+ },
24
+ handler: async (args) => {
25
+ const options = command_1.Command.composeOptions(BuildCommand.commandName, args, repository.config);
26
+ await new BuildCommand(repository, options)
27
+ .execute();
28
+ }
29
+ });
30
+ }
31
+ BuildCommand.initCli = initCli;
32
+ })(BuildCommand = exports.BuildCommand || (exports.BuildCommand = {}));
@@ -114,7 +114,7 @@ RunCommand.commandName = 'run';
114
114
  function initCli(repository, program) {
115
115
  program.command({
116
116
  command: 'run <script>',
117
- describe: 'Execute an arbitrary command in each package',
117
+ describe: 'Execute an arbitrary script in each package',
118
118
  builder: (cmd) => {
119
119
  return cmd
120
120
  .example("$0 run build", '')
package/esm/cli.mjs CHANGED
@@ -13,6 +13,7 @@ import { RunCommand } from './commands/run-command.mjs';
13
13
  import { VersionCommand } from './commands/version-command.mjs';
14
14
  import { PublishCommand } from './commands/publish-command.mjs';
15
15
  import { CleanInstallCommand } from './commands/ci-command.mjs';
16
+ import { BuildCommand } from './commands/build-command.mjs';
16
17
  export async function runCli(options) {
17
18
  const s = path.resolve(getDirname(), '../package.json');
18
19
  const pkgJson = JSON.parse(await fs.readFile(s, 'utf-8'));
@@ -44,6 +45,7 @@ export async function runCli(options) {
44
45
  VersionCommand.initCli(repository, program);
45
46
  PublishCommand.initCli(repository, program);
46
47
  CleanInstallCommand.initCli(repository, program);
48
+ BuildCommand.initCli(repository, program);
47
49
  if (!_argv.length)
48
50
  program.showHelp();
49
51
  else
@@ -0,0 +1,11 @@
1
+ import yargs from 'yargs';
2
+ import { Repository } from '../core/repository';
3
+ import { RunCommand } from './run-command';
4
+ export declare class BuildCommand extends RunCommand<any> {
5
+ readonly repository: Repository;
6
+ static commandName: string;
7
+ constructor(repository: Repository, options?: RunCommand.Options);
8
+ }
9
+ export declare namespace BuildCommand {
10
+ function initCli(repository: Repository, program: yargs.Argv): void;
11
+ }
@@ -0,0 +1,28 @@
1
+ import { Command } from './../core/command.mjs';
2
+ import { RunCommand } from './run-command.mjs';
3
+ export class BuildCommand extends RunCommand {
4
+ constructor(repository, options) {
5
+ super(repository, 'build', options);
6
+ this.repository = repository;
7
+ }
8
+ }
9
+ BuildCommand.commandName = 'changed';
10
+ (function (BuildCommand) {
11
+ function initCli(repository, program) {
12
+ program.command({
13
+ command: 'build [options...]',
14
+ describe: 'Alias for "run build"',
15
+ builder: (cmd) => {
16
+ return cmd
17
+ .example("$0 build", "# Builds packages")
18
+ .option(BuildCommand.cliCommandOptions);
19
+ },
20
+ handler: async (args) => {
21
+ const options = Command.composeOptions(BuildCommand.commandName, args, repository.config);
22
+ await new BuildCommand(repository, options)
23
+ .execute();
24
+ }
25
+ });
26
+ }
27
+ BuildCommand.initCli = initCli;
28
+ })(BuildCommand || (BuildCommand = {}));
@@ -107,7 +107,7 @@ RunCommand.commandName = 'run';
107
107
  function initCli(repository, program) {
108
108
  program.command({
109
109
  command: 'run <script>',
110
- describe: 'Execute an arbitrary command in each package',
110
+ describe: 'Execute an arbitrary script in each package',
111
111
  builder: (cmd) => {
112
112
  return cmd
113
113
  .example("$0 run build", '')
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rman",
3
3
  "description": "Monorepo repository manager",
4
- "version": "0.13.0",
4
+ "version": "0.14.0",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "contributors": [