rman 0.37.4 → 0.38.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/cli.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  export declare function runCli(options?: {
2
3
  argv?: string[];
3
4
  cwd?: string;
package/cli.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import colors from 'ansi-colors';
2
3
  import yargs from 'yargs';
3
4
  import { BuildCommand } from './commands/build-command.js';
@@ -61,3 +62,4 @@ export async function runCli(options) {
61
62
  // logger.error('rman', e.message);
62
63
  }
63
64
  }
65
+ runCli().catch(() => 0);
@@ -1,4 +1,6 @@
1
+ import * as yargs from 'yargs';
1
2
  import { Command } from '../core/command.js';
3
+ import { Repository } from '../core/repository.js';
2
4
  import { RunCommand } from './run-command.js';
3
5
  export class BuildCommand extends RunCommand {
4
6
  repository;
@@ -1,4 +1,7 @@
1
+ import * as yargs from 'yargs';
1
2
  import { Command } from '../core/command.js';
3
+ import { Package } from '../core/package.js';
4
+ import { Repository } from '../core/repository.js';
2
5
  import { ListCommand } from './list-command.js';
3
6
  export class ChangedCommand extends ListCommand {
4
7
  repository;
@@ -2,7 +2,7 @@ import { Task } from 'power-tasks';
2
2
  import * as yargs from 'yargs';
3
3
  import { Package } from '../core/package.js';
4
4
  import { Repository } from '../core/repository.js';
5
- import { ExecuteCommandResult } from '../utils/exec.js';
5
+ import type { ExecuteCommandResult } from '../utils/exec.js';
6
6
  import { RunCommand } from './run-command.js';
7
7
  export declare class CleanInstallCommand extends RunCommand<CleanInstallCommand.Options> {
8
8
  readonly repository: Repository;
@@ -2,7 +2,10 @@ import colors from 'ansi-colors';
2
2
  import logger from 'npmlog';
3
3
  import path from 'path';
4
4
  import { Task } from 'power-tasks';
5
+ import * as yargs from 'yargs';
5
6
  import { Command } from '../core/command.js';
7
+ import { Package } from '../core/package.js';
8
+ import { Repository } from '../core/repository.js';
6
9
  import { fsDelete, fsExists } from '../utils/file-utils.js';
7
10
  import { RunCommand } from './run-command.js';
8
11
  export class CleanInstallCommand extends RunCommand {
@@ -1,7 +1,10 @@
1
1
  import colors from 'ansi-colors';
2
2
  import logger from 'npmlog';
3
3
  import { Task } from 'power-tasks';
4
+ import * as yargs from 'yargs';
4
5
  import { Command } from '../core/command.js';
6
+ import { Package } from '../core/package.js';
7
+ import { Repository } from '../core/repository.js';
5
8
  import { exec } from '../utils/exec.js';
6
9
  import { MultiTaskCommand } from './multi-task-command.js';
7
10
  export class ExecuteCommand extends MultiTaskCommand {
@@ -24,7 +27,7 @@ export class ExecuteCommand extends MultiTaskCommand {
24
27
  const r = await exec(this.cmd, {
25
28
  cwd: p.dirname,
26
29
  argv: this.argv,
27
- stdio: logger.levelIndex < 1000 ? 'inherit' : 'pipe',
30
+ stdio: 'inherit', //logger.levelIndex < 1000 ? 'inherit' : 'pipe',
28
31
  });
29
32
  logger.log(r.error ? 'error' : 'info', this.commandName, p.name, r.error ? colors.red.bold('failed') : colors.green.bold('success'), logger.separator, this.cmd, colors.yellow(' (' + (Date.now() - t) + ' ms') + ')');
30
33
  }, {
@@ -1,7 +1,9 @@
1
1
  import colors from 'ansi-colors';
2
2
  import envinfo from 'envinfo';
3
3
  import semver from 'semver';
4
+ import * as yargs from 'yargs';
4
5
  import { Command } from '../core/command.js';
6
+ import { Repository } from '../core/repository.js';
5
7
  export class InfoCommand extends Command {
6
8
  static commandName = 'info';
7
9
  async _execute() {
@@ -2,7 +2,10 @@ import colors from 'ansi-colors';
2
2
  import EasyTable from 'easy-table';
3
3
  import logger from 'npmlog';
4
4
  import path from 'path';
5
+ import * as yargs from 'yargs';
5
6
  import { Command } from '../core/command.js';
7
+ import { Package } from '../core/package.js';
8
+ import { Repository } from '../core/repository.js';
6
9
  import { GitHelper } from '../utils/git-utils.js';
7
10
  export class ListCommand extends Command {
8
11
  repository;
@@ -1,8 +1,11 @@
1
1
  import os from 'os';
2
2
  import { Task } from 'power-tasks';
3
3
  import { toNumber } from 'putil-varhelpers';
4
+ import * as yargs from 'yargs';
4
5
  import { Command } from '../core/command.js';
5
6
  import { isTTY } from '../core/constants.js';
7
+ import { Package } from '../core/package.js';
8
+ import { Repository } from '../core/repository.js';
6
9
  export class MultiTaskCommand extends Command {
7
10
  repository;
8
11
  _task;
@@ -2,7 +2,7 @@ import { Task } from 'power-tasks';
2
2
  import * as yargs from 'yargs';
3
3
  import { Package } from '../core/package.js';
4
4
  import { Repository } from '../core/repository.js';
5
- import { ExecuteCommandResult } from '../utils/exec.js';
5
+ import type { ExecuteCommandResult } from '../utils/exec.js';
6
6
  import { RunCommand } from './run-command.js';
7
7
  export declare class PublishCommand extends RunCommand<PublishCommand.Options> {
8
8
  readonly repository: Repository;
@@ -1,7 +1,11 @@
1
1
  import colors from 'ansi-colors';
2
2
  import logger from 'npmlog';
3
3
  import path from 'path';
4
+ import { Task } from 'power-tasks';
5
+ import * as yargs from 'yargs';
4
6
  import { Command } from '../core/command.js';
7
+ import { Package } from '../core/package.js';
8
+ import { Repository } from '../core/repository.js';
5
9
  import { NpmHelper } from '../utils/npm-utils.js';
6
10
  import { PackageNotFoundError } from '../utils/package-not-found-error.js';
7
11
  import { RunCommand } from './run-command.js';
@@ -2,7 +2,7 @@ import { Task } from 'power-tasks';
2
2
  import * as yargs from 'yargs';
3
3
  import { Package } from '../core/package.js';
4
4
  import { Repository } from '../core/repository.js';
5
- import { ExecuteCommandResult } from '../utils/exec.js';
5
+ import { type ExecuteCommandResult } from '../utils/exec.js';
6
6
  import { MultiTaskCommand } from './multi-task-command.js';
7
7
  export declare class RunCommand<TOptions extends RunCommand.Options> extends MultiTaskCommand<TOptions> {
8
8
  readonly repository: Repository;
@@ -2,7 +2,10 @@ import parseNpmScript from '@netlify/parse-npm-script';
2
2
  import colors from 'ansi-colors';
3
3
  import logger from 'npmlog';
4
4
  import { Task } from 'power-tasks';
5
+ import * as yargs from 'yargs';
5
6
  import { Command } from '../core/command.js';
7
+ import { Package } from '../core/package.js';
8
+ import { Repository } from '../core/repository.js';
6
9
  import { exec } from '../utils/exec.js';
7
10
  import { MultiTaskCommand } from './multi-task-command.js';
8
11
  export class RunCommand extends MultiTaskCommand {
@@ -51,7 +54,7 @@ export class RunCommand extends MultiTaskCommand {
51
54
  for (const cmd of parsed) {
52
55
  const task = new Task(async () => await this._exec(pkg, cmd, {
53
56
  script: s.name,
54
- stdio: logger.levelIndex < 1000 ? 'inherit' : 'pipe',
57
+ stdio: 'inherit', //logger.levelIndex < 1000 ? 'inherit' : 'pipe',
55
58
  }, options), {
56
59
  name: pkg.name + ':' + s.name,
57
60
  dependencies: this.options.parallel || s.name.startsWith('pre') || s.name.startsWith('post')
@@ -2,7 +2,7 @@ import { Task } from 'power-tasks';
2
2
  import * as yargs from 'yargs';
3
3
  import { Package } from '../core/package.js';
4
4
  import { Repository } from '../core/repository.js';
5
- import { ExecuteCommandResult } from '../utils/exec.js';
5
+ import type { ExecuteCommandResult } from '../utils/exec.js';
6
6
  import { RunCommand } from './run-command.js';
7
7
  export declare class VersionCommand extends RunCommand<VersionCommand.Options> {
8
8
  readonly repository: Repository;
@@ -4,7 +4,10 @@ import path from 'path';
4
4
  import { Task } from 'power-tasks';
5
5
  import semver from 'semver';
6
6
  import stripColor from 'strip-color';
7
+ import * as yargs from 'yargs';
7
8
  import { Command } from '../core/command.js';
9
+ import { Package } from '../core/package.js';
10
+ import { Repository } from '../core/repository.js';
8
11
  import { GitHelper } from '../utils/git-utils.js';
9
12
  import { RunCommand } from './run-command.js';
10
13
  export class VersionCommand extends RunCommand {
package/constants.js CHANGED
@@ -1 +1 @@
1
- export const version = '0.37.4';
1
+ export const version = '0.38.0';
package/core/command.js CHANGED
@@ -4,6 +4,7 @@ import isCi from 'is-ci';
4
4
  import npmlog from 'npmlog';
5
5
  import merge from 'putil-merge';
6
6
  import { AsyncEventEmitter, TypedEventEmitterClass } from 'strict-typed-events';
7
+ import * as yargs from 'yargs';
7
8
  import { isTTY } from './constants.js';
8
9
  const noOp = () => undefined;
9
10
  const lineVerticalDashed0 = '┆';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rman",
3
3
  "description": "Repository manager",
4
- "version": "0.37.4",
4
+ "version": "0.38.0",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
@@ -11,19 +11,19 @@
11
11
  "cross-dirname": "^0.1.0",
12
12
  "envinfo": "^7.21.0",
13
13
  "fast-glob": "^3.3.3",
14
- "ini": "^6.0.0",
14
+ "ini": "^7.0.0",
15
15
  "is-ci": "^4.1.0",
16
- "js-yaml": "^4.1.1",
16
+ "js-yaml": "^5.4.1",
17
17
  "npmlog": "^7.0.1",
18
18
  "power-tasks": "^1.14.2",
19
19
  "putil-merge": "^3.13.0",
20
20
  "putil-varhelpers": "^1.7.0",
21
- "semver": "^7.7.4",
21
+ "semver": "^7.8.5",
22
22
  "signal-exit": "^4.1.0",
23
23
  "strict-typed-events": "^2.8.0",
24
24
  "strip-color": "^0.1.0",
25
25
  "tslib": "^2.8.1",
26
- "yargs": "^18.0.0"
26
+ "yargs": "^18.1.0"
27
27
  },
28
28
  "type": "module",
29
29
  "module": "./index.js",
@@ -36,7 +36,7 @@
36
36
  "./package.json": "./package.json"
37
37
  },
38
38
  "bin": {
39
- "rman": "bin/rman.mjs"
39
+ "rman": "cli.js"
40
40
  },
41
41
  "engines": {
42
42
  "node": ">=20.0"
package/utils/exec.js CHANGED
@@ -1,4 +1,4 @@
1
- import { spawn } from 'child_process';
1
+ import { ChildProcess, spawn } from 'child_process';
2
2
  import { onExit } from 'signal-exit';
3
3
  import { npmRunPathEnv } from './npm-run-path.js';
4
4
  const runningChildren = new Map();
@@ -1,3 +1,4 @@
1
+ import { Stats } from 'node:fs';
1
2
  import fsa from 'fs/promises';
2
3
  import path from 'path';
3
4
  export async function fsExists(s) {
package/bin/rman.mjs DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runCli } from '../cli.js';
3
-
4
- runCli().catch(() => 0);