Files
Umbraco-CMS/.vscode/launch.json

128 lines
4.0 KiB
JSON
Raw Normal View History

.NETCore & SQL Docker Image for Container Isolated Development & GitHub CodeSpaces (#9835) * .NETCore & SQL Docker Image https://github.com/microsoft/vscode-dev-containers/tree/master/containers/dotnet-mssql * Set the C# extension aka Omnisharp to use the umbraco-netcore-only.sln * A new script in the postCreate of the docker image to npm install client stuff and initial dotnet build of SLN to help just running straight away * Remove bash script - doing npm install stuff & dotnet build was hard to see log output and taking longer for image to start * Adds in port 9000 and friendly label * Ensure user notified about auto port forward with notification * Comment out image min of assets as causing problems and eating way too much time up atm - need to revisit * Automated launch & tasks VSCode JSON files - updated to run client npm install and npm run build before running website * Update .gitattributes for line ending help for codespaces https://code.visualstudio.com/docs/remote/troubleshooting#_resolving-git-line-ending-issues-in-containers-resulting-in-many-modified-files * Tidy up * Remove npm install from the npm run build step - kinda annoying when you re-run it * Rather everytime attaching the debugger doing a full npm install, gulp dev and dotnet build is overkill, just build the SLN before debugging * Update gitignore with casing rules * Revert "Update .gitattributes for line ending help for codespaces" This reverts commit 28316d1ba8a552751eef2f211b68531484344153. * Sets the global user for npm as root https://stackoverflow.com/a/45505787 * File permission stuff for NPM & Gifsicle binary source compilation from gulp-imagemin * Revert "Comment out image min of assets as causing problems and eating way too much time up atm - need to revisit" This reverts commit be48db9653bc58a69422d131b65955985e115e29. * Add chromium-browser to try & get JS tests to run happy in CodeSpaces * Set DB connection string & unattended install config to true so we can skip installer flow * Add in ENV variables to setup the unattended install user * Try to add SMTP4Dev from Bjarke Recommendation * Need to specify the port mappings for SMTP4Dev * Lovely syntax error in docker compose file * Update ENV variables to renamed settings now this feature merged into NETCore branch by Bjarke * Needed to match the hostname that SMTP4Dev was listening on, had assumed it would be reachable via localhost * Fix folder naminng to make UNIX happy running JS tests Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-06-07 12:23:15 +01:00
{
"version": "0.2.0",
"compounds": [
{
"name": "Backoffice Launch (Vite + .NET Core)",
"configurations": [
"Backoffice Launch Vite (Chrome)",
".NET Core Serve with External Auth (web)"
],
"stopAll": true,
"presentation": {
"group": "1"
}
}
],
"configurations": [
{
"name": "Backoffice Launch Vite (Chrome)",
"request": "launch",
"env": {
"VITE_UMBRACO_USE_MSW": "${input:AskForMockServer}"
},
"runtimeExecutable": "npx",
"runtimeArgs": ["vite"],
"type": "node",
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI.Client",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"smartStep": true,
"autoAttachChildProcesses": true,
"serverReadyAction": {
"killOnServerStop": true,
"action": "debugWithChrome",
"pattern": "Local: http://localhost:([0-9]+)",
"uriFormat": "http://localhost:%s",
"webRoot": "${workspaceFolder}/src/Umbraco.Web.UI.Client"
},
"presentation": {
"group": "2"
}
},
{
"name": "Backoffice Attach Vite (Chrome)",
"request": "launch",
"type": "chrome",
"smartStep": true,
"url": "http://localhost:5173/",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"webRoot": "${workspaceFolder}/src/Umbraco.Web.UI.Client",
"presentation": {
"group": "2"
}
},
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run"],
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
"stopAtEntry": false,
"requireExactSource": false,
V16: Retry requests after timeout (#19495) * feat: fix a small-ish nitpick where extensions would reload after login this could potentially try to re-register all private extensions after each auth signal, which is being prevented anyway because of duplicate aliases, but still nice to remove and not have to listen to * feat: align login UI extension load with backoffice, i.e. wait for external load before registering core extensions * build(deps): bump @hey-api to newest and re-generate client * chore: adds extra error logging * feat: adds retry logic to the api interceptor * feat: warn about incomplete actions * fix: the body was already plain text, but we need to ensure the headers say so as well * feat: warns the user when actions could not be completed * build(deps): update @hey-api/client-fetch * chore: generate new api * feat: simplify error handling to just UmbApiError and UmbCancelError * feat: moves error notifications from interceptors into tryExecute, so you more easily can opt out of it and everything is gathered in one place * feat: recreate responses with correct 'status' and 'statusText' * build: stop dotnet processes after debug session * feat: extrapolate common logic into helper method to create responses * feat: returns a UmbProblemDetails like object on interceptors to be handled by tryExecute * chore: deprecates duplicate, outdated UmbProblemDetails interface and type guard * feat: uses the 'title' of the problem details object to convey the main message * chore: 401 and 403 uses their own interceptors * feat: show no notification if 401 * feat: uses the real request method and url (instead of the template placeholders) to tell the user what did not succeed * feat: retry requests with no timeout/race * feat: throttle and delay signals and disallow them from being updated from the outside * chore: adds more logging to timeouts * chore: optimise imports * test: ignores any test files left in node_modules folder * feat: uses auditTime to wait a bit before showing the timeout screen * feat: adds 404 handling to error interceptor * chore: cleans up after response modification * feat: preserve only a few headers this mimicks the v15 behavior * feat: lets the UI handle 404 errors instead of notifying directly * test: uses create action menu option instead to find the correct locator, and skips a seemingly unnecessary timeout
2025-06-12 13:24:11 +02:00
"postDebugTask": "kill-umbraco-web-ui",
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\\\bNow listening on:\\\\s+(https?://\\\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Umbraco.Web.UI/Views"
},
"presentation": {
"group": "3"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}",
"presentation": {
"group": "3"
}
},
{
"name": ".NET Core Serve with External Auth (web)",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": ["run"],
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
"stopAtEntry": false,
"requireExactSource": false,
"checkForDevCert": true,
V16: Retry requests after timeout (#19495) * feat: fix a small-ish nitpick where extensions would reload after login this could potentially try to re-register all private extensions after each auth signal, which is being prevented anyway because of duplicate aliases, but still nice to remove and not have to listen to * feat: align login UI extension load with backoffice, i.e. wait for external load before registering core extensions * build(deps): bump @hey-api to newest and re-generate client * chore: adds extra error logging * feat: adds retry logic to the api interceptor * feat: warn about incomplete actions * fix: the body was already plain text, but we need to ensure the headers say so as well * feat: warns the user when actions could not be completed * build(deps): update @hey-api/client-fetch * chore: generate new api * feat: simplify error handling to just UmbApiError and UmbCancelError * feat: moves error notifications from interceptors into tryExecute, so you more easily can opt out of it and everything is gathered in one place * feat: recreate responses with correct 'status' and 'statusText' * build: stop dotnet processes after debug session * feat: extrapolate common logic into helper method to create responses * feat: returns a UmbProblemDetails like object on interceptors to be handled by tryExecute * chore: deprecates duplicate, outdated UmbProblemDetails interface and type guard * feat: uses the 'title' of the problem details object to convey the main message * chore: 401 and 403 uses their own interceptors * feat: show no notification if 401 * feat: uses the real request method and url (instead of the template placeholders) to tell the user what did not succeed * feat: retry requests with no timeout/race * feat: throttle and delay signals and disallow them from being updated from the outside * chore: adds more logging to timeouts * chore: optimise imports * test: ignores any test files left in node_modules folder * feat: uses auditTime to wait a bit before showing the timeout screen * feat: adds 404 handling to error interceptor * chore: cleans up after response modification * feat: preserve only a few headers this mimicks the v15 behavior * feat: lets the UI handle 404 errors instead of notifying directly * test: uses create action menu option instead to find the correct locator, and skips a seemingly unnecessary timeout
2025-06-12 13:24:11 +02:00
"postDebugTask": "kill-umbraco-web-ui",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_URLS": "https://localhost:44339",
"UMBRACO__CMS__SECURITY__BACKOFFICEHOST": "http://localhost:5173",
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKPATHNAME": "/oauth_complete",
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKLOGOUTPATHNAME": "/logout",
Move access/refresh tokens to secure cookies (V17) (#20820) * Move access/refresh tokens to secure cookies (#20779) * feat: adds the `credentials: include` header to all manual requests * feat: adds `credentials: include` as a configurable option to xhr requests (and sets it by default to true) * feat: configures the auto-generated fetch client from hey-api to include credentials by default * Add OpenIddict handler to hide tokens from the back-office client * Make back-office token redaction optional (default false) * Clear back-office token cookies on logout * Add configuration for backoffice cookie settings * Make cookies forcefully secure + move cookie handler enabling to the BackOfficeTokenCookieSettings * Use the "__Host-" prefix for cookie names * docs: adds documentation on cookie settings * build: sets up launch profile for vscode with new cookie recommended settings * docs: adds extra note around SameSite settings * docs: adds extra note around SameSite settings * Respect sites that do not use HTTPS * Explicitly invalidate potentially valid, old refresh tokens that should no longer be used * Removed obsolete const --------- Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> * Remove configuration option * Invalidate all existing access tokens on upgrade * docs: updates recommended settings for development * build: removes non-existing variable * Skip flaky test * Bumped version of our test helpers to fix failing tests --------- Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-11-14 17:10:57 +01:00
"UMBRACO__CMS__SECURITY__AUTHORIZECALLBACKERRORPATHNAME": "/error",
"UMBRACO__CMS__SECURITY__KEEPUSERLOGGEDIN": "true",
"UMBRACO__CMS__SECURITY__BACKOFFICETOKENCOOKIE__SAMESITE": "None"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Umbraco.Web.UI/Views"
},
"presentation": {
"group": "3"
}
}
],
"inputs": [
{
"id": "AskForMockServer",
"type": "promptString",
"description": "Use Mock Service Worker (MSW) for Backoffice API calls (off requires a running server)?",
"default": "off"
}
]
}