@zowe/cli 7.0.1 → 7.1.1

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.
@@ -1,4 +1,3 @@
1
- import { ICommandOptionDefinition, ICommandExampleDefinition } from "@zowe/imperative";
2
1
  /**
3
2
  * Class to contain constants
4
3
  * @export
@@ -61,137 +60,131 @@ export declare class Constants {
61
60
  * @memberof Constants
62
61
  */
63
62
  static readonly HOME_DIR = "~/.zowe";
64
- static BASE_CONNECTION_OPTION_GROUP: string;
65
63
  /**
66
- * Option used in profile creation and commands for hostname
64
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
67
65
  */
68
- static BASE_OPTION_HOST: ICommandOptionDefinition;
66
+ static readonly BASE_CONNECTION_OPTION_GROUP = "Base Connection Options";
69
67
  /**
70
- * Option used in profile creation and commands for port
68
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
71
69
  */
72
- static BASE_OPTION_PORT: ICommandOptionDefinition;
70
+ static readonly BASE_OPTION_HOST: import("@zowe/imperative").ICommandOptionDefinition;
73
71
  /**
74
- * Option used in profile creation and commands for username / ID
72
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
75
73
  */
76
- static BASE_OPTION_USER: ICommandOptionDefinition;
74
+ static readonly BASE_OPTION_PORT: import("@zowe/imperative").ICommandOptionDefinition;
77
75
  /**
78
- * Option used in profile creation and commands for password/passphrase
76
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
79
77
  */
80
- static BASE_OPTION_PASSWORD: ICommandOptionDefinition;
78
+ static readonly BASE_OPTION_USER: import("@zowe/imperative").ICommandOptionDefinition;
81
79
  /**
82
- * Option used in profile creation and commands for rejectUnauthorized setting for connecting to z/OSMF
80
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
83
81
  */
84
- static BASE_OPTION_REJECT_UNAUTHORIZED: ICommandOptionDefinition;
82
+ static readonly BASE_OPTION_PASSWORD: import("@zowe/imperative").ICommandOptionDefinition;
85
83
  /**
86
- * Option used in profile creation and commands for tokenType
84
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
87
85
  */
88
- static BASE_OPTION_TOKEN_TYPE: ICommandOptionDefinition;
86
+ static readonly BASE_OPTION_REJECT_UNAUTHORIZED: import("@zowe/imperative").ICommandOptionDefinition;
89
87
  /**
90
- * Option used in profile creation and commands for tokenValue to be used to interact with APIs
88
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
91
89
  */
92
- static BASE_OPTION_TOKEN_VALUE: ICommandOptionDefinition;
93
- static readonly AUTO_INIT_OPTION_GROUP = "APIML Connection Options";
90
+ static readonly BASE_OPTION_TOKEN_TYPE: import("@zowe/imperative").ICommandOptionDefinition;
94
91
  /**
95
- * Option used in profile creation and commands for hostname
92
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
96
93
  */
97
- static AUTO_INIT_OPTION_HOST: ICommandOptionDefinition;
94
+ static readonly BASE_OPTION_TOKEN_VALUE: import("@zowe/imperative").ICommandOptionDefinition;
98
95
  /**
99
- * Option used in profile creation and commands for port
96
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
100
97
  */
101
- static AUTO_INIT_OPTION_PORT: ICommandOptionDefinition;
98
+ static readonly BASE_OPTION_CERT_FILE: import("@zowe/imperative").ICommandOptionDefinition;
102
99
  /**
103
- * Option used in profile creation and commands for username / ID
100
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
104
101
  */
105
- static AUTO_INIT_OPTION_USER: ICommandOptionDefinition;
102
+ static readonly BASE_OPTION_CERT_KEY_FILE: import("@zowe/imperative").ICommandOptionDefinition;
106
103
  /**
107
- * Option used in profile creation and commands for password/passphrase
104
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
108
105
  */
109
- static AUTO_INIT_OPTION_PASSWORD: ICommandOptionDefinition;
110
106
  /**
111
- * Option used in profile creation and commands for rejectUnauthorized setting for connecting to z/OSMF
107
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
112
108
  */
113
- static AUTO_INIT_OPTION_REJECT_UNAUTHORIZED: ICommandOptionDefinition;
109
+ static readonly AUTO_INIT_OPTION_GROUP = "APIML Connection Options";
114
110
  /**
115
- * Option used in profile creation and commands for tokenType
111
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
116
112
  */
