@shushed/helpers 0.0.61 → 0.0.62

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -365,6 +365,18 @@ var import_jose = require("jose");
365
365
  // src-public/runtime.ts
366
366
  var import_logging = require("@google-cloud/logging");
367
367
  var DEFAULT_BRANCH = "migratedprod";
368
+ var getCircularReplacer = () => {
369
+ const seen = /* @__PURE__ */ new WeakSet();
370
+ return (key, value) => {
371
+ if (typeof value === "object" && value !== null) {
372
+ if (seen.has(value)) {
373
+ return;
374
+ }
375
+ seen.add(value);
376
+ }
377
+ return value;
378
+ };
379
+ };
368
380
  var Logging = class {
369
381
  constructor(workflowId, triggerId, systemEnvName) {
370
382
  this.workflowId = workflowId;
@@ -387,8 +399,8 @@ var Logging = class {
387
399
  this.errorFn = (...args) => log.entry(Object.assign({
388
400
  severity: import_logging.Severity.error
389
401
  }, this.metadata), ...args);
390
- this.logFn = (...args) => console.log(JSON.stringify(args));
391
- this.errorFn = (...args) => console.error(JSON.stringify(args));
402
+ this.logFn = (...args) => console.log(JSON.stringify(args, getCircularReplacer()));
403
+ this.errorFn = (...args) => console.error(JSON.stringify(args, getCircularReplacer()));
392
404
  } else {
393
405
  this.logFn = console.log;
394
406
  this.errorFn = console.error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",