@@ -18,6 +18,7 @@ export const TYPE_OUTPUT = "output";
1818
1919export const DEF_NO_OUTPUT = "No output to display."
2020export const DEF_JOB_STATEMENT = `//ZWEJOB01 JOB IZUACCT,'SYSPROG',CLASS=A,\n// MSGLEVEL=(1,1),MSGCLASS=A` ;
21+ export const DEF_ZOWE_MAJOR_VERS = "3" ;
2122
2223export const CONNECTION_STAGE_LABEL = "Connection" ;
2324export const PLANNING_STAGE_LABEL = "Planning" ;
@@ -57,9 +58,21 @@ export function isValidUSSPath(path: string): boolean {
5758 return validUSSRegex . test ( path ) ;
5859}
5960
61+ export function doesUSSPathContain ( parentLocation : string , compareLocation : string ) : boolean {
62+ if ( ! parentLocation || ! compareLocation ) return false ;
63+
64+ // Remove trailing slashes
65+ const normalParent = parentLocation . replace ( / \/ + $ / , '' ) ;
66+ const normalCompare = compareLocation . replace ( / \/ + $ / , '' ) ;
67+
68+ // Ensure compareLocation is truly (not false positive) a subdirectory of parentLocation via "/"
69+ return normalCompare . startsWith ( `${ normalParent } /` ) ;
70+ } ;
71+
72+
6073export const SERVER_COMMON = {
6174 "$schema" : "https://json-schema.org/draft/2019-09/schema" ,
62- "$id" : "https://zowe.org/schemas/v2 /server-common" ,
75+ "$id" : "https://zowe.org/schemas/v3 /server-common" ,
6376 "title" : "Common types" ,
6477 "description" : "Configuration types that are common in Zowe and may be referenced by multiple components" ,
6578 "$defs" : {
@@ -155,7 +168,7 @@ export const SERVER_COMMON = {
155168
156169export const BASE_SCHEMA = {
157170 "$schema" : "https://json-schema.org/draft/2019-09/schema" ,
158- "$id" : "https://zowe.org/schemas/v2 /server-base" ,
171+ "$id" : "https://zowe.org/schemas/v3 /server-base" ,
159172 "title" : "Zowe configuration file" ,
160173 "description" : "Configuration file for Zowe (zowe.org) version 2." ,
161174 "type" : "object" ,
@@ -193,7 +206,7 @@ export const BASE_SCHEMA = {
193206 "description" : "Holds Zowe PARMLIB members for plugins" ,
194207 "properties" : {
195208 "zis" : {
196- "$ref" : "/schemas/v2 /server-common#zoweDatasetMember" ,
209+ "$ref" : "/schemas/v3 /server-common#zoweDatasetMember" ,
197210 "description" : "PARMLIB member used by ZIS"
198211 }
199212 }
@@ -345,7 +358,7 @@ export const BASE_SCHEMA = {
345358 "description" : "PKCS#12 keystore settings" ,
346359 "properties" : {
347360 "directory" : {
348- "$ref" : "/schemas/v2 /server-common#zowePath" ,
361+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
349362 "description" : "Keystore directory"
350363 } ,
351364 "name" : {
@@ -543,19 +556,19 @@ export const BASE_SCHEMA = {
543556 }
544557 } ,
545558 "runtimeDirectory" : {
546- "$ref" : "/schemas/v2 /server-common#zowePath" ,
559+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
547560 "description" : "Path to where you installed Zowe."
548561 } ,
549562 "logDirectory" : {
550- "$ref" : "/schemas/v2 /server-common#zowePath" ,
563+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
551564 "description" : "Path to where you want to store Zowe log files."
552565 } ,
553566 "workspaceDirectory" : {
554- "$ref" : "/schemas/v2 /server-common#zowePath" ,
567+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
555568 "description" : "Path to where you want to store Zowe workspace files. Zowe workspace are used by Zowe component runtime to store temporary files."
556569 } ,
557570 "extensionDirectory" : {
558- "$ref" : "/schemas/v2 /server-common#zowePath" ,
571+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
559572 "description" : "Path to where you want to store Zowe extensions. \"zwe components install\" will install new extensions into this directory."
560573 } ,
561574 "job" : {
@@ -707,7 +720,7 @@ export const BASE_SCHEMA = {
707720 "type" : "object" ,
708721 "properties" : {
709722 "home" : {
710- "$ref" : "/schemas/v2 /server-common#zowePath" ,
723+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
711724 "description" : "Path to Java home directory."
712725 }
713726 }
@@ -716,7 +729,7 @@ export const BASE_SCHEMA = {
716729 "type" : "object" ,
717730 "properties" : {
718731 "home" : {
719- "$ref" : "/schemas/v2 /server-common#zowePath" ,
732+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
720733 "description" : "Path to node.js home directory."
721734 }
722735 }
@@ -817,7 +830,7 @@ export const BASE_SCHEMA = {
817830 "const" : "PKCS12"
818831 } ,
819832 "file" : {
820- "$ref" : "/schemas/v2 /server-common#zowePath" ,
833+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
821834 "description" : "Path to your PKCS#12 keystore."
822835 } ,
823836 "password" : {
@@ -842,7 +855,7 @@ export const BASE_SCHEMA = {
842855 "const" : "PKCS12"
843856 } ,
844857 "file" : {
845- "$ref" : "/schemas/v2 /server-common#zowePath" ,
858+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
846859 "description" : "Path to your PKCS#12 keystore."
847860 } ,
848861 "password" : {
@@ -858,24 +871,24 @@ export const BASE_SCHEMA = {
858871 "required" : [ "key" , "certificate" ] ,
859872 "properties" : {
860873 "key" : {
861- "$ref" : "/schemas/v2 /server-common#zowePath" ,
874+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
862875 "description" : "Path to the certificate private key stored in PEM format."
863876 } ,
864877 "certificate" : {
865- "$ref" : "/schemas/v2 /server-common#zowePath" ,
878+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
866879 "description" : "Path to the certificate stored in PEM format."
867880 } ,
868881 "certificateAuthorities" : {
869882 "description" : "List of paths to the certificate authorities stored in PEM format." ,
870883 "oneOf" : [ {
871- "$ref" : "/schemas/v2 /server-common#zowePath" ,
884+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
872885 "description" : "Paths to the certificate authorities stored in PEM format. You can separate multiple certificate authorities by comma."
873886 } ,
874887 {
875888 "type" : "array" ,
876889 "description" : "Path to the certificate authority stored in PEM format." ,
877890 "items" : {
878- "$ref" : "/schemas/v2 /server-common#zowePath"
891+ "$ref" : "/schemas/v3 /server-common#zowePath"
879892 }
880893 }
881894 ]
@@ -1085,7 +1098,7 @@ export const BASE_SCHEMA = {
10851098 "type" : "array" ,
10861099 "description" : "The IP addresses which all of the Zowe servers will be binding on and listening to. Some servers may only support listening on the first element." ,
10871100 "items" : {
1088- "$ref" : "/schemas/v2 /server-common#zoweIpv4"
1101+ "$ref" : "/schemas/v3 /server-common#zoweIpv4"
10891102 }
10901103 } ,
10911104 "vipaIp" : {
@@ -1121,7 +1134,7 @@ export const BASE_SCHEMA = {
11211134 "description" : "The location of the default registry for this handler. It could be a URL, path, dataset, whatever this handler supports"
11221135 } ,
11231136 "path" : {
1124- "$ref" : "/schemas/v2 /server-common#zowePath" ,
1137+ "$ref" : "/schemas/v3 /server-common#zowePath" ,
11251138 "description" : "Unix file path to the configmgr-compatible JS file which implements the handler API"
11261139 }
11271140 }
@@ -1133,7 +1146,7 @@ export const BASE_SCHEMA = {
11331146//this schema fixes ajv not resolving references properly
11341147export const FALLBACK_SCHEMA = {
11351148 "$schema" : "https://json-schema.org/draft/2019-09/schema" ,
1136- "$id" : "https://zowe.org/schemas/v2 /server-base" ,
1149+ "$id" : "https://zowe.org/schemas/v3 /server-base" ,
11371150 "title" : "Zowe configuration file" ,
11381151 "description" : "Configuration file for Zowe (zowe.org) version 2." ,
11391152 "type" : "object" ,
@@ -2124,7 +2137,7 @@ export const FALLBACK_SCHEMA = {
21242137
21252138//these two consts allow the whole schema to be validated
21262139export const ajv2019 = new Ajv2019 ( { schemas : [ BASE_SCHEMA , SERVER_COMMON ] } ) . addKeyword ( "$anchor" )
2127- export const schemaValidate = ajv2019 . getSchema ( "https://zowe.org/schemas/v2 /server-base" )
2140+ export const schemaValidate = ajv2019 . getSchema ( "https://zowe.org/schemas/v3 /server-base" )
21282141
21292142
21302143export const ajv = new Ajv2019 ( ) . addKeyword ( "$anchor" ) . addSchema ( SERVER_COMMON ) ;
@@ -2187,17 +2200,17 @@ export const FALLBACK_YAML = {
21872200 "cookieIdentifier" : "1" ,
21882201 "verifyCertificates" : "STRICT" ,
21892202 "setup" : {
2190- "dataset" : {
2191- "authLoadlib" : "IBMUSER.ZWEV2 .SZWEAUTH" ,
2203+ "dataset" : { // TODO: Dynamically switch `ZWE` with ZWEV2/ZWEV3 and re-run fallback<-->Wizard yaml obj init code during Downloading & .pax upload step
2204+ "authLoadlib" : "IBMUSER.ZWE .SZWEAUTH" ,
21922205 "proclib" : "USER.PROCLIB" ,
2193- "authPluginLib" : "IBMUSER.ZWEV2 .CUST.ZWESAPL" ,
2194- "prefix" : "IBMUSER.ZWEV2 " ,
2195- "parmlib" : "IBMUSER.ZWEV2 .CUST.PARMLIB" ,
2196- "loadlib" : "IBMUSER.ZWEV2 .SZWELOAD" ,
2206+ "authPluginLib" : "IBMUSER.ZWE .CUST.ZWESAPL" ,
2207+ "prefix" : "IBMUSER.ZWE " ,
2208+ "parmlib" : "IBMUSER.ZWE .CUST.PARMLIB" ,
2209+ "loadlib" : "IBMUSER.ZWE .SZWELOAD" ,
21972210 "parmlibMembers" : {
21982211 "zis" : "ZWESIP00"
21992212 } ,
2200- "jcllib" : "IBMUSER.ZWEV2 .CUST.JCLLIB"
2213+ "jcllib" : "IBMUSER.ZWE .CUST.JCLLIB"
22012214 } ,
22022215 "certificate" : {
22032216 "type" : "PKCS12" ,
0 commit comments