UNPKG

@lerna/publish

Version:

Publish packages in the current project

48 lines (47 loc) 2.81 kB
"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var import_core = require("@lerna/core"); var changedCmd = __toESM(require("@lerna/commands/changed/command")); var cleanCmd = __toESM(require("@lerna/commands/clean/command")); var diffCmd = __toESM(require("@lerna/commands/diff/command")); var execCmd = __toESM(require("@lerna/commands/exec/command")); var importCmd = __toESM(require("@lerna/commands/import/command")); var infoCmd = __toESM(require("@lerna/commands/info/command")); var initCmd = __toESM(require("@lerna/commands/init/command")); var listCmd = __toESM(require("@lerna/commands/list/command")); var publishCmd = __toESM(require("@lerna/commands/publish/command")); var runCmd = __toESM(require("@lerna/commands/run/command")); var versionCmd = __toESM(require("@lerna/commands/version/command")); var addCachingCmd = __toESM(require("./commands/add-caching/command")); var repairCmd = __toESM(require("./commands/repair/command")); var watchCmd = __toESM(require("./commands/watch/command")); const { addCmd, bootstrapCmd, linkCmd } = require("@lerna/legacy-package-management"); const createCmd = require("@lerna/create/command"); const pkg = require("../package.json"); module.exports = function main(argv) { const context = { lernaVersion: pkg.version }; return (0, import_core.lernaCLI)().command(addCmd).command(addCachingCmd).command(bootstrapCmd).command(changedCmd).command(cleanCmd).command(createCmd).command(diffCmd).command(execCmd).command(importCmd).command(infoCmd).command(initCmd).command(linkCmd).command(listCmd).command(publishCmd).command(repairCmd).command(runCmd).command(watchCmd).command(versionCmd).parse(argv, context); };