@zowe/cics-for-zowe-cli 6.20.0 → 6.22.0
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/NOTICE +56 -3
- package/lib/-strings-/en.d.ts +48 -0
- package/lib/-strings-/en.js +48 -0
- package/lib/-strings-/en.js.map +1 -1
- package/lib/close/Close.definition.d.ts +16 -0
- package/lib/close/Close.definition.js +36 -0
- package/lib/close/Close.definition.js.map +1 -0
- package/lib/close/CloseLocalFile.d.ts +15 -0
- package/lib/close/CloseLocalFile.js +68 -0
- package/lib/close/CloseLocalFile.js.map +1 -0
- package/lib/common/LocalFileHandler.d.ts +43 -0
- package/lib/common/LocalFileHandler.js +104 -0
- package/lib/common/LocalFileHandler.js.map +1 -0
- package/lib/open/Open.definition.d.ts +16 -0
- package/lib/open/Open.definition.js +36 -0
- package/lib/open/Open.definition.js.map +1 -0
- package/lib/open/OpenLocalFile.d.ts +15 -0
- package/lib/open/OpenLocalFile.js +53 -0
- package/lib/open/OpenLocalFile.js.map +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/NOTICE +56 -3
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.constants.d.ts +28 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.constants.js +24 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.constants.js.map +1 -1
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ILocalFileParms.d.ts +27 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ILocalFileParms.js +13 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ILocalFileParms.js.map +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/index.d.ts +3 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/index.js +3 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/index.js.map +1 -1
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/index.d.ts +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/index.js +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/index.js.map +1 -1
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/resources/LocalFile.d.ts +56 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/resources/LocalFile.js +116 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/resources/LocalFile.js.map +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/resources/index.d.ts +11 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/resources/index.js +28 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/resources/index.js.map +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestClient.d.ts +1 -1
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestClient.js +6 -4
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestClient.js.map +1 -1
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestError.d.ts +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestError.js +2 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestError.js.map +1 -1
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/ResourceActions.d.ts +39 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/ResourceActions.js +53 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/ResourceActions.js.map +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/index.d.ts +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/index.js +1 -0
- package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/index.js.map +1 -1
- package/node_modules/@zowe/cics-for-zowe-sdk/package.json +1 -1
- package/node_modules/sax/lib/sax.js +133 -7
- package/node_modules/sax/package.json +5 -2
- package/npm-shrinkwrap.json +3 -3
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
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.LocalFileDefinition = void 0;
|
|
14
|
+
// Does not use the import in anticipation of some internationalization work to be done later.
|
|
15
|
+
const strings = require("../-strings-/en").default.OPEN.RESOURCES.LOCALFILE;
|
|
16
|
+
/**
|
|
17
|
+
* Local file command definition for the OPEN command group
|
|
18
|
+
*/
|
|
19
|
+
exports.LocalFileDefinition = {
|
|
20
|
+
name: "CICSLocalFile",
|
|
21
|
+
aliases: ["lf"],
|
|
22
|
+
description: strings.DESCRIPTION,
|
|
23
|
+
handler: __dirname + "/../common/LocalFileHandler",
|
|
24
|
+
type: "command",
|
|
25
|
+
positionals: [
|
|
26
|
+
{
|
|
27
|
+
name: "fileName",
|
|
28
|
+
description: strings.POSITIONALS.FILENAME,
|
|
29
|
+
type: "string",
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
name: "region-name",
|
|
36
|
+
description: strings.OPTIONS.REGIONNAME,
|
|
37
|
+
type: "string",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "cics-plex",
|
|
41
|
+
description: strings.OPTIONS.CICSPLEX,
|
|
42
|
+
type: "string",
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
profile: { optional: ["cics"] },
|
|
46
|
+
examples: [
|
|
47
|
+
{
|
|
48
|
+
description: strings.EXAMPLES.EX1,
|
|
49
|
+
options: "TESTFILE --region-name MYREGION",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=OpenLocalFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenLocalFile.js","sourceRoot":"","sources":["../../src/open/OpenLocalFile.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAMH,8FAA8F;AAC9F,MAAM,OAAO,GAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAA8B,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;AAEpG;;GAEG;AACU,QAAA,mBAAmB,GAAuB;IACrD,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,CAAC,IAAI,CAAC;IACf,WAAW,EAAE,OAAO,CAAC,WAAW;IAChC,OAAO,EAAE,SAAS,GAAG,6BAA6B;IAClD,IAAI,EAAE,SAAS;IACf,WAAW,EAAE;QACX;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,QAAQ;YACzC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU;YACvC,IAAI,EAAE,QAAQ;SACf;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ;YACrC,IAAI,EAAE,QAAQ;SACf;KACF;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE;IAC/B,QAAQ,EAAE;QACR;YACE,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG;YACjC,OAAO,EAAE,iCAAiC;SAC3C;KACF;CACF,CAAC"}
|
|
@@ -97,7 +97,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
97
97
|
|
|
98
98
|
------
|
|
99
99
|
|
|
100
|
-
** diff; version 8.0.
|
|
100
|
+
** diff; version 8.0.4 --
|
|
101
101
|
Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
|
|
102
102
|
|
|
103
103
|
BSD 3-Clause License
|
|
@@ -300,6 +300,31 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
|
300
300
|
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
301
301
|
|
|
302
302
|
|
|
303
|
+
------
|
|
304
|
+
|
|
305
|
+
** flatted; version 3.4.2 -- https://github.com/WebReflection/flatted#readme
|
|
306
|
+
(c) 2020-present Andrea Giammarchi
|
|
307
|
+
Copyright (c) 2018-2020, Andrea Giammarchi
|
|
308
|
+
Copyright (c) 2018-2021, Andrea Giammarchi
|
|
309
|
+
Copyright (c) 2018-2025, Andrea Giammarchi
|
|
310
|
+
|
|
311
|
+
ISC License
|
|
312
|
+
|
|
313
|
+
Copyright (c) 2018-2020, Andrea Giammarchi, @WebReflection
|
|
314
|
+
|
|
315
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
316
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
317
|
+
copyright notice and this permission notice appear in all copies.
|
|
318
|
+
|
|
319
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
320
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
321
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
322
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
323
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
324
|
+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
325
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
326
|
+
|
|
327
|
+
|
|
303
328
|
------
|
|
304
329
|
|
|
305
330
|
** npm-package-arg; version 11.0.3 -- https://github.com/npm/npm-package-arg
|
|
@@ -795,6 +820,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
795
820
|
THE SOFTWARE.
|
|
796
821
|
|
|
797
822
|
|
|
823
|
+
------
|
|
824
|
+
|
|
825
|
+
** fs-extra; version 11.3.4 -- https://github.com/jprichardson/node-fs-extra
|
|
826
|
+
Copyright (c) 2011-2024 JP Richardson
|
|
827
|
+
Copyright (c) 2011-2024 JP Richardson (https://github.com/jprichardson)
|
|
828
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
829
|
+
Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
|
|
830
|
+
|
|
831
|
+
(The MIT License)
|
|
832
|
+
|
|
833
|
+
Copyright (c) 2011-2024 JP Richardson
|
|
834
|
+
|
|
835
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
|
|
836
|
+
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
|
|
837
|
+
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
|
838
|
+
furnished to do so, subject to the following conditions:
|
|
839
|
+
|
|
840
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
841
|
+
|
|
842
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
843
|
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
|
844
|
+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
845
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
846
|
+
|
|
847
|
+
|
|
798
848
|
------
|
|
799
849
|
|
|
800
850
|
** safe-stable-stringify; version 2.5.0 -- https://github.com/BridgeAR/safe-stable-stringify#readme
|
|
@@ -1636,6 +1686,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
1636
1686
|
------
|
|
1637
1687
|
|
|
1638
1688
|
** core-util-is; version 1.0.3 -- https://github.com/isaacs/core-util-is#readme
|
|
1689
|
+
Copyright Node.js contributors
|
|
1639
1690
|
Copyright Joyent, Inc. and other Node contributors
|
|
1640
1691
|
|
|
1641
1692
|
Copyright Node.js contributors. All rights reserved.
|
|
@@ -1844,7 +1895,7 @@ SOFTWARE.
|
|
|
1844
1895
|
|
|
1845
1896
|
------
|
|
1846
1897
|
|
|
1847
|
-
** picomatch; version 2.3.
|
|
1898
|
+
** picomatch; version 2.3.2 -- https://github.com/micromatch/picomatch
|
|
1848
1899
|
Copyright (c) 2017-present, Jon Schlinkert
|
|
1849
1900
|
Copyright (c) 2017-present, Jon Schlinkert (https://github.com/jonschlinkert)
|
|
1850
1901
|
|
|
@@ -2404,6 +2455,7 @@ THE SOFTWARE.
|
|
|
2404
2455
|
|
|
2405
2456
|
** merge2; version 1.4.1 -- https://github.com/teambition/merge2
|
|
2406
2457
|
Copyright (c) 2014-2020 Teambition
|
|
2458
|
+
(c) Teambition (https://www.teambition.com)
|
|
2407
2459
|
|
|
2408
2460
|
The MIT License (MIT)
|
|
2409
2461
|
|
|
@@ -2754,6 +2806,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
2754
2806
|
------
|
|
2755
2807
|
|
|
2756
2808
|
** isexe; version 3.1.5 -- https://github.com/isaacs/isexe#readme
|
|
2809
|
+
** sax; version 1.6.0 -- https://github.com/isaacs/sax-js#readme
|
|
2757
2810
|
|
|
2758
2811
|
# Blue Oak Model License
|
|
2759
2812
|
|
|
@@ -2814,7 +2867,7 @@ software or this license, under any kind of legal claim.***
|
|
|
2814
2867
|
|
|
2815
2868
|
------
|
|
2816
2869
|
|
|
2817
|
-
** lodash; version 4.
|
|
2870
|
+
** lodash; version 4.18.1 -- https://lodash.com/
|
|
2818
2871
|
Copyright OpenJS Foundation and other contributors https://openjsf.org
|
|
2819
2872
|
Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2820
2873
|
copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org
|
|
@@ -133,6 +133,22 @@ export declare const CicsCmciConstants: {
|
|
|
133
133
|
* The CICS CMCI local file
|
|
134
134
|
*/
|
|
135
135
|
CICS_CMCI_LOCAL_FILE: string;
|
|
136
|
+
/**
|
|
137
|
+
* The criteria field name for local file resources
|
|
138
|
+
*/
|
|
139
|
+
CICS_LOCAL_FILE_CRITERIA_FIELD: string;
|
|
140
|
+
/**
|
|
141
|
+
* Valid BUSY parameter values for closing local files
|
|
142
|
+
*/
|
|
143
|
+
CICS_LOCAL_FILE_BUSY_VALUES: string[];
|
|
144
|
+
/**
|
|
145
|
+
* Maximum length for CICS local file names
|
|
146
|
+
*/
|
|
147
|
+
CICS_LOCAL_FILE_MAX_LENGTH: number;
|
|
148
|
+
/**
|
|
149
|
+
* Valid action types for local file operations
|
|
150
|
+
*/
|
|
151
|
+
CICS_LOCAL_FILE_ACTIONS: string[];
|
|
136
152
|
/**
|
|
137
153
|
* The CICS CMCI remote file
|
|
138
154
|
*/
|
|
@@ -185,6 +201,10 @@ export declare const CicsCmciConstants: {
|
|
|
185
201
|
* CMCI RESP 1 Code for INVALIDPARM
|
|
186
202
|
*/
|
|
187
203
|
INVALIDPARM: number;
|
|
204
|
+
/**
|
|
205
|
+
* CMCI RESP 1 Code for NOTPERMIT
|
|
206
|
+
*/
|
|
207
|
+
NOTPERMIT: number;
|
|
188
208
|
/**
|
|
189
209
|
* CMCI RESP 1 Code for NOTAVAILABLE
|
|
190
210
|
*/
|
|
@@ -195,4 +215,12 @@ export declare const CicsCmciConstants: {
|
|
|
195
215
|
INVALIDDATA: number;
|
|
196
216
|
};
|
|
197
217
|
DEFAULT_RESP_CODE: string;
|
|
218
|
+
/**
|
|
219
|
+
* Resource type constant for GET operations documentation
|
|
220
|
+
*/
|
|
221
|
+
DOC_RESOURCE_TYPE_GET: string;
|
|
198
222
|
};
|
|
223
|
+
/**
|
|
224
|
+
* Valid local file action types
|
|
225
|
+
*/
|
|
226
|
+
export type LocalFileAction = "CLOSE" | "OPEN" | "ENABLE" | "DISABLE";
|
|
@@ -151,6 +151,22 @@ exports.CicsCmciConstants = {
|
|
|
151
151
|
* The CICS CMCI local file
|
|
152
152
|
*/
|
|
153
153
|
CICS_CMCI_LOCAL_FILE: "CICSLocalFile",
|
|
154
|
+
/**
|
|
155
|
+
* The criteria field name for local file resources
|
|
156
|
+
*/
|
|
157
|
+
CICS_LOCAL_FILE_CRITERIA_FIELD: "file",
|
|
158
|
+
/**
|
|
159
|
+
* Valid BUSY parameter values for closing local files
|
|
160
|
+
*/
|
|
161
|
+
CICS_LOCAL_FILE_BUSY_VALUES: ["WAIT", "NOWAIT", "FORCE"],
|
|
162
|
+
/**
|
|
163
|
+
* Maximum length for CICS local file names
|
|
164
|
+
*/
|
|
165
|
+
CICS_LOCAL_FILE_MAX_LENGTH: 8,
|
|
166
|
+
/**
|
|
167
|
+
* Valid action types for local file operations
|
|
168
|
+
*/
|
|
169
|
+
CICS_LOCAL_FILE_ACTIONS: ["CLOSE", "OPEN", "ENABLE", "DISABLE"],
|
|
154
170
|
/**
|
|
155
171
|
* The CICS CMCI remote file
|
|
156
172
|
*/
|
|
@@ -203,6 +219,10 @@ exports.CicsCmciConstants = {
|
|
|
203
219
|
* CMCI RESP 1 Code for INVALIDPARM
|
|
204
220
|
*/
|
|
205
221
|
INVALIDPARM: 1028,
|
|
222
|
+
/**
|
|
223
|
+
* CMCI RESP 1 Code for NOTPERMIT
|
|
224
|
+
*/
|
|
225
|
+
NOTPERMIT: 1031,
|
|
206
226
|
/**
|
|
207
227
|
* CMCI RESP 1 Code for NOTAVAILABLE
|
|
208
228
|
*/
|
|
@@ -216,5 +236,9 @@ exports.CicsCmciConstants = {
|
|
|
216
236
|
* Default Resp Code
|
|
217
237
|
*/
|
|
218
238
|
DEFAULT_RESP_CODE: "0000",
|
|
239
|
+
/**
|
|
240
|
+
* Resource type constant for GET operations documentation
|
|
241
|
+
*/
|
|
242
|
+
DOC_RESOURCE_TYPE_GET: "get",
|
|
219
243
|
};
|
|
220
244
|
//# sourceMappingURL=CicsCmci.constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CicsCmci.constants.js","sourceRoot":"","sources":["../../src/constants/CicsCmci.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH;;GAEG;AACU,QAAA,iBAAiB,GAAG;IAC/B;;OAEG;IACH,sBAAsB,EAAE,sBAAsB;IAE9C;;OAEG;IACH,qBAAqB,EAAE,qBAAqB;IAE5C;;OAEG;IACH,uBAAuB,EAAE,uBAAuB;IAEhD;;OAEG;IACH,sBAAsB,EAAE,sBAAsB;IAE9C;;OAEG;IACH,2BAA2B,EAAE,2BAA2B;IAExD;;OAEG;IACH,qBAAqB,EAAE,aAAa;IAEpC;;OAEG;IACH,qBAAqB,EAAE,aAAa;IAEpC;;OAEG;IACH,6BAA6B,EAAE,wBAAwB;IAEvD;;OAEG;IACH,sBAAsB,EAAE,sBAAsB;IAE9C;;OAEG;IACH,0BAA0B,EAAE,0BAA0B;IAEtD;;OAEG;IACH,sBAAsB,EAAE,s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OAEG;IACH,gBAAgB,EAAE,YAAY;IAE9B;;OAEG;IACH,qBAAqB,EAAE,gBAAgB;IACvC;;OAEG;IACH,sBAAsB,EAAE,iBAAiB;IAEzC;;OAEG;IACH,gBAAgB,EAAE;QAChB;;WAEG;QACH,EAAE,EAAE,IAAI;QAER;;WAEG;QACH,MAAM,EAAE,IAAI;QAEZ;;WAEG;QACH,WAAW,EAAE,IAAI;QAEjB;;WAEG;QACH,YAAY,EAAE,IAAI;QAElB;;WAEG;QACH,WAAW,EAAE,IAAI;KAClB;IACD;;OAEG;IACH,iBAAiB,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"CicsCmci.constants.js","sourceRoot":"","sources":["../../src/constants/CicsCmci.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH;;GAEG;AACU,QAAA,iBAAiB,GAAG;IAC/B;;OAEG;IACH,sBAAsB,EAAE,sBAAsB;IAE9C;;OAEG;IACH,qBAAqB,EAAE,qBAAqB;IAE5C;;OAEG;IACH,uBAAuB,EAAE,uBAAuB;IAEhD;;OAEG;IACH,sBAAsB,EAAE,sBAAsB;IAE9C;;OAEG;IACH,2BAA2B,EAAE,2BAA2B;IAExD;;OAEG;IACH,qBAAqB,EAAE,aAAa;IAEpC;;OAEG;IACH,qBAAqB,EAAE,aAAa;IAEpC;;OAEG;IACH,6BAA6B,EAAE,wBAAwB;IAEvD;;OAEG;IACH,sBAAsB,EAAE,sBAAsB;IAE9C;;OAEG;IACH,0BAA0B,EAAE,0BAA0B;IAEtD;;OAEG;IACH,sBAAsB,EAAE,sBAAsB;IAE9C;;OAEG;IACH,0BAA0B,EAAE,kBAAkB;IAE9C;;OAEG;IACH,sBAAsB,EAAE,cAAc;IAEtC;;OAEG;IACH,wBAAwB,EAAE,gBAAgB;IAE1C;;OAEG;IACH,uBAAuB,EAAE,eAAe;IAExC;;OAEG;IACH,WAAW,EAAE,YAAY;IAEzB;;OAEG;IACH,sBAAsB,EAAE,iBAAiB;IAEz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,gBAAgB,EAAE,YAAY;IAE9B;;OAEG;IACH,qBAAqB,EAAE,gBAAgB;IACvC;;OAEG;IACH,sBAAsB,EAAE,iBAAiB;IAEzC;;OAEG;IACH,gBAAgB,EAAE;QAChB;;WAEG;QACH,EAAE,EAAE,IAAI;QAER;;WAEG;QACH,MAAM,EAAE,IAAI;QAEZ;;WAEG;QACH,WAAW,EAAE,IAAI;QAEjB;;WAEG;QACH,SAAS,EAAE,IAAI;QAEf;;WAEG;QACH,YAAY,EAAE,IAAI;QAElB;;WAEG;QACH,WAAW,EAAE,IAAI;KAClB;IACD;;OAEG;IACH,iBAAiB,EAAE,MAAM;IAEzB;;OAEG;IACH,qBAAqB,EAAE,KAAK;CAC7B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
3
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
4
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
5
|
+
*
|
|
6
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
7
|
+
*
|
|
8
|
+
* Copyright Contributors to the Zowe Project.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
import type { IResourceParms } from "./IResourceParms";
|
|
12
|
+
/**
|
|
13
|
+
* Interface for CICS local file parameters
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ILocalFileParms
|
|
16
|
+
* @extends {IResourceParms}
|
|
17
|
+
*/
|
|
18
|
+
export interface ILocalFileParms extends IResourceParms {
|
|
19
|
+
/**
|
|
20
|
+
* The busy condition option for closing the file
|
|
21
|
+
* Valid values: "WAIT", "NOWAIT", "FORCE" (case-insensitive)
|
|
22
|
+
* Value will be automatically converted to uppercase
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof ILocalFileParms
|
|
25
|
+
*/
|
|
26
|
+
busy?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
//# sourceMappingURL=ILocalFileParms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ILocalFileParms.js","sourceRoot":"","sources":["../../src/doc/ILocalFileParms.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}
|
|
@@ -12,9 +12,12 @@ export * from "./IBundleParms";
|
|
|
12
12
|
export * from "./ICMCIApiResponse";
|
|
13
13
|
export * from "./ICMCIRequestOptions";
|
|
14
14
|
export * from "./ICMCIResponseResultSummary";
|
|
15
|
+
export * from "./ICMCIResponseErrorFeedBack";
|
|
16
|
+
export * from "./ICMCIResponseErrors";
|
|
15
17
|
export * from "./ICSDGroupParms";
|
|
16
18
|
export * from "./ICacheParms";
|
|
17
19
|
export * from "./IGetResourceUriOptions";
|
|
20
|
+
export * from "./ILocalFileParms";
|
|
18
21
|
export * from "./IProgramParms";
|
|
19
22
|
export * from "./IResourceParms";
|
|
20
23
|
export * from "./IResourceQueryParms";
|
|
@@ -28,9 +28,12 @@ __exportStar(require("./IBundleParms"), exports);
|
|
|
28
28
|
__exportStar(require("./ICMCIApiResponse"), exports);
|
|
29
29
|
__exportStar(require("./ICMCIRequestOptions"), exports);
|
|
30
30
|
__exportStar(require("./ICMCIResponseResultSummary"), exports);
|
|
31
|
+
__exportStar(require("./ICMCIResponseErrorFeedBack"), exports);
|
|
32
|
+
__exportStar(require("./ICMCIResponseErrors"), exports);
|
|
31
33
|
__exportStar(require("./ICSDGroupParms"), exports);
|
|
32
34
|
__exportStar(require("./ICacheParms"), exports);
|
|
33
35
|
__exportStar(require("./IGetResourceUriOptions"), exports);
|
|
36
|
+
__exportStar(require("./ILocalFileParms"), exports);
|
|
34
37
|
__exportStar(require("./IProgramParms"), exports);
|
|
35
38
|
__exportStar(require("./IResourceParms"), exports);
|
|
36
39
|
__exportStar(require("./IResourceQueryParms"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/doc/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;AAEH,iDAA+B;AAC/B,qDAAmC;AACnC,wDAAsC;AACtC,+DAA6C;AAC7C,mDAAiC;AACjC,gDAA8B;AAC9B,2DAAyC;AACzC,kDAAgC;AAChC,mDAAiC;AACjC,wDAAsC;AACtC,sDAAoC;AACpC,sDAAoC;AACpC,iDAA+B;AAC/B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/doc/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;AAEH,iDAA+B;AAC/B,qDAAmC;AACnC,wDAAsC;AACtC,+DAA6C;AAC7C,+DAA6C;AAC7C,wDAAsC;AACtC,mDAAiC;AACjC,gDAA8B;AAC9B,2DAAyC;AACzC,oDAAkC;AAClC,kDAAgC;AAChC,mDAAiC;AACjC,wDAAsC;AACtC,sDAAoC;AACpC,sDAAoC;AACpC,iDAA+B;AAC/B,qDAAmC"}
|
|
@@ -28,6 +28,7 @@ __exportStar(require("./constants"), exports);
|
|
|
28
28
|
__exportStar(require("./core"), exports);
|
|
29
29
|
__exportStar(require("./doc"), exports);
|
|
30
30
|
__exportStar(require("./methods"), exports);
|
|
31
|
+
__exportStar(require("./resources"), exports);
|
|
31
32
|
__exportStar(require("./rest"), exports);
|
|
32
33
|
__exportStar(require("./utils"), exports);
|
|
33
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;AAEH,8CAA4B;AAC5B,yCAAuB;AACvB,wCAAsB;AACtB,4CAA0B;AAC1B,yCAAuB;AACvB,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;AAEH,8CAA4B;AAC5B,yCAAuB;AACvB,wCAAsB;AACtB,4CAA0B;AAC1B,8CAA4B;AAC5B,yCAAuB;AACvB,0CAAwB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
3
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
4
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
5
|
+
*
|
|
6
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
7
|
+
*
|
|
8
|
+
* Copyright Contributors to the Zowe Project.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
import { type AbstractSession } from "@zowe/imperative";
|
|
12
|
+
import type { ICMCIApiResponse, ILocalFileParms } from "../doc";
|
|
13
|
+
/**
|
|
14
|
+
* Close a local file in CICS
|
|
15
|
+
* @param {AbstractSession} session - the session to connect to CMCI with
|
|
16
|
+
* @param {ILocalFileParms} parms - parameters for closing the local file
|
|
17
|
+
* @param {string} parms.name - the name of the local file to close (1-8 characters)
|
|
18
|
+
* @param {string} parms.regionName - the CICS region name
|
|
19
|
+
* @param {string} [parms.cicsPlex] - the CICSPlex name (optional)
|
|
20
|
+
* @param {string} [parms.busy] - busy condition option: "WAIT", "NOWAIT", or "FORCE" (case-insensitive, optional, default: "WAIT")
|
|
21
|
+
* @returns {Promise<ICMCIApiResponse>} promise that resolves to the response
|
|
22
|
+
* @throws {ImperativeError} CICS local file name not defined, blank, or exceeds maximum length
|
|
23
|
+
* @throws {ImperativeError} CICS region name not defined or blank
|
|
24
|
+
* @throws {ImperativeError} Invalid BUSY parameter value
|
|
25
|
+
* @throws {ImperativeError} CicsCmciRestClient request fails
|
|
26
|
+
*/
|
|
27
|
+
export declare function closeLocalFile(session: AbstractSession, parms: ILocalFileParms): Promise<ICMCIApiResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Open a local file in CICS
|
|
30
|
+
* @param {AbstractSession} session - the session to connect to CMCI with
|
|
31
|
+
* @param {ILocalFileParms} parms - parameters for opening the local file
|
|
32
|
+
* @param {string} parms.name - the name of the local file to open (1-8 characters)
|
|
33
|
+
* @param {string} parms.regionName - the CICS region name
|
|
34
|
+
* @param {string} [parms.cicsPlex] - the CICSPlex name (optional)
|
|
35
|
+
* @returns {Promise<ICMCIApiResponse>} promise that resolves to the response
|
|
36
|
+
* @throws {ImperativeError} CICS local file name not defined, blank, or exceeds maximum length
|
|
37
|
+
* @throws {ImperativeError} CICS region name not defined or blank
|
|
38
|
+
* @throws {ImperativeError} CicsCmciRestClient request fails
|
|
39
|
+
*/
|
|
40
|
+
export declare function openLocalFile(session: AbstractSession, parms: ILocalFileParms): Promise<ICMCIApiResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Enable a local file in CICS (future implementation)
|
|
43
|
+
* @param {AbstractSession} session - the session to connect to CMCI with
|
|
44
|
+
* @param {ILocalFileParms} parms - parameters for enabling the local file
|
|
45
|
+
* @returns {Promise<ICMCIApiResponse>} promise that resolves to the response
|
|
46
|
+
* @throws {ImperativeError} Feature not yet implemented
|
|
47
|
+
*/
|
|
48
|
+
export declare function enableLocalFile(session: AbstractSession, parms: ILocalFileParms): Promise<ICMCIApiResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Disable a local file in CICS (future implementation)
|
|
51
|
+
* @param {AbstractSession} session - the session to connect to CMCI with
|
|
52
|
+
* @param {ILocalFileParms} parms - parameters for disabling the local file
|
|
53
|
+
* @returns {Promise<ICMCIApiResponse>} promise that resolves to the response
|
|
54
|
+
* @throws {ImperativeError} Feature not yet implemented
|
|
55
|
+
*/
|
|
56
|
+
export declare function disableLocalFile(session: AbstractSession, parms: ILocalFileParms): Promise<ICMCIApiResponse>;
|
|
@@ -0,0 +1,116 @@
|
|
|
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.disableLocalFile = exports.enableLocalFile = exports.openLocalFile = exports.closeLocalFile = void 0;
|
|
14
|
+
const imperative_1 = require("@zowe/imperative");
|
|
15
|
+
const constants_1 = require("../constants");
|
|
16
|
+
const ResourceActions_1 = require("../utils/ResourceActions");
|
|
17
|
+
/**
|
|
18
|
+
* Close a local file in CICS
|
|
19
|
+
* @param {AbstractSession} session - the session to connect to CMCI with
|
|
20
|
+
* @param {ILocalFileParms} parms - parameters for closing the local file
|
|
21
|
+
* @param {string} parms.name - the name of the local file to close (1-8 characters)
|
|
22
|
+
* @param {string} parms.regionName - the CICS region name
|
|
23
|
+
* @param {string} [parms.cicsPlex] - the CICSPlex name (optional)
|
|
24
|
+
* @param {string} [parms.busy] - busy condition option: "WAIT", "NOWAIT", or "FORCE" (case-insensitive, optional, default: "WAIT")
|
|
25
|
+
* @returns {Promise<ICMCIApiResponse>} promise that resolves to the response
|
|
26
|
+
* @throws {ImperativeError} CICS local file name not defined, blank, or exceeds maximum length
|
|
27
|
+
* @throws {ImperativeError} CICS region name not defined or blank
|
|
28
|
+
* @throws {ImperativeError} Invalid BUSY parameter value
|
|
29
|
+
* @throws {ImperativeError} CicsCmciRestClient request fails
|
|
30
|
+
*/
|
|
31
|
+
async function closeLocalFile(session, parms) {
|
|
32
|
+
// Validate required parameters
|
|
33
|
+
imperative_1.ImperativeExpect.toBeDefinedAndNonBlank(parms.name, "CICS Local File name", "CICS local file name is required");
|
|
34
|
+
imperative_1.ImperativeExpect.toBeDefinedAndNonBlank(parms.regionName, "CICS Region name", "CICS region name is required");
|
|
35
|
+
// Validate file name length (CICS resource names are limited to 8 characters)
|
|
36
|
+
if (parms.name.length > constants_1.CicsCmciConstants.CICS_LOCAL_FILE_MAX_LENGTH) {
|
|
37
|
+
throw new imperative_1.ImperativeError({
|
|
38
|
+
msg: `CICS local file name "${parms.name}" exceeds maximum length of ${constants_1.CicsCmciConstants.CICS_LOCAL_FILE_MAX_LENGTH} characters`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
imperative_1.Logger.getAppLogger().debug(`Attempting to close a local file with the following parameters:\n%s`, JSON.stringify(parms));
|
|
42
|
+
// Get busy parameter value
|
|
43
|
+
const busyValue = parms.busy ? parms.busy.trim().toUpperCase() : "WAIT";
|
|
44
|
+
// Validate busy parameter
|
|
45
|
+
if (!constants_1.CicsCmciConstants.CICS_LOCAL_FILE_BUSY_VALUES.includes(busyValue)) {
|
|
46
|
+
const allowedValuesStr = constants_1.CicsCmciConstants.CICS_LOCAL_FILE_BUSY_VALUES.join(", ");
|
|
47
|
+
throw new imperative_1.ImperativeError({
|
|
48
|
+
msg: `Invalid BUSY parameter value: "${busyValue}". Must be one of: ${allowedValuesStr}`,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
// Use generic performAction utility
|
|
52
|
+
return (0, ResourceActions_1.performAction)(session, constants_1.CicsCmciConstants.CICS_CMCI_LOCAL_FILE, "CLOSE", {
|
|
53
|
+
name: parms.name,
|
|
54
|
+
regionName: parms.regionName,
|
|
55
|
+
cicsPlex: parms.cicsPlex,
|
|
56
|
+
}, constants_1.CicsCmciConstants.CICS_LOCAL_FILE_CRITERIA_FIELD, { name: "BUSY", value: busyValue });
|
|
57
|
+
}
|
|
58
|
+
exports.closeLocalFile = closeLocalFile;
|
|
59
|
+
/**
|
|
60
|
+
* Open a local file in CICS
|
|
61
|
+
* @param {AbstractSession} session - the session to connect to CMCI with
|
|
62
|
+
* @param {ILocalFileParms} parms - parameters for opening the local file
|
|
63
|
+
* @param {string} parms.name - the name of the local file to open (1-8 characters)
|
|
64
|
+
* @param {string} parms.regionName - the CICS region name
|
|
65
|
+
* @param {string} [parms.cicsPlex] - the CICSPlex name (optional)
|
|
66
|
+
* @returns {Promise<ICMCIApiResponse>} promise that resolves to the response
|
|
67
|
+
* @throws {ImperativeError} CICS local file name not defined, blank, or exceeds maximum length
|
|
68
|
+
* @throws {ImperativeError} CICS region name not defined or blank
|
|
69
|
+
* @throws {ImperativeError} CicsCmciRestClient request fails
|
|
70
|
+
*/
|
|
71
|
+
async function openLocalFile(session, parms) {
|
|
72
|
+
// Validate required parameters
|
|
73
|
+
imperative_1.ImperativeExpect.toBeDefinedAndNonBlank(parms.name, "CICS Local File name", "CICS local file name is required");
|
|
74
|
+
imperative_1.ImperativeExpect.toBeDefinedAndNonBlank(parms.regionName, "CICS Region name", "CICS region name is required");
|
|
75
|
+
// Validate file name length (CICS resource names are limited to 8 characters)
|
|
76
|
+
if (parms.name.length > constants_1.CicsCmciConstants.CICS_LOCAL_FILE_MAX_LENGTH) {
|
|
77
|
+
throw new imperative_1.ImperativeError({
|
|
78
|
+
msg: `CICS local file name "${parms.name}" exceeds maximum length of ${constants_1.CicsCmciConstants.CICS_LOCAL_FILE_MAX_LENGTH} characters`,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
imperative_1.Logger.getAppLogger().debug(`Attempting to open a local file with the following parameters:\n%s`, JSON.stringify(parms));
|
|
82
|
+
// Use generic performAction utility (no additional parameters needed for OPEN)
|
|
83
|
+
return (0, ResourceActions_1.performAction)(session, constants_1.CicsCmciConstants.CICS_CMCI_LOCAL_FILE, "OPEN", {
|
|
84
|
+
name: parms.name,
|
|
85
|
+
regionName: parms.regionName,
|
|
86
|
+
cicsPlex: parms.cicsPlex,
|
|
87
|
+
}, constants_1.CicsCmciConstants.CICS_LOCAL_FILE_CRITERIA_FIELD);
|
|
88
|
+
}
|
|
89
|
+
exports.openLocalFile = openLocalFile;
|
|
90
|
+
/**
|
|
91
|
+
* Enable a local file in CICS (future implementation)
|
|
92
|
+
* @param {AbstractSession} session - the session to connect to CMCI with
|
|
93
|
+
* @param {ILocalFileParms} parms - parameters for enabling the local file
|
|
94
|
+
* @returns {Promise<ICMCIApiResponse>} promise that resolves to the response
|
|
95
|
+
* @throws {ImperativeError} Feature not yet implemented
|
|
96
|
+
*/
|
|
97
|
+
async function enableLocalFile(session, parms) {
|
|
98
|
+
throw new imperative_1.ImperativeError({
|
|
99
|
+
msg: "ENABLE action not yet implemented. This feature requires SDK support for enabling local files.",
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
exports.enableLocalFile = enableLocalFile;
|
|
103
|
+
/**
|
|
104
|
+
* Disable a local file in CICS (future implementation)
|
|
105
|
+
* @param {AbstractSession} session - the session to connect to CMCI with
|
|
106
|
+
* @param {ILocalFileParms} parms - parameters for disabling the local file
|
|
107
|
+
* @returns {Promise<ICMCIApiResponse>} promise that resolves to the response
|
|
108
|
+
* @throws {ImperativeError} Feature not yet implemented
|
|
109
|
+
*/
|
|
110
|
+
async function disableLocalFile(session, parms) {
|
|
111
|
+
throw new imperative_1.ImperativeError({
|
|
112
|
+
msg: "DISABLE action not yet implemented. This feature requires SDK support for disabling local files.",
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
exports.disableLocalFile = disableLocalFile;
|
|
116
|
+
//# sourceMappingURL=LocalFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalFile.js","sourceRoot":"","sources":["../../src/resources/LocalFile.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AA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AAI,4BAAe,CAAC;QACxB,GAAG,EAAE,gGAAgG;KACtG,CAAC,CAAC;AACL,CAAC;AAJD,0CAIC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,gBAAgB,CAAC,OAAwB,EAAE,KAAsB;IACrF,MAAM,IAAI,4BAAe,CAAC;QACxB,GAAG,EAAE,kGAAkG;KACxG,CAAC,CAAC;AACL,CAAC;AAJD,4CAIC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This program and the accompanying materials are made available under the terms of the
|
|
3
|
+
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
|
|
4
|
+
* https://www.eclipse.org/legal/epl-v20.html
|
|
5
|
+
*
|
|
6
|
+
* SPDX-License-Identifier: EPL-2.0
|
|
7
|
+
*
|
|
8
|
+
* Copyright Contributors to the Zowe Project.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export * from "./LocalFile";
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
}));
|
|
23
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
24
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
__exportStar(require("./LocalFile"), exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;AAEH,8CAA4B"}
|
|
@@ -108,7 +108,7 @@ export declare class CicsCmciRestClient extends AbstractRestClient {
|
|
|
108
108
|
* Check that we got the expected response codes from the API after a request
|
|
109
109
|
* @param {ICMCIApiResponse} apiResponse - the parsed response
|
|
110
110
|
* @returns {ICMCIApiResponse} - the response if it was correct
|
|
111
|
-
* @throws {ImperativeError} request
|
|
111
|
+
* @throws {ImperativeError} if the request failed. The error might include records that were retrieved.
|
|
112
112
|
*/
|
|
113
113
|
private static verifyResponseCodes;
|
|
114
114
|
/**
|
|
@@ -172,16 +172,18 @@ class CicsCmciRestClient extends imperative_1.AbstractRestClient {
|
|
|
172
172
|
* Check that we got the expected response codes from the API after a request
|
|
173
173
|
* @param {ICMCIApiResponse} apiResponse - the parsed response
|
|
174
174
|
* @returns {ICMCIApiResponse} - the response if it was correct
|
|
175
|
-
* @throws {ImperativeError} request
|
|
175
|
+
* @throws {ImperativeError} if the request failed. The error might include records that were retrieved.
|
|
176
176
|
*/
|
|
177
177
|
static verifyResponseCodes(apiResponse, requestOptions) {
|
|
178
|
-
const
|
|
178
|
+
const responseCode = [`${constants_1.CicsCmciConstants.RESPONSE_1_CODES.OK}`];
|
|
179
179
|
if (requestOptions?.failOnNoData === false) {
|
|
180
|
-
|
|
180
|
+
responseCode.push(`${constants_1.CicsCmciConstants.RESPONSE_1_CODES.NODATA}`);
|
|
181
181
|
}
|
|
182
|
-
|
|
182
|
+
// If response code is OK or NODATA (when allowed), return it
|
|
183
|
+
if (responseCode.includes(apiResponse.response?.resultsummary?.api_response1)) {
|
|
183
184
|
return apiResponse;
|
|
184
185
|
}
|
|
186
|
+
// Error code present - throw error (error will include any records retrieved))
|
|
185
187
|
if (requestOptions?.useCICSCmciRestError) {
|
|
186
188
|
throw new CicsCmciRestError_1.CicsCmciRestError(CicsCmci_messages_1.CicsCmciMessages.cmciRequestFailed.message, apiResponse);
|
|
187
189
|
}
|