MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / getExecuteCommandParts

Function getExecuteCommandParts

app/utils/install-command.ts:159–172  ·  view source on GitHub ↗
(options: ExecuteCommandOptions)

Source from the content-addressed store, hash-verified

157}
158
159export function getExecuteCommandParts(options: ExecuteCommandOptions): string[] {
160 const pm = packageManagers.find(p => p.id === options.packageManager)
161 if (!pm) return []
162
163 // For create-* packages, use the shorthand create command.
164 const createSpecifier = getCreatePackageSpecifier(options)
165 if (createSpecifier) {
166 return [...pm.create.split(' '), createSpecifier]
167 }
168
169 // Choose remote or local execute based on package type
170 const executeCmd = options.isBinaryOnly ? pm.executeRemote : pm.executeLocal
171 return [...executeCmd.split(' '), getPackageSpecifier(options)]
172}

Callers 2

getExecuteCommandFunction · 0.85

Calls 2

getPackageSpecifierFunction · 0.85

Tested by

no test coverage detected