rman 0.15.0 → 0.16.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/commands/build-command.js +1 -1
- package/cjs/commands/publish-command.js +12 -2
- package/cjs/debug.js +1 -1
- package/cjs/utils/npm-utils.js +2 -2
- package/esm/commands/build-command.mjs +1 -1
- package/esm/commands/publish-command.d.ts +1 -0
- package/esm/commands/publish-command.mjs +12 -2
- package/esm/debug.mjs +1 -1
- package/esm/utils/npm-utils.mjs +2 -2
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ class BuildCommand extends run_command_1.RunCommand {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.BuildCommand = BuildCommand;
|
|
13
|
-
BuildCommand.commandName = '
|
|
13
|
+
BuildCommand.commandName = 'build';
|
|
14
14
|
(function (BuildCommand) {
|
|
15
15
|
function initCli(repository, program) {
|
|
16
16
|
program.command({
|
|
@@ -51,8 +51,11 @@ class PublishCommand extends run_command_1.RunCommand {
|
|
|
51
51
|
return super._exec({
|
|
52
52
|
...args,
|
|
53
53
|
cwd,
|
|
54
|
-
command: 'npm publish'
|
|
55
|
-
}, {
|
|
54
|
+
command: 'npm publish' + (this.options.access ? ' --access=' + this.options.access : '')
|
|
55
|
+
}, {
|
|
56
|
+
...options,
|
|
57
|
+
stdio: npmlog_1.default.levelIndex < 1000 ? 'inherit' : 'pipe'
|
|
58
|
+
});
|
|
56
59
|
}
|
|
57
60
|
return super._exec(args, options);
|
|
58
61
|
}
|
|
@@ -65,6 +68,13 @@ PublishCommand.commandName = 'publish';
|
|
|
65
68
|
'contents': {
|
|
66
69
|
describe: '# Subdirectory to publish',
|
|
67
70
|
type: 'string'
|
|
71
|
+
},
|
|
72
|
+
'access': {
|
|
73
|
+
describe: '# Tells the registry whether this package should be published as public or restricted. ' +
|
|
74
|
+
'Only applies to scoped packages, which default to restricted. If you don\'t have a paid account, ' +
|
|
75
|
+
'you must publish with --access public to publish scoped packages.',
|
|
76
|
+
type: 'string',
|
|
77
|
+
choices: ['public', 'restricted']
|
|
68
78
|
}
|
|
69
79
|
};
|
|
70
80
|
function initCli(repository, program) {
|
package/cjs/debug.js
CHANGED
package/cjs/utils/npm-utils.js
CHANGED
|
@@ -14,8 +14,8 @@ class NpmHelper {
|
|
|
14
14
|
cwd: this.cwd,
|
|
15
15
|
argv: ['view', packageName, '--json']
|
|
16
16
|
});
|
|
17
|
-
if (x.stdout) {
|
|
18
|
-
if (x.stdout.includes('404'))
|
|
17
|
+
if (x && x.stdout) {
|
|
18
|
+
if (x.code && x.stdout.includes('404'))
|
|
19
19
|
return new PackageNotFoundError('Package ' + packageName + ' not found in repository');
|
|
20
20
|
const b = x.stdout.indexOf('{');
|
|
21
21
|
const e = x.stdout.lastIndexOf('}');
|
|
@@ -20,6 +20,7 @@ export declare class PublishCommand extends RunCommand<PublishCommand.Options> {
|
|
|
20
20
|
export declare namespace PublishCommand {
|
|
21
21
|
interface Options extends RunCommand.Options {
|
|
22
22
|
contents?: string;
|
|
23
|
+
access?: string;
|
|
23
24
|
}
|
|
24
25
|
const cliCommandOptions: Record<string, yargs.Options>;
|
|
25
26
|
function initCli(repository: Repository, program: yargs.Argv): void;
|
|
@@ -45,8 +45,11 @@ export class PublishCommand extends RunCommand {
|
|
|
45
45
|
return super._exec({
|
|
46
46
|
...args,
|
|
47
47
|
cwd,
|
|
48
|
-
command: 'npm publish'
|
|
49
|
-
}, {
|
|
48
|
+
command: 'npm publish' + (this.options.access ? ' --access=' + this.options.access : '')
|
|
49
|
+
}, {
|
|
50
|
+
...options,
|
|
51
|
+
stdio: logger.levelIndex < 1000 ? 'inherit' : 'pipe'
|
|
52
|
+
});
|
|
50
53
|
}
|
|
51
54
|
return super._exec(args, options);
|
|
52
55
|
}
|
|
@@ -58,6 +61,13 @@ PublishCommand.commandName = 'publish';
|
|
|
58
61
|
'contents': {
|
|
59
62
|
describe: '# Subdirectory to publish',
|
|
60
63
|
type: 'string'
|
|
64
|
+
},
|
|
65
|
+
'access': {
|
|
66
|
+
describe: '# Tells the registry whether this package should be published as public or restricted. ' +
|
|
67
|
+
'Only applies to scoped packages, which default to restricted. If you don\'t have a paid account, ' +
|
|
68
|
+
'you must publish with --access public to publish scoped packages.',
|
|
69
|
+
type: 'string',
|
|
70
|
+
choices: ['public', 'restricted']
|
|
61
71
|
}
|
|
62
72
|
};
|
|
63
73
|
function initCli(repository, program) {
|
package/esm/debug.mjs
CHANGED
package/esm/utils/npm-utils.mjs
CHANGED
|
@@ -10,8 +10,8 @@ export class NpmHelper {
|
|
|
10
10
|
cwd: this.cwd,
|
|
11
11
|
argv: ['view', packageName, '--json']
|
|
12
12
|
});
|
|
13
|
-
if (x.stdout) {
|
|
14
|
-
if (x.stdout.includes('404'))
|
|
13
|
+
if (x && x.stdout) {
|
|
14
|
+
if (x.code && x.stdout.includes('404'))
|
|
15
15
|
return new PackageNotFoundError('Package ' + packageName + ' not found in repository');
|
|
16
16
|
const b = x.stdout.indexOf('{');
|
|
17
17
|
const e = x.stdout.lastIndexOf('}');
|