From e1a8a802723b585a9ef1a4eaece11ee4f55dcb98 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 3 May 2024 12:53:44 +0200 Subject: [PATCH] update typescript openapi generator --- frontend/package-lock.json | 46 +++++++++++++++++----------------- frontend/package.json | 4 +-- typescript-client/build.jsr.sh | 2 +- typescript-client/build.sh | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index b41ec6d12e..1bcd6fbc83 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -62,7 +62,7 @@ }, "devDependencies": { "@floating-ui/core": "^1.3.1", - "@hey-api/openapi-ts": "^0.40.0", + "@hey-api/openapi-ts": "^0.43.0", "@playwright/test": "^1.34.3", "@rgossiaux/svelte-headlessui": "^2.0.0", "@sveltejs/adapter-static": "^3.0.0", @@ -151,6 +151,23 @@ "node": ">=6.0.0" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "11.6.1", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.6.1.tgz", + "integrity": "sha512-DxjgKBCoyReu4p5HMvpmgSOfRhhBcuf5V5soDDRgOTZMwsA4KSFzol1abFZgiCTE11L2kKGca5Md9GwDdXVBwQ==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, "node_modules/@aws-crypto/sha256-js": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-4.0.0.tgz", @@ -951,19 +968,19 @@ "dev": true }, "node_modules/@hey-api/openapi-ts": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.40.0.tgz", - "integrity": "sha512-v2d8PkLaDq80uQdTMlDpqdj8G0uJYs8CGtfWxrC/TSbjDJcT0O0Vzd3cBepJAYKCo+v2tgKF8/HyuJkh9EkXsw==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.43.0.tgz", + "integrity": "sha512-Qq3bcy579T+8hhhaSW7MuFgvD07tl8njiFh8/mTYGXerBjoWxAn2ygkV+yE+RKY0eMvSmeH2+9yEAsrVrh5Hjw==", "dev": true, "dependencies": { - "@apidevtools/json-schema-ref-parser": "11.5.4", + "@apidevtools/json-schema-ref-parser": "11.6.1", "c12": "1.10.0", "camelcase": "8.0.0", "commander": "12.0.0", "handlebars": "4.7.8" }, "bin": { - "openapi-ts": "bin/index.js" + "openapi-ts": "bin/index.cjs" }, "engines": { "node": "^18.0.0 || >=20.0.0" @@ -972,23 +989,6 @@ "typescript": "^5.x" } }, - "node_modules/@hey-api/openapi-ts/node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.5.4", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.5.4.tgz", - "integrity": "sha512-o2fsypTGU0WxRxbax8zQoHiIB4dyrkwYfcm8TxZ+bx9pCzcWZbQtiMqpgBvWA/nJ2TrGjK5adCLfTH8wUeU/Wg==", - "dev": true, - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.15", - "js-yaml": "^4.1.0" - }, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/philsturgeon" - } - }, "node_modules/@hey-api/openapi-ts/node_modules/camelcase": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index b37b3ff918..038790f4e3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@floating-ui/core": "^1.3.1", - "@hey-api/openapi-ts": "^0.40.0", + "@hey-api/openapi-ts": "^0.43.0", "@playwright/test": "^1.34.3", "@rgossiaux/svelte-headlessui": "^2.0.0", "@sveltejs/adapter-static": "^3.0.0", @@ -418,4 +418,4 @@ "optionalDependencies": { "fsevents": "^2.3.3" } -} \ No newline at end of file +} diff --git a/typescript-client/build.jsr.sh b/typescript-client/build.jsr.sh index a268e97162..ef1330f336 100755 --- a/typescript-client/build.jsr.sh +++ b/typescript-client/build.jsr.sh @@ -4,7 +4,7 @@ script_dirpath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" rm -rf "${script_dirpath}/dist" -npx --yes @hey-api/openapi-ts --input "${script_dirpath}/../backend/windmill-api/openapi.yaml" --output "${script_dirpath}/src" --useOptions --schemas false +npx --yes @hey-api/openapi-ts@0.43.0 --input "${script_dirpath}/../backend/windmill-api/openapi.yaml" --output "${script_dirpath}/src" --useOptions --schemas false # Add explicit type as it's missing in the client source code. This will be unnecessary in newer openapi-ts versions sed -i 's/get \[Symbol\.toStringTag\]() {/get \[Symbol\.toStringTag\]() : string {/g' "${script_dirpath}/src/core/CancelablePromise.ts" diff --git a/typescript-client/build.sh b/typescript-client/build.sh index d8632e32d0..9893ccb650 100755 --- a/typescript-client/build.sh +++ b/typescript-client/build.sh @@ -4,7 +4,7 @@ script_dirpath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" rm -rf "${script_dirpath}/src" -npx --yes @hey-api/openapi-ts --input "${script_dirpath}/../backend/windmill-api/openapi.yaml" --output "${script_dirpath}/src" --useOptions +npx --yes @hey-api/openapi-ts@0.43.0 --input "${script_dirpath}/../backend/windmill-api/openapi.yaml" --output "${script_dirpath}/src" --useOptions cp "${script_dirpath}/client.ts" "${script_dirpath}/src/" cp "${script_dirpath}/s3Types.ts" "${script_dirpath}/src/"