117
- static AUTO_INIT_OPTION_TOKEN_TYPE: ICommandOptionDefinition;
113
+ static readonly AUTO_INIT_OPTION_HOST: import("@zowe/imperative").ICommandOptionDefinition;
118
114
  /**
119
- * Option used in profile creation and commands for tokenValue to be used to interact with APIs
115
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
120
116
  */
121
- static AUTO_INIT_OPTION_TOKEN_VALUE: ICommandOptionDefinition;
117
+ static readonly AUTO_INIT_OPTION_PORT: import("@zowe/imperative").ICommandOptionDefinition;
122
118
  /**
123
- * Option used to specify the path to the certificate file for authentication
119
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
124
120
  */
125
- static BASE_OPTION_CERT_FILE: ICommandOptionDefinition;
121
+ static readonly AUTO_INIT_OPTION_USER: import("@zowe/imperative").ICommandOptionDefinition;
126
122
  /**
127
- * Option used to specify the path to the certificate file for authentication
123
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
128
124
  */
129
- static BASE_OPTION_CERT_KEY_FILE: ICommandOptionDefinition;
125
+ static readonly AUTO_INIT_OPTION_PASSWORD: import("@zowe/imperative").ICommandOptionDefinition;
130
126
  /**
131
- * Option used to specify the path to the certificate file for authentication
127
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
132
128
  */
129
+ static readonly AUTO_INIT_OPTION_REJECT_UNAUTHORIZED: import("@zowe/imperative").ICommandOptionDefinition;
133
130
  /**
134
- * Summary of auth command group
135
- * @static
136
- * @memberof AuthConstants
131
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
132
+ */
133
+ static readonly AUTO_INIT_OPTION_TOKEN_TYPE: import("@zowe/imperative").ICommandOptionDefinition;
134
+ /**
135
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
136
+ */
137
+ static readonly AUTO_INIT_OPTION_TOKEN_VALUE: import("@zowe/imperative").ICommandOptionDefinition;
138
+ /**
139
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
140
+ */
141
+ static readonly AUTO_INIT_OPTION_CERT_FILE: import("@zowe/imperative").ICommandOptionDefinition;
142
+ /**
143
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
144
+ */
145
+ static readonly AUTO_INIT_OPTION_CERT_KEY_FILE: import("@zowe/imperative").ICommandOptionDefinition;
146
+ /**
147
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
137
148
  */
138
149
  static readonly AUTH_GROUP_SUMMARY = "Connect to Zowe API ML authentication service";
139
150
  /**
140
- * Description of auth command group
141
- * @static
142
- * @memberof AuthConstants
151
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
143
152
  */
144
153
  static readonly AUTH_GROUP_DESCRIPTION: string;
145
154
  /**
146
- * Summary of APIML login command
147
- * @static
148
- * @memberof AuthConstants
155
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
149
156
  */
150
157
  static readonly APIML_LOGIN_SUMMARY = "Log in to API ML authentication service";
151
158
  /**
152
- * Description of APIML login command
153
- * @static
154
- * @memberof AuthConstants
159
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
155
160
  */
156
161
  static readonly APIML_LOGIN_DESCRIPTION: string;
157
162
  /**
158
- * Example definition for APIML login command
159
- * @static
160
- * @memberof AuthConstants
163
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
161
164
  */
162
- static readonly APIML_LOGIN_EXAMPLE1: ICommandExampleDefinition;
165
+ static readonly APIML_LOGIN_EXAMPLE1: import("@zowe/imperative").ICommandExampleDefinition;
163
166
  /**
164
- * Example definition for APIML login command with show-token
165
- * @static
166
- * @memberof AuthConstants
167
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
167
168
  */
168
- static readonly APIML_LOGIN_EXAMPLE2: ICommandExampleDefinition;
169
+ static readonly APIML_LOGIN_EXAMPLE2: import("@zowe/imperative").ICommandExampleDefinition;
169
170
  /**
170
- * Summary of APIML logout command
171
- * @static
172
- * @memberof AuthConstants
171
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
173
172
  */
174
173
  static readonly APIML_LOGOUT_SUMMARY = "Log out of API ML authentication service";
175
174
  /**
176
- * Description of APIML logout command
177
- * @static
178
- * @memberof AuthConstants
175
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
179
176
  */
180
177
  static readonly APIML_LOGOUT_DESCRIPTION: string;
