@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.d.mts CHANGED
@@ -1,13 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- /**
4
- * Represents different log levels.
5
- * - `"log"`: Only essential messages.
6
- * - `"error"`: Errors and essential messages.
7
- * - `"warn"`: Warnings, Errors and essential messages.
8
- * - `"info"`: Info, Warnings, Errors and essential messages.
9
- * - `"debug"`: Everything.
10
- */
11
3
  type LogLevel = "log" | "error" | "warn" | "info" | "debug";
12
4
  declare class Logger {
13
5
  #private;
package/dist/index.d.ts CHANGED
@@ -1,13 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- /**
4
- * Represents different log levels.
5
- * - `"log"`: Only essential messages.
6
- * - `"error"`: Errors and essential messages.
7
- * - `"warn"`: Warnings, Errors and essential messages.
8
- * - `"info"`: Info, Warnings, Errors and essential messages.
9
- * - `"debug"`: Everything.
10
- */
11
3
  type LogLevel = "log" | "error" | "warn" | "info" | "debug";
12
4
  declare class Logger {
13
5
  #private;
package/dist/index.js CHANGED
@@ -227,6 +227,8 @@ __export(src_exports, {
227
227
  module.exports = __toCommonJS(src_exports);
228
228
 
229
229
  // src/logger.ts
230
+ var import_node_process = require("node:process");
231
+ var import_node_buffer = require("node:buffer");
230
232
  var logLevels = [
231
233
  "log",
232
234
  "error",
@@ -244,7 +246,7 @@ var _Logger = class _Logger {
244
246
  __privateAdd(this, _jsonReplacer, void 0);
245
247
  __privateAdd(this, _additionalFields, void 0);
246
248
  __privateSet(this, _name, name);
247
- __privateSet(this, _level, logLevels.indexOf(process.env.TRIGGER_LOG_LEVEL ?? level));
249
+ __privateSet(this, _level, logLevels.indexOf(import_node_process.env.TRIGGER_LOG_LEVEL ?? level));
248
250
  __privateSet(this, _filteredKeys, filteredKeys);
249
251
  __privateSet(this, _jsonReplacer, createReplacer(jsonReplacer));
250
252
  __privateSet(this, _additionalFields, additionalFields ?? (() => ({})));
@@ -365,7 +367,7 @@ function filterKeys(obj, keys) {
365
367
  }
366
368
  __name(filterKeys, "filterKeys");
367
369
  function prettyPrintBytes(value) {
368
- if (process.env.NODE_ENV === "production") {
370
+ if (import_node_process.env.NODE_ENV === "production") {
369
371
  return "skipped size";
370
372
  }
371
373
  const sizeInBytes = getSizeInBytes(value);
@@ -384,7 +386,7 @@ __name(prettyPrintBytes, "prettyPrintBytes");
384
386
  function getSizeInBytes(value) {
385
387
  const jsonString = JSON.stringify(value);
386
388
  if (typeof window === "undefined") {
387
- return Buffer.byteLength(jsonString, "utf8");
389
+ return import_node_buffer.Buffer.byteLength(jsonString, "utf8");
388
390
  } else {
389
391
  return new TextEncoder().encode(jsonString).length;
390
392
  }