@prisma/config 7.10.1 → 7.11.0-dev.10
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.js +12 -2
- package/package.json +5 -6
package/dist/index.js
CHANGED
|
@@ -176,13 +176,14 @@ function debugCreate(namespace) {
|
|
|
176
176
|
};
|
|
177
177
|
const debugCall = (...args) => {
|
|
178
178
|
const { enabled, namespace: namespace2, color, log } = instanceProps;
|
|
179
|
+
const isEnabled = topProps.enabled(namespace2) || enabled;
|
|
179
180
|
if (args.length !== 0) {
|
|
180
|
-
argsHistory.push([namespace2, ...args]);
|
|
181
|
+
argsHistory.push([namespace2, ...isEnabled ? args : args.map(summarizeArg)]);
|
|
181
182
|
}
|
|
182
183
|
if (argsHistory.length > MAX_ARGS_HISTORY) {
|
|
183
184
|
argsHistory.shift();
|
|
184
185
|
}
|
|
185
|
-
if (
|
|
186
|
+
if (isEnabled) {
|
|
186
187
|
const stringArgs = args.map((arg) => {
|
|
187
188
|
if (typeof arg === "string") {
|
|
188
189
|
return arg;
|
|
@@ -207,6 +208,15 @@ var Debug = new Proxy(debugCreate, {
|
|
|
207
208
|
get: (_, prop) => topProps[prop],
|
|
208
209
|
set: (_, prop, value) => topProps[prop] = value
|
|
209
210
|
});
|
|
211
|
+
function summarizeArg(arg) {
|
|
212
|
+
if (arg instanceof Error) {
|
|
213
|
+
return `${arg.name}: ${arg.message}`;
|
|
214
|
+
}
|
|
215
|
+
if (typeof arg === "object" && arg !== null || typeof arg === "function") {
|
|
216
|
+
return "[Object]";
|
|
217
|
+
}
|
|
218
|
+
return arg;
|
|
219
|
+
}
|
|
210
220
|
function safeStringify(value, indent = 2) {
|
|
211
221
|
const cache = /* @__PURE__ */ new Set();
|
|
212
222
|
return JSON.stringify(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/config",
|
|
3
|
-
"version": "7.10
|
|
3
|
+
"version": "7.11.0-dev.10",
|
|
4
4
|
"description": "Internal package used to define and read Prisma configuration files",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"c12": "3.3.4",
|
|
16
16
|
"deepmerge-ts": "8.0.2",
|
|
17
|
-
"effect": "3.
|
|
17
|
+
"effect": "3.22.1",
|
|
18
18
|
"empathic": "2.0.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"dotenv": "17.2.3",
|
|
22
|
-
"@prisma/debug": "7.10
|
|
23
|
-
"@prisma/get-platform": "7.10
|
|
22
|
+
"@prisma/debug": "7.11.0-dev.10",
|
|
23
|
+
"@prisma/get-platform": "7.11.0-dev.10"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist"
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"scripts": {
|
|
30
30
|
"dev": "DEV=true tsx helpers/build.ts",
|
|
31
|
-
"build": "tsx helpers/build.ts"
|
|
32
|
-
"test": "vitest run"
|
|
31
|
+
"build": "tsx helpers/build.ts"
|
|
33
32
|
}
|
|
34
33
|
}
|