@orion-js/env 4.0.2 → 4.0.3
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-cli/index.js +7 -9
- package/package.json +2 -1
package/dist-cli/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/cli/index.ts
|
|
4
4
|
import { Command } from "commander";
|
|
5
|
-
import
|
|
5
|
+
import chalk from "chalk";
|
|
6
6
|
|
|
7
7
|
// src/cli/init/index.ts
|
|
8
8
|
import YAML from "yaml";
|
|
@@ -268,14 +268,12 @@ async function envRead({ path: path2, key, secret }) {
|
|
|
268
268
|
|
|
269
269
|
// src/cli/index.ts
|
|
270
270
|
var program = new Command();
|
|
271
|
-
var run =
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
};
|
|
271
|
+
var run = (action) => async (...args) => {
|
|
272
|
+
try {
|
|
273
|
+
await action(...args);
|
|
274
|
+
} catch (e) {
|
|
275
|
+
console.error(chalk.red(`Error: ${e.message}`));
|
|
276
|
+
}
|
|
279
277
|
};
|
|
280
278
|
program.command("init").description("Creates a new encrypted env file").option("--path <path>", "Specify the env file name").action(run(envInit));
|
|
281
279
|
program.command("add").description("Adds a new environment to the encrypted env file").option("--path <path>", "Specify the env file name").action(run(envAdd));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/env",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"author": "nicolaslopezj",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"orion-env": "./dist-cli/index.js"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
+
"chalk": "^4.1.2",
|
|
11
12
|
"colors": "^1.4.0",
|
|
12
13
|
"commander": "^9.5.0",
|
|
13
14
|
"prompts": "^2.4.2",
|