@prisma/config 6.5.0-integration-fix-e2e-prisma-config-2.1 → 6.5.0-integration-fix-e2e-prisma-config-2.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.
@@ -37,6 +37,192 @@ __export(PrismaConfig_exports, {
37
37
  });
38
38
  module.exports = __toCommonJS(PrismaConfig_exports);
39
39
 
40
+ // ../debug/dist/index.mjs
41
+ var __defProp2 = Object.defineProperty;
42
+ var __export2 = (target, all5) => {
43
+ for (var name in all5)
44
+ __defProp2(target, name, { get: all5[name], enumerable: true });
45
+ };
46
+ var colors_exports = {};
47
+ __export2(colors_exports, {
48
+ $: () => $,
49
+ bgBlack: () => bgBlack,
50
+ bgBlue: () => bgBlue,
51
+ bgCyan: () => bgCyan,
52
+ bgGreen: () => bgGreen,
53
+ bgMagenta: () => bgMagenta,
54
+ bgRed: () => bgRed,
55
+ bgWhite: () => bgWhite,
56
+ bgYellow: () => bgYellow,
57
+ black: () => black,
58
+ blue: () => blue,
59
+ bold: () => bold,
60
+ cyan: () => cyan,
61
+ dim: () => dim,
62
+ gray: () => gray,
63
+ green: () => green,
64
+ grey: () => grey,
65
+ hidden: () => hidden,
66
+ inverse: () => inverse,
67
+ italic: () => italic,
68
+ magenta: () => magenta,
69
+ red: () => red,
70
+ reset: () => reset,
71
+ strikethrough: () => strikethrough,
72
+ underline: () => underline,
73
+ white: () => white,
74
+ yellow: () => yellow
75
+ });
76
+ var FORCE_COLOR;
77
+ var NODE_DISABLE_COLORS;
78
+ var NO_COLOR;
79
+ var TERM;
80
+ var isTTY = true;
81
+ if (typeof process !== "undefined") {
82
+ ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
83
+ isTTY = process.stdout && process.stdout.isTTY;
84
+ }
85
+ var $ = {
86
+ enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
87
+ };
88
+ function init(x, y) {
89
+ let rgx = new RegExp(`\\x1b\\[${y}m`, "g");
90
+ let open = `\x1B[${x}m`, close2 = `\x1B[${y}m`;
91
+ return function(txt) {
92
+ if (!$.enabled || txt == null) return txt;
93
+ return open + (!!~("" + txt).indexOf(close2) ? txt.replace(rgx, close2 + open) : txt) + close2;
94
+ };
95
+ }
96
+ var reset = init(0, 0);
97
+ var bold = init(1, 22);
98
+ var dim = init(2, 22);
99
+ var italic = init(3, 23);
100
+ var underline = init(4, 24);
101
+ var inverse = init(7, 27);
102
+ var hidden = init(8, 28);
103
+ var strikethrough = init(9, 29);
104
+ var black = init(30, 39);
105
+ var red = init(31, 39);
106
+ var green = init(32, 39);
107
+ var yellow = init(33, 39);
108
+ var blue = init(34, 39);
109
+ var magenta = init(35, 39);
110
+ var cyan = init(36, 39);
111
+ var white = init(37, 39);
112
+ var gray = init(90, 39);
113
+ var grey = init(90, 39);
114
+ var bgBlack = init(40, 49);
115
+ var bgRed = init(41, 49);
116
+ var bgGreen = init(42, 49);
117
+ var bgYellow = init(43, 49);
118
+ var bgBlue = init(44, 49);
119
+ var bgMagenta = init(45, 49);
120
+ var bgCyan = init(46, 49);
121
+ var bgWhite = init(47, 49);
122
+ var MAX_ARGS_HISTORY = 100;
123
+ var COLORS = ["green", "yellow", "blue", "magenta", "cyan", "red"];
124
+ var argsHistory = [];
125
+ var lastTimestamp = Date.now();
126
+ var lastColor = 0;
127
+ var processEnv = typeof process !== "undefined" ? process.env : {};
128
+ globalThis.DEBUG ??= processEnv.DEBUG ?? "";
129
+ globalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === "true" : true;
130
+ var topProps = {
131
+ enable(namespace) {
132
+ if (typeof namespace === "string") {
133
+ globalThis.DEBUG = namespace;
134
+ }
135
+ },
136
+ disable() {
137
+ const prev = globalThis.DEBUG;
138
+ globalThis.DEBUG = "";
139
+ return prev;
140
+ },
141
+ // this is the core logic to check if logging should happen or not
142
+ enabled(namespace) {
143
+ const listenedNamespaces = globalThis.DEBUG.split(",").map((s) => {
144
+ return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
145
+ });
146
+ const isListened = listenedNamespaces.some((listenedNamespace) => {
147
+ if (listenedNamespace === "" || listenedNamespace[0] === "-") return false;
148
+ return namespace.match(RegExp(listenedNamespace.split("*").join(".*") + "$"));
149
+ });
150
+ const isExcluded = listenedNamespaces.some((listenedNamespace) => {
151
+ if (listenedNamespace === "" || listenedNamespace[0] !== "-") return false;
152
+ return namespace.match(RegExp(listenedNamespace.slice(1).split("*").join(".*") + "$"));
153
+ });
154
+ return isListened && !isExcluded;
155
+ },
156
+ log: (...args2) => {
157
+ const [namespace, format7, ...rest] = args2;
158
+ const logWithFormatting = console.warn ?? console.log;
159
+ logWithFormatting(`${namespace} ${format7}`, ...rest);
160
+ },
161
+ formatters: {}
162
+ // not implemented
163
+ };
164
+ function debugCreate(namespace) {
165
+ const instanceProps = {
166
+ color: COLORS[lastColor++ % COLORS.length],
167
+ enabled: topProps.enabled(namespace),
168
+ namespace,
169
+ log: topProps.log,
170
+ extend: () => {
171
+ }
172
+ // not implemented
173
+ };
174
+ const debugCall = (...args2) => {
175
+ const { enabled: enabled2, namespace: namespace2, color, log } = instanceProps;
176
+ if (args2.length !== 0) {
177
+ argsHistory.push([namespace2, ...args2]);
178
+ }
179
+ if (argsHistory.length > MAX_ARGS_HISTORY) {
180
+ argsHistory.shift();
181
+ }
182
+ if (topProps.enabled(namespace2) || enabled2) {
183
+ const stringArgs = args2.map((arg) => {
184
+ if (typeof arg === "string") {
185
+ return arg;
186
+ }
187
+ return safeStringify(arg);
188
+ });
189
+ const ms = `+${Date.now() - lastTimestamp}ms`;
190
+ lastTimestamp = Date.now();
191
+ if (globalThis.DEBUG_COLORS) {
192
+ log(colors_exports[color](bold(namespace2)), ...stringArgs, colors_exports[color](ms));
193
+ } else {
194
+ log(namespace2, ...stringArgs, ms);
195
+ }
196
+ }
197
+ };
198
+ return new Proxy(debugCall, {
199
+ get: (_, prop) => instanceProps[prop],
200
+ set: (_, prop, value3) => instanceProps[prop] = value3
201
+ });
202
+ }
203
+ var Debug = new Proxy(debugCreate, {
204
+ get: (_, prop) => topProps[prop],
205
+ set: (_, prop, value3) => topProps[prop] = value3
206
+ });
207
+ function safeStringify(value3, indent = 2) {
208
+ const cache = /* @__PURE__ */ new Set();
209
+ return JSON.stringify(
210
+ value3,
211
+ (key, value22) => {
212
+ if (typeof value22 === "object" && value22 !== null) {
213
+ if (cache.has(value22)) {
214
+ return `[Circular *]`;
215
+ }
216
+ cache.add(value22);
217
+ } else if (typeof value22 === "bigint") {
218
+ return value22.toString();
219
+ }
220
+ return value22;
221
+ },
222
+ indent
223
+ );
224
+ }
225
+
40
226
  // ../../node_modules/.pnpm/effect@3.12.10/node_modules/effect/dist/esm/Function.js
