@trigger.dev/core 0.0.0-cross-runtime-20231201154528 → 0.0.0-cross-runtime-20231201165423

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.
package/dist/index.mjs CHANGED
@@ -24,6 +24,8 @@ var __privateMethod = (obj, member, method) => {
24
24
  };
25
25
 
26
26
  // src/logger.ts
27
+ import { env } from "node:process";
28
+ import { Buffer as Buffer2 } from "node:buffer";
27
29
  var logLevels = [
28
30
  "log",
29
31
  "error",
@@ -41,7 +43,7 @@ var _Logger = class _Logger {
41
43
  __privateAdd(this, _jsonReplacer, void 0);
42
44
  __privateAdd(this, _additionalFields, void 0);
43
45
  __privateSet(this, _name, name);
44
- __privateSet(this, _level, logLevels.indexOf(process.env.TRIGGER_LOG_LEVEL ?? level));
46
+ __privateSet(this, _level, logLevels.indexOf(env.TRIGGER_LOG_LEVEL ?? level));
45
47
  __privateSet(this, _filteredKeys, filteredKeys);
46
48
  __privateSet(this, _jsonReplacer, createReplacer(jsonReplacer));
47
49
  __privateSet(this, _additionalFields, additionalFields ?? (() => ({})));
@@ -162,7 +164,7 @@ function filterKeys(obj, keys) {
162
164
  }
163
165
  __name(filterKeys, "filterKeys");
164
166
  function prettyPrintBytes(value) {
165
- if (process.env.NODE_ENV === "production") {
167
+ if (env.NODE_ENV === "production") {
166
168
  return "skipped size";
167
169
  }
168
170
  const sizeInBytes = getSizeInBytes(value);
@@ -181,7 +183,7 @@ __name(prettyPrintBytes, "prettyPrintBytes");
181
183
  function getSizeInBytes(value) {
182
184
  const jsonString = JSON.stringify(value);
183
185
  if (typeof window === "undefined") {
184
- return Buffer.byteLength(jsonString, "utf8");
186
+ return Buffer2.byteLength(jsonString, "utf8");
185
187
  } else {
186
188
  return new TextEncoder().encode(jsonString).length;
187
189
  }