@codiac.io/codiac-cli 1.2.152 → 1.2.153
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/lib/commands/csp/login.js +1 -1
- package/lib/commands/csp/login.js.map +1 -1
- package/lib/k8s-command-base.d.ts +15 -25
- package/lib/k8s-command-base.js +20 -92
- package/lib/k8s-command-base.js.map +1 -1
- package/lib/relay/data/aws-regions.d.ts +6 -0
- package/lib/relay/data/aws-regions.js +32 -32
- package/lib/relay/data/aws-regions.js.map +1 -1
- package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.d.ts +11 -0
- package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.js +14 -13
- package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.js.map +1 -1
- package/lib/uilogic/cloud-resource-configurators/aws-node-types.d.ts +1 -33
- package/lib/uilogic/cloud-resource-configurators/aws-node-types.js +2 -3712
- package/lib/uilogic/cloud-resource-configurators/aws-node-types.js.map +1 -1
- package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.d.ts +2 -1
- package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
- package/lib/api-clients/common/api-user-creds.d.ts +0 -7
- package/lib/api-clients/common/api-user-creds.js +0 -19
- package/lib/api-clients/common/api-user-creds.js.map +0 -1
- package/lib/api-clients/common/config-loader.d.ts +0 -6
- package/lib/api-clients/common/config-loader.js +0 -19
- package/lib/api-clients/common/config-loader.js.map +0 -1
- package/lib/api-clients/common/security/auth-constants.d.ts +0 -15
- package/lib/api-clients/common/security/auth-constants.js +0 -22
- package/lib/api-clients/common/security/auth-constants.js.map +0 -1
- package/lib/api-clients/common/security/i-auth-client.d.ts +0 -44
- package/lib/api-clients/common/security/i-auth-client.js +0 -3
- package/lib/api-clients/common/security/i-auth-client.js.map +0 -1
- package/lib/api-clients/common/security/rest-client-base-with-auth.d.ts +0 -84
- package/lib/api-clients/common/security/rest-client-base-with-auth.js +0 -361
- package/lib/api-clients/common/security/rest-client-base-with-auth.js.map +0 -1
- package/lib/api-clients/common/security/token-holder.d.ts +0 -13
- package/lib/api-clients/common/security/token-holder.js +0 -18
- package/lib/api-clients/common/security/token-holder.js.map +0 -1
- package/lib/api-clients/common/utils.d.ts +0 -23
- package/lib/api-clients/common/utils.js +0 -83
- package/lib/api-clients/common/utils.js.map +0 -1
- package/lib/api-clients/contracts/index.d.ts +0 -1
- package/lib/api-clients/contracts/index.js +0 -5
- package/lib/api-clients/contracts/index.js.map +0 -1
- package/lib/api-clients/gen/client-config.d.ts +0 -10
- package/lib/api-clients/gen/client-config.js +0 -29
- package/lib/api-clients/gen/client-config.js.map +0 -1
- package/lib/api-clients/gen/client.d.ts +0 -45
- package/lib/api-clients/gen/client.js +0 -331
- package/lib/api-clients/gen/client.js.map +0 -1
- package/lib/api-clients/gen/contracts.d.ts +0 -2529
- package/lib/api-clients/gen/contracts.js +0 -370
- package/lib/api-clients/gen/contracts.js.map +0 -1
- package/lib/api-clients/gen/endpoints.d.ts +0 -3
- package/lib/api-clients/gen/endpoints.js +0 -3150
- package/lib/api-clients/gen/endpoints.js.map +0 -1
- package/lib/api-clients/index.d.ts +0 -2
- package/lib/api-clients/index.js +0 -6
- package/lib/api-clients/index.js.map +0 -1
- package/lib/apis/codiac-api/common/security/rest-client-base-with-auth.d.ts +0 -84
- package/lib/apis/codiac-api/common/security/rest-client-base-with-auth.js +0 -361
- package/lib/apis/codiac-api/common/security/rest-client-base-with-auth.js.map +0 -1
- package/lib/apis/codiac-api/gen/endpoints.d.ts +0 -3
- package/lib/apis/codiac-api/gen/endpoints.js +0 -3150
- package/lib/apis/codiac-api/gen/endpoints.js.map +0 -1
- package/lib/apis/over-gen/temp-mods.d.ts +0 -33
- package/lib/apis/over-gen/temp-mods.js +0 -91
- package/lib/apis/over-gen/temp-mods.js.map +0 -1
- package/lib/relay/wsclient/bus-listener.ervice.d.ts +0 -71
- package/lib/relay/wsclient/bus-listener.ervice.js +0 -150
- package/lib/relay/wsclient/bus-listener.ervice.js.map +0 -1
- package/lib/uilogic/enterprise-contextualizer-machine-scope.d.ts +0 -69
- package/lib/uilogic/enterprise-contextualizer-machine-scope.js +0 -596
- package/lib/uilogic/enterprise-contextualizer-machine-scope.js.map +0 -1
- package/lib/uilogic/registry-configurator-factory.d.ts +0 -12
- package/lib/uilogic/registry-configurator-factory.js +0 -68
- package/lib/uilogic/registry-configurator-factory.js.map +0 -1
- package/lib/uilogic/registry-configurator.d.ts +0 -17
- package/lib/uilogic/registry-configurator.js +0 -145
- package/lib/uilogic/registry-configurator.js.map +0 -1
- package/lib/uilogic/registry-configurators/aws-registry-configurator.d.ts +0 -15
- package/lib/uilogic/registry-configurators/aws-registry-configurator.js +0 -67
- package/lib/uilogic/registry-configurators/aws-registry-configurator.js.map +0 -1
- package/lib/uilogic/registry-configurators/azure-registry-configurator.d.ts +0 -25
- package/lib/uilogic/registry-configurators/azure-registry-configurator.js +0 -72
- package/lib/uilogic/registry-configurators/azure-registry-configurator.js.map +0 -1
- package/lib/uilogic/registry-configurators/docker-hub-registry-configurator.d.ts +0 -18
- package/lib/uilogic/registry-configurators/docker-hub-registry-configurator.js +0 -55
- package/lib/uilogic/registry-configurators/docker-hub-registry-configurator.js.map +0 -1
- package/lib/uilogic/registry-configurators/helm-registry-configurator.d.ts +0 -16
- package/lib/uilogic/registry-configurators/helm-registry-configurator.js +0 -44
- package/lib/uilogic/registry-configurators/helm-registry-configurator.js.map +0 -1
- package/lib/uilogic/registry-configurators/unsupported-registry-configurator.d.ts +0 -17
- package/lib/uilogic/registry-configurators/unsupported-registry-configurator.js +0 -60
- package/lib/uilogic/registry-configurators/unsupported-registry-configurator.js.map +0 -1
|
@@ -63,7 +63,7 @@ class CspLogin extends command_base_enterprise_1.CommandBaseEnterprise {
|
|
|
63
63
|
else {
|
|
64
64
|
// interactive auth flow
|
|
65
65
|
try {
|
|
66
|
-
let username = yield this.uiCloudProvider.promptForCloudProviderCreds(this.ioc, provider);
|
|
66
|
+
let username = yield this.uiCloudProvider.promptForCloudProviderCreds(this.ioc, provider, Boolean(flags.silent));
|
|
67
67
|
this._ui.userMessage(`${this._styler.colorGood("Success!")} Authenticated with ${provider} as ${this._styler.hilite(username)}.`);
|
|
68
68
|
}
|
|
69
69
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/commands/csp/login.ts"],"names":[],"mappings":";;;AAAA,sCAA4C;AAC5C,iEAAqE;AACrE,2EAAqE;AACrE,+FAAyF;AACzF,iDAAyC;AACzC,4BAA4B;AAE5B,MAAqB,QAAS,SAAQ,+CAAqB;IAuBzD,IAAY,eAAe;QACzB,IAAI,IAAI,CAAC,yBAAyB,KAAK,SAAS,EAAE;YAChD,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,2DAA2B,CAAC,CAAC;SAC5E;QACD,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IAIS,SAAS;QACjB,KAAK,CAAC,SAAS,EAAE,CAAC;QAClB,2DAA2B,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;IAGY,GAAG;;YACd,OAAO,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;;gBACjD,IAAI;oBACF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACjB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBACnD,MAAA,IAAI,CAAC,eAAe,0CAAE,MAAM,CACzB,SAAS,CAAC,GAAS,EAAE;;wBAEpB,IAAI;4BACF,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;4BAGnE,iBAAiB;4BACjB,IAAI,QAA2B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c,CAAC,EAAE,CAAC;IACzJ,YAAY,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,WAAW,EAAE,oYAAoY,EAAE,CAAC;IACnd,MAAM,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,gEAAgE,EAAE,CAAC;CACrI,CAAA;AAEM,aAAI,GAAG,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,6BAAiB,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,4EAA4E,EAAE,CAAC,CAAA"}
|
|
@@ -1,39 +1,29 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
|
+
import { IConfig } from '@oclif/config';
|
|
2
3
|
import k8s = require('@kubernetes/client-node');
|
|
3
|
-
import { Config } from "@oclif/core";
|
|
4
4
|
import { CabinetScope, EnterpriseContext, UserContext } from "@codiac.io/codiac-relay-contracts";
|
|
5
|
-
import {
|
|
5
|
+
import { RelayContainer } from "@codiac.io/relay-client";
|
|
6
6
|
import { CodiacClient } from '@codiac.io/codiac-api-client';
|
|
7
7
|
import { commandBase } from '@codiac.io/codiac-cli-common';
|
|
8
8
|
import { Cabinet, Enterprise, Environment } from '@codiac.io/codiac-domain';
|
|
9
|
-
import {
|
|
9
|
+
import { UserContextManager } from "@codiac.io/codiac-ops-enterprise";
|
|
10
10
|
import { ImageRegistryClientsFactory } from "@codiac.io/codiac-ops-common";
|
|
11
11
|
/** Ensures tenant context and k8s context.
|
|
12
12
|
* For use with commands that operate on enterprise records or on an existing cluster.
|
|
13
13
|
*/
|
|
14
14
|
export declare abstract class CommandBaseEnterprise extends commandBase {
|
|
15
|
-
constructor(argv: string[], config:
|
|
16
|
-
protected
|
|
17
|
-
protected
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
protected
|
|
23
|
-
|
|
24
|
-
protected
|
|
25
|
-
|
|
26
|
-
protected
|
|
27
|
-
private __relayClient;
|
|
28
|
-
protected set _relayContainer(rc: RelayContainer);
|
|
29
|
-
protected get _relayContainer(): RelayContainer;
|
|
30
|
-
private __relayContainer;
|
|
31
|
-
protected get _regClientFactory(): ImageRegistryClientsFactory;
|
|
32
|
-
private __regClientFactory;
|
|
33
|
-
protected get _userContextManager(): UserContextManager;
|
|
34
|
-
private __userContextManager;
|
|
35
|
-
/** Logs the user in as needed, and persists the new context object to the local machine. */
|
|
36
|
-
protected establishTenantContext(currentContext: UserContext): Promise<UserContext>;
|
|
15
|
+
constructor(argv: string[], config: IConfig, requiresProjectScope?: boolean);
|
|
16
|
+
protected _userCntx: UserContext;
|
|
17
|
+
protected _userContextManager: UserContextManager;
|
|
18
|
+
/** TODO: Get this out of the CLI. Any calls to the codiac api should be made from the relay.
|
|
19
|
+
*
|
|
20
|
+
* TODO: Lazy load this from IOC.
|
|
21
|
+
*/
|
|
22
|
+
protected _codiacApi: CodiacClient;
|
|
23
|
+
protected _relayContainer: RelayContainer;
|
|
24
|
+
protected _regClientFactory: ImageRegistryClientsFactory;
|
|
25
|
+
/** TODO: Move this to commandBase */
|
|
26
|
+
protected establishTenantContext(): Promise<UserContext>;
|
|
37
27
|
/** Acquires and adopts the identity of a single enterprise for the current project
|
|
38
28
|
* (DOES NOT establish an AssetBinding for the current tenant).
|
|
39
29
|
* TODO: Move this to commandBase
|
package/lib/k8s-command-base.js
CHANGED
|
@@ -8,6 +8,7 @@ const codiac_relay_contracts_1 = require("@codiac.io/codiac-relay-contracts");
|
|
|
8
8
|
const relay_client_1 = require("@codiac.io/relay-client");
|
|
9
9
|
const codiac_api_client_1 = require("@codiac.io/codiac-api-client");
|
|
10
10
|
const codiac_cli_common_1 = require("@codiac.io/codiac-cli-common");
|
|
11
|
+
const codiac_cli_common_2 = require("@codiac.io/codiac-cli-common");
|
|
11
12
|
const enterprise_contextualizer_1 = require("./uilogic/enterprise-contextualizer");
|
|
12
13
|
const environment_contextualizer_1 = require("./uilogic/environment-contextualizer");
|
|
13
14
|
const codiac_ops_enterprise_1 = require("@codiac.io/codiac-ops-enterprise");
|
|
@@ -17,105 +18,32 @@ const codiac_ops_common_1 = require("@codiac.io/codiac-ops-common");
|
|
|
17
18
|
*/
|
|
18
19
|
class CommandBaseEnterprise extends codiac_cli_common_1.commandBase {
|
|
19
20
|
constructor(argv, config, requiresProjectScope) {
|
|
21
|
+
var _a;
|
|
20
22
|
super(argv, config, requiresProjectScope);
|
|
23
|
+
let codiacApiUrl = (this._cliCfg) ? this._cliCfg.codiacApiBaseUrl : undefined;
|
|
24
|
+
codiac_api_client_1.CodiacClient.bootstrap();
|
|
25
|
+
let userLoader = new codiac_ops_enterprise_1.UserContextLoader(this.logger);
|
|
26
|
+
this._userCntx = (_a = userLoader.loadUserContext(this._projCfg.tenantCode)) !== null && _a !== void 0 ? _a : new codiac_relay_contracts_1.UserContext();
|
|
27
|
+
// this._userCntx = this._cfgRepo.loadUserContext(this._projCfg.tenantCode);
|
|
28
|
+
let authToken = (this._userCntx) ? this._userCntx.currentToken : undefined;
|
|
29
|
+
this.ioc.bind(codiac_api_client_1.CodiacClient).toDynamicValue((ctx) => codiac_api_client_1.CodiacClient.create(this.logger, codiacApiUrl, authToken)); //
|
|
30
|
+
this._codiacApi = this.ioc.get(codiac_api_client_1.CodiacClient); // TODO: Lazy-load this
|
|
31
|
+
this._relayContainer = new relay_client_1.RelayContainer(this._styler, this.logger, undefined, undefined, this.__projectRoot); // <-- HACK need an IoC strategy
|
|
32
|
+
this._userContextManager = new codiac_ops_enterprise_1.UserContextManager(this._codiacApi, this.logger);
|
|
33
|
+
this._regClientFactory = this.ioc.get(codiac_ops_common_1.ImageRegistryClientsFactory);
|
|
34
|
+
// this._relayContainer.init();
|
|
21
35
|
}
|
|
22
|
-
// protected loadClusterSpecSub: Subject<temp.Cluster> = new Subject();
|
|
23
|
-
// public get loadClusterSpec$(): Observable<temp.Cluster> {
|
|
24
|
-
// return this.loadClusterSpecSub.asObservable();
|
|
25
|
-
// }
|
|
26
|
-
// protected acquireK8sContextSub: Subject<k8s.KubeConfig> = new Subject();
|
|
27
|
-
// public get acquireK8sContext$(): Observable<k8s.KubeConfig> {
|
|
28
|
-
// return this.acquireK8sContextSub.asObservable();
|
|
29
|
-
// }
|
|
30
|
-
// protected _ui: IUserInputProvider;
|
|
31
36
|
// /** Assembles the full specification for the operation that is to be performed on the cluster. */
|
|
32
37
|
// protected abstract async loadOperationInput( userCntx: UserContext, assetCntx: AssetContext): Promise<TOperationInput>;
|
|
33
38
|
// /** Performs the actual intended work within the cluster. */
|
|
34
39
|
// protected abstract async executeMainOperation(input: TOperationInput): Promise<void>;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* | | | | | |
|
|
38
|
-
* | | __ _ _____ _ | | ___ __ _ __| |___
|
|
39
|
-
* | | / _` |_ / | | | | | / _ \ / _` |/ _` / __|
|
|
40
|
-
* | |___| (_| |/ /| |_| | | |___| (_) | (_| | (_| \__ \
|
|
41
|
-
* \_____/\__,_/___|\__, | \_____/\___/ \__,_|\__,_|___/
|
|
42
|
-
* __/ |
|
|
43
|
-
* |___/
|
|
44
|
-
* ================================================================================================== */
|
|
45
|
-
set _userCntx(cntx) {
|
|
46
|
-
this.__userCntx = cntx;
|
|
47
|
-
}
|
|
48
|
-
get _userCntx() {
|
|
49
|
-
var _a;
|
|
50
|
-
if (this.__userCntx === undefined) {
|
|
51
|
-
let userLoader = new codiac_ops_enterprise_1.UserContextLoader(this.logger);
|
|
52
|
-
this.__userCntx = (_a = userLoader.loadUserContext(this._projCfg.tenantCode)) !== null && _a !== void 0 ? _a : new codiac_relay_contracts_1.UserContext();
|
|
53
|
-
}
|
|
54
|
-
return this.__userCntx;
|
|
55
|
-
}
|
|
56
|
-
get codiacApiUrl() {
|
|
57
|
-
var _a;
|
|
58
|
-
if (this.__codiacApiUrl === undefined) {
|
|
59
|
-
this.__codiacApiUrl = (_a = this._cliCfg.codiacApiBaseUrl) !== null && _a !== void 0 ? _a : codiac_api_client_1.CodiacClient.DEFAULT_API_URL;
|
|
60
|
-
}
|
|
61
|
-
return this.__codiacApiUrl;
|
|
62
|
-
}
|
|
63
|
-
/** TODO: Get this out of the CLI. Any calls to the codiac api should be made from the relay. */
|
|
64
|
-
get _codiacApi() {
|
|
65
|
-
if (this.__codiacApi === undefined) {
|
|
66
|
-
codiac_api_client_1.CodiacClient.bootstrap();
|
|
67
|
-
// Cant do it this way until we make ApiUserCreds.token nullable.
|
|
68
|
-
// this.ioc.bind<CodiacClientConfig>(CodiacClientConfig).toConstantValue({ apiBaseUrl: this.codiacApiUrl });
|
|
69
|
-
// this.ioc.bind(ApiUserCreds).toConstantValue(undefined); // <--- ILLEGAL!
|
|
70
|
-
// host.ioc.bind<CodiacClient>(CodiacClient).toSelf();
|
|
71
|
-
let authToken = (this._userCntx) ? this._userCntx.currentToken : undefined;
|
|
72
|
-
this.ioc.bind(codiac_api_client_1.CodiacClient).toDynamicValue((ctx) => codiac_api_client_1.CodiacClient.create(this.logger, this.codiacApiUrl, authToken)); //
|
|
73
|
-
this.__codiacApi = this.ioc.get(codiac_api_client_1.CodiacClient);
|
|
74
|
-
}
|
|
75
|
-
return this.__codiacApi;
|
|
76
|
-
}
|
|
77
|
-
get api() {
|
|
78
|
-
if (this.__api === undefined) {
|
|
79
|
-
this.__api = this.ioc.get(codiac_ops_enterprise_1.ThrowingApiClientWrapper);
|
|
80
|
-
}
|
|
81
|
-
return this.__api;
|
|
82
|
-
}
|
|
83
|
-
get relayClient() {
|
|
84
|
-
if (this.__relayClient === undefined) {
|
|
85
|
-
this.__relayClient = new relay_client_1.RelayClient(this._userCntx, this._relayContainer, this._projectRoot, this._styler, this.logger);
|
|
86
|
-
}
|
|
87
|
-
return this.__relayClient;
|
|
88
|
-
}
|
|
89
|
-
set _relayContainer(rc) {
|
|
90
|
-
this.__relayContainer = rc;
|
|
91
|
-
}
|
|
92
|
-
get _relayContainer() {
|
|
93
|
-
if (this.__relayContainer === undefined) {
|
|
94
|
-
// HACK: Need an IoC strategy !!
|
|
95
|
-
this.__relayContainer = new relay_client_1.RelayContainer(this._styler, this.logger, undefined, undefined, this.__projectRoot);
|
|
96
|
-
// this.__relayContainer.init(); // Do we NOT need this now?
|
|
97
|
-
}
|
|
98
|
-
return this.__relayContainer;
|
|
99
|
-
}
|
|
100
|
-
get _regClientFactory() {
|
|
101
|
-
if (this.__regClientFactory === undefined) {
|
|
102
|
-
this.__regClientFactory = this.ioc.get(codiac_ops_common_1.ImageRegistryClientsFactory);
|
|
103
|
-
}
|
|
104
|
-
return this.__regClientFactory;
|
|
105
|
-
}
|
|
106
|
-
get _userContextManager() {
|
|
107
|
-
if (this.__userContextManager === undefined) {
|
|
108
|
-
this.__userContextManager = new codiac_ops_enterprise_1.UserContextManager(this._codiacApi, this.logger);
|
|
109
|
-
}
|
|
110
|
-
return this.__userContextManager;
|
|
111
|
-
}
|
|
112
|
-
/** Logs the user in as needed, and persists the new context object to the local machine. */
|
|
113
|
-
establishTenantContext(currentContext) {
|
|
40
|
+
/** TODO: Move this to commandBase */
|
|
41
|
+
establishTenantContext() {
|
|
114
42
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
115
43
|
return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
116
44
|
try {
|
|
117
|
-
let contextor = new
|
|
118
|
-
let cntx = yield contextor.establishTenantContext(
|
|
45
|
+
let contextor = new codiac_cli_common_2.TenantContextualizer(this._projCfg, this._ops, this._codiacApi, this._codiacApi, this._cfgRepo, this._ui, this._styler, this.logger);
|
|
46
|
+
let cntx = yield contextor.establishTenantContext();
|
|
119
47
|
if (cntx.currentToken)
|
|
120
48
|
this._codiacApi.setUserToken(cntx.currentToken); // why isnt this being done by the contextualizer?
|
|
121
49
|
// Register it with the ioc container
|
|
@@ -127,8 +55,8 @@ class CommandBaseEnterprise extends codiac_cli_common_1.commandBase {
|
|
|
127
55
|
}
|
|
128
56
|
// Do the same for the UserNameTenantCode obj
|
|
129
57
|
let tenantUser = {
|
|
130
|
-
username:
|
|
131
|
-
tenantCode:
|
|
58
|
+
username: this._userCntx.userName,
|
|
59
|
+
tenantCode: this._userCntx.currentTenantCode // ! operator is ok because we jsut estab'd tenant context
|
|
132
60
|
};
|
|
133
61
|
if (this.ioc.isBound(codiac_ops_common_1.UserNameTenantCode)) {
|
|
134
62
|
this.ioc.rebind(codiac_ops_common_1.UserNameTenantCode).toConstantValue(tenantUser);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"k8s-command-base.js","sourceRoot":"","sources":["../src/k8s-command-base.ts"],"names":[],"mappings":";;;;AAAA,4BAAyB;
|
|
1
|
+
{"version":3,"file":"k8s-command-base.js","sourceRoot":"","sources":["../src/k8s-command-base.ts"],"names":[],"mappings":";;;;AAAA,4BAAyB;AAGzB,+CAAgD;AAEhD,8EAAiG;AACjG,0DAAyD;AACzD,oEAA4D;AAC5D,oEAA2D;AAC3D,oEAAoE;AAGpE,mFAA+E;AAC/E,qFAAiF;AACjF,4EAAyF;AACzF,oEAA+F;AAG/F;;GAEG;AACH,MAAsB,qBAAsB,SAAQ,+BAAW;IAC7D,YAAY,IAAc,EAAE,MAAe,EAAE,oBAA8B;;QACzE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC;QAE1C,IAAI,YAAY,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9E,gCAAY,CAAC,SAAS,EAAE,CAAC;QACzB,IAAI,UAAU,GAAG,IAAI,yCAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEpD,IAAI,CAAC,SAAS,GAAG,MAAA,UAAU,CAAC,eAAe,CAAC,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E,gFAAgF;YAC/H,IAAI,MAAM,GAAG,SAAS,CAAC;YACvB,0CAA0C;YAC1C,OAAO,MAAM,CAAC;SACf;IACH,CAAC;CACF;AAzND,sDAyNC"}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AWS_REGIONS = void 0;
|
|
4
|
+
/** Pre-sorted, hard-coded list of friendly AWS region names and their human-readable codes.
|
|
5
|
+
*
|
|
6
|
+
* @see https://docs.aws.amazon.com/general/latest/gr/eks.html
|
|
7
|
+
*/
|
|
8
|
+
exports.AWS_REGIONS = [
|
|
9
|
+
{ group: "US East", name: "Ohio", code: "us-east-2" },
|
|
10
|
+
{ group: "US East", name: "N. Virginia", code: "us-east-1" },
|
|
11
|
+
{ group: "US West", name: "N. California", code: "us-west-1" },
|
|
12
|
+
{ group: "US West", name: "Oregon", code: "us-west-2" },
|
|
13
|
+
{ group: "Africa", name: "Cape Town", code: "af-south-1" },
|
|
14
|
+
{ group: "Asia Pacific", name: "Hong Kong", code: "ap-east-1" },
|
|
15
|
+
{ group: "Asia Pacific", name: "Jakarta", code: "ap-southeast-3" },
|
|
16
|
+
{ group: "Asia Pacific", name: "Mumbai", code: "ap-south-1" },
|
|
17
|
+
{ group: "Asia Pacific", name: "Osaka", code: "ap-northeast-3" },
|
|
18
|
+
{ group: "Asia Pacific", name: "Seoul", code: "ap-northeast-2" },
|
|
19
|
+
{ group: "Asia Pacific", name: "Singapore", code: "ap-southeast-1" },
|
|
20
|
+
{ group: "Asia Pacific", name: "Sydney", code: "ap-southeast-2" },
|
|
21
|
+
{ group: "Asia Pacific", name: "Tokyo", code: "ap-northeast-1" },
|
|
22
|
+
{ group: "Canada", name: "Central", code: "ca-central-1" },
|
|
23
|
+
{ group: "Europe", name: "Frankfurt", code: "eu-central-1" },
|
|
24
|
+
{ group: "Europe", name: "Ireland", code: "eu-west-1" },
|
|
25
|
+
{ group: "Europe", name: "London", code: "eu-west-2" },
|
|
26
|
+
{ group: "Europe", name: "Milan", code: "eu-south-1" },
|
|
27
|
+
{ group: "Europe", name: "Paris", code: "eu-west-3" },
|
|
28
|
+
{ group: "Europe", name: "Stockholm", code: "eu-north-1" },
|
|
29
|
+
{ group: "Middle East", name: "Bahrain", code: "me-south-1" },
|
|
30
|
+
{ group: "South America", name: "São Paulo", code: "sa-east-1" },
|
|
31
|
+
{ group: "AWS GovCloud", name: "US-East", code: "us-gov-east-1" },
|
|
32
|
+
{ group: "AWS GovCloud", name: "US-West", code: "us-gov-west-1" },
|
|
33
|
+
];
|
|
34
34
|
//# sourceMappingURL=aws-regions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws-regions.js","sourceRoot":"","sources":["../../../src/relay/data/aws-regions.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"aws-regions.js","sourceRoot":"","sources":["../../../src/relay/data/aws-regions.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACU,QAAA,WAAW,GAAgB;IACtC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE;IACrD,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,WAAW,EAAE;IAC5D,EAAE,KAAK,EAAE,S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,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE;IACtD,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE;IACtD,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE;IACrD,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE;IAC1D,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE;IAC7D,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE;IAChE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE;IACjE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE;CAClE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare type AwsK8sVersionSupport = {
|
|
2
|
+
version: string;
|
|
3
|
+
upstreamRelease: Date;
|
|
4
|
+
eksRelease: Date;
|
|
5
|
+
endOfSupport: Date;
|
|
6
|
+
};
|
|
7
|
+
/** (AS OF 25 Aug 2022) Pre-sorted, hard-coded list of Kubernetes versions currently supported by AWS.
|
|
8
|
+
*
|
|
9
|
+
* @see https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
|
|
10
|
+
*/
|
|
11
|
+
export declare const AWS_K8S_VERSIONS: AwsK8sVersionSupport[];
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AWS_K8S_VERSIONS = void 0;
|
|
4
|
+
/** (AS OF 25 Aug 2022) Pre-sorted, hard-coded list of Kubernetes versions currently supported by AWS.
|
|
5
|
+
*
|
|
6
|
+
* @see https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
|
|
7
|
+
*/
|
|
8
|
+
exports.AWS_K8S_VERSIONS = [
|
|
9
|
+
{ version: "1.23", upstreamRelease: new Date("December 7, 2021"), eksRelease: new Date("August 11, 2022"), endOfSupport: new Date("October 1, 2023") },
|
|
10
|
+
{ version: "1.22", upstreamRelease: new Date("August 4, 2021"), eksRelease: new Date("April 4, 2022"), endOfSupport: new Date("May 1, 2023") },
|
|
11
|
+
{ version: "1.21", upstreamRelease: new Date("April 8, 2021"), eksRelease: new Date("July 19, 2021"), endOfSupport: new Date("February 1, 2023") },
|
|
12
|
+
{ version: "1.20", upstreamRelease: new Date("December 8, 2020"), eksRelease: new Date("May 18, 2021"), endOfSupport: new Date("November 1, 2022") },
|
|
13
|
+
{ version: "1.19", upstreamRelease: new Date("August 26, 2020"), eksRelease: new Date("February 16, 2021"), endOfSupport: new Date("August 1, 2022") },
|
|
14
|
+
{ version: "1.18", upstreamRelease: new Date("March 23, 2020"), eksRelease: new Date("October 13, 2020"), endOfSupport: new Date("March 31, 2022") }
|
|
15
|
+
];
|
|
15
16
|
//# sourceMappingURL=aws-k8s-versions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws-k8s-versions.js","sourceRoot":"","sources":["../../../src/uilogic/cloud-resource-configurators/aws-k8s-versions.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"aws-k8s-versions.js","sourceRoot":"","sources":["../../../src/uilogic/cloud-resource-configurators/aws-k8s-versions.ts"],"names":[],"mappings":";;;AAGA;;;EAGE;AACW,QAAA,gBAAgB,GAA2B;IACtD,EAAE,OAAO,EAAE,MAAM,EAAE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C2 Instance Types](https://aws.amazon.com/ec2/instance-types/?trk=36c6da98-7b20-48fa-8225-4784bced9843&[…]cid=AL!4422!3!536392622533!e!!g!!aws%20ec2%20instance%20types)
|
|
5
|
-
* @see [Rules for specifying instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-cpu-options-rules.html)
|
|
3
|
+
* @see https://aws.amazon.com/ec2/instance-types/?trk=36c6da98-7b20-48fa-8225-4784bced9843&[…]cid=AL!4422!3!536392622533!e!!g!!aws%20ec2%20instance%20types
|
|
6
4
|
*/
|
|
7
5
|
export declare const AWS_NODE_TYPES: string[];
|
|
8
|
-
export declare enum AWS_NODE_CATEGORY_ENUM {
|
|
9
|
-
"generalPurpose" = "generalPurpose",
|
|
10
|
-
"computeOptimized" = "computeOptimized",
|
|
11
|
-
"memoryOptimized" = "memoryOptimized",
|
|
12
|
-
"acceleratedComputing" = "acceleratedComputing",
|
|
13
|
-
"storageOptimized" = "storageOptimized"
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The number of vCPUs for the instance is the number of CPU cores multiplied by the threads per core.
|
|
17
|
-
*
|
|
18
|
-
* To specify a custom number of vCPUs, you must specify a valid number of CPU cores and threads per core for the instance type.
|
|
19
|
-
*
|
|
20
|
-
* You cannot exceed the default number of vCPUs for the instance.
|
|
21
|
-
*/
|
|
22
|
-
export declare type AwsNodeSize = {
|
|
23
|
-
"instanceType": string;
|
|
24
|
-
"defaultvCpus": number;
|
|
25
|
-
"defaultCpuCores": number;
|
|
26
|
-
"defaultThreadsPerCore": number;
|
|
27
|
-
/** Number or a numeric range */
|
|
28
|
-
"validCpuCores": {
|
|
29
|
-
min: number;
|
|
30
|
-
max: number;
|
|
31
|
-
} | number[];
|
|
32
|
-
/** number or list of numbers */
|
|
33
|
-
"validThreadsPerCore": number[];
|
|
34
|
-
};
|
|
35
|
-
export declare const awsNodeSizesByCategory: {
|
|
36
|
-
[category: string]: AwsNodeSize[];
|
|
37
|
-
};
|