@alpic80/rivet-cli 1.24.2-aidon.12 → 1.24.2-aidon.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -321,6 +321,9 @@ function createProcessGraph(ctx) {
321
321
  });
322
322
  }
323
323
  const outputs = await runGraph(execOpts);
324
+ if (localCtx.logActivity) {
325
+ console.log(chalk.green('Run graph outputs,', printObject(outputs)));
326
+ }
324
327
  return new Response(JSON.stringify(outputs), {
325
328
  headers: {
326
329
  'Content-Type': 'application/json'
@@ -534,3 +537,19 @@ async function validateProjectRootDirectory(directory) {
534
537
  await throwIfMissingFile(directory);
535
538
  return (await stat(directory)).isDirectory();
536
539
  }
540
+ export function printObject(obj) {
541
+ const seen = new WeakSet();
542
+ return JSON.stringify(obj, (_, value) => {
543
+ if (typeof value === 'function') {
544
+ return `[Function: ${value.name || 'anonymous'}]`;
545
+ }
546
+ if (typeof value === 'object' && value !== null) {
547
+ if (seen.has(value)) {
548
+ return '[Circular]';
549
+ }
550
+ seen.add(value);
551
+ }
552
+ return value;
553
+ }, 2 // Indentation level for pretty-printing
554
+ );
555
+ }
@@ -58,4 +58,5 @@ type ServerContext = {
58
58
  pluginSettings?: Record<string, Record<string, unknown>>;
59
59
  };
60
60
  export declare function serve(cliArgs?: Partial<ServerContext>): Promise<void>;
61
+ export declare function printObject(obj: unknown): string;
61
62
  export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@alpic80/rivet-cli",
3
3
  "license": "MIT",
4
4
  "repository": "https://github.com/castortech/rivet",
5
- "version": "1.24.2-aidon.12",
5
+ "version": "1.24.2-aidon.14",
6
6
  "src": "bin/cli.ts",
7
7
  "bin": {
8
8
  "rivet": "bin/cli.js"