41
227
  var isFunction = (input) => typeof input === "function";
42
228
  var dual = function(arity, body) {
@@ -11329,7 +11515,7 @@ var Fatal = logLevelFatal;
11329
11515
  var Error2 = logLevelError;
11330
11516
  var Warning = logLevelWarning;
11331
11517
  var Info = logLevelInfo;
11332
- var Debug = logLevelDebug;
11518
+ var Debug2 = logLevelDebug;
11333
11519
  var Trace = logLevelTrace;
11334
11520
  var None3 = logLevelNone;
11335
11521
  var Order5 = /* @__PURE__ */ pipe(Order, /* @__PURE__ */ mapInput2((level) => level.ordinal));
@@ -11339,7 +11525,7 @@ var fromLiteral = (literal2) => {
11339
11525
  case "All":
11340
11526
  return All;
11341
11527
  case "Debug":
11342
- return Debug;
11528
+ return Debug2;
11343
11529
  case "Error":
11344
11530
  return Error2;
11345
11531
  case "Fatal":
@@ -22265,6 +22451,7 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
22265
22451
  };
22266
22452
 
22267
22453
  // src/PrismaConfig.ts
22454
+ var debug = Debug("prisma:config:PrismaConfig");
22268
22455
  var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
22269
22456
  /**
22270
22457
  * Tell Prisma to use a single `.prisma` schema file.
@@ -22302,7 +22489,7 @@ function parsePrismaConfigShape(input) {
22302
22489
  onExcessProperty: "error"
22303
22490
  });
22304
22491
  }
22305
- var PRISMA_CONFIG_INTERNAL_BRAND = Symbol("PrismaConfigInternal");
22492
+ var PRISMA_CONFIG_INTERNAL_BRAND = Symbol.for("PrismaConfigInternal");
22306
22493
  var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22307
22494
  /**
22308
22495
  * Whether features with an unstable API are enabled.
@@ -22319,6 +22506,11 @@ var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22319
22506
  loadedFromFile: Schema_exports.NullOr(Schema_exports.String)
22320
22507
  });
22321
22508
  function parsePrismaConfigInternalShape(input) {
22509
+ debug("Parsing PrismaConfigInternal: %o", input);
22510
+ if (typeof input === "object" && input !== null && input["__brand"] === PRISMA_CONFIG_INTERNAL_BRAND) {
22511
+ debug("Short-circuit: input is already a PrismaConfigInternal object");
22512
+ return Either_exports.right(input);
22513
+ }
22322
22514
  return pipe(
22323
22515
  Schema_exports.decodeUnknownEither(createPrismaConfigInternalShape(), {})(input, {
22324
22516
  onExcessProperty: "error"
@@ -22328,8 +22520,11 @@ function parsePrismaConfigInternalShape(input) {
22328
22520
  // This is done to work around the following issues:
22329
22521
  // - https://github.com/microsoft/rushstack/issues/1308
22330
22522
  // - https://github.com/microsoft/rushstack/issues/4034
22331
- // - https://github.com/microsoft/TypeScript/issues/58914
22332
- Either_exports.map((config2) => ({ ...config2, __brand: PRISMA_CONFIG_INTERNAL_BRAND }))
22523
+ // - https://github.com/microsoft/TypeScript/issues/58914
22524
+ Either_exports.map((config2) => {
22525
+ debug("Parsing PrismaConfigInternal succeeded, branding the output");
22526
+ return { ...config2, __brand: PRISMA_CONFIG_INTERNAL_BRAND };
22527
+ })
22333
22528
  );
22334
22529
  }
22335
22530
  function makePrismaConfigInternal(makeArgs) {
@@ -33,6 +33,192 @@ __export(defaultConfig_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(defaultConfig_exports);
35
35
 
36
+ // ../debug/dist/index.mjs
37
+ var __defProp2 = Object.defineProperty;
38
+ var __export2 = (target, all4) => {
39
+ for (var name in all4)
40
+ __defProp2(target, name, { get: all4[name], enumerable: true });
41
+ };
42
+ var colors_exports = {};
43
+ __export2(colors_exports, {
44
+ $: () => $,
45
+ bgBlack: () => bgBlack,
46
+ bgBlue: () => bgBlue,
47
+ bgCyan: () => bgCyan,
48
+ bgGreen: () => bgGreen,
49
+ bgMagenta: () => bgMagenta,
50
+ bgRed: () => bgRed,
51
+ bgWhite: () => bgWhite,
52
+ bgYellow: () => bgYellow,
53
+ black: () => black,
54
+ blue: () => blue,
55
+ bold: () => bold,
56
+ cyan: () => cyan,
57
+ dim: () => dim,
58
+ gray: () => gray,
59
+ green: () => green,
60
+ grey: () => grey,
61
+ hidden: () => hidden,
62
+ inverse: () => inverse,
63
+ italic: () => italic,
64
+ magenta: () => magenta,
65
+ red: () => red,
66
+ reset: () => reset,
67
+ strikethrough: () => strikethrough,
68
+ underline: () => underline,
69
+ white: () => white,
70
+ yellow: () => yellow
71
+ });
72
+ var FORCE_COLOR;
73
+ var NODE_DISABLE_COLORS;
74
+ var NO_COLOR;
75
+ var TERM;
76
+ var isTTY = true;
77
+ if (typeof process !== "undefined") {
78
+ ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
79
+ isTTY = process.stdout && process.stdout.isTTY;
80
+ }
81
+ var $ = {
82
+ enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
83
+ };
84
+ function init(x, y) {
85
+ let rgx = new RegExp(`\\x1b\\[${y}m`, "g");
86
+ let open = `\x1B[${x}m`, close2 = `\x1B[${y}m`;
87
+ return function(txt) {
88
+ if (!$.enabled || txt == null) return txt;
89
+ return open + (!!~("" + txt).indexOf(close2) ? txt.replace(rgx, close2 + open) : txt) + close2;
90
+ };
91
+ }
92
+ var reset = init(0, 0);
93
+ var bold = init(1, 22);
94
+ var dim = init(2, 22);
95
+ var italic = init(3, 23);
96
+ var underline = init(4, 24);
97
+ var inverse = init(7, 27);
98
+ var hidden = init(8, 28);
99
+ var strikethrough = init(9, 29);
100
+ var black = init(30, 39);
101
+ var red = init(31, 39);
102
+ var green = init(32, 39);
103
+ var yellow = init(33, 39);
104
+ var blue = init(34, 39);
105
+ var magenta = init(35, 39);
106
+ var cyan = init(36, 39);
107
+ var white = init(37, 39);
108
+ var gray = init(90, 39);
109
+ var grey = init(90, 39);
110
+ var bgBlack = init(40, 49);
111
+ var bgRed = init(41, 49);
112
+ var bgGreen = init(42, 49);
113
+ var bgYellow = init(43, 49);
114
+ var bgBlue = init(44, 49);
115
+ var bgMagenta = init(45, 49);
116
+ var bgCyan = init(46, 49);
117
+ var bgWhite = init(47, 49);
118
+ var MAX_ARGS_HISTORY = 100;
119
+ var COLORS = ["green", "yellow", "blue", "magenta", "cyan", "red"];
120
+ var argsHistory = [];
121
+ var lastTimestamp = Date.now();
122
+ var lastColor = 0;
123
+ var processEnv = typeof process !== "undefined" ? process.env : {};
124
+ globalThis.DEBUG ??= processEnv.DEBUG ?? "";
125
+ globalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === "true" : true;
126
+ var topProps = {
127
+ enable(namespace) {
128
+ if (typeof namespace === "string") {
129
+ globalThis.DEBUG = namespace;
130
+ }
131
+ },
132
+ disable() {
133
+ const prev = globalThis.DEBUG;
134
+ globalThis.DEBUG = "";
135
+ return prev;
136
+ },
137
+ // this is the core logic to check if logging should happen or not
138
+ enabled(namespace) {
139
+ const listenedNamespaces = globalThis.DEBUG.split(",").map((s) => {
140
+ return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
141
+ });
142
+ const isListened = listenedNamespaces.some((listenedNamespace) => {
143
+ if (listenedNamespace === "" || listenedNamespace[0] === "-") return false;
144
+ return namespace.match(RegExp(listenedNamespace.split("*").join(".*") + "$"));
145
+ });
146
+ const isExcluded = listenedNamespaces.some((listenedNamespace) => {
147
+ if (listenedNamespace === "" || listenedNamespace[0] !== "-") return false;
148
+ return namespace.match(RegExp(listenedNamespace.slice(1).split("*").join(".*") + "$"));
149
+ });
150
+ return isListened && !isExcluded;
151
+ },
152
+ log: (...args2) => {
153
+ const [namespace, format7, ...rest] = args2;
154
+ const logWithFormatting = console.warn ?? console.log;
155
+ logWithFormatting(`${namespace} ${format7}`, ...rest);
156
+ },
157
+ formatters: {}
158
+ // not implemented
159
+ };
160
+ function debugCreate(namespace) {
161
+ const instanceProps = {
162
+ color: COLORS[lastColor++ % COLORS.length],
163
+ enabled: topProps.enabled(namespace),
164
+ namespace,
165
+ log: topProps.log,
166
+ extend: () => {
167
+ }
168
+ // not implemented
169
+ };
170
+ const debugCall = (...args2) => {
171
+ const { enabled: enabled2, namespace: namespace2, color, log } = instanceProps;
172
+ if (args2.length !== 0) {
173
+ argsHistory.push([namespace2, ...args2]);
174
+ }
175
+ if (argsHistory.length > MAX_ARGS_HISTORY) {
176
+ argsHistory.shift();
177
+ }
178
+ if (topProps.enabled(namespace2) || enabled2) {
179
+ const stringArgs = args2.map((arg) => {
180
+ if (typeof arg === "string") {
181
+ return arg;
182
+ }
183
+ return safeStringify(arg);
184
+ });
185
+ const ms = `+${Date.now() - lastTimestamp}ms`;
186
+ lastTimestamp = Date.now();
187
+ if (globalThis.DEBUG_COLORS) {
188
+ log(colors_exports[color](bold(namespace2)), ...stringArgs, colors_exports[color](ms));
189
+ } else {
190
+ log(namespace2, ...stringArgs, ms);
191
+ }
192
+ }
193
+ };
194
+ return new Proxy(debugCall, {
195
+ get: (_, prop) => instanceProps[prop],
196
+ set: (_, prop, value3) => instanceProps[prop] = value3
197
+ });
198
+ }
199
+ var Debug = new Proxy(debugCreate, {
200
+ get: (_, prop) => topProps[prop],
201
+ set: (_, prop, value3) => topProps[prop] = value3
202
+ });
203
+ function safeStringify(value3, indent = 2) {
204
+ const cache = /* @__PURE__ */ new Set();
205
+ return JSON.stringify(
206
+ value3,
207
+ (key, value22) => {
208
+ if (typeof value22 === "object" && value22 !== null) {
209
+ if (cache.has(value22)) {
210
+ return `[Circular *]`;
211
+ }
212
+ cache.add(value22);
213
+ } else if (typeof value22 === "bigint") {
214
+ return value22.toString();
215
+ }
216
+ return value22;
217
+ },
218
+ indent
219
+ );
220
+ }
221
+
36
222
  // ../../node_modules/.pnpm/effect@3.12.10/node_modules/effect/dist/esm/Function.js
