MCPcopy Index your code
hub / github.com/cameri/nostream / createShimCommand

Function createShimCommand

test/unit/cli/cli.integration.spec.ts:81–89  ·  view source on GitHub ↗
(dir: string, name: string, scriptBody: string)

Source from the content-addressed store, hash-verified

79}
80
81const createShimCommand = (dir: string, name: string, scriptBody: string) => {
82 const target = path.join(dir, name)
83 fs.writeFileSync(
84 target,
85 ['#!/usr/bin/env bash', 'set -euo pipefail', scriptBody].join('\n'),
86 'utf-8',
87 )
88 fs.chmodSync(target, 0o755)
89}
90
91const parsePackJsonOutput = <T>(output: string): T => {
92 const start = output.search(/^\s*[\[{]/m)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected