@gearbox-protocol/cli-utils 5.36.14 → 5.36.16
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/CensoredString.js +1 -1
- package/dist/CensoredURL.js +2 -2
- package/dist/Zommand.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/resolveYamlFiles.js +1 -1
- package/package.json +2 -7
package/dist/CensoredString.js
CHANGED
|
@@ -6,7 +6,7 @@ export class CensoredString {
|
|
|
6
6
|
}
|
|
7
7
|
constructor(value) {
|
|
8
8
|
this.#value = value;
|
|
9
|
-
|
|
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
|
}
|
package/dist/CensoredURL.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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";
|
package/dist/resolveYamlFiles.js
CHANGED
|
@@ -35,7 +35,7 @@ export async function resolveYamlFiles(file, templateData) {
|
|
|
35
35
|
* @returns
|
|
36
36
|
*/
|
|
37
37
|
export async function resolveYamlDoc(file, templateData) {
|
|
38
|
-
|
|
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.
|
|
4
|
+
"version": "5.36.16",
|
|
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
|
}
|