Update dotnet new umbraco-extension template with newer @hey-api/openapi-ts (#19825)

* Updated hey-api as the client-fetch is bundled as part of @hey-api/openapi-ts in newer versions

* Regenerated a new package-lock.json file

* Fix typescript issue

* Update templates/UmbracoExtension/Client/package.json

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Updated client dependencies

* Vite, TypeScript, hey-api
* Chalk & Cross-Env for the generate-client script

* Explicitly remove package-lock.json as it will be out of sync due to UMBRACO_VERSION_FROM_TEMPLATE

* Regenerated Hey API client that now ships client rather than dependancy

* Vite and Hey-API were already out of date (updated to the very latest)

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
This commit is contained in:
Warren Buckley
2025-08-20 07:04:17 +01:00
committed by GitHub
parent 1c157b2910
commit 4852e49041
15 changed files with 1497 additions and 42 deletions

View File

@@ -32,18 +32,15 @@ fetch(swaggerUrl).then(async (response) => {
console.log(`Calling ${chalk.yellow('hey-api')} to generate TypeScript client`);
await createClient({
client: '@hey-api/client-fetch',
input: swaggerUrl,
output: 'src/api',
plugins: [
...defaultPlugins,
'@hey-api/client-fetch',
{
name: '@hey-api/typescript',
enums: 'typescript'
},
{
name: '@hey-api/sdk',
asClass: true
asClass: true,
classNameBuilder: '{{name}}Service',
}
],
});