@prisma/internals 6.3.0-integration-engines-6-3-0-6-integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03.2 → 6.3.0-integration-simpler-typeinfo-query.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3DMEILBC.js → chunk-2DXAGCPS.js} +11 -11
- package/dist/{chunk-4B7QW7H5.js → chunk-2WJPHJ2I.js} +5 -5
- package/dist/{chunk-MGZOEY6N.js → chunk-3U2ANLD3.js} +6 -6
- package/dist/{chunk-4O27JVUK.js → chunk-44JHENE6.js} +41 -14
- package/dist/{chunk-KQOJB3ZW.js → chunk-4NFLAUKD.js} +70 -70
- package/dist/chunk-4RWCRJYD.js +166 -0
- package/dist/{chunk-5MCWLJSR.js → chunk-5I4BOTBV.js} +9 -3
- package/dist/{chunk-ZZLZJFQD.js → chunk-5R7AZFMV.js} +5 -5
- package/dist/{chunk-6QXYYIUQ.js → chunk-5UJZARUY.js} +17 -17
- package/dist/{chunk-D6NVMO5B.js → chunk-67KWF6KB.js} +5 -5
- package/dist/{chunk-OA3Y3SYB.js → chunk-B44XJG7K.js} +5 -5
- package/dist/{chunk-6HMDWGVB.js → chunk-CKVVVLEH.js} +8 -8
- package/dist/{chunk-MPJLR4LI.js → chunk-COFXY6NH.js} +41 -14
- package/dist/chunk-D4MCOTL5.js +122 -0
- package/dist/{chunk-AXVFAZVY.js → chunk-DFG3425X.js} +16 -16
- package/dist/chunk-FPHZVRV4.js +110 -0
- package/dist/{chunk-S57RMXZW.js → chunk-FTS2IEWX.js} +5 -5
- package/dist/chunk-G7LL2H2O.js +54 -0
- package/dist/{chunk-25RJ7YTB.js → chunk-H3T4L34H.js} +83 -88
- package/dist/{chunk-3BND5XB4.js → chunk-HMGEWJDY.js} +47 -232
- package/dist/{chunk-77IC3DNO.js → chunk-IABMG3F4.js} +5 -5
- package/dist/{chunk-CXEMRKV4.js → chunk-IAEMHQAC.js} +8 -8
- package/dist/{chunk-CZDIXJEO.js → chunk-J3JE5NVO.js} +32 -56
- package/dist/{chunk-N6K7M2HZ.js → chunk-J4MA2JIK.js} +5 -5
- package/dist/{chunk-IHZ2I7E5.js → chunk-JBUUTZQL.js} +15 -15
- package/dist/chunk-JMZHUHCC.js +177 -0
- package/dist/{chunk-T6NCATRB.js → chunk-KNNIRRTO.js} +5 -5
- package/dist/{chunk-6R6PZCVQ.js → chunk-KPVPQQGU.js} +5 -5
- package/dist/{chunk-BNAT44VK.js → chunk-KROMVQBD.js} +9 -9
- package/dist/{chunk-TR2BJI77.js → chunk-LXIE6UJ2.js} +961 -79
- package/dist/{chunk-EAUIEZK2.js → chunk-MUJIYA44.js} +5 -5
- package/dist/{chunk-CGFXOUVQ.js → chunk-OHBFHT5Q.js} +15 -15
- package/dist/{chunk-UPIULDLZ.js → chunk-OSOXVAZB.js} +11 -11
- package/dist/chunk-RQPDQSHK.js +1429 -0
- package/dist/{chunk-2XRDQCIA.js → chunk-S4LINK5Y.js} +5 -5
- package/dist/{chunk-D3VAE4HY.js → chunk-UR3LUZY3.js} +17 -17
- package/dist/{chunk-EKBX4J6O.js → chunk-V2VWODV3.js} +5 -5
- package/dist/{chunk-FT32HRUC.js → chunk-VFU3I6P6.js} +16 -16
- package/dist/{chunk-JU7L7EBJ.js → chunk-VJQK3LHU.js} +185 -74
- package/dist/{chunk-V2ZF7ETH.js → chunk-WCRKL55L.js} +7 -7
- package/dist/{chunk-C47SCASR.js → chunk-WMIBAVWZ.js} +5 -5
- package/dist/{chunk-PC7HPZQJ.js → chunk-WYTN2XGW.js} +5 -5
- package/dist/{chunk-QTXYAZFX.js → chunk-XLYQ6PQW.js} +17 -17
- package/dist/{chunk-VRT7T6MF.js → chunk-YDZVEVUG.js} +73 -73
- package/dist/{chunk-ZKAW5JSN.js → chunk-ZA3RMW2P.js} +8 -5
- package/dist/cli/checkUnsupportedDataProxy.js +40 -41
- package/dist/cli/getSchema.js +45 -46
- package/dist/cli/hashes.js +40 -41
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +39 -40
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +8 -8
- package/dist/engine-commands/getEnginesMetaInfo.js +10 -10
- package/dist/engine-commands/index.js +50 -51
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/relativizePathInPSLError.js +2 -2
- package/dist/engine-commands/validate.js +10 -10
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +39 -40
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +39 -40
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +9 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +132 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +40 -41
- package/dist/get-generators/getGenerators.js +42 -43
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +85 -87
- package/dist/{multipart-parser-32AROPTR.js → multipart-parser-LCETWFPE.js} +6 -9
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +39 -40
- package/dist/tracing/types.d.ts +16 -26
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/getCommandWithExecutor.js +3 -3
- package/dist/utils/getEnvPaths.js +39 -40
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.js +3 -3
- package/dist/utils/handlePanic.js +39 -40
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
- package/dist/utils/load.js +4 -4
- package/dist/utils/loadEnvFile.js +39 -40
- package/dist/utils/tryLoadEnvs.js +5 -5
- package/dist/wasm.js +4 -4
- package/package.json +12 -12
- package/dist/chunk-BONFK27U.js +0 -47
- package/dist/chunk-PPCNLYSB.js +0 -47
- package/dist/cli/getTypescriptVersion.d.ts +0 -1
- package/dist/cli/getTypescriptVersion.js +0 -25
- package/dist/typescript-AILDXN3I.js +0 -205230
- package/dist/typescript-WN4QH2CP.js +0 -205192
@@ -26,12 +26,12 @@ 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
|
30
|
-
__export(
|
29
|
+
var chunk_WMIBAVWZ_exports = {};
|
30
|
+
__export(chunk_WMIBAVWZ_exports, {
|
31
31
|
relativizePathInPSLError: () => relativizePathInPSLError
|
32
32
|
});
|
33
|
-
module.exports = __toCommonJS(
|
34
|
-
var
|
33
|
+
module.exports = __toCommonJS(chunk_WMIBAVWZ_exports);
|
34
|
+
var import_path = __toESM(require("path"));
|
35
35
|
function relativizePathInPSLError(error) {
|
36
|
-
return error.replaceAll(process.cwd() +
|
36
|
+
return error.replaceAll(process.cwd() + import_path.default.sep, "");
|
37
37
|
}
|
@@ -16,11 +16,11 @@ 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
|
20
|
-
__export(
|
19
|
+
var chunk_WYTN2XGW_exports = {};
|
20
|
+
__export(chunk_WYTN2XGW_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_WYTN2XGW_exports);
|
24
|
+
var import_chunk_CKVVVLEH = require("./chunk-CKVVVLEH.js");
|
25
|
+
var packageJson = (0, import_chunk_CKVVVLEH.require_package)();
|
26
26
|
var version = packageJson.version;
|
@@ -26,21 +26,21 @@ 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
|
30
|
-
__export(
|
29
|
+
var chunk_XLYQ6PQW_exports = {};
|
30
|
+
__export(chunk_XLYQ6PQW_exports, {
|
31
31
|
getGitHubIssueUrl: () => getGitHubIssueUrl,
|
32
32
|
wouldYouLikeToCreateANewIssue: () => wouldYouLikeToCreateANewIssue
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_XLYQ6PQW_exports);
|
35
35
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
36
|
-
var
|
36
|
+
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
37
37
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
38
38
|
var import_get_platform = require("@prisma/get-platform");
|
39
|
-
var
|
40
|
-
var
|
41
|
-
var
|
42
|
-
var
|
43
|
-
var
|
39
|
+
var import_process = __toESM(require("process"));
|
40
|
+
var import_os = __toESM(require("os"));
|
41
|
+
var import_fs = __toESM(require("fs"));
|
42
|
+
var import_fs2 = __toESM(require("fs"));
|
43
|
+
var import_fs3 = __toESM(require("fs"));
|
44
44
|
var import_prompts = __toESM(require("prompts"));
|
45
45
|
var require_is_windows = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
46
46
|
"../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js"(exports, module2) {
|
@@ -309,7 +309,7 @@ var import_is_windows = (0, import_chunk_WWAWV7DQ.__toESM)(require_is_windows())
|
|
309
309
|
var isDockerCached;
|
310
310
|
function hasDockerEnv() {
|
311
311
|
try {
|
312
|
-
|
312
|
+
import_fs3.default.statSync("/.dockerenv");
|
313
313
|
return true;
|
314
314
|
} catch {
|
315
315
|
return false;
|
@@ -317,7 +317,7 @@ function hasDockerEnv() {
|
|
317
317
|
}
|
318
318
|
function hasDockerCGroup() {
|
319
319
|
try {
|
320
|
-
return
|
320
|
+
return import_fs3.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
321
321
|
} catch {
|
322
322
|
return false;
|
323
323
|
}
|
@@ -331,7 +331,7 @@ function isDocker() {
|
|
331
331
|
var cachedResult;
|
332
332
|
var hasContainerEnv = () => {
|
333
333
|
try {
|
334
|
-
|
334
|
+
import_fs2.default.statSync("/run/.containerenv");
|
335
335
|
return true;
|
336
336
|
} catch {
|
337
337
|
return false;
|
@@ -344,22 +344,22 @@ function isInsideContainer() {
|
|
344
344
|
return cachedResult;
|
345
345
|
}
|
346
346
|
var isWsl = () => {
|
347
|
-
if (
|
347
|
+
if (import_process.default.platform !== "linux") {
|
348
348
|
return false;
|
349
349
|
}
|
350
|
-
if (
|
350
|
+
if (import_os.default.release().toLowerCase().includes("microsoft")) {
|
351
351
|
if (isInsideContainer()) {
|
352
352
|
return false;
|
353
353
|
}
|
354
354
|
return true;
|
355
355
|
}
|
356
356
|
try {
|
357
|
-
return
|
357
|
+
return import_fs.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
358
358
|
} catch {
|
359
359
|
return false;
|
360
360
|
}
|
361
361
|
};
|
362
|
-
var is_wsl_default =
|
362
|
+
var is_wsl_default = import_process.default.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
363
363
|
var import_new_github_issue_url = (0, import_chunk_WWAWV7DQ.__toESM)(require_new_github_issue_url());
|
364
364
|
var import_open = (0, import_chunk_WWAWV7DQ.__toESM)(require_open());
|
365
365
|
var import_strip_ansi = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_ODI3VNBD.require_strip_ansi)());
|
@@ -379,7 +379,7 @@ function getGitHubIssueUrl({
|
|
379
379
|
});
|
380
380
|
}
|
381
381
|
async function wouldYouLikeToCreateANewIssue(options) {
|
382
|
-
const shouldCreateNewIssue = await (0,
|
382
|
+
const shouldCreateNewIssue = await (0, import_chunk_H3T4L34H.$)(options.prompt).with(true, async () => {
|
383
383
|
const createNewIssueResponse = await (0, import_prompts.default)({
|
384
384
|
type: "select",
|
385
385
|
name: "value",
|
@@ -26,27 +26,27 @@ 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
|
30
|
-
__export(
|
29
|
+
var chunk_YDZVEVUG_exports = {};
|
30
|
+
__export(chunk_YDZVEVUG_exports, {
|
31
31
|
detect: () => detect,
|
32
32
|
getCommand: () => getCommand
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_YDZVEVUG_exports);
|
35
35
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
36
|
-
var import_node_fs = __toESM(require("node:fs"));
|
37
|
-
var import_node_path = __toESM(require("node:path"));
|
38
|
-
var import_node_process = __toESM(require("node:process"));
|
39
|
-
var import_node_buffer = require("node:buffer");
|
40
|
-
var import_node_child_process = __toESM(require("node:child_process"));
|
41
|
-
var import_child_process = __toESM(require("child_process"));
|
42
|
-
var import_path = __toESM(require("path"));
|
43
36
|
var import_fs = __toESM(require("fs"));
|
44
|
-
var
|
45
|
-
var
|
46
|
-
var
|
47
|
-
var
|
48
|
-
var
|
37
|
+
var import_path = __toESM(require("path"));
|
38
|
+
var import_process = __toESM(require("process"));
|
39
|
+
var import_buffer = require("buffer");
|
40
|
+
var import_child_process = __toESM(require("child_process"));
|
41
|
+
var import_child_process2 = __toESM(require("child_process"));
|
42
|
+
var import_path2 = __toESM(require("path"));
|
43
|
+
var import_fs2 = __toESM(require("fs"));
|
44
|
+
var import_url = __toESM(require("url"));
|
49
45
|
var import_os = __toESM(require("os"));
|
46
|
+
var import_promises = require("timers/promises");
|
47
|
+
var import_stream = __toESM(require("stream"));
|
48
|
+
var import_util = require("util");
|
49
|
+
var import_os2 = __toESM(require("os"));
|
50
50
|
var import_tty = __toESM(require("tty"));
|
51
51
|
var import_readline = __toESM(require("readline"));
|
52
52
|
var import_events = __toESM(require("events"));
|
@@ -160,7 +160,7 @@ function requireWindows() {
|
|
160
160
|
hasRequiredWindows = 1;
|
161
161
|
windows = isexe2;
|
162
162
|
isexe2.sync = sync2;
|
163
|
-
var fs2 =
|
163
|
+
var fs2 = import_fs2.default;
|
164
164
|
function checkPathExt2(path2, options2) {
|
165
165
|
var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT;
|
166
166
|
if (!pathext) {
|
@@ -201,7 +201,7 @@ function requireMode() {
|
|
201
201
|
hasRequiredMode = 1;
|
202
202
|
mode = isexe2;
|
203
203
|
isexe2.sync = sync2;
|
204
|
-
var fs2 =
|
204
|
+
var fs2 = import_fs2.default;
|
205
205
|
function isexe2(path2, options2, cb) {
|
206
206
|
fs2.stat(path2, function(er, stat) {
|
207
207
|
cb(er, er ? false : checkStat2(stat, options2));
|
@@ -277,7 +277,7 @@ function sync$2(path2, options2) {
|
|
277
277
|
}
|
278
278
|
}
|
279
279
|
var isWindows$1 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
280
|
-
var path$2 =
|
280
|
+
var path$2 = import_path2.default;
|
281
281
|
var COLON = isWindows$1 ? ";" : ":";
|
282
282
|
var isexe$3 = isexe_1;
|
283
283
|
var getNotFoundError$1 = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
@@ -378,7 +378,7 @@ var pathKey$1 = (options2 = {}) => {
|
|
378
378
|
pathKey$2.exports = pathKey$1;
|
379
379
|
pathKey$2.exports.default = pathKey$1;
|
380
380
|
var pathKeyExports = pathKey$2.exports;
|
381
|
-
var path$1 =
|
381
|
+
var path$1 = import_path2.default;
|
382
382
|
var which$2 = which_1;
|
383
383
|
var getPathKey = pathKeyExports;
|
384
384
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
@@ -446,7 +446,7 @@ var shebangCommand$1 = (string = "") => {
|
|
446
446
|
}
|
447
447
|
return argument ? `${binary} ${argument}` : binary;
|
448
448
|
};
|
449
|
-
var fs =
|
449
|
+
var fs = import_fs2.default;
|
450
450
|
var shebangCommand = shebangCommand$1;
|
451
451
|
function readShebang$1(command) {
|
452
452
|
const size = 150;
|
@@ -461,7 +461,7 @@ function readShebang$1(command) {
|
|
461
461
|
return shebangCommand(buffer.toString());
|
462
462
|
}
|
463
463
|
var readShebang_1 = readShebang$1;
|
464
|
-
var path =
|
464
|
+
var path = import_path2.default;
|
465
465
|
var resolveCommand = resolveCommand_1;
|
466
466
|
var escape = _escape;
|
467
467
|
var readShebang = readShebang_1;
|
@@ -559,7 +559,7 @@ var enoent$1 = {
|
|
559
559
|
verifyENOENTSync,
|
560
560
|
notFoundError
|
561
561
|
};
|
562
|
-
var cp =
|
562
|
+
var cp = import_child_process2.default;
|
563
563
|
var parse = parse_1;
|
564
564
|
var enoent = enoent$1;
|
565
565
|
function spawn(command, args, options2) {
|
@@ -604,23 +604,23 @@ function pathKey(options2 = {}) {
|
|
604
604
|
}
|
605
605
|
function npmRunPath(options2 = {}) {
|
606
606
|
const {
|
607
|
-
cwd =
|
608
|
-
path: path_ =
|
609
|
-
execPath =
|
607
|
+
cwd = import_process.default.cwd(),
|
608
|
+
path: path_ = import_process.default.env[pathKey()],
|
609
|
+
execPath = import_process.default.execPath
|
610
610
|
} = options2;
|
611
611
|
let previous;
|
612
|
-
const cwdString = cwd instanceof URL ?
|
613
|
-
let cwdPath =
|
612
|
+
const cwdString = cwd instanceof URL ? import_url.default.fileURLToPath(cwd) : cwd;
|
613
|
+
let cwdPath = import_path.default.resolve(cwdString);
|
614
614
|
const result = [];
|
615
615
|
while (previous !== cwdPath) {
|
616
|
-
result.push(
|
616
|
+
result.push(import_path.default.join(cwdPath, "node_modules/.bin"));
|
617
617
|
previous = cwdPath;
|
618
|
-
cwdPath =
|
618
|
+
cwdPath = import_path.default.resolve(cwdPath, "..");
|
619
619
|
}
|
620
|
-
result.push(
|
621
|
-
return [...result, path_].join(
|
620
|
+
result.push(import_path.default.resolve(cwdString, execPath, ".."));
|
621
|
+
return [...result, path_].join(import_path.default.delimiter);
|
622
622
|
}
|
623
|
-
function npmRunPathEnv({ env: env2 =
|
623
|
+
function npmRunPathEnv({ env: env2 = import_process.default.env, ...options2 } = {}) {
|
624
624
|
env2 = { ...env2 };
|
625
625
|
const path2 = pathKey({ env: env2 });
|
626
626
|
options2.path = env2[path2];
|
@@ -997,7 +997,7 @@ var normalizeSignal = ({
|
|
997
997
|
}) => {
|
998
998
|
const {
|
999
999
|
signals: { [name]: constantSignal }
|
1000
|
-
} =
|
1000
|
+
} = import_os.constants;
|
1001
1001
|
const supported = constantSignal !== void 0;
|
1002
1002
|
const number2 = supported ? constantSignal : defaultNumber;
|
1003
1003
|
return { name, number: number2, description, supported, action: action2, forced, standard };
|
@@ -1044,7 +1044,7 @@ var getSignalByNumber = (number2, signals2) => {
|
|
1044
1044
|
};
|
1045
1045
|
};
|
1046
1046
|
var findSignalByNumber = (number2, signals2) => {
|
1047
|
-
const signal = signals2.find(({ name }) =>
|
1047
|
+
const signal = signals2.find(({ name }) => import_os.constants.signals[name] === number2);
|
1048
1048
|
if (signal !== void 0) {
|
1049
1049
|
return signal;
|
1050
1050
|
}
|
@@ -1081,7 +1081,7 @@ var makeError = ({
|
|
1081
1081
|
timedOut,
|
1082
1082
|
isCanceled,
|
1083
1083
|
killed,
|
1084
|
-
parsed: { options: { timeout, cwd =
|
1084
|
+
parsed: { options: { timeout, cwd = import_process.default.cwd() } }
|
1085
1085
|
}) => {
|
1086
1086
|
exitCode = exitCode === null ? void 0 : exitCode;
|
1087
1087
|
signal = signal === null ? void 0 : signal;
|
@@ -1414,7 +1414,7 @@ var setKillTimeout = (kill, signal, options2, killResult) => {
|
|
1414
1414
|
}
|
1415
1415
|
};
|
1416
1416
|
var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
1417
|
-
var isSigterm = (signal) => signal ===
|
1417
|
+
var isSigterm = (signal) => signal === import_os.default.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
1418
1418
|
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
1419
1419
|
if (forceKillAfterTimeout === true) {
|
1420
1420
|
return DEFAULT_FORCE_KILL_TIMEOUT;
|
@@ -1471,10 +1471,10 @@ function isStream(stream) {
|
|
1471
1471
|
function isWritableStream(stream) {
|
1472
1472
|
return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
|
1473
1473
|
}
|
1474
|
-
var isExecaChildProcess = (target) => target instanceof
|
1474
|
+
var isExecaChildProcess = (target) => target instanceof import_child_process.ChildProcess && typeof target.then === "function";
|
1475
1475
|
var pipeToTarget = (spawned, streamName, target) => {
|
1476
1476
|
if (typeof target === "string") {
|
1477
|
-
spawned[streamName].pipe((0,
|
1477
|
+
spawned[streamName].pipe((0, import_fs.createWriteStream)(target));
|
1478
1478
|
return spawned;
|
1479
1479
|
}
|
1480
1480
|
if (isWritableStream(target)) {
|
@@ -1717,7 +1717,7 @@ var getInput = ({ input, inputFile }) => {
|
|
1717
1717
|
return input;
|
1718
1718
|
}
|
1719
1719
|
validateInputOptions(input);
|
1720
|
-
return (0,
|
1720
|
+
return (0, import_fs.createReadStream)(inputFile);
|
1721
1721
|
};
|
1722
1722
|
var handleInput = (spawned, options2) => {
|
1723
1723
|
const input = getInput(options2);
|
@@ -1839,7 +1839,7 @@ var parseCommand = (command) => {
|
|
1839
1839
|
}
|
1840
1840
|
return tokens;
|
1841
1841
|
};
|
1842
|
-
var verboseDefault = (0,
|
1842
|
+
var verboseDefault = (0, import_util.debuglog)("execa").enabled;
|
1843
1843
|
var padField = (field, padding) => String(field).padStart(padding, "0");
|
1844
1844
|
var getTimestamp = () => {
|
1845
1845
|
const date2 = /* @__PURE__ */ new Date();
|
@@ -1849,12 +1849,12 @@ var logCommand = (escapedCommand, { verbose }) => {
|
|
1849
1849
|
if (!verbose) {
|
1850
1850
|
return;
|
1851
1851
|
}
|
1852
|
-
|
1852
|
+
import_process.default.stderr.write(`[${getTimestamp()}] ${escapedCommand}
|
1853
1853
|
`);
|
1854
1854
|
};
|
1855
1855
|
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
1856
1856
|
var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
1857
|
-
const env2 = extendEnv ? { ...
|
1857
|
+
const env2 = extendEnv ? { ...import_process.default.env, ...envOption } : envOption;
|
1858
1858
|
if (preferLocal) {
|
1859
1859
|
return npmRunPathEnv({ env: env2, cwd: localDir, execPath });
|
1860
1860
|
}
|
@@ -1871,8 +1871,8 @@ var handleArguments = (file, args, options2 = {}) => {
|
|
1871
1871
|
stripFinalNewline: true,
|
1872
1872
|
extendEnv: true,
|
1873
1873
|
preferLocal: false,
|
1874
|
-
localDir: options2.cwd ||
|
1875
|
-
execPath:
|
1874
|
+
localDir: options2.cwd || import_process.default.cwd(),
|
1875
|
+
execPath: import_process.default.execPath,
|
1876
1876
|
encoding: "utf8",
|
1877
1877
|
reject: true,
|
1878
1878
|
cleanup: true,
|
@@ -1883,13 +1883,13 @@ var handleArguments = (file, args, options2 = {}) => {
|
|
1883
1883
|
};
|
1884
1884
|
options2.env = getEnv(options2);
|
1885
1885
|
options2.stdio = normalizeStdio(options2);
|
1886
|
-
if (
|
1886
|
+
if (import_process.default.platform === "win32" && import_path.default.basename(file, ".exe") === "cmd") {
|
1887
1887
|
args.unshift("/q");
|
1888
1888
|
}
|
1889
1889
|
return { file, args, options: options2, parsed };
|
1890
1890
|
};
|
1891
1891
|
var handleOutput = (options2, value, error) => {
|
1892
|
-
if (typeof value !== "string" && !
|
1892
|
+
if (typeof value !== "string" && !import_buffer.Buffer.isBuffer(value)) {
|
1893
1893
|
return error === void 0 ? void 0 : "";
|
1894
1894
|
}
|
1895
1895
|
if (options2.stripFinalNewline) {
|
@@ -1905,9 +1905,9 @@ function execa(file, args, options2) {
|
|
1905
1905
|
validateTimeout(parsed.options);
|
1906
1906
|
let spawned;
|
1907
1907
|
try {
|
1908
|
-
spawned =
|
1908
|
+
spawned = import_child_process.default.spawn(parsed.file, parsed.args, parsed.options);
|
1909
1909
|
} catch (error) {
|
1910
|
-
const dummySpawned = new
|
1910
|
+
const dummySpawned = new import_child_process.default.ChildProcess();
|
1911
1911
|
const errorPromise = Promise.reject(makeError({
|
1912
1912
|
error,
|
1913
1913
|
stdout: "",
|
@@ -2122,9 +2122,9 @@ function checkType(type) {
|
|
2122
2122
|
throw new Error(`Invalid type specified: ${type}`);
|
2123
2123
|
}
|
2124
2124
|
var matchType = (type, stat) => stat[typeMappings[type]]();
|
2125
|
-
var toPath$1 = (urlOrPath) => urlOrPath instanceof URL ? (0,
|
2125
|
+
var toPath$1 = (urlOrPath) => urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
2126
2126
|
async function locatePath(paths, {
|
2127
|
-
cwd =
|
2127
|
+
cwd = import_process.default.cwd(),
|
2128
2128
|
type = "file",
|
2129
2129
|
allowSymlinks = true,
|
2130
2130
|
concurrency,
|
@@ -2132,22 +2132,22 @@ async function locatePath(paths, {
|
|
2132
2132
|
} = {}) {
|
2133
2133
|
checkType(type);
|
2134
2134
|
cwd = toPath$1(cwd);
|
2135
|
-
const statFunction = allowSymlinks ?
|
2135
|
+
const statFunction = allowSymlinks ? import_fs.promises.stat : import_fs.promises.lstat;
|
2136
2136
|
return pLocate(paths, async (path_) => {
|
2137
2137
|
try {
|
2138
|
-
const stat = await statFunction(
|
2138
|
+
const stat = await statFunction(import_path.default.resolve(cwd, path_));
|
2139
2139
|
return matchType(type, stat);
|
2140
2140
|
} catch {
|
2141
2141
|
return false;
|
2142
2142
|
}
|
2143
2143
|
}, { concurrency, preserveOrder });
|
2144
2144
|
}
|
2145
|
-
var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0,
|
2145
|
+
var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
2146
2146
|
var findUpStop = Symbol("findUpStop");
|
2147
2147
|
async function findUpMultiple(name, options2 = {}) {
|
2148
|
-
let directory =
|
2149
|
-
const { root } =
|
2150
|
-
const stopAt =
|
2148
|
+
let directory = import_path.default.resolve(toPath(options2.cwd) || "");
|
2149
|
+
const { root } = import_path.default.parse(directory);
|
2150
|
+
const stopAt = import_path.default.resolve(directory, options2.stopAt || root);
|
2151
2151
|
const limit = options2.limit || Number.POSITIVE_INFINITY;
|
2152
2152
|
const paths = [name].flat();
|
2153
2153
|
const runMatcher = async (locateOptions) => {
|
@@ -2167,12 +2167,12 @@ async function findUpMultiple(name, options2 = {}) {
|
|
2167
2167
|
break;
|
2168
2168
|
}
|
2169
2169
|
if (foundPath) {
|
2170
|
-
matches.push(
|
2170
|
+
matches.push(import_path.default.resolve(directory, foundPath));
|
2171
2171
|
}
|
2172
2172
|
if (directory === stopAt || matches.length >= limit) {
|
2173
2173
|
break;
|
2174
2174
|
}
|
2175
|
-
directory =
|
2175
|
+
directory = import_path.default.dirname(directory);
|
2176
2176
|
}
|
2177
2177
|
return matches;
|
2178
2178
|
}
|
@@ -2305,7 +2305,7 @@ var hasFlag$2 = (flag, argv = process.argv) => {
|
|
2305
2305
|
const terminatorPosition = argv.indexOf("--");
|
2306
2306
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
2307
2307
|
};
|
2308
|
-
var os =
|
2308
|
+
var os = import_os2.default;
|
2309
2309
|
var tty = import_tty.default;
|
2310
2310
|
var hasFlag$1 = hasFlag$2;
|
2311
2311
|
var { env } = process;
|
@@ -4570,7 +4570,7 @@ var cjs = {};
|
|
4570
4570
|
var posix$1 = {};
|
4571
4571
|
Object.defineProperty(posix$1, "__esModule", { value: true });
|
4572
4572
|
posix$1.sync = posix$1.isexe = void 0;
|
4573
|
-
var fs_1$1 =
|
4573
|
+
var fs_1$1 = import_fs2.default;
|
4574
4574
|
var promises_1$1 = import_promises2.default;
|
4575
4575
|
var isexe$2 = async (path2, options2 = {}) => {
|
4576
4576
|
const { ignoreErrors = false } = options2;
|
@@ -4617,7 +4617,7 @@ var checkMode = (stat, options2) => {
|
|
4617
4617
|
var win32 = {};
|
4618
4618
|
Object.defineProperty(win32, "__esModule", { value: true });
|
4619
4619
|
win32.sync = win32.isexe = void 0;
|
4620
|
-
var fs_1 =
|
4620
|
+
var fs_1 = import_fs2.default;
|
4621
4621
|
var promises_1 = import_promises2.default;
|
4622
4622
|
var isexe$1 = async (path2, options2 = {}) => {
|
4623
4623
|
const { ignoreErrors = false } = options2;
|
@@ -4705,7 +4705,7 @@ Object.defineProperty(options, "__esModule", { value: true });
|
|
4705
4705
|
exports.sync = impl.sync;
|
4706
4706
|
})(cjs);
|
4707
4707
|
var { isexe, sync: isexeSync } = cjs;
|
4708
|
-
var { join, delimiter, sep, posix } =
|
4708
|
+
var { join, delimiter, sep, posix } = import_path2.default;
|
4709
4709
|
var isWindows = process.platform === "win32";
|
4710
4710
|
var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1"));
|
4711
4711
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
@@ -4787,7 +4787,7 @@ var whichSync = (cmd, opt = {}) => {
|
|
4787
4787
|
var lib = which;
|
4788
4788
|
which.sync = whichSync;
|
4789
4789
|
var which$1 = /* @__PURE__ */ getDefaultExportFromCjs(lib);
|
4790
|
-
var CLI_TEMP_DIR = (0,
|
4790
|
+
var CLI_TEMP_DIR = (0, import_path.join)(import_os.default.tmpdir(), "antfu-ni");
|
4791
4791
|
function cmdExists(cmd) {
|
4792
4792
|
return which$1.sync(cmd, { nothrow: true }) !== null;
|
4793
4793
|
}
|
@@ -4797,12 +4797,12 @@ async function detect({ autoInstall, programmatic, cwd } = {}) {
|
|
4797
4797
|
const lockPath = await findUp(Object.keys(LOCKS), { cwd });
|
4798
4798
|
let packageJsonPath;
|
4799
4799
|
if (lockPath)
|
4800
|
-
packageJsonPath =
|
4800
|
+
packageJsonPath = import_path.default.resolve(lockPath, "../package.json");
|
4801
4801
|
else
|
4802
4802
|
packageJsonPath = await findUp("package.json", { cwd });
|
4803
|
-
if (packageJsonPath &&
|
4803
|
+
if (packageJsonPath && import_fs.default.existsSync(packageJsonPath)) {
|
4804
4804
|
try {
|
4805
|
-
const pkg = JSON.parse(
|
4805
|
+
const pkg = JSON.parse(import_fs.default.readFileSync(packageJsonPath, "utf8"));
|
4806
4806
|
if (typeof pkg.packageManager === "string") {
|
4807
4807
|
const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@");
|
4808
4808
|
version = ver;
|
@@ -4821,13 +4821,13 @@ async function detect({ autoInstall, programmatic, cwd } = {}) {
|
|
4821
4821
|
}
|
4822
4822
|
}
|
4823
4823
|
if (!agent && lockPath)
|
4824
|
-
agent = LOCKS[
|
4824
|
+
agent = LOCKS[import_path.default.basename(lockPath)];
|
4825
4825
|
if (agent && !cmdExists(agent.split("@")[0]) && !programmatic) {
|
4826
4826
|
if (!autoInstall) {
|
4827
4827
|
console.warn(`[ni] Detected ${agent} but it doesn't seem to be installed.
|
4828
4828
|
`);
|
4829
|
-
if (
|
4830
|
-
|
4829
|
+
if (import_process.default.env.CI)
|
4830
|
+
import_process.default.exit(1);
|
4831
4831
|
const link = terminalLink(agent, INSTALL_PAGE[agent]);
|
4832
4832
|
const { tryInstall } = await prompts$1({
|
4833
4833
|
name: "tryInstall",
|
@@ -4835,15 +4835,15 @@ async function detect({ autoInstall, programmatic, cwd } = {}) {
|
|
4835
4835
|
message: `Would you like to globally install ${link}?`
|
4836
4836
|
});
|
4837
4837
|
if (!tryInstall)
|
4838
|
-
|
4838
|
+
import_process.default.exit(1);
|
4839
4839
|
}
|
4840
4840
|
await execaCommand(`npm i -g ${agent.split("@")[0]}${version ? `@${version}` : ""}`, { stdio: "inherit", cwd });
|
4841
4841
|
}
|
4842
4842
|
return agent;
|
4843
4843
|
}
|
4844
|
-
var customRcPath =
|
4845
|
-
var home =
|
4846
|
-
var defaultRcPath =
|
4844
|
+
var customRcPath = import_process.default.env.NI_CONFIG_FILE;
|
4845
|
+
var home = import_process.default.platform === "win32" ? import_process.default.env.USERPROFILE : import_process.default.env.HOME;
|
4846
|
+
var defaultRcPath = import_path.default.join(home || "~/", ".nirc");
|
4847
4847
|
var UnsupportedCommand = class extends Error {
|
4848
4848
|
constructor({ agent, command }) {
|
4849
4849
|
super(`Command "${command}" is not support by agent "${agent}"`);
|
@@ -16,19 +16,22 @@ 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
|
20
|
-
__export(
|
19
|
+
var chunk_ZA3RMW2P_exports = {};
|
20
|
+
__export(chunk_ZA3RMW2P_exports, {
|
21
21
|
getCommandWithExecutor: () => getCommandWithExecutor
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_ZA3RMW2P_exports);
|
24
|
+
var import_chunk_5I4BOTBV = require("./chunk-5I4BOTBV.js");
|
25
25
|
function getCommandWithExecutor(command) {
|
26
|
-
if ((0,
|
26
|
+
if ((0, import_chunk_5I4BOTBV.isCurrentBinInstalledGlobally)()) {
|
27
27
|
return command;
|
28
28
|
} else {
|
29
|
+
const yarnUsed = process.env.npm_config_user_agent?.includes("yarn");
|
29
30
|
const npxUsed = __dirname.includes("_npx");
|
30
31
|
if (npxUsed) {
|
31
32
|
return `npx ${command}`;
|
33
|
+
} else if (yarnUsed) {
|
34
|
+
return `yarn ${command}`;
|
32
35
|
} else {
|
33
36
|
return command;
|
34
37
|
}
|