181
178
  /**
182
- * Example definition for APIML logout command
183
- * @static
184
- * @memberof AuthConstants
179
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
185
180
  */
186
- static readonly APIML_LOGOUT_EXAMPLE1: ICommandExampleDefinition;
181
+ static readonly APIML_LOGOUT_EXAMPLE1: import("@zowe/imperative").ICommandExampleDefinition;
187
182
  /**
188
- * Example definition for APIML logout command with token-value
189
- * @static
190
- * @memberof AuthConstants
183
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
191
184
  */
192
- static readonly APIML_LOGOUT_EXAMPLE2: ICommandExampleDefinition;
185
+ static readonly APIML_LOGOUT_EXAMPLE2: import("@zowe/imperative").ICommandExampleDefinition;
193
186
  /**
194
- * Option used in APIML logout command for token-type
187
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
195
188
  */
196
- static APIML_LOGOUT_OPTION_TOKEN_TYPE: ICommandOptionDefinition;
189
+ static readonly APIML_LOGOUT_OPTION_TOKEN_TYPE: import("@zowe/imperative").ICommandOptionDefinition;
197
190
  }
package/lib/Constants.js CHANGED
@@ -11,7 +11,7 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Constants = void 0;
14
- const imperative_1 = require("@zowe/imperative");
14
+ const core_for_zowe_sdk_1 = require("@zowe/core-for-zowe-sdk");
15
15
  /**
16
16
  * Class to contain constants
17
17
  * @export
@@ -83,222 +83,135 @@ Constants.ENV_PREFIX = "ZOWE";
83
83
  * @memberof Constants
84
84
  */
85
85
  Constants.HOME_DIR = "~/.zowe";
86
- Constants.BASE_CONNECTION_OPTION_GROUP = "Base Connection Options";
86
+ //______________________________________________________________________
87
87
  /**
88
- * Option used in profile creation and commands for hostname
88
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
89
89
  */
90
- Constants.BASE_OPTION_HOST = {
91
- name: "host",
92
- aliases: ["H"],
93
- description: "Host name of service on the mainframe.",
94
- type: "string",
95
- group: Constants.BASE_CONNECTION_OPTION_GROUP
96
- };
90
+ Constants.BASE_CONNECTION_OPTION_GROUP = core_for_zowe_sdk_1.ProfileConstants.BASE_CONNECTION_OPTION_GROUP;
97
91
  /**
98
- * Option used in profile creation and commands for port
92
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
99
93
  */
100
- Constants.BASE_OPTION_PORT = {
101
- name: "port",
102
- aliases: ["P"],
103
- description: "Port number of service on the mainframe.",
104
- type: "number",
105
- group: Constants.BASE_CONNECTION_OPTION_GROUP
106
- };
94
+ Constants.BASE_OPTION_HOST = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_HOST;
107
95
  /**
108
- * Option used in profile creation and commands for username / ID
96
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
109
97
  */
110
- Constants.BASE_OPTION_USER = {
111
- name: "user",
112
- aliases: ["u"],
113
- description: "User name to authenticate to service on the mainframe.",
114
- type: "string",
115
- group: Constants.BASE_CONNECTION_OPTION_GROUP
116
- };
98
+ Constants.BASE_OPTION_PORT = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_PORT;
117
99
  /**
118
- * Option used in profile creation and commands for password/passphrase
100
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
119
101
  */
120
- Constants.BASE_OPTION_PASSWORD = {
121
- name: "password",
122
- aliases: ["pass", "pw"],
123
- description: "Password to authenticate to service on the mainframe.",
124
- type: "string",
125
- group: Constants.BASE_CONNECTION_OPTION_GROUP
126
- };
102
+ Constants.BASE_OPTION_USER = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_USER;
127
103
  /**
128
- * Option used in profile creation and commands for rejectUnauthorized setting for connecting to z/OSMF
104
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
129
105
  */
130
- Constants.BASE_OPTION_REJECT_UNAUTHORIZED = {
131
- name: "reject-unauthorized",
132
- aliases: ["ru"],
133
- description: "Reject self-signed certificates.",
134
- type: "boolean",
135
- defaultValue: true,
136
- group: Constants.BASE_CONNECTION_OPTION_GROUP
137
- };
106
+ Constants.BASE_OPTION_PASSWORD = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_PASSWORD;
138
107
  /**
139
- * Option used in profile creation and commands for tokenType
108
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
140
109
  */
