@zowe/core-for-zowe-sdk 7.0.2 → 7.1.2
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.
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { ICommandExampleDefinition, ICommandOptionDefinition, ICommandProfileTypeConfiguration } from "@zowe/imperative";
|
|
2
|
+
/**
|
|
3
|
+
* Class containing the various profile related constants
|
|
4
|
+
*/
|
|
5
|
+
export declare class ProfileConstants {
|
|
6
|
+
static readonly BASE_CONNECTION_OPTION_GROUP = "Base Connection Options";
|
|
7
|
+
/**
|
|
8
|
+
* Option used in profile creation and commands for hostname
|
|
9
|
+
*/
|
|
10
|
+
static readonly BASE_OPTION_HOST: ICommandOptionDefinition;
|
|
11
|
+
/**
|
|
12
|
+
* Option used in profile creation and commands for port
|
|
13
|
+
*/
|
|
14
|
+
static readonly BASE_OPTION_PORT: ICommandOptionDefinition;
|
|
15
|
+
/**
|
|
16
|
+
* Option used in profile creation and commands for username / ID
|
|
17
|
+
*/
|
|
18
|
+
static readonly BASE_OPTION_USER: ICommandOptionDefinition;
|
|
19
|
+
/**
|
|
20
|
+
* Option used in profile creation and commands for password/passphrase
|
|
21
|
+
*/
|
|
22
|
+
static readonly BASE_OPTION_PASSWORD: ICommandOptionDefinition;
|
|
23
|
+
/**
|
|
24
|
+
* Option used in profile creation and commands for rejectUnauthorized setting for connecting to z/OSMF
|
|
25
|
+
*/
|
|
26
|
+
static readonly BASE_OPTION_REJECT_UNAUTHORIZED: ICommandOptionDefinition;
|
|
27
|
+
/**
|
|
28
|
+
* Option used in profile creation and commands for tokenType
|
|
29
|
+
*/
|
|
30
|
+
static readonly BASE_OPTION_TOKEN_TYPE: ICommandOptionDefinition;
|
|
31
|
+
/**
|
|
32
|
+
* Option used in profile creation and commands for tokenValue to be used to interact with APIs
|
|
33
|
+
*/
|
|
34
|
+
static readonly BASE_OPTION_TOKEN_VALUE: ICommandOptionDefinition;
|
|
35
|
+
/**
|
|
36
|
+
* Option used to specify the path to the certificate file for authentication
|
|
37
|
+
*/
|
|
38
|
+
static readonly BASE_OPTION_CERT_FILE: ICommandOptionDefinition;
|
|
39
|
+
/**
|
|
40
|
+
* Option used to specify the path to the certificate file for authentication
|
|
41
|
+
*/
|
|
42
|
+
static readonly BASE_OPTION_CERT_KEY_FILE: ICommandOptionDefinition;
|
|
43
|
+
/**
|
|
44
|
+
* Option used to specify the path to the certificate file for authentication
|
|
45
|
+
*/
|
|
46
|
+
static readonly AUTO_INIT_OPTION_GROUP = "APIML Connection Options";
|
|
47
|
+
/**
|
|
48
|
+
* Option used in profile creation and commands for hostname
|
|
49
|
+
*/
|
|
50
|
+
static readonly AUTO_INIT_OPTION_HOST: ICommandOptionDefinition;
|
|
51
|
+
/**
|
|
52
|
+
* Option used in profile creation and commands for port
|
|
53
|
+
*/
|
|
54
|
+
static readonly AUTO_INIT_OPTION_PORT: ICommandOptionDefinition;
|
|
55
|
+
/**
|
|
56
|
+
* Option used in profile creation and commands for username / ID
|
|
57
|
+
*/
|
|
58
|
+
static readonly AUTO_INIT_OPTION_USER: ICommandOptionDefinition;
|
|
59
|
+
/**
|
|
60
|
+
* Option used in profile creation and commands for password/passphrase
|
|
61
|
+
*/
|
|
62
|
+
static readonly AUTO_INIT_OPTION_PASSWORD: ICommandOptionDefinition;
|
|
63
|
+
/**
|
|
64
|
+
* Option used in profile creation and commands for rejectUnauthorized setting for connecting to z/OSMF
|
|
65
|
+
*/
|
|
66
|
+
static readonly AUTO_INIT_OPTION_REJECT_UNAUTHORIZED: ICommandOptionDefinition;
|
|
67
|
+
/**
|
|
68
|
+
* Option used in profile creation and commands for tokenType
|
|
69
|
+
*/
|
|
70
|
+
static readonly AUTO_INIT_OPTION_TOKEN_TYPE: ICommandOptionDefinition;
|
|
71
|
+
/**
|
|
72
|
+
* Option used in profile creation and commands for tokenValue to be used to interact with APIs
|
|
73
|
+
*/
|
|
74
|
+
static readonly AUTO_INIT_OPTION_TOKEN_VALUE: ICommandOptionDefinition;
|
|
75
|
+
/**
|
|
76
|
+
* Option used in profile creation and commands for certificate file to be used to interact with login APIs
|
|
77
|
+
*/
|
|
78
|
+
static AUTO_INIT_OPTION_CERT_FILE: ICommandOptionDefinition;
|
|
79
|
+
/**
|
|
80
|
+
* Option used in profile creation and commands for certificate key file to be used to interact with login APIs
|
|
81
|
+
*/
|
|
82
|
+
static AUTO_INIT_OPTION_CERT_KEY_FILE: ICommandOptionDefinition;
|
|
83
|
+
/**
|
|
84
|
+
* Summary of auth command group
|
|
85
|
+
* @static
|
|
86
|
+
* @memberof AuthConstants
|
|
87
|
+
*/
|
|
88
|
+
static readonly AUTH_GROUP_SUMMARY = "Connect to Zowe API ML authentication service";
|
|
89
|
+
/**
|
|
90
|
+
* Description of auth command group
|
|
91
|
+
* @static
|
|
92
|
+
* @memberof AuthConstants
|
|
93
|
+
*/
|
|
94
|
+
static readonly AUTH_GROUP_DESCRIPTION: string;
|
|
95
|
+
/**
|
|
96
|
+
* Summary of APIML login command
|
|
97
|
+
* @static
|
|
98
|
+
* @memberof AuthConstants
|
|
99
|
+
*/
|
|
100
|
+
static readonly APIML_LOGIN_SUMMARY = "Log in to API ML authentication service";
|
|
101
|
+
/**
|
|
102
|
+
* Description of APIML login command
|
|
103
|
+
* @static
|
|
104
|
+
* @memberof AuthConstants
|
|
105
|
+
*/
|
|
106
|
+
static readonly APIML_LOGIN_DESCRIPTION: string;
|
|
107
|
+
/**
|
|
108
|
+
* Example definition for APIML login command
|
|
109
|
+
* @static
|
|
110
|
+
* @memberof AuthConstants
|
|
111
|
+
*/
|
|
112
|
+
static readonly APIML_LOGIN_EXAMPLE1: ICommandExampleDefinition;
|
|
113
|
+
/**
|
|
114
|
+
* Example definition for APIML login command with show-token
|
|
115
|
+
* @static
|
|
116
|
+
* @memberof AuthConstants
|
|
117
|
+
*/
|
|
118
|
+
static readonly APIML_LOGIN_EXAMPLE2: ICommandExampleDefinition;
|
|
119
|
+
/**
|
|
120
|
+
* Summary of APIML logout command
|
|
121
|
+
* @static
|
|
122
|
+
* @memberof AuthConstants
|
|
123
|
+
*/
|
|
124
|
+
static readonly APIML_LOGOUT_SUMMARY = "Log out of API ML authentication service";
|
|
125
|
+
/**
|
|
126
|
+
* Description of APIML logout command
|
|
127
|
+
* @static
|
|
128
|
+
* @memberof AuthConstants
|
|
129
|
+
*/
|
|
130
|
+
static readonly APIML_LOGOUT_DESCRIPTION: string;
|
|
131
|
+
/**
|
|
132
|
+
* Example definition for APIML logout command
|
|
133
|
+
* @static
|
|
134
|
+
* @memberof AuthConstants
|
|
135
|
+
*/
|
|
136
|
+
static readonly APIML_LOGOUT_EXAMPLE1: ICommandExampleDefinition;
|
|
137
|
+
/**
|
|
138
|
+
* Example definition for APIML logout command with token-value
|
|
139
|
+
* @static
|
|
140
|
+
* @memberof AuthConstants
|
|
141
|
+
*/
|
|
142
|
+
static readonly APIML_LOGOUT_EXAMPLE2: ICommandExampleDefinition;
|
|
143
|
+
/**
|
|
144
|
+
* Option used in APIML logout command for token-type
|
|
145
|
+
*/
|
|
146
|
+
static readonly APIML_LOGOUT_OPTION_TOKEN_TYPE: ICommandOptionDefinition;
|
|
147
|
+
/**
|
|
148
|
+
* Profile configuration for SSH profiles
|
|
149
|
+
* @type {ICommandProfileTypeConfiguration}
|
|
150
|
+
* @memberof BaseProfile
|
|
151
|
+
*/
|
|
152
|
+
static readonly BaseProfile: ICommandProfileTypeConfiguration;
|
|
153
|
+
}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
4
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
5
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
8
|
+
*
|
|
9
|
+
* Copyright Contributors to the Zowe Project.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ProfileConstants = void 0;
|
|
14
|
+
const imperative_1 = require("@zowe/imperative");
|
|
15
|
+
/**
|
|
16
|
+
* Class containing the various profile related constants
|
|
17
|
+
*/
|
|
18
|
+
class ProfileConstants {
|
|
19
|
+
}
|
|
20
|
+
exports.ProfileConstants = ProfileConstants;
|
|
21
|
+
ProfileConstants.BASE_CONNECTION_OPTION_GROUP = "Base Connection Options";
|
|
22
|
+
/**
|
|
23
|
+
* Option used in profile creation and commands for hostname
|
|
24
|
+
*/
|
|
25
|
+
ProfileConstants.BASE_OPTION_HOST = {
|
|
26
|
+
name: "host",
|
|
27
|
+
aliases: ["H"],
|
|
28
|
+
description: "Host name of service on the mainframe.",
|
|
29
|
+
type: "string",
|
|
30
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Option used in profile creation and commands for port
|
|
34
|
+
*/
|
|
35
|
+
ProfileConstants.BASE_OPTION_PORT = {
|
|
36
|
+
name: "port",
|
|
37
|
+
aliases: ["P"],
|
|
38
|
+
description: "Port number of service on the mainframe.",
|
|
39
|
+
type: "number",
|
|
40
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Option used in profile creation and commands for username / ID
|
|
44
|
+
*/
|
|
45
|
+
ProfileConstants.BASE_OPTION_USER = {
|
|
46
|
+
name: "user",
|
|
47
|
+
aliases: ["u"],
|
|
48
|
+
description: "User name to authenticate to service on the mainframe.",
|
|
49
|
+
type: "string",
|
|
50
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Option used in profile creation and commands for password/passphrase
|
|
54
|
+
*/
|
|
55
|
+
ProfileConstants.BASE_OPTION_PASSWORD = {
|
|
56
|
+
name: "password",
|
|
57
|
+
aliases: ["pass", "pw"],
|
|
58
|
+
description: "Password to authenticate to service on the mainframe.",
|
|
59
|
+
type: "string",
|
|
60
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Option used in profile creation and commands for rejectUnauthorized setting for connecting to z/OSMF
|
|
64
|
+
*/
|
|
65
|
+
ProfileConstants.BASE_OPTION_REJECT_UNAUTHORIZED = {
|
|
66
|
+
name: "reject-unauthorized",
|
|
67
|
+
aliases: ["ru"],
|
|
68
|
+
description: "Reject self-signed certificates.",
|
|
69
|
+
type: "boolean",
|
|
70
|
+
defaultValue: true,
|
|
71
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Option used in profile creation and commands for tokenType
|
|
75
|
+
*/
|
|
76
|
+
ProfileConstants.BASE_OPTION_TOKEN_TYPE = {
|
|
77
|
+
name: "token-type",
|
|
78
|
+
aliases: ["tt"],
|
|
79
|
+
description: "The type of token to get and use for the API. Omit this option to use the default token type, which is provided by " +
|
|
80
|
+
"'zowe auth login'.",
|
|
81
|
+
type: "string",
|
|
82
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Option used in profile creation and commands for tokenValue to be used to interact with APIs
|
|
86
|
+
*/
|
|
87
|
+
ProfileConstants.BASE_OPTION_TOKEN_VALUE = {
|
|
88
|
+
name: "token-value",
|
|
89
|
+
aliases: ["tv"],
|
|
90
|
+
description: "The value of the token to pass to the API.",
|
|
91
|
+
type: "string",
|
|
92
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Option used to specify the path to the certificate file for authentication
|
|
96
|
+
*/
|
|
97
|
+
ProfileConstants.BASE_OPTION_CERT_FILE = {
|
|
98
|
+
name: "cert-file",
|
|
99
|
+
description: "The file path to a certificate file to use for authentication",
|
|
100
|
+
type: "existingLocalFile",
|
|
101
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Option used to specify the path to the certificate file for authentication
|
|
105
|
+
*/
|
|
106
|
+
ProfileConstants.BASE_OPTION_CERT_KEY_FILE = {
|
|
107
|
+
name: "cert-key-file",
|
|
108
|
+
description: "The file path to a certificate key file to use for authentication",
|
|
109
|
+
type: "existingLocalFile",
|
|
110
|
+
group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Option used to specify the path to the certificate file for authentication
|
|
114
|
+
*/
|
|
115
|
+
// public static readonly BASE_OPTION_CERT_FILE_PASSPHRASE: ICommandOptionDefinition = {
|
|
116
|
+
// name: "cert-file-passphrase",
|
|
117
|
+
// description: "The passphrase to decrypt a certificate file to use for authentication",
|
|
118
|
+
// type: "string",
|
|
119
|
+
// group: ProfileConstants.BASE_CONNECTION_OPTION_GROUP
|
|
120
|
+
// };
|
|
121
|
+
ProfileConstants.AUTO_INIT_OPTION_GROUP = "APIML Connection Options";
|
|
122
|
+
/**
|
|
123
|
+
* Option used in profile creation and commands for hostname
|
|
124
|
+
*/
|
|
125
|
+
ProfileConstants.AUTO_INIT_OPTION_HOST = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_HOST), { description: "Host name of the mainframe running the API Mediation Layer.", group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
126
|
+
/**
|
|
127
|
+
* Option used in profile creation and commands for port
|
|
128
|
+
*/
|
|
129
|
+
ProfileConstants.AUTO_INIT_OPTION_PORT = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_PORT), { description: "Port number of API Mediation Layer on the mainframe.", group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
130
|
+
/**
|
|
131
|
+
* Option used in profile creation and commands for username / ID
|
|
132
|
+
*/
|
|
133
|
+
ProfileConstants.AUTO_INIT_OPTION_USER = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_USER), { description: "User name to authenticate to the API Mediation Layer on the mainframe.", group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
134
|
+
/**
|
|
135
|
+
* Option used in profile creation and commands for password/passphrase
|
|
136
|
+
*/
|
|
137
|
+
ProfileConstants.AUTO_INIT_OPTION_PASSWORD = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_PASSWORD), { description: "Password to authenticate to the API Mediation Layer on the mainframe.", group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
138
|
+
/**
|
|
139
|
+
* Option used in profile creation and commands for rejectUnauthorized setting for connecting to z/OSMF
|
|
140
|
+
*/
|
|
141
|
+
ProfileConstants.AUTO_INIT_OPTION_REJECT_UNAUTHORIZED = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_REJECT_UNAUTHORIZED), { group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
142
|
+
/**
|
|
143
|
+
* Option used in profile creation and commands for tokenType
|
|
144
|
+
*/
|
|
145
|
+
ProfileConstants.AUTO_INIT_OPTION_TOKEN_TYPE = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_TOKEN_TYPE), { description: "The type of token to get and use for the API Mediation Layer. " +
|
|
146
|
+
"Omit this option to use the default token type, which is provided by 'zowe auth login'.", group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
147
|
+
/**
|
|
148
|
+
* Option used in profile creation and commands for tokenValue to be used to interact with APIs
|
|
149
|
+
*/
|
|
150
|
+
ProfileConstants.AUTO_INIT_OPTION_TOKEN_VALUE = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_TOKEN_VALUE), { description: "The value of the token to pass to the API Mediation Layer.", group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
151
|
+
/**
|
|
152
|
+
* Option used in profile creation and commands for certificate file to be used to interact with login APIs
|
|
153
|
+
*/
|
|
154
|
+
ProfileConstants.AUTO_INIT_OPTION_CERT_FILE = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_CERT_FILE), { description: "The file path to a certificate file to use to authenticate to the API Mediation Layer", group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
155
|
+
/**
|
|
156
|
+
* Option used in profile creation and commands for certificate key file to be used to interact with login APIs
|
|
157
|
+
*/
|
|
158
|
+
ProfileConstants.AUTO_INIT_OPTION_CERT_KEY_FILE = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_CERT_KEY_FILE), { description: "The file path to a certificate key file to use to authenticate to the API Mediation Layer", group: ProfileConstants.AUTO_INIT_OPTION_GROUP });
|
|
159
|
+
/**
|
|
160
|
+
* Summary of auth command group
|
|
161
|
+
* @static
|
|
162
|
+
* @memberof AuthConstants
|
|
163
|
+
*/
|
|
164
|
+
ProfileConstants.AUTH_GROUP_SUMMARY = "Connect to Zowe API ML authentication service";
|
|
165
|
+
/**
|
|
166
|
+
* Description of auth command group
|
|
167
|
+
* @static
|
|
168
|
+
* @memberof AuthConstants
|
|
169
|
+
*/
|
|
170
|
+
ProfileConstants.AUTH_GROUP_DESCRIPTION = "Connect to Zowe API Mediation Layer authentication service and obtain a token, or disconnect " +
|
|
171
|
+
"from the authentication service and revoke the token.\n" +
|
|
172
|
+
"\n" +
|
|
173
|
+
"The token provides authentication to services that support the API ML SSO (Single Sign-On) capability. When you log in, the token is " +
|
|
174
|
+
"stored in your default base profile until it expires. Base profiles store connection information shared by multiple services (e.g., " +
|
|
175
|
+
"z/OSMF), and are used if you do not supply connection information in a service profile. To take advantage of the API ML SSO capability, " +
|
|
176
|
+
"you should omit username and password in service profiles so that the token in the base profile is used.";
|
|
177
|
+
/**
|
|
178
|
+
* Summary of APIML login command
|
|
179
|
+
* @static
|
|
180
|
+
* @memberof AuthConstants
|
|
181
|
+
*/
|
|
182
|
+
ProfileConstants.APIML_LOGIN_SUMMARY = "Log in to API ML authentication service";
|
|
183
|
+
/**
|
|
184
|
+
* Description of APIML login command
|
|
185
|
+
* @static
|
|
186
|
+
* @memberof AuthConstants
|
|
187
|
+
*/
|
|
188
|
+
ProfileConstants.APIML_LOGIN_DESCRIPTION = "Log in to Zowe API Mediation Layer authentication service and obtain or update a token.\n" +
|
|
189
|
+
"\n" +
|
|
190
|
+
"The token provides authentication to services that support the API ML SSO (Single Sign-On) capability. When you log in, the token is " +
|
|
191
|
+
"stored in your default base profile until it expires. Base profiles store connection information shared by multiple services (e.g., " +
|
|
192
|
+
"z/OSMF), and are used if you do not supply connection information in a service profile. To take advantage of the API ML SSO capability, " +
|
|
193
|
+
"you should omit username and password in service profiles so that the token in the base profile is used.";
|
|
194
|
+
/**
|
|
195
|
+
* Example definition for APIML login command
|
|
196
|
+
* @static
|
|
197
|
+
* @memberof AuthConstants
|
|
198
|
+
*/
|
|
199
|
+
ProfileConstants.APIML_LOGIN_EXAMPLE1 = {
|
|
200
|
+
description: "Log in to an API ML instance to obtain or update the token stored in your base profile",
|
|
201
|
+
options: ""
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Example definition for APIML login command with show-token
|
|
205
|
+
* @static
|
|
206
|
+
* @memberof AuthConstants
|
|
207
|
+
*/
|
|
208
|
+
ProfileConstants.APIML_LOGIN_EXAMPLE2 = {
|
|
209
|
+
description: "Log in to an API ML instance to obtain a token without storing it in a profile",
|
|
210
|
+
options: "--show-token"
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Summary of APIML logout command
|
|
214
|
+
* @static
|
|
215
|
+
* @memberof AuthConstants
|
|
216
|
+
*/
|
|
217
|
+
ProfileConstants.APIML_LOGOUT_SUMMARY = "Log out of API ML authentication service";
|
|
218
|
+
/**
|
|
219
|
+
* Description of APIML logout command
|
|
220
|
+
* @static
|
|
221
|
+
* @memberof AuthConstants
|
|
222
|
+
*/
|
|
223
|
+
ProfileConstants.APIML_LOGOUT_DESCRIPTION = "Log out of the Zowe API Mediation Layer authentication service and revoke the token so it " +
|
|
224
|
+
"can no longer authenticate. Also remove the token from the default base profile, if it is stored on disk.";
|
|
225
|
+
/**
|
|
226
|
+
* Example definition for APIML logout command
|
|
227
|
+
* @static
|
|
228
|
+
* @memberof AuthConstants
|
|
229
|
+
*/
|
|
230
|
+
ProfileConstants.APIML_LOGOUT_EXAMPLE1 = {
|
|
231
|
+
description: "Log out of an API ML instance to revoke the token that was in use and remove it from your base profile",
|
|
232
|
+
options: ""
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Example definition for APIML logout command with token-value
|
|
236
|
+
* @static
|
|
237
|
+
* @memberof AuthConstants
|
|
238
|
+
*/
|
|
239
|
+
ProfileConstants.APIML_LOGOUT_EXAMPLE2 = {
|
|
240
|
+
description: "Log out of an API ML instance to revoke a token that was not stored in a profile",
|
|
241
|
+
options: "--token-value <token>"
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Option used in APIML logout command for token-type
|
|
245
|
+
*/
|
|
246
|
+
ProfileConstants.APIML_LOGOUT_OPTION_TOKEN_TYPE = Object.assign(Object.assign({}, ProfileConstants.BASE_OPTION_TOKEN_TYPE), { allowableValues: { values: imperative_1.SessConstants.ALL_TOKEN_TYPES } });
|
|
247
|
+
/**
|
|
248
|
+
* Profile configuration for SSH profiles
|
|
249
|
+
* @type {ICommandProfileTypeConfiguration}
|
|
250
|
+
* @memberof BaseProfile
|
|
251
|
+
*/
|
|
252
|
+
ProfileConstants.BaseProfile = {
|
|
253
|
+
type: "base",
|
|
254
|
+
schema: {
|
|
255
|
+
type: "object",
|
|
256
|
+
title: "Base Profile",
|
|
257
|
+
description: "Base profile that stores values shared by multiple service profiles",
|
|
258
|
+
properties: {
|
|
259
|
+
host: {
|
|
260
|
+
type: "string",
|
|
261
|
+
optionDefinition: ProfileConstants.BASE_OPTION_HOST,
|
|
262
|
+
includeInTemplate: true
|
|
263
|
+
},
|
|
264
|
+
port: {
|
|
265
|
+
type: "number",
|
|
266
|
+
optionDefinition: ProfileConstants.BASE_OPTION_PORT
|
|
267
|
+
},
|
|
268
|
+
user: {
|
|
269
|
+
type: "string",
|
|
270
|
+
secure: true,
|
|
271
|
+
optionDefinition: ProfileConstants.BASE_OPTION_USER,
|
|
272
|
+
includeInTemplate: true
|
|
273
|
+
},
|
|
274
|
+
password: {
|
|
275
|
+
type: "string",
|
|
276
|
+
secure: true,
|
|
277
|
+
optionDefinition: ProfileConstants.BASE_OPTION_PASSWORD,
|
|
278
|
+
includeInTemplate: true
|
|
279
|
+
},
|
|
280
|
+
rejectUnauthorized: {
|
|
281
|
+
type: "boolean",
|
|
282
|
+
optionDefinition: ProfileConstants.BASE_OPTION_REJECT_UNAUTHORIZED,
|
|
283
|
+
includeInTemplate: true
|
|
284
|
+
},
|
|
285
|
+
tokenType: {
|
|
286
|
+
type: "string",
|
|
287
|
+
optionDefinition: ProfileConstants.BASE_OPTION_TOKEN_TYPE
|
|
288
|
+
},
|
|
289
|
+
tokenValue: {
|
|
290
|
+
type: "string",
|
|
291
|
+
secure: true,
|
|
292
|
+
optionDefinition: ProfileConstants.BASE_OPTION_TOKEN_VALUE
|
|
293
|
+
},
|
|
294
|
+
certFile: {
|
|
295
|
+
type: "string",
|
|
296
|
+
optionDefinition: ProfileConstants.BASE_OPTION_CERT_FILE
|
|
297
|
+
},
|
|
298
|
+
certKeyFile: {
|
|
299
|
+
type: "string",
|
|
300
|
+
optionDefinition: ProfileConstants.BASE_OPTION_CERT_KEY_FILE
|
|
301
|
+
// },
|
|
302
|
+
// certFilePassphrase: {
|
|
303
|
+
// type: "string",
|
|
304
|
+
// secure: true,
|
|
305
|
+
// optionDefinition: BASE_OPTION_CERT_FILE_PASSPHRASE
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
required: []
|
|
309
|
+
},
|
|
310
|
+
createProfileExamples: [
|
|
311
|
+
{
|
|
312
|
+
options: "base1 --host example.com --port 443 --user admin --password 123456",
|
|
313
|
+
description: "Create a profile called 'base1' to connect to host example.com and port 443"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
options: "base2 --host example.com --user admin --password 123456 --reject-unauthorized false",
|
|
317
|
+
description: "Create a profile called 'base2' to connect to host example.com (default port - 443) " +
|
|
318
|
+
"and allow self-signed certificates"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
options: "base3 --host example.com --port 1443",
|
|
322
|
+
description: "Create a profile called 'base3' to connect to host example.com and port 1443, " +
|
|
323
|
+
" not specifying a username or password so they are not stored on disk; these will need to be specified on every command"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
options: "base4 --reject-unauthorized false",
|
|
327
|
+
description: "Create a zosmf profile called 'base4' to connect to default port 443 and allow self-signed certificates, " +
|
|
328
|
+
"not specifying a username, password, or host so they are not stored on disk; these will need to be specified on every command"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
updateProfileExamples: [
|
|
332
|
+
{
|
|
333
|
+
options: "base1 --user newuser --password newp4ss",
|
|
334
|
+
description: "Update a base profile named 'base1' with a new username and password"
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
};
|
|
338
|
+
//# sourceMappingURL=Core.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Core.constants.js","sourceRoot":"","sources":["../../src/constants/Core.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;AAEF,iDAAwI;AAGxI;;GAEG;AACH,MAAa,gBAAgB;;AAA7B,4CAsYC;AArY0B,6CAA4B,GAAG,yBAAyB,CAAC;AAEhF;;GAEG;AACoB,iCAAgB,GAA6B;IAChE,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,CAAC,GAAG,CAAC;IACd,WAAW,EAAE,wCAAwC;IACrD,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,gBAAgB,CAAC,4BAA4B;CACvD,CAAC;AAEF;;GAEG;AACoB,iCAAgB,GAA6B;IAChE,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,CAAC,GAAG,CAAC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IAAI,EAAE,QAAQ;gBACd,gBAAgB,EAAE,gBAAgB,CAAC,yBAAyB;gBAC5D,KAAK;gBACL,wBAAwB;gBACxB,sBAAsB;gBACtB,oBAAoB;gBACpB,yDAAyD;aAC5D;SACJ;QACD,QAAQ,EAAE,EAAE;KACf;IACD,qBAAqB,EAAE;QACnB;YACI,OAAO,EAAE,oEAAoE;YAC7E,WAAW,EAAE,6EAA6E;SAC7F;QACD;YACI,OAAO,EAAE,qFAAqF;YAC9F,WAAW,EAAE,sFAAsF;gBACvG,oCAAoC;SACnC;QACD;YACI,OAAO,EAAE,sCAAsC;YAC/C,WAAW,EAAE,gFAAgF;gBACjG,yHAAyH;SACxH;QACD;YACI,OAAO,EAAE,mCAAmC;YAC5C,WAAW,EAAE,2GAA2G;gBAC5H,+HAA+H;SAC9H;KACJ;IACD,qBAAqB,EAAE;QACnB;YACI,OAAO,EAAE,yCAAyC;YAClD,WAAW,EAAE,sEAAsE;SACtF;KACJ;CACJ,CAAC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
__exportStar(require("./constants/Core.constants"), exports);
|
|
23
24
|
__exportStar(require("./apiml"), exports);
|
|
24
25
|
__exportStar(require("./auth"), exports);
|
|
25
26
|
__exportStar(require("./rest"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;;;;;;;;;;AAEF,0CAAwB;AACxB,yCAAuB;AACvB,yCAAuB;AACvB,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;EASE;;;;;;;;;;;;AAEF,6DAA2C;AAE3C,0CAAwB;AACxB,yCAAuB;AACvB,yCAAuB;AACvB,0CAAwB"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zowe/core-for-zowe-sdk",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"description": "Core libraries shared by Zowe SDK packages",
|
|
5
|
-
"author": "
|
|
5
|
+
"author": "Zowe",
|
|
6
6
|
"license": "EPL-2.0",
|
|
7
7
|
"homepage": "https://github.com/zowe/zowe-cli/tree/master/packages/core#readme",
|
|
8
8
|
"bugs": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^12.12.24",
|
|
52
|
-
"@zowe/cli-test-utils": "7.
|
|
53
|
-
"@zowe/imperative": "5.0
|
|
52
|
+
"@zowe/cli-test-utils": "7.1.2",
|
|
53
|
+
"@zowe/imperative": "5.2.0",
|
|
54
54
|
"chalk": "^4.1.0",
|
|
55
55
|
"eslint": "^7.32.0",
|
|
56
56
|
"madge": "^4.0.1",
|