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