141
- Constants.BASE_OPTION_TOKEN_TYPE = {
142
- name: "token-type",
143
- aliases: ["tt"],
144
- 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 " +
145
- "'zowe auth login'.",
146
- type: "string",
147
- group: Constants.BASE_CONNECTION_OPTION_GROUP
148
- };
110
+ Constants.BASE_OPTION_REJECT_UNAUTHORIZED = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_REJECT_UNAUTHORIZED;
149
111
  /**
150
- * Option used in profile creation and commands for tokenValue to be used to interact with APIs
112
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
151
113
  */
152
- Constants.BASE_OPTION_TOKEN_VALUE = {
153
- name: "token-value",
154
- aliases: ["tv"],
155
- description: "The value of the token to pass to the API.",
156
- type: "string",
157
- group: Constants.BASE_CONNECTION_OPTION_GROUP
158
- };
159
- Constants.AUTO_INIT_OPTION_GROUP = "APIML Connection Options";
114
+ Constants.BASE_OPTION_TOKEN_TYPE = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_TOKEN_TYPE;
160
115
  /**
161
- * Option used in profile creation and commands for hostname
116
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
162
117
  */
163
- Constants.AUTO_INIT_OPTION_HOST = Object.assign(Object.assign({}, Constants.BASE_OPTION_HOST), { description: "Host name of the mainframe running the API Mediation Layer.", group: Constants.AUTO_INIT_OPTION_GROUP });
118
+ Constants.BASE_OPTION_TOKEN_VALUE = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_TOKEN_VALUE;
164
119
  /**
165
- * Option used in profile creation and commands for port
120
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
166
121
  */
167
- Constants.AUTO_INIT_OPTION_PORT = Object.assign(Object.assign({}, Constants.BASE_OPTION_PORT), { description: "Port number of API Mediation Layer on the mainframe.", group: Constants.AUTO_INIT_OPTION_GROUP });
122
+ Constants.BASE_OPTION_CERT_FILE = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_CERT_FILE;
168
123
  /**
169
- * Option used in profile creation and commands for username / ID
124
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
170
125
  */
171
- Constants.AUTO_INIT_OPTION_USER = Object.assign(Object.assign({}, Constants.BASE_OPTION_USER), { description: "User name to authenticate to the API Mediation Layer on the mainframe.", group: Constants.AUTO_INIT_OPTION_GROUP });
126
+ Constants.BASE_OPTION_CERT_KEY_FILE = core_for_zowe_sdk_1.ProfileConstants.BASE_OPTION_CERT_KEY_FILE;
172
127
  /**
173
- * Option used in profile creation and commands for password/passphrase
128
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
174
129
  */
175
- Constants.AUTO_INIT_OPTION_PASSWORD = Object.assign(Object.assign({}, Constants.BASE_OPTION_PASSWORD), { description: "Password to authenticate to the API Mediation Layer on the mainframe.", group: Constants.AUTO_INIT_OPTION_GROUP });
130
+ // public static readonly BASE_OPTION_CERT_FILE_PASSPHRASE = ProfileConstants.BASE_OPTION_CERT_FILE_PASSPHRASE
131
+ //______________________________________________________________________
176
132
  /**
177
- * Option used in profile creation and commands for rejectUnauthorized setting for connecting to z/OSMF
133
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
178
134
  */
179
- Constants.AUTO_INIT_OPTION_REJECT_UNAUTHORIZED = Object.assign(Object.assign({}, Constants.BASE_OPTION_REJECT_UNAUTHORIZED), { group: Constants.AUTO_INIT_OPTION_GROUP });
135
+ Constants.AUTO_INIT_OPTION_GROUP = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_GROUP;
180
136
  /**
181
- * Option used in profile creation and commands for tokenType
137
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
182
138
  */
183
- Constants.AUTO_INIT_OPTION_TOKEN_TYPE = Object.assign(Object.assign({}, Constants.BASE_OPTION_TOKEN_TYPE), { description: "The type of token to get and use for the API Mediation Layer. " +
184
- "Omit this option to use the default token type, which is provided by 'zowe auth login'.", group: Constants.AUTO_INIT_OPTION_GROUP });
139
+ Constants.AUTO_INIT_OPTION_HOST = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_HOST;
185
140
  /**
186
- * Option used in profile creation and commands for tokenValue to be used to interact with APIs
141
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
187
142
  */
