MCPcopy Create free account
hub / github.com/apache/maka / nodeCommand

Function nodeCommand

packages/runtime/src/__tests__/shell-run-manager.test.ts:2879–2890  ·  view source on GitHub ↗
(script: string)

Source from the content-addressed store, hash-verified

2877}
2878
2879function nodeCommand(script: string): string {
2880 const payload = Buffer.from(script, 'utf8').toString('base64');
2881 const bootstrap = `eval(Buffer.from('${payload}','base64').toString('utf8'))`;
2882 const shell = defaultShellPlan();
2883 if (shell.kind === 'pwsh' || shell.kind === 'powershell') {
2884 return `& ${powerShellQuote(process.execPath)} -e ${powerShellQuote(bootstrap)}`;
2885 }
2886 if (shell.kind === 'cmd') {
2887 return `${cmdQuote(process.execPath)} -e ${cmdQuote(bootstrap)}`;
2888 }
2889 return `${shellQuote(process.execPath)} -e ${shellQuote(bootstrap)}`;
2890}
2891
2892function waitForeverCommand(ready = ''): string {
2893 return nodeCommand(`

Callers 4

waitForeverCommandFunction · 0.85
rawLineReaderCommandFunction · 0.85
controlCharacterCommandFunction · 0.85

Calls 5

defaultShellPlanFunction · 0.85
powerShellQuoteFunction · 0.85
cmdQuoteFunction · 0.85
fromMethod · 0.80
shellQuoteFunction · 0.70

Tested by

no test coverage detected