From 73e55326bd9f427bd3e390f97ca86be776ab2b02 Mon Sep 17 00:00:00 2001 From: Martin Sosic Date: Thu, 24 Oct 2024 20:15:25 +0200 Subject: [PATCH 1/2] Added note to pass the client vars to client deploy fly command on every deploy. Co-authored-by: Cameron Blackwood <38852603+Reikon95@users.noreply.github.com> --- web/docs/advanced/deployment/cli.md | 2 ++ web/versioned_docs/version-0.15.0/advanced/deployment/cli.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/web/docs/advanced/deployment/cli.md b/web/docs/advanced/deployment/cli.md index 52eb80dbc6..42b028b03c 100644 --- a/web/docs/advanced/deployment/cli.md +++ b/web/docs/advanced/deployment/cli.md @@ -277,6 +277,8 @@ or REACT_APP_ANOTHER_VAR=somevalue wasp deploy fly deploy ``` +Please note, you should do this for every deployment, not just the first time you set up the variables! + ### Fly.io Regions > Fly.io runs applications physically close to users: in datacenters around the world, on servers we run ourselves. You can currently deploy your apps in 34 regions, connected to a global Anycast network that makes sure your users hit our nearest server, whether they’re in Tokyo, São Paolo, or Frankfurt. diff --git a/web/versioned_docs/version-0.15.0/advanced/deployment/cli.md b/web/versioned_docs/version-0.15.0/advanced/deployment/cli.md index 52eb80dbc6..42b028b03c 100644 --- a/web/versioned_docs/version-0.15.0/advanced/deployment/cli.md +++ b/web/versioned_docs/version-0.15.0/advanced/deployment/cli.md @@ -277,6 +277,8 @@ or REACT_APP_ANOTHER_VAR=somevalue wasp deploy fly deploy ``` +Please note, you should do this for every deployment, not just the first time you set up the variables! + ### Fly.io Regions > Fly.io runs applications physically close to users: in datacenters around the world, on servers we run ourselves. You can currently deploy your apps in 34 regions, connected to a global Anycast network that makes sure your users hit our nearest server, whether they’re in Tokyo, São Paolo, or Frankfurt. From c350cbe6e41a20930fcd6aca134d540580466398 Mon Sep 17 00:00:00 2001 From: Mihovil Ilakovac Date: Tue, 29 Oct 2024 00:17:54 +0100 Subject: [PATCH 2/2] Update tsconfig.json validation messages (#2322) --- .../Wasp/Generator/ExternalConfig/TsConfig.hs | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/waspc/src/Wasp/Generator/ExternalConfig/TsConfig.hs b/waspc/src/Wasp/Generator/ExternalConfig/TsConfig.hs index 8d3612f807..7f1ef46628 100644 --- a/waspc/src/Wasp/Generator/ExternalConfig/TsConfig.hs +++ b/waspc/src/Wasp/Generator/ExternalConfig/TsConfig.hs @@ -5,6 +5,7 @@ module Wasp.Generator.ExternalConfig.TsConfig ) where +import Data.List (intercalate) import qualified Wasp.ExternalConfig.TsConfig as T import Wasp.Generator.ExternalConfig.Common (ErrorMsg) @@ -21,7 +22,15 @@ instance IsJavascriptValue Bool where showAsJsValue True = "true" showAsJsValue False = "false" -type FieldName = String +-- | Represents a fully qualified field name in a JSON object. +-- For example, for the field "module" in the "compilerOptions" object, +-- the fully qualified field name would be "compilerOptions.module". +data FullyQualifiedFieldName = FieldName FieldPath + +type FieldPath = [String] + +instance Show FullyQualifiedFieldName where + show (FieldName fieldPath) = intercalate "." fieldPath validateSrcTsConfig :: T.TsConfig -> [ErrorMsg] validateSrcTsConfig tsConfig = @@ -38,22 +47,23 @@ validateSrcTsConfig tsConfig = validateRequiredFieldInCompilerOptions "outDir" ".wasp/phantom" T.outDir ] where - validateRequiredFieldInCompilerOptions fieldName expectedValue getFieldValue = case getFieldValue compilerOptionsFields of - Just actualValue -> validateFieldValue ("compilerOptions." ++ fieldName) expectedValue actualValue + validateRequiredFieldInCompilerOptions fieldName expectedValue getFieldValue = case fieldValue of + Just actualValue -> validateFieldValue fullyQualifiedFieldName expectedValue actualValue Nothing -> [missingFieldErrorMessage] where + fieldValue = getFieldValue $ T.compilerOptions tsConfig + fullyQualifiedFieldName = FieldName ["compilerOptions", fieldName] + missingFieldErrorMessage = unwords [ "The", - show fieldName, - "field is missing in tsconfig.json. Expected value:", + "\"" ++ show fullyQualifiedFieldName ++ "\"", + "field is missing in tsconfig.json, expected value:", showAsJsValue expectedValue ++ "." ] - compilerOptionsFields = T.compilerOptions tsConfig - - validateFieldValue :: (Eq value, IsJavascriptValue value) => FieldName -> value -> value -> [String] - validateFieldValue fieldName expectedValue actualValue = + validateFieldValue :: (Eq value, IsJavascriptValue value) => FullyQualifiedFieldName -> value -> value -> [String] + validateFieldValue fullyQualifiedFieldName expectedValue actualValue = if actualValue == expectedValue then [] else [invalidValueErrorMessage] @@ -61,7 +71,7 @@ validateSrcTsConfig tsConfig = invalidValueErrorMessage = unwords [ "Invalid value for the", - show fieldName, - "field in tsconfig.json file, expected value:", + "\"" ++ show fullyQualifiedFieldName ++ "\"", + "field in tsconfig.json, expected value:", showAsJsValue expectedValue ++ "." ]