188
- Constants.AUTO_INIT_OPTION_TOKEN_VALUE = Object.assign(Object.assign({}, Constants.BASE_OPTION_TOKEN_VALUE), { description: "The value of the token to pass to the API Mediation Layer.", group: Constants.AUTO_INIT_OPTION_GROUP });
143
+ Constants.AUTO_INIT_OPTION_PORT = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_PORT;
189
144
  /**
190
- * Option used to specify the path to the certificate file for authentication
145
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
191
146
  */
192
- Constants.BASE_OPTION_CERT_FILE = {
193
- name: "cert-file",
194
- description: "The file path to a certificate file to use for authentication",
195
- type: "existingLocalFile",
196
- group: Constants.BASE_CONNECTION_OPTION_GROUP
197
- };
147
+ Constants.AUTO_INIT_OPTION_USER = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_USER;
198
148
  /**
199
- * Option used to specify the path to the certificate file for authentication
149
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
200
150
  */
201
- Constants.BASE_OPTION_CERT_KEY_FILE = {
202
- name: "cert-key-file",
203
- description: "The file path to a certificate key file to use for authentication",
204
- type: "existingLocalFile",
205
- group: Constants.BASE_CONNECTION_OPTION_GROUP
206
- };
151
+ Constants.AUTO_INIT_OPTION_PASSWORD = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_PASSWORD;
207
152
  /**
208
- * Option used to specify the path to the certificate file for authentication
153
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
209
154
  */
210
- // public static BASE_OPTION_CERT_FILE_PASSPHRASE: ICommandOptionDefinition = {
211
- // name: "cert-file-passphrase",
212
- // description: "The passphrase to decrypt a certificate file to use for authentication",
213
- // type: "string",
214
- // group: Constants.BASE_CONNECTION_OPTION_GROUP
215
- // };
155
+ Constants.AUTO_INIT_OPTION_REJECT_UNAUTHORIZED = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_REJECT_UNAUTHORIZED;
216
156
  /**
217
- * Summary of auth command group
218
- * @static
219
- * @memberof AuthConstants
157
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
220
158
  */
221
- Constants.AUTH_GROUP_SUMMARY = "Connect to Zowe API ML authentication service";
159
+ Constants.AUTO_INIT_OPTION_TOKEN_TYPE = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_TOKEN_TYPE;
222
160
  /**
223
- * Description of auth command group
224
- * @static
225
- * @memberof AuthConstants
161
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
226
162
  */
227
- Constants.AUTH_GROUP_DESCRIPTION = "Connect to Zowe API Mediation Layer authentication service and obtain a token, or disconnect " +
228
- "from the authentication service and revoke the token.\n" +
229
- "\n" +
230
- "The token provides authentication to services that support the API ML SSO (Single Sign-On) capability. When you log in, the token is " +
231
- "stored in your default base profile until it expires. Base profiles store connection information shared by multiple services (e.g., " +
232
- "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, " +
233
- "you should omit username and password in service profiles so that the token in the base profile is used.";
163
+ Constants.AUTO_INIT_OPTION_TOKEN_VALUE = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_TOKEN_VALUE;
234
164
  /**
235
- * Summary of APIML login command
236
- * @static
237
- * @memberof AuthConstants
165
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
238
166
  */
239
- Constants.APIML_LOGIN_SUMMARY = "Log in to API ML authentication service";
167
+ Constants.AUTO_INIT_OPTION_CERT_FILE = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_CERT_FILE;
240
168
  /**
241
- * Description of APIML login command
242
- * @static
243
- * @memberof AuthConstants
169
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
170
+ */
171
+ Constants.AUTO_INIT_OPTION_CERT_KEY_FILE = core_for_zowe_sdk_1.ProfileConstants.AUTO_INIT_OPTION_CERT_KEY_FILE;
172
+ /**
173
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
244
174
  */
245
- Constants.APIML_LOGIN_DESCRIPTION = "Log in to Zowe API Mediation Layer authentication service and obtain or update a token.\n" +
246
- "\n" +
247
- "The token provides authentication to services that support the API ML SSO (Single Sign-On) capability. When you log in, the token is " +
248
- "stored in your default base profile until it expires. Base profiles store connection information shared by multiple services (e.g., " +
249
- "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, " +
250
- "you should omit username and password in service profiles so that the token in the base profile is used.";
175
+ Constants.AUTH_GROUP_SUMMARY = core_for_zowe_sdk_1.ProfileConstants.AUTH_GROUP_SUMMARY;
251
176
  /**
252
- * Example definition for APIML login command
253
- * @static
254
- * @memberof AuthConstants
177
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
255
178
  */
