MCPcopy Create free account
hub / github.com/dfinity/orbit / saveArgumentInTempFile

Function saveArgumentInTempFile

cli/src/registry/publish.ts:132–140  ·  view source on GitHub ↗
(argument: string)

Source from the content-addressed store, hash-verified

130
131// Saves the argument in a temporary file and returns the path to the file.
132const saveArgumentInTempFile = async (argument: string): Promise<string> => {
133 const tempFilePath = join(tmpdir(), 'orbit-cli-argument-' + Math.random().toString(36).slice(2));
134
135 await writeFile(tempFilePath, argument, {
136 encoding: 'utf-8',
137 });
138
139 return tempFilePath;
140};
141
142command.action(async options => {
143 assertReplicaIsHealthy(options.network);

Callers 1

publish.tsFile · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected