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/.github/workflows/secrets-sdk.yml b/.github/workflows/secrets-sdk.yml index c03956a729..7f59ab1125 100644 --- a/.github/workflows/secrets-sdk.yml +++ b/.github/workflows/secrets-sdk.yml @@ -11,6 +11,7 @@ on: pull_request: paths: - "packages/secrets/**" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -28,10 +29,9 @@ jobs: settings: - host: macos-latest target: x86_64-apple-darwin - build: | - npm run build + build: npm run build -- --target x86_64-apple-darwin - host: windows-latest - build: npm run build + build: npm run build -- --target x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc - host: windows-latest build: | @@ -66,13 +66,7 @@ jobs: CARGO=cross npm run build -- --target x86_64-unknown-linux-musl - host: macos-latest target: aarch64-apple-darwin - build: | - sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*; - export CC=$(xcrun -f clang); - export CXX=$(xcrun -f clang++); - SYSROOT=$(xcrun --sdk macosx --show-sdk-path); - export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; - npm run build -- --target aarch64-apple-darwin + build: npm run build -- --target aarch64-apple-darwin - host: ubuntu-latest target: aarch64-unknown-linux-gnu use-cross: true @@ -209,8 +203,11 @@ jobs: settings: - host: windows-latest target: x86_64-pc-windows-msvc + - host: macos-latest + target: aarch64-apple-darwin - host: macos-latest target: x86_64-apple-darwin + architecture: x64 - host: ubuntu-latest target: x86_64-unknown-linux-gnu - host: ubuntu-latest @@ -236,6 +233,7 @@ jobs: node-version: ${{ matrix.node }} check-latest: true cache: npm + architecture: ${{ matrix.settings.architecture }} - name: Install dependencies run: npm ci --ignore-scripts - name: Download artifacts 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/__tests__/__packages__/cli-test-utils/package.json b/__tests__/__packages__/cli-test-utils/package.json index c7f5a4f738..f40cb78815 100644 --- a/__tests__/__packages__/cli-test-utils/package.json +++ b/__tests__/__packages__/cli-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/cli-test-utils", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Test utilities package for Zowe CLI plug-ins", "author": "Zowe", "license": "EPL-2.0", @@ -43,7 +43,7 @@ "devDependencies": { "@types/js-yaml": "^4.0.9", "@types/uuid": "^9.0.8", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/imperative": "^8.0.0-next" diff --git a/lerna.json b/lerna.json index ccf7d4c3a0..50f6ee7065 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "command": { "publish": { "ignoreChanges": [ diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index b61d080f9e..a3d4906c5c 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -51,7 +51,7 @@ }, "__tests__/__packages__/cli-test-utils": { "name": "@zowe/cli-test-utils", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { "find-up": "^5.0.0", @@ -62,7 +62,7 @@ "devDependencies": { "@types/js-yaml": "^4.0.9", "@types/uuid": "^9.0.8", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/imperative": "^8.0.0-next" @@ -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" @@ -6816,10 +6745,11 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "license": "MIT", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -6910,14 +6840,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 +7211,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 +8597,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 +8683,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 +8697,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 +8895,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" @@ -9458,8 +9379,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "license": "MIT", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -10024,9 +9946,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 +10060,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" } @@ -10364,7 +10287,8 @@ }, "node_modules/is-number": { "version": "7.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "engines": { "node": ">=0.12.0" } @@ -12045,8 +11969,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 +12210,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 +12273,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 +12717,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 +13009,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 +13368,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 +13382,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 +13487,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 +13823,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 +14423,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 +15046,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 +15121,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 +15467,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 +15477,7 @@ "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14" + "node": ">=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -15555,30 +15492,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 +15527,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 +15604,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 +15614,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, @@ -16539,7 +16460,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { "is-number": "^7.0.0" }, @@ -16965,9 +16887,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 +16917,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 +16932,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 +16946,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 +17104,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 +17278,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, @@ -17528,21 +17455,21 @@ }, "packages/cli": { "name": "@zowe/cli", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "hasInstallScript": true, "license": "EPL-2.0", "dependencies": { - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329", - "@zowe/provisioning-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-console-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-jobs-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-logs-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-tso-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-uss-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-workflows-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zosmf-for-zowe-sdk": "8.0.0-next.202405151329", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600", + "@zowe/provisioning-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-console-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-jobs-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-logs-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-tso-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-uss-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-workflows-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zosmf-for-zowe-sdk": "8.0.0-next.202406061600", "find-process": "1.4.7", "lodash": "4.17.21", "minimatch": "9.0.3", @@ -17555,7 +17482,7 @@ "@types/diff": "^5.0.9", "@types/lodash": "^4.14.202", "@types/tar": "^6.1.11", - "@zowe/cli-test-utils": "8.0.0-next.202405151329", + "@zowe/cli-test-utils": "8.0.0-next.202406061600", "comment-json": "^4.2.3", "strip-ansi": "^6.0.1", "which": "^4.0.0" @@ -17564,7 +17491,7 @@ "node": ">=18.12.0" }, "optionalDependencies": { - "@zowe/secrets-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/secrets-for-zowe-sdk": "8.0.0-next.202406061600" } }, "packages/cli/node_modules/brace-expansion": { @@ -17614,15 +17541,15 @@ }, "packages/core": { "name": "@zowe/core-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { "comment-json": "~4.2.3", "string-width": "^4.2.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17633,7 +17560,7 @@ }, "packages/imperative": { "name": "@zowe/imperative", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { "@types/yargs": "^17.0.32", @@ -17685,7 +17612,7 @@ "@types/pacote": "^11.1.8", "@types/progress": "^2.0.7", "@types/stack-trace": "^0.0.29", - "@zowe/secrets-for-zowe-sdk": "8.0.0-next.202405151329", + "@zowe/secrets-for-zowe-sdk": "8.0.0-next.202406061600", "concurrently": "^8.0.0", "cowsay": "^1.6.0", "deep-diff": "^1.0.0", @@ -17802,16 +17729,16 @@ }, "packages/provisioning": { "name": "@zowe/provisioning-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { "js-yaml": "^4.1.0" }, "devDependencies": { "@types/js-yaml": "^4.0.9", - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17823,7 +17750,7 @@ }, "packages/secrets": { "name": "@zowe/secrets-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "hasInstallScript": true, "license": "EPL-2.0", "devDependencies": { @@ -17836,15 +17763,15 @@ }, "packages/workflows": { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202406061600" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17856,12 +17783,12 @@ }, "packages/zosconsole": { "name": "@zowe/zos-console-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17873,16 +17800,16 @@ }, "packages/zosfiles": { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { "minimatch": "^9.0.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329", - "@zowe/zos-uss-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600", + "@zowe/zos-uss-for-zowe-sdk": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17900,9 +17827,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" }, @@ -17915,15 +17842,15 @@ }, "packages/zosjobs": { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202406061600" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17935,12 +17862,12 @@ }, "packages/zoslogs": { "name": "@zowe/zos-logs-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17952,12 +17879,12 @@ }, "packages/zosmf": { "name": "@zowe/zosmf-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17969,15 +17896,15 @@ }, "packages/zostso": { "name": "@zowe/zos-tso-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { - "@zowe/zosmf-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/zosmf-for-zowe-sdk": "8.0.0-next.202406061600" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" @@ -17989,15 +17916,15 @@ }, "packages/zosuss": { "name": "@zowe/zos-uss-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "license": "EPL-2.0", "dependencies": { "ssh2": "^1.15.0" }, "devDependencies": { "@types/ssh2": "^1.11.19", - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index a9f7d36286..e2035ed795 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -2,9 +2,21 @@ All notable changes to the Zowe CLI package will be documented in this file. +## `8.0.0-next.202406061600` + +- BugFix: Updated `braces` dependency for technical currency. [#2158](https://github.com/zowe/zowe-cli/pull/2158) + +## `8.0.0-next.202405231927` + +- LTS Breaking: Send all Zowe Daemon informational messages, progress messages, and error messages to standard error instead of standard output [#1451](https://github.com/zowe/zowe-cli/issues/1451) + +## `8.0.0-next.202405202020` + +- BugFix: Fixed a bug where a data set search would not return a search term if it was at the beginning of a line. [#2147](https://github.com/zowe/zowe-cli/pull/2147) + ## `8.0.0-next.202405101931` -- Enhancement: Added the ability to search for a string in a data set or PDS member matching a pattern with the `zowe zos-files search data-sets` comamnd.[#2095](https://github.com/zowe/zowe-cli/issues/2095) +- Enhancement: Added the ability to search for a string in a data set or PDS member matching a pattern with the `zowe zos-files search data-sets` command.[#2095](https://github.com/zowe/zowe-cli/issues/2095) ## `8.0.0-next.202405061946` @@ -120,6 +132,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__/zosconsole/__integration__/collect/__snapshots__/cli.zos-console.collect.response.integration.test.ts.snap b/packages/cli/__tests__/zosconsole/__integration__/collect/__snapshots__/cli.zos-console.collect.response.integration.test.ts.snap index 5378cc8051..48147e6429 100644 --- a/packages/cli/__tests__/zosconsole/__integration__/collect/__snapshots__/cli.zos-console.collect.response.integration.test.ts.snap +++ b/packages/cli/__tests__/zosconsole/__integration__/collect/__snapshots__/cli.zos-console.collect.response.integration.test.ts.snap @@ -190,7 +190,7 @@ Invalid value specified for option: You specified: 123@CA.COM -The value must match one of the following regular expressions: +The value must match one of the following options: [ '^[a-zA-Z0-9]+$' ]. Example: diff --git a/packages/cli/__tests__/zosconsole/__integration__/issue/__snapshots__/cli.zos-console.issue.command.integration.test.ts.snap b/packages/cli/__tests__/zosconsole/__integration__/issue/__snapshots__/cli.zos-console.issue.command.integration.test.ts.snap index 6d3defffaa..e98a637ad9 100644 --- a/packages/cli/__tests__/zosconsole/__integration__/issue/__snapshots__/cli.zos-console.issue.command.integration.test.ts.snap +++ b/packages/cli/__tests__/zosconsole/__integration__/issue/__snapshots__/cli.zos-console.issue.command.integration.test.ts.snap @@ -309,7 +309,7 @@ Invalid value specified for option: You specified: 123@CA.COM -The value must match one of the following regular expressions: +The value must match one of the following options: [ '^[a-zA-Z0-9]+$' ]. Example: 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/package.json b/packages/cli/package.json index a245f67300..1acef98db8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/cli", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "zoweVersion": "V3", "description": "Zowe CLI is a command line interface (CLI) that provides a simple and streamlined way to interact with IBM z/OS.", "author": "Zowe", @@ -58,17 +58,17 @@ "preshrinkwrap": "node ../../scripts/rewriteShrinkwrap.js" }, "dependencies": { - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329", - "@zowe/provisioning-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-console-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-jobs-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-logs-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-tso-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-uss-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zos-workflows-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/zosmf-for-zowe-sdk": "8.0.0-next.202405151329", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600", + "@zowe/provisioning-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-console-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-jobs-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-logs-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-tso-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-uss-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zos-workflows-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/zosmf-for-zowe-sdk": "8.0.0-next.202406061600", "find-process": "1.4.7", "lodash": "4.17.21", "minimatch": "9.0.3", @@ -78,13 +78,13 @@ "@types/diff": "^5.0.9", "@types/lodash": "^4.14.202", "@types/tar": "^6.1.11", - "@zowe/cli-test-utils": "8.0.0-next.202405151329", + "@zowe/cli-test-utils": "8.0.0-next.202406061600", "comment-json": "^4.2.3", "strip-ansi": "^6.0.1", "which": "^4.0.0" }, "optionalDependencies": { - "@zowe/secrets-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/secrets-for-zowe-sdk": "8.0.0-next.202406061600" }, "engines": { "node": ">=18.12.0" 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..a025cd1dce 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to the Zowe core SDK package will be documented in this file. +## `8.0.0-next.202406061600` + +- Enhancement: Modified Services.ts to have commented properties end with commas. [#1049](https://github.com/zowe/zowe-cli/issues/1049) + + ## `8.0.0-next.202403041352` - BugFix: Updated engine to Node 18.12.0. [#2074](https://github.com/zowe/zowe-cli/pull/2074) @@ -31,6 +36,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/__tests__/apiml/__unit__/Services.unit.test.ts b/packages/core/__tests__/apiml/__unit__/Services.unit.test.ts index e6f4be7b6a..a113e80959 100644 --- a/packages/core/__tests__/apiml/__unit__/Services.unit.test.ts +++ b/packages/core/__tests__/apiml/__unit__/Services.unit.test.ts @@ -392,6 +392,56 @@ describe("APIML Services unit tests", () => { expect(actualJson).toEqual(expectedJson); }); + it("should properly apply comments and commas to profileInfoList", () => { + // should apply a comma to the end of all values in profile kvp except the last value + // should apply a comma to all commented profile types except base + const expectedJsonSnippet_base = ` + //"basePath": "test1/v2" + //"basePath": "test1/v3" + "basePath": "test1/v1" + `; + const expectedJsonSnippet_notBase= ` + //"type2": "test2.2", + "type2": "test2.1" + `; + const testCase: IApimlProfileInfo[] = [ + { + profName: "test1", + profType: "type1", + basePaths: [ + "test1/v1", + "test1/v2", + "test1/v3" + ], + pluginConfigs: new Set(), + gatewayUrlConflicts: {} + }, + { + profName: "test2.1", + profType: "type2", + basePaths: [ + "test2.1/v1" + ], + pluginConfigs: new Set(), + gatewayUrlConflicts: {} + }, + { + profName: "test2.2", + profType: "type2", + basePaths: [ + "test2.2/v1" + ], + pluginConfigs: new Set(), + gatewayUrlConflicts: {} + } + ]; + const actualJson = JSONC.stringify(Services.convertApimlProfileInfoToProfileConfig(testCase), null, ConfigConstants.INDENT); + + expect(actualJson.replace(/\s+/g, '')).toContain(expectedJsonSnippet_base.replace(/\s+/g, '')); + expect(actualJson.replace(/\s+/g, '')).toContain(expectedJsonSnippet_notBase.replace(/\s+/g, '')); + + }); + it("should create a config object without comments about conflicts", () => { const testCase: IApimlProfileInfo[] = [{ profName: "test0", @@ -551,7 +601,7 @@ describe("APIML Services unit tests", () => { "defaults": { // Multiple services were detected. // Uncomment one of the lines below to set a different default. - //"type2": "test2.2" + //"type2": "test2.2", "type2": "test2.1" }, "autoStore": true @@ -648,10 +698,154 @@ describe("APIML Services unit tests", () => { "type3": "test3", // Multiple services were detected. // Uncomment one of the lines below to set a different default. - //"type4": "test4.2" + //"type4": "test4.2", "type4": "test4.1" }, "autoStore": true +}`; + expect(actualJson).toEqual(expectedJson); + }); + it("should produce proper default file when multiple comments for a type are passed", () => { + const testCase: IApimlProfileInfo[] = [ + { + profName: "test3", + profType: "type3", + basePaths: [ + "test3/v1", + "test3/v2", + "test3/v3" + ], + pluginConfigs: new Set([{ + apiId: "test3-apiId", + connProfType: "type3", + pluginName: "type3-plugin-name" + }]), + gatewayUrlConflicts: {} + }, + { + profName: "test4.1", + profType: "type4", + basePaths: [ + "test4/v1", + "test4/v2" + ], + pluginConfigs: new Set([ + { + apiId: "test4.1-apiId", + connProfType: "type4", + pluginName: "type4.1-plugin-name" + }, + { + apiId: "test4.1-apiId", + connProfType: "type4", + pluginName: "type4.1-plugin-name-copy" + } + ]), + gatewayUrlConflicts: { + "type4.1-plugin-name": ["test4/v1"], + "type4.1-plugin-name-copy": ["test4/v2", "test4/v3"] + } + }, + { + profName: "test4.2", + profType: "type4", + basePaths: [ + "test4/v1" + ], + pluginConfigs: new Set(), + gatewayUrlConflicts: {} + }, + { + profName: "test4.3", + profType: "type4", + basePaths: [ + "test4/v1" + ], + pluginConfigs: new Set(), + gatewayUrlConflicts: {} + }, + { + profName: "base1", + profType: "base", + basePaths: [ + "base1/v1" + ], + pluginConfigs: new Set(), + gatewayUrlConflicts: {} + }, + { + profName: "base2", + profType: "base", + basePaths: [ + "base2/v1" + ], + pluginConfigs: new Set(), + gatewayUrlConflicts: {} + } + ]; + const actualJson = JSONC.stringify(Services.convertApimlProfileInfoToProfileConfig(testCase), null, ConfigConstants.INDENT); + const expectedJson = `{ + "profiles": { + "test3": { + "type": "type3", + "properties": { + // Multiple base paths were detected for this service. + // Uncomment one of the lines below to use a different one. + //"basePath": "test3/v2" + //"basePath": "test3/v3" + "basePath": "test3/v1" + } + }, + "test4.1": { + "type": "type4", + "properties": { + // --- + // Warning: basePath conflict detected! + // Different plugins require different versions of the same API. + // List: + // "type4.1-plugin-name": "test4/v1" + // "type4.1-plugin-name-copy": "test4/v2", "test4/v3" + // --- + //"basePath": "test4/v2" + "basePath": "test4/v1" + } + }, + "test4.2": { + "type": "type4", + "properties": { + "basePath": "test4/v1" + } + }, + "test4.3": { + "type": "type4", + "properties": { + "basePath": "test4/v1" + } + }, + "base1": { + "type": "base", + "properties": { + "basePath": "base1/v1" + } + }, + "base2": { + "type": "base", + "properties": { + "basePath": "base2/v1" + } + } + }, + "defaults": { + "type3": "test3", + // Multiple services were detected. + // Uncomment one of the lines below to set a different default. + //"type4": "test4.2", + //"type4": "test4.3", + "type4": "test4.1", + //"base": "base2" + "base": "base1" + }, + "autoStore": true }`; expect(actualJson).toEqual(expectedJson); }); diff --git a/packages/core/package.json b/packages/core/package.json index af74009071..76e1670b1d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/core-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Core libraries shared by Zowe SDK packages", "author": "Zowe", "license": "EPL-2.0", @@ -49,8 +49,8 @@ "string-width": "^4.2.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/imperative": "^8.0.0-next" diff --git a/packages/core/src/apiml/Services.ts b/packages/core/src/apiml/Services.ts index 8353a82332..8f1e92616c 100644 --- a/packages/core/src/apiml/Services.ts +++ b/packages/core/src/apiml/Services.ts @@ -207,7 +207,10 @@ export class Services { const _genCommentsHelper = (key: string, elements: string[]): string => { if (elements == null || elements.length === 0) return ""; - return `//"${key}": "${elements.length === 1 ? elements[0] : elements.join('"\n//"' + key + '": "')}"`; + + return elements.reduce((all, current: string, index) => { + return all.concat(key.includes("base") ? `\n//"${key}": "${current}"` : `\n//"${key}": "${current}",`); + }, ""); }; profileInfoList?.forEach((profileInfo: IApimlProfileInfo) => { @@ -243,6 +246,9 @@ export class Services { conflictingPluginsList += ` // "${element}": "${profileInfo.gatewayUrlConflicts[element].join('", "')}"`; }); + + // Typecasting because of this issue: https://github.com/kaelzhang/node-comment-json/issues/42 + const basepathConflictMessage = ` // --- // Warning: basePath conflict detected! @@ -252,7 +258,6 @@ export class Services { const noConflictMessage = ` // Multiple base paths were detected for this service. // Uncomment one of the lines below to use a different one.`; - // Typecasting because of this issue: https://github.com/kaelzhang/node-comment-json/issues/42 configProfile.profiles[profileInfo.profName].properties = JSONC.parse(` { ${basePathConflicts.length > 0 ? basepathConflictMessage : noConflictMessage} @@ -263,19 +268,29 @@ export class Services { } }); + // Establish keys for object map for index check within loop + const defaultKeys = Object.keys(conflictingDefaults); + for (const defaultKey in conflictingDefaults) { if (configDefaults[defaultKey] != null) { const trueDefault = configDefaults[defaultKey]; delete configDefaults[defaultKey]; + let jsonString = ` + ${JSONC.stringify(configDefaults, null, ConfigConstants.INDENT).slice(0, -1)}${Object.keys(configDefaults).length > 0 ? "," : ""}`; + const defaultKeyIndex = defaultKeys.indexOf(defaultKey); - // Typecasting because of this issue: https://github.com/kaelzhang/node-comment-json/issues/42 - configDefaults = JSONC.parse(` - ${JSONC.stringify(configDefaults, null, ConfigConstants.INDENT).slice(0, -1)}${Object.keys(configDefaults).length > 0 ? "," : ""} - // Multiple services were detected. - // Uncomment one of the lines below to set a different default. + // Logic to ensure that comment block is not duplicated + if (defaultKeyIndex === 0) { + jsonString += ` + // Multiple services were detected. + // Uncomment one of the lines below to set a different default.`; + } + jsonString += ` ${_genCommentsHelper(defaultKey, conflictingDefaults[defaultKey])} - "${defaultKey}": "${trueDefault}" - }`) as any; + "${defaultKey}": "${trueDefault}"`; + // Terminate the JSON string + jsonString += '\n}'; + configDefaults = JSONC.parse(jsonString) as any; } } 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 7e3cb97192..3ec88f1532 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -12,6 +12,19 @@ All notable changes to the Imperative package will be documented in this file. - Added an `EventUtils` class to contain all common utility methods for the Client Event Handling capabilities. - Added `IEmitter`, `IWatcher`, and `IEmitterAndWatcher` interfaces to expose what application developers should see. +## `8.0.0-next.202406061600` + +- BugFix: Updated `braces` dependency for technical currency. [#2158](https://github.com/zowe/zowe-cli/pull/2158) + +## `8.0.0-next.202405241520` + +- BugFix: Modified command output to show appropriate error message given available ImperativeError properties. [#1897](https://github.com/zowe/zowe-cli/issues/1897) +- Patch: Modify error text in SyntaxValidator.invalidOptionError. [#2138](https://github.com/zowe/zowe-cli/issues/2138) + +## `8.0.0-next.202405211929` + +- BugFix: Fixed error "Only one instance of the Imperative Event Emitter is allowed" when running system tests. [#2146](https://github.com/zowe/zowe-cli/issues/2146) + ## `8.0.0-next.202405151329` - Enhancement: Add client-side event handling capabilities. [#1987](https://github.com/zowe/zowe-cli/issues/1987) @@ -332,6 +345,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/package.json b/packages/imperative/package.json index 5d4119d421..ebe918d522 100644 --- a/packages/imperative/package.json +++ b/packages/imperative/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/imperative", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "framework for building configurable CLIs", "author": "Zowe", "license": "EPL-2.0", @@ -92,7 +92,7 @@ "@types/pacote": "^11.1.8", "@types/progress": "^2.0.7", "@types/stack-trace": "^0.0.29", - "@zowe/secrets-for-zowe-sdk": "8.0.0-next.202405151329", + "@zowe/secrets-for-zowe-sdk": "8.0.0-next.202406061600", "concurrently": "^8.0.0", "cowsay": "^1.6.0", "deep-diff": "^1.0.0", diff --git a/packages/imperative/src/cmd/src/syntax/SyntaxValidator.ts b/packages/imperative/src/cmd/src/syntax/SyntaxValidator.ts index 56c1c8db3f..fbf48708d3 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; }); } @@ -844,7 +844,7 @@ export class SyntaxValidator { const msg: string = responseObject.console.error( "Invalid value specified for option:\n{{long}} {{aliases}}\n\n" + "You specified:\n{{optionVal}}\n\n" + - "The value must match one of the following regular expressions:\n{{allowed}}.", + "The value must match one of the following options:\n{{allowed}}.", mustacheSummary); this.appendValidatorError(responseObject, {message: msg, optionInError: failingOption.name, definition: failingOption}); 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 bfa8e7a477..a2e741bc31 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/imperative/src/events/__tests__/__unit__/EventEmitter.unit.test.ts b/packages/imperative/src/events/__tests__/__unit__/EventEmitter.unit.test.ts index 4421d8b41b..ff7ba8fef7 100644 --- a/packages/imperative/src/events/__tests__/__unit__/EventEmitter.unit.test.ts +++ b/packages/imperative/src/events/__tests__/__unit__/EventEmitter.unit.test.ts @@ -46,18 +46,13 @@ describe("Event Emitter", () => { describe("Base structure and emission", () => { it("should only allow for one instance of the event emitter", () => { - jest.spyOn(Logger, "getImperativeLogger").mockReturnValue("the logger" as any); - iee.initialize("test"); - let caughtError: any; - try { - iee.initialize("dummy"); - } catch (err) { - caughtError = err; - } - expect(caughtError).toBeDefined(); - expect(caughtError.message).toContain("Only one instance"); + const mockLogger: any = { warn: jest.fn() as any }; + iee.initialize("test", { logger: mockLogger }); + iee.initialize("dummy", { logger: mockLogger }); + expect(mockLogger.warn).toHaveBeenCalledTimes(1); + expect(mockLogger.warn.mock.calls[0][0]).toContain("Only one instance"); expect(iee.instance.appName).toEqual("test"); - expect(iee.instance.logger).toEqual("the logger"); + expect(iee.instance.logger).toEqual(mockLogger); }); it("should determine the type of event", () => { diff --git a/packages/imperative/src/imperative/__tests__/config/cmd/init/init.handler.unit.test.ts b/packages/imperative/src/imperative/__tests__/config/cmd/init/init.handler.unit.test.ts index d54d6f24a6..703e39456b 100644 --- a/packages/imperative/src/imperative/__tests__/config/cmd/init/init.handler.unit.test.ts +++ b/packages/imperative/src/imperative/__tests__/config/cmd/init/init.handler.unit.test.ts @@ -24,6 +24,7 @@ import * as fs from "fs"; import { CredentialManagerFactory } from "../../../../../security"; import { setupConfigToLoad } from "../../../../../../__tests__/src/TestUtil"; import { OverridesLoader } from "../../../../src/OverridesLoader"; +import { ConfigUtils, ImperativeError } from "../../../../.."; jest.mock("fs"); jest.mock("../../../../../events/src/ImperativeEventEmitter"); @@ -795,4 +796,86 @@ describe("Configuration Initialization command handler", () => { expect(params.response.console.log).toHaveBeenCalledTimes(2); expect((params.response.console.log as any).mock.calls[0][0]).toContain("Unable to securely save credentials"); }); + + it("should display correct error message for process() given additionalDetails property is defined in ImperativeError", async () => { + const handler = new InitHandler(); + const params = getIHandlerParametersObject(); + params.arguments.userConfig = false; + params.arguments.globalConfig = false; + + existsSyncSpy.mockReturnValue(false); // No files exist + searchSpy.mockReturnValueOnce(fakeProjUserPath).mockReturnValueOnce(fakeProjPath); // Give search something to return + await setupConfigToLoad(); // Setup the config + + setSchemaSpy = jest.spyOn(ImperativeConfig.instance.config, "setSchema"); + + // We aren't testing the config initialization - clear the spies + existsSyncSpy.mockClear(); + searchSpy.mockClear(); + + // initWithSchema + const readPromptSpy = jest.fn(() => undefined); + (params.response.console as any).prompt = readPromptSpy; + writeFileSyncSpy.mockImplementation(); // Don't actually write files + jest.spyOn(CredentialManagerFactory, "initialized", "get").mockReturnValue(false); + jest.spyOn(CredentialManagerFactory, "manager", "get").mockReturnValue({ secureErrorDetails: jest.fn() } as any); + + jest.spyOn(process, "cwd").mockReturnValueOnce(null); + + // Mocking for logical branch intended to evaluate + const secureSaveErrorSpy = jest.spyOn(ConfigUtils, "secureSaveError"); + + secureSaveErrorSpy.mockImplementation(() => { + return new ImperativeError({ + msg: "fake message", + additionalDetails: "fake additional details" + }); + }); + + await handler.process(params as IHandlerParameters); + + expect(secureSaveErrorSpy.mock.results[0].value).toBeInstanceOf(ImperativeError); + expect(secureSaveErrorSpy.mock.results[0].value.additionalDetails).toEqual( + "fake additional details"); + expect((params.response.console.log as any).mock.calls[0][0]).toContain("fake additional details"); + }); + it("should display correct error message for process() given additionalDetails property is NOT defined in ImperativeError", async () => { + const handler = new InitHandler(); + const params = getIHandlerParametersObject(); + params.arguments.userConfig = false; + params.arguments.globalConfig = false; + + existsSyncSpy.mockReturnValue(false); // No files exist + searchSpy.mockReturnValueOnce(fakeProjUserPath).mockReturnValueOnce(fakeProjPath); // Give search something to return + await setupConfigToLoad(); // Setup the config + + setSchemaSpy = jest.spyOn(ImperativeConfig.instance.config, "setSchema"); + + // We aren't testing the config initialization - clear the spies + existsSyncSpy.mockClear(); + searchSpy.mockClear(); + + // initWithSchema + const readPromptSpy = jest.fn(() => undefined); + (params.response.console as any).prompt = readPromptSpy; + writeFileSyncSpy.mockImplementation(); // Don't actually write files + jest.spyOn(CredentialManagerFactory, "initialized", "get").mockReturnValue(false); + jest.spyOn(CredentialManagerFactory, "manager", "get").mockReturnValue({ secureErrorDetails: jest.fn() } as any); + + jest.spyOn(process, "cwd").mockReturnValueOnce(null); + + // Mocking for logical branch intended to evaluate + const secureSaveErrorSpy = jest.spyOn(ConfigUtils, "secureSaveError"); + + secureSaveErrorSpy.mockImplementation(() => { + return new ImperativeError({ + msg: "fake message" + }); + }); + + await handler.process(params as IHandlerParameters); + + expect(secureSaveErrorSpy.mock.results[0].value).toBeInstanceOf(ImperativeError); + expect((params.response.console.log as any).mock.calls[0][0]).not.toContain("fake additional details"); + }); }); diff --git a/packages/imperative/src/imperative/src/config/cmd/init/init.handler.ts b/packages/imperative/src/imperative/src/config/cmd/init/init.handler.ts index bb6893b7a2..6217b2cf70 100644 --- a/packages/imperative/src/imperative/src/config/cmd/init/init.handler.ts +++ b/packages/imperative/src/imperative/src/config/cmd/init/init.handler.ts @@ -104,8 +104,13 @@ export default class InitHandler implements ICommandHandler { if (params.arguments.prompt !== false && config.api.secure.loadFailed && config.api.secure.secureFields().length > 0) { const warning = ConfigUtils.secureSaveError(); - params.response.console.log(TextUtils.chalk.yellow("Warning:\n") + - `${warning.message} Skipped prompting for credentials.\n\n${warning.additionalDetails}\n`); + let message = "Warning:\n" + warning.message + " Skipped prompting for credentials."; + + if (warning.additionalDetails) { + message += `\n\n${warning.additionalDetails}\n`; + } + + params.response.console.log(TextUtils.chalk.yellow(message)); } // Write the active created/updated config layer diff --git a/packages/provisioning/package.json b/packages/provisioning/package.json index 3298a78b66..200499d98f 100644 --- a/packages/provisioning/package.json +++ b/packages/provisioning/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/provisioning-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with the z/OS provisioning APIs", "author": "Zowe", "license": "EPL-2.0", @@ -49,9 +49,9 @@ }, "devDependencies": { "@types/js-yaml": "^4.0.9", - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0-next", diff --git a/packages/secrets/package.json b/packages/secrets/package.json index 8964354bf9..0221cd27e2 100644 --- a/packages/secrets/package.json +++ b/packages/secrets/package.json @@ -3,7 +3,7 @@ "description": "Credential management facilities for Imperative, Zowe CLI, and extenders.", "repository": "https://github.com/zowe/zowe-cli.git", "author": "Zowe", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "homepage": "https://github.com/zowe/zowe-cli/tree/master/packages/secrets#readme", "bugs": { "url": "https://github.com/zowe/zowe-cli/issues" diff --git a/packages/workflows/package.json b/packages/workflows/package.json index 6c64759d2c..9114c2f870 100644 --- a/packages/workflows/package.json +++ b/packages/workflows/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-workflows-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with the z/OS workflows APIs", "author": "Zowe", "license": "EPL-2.0", @@ -45,12 +45,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202406061600" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0-next", diff --git a/packages/zosconsole/package.json b/packages/zosconsole/package.json index fb8690b4a3..86fbe097b5 100644 --- a/packages/zosconsole/package.json +++ b/packages/zosconsole/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-console-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with the z/OS console", "author": "Zowe", "license": "EPL-2.0", @@ -45,9 +45,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0-next", diff --git a/packages/zosfiles/CHANGELOG.md b/packages/zosfiles/CHANGELOG.md index aa2895105c..a78bb2725f 100644 --- a/packages/zosfiles/CHANGELOG.md +++ b/packages/zosfiles/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Zowe z/OS files SDK package will be documented in this file. +## `8.0.0-next.202405202020` + +- BugFix: Fixed a bug where a data set search would not return a search term if it was at the beginning of a line. [#2147](https://github.com/zowe/zowe-cli/pull/2147) + ## `8.0.0-next.202405101931` - Enhancement: Added the ability to search for a string in a data set or PDS member matching a pattern. [#2095](https://github.com/zowe/zowe-cli/issues/2095) diff --git a/packages/zosfiles/__tests__/__unit__/methods/search/Search.unit.test.ts b/packages/zosfiles/__tests__/__unit__/methods/search/Search.unit.test.ts index 85b4fab1c5..d6b8f2946c 100644 --- a/packages/zosfiles/__tests__/__unit__/methods/search/Search.unit.test.ts +++ b/packages/zosfiles/__tests__/__unit__/methods/search/Search.unit.test.ts @@ -23,9 +23,10 @@ describe("Search", () => { protocol: "https", type: "basic" }); - const testDataString = "THIS DATA SET CONTAINS SOME TESTDATA"; - const expectedCol = 29; - const expectedLine = 1; + + let testDataString = "THIS DATA SET CONTAINS SOME TESTDATA"; + let expectedCol = 29; + let expectedLine = 1; let searchOptions: ISearchOptions = { pattern: "TEST*", @@ -67,6 +68,10 @@ describe("Search", () => { } beforeEach(() => { + expectedLine = 1; + expectedCol = 29; + testDataString = "THIS DATA SET CONTAINS SOME TESTDATA"; + getDataSetSpy.mockClear(); getDataSetSpy.mockImplementation(async (session, dsn, options) => { @@ -112,18 +117,9 @@ describe("Search", () => { const searchLocalSpy = jest.spyOn(Search as any, "searchLocal"); const listDataSetsMatchingPatternSpy = jest.spyOn(List, "dataSetsMatchingPattern"); const listAllMembersSpy = jest.spyOn(List, "allMembers"); - function delay(ms: number) { jest.advanceTimersByTime(ms); } - - beforeAll(() => { - jest.useFakeTimers(); - }); - - beforeEach(() => { - searchOnMainframeSpy.mockClear(); - searchLocalSpy.mockClear(); - listDataSetsMatchingPatternSpy.mockClear(); - listAllMembersSpy.mockClear(); + function delay(ms: number) { jest.advanceTimersByTime(ms); } + function regenerateMockImplementations() { searchOnMainframeSpy.mockImplementation(async (session, searchOptions, searchItems: ISearchItem[]) => { if ((Search as any).timerExpired != true) { return { @@ -173,6 +169,21 @@ describe("Search", () => { errorMessage: undefined } as IZosFilesResponse; }); + getDataSetSpy.mockImplementation(async (session, dsn, options) => { + return Buffer.from(testDataString); + }); + } + + beforeAll(() => { + jest.useFakeTimers(); + }); + + beforeEach(() => { + searchOnMainframeSpy.mockClear(); + searchLocalSpy.mockClear(); + listDataSetsMatchingPatternSpy.mockClear(); + listAllMembersSpy.mockClear(); + regenerateMockImplementations(); }); afterAll(() => { @@ -213,6 +224,42 @@ describe("Search", () => { expectedLine + ", Column: " + expectedCol + ", Contents: " + testDataString); }); + it("Should search for the data sets containing a word at the beginning of the string", async () => { + testDataString = "TESTDATA IS AT THE BEGINNING OF THE STRING"; + expectedCol = 1; + expectedLine = 1; + regenerateMockImplementations(); + const response = await Search.dataSets(dummySession, searchOptions); + + expect(listDataSetsMatchingPatternSpy).toHaveBeenCalledTimes(1); + expect(listDataSetsMatchingPatternSpy).toHaveBeenCalledWith(dummySession, ["TEST*"], {maxConcurrentRequests: 1}); + expect(listAllMembersSpy).toHaveBeenCalledTimes(1); + expect(listAllMembersSpy).toHaveBeenCalledWith(dummySession, "TEST3.PDS", {}); + expect(searchOnMainframeSpy).toHaveBeenCalledTimes(1); + expect(searchLocalSpy).toHaveBeenCalledTimes(1); + + expect(response.errorMessage).not.toBeDefined(); + expect(response.success).toEqual(true); + expect(response.apiResponse).toEqual([ + {dsn: "TEST1.DS", member: undefined, matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]}, + {dsn: "TEST2.DS", member: undefined, matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]}, + {dsn: "TEST3.PDS", member: "MEMBER1", matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]}, + {dsn: "TEST3.PDS", member: "MEMBER2", matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]}, + {dsn: "TEST3.PDS", member: "MEMBER3", matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]} + ]); + expect(response.commandResponse).toContain("Found \"TESTDATA\" in 5 data sets and PDS members"); + expect(response.commandResponse).toContain("Data Set \"TEST1.DS\":\nLine: " + + expectedLine + ", Column: " + expectedCol + ", Contents: " + testDataString); + expect(response.commandResponse).toContain("Data Set \"TEST2.DS\":\nLine: " + + expectedLine + ", Column: " + expectedCol + ", Contents: " + testDataString); + expect(response.commandResponse).toContain("Data Set \"TEST3.PDS\" | Member \"MEMBER1\":\nLine: " + + expectedLine + ", Column: " + expectedCol + ", Contents: " + testDataString); + expect(response.commandResponse).toContain("Data Set \"TEST3.PDS\" | Member \"MEMBER2\":\nLine: " + + expectedLine + ", Column: " + expectedCol + ", Contents: " + testDataString); + expect(response.commandResponse).toContain("Data Set \"TEST3.PDS\" | Member \"MEMBER3\":\nLine: " + + expectedLine + ", Column: " + expectedCol + ", Contents: " + testDataString); + }); + it("Should search for the data sets containing a word and sort out of order responses", async () => { searchLocalSpy.mockImplementation(async (session, searchOptions, searchItems: ISearchItem[]) => { const searchItemArray: ISearchItem[] = []; @@ -923,6 +970,27 @@ describe("Search", () => { ], failures: []}); }); + it("Should return a list of members that contain the search term (all) at the beginning", async () => { + expectedCol = 1; + expectedLine = 1; + testDataString = "TESTDATA IS AT THE BEGINNING OF THE STRING"; + const response = await (Search as any).searchLocal(dummySession, searchOptions, searchItems); + + expect(getDataSetSpy).toHaveBeenCalledTimes(5); + expect(getDataSetSpy).toHaveBeenCalledWith(dummySession, "TEST1.DS", {}); + expect(getDataSetSpy).toHaveBeenCalledWith(dummySession, "TEST2.DS", {}); + expect(getDataSetSpy).toHaveBeenCalledWith(dummySession, "TEST3.PDS(MEMBER1)", {}); + expect(getDataSetSpy).toHaveBeenCalledWith(dummySession, "TEST3.PDS(MEMBER2)", {}); + expect(getDataSetSpy).toHaveBeenCalledWith(dummySession, "TEST3.PDS(MEMBER3)", {}); + expect(response).toEqual({responses: [ + {dsn: "TEST1.DS", member: undefined, matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]}, + {dsn: "TEST2.DS", member: undefined, matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]}, + {dsn: "TEST3.PDS", member: "MEMBER1", matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]}, + {dsn: "TEST3.PDS", member: "MEMBER2", matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]}, + {dsn: "TEST3.PDS", member: "MEMBER3", matchList: [{column: expectedCol, line: expectedLine, contents: testDataString}]} + ], failures: []}); + }); + it("Should return a list of members that contain the search term (none)", async () => { // Return non-matching buffers for all entries getDataSetSpy.mockImplementation(async (session, dsn, options) => { diff --git a/packages/zosfiles/package.json b/packages/zosfiles/package.json index 204c9bd5e3..7bcc33ada7 100644 --- a/packages/zosfiles/package.json +++ b/packages/zosfiles/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-files-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with files and data sets on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -49,10 +49,10 @@ "minimatch": "^9.0.3" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329", - "@zowe/zos-uss-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600", + "@zowe/zos-uss-for-zowe-sdk": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0-next", diff --git a/packages/zosfiles/src/methods/search/Search.ts b/packages/zosfiles/src/methods/search/Search.ts index b444f624ba..268a76da6e 100644 --- a/packages/zosfiles/src/methods/search/Search.ts +++ b/packages/zosfiles/src/methods/search/Search.ts @@ -327,9 +327,11 @@ export class Search { if (searchLine.includes(searchOptions.searchString)) { let lastCol = 0; + let lastColIndexPlusLen = 0; while (lastCol != -1) { - const column = searchLine.indexOf(searchOptions.searchString, lastCol + searchOptions.searchString.length); + const column = searchLine.indexOf(searchOptions.searchString, lastColIndexPlusLen); lastCol = column; + lastColIndexPlusLen = column + searchOptions.searchString.length; if (column != -1) { // Append the real line - 1 indexed indicies.push({line: lineNum + 1, column: column + 1, contents: line}); 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/package.json b/packages/zosjobs/package.json index 4465f58893..5ded8d91f0 100644 --- a/packages/zosjobs/package.json +++ b/packages/zosjobs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-jobs-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with jobs on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -46,12 +46,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/zos-files-for-zowe-sdk": "8.0.0-next.202406061600" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0-next", 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/packages/zoslogs/package.json b/packages/zoslogs/package.json index e3ed2e3f82..a02413e298 100644 --- a/packages/zoslogs/package.json +++ b/packages/zoslogs/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-logs-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with the z/OS logs", "author": "Zowe", "license": "EPL-2.0", @@ -45,9 +45,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0-next", diff --git a/packages/zosmf/package.json b/packages/zosmf/package.json index 1ab6cfb471..6c462af0ef 100644 --- a/packages/zosmf/package.json +++ b/packages/zosmf/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zosmf-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with the z/OS Management Facility", "author": "Zowe", "license": "EPL-2.0", @@ -44,9 +44,9 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0-next", diff --git a/packages/zostso/package.json b/packages/zostso/package.json index 1621e7fc23..ded30c01ac 100644 --- a/packages/zostso/package.json +++ b/packages/zostso/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-tso-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with TSO on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -45,12 +45,12 @@ "prepack": "node ../../scripts/prepareLicenses.js" }, "dependencies": { - "@zowe/zosmf-for-zowe-sdk": "8.0.0-next.202405151329" + "@zowe/zosmf-for-zowe-sdk": "8.0.0-next.202406061600" }, "devDependencies": { - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/core-for-zowe-sdk": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/core-for-zowe-sdk": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/core-for-zowe-sdk": "^8.0.0-next", diff --git a/packages/zosuss/package.json b/packages/zosuss/package.json index 1f0e6419e7..177121ab2d 100644 --- a/packages/zosuss/package.json +++ b/packages/zosuss/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zos-uss-for-zowe-sdk", - "version": "8.0.0-next.202405151329", + "version": "8.0.0-next.202406061600", "description": "Zowe SDK to interact with USS on z/OS", "author": "Zowe", "license": "EPL-2.0", @@ -49,8 +49,8 @@ }, "devDependencies": { "@types/ssh2": "^1.11.19", - "@zowe/cli-test-utils": "8.0.0-next.202405151329", - "@zowe/imperative": "8.0.0-next.202405151329" + "@zowe/cli-test-utils": "8.0.0-next.202406061600", + "@zowe/imperative": "8.0.0-next.202406061600" }, "peerDependencies": { "@zowe/imperative": "^8.0.0-next" diff --git a/zowex/Cargo.lock b/zowex/Cargo.lock index 4e1abf12f8..301095f6e6 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.3" dependencies = [ "base64", "fslock", diff --git a/zowex/Cargo.toml b/zowex/Cargo.toml index 3037c1cdcf..973093361e 100644 --- a/zowex/Cargo.toml +++ b/zowex/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zowe" -version = "1.2.1" +version = "1.2.3" authors = ["Zowe Project"] edition = "2018" license = "EPL-2.0" diff --git a/zowex/src/comm.rs b/zowex/src/comm.rs index f147f1337d..415cfc9458 100644 --- a/zowex/src/comm.rs +++ b/zowex/src/comm.rs @@ -9,7 +9,7 @@ * */ -// Functions related to daemon cummunication. +// Functions related to daemon communication. use std::io; use std::io::prelude::*; @@ -96,11 +96,11 @@ pub async fn comm_establish_connection( we_started_daemon = true; cmd_to_show = proc_start_daemon(njs_zowe_path); } else if we_started_daemon && conn_retries > THREE_MIN_OF_RETRIES { - println!( + eprintln!( "The Zowe daemon that we started is not running on socket: {}.", daemon_socket ); - println!( + eprintln!( "Command used to start the Zowe daemon was:\n {}\nTerminating.", cmd_to_show ); @@ -115,7 +115,7 @@ pub async fn comm_establish_connection( }; if conn_retries > 0 { - println!( + eprintln!( "{} ({} of {})", retry_msg, conn_retries, THREE_MIN_OF_RETRIES ); @@ -124,7 +124,7 @@ pub async fn comm_establish_connection( conn_retries += 1; if conn_retries > THREE_MIN_OF_RETRIES { - println!( + eprintln!( "Terminating after {} connection retries.", THREE_MIN_OF_RETRIES ); @@ -136,13 +136,13 @@ pub async fn comm_establish_connection( // before we wait too long, show diagnostics if conn_retries == RETRY_TO_SHOW_DIAG { - println!("\nThe Zowe daemon was started with these options:"); + eprintln!("\nThe Zowe daemon was started with these options:"); if we_started_daemon { - println!("Command = {}", cmd_to_show); + eprintln!("Command = {}", cmd_to_show); } else { - println!("Command = {}", daemon_proc_info.cmd); + eprintln!("Command = {}", daemon_proc_info.cmd); } - println!( + eprintln!( "Process name = {} pid = {} socket = {}\n", daemon_proc_info.name, daemon_proc_info.pid, daemon_socket ); diff --git a/zowex/src/proc.rs b/zowex/src/proc.rs index 5cbd0bcdb1..51eb19f5b0 100644 --- a/zowex/src/proc.rs +++ b/zowex/src/proc.rs @@ -196,7 +196,7 @@ fn read_pid_for_user() -> Option { Ok(ok_val) => ok_val, Err(err_val) => { // we should not continue if we cannot open an existing pid file - println!( + eprintln!( "Unable to open file = {}\nDetails = {}", pid_file_path.display(), err_val @@ -209,7 +209,7 @@ fn read_pid_for_user() -> Option { Ok(ok_val) => ok_val, Err(err_val) => { // we should not continue if we cannot read an existing pid file - println!( + eprintln!( "Unable to read file = {}\nDetails = {}", pid_file_path.display(), err_val @@ -222,7 +222,7 @@ fn read_pid_for_user() -> Option { if daemon_pid_for_user.user != executor { // our pid file should only contain our own user name - println!( + eprintln!( "User name of '{}' in file '{}' does not match current user = '{}'.", daemon_pid_for_user.user, pid_file_path.display(), @@ -273,11 +273,11 @@ fn read_pid_for_user() -> Option { */ pub fn proc_start_daemon(njs_zowe_path: &str) -> String { - println!("Starting a background process to increase performance ..."); + eprintln!("Starting a background process to increase performance ..."); let daemon_arg = LAUNCH_DAEMON_OPTION; let mut cmd = Command::new(njs_zowe_path); - + // Uses creation flags from https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags // Flags are CREATE_NO_WINDOW, CREATE_NEW_PROCESS_GROUP, and CREATE_UNICODE_ENVIRONMENT #[cfg(target_family = "windows")] @@ -291,11 +291,11 @@ pub fn proc_start_daemon(njs_zowe_path: &str) -> String { { Ok(_unused) => { /* nothing to do */ } Err(error) => { - println!( + eprintln!( "Failed to start the following process:\n {} {}", njs_zowe_path, daemon_arg ); - println!("Due to this error:\n {}", error); + eprintln!("Due to this error:\n {}", error); std::process::exit(EXIT_CODE_CANNOT_START_DAEMON); } }; diff --git a/zowex/src/run.rs b/zowex/src/run.rs index b01ba1a6b7..2d5ff8f077 100644 --- a/zowex/src/run.rs +++ b/zowex/src/run.rs @@ -96,17 +96,17 @@ pub async fn run_zowe_command(zowe_cmd_args: &mut Vec) -> Result Result { if proc_get_daemon_info().is_running { - println!("Shutting down the running daemon ..."); + eprintln!("Shutting down the running daemon ..."); let mut restart_cmd_args: Vec = vec![SHUTDOWN_REQUEST.to_string()]; if let Err(err_val) = run_daemon_command(njs_zowe_path, &mut restart_cmd_args).await { - println!("Unable to communicate a command to the Zowe daemon."); + eprintln!("Unable to communicate a command to the Zowe daemon."); return Err(err_val); } } // Start a new daemon. Note that proc_start_daemon() exits on failure. proc_start_daemon(njs_zowe_path); - println!("A new daemon has started."); + eprintln!("A new daemon has started."); Ok(EXIT_CODE_SUCCESS) } @@ -134,12 +134,12 @@ fn run_nodejs_command(njs_zowe_path: &str, zowe_cmd_args: &mut Vec) -> R { Ok(new_proc) => new_proc.status.code().unwrap(), Err(error) => { - println!("Failed to run the following command:"); - println!( + eprintln!("Failed to run the following command:"); + eprintln!( " Program = {}\n arguments = {:?}", njs_zowe_path, zowe_cmd_args ); - println!("Due to this error:\n {}", error); + eprintln!("Due to this error:\n {}", error); EXIT_CODE_FAILED_TO_RUN_NODEJS_CMD } }; @@ -177,12 +177,12 @@ fn run_delayed_zowe_command(njs_zowe_path: &str, zowe_cmd_args: &[String]) -> Re let (curr_cmd_shell, cmd_shell_nm) = match proc_get_cmd_shell() { Ok((curr_cmd_shell, cmd_shell_nm)) => (curr_cmd_shell, cmd_shell_nm), Err(error) => { - println!("{} Terminating.", error); + eprintln!("{} Terminating.", error); return Err(EXIT_CODE_CANT_FIND_CMD_SHELL); } }; if matches!(curr_cmd_shell, CmdShell::Unknown) { - println!( + eprintln!( "The command shell process named '{}' is unknown to the Zowe CLI. Terminating.", cmd_shell_nm ); @@ -205,9 +205,9 @@ fn run_delayed_zowe_command(njs_zowe_path: &str, zowe_cmd_args: &[String]) -> Re ); // The following line gives useful debugging info when it is uncommented. - // println!("script_arg_vec = {:?}", script_arg_vec); + // eprintln!("script_arg_vec = {:?}", script_arg_vec); - println!( + eprintln!( "The '{}' command will run in the background ...", arg_vec_to_string(zowe_cmd_args) ); @@ -220,12 +220,12 @@ fn run_delayed_zowe_command(njs_zowe_path: &str, zowe_cmd_args: &[String]) -> Re { Ok(..) => Ok(EXIT_CODE_SUCCESS), Err(err_val) => { - println!("Failed to run the following command:"); - println!( + eprintln!("Failed to run the following command:"); + eprintln!( " cmd_shell_to_launch = {}\n arguments = {:?}", njs_zowe_path, zowe_cmd_args ); - println!("Due to this error:\n {}", err_val); + eprintln!("Due to this error:\n {}", err_val); Err(EXIT_CODE_FAILED_TO_RUN_NODEJS_CMD) } }; @@ -252,7 +252,7 @@ pub async fn run_daemon_command( let cwd: PathBuf = match env::current_dir() { Ok(ok_val) => ok_val, Err(err_val) => { - println!("Unable to get current directory\nDetails = {:?}", err_val); + eprintln!("Unable to get current directory\nDetails = {:?}", err_val); return Err(EXIT_CODE_ENV_ERROR); } }; @@ -260,7 +260,7 @@ pub async fn run_daemon_command( let mut stdin = Vec::new(); if !std::io::stdin().is_terminal() { if let Err(err_val) = io::stdin().read_to_end(&mut stdin) { - println!("Failed reading stdin\nDetails = {}", err_val); + eprintln!("Failed reading stdin\nDetails = {}", err_val); return Err(EXIT_CODE_COMM_IO_ERROR); } } @@ -301,7 +301,7 @@ pub async fn run_daemon_command( } } Err(err_val) => { - println!("Failed convert response to JSON\nDetails = {}", err_val); + eprintln!("Failed to convert response to JSON\nDetails = {}", err_val); return Err(EXIT_CODE_CANT_CONVERT_JSON); } } @@ -323,7 +323,7 @@ pub async fn run_daemon_command( match lock_file.try_lock() { Ok(result) if !result => { if tries > THREE_MIN_OF_RETRIES { - println!( + eprintln!( "Terminating after {} connection retries.", THREE_MIN_OF_RETRIES ); @@ -331,7 +331,7 @@ pub async fn run_daemon_command( } tries += 1; - println!( + eprintln!( "The Zowe daemon is in use, retrying ({} of {})", tries, THREE_MIN_OF_RETRIES ); @@ -344,7 +344,7 @@ pub async fn run_daemon_command( locked = true; } Err(ref e) => { - println!("Problem acquiring lock: {:?}", e); + eprintln!("Problem acquiring lock: {:?}", e); return Err(EXIT_CODE_CANNOT_ACQUIRE_LOCK); } } @@ -354,7 +354,7 @@ pub async fn run_daemon_command( match comm_establish_connection(njs_zowe_path, &socket_string).await { Ok(ok_val) => stream = ok_val, Err(err_val) => { - println!( + eprintln!( "Unable to establish communication with daemon.\nDetails = {}", err_val ); @@ -369,7 +369,7 @@ pub async fn run_daemon_command( Err(ref err_val) => { if err_val.kind() == io::ErrorKind::ConnectionReset { if tries > THREE_MIN_OF_RETRIES { - println!( + eprintln!( "Terminating after {} connection retries.", THREE_MIN_OF_RETRIES ); @@ -377,7 +377,7 @@ pub async fn run_daemon_command( } tries += 1; - println!( + eprintln!( "The Zowe daemon is in use, retrying ({} of {})", tries, THREE_MIN_OF_RETRIES ); @@ -385,7 +385,7 @@ pub async fn run_daemon_command( // pause between attempts to connect thread::sleep(Duration::from_secs(THREE_SEC_DELAY)); } else { - println!( + eprintln!( "I/O error during daemon communication.\nDetails = {}", err_val ); @@ -648,21 +648,21 @@ fn get_win_lock_file() -> Result { lock_path.push("daemon.lock"); if let Err(err_val) = File::create(&lock_path) { - println!( + eprintln!( "Unable to create zowe daemon lock file = {}.", &lock_path.display() ); - println!("Reason = {}.", err_val); + eprintln!("Reason = {}.", err_val); return Err(EXIT_CODE_FILE_IO_ERROR); } let lock_file: LockFile = match LockFile::open(&lock_path) { Ok(ok_val) => ok_val, Err(err_val) => { - println!( + eprintln!( "Unable to open zowe daemon lock file = {}.", &lock_path.display() ); - println!("Reason = {}.", err_val); + eprintln!("Reason = {}.", err_val); return Err(EXIT_CODE_FILE_IO_ERROR); } }; diff --git a/zowex/src/util.rs b/zowex/src/util.rs index fb607309d9..53cbe1ef31 100644 --- a/zowex/src/util.rs +++ b/zowex/src/util.rs @@ -44,7 +44,7 @@ pub fn util_get_nodejs_zowe_path() -> String { */ let my_exe_result = env::current_exe(); if my_exe_result.is_err() { - println!("Unable to get path to my own executable. Terminating."); + eprintln!("Unable to get path to my own executable. Terminating."); std::process::exit(EXIT_CODE_CANNOT_GET_MY_PATH); } let my_exe_path_buf = my_exe_result.unwrap(); @@ -73,8 +73,8 @@ pub fn util_get_nodejs_zowe_path() -> String { break; } if njs_zowe_path == NOT_FOUND { - println!("Could not find a NodeJS zowe command on your path."); - println!("Will not be able to run Zowe commands. Terminating."); + eprintln!("Could not find a NodeJS zowe command on your path."); + eprintln!("Will not be able to run Zowe commands. Terminating."); std::process::exit(EXIT_CODE_NO_NODEJS_ZOWE_ON_PATH); } @@ -96,7 +96,7 @@ pub fn util_get_daemon_dir() -> Result { match home_dir() { Some(path_buf_val) => daemon_dir = path_buf_val, None => { - println!("Unable to get user's home directory."); + eprintln!("Unable to get user's home directory."); return Err(EXIT_CODE_ENV_ERROR); } } @@ -106,11 +106,11 @@ pub fn util_get_daemon_dir() -> Result { if !daemon_dir.exists() { if let Err(err_val) = std::fs::create_dir_all(&daemon_dir) { - println!( + eprintln!( "Unable to create zowe daemon directory = {}.", &daemon_dir.display() ); - println!("Reason = {}.", err_val); + eprintln!("Reason = {}.", err_val); return Err(EXIT_CODE_FILE_IO_ERROR); } } @@ -178,6 +178,6 @@ pub fn util_terminal_supports_color() -> i32 { return 1; } } - + 0 } \ No newline at end of file