37
223
  var isFunction = (input) => typeof input === "function";
38
224
  var dual = function(arity, body) {
@@ -11207,7 +11393,7 @@ var Fatal = logLevelFatal;
11207
11393
  var Error2 = logLevelError;
11208
11394
  var Warning = logLevelWarning;
11209
11395
  var Info = logLevelInfo;
11210
- var Debug = logLevelDebug;
11396
+ var Debug2 = logLevelDebug;
11211
11397
  var Trace = logLevelTrace;
11212
11398
  var None3 = logLevelNone;
11213
11399
  var Order5 = /* @__PURE__ */ pipe(Order, /* @__PURE__ */ mapInput2((level) => level.ordinal));
@@ -11217,7 +11403,7 @@ var fromLiteral = (literal2) => {
11217
11403
  case "All":
11218
11404
  return All;
11219
11405
  case "Debug":
11220
- return Debug;
11406
+ return Debug2;
11221
11407
  case "Error":
11222
11408
  return Error2;
11223
11409
  case "Fatal":
@@ -22143,6 +22329,7 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
22143
22329
  };
22144
22330
 
22145
22331
  // src/PrismaConfig.ts
22332
+ var debug = Debug("prisma:config:PrismaConfig");
22146
22333
  var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
22147
22334
  /**
22148
22335
  * Tell Prisma to use a single `.prisma` schema file.
@@ -22165,7 +22352,7 @@ var PrismaConfigSchemaMultiShape = Schema_exports.Struct({
22165
22352
  folderPath: Schema_exports.String
22166
22353
  });
22167
22354
  var PrismaSchemaConfigShape = Schema_exports.Union(PrismaConfigSchemaSingleShape, PrismaConfigSchemaMultiShape);
22168
- var PRISMA_CONFIG_INTERNAL_BRAND = Symbol("PrismaConfigInternal");
22355
+ var PRISMA_CONFIG_INTERNAL_BRAND = Symbol.for("PrismaConfigInternal");
22169
22356
  var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22170
22357
  /**
22171
22358
  * Whether features with an unstable API are enabled.
@@ -33,6 +33,192 @@ __export(defaultTestConfig_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(defaultTestConfig_exports);
35
35
 
36
+ // ../debug/dist/index.mjs
37
+ var __defProp2 = Object.defineProperty;
38
+ var __export2 = (target, all4) => {
39
+ for (var name in all4)
40
+ __defProp2(target, name, { get: all4[name], enumerable: true });
41
+ };
42
+ var colors_exports = {};
43
+ __export2(colors_exports, {
44
+ $: () => $,
45
+ bgBlack: () => bgBlack,
46
+ bgBlue: () => bgBlue,
47
+ bgCyan: () => bgCyan,
48
+ bgGreen: () => bgGreen,
49
+ bgMagenta: () => bgMagenta,
50
+ bgRed: () => bgRed,
51
+ bgWhite: () => bgWhite,
52
+ bgYellow: () => bgYellow,
53
+ black: () => black,
54
+ blue: () => blue,
55
+ bold: () => bold,
56
+ cyan: () => cyan,
57
+ dim: () => dim,
58
+ gray: () => gray,
59
+ green: () => green,
60
+ grey: () => grey,
61
+ hidden: () => hidden,
62
+ inverse: () => inverse,
63
+ italic: () => italic,
64
+ magenta: () => magenta,
65
+ red: () => red,
66
+ reset: () => reset,
67
+ strikethrough: () => strikethrough,
68
+ underline: () => underline,
69
+ white: () => white,
70
+ yellow: () => yellow
71
+ });
72
+ var FORCE_COLOR;
73
+ var NODE_DISABLE_COLORS;
74
+ var NO_COLOR;
75
+ var TERM;
76
+ var isTTY = true;
77
+ if (typeof process !== "undefined") {
78
+ ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
79
+ isTTY = process.stdout && process.stdout.isTTY;
80
+ }
81
+ var $ = {
82
+ enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
83
+ };
84
+ function init(x, y) {
85
+ let rgx = new RegExp(`\\x1b\\[${y}m`, "g");
86
+ let open = `\x1B[${x}m`, close2 = `\x1B[${y}m`;
87
+ return function(txt) {
88
+ if (!$.enabled || txt == null) return txt;
89
+ return open + (!!~("" + txt).indexOf(close2) ? txt.replace(rgx, close2 + open) : txt) + close2;
90
+ };
91
+ }
92
+ var reset = init(0, 0);
93
+ var bold = init(1, 22);
94
+ var dim = init(2, 22);
95
+ var italic = init(3, 23);
96
+ var underline = init(4, 24);
97
+ var inverse = init(7, 27);
98
+ var hidden = init(8, 28);
99
+ var strikethrough = init(9, 29);
100
+ var black = init(30, 39);
101
+ var red = init(31, 39);
102
+ var green = init(32, 39);
103
+ var yellow = init(33, 39);
104
+ var blue = init(34, 39);
105
+ var magenta = init(35, 39);
106
+ var cyan = init(36, 39);
107
+ var white = init(37, 39);
108
+ var gray = init(90, 39);
109
+ var grey = init(90, 39);
110
+ var bgBlack = init(40, 49);
111
+ var bgRed = init(41, 49);
112
+ var bgGreen = init(42, 49);
113
+ var bgYellow = init(43, 49);
114
+ var bgBlue = init(44, 49);
115
+ var bgMagenta = init(45, 49);
116
+ var bgCyan = init(46, 49);
117
+ var bgWhite = init(47, 49);
118
+ var MAX_ARGS_HISTORY = 100;
119
+ var COLORS = ["green", "yellow", "blue", "magenta", "cyan", "red"];
120
+ var argsHistory = [];
121
+ var lastTimestamp = Date.now();
122
+ var lastColor = 0;
123
+ var processEnv = typeof process !== "undefined" ? process.env : {};
124
+ globalThis.DEBUG ??= processEnv.DEBUG ?? "";
125
+ globalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === "true" : true;
126
+ var topProps = {
127
+ enable(namespace) {
128
+ if (typeof namespace === "string") {
129
+ globalThis.DEBUG = namespace;
130
+ }
131
+ },
132
+ disable() {
133
+ const prev = globalThis.DEBUG;
134
+ globalThis.DEBUG = "";
135
+ return prev;
136
+ },
137
+ // this is the core logic to check if logging should happen or not
138
+ enabled(namespace) {
139
+ const listenedNamespaces = globalThis.DEBUG.split(",").map((s) => {
140
+ return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
141
+ });
142
+ const isListened = listenedNamespaces.some((listenedNamespace) => {
143
+ if (listenedNamespace === "" || listenedNamespace[0] === "-") return false;
144
+ return namespace.match(RegExp(listenedNamespace.split("*").join(".*") + "$"));
145
+ });
146
+ const isExcluded = listenedNamespaces.some((listenedNamespace) => {
147
+ if (listenedNamespace === "" || listenedNamespace[0] !== "-") return false;
148
+ return namespace.match(RegExp(listenedNamespace.slice(1).split("*").join(".*") + "$"));
149
+ });
150
+ return isListened && !isExcluded;
151
+ },
152
+ log: (...args2) => {
153
+ const [namespace, format7, ...rest] = args2;
154
+ const logWithFormatting = console.warn ?? console.log;
155
+ logWithFormatting(`${namespace} ${format7}`, ...rest);
156
+ },
157
+ formatters: {}
158
+ // not implemented
159
+ };
160
+ function debugCreate(namespace) {
161
+ const instanceProps = {
162
+ color: COLORS[lastColor++ % COLORS.length],
163
+ enabled: topProps.enabled(namespace),
164
+ namespace,
165
+ log: topProps.log,
166
+ extend: () => {
167
+ }
168
+ // not implemented
169
+ };
170
+ const debugCall = (...args2) => {
171
+ const { enabled: enabled2, namespace: namespace2, color, log } = instanceProps;
172
+ if (args2.length !== 0) {
173
+ argsHistory.push([namespace2, ...args2]);
174
+ }
175
+ if (argsHistory.length > MAX_ARGS_HISTORY) {
176
+ argsHistory.shift();
177
+ }
178
+ if (topProps.enabled(namespace2) || enabled2) {
179
+ const stringArgs = args2.map((arg) => {
180
+ if (typeof arg === "string") {
181
+ return arg;
182
+ }
183
+ return safeStringify(arg);
184
+ });
185
+ const ms = `+${Date.now() - lastTimestamp}ms`;
186
+ lastTimestamp = Date.now();
187
+ if (globalThis.DEBUG_COLORS) {
188
+ log(colors_exports[color](bold(namespace2)), ...stringArgs, colors_exports[color](ms));
189
+ } else {
190
+ log(namespace2, ...stringArgs, ms);
191
+ }
192
+ }
193
+ };
194
+ return new Proxy(debugCall, {
195
+ get: (_, prop) => instanceProps[prop],
196
+ set: (_, prop, value3) => instanceProps[prop] = value3
197
+ });
198
+ }
199
+ var Debug = new Proxy(debugCreate, {
200
+ get: (_, prop) => topProps[prop],
201
+ set: (_, prop, value3) => topProps[prop] = value3
202
+ });
203
+ function safeStringify(value3, indent = 2) {
204
+ const cache = /* @__PURE__ */ new Set();
205
+ return JSON.stringify(
206
+ value3,
207
+ (key, value22) => {
208
+ if (typeof value22 === "object" && value22 !== null) {
209
+ if (cache.has(value22)) {
210
+ return `[Circular *]`;
211
+ }
212
+ cache.add(value22);
213
+ } else if (typeof value22 === "bigint") {
214
+ return value22.toString();
215
+ }
216
+ return value22;
217
+ },
218
+ indent
219
+ );
220
+ }
221
+
36
222
  // ../../node_modules/.pnpm/effect@3.12.10/node_modules/effect/dist/esm/Function.js
