extend the runtime status with more modes
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# Copy this to .env.local and change what you want to test.
|
||||
VITE_UMBRACO_INSTALL_STATUS=true
|
||||
VITE_UMBRACO_INSTALL_STATUS=running # running or must-install or must-upgrade
|
||||
VITE_UMBRACO_INSTALL_PRECONFIGURED=false
|
||||
|
||||
@@ -8,7 +8,7 @@ export const handlers = [
|
||||
// Respond with a 200 status code
|
||||
ctx.status(200),
|
||||
ctx.json<StatusResponse>({
|
||||
serverStatus: import.meta.env.VITE_UMBRACO_INSTALL_STATUS !== 'false' ? 'running' : 'must-install',
|
||||
serverStatus: import.meta.env.VITE_UMBRACO_INSTALL_STATUS,
|
||||
})
|
||||
);
|
||||
}),
|
||||
|
||||
2
src/Umbraco.Web.UI.Client/src/vite-env.d.ts
vendored
2
src/Umbraco.Web.UI.Client/src/vite-env.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
/// <reference types="vite/client" />
|
||||
interface ImportMetaEnv {
|
||||
VITE_UMBRACO_INSTALL_STATUS: string;
|
||||
VITE_UMBRACO_INSTALL_STATUS: 'running' | 'must-upgrade' | 'must-install';
|
||||
VITE_UMBRACO_INSTALL_PRECONFIGURED: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user