From fb01be615ba1d90cb07a450b5b9bbb728eb6dfe4 Mon Sep 17 00:00:00 2001 From: dragolea Date: Fri, 8 Mar 2024 13:17:27 +0200 Subject: [PATCH 1/2] Chore: updated versions --- README.md | 3 +- package-lock.json | 166 +++++++++--------- package.json | 16 +- .../@cds-models/AdminService/index.ts | 6 +- .../@cds-models/CatalogService/index.ts | 36 ++-- test/bookshop/@cds-models/_/index.ts | 2 +- test/bookshop/@cds-models/index.ts | 13 +- .../@cds-models/sap/capire/bookshop/index.ts | 22 +-- test/bookshop/@cds-models/sap/common/index.js | 2 + test/bookshop/@cds-models/sap/common/index.ts | 27 ++- test/bookshop/package.json | 2 +- 11 files changed, 158 insertions(+), 137 deletions(-) diff --git a/README.md b/README.md index b59972b..eb113c6 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ It is recommended to use the following **tsconfig.json** properties: ### `Option 3 :` Install CDS-TS-Dispatcher - `.devcontainer` -The `devcontainer` repository contains the `CDS-TS-Dispatcher` and `all dependencies` needed to boot a new project : +The `CDS-TS-Dispatcher dev container` repository contains the [CDS-TS-Dispatcher](https://github.com/dxfrontier/cds-ts-dispatcher) & [CDS-TS-Repository](https://github.com/dxfrontier/cds-ts-repository) and `all dependencies` needed to boot a new project : `Tools` installed inside of the container : @@ -240,6 +240,7 @@ The `devcontainer` repository contains the `CDS-TS-Dispatcher` and `all dependen - `controller` - `service` - `repository` + - `middleware` - `util` - `test` - `ESLint`, `Prettier` diff --git a/package-lock.json b/package-lock.json index c42ddb2..1431835 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,25 +12,25 @@ "./test/bookshop" ], "dependencies": { - "@sap/cds": "^7.6.2", + "@sap/cds": "^7.7.1", "inversify": "^6.0.2", "reflect-metadata": "^0.2.1" }, "devDependencies": { - "@cap-js/cds-typer": "0.16.0", - "@cap-js/sqlite": "^1.5.0", - "@dxfrontier/cds-ts-repository": "^1.0.3", - "@swc/core": "^1.4.0", + "@cap-js/cds-typer": "0.17.0", + "@cap-js/sqlite": "^1.5.1", + "@dxfrontier/cds-ts-repository": "^1.0.8", + "@swc/core": "^1.4.6", "@types/jest": "^29.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-config-standard-with-typescript": "^43.0.1", "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "^6.1.1", - "husky": "^9.0.10", + "husky": "^9.0.11", "jest": "^29.7.0", "lint-staged": "^15.2.2", "newman": "^6.1.1", @@ -39,7 +39,7 @@ "start-server-and-test": "^2.0.3", "ts-jest": "^29.1.2", "tsup": "^8.0.2", - "typescript": "^5.3.3" + "typescript": "^5.4.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -714,9 +714,9 @@ "dev": true }, "node_modules/@cap-js/cds-typer": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@cap-js/cds-typer/-/cds-typer-0.16.0.tgz", - "integrity": "sha512-1hhWHK4LxvPRyXIf1fNLJSlbVvXnAyJL0+oIAvmfW/7jgLG0Lqr5oJJidWNuWCH3WZiiX+I/LkeqJhkryZLCQQ==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@cap-js/cds-typer/-/cds-typer-0.17.0.tgz", + "integrity": "sha512-hyrT6OP99jSsmYljmqJkaHKgo6kMZKi+4CnL+pFL78/9EDBe6yrsrtghLIiPIVpkABYtCK/agJSm2qEav1T7mw==", "dev": true, "dependencies": { "@sap/cds": ">=6" @@ -747,9 +747,9 @@ } }, "node_modules/@cap-js/sqlite": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@cap-js/sqlite/-/sqlite-1.5.0.tgz", - "integrity": "sha512-KKD2Eds+dcX0h2sqf+YVLUYwQgGuaS6/6bVSFXd7KrAY+L3rOQFudBA025fJayvfK5npRTKHV/Pg+LV+USTr+Q==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@cap-js/sqlite/-/sqlite-1.5.1.tgz", + "integrity": "sha512-nNo1FSMs+4mqhjWt4f3gdSrEOjkQ6/acmymPP1eHf1l49HdDj50JKatDcHuLdal1lr4gVmcMv9zwpRge0OH/4w==", "dev": true, "dependencies": { "@cap-js/db-service": "^1.6.0", @@ -774,13 +774,13 @@ } }, "node_modules/@dxfrontier/cds-ts-repository": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@dxfrontier/cds-ts-repository/-/cds-ts-repository-1.0.3.tgz", - "integrity": "sha512-gWGE64SaYZnkpmRK4dJOhahjr4V/sbEbvIL/IwDhpfl+rTRUTPNJPL/BafOLxBfPIgSmPChL09jI0jT16XmeYg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@dxfrontier/cds-ts-repository/-/cds-ts-repository-1.0.8.tgz", + "integrity": "sha512-fogqgQY/AhBAp/5PxFS2JqZzZHOXyPUdea8bYGXaT+ISCzISKireSGcKtm2nlBU5xAAmZP7gKgs0OQcilEDvMw==", "dev": true, "dependencies": { - "@sap/cds": "^7.6.1", - "ts-mixer": "^6.0.3" + "@sap/cds": "^7.7.0", + "ts-mixer": "^6.0.4" } }, "node_modules/@esbuild/aix-ppc64": { @@ -1221,9 +1221,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2091,9 +2091,9 @@ ] }, "node_modules/@sap/cds": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@sap/cds/-/cds-7.6.2.tgz", - "integrity": "sha512-fXpjmzyb9bBhYg0rpwUpdHLLFcNwcvOd/KMSa8/UV26ZntsH+KojKDoE1V0GhIEspRucyy5AexDRIqPiJ1/ASQ==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@sap/cds/-/cds-7.7.1.tgz", + "integrity": "sha512-NZyQfPVSsgezR9VLYIne/ijVa4PWKATAbW5aSu5EqnLLj7naIsFRQGVJruJS5Gm0c0ZOLlL6QVJf8THm6A6mKQ==", "dependencies": { "@cap-js/cds-types": "<1", "@sap/cds-compiler": "^4", @@ -2193,13 +2193,13 @@ } }, "node_modules/@swc/core": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.0.tgz", - "integrity": "sha512-wc5DMI5BJftnK0Fyx9SNJKkA0+BZSJQx8430yutWmsILkHMBD3Yd9GhlMaxasab9RhgKqZp7Ht30hUYO5ZDvQg==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.4.6.tgz", + "integrity": "sha512-A7iK9+1qzTCIuc3IYcS8gPHCm9bZVKUJrfNnwveZYyo6OFp3jLno4WOM2yBy5uqedgYATEiWgBYHKq37KrU6IA==", "dev": true, "hasInstallScript": true, "dependencies": { - "@swc/counter": "^0.1.1", + "@swc/counter": "^0.1.2", "@swc/types": "^0.1.5" }, "engines": { @@ -2210,16 +2210,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.4.0", - "@swc/core-darwin-x64": "1.4.0", - "@swc/core-linux-arm-gnueabihf": "1.4.0", - "@swc/core-linux-arm64-gnu": "1.4.0", - "@swc/core-linux-arm64-musl": "1.4.0", - "@swc/core-linux-x64-gnu": "1.4.0", - "@swc/core-linux-x64-musl": "1.4.0", - "@swc/core-win32-arm64-msvc": "1.4.0", - "@swc/core-win32-ia32-msvc": "1.4.0", - "@swc/core-win32-x64-msvc": "1.4.0" + "@swc/core-darwin-arm64": "1.4.6", + "@swc/core-darwin-x64": "1.4.6", + "@swc/core-linux-arm-gnueabihf": "1.4.6", + "@swc/core-linux-arm64-gnu": "1.4.6", + "@swc/core-linux-arm64-musl": "1.4.6", + "@swc/core-linux-x64-gnu": "1.4.6", + "@swc/core-linux-x64-musl": "1.4.6", + "@swc/core-win32-arm64-msvc": "1.4.6", + "@swc/core-win32-ia32-msvc": "1.4.6", + "@swc/core-win32-x64-msvc": "1.4.6" }, "peerDependencies": { "@swc/helpers": "^0.5.0" @@ -2231,9 +2231,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.0.tgz", - "integrity": "sha512-UTJ/Vz+s7Pagef6HmufWt6Rs0aUu+EJF4Pzuwvr7JQQ5b1DZeAAUeUtkUTFx/PvCbM8Xfw4XdKBUZfrIKCfW8A==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.6.tgz", + "integrity": "sha512-bpggpx/BfLFyy48aUKq1PsNUxb7J6CINlpAUk0V4yXfmGnpZH80Gp1pM3GkFDQyCfq7L7IpjPrIjWQwCrL4hYw==", "cpu": [ "arm64" ], @@ -2247,9 +2247,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.0.tgz", - "integrity": "sha512-f8v58u2GsGak8EtZFN9guXqE0Ep10Suny6xriaW2d8FGqESPyNrnBzli3aqkSeQk5gGqu2zJ7WiiKp3XoUOidA==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.6.tgz", + "integrity": "sha512-vJn+/ZuBTg+vtNkcmgZdH6FQpa0hFVdnB9bAeqYwKkyqP15zaPe6jfC+qL2y/cIeC7ASvHXEKrnCZgBLxfVQ9w==", "cpu": [ "x64" ], @@ -2263,9 +2263,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.0.tgz", - "integrity": "sha512-q2KAkBzmPcTnRij/Y1fgHCKAGevUX/H4uUESrw1J5gmUg9Qip6onKV80lTumA1/aooGJ18LOsB31qdbwmZk9OA==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.6.tgz", + "integrity": "sha512-hEmYcB/9XBAl02MtuVHszhNjQpjBzhk/NFulnU33tBMbNZpy2TN5yTsitezMq090QXdDz8sKIALApDyg07ZR8g==", "cpu": [ "arm" ], @@ -2279,9 +2279,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.0.tgz", - "integrity": "sha512-SknGu96W0mzHtLHWm+62fk5+Omp9fMPFO7AWyGFmz2tr8EgRRXtTSrBUnWhAbgcalnhen48GsvtMdxf1KNputg==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.6.tgz", + "integrity": "sha512-/UCYIVoGpm2YVvGHZM2QOA3dexa28BjcpLAIYnoCbgH5f7ulDhE8FAIO/9pasj+kixDBsdqewHfsNXFYlgGJjQ==", "cpu": [ "arm64" ], @@ -2295,9 +2295,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.0.tgz", - "integrity": "sha512-/k3TDvpBRMDNskHooNN1KqwUhcwkfBlIYxRTnJvsfT2C7My4pffR+4KXmt0IKynlTTbCdlU/4jgX4801FSuliw==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.6.tgz", + "integrity": "sha512-LGQsKJ8MA9zZ8xHCkbGkcPSmpkZL2O7drvwsGKynyCttHhpwVjj9lguhD4DWU3+FWIsjvho5Vu0Ggei8OYi/Lw==", "cpu": [ "arm64" ], @@ -2311,9 +2311,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.0.tgz", - "integrity": "sha512-GYsTMvNt5+WTVlwwQzOOWsPMw6P/F41u5PGHWmfev8Nd4QJ1h3rWPySKk4mV42IJwH9MgQCVSl3ygwNqwl6kFg==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.6.tgz", + "integrity": "sha512-10JL2nLIreMQDKvq2TECnQe5fCuoqBHu1yW8aChqgHUyg9d7gfZX/kppUsuimqcgRBnS0AjTDAA+JF6UsG/2Yg==", "cpu": [ "x64" ], @@ -2327,9 +2327,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.0.tgz", - "integrity": "sha512-jGVPdM/VwF7kK/uYRW5N6FwzKf/FnDjGIR3RPvQokjYJy7Auk+3Oj21C0Jev7sIT9RYnO/TrFEoEozKeD/z2Qw==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.4.6.tgz", + "integrity": "sha512-EGyjFVzVY6Do89x8sfah7I3cuP4MwtwzmA6OlfD/KASqfCFf5eIaEBMbajgR41bVfMV7lK72lwAIea5xEyq1AQ==", "cpu": [ "x64" ], @@ -2343,9 +2343,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.0.tgz", - "integrity": "sha512-biHYm1AronEKlt47O/H8sSOBM2BKXMmWT+ApvlxUw50m1RGNnVnE0bgY7tylFuuSiWyXsQPJbmUV708JqORXVg==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.6.tgz", + "integrity": "sha512-gfW9AuXvwSyK07Vb8Y8E9m2oJZk21WqcD+X4BZhkbKB0TCZK0zk1j/HpS2UFlr1JB2zPKPpSWLU3ll0GEHRG2A==", "cpu": [ "arm64" ], @@ -2359,9 +2359,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.0.tgz", - "integrity": "sha512-TL5L2tFQb19kJwv6+elToGBj74QXCn9j+hZfwQatvZEJRA5rDK16eH6oAE751dGUArhnWlW3Vj65hViPvTuycw==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.6.tgz", + "integrity": "sha512-ZuQm81FhhvNVYtVb9GfZ+Du6e7fZlkisWvuCeBeRiyseNt1tcrQ8J3V67jD2nxje8CVXrwG3oUIbPcybv2rxfQ==", "cpu": [ "ia32" ], @@ -2375,9 +2375,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.0.tgz", - "integrity": "sha512-e2xVezU7XZ2Stzn4i7TOQe2Kn84oYdG0M3A7XI7oTdcpsKCcKwgiMoroiAhqCv+iN20KNqhnWwJiUiTj/qN5AA==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.6.tgz", + "integrity": "sha512-UagPb7w5V0uzWSjrXwOavGa7s9iv3wrVdEgWy+/inm0OwY4lj3zpK9qDnMWAwYLuFwkI3UG4Q3dH8wD+CUUcjw==", "cpu": [ "x64" ], @@ -4438,16 +4438,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -5857,9 +5857,9 @@ } }, "node_modules/husky": { - "version": "9.0.10", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.10.tgz", - "integrity": "sha512-TQGNknoiy6bURzIO77pPRu+XHi6zI7T93rX+QnJsoYFf3xdjKOur+IlfqzJGMHIK/wXrLg+GsvMs8Op7vI2jVA==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true, "bin": { "husky": "bin.mjs" @@ -10395,9 +10395,9 @@ } }, "node_modules/ts-mixer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", - "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==", "dev": true }, "node_modules/tsconfig-paths": { @@ -10639,9 +10639,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 855978e..cdb7420 100644 --- a/package.json +++ b/package.json @@ -62,25 +62,25 @@ }, "homepage": "https://github.com/dxfrontier/cds-ts-dispatcher#readme", "dependencies": { - "@sap/cds": "^7.6.2", + "@sap/cds": "^7.7.1", "inversify": "^6.0.2", "reflect-metadata": "^0.2.1" }, "devDependencies": { - "@cap-js/cds-typer": "0.16.0", - "@cap-js/sqlite": "^1.5.0", - "@dxfrontier/cds-ts-repository": "^1.0.3", - "@swc/core": "^1.4.0", + "@cap-js/cds-typer": "0.17.0", + "@cap-js/sqlite": "^1.5.1", + "@dxfrontier/cds-ts-repository": "^1.0.8", + "@swc/core": "^1.4.6", "@types/jest": "^29.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-config-standard-with-typescript": "^43.0.1", "eslint-plugin-import": "^2.29.1", "eslint-plugin-n": "^16.6.2", "eslint-plugin-promise": "^6.1.1", - "husky": "^9.0.10", + "husky": "^9.0.11", "jest": "^29.7.0", "lint-staged": "^15.2.2", "newman": "^6.1.1", @@ -89,7 +89,7 @@ "start-server-and-test": "^2.0.3", "ts-jest": "^29.1.2", "tsup": "^8.0.2", - "typescript": "^5.3.3" + "typescript": "^5.4.2" }, "lint-staged": { "**/*.{ts, tsx}": [ diff --git a/test/bookshop/@cds-models/AdminService/index.ts b/test/bookshop/@cds-models/AdminService/index.ts index 8c039cf..3514ef9 100644 --- a/test/bookshop/@cds-models/AdminService/index.ts +++ b/test/bookshop/@cds-models/AdminService/index.ts @@ -8,7 +8,7 @@ export function _UserActivityLogAspect obj ID?: number; actionType?: string | null; static actions: { - } + } }; } export class UserActivityLog extends _._managedAspect(_UserActivityLogAspect(__.Entity)) {static drafts: typeof UserActivityLog} @@ -26,7 +26,7 @@ export function _PromotionAspect object>(B discount?: number | null; books?: __.Association.to.many<_sap_capire_bookshop.Books>; static actions: { - } + } }; } export class Promotion extends _PromotionAspect(__.Entity) {static drafts: typeof Promotion} @@ -42,7 +42,7 @@ export function _UserAspect object>(Base: role?: _.Roles | null; reviews?: __.Association.to.many<_sap_capire_bookshop.Reviews>; static actions: { - } + } }; } export class User extends _._managedAspect(_UserAspect(__.Entity)) {} diff --git a/test/bookshop/@cds-models/CatalogService/index.ts b/test/bookshop/@cds-models/CatalogService/index.ts index f3c60c1..e158a8c 100644 --- a/test/bookshop/@cds-models/CatalogService/index.ts +++ b/test/bookshop/@cds-models/CatalogService/index.ts @@ -27,7 +27,7 @@ export function _BookAspect object>(Base: stats?: __.Association.to<_sap_capire_bookshop.BookStat> | null; stats_ID?: number | null; static actions: { - } + } }; } export class Book extends _._managedAspect(_BookAspect(__.Entity)) {} @@ -45,7 +45,7 @@ export function _AuthorAspect object>(Base placeOfDeath?: string | null; books?: __.Association.to.many<_sap_capire_bookshop.Books>; static actions: { - } + } }; } export class Author extends _._managedAspect(_AuthorAspect(__.Entity)) {} @@ -63,7 +63,7 @@ export function _ReviewAspect object>(Base rating?: number | null; comment?: string | null; static actions: { - } + } }; } export class Review extends _._managedAspect(_ReviewAspect(__.Entity)) {} @@ -76,7 +76,7 @@ export function _PublisherAspect object>(B ID?: number; name?: string | null; static actions: { - } + } }; } export class Publisher extends _._managedAspect(_PublisherAspect(__.Entity)) {} @@ -94,7 +94,7 @@ export function _BookOrderAspect object>(B customer?: __.Association.to<_sap_capire_bookshop.User> | null; customer_ID?: number | null; static actions: { - } + } }; } export class BookOrder extends _._managedAspect(_BookOrderAspect(__.Entity)) {} @@ -107,7 +107,7 @@ export function _BookEventAspect object>(B name?: string | null; types?: _.BookTypes | null; static actions: { - } + } }; } export class BookEvent extends _._managedAspect(_._cuidAspect(_BookEventAspect(__.Entity))) {static drafts: typeof BookEvent} @@ -123,17 +123,17 @@ export function _BookStatAspect object>(Ba book?: __.Association.to<_sap_capire_bookshop.Book> | null; book_ID?: number | null; static actions: { - GenerateReport: { (ID: __.DeepRequired['ID'] | null): { - book?: __.DeepRequired['title'] | null; - stats?: __.DeepRequired['views'] | null; - rating?: __.DeepRequired['averageRating'] | null; - }, __parameters: {ID: __.DeepRequired['ID'] | null}, __returns: { - book?: __.DeepRequired['title'] | null; - stats?: __.DeepRequired['views'] | null; - rating?: __.DeepRequired['averageRating'] | null; - } } + GenerateReport: { (ID: __.DeepRequired['ID'] | null): { + book?: __.DeepRequired['title'] | null; + stats?: __.DeepRequired['views'] | null; + rating?: __.DeepRequired['averageRating'] | null; + }, __parameters: {ID: __.DeepRequired['ID'] | null}, __returns: { + book?: __.DeepRequired['title'] | null; + stats?: __.DeepRequired['views'] | null; + rating?: __.DeepRequired['averageRating'] | null; + } } NotifyAuthor: { (ID: __.DeepRequired['ID'] | null): boolean, __parameters: {ID: __.DeepRequired['ID'] | null}, __returns: boolean } - } + } }; } export class BookStat extends _._managedAspect(_BookStatAspect(__.Entity)) {} @@ -152,7 +152,7 @@ export function _CurrencyAspect object>(Ba symbol?: string | null; minorUnit?: number | null; static actions: { - } + } }; } export class Currency extends _sap_common._CodeListAspect(_CurrencyAspect(__.Entity)) {} @@ -167,7 +167,7 @@ export function _GenreAspect object>(Base: parent_ID?: number | null; children?: __.Composition.of.many<_sap_capire_bookshop.Genres>; static actions: { - } + } }; } export class Genre extends _sap_common._CodeListAspect(_GenreAspect(__.Entity)) {} diff --git a/test/bookshop/@cds-models/_/index.ts b/test/bookshop/@cds-models/_/index.ts index 8ef4c79..5366fbf 100644 --- a/test/bookshop/@cds-models/_/index.ts +++ b/test/bookshop/@cds-models/_/index.ts @@ -27,4 +27,4 @@ export type EntitySet = T[] & { export type DeepRequired = { [K in keyof T]: DeepRequired -} & Required; +} & Exclude, null>; diff --git a/test/bookshop/@cds-models/index.ts b/test/bookshop/@cds-models/index.ts index 3276e8f..375e099 100644 --- a/test/bookshop/@cds-models/index.ts +++ b/test/bookshop/@cds-models/index.ts @@ -4,6 +4,7 @@ import * as __ from './_'; export type Language = __.Association.to<_sap_common.Language>; export type Currency = __.Association.to<_sap_common.Currency>; export type Country = __.Association.to<_sap_common.Country>; +export type Timezone = __.Association.to<_sap_common.Timezone>; export type User = string; // enum export const Roles = { @@ -25,7 +26,7 @@ export function _cuidAspect object>(Base: return class cuid extends Base { ID?: string; static actions: { - } + } }; } export class cuid extends _cuidAspect(__.Entity) {} @@ -43,7 +44,7 @@ export function _managedAspect object>(Bas */ modifiedBy?: User | null; static actions: { - } + } }; } export class managed extends _managedAspect(__.Entity) {} @@ -53,7 +54,7 @@ export function _temporalAspect object>(Ba validFrom?: string | null; validTo?: string | null; static actions: { - } + } }; } export class temporal extends _temporalAspect(__.Entity) {} @@ -62,7 +63,7 @@ export function _extensibleAspect object>( return class extensible extends Base { extensions__?: string | null; static actions: { - } + } }; } export class extensible extends _extensibleAspect(__.Entity) {} @@ -71,7 +72,7 @@ export function _HelloRequestAspect object greeterName?: string | null; toName?: string | null; static actions: { - } + } }; } export class HelloRequest extends _HelloRequestAspect(__.Entity) {} @@ -83,7 +84,7 @@ export function _HelloResponseAspect objec return class HelloResponse extends Base { greetingMessage?: string | null; static actions: { - } + } }; } export class HelloResponse extends _HelloResponseAspect(__.Entity) {} diff --git a/test/bookshop/@cds-models/sap/capire/bookshop/index.ts b/test/bookshop/@cds-models/sap/capire/bookshop/index.ts index a1fedfb..83ff8a0 100644 --- a/test/bookshop/@cds-models/sap/capire/bookshop/index.ts +++ b/test/bookshop/@cds-models/sap/capire/bookshop/index.ts @@ -25,7 +25,7 @@ export function _BookAspect object>(Base: stats?: __.Association.to | null; stats_ID?: number | null; static actions: { - } + } }; } export class Book extends _._managedAspect(_BookAspect(__.Entity)) {} @@ -38,7 +38,7 @@ export function _PublisherAspect object>(B ID?: number; name?: string | null; static actions: { - } + } }; } export class Publisher extends _._managedAspect(_PublisherAspect(__.Entity)) {} @@ -54,7 +54,7 @@ export function _BookStatAspect object>(Ba book?: __.Association.to | null; book_ID?: number | null; static actions: { - } + } }; } export class BookStat extends _._managedAspect(_BookStatAspect(__.Entity)) {} @@ -72,7 +72,7 @@ export function _AuthorAspect object>(Base placeOfDeath?: string | null; books?: __.Association.to.many; static actions: { - } + } }; } export class Author extends _._managedAspect(_AuthorAspect(__.Entity)) {} @@ -87,7 +87,7 @@ export function _GenreAspect object>(Base: parent_ID?: number | null; children?: __.Composition.of.many; static actions: { - } + } }; } export class Genre extends _sap_common._CodeListAspect(_GenreAspect(__.Entity)) {} @@ -105,7 +105,7 @@ export function _ReviewAspect object>(Base rating?: number | null; comment?: string | null; static actions: { - } + } }; } export class Review extends _._managedAspect(_ReviewAspect(__.Entity)) {} @@ -118,7 +118,7 @@ export function _BookEventAspect object>(B name?: string | null; types?: _.BookTypes | null; static actions: { - } + } }; } export class BookEvent extends _._managedAspect(_._cuidAspect(_BookEventAspect(__.Entity))) {static drafts: typeof BookEvent} @@ -134,7 +134,7 @@ export function _UserAspect object>(Base: role?: _.Roles | null; reviews?: __.Association.to.many; static actions: { - } + } }; } export class User extends _._managedAspect(_UserAspect(__.Entity)) {} @@ -147,7 +147,7 @@ export function _UserActivityLogAspect obj ID?: number; actionType?: string | null; static actions: { - } + } }; } export class UserActivityLog extends _._managedAspect(_UserActivityLogAspect(__.Entity)) {static drafts: typeof UserActivityLog} @@ -165,7 +165,7 @@ export function _PromotionAspect object>(B discount?: number | null; books?: __.Association.to.many; static actions: { - } + } }; } export class Promotion extends _PromotionAspect(__.Entity) {static drafts: typeof Promotion} @@ -183,7 +183,7 @@ export function _BookOrderAspect object>(B customer?: __.Association.to | null; customer_ID?: number | null; static actions: { - } + } }; } export class BookOrder extends _._managedAspect(_BookOrderAspect(__.Entity)) {} diff --git a/test/bookshop/@cds-models/sap/common/index.js b/test/bookshop/@cds-models/sap/common/index.js index f019ddd..c730fa4 100644 --- a/test/bookshop/@cds-models/sap/common/index.js +++ b/test/bookshop/@cds-models/sap/common/index.js @@ -7,6 +7,8 @@ module.exports.Country = csn.Countries module.exports.Countries = csn.Countries module.exports.Currency = csn.Currencies module.exports.Currencies = csn.Currencies +module.exports.Timezone = csn.Timezones +module.exports.Timezones = csn.Timezones // events // actions // enums diff --git a/test/bookshop/@cds-models/sap/common/index.ts b/test/bookshop/@cds-models/sap/common/index.ts index d6c5e8f..9ab2d82 100644 --- a/test/bookshop/@cds-models/sap/common/index.ts +++ b/test/bookshop/@cds-models/sap/common/index.ts @@ -7,7 +7,7 @@ export function _CodeListAspect object>(Ba name?: string | null; descr?: string | null; static actions: { - } + } }; } export class CodeList extends _CodeListAspect(__.Entity) {} @@ -19,7 +19,7 @@ export function _TextsAspectAspect object> */ locale?: Locale; static actions: { - } + } }; } export class TextsAspect extends _TextsAspectAspect(__.Entity) {} @@ -35,7 +35,7 @@ export function _LanguageAspect object>(Ba */ code?: Locale; static actions: { - } + } }; } export class Language extends _CodeListAspect(_LanguageAspect(__.Entity)) {} @@ -52,7 +52,7 @@ export function _CountryAspect object>(Bas return class Country extends Base { code?: string; static actions: { - } + } }; } export class Country extends _CodeListAspect(_CountryAspect(__.Entity)) {} @@ -71,10 +71,27 @@ export function _CurrencyAspect object>(Ba symbol?: string | null; minorUnit?: number | null; static actions: { - } + } }; } export class Currency extends _CodeListAspect(_CurrencyAspect(__.Entity)) {} export class Currencies extends Array {} Object.defineProperty(Currency, 'name', { value: 'sap.common.Currencies' }) Object.defineProperty(Currencies, 'name', { value: 'sap.common.Currencies' }) + +/** +* Code list for time zones +* +* See https://cap.cloud.sap/docs/cds/common#entity-timezones +*/ +export function _TimezoneAspect object>(Base: TBase) { + return class Timezone extends Base { + code?: string; + static actions: { + } + }; +} +export class Timezone extends _CodeListAspect(_TimezoneAspect(__.Entity)) {} +export class Timezones extends Array {} +Object.defineProperty(Timezone, 'name', { value: 'sap.common.Timezones' }) +Object.defineProperty(Timezones, 'name', { value: 'sap.common.Timezones' }) diff --git a/test/bookshop/package.json b/test/bookshop/package.json index 546a5d7..f4f44c2 100644 --- a/test/bookshop/package.json +++ b/test/bookshop/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "scripts": { "start": "npm run build:entities && cds-ts watch", - "build:entities": "cds-typer '*' --outputDirectory ./@cds-models", + "build:entities": "cds-typer '*' --outputDirectory ./@cds-models --logLevel NONE", "build:entities:test": "npm run build:entities && npm run clean:js", "clean:js": "npx rimraf ./@cds-models/{*.js,**/*.js,**/**/*.js,**/**/**/*.js}" }, From 2352f062f3328ababa0540fb6675122f1359dc9b Mon Sep 17 00:00:00 2001 From: Automated Version Bump Date: Fri, 8 Mar 2024 11:18:44 +0000 Subject: [PATCH 2/2] ci: version bump to 1.0.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1431835..f060982 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dxfrontier/cds-ts-dispatcher", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dxfrontier/cds-ts-dispatcher", - "version": "1.0.3", + "version": "1.0.4", "license": "MIT", "workspaces": [ "./test/bookshop" diff --git a/package.json b/package.json index cdb7420..eb68bfc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dxfrontier/cds-ts-dispatcher", - "version": "1.0.3", + "version": "1.0.4", "description": "The goal of CDS-TS-Dispatcher is to significantly reduce the boilerplate code required to implement TS handlers provided by the SAP CAP framework.", "main": "./dist/index.js", "module": "./dist/index.mjs",