37
223
  var isFunction = (input) => typeof input === "function";
38
224
  var dual = function(arity, body) {
@@ -11207,7 +11393,7 @@ var Fatal = logLevelFatal;
11207
11393
  var Error2 = logLevelError;
11208
11394
  var Warning = logLevelWarning;
11209
11395
  var Info = logLevelInfo;
11210
- var Debug = logLevelDebug;
11396
+ var Debug2 = logLevelDebug;
11211
11397
  var Trace = logLevelTrace;
11212
11398
  var None3 = logLevelNone;
11213
11399
  var Order5 = /* @__PURE__ */ pipe(Order, /* @__PURE__ */ mapInput2((level) => level.ordinal));
@@ -11217,7 +11403,7 @@ var fromLiteral = (literal2) => {
11217
11403
  case "All":
11218
11404
  return All;
11219
11405
  case "Debug":
11220
- return Debug;
11406
+ return Debug2;
11221
11407
  case "Error":
11222
11408
  return Error2;
11223
11409
  case "Fatal":
@@ -22143,6 +22329,7 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
22143
22329
  };
22144
22330
 
22145
22331
  // src/PrismaConfig.ts
22332
+ var debug = Debug("prisma:config:PrismaConfig");
22146
22333
  var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
22147
22334
  /**
22148
22335
  * Tell Prisma to use a single `.prisma` schema file.
@@ -22165,7 +22352,7 @@ var PrismaConfigSchemaMultiShape = Schema_exports.Struct({
22165
22352
  folderPath: Schema_exports.String
22166
22353
  });
22167
22354
  var PrismaSchemaConfigShape = Schema_exports.Union(PrismaConfigSchemaSingleShape, PrismaConfigSchemaMultiShape);
22168
- var PRISMA_CONFIG_INTERNAL_BRAND = Symbol("PrismaConfigInternal");
22355
+ var PRISMA_CONFIG_INTERNAL_BRAND = Symbol.for("PrismaConfigInternal");
22169
22356
  var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22170
22357
  /**
22171
22358
  * Whether features with an unstable API are enabled.
@@ -22329,6 +22329,7 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
22329
22329
  };
22330
22330
 
22331
22331
  // src/PrismaConfig.ts
22332
+ var debug = Debug("prisma:config:PrismaConfig");
22332
22333
  var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
22333
22334
  /**
22334
22335
  * Tell Prisma to use a single `.prisma` schema file.
@@ -22351,7 +22352,7 @@ var PrismaConfigSchemaMultiShape = Schema_exports.Struct({
22351
22352
  folderPath: Schema_exports.String
22352
22353
  });
22353
22354
  var PrismaSchemaConfigShape = Schema_exports.Union(PrismaConfigSchemaSingleShape, PrismaConfigSchemaMultiShape);
22354
- var PRISMA_CONFIG_INTERNAL_BRAND = Symbol("PrismaConfigInternal");
22355
+ var PRISMA_CONFIG_INTERNAL_BRAND = Symbol.for("PrismaConfigInternal");
22355
22356
  var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22356
22357
  /**
22357
22358
  * Whether features with an unstable API are enabled.
@@ -22383,9 +22384,10 @@ function defaultConfig() {
22383
22384
  }
22384
22385
 
22385
22386
  // src/defineConfig.ts
22386
- var debug = Debug("prisma:config:defineConfig");
22387
+ var debug2 = Debug("prisma:config:defineConfig");
22387
22388
  function defineConfig(configInput) {
22388
22389
  const config2 = defaultConfig();
22390
+ debug2("Prisma config [default]: %o", config2);
22389
22391
  defineSchemaConfig(config2, configInput);
22390
22392
  return config2;
22391
22393
  }
@@ -22394,7 +22396,7 @@ function defineSchemaConfig(config2, configInput) {
22394
22396
  return;
22395
22397
  }
22396
22398
  config2.schema = configInput.schema;
22397
- debug("Prisma config [schema]: %o", config2.schema);
22399
+ debug2("Prisma config [schema]: %o", config2.schema);
22398
22400
  }
22399
22401
  // Annotate the CommonJS export names for ESM import in node:
22400
22402
  0 && (module.exports = {
package/dist/index.js CHANGED
@@ -46,6 +46,192 @@ __export(index_exports, {
46
46
  });
47
47
  module.exports = __toCommonJS(index_exports);
48
48
 
49
+ // ../debug/dist/index.mjs
50
+ var __defProp2 = Object.defineProperty;
51
+ var __export2 = (target, all5) => {
52
+ for (var name in all5)
53
+ __defProp2(target, name, { get: all5[name], enumerable: true });
54
+ };
55
+ var colors_exports = {};
56
+ __export2(colors_exports, {
57
+ $: () => $,
58
+ bgBlack: () => bgBlack,
59
+ bgBlue: () => bgBlue,
60
+ bgCyan: () => bgCyan,
61
+ bgGreen: () => bgGreen,
62
+ bgMagenta: () => bgMagenta,
63
+ bgRed: () => bgRed,
64
+ bgWhite: () => bgWhite,
65
+ bgYellow: () => bgYellow,
66
+ black: () => black,
67
+ blue: () => blue,
68
+ bold: () => bold,
69
+ cyan: () => cyan,
70
+ dim: () => dim,
71
+ gray: () => gray,
72
+ green: () => green,
73
+ grey: () => grey,
74
+ hidden: () => hidden,
75
+ inverse: () => inverse,
76
+ italic: () => italic,
77
+ magenta: () => magenta,
78
+ red: () => red,
79
+ reset: () => reset,
80
+ strikethrough: () => strikethrough,
81
+ underline: () => underline,
82
+ white: () => white,
83
+ yellow: () => yellow
84
+ });
85
+ var FORCE_COLOR;
86
+ var NODE_DISABLE_COLORS;
87
+ var NO_COLOR;
88
+ var TERM;
89
+ var isTTY = true;
90
+ if (typeof process !== "undefined") {
91
+ ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
92
+ isTTY = process.stdout && process.stdout.isTTY;
93
+ }
94
+ var $ = {
95
+ enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
96
+ };
97
+ function init(x, y) {
98
+ let rgx = new RegExp(`\\x1b\\[${y}m`, "g");
99
+ let open = `\x1B[${x}m`, close2 = `\x1B[${y}m`;
100
+ return function(txt) {
101
+ if (!$.enabled || txt == null) return txt;
102
+ return open + (!!~("" + txt).indexOf(close2) ? txt.replace(rgx, close2 + open) : txt) + close2;
103
+ };
104
+ }
105
+ var reset = init(0, 0);
106
+ var bold = init(1, 22);
107
+ var dim = init(2, 22);
108
+ var italic = init(3, 23);
109
+ var underline = init(4, 24);
110
+ var inverse = init(7, 27);
111
+ var hidden = init(8, 28);
112
+ var strikethrough = init(9, 29);
113
+ var black = init(30, 39);
114
+ var red = init(31, 39);
115
+ var green = init(32, 39);
116
+ var yellow = init(33, 39);
117
+ var blue = init(34, 39);
118
+ var magenta = init(35, 39);
119
+ var cyan = init(36, 39);
120
+ var white = init(37, 39);
121
+ var gray = init(90, 39);
122
+ var grey = init(90, 39);
123
+ var bgBlack = init(40, 49);
124
+ var bgRed = init(41, 49);
125
+ var bgGreen = init(42, 49);
126
+ var bgYellow = init(43, 49);
127
+ var bgBlue = init(44, 49);
128
+ var bgMagenta = init(45, 49);
129
+ var bgCyan = init(46, 49);
130
+ var bgWhite = init(47, 49);
131
+ var MAX_ARGS_HISTORY = 100;
132
+ var COLORS = ["green", "yellow", "blue", "magenta", "cyan", "red"];
133
+ var argsHistory = [];
134
+ var lastTimestamp = Date.now();
135
+ var lastColor = 0;
136
+ var processEnv = typeof process !== "undefined" ? process.env : {};
137
+ globalThis.DEBUG ??= processEnv.DEBUG ?? "";
138
+ globalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === "true" : true;
139
+ var topProps = {
140
+ enable(namespace) {
141
+ if (typeof namespace === "string") {
142
+ globalThis.DEBUG = namespace;
143
+ }
144
+ },
145
+ disable() {
146
+ const prev = globalThis.DEBUG;
147
+ globalThis.DEBUG = "";
148
+ return prev;
149
+ },
150
+ // this is the core logic to check if logging should happen or not
151
+ enabled(namespace) {
152
+ const listenedNamespaces = globalThis.DEBUG.split(",").map((s) => {
153
+ return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
154
+ });
155
+ const isListened = listenedNamespaces.some((listenedNamespace) => {
156
+ if (listenedNamespace === "" || listenedNamespace[0] === "-") return false;
157
+ return namespace.match(RegExp(listenedNamespace.split("*").join(".*") + "$"));
158
+ });
159
+ const isExcluded = listenedNamespaces.some((listenedNamespace) => {
160
+ if (listenedNamespace === "" || listenedNamespace[0] !== "-") return false;
161
+ return namespace.match(RegExp(listenedNamespace.slice(1).split("*").join(".*") + "$"));
162
+ });
163
+ return isListened && !isExcluded;
164
+ },
165
+ log: (...args2) => {
166
+ const [namespace, format7, ...rest] = args2;
167
+ const logWithFormatting = console.warn ?? console.log;
168
+ logWithFormatting(`${namespace} ${format7}`, ...rest);
169
+ },
170
+ formatters: {}
171
+ // not implemented
172
+ };
173
+ function debugCreate(namespace) {
174
+ const instanceProps = {
175
+ color: COLORS[lastColor++ % COLORS.length],
176
+ enabled: topProps.enabled(namespace),
177
+ namespace,
178
+ log: topProps.log,
179
+ extend: () => {
180
+ }
181
+ // not implemented
182
+ };
183
+ const debugCall = (...args2) => {
184
+ const { enabled: enabled2, namespace: namespace2, color, log } = instanceProps;
185
+ if (args2.length !== 0) {
186
+ argsHistory.push([namespace2, ...args2]);
187
+ }
188
+ if (argsHistory.length > MAX_ARGS_HISTORY) {
189
+ argsHistory.shift();
190
+ }
191
+ if (topProps.enabled(namespace2) || enabled2) {
192
+ const stringArgs = args2.map((arg) => {
193
+ if (typeof arg === "string") {
194
+ return arg;
195
+ }
196
+ return safeStringify(arg);
197
+ });
198
+ const ms = `+${Date.now() - lastTimestamp}ms`;
199
+ lastTimestamp = Date.now();
200
+ if (globalThis.DEBUG_COLORS) {
201
+ log(colors_exports[color](bold(namespace2)), ...stringArgs, colors_exports[color](ms));
202
+ } else {
203
+ log(namespace2, ...stringArgs, ms);
204
+ }
205
+ }
206
+ };
207
+ return new Proxy(debugCall, {
208
+ get: (_, prop) => instanceProps[prop],
209
+ set: (_, prop, value3) => instanceProps[prop] = value3
210
+ });
211
+ }
212
+ var Debug = new Proxy(debugCreate, {
213
+ get: (_, prop) => topProps[prop],
214
+ set: (_, prop, value3) => topProps[prop] = value3
215
+ });
216
+ function safeStringify(value3, indent = 2) {
217
+ const cache = /* @__PURE__ */ new Set();
218
+ return JSON.stringify(
219
+ value3,
220
+ (key, value22) => {
221
+ if (typeof value22 === "object" && value22 !== null) {
222
+ if (cache.has(value22)) {
223
+ return `[Circular *]`;
224
+ }
225
+ cache.add(value22);
226
+ } else if (typeof value22 === "bigint") {
227
+ return value22.toString();
228
+ }
229
+ return value22;
230
+ },
231
+ indent
232
+ );
233
+ }
234
+
49
235
  // ../../node_modules/.pnpm/effect@3.12.10/node_modules/effect/dist/esm/Function.js
