-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix UI failing silently if init package is not found (#1014)
## Description Fixes UI failing silently if init package is not found. It is worth noting that this PR introduces some basic JSON error messaging to the API + JSON error message handling in the UI's `http.ts`. ## Related Issue <!--- This project prefers to accept pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> Fixes #1013 ## Type of change <!-- Please delete options that are not relevant --> - [X] Bug fix (non-breaking change which fixes an issue)
- Loading branch information
Showing
5 changed files
with
99 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /usr/bin/env sh | ||
# This script is called during `npm run dev` | ||
# It is used to start the Sveltekit frontend + Go Chi backend | ||
# It also injects the current CLI dev version similar to how the Makefile does | ||
|
||
CLI_VERSION=$(git describe --tags --always) | ||
BUILD_ARGS="-s -w -X 'github.com/defenseunicorns/zarf/src/config.CLIVersion=$CLI_VERSION'" | ||
|
||
API_DEV_PORT=5173 \ | ||
API_PORT=3333 \ | ||
API_TOKEN=insecure \ | ||
concurrently --names "ui,api" \ | ||
-c "gray.bold,yellow" \ | ||
"vite dev" \ | ||
"nodemon -e go -x 'go run -ldflags=\"$BUILD_ARGS\" main.go dev ui -l=trace || exit 1'" |
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