@prisma/get-platform 6.6.0-dev.10 → 6.6.0-dev.101

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.
@@ -26,13 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_2BHXWNN4_exports = {};
30
- __export(chunk_2BHXWNN4_exports, {
29
+ var chunk_4CHMSIXA_exports = {};
30
+ __export(chunk_4CHMSIXA_exports, {
31
31
  jestConsoleContext: () => jestConsoleContext,
32
32
  jestContext: () => jestContext,
33
33
  jestProcessContext: () => jestProcessContext
34
34
  });
35
- module.exports = __toCommonJS(chunk_2BHXWNN4_exports);
35
+ module.exports = __toCommonJS(chunk_4CHMSIXA_exports);
36
36
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
37
37
  var import_path = __toESM(require("path"));
38
38
  var require_windows = (0, import_chunk_2ESYSVXG.__commonJS)({
@@ -14872,6 +14872,9 @@ var jestContext = {
14872
14872
  const c = ctx;
14873
14873
  beforeEach(() => {
14874
14874
  const originalCwd = process.cwd();
14875
+ c.mocked = c.mocked ?? {
14876
+ cwd: process.cwd()
14877
+ };
14875
14878
  c.tmpDir = import_tempy.default.directory();
14876
14879
  c.fs = import_fs_jetpack.default.cwd(c.tmpDir);
14877
14880
  c.tree = (startFrom = c.tmpDir, indent = "") => {
@@ -14901,9 +14904,6 @@ ${[...generateDirectoryTree(children, indent)].join("\n")}
14901
14904
  });
14902
14905
  c.fs.symlink(import_path.default.join(originalCwd, "..", "client"), import_path.default.join(c.fs.cwd(), "node_modules", "@prisma", "client"));
14903
14906
  };
14904
- c.mocked = c.mocked ?? {
14905
- cwd: process.cwd()
14906
- };
14907
14907
  c.cli = (...input) => {
14908
14908
  return import_execa.default.node(import_path.default.join(originalCwd, "../cli/build/index.js"), input, {
14909
14909
  cwd: c.fs.cwd(),
@@ -16,37 +16,37 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_B23KD6U3_exports = {};
20
- __export(chunk_B23KD6U3_exports, {
19
+ var chunk_IPLRRT6O_exports = {};
20
+ __export(chunk_IPLRRT6O_exports, {
21
21
  binaryTargetRegex: () => binaryTargetRegex,
22
22
  binaryTargetRegex_exports: () => binaryTargetRegex_exports,
23
23
  init_binaryTargetRegex: () => init_binaryTargetRegex
24
24
  });
25
- module.exports = __toCommonJS(chunk_B23KD6U3_exports);
25
+ module.exports = __toCommonJS(chunk_IPLRRT6O_exports);
26
26
  var import_chunk_7MLUNQIZ = require("./chunk-7MLUNQIZ.js");
27
27
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
28
- var require_escape_string_regexp = (0, import_chunk_2ESYSVXG.__commonJS)({
29
- "../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js"(exports, module2) {
28
+ function escapeStringRegexp(string) {
29
+ if (typeof string !== "string") {
30
+ throw new TypeError("Expected a string");
31
+ }
32
+ return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
33
+ }
34
+ var init_escape_string_regexp = (0, import_chunk_2ESYSVXG.__esm)({
35
+ "../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js"() {
30
36
  "use strict";
31
- module2.exports = (string) => {
32
- if (typeof string !== "string") {
33
- throw new TypeError("Expected a string");
34
- }
35
- return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
36
- };
37
37
  }
38
38
  });
39
39
  var binaryTargetRegex_exports = {};
40
40
  (0, import_chunk_2ESYSVXG.__export)(binaryTargetRegex_exports, {
41
41
  binaryTargetRegex: () => binaryTargetRegex
42
42
  });
43
- var import_escape_string_regexp, binaryTargetRegex;
43
+ var binaryTargetRegex;
44
44
  var init_binaryTargetRegex = (0, import_chunk_2ESYSVXG.__esm)({
45
45
  "src/test-utils/binaryTargetRegex.ts"() {
46
- import_escape_string_regexp = (0, import_chunk_2ESYSVXG.__toESM)(require_escape_string_regexp());
46
+ init_escape_string_regexp();
47
47
  (0, import_chunk_7MLUNQIZ.init_binaryTargets)();
48
48
  binaryTargetRegex = new RegExp(
49
- "(" + [...import_chunk_7MLUNQIZ.binaryTargets].sort((a, b) => b.length - a.length).map((p) => (0, import_escape_string_regexp.default)(p)).join("|") + ")",
49
+ "(" + [...import_chunk_7MLUNQIZ.binaryTargets].sort((a, b) => b.length - a.length).map((p) => escapeStringRegexp(p)).join("|") + ")",
50
50
  "g"
51
51
  );
52
52
  }
@@ -0,0 +1,429 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_M5T7GI2R_exports = {};
30
+ __export(chunk_M5T7GI2R_exports, {
31
+ link: () => link2
32
+ });
33
+ module.exports = __toCommonJS(chunk_M5T7GI2R_exports);
34
+ var import_chunk_YVXCXD3A = require("./chunk-YVXCXD3A.js");
35
+ var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
36
+ var import_node_process = __toESM(require("node:process"));
37
+ var require_has_flag = (0, import_chunk_2ESYSVXG.__commonJS)({
38
+ "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) {
39
+ "use strict";
40
+ module2.exports = (flag, argv = process.argv) => {
41
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
42
+ const position = argv.indexOf(prefix + flag);
43
+ const terminatorPosition = argv.indexOf("--");
44
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
45
+ };
46
+ }
47
+ });
48
+ var require_supports_color = (0, import_chunk_2ESYSVXG.__commonJS)({
49
+ "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
50
+ "use strict";
51
+ var os = (0, import_chunk_2ESYSVXG.__require)("os");
52
+ var tty = (0, import_chunk_2ESYSVXG.__require)("tty");
53
+ var hasFlag = require_has_flag();
54
+ var { env } = process;
55
+ var forceColor;
56
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
57
+ forceColor = 0;
58
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
59
+ forceColor = 1;
60
+ }
61
+ if ("FORCE_COLOR" in env) {
62
+ if (env.FORCE_COLOR === "true") {
63
+ forceColor = 1;
64
+ } else if (env.FORCE_COLOR === "false") {
65
+ forceColor = 0;
66
+ } else {
67
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
68
+ }
69
+ }
70
+ function translateLevel(level) {
71
+ if (level === 0) {
72
+ return false;
73
+ }
74
+ return {
75
+ level,
76
+ hasBasic: true,
77
+ has256: level >= 2,
78
+ has16m: level >= 3
79
+ };
80
+ }
81
+ function supportsColor(haveStream, streamIsTTY) {
82
+ if (forceColor === 0) {
83
+ return 0;
84
+ }
85
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
86
+ return 3;
87
+ }
88
+ if (hasFlag("color=256")) {
89
+ return 2;
90
+ }
91
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
92
+ return 0;
93
+ }
94
+ const min = forceColor || 0;
95
+ if (env.TERM === "dumb") {
96
+ return min;
97
+ }
98
+ if (process.platform === "win32") {
99
+ const osRelease = os.release().split(".");
100
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
101
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
102
+ }
103
+ return 1;
104
+ }
105
+ if ("CI" in env) {
106
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
107
+ return 1;
108
+ }
109
+ return min;
110
+ }
111
+ if ("TEAMCITY_VERSION" in env) {
112
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
113
+ }
114
+ if (env.COLORTERM === "truecolor") {
115
+ return 3;
116
+ }
117
+ if ("TERM_PROGRAM" in env) {
118
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
119
+ switch (env.TERM_PROGRAM) {
120
+ case "iTerm.app":
121
+ return version >= 3 ? 3 : 2;
122
+ case "Apple_Terminal":
123
+ return 2;
124
+ }
125
+ }
126
+ if (/-256(color)?$/i.test(env.TERM)) {
127
+ return 2;
128
+ }
129
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
130
+ return 1;
131
+ }
132
+ if ("COLORTERM" in env) {
133
+ return 1;
134
+ }
135
+ return min;
136
+ }
137
+ function getSupportLevel(stream) {
138
+ const level = supportsColor(stream, stream && stream.isTTY);
139
+ return translateLevel(level);
140
+ }
141
+ module2.exports = {
142
+ supportsColor: getSupportLevel,
143
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
144
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
145
+ };
146
+ }
147
+ });
148
+ var require_supports_hyperlinks = (0, import_chunk_2ESYSVXG.__commonJS)({
149
+ "../../node_modules/.pnpm/supports-hyperlinks@3.2.0/node_modules/supports-hyperlinks/index.js"(exports, module2) {
150
+ "use strict";
151
+ var supportsColor = require_supports_color();
152
+ var hasFlag = require_has_flag();
153
+ function parseVersion(versionString) {
154
+ if (/^\d{3,4}$/.test(versionString)) {
155
+ const m = /(\d{1,2})(\d{2})/.exec(versionString) || [];
156
+ return {
157
+ major: 0,
158
+ minor: parseInt(m[1], 10),
159
+ patch: parseInt(m[2], 10)
160
+ };
161
+ }
162
+ const versions = (versionString || "").split(".").map((n) => parseInt(n, 10));
163
+ return {
164
+ major: versions[0],
165
+ minor: versions[1],
166
+ patch: versions[2]
167
+ };
168
+ }
169
+ function supportsHyperlink(stream) {
170
+ const {
171
+ CI,
172
+ FORCE_HYPERLINK,
173
+ NETLIFY,
174
+ TEAMCITY_VERSION,
175
+ TERM_PROGRAM,
176
+ TERM_PROGRAM_VERSION,
177
+ VTE_VERSION,
178
+ TERM
179
+ } = process.env;
180
+ if (FORCE_HYPERLINK) {
181
+ return !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);
182
+ }
183
+ if (hasFlag("no-hyperlink") || hasFlag("no-hyperlinks") || hasFlag("hyperlink=false") || hasFlag("hyperlink=never")) {
184
+ return false;
185
+ }
186
+ if (hasFlag("hyperlink=true") || hasFlag("hyperlink=always")) {
187
+ return true;
188
+ }
189
+ if (NETLIFY) {
190
+ return true;
191
+ }
192
+ if (!supportsColor.supportsColor(stream)) {
193
+ return false;
194
+ }
195
+ if (stream && !stream.isTTY) {
196
+ return false;
197
+ }
198
+ if ("WT_SESSION" in process.env) {
199
+ return true;
200
+ }
201
+ if (process.platform === "win32") {
202
+ return false;
203
+ }
204
+ if (CI) {
205
+ return false;
206
+ }
207
+ if (TEAMCITY_VERSION) {
208
+ return false;
209
+ }
210
+ if (TERM_PROGRAM) {
211
+ const version = parseVersion(TERM_PROGRAM_VERSION || "");
212
+ switch (TERM_PROGRAM) {
213
+ case "iTerm.app":
214
+ if (version.major === 3) {
215
+ return version.minor >= 1;
216
+ }
217
+ return version.major > 3;
218
+ case "WezTerm":
219
+ return version.major >= 20200620;
220
+ case "vscode":
221
+ return version.major > 1 || version.major === 1 && version.minor >= 72;
222
+ case "ghostty":
223
+ return true;
224
+ }
225
+ }
226
+ if (VTE_VERSION) {
227
+ if (VTE_VERSION === "0.50.0") {
228
+ return false;
229
+ }
230
+ const version = parseVersion(VTE_VERSION);
231
+ return version.major > 0 || version.minor >= 50;
232
+ }
233
+ switch (TERM) {
234
+ case "alacritty":
235
+ return true;
236
+ }
237
+ return false;
238
+ }
239
+ module2.exports = {
240
+ supportsHyperlink,
241
+ stdout: supportsHyperlink(process.stdout),
242
+ stderr: supportsHyperlink(process.stderr)
243
+ };
244
+ }
245
+ });
246
+ var base_exports = {};
247
+ (0, import_chunk_2ESYSVXG.__export)(base_exports, {
248
+ beep: () => beep,
249
+ clearScreen: () => clearScreen,
250
+ clearTerminal: () => clearTerminal,
251
+ cursorBackward: () => cursorBackward,
252
+ cursorDown: () => cursorDown,
253
+ cursorForward: () => cursorForward,
254
+ cursorGetPosition: () => cursorGetPosition,
255
+ cursorHide: () => cursorHide,
256
+ cursorLeft: () => cursorLeft,
257
+ cursorMove: () => cursorMove,
258
+ cursorNextLine: () => cursorNextLine,
259
+ cursorPrevLine: () => cursorPrevLine,
260
+ cursorRestorePosition: () => cursorRestorePosition,
261
+ cursorSavePosition: () => cursorSavePosition,
262
+ cursorShow: () => cursorShow,
263
+ cursorTo: () => cursorTo,
264
+ cursorUp: () => cursorUp,
265
+ enterAlternativeScreen: () => enterAlternativeScreen,
266
+ eraseDown: () => eraseDown,
267
+ eraseEndLine: () => eraseEndLine,
268
+ eraseLine: () => eraseLine,
269
+ eraseLines: () => eraseLines,
270
+ eraseScreen: () => eraseScreen,
271
+ eraseStartLine: () => eraseStartLine,
272
+ eraseUp: () => eraseUp,
273
+ exitAlternativeScreen: () => exitAlternativeScreen,
274
+ iTerm: () => iTerm,
275
+ image: () => image,
276
+ link: () => link,
277
+ scrollDown: () => scrollDown,
278
+ scrollUp: () => scrollUp
279
+ });
280
+ var isBrowser = globalThis.window?.document !== void 0;
281
+ var isNode = globalThis.process?.versions?.node !== void 0;
282
+ var isBun = globalThis.process?.versions?.bun !== void 0;
283
+ var isDeno = globalThis.Deno?.version?.deno !== void 0;
284
+ var isElectron = globalThis.process?.versions?.electron !== void 0;
285
+ var isJsDom = globalThis.navigator?.userAgent?.includes("jsdom") === true;
286
+ var isWebWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
287
+ var isDedicatedWorker = typeof DedicatedWorkerGlobalScope !== "undefined" && globalThis instanceof DedicatedWorkerGlobalScope;
288
+ var isSharedWorker = typeof SharedWorkerGlobalScope !== "undefined" && globalThis instanceof SharedWorkerGlobalScope;
289
+ var isServiceWorker = typeof ServiceWorkerGlobalScope !== "undefined" && globalThis instanceof ServiceWorkerGlobalScope;
290
+ var platform = globalThis.navigator?.userAgentData?.platform;
291
+ var isMacOs = platform === "macOS" || globalThis.navigator?.platform === "MacIntel" || globalThis.navigator?.userAgent?.includes(" Mac ") === true || globalThis.process?.platform === "darwin";
292
+ var isWindows = platform === "Windows" || globalThis.navigator?.platform === "Win32" || globalThis.process?.platform === "win32";
293
+ var isLinux = platform === "Linux" || globalThis.navigator?.platform?.startsWith("Linux") === true || globalThis.navigator?.userAgent?.includes(" Linux ") === true || globalThis.process?.platform === "linux";
294
+ var isIos = platform === "iOS" || globalThis.navigator?.platform === "MacIntel" && globalThis.navigator?.maxTouchPoints > 1 || /iPad|iPhone|iPod/.test(globalThis.navigator?.platform);
295
+ var isAndroid = platform === "Android" || globalThis.navigator?.platform === "Android" || globalThis.navigator?.userAgent?.includes(" Android ") === true || globalThis.process?.platform === "android";
296
+ var ESC = "\x1B[";
297
+ var OSC = "\x1B]";
298
+ var BEL = "\x07";
299
+ var SEP = ";";
300
+ var isTerminalApp = !isBrowser && import_node_process.default.env.TERM_PROGRAM === "Apple_Terminal";
301
+ var isWindows2 = !isBrowser && import_node_process.default.platform === "win32";
302
+ var cwdFunction = isBrowser ? () => {
303
+ throw new Error("`process.cwd()` only works in Node.js, not the browser.");
304
+ } : import_node_process.default.cwd;
305
+ var cursorTo = (x, y) => {
306
+ if (typeof x !== "number") {
307
+ throw new TypeError("The `x` argument is required");
308
+ }
309
+ if (typeof y !== "number") {
310
+ return ESC + (x + 1) + "G";
311
+ }
312
+ return ESC + (y + 1) + SEP + (x + 1) + "H";
313
+ };
314
+ var cursorMove = (x, y) => {
315
+ if (typeof x !== "number") {
316
+ throw new TypeError("The `x` argument is required");
317
+ }
318
+ let returnValue = "";
319
+ if (x < 0) {
320
+ returnValue += ESC + -x + "D";
321
+ } else if (x > 0) {
322
+ returnValue += ESC + x + "C";
323
+ }
324
+ if (y < 0) {
325
+ returnValue += ESC + -y + "A";
326
+ } else if (y > 0) {
327
+ returnValue += ESC + y + "B";
328
+ }
329
+ return returnValue;
330
+ };
331
+ var cursorUp = (count = 1) => ESC + count + "A";
332
+ var cursorDown = (count = 1) => ESC + count + "B";
333
+ var cursorForward = (count = 1) => ESC + count + "C";
334
+ var cursorBackward = (count = 1) => ESC + count + "D";
335
+ var cursorLeft = ESC + "G";
336
+ var cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
337
+ var cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
338
+ var cursorGetPosition = ESC + "6n";
339
+ var cursorNextLine = ESC + "E";
340
+ var cursorPrevLine = ESC + "F";
341
+ var cursorHide = ESC + "?25l";
342
+ var cursorShow = ESC + "?25h";
343
+ var eraseLines = (count) => {
344
+ let clear = "";
345
+ for (let i = 0; i < count; i++) {
346
+ clear += eraseLine + (i < count - 1 ? cursorUp() : "");
347
+ }
348
+ if (count) {
349
+ clear += cursorLeft;
350
+ }
351
+ return clear;
352
+ };
353
+ var eraseEndLine = ESC + "K";
354
+ var eraseStartLine = ESC + "1K";
355
+ var eraseLine = ESC + "2K";
356
+ var eraseDown = ESC + "J";
357
+ var eraseUp = ESC + "1J";
358
+ var eraseScreen = ESC + "2J";
359
+ var scrollUp = ESC + "S";
360
+ var scrollDown = ESC + "T";
361
+ var clearScreen = "\x1Bc";
362
+ var clearTerminal = isWindows2 ? `${eraseScreen}${ESC}0f` : `${eraseScreen}${ESC}3J${ESC}H`;
363
+ var enterAlternativeScreen = ESC + "?1049h";
364
+ var exitAlternativeScreen = ESC + "?1049l";
365
+ var beep = BEL;
366
+ var link = (text, url) => [
367
+ OSC,
368
+ "8",
369
+ SEP,
370
+ SEP,
371
+ url,
372
+ BEL,
373
+ text,
374
+ OSC,
375
+ "8",
376
+ SEP,
377
+ SEP,
378
+ BEL
379
+ ].join("");
380
+ var image = (data, options = {}) => {
381
+ let returnValue = `${OSC}1337;File=inline=1`;
382
+ if (options.width) {
383
+ returnValue += `;width=${options.width}`;
384
+ }
385
+ if (options.height) {
386
+ returnValue += `;height=${options.height}`;
387
+ }
388
+ if (options.preserveAspectRatio === false) {
389
+ returnValue += ";preserveAspectRatio=0";
390
+ }
391
+ return returnValue + ":" + Buffer.from(data).toString("base64") + BEL;
392
+ };
393
+ var iTerm = {
394
+ setCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
395
+ annotation(message, options = {}) {
396
+ let returnValue = `${OSC}1337;`;
397
+ const hasX = options.x !== void 0;
398
+ const hasY = options.y !== void 0;
399
+ if ((hasX || hasY) && !(hasX && hasY && options.length !== void 0)) {
400
+ throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
401
+ }
402
+ message = message.replaceAll("|", "");
403
+ returnValue += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
404
+ if (options.length > 0) {
405
+ returnValue += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
406
+ } else {
407
+ returnValue += message;
408
+ }
409
+ return returnValue + BEL;
410
+ }
411
+ };
412
+ var import_supports_hyperlinks = (0, import_chunk_2ESYSVXG.__toESM)(require_supports_hyperlinks(), 1);
413
+ function terminalLink(text, url, { target = "stdout", ...options } = {}) {
414
+ if (!import_supports_hyperlinks.default[target]) {
415
+ if (options.fallback === false) {
416
+ return text;
417
+ }
418
+ return typeof options.fallback === "function" ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`;
419
+ }
420
+ return base_exports.link(text, url);
421
+ }
422
+ terminalLink.isSupported = import_supports_hyperlinks.default.stdout;
423
+ terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, { target: "stderr", ...options });
424
+ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
425
+ function link2(url) {
426
+ return terminalLink(url, url, {
427
+ fallback: import_chunk_YVXCXD3A.underline
428
+ });
429
+ }
package/dist/index.js CHANGED
@@ -24,18 +24,18 @@ __export(index_exports, {
24
24
  getNodeAPIName: () => import_chunk_2U36ISZO.getNodeAPIName,
25
25
  getPlatformInfo: () => import_chunk_7PMGXL6S.getPlatformInfo,
26
26
  getos: () => import_chunk_7PMGXL6S.getos,
27
- jestConsoleContext: () => import_chunk_2BHXWNN4.jestConsoleContext,
28
- jestContext: () => import_chunk_2BHXWNN4.jestContext,
29
- jestProcessContext: () => import_chunk_2BHXWNN4.jestProcessContext,
30
- link: () => import_chunk_D7S5FGQN.link
27
+ jestConsoleContext: () => import_chunk_4CHMSIXA.jestConsoleContext,
28
+ jestContext: () => import_chunk_4CHMSIXA.jestContext,
29
+ jestProcessContext: () => import_chunk_4CHMSIXA.jestProcessContext,
30
+ link: () => import_chunk_M5T7GI2R.link
31
31
  });
32
32
  module.exports = __toCommonJS(index_exports);
33
33
  var import_chunk_6HZWON4S = require("./chunk-6HZWON4S.js");
34
- var import_chunk_2BHXWNN4 = require("./chunk-2BHXWNN4.js");
34
+ var import_chunk_4CHMSIXA = require("./chunk-4CHMSIXA.js");
35
35
  var import_chunk_O5EOXX3N = require("./chunk-O5EOXX3N.js");
36
36
  var import_chunk_2U36ISZO = require("./chunk-2U36ISZO.js");
37
37
  var import_chunk_7PMGXL6S = require("./chunk-7PMGXL6S.js");
38
- var import_chunk_D7S5FGQN = require("./chunk-D7S5FGQN.js");
38
+ var import_chunk_M5T7GI2R = require("./chunk-M5T7GI2R.js");
39
39
  var import_chunk_FWMN4WME = require("./chunk-FWMN4WME.js");
40
40
  var import_chunk_YVXCXD3A = require("./chunk-YVXCXD3A.js");
41
41
  var import_chunk_7MLUNQIZ = require("./chunk-7MLUNQIZ.js");
package/dist/link.js CHANGED
@@ -18,9 +18,9 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var link_exports = {};
20
20
  __export(link_exports, {
21
- link: () => import_chunk_D7S5FGQN.link
21
+ link: () => import_chunk_M5T7GI2R.link
22
22
  });
23
23
  module.exports = __toCommonJS(link_exports);
24
- var import_chunk_D7S5FGQN = require("./chunk-D7S5FGQN.js");
24
+ var import_chunk_M5T7GI2R = require("./chunk-M5T7GI2R.js");
25
25
  var import_chunk_YVXCXD3A = require("./chunk-YVXCXD3A.js");
26
26
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var binaryTargetRegex_exports = {};
20
20
  __export(binaryTargetRegex_exports, {
21
- binaryTargetRegex: () => import_chunk_B23KD6U3.binaryTargetRegex
21
+ binaryTargetRegex: () => import_chunk_IPLRRT6O.binaryTargetRegex
22
22
  });
23
23
  module.exports = __toCommonJS(binaryTargetRegex_exports);
24
- var import_chunk_B23KD6U3 = require("../chunk-B23KD6U3.js");
24
+ var import_chunk_IPLRRT6O = require("../chunk-IPLRRT6O.js");
25
25
  var import_chunk_7MLUNQIZ = require("../chunk-7MLUNQIZ.js");
26
26
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
27
- (0, import_chunk_B23KD6U3.init_binaryTargetRegex)();
27
+ (0, import_chunk_IPLRRT6O.init_binaryTargetRegex)();
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var test_utils_exports = {};
20
20
  __export(test_utils_exports, {
21
- jestConsoleContext: () => import_chunk_2BHXWNN4.jestConsoleContext,
22
- jestContext: () => import_chunk_2BHXWNN4.jestContext,
23
- jestProcessContext: () => import_chunk_2BHXWNN4.jestProcessContext
21
+ jestConsoleContext: () => import_chunk_4CHMSIXA.jestConsoleContext,
22
+ jestContext: () => import_chunk_4CHMSIXA.jestContext,
23
+ jestProcessContext: () => import_chunk_4CHMSIXA.jestProcessContext
24
24
  });
25
25
  module.exports = __toCommonJS(test_utils_exports);
26
26
  var import_chunk_6HZWON4S = require("../chunk-6HZWON4S.js");
27
- var import_chunk_2BHXWNN4 = require("../chunk-2BHXWNN4.js");
27
+ var import_chunk_4CHMSIXA = require("../chunk-4CHMSIXA.js");
28
28
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var jestContext_exports = {};
20
20
  __export(jestContext_exports, {
21
- jestConsoleContext: () => import_chunk_2BHXWNN4.jestConsoleContext,
22
- jestContext: () => import_chunk_2BHXWNN4.jestContext,
23
- jestProcessContext: () => import_chunk_2BHXWNN4.jestProcessContext
21
+ jestConsoleContext: () => import_chunk_4CHMSIXA.jestConsoleContext,
22
+ jestContext: () => import_chunk_4CHMSIXA.jestContext,
23
+ jestProcessContext: () => import_chunk_4CHMSIXA.jestProcessContext
24
24
  });
25
25
  module.exports = __toCommonJS(jestContext_exports);
26
- var import_chunk_2BHXWNN4 = require("../chunk-2BHXWNN4.js");
26
+ var import_chunk_4CHMSIXA = require("../chunk-4CHMSIXA.js");
27
27
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
@@ -21,7 +21,7 @@ __export(jestSnapshotSerializer_exports, {
21
21
  default: () => jestSnapshotSerializer_default
22
22
  });
23
23
  module.exports = __toCommonJS(jestSnapshotSerializer_exports);
24
- var import_chunk_B23KD6U3 = require("../chunk-B23KD6U3.js");
24
+ var import_chunk_IPLRRT6O = require("../chunk-IPLRRT6O.js");
25
25
  var import_chunk_7MLUNQIZ = require("../chunk-7MLUNQIZ.js");
26
26
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
27
27
  var require_ansi_regex = (0, import_chunk_2ESYSVXG.__commonJS)({
@@ -47,7 +47,7 @@ var require_jestSnapshotSerializer = (0, import_chunk_2ESYSVXG.__commonJS)({
47
47
  "src/test-utils/jestSnapshotSerializer.js"(exports, module2) {
48
48
  var path = (0, import_chunk_2ESYSVXG.__require)("path");
49
49
  var stripAnsi = require_strip_ansi();
50
- var { binaryTargetRegex } = ((0, import_chunk_B23KD6U3.init_binaryTargetRegex)(), (0, import_chunk_2ESYSVXG.__toCommonJS)(import_chunk_B23KD6U3.binaryTargetRegex_exports));
50
+ var { binaryTargetRegex } = ((0, import_chunk_IPLRRT6O.init_binaryTargetRegex)(), (0, import_chunk_2ESYSVXG.__toCommonJS)(import_chunk_IPLRRT6O.binaryTargetRegex_exports));
51
51
  var pipe = (...fns) => (x) => fns.reduce((v, f) => f(v), x);
52
52
  function normalizePrismaPaths(str) {
53
53
  return str.replace(/prisma\\([\w-]+)\.prisma/g, "prisma/$1.prisma").replace(/prisma\\seed\.ts/g, "prisma/seed.ts").replace(/custom-folder\\seed\.js/g, "custom-folder/seed.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/get-platform",
3
- "version": "6.6.0-dev.10",
3
+ "version": "6.6.0-dev.101",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,17 +23,17 @@
23
23
  "jest": "29.7.0",
24
24
  "jest-junit": "16.0.0",
25
25
  "typescript": "5.4.5",
26
- "escape-string-regexp": "4.0.0",
26
+ "escape-string-regexp": "5.0.0",
27
27
  "execa": "5.1.1",
28
28
  "fs-jetpack": "5.1.0",
29
29
  "kleur": "4.1.5",
30
30
  "strip-ansi": "6.0.1",
31
31
  "tempy": "1.0.1",
32
- "terminal-link": "2.1.1",
32
+ "terminal-link": "4.0.0",
33
33
  "ts-pattern": "5.6.2"
34
34
  },
35
35
  "dependencies": {
36
- "@prisma/debug": "6.6.0-dev.10"
36
+ "@prisma/debug": "6.6.0-dev.101"
37
37
  },
38
38
  "files": [
39
39
  "README.md",
@@ -1,367 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_D7S5FGQN_exports = {};
20
- __export(chunk_D7S5FGQN_exports, {
21
- link: () => link
22
- });
23
- module.exports = __toCommonJS(chunk_D7S5FGQN_exports);
24
- var import_chunk_YVXCXD3A = require("./chunk-YVXCXD3A.js");
25
- var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
26
- var require_ansi_escapes = (0, import_chunk_2ESYSVXG.__commonJS)({
27
- "../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports, module2) {
28
- "use strict";
29
- var ansiEscapes = module2.exports;
30
- module2.exports.default = ansiEscapes;
31
- var ESC = "\x1B[";
32
- var OSC = "\x1B]";
33
- var BEL = "\x07";
34
- var SEP = ";";
35
- var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
36
- ansiEscapes.cursorTo = (x, y) => {
37
- if (typeof x !== "number") {
38
- throw new TypeError("The `x` argument is required");
39
- }
40
- if (typeof y !== "number") {
41
- return ESC + (x + 1) + "G";
42
- }
43
- return ESC + (y + 1) + ";" + (x + 1) + "H";
44
- };
45
- ansiEscapes.cursorMove = (x, y) => {
46
- if (typeof x !== "number") {
47
- throw new TypeError("The `x` argument is required");
48
- }
49
- let ret = "";
50
- if (x < 0) {
51
- ret += ESC + -x + "D";
52
- } else if (x > 0) {
53
- ret += ESC + x + "C";
54
- }
55
- if (y < 0) {
56
- ret += ESC + -y + "A";
57
- } else if (y > 0) {
58
- ret += ESC + y + "B";
59
- }
60
- return ret;
61
- };
62
- ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
63
- ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
64
- ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
65
- ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
66
- ansiEscapes.cursorLeft = ESC + "G";
67
- ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
68
- ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
69
- ansiEscapes.cursorGetPosition = ESC + "6n";
70
- ansiEscapes.cursorNextLine = ESC + "E";
71
- ansiEscapes.cursorPrevLine = ESC + "F";
72
- ansiEscapes.cursorHide = ESC + "?25l";
73
- ansiEscapes.cursorShow = ESC + "?25h";
74
- ansiEscapes.eraseLines = (count) => {
75
- let clear = "";
76
- for (let i = 0; i < count; i++) {
77
- clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
78
- }
79
- if (count) {
80
- clear += ansiEscapes.cursorLeft;
81
- }
82
- return clear;
83
- };
84
- ansiEscapes.eraseEndLine = ESC + "K";
85
- ansiEscapes.eraseStartLine = ESC + "1K";
86
- ansiEscapes.eraseLine = ESC + "2K";
87
- ansiEscapes.eraseDown = ESC + "J";
88
- ansiEscapes.eraseUp = ESC + "1J";
89
- ansiEscapes.eraseScreen = ESC + "2J";
90
- ansiEscapes.scrollUp = ESC + "S";
91
- ansiEscapes.scrollDown = ESC + "T";
92
- ansiEscapes.clearScreen = "\x1Bc";
93
- ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : (
94
- // 1. Erases the screen (Only done in case `2` is not supported)
95
- // 2. Erases the whole screen including scrollback buffer
96
- // 3. Moves cursor to the top-left position
97
- // More info: https://www.real-world-systems.com/docs/ANSIcode.html
98
- `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`
99
- );
100
- ansiEscapes.beep = BEL;
101
- ansiEscapes.link = (text, url) => {
102
- return [
103
- OSC,
104
- "8",
105
- SEP,
106
- SEP,
107
- url,
108
- BEL,
109
- text,
110
- OSC,
111
- "8",
112
- SEP,
113
- SEP,
114
- BEL
115
- ].join("");
116
- };
117
- ansiEscapes.image = (buffer, options = {}) => {
118
- let ret = `${OSC}1337;File=inline=1`;
119
- if (options.width) {
120
- ret += `;width=${options.width}`;
121
- }
122
- if (options.height) {
123
- ret += `;height=${options.height}`;
124
- }
125
- if (options.preserveAspectRatio === false) {
126
- ret += ";preserveAspectRatio=0";
127
- }
128
- return ret + ":" + buffer.toString("base64") + BEL;
129
- };
130
- ansiEscapes.iTerm = {
131
- setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
132
- annotation: (message, options = {}) => {
133
- let ret = `${OSC}1337;`;
134
- const hasX = typeof options.x !== "undefined";
135
- const hasY = typeof options.y !== "undefined";
136
- if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
137
- throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
138
- }
139
- message = message.replace(/\|/g, "");
140
- ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
141
- if (options.length > 0) {
142
- ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
143
- } else {
144
- ret += message;
145
- }
146
- return ret + BEL;
147
- }
148
- };
149
- }
150
- });
151
- var require_has_flag = (0, import_chunk_2ESYSVXG.__commonJS)({
152
- "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) {
153
- "use strict";
154
- module2.exports = (flag, argv = process.argv) => {
155
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
156
- const position = argv.indexOf(prefix + flag);
157
- const terminatorPosition = argv.indexOf("--");
158
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
159
- };
160
- }
161
- });
162
- var require_supports_color = (0, import_chunk_2ESYSVXG.__commonJS)({
163
- "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
164
- "use strict";
165
- var os = (0, import_chunk_2ESYSVXG.__require)("os");
166
- var tty = (0, import_chunk_2ESYSVXG.__require)("tty");
167
- var hasFlag = require_has_flag();
168
- var { env } = process;
169
- var forceColor;
170
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
171
- forceColor = 0;
172
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
173
- forceColor = 1;
174
- }
175
- if ("FORCE_COLOR" in env) {
176
- if (env.FORCE_COLOR === "true") {
177
- forceColor = 1;
178
- } else if (env.FORCE_COLOR === "false") {
179
- forceColor = 0;
180
- } else {
181
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
182
- }
183
- }
184
- function translateLevel(level) {
185
- if (level === 0) {
186
- return false;
187
- }
188
- return {
189
- level,
190
- hasBasic: true,
191
- has256: level >= 2,
192
- has16m: level >= 3
193
- };
194
- }
195
- function supportsColor(haveStream, streamIsTTY) {
196
- if (forceColor === 0) {
197
- return 0;
198
- }
199
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
200
- return 3;
201
- }
202
- if (hasFlag("color=256")) {
203
- return 2;
204
- }
205
- if (haveStream && !streamIsTTY && forceColor === void 0) {
206
- return 0;
207
- }
208
- const min = forceColor || 0;
209
- if (env.TERM === "dumb") {
210
- return min;
211
- }
212
- if (process.platform === "win32") {
213
- const osRelease = os.release().split(".");
214
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
215
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
216
- }
217
- return 1;
218
- }
219
- if ("CI" in env) {
220
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
221
- return 1;
222
- }
223
- return min;
224
- }
225
- if ("TEAMCITY_VERSION" in env) {
226
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
227
- }
228
- if (env.COLORTERM === "truecolor") {
229
- return 3;
230
- }
231
- if ("TERM_PROGRAM" in env) {
232
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
233
- switch (env.TERM_PROGRAM) {
234
- case "iTerm.app":
235
- return version >= 3 ? 3 : 2;
236
- case "Apple_Terminal":
237
- return 2;
238
- }
239
- }
240
- if (/-256(color)?$/i.test(env.TERM)) {
241
- return 2;
242
- }
243
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
244
- return 1;
245
- }
246
- if ("COLORTERM" in env) {
247
- return 1;
248
- }
249
- return min;
250
- }
251
- function getSupportLevel(stream) {
252
- const level = supportsColor(stream, stream && stream.isTTY);
253
- return translateLevel(level);
254
- }
255
- module2.exports = {
256
- supportsColor: getSupportLevel,
257
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
258
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
259
- };
260
- }
261
- });
262
- var require_supports_hyperlinks = (0, import_chunk_2ESYSVXG.__commonJS)({
263
- "../../node_modules/.pnpm/supports-hyperlinks@2.3.0/node_modules/supports-hyperlinks/index.js"(exports, module2) {
264
- "use strict";
265
- var supportsColor = require_supports_color();
266
- var hasFlag = require_has_flag();
267
- function parseVersion(versionString) {
268
- if (/^\d{3,4}$/.test(versionString)) {
269
- const m = /(\d{1,2})(\d{2})/.exec(versionString);
270
- return {
271
- major: 0,
272
- minor: parseInt(m[1], 10),
273
- patch: parseInt(m[2], 10)
274
- };
275
- }
276
- const versions = (versionString || "").split(".").map((n) => parseInt(n, 10));
277
- return {
278
- major: versions[0],
279
- minor: versions[1],
280
- patch: versions[2]
281
- };
282
- }
283
- function supportsHyperlink(stream) {
284
- const { env } = process;
285
- if ("FORCE_HYPERLINK" in env) {
286
- return !(env.FORCE_HYPERLINK.length > 0 && parseInt(env.FORCE_HYPERLINK, 10) === 0);
287
- }
288
- if (hasFlag("no-hyperlink") || hasFlag("no-hyperlinks") || hasFlag("hyperlink=false") || hasFlag("hyperlink=never")) {
289
- return false;
290
- }
291
- if (hasFlag("hyperlink=true") || hasFlag("hyperlink=always")) {
292
- return true;
293
- }
294
- if ("NETLIFY" in env) {
295
- return true;
296
- }
297
- if (!supportsColor.supportsColor(stream)) {
298
- return false;
299
- }
300
- if (stream && !stream.isTTY) {
301
- return false;
302
- }
303
- if (process.platform === "win32") {
304
- return false;
305
- }
306
- if ("CI" in env) {
307
- return false;
308
- }
309
- if ("TEAMCITY_VERSION" in env) {
310
- return false;
311
- }
312
- if ("TERM_PROGRAM" in env) {
313
- const version = parseVersion(env.TERM_PROGRAM_VERSION);
314
- switch (env.TERM_PROGRAM) {
315
- case "iTerm.app":
316
- if (version.major === 3) {
317
- return version.minor >= 1;
318
- }
319
- return version.major > 3;
320
- case "WezTerm":
321
- return version.major >= 20200620;
322
- case "vscode":
323
- return version.major > 1 || version.major === 1 && version.minor >= 72;
324
- }
325
- }
326
- if ("VTE_VERSION" in env) {
327
- if (env.VTE_VERSION === "0.50.0") {
328
- return false;
329
- }
330
- const version = parseVersion(env.VTE_VERSION);
331
- return version.major > 0 || version.minor >= 50;
332
- }
333
- return false;
334
- }
335
- module2.exports = {
336
- supportsHyperlink,
337
- stdout: supportsHyperlink(process.stdout),
338
- stderr: supportsHyperlink(process.stderr)
339
- };
340
- }
341
- });
342
- var require_terminal_link = (0, import_chunk_2ESYSVXG.__commonJS)({
343
- "../../node_modules/.pnpm/terminal-link@2.1.1/node_modules/terminal-link/index.js"(exports, module2) {
344
- "use strict";
345
- var ansiEscapes = require_ansi_escapes();
346
- var supportsHyperlinks = require_supports_hyperlinks();
347
- var terminalLink2 = (text, url, { target = "stdout", ...options } = {}) => {
348
- if (!supportsHyperlinks[target]) {
349
- if (options.fallback === false) {
350
- return text;
351
- }
352
- return typeof options.fallback === "function" ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`;
353
- }
354
- return ansiEscapes.link(text, url);
355
- };
356
- module2.exports = (text, url, options = {}) => terminalLink2(text, url, options);
357
- module2.exports.stderr = (text, url, options = {}) => terminalLink2(text, url, { target: "stderr", ...options });
358
- module2.exports.isSupported = supportsHyperlinks.stdout;
359
- module2.exports.stderr.isSupported = supportsHyperlinks.stderr;
360
- }
361
- });
362
- var import_terminal_link = (0, import_chunk_2ESYSVXG.__toESM)(require_terminal_link());
363
- function link(url) {
364
- return (0, import_terminal_link.default)(url, url, {
365
- fallback: import_chunk_YVXCXD3A.underline
366
- });
367
- }