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.
Files changed (69) hide show
  1. package/dist/{chunk-BXR2RIO6.js → chunk-26ICEAKS.js} +6 -5
  2. package/dist/chunk-26ICEAKS.js.map +1 -0
  3. package/dist/{chunk-UDXNNRWI.js → chunk-4A54P4EM.js} +10 -10
  4. package/dist/chunk-4A54P4EM.js.map +1 -0
  5. package/dist/chunk-GEJNYKR4.js +17 -0
  6. package/dist/chunk-GEJNYKR4.js.map +1 -0
  7. package/dist/{chunk-35SAMS66.js → chunk-GJ7PTJM4.js} +3 -3
  8. package/dist/{chunk-35SAMS66.js.map → chunk-GJ7PTJM4.js.map} +1 -1
  9. package/dist/{chunk-YIXN7TC7.js → chunk-IG5PPVD7.js} +40 -64
  10. package/dist/chunk-IG5PPVD7.js.map +1 -0
  11. package/dist/chunk-JDMZWNQA.js +68 -0
  12. package/dist/chunk-JDMZWNQA.js.map +1 -0
  13. package/dist/chunk-KKPD7AYU.js +34 -0
  14. package/dist/chunk-KKPD7AYU.js.map +1 -0
  15. package/dist/{chunk-HTF7NU5C.js → chunk-LZ52O5WU.js} +10 -7
  16. package/dist/chunk-LZ52O5WU.js.map +1 -0
  17. package/dist/chunk-MHIFZAPA.js +405 -0
  18. package/dist/chunk-MHIFZAPA.js.map +1 -0
  19. package/dist/{chunk-Q3C4VKFT.js → chunk-MXZI2FC6.js} +17 -41
  20. package/dist/chunk-MXZI2FC6.js.map +1 -0
  21. package/dist/{chunk-ISSW6NKZ.js → chunk-TLXFVH7P.js} +20 -17
  22. package/dist/chunk-TLXFVH7P.js.map +1 -0
  23. package/dist/chunk-VQ5I7WMP.js +331 -0
  24. package/dist/chunk-VQ5I7WMP.js.map +1 -0
  25. package/dist/{chunk-PESTWPBG.js → chunk-WDC5CEKD.js} +8 -6
  26. package/dist/chunk-WDC5CEKD.js.map +1 -0
  27. package/dist/{chunk-OY5U5WTF.js → chunk-WZW7QS6M.js} +2700 -2158
  28. package/dist/chunk-WZW7QS6M.js.map +1 -0
  29. package/dist/chunk-Y3ITSQA4.js +58 -0
  30. package/dist/chunk-Y3ITSQA4.js.map +1 -0
  31. package/dist/cli/cli-executable.js +54 -38
  32. package/dist/cli/cli-executable.js.map +1 -1
  33. package/dist/config-item-2AL7WF23.js +5 -0
  34. package/dist/config-item-2AL7WF23.js.map +1 -0
  35. package/dist/{env-graph-DIcuAiYh.d.ts → env-graph-C8s2oqOJ.d.ts} +62 -2
  36. package/dist/help.command-7E52XAOO.js +5 -0
  37. package/dist/{help.command-MLH2WA5Y.js.map → help.command-7E52XAOO.js.map} +1 -1
  38. package/dist/index.d.ts +2 -2
  39. package/dist/index.js +4 -2
  40. package/dist/index.js.map +1 -1
  41. package/dist/init.command-J4HZL3PB.js +12 -0
  42. package/dist/{init.command-RAYBZ66R.js.map → init.command-J4HZL3PB.js.map} +1 -1
  43. package/dist/load.command-6DAP7LEX.js +11 -0
  44. package/dist/{load.command-KOSPGLV6.js.map → load.command-6DAP7LEX.js.map} +1 -1
  45. package/dist/plugin-lib.d.ts +2 -2
  46. package/dist/printenv.command-7B7SZ2EF.js +12 -0
  47. package/dist/printenv.command-7B7SZ2EF.js.map +1 -0
  48. package/dist/run.command-HVV6XXDR.js +12 -0
  49. package/dist/{run.command-BOBQIELJ.js.map → run.command-HVV6XXDR.js.map} +1 -1
  50. package/dist/runtime/env.d.ts +1 -1
  51. package/dist/scan.command-Q33VJOPD.js +13 -0
  52. package/dist/scan.command-Q33VJOPD.js.map +1 -0
  53. package/dist/telemetry.command-HOJDUCKG.js +11 -0
  54. package/dist/{telemetry.command-SFEMMU3U.js.map → telemetry.command-HOJDUCKG.js.map} +1 -1
  55. package/package.json +21 -20
  56. package/LICENSE +0 -21
  57. package/dist/chunk-BXR2RIO6.js.map +0 -1
  58. package/dist/chunk-HTF7NU5C.js.map +0 -1
  59. package/dist/chunk-ISSW6NKZ.js.map +0 -1
  60. package/dist/chunk-OY5U5WTF.js.map +0 -1
  61. package/dist/chunk-PESTWPBG.js.map +0 -1
  62. package/dist/chunk-Q3C4VKFT.js.map +0 -1
  63. package/dist/chunk-UDXNNRWI.js.map +0 -1
  64. package/dist/chunk-YIXN7TC7.js.map +0 -1
  65. package/dist/help.command-MLH2WA5Y.js +0 -5
  66. package/dist/init.command-RAYBZ66R.js +0 -9
  67. package/dist/load.command-KOSPGLV6.js +0 -9
  68. package/dist/run.command-BOBQIELJ.js +0 -10
  69. package/dist/telemetry.command-SFEMMU3U.js +0 -9
@@ -1,19 +1,20 @@
1
- import { detectJsPackageManager, logLines, fmt, installJsDependency } from './chunk-Q3C4VKFT.js';
2
- import { define } from './chunk-UDXNNRWI.js';
3
- import { envSpecUpdater, ParsedEnvSpecStaticValue, tryCatch, parseEnvSpecDotEnvFile, gracefulExit, ansis_default, pathExists } from './chunk-OY5U5WTF.js';
4
- import { __commonJS, __name, __toESM } from './chunk-6PEHRAEP.js';
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 { promisify } from 'util';
12
- import { exec, spawn } from 'child_process';
13
+ import 'util';
13
14
 
14
- // ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
15
+ // ../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
15
16
  var require_picocolors = __commonJS({
16
- "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
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/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
87
+ // ../../node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
87
88
  var require_src = __commonJS({
88
- "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
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/.pnpm/@clack+core@1.0.1/node_modules/@clack/core/dist/index.mjs
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/.pnpm/@clack+prompts@1.0.1/node_modules/@clack/prompts/dist/index.mjs
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-YIXN7TC7.js.map
1532
- //# sourceMappingURL=chunk-YIXN7TC7.js.map
1507
+ //# sourceMappingURL=chunk-IG5PPVD7.js.map
1508
+ //# sourceMappingURL=chunk-IG5PPVD7.js.map