UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

32 lines 1.55 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); const pnpm_list_1 = require("pnpm-list"); const LAYOUT_VERSION = '1'; function default_1(args, opts, command) { return __awaiter(this, void 0, void 0, function* () { opts.long = opts.long || command === 'll' || command === 'la'; const only = (opts.production && opts.development ? undefined : (opts.production ? 'prod' : 'dev')); const listOpts = { alwaysPrintRootPackage: opts.alwaysPrintRootPackage, depth: opts.depth || 0, long: opts.long, only, parseable: opts.parseable, }; const output = args.length ? yield pnpm_list_1.forPackages(args, opts.prefix, listOpts) : yield pnpm_list_1.default(opts.prefix, listOpts); if (output) console.log(output); }); } exports.default = default_1; //# sourceMappingURL=list.js.map