diff --git a/.gitattributes b/.gitattributes index 9a8c54c7..4452f8cb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -19,3 +19,5 @@ extension-manager-integration-test-java/.settings/org.eclipse.jdt.ui.prefs li registry/package-lock.json linguist-generated=true extension-manager-integration-test-java/testing-extension/package-lock.json linguist-generated=true + +pkg/parameterValidator/parameterValidator.js linguist-generated=true diff --git a/.vscode/settings.json b/.vscode/settings.json index 2f02ee1b..3613793e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,5 +22,8 @@ "vmArgs": [ "-Djava.util.logging.config.file=src/test/resources/logging.properties" ] + }, + "[json]": { + "editor.tabSize": 2 } } diff --git a/dependencies.md b/dependencies.md index 19855bba..b29d5ff7 100644 --- a/dependencies.md +++ b/dependencies.md @@ -237,4 +237,4 @@ [87]: https://github.com/aws/constructs [88]: https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz [89]: https://github.com/evanw/node-source-map-support -[90]: https://registry.npmjs.org/@exasol/extension-parameter-validator/-/extension-parameter-validator-0.2.1.tgz +[90]: https://registry.npmjs.org/@exasol/extension-parameter-validator/-/extension-parameter-validator-0.3.0.tgz diff --git a/doc/changes/changes_0.5.1.md b/doc/changes/changes_0.5.1.md index 71a02c32..d091282e 100644 --- a/doc/changes/changes_0.5.1.md +++ b/doc/changes/changes_0.5.1.md @@ -1,9 +1,15 @@ # Extension Manager 0.5.1, released 2023-??-?? -Code name: +Code name: Support `select` parameter type ## Summary +This release adds support for the `select` parameter type. + +## Features + +* #132: Added support for the `select` parameter type + ## Documentation * #129: Improved description of deployment process @@ -37,3 +43,14 @@ Code name: * Updated `com.exasol:project-keeper-maven-plugin:2.9.10` to `2.9.11` * Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.3.0` to `3.4.0` + +### ParameterValidator + +#### Compile Dependency Updates + +* Updated `@exasol/extension-parameter-validator:0.2.1` to `0.3.0` + +#### Development Dependency Updates + +* Updated `typescript:5.1.6` to `5.2.2` +* Updated `esbuild:0.18.16` to `0.19.2` diff --git a/pkg/parameterValidator/package-lock.json b/pkg/parameterValidator/package-lock.json index 7a065d9d..8bac057b 100644 --- a/pkg/parameterValidator/package-lock.json +++ b/pkg/parameterValidator/package-lock.json @@ -8,17 +8,17 @@ "name": "parameter-validator", "version": "0.0.0", "dependencies": { - "@exasol/extension-parameter-validator": "0.2.1" + "@exasol/extension-parameter-validator": "0.3.0" }, "devDependencies": { - "esbuild": "0.18.16", - "typescript": "5.1.6" + "esbuild": "0.19.2", + "typescript": "5.2.2" } }, "node_modules/@esbuild/android-arm": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.16.tgz", - "integrity": "sha512-gCHjjQmA8L0soklKbLKA6pgsLk1byULuHe94lkZDzcO3/Ta+bbeewJioEn1Fr7kgy9NWNFy/C+MrBwC6I/WCug==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.2.tgz", + "integrity": "sha512-tM8yLeYVe7pRyAu9VMi/Q7aunpLwD139EY1S99xbQkT4/q2qa6eA4ige/WJQYdJ8GBL1K33pPFhPfPdJ/WzT8Q==", "cpu": [ "arm" ], @@ -32,9 +32,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.16.tgz", - "integrity": "sha512-wsCqSPqLz+6Ov+OM4EthU43DyYVVyfn15S4j1bJzylDpc1r1jZFFfJQNfDuT8SlgwuqpmpJXK4uPlHGw6ve7eA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.2.tgz", + "integrity": "sha512-lsB65vAbe90I/Qe10OjkmrdxSX4UJDjosDgb8sZUKcg3oefEuW2OT2Vozz8ef7wrJbMcmhvCC+hciF8jY/uAkw==", "cpu": [ "arm64" ], @@ -48,9 +48,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.16.tgz", - "integrity": "sha512-ldsTXolyA3eTQ1//4DS+E15xl0H/3DTRJaRL0/0PgkqDsI0fV/FlOtD+h0u/AUJr+eOTlZv4aC9gvfppo3C4sw==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.2.tgz", + "integrity": "sha512-qK/TpmHt2M/Hg82WXHRc/W/2SGo/l1thtDHZWqFq7oi24AjZ4O/CpPSu6ZuYKFkEgmZlFoa7CooAyYmuvnaG8w==", "cpu": [ "x64" ], @@ -64,9 +64,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.16.tgz", - "integrity": "sha512-aBxruWCII+OtluORR/KvisEw0ALuw/qDQWvkoosA+c/ngC/Kwk0lLaZ+B++LLS481/VdydB2u6tYpWxUfnLAIw==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.2.tgz", + "integrity": "sha512-Ora8JokrvrzEPEpZO18ZYXkH4asCdc1DLdcVy8TGf5eWtPO1Ie4WroEJzwI52ZGtpODy3+m0a2yEX9l+KUn0tA==", "cpu": [ "arm64" ], @@ -80,9 +80,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.16.tgz", - "integrity": "sha512-6w4Dbue280+rp3LnkgmriS1icOUZDyPuZo/9VsuMUTns7SYEiOaJ7Ca1cbhu9KVObAWfmdjUl4gwy9TIgiO5eA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.2.tgz", + "integrity": "sha512-tP+B5UuIbbFMj2hQaUr6EALlHOIOmlLM2FK7jeFBobPy2ERdohI4Ka6ZFjZ1ZYsrHE/hZimGuU90jusRE0pwDw==", "cpu": [ "x64" ], @@ -96,9 +96,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.16.tgz", - "integrity": "sha512-x35fCebhe9s979DGKbVAwXUOcTmCIE32AIqB9CB1GralMIvxdnMLAw5CnID17ipEw9/3MvDsusj/cspYt2ZLNQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.2.tgz", + "integrity": "sha512-YbPY2kc0acfzL1VPVK6EnAlig4f+l8xmq36OZkU0jzBVHcOTyQDhnKQaLzZudNJQyymd9OqQezeaBgkTGdTGeQ==", "cpu": [ "arm64" ], @@ -112,9 +112,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.16.tgz", - "integrity": "sha512-YM98f+PeNXF3GbxIJlUsj+McUWG1irguBHkszCIwfr3BXtXZsXo0vqybjUDFfu9a8Wr7uUD/YSmHib+EeGAFlg==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.2.tgz", + "integrity": "sha512-nSO5uZT2clM6hosjWHAsS15hLrwCvIWx+b2e3lZ3MwbYSaXwvfO528OF+dLjas1g3bZonciivI8qKR/Hm7IWGw==", "cpu": [ "x64" ], @@ -128,9 +128,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.16.tgz", - "integrity": "sha512-b5ABb+5Ha2C9JkeZXV+b+OruR1tJ33ePmv9ZwMeETSEKlmu/WJ45XTTG+l6a2KDsQtJJ66qo/hbSGBtk0XVLHw==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.2.tgz", + "integrity": "sha512-Odalh8hICg7SOD7XCj0YLpYCEc+6mkoq63UnExDCiRA2wXEmGlK5JVrW50vZR9Qz4qkvqnHcpH+OFEggO3PgTg==", "cpu": [ "arm" ], @@ -144,9 +144,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.16.tgz", - "integrity": "sha512-XIqhNUxJiuy+zsR77+H5Z2f7s4YRlriSJKtvx99nJuG5ATuJPjmZ9n0ANgnGlPCpXGSReFpgcJ7O3SMtzIFeiQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.2.tgz", + "integrity": "sha512-ig2P7GeG//zWlU0AggA3pV1h5gdix0MA3wgB+NsnBXViwiGgY77fuN9Wr5uoCrs2YzaYfogXgsWZbm+HGr09xg==", "cpu": [ "arm64" ], @@ -160,9 +160,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.16.tgz", - "integrity": "sha512-no+pfEpwnRvIyH+txbBAWtjxPU9grslmTBfsmDndj7bnBmr55rOo/PfQmRfz7Qg9isswt1FP5hBbWb23fRWnow==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.2.tgz", + "integrity": "sha512-mLfp0ziRPOLSTek0Gd9T5B8AtzKAkoZE70fneiiyPlSnUKKI4lp+mGEnQXcQEHLJAcIYDPSyBvsUbKUG2ri/XQ==", "cpu": [ "ia32" ], @@ -176,9 +176,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.16.tgz", - "integrity": "sha512-Zbnczs9ZXjmo0oZSS0zbNlJbcwKXa/fcNhYQjahDs4Xg18UumpXG/lwM2lcSvHS3mTrRyCYZvJbmzYc4laRI1g==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.2.tgz", + "integrity": "sha512-hn28+JNDTxxCpnYjdDYVMNTR3SKavyLlCHHkufHV91fkewpIyQchS1d8wSbmXhs1fiYDpNww8KTFlJ1dHsxeSw==", "cpu": [ "loong64" ], @@ -192,9 +192,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.16.tgz", - "integrity": "sha512-YMF7hih1HVR/hQVa/ot4UVffc5ZlrzEb3k2ip0nZr1w6fnYypll9td2qcoMLvd3o8j3y6EbJM3MyIcXIVzXvQQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.2.tgz", + "integrity": "sha512-KbXaC0Sejt7vD2fEgPoIKb6nxkfYW9OmFUK9XQE4//PvGIxNIfPk1NmlHmMg6f25x57rpmEFrn1OotASYIAaTg==", "cpu": [ "mips64el" ], @@ -208,9 +208,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.16.tgz", - "integrity": "sha512-Wkz++LZ29lDwUyTSEnzDaaP5OveOgTU69q9IyIw9WqLRxM4BjTBjz9un4G6TOvehWpf/J3gYVFN96TjGHrbcNQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.2.tgz", + "integrity": "sha512-dJ0kE8KTqbiHtA3Fc/zn7lCd7pqVr4JcT0JqOnbj4LLzYnp+7h8Qi4yjfq42ZlHfhOCM42rBh0EwHYLL6LEzcw==", "cpu": [ "ppc64" ], @@ -224,9 +224,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.16.tgz", - "integrity": "sha512-LFMKZ30tk78/mUv1ygvIP+568bwf4oN6reG/uczXnz6SvFn4e2QUFpUpZY9iSJT6Qpgstrhef/nMykIXZtZWGQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.2.tgz", + "integrity": "sha512-7Z/jKNFufZ/bbu4INqqCN6DDlrmOTmdw6D0gH+6Y7auok2r02Ur661qPuXidPOJ+FSgbEeQnnAGgsVynfLuOEw==", "cpu": [ "riscv64" ], @@ -240,9 +240,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.16.tgz", - "integrity": "sha512-3ZC0BgyYHYKfZo3AV2/66TD/I9tlSBaW7eWTEIkrQQKfJIifKMMttXl9FrAg+UT0SGYsCRLI35Gwdmm96vlOjg==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.2.tgz", + "integrity": "sha512-U+RinR6aXXABFCcAY4gSlv4CL1oOVvSSCdseQmGO66H+XyuQGZIUdhG56SZaDJQcLmrSfRmx5XZOWyCJPRqS7g==", "cpu": [ "s390x" ], @@ -256,9 +256,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.16.tgz", - "integrity": "sha512-xu86B3647DihHJHv/wx3NCz2Dg1gjQ8bbf9cVYZzWKY+gsvxYmn/lnVlqDRazObc3UMwoHpUhNYaZset4X8IPA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.2.tgz", + "integrity": "sha512-oxzHTEv6VPm3XXNaHPyUTTte+3wGv7qVQtqaZCrgstI16gCuhNOtBXLEBkBREP57YTd68P0VgDgG73jSD8bwXQ==", "cpu": [ "x64" ], @@ -272,9 +272,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.16.tgz", - "integrity": "sha512-uVAgpimx9Ffw3xowtg/7qQPwHFx94yCje+DoBx+LNm2ePDpQXHrzE+Sb0Si2VBObYz+LcRps15cq+95YM7gkUw==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.2.tgz", + "integrity": "sha512-WNa5zZk1XpTTwMDompZmvQLHszDDDN7lYjEHCUmAGB83Bgs20EMs7ICD+oKeT6xt4phV4NDdSi/8OfjPbSbZfQ==", "cpu": [ "x64" ], @@ -288,9 +288,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.16.tgz", - "integrity": "sha512-6OjCQM9wf7z8/MBi6BOWaTL2AS/SZudsZtBziXMtNI8r/U41AxS9x7jn0ATOwVy08OotwkPqGRMkpPR2wcTJXA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.2.tgz", + "integrity": "sha512-S6kI1aT3S++Dedb7vxIuUOb3oAxqxk2Rh5rOXOTYnzN8JzW1VzBd+IqPiSpgitu45042SYD3HCoEyhLKQcDFDw==", "cpu": [ "x64" ], @@ -304,9 +304,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.16.tgz", - "integrity": "sha512-ZoNkruFYJp9d1LbUYCh8awgQDvB9uOMZqlQ+gGEZR7v6C+N6u7vPr86c+Chih8niBR81Q/bHOSKGBK3brJyvkQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.2.tgz", + "integrity": "sha512-VXSSMsmb+Z8LbsQGcBMiM+fYObDNRm8p7tkUDMPG/g4fhFX5DEFmjxIEa3N8Zr96SjsJ1woAhF0DUnS3MF3ARw==", "cpu": [ "x64" ], @@ -320,9 +320,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.16.tgz", - "integrity": "sha512-+j4anzQ9hrs+iqO+/wa8UE6TVkKua1pXUb0XWFOx0FiAj6R9INJ+WE//1/Xo6FG1vB5EpH3ko+XcgwiDXTxcdw==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.2.tgz", + "integrity": "sha512-5NayUlSAyb5PQYFAU9x3bHdsqB88RC3aM9lKDAz4X1mo/EchMIT1Q+pSeBXNgkfNmRecLXA0O8xP+x8V+g/LKg==", "cpu": [ "arm64" ], @@ -336,9 +336,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.16.tgz", - "integrity": "sha512-5PFPmq3sSKTp9cT9dzvI67WNfRZGvEVctcZa1KGjDDu4n3H8k59Inbk0du1fz0KrAbKKNpJbdFXQMDUz7BG4rQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.2.tgz", + "integrity": "sha512-47gL/ek1v36iN0wL9L4Q2MFdujR0poLZMJwhO2/N3gA89jgHp4MR8DKCmwYtGNksbfJb9JoTtbkoe6sDhg2QTA==", "cpu": [ "ia32" ], @@ -352,9 +352,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.16.tgz", - "integrity": "sha512-sCIVrrtcWN5Ua7jYXNG1xD199IalrbfV2+0k/2Zf2OyV2FtnQnMgdzgpRAbi4AWlKJj1jkX+M+fEGPQj6BQB4w==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.2.tgz", + "integrity": "sha512-tcuhV7ncXBqbt/Ybf0IyrMcwVOAPDckMK9rXNHtF17UTK18OKLpg08glminN06pt2WCoALhXdLfSPbVvK/6fxw==", "cpu": [ "x64" ], @@ -368,22 +368,22 @@ } }, "node_modules/@exasol/extension-manager-interface": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@exasol/extension-manager-interface/-/extension-manager-interface-0.1.16.tgz", - "integrity": "sha512-xVTwHr97U+Na9+Ulk8LAxKj5haa8LI4o/a+ph3iTBKak4Bs6uMtuhZtger73DQgALMNWOwPETqz4w2qbvMpYYw==" + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@exasol/extension-manager-interface/-/extension-manager-interface-0.3.1.tgz", + "integrity": "sha512-eiemC19v6wp9VCrL7w8SL6gBFAhkdwt2MoS19fcaQoHPOzH08jG9q4RuY43JQGa4PckCW3KO5lmn3P5XsIpbXg==" }, "node_modules/@exasol/extension-parameter-validator": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@exasol/extension-parameter-validator/-/extension-parameter-validator-0.2.1.tgz", - "integrity": "sha512-jKqrYGsvjb0mCx/iVHEhEXoX6fObDAlSmUSv/IwcbHEaiHimamOYjSnZR6DtKoQpBPKEw5yDGJsfW8HNtHo0gA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@exasol/extension-parameter-validator/-/extension-parameter-validator-0.3.0.tgz", + "integrity": "sha512-juM5XpPIjTpRA1jRIBY1ouXDv6wv6Hj2er6hfnWnq9DwJkrSWOoWeq2t+337XgIR9ufLJoeMz8SFe2rYP6m2NQ==", "dependencies": { - "@exasol/extension-manager-interface": "0.1.16" + "@exasol/extension-manager-interface": "0.3.1" } }, "node_modules/esbuild": { - "version": "0.18.16", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.16.tgz", - "integrity": "sha512-1xLsOXrDqwdHxyXb/x/SOyg59jpf/SH7YMvU5RNSU7z3TInaASNJWNFJ6iRvLvLETZMasF3d1DdZLg7sgRimRQ==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.2.tgz", + "integrity": "sha512-G6hPax8UbFakEj3hWO0Vs52LQ8k3lnBhxZWomUJDxfz3rZTLqF5k/FCzuNdLx2RbpBiQQF9H9onlDDH1lZsnjg==", "dev": true, "hasInstallScript": true, "bin": { @@ -393,34 +393,34 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.18.16", - "@esbuild/android-arm64": "0.18.16", - "@esbuild/android-x64": "0.18.16", - "@esbuild/darwin-arm64": "0.18.16", - "@esbuild/darwin-x64": "0.18.16", - "@esbuild/freebsd-arm64": "0.18.16", - "@esbuild/freebsd-x64": "0.18.16", - "@esbuild/linux-arm": "0.18.16", - "@esbuild/linux-arm64": "0.18.16", - "@esbuild/linux-ia32": "0.18.16", - "@esbuild/linux-loong64": "0.18.16", - "@esbuild/linux-mips64el": "0.18.16", - "@esbuild/linux-ppc64": "0.18.16", - "@esbuild/linux-riscv64": "0.18.16", - "@esbuild/linux-s390x": "0.18.16", - "@esbuild/linux-x64": "0.18.16", - "@esbuild/netbsd-x64": "0.18.16", - "@esbuild/openbsd-x64": "0.18.16", - "@esbuild/sunos-x64": "0.18.16", - "@esbuild/win32-arm64": "0.18.16", - "@esbuild/win32-ia32": "0.18.16", - "@esbuild/win32-x64": "0.18.16" + "@esbuild/android-arm": "0.19.2", + "@esbuild/android-arm64": "0.19.2", + "@esbuild/android-x64": "0.19.2", + "@esbuild/darwin-arm64": "0.19.2", + "@esbuild/darwin-x64": "0.19.2", + "@esbuild/freebsd-arm64": "0.19.2", + "@esbuild/freebsd-x64": "0.19.2", + "@esbuild/linux-arm": "0.19.2", + "@esbuild/linux-arm64": "0.19.2", + "@esbuild/linux-ia32": "0.19.2", + "@esbuild/linux-loong64": "0.19.2", + "@esbuild/linux-mips64el": "0.19.2", + "@esbuild/linux-ppc64": "0.19.2", + "@esbuild/linux-riscv64": "0.19.2", + "@esbuild/linux-s390x": "0.19.2", + "@esbuild/linux-x64": "0.19.2", + "@esbuild/netbsd-x64": "0.19.2", + "@esbuild/openbsd-x64": "0.19.2", + "@esbuild/sunos-x64": "0.19.2", + "@esbuild/win32-arm64": "0.19.2", + "@esbuild/win32-ia32": "0.19.2", + "@esbuild/win32-x64": "0.19.2" } }, "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/pkg/parameterValidator/package.json b/pkg/parameterValidator/package.json index 90d82016..08137542 100644 --- a/pkg/parameterValidator/package.json +++ b/pkg/parameterValidator/package.json @@ -7,10 +7,10 @@ "clean": "tsc --build --clean && rm -f parameterValidator.js" }, "dependencies": { - "@exasol/extension-parameter-validator": "0.2.1" + "@exasol/extension-parameter-validator": "0.3.0" }, "devDependencies": { - "esbuild": "0.18.16", - "typescript": "5.1.6" + "esbuild": "0.19.2", + "typescript": "5.2.2" } -} +} \ No newline at end of file diff --git a/pkg/parameterValidator/parameterValidator.js b/pkg/parameterValidator/parameterValidator.js index 1394c5c5..de2959cb 100644 --- a/pkg/parameterValidator/parameterValidator.js +++ b/pkg/parameterValidator/parameterValidator.js @@ -1,6 +1,6 @@ (() => { // node_modules/@exasol/extension-parameter-validator/dist/extensionParameterValidator.js - var SUCCESS_RESULT = { success: true, message: "" }; + var SUCCESS_RESULT = { success: true }; function validationError(errorMessage) { return { success: false, message: errorMessage }; } @@ -12,13 +12,16 @@ return SUCCESS_RESULT; } } else { + const definitionType = definition.type; switch (definition.type) { case "string": return validateStringParameter(definition, value); case "boolean": return validateBooleanParameter(value); + case "select": + return validateSelectParameter(definition, value); default: - return validationError("unsupported parameter type '" + definition.type + "'"); + return validationError(`unsupported parameter type '${definitionType}'`); } } } @@ -30,6 +33,17 @@ } return SUCCESS_RESULT; } + function validateSelectParameter(definition, value) { + const possibleValues = definition.options.map((option) => option.id); + if (possibleValues.length === 0) { + return validationError("No option available for this parameter."); + } + if (possibleValues.includes(value)) { + return SUCCESS_RESULT; + } + const quotedValues = possibleValues.map((value2) => `'${value2}'`).join(", "); + return validationError(`The value is not allowed. Possible values are ${quotedValues}.`); + } function validateBooleanParameter(value) { if (value === "true" || value === "false") { return SUCCESS_RESULT; diff --git a/pkg/parameterValidator/parameterValidator_test.go b/pkg/parameterValidator/parameterValidator_test.go index c15a61e6..178f3e32 100644 --- a/pkg/parameterValidator/parameterValidator_test.go +++ b/pkg/parameterValidator/parameterValidator_test.go @@ -89,6 +89,18 @@ func (suite *ParameterValidatorSuite) TestValidateParameters() { definitions: []interface{}{map[string]interface{}{"id": "param1", "name": "My param", "type": "boolean"}}, params: []extensionAPI.ParameterValue{{Name: "param1", Value: "true"}}, expected: []ValidationResult{}}, + {name: "valid select parameter", + definitions: []interface{}{map[string]interface{}{"id": "param1", "name": "My param", "type": "select", "options": []interface{}{map[string]string{"id": "a", "name": "Value a"}, map[string]string{"id": "b", "name": "Value b"}}}}, + params: []extensionAPI.ParameterValue{{Name: "param1", Value: "a"}}, + expected: []ValidationResult{}}, + {name: "invalid select parameter", + definitions: []interface{}{map[string]interface{}{"id": "param1", "name": "My param", "type": "select", "options": []interface{}{map[string]string{"id": "a", "name": "Value a"}, map[string]string{"id": "b", "name": "Value b"}}}}, + params: []extensionAPI.ParameterValue{{Name: "param1", Value: "c"}}, + expected: []ValidationResult{{Success: false, Message: `Failed to validate parameter 'My param': The value is not allowed. Possible values are 'a', 'b'.`}}}, + {name: "unknown parameter type", + definitions: []interface{}{map[string]interface{}{"id": "param1", "name": "My param", "type": "unknown"}}, + params: []extensionAPI.ParameterValue{{Name: "param1", Value: "c"}}, + expected: []ValidationResult{{Success: false, Message: `Failed to validate parameter 'My param': unsupported parameter type 'unknown'`}}}, } for _, t := range tests {