sofa-api 0.16.2 → 0.16.3

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 (3) hide show
  1. package/index.js +3 -3
  2. package/index.mjs +3 -3
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -73,12 +73,12 @@ function resolveVariable({ value, type, schema, }) {
73
73
  }
74
74
  }
75
75
 
76
- var _a, _b;
76
+ var _a, _b, _c, _d, _e;
77
77
  const levels = ['error', 'warn', 'info', 'debug'];
78
78
  const toLevel = (string) => levels.includes(string) ? string : null;
79
- const currentLevel = ((_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.env.SOFA_DEBUG)
79
+ const currentLevel = ((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.SOFA_DEBUG)
80
80
  ? 'debug'
81
- : (_b = toLevel(process.env.SOFA_LOGGER_LEVEL)) !== null && _b !== void 0 ? _b : 'info';
81
+ : (_e = toLevel((_d = (_c = globalThis.process) === null || _c === void 0 ? void 0 : _c.env) === null || _d === void 0 ? void 0 : _d.SOFA_LOGGER_LEVEL)) !== null && _e !== void 0 ? _e : 'info';
82
82
  const log = (level, color, args) => {
83
83
  if (levels.indexOf(level) <= levels.indexOf(currentLevel)) {
84
84
  console.log(`${color(level)}:`, ...args);
package/index.mjs CHANGED
@@ -67,12 +67,12 @@ function resolveVariable({ value, type, schema, }) {
67
67
  }
68
68
  }
69
69
 
70
- var _a, _b;
70
+ var _a, _b, _c, _d, _e;
71
71
  const levels = ['error', 'warn', 'info', 'debug'];
72
72
  const toLevel = (string) => levels.includes(string) ? string : null;
73
- const currentLevel = ((_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.env.SOFA_DEBUG)
73
+ const currentLevel = ((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b.SOFA_DEBUG)
74
74
  ? 'debug'
75
- : (_b = toLevel(process.env.SOFA_LOGGER_LEVEL)) !== null && _b !== void 0 ? _b : 'info';
75
+ : (_e = toLevel((_d = (_c = globalThis.process) === null || _c === void 0 ? void 0 : _c.env) === null || _d === void 0 ? void 0 : _d.SOFA_LOGGER_LEVEL)) !== null && _e !== void 0 ? _e : 'info';
76
76
  const log = (level, color, args) => {
77
77
  if (levels.indexOf(level) <= levels.indexOf(currentLevel)) {
78
78
  console.log(`${color(level)}:`, ...args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sofa-api",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "description": "Create REST APIs with GraphQL",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {