node/deps/npm/lib/lifecycle-cmd.js
npm CLI robot 433d9a0486
deps: upgrade npm to 11.4.2
PR-URL: https://github.com/nodejs/node/pull/58696
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-06-20 04:39:59 +00:00

21 lines
537 B
JavaScript

const BaseCommand = require('./base-cmd.js')
// The implementation of commands that are just "run a script"
// restart, start, stop, test
class LifecycleCmd extends BaseCommand {
static usage = ['[-- <args>]']
static isShellout = true
static workspaces = true
static ignoreImplicitWorkspace = false
async exec (args) {
return this.npm.exec('run', [this.constructor.name, ...args])
}
async execWorkspaces (args) {
return this.npm.exec('run', [this.constructor.name, ...args])
}
}
module.exports = LifecycleCmd