rman 0.37.3 → 0.37.4
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.js +4 -11
- package/constants.d.ts +1 -0
- package/constants.js +1 -0
- package/core/package.js +3 -0
- package/core/repository.js +4 -1
- package/package.json +3 -3
- package/utils/npm-run-path.d.ts +1 -1
package/cli.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import colors from 'ansi-colors';
|
|
2
|
-
import { getDirname } from 'cross-dirname';
|
|
3
|
-
import fs from 'fs';
|
|
4
|
-
import logger from 'npmlog';
|
|
5
|
-
import path from 'path';
|
|
6
2
|
import yargs from 'yargs';
|
|
7
3
|
import { BuildCommand } from './commands/build-command.js';
|
|
8
4
|
import { ChangedCommand } from './commands/changed-command.js';
|
|
@@ -13,22 +9,18 @@ import { ListCommand } from './commands/list-command.js';
|
|
|
13
9
|
import { PublishCommand } from './commands/publish-command.js';
|
|
14
10
|
import { RunCommand } from './commands/run-command.js';
|
|
15
11
|
import { VersionCommand } from './commands/version-command.js';
|
|
12
|
+
import { version } from './constants.js';
|
|
16
13
|
import { Command } from './core/command.js';
|
|
17
14
|
import { Repository } from './core/repository.js';
|
|
18
15
|
export async function runCli(options) {
|
|
19
16
|
try {
|
|
20
|
-
let s = path.resolve(getDirname(), './package.json');
|
|
21
|
-
if (!fs.existsSync(s)) {
|
|
22
|
-
s = path.resolve(getDirname(), '../package.json');
|
|
23
|
-
}
|
|
24
|
-
const pkgJson = JSON.parse(fs.readFileSync(s, 'utf-8'));
|
|
25
17
|
const repository = Repository.create(options?.cwd);
|
|
26
18
|
const _argv = options?.argv || process.argv.slice(2);
|
|
27
19
|
const globalKeys = Object.keys(Command.globalOptions).concat(['help', 'version']);
|
|
28
20
|
const program = yargs(_argv)
|
|
29
21
|
// .scriptName('rman')
|
|
30
22
|
.strict()
|
|
31
|
-
.version(
|
|
23
|
+
.version(version)
|
|
32
24
|
.alias('version', 'v')
|
|
33
25
|
.usage('$0 <cmd> [options...]')
|
|
34
26
|
.help('help')
|
|
@@ -65,6 +57,7 @@ export async function runCli(options) {
|
|
|
65
57
|
await program.parseAsync().catch(() => process.exit(1));
|
|
66
58
|
}
|
|
67
59
|
catch (e) {
|
|
68
|
-
|
|
60
|
+
console.error(colors.red(e.message));
|
|
61
|
+
// logger.error('rman', e.message);
|
|
69
62
|
}
|
|
70
63
|
}
|
package/constants.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version = "1";
|
package/constants.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const version = '0.37.4';
|
package/core/package.js
CHANGED
package/core/repository.js
CHANGED
|
@@ -89,8 +89,11 @@ export class Repository extends Package {
|
|
|
89
89
|
repo._updateDependencies();
|
|
90
90
|
return repo;
|
|
91
91
|
}
|
|
92
|
+
/** If we reach to the root of the project */
|
|
93
|
+
if (fs.existsSync(path.join(pkgDirname, '.git')))
|
|
94
|
+
break;
|
|
92
95
|
}
|
|
93
|
-
pkgDirname = path.resolve(
|
|
96
|
+
pkgDirname = path.resolve(pkgDirname, '..');
|
|
94
97
|
}
|
|
95
98
|
const config = this._readConfig(dirname);
|
|
96
99
|
const repo = new Repository(dirname, config, false, []);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rman",
|
|
3
3
|
"description": "Repository manager",
|
|
4
|
-
"version": "0.37.
|
|
4
|
+
"version": "0.37.4",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"is-ci": "^4.1.0",
|
|
16
16
|
"js-yaml": "^4.1.1",
|
|
17
17
|
"npmlog": "^7.0.1",
|
|
18
|
-
"power-tasks": "^1.
|
|
18
|
+
"power-tasks": "^1.14.2",
|
|
19
19
|
"putil-merge": "^3.13.0",
|
|
20
20
|
"putil-varhelpers": "^1.7.0",
|
|
21
|
-
"semver": "^7.7.
|
|
21
|
+
"semver": "^7.7.4",
|
|
22
22
|
"signal-exit": "^4.1.0",
|
|
23
23
|
"strict-typed-events": "^2.8.0",
|
|
24
24
|
"strip-color": "^0.1.0",
|
package/utils/npm-run-path.d.ts
CHANGED