@gearbox-protocol/cli-utils 5.36.13 → 5.36.15

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.
@@ -6,7 +6,7 @@ export class CensoredString {
6
6
  }
7
7
  constructor(value) {
8
8
  this.#value = value;
9
- let visibleLen = Math.min(4, Math.floor(0.2 * value.length));
9
+ const visibleLen = Math.min(4, Math.floor(0.2 * value.length));
10
10
  if (visibleLen < 1) {
11
11
  this.#censored = "*".repeat(Math.min(8, value.length));
12
12
  }
@@ -19,10 +19,10 @@ export class CensoredURL {
19
19
  const u = new URL(url);
20
20
  u.pathname = "/";
21
21
  u.search = "";
22
- this.#censored = u.href + "******";
22
+ this.#censored = `${u.href}******`;
23
23
  }
24
24
  catch {
25
- let visibleLen = Math.min(4, Math.floor(0.2 * url.length));
25
+ const visibleLen = Math.min(4, Math.floor(0.2 * url.length));
26
26
  if (visibleLen < 1) {
27
27
  this.#censored = "*".repeat(Math.min(8, url.length));
28
28
  }
package/dist/Zommand.js CHANGED
@@ -33,7 +33,7 @@ export class Zommand extends Command {
33
33
  return super.action(async (...args) => {
34
34
  const argz = args;
35
35
  const _cmd = argz.splice(-1);
36
- let [{ config, ...opts }] = argz.splice(-1);
36
+ const [{ config, ...opts }] = argz.splice(-1);
37
37
  let fromYaml = {};
38
38
  if (config) {
39
39
  fromYaml = await resolveYamlFiles(config, {
@@ -50,7 +50,7 @@ export class Zommand extends Command {
50
50
  }
51
51
  }
52
52
  // deep merge is not required: env and cli flags are for top-level only
53
- let combined = {
53
+ const combined = {
54
54
  ...schemaFromEnv,
55
55
  ...fromYaml,
56
56
  ...opts,
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export * from "./CensoredString.js";
2
2
  export * from "./CensoredURL.js";
3
3
  export * from "./resolveYamlFiles.js";
4
- export * from "./schema-primitives.js";
5
4
  export * from "./SecretsManager.js";
6
5
  export * from "./SSMManager.js";
6
+ export * from "./schema-primitives.js";
7
7
  export * from "./uncensorMap.js";
8
8
  export * from "./Zommand.js";
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export * from "./CensoredString.js";
2
2
  export * from "./CensoredURL.js";
3
3
  export * from "./resolveYamlFiles.js";
4
- export * from "./schema-primitives.js";
5
4
  export * from "./SecretsManager.js";
6
5
  export * from "./SSMManager.js";
6
+ export * from "./schema-primitives.js";
7
7
  export * from "./uncensorMap.js";
8
8
  export * from "./Zommand.js";
@@ -8,7 +8,7 @@ import getPromisePath from "./getPromisePath.js";
8
8
  * e.g. ${KEY} or ${KEY.SUBKEY}
9
9
  *
10
10
  */
11
- const templateKeyRegex = /^\$\{(?:\w+(?:\.\w+)*)\}$/;
11
+ const templateKeyRegex = /^\$\{(?:[\w-]+(?:\.[\w-]+)*)\}$/;
12
12
  /**
13
13
  * Merges yaml files, respecting .extends references.
14
14
  * Performs env variable substitution on the config.
@@ -35,7 +35,7 @@ export async function resolveYamlFiles(file, templateData) {
35
35
  * @returns
36
36
  */
37
37
  export async function resolveYamlDoc(file, templateData) {
38
- let content = await readFile(file, "utf-8");
38
+ const content = await readFile(file, "utf-8");
39
39
  // if (templateData) {
40
40
  // const compiled = template(content);
41
41
  // content = compiled(templateData);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/cli-utils",
3
3
  "description": "Utils for creating cli apps",
4
- "version": "5.36.13",
4
+ "version": "5.36.15",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"
@@ -24,10 +24,6 @@
24
24
  "clean": "rm -rf ./dist",
25
25
  "build": "tsc --p tsconfig.build.json",
26
26
  "dev": "tsc --p tsconfig.build.json --watch",
27
- "prettier": "prettier --write .",
28
- "prettier:ci": "npx prettier --check .",
29
- "lint": "eslint \"**/*.ts\" --fix",
30
- "lint:ci": "eslint \"**/*.ts\"",
31
27
  "typecheck:ci": "tsc --noEmit",
32
28
  "test": "vitest",
33
29
  "package:version": "yarn version"
@@ -45,6 +41,5 @@
45
41
  "@commander-js/extra-typings": "^14.0.0",
46
42
  "@types/lodash-es": "^4.17.12",
47
43
  "@types/node": "^24.0.3"
48
- },
49
- "prettier": "@gearbox-protocol/prettier-config"
44
+ }
50
45
  }