@zuplo/cli 1.81.0 → 1.82.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.
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c73be6b5-a5f8-54e9-8902-e6c42cb6b377")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1eb67449-21d8-583a-9429-4ef33f6ecaed")}catch(e){}}();
3
3
  import * as dotenv from "dotenv";
4
4
  import { cpSync, existsSync } from "node:fs";
5
5
  import { readFile } from "node:fs/promises";
@@ -17,10 +17,16 @@ export async function dev(argv) {
17
17
  }
18
18
  process.env.GLOBAL_MODULE_LOCATION = fileURLToPath(new URL("../../node_modules", import.meta.url));
19
19
  process.env.DENO_EXECUTABLE = await locateDenoExecutable();
20
+ const loadedEnvFiles = [];
21
+ const envResult = dotenv.config();
22
+ if (envResult.error === undefined) {
23
+ loadedEnvFiles.push(".env");
24
+ }
20
25
  const envFile = join(sourceDirectory, ".env.zuplo");
21
26
  if (existsSync(envFile)) {
22
27
  const config = dotenv.parse(await readFile(envFile, "utf-8"));
23
28
  dotenv.populate(process.env, config);
29
+ loadedEnvFiles.push(".env.zuplo");
24
30
  }
25
31
  const config = {
26
32
  build_assets_url: pathToFileURL(sourceDirectory),
@@ -41,6 +47,9 @@ export async function dev(argv) {
41
47
  printDiagnosticsToConsole("Ctrl+C to exit");
42
48
  printDiagnosticsToConsole("");
43
49
  printDiagnosticsToConsole(`🚀 Zuplo Gateway: http://localhost:${port}`);
50
+ if (loadedEnvFiles.length > 0) {
51
+ printDiagnosticsToConsole(`⚙️ Loaded env files: \n - ${loadedEnvFiles.join(" \n - ")}`);
52
+ }
44
53
  printDiagnosticsToConsole("");
45
54
  printDiagnosticsToConsole("");
46
55
  return new Promise((resolve) => {
@@ -51,4 +60,4 @@ export async function dev(argv) {
51
60
  });
52
61
  }
53
62
  //# sourceMappingURL=handler.js.map
54
- //# debugId=c73be6b5-a5f8-54e9-8902-e6c42cb6b377
63
+ //# debugId=1eb67449-21d8-583a-9429-4ef33f6ecaed