UNPKG

@atomist/sdm-pack-node

Version:

Extension pack for an Atomist SDM to work with Node.js projects

50 lines 2.11 kB
"use strict"; /* * Copyright © 2018 Atomist, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); const sdm_1 = require("@atomist/sdm"); const executePublish_1 = require("../build/executePublish"); const nodeProjectIdentifier_1 = require("../build/nodeProjectIdentifier"); /** * Goal that performs NPM registry publication */ class NpmPublish extends sdm_1.FulfillableGoalWithRegistrations { constructor(goalDetailsOrUniqueName = sdm_1.DefaultGoalNameGenerator.generateName("npm-publish"), ...dependsOn) { super(Object.assign({}, PublishDefiniton, sdm_1.getGoalDefinitionFrom(goalDetailsOrUniqueName, sdm_1.DefaultGoalNameGenerator.generateName("npm-publish"))), ...dependsOn); this.goalDetailsOrUniqueName = goalDetailsOrUniqueName; } with(registration) { this.addFulfillment({ name: registration.name, goalExecutor: executePublish_1.executePublish(nodeProjectIdentifier_1.NodeProjectIdentifier, registration.options), pushTest: registration.pushTest, logInterpreter: registration.logInterpreter, progressReporter: registration.progressReporter, }); return this; } } exports.NpmPublish = NpmPublish; const PublishDefiniton = { uniqueName: "publish", environment: sdm_1.IndependentOfEnvironment, displayName: "publish", workingDescription: "Publishing", completedDescription: "Published", failedDescription: "Publish failed", isolated: true, }; //# sourceMappingURL=NpmPublish.js.map