Add linting on hosting

This commit is contained in:
Adrià Navarro Redó
2026-03-26 12:12:35 +01:00
parent bb806f52c7
commit 05dacbf049
5 changed files with 13 additions and 9 deletions
-1
View File
@@ -16,7 +16,6 @@ packages/worker/src/constants/templates/tests/
.github
.vscode
examples
hosting
i18n
/.nx/cache
/.nx/workspace-data
+1 -3
View File
@@ -52,9 +52,7 @@ export async function init(opts: any) {
const message = isSingle
? "This will create a single-image docker-compose.yaml in current directory, should continue?"
: "This will create multiple files in current directory, should continue?"
const shouldContinue = await confirmation(
message
)
const shouldContinue = await confirmation(message)
if (!shouldContinue) {
console.log("Stopping.")
return
+8 -2
View File
@@ -29,10 +29,16 @@ function isSingleComposeServiceList(services: Record<string, unknown>) {
export async function update(opts?: unknown) {
const { services } = getServices(COMPOSE_PATH)
const singleFlag =
typeof opts === "object" && opts != null && "single" in opts && !!opts.single
typeof opts === "object" &&
opts != null &&
"single" in opts &&
!!opts.single
const isSingle = singleFlag || isSingleComposeServiceList(services)
if (singleFlag && !Object.prototype.hasOwnProperty.call(services, "budibase")) {
if (
singleFlag &&
!Object.prototype.hasOwnProperty.call(services, "budibase")
) {
throw "Unable to run single-image update: no 'budibase' service found in docker-compose.yaml."
}
+1 -2
View File
@@ -30,8 +30,7 @@ export const API = createAPIClient({
const embedLocation = window["##BUDIBASE_EMBED_LOCATION##"]
if (appData.embedded || embedLocation) {
headers["x-budibase-embed-location"] =
embedLocation ||
window.location.pathname
embedLocation || window.location.pathname
}
// Attach client header if not inside the builder preview
+3 -1
View File
@@ -180,7 +180,9 @@ const normalizeRoutePath = (path: string) => {
return "/"
}
const [pathname = "/", query = ""] = path.split("?")
const normalizedPathname = pathname.startsWith("/") ? pathname : `/${pathname}`
const normalizedPathname = pathname.startsWith("/")
? pathname
: `/${pathname}`
if (!query) {
return normalizedPathname
}