@codiac.io/codiac-cli 1.3.146 → 1.3.147
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 +1 -1
- package/dist/commands/asset/recycle.d.ts +16 -6
- package/dist/commands/asset/recycle.js +222 -113
- package/dist/commands/asset/recycle.js.map +1 -1
- package/oclif.manifest.json +35 -21
- package/package.json +1 -1
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.147 linux-x64 node-v22.15.1
|
|
25
25
|
$ codiac --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ codiac COMMAND
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
2
|
import { Asset } from '../../apis/codiac-api/contracts';
|
|
3
|
-
import {
|
|
3
|
+
import { CabinetAssetList } from "../../apis/codiac-relay/contracts";
|
|
4
|
+
import { RootMap } from "../../apis/codiac-api/contracts";
|
|
5
|
+
import { CommandBaseExec, IEnterpriseEntity } from "../../command-base-exec";
|
|
6
|
+
import { AtLeast } from "@codiac.io/codiac-common/contracts";
|
|
7
|
+
import { InteractionModes } from "../../uilogic/config-ui-utils";
|
|
4
8
|
/** The value provided as input that indicates
|
|
5
9
|
* a user's desire to be prompted with a list from which choose the value(s),
|
|
6
10
|
* instead of entering them manually or taking a default. */
|
|
7
11
|
export declare const PROMPT_ME_DESIGNATOR = "?";
|
|
8
|
-
|
|
12
|
+
/** Includes enterprise */
|
|
13
|
+
export type CabinetAssetListNew = Omit<CabinetAssetList, "enterpriseCode"> & IEnterpriseEntity;
|
|
14
|
+
export default class AssetRecycle extends CommandBaseExec<CabinetAssetListNew> {
|
|
9
15
|
static description: string;
|
|
10
16
|
static dependsOn: string[];
|
|
11
17
|
static flags: {
|
|
12
|
-
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
13
18
|
enterpriseCode: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
19
|
cabinetName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
20
|
asset: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
16
|
-
version: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
17
21
|
silent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
echo: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
"to-script": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
"take-defaults": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
25
|
};
|
|
19
26
|
static args: {};
|
|
20
|
-
|
|
27
|
+
captureArgs(): Promise<[Partial<CabinetAssetListNew>, InteractionModes | undefined, boolean]>;
|
|
28
|
+
buildCandidate_silently(partial: AtLeast<CabinetAssetListNew, "enterprise">, rootMap: RootMap): Promise<CabinetAssetListNew | undefined>;
|
|
29
|
+
buildCandidate_interactively(partial: AtLeast<CabinetAssetListNew, "enterprise">, rootMap: RootMap, takeDefaults: boolean): Promise<CabinetAssetListNew | undefined>;
|
|
30
|
+
buildCommandString(candidate: CabinetAssetListNew, cmd: string[]): string[];
|
|
31
|
+
executeTask(candidate: CabinetAssetListNew): Promise<void>;
|
|
21
32
|
promptForAsset(enterprise: string, assetSearch?: string): Promise<Asset>;
|
|
22
|
-
private searchVersions;
|
|
23
33
|
}
|
|
@@ -6,103 +6,233 @@ require("reflect-metadata");
|
|
|
6
6
|
const core_1 = require("@oclif/core");
|
|
7
7
|
const inquirer = require("inquirer");
|
|
8
8
|
const _ = require("lodash");
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const command_base_enterprise_1 = require("../../command-base-enterprise");
|
|
12
|
-
let assetVersions = [];
|
|
9
|
+
const command_base_exec_1 = require("../../command-base-exec");
|
|
10
|
+
const config_ui_utils_1 = require("../../uilogic/config-ui-utils");
|
|
13
11
|
/** The value provided as input that indicates
|
|
14
12
|
* a user's desire to be prompted with a list from which choose the value(s),
|
|
15
13
|
* instead of entering them manually or taking a default. */
|
|
16
14
|
exports.PROMPT_ME_DESIGNATOR = "?";
|
|
17
|
-
class AssetRecycle extends
|
|
18
|
-
|
|
15
|
+
class AssetRecycle extends command_base_exec_1.CommandBaseExec {
|
|
16
|
+
captureArgs() {
|
|
17
|
+
var _a, _b;
|
|
19
18
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// let versions = await this.declareAssetVersions(requestedAssets, enterpriseCode);
|
|
52
|
-
// // We've updated Codiac. Now trigger the deploy.
|
|
53
|
-
// assetVersions = requestedAssets.map(a => {
|
|
54
|
-
// let version = versions.find(v => v.assetName == a);
|
|
55
|
-
// return { a: a, v: version ? version.assetVersion : undefined };
|
|
56
|
-
// });
|
|
57
|
-
}
|
|
58
|
-
let cab;
|
|
59
|
-
[cab] = yield this.rootMapUtils.promptForCabinet(enterpriseCode, rootMap, flags.cabinetName, false, undefined);
|
|
60
|
-
// let cabinet = await this.establishCabinet(flags.cabinetName);
|
|
61
|
-
let cabCntx = { enterprise: cab.enterprise, environment: cab.environment, cabinet: cab.name };
|
|
62
|
-
// Get the clusterdef so we can get cloud pvd creds
|
|
63
|
-
let cluster = (_b = cab.cluster) !== null && _b !== void 0 ? _b : ((rootMap.clusters.length === 1) ? rootMap.clusters[0].name : undefined); // fall back to the one and only.
|
|
64
|
-
if (cluster === undefined) {
|
|
65
|
-
this.logger.warn(`Cannot confirm cloud provider credentials: cabinet has no cluster specified. Process will rely on cached credentials.`);
|
|
66
|
-
// throw new Error(`Cannot determine cloud provider: cabinet has no cluster specified.`);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
yield this.establishCloudProviderCreds(rootMap, cluster);
|
|
70
|
-
}
|
|
71
|
-
let assets = {
|
|
72
|
-
enterpriseCode: cabCntx.enterprise,
|
|
73
|
-
environment: cabCntx.environment,
|
|
74
|
-
cabinetName: cabCntx.cabinet,
|
|
75
|
-
assetNames: assetVersions.map(a => a.a)
|
|
76
|
-
};
|
|
77
|
-
this._ui.startSpinner(`Recycling assets in ${assets.cabinetName}...`);
|
|
78
|
-
// let result = await this.relayClient.recycleAssets(assets);
|
|
79
|
-
let result = yield this.genRelayClient.Call.postExecuteRecycleAssets(assets);
|
|
80
|
-
this._ui.stopSpinner((result.success === true) ? "SUCCESS" : (result.error) ? "ERROR" : "FAILED");
|
|
81
|
-
if (result.error) {
|
|
82
|
-
this.logger.error(`Error recycling assets in ${assets.cabinetName}: ${result.message}`, result.error);
|
|
83
|
-
this._ui.userMessage(`Error recycling assets in ${assets.cabinetName}: ${result.message}`);
|
|
84
|
-
}
|
|
85
|
-
else if (result.success) {
|
|
86
|
-
this.logger.notice(`Recycled assets in ${assets.cabinetName}`);
|
|
87
|
-
// this._ui.userMessage(`Recycled assets in ${assets.cabinetName}`); // The spinner is enough for the user message here.
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
this.logger.warn(`Failed recycling assets in ${assets.cabinetName}: ${result.message}`, result);
|
|
91
|
-
this._ui.userMessage(`Failed recycling assets in ${assets.cabinetName}: ${result.message}`);
|
|
19
|
+
const { args, flags } = yield this.parse(AssetRecycle);
|
|
20
|
+
const partial = {};
|
|
21
|
+
if (flags.enterpriseCode) {
|
|
22
|
+
partial.enterprise = flags.enterpriseCode;
|
|
23
|
+
}
|
|
24
|
+
if (flags.asset) {
|
|
25
|
+
partial.assetNames = [flags.asset];
|
|
26
|
+
}
|
|
27
|
+
if (flags.cabinetName) {
|
|
28
|
+
partial.cabinetName = flags.cabinetName;
|
|
29
|
+
}
|
|
30
|
+
// ---------------------------------------------------------------
|
|
31
|
+
// TODO: move everything from here down into the base class
|
|
32
|
+
// ---------------------------------------------------------------
|
|
33
|
+
const interactionMode = (this.pipedInput) ? config_ui_utils_1.InteractionModes.silent : (_b = (_a = undefined !== null && undefined !== void 0 ? undefined : (flags.echo ? config_ui_utils_1.InteractionModes.echo : undefined)) !== null && _a !== void 0 ? _a : (flags["to-script"] ? config_ui_utils_1.InteractionModes.toscript : undefined)) !== null && _b !== void 0 ? _b : (flags.silent ? config_ui_utils_1.InteractionModes.silent : undefined);
|
|
34
|
+
const takeDefaults = flags['take-defaults'];
|
|
35
|
+
return [partial, interactionMode, takeDefaults];
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
buildCandidate_silently(partial, rootMap) {
|
|
39
|
+
var _a;
|
|
40
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
try {
|
|
42
|
+
const ent = rootMap.enterprises.find(e => e.name == partial.enterprise); // assertion operator ok bc base class ensures it (or throws)
|
|
43
|
+
if (partial.assetNames == undefined || _.isEmpty(partial.assetNames)) {
|
|
44
|
+
throw new Error("You must specify asset.");
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
for (let asset of partial.assetNames) {
|
|
48
|
+
if (!ent.assets.map(a => a.name).includes(asset)) {
|
|
49
|
+
throw new Error("No asset was found with that name.");
|
|
92
50
|
}
|
|
93
|
-
|
|
94
|
-
}));
|
|
51
|
+
}
|
|
95
52
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
reject(err);
|
|
53
|
+
if (partial.cabinetName == undefined || _.isEmpty(partial.cabinetName)) {
|
|
54
|
+
throw new Error("You must specify the cabinet.");
|
|
99
55
|
}
|
|
100
|
-
|
|
101
|
-
|
|
56
|
+
const env = this.rootMapUtils.deriveEnvironmentFrom(partial.enterprise, partial.cabinetName, rootMap);
|
|
57
|
+
partial.environment = env.name;
|
|
58
|
+
let candidate = {
|
|
59
|
+
enterprise: partial.enterprise,
|
|
60
|
+
environment: env.name,
|
|
61
|
+
cabinetName: partial.cabinetName,
|
|
62
|
+
assetNames: partial.assetNames
|
|
63
|
+
};
|
|
64
|
+
return candidate;
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
err.message = "Invalid command input: ".concat((_a = err.message) !== null && _a !== void 0 ? _a : "(messageless error)");
|
|
68
|
+
throw err;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
buildCandidate_interactively(partial, rootMap, takeDefaults) {
|
|
73
|
+
var _a;
|
|
74
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const ent = rootMap.enterprises.find(e => e.name == partial.enterprise); // assertion operator ok bc base class ensures it (or throws)
|
|
76
|
+
// ASSET
|
|
77
|
+
if (partial.assetNames != undefined && !_.isEmpty(partial.assetNames)) {
|
|
78
|
+
// validate
|
|
79
|
+
const requestedAsset = partial.assetNames[0];
|
|
80
|
+
if (!ent.assets.find(a => a.name == requestedAsset)) {
|
|
81
|
+
delete partial.assetNames;
|
|
102
82
|
}
|
|
103
|
-
}
|
|
83
|
+
}
|
|
84
|
+
if (partial.assetNames == undefined || _.isEmpty(partial.assetNames)) {
|
|
85
|
+
// Select if missing
|
|
86
|
+
let asset = yield this.promptForAsset(partial.enterprise);
|
|
87
|
+
partial.assetNames = [asset.name];
|
|
88
|
+
}
|
|
89
|
+
// CABINET/ENV
|
|
90
|
+
let cab;
|
|
91
|
+
if (partial.cabinetName != undefined && !_.isEmpty(partial.cabinetName)) {
|
|
92
|
+
// validate
|
|
93
|
+
try {
|
|
94
|
+
const env = this.rootMapUtils.deriveEnvironmentFrom(partial.enterprise, partial.cabinetName, rootMap);
|
|
95
|
+
partial.environment = env.name;
|
|
96
|
+
cab = env.cabinets.find(c => c.name == partial.cabinetName); // assertion ok bc the stmt above ensures it (or throws).
|
|
97
|
+
}
|
|
98
|
+
catch (err) {
|
|
99
|
+
// we dont want to throw here - tell em we coudnt find it and prompt for another instead.
|
|
100
|
+
delete partial.cabinetName;
|
|
101
|
+
this._ui.userMessage(err.message);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (cab == undefined || partial.cabinetName == undefined || partial.environment == undefined) {
|
|
105
|
+
// Select if missing
|
|
106
|
+
[cab] = yield this.rootMapUtils.promptForCabinet(partial.enterprise, rootMap, partial.cabinetName, false, undefined);
|
|
107
|
+
partial.environment = cab.environment;
|
|
108
|
+
partial.cabinetName = cab.name;
|
|
109
|
+
}
|
|
110
|
+
// Get the clusterdef so we can get cloud pvd creds
|
|
111
|
+
let cluster = (_a = cab.cluster) !== null && _a !== void 0 ? _a : ((rootMap.clusters.length === 1) ? rootMap.clusters[0].name : undefined); // fall back to the one and only.
|
|
112
|
+
if (cluster === undefined) {
|
|
113
|
+
this.logger.warn(`Cannot confirm cloud provider credentials: cabinet has no cluster specified. Process will rely on default credentials.`);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
yield this.establishCloudProviderCreds(rootMap, cluster);
|
|
117
|
+
}
|
|
118
|
+
let candidate = {
|
|
119
|
+
enterprise: partial.enterprise,
|
|
120
|
+
environment: partial.environment,
|
|
121
|
+
cabinetName: partial.cabinetName,
|
|
122
|
+
assetNames: partial.assetNames
|
|
123
|
+
};
|
|
124
|
+
return candidate;
|
|
104
125
|
});
|
|
105
126
|
}
|
|
127
|
+
buildCommandString(candidate, cmd) {
|
|
128
|
+
cmd.push("-e", candidate.enterprise);
|
|
129
|
+
cmd.push("-c", candidate.cabinetName);
|
|
130
|
+
// This should only ever be a single asset in this command
|
|
131
|
+
// (Later we can still add support for multiple assets by allowing multi on these args)
|
|
132
|
+
cmd.push("-a", candidate.assetNames[0]);
|
|
133
|
+
cmd.push("--silent");
|
|
134
|
+
return cmd;
|
|
135
|
+
}
|
|
136
|
+
executeTask(candidate) {
|
|
137
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
this._ui.startSpinner(`Recycling assets in ${candidate.cabinetName}...`);
|
|
139
|
+
// let result = await this.relayClient.recycleAssets(assets);
|
|
140
|
+
const req = Object.assign(Object.assign({}, _.omit(candidate, "enterprise")), { enterpriseCode: candidate.enterprise });
|
|
141
|
+
let result = yield this.genRelayClient.Call.postExecuteRecycleAssets(req);
|
|
142
|
+
this._ui.stopSpinner((result.success === true) ? "SUCCESS" : (result.error) ? "ERROR" : "FAILED");
|
|
143
|
+
if (result.error) {
|
|
144
|
+
this.logger.error(`Error recycling assets in ${candidate.cabinetName}: ${result.message}`, result.error);
|
|
145
|
+
this._ui.userMessage(`Error recycling assets in ${candidate.cabinetName}: ${result.message}`);
|
|
146
|
+
}
|
|
147
|
+
else if (result.success) {
|
|
148
|
+
this.logger.notice(`Recycled assets in ${candidate.cabinetName}`);
|
|
149
|
+
// this._ui.userMessage(`Recycled assets in ${assets.cabinetName}`); // The spinner is enough for the user message here.
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
this.logger.warn(`Failed recycling assets in ${candidate.cabinetName}: ${result.message}`, result);
|
|
153
|
+
this._ui.userMessage(`Failed recycling assets in ${candidate.cabinetName}: ${result.message}`);
|
|
154
|
+
}
|
|
155
|
+
return;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
// async run() {
|
|
159
|
+
// return new Promise<void>(async (resolve, reject) => {
|
|
160
|
+
// try {
|
|
161
|
+
// this.bootstrap();
|
|
162
|
+
// const { args, flags } = await this.parse(AssetRecycle);
|
|
163
|
+
// this._relayContainer?.ready$
|
|
164
|
+
// .subscribe(async () => {
|
|
165
|
+
// this._userCntx = await this.establishTenantContext(this._userCntx);
|
|
166
|
+
// let rootMap = await this.getRootMap();
|
|
167
|
+
// const interactionMode = this.getInteractionMode(flags.silent, flags.echo, flags['to-script']);
|
|
168
|
+
// let enterprise = (await this.establishEnterpriseContext(rootMap, flags.enterpriseCode, interactionMode)).enterprise;
|
|
169
|
+
// _.remove(rootMap.enterprises, e => e.name != enterprise.name); // trim down to match legacy conditions
|
|
170
|
+
// let enterpriseCode = enterprise.name;
|
|
171
|
+
// // // Select the asset(s) to deploy
|
|
172
|
+
// // let assetVersions: AssetVersion[];
|
|
173
|
+
// // if (flags.asset == PROMPT_ME_DESIGNATOR) {
|
|
174
|
+
// // let asset = await this.promptForAsset(enterpriseCode);
|
|
175
|
+
// // // let selected = await this.promptForVersion(enterpriseCode, asset, flags.version);
|
|
176
|
+
// // assetVersions = [{ a: asset.name }];
|
|
177
|
+
// // } else if (flags.asset) {
|
|
178
|
+
// // let asset = await this.promptForAsset(enterpriseCode, flags.asset);
|
|
179
|
+
// // // let selected = await this.promptForVersion(enterpriseCode, asset, flags.version);
|
|
180
|
+
// // assetVersions = [{ a: asset.name }]
|
|
181
|
+
// // // if (!flags.version || flags.version == PROMPT_ME_DESIGNATOR) {
|
|
182
|
+
// // // }
|
|
183
|
+
// // } else {
|
|
184
|
+
// // // Update sync codiac with what we've got here in the project.
|
|
185
|
+
// // let requestedAssets = await this.establishAssetContext(enterprise, flags.silent);
|
|
186
|
+
// // assetVersions = requestedAssets.map(a => { return { a: a } });
|
|
187
|
+
// // // let versions = await this.declareAssetVersions(requestedAssets, enterpriseCode);
|
|
188
|
+
// // // // We've updated Codiac. Now trigger the deploy.
|
|
189
|
+
// // // assetVersions = requestedAssets.map(a => {
|
|
190
|
+
// // // let version = versions.find(v => v.assetName == a);
|
|
191
|
+
// // // return { a: a, v: version ? version.assetVersion : undefined };
|
|
192
|
+
// // // });
|
|
193
|
+
// // }
|
|
194
|
+
// // let cab: CabinetClusterRoot;
|
|
195
|
+
// // [cab] = await this.rootMapUtils.promptForCabinet(enterpriseCode, rootMap, flags.cabinetName, false, undefined);
|
|
196
|
+
// // // let cabinet = await this.establishCabinet(flags.cabinetName);
|
|
197
|
+
// // let cabCntx: CabinetScope = { enterprise: cab.enterprise, environment: cab.environment, cabinet: cab.name };
|
|
198
|
+
// // // Get the clusterdef so we can get cloud pvd creds
|
|
199
|
+
// // let cluster = cab.cluster ?? ((rootMap.clusters.length === 1) ? rootMap.clusters[0].name : undefined); // fall back to the one and only.
|
|
200
|
+
// // if (cluster === undefined) {
|
|
201
|
+
// // this.logger.warn(`Cannot confirm cloud provider credentials: cabinet has no cluster specified. Process will rely on cached credentials.`);
|
|
202
|
+
// // // throw new Error(`Cannot determine cloud provider: cabinet has no cluster specified.`);
|
|
203
|
+
// // } else {
|
|
204
|
+
// // await this.establishCloudProviderCreds(rootMap, cluster);
|
|
205
|
+
// // }
|
|
206
|
+
// // let assets: CabinetAssetList = {
|
|
207
|
+
// // enterpriseCode: cabCntx.enterprise,
|
|
208
|
+
// // environment: cabCntx.environment,
|
|
209
|
+
// // cabinetName: cabCntx.cabinet,
|
|
210
|
+
// // assetNames: assetVersions.map(a => a.a)
|
|
211
|
+
// // };
|
|
212
|
+
// // this._ui.startSpinner(`Recycling assets in ${assets.cabinetName}...`);
|
|
213
|
+
// // // let result = await this.relayClient.recycleAssets(assets);
|
|
214
|
+
// // let result = await this.genRelayClient.Call.postExecuteRecycleAssets(assets);
|
|
215
|
+
// // this._ui.stopSpinner((result.success === true) ? "SUCCESS" : (result.error) ? "ERROR" : "FAILED");
|
|
216
|
+
// // if (result.error) {
|
|
217
|
+
// // this.logger.error(`Error recycling assets in ${assets.cabinetName}: ${result.message}`, result.error);
|
|
218
|
+
// // this._ui.userMessage(`Error recycling assets in ${assets.cabinetName}: ${result.message}`);
|
|
219
|
+
// // } else if (result.success) {
|
|
220
|
+
// // this.logger.notice(`Recycled assets in ${assets.cabinetName}`);
|
|
221
|
+
// // // this._ui.userMessage(`Recycled assets in ${assets.cabinetName}`); // The spinner is enough for the user message here.
|
|
222
|
+
// // } else {
|
|
223
|
+
// // this.logger.warn(`Failed recycling assets in ${assets.cabinetName}: ${result.message}`, result);
|
|
224
|
+
// // this._ui.userMessage(`Failed recycling assets in ${assets.cabinetName}: ${result.message}`);
|
|
225
|
+
// // }
|
|
226
|
+
// resolve();
|
|
227
|
+
// })
|
|
228
|
+
// } catch (err) {
|
|
229
|
+
// this.handleError(err);
|
|
230
|
+
// reject(err);
|
|
231
|
+
// } finally {
|
|
232
|
+
// await this.closeConnections();
|
|
233
|
+
// }
|
|
234
|
+
// });
|
|
235
|
+
// }
|
|
106
236
|
promptForAsset(enterprise, assetSearch) {
|
|
107
237
|
return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
108
238
|
try {
|
|
@@ -135,40 +265,19 @@ class AssetRecycle extends command_base_enterprise_1.CommandBaseEnterprise {
|
|
|
135
265
|
}
|
|
136
266
|
}));
|
|
137
267
|
}
|
|
138
|
-
searchVersions(answers, input) {
|
|
139
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
141
|
-
try {
|
|
142
|
-
// Whatever voodoo they're doing inside the autocomplete plugin,
|
|
143
|
-
// they're redefining "this", so we cant use it here.
|
|
144
|
-
// Great, we'll just HACK UP a fucking module scoped variable to hold onto the goddamn list then.
|
|
145
|
-
// let vers = this.getVersions();
|
|
146
|
-
input = input || "";
|
|
147
|
-
setTimeout(() => {
|
|
148
|
-
let options = { extract: (ver) => { return ver.value; } };
|
|
149
|
-
let results = fuzzy.filter(input, assetVersions, options);
|
|
150
|
-
let filtered = results.map((fr) => fr.original);
|
|
151
|
-
resolve(filtered);
|
|
152
|
-
}, _.random(30, 500)); // why a random number?
|
|
153
|
-
}
|
|
154
|
-
catch (err) {
|
|
155
|
-
reject(err);
|
|
156
|
-
}
|
|
157
|
-
}));
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
268
|
}
|
|
161
269
|
exports.default = AssetRecycle;
|
|
162
270
|
AssetRecycle.description = 'Deploys a given asset to a given cabinet. Defaults to current version.';
|
|
163
|
-
AssetRecycle.dependsOn = ["enterpriseCode", "cabinetName"];
|
|
271
|
+
AssetRecycle.dependsOn = [/* "enterpriseCode", */ "cabinetName"];
|
|
164
272
|
AssetRecycle.flags = {
|
|
165
|
-
// ...commandBase.globalFlags,
|
|
166
|
-
help: core_1.Flags.help({ char: 'h' }),
|
|
167
273
|
enterpriseCode: core_1.Flags.string({ char: 'e', required: false, description: `Code (name) of the enterprise to deploy` }),
|
|
168
274
|
cabinetName: core_1.Flags.string({ char: 'c', required: false, description: `Target cabinet name you want deploy` }),
|
|
169
275
|
asset: core_1.Flags.string({ char: 'a', required: false, description: `Search string for the name of the asset to deploy (use ${exports.PROMPT_ME_DESIGNATOR} to be prompted).` }),
|
|
170
|
-
|
|
171
|
-
silent: core_1.Flags.boolean({
|
|
276
|
+
// TODO: Move these into the base class
|
|
277
|
+
silent: core_1.Flags.boolean({ dependsOn: AssetRecycle.dependsOn, exclusive: ["echo", "to-script"], description: 'Non-Interactive mode; executes without any user interaction and fails on any missing or invalid arguments.' }),
|
|
278
|
+
echo: core_1.Flags.boolean({ exclusive: ["to-script", "silent"], description: 'Echo interaction mode; renders the equivalent non-interactive cli command for future use before final execution.' }),
|
|
279
|
+
"to-script": core_1.Flags.boolean({ exclusive: ["echo", "silent"], description: 'Toscript interaction mode; renders the equivalent non-interactive cli command WITHOUT any execution.' }),
|
|
280
|
+
"take-defaults": core_1.Flags.boolean({ /* char: 'y', */ exclusive: ["silent"], description: "Setting this to true prevents prompting for confirmation on parameters that were passed in or were automatically set to default values (Irrelevant in --silent mode). This behavior does NOT apply to scenarios that the command needs to override invalid user input; such cases will always prompt for confirmation. eg: when no argument was provided for file or type, and only one exists, the system will render the autoselected file unless this flag is set." })
|
|
172
281
|
};
|
|
173
282
|
AssetRecycle.args = {};
|
|
174
283
|
// type FuzzyResult = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recycle.js","sourceRoot":"","sources":["../../../src/commands/asset/recycle.ts"],"names":[],"mappings":";;;;AAAA,4BAA0B;AAC1B,sCAAoC;AACpC,qCAAsC;AACtC,4BAA6B;
|
|
1
|
+
{"version":3,"file":"recycle.js","sourceRoot":"","sources":["../../../src/commands/asset/recycle.ts"],"names":[],"mappings":";;;;AAAA,4BAA0B;AAC1B,sCAAoC;AACpC,qCAAsC;AACtC,4BAA6B;AAM7B,+DAA6E;AAE7E,mEAAiE;AAEjE;;4DAE4D;AAC/C,QAAA,oBAAoB,GAAG,GAAG,CAAC;AAKxC,MAAqB,YAAa,SAAQ,mCAAoC;IAmB7D,WAAW;;;YACpB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YAEvD,MAAM,OAAO,GAAiC,EAAE,CAAC;YAEjD,IAAI,KAAK,CAAC,cAAc,EAAE;gBACtB,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC;aAC7C;YACD,IAAI,KAAK,CAAC,KAAK,EAAE;gBACb,OAAO,CAAC,UAAU,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACtC;YACD,IAAI,KAAK,CAAC,WAAW,EAAE;gBACnB,OAAO,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;aAC3C;YAED,kEAAkE;YAClE,2DAA2D;YAC3D,kEAAkE;YAElE,MAAM,eAAe,GACjB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,kCAAgB,CAAC,MAAM,CAAC,CA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AE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,sGAAsG,EAAE,CAAC;IAClL,eAAe,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,ycAAyc,EAAE,CAAC;CACriB,CAAA;AAEM,iBAAI,GAAG,EAAE,CAAA;AA0TpB,uBAAuB;AACvB,iDAAiD;AACjD,sBAAsB;AACtB,wDAAwD;AACxD,qBAAqB;AACrB,4CAA4C;AAC5C,uBAAuB;AACvB,IAAI"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
2
|
+
"version": "1.3.147",
|
|
3
3
|
"commands": {
|
|
4
4
|
"branch": {
|
|
5
5
|
"id": "branch",
|
|
@@ -1832,13 +1832,6 @@
|
|
|
1832
1832
|
"aliases": [],
|
|
1833
1833
|
"hiddenAliases": [],
|
|
1834
1834
|
"flags": {
|
|
1835
|
-
"help": {
|
|
1836
|
-
"name": "help",
|
|
1837
|
-
"type": "boolean",
|
|
1838
|
-
"char": "h",
|
|
1839
|
-
"description": "Show CLI help.",
|
|
1840
|
-
"allowNo": false
|
|
1841
|
-
},
|
|
1842
1835
|
"enterpriseCode": {
|
|
1843
1836
|
"name": "enterpriseCode",
|
|
1844
1837
|
"type": "option",
|
|
@@ -1863,30 +1856,51 @@
|
|
|
1863
1856
|
"required": false,
|
|
1864
1857
|
"multiple": false
|
|
1865
1858
|
},
|
|
1866
|
-
"version": {
|
|
1867
|
-
"name": "version",
|
|
1868
|
-
"type": "option",
|
|
1869
|
-
"char": "v",
|
|
1870
|
-
"description": "Search string for the version of the asset to deploy (use ? to be prompted).",
|
|
1871
|
-
"required": false,
|
|
1872
|
-
"multiple": false
|
|
1873
|
-
},
|
|
1874
1859
|
"silent": {
|
|
1875
1860
|
"name": "silent",
|
|
1876
1861
|
"type": "boolean",
|
|
1877
|
-
"
|
|
1878
|
-
"description": "(Optional: defaults to false) Prevents confirmations of user-values that are remembered from prior runs. Requires: enterpriseCode,cabinetName",
|
|
1879
|
-
"required": false,
|
|
1862
|
+
"description": "Non-Interactive mode; executes without any user interaction and fails on any missing or invalid arguments.",
|
|
1880
1863
|
"allowNo": false,
|
|
1881
1864
|
"dependsOn": [
|
|
1882
|
-
"enterpriseCode",
|
|
1883
1865
|
"cabinetName"
|
|
1866
|
+
],
|
|
1867
|
+
"exclusive": [
|
|
1868
|
+
"echo",
|
|
1869
|
+
"to-script"
|
|
1870
|
+
]
|
|
1871
|
+
},
|
|
1872
|
+
"echo": {
|
|
1873
|
+
"name": "echo",
|
|
1874
|
+
"type": "boolean",
|
|
1875
|
+
"description": "Echo interaction mode; renders the equivalent non-interactive cli command for future use before final execution.",
|
|
1876
|
+
"allowNo": false,
|
|
1877
|
+
"exclusive": [
|
|
1878
|
+
"to-script",
|
|
1879
|
+
"silent"
|
|
1880
|
+
]
|
|
1881
|
+
},
|
|
1882
|
+
"to-script": {
|
|
1883
|
+
"name": "to-script",
|
|
1884
|
+
"type": "boolean",
|
|
1885
|
+
"description": "Toscript interaction mode; renders the equivalent non-interactive cli command WITHOUT any execution.",
|
|
1886
|
+
"allowNo": false,
|
|
1887
|
+
"exclusive": [
|
|
1888
|
+
"echo",
|
|
1889
|
+
"silent"
|
|
1890
|
+
]
|
|
1891
|
+
},
|
|
1892
|
+
"take-defaults": {
|
|
1893
|
+
"name": "take-defaults",
|
|
1894
|
+
"type": "boolean",
|
|
1895
|
+
"description": "Setting this to true prevents prompting for confirmation on parameters that were passed in or were automatically set to default values (Irrelevant in --silent mode). This behavior does NOT apply to scenarios that the command needs to override invalid user input; such cases will always prompt for confirmation. eg: when no argument was provided for file or type, and only one exists, the system will render the autoselected file unless this flag is set.",
|
|
1896
|
+
"allowNo": false,
|
|
1897
|
+
"exclusive": [
|
|
1898
|
+
"silent"
|
|
1884
1899
|
]
|
|
1885
1900
|
}
|
|
1886
1901
|
},
|
|
1887
1902
|
"args": {},
|
|
1888
1903
|
"dependsOn": [
|
|
1889
|
-
"enterpriseCode",
|
|
1890
1904
|
"cabinetName"
|
|
1891
1905
|
]
|
|
1892
1906
|
},
|
package/package.json
CHANGED