diff --git a/.github/dco.yml b/.github/dco.yml new file mode 100644 index 0000000000..1f94d940bd --- /dev/null +++ b/.github/dco.yml @@ -0,0 +1,3 @@ +allowRemediationCommits: + individual: true + thirdParty: true diff --git a/.github/workflows/rust-cli-publish.yml b/.github/workflows/rust-cli-publish.yml index ec7325b6da..33632fc77d 100644 --- a/.github/workflows/rust-cli-publish.yml +++ b/.github/workflows/rust-cli-publish.yml @@ -92,7 +92,7 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: - targets: aarch64-apple-darwin + targets: x86_64-apple-darwin - uses: actions/download-artifact@v4 with: @@ -106,10 +106,11 @@ jobs: mv ../aarch64-apple-darwin/release/zowe zowe.aarch64 && mv ../x86_64-apple-darwin/release/zowe zowe.x86_64 lipo -create -output zowe zowe.aarch64 zowe.x86_64 + # Use gtar instead of tar on MacOS to prevent extra `GNUSparseFile.0` directory - name: Create Archive run: | cd target/release - tar -cvzf zowe.tgz zowe + gtar -cvzf zowe.tgz zowe mv zowe.tgz zowe-macos.tgz - name: Upload Release Asset diff --git a/.github/workflows/rust-cli.yml b/.github/workflows/rust-cli.yml index 594cebf2bd..2c0c47cb0e 100644 --- a/.github/workflows/rust-cli.yml +++ b/.github/workflows/rust-cli.yml @@ -64,7 +64,7 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: - targets: aarch64-apple-darwin + targets: x86_64-apple-darwin - name: Build run: | @@ -74,6 +74,7 @@ jobs: mv ../aarch64-apple-darwin/debug/zowe zowe.aarch64 && mv ../x86_64-apple-darwin/debug/zowe zowe.x86_64 lipo -create -output zowe zowe.aarch64 zowe.x86_64 + # Use gtar instead of tar on MacOS to prevent extra `GNUSparseFile.0` directory - name: Create Archive run: | cd zowex/target/debug diff --git a/.gitignore b/.gitignore index 916a55f5eb..21500acf9a 100644 --- a/.gitignore +++ b/.gitignore @@ -121,5 +121,4 @@ packages/imperative/web-help/dist/css/bundle* packages/imperative/web-help/dist/js/ jest-stare/ - -jest.user.config.js \ No newline at end of file +jest.user.config.js diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index b61d080f9e..d3c2e68792 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -80,15 +80,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "dev": true, @@ -865,9 +856,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "node_modules/@isaacs/cliui": { @@ -2575,31 +2566,6 @@ "node": ">=0.12.0" } }, - "node_modules/@lerna-lite/core/node_modules/semver": { - "version": "7.6.0", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@lerna-lite/core/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@lerna-lite/core/node_modules/signal-exit": { "version": "4.1.0", "dev": true, @@ -2781,11 +2747,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@lerna-lite/core/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@lerna-lite/filter-packages": { "version": "3.3.1", "dev": true, @@ -3723,31 +3684,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@lerna-lite/version/node_modules/semver": { - "version": "7.6.0", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@lerna-lite/version/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@lerna-lite/version/node_modules/slash": { "version": "5.1.0", "dev": true, @@ -3843,11 +3779,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@lerna-lite/version/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/@lerna-lite/version/node_modules/yocto-queue": { "version": "1.0.0", "dev": true, @@ -3966,9 +3897,9 @@ } }, "node_modules/@napi-rs/cli": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-2.18.0.tgz", - "integrity": "sha512-lfSRT7cs3iC4L+kv9suGYQEezn5Nii7Kpu+THsYVI0tA1Vh59LH45p4QADaD7hvIkmOz79eEGtoKQ9nAkAPkzA==", + "version": "2.18.3", + "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-2.18.3.tgz", + "integrity": "sha512-L0f4kP0dyG8W5Qtc7MtP73VvLLrOLyRcUEBzknIfu8Jk4Jfhrsx1ItMHgyalYqMSslWdY3ojEfAaU5sx1VyeQQ==", "dev": true, "bin": { "napi": "scripts/index.js" @@ -4266,6 +4197,14 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/@npmcli/metavuln-calculator/node_modules/builtins": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/@npmcli/metavuln-calculator/node_modules/chownr": { "version": "2.0.0", "dev": true, @@ -4916,9 +4855,9 @@ } }, "node_modules/@types/diff": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.9.tgz", - "integrity": "sha512-RWVEhh/zGXpAVF/ZChwNnv7r4rvqzJ7lYNSmZSVTxjV0PBLf6Qu7RNg+SUtkpzxmiNkjCx0Xn2tPp7FIkshJwQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.2.1.tgz", + "integrity": "sha512-uxpcuwWJGhe2AR1g8hD9F5OYGCqjqWnBUQFD8gMZsDbv8oPHzxJF6iMO6n8Tk0AdzlxoaaoQhOYlIg/PukVU8g==", "dev": true }, "node_modules/@types/fs-extra": { @@ -4995,10 +4934,9 @@ "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "version": "7.0.11", + "dev": true, + "license": "MIT" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -5024,9 +4962,9 @@ } }, "node_modules/@types/lodash": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", - "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.1.tgz", + "integrity": "sha512-X+2qazGS3jxLAIz5JDXDzglAF3KpijdhFxlf/V1+hEsOUc+HnWi81L/uv/EvGuV90WY+7mPGFCUDGfQC3Gj95Q==", "dev": true }, "node_modules/@types/lodash-deep": { @@ -5051,9 +4989,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.19.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.26.tgz", - "integrity": "sha512-+wiMJsIwLOYCvUqSdKTrfkS8mpTp+MPINe6+Np4TAGFWWRWiBQ5kSq9nZGCSPkzx9mvT+uEukzpX4MOSCydcvw==", + "version": "18.19.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", + "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -5120,10 +5058,9 @@ } }, "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true + "version": "7.3.12", + "dev": true, + "license": "MIT" }, "node_modules/@types/sizzle": { "version": "2.3.4", @@ -5158,9 +5095,9 @@ "license": "MIT" }, "node_modules/@types/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/@types/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-ThA1WD8aDdVU4VLuyq5NEqriwXErF5gEIJeyT6gHBWU7JtSmW2a5qjNv3/vR82O20mW+1vhmeZJfBQPT3HCugg==", + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/@types/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-IznnlmU5f4WcGTh2ltRu/Ijpmk8wiWXfF0VA4s+HPjHZgvFggk1YaIkbo5krX/zUCzWF8N/l4+W/LNxnvAJ8nw==", "dev": true, "dependencies": { "@types/node": "*", @@ -5201,22 +5138,20 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.3.1.tgz", - "integrity": "sha512-STEDMVQGww5lhCuNXVSQfbfuNII5E08QWkvAw5Qwf+bj2WT+JkG1uc+5/vXA3AOYMDHVOSpL+9rcbEUiHIm2dw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.9.0.tgz", + "integrity": "sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.3.1", - "@typescript-eslint/type-utils": "7.3.1", - "@typescript-eslint/utils": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1", - "debug": "^4.3.4", + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/type-utils": "7.9.0", + "@typescript-eslint/utils": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0", "graphemer": "^1.4.0", - "ignore": "^5.2.4", + "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5236,13 +5171,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.3.1.tgz", - "integrity": "sha512-fVS6fPxldsKY2nFvyT7IP78UO1/I2huG+AYu5AMjCT9wtl6JFiDnsv4uad4jQ0GTFzcUV5HShVeN96/17bTBag==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz", + "integrity": "sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1" + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5253,18 +5188,15 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.3.1.tgz", - "integrity": "sha512-jIERm/6bYQ9HkynYlNZvXpzmXWZGhMbrOvq3jJzOSOlKXsVjrrolzWBjDW6/TvT5Q3WqaN4EkmcfdQwi9tDjBQ==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.9.0.tgz", + "integrity": "sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.3.1", - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/typescript-estree": "7.3.1", - "semver": "^7.5.4" + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/typescript-estree": "7.9.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5278,15 +5210,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.3.1.tgz", - "integrity": "sha512-Rq49+pq7viTRCH48XAbTA+wdLRrB/3sRq4Lpk0oGDm0VmnjBrAOVXH/Laalmwsv2VpekiEfVFwJYVk6/e8uvQw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.9.0.tgz", + "integrity": "sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.3.1", - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/typescript-estree": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1", + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/typescript-estree": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0", "debug": "^4.3.4" }, "engines": { @@ -5306,13 +5238,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.3.1.tgz", - "integrity": "sha512-fVS6fPxldsKY2nFvyT7IP78UO1/I2huG+AYu5AMjCT9wtl6JFiDnsv4uad4jQ0GTFzcUV5HShVeN96/17bTBag==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz", + "integrity": "sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1" + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5375,15 +5307,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.3.1.tgz", - "integrity": "sha512-iFhaysxFsMDQlzJn+vr3OrxN8NmdQkHks4WaqD4QBnt5hsq234wcYdyQ9uquzJJIDAj5W4wQne3yEsYA6OmXGw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.9.0.tgz", + "integrity": "sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.3.1", - "@typescript-eslint/utils": "7.3.1", + "@typescript-eslint/typescript-estree": "7.9.0", + "@typescript-eslint/utils": "7.9.0", "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" + "ts-api-utils": "^1.3.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5402,13 +5334,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.3.1.tgz", - "integrity": "sha512-fVS6fPxldsKY2nFvyT7IP78UO1/I2huG+AYu5AMjCT9wtl6JFiDnsv4uad4jQ0GTFzcUV5HShVeN96/17bTBag==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz", + "integrity": "sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1" + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5419,18 +5351,15 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.3.1.tgz", - "integrity": "sha512-jIERm/6bYQ9HkynYlNZvXpzmXWZGhMbrOvq3jJzOSOlKXsVjrrolzWBjDW6/TvT5Q3WqaN4EkmcfdQwi9tDjBQ==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.9.0.tgz", + "integrity": "sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.3.1", - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/typescript-estree": "7.3.1", - "semver": "^7.5.4" + "@typescript-eslint/scope-manager": "7.9.0", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/typescript-estree": "7.9.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5444,9 +5373,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.3.1.tgz", - "integrity": "sha512-2tUf3uWggBDl4S4183nivWQ2HqceOZh1U4hhu4p1tPiIJoRRXrab7Y+Y0p+dozYwZVvLPRI6r5wKe9kToF9FIw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.9.0.tgz", + "integrity": "sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5457,19 +5386,19 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.3.1.tgz", - "integrity": "sha512-tLpuqM46LVkduWP7JO7yVoWshpJuJzxDOPYIVWUUZbW+4dBpgGeUdl/fQkhuV0A8eGnphYw3pp8d2EnvPOfxmQ==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz", + "integrity": "sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.3.1", - "@typescript-eslint/visitor-keys": "7.3.1", + "@typescript-eslint/types": "7.9.0", + "@typescript-eslint/visitor-keys": "7.9.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5494,9 +5423,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -5596,13 +5525,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.3.1.tgz", - "integrity": "sha512-9RMXwQF8knsZvfv9tdi+4D/j7dMG28X/wMJ8Jj6eOHyHWwDW4ngQJcqEczSsqIKKjFiLFr40Mnr7a5ulDD3vmw==", + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz", + "integrity": "sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.3.1", - "eslint-visitor-keys": "^3.4.1" + "@typescript-eslint/types": "7.9.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5631,9 +5560,9 @@ "dev": true }, "node_modules/@vercel/nft": { - "version": "0.26.4", - "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.26.4.tgz", - "integrity": "sha512-j4jCOOXke2t8cHZCIxu1dzKLHLcFmYzC3yqAK6MfZznOL1QIJKd0xcFsXK3zcqzU7ScsE2zWkiMMNHGMHgp+FA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.26.5.tgz", + "integrity": "sha512-NHxohEqad6Ra/r4lGknO52uc/GrWILXAMs1BB4401GTqww0fw1bAqzpG1XHuDO+dprg4GvsD9ZLLSsdo78p9hQ==", "dev": true, "dependencies": { "@mapbox/node-pre-gyp": "^1.0.5", @@ -5774,9 +5703,9 @@ } }, "node_modules/acorn-import-attributes": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.2.tgz", - "integrity": "sha512-O+nfJwNolEA771IYJaiLWK1UAwjNsQmZbTRqqwBYxCgVQTmpFEMvBw6LOIQV0Me339L5UMVYFyRohGnGlQDdIQ==", + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, "peerDependencies": { "acorn": "^8" @@ -6074,9 +6003,9 @@ "license": "MIT" }, "node_modules/ava": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/ava/-/ava-6.1.2.tgz", - "integrity": "sha512-WcpxJ8yZ7mk9ABTinD0IAjcemovSeVGjuuwZx0JS9johREWFeLTl8UP6wd7l6nmnrWqkKZdwaD71a/ocH4qPKw==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/ava/-/ava-6.1.3.tgz", + "integrity": "sha512-tkKbpF1pIiC+q09wNU9OfyTDYZa8yuWvU2up3+lFJ3lr1RmnYh2GBpPwzYUEB0wvTPIUysGjcZLNZr7STDviRA==", "dev": true, "dependencies": { "@vercel/nft": "^0.26.2", @@ -6124,7 +6053,7 @@ "ava": "entrypoints/cli.mjs" }, "engines": { - "node": "^18.18 || ^20.8 || ^21" + "node": "^18.18 || ^20.8 || ^21 || ^22" }, "peerDependencies": { "@ava/typescript": "*" @@ -6260,9 +6189,9 @@ "license": "MIT" }, "node_modules/ava/node_modules/p-map": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.1.tgz", - "integrity": "sha512-2wnaR0XL/FDOj+TgpDuRb2KTjLnu3Fma6b1ZUwGY7LcqenMcvP/YFpjpbPKY6WVGsbuJZRuoUz8iPrt8ORnAFw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.2.tgz", + "integrity": "sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q==", "dev": true, "engines": { "node": ">=18" @@ -6910,14 +6839,6 @@ "node": ">=10.0.0" } }, - "node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dependencies": { - "semver": "^7.0.0" - } - }, "node_modules/bytes": { "version": "3.0.0", "dev": true, @@ -7289,9 +7210,9 @@ } }, "node_modules/cli-table3": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.4.tgz", - "integrity": "sha512-Lm3L0p+/npIQWNIiyF/nAn7T5dnOwR3xNTHXYEBFBFVPXzCVNZ5lqEC/1eo/EVfpDsQ1I+TX4ORPQgp+UI0CRw==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", "dependencies": { "string-width": "^4.2.0" }, @@ -8675,9 +8596,9 @@ } }, "node_modules/diff2html": { - "version": "3.4.47", - "resolved": "https://registry.npmjs.org/diff2html/-/diff2html-3.4.47.tgz", - "integrity": "sha512-2llDp8750FRUJl8n7apM0tlcqZYxbDHTw7qhzv/kGddByHRpn3Xg/sWHHIy34h492aGSpStEULydxqrITYpuoA==", + "version": "3.4.48", + "resolved": "https://registry.npmjs.org/diff2html/-/diff2html-3.4.48.tgz", + "integrity": "sha512-1lzNSg0G0VPKZPTyi4knzV2nAWTXBy/QaWCKzDto6iEIlcuOJEG0li4bElJfpHNz+pBqPu4AcC1i9ZCo9KMUOg==", "dev": true, "dependencies": { "diff": "5.1.0", @@ -8761,9 +8682,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz", + "integrity": "sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -8775,8 +8696,7 @@ }, "node_modules/entities": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", "engines": { "node": ">=0.12" }, @@ -8974,9 +8894,9 @@ } }, "node_modules/eslint-plugin-unused-imports": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.1.0.tgz", - "integrity": "sha512-9l1YFCzXKkw1qtAru1RWUtG2EVDZY0a0eChKXcL+EZ5jitG7qxdctu4RnvhOJHv4xfmUf7h+JJPINlVpGhZMrw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.2.0.tgz", + "integrity": "sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==", "dev": true, "dependencies": { "eslint-rule-composer": "^0.3.0" @@ -10024,9 +9944,9 @@ "license": "MIT" }, "node_modules/hosted-git-info": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.1.tgz", - "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", "dependencies": { "lru-cache": "^10.0.1" }, @@ -10138,9 +10058,10 @@ "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.2.4", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } @@ -12045,8 +11966,7 @@ }, "node_modules/linkify-it": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "license": "MIT", "dependencies": { "uc.micro": "^2.0.0" } @@ -12287,8 +12207,7 @@ }, "node_modules/markdown-it": { "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "license": "MIT", "dependencies": { "argparse": "^2.0.1", "entities": "^4.4.0", @@ -12351,8 +12270,7 @@ }, "node_modules/mdurl": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==" + "license": "MIT" }, "node_modules/memoize": { "version": "10.0.0", @@ -12796,9 +12714,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", + "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", "dev": true, "bin": { "node-gyp-build": "bin.js", @@ -13088,6 +13006,14 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/npm-lockfile/node_modules/builtins": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/npm-lockfile/node_modules/chownr": { "version": "2.0.0", "dev": true, @@ -13439,12 +13365,12 @@ "license": "ISC" }, "node_modules/npm-package-arg": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.1.tgz", - "integrity": "sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz", + "integrity": "sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw==", "dependencies": { "hosted-git-info": "^7.0.0", - "proc-log": "^3.0.0", + "proc-log": "^4.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^5.0.0" }, @@ -13453,9 +13379,9 @@ } }, "node_modules/npm-package-arg/node_modules/proc-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", - "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -13558,6 +13484,14 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/npm-pick-manifest/node_modules/builtins": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/npm-pick-manifest/node_modules/hosted-git-info": { "version": "5.1.0", "dev": true, @@ -13886,17 +13820,17 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -14486,14 +14420,15 @@ "license": "MIT" }, "node_modules/path-scurry": { - "version": "1.10.1", - "license": "BlueOak-1.0.0", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -15108,8 +15043,7 @@ }, "node_modules/punycode.js": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", - "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "license": "MIT", "engines": { "node": ">=6" } @@ -15184,9 +15118,9 @@ } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, "node_modules/read": { "version": "3.0.1", @@ -15530,9 +15464,9 @@ "license": "MIT" }, "node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.7.tgz", + "integrity": "sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==", "dependencies": { "glob": "^10.3.7" }, @@ -15540,7 +15474,7 @@ "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -15555,30 +15489,30 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.3.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", + "integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", + "jackspeak": "^2.3.6", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "minipass": "^7.0.4", + "path-scurry": "^1.11.0" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -15590,9 +15524,9 @@ } }, "node_modules/rimraf/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.1.tgz", + "integrity": "sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==", "engines": { "node": ">=16 || 14 >=14.17" } @@ -15667,11 +15601,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "bin": { "semver": "bin/semver.js" }, @@ -15679,20 +15611,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/serialize-error": { "version": "7.0.1", "dev": true, @@ -16965,9 +16883,9 @@ } }, "node_modules/typedoc": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.12.tgz", - "integrity": "sha512-F+qhkK2VoTweDXd1c42GS/By2DvI2uDF4/EpG424dTexSHdtCH52C6IcAvMA6jR3DzAWZjHpUOW+E02kyPNUNw==", + "version": "0.25.13", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz", + "integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==", "dev": true, "dependencies": { "lunr": "^2.3.9", @@ -16995,9 +16913,9 @@ } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -17010,9 +16928,9 @@ } }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -17024,8 +16942,7 @@ }, "node_modules/uc.micro": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==" + "license": "MIT" }, "node_modules/uglify-js": { "version": "3.17.3", @@ -17183,12 +17100,9 @@ } }, "node_modules/validate-npm-package-name": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", - "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", - "dependencies": { - "builtins": "^5.0.0" - }, + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz", + "integrity": "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -17360,6 +17274,15 @@ "underscore": "^1.13.0-2" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "dev": true, @@ -17900,9 +17823,9 @@ } }, "packages/zosfiles/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dependencies": { "brace-expansion": "^2.0.1" }, diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index a9f7d36286..6872662ec5 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -120,6 +120,15 @@ LTS Breaking: Removed the following previously deprecated items: [#1981](https:/ - Major: First major version bump for V3 +## `7.25.0` + +- Enhancement: Added the ability to set JCL reader properties for `--jobRecordLength`, `--jobRecordFormat` and `--jobEncoding` on the `zowe jobs submit local-file` and `zowe jobs submit stdin` commands. [#2139](https://github.com/zowe/zowe-cli/pull/2139) +- Enhancement: Added the ability to download job spool files using other codepages with `--encoding` on the `zowe jobs download output`, `zowe jobs view spool-file-by-id` and `zowe jobs view all-spool-content` commands. This allows users to download job spool files in other languages (i.e. IBM-1147 for French). [#1822](https://github.com/zowe/zowe-cli/pull/1822) + +## `7.24.2` + +- BugFix: Fixed `zowe daemon enable` installing an invalid daemon binary on macOS. [#2126](https://github.com/zowe/zowe-cli/pull/2126) + ## `7.24.0` - Enhancement: Prompt for user/password on SSH commands when a token is stored in the config. [#2081](https://github.com/zowe/zowe-cli/pull/2081) diff --git a/packages/cli/__tests__/auth/__integration__/__snapshots__/cli.auth.apiml.integration.test.ts.snap b/packages/cli/__tests__/auth/__integration__/__snapshots__/cli.auth.apiml.integration.test.ts.snap index 14dc8baae8..f73046a812 100644 --- a/packages/cli/__tests__/auth/__integration__/__snapshots__/cli.auth.apiml.integration.test.ts.snap +++ b/packages/cli/__tests__/auth/__integration__/__snapshots__/cli.auth.apiml.integration.test.ts.snap @@ -154,7 +154,7 @@ exports[`auth login/logout apiml help should display the logout help 1`] = ` The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'. - Allowed values: ^apimlAuthenticationToken.*, jwtToken, LtpaToken2 + Allowed values: apimlAuthenticationToken.*, jwtToken, LtpaToken2 --token-value | --tv (string) @@ -209,8 +209,8 @@ exports[`auth login/logout apiml help should display the logout help 1`] = ` \\"success\\": true, \\"exitCode\\": 0, \\"message\\": \\"The help was constructed for command: apiml.\\", - \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n apiml\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Log out of the Zowe API Mediation Layer authentication service and revoke the\\\\n token so it can no longer authenticate. Also remove the token from the default\\\\n base profile, if it is stored on disk.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe auth logout apiml [options]\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n Host name of service on the mainframe.\\\\n\\\\n --port | -P (number)\\\\n\\\\n Port number of service on the mainframe.\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n Allowed values: ^apimlAuthenticationToken.*, jwtToken, LtpaToken2\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Log out of an API ML instance to revoke the token that was\\\\n in use and remove it from your base profile:\\\\n\\\\n $ zowe auth logout apiml\\\\n\\\\n - Log out of an API ML instance to revoke a token that was\\\\n not stored in a profile:\\\\n\\\\n $ zowe auth logout apiml --token-value \\\\n\\\\n\\", + \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n apiml\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Log out of the Zowe API Mediation Layer authentication service and revoke the\\\\n token so it can no longer authenticate. Also remove the token from the default\\\\n base profile, if it is stored on disk.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe auth logout apiml [options]\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n Host name of service on the mainframe.\\\\n\\\\n --port | -P (number)\\\\n\\\\n Port number of service on the mainframe.\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n Allowed values: apimlAuthenticationToken.*, jwtToken, LtpaToken2\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Log out of an API ML instance to revoke the token that was\\\\n in use and remove it from your base profile:\\\\n\\\\n $ zowe auth logout apiml\\\\n\\\\n - Log out of an API ML instance to revoke a token that was\\\\n not stored in a profile:\\\\n\\\\n $ zowe auth logout apiml --token-value \\\\n\\\\n\\", \\"stderr\\": \\"\\", - \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n apiml\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Log out of the Zowe API Mediation Layer authentication service and revoke the\\\\n token so it can no longer authenticate. Also remove the token from the default\\\\n base profile, if it is stored on disk.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe auth logout apiml [options]\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n Host name of service on the mainframe.\\\\n\\\\n --port | -P (number)\\\\n\\\\n Port number of service on the mainframe.\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n Allowed values: ^apimlAuthenticationToken.*, jwtToken, LtpaToken2\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Log out of an API ML instance to revoke the token that was\\\\n in use and remove it from your base profile:\\\\n\\\\n $ zowe auth logout apiml\\\\n\\\\n - Log out of an API ML instance to revoke a token that was\\\\n not stored in a profile:\\\\n\\\\n $ zowe auth logout apiml --token-value \\\\n\\\\n\\" + \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n apiml\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Log out of the Zowe API Mediation Layer authentication service and revoke the\\\\n token so it can no longer authenticate. Also remove the token from the default\\\\n base profile, if it is stored on disk.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe auth logout apiml [options]\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n Host name of service on the mainframe.\\\\n\\\\n --port | -P (number)\\\\n\\\\n Port number of service on the mainframe.\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n Allowed values: apimlAuthenticationToken.*, jwtToken, LtpaToken2\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Log out of an API ML instance to revoke the token that was\\\\n in use and remove it from your base profile:\\\\n\\\\n $ zowe auth logout apiml\\\\n\\\\n - Log out of an API ML instance to revoke a token that was\\\\n not stored in a profile:\\\\n\\\\n $ zowe auth logout apiml --token-value \\\\n\\\\n\\" }" `; diff --git a/packages/cli/__tests__/zosjobs/__integration__/download/__snapshots__/cli.zos-jobs.download.output.integration.test.ts.snap b/packages/cli/__tests__/zosjobs/__integration__/download/__snapshots__/cli.zos-jobs.download.output.integration.test.ts.snap index 8d3dff4be8..5be065e078 100644 --- a/packages/cli/__tests__/zosjobs/__integration__/download/__snapshots__/cli.zos-jobs.download.output.integration.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__integration__/download/__snapshots__/cli.zos-jobs.download.output.integration.test.ts.snap @@ -88,6 +88,11 @@ exports[`zos-jobs download output command should display the help 1`] = ` If specified, job output will be downloaded in record format instead of performing text conversion. Conflicts with binary. + --encoding | --ec (string) + + Download the spool file content with encoding mode, which means that data + conversion is performed using the file encoding specified. + ZOSMF CONNECTION OPTIONS ------------------------ @@ -190,8 +195,8 @@ exports[`zos-jobs download output command should display the help 1`] = ` \\"success\\": true, \\"exitCode\\": 0, \\"message\\": \\"The help was constructed for command: output.\\", - \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n output | o\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Download all job output to a local directory. Each spool DD will be downloaded\\\\n to its own file in the directory.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs download output [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --directory | -d | --dir (string)\\\\n\\\\n The local directory you would like to download the output for the job to.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Defaults to '.txt'.\\\\n\\\\n --omit-jobid-directory | --ojd (boolean)\\\\n\\\\n If specified, job output will be saved directly to the specified directory\\\\n rather than creating a subdirectory named after the ID of the job.\\\\n\\\\n --binary | -b (boolean)\\\\n\\\\n If specified, job output will be downloaded in binary format instead of\\\\n performing text conversion. Conflicts with record.\\\\n\\\\n --record | -r (boolean)\\\\n\\\\n If specified, job output will be downloaded in record format instead of\\\\n performing text conversion. Conflicts with binary.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Download all the output of the job with job ID JOB00234 to\\\\n an automatically generated directory.:\\\\n\\\\n $ zowe zos-jobs download output JOB00234\\\\n\\\\n\\", + \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n output | o\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Download all job output to a local directory. Each spool DD will be downloaded\\\\n to its own file in the directory.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs download output [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --directory | -d | --dir (string)\\\\n\\\\n The local directory you would like to download the output for the job to.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Defaults to '.txt'.\\\\n\\\\n --omit-jobid-directory | --ojd (boolean)\\\\n\\\\n If specified, job output will be saved directly to the specified directory\\\\n rather than creating a subdirectory named after the ID of the job.\\\\n\\\\n --binary | -b (boolean)\\\\n\\\\n If specified, job output will be downloaded in binary format instead of\\\\n performing text conversion. Conflicts with record.\\\\n\\\\n --record | -r (boolean)\\\\n\\\\n If specified, job output will be downloaded in record format instead of\\\\n performing text conversion. Conflicts with binary.\\\\n\\\\n --encoding | --ec (string)\\\\n\\\\n Download the spool file content with encoding mode, which means that data\\\\n conversion is performed using the file encoding specified.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Download all the output of the job with job ID JOB00234 to\\\\n an automatically generated directory.:\\\\n\\\\n $ zowe zos-jobs download output JOB00234\\\\n\\\\n\\", \\"stderr\\": \\"\\", - \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n output | o\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Download all job output to a local directory. Each spool DD will be downloaded\\\\n to its own file in the directory.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs download output [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --directory | -d | --dir (string)\\\\n\\\\n The local directory you would like to download the output for the job to.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Defaults to '.txt'.\\\\n\\\\n --omit-jobid-directory | --ojd (boolean)\\\\n\\\\n If specified, job output will be saved directly to the specified directory\\\\n rather than creating a subdirectory named after the ID of the job.\\\\n\\\\n --binary | -b (boolean)\\\\n\\\\n If specified, job output will be downloaded in binary format instead of\\\\n performing text conversion. Conflicts with record.\\\\n\\\\n --record | -r (boolean)\\\\n\\\\n If specified, job output will be downloaded in record format instead of\\\\n performing text conversion. Conflicts with binary.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Download all the output of the job with job ID JOB00234 to\\\\n an automatically generated directory.:\\\\n\\\\n $ zowe zos-jobs download output JOB00234\\\\n\\\\n\\" + \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n output | o\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Download all job output to a local directory. Each spool DD will be downloaded\\\\n to its own file in the directory.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs download output [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --directory | -d | --dir (string)\\\\n\\\\n The local directory you would like to download the output for the job to.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Defaults to '.txt'.\\\\n\\\\n --omit-jobid-directory | --ojd (boolean)\\\\n\\\\n If specified, job output will be saved directly to the specified directory\\\\n rather than creating a subdirectory named after the ID of the job.\\\\n\\\\n --binary | -b (boolean)\\\\n\\\\n If specified, job output will be downloaded in binary format instead of\\\\n performing text conversion. Conflicts with record.\\\\n\\\\n --record | -r (boolean)\\\\n\\\\n If specified, job output will be downloaded in record format instead of\\\\n performing text conversion. Conflicts with binary.\\\\n\\\\n --encoding | --ec (string)\\\\n\\\\n Download the spool file content with encoding mode, which means that data\\\\n conversion is performed using the file encoding specified.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Download all the output of the job with job ID JOB00234 to\\\\n an automatically generated directory.:\\\\n\\\\n $ zowe zos-jobs download output JOB00234\\\\n\\\\n\\" }" `; diff --git a/packages/cli/__tests__/zosjobs/__integration__/submit/local-file/__snapshots__/cli.zos-jobs.submit.local-file.integration.test.ts.snap b/packages/cli/__tests__/zosjobs/__integration__/submit/local-file/__snapshots__/cli.zos-jobs.submit.local-file.integration.test.ts.snap index 7ac2b54bbc..87164ff335 100644 --- a/packages/cli/__tests__/zosjobs/__integration__/submit/local-file/__snapshots__/cli.zos-jobs.submit.local-file.integration.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__integration__/submit/local-file/__snapshots__/cli.zos-jobs.submit.local-file.integration.test.ts.snap @@ -60,6 +60,25 @@ exports[`zos-jobs submit local-file command should display the help 1`] = ` symbol2='value 2 with spaces' ...\\". To embed a single quote in a value, use two single quotes: \\"NAME=O''Brian\\". + --job-encoding | --je (string) + + The encoding that should be used to read the JCL into the z/OSMF JCL reader. JCL + will be converted into this codepage from UTF-8 for the JES subsystem to parse. + + --job-record-length | --jrl (number) + + The logical record length of the JCL being submitted. + + Default value: 80 + + --job-record-format | --jrf (string) + + The record format of the JCL being submitted, where V is variable, and F is + fixed. + + Default value: F + Allowed values: F, V + ZOSMF CONNECTION OPTIONS ------------------------ @@ -197,9 +216,9 @@ exports[`zos-jobs submit local-file command should display the help 1`] = ` \\"success\\": true, \\"exitCode\\": 0, \\"message\\": \\"The help was constructed for command: local-file.\\", - \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n local-file | lf\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Submit a job (JCL) contained in a local file. The command presents errors\\\\n verbatim from the z/OSMF Jobs REST endpoints. For more information about z/OSMF\\\\n Jobs API errors, see the z/OSMF Jobs API REST documentation.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs submit local-file [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n localFile\\\\t\\\\t (string)\\\\n\\\\n The local file containing the JCL to submit.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --wait-for-active | --wfa (boolean)\\\\n\\\\n Wait for the job to enter ACTIVE status before completing the command.\\\\n\\\\n --wait-for-output | --wfo (boolean)\\\\n\\\\n Wait for the job to enter OUTPUT status before completing the command.\\\\n\\\\n --view-all-spool-content | --vasc (boolean)\\\\n\\\\n Print all spool output. If you use this option you will wait for the job to\\\\n complete.\\\\n\\\\n --directory | -d (string)\\\\n\\\\n The local directory you would like to download the output of the job. Creates a\\\\n subdirectory using the jobID as the name and files are titled based on DD names.\\\\n If you use this option you will wait for the job to complete.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Default is '.txt'.\\\\n\\\\n --jcl-symbols | --js (string)\\\\n\\\\n A string of JCL symbols to use for substitution. For symbol values with no\\\\n spaces: \\\\\\"symbol1=value1 symbol2=value2 ...\\\\\\". When a value contains spaces,\\\\n enclose the value in single quotes: \\\\\\"symbol1='value 1 with spaces'\\\\n symbol2='value 2 with spaces' ...\\\\\\". To embed a single quote in a value, use two\\\\n single quotes: \\\\\\"NAME=O''Brian\\\\\\".\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n RESPONSE FORMAT OPTIONS\\\\n -----------------------\\\\n\\\\n --response-format-filter | --rff (array)\\\\n\\\\n Filter (include) fields in the response. Accepts an array of field/property\\\\n names to include in the output response. You can filter JSON objects properties\\\\n OR table columns/fields. In addition, you can use this option in conjunction\\\\n with '--response-format-type' to reduce the output of a command to a single\\\\n field/property or a list of a single field/property.\\\\n\\\\n --response-format-type | --rft (string)\\\\n\\\\n The command response output format type. Must be one of the following:\\\\n\\\\n table: Formats output data as a table. Use this option when the output data is\\\\n an array of homogeneous JSON objects. Each property of the object will become a\\\\n column in the table.\\\\n\\\\n list: Formats output data as a list of strings. Can be used on any data type\\\\n (JSON objects/arrays) are stringified and a new line is added after each entry\\\\n in an array.\\\\n\\\\n object: Formats output data as a list of prettified objects (or single object).\\\\n Can be used in place of \\\\\\"table\\\\\\" to change from tabular output to a list of\\\\n prettified objects.\\\\n\\\\n string: Formats output data as a string. JSON objects/arrays are stringified.\\\\n\\\\n Allowed values: table, list, object, string\\\\n\\\\n --response-format-header | --rfh (boolean)\\\\n\\\\n If \\\\\\"--response-format-type table\\\\\\" is specified, include the column headers in\\\\n the output.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\":\\\\n\\\\n $ zowe zos-jobs submit local-file \\\\\\"iefbr14.txt\\\\\\"\\\\n\\\\n\\", + \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n local-file | lf\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Submit a job (JCL) contained in a local file. The command presents errors\\\\n verbatim from the z/OSMF Jobs REST endpoints. For more information about z/OSMF\\\\n Jobs API errors, see the z/OSMF Jobs API REST documentation.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs submit local-file [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n localFile\\\\t\\\\t (string)\\\\n\\\\n The local file containing the JCL to submit.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --wait-for-active | --wfa (boolean)\\\\n\\\\n Wait for the job to enter ACTIVE status before completing the command.\\\\n\\\\n --wait-for-output | --wfo (boolean)\\\\n\\\\n Wait for the job to enter OUTPUT status before completing the command.\\\\n\\\\n --view-all-spool-content | --vasc (boolean)\\\\n\\\\n Print all spool output. If you use this option you will wait for the job to\\\\n complete.\\\\n\\\\n --directory | -d (string)\\\\n\\\\n The local directory you would like to download the output of the job. Creates a\\\\n subdirectory using the jobID as the name and files are titled based on DD names.\\\\n If you use this option you will wait for the job to complete.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Default is '.txt'.\\\\n\\\\n --jcl-symbols | --js (string)\\\\n\\\\n A string of JCL symbols to use for substitution. For symbol values with no\\\\n spaces: \\\\\\"symbol1=value1 symbol2=value2 ...\\\\\\". When a value contains spaces,\\\\n enclose the value in single quotes: \\\\\\"symbol1='value 1 with spaces'\\\\n symbol2='value 2 with spaces' ...\\\\\\". To embed a single quote in a value, use two\\\\n single quotes: \\\\\\"NAME=O''Brian\\\\\\".\\\\n\\\\n --job-encoding | --je (string)\\\\n\\\\n The encoding that should be used to read the JCL into the z/OSMF JCL reader. JCL\\\\n will be converted into this codepage from UTF-8 for the JES subsystem to parse.\\\\n\\\\n --job-record-length | --jrl (number)\\\\n\\\\n The logical record length of the JCL being submitted.\\\\n\\\\n Default value: 80\\\\n\\\\n --job-record-format | --jrf (string)\\\\n\\\\n The record format of the JCL being submitted, where V is variable, and F is\\\\n fixed.\\\\n\\\\n Default value: F\\\\n Allowed values: F, V\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n RESPONSE FORMAT OPTIONS\\\\n -----------------------\\\\n\\\\n --response-format-filter | --rff (array)\\\\n\\\\n Filter (include) fields in the response. Accepts an array of field/property\\\\n names to include in the output response. You can filter JSON objects properties\\\\n OR table columns/fields. In addition, you can use this option in conjunction\\\\n with '--response-format-type' to reduce the output of a command to a single\\\\n field/property or a list of a single field/property.\\\\n\\\\n --response-format-type | --rft (string)\\\\n\\\\n The command response output format type. Must be one of the following:\\\\n\\\\n table: Formats output data as a table. Use this option when the output data is\\\\n an array of homogeneous JSON objects. Each property of the object will become a\\\\n column in the table.\\\\n\\\\n list: Formats output data as a list of strings. Can be used on any data type\\\\n (JSON objects/arrays) are stringified and a new line is added after each entry\\\\n in an array.\\\\n\\\\n object: Formats output data as a list of prettified objects (or single object).\\\\n Can be used in place of \\\\\\"table\\\\\\" to change from tabular output to a list of\\\\n prettified objects.\\\\n\\\\n string: Formats output data as a string. JSON objects/arrays are stringified.\\\\n\\\\n Allowed values: table, list, object, string\\\\n\\\\n --response-format-header | --rfh (boolean)\\\\n\\\\n If \\\\\\"--response-format-type table\\\\\\" is specified, include the column headers in\\\\n the output.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\":\\\\n\\\\n $ zowe zos-jobs submit local-file \\\\\\"iefbr14.txt\\\\\\"\\\\n\\\\n\\", \\"stderr\\": \\"\\", - \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n local-file | lf\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Submit a job (JCL) contained in a local file. The command presents errors\\\\n verbatim from the z/OSMF Jobs REST endpoints. For more information about z/OSMF\\\\n Jobs API errors, see the z/OSMF Jobs API REST documentation.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs submit local-file [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n localFile\\\\t\\\\t (string)\\\\n\\\\n The local file containing the JCL to submit.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --wait-for-active | --wfa (boolean)\\\\n\\\\n Wait for the job to enter ACTIVE status before completing the command.\\\\n\\\\n --wait-for-output | --wfo (boolean)\\\\n\\\\n Wait for the job to enter OUTPUT status before completing the command.\\\\n\\\\n --view-all-spool-content | --vasc (boolean)\\\\n\\\\n Print all spool output. If you use this option you will wait for the job to\\\\n complete.\\\\n\\\\n --directory | -d (string)\\\\n\\\\n The local directory you would like to download the output of the job. Creates a\\\\n subdirectory using the jobID as the name and files are titled based on DD names.\\\\n If you use this option you will wait for the job to complete.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Default is '.txt'.\\\\n\\\\n --jcl-symbols | --js (string)\\\\n\\\\n A string of JCL symbols to use for substitution. For symbol values with no\\\\n spaces: \\\\\\"symbol1=value1 symbol2=value2 ...\\\\\\". When a value contains spaces,\\\\n enclose the value in single quotes: \\\\\\"symbol1='value 1 with spaces'\\\\n symbol2='value 2 with spaces' ...\\\\\\". To embed a single quote in a value, use two\\\\n single quotes: \\\\\\"NAME=O''Brian\\\\\\".\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n RESPONSE FORMAT OPTIONS\\\\n -----------------------\\\\n\\\\n --response-format-filter | --rff (array)\\\\n\\\\n Filter (include) fields in the response. Accepts an array of field/property\\\\n names to include in the output response. You can filter JSON objects properties\\\\n OR table columns/fields. In addition, you can use this option in conjunction\\\\n with '--response-format-type' to reduce the output of a command to a single\\\\n field/property or a list of a single field/property.\\\\n\\\\n --response-format-type | --rft (string)\\\\n\\\\n The command response output format type. Must be one of the following:\\\\n\\\\n table: Formats output data as a table. Use this option when the output data is\\\\n an array of homogeneous JSON objects. Each property of the object will become a\\\\n column in the table.\\\\n\\\\n list: Formats output data as a list of strings. Can be used on any data type\\\\n (JSON objects/arrays) are stringified and a new line is added after each entry\\\\n in an array.\\\\n\\\\n object: Formats output data as a list of prettified objects (or single object).\\\\n Can be used in place of \\\\\\"table\\\\\\" to change from tabular output to a list of\\\\n prettified objects.\\\\n\\\\n string: Formats output data as a string. JSON objects/arrays are stringified.\\\\n\\\\n Allowed values: table, list, object, string\\\\n\\\\n --response-format-header | --rfh (boolean)\\\\n\\\\n If \\\\\\"--response-format-type table\\\\\\" is specified, include the column headers in\\\\n the output.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\":\\\\n\\\\n $ zowe zos-jobs submit local-file \\\\\\"iefbr14.txt\\\\\\"\\\\n\\\\n\\" + \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n local-file | lf\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Submit a job (JCL) contained in a local file. The command presents errors\\\\n verbatim from the z/OSMF Jobs REST endpoints. For more information about z/OSMF\\\\n Jobs API errors, see the z/OSMF Jobs API REST documentation.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs submit local-file [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n localFile\\\\t\\\\t (string)\\\\n\\\\n The local file containing the JCL to submit.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --wait-for-active | --wfa (boolean)\\\\n\\\\n Wait for the job to enter ACTIVE status before completing the command.\\\\n\\\\n --wait-for-output | --wfo (boolean)\\\\n\\\\n Wait for the job to enter OUTPUT status before completing the command.\\\\n\\\\n --view-all-spool-content | --vasc (boolean)\\\\n\\\\n Print all spool output. If you use this option you will wait for the job to\\\\n complete.\\\\n\\\\n --directory | -d (string)\\\\n\\\\n The local directory you would like to download the output of the job. Creates a\\\\n subdirectory using the jobID as the name and files are titled based on DD names.\\\\n If you use this option you will wait for the job to complete.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Default is '.txt'.\\\\n\\\\n --jcl-symbols | --js (string)\\\\n\\\\n A string of JCL symbols to use for substitution. For symbol values with no\\\\n spaces: \\\\\\"symbol1=value1 symbol2=value2 ...\\\\\\". When a value contains spaces,\\\\n enclose the value in single quotes: \\\\\\"symbol1='value 1 with spaces'\\\\n symbol2='value 2 with spaces' ...\\\\\\". To embed a single quote in a value, use two\\\\n single quotes: \\\\\\"NAME=O''Brian\\\\\\".\\\\n\\\\n --job-encoding | --je (string)\\\\n\\\\n The encoding that should be used to read the JCL into the z/OSMF JCL reader. JCL\\\\n will be converted into this codepage from UTF-8 for the JES subsystem to parse.\\\\n\\\\n --job-record-length | --jrl (number)\\\\n\\\\n The logical record length of the JCL being submitted.\\\\n\\\\n Default value: 80\\\\n\\\\n --job-record-format | --jrf (string)\\\\n\\\\n The record format of the JCL being submitted, where V is variable, and F is\\\\n fixed.\\\\n\\\\n Default value: F\\\\n Allowed values: F, V\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n RESPONSE FORMAT OPTIONS\\\\n -----------------------\\\\n\\\\n --response-format-filter | --rff (array)\\\\n\\\\n Filter (include) fields in the response. Accepts an array of field/property\\\\n names to include in the output response. You can filter JSON objects properties\\\\n OR table columns/fields. In addition, you can use this option in conjunction\\\\n with '--response-format-type' to reduce the output of a command to a single\\\\n field/property or a list of a single field/property.\\\\n\\\\n --response-format-type | --rft (string)\\\\n\\\\n The command response output format type. Must be one of the following:\\\\n\\\\n table: Formats output data as a table. Use this option when the output data is\\\\n an array of homogeneous JSON objects. Each property of the object will become a\\\\n column in the table.\\\\n\\\\n list: Formats output data as a list of strings. Can be used on any data type\\\\n (JSON objects/arrays) are stringified and a new line is added after each entry\\\\n in an array.\\\\n\\\\n object: Formats output data as a list of prettified objects (or single object).\\\\n Can be used in place of \\\\\\"table\\\\\\" to change from tabular output to a list of\\\\n prettified objects.\\\\n\\\\n string: Formats output data as a string. JSON objects/arrays are stringified.\\\\n\\\\n Allowed values: table, list, object, string\\\\n\\\\n --response-format-header | --rfh (boolean)\\\\n\\\\n If \\\\\\"--response-format-type table\\\\\\" is specified, include the column headers in\\\\n the output.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\":\\\\n\\\\n $ zowe zos-jobs submit local-file \\\\\\"iefbr14.txt\\\\\\"\\\\n\\\\n\\" }" `; diff --git a/packages/cli/__tests__/zosjobs/__integration__/submit/stdin/__snapshots__/cli.zos-jobs.submit.stdin.integration.test.ts.snap b/packages/cli/__tests__/zosjobs/__integration__/submit/stdin/__snapshots__/cli.zos-jobs.submit.stdin.integration.test.ts.snap index cb8adc1514..ecda0e1974 100644 --- a/packages/cli/__tests__/zosjobs/__integration__/submit/stdin/__snapshots__/cli.zos-jobs.submit.stdin.integration.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__integration__/submit/stdin/__snapshots__/cli.zos-jobs.submit.stdin.integration.test.ts.snap @@ -88,6 +88,25 @@ exports[`zos-jobs submit command should display the help 1`] = ` symbol2='value 2 with spaces' ...\\". To embed a single quote in a value, use two single quotes: \\"NAME=O''Brian\\". + --job-encoding | --je (string) + + The encoding that should be used to read the JCL into the z/OSMF JCL reader. JCL + will be converted into this codepage from UTF-8 for the JES subsystem to parse. + + --job-record-length | --jrl (number) + + The logical record length of the JCL being submitted. + + Default value: 80 + + --job-record-format | --jrf (string) + + The record format of the JCL being submitted, where V is variable, and F is + fixed. + + Default value: F + Allowed values: F, V + ZOSMF CONNECTION OPTIONS ------------------------ @@ -230,8 +249,8 @@ exports[`zos-jobs submit command should display the help 1`] = ` \\"success\\": true, \\"exitCode\\": 0, \\"message\\": \\"The help was constructed for command: stdin.\\", - \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n stdin | in\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Submit a job (JCL) passed to the command via the stdin stream. The command\\\\n presents errors verbatim from the z/OSMF Jobs REST endpoints. For more\\\\n information about z/OSMF Jobs API errors, see the z/OSMF Jobs API REST\\\\n documentation.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs submit stdin [options]\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --wait-for-active | --wfa (boolean)\\\\n\\\\n Wait for the job to enter ACTIVE status before completing the command.\\\\n\\\\n --wait-for-output | --wfo (boolean)\\\\n\\\\n Wait for the job to enter OUTPUT status before completing the command.\\\\n\\\\n --view-all-spool-content | --vasc (boolean)\\\\n\\\\n Print all spool output. If you use this option you will wait for the job to\\\\n complete.\\\\n\\\\n --directory | -d (string)\\\\n\\\\n The local directory you would like to download the output of the job. Creates a\\\\n subdirectory using the jobID as the name and files are titled based on DD names.\\\\n If you use this option you will wait for the job to complete.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Default is '.txt'.\\\\n\\\\n --jcl-symbols | --js (string)\\\\n\\\\n A string of JCL symbols to use for substitution. For symbol values with no\\\\n spaces: \\\\\\"symbol1=value1 symbol2=value2 ...\\\\\\". When a value contains spaces,\\\\n enclose the value in single quotes: \\\\\\"symbol1='value 1 with spaces'\\\\n symbol2='value 2 with spaces' ...\\\\\\". To embed a single quote in a value, use two\\\\n single quotes: \\\\\\"NAME=O''Brian\\\\\\".\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n RESPONSE FORMAT OPTIONS\\\\n -----------------------\\\\n\\\\n --response-format-filter | --rff (array)\\\\n\\\\n Filter (include) fields in the response. Accepts an array of field/property\\\\n names to include in the output response. You can filter JSON objects properties\\\\n OR table columns/fields. In addition, you can use this option in conjunction\\\\n with '--response-format-type' to reduce the output of a command to a single\\\\n field/property or a list of a single field/property.\\\\n\\\\n --response-format-type | --rft (string)\\\\n\\\\n The command response output format type. Must be one of the following:\\\\n\\\\n table: Formats output data as a table. Use this option when the output data is\\\\n an array of homogeneous JSON objects. Each property of the object will become a\\\\n column in the table.\\\\n\\\\n list: Formats output data as a list of strings. Can be used on any data type\\\\n (JSON objects/arrays) are stringified and a new line is added after each entry\\\\n in an array.\\\\n\\\\n object: Formats output data as a list of prettified objects (or single object).\\\\n Can be used in place of \\\\\\"table\\\\\\" to change from tabular output to a list of\\\\n prettified objects.\\\\n\\\\n string: Formats output data as a string. JSON objects/arrays are stringified.\\\\n\\\\n Allowed values: table, list, object, string\\\\n\\\\n --response-format-header | --rfh (boolean)\\\\n\\\\n If \\\\\\"--response-format-type table\\\\\\" is specified, include the column headers in\\\\n the output.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\" via standard in:\\\\n\\\\n $ zowe zos-jobs submit stdin < iefbr14.txt\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\" via standard in\\\\n from the output of another command:\\\\n\\\\n $ cat iefbr14.txt | zowe zos-jobs submit stdin\\\\n\\\\n\\", + \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n stdin | in\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Submit a job (JCL) passed to the command via the stdin stream. The command\\\\n presents errors verbatim from the z/OSMF Jobs REST endpoints. For more\\\\n information about z/OSMF Jobs API errors, see the z/OSMF Jobs API REST\\\\n documentation.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs submit stdin [options]\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --wait-for-active | --wfa (boolean)\\\\n\\\\n Wait for the job to enter ACTIVE status before completing the command.\\\\n\\\\n --wait-for-output | --wfo (boolean)\\\\n\\\\n Wait for the job to enter OUTPUT status before completing the command.\\\\n\\\\n --view-all-spool-content | --vasc (boolean)\\\\n\\\\n Print all spool output. If you use this option you will wait for the job to\\\\n complete.\\\\n\\\\n --directory | -d (string)\\\\n\\\\n The local directory you would like to download the output of the job. Creates a\\\\n subdirectory using the jobID as the name and files are titled based on DD names.\\\\n If you use this option you will wait for the job to complete.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Default is '.txt'.\\\\n\\\\n --jcl-symbols | --js (string)\\\\n\\\\n A string of JCL symbols to use for substitution. For symbol values with no\\\\n spaces: \\\\\\"symbol1=value1 symbol2=value2 ...\\\\\\". When a value contains spaces,\\\\n enclose the value in single quotes: \\\\\\"symbol1='value 1 with spaces'\\\\n symbol2='value 2 with spaces' ...\\\\\\". To embed a single quote in a value, use two\\\\n single quotes: \\\\\\"NAME=O''Brian\\\\\\".\\\\n\\\\n --job-encoding | --je (string)\\\\n\\\\n The encoding that should be used to read the JCL into the z/OSMF JCL reader. JCL\\\\n will be converted into this codepage from UTF-8 for the JES subsystem to parse.\\\\n\\\\n --job-record-length | --jrl (number)\\\\n\\\\n The logical record length of the JCL being submitted.\\\\n\\\\n Default value: 80\\\\n\\\\n --job-record-format | --jrf (string)\\\\n\\\\n The record format of the JCL being submitted, where V is variable, and F is\\\\n fixed.\\\\n\\\\n Default value: F\\\\n Allowed values: F, V\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n RESPONSE FORMAT OPTIONS\\\\n -----------------------\\\\n\\\\n --response-format-filter | --rff (array)\\\\n\\\\n Filter (include) fields in the response. Accepts an array of field/property\\\\n names to include in the output response. You can filter JSON objects properties\\\\n OR table columns/fields. In addition, you can use this option in conjunction\\\\n with '--response-format-type' to reduce the output of a command to a single\\\\n field/property or a list of a single field/property.\\\\n\\\\n --response-format-type | --rft (string)\\\\n\\\\n The command response output format type. Must be one of the following:\\\\n\\\\n table: Formats output data as a table. Use this option when the output data is\\\\n an array of homogeneous JSON objects. Each property of the object will become a\\\\n column in the table.\\\\n\\\\n list: Formats output data as a list of strings. Can be used on any data type\\\\n (JSON objects/arrays) are stringified and a new line is added after each entry\\\\n in an array.\\\\n\\\\n object: Formats output data as a list of prettified objects (or single object).\\\\n Can be used in place of \\\\\\"table\\\\\\" to change from tabular output to a list of\\\\n prettified objects.\\\\n\\\\n string: Formats output data as a string. JSON objects/arrays are stringified.\\\\n\\\\n Allowed values: table, list, object, string\\\\n\\\\n --response-format-header | --rfh (boolean)\\\\n\\\\n If \\\\\\"--response-format-type table\\\\\\" is specified, include the column headers in\\\\n the output.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\" via standard in:\\\\n\\\\n $ zowe zos-jobs submit stdin < iefbr14.txt\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\" via standard in\\\\n from the output of another command:\\\\n\\\\n $ cat iefbr14.txt | zowe zos-jobs submit stdin\\\\n\\\\n\\", \\"stderr\\": \\"\\", - \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n stdin | in\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Submit a job (JCL) passed to the command via the stdin stream. The command\\\\n presents errors verbatim from the z/OSMF Jobs REST endpoints. For more\\\\n information about z/OSMF Jobs API errors, see the z/OSMF Jobs API REST\\\\n documentation.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs submit stdin [options]\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --wait-for-active | --wfa (boolean)\\\\n\\\\n Wait for the job to enter ACTIVE status before completing the command.\\\\n\\\\n --wait-for-output | --wfo (boolean)\\\\n\\\\n Wait for the job to enter OUTPUT status before completing the command.\\\\n\\\\n --view-all-spool-content | --vasc (boolean)\\\\n\\\\n Print all spool output. If you use this option you will wait for the job to\\\\n complete.\\\\n\\\\n --directory | -d (string)\\\\n\\\\n The local directory you would like to download the output of the job. Creates a\\\\n subdirectory using the jobID as the name and files are titled based on DD names.\\\\n If you use this option you will wait for the job to complete.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Default is '.txt'.\\\\n\\\\n --jcl-symbols | --js (string)\\\\n\\\\n A string of JCL symbols to use for substitution. For symbol values with no\\\\n spaces: \\\\\\"symbol1=value1 symbol2=value2 ...\\\\\\". When a value contains spaces,\\\\n enclose the value in single quotes: \\\\\\"symbol1='value 1 with spaces'\\\\n symbol2='value 2 with spaces' ...\\\\\\". To embed a single quote in a value, use two\\\\n single quotes: \\\\\\"NAME=O''Brian\\\\\\".\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n RESPONSE FORMAT OPTIONS\\\\n -----------------------\\\\n\\\\n --response-format-filter | --rff (array)\\\\n\\\\n Filter (include) fields in the response. Accepts an array of field/property\\\\n names to include in the output response. You can filter JSON objects properties\\\\n OR table columns/fields. In addition, you can use this option in conjunction\\\\n with '--response-format-type' to reduce the output of a command to a single\\\\n field/property or a list of a single field/property.\\\\n\\\\n --response-format-type | --rft (string)\\\\n\\\\n The command response output format type. Must be one of the following:\\\\n\\\\n table: Formats output data as a table. Use this option when the output data is\\\\n an array of homogeneous JSON objects. Each property of the object will become a\\\\n column in the table.\\\\n\\\\n list: Formats output data as a list of strings. Can be used on any data type\\\\n (JSON objects/arrays) are stringified and a new line is added after each entry\\\\n in an array.\\\\n\\\\n object: Formats output data as a list of prettified objects (or single object).\\\\n Can be used in place of \\\\\\"table\\\\\\" to change from tabular output to a list of\\\\n prettified objects.\\\\n\\\\n string: Formats output data as a string. JSON objects/arrays are stringified.\\\\n\\\\n Allowed values: table, list, object, string\\\\n\\\\n --response-format-header | --rfh (boolean)\\\\n\\\\n If \\\\\\"--response-format-type table\\\\\\" is specified, include the column headers in\\\\n the output.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\" via standard in:\\\\n\\\\n $ zowe zos-jobs submit stdin < iefbr14.txt\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\" via standard in\\\\n from the output of another command:\\\\n\\\\n $ cat iefbr14.txt | zowe zos-jobs submit stdin\\\\n\\\\n\\" + \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n stdin | in\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n Submit a job (JCL) passed to the command via the stdin stream. The command\\\\n presents errors verbatim from the z/OSMF Jobs REST endpoints. For more\\\\n information about z/OSMF Jobs API errors, see the z/OSMF Jobs API REST\\\\n documentation.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs submit stdin [options]\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --wait-for-active | --wfa (boolean)\\\\n\\\\n Wait for the job to enter ACTIVE status before completing the command.\\\\n\\\\n --wait-for-output | --wfo (boolean)\\\\n\\\\n Wait for the job to enter OUTPUT status before completing the command.\\\\n\\\\n --view-all-spool-content | --vasc (boolean)\\\\n\\\\n Print all spool output. If you use this option you will wait for the job to\\\\n complete.\\\\n\\\\n --directory | -d (string)\\\\n\\\\n The local directory you would like to download the output of the job. Creates a\\\\n subdirectory using the jobID as the name and files are titled based on DD names.\\\\n If you use this option you will wait for the job to complete.\\\\n\\\\n --extension | -e (string)\\\\n\\\\n A file extension to save the job output with. Default is '.txt'.\\\\n\\\\n --jcl-symbols | --js (string)\\\\n\\\\n A string of JCL symbols to use for substitution. For symbol values with no\\\\n spaces: \\\\\\"symbol1=value1 symbol2=value2 ...\\\\\\". When a value contains spaces,\\\\n enclose the value in single quotes: \\\\\\"symbol1='value 1 with spaces'\\\\n symbol2='value 2 with spaces' ...\\\\\\". To embed a single quote in a value, use two\\\\n single quotes: \\\\\\"NAME=O''Brian\\\\\\".\\\\n\\\\n --job-encoding | --je (string)\\\\n\\\\n The encoding that should be used to read the JCL into the z/OSMF JCL reader. JCL\\\\n will be converted into this codepage from UTF-8 for the JES subsystem to parse.\\\\n\\\\n --job-record-length | --jrl (number)\\\\n\\\\n The logical record length of the JCL being submitted.\\\\n\\\\n Default value: 80\\\\n\\\\n --job-record-format | --jrf (string)\\\\n\\\\n The record format of the JCL being submitted, where V is variable, and F is\\\\n fixed.\\\\n\\\\n Default value: F\\\\n Allowed values: F, V\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n RESPONSE FORMAT OPTIONS\\\\n -----------------------\\\\n\\\\n --response-format-filter | --rff (array)\\\\n\\\\n Filter (include) fields in the response. Accepts an array of field/property\\\\n names to include in the output response. You can filter JSON objects properties\\\\n OR table columns/fields. In addition, you can use this option in conjunction\\\\n with '--response-format-type' to reduce the output of a command to a single\\\\n field/property or a list of a single field/property.\\\\n\\\\n --response-format-type | --rft (string)\\\\n\\\\n The command response output format type. Must be one of the following:\\\\n\\\\n table: Formats output data as a table. Use this option when the output data is\\\\n an array of homogeneous JSON objects. Each property of the object will become a\\\\n column in the table.\\\\n\\\\n list: Formats output data as a list of strings. Can be used on any data type\\\\n (JSON objects/arrays) are stringified and a new line is added after each entry\\\\n in an array.\\\\n\\\\n object: Formats output data as a list of prettified objects (or single object).\\\\n Can be used in place of \\\\\\"table\\\\\\" to change from tabular output to a list of\\\\n prettified objects.\\\\n\\\\n string: Formats output data as a string. JSON objects/arrays are stringified.\\\\n\\\\n Allowed values: table, list, object, string\\\\n\\\\n --response-format-header | --rfh (boolean)\\\\n\\\\n If \\\\\\"--response-format-type table\\\\\\" is specified, include the column headers in\\\\n the output.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\" via standard in:\\\\n\\\\n $ zowe zos-jobs submit stdin < iefbr14.txt\\\\n\\\\n - Submit the JCL in the file \\\\\\"iefbr14.txt\\\\\\" via standard in\\\\n from the output of another command:\\\\n\\\\n $ cat iefbr14.txt | zowe zos-jobs submit stdin\\\\n\\\\n\\" }" `; diff --git a/packages/cli/__tests__/zosjobs/__integration__/view/__snapshots__/cli.zos-jobs.view.all-spool-content.integration.test.ts.snap b/packages/cli/__tests__/zosjobs/__integration__/view/__snapshots__/cli.zos-jobs.view.all-spool-content.integration.test.ts.snap index bb908bed0f..3c174ca0d9 100644 --- a/packages/cli/__tests__/zosjobs/__integration__/view/__snapshots__/cli.zos-jobs.view.all-spool-content.integration.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__integration__/view/__snapshots__/cli.zos-jobs.view.all-spool-content.integration.test.ts.snap @@ -27,6 +27,14 @@ exports[`zos-jobs view all-spool-content command should display the help 1`] = ` The z/OS JOBID of the job containing the spool files you want to view. No pre-validation of the JOBID is performed. + OPTIONS + ------- + + --encoding | --ec (string) + + Download the spool file content with encoding mode, which means that data + conversion is performed using the file encoding specified. + ZOSMF CONNECTION OPTIONS ------------------------ @@ -128,9 +136,9 @@ exports[`zos-jobs view all-spool-content command should display the help 1`] = ` \\"success\\": true, \\"exitCode\\": 0, \\"message\\": \\"The help was constructed for command: all-spool-content.\\", - \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n all-spool-content | asc\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of each spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID. The command presents errors verbatim\\\\n from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view all-spool-content [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View all spool files for the job with job ID JOB00234:\\\\n\\\\n $ zowe zos-jobs view all-spool-content JOB00234\\\\n\\\\n\\", + \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n all-spool-content | asc\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of each spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID. The command presents errors verbatim\\\\n from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view all-spool-content [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --encoding | --ec (string)\\\\n\\\\n Download the spool file content with encoding mode, which means that data\\\\n conversion is performed using the file encoding specified.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View all spool files for the job with job ID JOB00234:\\\\n\\\\n $ zowe zos-jobs view all-spool-content JOB00234\\\\n\\\\n\\", \\"stderr\\": \\"\\", - \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n all-spool-content | asc\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of each spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID. The command presents errors verbatim\\\\n from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view all-spool-content [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View all spool files for the job with job ID JOB00234:\\\\n\\\\n $ zowe zos-jobs view all-spool-content JOB00234\\\\n\\\\n\\" + \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n all-spool-content | asc\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of each spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID. The command presents errors verbatim\\\\n from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view all-spool-content [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool files you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --encoding | --ec (string)\\\\n\\\\n Download the spool file content with encoding mode, which means that data\\\\n conversion is performed using the file encoding specified.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View all spool files for the job with job ID JOB00234:\\\\n\\\\n $ zowe zos-jobs view all-spool-content JOB00234\\\\n\\\\n\\" }" `; diff --git a/packages/cli/__tests__/zosjobs/__integration__/view/__snapshots__/cli.zos-jobs.view.spool-file-by-id.integration.test.ts.snap b/packages/cli/__tests__/zosjobs/__integration__/view/__snapshots__/cli.zos-jobs.view.spool-file-by-id.integration.test.ts.snap index 4f01d156b3..c142037623 100644 --- a/packages/cli/__tests__/zosjobs/__integration__/view/__snapshots__/cli.zos-jobs.view.spool-file-by-id.integration.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__integration__/view/__snapshots__/cli.zos-jobs.view.spool-file-by-id.integration.test.ts.snap @@ -33,6 +33,14 @@ exports[`zos-jobs view spool-file-by-id command should display the help 1`] = ` spool-files-by-jobid\\" command to obtain spool ID numbers.No pre-validation of the ID is performed. + OPTIONS + ------- + + --encoding | --ec (string) + + Download the spool file content with encoding mode, which means that data + conversion is performed using the file encoding specified. + ZOSMF CONNECTION OPTIONS ------------------------ @@ -135,9 +143,9 @@ exports[`zos-jobs view spool-file-by-id command should display the help 1`] = ` \\"success\\": true, \\"exitCode\\": 0, \\"message\\": \\"The help was constructed for command: spool-file-by-id.\\", - \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n spool-file-by-id | sfbi\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of a spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID or spool ID. The command presents errors\\\\n verbatim from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view spool-file-by-id [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool file you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n spoolfileid\\\\t\\\\t (number)\\\\n\\\\n The spool file ID number for the spool file to view. Use the \\\\\\"zowe zos-jobs list\\\\n spool-files-by-jobid\\\\\\" command to obtain spool ID numbers.No pre-validation of\\\\n the ID is performed.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View the spool file with ID 4 for the job with job ID\\\\n JOB00123:\\\\n\\\\n $ zowe zos-jobs view spool-file-by-id JOB00123 4\\\\n\\\\n\\", + \\"stdout\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n spool-file-by-id | sfbi\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of a spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID or spool ID. The command presents errors\\\\n verbatim from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view spool-file-by-id [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool file you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n spoolfileid\\\\t\\\\t (number)\\\\n\\\\n The spool file ID number for the spool file to view. Use the \\\\\\"zowe zos-jobs list\\\\n spool-files-by-jobid\\\\\\" command to obtain spool ID numbers.No pre-validation of\\\\n the ID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --encoding | --ec (string)\\\\n\\\\n Download the spool file content with encoding mode, which means that data\\\\n conversion is performed using the file encoding specified.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View the spool file with ID 4 for the job with job ID\\\\n JOB00123:\\\\n\\\\n $ zowe zos-jobs view spool-file-by-id JOB00123 4\\\\n\\\\n\\", \\"stderr\\": \\"\\", - \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n spool-file-by-id | sfbi\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of a spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID or spool ID. The command presents errors\\\\n verbatim from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view spool-file-by-id [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool file you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n spoolfileid\\\\t\\\\t (number)\\\\n\\\\n The spool file ID number for the spool file to view. Use the \\\\\\"zowe zos-jobs list\\\\n spool-files-by-jobid\\\\\\" command to obtain spool ID numbers.No pre-validation of\\\\n the ID is performed.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View the spool file with ID 4 for the job with job ID\\\\n JOB00123:\\\\n\\\\n $ zowe zos-jobs view spool-file-by-id JOB00123 4\\\\n\\\\n\\" + \\"data\\": \\"\\\\n COMMAND NAME\\\\n ------------\\\\n\\\\n spool-file-by-id | sfbi\\\\n\\\\n DESCRIPTION\\\\n -----------\\\\n\\\\n View the contents of a spool file from a z/OS job on spool/JES queues. The\\\\n command does not pre-validate the JOBID or spool ID. The command presents errors\\\\n verbatim from the z/OSMF Jobs REST endpoints.\\\\n\\\\n USAGE\\\\n -----\\\\n\\\\n zowe zos-jobs view spool-file-by-id [options]\\\\n\\\\n POSITIONAL ARGUMENTS\\\\n --------------------\\\\n\\\\n jobid\\\\t\\\\t (string)\\\\n\\\\n The z/OS JOBID of the job containing the spool file you want to view. No\\\\n pre-validation of the JOBID is performed.\\\\n\\\\n spoolfileid\\\\t\\\\t (number)\\\\n\\\\n The spool file ID number for the spool file to view. Use the \\\\\\"zowe zos-jobs list\\\\n spool-files-by-jobid\\\\\\" command to obtain spool ID numbers.No pre-validation of\\\\n the ID is performed.\\\\n\\\\n OPTIONS\\\\n -------\\\\n\\\\n --encoding | --ec (string)\\\\n\\\\n Download the spool file content with encoding mode, which means that data\\\\n conversion is performed using the file encoding specified.\\\\n\\\\n ZOSMF CONNECTION OPTIONS\\\\n ------------------------\\\\n\\\\n --host | -H (string)\\\\n\\\\n The z/OSMF server host name.\\\\n\\\\n --port | -P (number)\\\\n\\\\n The z/OSMF server port.\\\\n\\\\n Default value: 443\\\\n\\\\n --user | -u (string)\\\\n\\\\n Mainframe (z/OSMF) user name, which can be the same as your TSO login.\\\\n\\\\n --password | --pass | --pw (string)\\\\n\\\\n Mainframe (z/OSMF) password, which can be the same as your TSO password.\\\\n\\\\n --reject-unauthorized | --ru (boolean)\\\\n\\\\n Reject self-signed certificates.\\\\n\\\\n Default value: true\\\\n\\\\n --base-path | --bp (string)\\\\n\\\\n The base path for your API mediation layer instance. Specify this option to\\\\n prepend the base path to all z/OSMF resources when making REST requests. Do not\\\\n specify this option if you are not using an API mediation layer.\\\\n\\\\n --protocol (string)\\\\n\\\\n The protocol used (HTTP or HTTPS)\\\\n\\\\n Default value: https\\\\n Allowed values: http, https\\\\n\\\\n --cert-file (local file path)\\\\n\\\\n The file path to a certificate file to use for authentication\\\\n\\\\n --cert-key-file (local file path)\\\\n\\\\n The file path to a certificate key file to use for authentication\\\\n\\\\n PROFILE OPTIONS\\\\n ---------------\\\\n\\\\n --zosmf-profile | --zosmf-p (string)\\\\n\\\\n The name of a (zosmf) profile to load for this command execution.\\\\n\\\\n --base-profile | --base-p (string)\\\\n\\\\n The name of a (base) profile to load for this command execution.\\\\n\\\\n BASE CONNECTION OPTIONS\\\\n -----------------------\\\\n\\\\n --token-type | --tt (string)\\\\n\\\\n The type of token to get and use for the API. Omit this option to use the\\\\n default token type, which is provided by 'zowe auth login'.\\\\n\\\\n --token-value | --tv (string)\\\\n\\\\n The value of the token to pass to the API.\\\\n\\\\n GLOBAL OPTIONS\\\\n --------------\\\\n\\\\n --show-inputs-only (boolean)\\\\n\\\\n Show command inputs and do not run the command\\\\n\\\\n --response-format-json | --rfj (boolean)\\\\n\\\\n Produce JSON formatted data from a command\\\\n\\\\n --help | -h (boolean)\\\\n\\\\n Display help text\\\\n\\\\n --help-web | --hw (boolean)\\\\n\\\\n Display HTML help in browser\\\\n\\\\n EXAMPLES\\\\n --------\\\\n\\\\n - View the spool file with ID 4 for the job with job ID\\\\n JOB00123:\\\\n\\\\n $ zowe zos-jobs view spool-file-by-id JOB00123 4\\\\n\\\\n\\" }" `; diff --git a/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts b/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts index c5f7b1b79d..56a1fe3f59 100644 --- a/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts +++ b/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts @@ -321,12 +321,12 @@ export class GetJobsData { * @memberof GetJobsData */ public static readonly SAMPLE_JES_MSG_LG: string = - " 1 J E S 2 J O B L O G -- S Y S T E M X A D 1 -- N O D E U S I L D A M D" + + " 1 J E S 2 J O B L O G -- S Y S T E M T E S T -- N O D E Z O W E T E S T" + " 0" + " 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ----" + - " 08.26.22 JOB01544 TSS7000I KELDA16 Last-Used 02 Apr 18 08:25 System=XAD1 Facility=TSO" + - " 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=KELOSKY, DANIEL L" + - " 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS XAD1" + + " 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=TEST Facility=TSO" + + " 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=ZOWE CLI TEST" + + " 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS TEST" + " 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22" + " 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT" + " 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0" + diff --git a/packages/cli/__tests__/zosjobs/__system__/submit/local-file/__scripts__/submit_valid_local_file.sh b/packages/cli/__tests__/zosjobs/__system__/submit/local-file/__scripts__/submit_valid_local_file.sh index a7f9e912a4..3e8479b0d1 100755 --- a/packages/cli/__tests__/zosjobs/__system__/submit/local-file/__scripts__/submit_valid_local_file.sh +++ b/packages/cli/__tests__/zosjobs/__system__/submit/local-file/__scripts__/submit_valid_local_file.sh @@ -1,4 +1,4 @@ #!/bin/bash # pass the data set name as an argument to the script -zowe zos-jobs submit local-file "$1" +zowe zos-jobs submit local-file "$1" $2 exit $? \ No newline at end of file diff --git a/packages/cli/__tests__/zosjobs/__system__/submit/local-file/cli.zos-jobs.submit.local-file.system.test.ts b/packages/cli/__tests__/zosjobs/__system__/submit/local-file/cli.zos-jobs.submit.local-file.system.test.ts index dd6a505a75..8458d2fe76 100644 --- a/packages/cli/__tests__/zosjobs/__system__/submit/local-file/cli.zos-jobs.submit.local-file.system.test.ts +++ b/packages/cli/__tests__/zosjobs/__system__/submit/local-file/cli.zos-jobs.submit.local-file.system.test.ts @@ -44,15 +44,11 @@ describe("zos-jobs submit local-file command", () => { const bufferJCL: Buffer = Buffer.from(jcl); IO.createFileSync(__dirname + "/testFileOfLocalJCL.txt"); IO.writeFile(__dirname + "/testFileOfLocalJCL.txt", bufferJCL); - }); afterAll(async () => { await TestEnvironment.cleanUp(TEST_ENVIRONMENT); - - // Delete created uss file - const localJCL: string = `${__dirname}\\testFileOfLocalJCL.txt`; - IO.deleteFile(localJCL); + IO.deleteFile(__dirname + "/testFileOfLocalJCL.txt"); }); describe("Live system tests", () => { @@ -65,6 +61,15 @@ describe("zos-jobs submit local-file command", () => { expect(response.stdout.toString()).toContain("jobid"); }); + it("should submit a job in an existing valid local file with explicit RECFM, LRECL, and encoding", async () => { + const response = runCliScript(__dirname + "/__scripts__/submit_valid_local_file.sh", + TEST_ENVIRONMENT, [__dirname + "/testFileOfLocalJCL.txt", "--job-encoding IBM-037 --job-record-format F --job-record-length 80"]); + expect(response.stderr.toString()).toBe(""); + expect(response.status).toBe(0); + expect(response.stdout.toString()).toContain("jobname"); + expect(response.stdout.toString()).toContain("jobid"); + }); + it("should submit a job in an existing valid local file with 'view-all-spool-content' option", async () => { const response = runCliScript(__dirname + "/__scripts__/submit_valid_local_file_vasc.sh", TEST_ENVIRONMENT, [__dirname + "/testFileOfLocalJCL.txt", "--vasc"]); diff --git a/packages/cli/__tests__/zosjobs/__system__/submit/stdin/__scripts__/submit_valid_stdin.sh b/packages/cli/__tests__/zosjobs/__system__/submit/stdin/__scripts__/submit_valid_stdin.sh index 9f89481369..32d7999677 100755 --- a/packages/cli/__tests__/zosjobs/__system__/submit/stdin/__scripts__/submit_valid_stdin.sh +++ b/packages/cli/__tests__/zosjobs/__system__/submit/stdin/__scripts__/submit_valid_stdin.sh @@ -1,4 +1,4 @@ #!/bin/bash # pass the JCL as stdin to this script -cat "$1" | zowe zos-jobs submit stdin +cat "$1" | zowe zos-jobs submit stdin $2 exit $? \ No newline at end of file diff --git a/packages/cli/__tests__/zosjobs/__system__/submit/stdin/cli.zos-jobs.submit.stdin.system.test.ts b/packages/cli/__tests__/zosjobs/__system__/submit/stdin/cli.zos-jobs.submit.stdin.system.test.ts index 3916226899..c697e8fcc5 100644 --- a/packages/cli/__tests__/zosjobs/__system__/submit/stdin/cli.zos-jobs.submit.stdin.system.test.ts +++ b/packages/cli/__tests__/zosjobs/__system__/submit/stdin/cli.zos-jobs.submit.stdin.system.test.ts @@ -47,10 +47,7 @@ describe("zos-jobs submit stdin command", () => { afterAll(async () => { await TestEnvironment.cleanUp(TEST_ENVIRONMENT); - - // Delete created uss file - const localJCL: string = `${__dirname}\\testFileOfLocalJCL.txt`; - IO.deleteFile(localJCL); + IO.deleteFile(__dirname + "/testFileOfLocalJCL.txt"); }); describe("Live system tests", () => { @@ -63,6 +60,15 @@ describe("zos-jobs submit stdin command", () => { expect(response.stdout.toString()).toContain("jobid"); }); + it("should submit a job using JCL on stdin with explicit LRECL, RECFM, and encoding", async () => { + const response = runCliScript(__dirname + "/__scripts__/submit_valid_stdin.sh", + TEST_ENVIRONMENT, [__dirname + "/testFileOfLocalJCL.txt", "--job-encoding IBM-037 --job-record-format F --job-record-length 80"]); + expect(response.stderr.toString()).toBe(""); + expect(response.status).toBe(0); + expect(response.stdout.toString()).toContain("jobname"); + expect(response.stdout.toString()).toContain("jobid"); + }); + it("should submit a job using JCL on stdin with 'view-all-spool-content' option", async () => { const response = runCliScript(__dirname + "/__scripts__/submit_valid_stdin_vasc.sh", TEST_ENVIRONMENT, [__dirname + "/testFileOfLocalJCL.txt", "--vasc"]); diff --git a/packages/cli/__tests__/zosjobs/__unit__/download/download-output/Output.handler.unit.test.ts b/packages/cli/__tests__/zosjobs/__unit__/download/download-output/Output.handler.unit.test.ts index 9939cc367c..ea7378a4ff 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/download/download-output/Output.handler.unit.test.ts +++ b/packages/cli/__tests__/zosjobs/__unit__/download/download-output/Output.handler.unit.test.ts @@ -216,6 +216,37 @@ describe("download output handler tests", () => { ); }); + it("should download a job output with encoding", async () => { + let passedSession: Session = null; + GetJobs.getJob = jest.fn(async (session, jobid) => { + passedSession = session; + return GetJobsData.SAMPLE_COMPLETE_JOB; + }); + DownloadJobs.downloadAllSpoolContentCommon = jest.fn( + async (session, options) => { + return; + } + ); + const handler = new OutputHandler.default(); + const params = Object.assign({}, ...[DEFAULT_PARAMETERS]); + params.arguments = Object.assign({}, ...[DEFAULT_PARAMETERS.arguments]); + params.arguments.jobid = GetJobsData.SAMPLE_COMPLETE_JOB.jobid; + params.arguments.encoding = "IBM-037"; + const opts: IDownloadAllSpoolContentParms = { + jobname: GetJobsData.SAMPLE_COMPLETE_JOB.jobname, + jobid: GetJobsData.SAMPLE_COMPLETE_JOB.jobid, + outDir: DownloadJobs.DEFAULT_JOBS_OUTPUT_DIR, + omitJobidDirectory: false, + encoding: "IBM-037" + }; + await handler.process(params); + expect(GetJobs.getJob).toHaveBeenCalledTimes(1); + expect(DownloadJobs.downloadAllSpoolContentCommon).toHaveBeenCalledWith( + passedSession, + opts + ); + }); + it("should not transform an error from the zosmf rest client", async () => { const failMessage = "You fail in z/OSMF"; let error; diff --git a/packages/cli/__tests__/zosjobs/__unit__/download/download-output/__snapshots__/Output.definition.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/download/download-output/__snapshots__/Output.definition.unit.test.ts.snap index f99abbe289..16ec55cdd7 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/download/download-output/__snapshots__/Output.definition.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/download/download-output/__snapshots__/Output.definition.unit.test.ts.snap @@ -58,6 +58,18 @@ Object { "name": "record", "type": "boolean", }, + Object { + "aliases": Array [ + "ec", + ], + "conflictsWith": Array [ + "binary", + "record", + ], + "description": "Download the spool file content with encoding mode, which means that data conversion is performed using the file encoding specified.", + "name": "encoding", + "type": "string", + }, ], "positionals": Array [ Object { diff --git a/packages/cli/__tests__/zosjobs/__unit__/download/download-output/__snapshots__/Output.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/download/download-output/__snapshots__/Output.handler.unit.test.ts.snap index 0abe97baef..ebc2d62e34 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/download/download-output/__snapshots__/Output.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/download/download-output/__snapshots__/Output.handler.unit.test.ts.snap @@ -42,6 +42,13 @@ Destination: ./output" exports[`download output handler tests should download a job output with a specific extension 2`] = `Object {}`; +exports[`download output handler tests should download a job output with encoding 1`] = ` +"Successfully downloaded the job output +Destination: ./output" +`; + +exports[`download output handler tests should download a job output with encoding 2`] = `Object {}`; + exports[`download output handler tests should not transform an error from the DownloadJob class 1`] = `"You fail in DownloadJob"`; exports[`download output handler tests should not transform an error from the zosmf rest client 1`] = `"You fail in z/OSMF"`; diff --git a/packages/cli/__tests__/zosjobs/__unit__/submit/Submit.shared.handler.unit.test.ts b/packages/cli/__tests__/zosjobs/__unit__/submit/Submit.shared.handler.unit.test.ts index ac27ef0577..dc0135c776 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/submit/Submit.shared.handler.unit.test.ts +++ b/packages/cli/__tests__/zosjobs/__unit__/submit/Submit.shared.handler.unit.test.ts @@ -567,6 +567,55 @@ describe("submit shared handler", () => { IO.deleteFile(theLocalFile); }); + it("should submit JCL contained within a local-file if requested with additional parameters", async () => { + // Require the handler and create a new instance + const handlerReq = require("../../../../src/zosjobs/submit/Submit.shared.handler"); + const handler = new handlerReq.default(); + + // Vars populated by the mocked function + let error; + let LocalFileSpecified: string; + + // Local file + const theLocalFile: string = "test.txt"; + + // Mock the submit JCL function + const submitJclStringSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(async (session, localFile): Promise => { + LocalFileSpecified = localFile; + return { + jobname: "MYJOB", + jobid: "JOB123", + status: "INPUT", + retcode: "UNKNOWN" + }; + }); + + // The handler should fail + const badJCL: Buffer = Buffer.from("Bad JCL"); + IO.createFileSync(theLocalFile); + IO.writeFile(theLocalFile, badJCL); + + const copy = Object.assign({}, LOCALFILE_PARAMETERS); + copy.arguments.jobEncoding = "IBM-037"; + copy.arguments.jobRecordLength = 80; + copy.arguments.jobRecordFormat = "F"; + copy.arguments.localFile = theLocalFile; + try { + // Invoke the handler with a full set of mocked arguments and response functions + await handler.process(copy); + } catch (e) { + error = e; + } + + expect(error).toBeUndefined(); + expect(SubmitJobs.submitJclString).toHaveBeenCalledTimes(1); + expect(submitJclStringSpy.mock.calls[0][2]).toEqual( + expect.objectContaining({internalReaderFileEncoding: "IBM-037", internalReaderLrecl: "80", internalReaderRecfm: "F"}) + ); + expect(LocalFileSpecified).toBe(`${badJCL}`); + IO.deleteFile(theLocalFile); + }); + it("should submit JCL contained within a local-file if requested and view all spool content", async () => { // Require the handler and create a new instance const handlerReq = require("../../../../src/zosjobs/submit/Submit.shared.handler"); diff --git a/packages/cli/__tests__/zosjobs/__unit__/submit/__snapshots__/Submit.shared.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/submit/__snapshots__/Submit.shared.handler.unit.test.ts.snap index 9303956249..6836b4975d 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/submit/__snapshots__/Submit.shared.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/submit/__snapshots__/Submit.shared.handler.unit.test.ts.snap @@ -158,6 +158,35 @@ Array [ exports[`submit shared handler process method should submit JCL contained within a local-file if requested and view all spool content 6`] = `"Submitted JCL contained in \\"local-file\\": \\"test.txt\\""`; +exports[`submit shared handler process method should submit JCL contained within a local-file if requested with additional parameters 1`] = ` +Object { + "fields": Array [ + "jobid", + "retcode", + "jobname", + "status", + ], + "format": "object", + "output": Object { + "jobid": "JOB123", + "jobname": "MYJOB", + "retcode": "UNKNOWN", + "status": "INPUT", + }, +} +`; + +exports[`submit shared handler process method should submit JCL contained within a local-file if requested with additional parameters 2`] = ` +Object { + "jobid": "JOB123", + "jobname": "MYJOB", + "retcode": "UNKNOWN", + "status": "INPUT", +} +`; + +exports[`submit shared handler process method should submit JCL contained within a local-file if requested with additional parameters 3`] = `"Submitted JCL contained in \\"local-file\\": \\"test.txt\\""`; + exports[`submit shared handler process method should submit JCL contained within a uss-file if requested 1`] = ` Object { "fields": Array [ diff --git a/packages/cli/__tests__/zosjobs/__unit__/submit/local-file/__snapshots__/LocalFile.definition.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/submit/local-file/__snapshots__/LocalFile.definition.unit.test.ts.snap index 561065de89..798fe668fa 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/submit/local-file/__snapshots__/LocalFile.definition.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/submit/local-file/__snapshots__/LocalFile.definition.unit.test.ts.snap @@ -67,6 +67,38 @@ Object { "name": "jcl-symbols", "type": "string", }, + Object { + "aliases": Array [ + "je", + ], + "description": "The encoding that should be used to read the JCL into the z/OSMF JCL reader. JCL will be converted into this codepage from UTF-8 for the JES subsystem to parse.", + "name": "job-encoding", + "type": "string", + }, + Object { + "aliases": Array [ + "jrl", + ], + "defaultValue": 80, + "description": "The logical record length of the JCL being submitted.", + "name": "job-record-length", + "type": "number", + }, + Object { + "aliases": Array [ + "jrf", + ], + "allowableValues": Object { + "values": Array [ + "F", + "V", + ], + }, + "defaultValue": "F", + "description": "The record format of the JCL being submitted, where V is variable, and F is fixed.", + "name": "job-record-format", + "type": "string", + }, ], "outputFormatOptions": true, "positionals": Array [ diff --git a/packages/cli/__tests__/zosjobs/__unit__/submit/stdin/__snapshots__/stdin.definition.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/submit/stdin/__snapshots__/stdin.definition.unit.test.ts.snap index 72a121b8a0..903ef79ce5 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/submit/stdin/__snapshots__/stdin.definition.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/submit/stdin/__snapshots__/stdin.definition.unit.test.ts.snap @@ -72,6 +72,38 @@ Object { "name": "jcl-symbols", "type": "string", }, + Object { + "aliases": Array [ + "je", + ], + "description": "The encoding that should be used to read the JCL into the z/OSMF JCL reader. JCL will be converted into this codepage from UTF-8 for the JES subsystem to parse.", + "name": "job-encoding", + "type": "string", + }, + Object { + "aliases": Array [ + "jrl", + ], + "defaultValue": 80, + "description": "The logical record length of the JCL being submitted.", + "name": "job-record-length", + "type": "number", + }, + Object { + "aliases": Array [ + "jrf", + ], + "allowableValues": Object { + "values": Array [ + "F", + "V", + ], + }, + "defaultValue": "F", + "description": "The record format of the JCL being submitted, where V is variable, and F is fixed.", + "name": "job-record-format", + "type": "string", + }, ], "outputFormatOptions": true, "profile": Object { diff --git a/packages/cli/__tests__/zosjobs/__unit__/view/all-spool-content/AllSpoolContent.handler.unit.test.ts b/packages/cli/__tests__/zosjobs/__unit__/view/all-spool-content/AllSpoolContent.handler.unit.test.ts index 1921f5d3c1..c7cb2b4b33 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/view/all-spool-content/AllSpoolContent.handler.unit.test.ts +++ b/packages/cli/__tests__/zosjobs/__unit__/view/all-spool-content/AllSpoolContent.handler.unit.test.ts @@ -28,13 +28,14 @@ const DEFAULT_PARAMETERS: IHandlerParameters = mockHandlerParameters({ arguments: UNIT_TEST_ZOSMF_PROF_OPTS, positionals: ["zos-jobs", "view", "spool-file-by-id"], definition: AllSpoolContentDefinition, - profiles: UNIT_TEST_PROFILES_ZOSMF + profiles: UNIT_TEST_PROFILES_ZOSMF, }); describe("zos-jobs view all-spool-content handler", () => { afterEach(() => { jest.resetAllMocks(); + DEFAULT_PARAMETERS.arguments.encoding = undefined; // Why is this needed? Where are things being set??? }); it("should be able to get the content of a spool file", async () => { @@ -61,7 +62,35 @@ describe("zos-jobs view all-spool-content handler", () => { ); const fakeSession: Session = new Session(sessCfg); const lastSpoolFile = GetJobsData.SAMPLE_SPOOL_FILES[GetJobsData.SAMPLE_SPOOL_FILES.length - 1]; - expect(GetJobs.getSpoolContent).toHaveBeenLastCalledWith(fakeSession, lastSpoolFile); + expect(GetJobs.getSpoolContent).toHaveBeenLastCalledWith(fakeSession, lastSpoolFile, undefined); + }); + + it("should be able to get the content of a spool file with encoding", async () => { + const spoolContent = fs.readFileSync(TEST_RESOURCES_DIR + "/spool/example_spool_content.txt"); + GetJobs.getJob = jest.fn(async (session, jobid) => { + return GetJobsData.SAMPLE_COMPLETE_JOB; + }); + GetJobs.getSpoolFilesForJob = jest.fn(async (session, jobid) => { + return GetJobsData.SAMPLE_SPOOL_FILES; + }); + GetJobs.getSpoolContent = jest.fn(async (session, spoolFile) => { + return spoolContent.toString(); + }); + const handler = new AllSpoolContentHandler.default(); + const params = Object.assign({}, ...[DEFAULT_PARAMETERS]); + params.arguments.jobid = "JOB65536"; + params.arguments.encoding = "IBM-037"; + await handler.process(params); + expect(GetJobs.getJob).toHaveBeenCalledTimes(1); + expect(GetJobs.getSpoolFilesForJob).toHaveBeenCalledTimes(1); + expect(GetJobs.getSpoolContent).toHaveBeenCalledTimes(GetJobsData.SAMPLE_SPOOL_FILES.length); + const sessCfg = await ConnectionPropsForSessCfg.addPropsOrPrompt( + ZosmfSession.createSessCfgFromArgs(DEFAULT_PARAMETERS.arguments), + DEFAULT_PARAMETERS.arguments + ); + const fakeSession: Session = new Session(sessCfg); + const lastSpoolFile = GetJobsData.SAMPLE_SPOOL_FILES[GetJobsData.SAMPLE_SPOOL_FILES.length - 1]; + expect(GetJobs.getSpoolContent).toHaveBeenLastCalledWith(fakeSession, lastSpoolFile, "IBM-037"); }); it("should be able to get the content of a spool file with procstep", async () => { @@ -88,7 +117,7 @@ describe("zos-jobs view all-spool-content handler", () => { ); const fakeSession: Session = new Session(sessCfg); const lastSpoolFile = GetJobsData.SAMPLE_SPOOL_FILES_WITH_PROCSTEP[GetJobsData.SAMPLE_SPOOL_FILES_WITH_PROCSTEP.length - 1]; - expect(GetJobs.getSpoolContent).toHaveBeenLastCalledWith(fakeSession, lastSpoolFile); + expect(GetJobs.getSpoolContent).toHaveBeenLastCalledWith(fakeSession, lastSpoolFile, undefined); }); it("should not transform an error thrown from get jobs getJob API", async () => { @@ -164,7 +193,7 @@ describe("zos-jobs view all-spool-content handler", () => { ); const fakeSession: Session = new Session(sessCfg); const firstSpoolFile = GetJobsData.SAMPLE_SPOOL_FILES[0]; - expect(GetJobs.getSpoolContent).toHaveBeenCalledWith(fakeSession, firstSpoolFile); + expect(GetJobs.getSpoolContent).toHaveBeenCalledWith(fakeSession, firstSpoolFile, undefined); expect(error).toBeDefined(); expect(error instanceof ImperativeError).toBe(true); expect(error.message).toMatchSnapshot(); diff --git a/packages/cli/__tests__/zosjobs/__unit__/view/all-spool-content/__snapshots__/AllSpoolContent.definition.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/view/all-spool-content/__snapshots__/AllSpoolContent.definition.unit.test.ts.snap index 1c22fd5262..de50807268 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/view/all-spool-content/__snapshots__/AllSpoolContent.definition.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/view/all-spool-content/__snapshots__/AllSpoolContent.definition.unit.test.ts.snap @@ -13,6 +13,16 @@ Object { }, ], "name": "all-spool-content", + "options": Array [ + Object { + "aliases": Array [ + "ec", + ], + "description": "Download the spool file content with encoding mode, which means that data conversion is performed using the file encoding specified.", + "name": "encoding", + "type": "string", + }, + ], "positionals": Array [ Object { "description": "The z/OS JOBID of the job containing the spool files you want to view. No pre-validation of the JOBID is performed.", diff --git a/packages/cli/__tests__/zosjobs/__unit__/view/spool-file-by-id/SpoolFileById.handler.unit.test.ts b/packages/cli/__tests__/zosjobs/__unit__/view/spool-file-by-id/SpoolFileById.handler.unit.test.ts index 1e38d65c7f..094cc6e9ed 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/view/spool-file-by-id/SpoolFileById.handler.unit.test.ts +++ b/packages/cli/__tests__/zosjobs/__unit__/view/spool-file-by-id/SpoolFileById.handler.unit.test.ts @@ -19,6 +19,7 @@ import * as fs from "fs"; import { ZosmfSession } from "@zowe/zosmf-for-zowe-sdk"; import { UNIT_TEST_ZOSMF_PROF_OPTS, UNIT_TEST_PROFILES_ZOSMF } from "../../../../../../../__tests__/__src__/mocks/ZosmfProfileMock"; import { mockHandlerParameters } from "@zowe/cli-test-utils"; +import { cloneDeep } from "lodash"; // Disable coloring for the snapshots process.env.FORCE_COLOR = "0"; @@ -45,7 +46,7 @@ describe("zos-jobs view spool-file-by-id handler", () => { return fs.readFileSync(TEST_RESOURCES_DIR + "/spool/example_spool_content.txt").toString(); }); const handler = new SpoolFileByIdHandler.default(); - const params = Object.assign({}, ...[DEFAULT_PARAMETERS]); + const params = cloneDeep(DEFAULT_PARAMETERS); params.arguments.jobid = "j12345"; params.arguments.spoolfileid = "2"; await handler.process(params); @@ -58,7 +59,32 @@ describe("zos-jobs view spool-file-by-id handler", () => { const fakeSession: Session = new Session(sessCfg); expect(GetJobs.getSpoolContentById).toHaveBeenCalledWith(fakeSession, GetJobsData.SAMPLE_COMPLETE_JOB.jobname, - GetJobsData.SAMPLE_COMPLETE_JOB.jobid, "2"); + GetJobsData.SAMPLE_COMPLETE_JOB.jobid, "2", undefined); + }); + + it("should be able to get the content of a spool file with encoding", async () => { + GetJobs.getJob = jest.fn(async (session, jobid) => { + return GetJobsData.SAMPLE_COMPLETE_JOB; + }); + GetJobs.getSpoolContentById = jest.fn(async (session, jobname, jobid, spoolId) => { + return fs.readFileSync(TEST_RESOURCES_DIR + "/spool/example_spool_content.txt").toString(); + }); + const handler = new SpoolFileByIdHandler.default(); + const params = cloneDeep(DEFAULT_PARAMETERS); + params.arguments.jobid = "j12345"; + params.arguments.spoolfileid = "2"; + params.arguments.encoding = "IBM-037"; + await handler.process(params); + expect(GetJobs.getJob).toHaveBeenCalledTimes(1); + expect(GetJobs.getSpoolContentById).toHaveBeenCalledTimes(1); + const sessCfg = await ConnectionPropsForSessCfg.addPropsOrPrompt( + ZosmfSession.createSessCfgFromArgs(DEFAULT_PARAMETERS.arguments), + DEFAULT_PARAMETERS.arguments + ); + const fakeSession: Session = new Session(sessCfg); + + expect(GetJobs.getSpoolContentById).toHaveBeenCalledWith(fakeSession, GetJobsData.SAMPLE_COMPLETE_JOB.jobname, + GetJobsData.SAMPLE_COMPLETE_JOB.jobid, "2", "IBM-037"); }); it("should not transform an error thrown from get jobs getJob API", async () => { @@ -68,7 +94,7 @@ describe("zos-jobs view spool-file-by-id handler", () => { throw new ImperativeError({ msg: failMessage}); }); const handler = new SpoolFileByIdHandler.default(); - const params = Object.assign({}, ...[DEFAULT_PARAMETERS]); + const params = cloneDeep(DEFAULT_PARAMETERS); params.arguments.jobid = "j12345"; try { await handler.process(params); @@ -91,8 +117,9 @@ describe("zos-jobs view spool-file-by-id handler", () => { throw new ImperativeError({ msg: failMessage}); }); const handler = new SpoolFileByIdHandler.default(); - const params = Object.assign({}, ...[DEFAULT_PARAMETERS]); + const params = cloneDeep(DEFAULT_PARAMETERS); params.arguments.jobid = "j12345"; + params.arguments.spoolfileid = "2"; try { await handler.process(params); } catch (thrownError) { @@ -108,7 +135,7 @@ describe("zos-jobs view spool-file-by-id handler", () => { const fakeSession: Session = new Session(sessCfg); expect(GetJobs.getSpoolContentById).toHaveBeenCalledWith(fakeSession, GetJobsData.SAMPLE_COMPLETE_JOB.jobname, - GetJobsData.SAMPLE_COMPLETE_JOB.jobid, "2"); + GetJobsData.SAMPLE_COMPLETE_JOB.jobid, "2", undefined); expect(error).toBeDefined(); expect(error instanceof ImperativeError).toBe(true); expect(error.message).toMatchSnapshot(); diff --git a/packages/cli/__tests__/zosjobs/__unit__/view/spool-file-by-id/__snapshots__/SpoolFileById.definition.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/view/spool-file-by-id/__snapshots__/SpoolFileById.definition.unit.test.ts.snap index df8ea784f2..5fa9a25209 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/view/spool-file-by-id/__snapshots__/SpoolFileById.definition.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/view/spool-file-by-id/__snapshots__/SpoolFileById.definition.unit.test.ts.snap @@ -13,6 +13,16 @@ Object { }, ], "name": "spool-file-by-id", + "options": Array [ + Object { + "aliases": Array [ + "ec", + ], + "description": "Download the spool file content with encoding mode, which means that data conversion is performed using the file encoding specified.", + "name": "encoding", + "type": "string", + }, + ], "positionals": Array [ Object { "description": "The z/OS JOBID of the job containing the spool file you want to view. No pre-validation of the JOBID is performed.", diff --git a/packages/cli/src/zosjobs/-strings-/en.ts b/packages/cli/src/zosjobs/-strings-/en.ts index 6c4ef5ff4b..fb170495db 100644 --- a/packages/cli/src/zosjobs/-strings-/en.ts +++ b/packages/cli/src/zosjobs/-strings-/en.ts @@ -180,7 +180,11 @@ export default { "For symbol values with no spaces: \"symbol1=value1 symbol2=value2 ...\". " + "When a value contains spaces, enclose the value in single quotes: " + "\"symbol1='value 1 with spaces' symbol2='value 2 with spaces' ...\". " + - "To embed a single quote in a value, use two single quotes: \"NAME=O''Brian\"." + "To embed a single quote in a value, use two single quotes: \"NAME=O''Brian\".", + JOB_ENCODING: "The encoding that should be used to read the JCL into the z/OSMF JCL reader. " + + "JCL will be converted into this codepage from UTF-8 for the JES subsystem to parse.", + JOB_RECORD_LENGTH: "The logical record length of the JCL being submitted.", + JOB_RECORD_FORMAT: "The record format of the JCL being submitted, where V is variable, and F is fixed." }, DATA_SET: { SUMMARY: "Submit a job contained in a data set", diff --git a/packages/cli/src/zosjobs/download/download-output/Output.definition.ts b/packages/cli/src/zosjobs/download/download-output/Output.definition.ts index 04d59d970b..f8b1b773a7 100644 --- a/packages/cli/src/zosjobs/download/download-output/Output.definition.ts +++ b/packages/cli/src/zosjobs/download/download-output/Output.definition.ts @@ -65,6 +65,14 @@ export const OutputDefinition: ICommandDefinition = { "of performing text conversion. Conflicts with binary.", type: "boolean", conflictsWith: ["binary"] + }, + { + name: "encoding", + aliases: ["ec"], + description: "Download the spool file content with encoding mode, which means that " + + "data conversion is performed using the file encoding specified.", + type: "string", + conflictsWith: ["binary", "record"] } ] as ICommandOptionDefinition[]), examples: [ diff --git a/packages/cli/src/zosjobs/download/download-output/Output.handler.ts b/packages/cli/src/zosjobs/download/download-output/Output.handler.ts index 7b4daa8457..dfca03141e 100644 --- a/packages/cli/src/zosjobs/download/download-output/Output.handler.ts +++ b/packages/cli/src/zosjobs/download/download-output/Output.handler.ts @@ -34,6 +34,7 @@ export default class OutputHandler extends ZosmfBaseHandler { const extension: string = this.mArguments.extension; const binary: boolean = this.mArguments.binary; const record: boolean = this.mArguments.record; + const encoding: string = this.mArguments.encoding; // Get the job details const job: IJob = await GetJobs.getJob(this.mSession, jobid); const options: IDownloadAllSpoolContentParms = { @@ -43,7 +44,8 @@ export default class OutputHandler extends ZosmfBaseHandler { omitJobidDirectory, extension, binary, - record + record, + encoding }; // Download 'em all await DownloadJobs.downloadAllSpoolContentCommon(this.mSession, options); diff --git a/packages/cli/src/zosjobs/submit/Submit.shared.handler.ts b/packages/cli/src/zosjobs/submit/Submit.shared.handler.ts index 07a74c2ea6..00c2596f93 100644 --- a/packages/cli/src/zosjobs/submit/Submit.shared.handler.ts +++ b/packages/cli/src/zosjobs/submit/Submit.shared.handler.ts @@ -31,7 +31,7 @@ export default class SharedSubmitHandler extends ZosmfBaseHandler { * @memberof SubmitDataSetHandler */ public async processCmd(params: IHandlerParameters): Promise { - try{ + try { const status: ITaskWithStatus = { statusMessage: "Submitting job", percentComplete: TaskProgress.TEN_PERCENT, @@ -47,7 +47,10 @@ export default class SharedSubmitHandler extends ZosmfBaseHandler { waitForActive: this.mArguments.waitForActive, waitForOutput: this.mArguments.waitForOutput, task: status, - jclSymbols: this.mArguments.jclSymbols + jclSymbols: this.mArguments.jclSymbols, + internalReaderFileEncoding: this.mArguments.jobEncoding, + internalReaderLrecl: this.mArguments.jobRecordLength?.toString(), + internalReaderRecfm: this.mArguments.jobRecordFormat }; const options: IDownloadOptions = {}; params.response.progress.startBar({task: status}); diff --git a/packages/cli/src/zosjobs/submit/local-file/localFile.definition.ts b/packages/cli/src/zosjobs/submit/local-file/localFile.definition.ts index d49a18058b..fa914b5496 100644 --- a/packages/cli/src/zosjobs/submit/local-file/localFile.definition.ts +++ b/packages/cli/src/zosjobs/submit/local-file/localFile.definition.ts @@ -62,6 +62,24 @@ export const LocalFileDefinition: ICommandDefinition = { name: "jcl-symbols", aliases: ["js"], description: strings.COMMON_OPT.JCL_SYMBOLS, type: "string" + }, + { + name: "job-encoding", aliases: ["je"], + description: strings.COMMON_OPT.JOB_ENCODING, + type: "string" + }, + { + name: "job-record-length", aliases: ["jrl"], + description: strings.COMMON_OPT.JOB_RECORD_LENGTH, + type: "number", + defaultValue: 80 + }, + { + name: "job-record-format", aliases: ["jrf"], + description: strings.COMMON_OPT.JOB_RECORD_FORMAT, + type: "string", + allowableValues: {values: ["F", "V"]}, + defaultValue: "F" } ]as ICommandOptionDefinition[]), profile: { diff --git a/packages/cli/src/zosjobs/submit/stdin/stdin.definition.ts b/packages/cli/src/zosjobs/submit/stdin/stdin.definition.ts index cf47868f54..ca9203602f 100644 --- a/packages/cli/src/zosjobs/submit/stdin/stdin.definition.ts +++ b/packages/cli/src/zosjobs/submit/stdin/stdin.definition.ts @@ -54,6 +54,24 @@ export const StdinDefinition: ICommandDefinition = { name: "jcl-symbols", aliases: ["js"], description: strings.COMMON_OPT.JCL_SYMBOLS, type: "string" + }, + { + name: "job-encoding", aliases: ["je"], + description: strings.COMMON_OPT.JOB_ENCODING, + type: "string" + }, + { + name: "job-record-length", aliases: ["jrl"], + description: strings.COMMON_OPT.JOB_RECORD_LENGTH, + type: "number", + defaultValue: 80 + }, + { + name: "job-record-format", aliases: ["jrf"], + description: strings.COMMON_OPT.JOB_RECORD_FORMAT, + type: "string", + allowableValues: {values: ["F", "V"]}, + defaultValue: "F" } ] as ICommandOptionDefinition[]), profile: { diff --git a/packages/cli/src/zosjobs/view/all-spool-content/AllSpoolContent.definition.ts b/packages/cli/src/zosjobs/view/all-spool-content/AllSpoolContent.definition.ts index 6023846668..dc748e92a0 100644 --- a/packages/cli/src/zosjobs/view/all-spool-content/AllSpoolContent.definition.ts +++ b/packages/cli/src/zosjobs/view/all-spool-content/AllSpoolContent.definition.ts @@ -32,6 +32,15 @@ export const AllSpoolContentDefinition: ICommandDefinition = { required: true }, ], + options: [ + { + name: "encoding", + aliases: ["ec"], + description: "Download the spool file content with encoding mode, which means that " + + "data conversion is performed using the file encoding specified.", + type: "string" + } + ], examples: [ { description: "View all spool files for the job with job ID JOB00234", diff --git a/packages/cli/src/zosjobs/view/all-spool-content/AllSpoolContent.handler.ts b/packages/cli/src/zosjobs/view/all-spool-content/AllSpoolContent.handler.ts index 2d63044c5f..807cb5daf1 100644 --- a/packages/cli/src/zosjobs/view/all-spool-content/AllSpoolContent.handler.ts +++ b/packages/cli/src/zosjobs/view/all-spool-content/AllSpoolContent.handler.ts @@ -36,7 +36,7 @@ export default class AllSpoolContentHandler extends ZosmfBaseHandler { const responseArray: ISpoolFile[] = []; for (const spoolFile of spoolFiles) { - const spoolContent = await GetJobs.getSpoolContent(this.mSession, spoolFile); + const spoolContent = await GetJobs.getSpoolContent(this.mSession, spoolFile, this.mArguments.encoding); if (spoolFile.procstep != null && spoolFile.procstep.length > 0) { this.console.log("Spool file: %s (ID #%d, Step: %s, ProcStep: %s)", spoolFile.ddname, spoolFile.id, spoolFile.stepname, spoolFile.procstep); diff --git a/packages/cli/src/zosjobs/view/spool-file-by-id/SpoolFileById.definition.ts b/packages/cli/src/zosjobs/view/spool-file-by-id/SpoolFileById.definition.ts index f507a337a6..b9649fab5c 100644 --- a/packages/cli/src/zosjobs/view/spool-file-by-id/SpoolFileById.definition.ts +++ b/packages/cli/src/zosjobs/view/spool-file-by-id/SpoolFileById.definition.ts @@ -41,6 +41,15 @@ export const SpoolFileByIdDefinition: ICommandDefinition = { required: true } ], + options: [ + { + name: "encoding", + aliases: ["ec"], + description: "Download the spool file content with encoding mode, which means that " + + "data conversion is performed using the file encoding specified.", + type: "string" + } + ], examples: [ { description: "View the spool file with ID 4 for the job with job ID JOB00123", diff --git a/packages/cli/src/zosjobs/view/spool-file-by-id/SpoolFileById.handler.ts b/packages/cli/src/zosjobs/view/spool-file-by-id/SpoolFileById.handler.ts index d500c4415e..6a664b226b 100644 --- a/packages/cli/src/zosjobs/view/spool-file-by-id/SpoolFileById.handler.ts +++ b/packages/cli/src/zosjobs/view/spool-file-by-id/SpoolFileById.handler.ts @@ -31,7 +31,12 @@ export default class SpoolFileByIdHandler extends ZosmfBaseHandler { const job: IJob = await GetJobs.getJob(this.mSession, this.mArguments.jobid); // Get the content, set the JSON response object, and print - const content: string = await GetJobs.getSpoolContentById(this.mSession, job.jobname, job.jobid, this.mArguments.spoolfileid); + const content: string = await GetJobs.getSpoolContentById( + this.mSession, + job.jobname, job.jobid, + this.mArguments.spoolfileid, + this.mArguments.encoding + ); this.data.setObj(content); this.data.setMessage(`Spool file "${this.mArguments.spoolfileid}" content obtained for job "${job.jobname}(${job.jobid})"`); this.console.log(Buffer.from(content)); diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 17f090ce2f..98733bd431 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -31,6 +31,14 @@ All notable changes to the Zowe core SDK package will be documented in this file - Major: First major version bump for V3 +## `7.25.0` + +- Enhancement: Added `X_IBM_INTRDR_FILE_ENCODING` header to `ZosmfHeaders` [#2139](https://github.com/zowe/zowe-cli/pull/2139) + +## `7.24.3` + +- BugFix: Updated help text for `tokenType` option to remove special regular expression character `^`. [#1863](https://github.com/zowe/zowe-cli/issues/1863) + ## `7.21.2` - BugFix: Add information about password-protected certificate file support. [#2006](https://github.com/zowe/zowe-cli/issues/2006) diff --git a/packages/core/src/constants/Core.constants.ts b/packages/core/src/constants/Core.constants.ts index b99d57e7e5..a463ee289a 100644 --- a/packages/core/src/constants/Core.constants.ts +++ b/packages/core/src/constants/Core.constants.ts @@ -315,7 +315,7 @@ export class ProfileConstants { ...ProfileConstants.BASE_OPTION_TOKEN_TYPE, allowableValues: { values: SessConstants.ALL_TOKEN_TYPES - .map(tk => tk.indexOf(SessConstants.TOKEN_TYPE_APIML) >= 0 ? `^${SessConstants.TOKEN_TYPE_APIML}.*` : tk) + .map(tk => tk.indexOf(SessConstants.TOKEN_TYPE_APIML) >= 0 ? `${SessConstants.TOKEN_TYPE_APIML}.*` : tk) } }; diff --git a/packages/core/src/rest/ZosmfHeaders.ts b/packages/core/src/rest/ZosmfHeaders.ts index 4155f3fb31..1a7421ff46 100644 --- a/packages/core/src/rest/ZosmfHeaders.ts +++ b/packages/core/src/rest/ZosmfHeaders.ts @@ -18,6 +18,12 @@ import { IHeaderContent } from "./doc/IHeaderContent"; */ export class ZosmfHeaders { + /** + * file encoding header + * @memberof ZosmfHeaders + */ + public static readonly X_IBM_INTRDR_FILE_ENCODING = "X-IBM-Intrdr-File-Encoding"; + /** * lrecl header * @static diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index da8c2f648e..754be48b89 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -322,6 +322,15 @@ All notable changes to the Imperative package will be documented in this file. - Major: First major version bump for V3 +## `5.23.2` + +- BugFix: Updated error text for invalid command options so that allowable values are displayed as strings instead of regular expressions when possible. [#1863](https://github.com/zowe/zowe-cli/issues/1863) +- BugFix: Fixed issue where the `ConfigSecure.securePropsForProfile` function did not list secure properties outside the active config layer. [zowe-explorer-vscode#2633](https://github.com/zowe/zowe-explorer-vscode/issues/2633) + +## `5.23.1` + +- BugFix: Restore the previous precedence of token over password in AbstractRestClient [#2109](https://github.com/zowe/zowe-cli/issues/2109) + ## `5.23.0` - Enhancement: Prompt for user/password on SSH commands when a token is stored in the config. [#2081](https://github.com/zowe/zowe-cli/pull/2081) diff --git a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/auth/Cmd.cli.auth.fruit.integration.test.ts b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/auth/Cmd.cli.auth.fruit.integration.test.ts index 1eecdb9010..f8fed6e38f 100644 --- a/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/auth/Cmd.cli.auth.fruit.integration.test.ts +++ b/packages/imperative/__tests__/__integration__/cmd/__tests__/integration/cli/auth/Cmd.cli.auth.fruit.integration.test.ts @@ -10,4 +10,4 @@ */ require("./Cmd.cli.auth.login.fruit.integration.subtest"); -require("./Cmd.cli.auth.logout.fruit.integration.subtest"); \ No newline at end of file +require("./Cmd.cli.auth.logout.fruit.integration.subtest"); diff --git a/packages/imperative/src/cmd/src/syntax/SyntaxValidator.ts b/packages/imperative/src/cmd/src/syntax/SyntaxValidator.ts index 56c1c8db3f..c4bda0e277 100644 --- a/packages/imperative/src/cmd/src/syntax/SyntaxValidator.ts +++ b/packages/imperative/src/cmd/src/syntax/SyntaxValidator.ts @@ -315,7 +315,7 @@ export class SyntaxValidator { const optionValueArray = Array.isArray(optionValue) ? optionValue : [optionValue]; optionValueArray.filter(value => !this.checkIfAllowable(optionDefCopy.allowableValues, value)) .forEach(value => { - this.invalidOptionError(optionDefCopy, responseObject, value); + this.invalidOptionError(optionDef, responseObject, value); valid = false; }); } diff --git a/packages/imperative/src/cmd/src/syntax/__tests__/SyntaxValidator.unit.test.ts b/packages/imperative/src/cmd/src/syntax/__tests__/SyntaxValidator.unit.test.ts index 90c4db7dc8..1619a3fa51 100644 --- a/packages/imperative/src/cmd/src/syntax/__tests__/SyntaxValidator.unit.test.ts +++ b/packages/imperative/src/cmd/src/syntax/__tests__/SyntaxValidator.unit.test.ts @@ -110,8 +110,9 @@ describe("Imperative should provide advanced syntax validation rules", () => { it("If we specify an option that has a set of allowable string values," + " but specify a value that doesn't match any of the values, the command should fail ", function () { + const allowableValues = ValidationTestCommand.options?.find(({ name }) => name === "option-to-specify-3")?.allowableValues?.values; return tryOptions.bind(this, "--option-to-specify-3 badvalue --absence-implies " + - alwaysRequired, false, ["must match"])(); + alwaysRequired, false, ["must match", inspect(allowableValues)])(); }); it("If we specify an option that has a set of allowable string values," + " but specify a value that partially match one of the values, the command should fail ", diff --git a/packages/imperative/src/config/__tests__/Config.secure.unit.test.ts b/packages/imperative/src/config/__tests__/Config.secure.unit.test.ts index 619b0fb087..bd0f795db6 100644 --- a/packages/imperative/src/config/__tests__/Config.secure.unit.test.ts +++ b/packages/imperative/src/config/__tests__/Config.secure.unit.test.ts @@ -172,9 +172,9 @@ describe("Config secure tests", () => { }); it("should list all secure fields for a profile", async () => { - jest.spyOn(Config, "search").mockReturnValue(projectConfigPath); + jest.spyOn(Config, "search").mockReturnValue(projectConfigPath).mockReturnValueOnce(projectUserConfigPath); jest.spyOn(fs, "existsSync") - .mockReturnValueOnce(false) // Project user layer + .mockReturnValueOnce(true) // Project user layer .mockReturnValueOnce(true) // Project layer .mockReturnValueOnce(false) // User layer .mockReturnValueOnce(false); // Global layer diff --git a/packages/imperative/src/config/src/api/ConfigSecure.ts b/packages/imperative/src/config/src/api/ConfigSecure.ts index 765a8d430a..ad9e622e58 100644 --- a/packages/imperative/src/config/src/api/ConfigSecure.ts +++ b/packages/imperative/src/config/src/api/ConfigSecure.ts @@ -208,7 +208,7 @@ export class ConfigSecure extends ConfigApi { public securePropsForProfile(profileName: string): string[] { const profilePath = this.mConfig.api.profiles.getProfilePathFromName(profileName); const secureProps = new Set(); - for (const propPath of this.secureFields()) { + for (const propPath of this.findSecure(this.mConfig.mProperties.profiles, "profiles")) { const pathSegments = propPath.split("."); // profiles.XXX.properties.YYY // eslint-disable-next-line @typescript-eslint/no-magic-numbers const propProfilePath = pathSegments.slice(0, -2).join("."); diff --git a/packages/zosjobs/CHANGELOG.md b/packages/zosjobs/CHANGELOG.md index e5b5d5e1b6..461c409a11 100644 --- a/packages/zosjobs/CHANGELOG.md +++ b/packages/zosjobs/CHANGELOG.md @@ -27,6 +27,12 @@ All notable changes to the Zowe z/OS jobs SDK package will be documented in this - Major: First major version bump for V3 +## `7.25.0` + +- Enhancement: Added the ability to set `internalReaderFileEncoding` on the `submitJcl`, `submitJclString`, `submitJclCommon`, `submitJclNotify`, and `submitJclNotifyCommon` Jobs APIs [#2139](https://github.com/zowe/zowe-cli/pull/2139) +- Enhancement: Added the ability to set `internalReaderRecfm` and `internalReaderLrecl` on the `submitJclString` Jobs API [#2139](https://github.com/zowe/zowe-cli/pull/2139) +- Enhancement: Added the ability to download job spool files using other codepages [#1822](https://github.com/zowe/zowe-cli/pull/1822) + ## `7.17.0` - Enhancement: Set properties for GetJobs errors for use in a more user-friendly format with the ZOWE_V3_ERR_FORMAT environment variable. [zowe-cli#935](https://github.com/zowe/zowe-cli/issues/935) diff --git a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts index 3189ab0fa7..645c347331 100644 --- a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts +++ b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts @@ -266,12 +266,12 @@ export class GetJobsData { * @memberof GetJobsData */ public static readonly SAMPLE_JES_MSG_LG: string = - " 1 J E S 2 J O B L O G -- S Y S T E M X A D 1 -- N O D E U S I L D A M D" + + " 1 J E S 2 J O B L O G -- S Y S T E M T E S T -- N O D E Z O W E T E S T" + " 0" + " 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ----" + - " 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=XAD1 Facility=TSO" + + " 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=TEST Facility=TSO" + " 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM" + - " 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS XAD1" + + " 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS TEST" + " 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22" + " 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT" + " 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0" + diff --git a/packages/zosjobs/__tests__/__system__/DownloadJobs.system.test.ts b/packages/zosjobs/__tests__/__system__/DownloadJobs.system.test.ts index 78f99abf9b..503afa9f1f 100644 --- a/packages/zosjobs/__tests__/__system__/DownloadJobs.system.test.ts +++ b/packages/zosjobs/__tests__/__system__/DownloadJobs.system.test.ts @@ -38,6 +38,8 @@ describe("Download Jobs - System tests", () => { let jobname: string; let jobFiles: IJobFile[]; let jesJCLJobFile: IJobFile; + let iefbr14DataSet: string; + let iefbr14JCL: string; beforeAll(async () => { testEnvironment = await TestEnvironment.setUp({ testName: "zos_download_jobs" @@ -48,8 +50,8 @@ describe("Download Jobs - System tests", () => { REAL_SESSION = TestEnvironment.createZosmfSession(testEnvironment); // download the valid IEFBR14 from the data set specified in the properties file - const iefbr14DataSet = testEnvironment.systemTestProperties.zosjobs.iefbr14Member; - const iefbr14JCL = (await Get.dataSet(REAL_SESSION, iefbr14DataSet)).toString(); + iefbr14DataSet = testEnvironment.systemTestProperties.zosjobs.iefbr14Member; + iefbr14JCL = (await Get.dataSet(REAL_SESSION, iefbr14DataSet)).toString(); const job = await SubmitJobs.submitJclNotifyCommon(REAL_SESSION, { jcl: iefbr14JCL @@ -79,6 +81,67 @@ describe("Download Jobs - System tests", () => { await DeleteJobs.deleteJob(REAL_SESSION, jobname, jobid); }); + describe("Special Positive tests", () => { + let alteredjobid: string; + let alteredjobname: string; + let alteredjobFiles: IJobFile[]; + let alteredjesJCLJobFile: IJobFile; + beforeAll(async () => { + const iefbr14JCLAltered = iefbr14JCL + "\n//* ^"; + const job = await SubmitJobs.submitJclNotifyCommon(REAL_SESSION, { + jcl: iefbr14JCLAltered + }); + alteredjobid = job.jobid; + alteredjobname = job.jobname; + alteredjobFiles = await GetJobs.getSpoolFiles(REAL_SESSION, alteredjobname, alteredjobid); + // find the specific DDs we will use in the tests + for (const file of alteredjobFiles) { + if (file.ddname === "JESJCL") { + alteredjesJCLJobFile = file; + } + } + + ACCOUNT = defaultSystem.tso.account; + const JOB_LENGTH = 6; + DOWNLOAD_JOB_NAME = REAL_SESSION.ISession.user?.substr(0, JOB_LENGTH).toUpperCase() + "DJ"; + JOBCLASS = testEnvironment.systemTestProperties.zosjobs.jobclass; + SYSAFF = testEnvironment.systemTestProperties.zosjobs.sysaff; + }); + + it("should be able to download single DD from job output with encoding", async () => { + const downloadDir = outputDirectory + "/downloadsingleenc"; + await DownloadJobs.downloadSpoolContentCommon(REAL_SESSION, { + outDir: downloadDir, + jobFile: alteredjesJCLJobFile, + encoding: "IBM-037" + }); + + const expectedFile = DownloadJobs.getSpoolDownloadFile(alteredjesJCLJobFile, false, downloadDir); + expect(IO.existsSync(expectedFile)).toEqual(true); + expect(IO.readFileSync(expectedFile).toString()).toContain("¬"); + expect(IO.readFileSync(expectedFile).toString()).not.toContain("^"); + }); + + it("should be able to download all DDs from job output with encoding", async () => { + const downloadDir = outputDirectory + "/downloadallenc"; + await DownloadJobs.downloadAllSpoolContentCommon(REAL_SESSION, { + outDir: downloadDir, + jobid: alteredjobid, + jobname: alteredjobname, + encoding: "IBM-037" + }); + + for (const file of alteredjobFiles) { + const expectedFile = DownloadJobs.getSpoolDownloadFile(file, false, downloadDir); + expect(IO.existsSync(expectedFile)).toEqual(true); + if (file.ddname === "JESJCL") { + expect(IO.readFileSync(expectedFile).toString()).toContain("¬"); + expect(IO.readFileSync(expectedFile).toString()).not.toContain("^"); + } + } + }); + }); + describe("Positive tests", () => { it("should be able to download a single DD from job output to specified directory", async () => { diff --git a/packages/zosjobs/__tests__/__system__/GetJobs.system.test.ts b/packages/zosjobs/__tests__/__system__/GetJobs.system.test.ts index 1992f73296..5a65c75ec6 100644 --- a/packages/zosjobs/__tests__/__system__/GetJobs.system.test.ts +++ b/packages/zosjobs/__tests__/__system__/GetJobs.system.test.ts @@ -913,6 +913,31 @@ describe("Get spool APIs", () => { expect(found).toBe(true); }, LONG_TIMEOUT); + it("Should get spool content from a job with encoding", async () => { + const idcams = fs.readFileSync(join(TEST_RESOURCES_DIR, "jcl/instream_rexx_content.jcl")).toString(); + const DATA_TO_CHECK = "PUTTYPUTTYPUTTYPUTTY¬¬"; + const renderedJcl = TextUtils.renderWithMustache(idcams, + {JOBNAME: MONITOR_JOB_NAME, ACCOUNT, JOBCLASS, TYPERUNPARM: "", SYSAFF, CONTENT: DATA_TO_CHECK}); + const NUM_OF_SPOOL_FILES = 4; + const DD_WITH_CONTENT = "SYSTSPRT"; + const job = await SubmitJobs.submitJclNotify(REAL_SESSION, renderedJcl); + const files = await GetJobs.getSpoolFilesForJob(REAL_SESSION, job); + expect(files.length).toBe(NUM_OF_SPOOL_FILES); // verify expected number of DDs + let found = false; + + for (const file of files) { + if (file.ddname === DD_WITH_CONTENT) { + const dataContent = await GetJobs.getSpoolContent(REAL_SESSION, file, "IBM-037"); + expect(dataContent).toContain("NUMBER OF RECORDS PROCESSED WAS 3"); + expect(dataContent).toContain("PUTTYPUTTYPUTTY"); + expect(dataContent).not.toContain("¬¬"); + expect(dataContent).toContain("^^"); + found = true; + } + } + expect(found).toBe(true); + }, LONG_TIMEOUT); + it("Should get spool content for a single job", async () => { const idcams = fs.readFileSync(join(TEST_RESOURCES_DIR, "jcl/instream_rexx_content.jcl")).toString(); const DATA_TO_CHECK = "PUTTYPUTTYPUTTYPUTTY"; @@ -931,6 +956,28 @@ describe("Get spool APIs", () => { } } }, LONG_TIMEOUT); + + it("Should get spool content for a single job with encoding", async () => { + const idcams = fs.readFileSync(join(TEST_RESOURCES_DIR, "jcl/instream_rexx_content.jcl")).toString(); + const DATA_TO_CHECK = "PUTTYPUTTYPUTTYPUTTY¬¬"; + const renderedJcl = TextUtils.renderWithMustache(idcams, + {JOBNAME: MONITOR_JOB_NAME, ACCOUNT, JOBCLASS, TYPERUNPARM: "", SYSAFF, CONTENT: DATA_TO_CHECK}); + const NUM_OF_SPOOL_FILES = 4; + const DD_WITH_CONTENT = "SYSTSPRT"; + const job = await SubmitJobs.submitJclNotify(REAL_SESSION, renderedJcl); + const files = await GetJobs.getSpoolFilesForJob(REAL_SESSION, job); + expect(files.length).toBe(NUM_OF_SPOOL_FILES); // verify expected number of DDs + for (const file of files) { + if (file.ddname === DD_WITH_CONTENT) { + const content = await GetJobs.getSpoolContentById(REAL_SESSION, job.jobname, job.jobid, file.id, "IBM-037"); + expect(content).toContain("NUMBER OF RECORDS PROCESSED WAS 3"); + expect(content).toContain("PUTTYPUTTYPUTTY"); + expect(content).not.toContain("¬¬"); + expect(content).toContain("^^"); + break; + } + } + }, LONG_TIMEOUT); }); }); diff --git a/packages/zosjobs/__tests__/__system__/SubmitJobs.system.test.ts b/packages/zosjobs/__tests__/__system__/SubmitJobs.system.test.ts index 415705ee9a..a97bfd2b68 100644 --- a/packages/zosjobs/__tests__/__system__/SubmitJobs.system.test.ts +++ b/packages/zosjobs/__tests__/__system__/SubmitJobs.system.test.ts @@ -78,6 +78,18 @@ describe("Submit Jobs - System Tests", () => { await deleteJob(job); }); + it("should allow users to call submitJCLCommon with correct extended parameters", async () => { + const job = await SubmitJobs.submitJclCommon(REAL_SESSION, { + jcl: iefbr14JCL, + internalReaderFileEncoding: "IBM-037", + internalReaderLrecl: "80", + internalReaderRecfm: "F" + }); + expect(job.jobid).toBeDefined(); + expect(job.jobname).toBeDefined(); + await deleteJob(job); + }); + it("should allow users to call submitJCL with correct parameters (no internal reader settings)", async () => { @@ -98,7 +110,8 @@ describe("Submit Jobs - System Tests", () => { const job = await SubmitJobs.submitJcl(REAL_SESSION, jcl, "V", - "256" + "256", + "IBM-037" ); expect(job.jobid).toBeDefined(); expect(job.jobname).toBeDefined(); @@ -117,7 +130,8 @@ describe("Submit Jobs - System Tests", () => { { jcl, internalReaderLrecl: "256", - internalReaderRecfm: "F" + internalReaderRecfm: "F", + internalReaderFileEncoding: "IBM-037" } ); expect(job.jobid).toBeDefined(); @@ -167,7 +181,8 @@ describe("Submit Jobs - System Tests", () => { jcl += Array(twoHundredChars).join("A"); // add a long line to test internal reader const job = await SubmitJobs.submitJclNotify(REAL_SESSION, jcl, "V", - "256"); + "256", + "IBM-037"); expect(job.jobid).toBeDefined(); expect(job.jobname).toBeDefined(); await deleteJob(job); @@ -215,6 +230,17 @@ describe("Submit Jobs - System Tests", () => { expect(job.jobname).toBeDefined(); }); + it("should return the job info of a submitted JCL string with extended options", async () => { + const job: any = await SubmitJobs.submitJclString(REAL_SESSION, "//JOBNAME1 JOB", { + jclSource: "stdin", + internalReaderFileEncoding: "IBM-037", + internalReaderLrecl: "80", + internalReaderRecfm: "F" + }); + expect(job.jobid).toBeDefined(); + expect(job.jobname).toBeDefined(); + }); + it("should return an array of spool content", async () => { const job: any = await SubmitJobs.submitJclString(REAL_SESSION, "//JOBNAME1 JOB", {jclSource: "stdin", viewAllSpoolContent: true}); expect(job.constructor === Array).toBe(true); diff --git a/packages/zosjobs/__tests__/__unit__/DownloadJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/DownloadJobs.unit.test.ts index 9e5987307c..e226f35cad 100644 --- a/packages/zosjobs/__tests__/__unit__/DownloadJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/DownloadJobs.unit.test.ts @@ -265,6 +265,112 @@ describe("DownloadJobs", () => { expect(chunks).toEqual(["test"]); }); + it("should allow users to call downloadSpoolContentCommon with correct parameters (with encoding)", async () => { + let uri: string = ""; + ZosmfRestClient.getStreamed = jest.fn(async (s: AbstractSession, resource: string, r?: any[], stream?: Writable): Promise => { + uri = resource; + stream?._write("test", "utf-8", jest.fn()); + }); + const chunks: any[] = []; + const jobFile: IJobFile = JSON.parse(JSON.stringify(jobFiles[0])); + const spoolParms: IDownloadSpoolContentParms = { + jobFile: jobFile, + jobid: fakeJobID, + jobname: fakeJobName, + encoding: "IBM-037", + binary: false, + stream: new Writable({write: (chunk) => { + chunks.push(chunk); + }}) + }; + + await DownloadJobs.downloadSpoolContentCommon(fakeSession, spoolParms); + + expect(IO.createDirsSyncFromFilePath).not.toHaveBeenCalled(); + expect(uri).toContain("?fileEncoding=IBM-037"); + expect(chunks).toEqual(["test"]); + }); + + it("should allow users to call downloadSpoolContentCommon with correct parameters (with invalid encoding)", async () => { + let uri: string = ""; + ZosmfRestClient.getStreamed = jest.fn(async (s: AbstractSession, resource: string, r?: any[], stream?: Writable): Promise => { + uri = resource; + stream?._write("test", "utf-8", jest.fn()); + }); + const chunks: any[] = []; + const jobFile: IJobFile = JSON.parse(JSON.stringify(jobFiles[0])); + const spoolParms: IDownloadSpoolContentParms = { + jobFile: jobFile, + jobid: fakeJobID, + jobname: fakeJobName, + encoding: " ", + binary: false, + stream: new Writable({write: (chunk) => { + chunks.push(chunk); + }}) + }; + + await DownloadJobs.downloadSpoolContentCommon(fakeSession, spoolParms); + + expect(IO.createDirsSyncFromFilePath).not.toHaveBeenCalled(); + expect(uri).not.toContain("fileEncoding"); + expect(chunks).toEqual(["test"]); + }); + + it("should allow users to call downloadSpoolContentCommon with correct parameters (streamed in binary mode with encoding)", async () => { + let uri: string = ""; + ZosmfRestClient.getStreamed = jest.fn(async (s: AbstractSession, resource: string, r?: any[], stream?: Writable): Promise => { + uri = resource; + stream?._write("test", "utf-8", jest.fn()); + }); + const chunks: any[] = []; + const jobFile: IJobFile = JSON.parse(JSON.stringify(jobFiles[0])); + const spoolParms: IDownloadSpoolContentParms = { + jobFile: jobFile, + jobid: fakeJobID, + jobname: fakeJobName, + encoding: "IBM-037", + binary: true, + stream: new Writable({write: (chunk) => { + chunks.push(chunk); + }}) + }; + + await DownloadJobs.downloadSpoolContentCommon(fakeSession, spoolParms); + + expect(IO.createDirsSyncFromFilePath).not.toHaveBeenCalled(); + expect(uri).toContain("?mode=binary"); + expect(uri).not.toContain("fileEncoding"); + expect(chunks).toEqual(["test"]); + }); + + it("should allow users to call downloadSpoolContentCommon with correct parameters (streamed in record mode with encoding)", async () => { + let uri: string = ""; + ZosmfRestClient.getStreamed = jest.fn(async (s: AbstractSession, resource: string, r?: any[], stream?: Writable): Promise => { + uri = resource; + stream?._write("test", "utf-8", jest.fn()); + }); + const chunks: any[] = []; + const jobFile: IJobFile = JSON.parse(JSON.stringify(jobFiles[0])); + const spoolParms: IDownloadSpoolContentParms = { + jobFile: jobFile, + jobid: fakeJobID, + jobname: fakeJobName, + encoding: "IBM-037", + record: true, + stream: new Writable({write: (chunk) => { + chunks.push(chunk); + }}) + }; + + await DownloadJobs.downloadSpoolContentCommon(fakeSession, spoolParms); + + expect(IO.createDirsSyncFromFilePath).not.toHaveBeenCalled(); + expect(uri).toContain("?mode=record"); + expect(uri).not.toContain("fileEncoding"); + expect(chunks).toEqual(["test"]); + }); + it("should allow users to call downloadSpoolContentCommon with correct parameters (default outDir and record mode)", async () => { let uri: string = ""; ZosmfRestClient.getStreamed = jest.fn(async (session: AbstractSession, resource: string, reqHeaders?: any[]): Promise => { diff --git a/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts index 2ebf1b5837..f8a0e3138d 100644 --- a/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts @@ -489,12 +489,38 @@ describe("GetJobs tests", () => { expect(contentCommon).toMatchSnapshot(); }); + it("should be able to get spool content with encoding", async () => { + (ZosmfRestClient.getExpectString as any) = mockGetJobsStringData(GetJobsData.SAMPLE_JES_MSG_LG); + const encoding = "IBM-037"; + + const content = await GetJobs.getSpoolContent(pretendSession, GetJobsData.SAMPLE_JOB_FILE, encoding); + const contentCommon = await GetJobs.getSpoolContentCommon(pretendSession, GetJobsData.SAMPLE_JOB_FILE, encoding); + expect(content).toMatchSnapshot(); + expect(contentCommon).toMatchSnapshot(); + }); + + it("should be able to get spool content with empty encoding", async () => { + (ZosmfRestClient.getExpectString as any) = mockGetJobsStringData(GetJobsData.SAMPLE_JES_MSG_LG); + const encoding = " "; + + const content = await GetJobs.getSpoolContent(pretendSession, GetJobsData.SAMPLE_JOB_FILE, encoding); + const contentCommon = await GetJobs.getSpoolContentCommon(pretendSession, GetJobsData.SAMPLE_JOB_FILE, encoding); + expect(content).toMatchSnapshot(); + expect(contentCommon).toMatchSnapshot(); + }); + it("should return spool content from getSpoolContentById if z/OSMF response is mocked", async () => { (ZosmfRestClient.getExpectString as any) = mockGetJobsStringData(GetJobsData.SAMPLE_JES_MSG_LG); const content = await GetJobs.getSpoolContentById(pretendSession, "MYJOB1", "JOB0123", 1); expect(content).toEqual(GetJobsData.SAMPLE_JES_MSG_LG); }); + it("should return spool content from getSpoolContentById with encoding if z/OSMF response is mocked", async () => { + (ZosmfRestClient.getExpectString as any) = mockGetJobsStringData(GetJobsData.SAMPLE_JES_MSG_LG); + const content = await GetJobs.getSpoolContentById(pretendSession, "MYJOB1", "JOB0123", 1, "IBM-037"); + expect(content).toEqual(GetJobsData.SAMPLE_JES_MSG_LG); + }); + it("should error if spoolID is omitted from getSpoolContentById", async () => { let err: Error; try { diff --git a/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts index 510d7e5672..55d6257d1c 100644 --- a/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts @@ -80,6 +80,18 @@ describe("Submit Jobs API", () => { expect(job.jobname).toEqual(fakeJobName); }); + it("should allow users to call submitJCLCommon with extended correct parameters", async () => { + (ZosmfRestClient as any).putExpectJSON = returnIJob; // mock return job + const job = await SubmitJobs.submitJclCommon(fakeSession, { + jcl: "//EXEC PGM=IEFBR14", + internalReaderFileEncoding: "IBM-037", + internalReaderLrecl: "80", + internalReaderRecfm: "F" + }); + // mocking worked if this fake job name is filled in + expect(job.jobname).toEqual(fakeJobName); + }); + it("should allow users to call submitJCL with correct parameters (no internal reader settings)", async () => { (ZosmfRestClient as any).putExpectJSON = returnIJob; // mock return job @@ -96,7 +108,8 @@ describe("Submit Jobs API", () => { const job = await SubmitJobs.submitJcl(fakeSession, "//EXEC PGM=IEFBR14", "VB", - "256" + "256", + "IBM-037" ); // mocking worked if this fake job name is filled in expect(job.jobname).toEqual(fakeJobName); @@ -240,7 +253,8 @@ describe("Submit Jobs API", () => { { jcl: "//EXEC PGM=IEFBR14", internalReaderLrecl: "VB", - internalReaderRecfm: "256" + internalReaderRecfm: "256", + internalReaderFileEncoding: "IBM-037" } ); // mocking worked if this fake job name is filled in @@ -291,7 +305,8 @@ describe("Submit Jobs API", () => { (MonitorJobs as any).waitForStatusCommon = returnIJob; // mock monitor job API used by SubmitJobs.ts const job = await SubmitJobs.submitJclNotify(fakeSession, "//EXEC PGM=IEFBR14", "VB", - "256"); + "256", + "IBM-037"); // mocking worked if this fake job name is filled in expect(job.jobname).toEqual(fakeJobName); }); @@ -385,6 +400,30 @@ describe("Submit Jobs API", () => { expect(job).toMatchObject(sampleJob); }); + + it("should allow users to call submitJclString with extended correct parameters", async () => { + (ZosmfRestClient as any).putExpectJSON = returnIJob; // mock return job + const submitParms: ISubmitParms = { + jclSource: "//EXEC PGM=IEFBR14", + internalReaderFileEncoding: "IBM-037", + internalReaderLrecl: "80", + internalReaderRecfm: "F", + waitForOutput: true, + task: { + percentComplete: 70, + statusMessage:"Waiting for " + fakeJobID + " to enter OUTPUT", + stageName: TaskStage.IN_PROGRESS + } as ITaskWithStatus + }; + checkSubmitOptionsSpy.mockReturnValueOnce(sampleJob as IJob); + SubmitJobs.checkSubmitOptions = jest.fn(async (fakeSession, parms, responseJobInfo): Promise => { + return sampleJob as IJob; + }); + + const job = (await SubmitJobs.submitJclString(fakeSession, submitParms.jclSource, submitParms)) as IJob; + + expect(job).toMatchObject(sampleJob); + }); }); diff --git a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap index d2d63a7d02..a8c7fff252 100644 --- a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap +++ b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap @@ -511,9 +511,17 @@ Array [ ] `; -exports[`GetJobs tests getSpoolContent APIs should be able to get spool content 1`] = `" 1 J E S 2 J O B L O G -- S Y S T E M X A D 1 -- N O D E U S I L D A M D 0 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ---- 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=XAD1 Facility=TSO 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS XAD1 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0 08.26.22 JOB01544 IEF404I RUNMAIN - ENDED - TIME=08.26.22 08.26.22 JOB01544 CAJR252I JOB ENDED. TOTAL EST-COST $ .00 TOTAL CPU TIME 00:00:00.00 08.26.22 JOB01544 $HASP395 RUNMAIN ENDED - RC=00000------ JES2 JOB STATISTICS ------- 02 APR 2018 JOB EXECUTION DATE- 6 CARDS READ- 73 SYSOUT PRINT RECORDS- 0 SYSOUT PUNCH RECORDS- 8 SYSOUT SPOOL KBYTES- 0.00 MINUTES EXECUTION TIME"`; +exports[`GetJobs tests getSpoolContent APIs should be able to get spool content 1`] = `" 1 J E S 2 J O B L O G -- S Y S T E M T E S T -- N O D E Z O W E T E S T 0 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ---- 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=TEST Facility=TSO 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS TEST 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0 08.26.22 JOB01544 IEF404I RUNMAIN - ENDED - TIME=08.26.22 08.26.22 JOB01544 CAJR252I JOB ENDED. TOTAL EST-COST $ .00 TOTAL CPU TIME 00:00:00.00 08.26.22 JOB01544 $HASP395 RUNMAIN ENDED - RC=00000------ JES2 JOB STATISTICS ------- 02 APR 2018 JOB EXECUTION DATE- 6 CARDS READ- 73 SYSOUT PRINT RECORDS- 0 SYSOUT PUNCH RECORDS- 8 SYSOUT SPOOL KBYTES- 0.00 MINUTES EXECUTION TIME"`; -exports[`GetJobs tests getSpoolContent APIs should be able to get spool content 2`] = `" 1 J E S 2 J O B L O G -- S Y S T E M X A D 1 -- N O D E U S I L D A M D 0 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ---- 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=XAD1 Facility=TSO 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS XAD1 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0 08.26.22 JOB01544 IEF404I RUNMAIN - ENDED - TIME=08.26.22 08.26.22 JOB01544 CAJR252I JOB ENDED. TOTAL EST-COST $ .00 TOTAL CPU TIME 00:00:00.00 08.26.22 JOB01544 $HASP395 RUNMAIN ENDED - RC=00000------ JES2 JOB STATISTICS ------- 02 APR 2018 JOB EXECUTION DATE- 6 CARDS READ- 73 SYSOUT PRINT RECORDS- 0 SYSOUT PUNCH RECORDS- 8 SYSOUT SPOOL KBYTES- 0.00 MINUTES EXECUTION TIME"`; +exports[`GetJobs tests getSpoolContent APIs should be able to get spool content 2`] = `" 1 J E S 2 J O B L O G -- S Y S T E M T E S T -- N O D E Z O W E T E S T 0 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ---- 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=TEST Facility=TSO 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS TEST 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0 08.26.22 JOB01544 IEF404I RUNMAIN - ENDED - TIME=08.26.22 08.26.22 JOB01544 CAJR252I JOB ENDED. TOTAL EST-COST $ .00 TOTAL CPU TIME 00:00:00.00 08.26.22 JOB01544 $HASP395 RUNMAIN ENDED - RC=00000------ JES2 JOB STATISTICS ------- 02 APR 2018 JOB EXECUTION DATE- 6 CARDS READ- 73 SYSOUT PRINT RECORDS- 0 SYSOUT PUNCH RECORDS- 8 SYSOUT SPOOL KBYTES- 0.00 MINUTES EXECUTION TIME"`; + +exports[`GetJobs tests getSpoolContent APIs should be able to get spool content with empty encoding 1`] = `" 1 J E S 2 J O B L O G -- S Y S T E M T E S T -- N O D E Z O W E T E S T 0 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ---- 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=TEST Facility=TSO 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS TEST 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0 08.26.22 JOB01544 IEF404I RUNMAIN - ENDED - TIME=08.26.22 08.26.22 JOB01544 CAJR252I JOB ENDED. TOTAL EST-COST $ .00 TOTAL CPU TIME 00:00:00.00 08.26.22 JOB01544 $HASP395 RUNMAIN ENDED - RC=00000------ JES2 JOB STATISTICS ------- 02 APR 2018 JOB EXECUTION DATE- 6 CARDS READ- 73 SYSOUT PRINT RECORDS- 0 SYSOUT PUNCH RECORDS- 8 SYSOUT SPOOL KBYTES- 0.00 MINUTES EXECUTION TIME"`; + +exports[`GetJobs tests getSpoolContent APIs should be able to get spool content with empty encoding 2`] = `" 1 J E S 2 J O B L O G -- S Y S T E M T E S T -- N O D E Z O W E T E S T 0 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ---- 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=TEST Facility=TSO 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS TEST 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0 08.26.22 JOB01544 IEF404I RUNMAIN - ENDED - TIME=08.26.22 08.26.22 JOB01544 CAJR252I JOB ENDED. TOTAL EST-COST $ .00 TOTAL CPU TIME 00:00:00.00 08.26.22 JOB01544 $HASP395 RUNMAIN ENDED - RC=00000------ JES2 JOB STATISTICS ------- 02 APR 2018 JOB EXECUTION DATE- 6 CARDS READ- 73 SYSOUT PRINT RECORDS- 0 SYSOUT PUNCH RECORDS- 8 SYSOUT SPOOL KBYTES- 0.00 MINUTES EXECUTION TIME"`; + +exports[`GetJobs tests getSpoolContent APIs should be able to get spool content with encoding 1`] = `" 1 J E S 2 J O B L O G -- S Y S T E M T E S T -- N O D E Z O W E T E S T 0 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ---- 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=TEST Facility=TSO 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS TEST 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0 08.26.22 JOB01544 IEF404I RUNMAIN - ENDED - TIME=08.26.22 08.26.22 JOB01544 CAJR252I JOB ENDED. TOTAL EST-COST $ .00 TOTAL CPU TIME 00:00:00.00 08.26.22 JOB01544 $HASP395 RUNMAIN ENDED - RC=00000------ JES2 JOB STATISTICS ------- 02 APR 2018 JOB EXECUTION DATE- 6 CARDS READ- 73 SYSOUT PRINT RECORDS- 0 SYSOUT PUNCH RECORDS- 8 SYSOUT SPOOL KBYTES- 0.00 MINUTES EXECUTION TIME"`; + +exports[`GetJobs tests getSpoolContent APIs should be able to get spool content with encoding 2`] = `" 1 J E S 2 J O B L O G -- S Y S T E M T E S T -- N O D E Z O W E T E S T 0 08.26.22 JOB01544 ---- MONDAY, 02 APR 2018 ---- 08.26.22 JOB01544 TSS7000I IBMUSER Last-Used 02 Apr 18 08:25 System=TEST Facility=TSO 08.26.22 JOB01544 TSS7001I Count=00411 Mode=Fail Locktime=None Name=USER, IBM 08.26.22 JOB01544 $HASP373 RUNMAIN STARTED - WLM INIT - SRVCLASS BATSTWLM - SYS TEST 08.26.22 JOB01544 IEF403I RUNMAIN - STARTED - TIME=08.26.22 08.26.22 JOB01544 CAJR250I STEPNAME STEP PGM= CCODE EST-COST EXCPS ELAPSED TOT-CPU PAGE-IN PAGE-OT SWAP-IN SWAP-OT 08.26.22 JOB01544 CAJR251I EXEC 1 IEFBR14 0000 $ .00 0 00:00:00.00 00:00:00.00 0 0 0 0 08.26.22 JOB01544 IEF404I RUNMAIN - ENDED - TIME=08.26.22 08.26.22 JOB01544 CAJR252I JOB ENDED. TOTAL EST-COST $ .00 TOTAL CPU TIME 00:00:00.00 08.26.22 JOB01544 $HASP395 RUNMAIN ENDED - RC=00000------ JES2 JOB STATISTICS ------- 02 APR 2018 JOB EXECUTION DATE- 6 CARDS READ- 73 SYSOUT PRINT RECORDS- 0 SYSOUT PUNCH RECORDS- 8 SYSOUT SPOOL KBYTES- 0.00 MINUTES EXECUTION TIME"`; exports[`GetJobs tests getSpoolContent APIs should error for missing jobname in callback scheme for spool content 1`] = `"Expect Error: Required job file object must be defined"`; diff --git a/packages/zosjobs/src/DownloadJobs.ts b/packages/zosjobs/src/DownloadJobs.ts index 7d0a132bc6..c449bf556b 100644 --- a/packages/zosjobs/src/DownloadJobs.ts +++ b/packages/zosjobs/src/DownloadJobs.ts @@ -10,7 +10,7 @@ */ import * as path from "path"; -import { AbstractSession, ImperativeExpect, IO, Logger } from "@zowe/imperative"; +import { AbstractSession, ImperativeExpect, IO, Logger, Headers } from "@zowe/imperative"; import { JobsConstants } from "./JobsConstants"; import { IDownloadAllSpoolContentParms } from "./doc/input/IDownloadAllSpoolContentParms"; import { IJobFile } from "./doc/response/IJobFile"; @@ -123,8 +123,12 @@ export class DownloadJobs { parameters += "?mode=record"; } + if (!parms.binary && !parms.record && parms.encoding?.trim() != "") { + parameters += "?fileEncoding=" + parms.encoding; + } + const writeStream = parms.stream ?? IO.createWriteStream(file); - await ZosmfRestClient.getStreamed(session, JobsConstants.RESOURCE + parameters, undefined, writeStream, + await ZosmfRestClient.getStreamed(session, JobsConstants.RESOURCE + parameters, [Headers.TEXT_PLAIN_UTF8], writeStream, true); } diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index 82430748e8..9750d88561 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -348,12 +348,13 @@ export class GetJobs { * @static * @param {AbstractSession} session - z/OSMF connection info * @param jobFile - the spool file for which you want to retrieve the content + * @param encoding - the code page to use for EBCDIC translation * @returns {Promise} - promise that resolves to the spool content * @memberof GetJobs */ - public static getSpoolContent(session: AbstractSession, jobFile: IJobFile) { + public static getSpoolContent(session: AbstractSession, jobFile: IJobFile, encoding?: string) { Logger.getAppLogger().trace("GetJobs.getSpoolContent()"); - return GetJobs.getSpoolContentCommon(session, jobFile); + return GetJobs.getSpoolContentCommon(session, jobFile, encoding); } /** @@ -366,13 +367,14 @@ export class GetJobs { * @returns {Promise} - promise that resolves to the spool content * @memberof GetJobs */ - public static async getSpoolContentById(session: AbstractSession, jobname: string, jobid: string, spoolId: number) { + public static async getSpoolContentById(session: AbstractSession, jobname: string, jobid: string, spoolId: number, encoding?: string) { Logger.getAppLogger().trace("GetJobs.getSpoolContentById()"); ImperativeExpect.toNotBeNullOrUndefined(jobname, "Required parameter jobname must be defined"); ImperativeExpect.toNotBeNullOrUndefined(jobid, "Required parameter jobid must be defined"); ImperativeExpect.toNotBeNullOrUndefined(spoolId, "Required parameter spoolId must be defined"); - const parameters: string = "/" + encodeURIComponent(jobname) + "/" + encodeURIComponent(jobid) + + let parameters: string = "/" + encodeURIComponent(jobname) + "/" + encodeURIComponent(jobid) + JobsConstants.RESOURCE_SPOOL_FILES + "/" + encodeURIComponent(spoolId) + JobsConstants.RESOURCE_SPOOL_CONTENT; + if (encoding && encoding.trim() != "") {parameters += "?fileEncoding=" + encoding;} Logger.getAppLogger().info("GetJobs.getSpoolContentById() parameters: " + parameters); return ZosmfRestClient.getExpectString(session, JobsConstants.RESOURCE + parameters, [Headers.TEXT_PLAIN_UTF8]); } @@ -382,14 +384,16 @@ export class GetJobs { * @static * @param {AbstractSession} session - z/OSMF connection info * @param jobFile - the spool file for which you want to retrieve the content + * @param encoding - the code page to use for EBCDIC translation * @returns {Promise} - promise that resolves to the spool content * @memberof GetJobs */ - public static async getSpoolContentCommon(session: AbstractSession, jobFile: IJobFile) { + public static async getSpoolContentCommon(session: AbstractSession, jobFile: IJobFile, encoding?: string) { Logger.getAppLogger().trace("GetJobs.getSpoolContentCommon()"); ImperativeExpect.toNotBeNullOrUndefined(jobFile, "Required job file object must be defined"); - const parameters: string = "/" + encodeURIComponent(jobFile.jobname) + "/" + encodeURIComponent(jobFile.jobid) + + let parameters: string = "/" + encodeURIComponent(jobFile.jobname) + "/" + encodeURIComponent(jobFile.jobid) + JobsConstants.RESOURCE_SPOOL_FILES + "/" + encodeURIComponent(jobFile.id) + JobsConstants.RESOURCE_SPOOL_CONTENT; + if (encoding && encoding.trim() != "") {parameters += "?fileEncoding=" + encoding;} Logger.getAppLogger().info("GetJobs.getSpoolContentCommon() parameters: " + parameters); return ZosmfRestClient.getExpectString(session, JobsConstants.RESOURCE + parameters, [Headers.TEXT_PLAIN_UTF8]); } diff --git a/packages/zosjobs/src/SubmitJobs.ts b/packages/zosjobs/src/SubmitJobs.ts index ffb92958e1..7ce383d27c 100644 --- a/packages/zosjobs/src/SubmitJobs.ts +++ b/packages/zosjobs/src/SubmitJobs.ts @@ -106,16 +106,23 @@ export class SubmitJobs { * @returns {Promise} - Promise that resolves to an IJob document with details about the submitted job * @memberof SubmitJobs */ - public static submitJcl(session: AbstractSession, jcl: string, internalReaderRecfm?: string, internalReaderLrecl?: string) { + public static submitJcl(session: AbstractSession, jcl: string, internalReaderRecfm?: string, + internalReaderLrecl?: string, internalReaderFileEncoding?: string) { this.log.trace("submitJcl called with jcl of length %d. internalReaderRecfm %s internalReaderLrecl %s", jcl == null ? "no jcl!" : jcl.length, internalReaderRecfm, internalReaderLrecl); - return SubmitJobs.submitJclCommon(session, {jcl, internalReaderRecfm, internalReaderLrecl}); + return SubmitJobs.submitJclCommon(session, {jcl, internalReaderRecfm, internalReaderLrecl, internalReaderFileEncoding}); } public static async submitJclString(session: AbstractSession, jcl: string, parms: ISubmitParms): Promise { ImperativeExpect.toNotBeNullOrUndefined(jcl, ZosJobsMessages.missingJcl.message); ImperativeExpect.toNotBeEqual(jcl, "", ZosJobsMessages.missingJcl.message); - const responseJobInfo: IJob = await SubmitJobs.submitJclCommon(session, {jcl, jclSymbols: parms.jclSymbols}); + const responseJobInfo: IJob = await SubmitJobs.submitJclCommon(session, { + jcl, + jclSymbols: parms.jclSymbols, + internalReaderFileEncoding: parms.internalReaderFileEncoding, + internalReaderLrecl: parms.internalReaderLrecl, + internalReaderRecfm: parms.internalReaderRecfm + }); const response: Promise = this.checkSubmitOptions(session, parms, responseJobInfo); return response; } @@ -143,7 +150,7 @@ export class SubmitJobs { } if (parms.internalReaderRecfm) { this.log.debug("Custom internal reader record format (internalReaderRecfm) '%s' specified ", parms.internalReaderRecfm); - headers.push({"X-IBM-Intrdr-Recfm": parms.internalReaderRecfm}); + headers.push({[ZosmfHeaders.X_IBM_INTRDR_RECFM]: parms.internalReaderRecfm}); } else { // default to fixed format records headers.push(ZosmfHeaders.X_IBM_INTRDR_RECFM_F); @@ -152,6 +159,9 @@ export class SubmitJobs { const extraHeaders = this.getSubstitutionHeaders(parms.jclSymbols); headers.push(...extraHeaders); } + if (parms.internalReaderFileEncoding) { + headers.push({[ZosmfHeaders.X_IBM_INTRDR_FILE_ENCODING]: parms.internalReaderFileEncoding}); + } return ZosmfRestClient.putExpectJSON(session, JobsConstants.RESOURCE, headers, parms.jcl); } @@ -165,10 +175,11 @@ export class SubmitJobs { * @returns {Promise} - Promise that resolves to an IJob document with details about the submitted job * @memberof SubmitJobs */ - public static async submitJclNotify(session: AbstractSession, jcl: string, internalReaderRecfm?: string, internalReaderLrecl?: string) { - this.log.trace("submitJclNotiy called with jcl of length %s, internalReaderRecfm %s, internalReaderLrecl %s", - jcl == null ? "no jcl!" : jcl.length, internalReaderRecfm, internalReaderLrecl); - return SubmitJobs.submitJclNotifyCommon(session, {jcl, internalReaderRecfm, internalReaderLrecl}); + public static async submitJclNotify(session: AbstractSession, jcl: string, internalReaderRecfm?: string, + internalReaderLrecl?: string, internalReaderFileEncoding?: string) { + this.log.trace("submitJclNotiy called with jcl of length %s, internalReaderRecfm %s, internalReaderLrecl %s, internalReaderFileEncoding %s", + jcl == null ? "no jcl!" : jcl.length, internalReaderRecfm, internalReaderLrecl, internalReaderFileEncoding); + return SubmitJobs.submitJclNotifyCommon(session, {jcl, internalReaderRecfm, internalReaderLrecl, internalReaderFileEncoding}); } /** diff --git a/packages/zosjobs/src/doc/input/IDownloadAllSpoolContentParms.ts b/packages/zosjobs/src/doc/input/IDownloadAllSpoolContentParms.ts index 5d82d9cf5e..6a9a8cab19 100644 --- a/packages/zosjobs/src/doc/input/IDownloadAllSpoolContentParms.ts +++ b/packages/zosjobs/src/doc/input/IDownloadAllSpoolContentParms.ts @@ -70,4 +70,11 @@ export interface IDownloadAllSpoolContentParms { * @memberof IDownloadSpoolContentParms */ record?: boolean; + + /** + * The codepage to use for translation from EBCDIC + * @type {string} + * @memberof IDownloadSpoolContentParms + */ + encoding?: string; } diff --git a/packages/zosjobs/src/doc/input/ISubmitJclNotifyParms.ts b/packages/zosjobs/src/doc/input/ISubmitJclNotifyParms.ts index d57d2e3e66..b17b706de4 100644 --- a/packages/zosjobs/src/doc/input/ISubmitJclNotifyParms.ts +++ b/packages/zosjobs/src/doc/input/ISubmitJclNotifyParms.ts @@ -10,39 +10,14 @@ */ import { JOB_STATUS } from "../../types/JobStatus"; +import { ISubmitJclParms } from "./ISubmitJclParms"; /** * Interface for submiting jobs API * @export * @interface ISubmitJclNotifyParm */ -export interface ISubmitJclNotifyParm { - - /** - * JCL to submit, for example: - * "//IEFBR14 JOB ()\n" + - * "//RUN EXEC PGM=IEFBR14" - * @type {string} - * @memberof ISubmitJclNotifyParm - */ - jcl: string; - - /** - * Specify internal reader RECFM and corresponding http(s) headers - * will be appended to the request accordingly - * "F" (fixed) or "V" (variable) - * @type {string} - * @memberof ISubmitJclNotifyParm - */ - internalReaderRecfm?: string; - - /** - * Specify internal reader LRECL and corresponding http(s) headers - * will be appended to the request accordingly - * @type {string} - * @memberof ISubmitJclNotifyParm - */ - internalReaderLrecl?: string; +export interface ISubmitJclNotifyParm extends ISubmitJclParms { /** * Watch delay (polling delay) that the underlying services will use @@ -68,11 +43,4 @@ export interface ISubmitJclNotifyParm { * @memberof ISubmitJclNotifyParm */ attempts?: number; - - /** - * A string for JCL symbolic substitution - * @type {string} - * @memberof ISubmitJobParms - */ - jclSymbols?: string; } diff --git a/packages/zosjobs/src/doc/input/ISubmitJclParms.ts b/packages/zosjobs/src/doc/input/ISubmitJclParms.ts index 2670739713..a75bb2ce40 100644 --- a/packages/zosjobs/src/doc/input/ISubmitJclParms.ts +++ b/packages/zosjobs/src/doc/input/ISubmitJclParms.ts @@ -9,43 +9,21 @@ * */ +import { ISubmitParmsCommon } from "./ISubmitParmsCommon"; + /** * Interface for submit JCL APIs * @export * @interface ISubmitJclParms */ -export interface ISubmitJclParms { +export interface ISubmitJclParms extends ISubmitParmsCommon { /** * JCL to submit, for example: * "//IEFBR14 JOB ()\n" + * "//RUN EXEC PGM=IEFBR14" * @type {string} - * @memberof ISubmitJclNotifyParm + * @memberof ISubmitJclParms */ jcl: string; - - /** - * Specify internal reader RECFM and corresponding http(s) headers - * will be appended to the request accordingly - * "F" (fixed) or "V" (variable) - * @type {string} - * @memberof ISubmitJclNotifyParm - */ - internalReaderRecfm?: string; - - /** - * Specify internal reader LRECL and corresponding http(s) headers - * will be appended to the request accordingly - * @type {string} - * @memberof ISubmitJclNotifyParm - */ - internalReaderLrecl?: string; - - /** - * A string for JCL symbolic substitution - * @type {string} - * @memberof ISubmitJobParms - */ - jclSymbols?: string; } diff --git a/packages/zosjobs/src/doc/input/ISubmitParms.ts b/packages/zosjobs/src/doc/input/ISubmitParms.ts index 6ed88a2595..7e1337b6f2 100644 --- a/packages/zosjobs/src/doc/input/ISubmitParms.ts +++ b/packages/zosjobs/src/doc/input/ISubmitParms.ts @@ -10,13 +10,14 @@ */ import { ITaskWithStatus } from "@zowe/imperative"; +import { ISubmitParmsCommon } from "./ISubmitParmsCommon"; /** * Interface for submit job API * @export * @interface ISubmitParms */ -export interface ISubmitParms { +export interface ISubmitParms extends ISubmitParmsCommon { /** * USS file which should contain syntactically correct JCL @@ -64,11 +65,4 @@ export interface ISubmitParms { * Optional */ task?: ITaskWithStatus; - - /** - * A string for JCL symbolic substitution - * @type {string} - * @memberof ISubmitJobParms - */ - jclSymbols?: string; } diff --git a/packages/zosjobs/src/doc/input/ISubmitParmsCommon.ts b/packages/zosjobs/src/doc/input/ISubmitParmsCommon.ts new file mode 100644 index 0000000000..8492ebf206 --- /dev/null +++ b/packages/zosjobs/src/doc/input/ISubmitParmsCommon.ts @@ -0,0 +1,50 @@ +/* +* This program and the accompanying materials are made available under the terms of the +* Eclipse Public License v2.0 which accompanies this distribution, and is available at +* https://www.eclipse.org/legal/epl-v20.html +* +* SPDX-License-Identifier: EPL-2.0 +* +* Copyright Contributors to the Zowe Project. +* +*/ + +/** + * Common interface for submit job API + * @export + * @interface ISubmitParms + */ +export interface ISubmitParmsCommon { + + /** + * A string for JCL symbolic substitution + * @type {string} + * @memberof ISubmitParms + */ + jclSymbols?: string; + + /** + * Specify internal reader file encoding and corresponding http(s) headers + * will be appended to the request accordingly + * @type {string} + * @memberof ISubmitParms + */ + internalReaderFileEncoding?: string; + + /** + * Specify internal reader RECFM and corresponding http(s) headers + * will be appended to the request accordingly + * "F" (fixed) or "V" (variable) + * @type {string} + * @memberof ISubmitJclParms + */ + internalReaderRecfm?: string; + + /** + * Specify internal reader LRECL and corresponding http(s) headers + * will be appended to the request accordingly + * @type {string} + * @memberof ISubmitJclParms + */ + internalReaderLrecl?: string; +} diff --git a/zowex/Cargo.lock b/zowex/Cargo.lock index 4e1abf12f8..c456ddf987 100644 --- a/zowex/Cargo.lock +++ b/zowex/Cargo.lock @@ -92,9 +92,9 @@ checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" [[package]] name = "cfg-if" @@ -830,7 +830,7 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zowe" -version = "1.2.1" +version = "1.2.2" dependencies = [ "base64", "fslock", diff --git a/zowex/Cargo.toml b/zowex/Cargo.toml index 3037c1cdcf..4e04d82592 100644 --- a/zowex/Cargo.toml +++ b/zowex/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zowe" -version = "1.2.1" +version = "1.2.2" authors = ["Zowe Project"] edition = "2018" license = "EPL-2.0"