-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3731 from mercedes-benz/develop
Merge `develop` into `master` for wrapper release
- Loading branch information
Showing
40 changed files
with
645 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
// HOST represents the URL of the API client. In this case, it's the URL of the SPA because we proxy API requests to the backend to sidestep any CORS issues. | ||
"HOST": "https://localhost", | ||
"LOCAL_DEV": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This .env file contains the default environment variables | ||
# For local development, create an .env.local file with the desired variable values | ||
# Note: .env.local will be ignored by git | ||
# Local development variables must start with VITE_API | ||
VITE_API_HOST=http://localhost:3000 | ||
|
||
# Optional variables needed for testing with SecHub Server Basic Auth | ||
VITE_API_LOCAL_DEV=false | ||
VITE_API_USER='example-test-user' | ||
VITE_API_PASSWORD='example-api-token' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
export const CONFIG = { | ||
HOST: String(import.meta.env.SECHUB_HOST) || '', | ||
|
||
import { ref } from 'vue' | ||
|
||
const config = ref({ | ||
// New ENV must be defined in global.d.ts | ||
HOST: String(import.meta.env.VITE_API_HOST) || '', | ||
USERNAME: String(import.meta.env.VITE_API_USER) || '', | ||
PASSWORD: String(import.meta.env.VITE_API_PASSWORD) || '', | ||
LOCAL_DEV: String(import.meta.env.VITE_API_LOCAL_DEV) || '', | ||
}) | ||
|
||
// Overrides local environment variables after project compilation | ||
// Utilizes variables from config.json if available | ||
export async function loadConfig () { | ||
try { | ||
const response = await fetch('/config.json') | ||
const runtimeConfig = await response.json() | ||
config.value = { ...config.value, ...runtimeConfig } | ||
} catch (error) { | ||
console.error('Failed to load configuration, using fallback in .env:', error) | ||
} | ||
} | ||
|
||
export function useConfig () { | ||
return config | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.