@nmakarov/cli-toolkit 0.46.0 → 0.49.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/args.cjs +17 -24
- package/dist/args.cjs.map +1 -1
- package/dist/args.js +17 -24
- package/dist/args.js.map +1 -1
- package/dist/cli-runner.cjs +20 -24
- package/dist/cli-runner.cjs.map +1 -1
- package/dist/cli-runner.js +20 -24
- package/dist/cli-runner.js.map +1 -1
- package/dist/deploy.cjs +61 -15
- package/dist/deploy.cjs.map +1 -1
- package/dist/deploy.js +60 -15
- package/dist/deploy.js.map +1 -1
- package/dist/index.cjs +78 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +77 -39
- package/dist/index.js.map +1 -1
- package/dist/init.cjs +20 -24
- package/dist/init.cjs.map +1 -1
- package/dist/init.js +20 -24
- package/dist/init.js.map +1 -1
- package/dist/s3.cjs.map +1 -1
- package/dist/s3.js.map +1 -1
- package/package.json +1 -1
package/dist/cli-runner.js
CHANGED
|
@@ -1439,36 +1439,29 @@ var Args = class _Args {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
return;
|
|
1441
1441
|
}
|
|
1442
|
-
let dotEnvPathFile =
|
|
1443
|
-
|
|
1444
|
-
const envSpecificPath = resolve(dotEnvPath, envSpecificFile);
|
|
1445
|
-
if (existsSync(envSpecificPath)) {
|
|
1446
|
-
dotEnvPathFile = envSpecificPath;
|
|
1447
|
-
}
|
|
1448
|
-
if (!dotEnvPathFile && !this.get("dotEnvPath")) {
|
|
1442
|
+
let dotEnvPathFile = resolve(dotEnvPath, dotEnvFile);
|
|
1443
|
+
if (!existsSync(dotEnvPathFile) && !this.get("dotEnvPath")) {
|
|
1449
1444
|
const examplesPath = resolve(dotEnvPath, "examples");
|
|
1450
|
-
const
|
|
1451
|
-
if (existsSync(
|
|
1452
|
-
dotEnvPathFile =
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
if (!dotEnvPathFile) {
|
|
1456
|
-
dotEnvPathFile = resolve(dotEnvPath, dotEnvFile);
|
|
1457
|
-
if (!existsSync(dotEnvPathFile)) {
|
|
1458
|
-
if (!this.get("dotEnvPath")) {
|
|
1459
|
-
const examplesPath = resolve(dotEnvPath, "examples");
|
|
1460
|
-
const examplesEnvFile = resolve(examplesPath, dotEnvFile);
|
|
1461
|
-
if (existsSync(examplesEnvFile)) {
|
|
1462
|
-
dotEnvPathFile = examplesEnvFile;
|
|
1463
|
-
} else {
|
|
1464
|
-
dotEnvPathFile = resolve(dotEnvPath, "..", dotEnvFile);
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1445
|
+
const examplesEnvFile = resolve(examplesPath, dotEnvFile);
|
|
1446
|
+
if (existsSync(examplesEnvFile)) {
|
|
1447
|
+
dotEnvPathFile = examplesEnvFile;
|
|
1448
|
+
} else {
|
|
1449
|
+
dotEnvPathFile = resolve(dotEnvPath, "..", dotEnvFile);
|
|
1467
1450
|
}
|
|
1468
1451
|
}
|
|
1469
1452
|
if (dotEnvPathFile && existsSync(dotEnvPathFile)) {
|
|
1470
1453
|
config({ path: dotEnvPathFile, quiet: true });
|
|
1471
1454
|
}
|
|
1455
|
+
const envSpecificFile = `.env.${this.env}`;
|
|
1456
|
+
const envSpecificPath = resolve(dotEnvPath, envSpecificFile);
|
|
1457
|
+
if (existsSync(envSpecificPath) && envSpecificPath !== dotEnvPathFile) {
|
|
1458
|
+
config({ path: envSpecificPath, quiet: true });
|
|
1459
|
+
} else if (!this.get("dotEnvPath")) {
|
|
1460
|
+
const examplesOverlay = resolve(dotEnvPath, "examples", envSpecificFile);
|
|
1461
|
+
if (existsSync(examplesOverlay)) {
|
|
1462
|
+
config({ path: examplesOverlay, quiet: true });
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1472
1465
|
}
|
|
1473
1466
|
/**
|
|
1474
1467
|
* Load configuration files
|
|
@@ -2694,6 +2687,9 @@ async function init(flow2, opts = {}) {
|
|
|
2694
2687
|
if (context) {
|
|
2695
2688
|
await runRegisteredCleanups(context);
|
|
2696
2689
|
}
|
|
2690
|
+
if (process.exitCode && process.exitCode !== 0) {
|
|
2691
|
+
process.exit(process.exitCode);
|
|
2692
|
+
}
|
|
2697
2693
|
}
|
|
2698
2694
|
}
|
|
2699
2695
|
|