@orion-js/env 4.0.2 → 4.0.4

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // src/cli/index.ts
4
4
  import { Command } from "commander";
5
- import colors from "colors/safe";
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 = function(action) {
272
- return async function(...args) {
273
- try {
274
- await action(...args);
275
- } catch (e) {
276
- console.error(colors.red("Error: " + e.message));
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.2",
3
+ "version": "4.0.4",
4
4
  "main": "./dist/index.cjs",
5
5
  "author": "nicolaslopezj",
6
6
  "license": "MIT",
@@ -8,12 +8,16 @@
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",
14
15
  "tweetnacl-es6": "^1.0.3",
15
16
  "yaml": "^2.7.0"
16
17
  },
18
+ "peerDependencies": {
19
+ "@orion-js/logger": "4.0.5"
20
+ },
17
21
  "devDependencies": {
18
22
  "@types/node": "^18.0.0",
19
23
  "tsup": "^8.0.1",