Lines Matching defs:const
0 const runScript = require('@npmcli/run-script')
2 const { isServerPackage } = runScript
3 const pkgJson = require('@npmcli/package-json')
4 const log = require('../utils/log-shim.js')
5 const didYouMean = require('../utils/did-you-mean.js')
6 const { isWindowsShell } = require('../utils/is-windows.js')
8 const cmdList = [
19 const BaseCommand = require('../base-command.js')
39 const argv = opts.conf.argv.remain
41 const { content: { scripts = {} } } = await pkgJson.normalize(npm.localPrefix)
69 const scriptShell = this.npm.config.get('script-shell') || undefined
72 const { content } = await pkgJson.normalize(path)
75 const { scripts = {} } = pkg
93 const suggestions = await didYouMean(path, event)
100 const events = [[event, args]]
111 const opts = {
120 for (const [ev, evArgs] of events) {
131 const { content: { scripts, name, _id } } = await pkgJson.normalize(path || this.npm.localPrefix)
132 const pkgid = _id || name
138 const allScripts = Object.keys(scripts)
149 for (const [script, cmd] of Object.entries(scripts)) {
156 const indent = '\n '
157 const prefix = ' '
158 const cmds = []
159 const runScripts = []
160 for (const script of allScripts) {
161 const list = cmdList.includes(script) ? cmds : runScripts
164 const colorize = this.npm.chalk
174 for (const script of cmds) {
188 for (const script of runScripts) {
197 const res = []
200 for (const workspacePath of this.workspacePaths) {
201 const { content: pkg } = await pkgJson.normalize(workspacePath)
202 const runResult = await this.run(args, {
224 const res = {}
225 for (const workspacePath of this.workspacePaths) {
226 const { content: { scripts, name } } = await pkgJson.normalize(workspacePath)
234 for (const workspacePath of this.workspacePaths) {
235 const { content: { scripts, name } } = await pkgJson.normalize(workspacePath)
236 for (const [script, cmd] of Object.entries(scripts || {})) {
243 for (const workspacePath of this.workspacePaths) {