256
- Constants.APIML_LOGIN_EXAMPLE1 = {
257
- description: "Log in to an API ML instance to obtain or update the token stored in your base profile",
258
- options: ""
259
- };
179
+ Constants.AUTH_GROUP_DESCRIPTION = core_for_zowe_sdk_1.ProfileConstants.AUTH_GROUP_DESCRIPTION;
180
+ //______________________________________________________________________
260
181
  /**
261
- * Example definition for APIML login command with show-token
262
- * @static
263
- * @memberof AuthConstants
182
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
264
183
  */
265
- Constants.APIML_LOGIN_EXAMPLE2 = {
266
- description: "Log in to an API ML instance to obtain a token without storing it in a profile",
267
- options: "--show-token"
268
- };
184
+ Constants.APIML_LOGIN_SUMMARY = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGIN_SUMMARY;
269
185
  /**
270
- * Summary of APIML logout command
271
- * @static
272
- * @memberof AuthConstants
186
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
273
187
  */
274
- Constants.APIML_LOGOUT_SUMMARY = "Log out of API ML authentication service";
188
+ Constants.APIML_LOGIN_DESCRIPTION = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGIN_DESCRIPTION;
275
189
  /**
276
- * Description of APIML logout command
277
- * @static
278
- * @memberof AuthConstants
190
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
279
191
  */
280
- Constants.APIML_LOGOUT_DESCRIPTION = "Log out of the Zowe API Mediation Layer authentication service and revoke the token so it " +
281
- "can no longer authenticate. Also remove the token from the default base profile, if it is stored on disk.";
192
+ Constants.APIML_LOGIN_EXAMPLE1 = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGIN_EXAMPLE1;
282
193
  /**
283
- * Example definition for APIML logout command
284
- * @static
285
- * @memberof AuthConstants
194
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
286
195
  */
287
- Constants.APIML_LOGOUT_EXAMPLE1 = {
288
- description: "Log out of an API ML instance to revoke the token that was in use and remove it from your base profile",
289
- options: ""
290
- };
196
+ Constants.APIML_LOGIN_EXAMPLE2 = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGIN_EXAMPLE2;
291
197
  /**
292
- * Example definition for APIML logout command with token-value
293
- * @static
294
- * @memberof AuthConstants
198
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
199
+ */
200
+ Constants.APIML_LOGOUT_SUMMARY = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGOUT_SUMMARY;
201
+ /**
202
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
203
+ */
204
+ Constants.APIML_LOGOUT_DESCRIPTION = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGOUT_DESCRIPTION;
205
+ /**
206
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
207
+ */
208
+ Constants.APIML_LOGOUT_EXAMPLE1 = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGOUT_EXAMPLE1;
209
+ /**
210
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
295
211
  */
296
- Constants.APIML_LOGOUT_EXAMPLE2 = {
297
- description: "Log out of an API ML instance to revoke a token that was not stored in a profile",
298
- options: "--token-value <token>"
299
- };
212
+ Constants.APIML_LOGOUT_EXAMPLE2 = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGOUT_EXAMPLE2;
300
213
  /**
301
- * Option used in APIML logout command for token-type
214
+ * @deprecated Please use this constant from the @zowe/core-for-zowe-sdk
302
215
  */
