UNPKG

1.27 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const config_1 = require("@pnpm/config");
4const run_npm_1 = require("@pnpm/run-npm");
5const R = require("ramda");
6const renderHelp = require("render-help");
7const publish_1 = require("./publish");
8function rcOptionsTypes() {
9 return {
10 ...cliOptionsTypes(),
11 ...R.pick([
12 'npm-path',
13 ], config_1.types),
14 };
15}
16exports.rcOptionsTypes = rcOptionsTypes;
17function cliOptionsTypes() {
18 return {};
19}
20exports.cliOptionsTypes = cliOptionsTypes;
21exports.commandNames = ['pack'];
22function help() {
23 return renderHelp({
24 description: 'Creates a compressed gzip archive of package dependencies.',
25 usages: ['pnpm pack'],
26 });
27}
28exports.help = help;
29async 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}
43exports.handler = handler;
44//# sourceMappingURL=pack.js.map
\No newline at end of file