Commit Graph

7 Commits

Author SHA1 Message Date
Jacob Overgaard
1bd9583cf1 V16: Bump @hey-api/openapi-ts to 0.81.1 (#19982)
* build(deps): bump @hey-api/openapi-ts to 0.81.1 and pin the version to ensure compatibility between backoffice and extensions

* chore: regenerate api types and replace where necessary

* feat: pin version of @hey-api/openapi-ts and regenerate umbraco-extension files

* chore: removes unused 'client' field

* build(deps-dev): bump @hey-api/openapi-ts to 0.81.1 for the login app
2025-08-26 12:40:06 +01:00
Warren Buckley
4852e49041 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>
2025-08-20 08:04:17 +02:00
Richard Ockerby
ba6a0fcfe0 Update references to Umbraco User model (Extension Template) (#19349)
Update references to Umbraco User model

In the template dashboard, update the type reference for the umbraco user
2025-05-30 14:31:17 +02:00
Jacob Overgaard
95bfee7c63 V16 RC: getOpenApiConfiguration().token does not work (#19217) 2025-05-06 08:43:10 +01:00
Jacob Overgaard
df6a88b4d5 V15: Enable umbraco-extension client to auto-build (#18597)
* feat: adds autobuild of umbraco extensions created by the dotnet template

* adds file extensions to imports to follow the esmodule convention + apply formatting

* build(deps): upgrade hey-api, vite, typescript and generate new api

* chore: formatting

* clean up actions as client is now automatically being built when starting the site

* revert change with UMBRACO_VERSION_FROM_TEMPLATE

* revert if(includeExample)

* use template name

* use template name

* feat: update the way it sets the auth token

* add back in IncludeExample if

* fix: rename allowPackageTelemetry to allowTelemetry because that is what it is actually called

* `.csproj` amends

- Adds `BeforeTargets` to "BuildClient" target
- Adds "package.json" to "RestoreClient" target input
- Removes extra parameters from `npm i` command

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-03-11 16:14:47 +00:00
Jesper Mayntzhusen
d5a674271c Update README.txt
Fixed broken link
2024-11-28 14:31:59 +01:00
Warren Buckley
2f4b198ad3 [V15] Updated dotnet template for Umbraco Packages with Bellisima (#17108)
* [WIP] Create Umbraco/Bellissima Package

* Removes existing 'UmbracoPackage'

This is because the RCL based one will be the only one going forward

* Rename existing UmbracoPackageRCL to UmbracoPackage

* Drop the mentions of RCL in the identifiers

* CodeQL GitHub Action is complaining due to V15 wanting v9 .NET

* Rename UmbracoPackage template to UmbracoExtension

As this will only scaffold an extension and not other bits for a package such as Nuget, Github Actions & other things needed to be done to ship out a package

* Remove package lock as npm install by the OS should generate this and can differ between Windows, Linux/OSX

* Move JS clientside stuff into a folder called Client

Will allow us to ignore the folder if or when doing a dotnet pack with a rule in CSProj

* Add in .VSCode recommened extensions file to get the useful Lit Extension for completions in VSCode

* For now remove the example dashboard & prop editor

* Add a simple entrypoint

* Fix path for primary output after rename

* Use link suggested from Lotte

* Use backofficeEntryPoint as entryPoint is deprecated

* Update the umbraco-package.json to opt into telemetry as per PR suggestion

* Improve commented code to include a link to docs

* Improve readme from suggestions

* Updates package.json to use latest Vite & TS

Copies the tsconfig from the default scaffolding of vite lit-ts CLI

* Adds the base property suggestion from Jacob & puts in a comment as to what its used for

* Work in progress from hackathon day/afternoon

* Hey-API generating a HTTP Client had changed and was a PITA to figure out what had changed

Things to do for next time:
Include these files if they include --include-samples flag

* constants.ts
* Controllers/
* Composers/
* client/src/api
* client/src/dashboards/
* client/src/entrypoints

Change file contents
* client/src/bundle.manifests.ts
* client/src/package.json (extra dependencies)

* Adds in new property/flag/switch for dotnet new template

* Warren cant spell Whether 🙈

* Update template.json to exclude the sample files if flag is not set/false

* Make SLN happy/build

* Conditional content in files for IncludeExample flag/switch

* Need to include the content otherwise it doesnt get packed by nuget

* Fix the path for the openapi-ts-config.ts file to be included/excluded

* Use the project name from the dotnet new to help name manifests

* Update namespaces so they get updated when dotnet new templatge is run with the --name

* Updated example

* Fix up VS Code recommended extension for Lit VSCode

Should be .json not a .ts

* Fix up build - as we dont use the imported UmbCurrentUserContext

* Remove the relative path to the JSON schema as unable to know path to the web project

* Typo fix as spooted by Rich

* Update templates/UmbracoExtension/.template.config/template.json

Co-authored-by: Lotte Pitcher <LottePitcher@users.noreply.github.com>

* Adds a --site-domain flag/switch to use for setting the domain prefix

Sets a default value of https://localhost:5000
We have no way of knowing what URL/domain the site is running at for the Umbraco website project

* Rename stuff so its not 'example' & only have ping if include-examples is not set

* As agreed with Lotte makes sense we always generate OpenAPI & TS client

* Update umbraco-extension description

* Generic node script to generate the TS client

Checks if it can connect to it first and prompts user to ensure Umbraco site running or perhaps they need to change the URL in package.json for the node script

* Generated API has conditional stuff in now to have just Ping or the more examples based on switch/flag

* Adds symbols safeNamespace and safeName

safeNamespace uses the one built in and then safeName, depends on the cleaned namespace to then use a custom transform (forms) to then use a regex replace on . and _ to ensure we have a nicer name still for namespaces, class names, URL/routes for the swagger etc...

* change to use Umbraco.Extension as sourcename - check \.template.config\readme.md for 'placeholder' guidance

* use '-sd' as shortname for site-domain as otherwise shows up as '-p:d'

* fix typescript build error  when not including examples

* use provided name for API description as always being added

* Missing renames of Contrioller stuff with Lotte @ hackathon

* We missed the ctor

* Titlecase the API URLs for Swagger/API Controller

* dashboard tweaks

* Missing [Server] on Whats the Time Modal/UUI-box

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Lotte Pitcher <LottePitcher@users.noreply.github.com>
Co-authored-by: Lotte Pitcher <github@lottepitcher.co.uk>
2024-11-08 06:55:43 +00:00