1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const config_1 = require("@pnpm/config");
|
4 | const run_npm_1 = require("@pnpm/run-npm");
|
5 | const R = require("ramda");
|
6 | const renderHelp = require("render-help");
|
7 | const publish_1 = require("./publish");
|
8 | function rcOptionsTypes() {
|
9 | return {
|
10 | ...cliOptionsTypes(),
|
11 | ...R.pick([
|
12 | 'npm-path',
|
13 | ], config_1.types),
|
14 | };
|
15 | }
|
16 | exports.rcOptionsTypes = rcOptionsTypes;
|
17 | function cliOptionsTypes() {
|
18 | return {};
|
19 | }
|
20 | exports.cliOptionsTypes = cliOptionsTypes;
|
21 | exports.commandNames = ['pack'];
|
22 | function help() {
|
23 | return renderHelp({
|
24 | description: 'Creates a compressed gzip archive of package dependencies.',
|
25 | usages: ['pnpm pack'],
|
26 | });
|
27 | }
|
28 | exports.help = help;
|
29 | async function handler(opts) {
|
30 | let _status;
|
31 | await publish_1.fakeRegularManifest({
|
32 | dir: opts.dir,
|
33 | engineStrict: opts.engineStrict,
|
34 | workspaceDir: opts.workspaceDir || opts.dir,
|
35 | }, async () => {
|
36 | const { status } = await run_npm_1.default(opts.npmPath, ['pack', ...opts.argv.original.slice(1)]);
|
37 | _status = status;
|
38 | });
|
39 | if (_status !== 0) {
|
40 | process.exit(_status);
|
41 | }
|
42 | }
|
43 | exports.handler = handler;
|
44 |
|
\ | No newline at end of file |