From b92bc9eebb8b665ac15082ed297ce46c3ce71911 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 2 May 2022 13:00:13 +0200 Subject: [PATCH] fix: build image --- src/lib/buildPacks/common.ts | 21 ++++++++++++++------- src/lib/store.ts | 5 +++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/lib/buildPacks/common.ts b/src/lib/buildPacks/common.ts index d9f3416b9..6ac518136 100644 --- a/src/lib/buildPacks/common.ts +++ b/src/lib/buildPacks/common.ts @@ -6,7 +6,17 @@ import { promises as fs } from 'fs'; import { staticDeployments } from '$lib/components/common'; const staticApps = ['static', 'react', 'vuejs', 'svelte', 'gatsby', 'astro', 'eleventy']; -const nodeBased = ['react', 'vuejs', 'svelte', 'gatsby', 'php', 'astro', 'eleventy', 'node']; +const nodeBased = [ + 'react', + 'vuejs', + 'svelte', + 'gatsby', + 'php', + 'astro', + 'eleventy', + 'node', + 'nestjs' +]; export function makeLabelForStandaloneApplication({ applicationId, @@ -393,12 +403,7 @@ export function setDefaultBaseImage(buildPack) { label: 'webdevops/php-nginx:7.1-alpine' } ]; - const laravelVersions = [ - { - value: 'webdevops/php-apache:8.0-alpine', - label: 'webdevops/php-apache:8.0-alpine' - } - ]; + let payload = { baseImage: null, baseBuildImage: null, @@ -408,6 +413,8 @@ export function setDefaultBaseImage(buildPack) { if (nodeBased.includes(buildPack)) { payload.baseImage = 'node:lts'; payload.baseImages = nodeVersions; + payload.baseBuildImage = 'node:lts'; + payload.baseBuildImages = nodeVersions; } if (staticApps.includes(buildPack)) { payload.baseImage = 'webdevops/nginx:alpine'; diff --git a/src/lib/store.ts b/src/lib/store.ts index 094dd756a..684922bfb 100644 --- a/src/lib/store.ts +++ b/src/lib/store.ts @@ -1,3 +1,4 @@ +import { browser } from '$app/env'; import { writable, type Writable, type Readable, readable } from 'svelte/store'; export const gitTokens: Writable<{ githubToken: string | null; gitlabToken: string | null }> = @@ -8,6 +9,6 @@ export const gitTokens: Writable<{ githubToken: string | null; gitlabToken: stri export const disabledButton: Writable = writable(false); export const features: Readable<{ latestVersion: string; beta: boolean }> = readable({ - beta: window.localStorage.getItem('beta') === 'true', - latestVersion: window.localStorage.getItem('latestVersion') + beta: browser && window.localStorage.getItem('beta') === 'true', + latestVersion: browser && window.localStorage.getItem('latestVersion') });