MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / writeRunJson

Function writeRunJson

templates/keynote-2/src/cli.ts:160–174  ·  view source on GitHub ↗
(
  payload: object,
  connectorName: string,
  alpha: number,
)

Source from the content-addressed store, hash-verified

158 : fileURLToPath(new URL('../runs/', import.meta.url));
159
160async function writeRunJson(
161 payload: object,
162 connectorName: string,
163 alpha: number,
164) {
165 await mkdir(runsDir, { recursive: true });
166 const ts = new Date().toISOString().replace(/[:.]/g, '-');
167 const outFile = join(
168 runsDir,
169 `${testName}-${connectorName}-a${alpha}-${ts}.json`,
170 );
171 await writeFile(outFile, JSON.stringify(payload, null, 2));
172 console.log(`Wrote results to ${outFile}`);
173 return outFile;
174}
175
176(async () => {
177 const files = (await readdir(testDirPath)).filter(

Callers 1

cli.tsFile · 0.85

Calls 3

replaceMethod · 0.80
toISOStringMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…