@codiac.io/codiac-cli 1.3.135 → 1.3.138
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/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @codiac.io/codiac-cli
|
|
|
21
21
|
$ codiac COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ codiac (--version|-v)
|
|
24
|
-
@codiac.io/codiac-cli/1.3.
|
|
24
|
+
@codiac.io/codiac-cli/1.3.138 linux-x64 node-v22.15.1
|
|
25
25
|
$ codiac --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ codiac COMMAND
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
1
2
|
import { CommandBaseEnterprise } from '../../../command-base-enterprise';
|
|
2
3
|
export type FlatEnviro = {
|
|
3
4
|
name: string;
|
|
@@ -12,10 +13,12 @@ export default class NocClusterList extends CommandBaseEnterprise {
|
|
|
12
13
|
static description: string;
|
|
13
14
|
static aliases: string[];
|
|
14
15
|
static flags: {
|
|
15
|
-
|
|
16
|
+
query: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
17
|
+
output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
16
18
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
17
19
|
};
|
|
18
20
|
static args: {};
|
|
21
|
+
static examples: Command.Example[];
|
|
19
22
|
run(): Promise<void>;
|
|
20
23
|
private clusterToString;
|
|
21
24
|
}
|
|
@@ -3,12 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
const YAML = require("yaml");
|
|
6
|
+
const tsv = require("tsv");
|
|
7
|
+
const jmespath = require("jmespath");
|
|
6
8
|
const command_base_enterprise_1 = require("../../../command-base-enterprise");
|
|
7
9
|
const _ = require("lodash");
|
|
8
10
|
const render = require("../../../uilogic/render-methods");
|
|
9
|
-
|
|
11
|
+
// import { OutputFormatsEnum } from '../../../uilogic/render-methods';
|
|
10
12
|
const type_safety_utils_1 = require("../../../uilogic/type-safety-utils");
|
|
11
13
|
const codiac_constants_1 = require("../../../codiac-constants");
|
|
14
|
+
var OutputFormatsEnumPlus;
|
|
15
|
+
(function (OutputFormatsEnumPlus) {
|
|
16
|
+
OutputFormatsEnumPlus["text"] = "text";
|
|
17
|
+
OutputFormatsEnumPlus["tree"] = "tree";
|
|
18
|
+
OutputFormatsEnumPlus["json"] = "json";
|
|
19
|
+
OutputFormatsEnumPlus["yaml"] = "yaml";
|
|
20
|
+
OutputFormatsEnumPlus["tsv"] = "tsv";
|
|
21
|
+
OutputFormatsEnumPlus["csv"] = "csv";
|
|
22
|
+
})(OutputFormatsEnumPlus || (OutputFormatsEnumPlus = {}));
|
|
12
23
|
class NocClusterList extends command_base_enterprise_1.CommandBaseEnterprise {
|
|
13
24
|
run() {
|
|
14
25
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -20,33 +31,72 @@ class NocClusterList extends command_base_enterprise_1.CommandBaseEnterprise {
|
|
|
20
31
|
let rootMap = yield this.getRootMap();
|
|
21
32
|
let currentEnterprise = (yield this.establishEnterpriseContext(rootMap)).enterprise; // We only need this bc the RootMap requires it.
|
|
22
33
|
_.remove(rootMap.enterprises, e => e.name != currentEnterprise.name); // trim down to match legacy conditions
|
|
23
|
-
let outputFormat
|
|
34
|
+
let outputFormat;
|
|
35
|
+
if (flags.output) {
|
|
36
|
+
outputFormat = type_safety_utils_1.TypeSafetyUtils.toEnum(OutputFormatsEnumPlus, flags.output);
|
|
37
|
+
}
|
|
38
|
+
else if (!_.isEmpty(flags.query)) {
|
|
39
|
+
outputFormat = OutputFormatsEnumPlus.json;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
outputFormat = OutputFormatsEnumPlus.tree;
|
|
43
|
+
}
|
|
24
44
|
if (outputFormat == undefined)
|
|
25
45
|
throw new Error("Unrecognized output format.");
|
|
46
|
+
if (!_.isEmpty(flags.query) && [OutputFormatsEnumPlus.text, OutputFormatsEnumPlus.tree].includes(outputFormat))
|
|
47
|
+
throw new Error("Cannot use that output type when specifying the query parameter.");
|
|
48
|
+
let omitHeaderRow = false;
|
|
49
|
+
if ([OutputFormatsEnumPlus.tsv, OutputFormatsEnumPlus.csv].includes(outputFormat)) {
|
|
50
|
+
omitHeaderRow = false; // true; // do this for now, until we add this as a command argument
|
|
51
|
+
}
|
|
26
52
|
// RETRIEVE
|
|
27
|
-
if ([
|
|
53
|
+
if ([OutputFormatsEnumPlus.json, OutputFormatsEnumPlus.yaml, OutputFormatsEnumPlus.tsv, OutputFormatsEnumPlus.csv].includes(outputFormat) === false)
|
|
28
54
|
this._ui.startSpinner("Retrieving");
|
|
29
55
|
let clusterCount = (_b = (_a = rootMap.clusters) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
30
|
-
if ([
|
|
56
|
+
if ([OutputFormatsEnumPlus.json, OutputFormatsEnumPlus.yaml, OutputFormatsEnumPlus.tsv, OutputFormatsEnumPlus.csv].includes(outputFormat) === false)
|
|
31
57
|
this._ui.stopSpinner(`found ${clusterCount}`);
|
|
58
|
+
let clusters = _.cloneDeep(rootMap.clusters);
|
|
59
|
+
clusters = _.sortBy(clusters, x => x.name);
|
|
60
|
+
// APPLY QUERY
|
|
61
|
+
if ((flags.query != undefined) && (!_.isEmpty(flags.query.trim()))) {
|
|
62
|
+
clusters = jmespath.search(clusters, flags.query);
|
|
63
|
+
}
|
|
32
64
|
// RENDER
|
|
33
65
|
let output = "";
|
|
34
66
|
switch (outputFormat) {
|
|
35
|
-
case
|
|
36
|
-
let listForJson =
|
|
37
|
-
listForJson = _.sortBy(listForJson, x => x.name);
|
|
67
|
+
case OutputFormatsEnumPlus.json:
|
|
68
|
+
let listForJson = clusters !== null && clusters !== void 0 ? clusters : [];
|
|
69
|
+
// listForJson = _.sortBy(listForJson, x => x.name);
|
|
38
70
|
output = JSON.stringify(listForJson, undefined, 2);
|
|
39
71
|
this._ui.userMessage(output);
|
|
40
72
|
break;
|
|
41
|
-
case
|
|
42
|
-
let listForYaml =
|
|
43
|
-
listForYaml = _.sortBy(listForYaml, x => x.name);
|
|
73
|
+
case OutputFormatsEnumPlus.yaml:
|
|
74
|
+
let listForYaml = clusters !== null && clusters !== void 0 ? clusters : [];
|
|
75
|
+
// listForYaml = _.sortBy(listForYaml, x => x.name);
|
|
44
76
|
output = YAML.stringify(listForYaml, { indent: 2 });
|
|
45
77
|
this._ui.userMessage(output);
|
|
46
78
|
break;
|
|
47
|
-
case
|
|
48
|
-
|
|
49
|
-
|
|
79
|
+
case OutputFormatsEnumPlus.tsv:
|
|
80
|
+
// TODO: Consider d3-dsv instead (https://www.npmjs.com/package/d3-dsv)
|
|
81
|
+
// So we can support output that's just a list of strings (eg: from a custom jmespath query).
|
|
82
|
+
// eg: this works but is clumsy: cod cluster list -q "[].{ loc: locationName } | sort_by(@, &loc)" -o tsv
|
|
83
|
+
// eg: but this returns null: cod cluster list -q "[].locationName | sort(@)" -o tsv
|
|
84
|
+
let listForTsv = clusters !== null && clusters !== void 0 ? clusters : [];
|
|
85
|
+
tsv.TSV.header = !omitHeaderRow;
|
|
86
|
+
output = (_c = tsv.TSV.stringify(listForTsv)) === null || _c === void 0 ? void 0 : _c.trim();
|
|
87
|
+
this._ui.userMessage(output);
|
|
88
|
+
break;
|
|
89
|
+
case OutputFormatsEnumPlus.csv:
|
|
90
|
+
// TODO: Consider d3-dsv instead (https://www.npmjs.com/package/d3-dsv)
|
|
91
|
+
// So we can support output that's just a list of strings (eg: from a custom jmespath query).
|
|
92
|
+
let listForCsv = clusters !== null && clusters !== void 0 ? clusters : [];
|
|
93
|
+
tsv.TSV.header = !omitHeaderRow;
|
|
94
|
+
output = (_d = tsv.CSV.stringify(listForCsv)) === null || _d === void 0 ? void 0 : _d.trim();
|
|
95
|
+
this._ui.userMessage(output);
|
|
96
|
+
break;
|
|
97
|
+
case OutputFormatsEnumPlus.text:
|
|
98
|
+
let flatList = (_e = rootMap.clusters) !== null && _e !== void 0 ? _e : []; // Gotta use the raw tyepsafe record with this output type
|
|
99
|
+
// flatList = _.sortBy(flatList, c => c.name);
|
|
50
100
|
let listForText = flatList.map(c => this.clusterToString(c));
|
|
51
101
|
;
|
|
52
102
|
output = render.renderStringList(listForText);
|
|
@@ -56,10 +106,10 @@ class NocClusterList extends command_base_enterprise_1.CommandBaseEnterprise {
|
|
|
56
106
|
// case OutputFormatsEnum.table:
|
|
57
107
|
// case OutputFormatsEnum.tsv:
|
|
58
108
|
// break;
|
|
59
|
-
case
|
|
109
|
+
case OutputFormatsEnumPlus.tree:
|
|
60
110
|
default:
|
|
61
|
-
let listForTree = (_f = rootMap.clusters) !== null && _f !== void 0 ? _f : [];
|
|
62
|
-
listForTree = _.sortBy(listForTree, c => c.name);
|
|
111
|
+
let listForTree = (_f = rootMap.clusters) !== null && _f !== void 0 ? _f : []; // Gotta use the raw tyepsafe record with this output type
|
|
112
|
+
// listForTree = _.sortBy(listForTree, c => c.name);
|
|
63
113
|
let clusterTree = listForTree.map(c => {
|
|
64
114
|
return { text: this.clusterToString(c) };
|
|
65
115
|
});
|
|
@@ -90,8 +140,16 @@ exports.default = NocClusterList;
|
|
|
90
140
|
NocClusterList.description = 'Shows the list of clusters.';
|
|
91
141
|
NocClusterList.aliases = ["cluster:list"];
|
|
92
142
|
NocClusterList.flags = {
|
|
93
|
-
|
|
143
|
+
query: core_1.Flags.string({ char: 'q', description: "Jmespath query to filter and format and the results (see https://jmespath.org/ for more info)." }),
|
|
144
|
+
output: core_1.Flags.string({ char: 'o', description: "format in which to render the data.", options: Object.keys(OutputFormatsEnumPlus) }),
|
|
94
145
|
help: core_1.Flags.help({ char: 'h', description: 'Displays the help document for this command.' })
|
|
95
146
|
};
|
|
96
147
|
NocClusterList.args = {};
|
|
148
|
+
NocClusterList.examples = [
|
|
149
|
+
{ description: "Simple listing", command: "<%= config.bin %> <%= command.id %>" },
|
|
150
|
+
{ description: "List of cluster names", command: "<%= config.bin %> <%= command.id %> -q '[].name'" },
|
|
151
|
+
{ description: "Filter by name", command: "<%= config.bin %> <%= command.id %> -q \"[?name == 'my-cluster-on-aws']\"" },
|
|
152
|
+
{ description: "Filter by name and show the ingressIp", command: "<%= config.bin %> <%= command.id %> -q \"[?name == 'my-cluster-on-aws'].ingressIp\"" },
|
|
153
|
+
{ description: "Show name and location, sorted by location", command: "<%= config.bin %> <%= command.id %> -q \"[].{ name: name, loc: locationName } | sort_by(@, &loc)\"" },
|
|
154
|
+
];
|
|
97
155
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/noc/cluster/list.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/noc/cluster/list.ts"],"names":[],"mappings":";;;AAAA,sCAA4C;AAC5C,6BAA6B;AAC7B,2BAA2B;AAC3B,qCAAqC;AAErC,8EAAyE;AACzE,4BAA6B;AAC7B,0DAA0D;AAC1D,uEAAuE;AACvE,0EAAqE;AACrE,gEAAyD;AAKzD,IAAK,qBAOJ;AAPD,WAAK,qBAAqB;IACxB,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,oCAAa,CAAA;IACb,oCAAa,CAAA;AACf,CAAC,EAPI,qBAAqB,KAArB,qBAAqB,QAOzB;AAED,MAAqB,cAAe,SAAQ,+CAAqB;IAoBzD,GAAG;;;YACP,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA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AE,8CAA8C,EAAE,CAAC;CAC7F,CAAA;AAEM,mBAAI,GAAG,EAAE,CAAC;AAEV,uBAAQ,GAAsB;IACnC,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,qCAAqC,EAAE;IACjF,EAAE,WAAW,EAAE,uBAAuB,EAAE,OAAO,EAAE,kDAAkD,EAAE;IACrG,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,2EAA2E,EAAE;IACvH,EAAE,WAAW,EAAE,uCAAuC,EAAE,OAAO,EAAE,qFAAqF,EAAE;IACxJ,EAAE,WAAW,EAAE,4CAA4C,EAAE,OAAO,EAAE,oGAAoG,EAAE;CAC7K,CAAA"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
2
|
+
"version": "1.3.138",
|
|
3
3
|
"commands": {
|
|
4
4
|
"branch": {
|
|
5
5
|
"id": "branch",
|
|
@@ -9856,7 +9856,36 @@
|
|
|
9856
9856
|
"cluster:list"
|
|
9857
9857
|
],
|
|
9858
9858
|
"hiddenAliases": [],
|
|
9859
|
+
"examples": [
|
|
9860
|
+
{
|
|
9861
|
+
"description": "Simple listing",
|
|
9862
|
+
"command": "<%= config.bin %> <%= command.id %>"
|
|
9863
|
+
},
|
|
9864
|
+
{
|
|
9865
|
+
"description": "List of cluster names",
|
|
9866
|
+
"command": "<%= config.bin %> <%= command.id %> -q '[].name'"
|
|
9867
|
+
},
|
|
9868
|
+
{
|
|
9869
|
+
"description": "Filter by name",
|
|
9870
|
+
"command": "<%= config.bin %> <%= command.id %> -q \"[?name == 'my-cluster-on-aws']\""
|
|
9871
|
+
},
|
|
9872
|
+
{
|
|
9873
|
+
"description": "Filter by name and show the ingressIp",
|
|
9874
|
+
"command": "<%= config.bin %> <%= command.id %> -q \"[?name == 'my-cluster-on-aws'].ingressIp\""
|
|
9875
|
+
},
|
|
9876
|
+
{
|
|
9877
|
+
"description": "Show name and location, sorted by location",
|
|
9878
|
+
"command": "<%= config.bin %> <%= command.id %> -q \"[].{ name: name, loc: locationName } | sort_by(@, &loc)\""
|
|
9879
|
+
}
|
|
9880
|
+
],
|
|
9859
9881
|
"flags": {
|
|
9882
|
+
"query": {
|
|
9883
|
+
"name": "query",
|
|
9884
|
+
"type": "option",
|
|
9885
|
+
"char": "q",
|
|
9886
|
+
"description": "Jmespath query to filter and format and the results (see https://jmespath.org/ for more info).",
|
|
9887
|
+
"multiple": false
|
|
9888
|
+
},
|
|
9860
9889
|
"output": {
|
|
9861
9890
|
"name": "output",
|
|
9862
9891
|
"type": "option",
|
|
@@ -9867,9 +9896,10 @@
|
|
|
9867
9896
|
"text",
|
|
9868
9897
|
"tree",
|
|
9869
9898
|
"json",
|
|
9870
|
-
"yaml"
|
|
9871
|
-
|
|
9872
|
-
|
|
9899
|
+
"yaml",
|
|
9900
|
+
"tsv",
|
|
9901
|
+
"csv"
|
|
9902
|
+
]
|
|
9873
9903
|
},
|
|
9874
9904
|
"help": {
|
|
9875
9905
|
"name": "help",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codiac.io/codiac-cli",
|
|
3
3
|
"description": "Local command line interface for managing enterprise assets and environments.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.138",
|
|
5
5
|
"author": "Codiac",
|
|
6
6
|
"bin": {
|
|
7
7
|
"codiac": "./bin/run",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"inquirer": "^7.3.3",
|
|
66
66
|
"inquirer-autocomplete-prompt": "^1.3.0",
|
|
67
67
|
"inversify": "^5.1.1",
|
|
68
|
+
"jmespath": "^0.16.0",
|
|
68
69
|
"json-stringify-safe": "^5.0.1",
|
|
69
70
|
"jsonpath-plus": "^5.0.7",
|
|
70
71
|
"jsonschema": "^1.4.1",
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
"rxjs": "^6.6.7",
|
|
83
84
|
"select-files-cli": "0.0.4",
|
|
84
85
|
"split-cmd": "^1.0.1",
|
|
86
|
+
"tsv": "^0.2.0",
|
|
85
87
|
"url-pattern": "^1.0.3",
|
|
86
88
|
"ws": "^8.18.1",
|
|
87
89
|
"yaml": "^1.10.2"
|
|
@@ -94,10 +96,12 @@
|
|
|
94
96
|
"@types/figlet": "^1.5.1",
|
|
95
97
|
"@types/fs-extra": "^11.0.1",
|
|
96
98
|
"@types/inquirer": "^7.3.1",
|
|
99
|
+
"@types/jmespath": "^0.15.2",
|
|
97
100
|
"@types/lodash": "^4.14.184",
|
|
98
101
|
"@types/mocha": "^10.0.4",
|
|
99
102
|
"@types/node": "^18.18.9",
|
|
100
103
|
"@types/semver": "^7.3.6",
|
|
104
|
+
"@types/tsv": "^0.2.4",
|
|
101
105
|
"barrelsby": "^2.2.0",
|
|
102
106
|
"chai": "^4.3.10",
|
|
103
107
|
"copy-webpack-plugin": "^6.3.0",
|