50
236
  var isFunction = (input) => typeof input === "function";
51
237
  var dual = function(arity, body) {
@@ -11338,7 +11524,7 @@ var Fatal = logLevelFatal;
11338
11524
  var Error2 = logLevelError;
11339
11525
  var Warning = logLevelWarning;
11340
11526
  var Info = logLevelInfo;
11341
- var Debug = logLevelDebug;
11527
+ var Debug2 = logLevelDebug;
11342
11528
  var Trace = logLevelTrace;
11343
11529
  var None3 = logLevelNone;
11344
11530
  var Order5 = /* @__PURE__ */ pipe(Order, /* @__PURE__ */ mapInput2((level) => level.ordinal));
@@ -11348,7 +11534,7 @@ var fromLiteral = (literal2) => {
11348
11534
  case "All":
11349
11535
  return All;
11350
11536
  case "Debug":
11351
- return Debug;
11537
+ return Debug2;
11352
11538
  case "Error":
11353
11539
  return Error2;
11354
11540
  case "Fatal":
@@ -22274,6 +22460,7 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
22274
22460
  };
22275
22461
 
22276
22462
  // src/PrismaConfig.ts
22463
+ var debug = Debug("prisma:config:PrismaConfig");
22277
22464
  var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
22278
22465
  /**
22279
22466
  * Tell Prisma to use a single `.prisma` schema file.
@@ -22311,7 +22498,7 @@ function parsePrismaConfigShape(input) {
22311
22498
  onExcessProperty: "error"
22312
22499
  });
22313
22500
  }
22314
- var PRISMA_CONFIG_INTERNAL_BRAND = Symbol("PrismaConfigInternal");
22501
+ var PRISMA_CONFIG_INTERNAL_BRAND = Symbol.for("PrismaConfigInternal");
22315
22502
  var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22316
22503
  /**
22317
22504
  * Whether features with an unstable API are enabled.
@@ -22328,6 +22515,11 @@ var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22328
22515
  loadedFromFile: Schema_exports.NullOr(Schema_exports.String)
22329
22516
  });
22330
22517
  function parsePrismaConfigInternalShape(input) {
22518
+ debug("Parsing PrismaConfigInternal: %o", input);
22519
+ if (typeof input === "object" && input !== null && input["__brand"] === PRISMA_CONFIG_INTERNAL_BRAND) {
22520
+ debug("Short-circuit: input is already a PrismaConfigInternal object");
22521
+ return Either_exports.right(input);
22522
+ }
22331
22523
  return pipe(
22332
22524
  Schema_exports.decodeUnknownEither(createPrismaConfigInternalShape(), {})(input, {
22333
22525
  onExcessProperty: "error"
@@ -22337,8 +22529,11 @@ function parsePrismaConfigInternalShape(input) {
22337
22529
  // This is done to work around the following issues:
22338
22530
  // - https://github.com/microsoft/rushstack/issues/1308
22339
22531
  // - https://github.com/microsoft/rushstack/issues/4034
22340
- // - https://github.com/microsoft/TypeScript/issues/58914
22341
- Either_exports.map((config2) => ({ ...config2, __brand: PRISMA_CONFIG_INTERNAL_BRAND }))
22532
+ // - https://github.com/microsoft/TypeScript/issues/58914
22533
+ Either_exports.map((config2) => {
22534
+ debug("Parsing PrismaConfigInternal succeeded, branding the output");
22535
+ return { ...config2, __brand: PRISMA_CONFIG_INTERNAL_BRAND };
22536
+ })
22342
22537
  );
22343
22538
  }
22344
22539
  function makePrismaConfigInternal(makeArgs) {
@@ -22364,196 +22559,11 @@ function defaultTestConfig() {
22364
22559
  });
22365
22560
  }
22366
22561
 
22367
- // ../debug/dist/index.mjs
22368
- var __defProp2 = Object.defineProperty;
22369
- var __export2 = (target, all5) => {
22370
- for (var name in all5)
22371
- __defProp2(target, name, { get: all5[name], enumerable: true });
22372
- };
22373
- var colors_exports = {};
22374
- __export2(colors_exports, {
22375
- $: () => $,
22376
- bgBlack: () => bgBlack,
22377
- bgBlue: () => bgBlue,
22378
- bgCyan: () => bgCyan,
22379
- bgGreen: () => bgGreen,
22380
- bgMagenta: () => bgMagenta,
22381
- bgRed: () => bgRed,
22382
- bgWhite: () => bgWhite,
22383
- bgYellow: () => bgYellow,
22384
- black: () => black,
22385
- blue: () => blue,
22386
- bold: () => bold,
22387
- cyan: () => cyan,
22388
- dim: () => dim,
22389
- gray: () => gray,
22390
- green: () => green,
22391
- grey: () => grey,
22392
- hidden: () => hidden,
22393
- inverse: () => inverse2,
22394
- italic: () => italic,
22395
- magenta: () => magenta,
22396
- red: () => red,
22397
- reset: () => reset,
22398
- strikethrough: () => strikethrough,
22399
- underline: () => underline,
22400
- white: () => white,
22401
- yellow: () => yellow
22402
- });
22403
- var FORCE_COLOR;
22404
- var NODE_DISABLE_COLORS;
22405
- var NO_COLOR;
22406
- var TERM;
22407
- var isTTY = true;
22408
- if (typeof process !== "undefined") {
22409
- ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
22410
- isTTY = process.stdout && process.stdout.isTTY;
22411
- }
22412
- var $ = {
22413
- enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY)
22414
- };
22415
- function init(x, y) {
22416
- let rgx = new RegExp(`\\x1b\\[${y}m`, "g");
22417
- let open = `\x1B[${x}m`, close2 = `\x1B[${y}m`;
22418
- return function(txt) {
22419
- if (!$.enabled || txt == null) return txt;
22420
- return open + (!!~("" + txt).indexOf(close2) ? txt.replace(rgx, close2 + open) : txt) + close2;
22421
- };
22422
- }
22423
- var reset = init(0, 0);
22424
- var bold = init(1, 22);
22425
- var dim = init(2, 22);
22426
- var italic = init(3, 23);
22427
- var underline = init(4, 24);
22428
- var inverse2 = init(7, 27);
22429
- var hidden = init(8, 28);
22430
- var strikethrough = init(9, 29);
22431
- var black = init(30, 39);
22432
- var red = init(31, 39);
22433
- var green = init(32, 39);
22434
- var yellow = init(33, 39);
22435
- var blue = init(34, 39);
22436
- var magenta = init(35, 39);
22437
- var cyan = init(36, 39);
22438
- var white = init(37, 39);
22439
- var gray = init(90, 39);
22440
- var grey = init(90, 39);
22441
- var bgBlack = init(40, 49);
22442
- var bgRed = init(41, 49);
22443
- var bgGreen = init(42, 49);
22444
- var bgYellow = init(43, 49);
22445
- var bgBlue = init(44, 49);
22446
- var bgMagenta = init(45, 49);
22447
- var bgCyan = init(46, 49);
22448
- var bgWhite = init(47, 49);
22449
- var MAX_ARGS_HISTORY = 100;
22450
- var COLORS = ["green", "yellow", "blue", "magenta", "cyan", "red"];
22451
- var argsHistory = [];
22452
- var lastTimestamp = Date.now();
22453
- var lastColor = 0;
22454
- var processEnv = typeof process !== "undefined" ? process.env : {};
22455
- globalThis.DEBUG ??= processEnv.DEBUG ?? "";
22456
- globalThis.DEBUG_COLORS ??= processEnv.DEBUG_COLORS ? processEnv.DEBUG_COLORS === "true" : true;
22457
- var topProps = {
22458
- enable(namespace) {
22459
- if (typeof namespace === "string") {
22460
- globalThis.DEBUG = namespace;
22461
- }
22462
- },
22463
- disable() {
22464
- const prev = globalThis.DEBUG;
22465
- globalThis.DEBUG = "";
22466
- return prev;
22467
- },
22468
- // this is the core logic to check if logging should happen or not
22469
- enabled(namespace) {
22470
- const listenedNamespaces = globalThis.DEBUG.split(",").map((s) => {
22471
- return s.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
22472
- });
22473
- const isListened = listenedNamespaces.some((listenedNamespace) => {
22474
- if (listenedNamespace === "" || listenedNamespace[0] === "-") return false;
22475
- return namespace.match(RegExp(listenedNamespace.split("*").join(".*") + "$"));
22476
- });
22477
- const isExcluded = listenedNamespaces.some((listenedNamespace) => {
22478
- if (listenedNamespace === "" || listenedNamespace[0] !== "-") return false;
22479
- return namespace.match(RegExp(listenedNamespace.slice(1).split("*").join(".*") + "$"));
22480
- });
22481
- return isListened && !isExcluded;
22482
- },
22483
- log: (...args2) => {
22484
- const [namespace, format7, ...rest] = args2;
22485
- const logWithFormatting = console.warn ?? console.log;
22486
- logWithFormatting(`${namespace} ${format7}`, ...rest);
22487
- },
22488
- formatters: {}
22489
- // not implemented
22490
- };
22491
- function debugCreate(namespace) {
22492
- const instanceProps = {
22493
- color: COLORS[lastColor++ % COLORS.length],
22494
- enabled: topProps.enabled(namespace),
22495
- namespace,
22496
- log: topProps.log,
22497
- extend: () => {
22498
- }
22499
- // not implemented
22500
- };
22501
- const debugCall = (...args2) => {
22502
- const { enabled: enabled2, namespace: namespace2, color, log } = instanceProps;
22503
- if (args2.length !== 0) {
22504
- argsHistory.push([namespace2, ...args2]);
22505
- }
22506
- if (argsHistory.length > MAX_ARGS_HISTORY) {
22507
- argsHistory.shift();
22508
- }
22509
- if (topProps.enabled(namespace2) || enabled2) {
22510
- const stringArgs = args2.map((arg) => {
22511
- if (typeof arg === "string") {
22512
- return arg;
22513
- }
22514
- return safeStringify(arg);
22515
- });
22516
- const ms = `+${Date.now() - lastTimestamp}ms`;
22517
- lastTimestamp = Date.now();
22518
- if (globalThis.DEBUG_COLORS) {
22519
- log(colors_exports[color](bold(namespace2)), ...stringArgs, colors_exports[color](ms));
22520
- } else {
22521
- log(namespace2, ...stringArgs, ms);
22522
- }
22523
- }
22524
- };
22525
- return new Proxy(debugCall, {
22526
- get: (_, prop) => instanceProps[prop],
22527
- set: (_, prop, value3) => instanceProps[prop] = value3
22528
- });
22529
- }
22530
- var Debug2 = new Proxy(debugCreate, {
22531
- get: (_, prop) => topProps[prop],
22532
- set: (_, prop, value3) => topProps[prop] = value3
22533
- });
22534
- function safeStringify(value3, indent = 2) {
22535
- const cache = /* @__PURE__ */ new Set();
22536
- return JSON.stringify(
22537
- value3,
22538
- (key, value22) => {
22539
- if (typeof value22 === "object" && value22 !== null) {
22540
- if (cache.has(value22)) {
22541
- return `[Circular *]`;
22542
- }
22543
- cache.add(value22);
22544
- } else if (typeof value22 === "bigint") {
22545
- return value22.toString();
22546
- }
22547
- return value22;
22548
- },
22549
- indent
22550
- );
22551
- }
22552
-
22553
22562
  // src/defineConfig.ts
