MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / decodeEncodedCommand

Function decodeEncodedCommand

__tests__/upgrade.test.ts:480–484  ·  view source on GitHub ↗

Decode a `-EncodedCommand` base64 (UTF-16LE) payload back to its script.

(args: string[])

Source from the content-addressed store, hash-verified

478
479/** Decode a `-EncodedCommand` base64 (UTF-16LE) payload back to its script. */
480function decodeEncodedCommand(args: string[]): string {
481 const i = args.indexOf('-EncodedCommand');
482 if (i < 0) throw new Error('no -EncodedCommand in args');
483 return Buffer.from(args[i + 1]!, 'base64').toString('utf16le');
484}
485
486describe('runUpgrade', () => {
487 it('does nothing when already up to date', async () => {

Callers 1

upgrade.test.tsFile · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected