varlock 0.2.3 → 0.3.0
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-BXR2RIO6.js → chunk-26ICEAKS.js} +6 -5
- package/dist/chunk-26ICEAKS.js.map +1 -0
- package/dist/{chunk-UDXNNRWI.js → chunk-4A54P4EM.js} +10 -10
- package/dist/chunk-4A54P4EM.js.map +1 -0
- package/dist/chunk-GEJNYKR4.js +17 -0
- package/dist/chunk-GEJNYKR4.js.map +1 -0
- package/dist/{chunk-35SAMS66.js → chunk-GJ7PTJM4.js} +3 -3
- package/dist/{chunk-35SAMS66.js.map → chunk-GJ7PTJM4.js.map} +1 -1
- package/dist/{chunk-YIXN7TC7.js → chunk-IG5PPVD7.js} +40 -64
- package/dist/chunk-IG5PPVD7.js.map +1 -0
- package/dist/chunk-JDMZWNQA.js +68 -0
- package/dist/chunk-JDMZWNQA.js.map +1 -0
- package/dist/chunk-KKPD7AYU.js +34 -0
- package/dist/chunk-KKPD7AYU.js.map +1 -0
- package/dist/{chunk-HTF7NU5C.js → chunk-LZ52O5WU.js} +10 -7
- package/dist/chunk-LZ52O5WU.js.map +1 -0
- package/dist/chunk-MHIFZAPA.js +405 -0
- package/dist/chunk-MHIFZAPA.js.map +1 -0
- package/dist/{chunk-Q3C4VKFT.js → chunk-MXZI2FC6.js} +17 -41
- package/dist/chunk-MXZI2FC6.js.map +1 -0
- package/dist/{chunk-ISSW6NKZ.js → chunk-TLXFVH7P.js} +20 -17
- package/dist/chunk-TLXFVH7P.js.map +1 -0
- package/dist/chunk-VQ5I7WMP.js +331 -0
- package/dist/chunk-VQ5I7WMP.js.map +1 -0
- package/dist/{chunk-PESTWPBG.js → chunk-WDC5CEKD.js} +8 -6
- package/dist/chunk-WDC5CEKD.js.map +1 -0
- package/dist/{chunk-OY5U5WTF.js → chunk-WZW7QS6M.js} +2700 -2158
- package/dist/chunk-WZW7QS6M.js.map +1 -0
- package/dist/chunk-Y3ITSQA4.js +58 -0
- package/dist/chunk-Y3ITSQA4.js.map +1 -0
- package/dist/cli/cli-executable.js +54 -38
- package/dist/cli/cli-executable.js.map +1 -1
- package/dist/config-item-2AL7WF23.js +5 -0
- package/dist/config-item-2AL7WF23.js.map +1 -0
- package/dist/{env-graph-DIcuAiYh.d.ts → env-graph-C8s2oqOJ.d.ts} +62 -2
- package/dist/help.command-7E52XAOO.js +5 -0
- package/dist/{help.command-MLH2WA5Y.js.map → help.command-7E52XAOO.js.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/init.command-J4HZL3PB.js +12 -0
- package/dist/{init.command-RAYBZ66R.js.map → init.command-J4HZL3PB.js.map} +1 -1
- package/dist/load.command-6DAP7LEX.js +11 -0
- package/dist/{load.command-KOSPGLV6.js.map → load.command-6DAP7LEX.js.map} +1 -1
- package/dist/plugin-lib.d.ts +2 -2
- package/dist/printenv.command-7B7SZ2EF.js +12 -0
- package/dist/printenv.command-7B7SZ2EF.js.map +1 -0
- package/dist/run.command-HVV6XXDR.js +12 -0
- package/dist/{run.command-BOBQIELJ.js.map → run.command-HVV6XXDR.js.map} +1 -1
- package/dist/runtime/env.d.ts +1 -1
- package/dist/scan.command-Q33VJOPD.js +13 -0
- package/dist/scan.command-Q33VJOPD.js.map +1 -0
- package/dist/telemetry.command-HOJDUCKG.js +11 -0
- package/dist/{telemetry.command-SFEMMU3U.js.map → telemetry.command-HOJDUCKG.js.map} +1 -1
- package/package.json +21 -20
- package/LICENSE +0 -21
- package/dist/chunk-BXR2RIO6.js.map +0 -1
- package/dist/chunk-HTF7NU5C.js.map +0 -1
- package/dist/chunk-ISSW6NKZ.js.map +0 -1
- package/dist/chunk-OY5U5WTF.js.map +0 -1
- package/dist/chunk-PESTWPBG.js.map +0 -1
- package/dist/chunk-Q3C4VKFT.js.map +0 -1
- package/dist/chunk-UDXNNRWI.js.map +0 -1
- package/dist/chunk-YIXN7TC7.js.map +0 -1
- package/dist/help.command-MLH2WA5Y.js +0 -5
- package/dist/init.command-RAYBZ66R.js +0 -9
- package/dist/load.command-KOSPGLV6.js +0 -9
- package/dist/run.command-BOBQIELJ.js +0 -10
- package/dist/telemetry.command-SFEMMU3U.js +0 -9
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { spawnAsync } from './chunk-Y3ITSQA4.js';
|
|
2
|
+
import { detectJsPackageManager, logLines, fmt, installJsDependency } from './chunk-MXZI2FC6.js';
|
|
3
|
+
import { define } from './chunk-4A54P4EM.js';
|
|
4
|
+
import { gracefulExit, ansis_default } from './chunk-VQ5I7WMP.js';
|
|
5
|
+
import { envSpecUpdater, ParsedEnvSpecStaticValue, tryCatch, parseEnvSpecDotEnvFile, pathExists } from './chunk-WZW7QS6M.js';
|
|
6
|
+
import { __commonJS, __toESM, __name } from './chunk-6PEHRAEP.js';
|
|
5
7
|
import path2, { dirname } from 'path';
|
|
6
8
|
import fs3 from 'fs/promises';
|
|
7
9
|
import N2, { stdin, stdout } from 'process';
|
|
8
10
|
import ot from 'readline';
|
|
9
11
|
import { WriteStream } from 'tty';
|
|
10
12
|
import 'fs';
|
|
11
|
-
import
|
|
12
|
-
import { exec, spawn } from 'child_process';
|
|
13
|
+
import 'util';
|
|
13
14
|
|
|
14
|
-
// ../../node_modules/.
|
|
15
|
+
// ../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
15
16
|
var require_picocolors = __commonJS({
|
|
16
|
-
"../../node_modules/.
|
|
17
|
+
"../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports$1, module) {
|
|
17
18
|
var p = process || {};
|
|
18
19
|
var argv = p.argv || [];
|
|
19
20
|
var env = p.env || {};
|
|
@@ -83,9 +84,9 @@ var require_picocolors = __commonJS({
|
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
86
|
|
|
86
|
-
// ../../node_modules/.
|
|
87
|
+
// ../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
|
|
87
88
|
var require_src = __commonJS({
|
|
88
|
-
"../../node_modules/.
|
|
89
|
+
"../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$1, module) {
|
|
89
90
|
var ESC = "\x1B";
|
|
90
91
|
var CSI = `${ESC}[`;
|
|
91
92
|
var beep = "\x07";
|
|
@@ -138,7 +139,7 @@ var require_src = __commonJS({
|
|
|
138
139
|
}
|
|
139
140
|
});
|
|
140
141
|
|
|
141
|
-
// ../../node_modules/.
|
|
142
|
+
// ../../node_modules/.bun/@clack+core@1.0.1/node_modules/@clack/core/dist/index.mjs
|
|
142
143
|
var import_sisteransi = __toESM(require_src(), 1);
|
|
143
144
|
function B(t, e2, s) {
|
|
144
145
|
if (!s.some((u) => !u.disabled)) return t;
|
|
@@ -575,7 +576,7 @@ var Wt = class extends x {
|
|
|
575
576
|
}
|
|
576
577
|
};
|
|
577
578
|
|
|
578
|
-
// ../../node_modules/.
|
|
579
|
+
// ../../node_modules/.bun/@clack+prompts@1.0.1/node_modules/@clack/prompts/dist/index.mjs
|
|
579
580
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
580
581
|
__toESM(require_src(), 1);
|
|
581
582
|
function me() {
|
|
@@ -882,56 +883,6 @@ ${n}
|
|
|
882
883
|
} }).prompt();
|
|
883
884
|
}, "Je");
|
|
884
885
|
`${import_picocolors.default.gray(d)} `;
|
|
885
|
-
var ExecError = class extends Error {
|
|
886
|
-
constructor(exitCode, signal, data = "command gave no output") {
|
|
887
|
-
super(data);
|
|
888
|
-
this.exitCode = exitCode;
|
|
889
|
-
this.signal = signal;
|
|
890
|
-
this.data = data;
|
|
891
|
-
}
|
|
892
|
-
static {
|
|
893
|
-
__name(this, "ExecError");
|
|
894
|
-
}
|
|
895
|
-
};
|
|
896
|
-
function spawnAsyncHelper(command, args, spawnOptions) {
|
|
897
|
-
const childProcess = spawn(command, args, spawnOptions || {});
|
|
898
|
-
const deferred = new Promise((resolve, reject) => {
|
|
899
|
-
let stdoutData = "";
|
|
900
|
-
let stderrData = "";
|
|
901
|
-
childProcess.stdout?.on("data", (data) => {
|
|
902
|
-
stdoutData += data.toString();
|
|
903
|
-
});
|
|
904
|
-
childProcess.stderr?.on("data", (data) => {
|
|
905
|
-
stderrData += data.toString();
|
|
906
|
-
});
|
|
907
|
-
childProcess.stdout?.on("error", (err) => {
|
|
908
|
-
reject(err);
|
|
909
|
-
});
|
|
910
|
-
childProcess.stderr?.on("error", (err) => {
|
|
911
|
-
reject(err);
|
|
912
|
-
});
|
|
913
|
-
childProcess.on("error", (err) => {
|
|
914
|
-
reject(err);
|
|
915
|
-
});
|
|
916
|
-
childProcess.on("exit", (exitCode, signal) => {
|
|
917
|
-
if (!exitCode) {
|
|
918
|
-
resolve(stdoutData);
|
|
919
|
-
} else {
|
|
920
|
-
reject(
|
|
921
|
-
new ExecError(exitCode, signal, stderrData)
|
|
922
|
-
);
|
|
923
|
-
}
|
|
924
|
-
});
|
|
925
|
-
});
|
|
926
|
-
return { childProcess, execResult: deferred };
|
|
927
|
-
}
|
|
928
|
-
__name(spawnAsyncHelper, "spawnAsyncHelper");
|
|
929
|
-
async function spawnAsync(command, args, opts) {
|
|
930
|
-
const { execResult } = spawnAsyncHelper(command, args, opts);
|
|
931
|
-
return execResult;
|
|
932
|
-
}
|
|
933
|
-
__name(spawnAsync, "spawnAsync");
|
|
934
|
-
promisify(exec);
|
|
935
886
|
async function checkIsFileGitIgnored(path3, warnIfNotGitRepo = false) {
|
|
936
887
|
try {
|
|
937
888
|
await spawnAsync("git", ["check-ignore", path3, "-q"], { cwd: dirname(path3) });
|
|
@@ -1525,8 +1476,33 @@ var commandFn = /* @__PURE__ */ __name(async (ctx) => {
|
|
|
1525
1476
|
]);
|
|
1526
1477
|
}
|
|
1527
1478
|
}
|
|
1479
|
+
if (jsPackageManager?.name === "bun") {
|
|
1480
|
+
const bunfigPath = path2.join(process.cwd(), "bunfig.toml");
|
|
1481
|
+
const bunfigExists = await pathExists(bunfigPath);
|
|
1482
|
+
if (bunfigExists) {
|
|
1483
|
+
const bunfigContents = await fs3.readFile(bunfigPath, "utf-8");
|
|
1484
|
+
if (!/^\s*env\s*=\s*false\s*$/m.test(bunfigContents)) {
|
|
1485
|
+
await fs3.writeFile(bunfigPath, `env = false
|
|
1486
|
+
${bunfigContents}`);
|
|
1487
|
+
logLines([
|
|
1488
|
+
"",
|
|
1489
|
+
`\u2705 Added ${ansis_default.bold("env = false")} to your existing ${fmt.fileName("bunfig.toml")}`,
|
|
1490
|
+
ansis_default.dim("This disables Bun's automatic .env loading, which conflicts with Varlock."),
|
|
1491
|
+
ansis_default.dim(`See ${ansis_default.underline("https://varlock.dev/integrations/bun")} for more info.`)
|
|
1492
|
+
]);
|
|
1493
|
+
}
|
|
1494
|
+
} else {
|
|
1495
|
+
await fs3.writeFile(bunfigPath, "env = false\n");
|
|
1496
|
+
logLines([
|
|
1497
|
+
"",
|
|
1498
|
+
`\u2705 Created ${fmt.fileName("bunfig.toml")} with ${ansis_default.bold("env = false")}`,
|
|
1499
|
+
ansis_default.dim("This disables Bun's automatic .env loading, which conflicts with Varlock."),
|
|
1500
|
+
ansis_default.dim(`See ${ansis_default.underline("https://varlock.dev/integrations/bun")} for more info.`)
|
|
1501
|
+
]);
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1528
1504
|
}, "commandFn");
|
|
1529
1505
|
|
|
1530
1506
|
export { commandFn, commandSpec };
|
|
1531
|
-
//# sourceMappingURL=chunk-
|
|
1532
|
-
//# sourceMappingURL=chunk-
|
|
1507
|
+
//# sourceMappingURL=chunk-IG5PPVD7.js.map
|
|
1508
|
+
//# sourceMappingURL=chunk-IG5PPVD7.js.map
|