22554
- var debug = Debug2("prisma:config:defineConfig");
22563
+ var debug2 = Debug("prisma:config:defineConfig");
22555
22564
  function defineConfig(configInput) {
22556
22565
  const config2 = defaultConfig();
22566
+ debug2("Prisma config [default]: %o", config2);
22557
22567
  defineSchemaConfig(config2, configInput);
22558
22568
  return config2;
22559
22569
  }
@@ -22562,14 +22572,14 @@ function defineSchemaConfig(config2, configInput) {
22562
22572
  return;
22563
22573
  }
22564
22574
  config2.schema = configInput.schema;
22565
- debug("Prisma config [schema]: %o", config2.schema);
22575
+ debug2("Prisma config [schema]: %o", config2.schema);
22566
22576
  }
22567
22577
 
22568
22578
  // src/loadConfigFromFile.ts
22569
22579
  var import_node_fs = __toESM(require("node:fs"));
22570
22580
  var import_node_path = __toESM(require("node:path"));
22571
22581
  var import_node_process = __toESM(require("node:process"));
22572
- var debug2 = Debug2("prisma:config:loadConfigFromFile");
22582
+ var debug3 = Debug("prisma:config:loadConfigFromFile");
22573
22583
  async function loadConfigFromFile({
22574
22584
  configFile,
22575
22585
  configRoot = import_node_process.default.cwd()
@@ -22580,13 +22590,13 @@ async function loadConfigFromFile({
22580
22590
  if (configFile) {
22581
22591
  resolvedPath = import_node_path.default.resolve(configRoot, configFile);
22582
22592
  if (!import_node_fs.default.existsSync(resolvedPath)) {
22583
- debug2(`The given config file was not found at %s`, resolvedPath);
22593
+ debug3(`The given config file was not found at %s`, resolvedPath);
22584
22594
  return { resolvedPath, error: { _tag: "ConfigFileNotFound" } };
22585
22595
  }
22586
22596
  } else {
22587
22597
  resolvedPath = ["prisma.config.ts"].map((file) => import_node_path.default.resolve(configRoot, file)).find((file) => import_node_fs.default.existsSync(file)) ?? null;
22588
22598
  if (resolvedPath === null) {
22589
- debug2(`No config file found in the current working directory %s`, configRoot);
22599
+ debug3(`No config file found in the current working directory %s`, configRoot);
22590
22600
  return { resolvedPath };
22591
22601
  }
22592
22602
  }
@@ -22598,13 +22608,13 @@ async function loadConfigFromFile({
22598
22608
  error
22599
22609
  };
22600
22610
  }
22601
- debug2(`Config file loaded in %s`, getTime());
22611
+ debug3(`Config file loaded in %s`, getTime());
22602
22612
  const defaultExport = required3["default"];
22603
22613
  const parseResultEither = pipe(
22604
22614
  // If the given config conforms to the `PrismaConfig` shape, feed it to `defineConfig`.
22605
22615
  parsePrismaConfigShape(defaultExport),
22606
22616
  Either_exports.map((config2) => {
22607
- debug2("Parsed `PrismaConfig` shape: %o", config2);
22617
+ debug3("Parsed `PrismaConfig` shape: %o", config2);
22608
22618
  return defineConfig(config2);
22609
22619
  }),
22610
22620
  // Otherwise, try to parse it as a `PrismaConfigInternal` shape.
@@ -22655,7 +22665,7 @@ async function requireTypeScriptFile(resolvedPath) {
22655
22665
  };
22656
22666
  } catch (e) {
22657
22667
  const error = e;
22658
- debug2("esbuild-register registration failed: %s", error.message);
22668
+ debug3("esbuild-register registration failed: %s", error.message);
22659
22669
  return {
22660
22670
  error: {
22661
22671
  _tag: "TypeScriptImportFailed",
@@ -22460,6 +22460,7 @@ var ArrayFormatterIssue = class extends (/* @__PURE__ */ Struct({
22460
22460
  };
22461
22461
 
22462
22462
  // src/PrismaConfig.ts
22463
+ var debug = Debug("prisma:config:PrismaConfig");
22463
22464
  var PrismaConfigSchemaSingleShape = Schema_exports.Struct({
22464
22465
  /**
22465
22466
  * Tell Prisma to use a single `.prisma` schema file.
@@ -22497,7 +22498,7 @@ function parsePrismaConfigShape(input) {
22497
22498
  onExcessProperty: "error"
22498
22499
  });
22499
22500
  }
22500
- var PRISMA_CONFIG_INTERNAL_BRAND = Symbol("PrismaConfigInternal");
22501
+ var PRISMA_CONFIG_INTERNAL_BRAND = Symbol.for("PrismaConfigInternal");
22501
22502
  var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22502
22503
  /**
22503
22504
  * Whether features with an unstable API are enabled.
@@ -22514,6 +22515,11 @@ var createPrismaConfigInternalShape = () => Schema_exports.Struct({
22514
22515
  loadedFromFile: Schema_exports.NullOr(Schema_exports.String)
22515
22516
  });
22516
22517
  function parsePrismaConfigInternalShape(input) {
22518
+ debug("Parsing PrismaConfigInternal: %o", input);
22519
+ if (typeof input === "object" && input !== null && input["__brand"] === PRISMA_CONFIG_INTERNAL_BRAND) {
22520
+ debug("Short-circuit: input is already a PrismaConfigInternal object");
22521
+ return Either_exports.right(input);
22522
+ }
22517
22523
  return pipe(
22518
22524
  Schema_exports.decodeUnknownEither(createPrismaConfigInternalShape(), {})(input, {
22519
22525
  onExcessProperty: "error"
@@ -22523,8 +22529,11 @@ function parsePrismaConfigInternalShape(input) {
22523
22529
  // This is done to work around the following issues:
22524
22530
  // - https://github.com/microsoft/rushstack/issues/1308
22525
22531
  // - https://github.com/microsoft/rushstack/issues/4034
22526
- // - https://github.com/microsoft/TypeScript/issues/58914
22527
- Either_exports.map((config2) => ({ ...config2, __brand: PRISMA_CONFIG_INTERNAL_BRAND }))
22532
+ // - https://github.com/microsoft/TypeScript/issues/58914
22533
+ Either_exports.map((config2) => {
22534
+ debug("Parsing PrismaConfigInternal succeeded, branding the output");
22535
+ return { ...config2, __brand: PRISMA_CONFIG_INTERNAL_BRAND };
22536
+ })
22528
22537
  );
22529
22538
  }
22530
22539
  function makePrismaConfigInternal(makeArgs) {
@@ -22543,9 +22552,10 @@ function defaultConfig() {
22543
22552
  }
22544
22553
 
22545
22554
  // src/defineConfig.ts
22546
- var debug = Debug("prisma:config:defineConfig");
22555
+ var debug2 = Debug("prisma:config:defineConfig");
22547
22556
  function defineConfig(configInput) {
22548
22557
  const config2 = defaultConfig();
22558
+ debug2("Prisma config [default]: %o", config2);
22549
22559
  defineSchemaConfig(config2, configInput);
22550
22560
  return config2;
22551
22561
  }
@@ -22554,11 +22564,11 @@ function defineSchemaConfig(config2, configInput) {
22554
22564
  return;
22555
22565
  }
22556
22566
  config2.schema = configInput.schema;
22557
- debug("Prisma config [schema]: %o", config2.schema);
22567
+ debug2("Prisma config [schema]: %o", config2.schema);
22558
22568
  }
22559
22569
 
22560
22570
  // src/loadConfigFromFile.ts
22561
- var debug2 = Debug("prisma:config:loadConfigFromFile");
22571
+ var debug3 = Debug("prisma:config:loadConfigFromFile");
22562
22572
  async function loadConfigFromFile({
22563
22573
  configFile,
22564
22574
  configRoot = import_node_process.default.cwd()
@@ -22569,13 +22579,13 @@ async function loadConfigFromFile({
22569
22579
  if (configFile) {
22570
22580
  resolvedPath = import_node_path.default.resolve(configRoot, configFile);
22571
22581
  if (!import_node_fs.default.existsSync(resolvedPath)) {
22572
- debug2(`The given config file was not found at %s`, resolvedPath);
22582
+ debug3(`The given config file was not found at %s`, resolvedPath);
22573
22583
  return { resolvedPath, error: { _tag: "ConfigFileNotFound" } };
22574
22584
  }
22575
22585
  } else {
22576
22586
  resolvedPath = ["prisma.config.ts"].map((file) => import_node_path.default.resolve(configRoot, file)).find((file) => import_node_fs.default.existsSync(file)) ?? null;
22577
22587
  if (resolvedPath === null) {
22578
- debug2(`No config file found in the current working directory %s`, configRoot);
22588
+ debug3(`No config file found in the current working directory %s`, configRoot);
22579
22589
  return { resolvedPath };
22580
22590
  }
22581
22591
  }
@@ -22587,13 +22597,13 @@ async function loadConfigFromFile({
22587
22597
  error
22588
22598
  };
22589
22599
  }
22590
- debug2(`Config file loaded in %s`, getTime());
22600
+ debug3(`Config file loaded in %s`, getTime());
22591
22601
  const defaultExport = required3["default"];
22592
22602
  const parseResultEither = pipe(
22593
22603
  // If the given config conforms to the `PrismaConfig` shape, feed it to `defineConfig`.
22594
22604
  parsePrismaConfigShape(defaultExport),
22595
22605
  Either_exports.map((config2) => {
22596
- debug2("Parsed `PrismaConfig` shape: %o", config2);
22606
+ debug3("Parsed `PrismaConfig` shape: %o", config2);
22597
22607
  return defineConfig(config2);
22598
22608
  }),
22599
22609
  // Otherwise, try to parse it as a `PrismaConfigInternal` shape.
@@ -22644,7 +22654,7 @@ async function requireTypeScriptFile(resolvedPath) {
22644
22654
  };
22645
22655
  } catch (e) {
22646
22656
  const error = e;
22647
- debug2("esbuild-register registration failed: %s", error.message);
22657
+ debug3("esbuild-register registration failed: %s", error.message);
22648
22658
  return {
22649
22659
  error: {
22650
22660
  _tag: "TypeScriptImportFailed",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/config",
3
- "version": "6.5.0-integration-fix-e2e-prisma-config-2.1",
3
+ "version": "6.5.0-integration-fix-e2e-prisma-config-2.3",
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",
@@ -22,8 +22,8 @@
22
22
  "esbuild-register": "3.6.0",
23
23
  "jest": "29.7.0",
24
24
  "jest-junit": "16.0.0",
25
- "@prisma/get-platform": "6.5.0-integration-fix-e2e-prisma-config-2.1",
26
- "@prisma/driver-adapter-utils": "6.5.0-integration-fix-e2e-prisma-config-2.1"
25
+ "@prisma/driver-adapter-utils": "6.5.0-integration-fix-e2e-prisma-config-2.3",
26
+ "@prisma/get-platform": "6.5.0-integration-fix-e2e-prisma-config-2.3"
27
27
  },
28
28
  "files": [
29
29
  "dist"