@nmakarov/cli-toolkit 0.55.0 → 0.59.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 +4 -0
- package/dist/args.cjs.map +1 -1
- package/dist/args.js +4 -0
- package/dist/args.js.map +1 -1
- package/dist/cli-runner.cjs +10 -0
- package/dist/cli-runner.cjs.map +1 -1
- package/dist/cli-runner.js +10 -0
- package/dist/cli-runner.js.map +1 -1
- package/dist/db.cjs +6 -0
- package/dist/db.cjs.map +1 -1
- package/dist/db.js +6 -0
- package/dist/db.js.map +1 -1
- package/dist/deploy.cjs +32 -2
- package/dist/deploy.cjs.map +1 -1
- package/dist/deploy.js +32 -2
- package/dist/deploy.js.map +1 -1
- package/dist/index.cjs +42 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +42 -2
- package/dist/index.js.map +1 -1
- package/dist/init.cjs +4 -0
- package/dist/init.cjs.map +1 -1
- package/dist/init.js +4 -0
- package/dist/init.js.map +1 -1
- package/package.json +1 -1
package/dist/cli-runner.js
CHANGED
|
@@ -1132,6 +1132,10 @@ var Args = class _Args {
|
|
|
1132
1132
|
this.parseArgs(args);
|
|
1133
1133
|
this.env = this.get("env")?.toLowerCase() || "local";
|
|
1134
1134
|
this.loadDotEnv();
|
|
1135
|
+
const envAfterDotEnv = this.get("env")?.toLowerCase();
|
|
1136
|
+
if (envAfterDotEnv) {
|
|
1137
|
+
this.env = envAfterDotEnv;
|
|
1138
|
+
}
|
|
1135
1139
|
this.loadConfigFiles();
|
|
1136
1140
|
this.checkConflicts();
|
|
1137
1141
|
if (context && typeof context.registerCleanup === "function") {
|
|
@@ -2863,6 +2867,12 @@ var Db = class _Db {
|
|
|
2863
2867
|
}
|
|
2864
2868
|
if (!dbConnectionString) {
|
|
2865
2869
|
if (!dbName) {
|
|
2870
|
+
const env = context?.args?.env;
|
|
2871
|
+
if (env && String(env).toLowerCase() !== "local") {
|
|
2872
|
+
throw new ParamError(
|
|
2873
|
+
`Db: dbName not set for env="${env}" (set --dbName or DB_NAME_${String(env).toUpperCase()})`
|
|
2874
|
+
);
|
|
2875
|
+
}
|
|
2866
2876
|
dbName = "local";
|
|
2867
2877
|
}
|
|
2868
2878
|
const paramName = `dbConnectionString${capitalizeFirstLetter(dbName)}`;
|