303
- Constants.APIML_LOGOUT_OPTION_TOKEN_TYPE = Object.assign(Object.assign({}, Constants.BASE_OPTION_TOKEN_TYPE), { allowableValues: { values: imperative_1.SessConstants.ALL_TOKEN_TYPES } });
216
+ Constants.APIML_LOGOUT_OPTION_TOKEN_TYPE = core_for_zowe_sdk_1.ProfileConstants.APIML_LOGOUT_OPTION_TOKEN_TYPE;
304
217
  //# sourceMappingURL=Constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.js","sourceRoot":"","sources":["../src/Constants.ts"],"names":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AqB,GAAG,oCAAgB,CAAC,qBAAqB,CAAC;AACtF;;GAEG;AACoB,mCAAyB,GAAG,oCAAgB,CAAC,yBAAyB,CAAC;AAC9F;;GAEG;AACoB,8CAAoC,GAAG,oCAAgB,CAAC,oCAAoC,CAAC;AACpH;;GAEG;AACoB,qCAA2B,GAAG,oCAAgB,CAAC,2BAA2B,CAAC;AAClG;;GAEG;AACoB,sCAA4B,GAAG,oCAAgB,CAAC,4BAA4B,CAAC;AACpG;;GAEG;AACoB,oCAA0B,GAAG,oCAAgB,CAAC,0BAA0B,CAAC;AAChG;;EAEE;AACqB,wCAA8B,GAAG,oCAAgB,CAAC,8BAA8B,CAAC;AACxG;;GAEG;AACoB,4BAAkB,GAAG,oCAAgB,CAAC,kBAAkB,CAAC;AAChF;;GAEG;AACoB,gCAAsB,GAAG,oCAAgB,CAAC,sBAAsB,CAAC;AAExF,wEAAwE;AACxE;;GAEG;AACoB,6BAAmB,GAAG,oCAAgB,CAAC,mBAAmB,CAAC;AAClF;;GAEG;AACoB,iCAAuB,GAAG,oCAAgB,CAAC,uBAAuB,CAAC;AAC1F;;GAEG;AACoB,8BAAoB,GAAG,oCAAgB,CAAC,oBAAoB,CAAC;AACpF;;GAEG;AACoB,8BAAoB,GAAG,oCAAgB,CAAC,oBAAoB,CAAC;AACpF;;GAEG;AACoB,8BAAoB,GAAG,oCAAgB,CAAC,oBAAoB,CAAC;AACpF;;GAEG;AACoB,kCAAwB,GAAG,oCAAgB,CAAC,wBAAwB,CAAC;AAC5F;;GAEG;AACoB,+BAAqB,GAAG,oCAAgB,CAAC,qBAAqB,CAAC;AACtF;;GAEG;AACoB,+BAAqB,GAAG,oCAAgB,CAAC,qBAAqB,CAAC;AACtF;;GAEG;AACoB,wCAA8B,GAAG,oCAAgB,CAAC,8BAA8B,CAAC"}
@@ -73,6 +73,19 @@ class ApimlAutoInitHandler extends imperative_1.BaseAutoInitHandler {
73
73
  */
74
74
  doAutoInit(session, params) {
75
75
  return __awaiter(this, void 0, void 0, function* () {
76
+ // Login with token authentication first, so we can support certificates
77
+ if ((session.ISession.user && session.ISession.password) || (session.ISession.cert && session.ISession.certKey)) {
78
+ // If it is basic authentication, we need to set the auth type.
79
+ if (session.ISession.password) {
80
+ session.ISession.type = imperative_1.SessConstants.AUTH_TYPE_TOKEN;
81
+ }
82
+ session.ISession.tokenType = imperative_1.SessConstants.TOKEN_TYPE_APIML;
83
+ session.ISession.storeCookie = true;
84
+ session.ISession.tokenValue = yield core_for_zowe_sdk_1.Login.apimlLogin(session);
85
+ session.ISession.storeCookie = false;
86
+ session.ISession.type = imperative_1.SessConstants.AUTH_TYPE_TOKEN;
87
+ session.ISession.user = session.ISession.password = session.ISession.cert = session.ISession.certKey = undefined;
88
+ }
76
89
  const restErrUnauthorized = 403;
77
90
  const configs = core_for_zowe_sdk_1.Services.getPluginApimlConfigs();
78
91
  let profileInfos;
@@ -109,15 +122,6 @@ class ApimlAutoInitHandler extends imperative_1.BaseAutoInitHandler {
109
122
  profileConfig.profiles.base.properties.tokenValue = session.ISession.tokenValue;
110
123
  profileConfig.profiles.base.secure.push("tokenValue");
111
124
  }
112
- else if (session.ISession.user && session.ISession.password) {
113
- const tokenType = imperative_1.SessConstants.TOKEN_TYPE_APIML;
114
- session.ISession.tokenType = tokenType;
115
- session.ISession.type = imperative_1.SessConstants.AUTH_TYPE_TOKEN;
116
- const tokenValue = yield core_for_zowe_sdk_1.Login.apimlLogin(session);
117
- profileConfig.profiles.base.properties.tokenType = tokenType;
118
- profileConfig.profiles.base.properties.tokenValue = tokenValue;
119
- profileConfig.profiles.base.secure.push("tokenValue");
120
- }
121
125
  }
122
126
  this.recordProfilesFound(profileInfos);
123
127
  return profileConfig;