From 4e09b3427685f60c3119ec3501ff3fd11405c7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 12 Oct 2022 15:28:50 +0200 Subject: [PATCH 01/65] Separate ext code to client and server --- waspc/cli/src/Wasp/Cli/Command/Build.hs | 3 +- waspc/cli/src/Wasp/Cli/Command/Compile.hs | 3 +- .../src/Wasp/Cli/Command/CreateNewProject.hs | 110 +++++++----------- waspc/cli/src/Wasp/Cli/Command/Watch.hs | 3 +- waspc/cli/src/Wasp/Cli/Common.hs | 10 +- .../data/Cli/templates/new/client/.waspignore | 3 + .../templates/new/{ext => client}/Main.css | 0 .../templates/new/{ext => client}/MainPage.js | 0 .../new/{ext => client}/waspLogo.png | Bin .../data/Cli/templates/new/server/.waspignore | 3 + waspc/src/Wasp/AppSpec.hs | 6 +- waspc/src/Wasp/CompileOptions.hs | 3 +- waspc/src/Wasp/Generator/ServerGenerator.hs | 2 +- waspc/src/Wasp/Generator/WebAppGenerator.hs | 2 +- waspc/src/Wasp/Lib.hs | 66 ++++++++--- waspc/test/AppSpec/ValidTest.hs | 5 +- waspc/test/Generator/WebAppGeneratorTest.hs | 5 +- 17 files changed, 123 insertions(+), 101 deletions(-) create mode 100644 waspc/data/Cli/templates/new/client/.waspignore rename waspc/data/Cli/templates/new/{ext => client}/Main.css (100%) rename waspc/data/Cli/templates/new/{ext => client}/MainPage.js (100%) rename waspc/data/Cli/templates/new/{ext => client}/waspLogo.png (100%) create mode 100644 waspc/data/Cli/templates/new/server/.waspignore diff --git a/waspc/cli/src/Wasp/Cli/Command/Build.hs b/waspc/cli/src/Wasp/Cli/Command/Build.hs index 1ba596f618..141d89ea66 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Build.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Build.hs @@ -55,7 +55,8 @@ buildIO waspProjectDir buildDir = compileIOWithOptions options waspProjectDir bu where options = CompileOptions - { externalCodeDirPath = waspProjectDir Common.extCodeDirInWaspProjectDir, + { externalClientCodeDirPath = waspProjectDir Common.extClientCodeDirInWaspProjectDir, + externalServerCodeDirPath = waspProjectDir Common.extServerCodeDirInWaspProjectDir, isBuild = True, sendMessage = cliSendMessage, -- Ignore "DB needs migration warnings" during build, as that is not a required step. diff --git a/waspc/cli/src/Wasp/Cli/Command/Compile.hs b/waspc/cli/src/Wasp/Cli/Command/Compile.hs index c9177705cf..d89cce4909 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Compile.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Compile.hs @@ -73,7 +73,8 @@ compileIOWithOptions options waspProjectDir outDir = do defaultCompileOptions :: Path' Abs (Dir WaspProjectDir) -> CompileOptions defaultCompileOptions waspProjectDir = CompileOptions - { externalCodeDirPath = waspProjectDir Common.extCodeDirInWaspProjectDir, + { externalServerCodeDirPath = waspProjectDir Common.extServerCodeDirInWaspProjectDir, + externalClientCodeDirPath = waspProjectDir Common.extClientCodeDirInWaspProjectDir, isBuild = False, sendMessage = cliSendMessage, generatorWarningsFilter = id diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index af11d6330b..4fa2af8353 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -6,10 +6,9 @@ where import Control.Monad.Except (throwError) import Control.Monad.IO.Class (liftIO) import Data.List (intercalate) -import StrongPath (Abs, Dir, File', Path', Rel, reldir, relfile, ()) +import StrongPath (Abs, Dir, Dir', File', Path', Rel, reldir, relfile, ()) import qualified StrongPath as SP import System.Directory (createDirectory, getCurrentDirectory) -import qualified System.Directory import qualified System.FilePath as FP import Text.Printf (printf) import Wasp.Analyzer.Parser (isValidWaspIdentifier) @@ -17,7 +16,8 @@ import Wasp.AppSpec.ExternalCode (SourceExternalCodeDir) import Wasp.Cli.Command (Command, CommandError (..)) import qualified Wasp.Cli.Command.Common as Command.Common import qualified Wasp.Cli.Common as Common -import qualified Wasp.Data +import qualified Wasp.Data as Data +import Wasp.Generator.FileDraft.WriteableMonad (WriteableMonad (copyDirectoryRecursive)) import Wasp.Util (indent, kebabToCamelCase) import qualified Wasp.Util.Terminal as Term @@ -33,14 +33,14 @@ parseProjectInfo :: String -> Either String ProjectInfo parseProjectInfo name | isValidWaspIdentifier appName = Right (ProjectInfo name appName) | otherwise = - Left $ - intercalate - "\n" - [ "The project's name is not in the valid format!", - indent 2 "- It can start with a letter or an underscore.", - indent 2 "- It can contain only letters, numbers, dashes, or underscores.", - indent 2 "- It can't be a Wasp keyword." - ] + Left $ + intercalate + "\n" + [ "The project's name is not in the valid format!", + indent 2 "- It can start with a letter or an underscore.", + indent 2 "- It can contain only letters, numbers, dashes, or underscores.", + indent 2 "- It can't be a Wasp keyword." + ] where appName = kebabToCamelCase name @@ -72,26 +72,7 @@ createNewProject' (ProjectInfo projectName appName) = do (waspProjectDir Common.dotWaspRootFileInWaspProjectDir) "File marking the root of Wasp project." - let extCodeDir = waspProjectDir Common.extCodeDirInWaspProjectDir - liftIO $ do - createDirectorySP extCodeDir - dataDir <- Wasp.Data.getAbsDataDirPath - - let copyTemplateFile' = copyTemplateFile dataDir extCodeDir - - writeFileSP (extCodeDir waspignoreFileInExtCodeDir) waspignoreFileContent - - copyTemplateFile' - [relfile|new/ext/MainPage.js|] - mainPageJsFileInExtCodeDir - - copyTemplateFile' - [relfile|new/ext/Main.css|] - mainCssFileInExtCodeDir - - copyTemplateFile' - [relfile|new/ext/waspLogo.png|] - waspLogoFileInExtCodeDir + liftIO $ initializeExternalCodeDirs waspProjectDir liftIO $ do putStrLn $ Term.applyStyles [Term.Green] ("Created new Wasp app in ./" ++ projectName ++ " directory!") @@ -102,20 +83,6 @@ createNewProject' (ProjectInfo projectName appName) = do putStrLn "" putStrLn Command.Common.alphaWarningMessage where - copyTemplateFile :: - Path' Abs (Dir Wasp.Data.DataDir) -> - Path' Abs (Dir SourceExternalCodeDir) -> - Path' (Rel Common.CliTemplatesDir) File' -> - Path' (Rel SourceExternalCodeDir) File' -> - IO () - copyTemplateFile dataDir extCodeDir srcTmplFile dstExtDirFile = - System.Directory.copyFile - (SP.fromAbsFile (dataDir cliTemplatesDirInDataDir srcTmplFile)) - (SP.fromAbsFile (extCodeDir dstExtDirFile)) - - cliTemplatesDirInDataDir :: Path' (Rel Wasp.Data.DataDir) (Dir Common.CliTemplatesDir) - cliTemplatesDirInDataDir = [reldir|Cli/templates|] - mainWaspFileInWaspProjectDir :: Path' (Rel Common.WaspProjectDir) File' mainWaspFileInWaspProjectDir = [relfile|main.wasp|] @@ -141,24 +108,35 @@ createNewProject' (ProjectInfo projectName appName) = do "/.env.client" ] - waspignoreFileInExtCodeDir :: Path' (Rel SourceExternalCodeDir) File' - waspignoreFileInExtCodeDir = [relfile|.waspignore|] - - waspignoreFileContent = - unlines - [ "# Ignore editor tmp files", - "**/*~", - "**/#*#" - ] - - mainPageJsFileInExtCodeDir :: Path' (Rel SourceExternalCodeDir) File' - mainPageJsFileInExtCodeDir = [relfile|MainPage.js|] - - mainCssFileInExtCodeDir :: Path' (Rel SourceExternalCodeDir) File' - mainCssFileInExtCodeDir = [relfile|Main.css|] - - waspLogoFileInExtCodeDir :: Path' (Rel SourceExternalCodeDir) File' - waspLogoFileInExtCodeDir = [relfile|waspLogo.png|] - - writeFileSP = writeFile . SP.fromAbsFile - createDirectorySP = createDirectory . SP.fromAbsDir +initializeExternalCodeDirs :: Path' Abs (Dir Common.WaspProjectDir) -> IO () +initializeExternalCodeDirs waspProjectDir = do + dataDir <- Data.getAbsDataDirPath + let copySkeletonDir' = copySkeletonDir dataDir waspProjectDir + copySkeletonDir' serverSkeletonDirInTemplatesDir Common.extServerCodeDirInWaspProjectDir + copySkeletonDir' clientSkeletonDirInTemplatesDir Common.extClientCodeDirInWaspProjectDir + +copySkeletonDir :: + Path' Abs (Dir Data.DataDir) -> + Path' Abs (Dir Common.WaspProjectDir) -> + Path' (Rel Common.CliTemplatesDir) (Dir a) -> + Path' (Rel Common.WaspProjectDir) (Dir SourceExternalCodeDir) -> + IO () +copySkeletonDir dataDir waspProjectDir skeletonDirinTemplatesDir extCodeDirInWaspProjectDir = do + let skeletonAbs = dataDir cliTemplatesDirInDataDir skeletonDirinTemplatesDir + let extCodeDirAbs = waspProjectDir extCodeDirInWaspProjectDir + copyDirectoryRecursive skeletonAbs extCodeDirAbs + +writeFileSP :: Path' Abs (SP.File f) -> String -> IO () +writeFileSP = writeFile . SP.fromAbsFile + +createDirectorySP :: Path' Abs (Dir d) -> IO () +createDirectorySP = createDirectory . SP.fromAbsDir + +cliTemplatesDirInDataDir :: Path' (Rel Data.DataDir) (Dir Common.CliTemplatesDir) +cliTemplatesDirInDataDir = [reldir|Cli/templates|] + +serverSkeletonDirInTemplatesDir :: Path' (Rel Common.CliTemplatesDir) Dir' +serverSkeletonDirInTemplatesDir = [reldir|new/server|] + +clientSkeletonDirInTemplatesDir :: Path' (Rel Common.CliTemplatesDir) Dir' +clientSkeletonDirInTemplatesDir = [reldir|new/client|] \ No newline at end of file diff --git a/waspc/cli/src/Wasp/Cli/Command/Watch.hs b/waspc/cli/src/Wasp/Cli/Command/Watch.hs index f9bd151379..37c45fdde8 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Watch.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Watch.hs @@ -39,7 +39,8 @@ watch waspProjectDir outDir = FSN.withManager $ \mgr -> do currentTime <- getCurrentTime chan <- newChan _ <- FSN.watchDirChan mgr (SP.fromAbsDir waspProjectDir) eventFilter chan - _ <- FSN.watchTreeChan mgr (SP.fromAbsDir $ waspProjectDir Common.extCodeDirInWaspProjectDir) eventFilter chan + _ <- FSN.watchTreeChan mgr (SP.fromAbsDir $ waspProjectDir Common.extClientCodeDirInWaspProjectDir) eventFilter chan + _ <- FSN.watchTreeChan mgr (SP.fromAbsDir $ waspProjectDir Common.extServerCodeDirInWaspProjectDir) eventFilter chan listenForEvents chan currentTime where listenForEvents :: Chan FSN.Event -> UTCTime -> IO () diff --git a/waspc/cli/src/Wasp/Cli/Common.hs b/waspc/cli/src/Wasp/Cli/Common.hs index dc60e6cbbd..5fe611f7e6 100644 --- a/waspc/cli/src/Wasp/Cli/Common.hs +++ b/waspc/cli/src/Wasp/Cli/Common.hs @@ -5,7 +5,8 @@ module Wasp.Cli.Common dotWaspDirInWaspProjectDir, dotWaspRootFileInWaspProjectDir, dotWaspInfoFileInGeneratedCodeDir, - extCodeDirInWaspProjectDir, + extClientCodeDirInWaspProjectDir, + extServerCodeDirInWaspProjectDir, generatedCodeDirInDotWaspDir, buildDirInDotWaspDir, waspSays, @@ -41,8 +42,11 @@ dotWaspRootFileInWaspProjectDir = [relfile|.wasproot|] dotWaspInfoFileInGeneratedCodeDir :: Path' (Rel Wasp.Generator.Common.ProjectRootDir) File' dotWaspInfoFileInGeneratedCodeDir = [relfile|.waspinfo|] -extCodeDirInWaspProjectDir :: Path' (Rel WaspProjectDir) (Dir SourceExternalCodeDir) -extCodeDirInWaspProjectDir = [reldir|ext|] +extServerCodeDirInWaspProjectDir :: Path' (Rel WaspProjectDir) (Dir SourceExternalCodeDir) +extServerCodeDirInWaspProjectDir = [reldir|server|] + +extClientCodeDirInWaspProjectDir :: Path' (Rel WaspProjectDir) (Dir SourceExternalCodeDir) +extClientCodeDirInWaspProjectDir = [reldir|client|] waspSays :: String -> IO () waspSays what = putStrLn $ Term.applyStyles [Term.Yellow] what diff --git a/waspc/data/Cli/templates/new/client/.waspignore b/waspc/data/Cli/templates/new/client/.waspignore new file mode 100644 index 0000000000..1c432f30d9 --- /dev/null +++ b/waspc/data/Cli/templates/new/client/.waspignore @@ -0,0 +1,3 @@ +# Ignore editor tmp files +**/*~ +**/#*# diff --git a/waspc/data/Cli/templates/new/ext/Main.css b/waspc/data/Cli/templates/new/client/Main.css similarity index 100% rename from waspc/data/Cli/templates/new/ext/Main.css rename to waspc/data/Cli/templates/new/client/Main.css diff --git a/waspc/data/Cli/templates/new/ext/MainPage.js b/waspc/data/Cli/templates/new/client/MainPage.js similarity index 100% rename from waspc/data/Cli/templates/new/ext/MainPage.js rename to waspc/data/Cli/templates/new/client/MainPage.js diff --git a/waspc/data/Cli/templates/new/ext/waspLogo.png b/waspc/data/Cli/templates/new/client/waspLogo.png similarity index 100% rename from waspc/data/Cli/templates/new/ext/waspLogo.png rename to waspc/data/Cli/templates/new/client/waspLogo.png diff --git a/waspc/data/Cli/templates/new/server/.waspignore b/waspc/data/Cli/templates/new/server/.waspignore new file mode 100644 index 0000000000..1c432f30d9 --- /dev/null +++ b/waspc/data/Cli/templates/new/server/.waspignore @@ -0,0 +1,3 @@ +# Ignore editor tmp files +**/*~ +**/#*# diff --git a/waspc/src/Wasp/AppSpec.hs b/waspc/src/Wasp/AppSpec.hs index c6ad3aab8b..d955c6c5b9 100644 --- a/waspc/src/Wasp/AppSpec.hs +++ b/waspc/src/Wasp/AppSpec.hs @@ -37,10 +37,10 @@ data AppSpec = AppSpec { -- | List of declarations like App, Page, Route, ... that describe the web app. decls :: [Decl], -- | List of external code files (they are referenced/used by the declarations). - externalCodeFiles :: [ExternalCode.File], + externalServerFiles :: [ExternalCode.File], + -- | List of external code files (they are referenced/used by the declarations). + externalClientFiles :: [ExternalCode.File], -- | Absolute path to the directory in wasp project source that contains external code files. - externalCodeDirPath :: !(Path' Abs (Dir ExternalCode.SourceExternalCodeDir)), - -- | Absolute path to the directory in wasp project source that contains database migrations. migrationsDir :: Maybe (Path' Abs (Dir DbMigrationsDir)), -- | Absolute path to the .env.server file in wasp project source. It contains env variables to be -- provided to the server only during the development. diff --git a/waspc/src/Wasp/CompileOptions.hs b/waspc/src/Wasp/CompileOptions.hs index 3624c24183..156fc6718b 100644 --- a/waspc/src/Wasp/CompileOptions.hs +++ b/waspc/src/Wasp/CompileOptions.hs @@ -12,7 +12,8 @@ import Wasp.Message (SendMessage) -- It would be easier to pass around if it is part of Wasp data. But is it semantically correct? -- Maybe it is, even more than this! data CompileOptions = CompileOptions - { externalCodeDirPath :: !(Path' Abs (Dir SourceExternalCodeDir)), + { externalServerCodeDirPath :: !(Path' Abs (Dir SourceExternalCodeDir)), + externalClientCodeDirPath :: !(Path' Abs (Dir SourceExternalCodeDir)), isBuild :: !Bool, -- We give the compiler the ability to send messages. The code that -- invokes the compiler (such as the CLI) can then implement a way diff --git a/waspc/src/Wasp/Generator/ServerGenerator.hs b/waspc/src/Wasp/Generator/ServerGenerator.hs index 24d0807af9..6c72d23bec 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator.hs @@ -62,7 +62,7 @@ genServer spec = genGitignore ] <++> genSrcDir spec - <++> genExternalCodeDir ServerExternalCodeGenerator.generatorStrategy (AS.externalCodeFiles spec) + <++> genExternalCodeDir ServerExternalCodeGenerator.generatorStrategy (AS.externalServerFiles spec) <++> genDotEnv spec <++> genJobs spec <++> genJobExecutors diff --git a/waspc/src/Wasp/Generator/WebAppGenerator.hs b/waspc/src/Wasp/Generator/WebAppGenerator.hs index 58873728d2..58416587e9 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator.hs @@ -50,7 +50,7 @@ genWebApp spec = do ] <++> genPublicDir spec <++> genSrcDir spec - <++> genExternalCodeDir WebAppExternalCodeGenerator.generatorStrategy (AS.externalCodeFiles spec) + <++> genExternalCodeDir WebAppExternalCodeGenerator.generatorStrategy (AS.externalClientFiles spec) <++> genDotEnv spec genDotEnv :: AppSpec -> Generator [FileDraft] diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index 9738833d84..6251f2059f 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -14,6 +14,7 @@ import qualified StrongPath as SP import System.Directory (doesDirectoryExist, doesFileExist) import qualified Wasp.Analyzer as Analyzer import Wasp.Analyzer.AnalyzeError (getErrorMessageAndCtx) +import Wasp.AppSpec (AppSpec (externalClientFiles), Decl) import qualified Wasp.AppSpec as AS import qualified Wasp.AppSpec.Valid as ASV import Wasp.Common (DbMigrationsDir, WaspProjectDir, dbMigrationsDirInWaspProjectDir) @@ -49,6 +50,33 @@ compile waspDir outDir options = do return ([], map show validationErrors) return $ (analyzerWarnings, []) <> compilerWarningsAndErrors +-- analyzeWaspProject2 :: +-- Path' Abs (Dir WaspProjectDir) -> +-- CompileOptions -> +-- IO (Either [CompileError] AppSpec) +-- analyzeWaspProject2 waspDir options = do +-- waspFilePath <- findWaspFilePath waspDir +-- result <- analyzeWaspFileContent waspFilePath +-- return $ createAppSpec waspDir options <$> result + +-- findWaspFilePath :: Path' Abs (Dir WaspProjectDir) -> IO (Either [CompileError] (Path' Abs File')) +-- findWaspFilePath waspDir = do +-- maybeWaspFilePath <- findWaspFile waspDir +-- case maybeWaspFilePath of +-- Nothing -> return $ Left ["Couldn't find a single *.wasp file."] +-- Just waspFilePath -> return $ return waspFilePath + +-- analyzeWaspFileContent :: Path' Abs File' -> IO (Either [CompileError] [Decl]) +-- analyzeWaspFileContent waspFilePath = do +-- waspFileContent <- readFile (SP.fromAbsFile waspFilePath) +-- case Analyzer.analyze waspFileContent of +-- Right decls -> return $ return decls +-- Left analyzeError -> return $ Left +-- [ showCompilerErrorForTerminal +-- (waspFilePath, waspFileContent) +-- (getErrorMessageAndCtx analyzeError) +-- ] + analyzeWaspProject :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> @@ -60,6 +88,7 @@ analyzeWaspProject waspDir options = do Just waspFilePath -> do waspFileContent <- readFile (SP.fromAbsFile waspFilePath) case Analyzer.analyze waspFileContent of + Right decls -> Right <$> createAppSpec waspDir options decls Left analyzeError -> return $ Left $ @@ -68,26 +97,29 @@ analyzeWaspProject waspDir options = do (waspFilePath, waspFileContent) (getErrorMessageAndCtx analyzeError) ] - Right decls -> do - externalCodeFiles <- - ExternalCode.readFiles (CompileOptions.externalCodeDirPath options) - maybeDotEnvServerFile <- findDotEnvServer waspDir - maybeDotEnvClientFile <- findDotEnvClient waspDir - maybeMigrationsDir <- findMigrationsDir waspDir - return $ - Right - AS.AppSpec - { AS.decls = decls, - AS.externalCodeFiles = externalCodeFiles, - AS.externalCodeDirPath = CompileOptions.externalCodeDirPath options, - AS.migrationsDir = maybeMigrationsDir, - AS.dotEnvServerFile = maybeDotEnvServerFile, - AS.dotEnvClientFile = maybeDotEnvClientFile, - AS.isBuild = CompileOptions.isBuild options - } analyzerWarnings <- warnIfDotEnvPresent waspDir return (analyzerWarnings, appSpecOrAnalyzerErrors) +createAppSpec :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> [Decl] -> IO AS.AppSpec +createAppSpec waspDir options decls = do + externalServerCodeFiles <- + ExternalCode.readFiles (CompileOptions.externalServerCodeDirPath options) + externalClientCodeFiles <- + ExternalCode.readFiles (CompileOptions.externalClientCodeDirPath options) + maybeDotEnvServerFile <- findDotEnvServer waspDir + maybeDotEnvClientFile <- findDotEnvClient waspDir + maybeMigrationsDir <- findMigrationsDir waspDir + return + AS.AppSpec + { AS.decls = decls, + AS.externalClientFiles = externalClientCodeFiles, + AS.externalServerFiles = externalServerCodeFiles, + AS.migrationsDir = maybeMigrationsDir, + AS.dotEnvServerFile = maybeDotEnvServerFile, + AS.dotEnvClientFile = maybeDotEnvClientFile, + AS.isBuild = CompileOptions.isBuild options + } + -- | Checks the wasp directory for potential problems, and issues warnings if any are found. warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO [CompileWarning] warnIfDotEnvPresent waspDir = do diff --git a/waspc/test/AppSpec/ValidTest.hs b/waspc/test/AppSpec/ValidTest.hs index 7f5894d2d8..b9e6ecb25e 100644 --- a/waspc/test/AppSpec/ValidTest.hs +++ b/waspc/test/AppSpec/ValidTest.hs @@ -3,7 +3,6 @@ module AppSpec.ValidTest where import Data.Maybe (fromJust) -import Fixtures (systemSPRoot) import qualified StrongPath as SP import Test.Tasty.Hspec import qualified Wasp.AppSpec as AS @@ -148,8 +147,8 @@ spec_AppSpecValid = do basicAppSpec = AS.AppSpec { AS.decls = [basicAppDecl], - AS.externalCodeDirPath = systemSPRoot SP. [SP.reldir|test/src|], - AS.externalCodeFiles = [], + AS.externalClientFiles = [], + AS.externalServerFiles = [], AS.isBuild = False, AS.migrationsDir = Nothing, AS.dotEnvServerFile = Nothing, diff --git a/waspc/test/Generator/WebAppGeneratorTest.hs b/waspc/test/Generator/WebAppGeneratorTest.hs index 0505d76ec5..99310e848e 100644 --- a/waspc/test/Generator/WebAppGeneratorTest.hs +++ b/waspc/test/Generator/WebAppGeneratorTest.hs @@ -1,6 +1,5 @@ module Generator.WebAppGeneratorTest where -import Fixtures (systemSPRoot) import qualified StrongPath as SP import System.FilePath (()) import Test.Tasty.Hspec @@ -36,8 +35,8 @@ spec_WebAppGenerator = do AS.App.head = Nothing } ], - AS.externalCodeDirPath = systemSPRoot SP. [SP.reldir|test/src|], - AS.externalCodeFiles = [], + AS.externalClientFiles = [], + AS.externalServerFiles = [], AS.isBuild = False, AS.migrationsDir = Nothing, AS.dotEnvServerFile = Nothing, From 86e70fe65d96ab2b5ef23ba0cd3b83439d3f10dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 14 Oct 2022 02:13:52 +0200 Subject: [PATCH 02/65] Use skeleton in createNewProject and refactor --- .../src/Wasp/Cli/Command/CreateNewProject.hs | 141 +++++++----------- waspc/data/Cli/templates/new/.gitignore | 3 + waspc/data/Cli/templates/new/.wasproot | 1 + 3 files changed, 54 insertions(+), 91 deletions(-) create mode 100644 waspc/data/Cli/templates/new/.gitignore create mode 100644 waspc/data/Cli/templates/new/.wasproot diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index 4fa2af8353..80c66b4f17 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -6,15 +6,15 @@ where import Control.Monad.Except (throwError) import Control.Monad.IO.Class (liftIO) import Data.List (intercalate) -import StrongPath (Abs, Dir, Dir', File', Path', Rel, reldir, relfile, ()) +import StrongPath (Abs, Dir, Path, Path', System, reldir, relfile, ()) import qualified StrongPath as SP -import System.Directory (createDirectory, getCurrentDirectory) +import System.Directory (getCurrentDirectory) import qualified System.FilePath as FP import Text.Printf (printf) import Wasp.Analyzer.Parser (isValidWaspIdentifier) -import Wasp.AppSpec.ExternalCode (SourceExternalCodeDir) import Wasp.Cli.Command (Command, CommandError (..)) import qualified Wasp.Cli.Command.Common as Command.Common +import Wasp.Cli.Common (WaspProjectDir) import qualified Wasp.Cli.Common as Common import qualified Wasp.Data as Data import Wasp.Generator.FileDraft.WriteableMonad (WriteableMonad (copyDirectoryRecursive)) @@ -26,66 +26,68 @@ data ProjectInfo = ProjectInfo _appName :: String } +createNewProject :: String -> Command () +createNewProject projectName = do + projectInfo <- parseProjectInfo projectName + createAndPopulateWaspProjectDir projectInfo + liftIO $ printInfoMessages projectInfo + -- Takes a project name String -- Returns either the ProjectInfo type that contains both the Project name -- and the App name (which might be the same), or an error describing why the name is invalid -parseProjectInfo :: String -> Either String ProjectInfo +parseProjectInfo :: String -> Command ProjectInfo parseProjectInfo name - | isValidWaspIdentifier appName = Right (ProjectInfo name appName) + | isValidWaspIdentifier appName = return $ ProjectInfo name appName | otherwise = - Left $ - intercalate - "\n" - [ "The project's name is not in the valid format!", - indent 2 "- It can start with a letter or an underscore.", - indent 2 "- It can contain only letters, numbers, dashes, or underscores.", - indent 2 "- It can't be a Wasp keyword." - ] + throwError $ + CommandError "Project creation failed" $ + intercalate + "\n" + [ "The project's name is not in the valid format!", + indent 2 "- It can start with a letter or an underscore.", + indent 2 "- It can contain only letters, numbers, dashes, or underscores.", + indent 2 "- It can't be a Wasp keyword." + ] where appName = kebabToCamelCase name -createNewProject :: String -> Command () -createNewProject name = - case parseProjectInfo name of - Right projectInfo -> createNewProject' projectInfo - Left parsedError -> - throwError $ - CommandError "Project creation failed" parsedError - -createNewProject' :: ProjectInfo -> Command () -createNewProject' (ProjectInfo projectName appName) = do +createAndPopulateWaspProjectDir :: ProjectInfo -> Command () +createAndPopulateWaspProjectDir projectInfo = do + absWaspProjectDir <- getAbsoluteWaspProjectDir projectInfo + liftIO $ initializeProjectFromSkeleton absWaspProjectDir + liftIO $ writeMainWaspFile absWaspProjectDir projectInfo + +printInfoMessages :: ProjectInfo -> IO () +printInfoMessages (ProjectInfo projectName _) = do + putStrLn $ Term.applyStyles [Term.Green] ("Created new Wasp app in ./" ++ projectName ++ " directory!") + putStrLn "To run it, do:" + putStrLn "" + putStrLn $ Term.applyStyles [Term.Bold] (" cd " ++ projectName) + putStrLn $ Term.applyStyles [Term.Bold] " wasp start" + putStrLn "" + putStrLn Command.Common.alphaWarningMessage + +getAbsoluteWaspProjectDir :: ProjectInfo -> Command (Path System Abs (Dir WaspProjectDir)) +getAbsoluteWaspProjectDir (ProjectInfo projectName _) = do absCwd <- liftIO getCurrentDirectory - waspProjectDir <- case SP.parseAbsDir $ absCwd FP. projectName of + case SP.parseAbsDir $ absCwd FP. projectName of + Right sp -> return sp Left err -> throwError $ CommandError "Project creation failed" - ( "Failed to parse absolute path to wasp project dir: " - ++ show err - ) - Right sp -> return sp - liftIO $ do - createDirectorySP waspProjectDir - writeFileSP (waspProjectDir mainWaspFileInWaspProjectDir) mainWaspFileContent - writeFileSP (waspProjectDir gitignoreFileInWaspProjectDir) gitignoreFileContent - writeFileSP - (waspProjectDir Common.dotWaspRootFileInWaspProjectDir) - "File marking the root of Wasp project." + ("Failed to parse absolute path to wasp project dir: " ++ show err) - liftIO $ initializeExternalCodeDirs waspProjectDir +initializeProjectFromSkeleton :: Path' Abs (Dir Common.WaspProjectDir) -> IO () +initializeProjectFromSkeleton absWaspProjectDir = do + dataDir <- Data.getAbsDataDirPath + let absSkeletonDir = dataDir [reldir|Cli/templates/new|] + copyDirectoryRecursive absSkeletonDir absWaspProjectDir - liftIO $ do - putStrLn $ Term.applyStyles [Term.Green] ("Created new Wasp app in ./" ++ projectName ++ " directory!") - putStrLn "To run it, do:" - putStrLn "" - putStrLn $ Term.applyStyles [Term.Bold] (" cd " ++ projectName) - putStrLn $ Term.applyStyles [Term.Bold] " wasp start" - putStrLn "" - putStrLn Command.Common.alphaWarningMessage +writeMainWaspFile :: Path System Abs (Dir WaspProjectDir) -> ProjectInfo -> IO () +writeMainWaspFile waspProjectDir (ProjectInfo projectName appName) = writeFile mainWaspFileAbsPath mainWaspFileContent where - mainWaspFileInWaspProjectDir :: Path' (Rel Common.WaspProjectDir) File' - mainWaspFileInWaspProjectDir = [relfile|main.wasp|] - + mainWaspFileAbsPath = SP.fromAbsFile $ waspProjectDir [relfile|main.wasp|] mainWaspFileContent = unlines [ "app %s {" `printf` appName, @@ -96,47 +98,4 @@ createNewProject' (ProjectInfo projectName appName) = do "page MainPage {", " component: import Main from \"@ext/MainPage.js\"", "}" - ] - - gitignoreFileInWaspProjectDir :: Path' (Rel Common.WaspProjectDir) File' - gitignoreFileInWaspProjectDir = [relfile|.gitignore|] - - gitignoreFileContent = - unlines - [ "/.wasp/", - "/.env.server", - "/.env.client" - ] - -initializeExternalCodeDirs :: Path' Abs (Dir Common.WaspProjectDir) -> IO () -initializeExternalCodeDirs waspProjectDir = do - dataDir <- Data.getAbsDataDirPath - let copySkeletonDir' = copySkeletonDir dataDir waspProjectDir - copySkeletonDir' serverSkeletonDirInTemplatesDir Common.extServerCodeDirInWaspProjectDir - copySkeletonDir' clientSkeletonDirInTemplatesDir Common.extClientCodeDirInWaspProjectDir - -copySkeletonDir :: - Path' Abs (Dir Data.DataDir) -> - Path' Abs (Dir Common.WaspProjectDir) -> - Path' (Rel Common.CliTemplatesDir) (Dir a) -> - Path' (Rel Common.WaspProjectDir) (Dir SourceExternalCodeDir) -> - IO () -copySkeletonDir dataDir waspProjectDir skeletonDirinTemplatesDir extCodeDirInWaspProjectDir = do - let skeletonAbs = dataDir cliTemplatesDirInDataDir skeletonDirinTemplatesDir - let extCodeDirAbs = waspProjectDir extCodeDirInWaspProjectDir - copyDirectoryRecursive skeletonAbs extCodeDirAbs - -writeFileSP :: Path' Abs (SP.File f) -> String -> IO () -writeFileSP = writeFile . SP.fromAbsFile - -createDirectorySP :: Path' Abs (Dir d) -> IO () -createDirectorySP = createDirectory . SP.fromAbsDir - -cliTemplatesDirInDataDir :: Path' (Rel Data.DataDir) (Dir Common.CliTemplatesDir) -cliTemplatesDirInDataDir = [reldir|Cli/templates|] - -serverSkeletonDirInTemplatesDir :: Path' (Rel Common.CliTemplatesDir) Dir' -serverSkeletonDirInTemplatesDir = [reldir|new/server|] - -clientSkeletonDirInTemplatesDir :: Path' (Rel Common.CliTemplatesDir) Dir' -clientSkeletonDirInTemplatesDir = [reldir|new/client|] \ No newline at end of file + ] \ No newline at end of file diff --git a/waspc/data/Cli/templates/new/.gitignore b/waspc/data/Cli/templates/new/.gitignore new file mode 100644 index 0000000000..c51177f6dc --- /dev/null +++ b/waspc/data/Cli/templates/new/.gitignore @@ -0,0 +1,3 @@ +/.wasp/ +/.env.server +/.env.client diff --git a/waspc/data/Cli/templates/new/.wasproot b/waspc/data/Cli/templates/new/.wasproot new file mode 100644 index 0000000000..3caa053db5 --- /dev/null +++ b/waspc/data/Cli/templates/new/.wasproot @@ -0,0 +1 @@ +File marking the root of Wasp project. \ No newline at end of file From bb4107eadc15768aa406e2102d75f2b9e8a435d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 14 Oct 2022 02:14:38 +0200 Subject: [PATCH 03/65] Refactor Lib.hs to use ExceptT --- waspc/cli/src/Wasp/Cli/Command/Deps.hs | 4 +- waspc/src/Wasp/Lib.hs | 87 ++++++++++---------------- 2 files changed, 35 insertions(+), 56 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/Deps.hs b/waspc/cli/src/Wasp/Cli/Command/Deps.hs index 68b3ca94be..d5451c7f46 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Deps.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Deps.hs @@ -21,7 +21,7 @@ import qualified Wasp.Util.Terminal as Term deps :: Command () deps = do waspProjectDir <- findWaspProjectRootDirFromCwd - (_, appSpecOrAnalyzerErrors) <- liftIO $ analyzeWaspProject waspProjectDir (defaultCompileOptions waspProjectDir) + appSpecOrAnalyzerErrors <- liftIO $ analyzeWaspProject waspProjectDir (defaultCompileOptions waspProjectDir) appSpec <- either (throwError . CommandError "Determining dependencies failed due to a compilation error in your Wasp project" . unwords . toList) @@ -65,4 +65,4 @@ printDep :: AS.Dependency.Dependency -> String printDep dep = Term.applyStyles [Term.Cyan] (AS.Dependency.name dep) ++ "@" - ++ Term.applyStyles [Term.Yellow] (AS.Dependency.version dep) + ++ Term.applyStyles [Term.Yellow] (AS.Dependency.version dep) \ No newline at end of file diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index 6251f2059f..3bc1bbe008 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -27,6 +27,7 @@ import Wasp.Generator.Common (ProjectRootDir) import Wasp.Generator.ServerGenerator.Common (dotEnvServer) import Wasp.Generator.WebAppGenerator.Common (dotEnvClient) import qualified Wasp.Util.IO as Util.IO +import Control.Monad.Except type CompileError = String @@ -38,7 +39,8 @@ compile :: CompileOptions -> IO ([CompileWarning], [CompileError]) compile waspDir outDir options = do - (analyzerWarnings, appSpecOrAnalyzerErrors) <- analyzeWaspProject waspDir options + appSpecOrAnalyzerErrors <- analyzeWaspProject waspDir options + analyzerWarnings <- warnIfDotEnvPresent waspDir compilerWarningsAndErrors <- case appSpecOrAnalyzerErrors of Left analyzerErrors -> return ([], toList analyzerErrors) Right appSpec -> @@ -46,59 +48,43 @@ compile waspDir outDir options = do [] -> do (generatorWarnings, generatorErrors) <- Generator.writeWebAppCode appSpec outDir (sendMessage options) return (map show $ generatorWarningsFilter options generatorWarnings, map show generatorErrors) - validationErrors -> do - return ([], map show validationErrors) + validationErrors -> return ([], map show validationErrors) return $ (analyzerWarnings, []) <> compilerWarningsAndErrors --- analyzeWaspProject2 :: --- Path' Abs (Dir WaspProjectDir) -> --- CompileOptions -> --- IO (Either [CompileError] AppSpec) --- analyzeWaspProject2 waspDir options = do --- waspFilePath <- findWaspFilePath waspDir --- result <- analyzeWaspFileContent waspFilePath --- return $ createAppSpec waspDir options <$> result - --- findWaspFilePath :: Path' Abs (Dir WaspProjectDir) -> IO (Either [CompileError] (Path' Abs File')) --- findWaspFilePath waspDir = do --- maybeWaspFilePath <- findWaspFile waspDir --- case maybeWaspFilePath of --- Nothing -> return $ Left ["Couldn't find a single *.wasp file."] --- Just waspFilePath -> return $ return waspFilePath - --- analyzeWaspFileContent :: Path' Abs File' -> IO (Either [CompileError] [Decl]) --- analyzeWaspFileContent waspFilePath = do --- waspFileContent <- readFile (SP.fromAbsFile waspFilePath) --- case Analyzer.analyze waspFileContent of --- Right decls -> return $ return decls --- Left analyzeError -> return $ Left --- [ showCompilerErrorForTerminal --- (waspFilePath, waspFileContent) --- (getErrorMessageAndCtx analyzeError) --- ] - analyzeWaspProject :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> - IO ([CompileWarning], Either (NonEmpty CompileError) AS.AppSpec) -analyzeWaspProject waspDir options = do + IO (Either (NonEmpty CompileError) AppSpec) +analyzeWaspProject waspDir options = runExceptT $ do + waspFilePath <- ExceptT $ findWaspFilePath waspDir + declarations <- ExceptT $ analyzeWaspFileContent waspFilePath + liftIO $ createAppSpec waspDir options declarations + +-- | Checks the wasp directory for potential problems, and issues warnings if any are found. +warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO [CompileWarning] +warnIfDotEnvPresent waspDir = do + maybeDotEnvFile <- findDotEnv waspDir + case maybeDotEnvFile of + Nothing -> return [] + Just _ -> return ["Wasp .env files should be named .env.server or .env.client, depending on their use."] + +findWaspFilePath :: Path' Abs (Dir WaspProjectDir) -> IO (Either (NonEmpty CompileError) (Path' Abs File')) +findWaspFilePath waspDir = do maybeWaspFilePath <- findWaspFile waspDir - appSpecOrAnalyzerErrors <- case maybeWaspFilePath of + case maybeWaspFilePath of Nothing -> return $ Left $ fromList ["Couldn't find a single *.wasp file."] - Just waspFilePath -> do - waspFileContent <- readFile (SP.fromAbsFile waspFilePath) - case Analyzer.analyze waspFileContent of - Right decls -> Right <$> createAppSpec waspDir options decls - Left analyzeError -> - return $ - Left $ - fromList - [ showCompilerErrorForTerminal - (waspFilePath, waspFileContent) - (getErrorMessageAndCtx analyzeError) - ] - analyzerWarnings <- warnIfDotEnvPresent waspDir - return (analyzerWarnings, appSpecOrAnalyzerErrors) + Just waspFilePath -> return $ return waspFilePath + +analyzeWaspFileContent :: Path' Abs File' -> IO (Either (NonEmpty CompileError) [Decl]) +analyzeWaspFileContent waspFilePath = do + waspFileContent <- readFile (SP.fromAbsFile waspFilePath) + return $ case Analyzer.analyze waspFileContent of + Right decls -> Right decls + Left analyzeError -> Left $ fromList + [ showCompilerErrorForTerminal + (waspFilePath, waspFileContent) + (getErrorMessageAndCtx analyzeError) + ] createAppSpec :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> [Decl] -> IO AS.AppSpec createAppSpec waspDir options decls = do @@ -120,13 +106,6 @@ createAppSpec waspDir options decls = do AS.isBuild = CompileOptions.isBuild options } --- | Checks the wasp directory for potential problems, and issues warnings if any are found. -warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO [CompileWarning] -warnIfDotEnvPresent waspDir = do - maybeDotEnvFile <- findDotEnv waspDir - case maybeDotEnvFile of - Nothing -> return [] - Just _ -> return ["Wasp .env files should be named .env.server or .env.client, depending on their use."] findWaspFile :: Path' Abs (Dir WaspProjectDir) -> IO (Maybe (Path' Abs File')) findWaspFile waspDir = do From cc7f353a4125acbdbd940c4bab42b19635b76bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 14 Oct 2022 03:03:59 +0200 Subject: [PATCH 04/65] Fix formatting --- waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs | 2 +- waspc/cli/src/Wasp/Cli/Command/Deps.hs | 2 +- waspc/data/Cli/templates/new/.wasproot | 2 +- waspc/src/Wasp/Lib.hs | 13 +++++++------ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index 80c66b4f17..b960b4b8e0 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -98,4 +98,4 @@ writeMainWaspFile waspProjectDir (ProjectInfo projectName appName) = writeFile m "page MainPage {", " component: import Main from \"@ext/MainPage.js\"", "}" - ] \ No newline at end of file + ] diff --git a/waspc/cli/src/Wasp/Cli/Command/Deps.hs b/waspc/cli/src/Wasp/Cli/Command/Deps.hs index d5451c7f46..5c90d68fdf 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Deps.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Deps.hs @@ -65,4 +65,4 @@ printDep :: AS.Dependency.Dependency -> String printDep dep = Term.applyStyles [Term.Cyan] (AS.Dependency.name dep) ++ "@" - ++ Term.applyStyles [Term.Yellow] (AS.Dependency.version dep) \ No newline at end of file + ++ Term.applyStyles [Term.Yellow] (AS.Dependency.version dep) diff --git a/waspc/data/Cli/templates/new/.wasproot b/waspc/data/Cli/templates/new/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/waspc/data/Cli/templates/new/.wasproot +++ b/waspc/data/Cli/templates/new/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index 3bc1bbe008..cb4d2e0aac 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -7,6 +7,7 @@ module Wasp.Lib ) where +import Control.Monad.Except import Data.List (find, isSuffixOf) import Data.List.NonEmpty (NonEmpty, fromList, toList) import StrongPath (Abs, Dir, File', Path', relfile) @@ -27,7 +28,6 @@ import Wasp.Generator.Common (ProjectRootDir) import Wasp.Generator.ServerGenerator.Common (dotEnvServer) import Wasp.Generator.WebAppGenerator.Common (dotEnvClient) import qualified Wasp.Util.IO as Util.IO -import Control.Monad.Except type CompileError = String @@ -56,9 +56,9 @@ analyzeWaspProject :: CompileOptions -> IO (Either (NonEmpty CompileError) AppSpec) analyzeWaspProject waspDir options = runExceptT $ do - waspFilePath <- ExceptT $ findWaspFilePath waspDir - declarations <- ExceptT $ analyzeWaspFileContent waspFilePath - liftIO $ createAppSpec waspDir options declarations + waspFilePath <- ExceptT $ findWaspFilePath waspDir + declarations <- ExceptT $ analyzeWaspFileContent waspFilePath + liftIO $ createAppSpec waspDir options declarations -- | Checks the wasp directory for potential problems, and issues warnings if any are found. warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO [CompileWarning] @@ -80,7 +80,9 @@ analyzeWaspFileContent waspFilePath = do waspFileContent <- readFile (SP.fromAbsFile waspFilePath) return $ case Analyzer.analyze waspFileContent of Right decls -> Right decls - Left analyzeError -> Left $ fromList + Left analyzeError -> + Left $ + fromList [ showCompilerErrorForTerminal (waspFilePath, waspFileContent) (getErrorMessageAndCtx analyzeError) @@ -106,7 +108,6 @@ createAppSpec waspDir options decls = do AS.isBuild = CompileOptions.isBuild options } - findWaspFile :: Path' Abs (Dir WaspProjectDir) -> IO (Maybe (Path' Abs File')) findWaspFile waspDir = do files <- fst <$> Util.IO.listDirectory waspDir From 492f247181b0382db0e9bd2a00f7b91b2c5b2616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 14 Oct 2022 03:18:20 +0200 Subject: [PATCH 05/65] Pop up returns --- waspc/src/Wasp/Lib.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index cb4d2e0aac..187b106ab6 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -64,16 +64,16 @@ analyzeWaspProject waspDir options = runExceptT $ do warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO [CompileWarning] warnIfDotEnvPresent waspDir = do maybeDotEnvFile <- findDotEnv waspDir - case maybeDotEnvFile of - Nothing -> return [] - Just _ -> return ["Wasp .env files should be named .env.server or .env.client, depending on their use."] + return $ case maybeDotEnvFile of + Nothing -> [] + Just _ -> ["Wasp .env files should be named .env.server or .env.client, depending on their use."] findWaspFilePath :: Path' Abs (Dir WaspProjectDir) -> IO (Either (NonEmpty CompileError) (Path' Abs File')) findWaspFilePath waspDir = do maybeWaspFilePath <- findWaspFile waspDir - case maybeWaspFilePath of - Nothing -> return $ Left $ fromList ["Couldn't find a single *.wasp file."] - Just waspFilePath -> return $ return waspFilePath + return $ case maybeWaspFilePath of + Nothing -> Left $ fromList ["Couldn't find a single *.wasp file."] + Just waspFilePath -> Right waspFilePath analyzeWaspFileContent :: Path' Abs File' -> IO (Either (NonEmpty CompileError) [Decl]) analyzeWaspFileContent waspFilePath = do From d88e20418dd3f40677a2229e7370c712d02b1033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 18 Oct 2022 01:21:37 +0200 Subject: [PATCH 06/65] Extract liftIO and add a do block Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index b960b4b8e0..397fbd2409 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -54,8 +54,9 @@ parseProjectInfo name createAndPopulateWaspProjectDir :: ProjectInfo -> Command () createAndPopulateWaspProjectDir projectInfo = do absWaspProjectDir <- getAbsoluteWaspProjectDir projectInfo - liftIO $ initializeProjectFromSkeleton absWaspProjectDir - liftIO $ writeMainWaspFile absWaspProjectDir projectInfo + liftIO $ do + initializeProjectFromSkeleton absWaspProjectDir + writeMainWaspFile absWaspProjectDir projectInfo printInfoMessages :: ProjectInfo -> IO () printInfoMessages (ProjectInfo projectName _) = do From 51b426aab879bef1a1c514995ea6eb7ee8cad2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 24 Oct 2022 23:36:10 +0200 Subject: [PATCH 07/65] Address some review comments --- .../src/Wasp/Cli/Command/CreateNewProject.hs | 54 +++++++------- waspc/cli/src/Wasp/Cli/Command/Deps.hs | 6 +- waspc/cli/src/Wasp/Cli/Command/Info.hs | 70 ++++++++----------- waspc/src/Wasp/Lib.hs | 52 ++++++-------- waspc/src/Wasp/Util.hs | 6 ++ 5 files changed, 89 insertions(+), 99 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index 397fbd2409..288fdaa4e0 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -6,18 +6,18 @@ where import Control.Monad.Except (throwError) import Control.Monad.IO.Class (liftIO) import Data.List (intercalate) -import StrongPath (Abs, Dir, Path, Path', System, reldir, relfile, ()) -import qualified StrongPath as SP +import Path.IO (copyDirRecur, doesDirExist) +import StrongPath (Abs, Dir, Path, Path', System, fromAbsFile, parseAbsDir, reldir, relfile, ()) +import StrongPath.Path (toPathAbsDir) import System.Directory (getCurrentDirectory) import qualified System.FilePath as FP import Text.Printf (printf) import Wasp.Analyzer.Parser (isValidWaspIdentifier) import Wasp.Cli.Command (Command, CommandError (..)) import qualified Wasp.Cli.Command.Common as Command.Common -import Wasp.Cli.Common (WaspProjectDir) -import qualified Wasp.Cli.Common as Common +import Wasp.Common (WaspProjectDir) +import qualified Wasp.Common as Common (WaspProjectDir) import qualified Wasp.Data as Data -import Wasp.Generator.FileDraft.WriteableMonad (WriteableMonad (copyDirectoryRecursive)) import Wasp.Util (indent, kebabToCamelCase) import qualified Wasp.Util.Terminal as Term @@ -29,8 +29,17 @@ data ProjectInfo = ProjectInfo createNewProject :: String -> Command () createNewProject projectName = do projectInfo <- parseProjectInfo projectName - createAndPopulateWaspProjectDir projectInfo - liftIO $ printInfoMessages projectInfo + createWaspProjectDir projectInfo + liftIO printGettingStartedInstructions + where + printGettingStartedInstructions = do + putStrLn $ Term.applyStyles [Term.Green] ("Created new Wasp app in ./" ++ projectName ++ " directory!") + putStrLn "To run it, do:" + putStrLn "" + putStrLn $ Term.applyStyles [Term.Bold] (" cd " ++ projectName) + putStrLn $ Term.applyStyles [Term.Bold] " wasp start" + putStrLn "" + putStrLn Command.Common.alphaWarningMessage -- Takes a project name String -- Returns either the ProjectInfo type that contains both the Project name @@ -51,27 +60,20 @@ parseProjectInfo name where appName = kebabToCamelCase name -createAndPopulateWaspProjectDir :: ProjectInfo -> Command () -createAndPopulateWaspProjectDir projectInfo = do +createWaspProjectDir :: ProjectInfo -> Command () +createWaspProjectDir projectInfo = do absWaspProjectDir <- getAbsoluteWaspProjectDir projectInfo - liftIO $ do - initializeProjectFromSkeleton absWaspProjectDir - writeMainWaspFile absWaspProjectDir projectInfo - -printInfoMessages :: ProjectInfo -> IO () -printInfoMessages (ProjectInfo projectName _) = do - putStrLn $ Term.applyStyles [Term.Green] ("Created new Wasp app in ./" ++ projectName ++ " directory!") - putStrLn "To run it, do:" - putStrLn "" - putStrLn $ Term.applyStyles [Term.Bold] (" cd " ++ projectName) - putStrLn $ Term.applyStyles [Term.Bold] " wasp start" - putStrLn "" - putStrLn Command.Common.alphaWarningMessage + dirExists <- doesDirExist $ toPathAbsDir absWaspProjectDir + if dirExists + then throwError $ CommandError "Project creation failed" $ show absWaspProjectDir ++ " is an existing directory" + else liftIO $ do + initializeProjectFromSkeleton absWaspProjectDir + writeMainWaspFile absWaspProjectDir projectInfo getAbsoluteWaspProjectDir :: ProjectInfo -> Command (Path System Abs (Dir WaspProjectDir)) getAbsoluteWaspProjectDir (ProjectInfo projectName _) = do absCwd <- liftIO getCurrentDirectory - case SP.parseAbsDir $ absCwd FP. projectName of + case parseAbsDir $ absCwd FP. projectName of Right sp -> return sp Left err -> throwError $ @@ -83,12 +85,12 @@ initializeProjectFromSkeleton :: Path' Abs (Dir Common.WaspProjectDir) -> IO () initializeProjectFromSkeleton absWaspProjectDir = do dataDir <- Data.getAbsDataDirPath let absSkeletonDir = dataDir [reldir|Cli/templates/new|] - copyDirectoryRecursive absSkeletonDir absWaspProjectDir + copyDirRecur (toPathAbsDir absSkeletonDir) (toPathAbsDir absWaspProjectDir) writeMainWaspFile :: Path System Abs (Dir WaspProjectDir) -> ProjectInfo -> IO () -writeMainWaspFile waspProjectDir (ProjectInfo projectName appName) = writeFile mainWaspFileAbsPath mainWaspFileContent +writeMainWaspFile waspProjectDir (ProjectInfo projectName appName) = writeFile absMainWaspFile mainWaspFileContent where - mainWaspFileAbsPath = SP.fromAbsFile $ waspProjectDir [relfile|main.wasp|] + absMainWaspFile = fromAbsFile $ waspProjectDir [relfile|main.wasp|] mainWaspFileContent = unlines [ "app %s {" `printf` appName, diff --git a/waspc/cli/src/Wasp/Cli/Command/Deps.hs b/waspc/cli/src/Wasp/Cli/Command/Deps.hs index 5c90d68fdf..e3c3262255 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Deps.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Deps.hs @@ -15,20 +15,20 @@ import Wasp.Cli.Terminal (title) import qualified Wasp.Generator.NpmDependencies as N import qualified Wasp.Generator.ServerGenerator as ServerGenerator import qualified Wasp.Generator.WebAppGenerator as WebAppGenerator -import Wasp.Lib (analyzeWaspProject) +import Wasp.Lib (findAndAnalyzeWaspFile) import qualified Wasp.Util.Terminal as Term deps :: Command () deps = do waspProjectDir <- findWaspProjectRootDirFromCwd - appSpecOrAnalyzerErrors <- liftIO $ analyzeWaspProject waspProjectDir (defaultCompileOptions waspProjectDir) + appSpecOrAnalyzerErrors <- liftIO $ findAndAnalyzeWaspFile waspProjectDir (defaultCompileOptions waspProjectDir) appSpec <- either (throwError . CommandError "Determining dependencies failed due to a compilation error in your Wasp project" . unwords . toList) return appSpecOrAnalyzerErrors - liftIO . putStrLn $ depsMessage appSpec + liftIO $ putStrLn $ depsMessage appSpec depsMessage :: AppSpec -> String depsMessage appSpec = diff --git a/waspc/cli/src/Wasp/Cli/Command/Info.hs b/waspc/cli/src/Wasp/Cli/Command/Info.hs index 92a533ecfa..97b670ffa7 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Info.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Info.hs @@ -5,14 +5,14 @@ module Wasp.Cli.Command.Info ) where -import Control.Arrow (ArrowChoice (left)) -import Control.Monad.IO.Class (liftIO) +import Control.Arrow +import Control.Monad.Except import StrongPath (Abs, Dir, Path', fromAbsFile, fromRelFile, toFilePath) import StrongPath.Operations import System.Directory (doesFileExist, getFileSize) import qualified Wasp.Analyzer as Analyzer -import qualified Wasp.AppSpec as AS import qualified Wasp.AppSpec.App as AS.App +import qualified Wasp.AppSpec.Core.Decl as AS (Decl, takeDecls) import Wasp.Cli.Command (Command) import Wasp.Cli.Command.Common (findWaspProjectRootDirFromCwd) import Wasp.Cli.Command.Message (cliSendMessageC) @@ -26,30 +26,23 @@ import Wasp.Util.IO (listDirectoryDeep) import qualified Wasp.Util.Terminal as Term info :: Command () -info = - do - waspDir <- findWaspProjectRootDirFromCwd - compileInfo <- liftIO $ readCompileInformation waspDir - projectSize <- liftIO $ readDirectorySizeMB waspDir - declsOrError <- liftIO $ parseWaspFile waspDir - case declsOrError of - Left err -> cliSendMessageC $ Msg.Failure "Info failed" err - Right decls -> do - cliSendMessageC $ - Msg.Info $ - unlines - [ "", - title "Project information", - printInfo - "Name" - (fst $ head $ AS.takeDecls @AS.App.App decls), - printInfo - "Last compile" - compileInfo, - printInfo - "Project size" - projectSize - ] +info = do + waspDir <- findWaspProjectRootDirFromCwd + compileInfo <- liftIO $ readCompileInformation waspDir + projectSize <- liftIO $ readDirectorySizeMB waspDir + declsOrError <- liftIO $ parseWaspFile waspDir + case declsOrError of + Left err -> cliSendMessageC $ Msg.Failure "Info failed" err + Right decls -> do + cliSendMessageC $ + Msg.Info $ + unlines + [ "", + title "Project information", + printInfo "Name" (fst $ head $ AS.takeDecls @AS.App.App decls), + printInfo "Last compile" compileInfo, + printInfo "Project size" projectSize + ] printInfo :: String -> String -> String printInfo key value = Term.applyStyles [Term.Cyan] key ++ ": " <> Term.applyStyles [Term.White] value @@ -70,17 +63,12 @@ readCompileInformation waspDir = do else return "No compile information found" parseWaspFile :: Path' Abs (Dir WaspProjectDir) -> IO (Either String [AS.Decl]) -parseWaspFile waspDir = do - maybeWaspFile <- findWaspFile waspDir - case maybeWaspFile of - Nothing -> return (Left "Couldn't find a single *.wasp file.") - Just waspFile -> - do - waspStr <- readFile (toFilePath waspFile) - return $ - left - ( ("Couldn't parse .wasp file:\n" <>) - . showCompilerErrorForTerminal (waspFile, waspStr) - . Analyzer.getErrorMessageAndCtx - ) - $ Analyzer.analyze waspStr +parseWaspFile waspDir = runExceptT $ do + waspFile <- ExceptT $ findWaspFile waspDir + waspStr <- liftIO $ readFile $ toFilePath waspFile + liftEither $ left (annotateErrorForCli waspFile waspStr) $ Analyzer.analyze waspStr + where + annotateErrorForCli waspFile waspStr = + ("Couldn't parse .wasp file:\n" ++) + . showCompilerErrorForTerminal (waspFile, waspStr) + . Analyzer.getErrorMessageAndCtx diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index 187b106ab6..ed0fe6699c 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -3,15 +3,15 @@ module Wasp.Lib Generator.start, ProjectRootDir, findWaspFile, - analyzeWaspProject, + findAndAnalyzeWaspFile, ) where +import Control.Arrow import Control.Monad.Except import Data.List (find, isSuffixOf) import Data.List.NonEmpty (NonEmpty, fromList, toList) -import StrongPath (Abs, Dir, File', Path', relfile) -import qualified StrongPath as SP +import StrongPath (Abs, Dir, File', Path', Rel, fromAbsDir, fromAbsFile, relfile, toFilePath, ()) import System.Directory (doesDirectoryExist, doesFileExist) import qualified Wasp.Analyzer as Analyzer import Wasp.Analyzer.AnalyzeError (getErrorMessageAndCtx) @@ -27,6 +27,7 @@ import qualified Wasp.Generator as Generator import Wasp.Generator.Common (ProjectRootDir) import Wasp.Generator.ServerGenerator.Common (dotEnvServer) import Wasp.Generator.WebAppGenerator.Common (dotEnvClient) +import Wasp.Util (maybeToEither) import qualified Wasp.Util.IO as Util.IO type CompileError = String @@ -39,8 +40,8 @@ compile :: CompileOptions -> IO ([CompileWarning], [CompileError]) compile waspDir outDir options = do - appSpecOrAnalyzerErrors <- analyzeWaspProject waspDir options - analyzerWarnings <- warnIfDotEnvPresent waspDir + appSpecOrAnalyzerErrors <- findAndAnalyzeWaspFile waspDir options + compileWarnings <- warnIfDotEnvPresent waspDir compilerWarningsAndErrors <- case appSpecOrAnalyzerErrors of Left analyzerErrors -> return ([], toList analyzerErrors) Right appSpec -> @@ -49,16 +50,16 @@ compile waspDir outDir options = do (generatorWarnings, generatorErrors) <- Generator.writeWebAppCode appSpec outDir (sendMessage options) return (map show $ generatorWarningsFilter options generatorWarnings, map show generatorErrors) validationErrors -> return ([], map show validationErrors) - return $ (analyzerWarnings, []) <> compilerWarningsAndErrors + return $ (compileWarnings, []) <> compilerWarningsAndErrors -analyzeWaspProject :: +findAndAnalyzeWaspFile :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> IO (Either (NonEmpty CompileError) AppSpec) -analyzeWaspProject waspDir options = runExceptT $ do - waspFilePath <- ExceptT $ findWaspFilePath waspDir +findAndAnalyzeWaspFile waspDir options = runExceptT $ do + waspFilePath <- ExceptT $ left pure <$> findWaspFile waspDir declarations <- ExceptT $ analyzeWaspFileContent waspFilePath - liftIO $ createAppSpec waspDir options declarations + liftIO $ constructAppSpec waspDir options declarations -- | Checks the wasp directory for potential problems, and issues warnings if any are found. warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO [CompileWarning] @@ -68,16 +69,9 @@ warnIfDotEnvPresent waspDir = do Nothing -> [] Just _ -> ["Wasp .env files should be named .env.server or .env.client, depending on their use."] -findWaspFilePath :: Path' Abs (Dir WaspProjectDir) -> IO (Either (NonEmpty CompileError) (Path' Abs File')) -findWaspFilePath waspDir = do - maybeWaspFilePath <- findWaspFile waspDir - return $ case maybeWaspFilePath of - Nothing -> Left $ fromList ["Couldn't find a single *.wasp file."] - Just waspFilePath -> Right waspFilePath - analyzeWaspFileContent :: Path' Abs File' -> IO (Either (NonEmpty CompileError) [Decl]) analyzeWaspFileContent waspFilePath = do - waspFileContent <- readFile (SP.fromAbsFile waspFilePath) + waspFileContent <- readFile (fromAbsFile waspFilePath) return $ case Analyzer.analyze waspFileContent of Right decls -> Right decls Left analyzeError -> @@ -88,8 +82,8 @@ analyzeWaspFileContent waspFilePath = do (getErrorMessageAndCtx analyzeError) ] -createAppSpec :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> [Decl] -> IO AS.AppSpec -createAppSpec waspDir options decls = do +constructAppSpec :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> [Decl] -> IO AS.AppSpec +constructAppSpec waspDir options decls = do externalServerCodeFiles <- ExternalCode.readFiles (CompileOptions.externalServerCodeDirPath options) externalClientCodeFiles <- @@ -108,14 +102,14 @@ createAppSpec waspDir options decls = do AS.isBuild = CompileOptions.isBuild options } -findWaspFile :: Path' Abs (Dir WaspProjectDir) -> IO (Maybe (Path' Abs File')) +findWaspFile :: Path' Abs (Dir WaspProjectDir) -> IO (Either String (Path' Abs File')) findWaspFile waspDir = do files <- fst <$> Util.IO.listDirectory waspDir - return $ (waspDir SP.) <$> find isWaspFile files + return $ maybeToEither "Couldn't find a single *.wasp file." $ (waspDir ) <$> find isWaspFile files where isWaspFile path = - ".wasp" `isSuffixOf` SP.toFilePath path - && (length (SP.toFilePath path) > length (".wasp" :: String)) + ".wasp" `isSuffixOf` toFilePath path + && (length (toFilePath path) > length (".wasp" :: String)) findDotEnvServer :: Path' Abs (Dir WaspProjectDir) -> IO (Maybe (Path' Abs File')) findDotEnvServer waspDir = findFileInWaspProjectDir waspDir dotEnvServer @@ -128,17 +122,17 @@ findDotEnv waspDir = findFileInWaspProjectDir waspDir [relfile|.env|] findFileInWaspProjectDir :: Path' Abs (Dir WaspProjectDir) -> - Path' (SP.Rel WaspProjectDir) File' -> + Path' (Rel WaspProjectDir) File' -> IO (Maybe (Path' Abs File')) findFileInWaspProjectDir waspDir file = do - let fileAbsFp = waspDir SP. file - fileExists <- doesFileExist $ SP.toFilePath fileAbsFp + let fileAbsFp = waspDir file + fileExists <- doesFileExist $ toFilePath fileAbsFp return $ if fileExists then Just fileAbsFp else Nothing findMigrationsDir :: Path' Abs (Dir WaspProjectDir) -> IO (Maybe (Path' Abs (Dir DbMigrationsDir))) findMigrationsDir waspDir = do - let migrationsAbsPath = waspDir SP. dbMigrationsDirInWaspProjectDir - migrationsExists <- doesDirectoryExist $ SP.fromAbsDir migrationsAbsPath + let migrationsAbsPath = waspDir dbMigrationsDirInWaspProjectDir + migrationsExists <- doesDirectoryExist $ fromAbsDir migrationsAbsPath return $ if migrationsExists then Just migrationsAbsPath else Nothing diff --git a/waspc/src/Wasp/Util.hs b/waspc/src/Wasp/Util.hs index 48168b9de6..a760db4687 100644 --- a/waspc/src/Wasp/Util.hs +++ b/waspc/src/Wasp/Util.hs @@ -29,6 +29,7 @@ module Wasp.Util orIfNothing, orIfNothingM, kebabToCamelCase, + maybeToEither ) where @@ -211,3 +212,8 @@ orIfNothing = flip fromMaybe orIfNothingM :: (Monad m) => m (Maybe a) -> m a -> m a orIfNothingM = flip fromMaybeM + +maybeToEither :: a -> Maybe b -> Either a b +maybeToEither leftValue = \case + Nothing -> Left leftValue + Just rightValue -> Right rightValue From 789dc8f607b5211bbc01c2d2ebe6b3b662f4217d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 24 Oct 2022 23:40:28 +0200 Subject: [PATCH 08/65] Add skeleton comment --- waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs | 1 + waspc/src/Wasp/Util.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index 288fdaa4e0..3296dcada1 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -81,6 +81,7 @@ getAbsoluteWaspProjectDir (ProjectInfo projectName _) = do "Project creation failed" ("Failed to parse absolute path to wasp project dir: " ++ show err) +-- To avoid creating a new project manually, we copy the project directory skeleton from our templates. initializeProjectFromSkeleton :: Path' Abs (Dir Common.WaspProjectDir) -> IO () initializeProjectFromSkeleton absWaspProjectDir = do dataDir <- Data.getAbsDataDirPath diff --git a/waspc/src/Wasp/Util.hs b/waspc/src/Wasp/Util.hs index a760db4687..7cb07349a8 100644 --- a/waspc/src/Wasp/Util.hs +++ b/waspc/src/Wasp/Util.hs @@ -29,7 +29,7 @@ module Wasp.Util orIfNothing, orIfNothingM, kebabToCamelCase, - maybeToEither + maybeToEither, ) where From 6d2960107963d506419d5085ec9de35b14eb4e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 25 Oct 2022 00:01:33 +0200 Subject: [PATCH 09/65] Extract common CommandError message --- .../src/Wasp/Cli/Command/CreateNewProject.hs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index 3296dcada1..04f2bc9f77 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -48,15 +48,14 @@ parseProjectInfo :: String -> Command ProjectInfo parseProjectInfo name | isValidWaspIdentifier appName = return $ ProjectInfo name appName | otherwise = - throwError $ - CommandError "Project creation failed" $ - intercalate - "\n" - [ "The project's name is not in the valid format!", - indent 2 "- It can start with a letter or an underscore.", - indent 2 "- It can contain only letters, numbers, dashes, or underscores.", - indent 2 "- It can't be a Wasp keyword." - ] + throwProjectCreationError $ + intercalate + "\n" + [ "The project's name is not in the valid format!", + indent 2 "- It can start with a letter or an underscore.", + indent 2 "- It can contain only letters, numbers, dashes, or underscores.", + indent 2 "- It can't be a Wasp keyword." + ] where appName = kebabToCamelCase name @@ -65,7 +64,7 @@ createWaspProjectDir projectInfo = do absWaspProjectDir <- getAbsoluteWaspProjectDir projectInfo dirExists <- doesDirExist $ toPathAbsDir absWaspProjectDir if dirExists - then throwError $ CommandError "Project creation failed" $ show absWaspProjectDir ++ " is an existing directory" + then throwProjectCreationError $ show absWaspProjectDir ++ " is an existing directory" else liftIO $ do initializeProjectFromSkeleton absWaspProjectDir writeMainWaspFile absWaspProjectDir projectInfo @@ -76,10 +75,8 @@ getAbsoluteWaspProjectDir (ProjectInfo projectName _) = do case parseAbsDir $ absCwd FP. projectName of Right sp -> return sp Left err -> - throwError $ - CommandError - "Project creation failed" - ("Failed to parse absolute path to wasp project dir: " ++ show err) + throwProjectCreationError $ + "Failed to parse absolute path to wasp project dir: " ++ show err -- To avoid creating a new project manually, we copy the project directory skeleton from our templates. initializeProjectFromSkeleton :: Path' Abs (Dir Common.WaspProjectDir) -> IO () @@ -103,3 +100,6 @@ writeMainWaspFile waspProjectDir (ProjectInfo projectName appName) = writeFile a " component: import Main from \"@ext/MainPage.js\"", "}" ] + +throwProjectCreationError :: String -> Command a +throwProjectCreationError = throwError . CommandError "Project creation failed" From 11846e75eb76b56bdfd3a443a9b08fac79f1fb46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 25 Oct 2022 00:03:08 +0200 Subject: [PATCH 10/65] Separate skeleton comment into two rows --- waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index 04f2bc9f77..eadf29c050 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -78,7 +78,8 @@ getAbsoluteWaspProjectDir (ProjectInfo projectName _) = do throwProjectCreationError $ "Failed to parse absolute path to wasp project dir: " ++ show err --- To avoid creating a new project manually, we copy the project directory skeleton from our templates. +-- To avoid creating the initial files for a new project dynamically, +-- we copy the project directory skeleton from our templates. initializeProjectFromSkeleton :: Path' Abs (Dir Common.WaspProjectDir) -> IO () initializeProjectFromSkeleton absWaspProjectDir = do dataDir <- Data.getAbsDataDirPath From 4f834ecfa99dc24a5d36277306dfe084da993dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 25 Oct 2022 00:08:49 +0200 Subject: [PATCH 11/65] Move server and client dirs into src --- waspc/cli/src/Wasp/Cli/Common.hs | 4 ++-- .../Cli/templates/new/{ => src}/client/.waspignore | 0 .../Cli/templates/new/{ => src}/client/Main.css | 0 .../Cli/templates/new/{ => src}/client/MainPage.js | 0 .../Cli/templates/new/{ => src}/client/waspLogo.png | Bin .../Cli/templates/new/{ => src}/server/.waspignore | 0 6 files changed, 2 insertions(+), 2 deletions(-) rename waspc/data/Cli/templates/new/{ => src}/client/.waspignore (100%) rename waspc/data/Cli/templates/new/{ => src}/client/Main.css (100%) rename waspc/data/Cli/templates/new/{ => src}/client/MainPage.js (100%) rename waspc/data/Cli/templates/new/{ => src}/client/waspLogo.png (100%) rename waspc/data/Cli/templates/new/{ => src}/server/.waspignore (100%) diff --git a/waspc/cli/src/Wasp/Cli/Common.hs b/waspc/cli/src/Wasp/Cli/Common.hs index 5fe611f7e6..33990c5287 100644 --- a/waspc/cli/src/Wasp/Cli/Common.hs +++ b/waspc/cli/src/Wasp/Cli/Common.hs @@ -43,10 +43,10 @@ dotWaspInfoFileInGeneratedCodeDir :: Path' (Rel Wasp.Generator.Common.ProjectRoo dotWaspInfoFileInGeneratedCodeDir = [relfile|.waspinfo|] extServerCodeDirInWaspProjectDir :: Path' (Rel WaspProjectDir) (Dir SourceExternalCodeDir) -extServerCodeDirInWaspProjectDir = [reldir|server|] +extServerCodeDirInWaspProjectDir = [reldir|src/server|] extClientCodeDirInWaspProjectDir :: Path' (Rel WaspProjectDir) (Dir SourceExternalCodeDir) -extClientCodeDirInWaspProjectDir = [reldir|client|] +extClientCodeDirInWaspProjectDir = [reldir|src/client|] waspSays :: String -> IO () waspSays what = putStrLn $ Term.applyStyles [Term.Yellow] what diff --git a/waspc/data/Cli/templates/new/client/.waspignore b/waspc/data/Cli/templates/new/src/client/.waspignore similarity index 100% rename from waspc/data/Cli/templates/new/client/.waspignore rename to waspc/data/Cli/templates/new/src/client/.waspignore diff --git a/waspc/data/Cli/templates/new/client/Main.css b/waspc/data/Cli/templates/new/src/client/Main.css similarity index 100% rename from waspc/data/Cli/templates/new/client/Main.css rename to waspc/data/Cli/templates/new/src/client/Main.css diff --git a/waspc/data/Cli/templates/new/client/MainPage.js b/waspc/data/Cli/templates/new/src/client/MainPage.js similarity index 100% rename from waspc/data/Cli/templates/new/client/MainPage.js rename to waspc/data/Cli/templates/new/src/client/MainPage.js diff --git a/waspc/data/Cli/templates/new/client/waspLogo.png b/waspc/data/Cli/templates/new/src/client/waspLogo.png similarity index 100% rename from waspc/data/Cli/templates/new/client/waspLogo.png rename to waspc/data/Cli/templates/new/src/client/waspLogo.png diff --git a/waspc/data/Cli/templates/new/server/.waspignore b/waspc/data/Cli/templates/new/src/server/.waspignore similarity index 100% rename from waspc/data/Cli/templates/new/server/.waspignore rename to waspc/data/Cli/templates/new/src/server/.waspignore From 385b35c5932884577a2de3efb706f9c943c5086a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 25 Oct 2022 15:21:58 +0200 Subject: [PATCH 12/65] Simplify maybeToEither --- waspc/src/Wasp/Util.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/waspc/src/Wasp/Util.hs b/waspc/src/Wasp/Util.hs index 7cb07349a8..b9b2179ed7 100644 --- a/waspc/src/Wasp/Util.hs +++ b/waspc/src/Wasp/Util.hs @@ -214,6 +214,4 @@ orIfNothingM :: (Monad m) => m (Maybe a) -> m a -> m a orIfNothingM = flip fromMaybeM maybeToEither :: a -> Maybe b -> Either a b -maybeToEither leftValue = \case - Nothing -> Left leftValue - Just rightValue -> Right rightValue +maybeToEither leftValue = maybe (Left leftValue) Right From a7753d245614c10c190cae033136ba9f4fa6cd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 25 Oct 2022 15:56:03 +0200 Subject: [PATCH 13/65] Further refactor Lib.hs --- waspc/cli/src/Wasp/Cli/Command/Deps.hs | 7 +- waspc/src/Wasp/Lib.hs | 99 ++++++++++++++------------ 2 files changed, 55 insertions(+), 51 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/Deps.hs b/waspc/cli/src/Wasp/Cli/Command/Deps.hs index e3c3262255..9da61e9f1d 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Deps.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Deps.hs @@ -5,7 +5,6 @@ where import Control.Monad.Except (throwError) import Control.Monad.IO.Class (liftIO) -import Data.List.NonEmpty (toList) import Wasp.AppSpec (AppSpec) import qualified Wasp.AppSpec.App.Dependency as AS.Dependency import Wasp.Cli.Command (Command, CommandError (..)) @@ -15,16 +14,16 @@ import Wasp.Cli.Terminal (title) import qualified Wasp.Generator.NpmDependencies as N import qualified Wasp.Generator.ServerGenerator as ServerGenerator import qualified Wasp.Generator.WebAppGenerator as WebAppGenerator -import Wasp.Lib (findAndAnalyzeWaspFile) +import Wasp.Lib (analyzeProject) import qualified Wasp.Util.Terminal as Term deps :: Command () deps = do waspProjectDir <- findWaspProjectRootDirFromCwd - appSpecOrAnalyzerErrors <- liftIO $ findAndAnalyzeWaspFile waspProjectDir (defaultCompileOptions waspProjectDir) + appSpecOrAnalyzerErrors <- liftIO $ analyzeProject waspProjectDir (defaultCompileOptions waspProjectDir) appSpec <- either - (throwError . CommandError "Determining dependencies failed due to a compilation error in your Wasp project" . unwords . toList) + (throwError . CommandError "Determining dependencies failed due to a compilation error in your Wasp project" . unwords) return appSpecOrAnalyzerErrors diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index ed0fe6699c..0c1215bd7b 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -3,21 +3,20 @@ module Wasp.Lib Generator.start, ProjectRootDir, findWaspFile, - findAndAnalyzeWaspFile, + analyzeProject, ) where import Control.Arrow import Control.Monad.Except import Data.List (find, isSuffixOf) -import Data.List.NonEmpty (NonEmpty, fromList, toList) +import Data.Maybe (maybeToList) import StrongPath (Abs, Dir, File', Path', Rel, fromAbsDir, fromAbsFile, relfile, toFilePath, ()) import System.Directory (doesDirectoryExist, doesFileExist) import qualified Wasp.Analyzer as Analyzer import Wasp.Analyzer.AnalyzeError (getErrorMessageAndCtx) -import Wasp.AppSpec (AppSpec (externalClientFiles), Decl) import qualified Wasp.AppSpec as AS -import qualified Wasp.AppSpec.Valid as ASV +import Wasp.AppSpec.Valid (validateAppSpec) import Wasp.Common (DbMigrationsDir, WaspProjectDir, dbMigrationsDirInWaspProjectDir) import Wasp.CompileOptions (CompileOptions (generatorWarningsFilter), sendMessage) import qualified Wasp.CompileOptions as CompileOptions @@ -40,49 +39,52 @@ compile :: CompileOptions -> IO ([CompileWarning], [CompileError]) compile waspDir outDir options = do - appSpecOrAnalyzerErrors <- findAndAnalyzeWaspFile waspDir options - compileWarnings <- warnIfDotEnvPresent waspDir - compilerWarningsAndErrors <- case appSpecOrAnalyzerErrors of - Left analyzerErrors -> return ([], toList analyzerErrors) - Right appSpec -> - case ASV.validateAppSpec appSpec of - [] -> do - (generatorWarnings, generatorErrors) <- Generator.writeWebAppCode appSpec outDir (sendMessage options) - return (map show $ generatorWarningsFilter options generatorWarnings, map show generatorErrors) - validationErrors -> return ([], map show validationErrors) - return $ (compileWarnings, []) <> compilerWarningsAndErrors + compileWarnings <- maybeToList <$> warnIfDotEnvPresent waspDir + appSpecOrCompileErrors <- analyzeProject waspDir options + compileWarningsAndErrors <- case appSpecOrCompileErrors of + Left analyzerErrors -> return (compileWarnings, analyzerErrors) + Right appSpec -> generateCode appSpec outDir options + return $ (compileWarnings, []) <> compileWarningsAndErrors -findAndAnalyzeWaspFile :: +analyzeProject :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> - IO (Either (NonEmpty CompileError) AppSpec) -findAndAnalyzeWaspFile waspDir options = runExceptT $ do + IO (Either [CompileError] AS.AppSpec) +analyzeProject waspDir options = runExceptT $ do waspFilePath <- ExceptT $ left pure <$> findWaspFile waspDir - declarations <- ExceptT $ analyzeWaspFileContent waspFilePath - liftIO $ constructAppSpec waspDir options declarations + declarations <- ExceptT $ left pure <$> analyzeWaspFileContent waspFilePath + ExceptT $ constructAppSpec waspDir options declarations + +generateCode :: + AS.AppSpec -> + Path' Abs (Dir ProjectRootDir) -> + CompileOptions -> + IO ([CompileError], [CompileWarning]) +generateCode appSpec outDir options = do + (generatorWarnings, generatorErrors) <- Generator.writeWebAppCode appSpec outDir (sendMessage options) + let filteredWarnings = generatorWarningsFilter options generatorWarnings + return (map show filteredWarnings, map show generatorErrors) -- | Checks the wasp directory for potential problems, and issues warnings if any are found. -warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO [CompileWarning] -warnIfDotEnvPresent waspDir = do - maybeDotEnvFile <- findDotEnv waspDir - return $ case maybeDotEnvFile of - Nothing -> [] - Just _ -> ["Wasp .env files should be named .env.server or .env.client, depending on their use."] +warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO (Maybe CompileWarning) +warnIfDotEnvPresent waspDir = (warningMessage <$) <$> findDotEnv waspDir + where + warningMessage = "Wasp .env files should be named .env.server or .env.client, depending on their use." -analyzeWaspFileContent :: Path' Abs File' -> IO (Either (NonEmpty CompileError) [Decl]) +analyzeWaspFileContent :: Path' Abs File' -> IO (Either CompileError [AS.Decl]) analyzeWaspFileContent waspFilePath = do waspFileContent <- readFile (fromAbsFile waspFilePath) - return $ case Analyzer.analyze waspFileContent of - Right decls -> Right decls - Left analyzeError -> - Left $ - fromList - [ showCompilerErrorForTerminal - (waspFilePath, waspFileContent) - (getErrorMessageAndCtx analyzeError) - ] + let declsOrAnalyzeError = Analyzer.analyze waspFileContent + return $ + left + (showCompilerErrorForTerminal (waspFilePath, waspFileContent) . getErrorMessageAndCtx) + declsOrAnalyzeError -constructAppSpec :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> [Decl] -> IO AS.AppSpec +constructAppSpec :: + Path' Abs (Dir WaspProjectDir) -> + CompileOptions -> + [AS.Decl] -> + IO (Either [CompileError] AS.AppSpec) constructAppSpec waspDir options decls = do externalServerCodeFiles <- ExternalCode.readFiles (CompileOptions.externalServerCodeDirPath options) @@ -91,16 +93,19 @@ constructAppSpec waspDir options decls = do maybeDotEnvServerFile <- findDotEnvServer waspDir maybeDotEnvClientFile <- findDotEnvClient waspDir maybeMigrationsDir <- findMigrationsDir waspDir - return - AS.AppSpec - { AS.decls = decls, - AS.externalClientFiles = externalClientCodeFiles, - AS.externalServerFiles = externalServerCodeFiles, - AS.migrationsDir = maybeMigrationsDir, - AS.dotEnvServerFile = maybeDotEnvServerFile, - AS.dotEnvClientFile = maybeDotEnvClientFile, - AS.isBuild = CompileOptions.isBuild options - } + let appSpec = + AS.AppSpec + { AS.decls = decls, + AS.externalClientFiles = externalClientCodeFiles, + AS.externalServerFiles = externalServerCodeFiles, + AS.migrationsDir = maybeMigrationsDir, + AS.dotEnvServerFile = maybeDotEnvServerFile, + AS.dotEnvClientFile = maybeDotEnvClientFile, + AS.isBuild = CompileOptions.isBuild options + } + return $ case validateAppSpec appSpec of + [] -> Right appSpec + validationErrors -> Left $ map show validationErrors findWaspFile :: Path' Abs (Dir WaspProjectDir) -> IO (Either String (Path' Abs File')) findWaspFile waspDir = do From 53dc889ab9244a6038f0a85ccbb62afd4c321040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 25 Oct 2022 15:59:24 +0200 Subject: [PATCH 14/65] Further simplify skeleton comment --- waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index eadf29c050..752216b8cc 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -78,8 +78,7 @@ getAbsoluteWaspProjectDir (ProjectInfo projectName _) = do throwProjectCreationError $ "Failed to parse absolute path to wasp project dir: " ++ show err --- To avoid creating the initial files for a new project dynamically, --- we copy the project directory skeleton from our templates. +-- Copies prepared files to the new project directory. initializeProjectFromSkeleton :: Path' Abs (Dir Common.WaspProjectDir) -> IO () initializeProjectFromSkeleton absWaspProjectDir = do dataDir <- Data.getAbsDataDirPath From 40f56d242d25ede877ca6460560298ceb3f2f9a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 10:40:48 +0100 Subject: [PATCH 15/65] Add shared code directory to project structure --- waspc/cli/src/Wasp/Cli/Command/Build.hs | 1 + waspc/cli/src/Wasp/Cli/Command/Compile.hs | 1 + waspc/cli/src/Wasp/Cli/Common.hs | 6 +++- .../new/src/{client => }/.waspignore | 0 .../Cli/templates/new/src/server/.waspignore | 3 -- waspc/src/Wasp/AppSpec.hs | 6 ++-- waspc/src/Wasp/CompileOptions.hs | 1 + waspc/src/Wasp/Generator/JsImport.hs | 2 +- waspc/src/Wasp/Generator/ServerGenerator.hs | 22 +++++++------- .../Wasp/Generator/ServerGenerator/AuthG.hs | 16 +++++----- .../ServerGenerator/ExternalCodeGenerator.hs | 29 ++++++++++++++----- .../Generator/ServerGenerator/JobGenerator.hs | 6 ++-- .../Generator/ServerGenerator/OperationsG.hs | 7 +++-- waspc/src/Wasp/Generator/WebAppGenerator.hs | 23 ++++++++------- .../WebAppGenerator/ExternalCodeGenerator.hs | 28 +++++++++++++----- .../WebAppGenerator/RouterGenerator.hs | 4 +-- waspc/src/Wasp/Lib.hs | 3 ++ 17 files changed, 97 insertions(+), 61 deletions(-) rename waspc/data/Cli/templates/new/src/{client => }/.waspignore (100%) delete mode 100644 waspc/data/Cli/templates/new/src/server/.waspignore diff --git a/waspc/cli/src/Wasp/Cli/Command/Build.hs b/waspc/cli/src/Wasp/Cli/Command/Build.hs index 141d89ea66..336973682a 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Build.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Build.hs @@ -57,6 +57,7 @@ buildIO waspProjectDir buildDir = compileIOWithOptions options waspProjectDir bu CompileOptions { externalClientCodeDirPath = waspProjectDir Common.extClientCodeDirInWaspProjectDir, externalServerCodeDirPath = waspProjectDir Common.extServerCodeDirInWaspProjectDir, + externalSharedCodeDirPath = waspProjectDir Common.extSharedCodeDirInWaspProjectDir, isBuild = True, sendMessage = cliSendMessage, -- Ignore "DB needs migration warnings" during build, as that is not a required step. diff --git a/waspc/cli/src/Wasp/Cli/Command/Compile.hs b/waspc/cli/src/Wasp/Cli/Command/Compile.hs index d89cce4909..27a1b89341 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Compile.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Compile.hs @@ -75,6 +75,7 @@ defaultCompileOptions waspProjectDir = CompileOptions { externalServerCodeDirPath = waspProjectDir Common.extServerCodeDirInWaspProjectDir, externalClientCodeDirPath = waspProjectDir Common.extClientCodeDirInWaspProjectDir, + externalSharedCodeDirPath = waspProjectDir Common.extSharedCodeDirInWaspProjectDir, isBuild = False, sendMessage = cliSendMessage, generatorWarningsFilter = id diff --git a/waspc/cli/src/Wasp/Cli/Common.hs b/waspc/cli/src/Wasp/Cli/Common.hs index 33990c5287..cece47fefc 100644 --- a/waspc/cli/src/Wasp/Cli/Common.hs +++ b/waspc/cli/src/Wasp/Cli/Common.hs @@ -5,8 +5,9 @@ module Wasp.Cli.Common dotWaspDirInWaspProjectDir, dotWaspRootFileInWaspProjectDir, dotWaspInfoFileInGeneratedCodeDir, - extClientCodeDirInWaspProjectDir, extServerCodeDirInWaspProjectDir, + extClientCodeDirInWaspProjectDir, + extSharedCodeDirInWaspProjectDir, generatedCodeDirInDotWaspDir, buildDirInDotWaspDir, waspSays, @@ -48,6 +49,9 @@ extServerCodeDirInWaspProjectDir = [reldir|src/server|] extClientCodeDirInWaspProjectDir :: Path' (Rel WaspProjectDir) (Dir SourceExternalCodeDir) extClientCodeDirInWaspProjectDir = [reldir|src/client|] +extSharedCodeDirInWaspProjectDir :: Path' (Rel WaspProjectDir) (Dir SourceExternalCodeDir) +extSharedCodeDirInWaspProjectDir = [reldir|src/shared|] + waspSays :: String -> IO () waspSays what = putStrLn $ Term.applyStyles [Term.Yellow] what diff --git a/waspc/data/Cli/templates/new/src/client/.waspignore b/waspc/data/Cli/templates/new/src/.waspignore similarity index 100% rename from waspc/data/Cli/templates/new/src/client/.waspignore rename to waspc/data/Cli/templates/new/src/.waspignore diff --git a/waspc/data/Cli/templates/new/src/server/.waspignore b/waspc/data/Cli/templates/new/src/server/.waspignore deleted file mode 100644 index 1c432f30d9..0000000000 --- a/waspc/data/Cli/templates/new/src/server/.waspignore +++ /dev/null @@ -1,3 +0,0 @@ -# Ignore editor tmp files -**/*~ -**/#*# diff --git a/waspc/src/Wasp/AppSpec.hs b/waspc/src/Wasp/AppSpec.hs index 0ff29ab1ca..f4a14d74d8 100644 --- a/waspc/src/Wasp/AppSpec.hs +++ b/waspc/src/Wasp/AppSpec.hs @@ -37,10 +37,12 @@ import Wasp.Common (DbMigrationsDir) data AppSpec = AppSpec { -- | List of declarations like App, Page, Route, ... that describe the web app. decls :: [Decl], - -- | List of external code files (they are referenced/used by the declarations). + -- | List of external server code files (they are referenced/used in the declarations). externalServerFiles :: [ExternalCode.File], - -- | List of external code files (they are referenced/used by the declarations). + -- | List of external client code files (they are referenced/used in the declarations). externalClientFiles :: [ExternalCode.File], + -- | List of files with external code shared between the server and the client. + externalSharedFiles :: [ExternalCode.File], -- | Absolute path to the directory in wasp project source that contains external code files. migrationsDir :: Maybe (Path' Abs (Dir DbMigrationsDir)), -- | Absolute path to the .env.server file in wasp project source. It contains env variables to be diff --git a/waspc/src/Wasp/CompileOptions.hs b/waspc/src/Wasp/CompileOptions.hs index 156fc6718b..d0174cd9b7 100644 --- a/waspc/src/Wasp/CompileOptions.hs +++ b/waspc/src/Wasp/CompileOptions.hs @@ -14,6 +14,7 @@ import Wasp.Message (SendMessage) data CompileOptions = CompileOptions { externalServerCodeDirPath :: !(Path' Abs (Dir SourceExternalCodeDir)), externalClientCodeDirPath :: !(Path' Abs (Dir SourceExternalCodeDir)), + externalSharedCodeDirPath :: !(Path' Abs (Dir SourceExternalCodeDir)), isBuild :: !Bool, -- We give the compiler the ability to send messages. The code that -- invokes the compiler (such as the CLI) can then implement a way diff --git a/waspc/src/Wasp/Generator/JsImport.hs b/waspc/src/Wasp/Generator/JsImport.hs index 260ed878c3..a4e1dfdaf2 100644 --- a/waspc/src/Wasp/Generator/JsImport.hs +++ b/waspc/src/Wasp/Generator/JsImport.hs @@ -10,7 +10,7 @@ import Wasp.Generator.ExternalCodeGenerator.Common (GeneratedExternalCodeDir) getJsImportDetailsForExtFnImport :: -- | Path to generated external code directory, relative to the directory in which file doing the importing is. - Path Posix (Rel (Dir a)) (Dir GeneratedExternalCodeDir) -> + Path Posix (Rel a) (Dir GeneratedExternalCodeDir) -> AS.ExtImport.ExtImport -> -- | (importIdentifier, importStmt) -- - importIdentifier -> Identifier via which you can access ext js function after you import it with importStmt. diff --git a/waspc/src/Wasp/Generator/ServerGenerator.hs b/waspc/src/Wasp/Generator/ServerGenerator.hs index 6c72d23bec..f4e05b4888 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator.hs @@ -22,8 +22,8 @@ import StrongPath Path', Posix, Rel, + relDirToPosix, reldir, - reldirP, relfile, (), ) @@ -47,7 +47,7 @@ import qualified Wasp.Generator.NpmDependencies as N import Wasp.Generator.ServerGenerator.AuthG (genAuth) import qualified Wasp.Generator.ServerGenerator.Common as C import Wasp.Generator.ServerGenerator.ConfigG (genConfigFile) -import qualified Wasp.Generator.ServerGenerator.ExternalCodeGenerator as ServerExternalCodeGenerator +import Wasp.Generator.ServerGenerator.ExternalCodeGenerator (extServerCodeDirInServerSrcDir, extServerCodeGeneratorStrategy, extSharedCodeGeneratorStrategy) import Wasp.Generator.ServerGenerator.JobGenerator (depsRequiredByJobs, genJobExecutors, genJobs) import Wasp.Generator.ServerGenerator.OperationsG (genOperations) import Wasp.Generator.ServerGenerator.OperationsRoutesG (genOperationsRoutes) @@ -62,7 +62,8 @@ genServer spec = genGitignore ] <++> genSrcDir spec - <++> genExternalCodeDir ServerExternalCodeGenerator.generatorStrategy (AS.externalServerFiles spec) + <++> genExternalCodeDir extServerCodeGeneratorStrategy (AS.externalServerFiles spec) + <++> genExternalCodeDir extSharedCodeGeneratorStrategy (AS.externalSharedFiles spec) <++> genDotEnv spec <++> genJobs spec <++> genJobExecutors @@ -73,10 +74,10 @@ genDotEnv spec = return $ case AS.dotEnvServerFile spec of Just srcFilePath | not $ AS.isBuild spec -> - [ createCopyFileDraft - (C.serverRootDirInProjectRootDir dotEnvInServerRootDir) - srcFilePath - ] + [ createCopyFileDraft + (C.serverRootDirInProjectRootDir dotEnvInServerRootDir) + srcFilePath + ] _ -> [] dotEnvInServerRootDir :: Path' (Rel C.ServerRootDir) File' @@ -206,13 +207,12 @@ genServerJs spec = ) where maybeSetupJsFunction = AS.App.Server.setupFn =<< AS.App.server (snd $ getApp spec) - maybeSetupJsFnImportDetails = getJsImportDetailsForExtFnImport relPosixPathFromSrcDirToExtSrcDir <$> maybeSetupJsFunction + maybeSetupJsFnImportDetails = getJsImportDetailsForExtFnImport extServerCodeDirInServerSrcDirP <$> maybeSetupJsFunction (maybeSetupJsFnImportIdentifier, maybeSetupJsFnImportStmt) = (fst <$> maybeSetupJsFnImportDetails, snd <$> maybeSetupJsFnImportDetails) --- | TODO: Make this not hardcoded! -relPosixPathFromSrcDirToExtSrcDir :: Path Posix (Rel (Dir C.ServerSrcDir)) (Dir GeneratedExternalCodeDir) -relPosixPathFromSrcDirToExtSrcDir = [reldirP|./ext-src|] +extServerCodeDirInServerSrcDirP :: Path Posix (Rel C.ServerSrcDir) (Dir GeneratedExternalCodeDir) +extServerCodeDirInServerSrcDirP = fromJust $ relDirToPosix extServerCodeDirInServerSrcDir genRoutesDir :: AppSpec -> Generator [FileDraft] genRoutesDir spec = diff --git a/waspc/src/Wasp/Generator/ServerGenerator/AuthG.hs b/waspc/src/Wasp/Generator/ServerGenerator/AuthG.hs index c3a10fb783..20251f5805 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator/AuthG.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator/AuthG.hs @@ -4,7 +4,7 @@ module Wasp.Generator.ServerGenerator.AuthG where import Data.Aeson (object, (.=)) -import Data.Maybe (fromMaybe, isJust) +import Data.Maybe (fromJust, fromMaybe, isJust) import StrongPath ( Dir, File', @@ -28,6 +28,7 @@ import Wasp.Generator.FileDraft (FileDraft) import Wasp.Generator.JsImport (getJsImportDetailsForExtFnImport) import Wasp.Generator.Monad (Generator) import qualified Wasp.Generator.ServerGenerator.Common as C +import Wasp.Generator.ServerGenerator.ExternalCodeGenerator (extServerCodeDirInServerSrcDir) import Wasp.Util ((<++>)) import qualified Wasp.Util as Util @@ -174,11 +175,11 @@ genUtilsJs auth = return $ C.mkTmplFdWithDstAndData tmplFile dstFile (Just tmplD genGoogleAuth :: AS.Auth.Auth -> Generator [FileDraft] genGoogleAuth auth | AS.Auth.isGoogleAuthEnabled auth = - sequence - [ copyTmplFile [relfile|routes/auth/passport/google/google.js|], - copyTmplFile [relfile|routes/auth/passport/google/googleDefaults.js|], - genGoogleConfigJs auth - ] + sequence + [ copyTmplFile [relfile|routes/auth/passport/google/google.js|], + copyTmplFile [relfile|routes/auth/passport/google/googleDefaults.js|], + genGoogleConfigJs auth + ] | otherwise = return [] where copyTmplFile = return . C.mkSrcTmplFd @@ -209,9 +210,8 @@ genGoogleConfigJs auth = return $ C.mkTmplFdWithDstAndData tmplFile dstFile (Jus maybeOnSignInFnImportDetails = getJsImportDetailsForExtFnImport relPosixPathFromGoogleAuthDirToExtSrcDir <$> maybeGetUserFieldsFn (maybeOnSignInFnImportIdentifier, maybeOnSignInFnImportStmt) = (fst <$> maybeOnSignInFnImportDetails, snd <$> maybeOnSignInFnImportDetails) --- | TODO: Make this not hardcoded! relPosixPathFromGoogleAuthDirToExtSrcDir :: Path Posix (Rel (Dir C.ServerSrcDir)) (Dir GeneratedExternalCodeDir) -relPosixPathFromGoogleAuthDirToExtSrcDir = [reldirP|../../../../ext-src|] +relPosixPathFromGoogleAuthDirToExtSrcDir = [reldirP|../../../../|] fromJust (SP.relDirToPosix extServerCodeDirInServerSrcDir) getOnAuthSucceededRedirectToOrDefault :: AS.Auth.Auth -> String getOnAuthSucceededRedirectToOrDefault auth = fromMaybe "/" (AS.Auth.onAuthSucceededRedirectTo auth) diff --git a/waspc/src/Wasp/Generator/ServerGenerator/ExternalCodeGenerator.hs b/waspc/src/Wasp/Generator/ServerGenerator/ExternalCodeGenerator.hs index c72ef6debb..58b038f350 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator/ExternalCodeGenerator.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator/ExternalCodeGenerator.hs @@ -1,6 +1,7 @@ module Wasp.Generator.ServerGenerator.ExternalCodeGenerator - ( extCodeDirInServerSrcDir, - generatorStrategy, + ( extServerCodeGeneratorStrategy, + extServerCodeDirInServerSrcDir, + extSharedCodeGeneratorStrategy, ) where @@ -10,16 +11,28 @@ import Wasp.Generator.ExternalCodeGenerator.Common (ExternalCodeGeneratorStrateg import Wasp.Generator.ExternalCodeGenerator.Js (resolveJsFileWaspImportsForExtCodeDir) import qualified Wasp.Generator.ServerGenerator.Common as C --- | Relative path to directory where external code will be generated. -extCodeDirInServerSrcDir :: Path' (Rel C.ServerSrcDir) (Dir GeneratedExternalCodeDir) -extCodeDirInServerSrcDir = [reldir|ext-src|] +extServerCodeGeneratorStrategy :: ExternalCodeGeneratorStrategy +extServerCodeGeneratorStrategy = mkExtCodeGeneratorStrategy extServerCodeDirInServerSrcDir -generatorStrategy :: ExternalCodeGeneratorStrategy -generatorStrategy = +extSharedCodeGeneratorStrategy :: ExternalCodeGeneratorStrategy +extSharedCodeGeneratorStrategy = mkExtCodeGeneratorStrategy extSharedCodeDirInServerSrcDir + +-- | Relative path to the directory where external server code will be generated. +-- Relative to the server src dir. +extServerCodeDirInServerSrcDir :: Path' (Rel C.ServerSrcDir) (Dir GeneratedExternalCodeDir) +extServerCodeDirInServerSrcDir = [reldir|ext-src|] + +-- | Relative path to the directory where external shared code will be generated. +-- Relative to the server src dir. +extSharedCodeDirInServerSrcDir :: Path' (Rel C.ServerSrcDir) (Dir GeneratedExternalCodeDir) +extSharedCodeDirInServerSrcDir = [reldir|shared|] + +mkExtCodeGeneratorStrategy :: Path' (Rel C.ServerSrcDir) (Dir GeneratedExternalCodeDir) -> ExternalCodeGeneratorStrategy +mkExtCodeGeneratorStrategy extCodeDirInServerSrcDir = ExternalCodeGeneratorStrategy { _resolveJsFileWaspImports = resolveJsFileWaspImportsForExtCodeDir (SP.castRel extCodeDirInServerSrcDir), _extCodeDirInProjectRootDir = C.serverRootDirInProjectRootDir C.serverSrcDirInServerRootDir extCodeDirInServerSrcDir - } + } \ No newline at end of file diff --git a/waspc/src/Wasp/Generator/ServerGenerator/JobGenerator.hs b/waspc/src/Wasp/Generator/ServerGenerator/JobGenerator.hs index b1abae19d9..8288ec812d 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator/JobGenerator.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator/JobGenerator.hs @@ -43,6 +43,7 @@ import Wasp.Generator.ServerGenerator.Common srcDirInServerTemplatesDir, ) import qualified Wasp.Generator.ServerGenerator.Common as C +import Wasp.Generator.ServerGenerator.ExternalCodeGenerator (extServerCodeDirInServerSrcDir) import qualified Wasp.SemanticVersion as SV genJobs :: AppSpec -> Generator [FileDraft] @@ -107,9 +108,8 @@ genAllJobImports spec = [ "name" .= jobName ] --- | TODO: Make this not hardcoded! -relPosixPathFromJobFileToExtSrcDir :: Path Posix (Rel (Dir ServerSrcDir)) (Dir GeneratedExternalCodeDir) -relPosixPathFromJobFileToExtSrcDir = [reldirP|../ext-src|] +relPosixPathFromJobFileToExtSrcDir :: Path Posix (Rel ServerSrcDir) (Dir GeneratedExternalCodeDir) +relPosixPathFromJobFileToExtSrcDir = [reldirP|../|] SP. fromJust (SP.relDirToPosix extServerCodeDirInServerSrcDir) genJobExecutors :: Generator [FileDraft] genJobExecutors = return $ jobExecutorFds ++ jobExecutorHelperFds diff --git a/waspc/src/Wasp/Generator/ServerGenerator/OperationsG.hs b/waspc/src/Wasp/Generator/ServerGenerator/OperationsG.hs index 09f04bba7c..af9f1101c5 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator/OperationsG.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator/OperationsG.hs @@ -11,7 +11,7 @@ where import Data.Aeson (object, (.=)) import qualified Data.Aeson as Aeson import Data.Maybe (fromJust) -import StrongPath (Dir, Dir', File', Path, Path', Posix, Rel, reldir, reldirP, relfile, ()) +import StrongPath (Dir, Dir', File', Path, Path', Posix, Rel, relDirToPosix, reldir, reldirP, relfile, ()) import qualified StrongPath as SP import Wasp.AppSpec (AppSpec) import qualified Wasp.AppSpec as AS @@ -23,6 +23,7 @@ import Wasp.Generator.FileDraft (FileDraft) import Wasp.Generator.JsImport (getJsImportDetailsForExtFnImport) import Wasp.Generator.Monad (Generator) import qualified Wasp.Generator.ServerGenerator.Common as C +import Wasp.Generator.ServerGenerator.ExternalCodeGenerator (extServerCodeDirInServerSrcDir) import Wasp.Util ((<++>)) genOperations :: AppSpec -> Generator [FileDraft] @@ -70,9 +71,9 @@ operationFileInSrcDir :: AS.Operation.Operation -> Path' (Rel C.ServerSrcDir) Fi operationFileInSrcDir (AS.Operation.QueryOp name _) = queryFileInSrcDir name operationFileInSrcDir (AS.Operation.ActionOp name _) = actionFileInSrcDir name --- | TODO: Make this not hardcoded! relPosixPathFromOperationFileToExtSrcDir :: Path Posix (Rel Dir') (Dir GeneratedExternalCodeDir) -relPosixPathFromOperationFileToExtSrcDir = [reldirP|../ext-src/|] +relPosixPathFromOperationFileToExtSrcDir = + [reldirP|../|] fromJust (relDirToPosix extServerCodeDirInServerSrcDir) operationTmplData :: AS.Operation.Operation -> Aeson.Value operationTmplData operation = diff --git a/waspc/src/Wasp/Generator/WebAppGenerator.hs b/waspc/src/Wasp/Generator/WebAppGenerator.hs index 208b461487..ae0bb7d352 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator.hs @@ -6,7 +6,7 @@ where import Data.Aeson (object, (.=)) import Data.List (intercalate) -import Data.Maybe (fromMaybe, isJust) +import Data.Maybe (fromJust, fromMaybe, isJust) import StrongPath ( Dir, File', @@ -14,10 +14,10 @@ import StrongPath Path', Posix, Rel, + relDirToPosix, relfile, (), ) -import StrongPath.TH (reldirP) import Wasp.AppSpec (AppSpec) import qualified Wasp.AppSpec as AS import qualified Wasp.AppSpec.App as AS.App @@ -34,7 +34,7 @@ import Wasp.Generator.Monad (Generator) import qualified Wasp.Generator.NpmDependencies as N import Wasp.Generator.WebAppGenerator.AuthG (genAuth) import qualified Wasp.Generator.WebAppGenerator.Common as C -import qualified Wasp.Generator.WebAppGenerator.ExternalCodeGenerator as WebAppExternalCodeGenerator +import Wasp.Generator.WebAppGenerator.ExternalCodeGenerator (extClientCodeDirInWebAppSrcDir, extClientCodeGeneratorStrategy, extSharedCodeGeneratorStrategy) import Wasp.Generator.WebAppGenerator.OperationsGenerator (genOperations) import Wasp.Generator.WebAppGenerator.RouterGenerator (genRouter) import Wasp.Util ((<++>)) @@ -50,7 +50,8 @@ genWebApp spec = do ] <++> genPublicDir spec <++> genSrcDir spec - <++> genExternalCodeDir WebAppExternalCodeGenerator.generatorStrategy (AS.externalClientFiles spec) + <++> genExternalCodeDir extClientCodeGeneratorStrategy (AS.externalClientFiles spec) + <++> genExternalCodeDir extSharedCodeGeneratorStrategy (AS.externalSharedFiles spec) <++> genDotEnv spec genDotEnv :: AppSpec -> Generator [FileDraft] @@ -58,10 +59,10 @@ genDotEnv spec = return $ case AS.dotEnvClientFile spec of Just srcFilePath | not $ AS.isBuild spec -> - [ createCopyFileDraft - (C.webAppRootDirInProjectRootDir dotEnvInWebAppRootDir) - srcFilePath - ] + [ createCopyFileDraft + (C.webAppRootDirInProjectRootDir dotEnvInWebAppRootDir) + srcFilePath + ] _ -> [] dotEnvInWebAppRootDir :: Path' (Rel C.WebAppRootDir) File' @@ -199,9 +200,9 @@ genIndexJs spec = ) where maybeSetupJsFunction = AS.App.Client.setupFn =<< AS.App.client (snd $ getApp spec) - maybeSetupJsFnImportDetails = getJsImportDetailsForExtFnImport relPosixPathFromSrcDirToExtSrcDir <$> maybeSetupJsFunction + maybeSetupJsFnImportDetails = getJsImportDetailsForExtFnImport extClientCodeDirInWebAppSrcDirP <$> maybeSetupJsFunction (maybeSetupJsFnImportIdentifier, maybeSetupJsFnImportStmt) = (fst <$> maybeSetupJsFnImportDetails, snd <$> maybeSetupJsFnImportDetails) -relPosixPathFromSrcDirToExtSrcDir :: Path Posix (Rel (Dir C.WebAppSrcDir)) (Dir GeneratedExternalCodeDir) -relPosixPathFromSrcDirToExtSrcDir = [reldirP|./ext-src|] +extClientCodeDirInWebAppSrcDirP :: Path Posix (Rel C.WebAppSrcDir) (Dir GeneratedExternalCodeDir) +extClientCodeDirInWebAppSrcDirP = fromJust $ relDirToPosix extClientCodeDirInWebAppSrcDir diff --git a/waspc/src/Wasp/Generator/WebAppGenerator/ExternalCodeGenerator.hs b/waspc/src/Wasp/Generator/WebAppGenerator/ExternalCodeGenerator.hs index 5f8ee5ac58..d1d2441325 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator/ExternalCodeGenerator.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator/ExternalCodeGenerator.hs @@ -1,6 +1,7 @@ module Wasp.Generator.WebAppGenerator.ExternalCodeGenerator - ( extCodeDirInWebAppSrcDir, - generatorStrategy, + ( extClientCodeGeneratorStrategy, + extSharedCodeGeneratorStrategy, + extClientCodeDirInWebAppSrcDir ) where @@ -10,17 +11,28 @@ import Wasp.Generator.ExternalCodeGenerator.Common (ExternalCodeGeneratorStrateg import Wasp.Generator.ExternalCodeGenerator.Js (resolveJsFileWaspImportsForExtCodeDir) import qualified Wasp.Generator.WebAppGenerator.Common as C --- | Relative path to directory where external code will be generated. +extClientCodeGeneratorStrategy :: ExternalCodeGeneratorStrategy +extClientCodeGeneratorStrategy = mkExtCodeGeneratorStrategy extClientCodeDirInWebAppSrcDir + +extSharedCodeGeneratorStrategy :: ExternalCodeGeneratorStrategy +extSharedCodeGeneratorStrategy = mkExtCodeGeneratorStrategy extSharedCodeDirInWebAppSrcDir + +-- | Relative path to the directory where external client code will be generated. +-- Relative to web app src dir. +extClientCodeDirInWebAppSrcDir :: Path' (Rel C.WebAppSrcDir) (Dir GeneratedExternalCodeDir) +extClientCodeDirInWebAppSrcDir = [reldir|ext-src|] + +-- | Relative path to the directory where external shared code will be generated. -- Relative to web app src dir. -extCodeDirInWebAppSrcDir :: Path' (Rel C.WebAppSrcDir) (Dir GeneratedExternalCodeDir) -extCodeDirInWebAppSrcDir = [reldir|ext-src|] +extSharedCodeDirInWebAppSrcDir :: Path' (Rel C.WebAppSrcDir) (Dir GeneratedExternalCodeDir) +extSharedCodeDirInWebAppSrcDir = [reldir|shared|] -generatorStrategy :: ExternalCodeGeneratorStrategy -generatorStrategy = +mkExtCodeGeneratorStrategy :: Path' (Rel C.WebAppSrcDir) (Dir GeneratedExternalCodeDir) -> ExternalCodeGeneratorStrategy +mkExtCodeGeneratorStrategy extCodeDirInWebAppSrcDir = ExternalCodeGeneratorStrategy { _resolveJsFileWaspImports = resolveJsFileWaspImportsForExtCodeDir (SP.castRel extCodeDirInWebAppSrcDir), _extCodeDirInProjectRootDir = C.webAppRootDirInProjectRootDir C.webAppSrcDirInWebAppRootDir extCodeDirInWebAppSrcDir - } + } \ No newline at end of file diff --git a/waspc/src/Wasp/Generator/WebAppGenerator/RouterGenerator.hs b/waspc/src/Wasp/Generator/WebAppGenerator/RouterGenerator.hs index 013a659686..f70a4185c6 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator/RouterGenerator.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator/RouterGenerator.hs @@ -23,6 +23,7 @@ import Wasp.Generator.FileDraft (FileDraft) import Wasp.Generator.Monad (Generator) import Wasp.Generator.WebAppGenerator.Common (asTmplFile, asWebAppSrcFile) import qualified Wasp.Generator.WebAppGenerator.Common as C +import Wasp.Generator.WebAppGenerator.ExternalCodeGenerator (extClientCodeDirInWebAppSrcDir) data RouterTemplateData = RouterTemplateData { _routes :: ![RouteTemplateData], @@ -135,8 +136,7 @@ createPageTemplateData page = AS.ExtImport.ExtImportField identifier -> "{ " ++ mkNamedImportExpr identifier pageName ++ " }" } where - relPathToExtSrcDir :: FilePath - relPathToExtSrcDir = "./ext-src/" + relPathToExtSrcDir = "./" FP. SP.toFilePath extClientCodeDirInWebAppSrcDir pageName :: String pageName = fst page diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index 41505d3132..cec54798b6 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -96,6 +96,8 @@ constructAppSpec waspDir options decls = do ExternalCode.readFiles (CompileOptions.externalServerCodeDirPath options) externalClientCodeFiles <- ExternalCode.readFiles (CompileOptions.externalClientCodeDirPath options) + externalSharedCodeFiles <- + ExternalCode.readFiles (CompileOptions.externalSharedCodeDirPath options) maybeDotEnvServerFile <- findDotEnvServer waspDir maybeDotEnvClientFile <- findDotEnvClient waspDir maybeMigrationsDir <- findMigrationsDir waspDir @@ -105,6 +107,7 @@ constructAppSpec waspDir options decls = do { AS.decls = decls, AS.externalClientFiles = externalClientCodeFiles, AS.externalServerFiles = externalServerCodeFiles, + AS.externalSharedFiles = externalSharedCodeFiles, AS.migrationsDir = maybeMigrationsDir, AS.dotEnvServerFile = maybeDotEnvServerFile, AS.dotEnvClientFile = maybeDotEnvClientFile, From 936116b7749a1137391279542861aa206954ee42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 12:06:06 +0100 Subject: [PATCH 16/65] Update e2e test inputs --- waspc/e2e-test/Tests/WaspJobTest.hs | 2 +- .../test-outputs/waspBuild-golden/files.manifest | 11 ++++------- .../waspBuild-golden/waspBuild/.wasproot | 2 +- .../waspBuild/{ext => src}/.waspignore | 0 .../waspBuild/{ext => src/client}/Main.css | 0 .../waspBuild/{ext => src/client}/MainPage.js | 0 .../waspBuild/{ext => src/client}/waspLogo.png | Bin .../waspCompile-golden/files.manifest | 11 ++++------- .../waspCompile-golden/waspCompile/.wasproot | 2 +- .../waspCompile/{ext => src}/.waspignore | 0 .../waspCompile/{ext => src/client}/Main.css | 0 .../waspCompile/{ext => src/client}/MainPage.js | 0 .../waspCompile/{ext => src/client}/waspLogo.png | Bin .../test-outputs/waspJob-golden/files.manifest | 14 +++++--------- .../test-outputs/waspJob-golden/waspJob/.wasproot | 2 +- .../waspJob/{ext => src}/.waspignore | 0 .../waspJob/{ext => src/client}/Main.css | 0 .../waspJob/{ext => src/client}/MainPage.js | 0 .../waspJob/{ext => src/client}/waspLogo.png | Bin .../waspJob/{ext => src/server}/jobs/bar.js | 0 .../waspMigrate-golden/files.manifest | 11 ++++------- .../waspMigrate-golden/waspMigrate/.wasproot | 2 +- .../waspMigrate/{ext => src}/.waspignore | 0 .../waspMigrate/{ext => src/client}/Main.css | 0 .../waspMigrate/{ext => src/client}/MainPage.js | 0 .../waspMigrate/{ext => src/client}/waspLogo.png | Bin .../test-outputs/waspNew-golden/files.manifest | 8 ++++---- .../test-outputs/waspNew-golden/waspNew/.wasproot | 2 +- .../waspNew/{ext => src}/.waspignore | 0 .../waspNew/{ext => src/client}/Main.css | 0 .../waspNew/{ext => src/client}/MainPage.js | 0 .../waspNew/{ext => src/client}/waspLogo.png | Bin 32 files changed, 27 insertions(+), 40 deletions(-) rename waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/{ext => src}/.waspignore (100%) rename waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/{ext => src/client}/Main.css (100%) rename waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/{ext => src/client}/MainPage.js (100%) rename waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/{ext => src/client}/waspLogo.png (100%) rename waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/{ext => src}/.waspignore (100%) rename waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/{ext => src/client}/Main.css (100%) rename waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/{ext => src/client}/MainPage.js (100%) rename waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/{ext => src/client}/waspLogo.png (100%) rename waspc/e2e-test/test-outputs/waspJob-golden/waspJob/{ext => src}/.waspignore (100%) rename waspc/e2e-test/test-outputs/waspJob-golden/waspJob/{ext => src/client}/Main.css (100%) rename waspc/e2e-test/test-outputs/waspJob-golden/waspJob/{ext => src/client}/MainPage.js (100%) rename waspc/e2e-test/test-outputs/waspJob-golden/waspJob/{ext => src/client}/waspLogo.png (100%) rename waspc/e2e-test/test-outputs/waspJob-golden/waspJob/{ext => src/server}/jobs/bar.js (100%) rename waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/{ext => src}/.waspignore (100%) rename waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/{ext => src/client}/Main.css (100%) rename waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/{ext => src/client}/MainPage.js (100%) rename waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/{ext => src/client}/waspLogo.png (100%) rename waspc/e2e-test/test-outputs/waspNew-golden/waspNew/{ext => src}/.waspignore (100%) rename waspc/e2e-test/test-outputs/waspNew-golden/waspNew/{ext => src/client}/Main.css (100%) rename waspc/e2e-test/test-outputs/waspNew-golden/waspNew/{ext => src/client}/MainPage.js (100%) rename waspc/e2e-test/test-outputs/waspNew-golden/waspNew/{ext => src/client}/waspLogo.png (100%) diff --git a/waspc/e2e-test/Tests/WaspJobTest.hs b/waspc/e2e-test/Tests/WaspJobTest.hs index 6faba23b1c..1ddf446701 100644 --- a/waspc/e2e-test/Tests/WaspJobTest.hs +++ b/waspc/e2e-test/Tests/WaspJobTest.hs @@ -31,6 +31,6 @@ waspJob = do cdIntoCurrentProject, setDbToPSQL, appendToWaspFile entityDecl, - createFile jobFile "./ext/jobs" "bar.js", + createFile jobFile "./src/server/jobs" "bar.js", waspCliCompile ] diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest b/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest index ec424cd101..a5ba6207c4 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest @@ -11,9 +11,6 @@ waspBuild/.wasp/build/server/src/config.js waspBuild/.wasp/build/server/src/core/AuthError.js waspBuild/.wasp/build/server/src/core/HttpError.js waspBuild/.wasp/build/server/src/dbClient.js -waspBuild/.wasp/build/server/src/ext-src/Main.css -waspBuild/.wasp/build/server/src/ext-src/MainPage.js -waspBuild/.wasp/build/server/src/ext-src/waspLogo.png waspBuild/.wasp/build/server/src/jobs/core/Job.js waspBuild/.wasp/build/server/src/jobs/core/SubmittedJob.js waspBuild/.wasp/build/server/src/jobs/core/allJobs.js @@ -51,8 +48,8 @@ waspBuild/.wasp/build/web-app/src/router.js waspBuild/.wasp/build/web-app/src/serviceWorker.js waspBuild/.wasp/build/web-app/src/utils.js waspBuild/.wasproot -waspBuild/ext/.waspignore -waspBuild/ext/Main.css -waspBuild/ext/MainPage.js -waspBuild/ext/waspLogo.png waspBuild/main.wasp +waspBuild/src/.waspignore +waspBuild/src/client/Main.css +waspBuild/src/client/MainPage.js +waspBuild/src/client/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasproot b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasproot +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/ext/.waspignore b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/.waspignore similarity index 100% rename from waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/ext/.waspignore rename to waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/.waspignore diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/ext/Main.css b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/Main.css similarity index 100% rename from waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/ext/Main.css rename to waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/Main.css diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/ext/MainPage.js b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/MainPage.js similarity index 100% rename from waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/ext/MainPage.js rename to waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/MainPage.js diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/ext/waspLogo.png b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/waspLogo.png similarity index 100% rename from waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/ext/waspLogo.png rename to waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest b/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest index 7b2bb5a53e..5294497adf 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest @@ -11,9 +11,6 @@ waspCompile/.wasp/out/server/src/config.js waspCompile/.wasp/out/server/src/core/AuthError.js waspCompile/.wasp/out/server/src/core/HttpError.js waspCompile/.wasp/out/server/src/dbClient.js -waspCompile/.wasp/out/server/src/ext-src/Main.css -waspCompile/.wasp/out/server/src/ext-src/MainPage.js -waspCompile/.wasp/out/server/src/ext-src/waspLogo.png waspCompile/.wasp/out/server/src/jobs/core/Job.js waspCompile/.wasp/out/server/src/jobs/core/SubmittedJob.js waspCompile/.wasp/out/server/src/jobs/core/allJobs.js @@ -51,8 +48,8 @@ waspCompile/.wasp/out/web-app/src/router.js waspCompile/.wasp/out/web-app/src/serviceWorker.js waspCompile/.wasp/out/web-app/src/utils.js waspCompile/.wasproot -waspCompile/ext/.waspignore -waspCompile/ext/Main.css -waspCompile/ext/MainPage.js -waspCompile/ext/waspLogo.png waspCompile/main.wasp +waspCompile/src/.waspignore +waspCompile/src/client/Main.css +waspCompile/src/client/MainPage.js +waspCompile/src/client/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasproot b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasproot +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/ext/.waspignore b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/.waspignore similarity index 100% rename from waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/ext/.waspignore rename to waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/.waspignore diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/ext/Main.css b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/Main.css similarity index 100% rename from waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/ext/Main.css rename to waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/Main.css diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/ext/MainPage.js b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/MainPage.js similarity index 100% rename from waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/ext/MainPage.js rename to waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/MainPage.js diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/ext/waspLogo.png b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/waspLogo.png similarity index 100% rename from waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/ext/waspLogo.png rename to waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest b/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest index 58f98a9d7b..b69946ae23 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest @@ -11,10 +11,7 @@ waspJob/.wasp/out/server/src/config.js waspJob/.wasp/out/server/src/core/AuthError.js waspJob/.wasp/out/server/src/core/HttpError.js waspJob/.wasp/out/server/src/dbClient.js -waspJob/.wasp/out/server/src/ext-src/Main.css -waspJob/.wasp/out/server/src/ext-src/MainPage.js waspJob/.wasp/out/server/src/ext-src/jobs/bar.js -waspJob/.wasp/out/server/src/ext-src/waspLogo.png waspJob/.wasp/out/server/src/jobs/MySpecialJob.js waspJob/.wasp/out/server/src/jobs/core/Job.js waspJob/.wasp/out/server/src/jobs/core/SubmittedJob.js @@ -39,7 +36,6 @@ waspJob/.wasp/out/web-app/src/api.js waspJob/.wasp/out/web-app/src/config.js waspJob/.wasp/out/web-app/src/ext-src/Main.css waspJob/.wasp/out/web-app/src/ext-src/MainPage.js -waspJob/.wasp/out/web-app/src/ext-src/jobs/bar.js waspJob/.wasp/out/web-app/src/ext-src/waspLogo.png waspJob/.wasp/out/web-app/src/index.css waspJob/.wasp/out/web-app/src/index.js @@ -54,9 +50,9 @@ waspJob/.wasp/out/web-app/src/router.js waspJob/.wasp/out/web-app/src/serviceWorker.js waspJob/.wasp/out/web-app/src/utils.js waspJob/.wasproot -waspJob/ext/.waspignore -waspJob/ext/Main.css -waspJob/ext/MainPage.js -waspJob/ext/jobs/bar.js -waspJob/ext/waspLogo.png waspJob/main.wasp +waspJob/src/.waspignore +waspJob/src/client/Main.css +waspJob/src/client/MainPage.js +waspJob/src/client/waspLogo.png +waspJob/src/server/jobs/bar.js diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasproot b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasproot +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/.waspignore b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/.waspignore similarity index 100% rename from waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/.waspignore rename to waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/.waspignore diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/Main.css b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/Main.css similarity index 100% rename from waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/Main.css rename to waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/Main.css diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/MainPage.js b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/MainPage.js similarity index 100% rename from waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/MainPage.js rename to waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/MainPage.js diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/waspLogo.png b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/waspLogo.png similarity index 100% rename from waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/waspLogo.png rename to waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/jobs/bar.js b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jobs/bar.js similarity index 100% rename from waspc/e2e-test/test-outputs/waspJob-golden/waspJob/ext/jobs/bar.js rename to waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jobs/bar.js diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest b/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest index 257fe7caf4..843a206145 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest @@ -16,9 +16,6 @@ waspMigrate/.wasp/out/server/src/config.js waspMigrate/.wasp/out/server/src/core/AuthError.js waspMigrate/.wasp/out/server/src/core/HttpError.js waspMigrate/.wasp/out/server/src/dbClient.js -waspMigrate/.wasp/out/server/src/ext-src/Main.css -waspMigrate/.wasp/out/server/src/ext-src/MainPage.js -waspMigrate/.wasp/out/server/src/ext-src/waspLogo.png waspMigrate/.wasp/out/server/src/jobs/core/Job.js waspMigrate/.wasp/out/server/src/jobs/core/SubmittedJob.js waspMigrate/.wasp/out/server/src/jobs/core/allJobs.js @@ -56,10 +53,10 @@ waspMigrate/.wasp/out/web-app/src/router.js waspMigrate/.wasp/out/web-app/src/serviceWorker.js waspMigrate/.wasp/out/web-app/src/utils.js waspMigrate/.wasproot -waspMigrate/ext/.waspignore -waspMigrate/ext/Main.css -waspMigrate/ext/MainPage.js -waspMigrate/ext/waspLogo.png waspMigrate/main.wasp waspMigrate/migrations/migration_lock.toml waspMigrate/migrations/no-date-foo/migration.sql +waspMigrate/src/.waspignore +waspMigrate/src/client/Main.css +waspMigrate/src/client/MainPage.js +waspMigrate/src/client/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasproot b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasproot +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/ext/.waspignore b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/.waspignore similarity index 100% rename from waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/ext/.waspignore rename to waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/.waspignore diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/ext/Main.css b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/Main.css similarity index 100% rename from waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/ext/Main.css rename to waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/Main.css diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/ext/MainPage.js b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/MainPage.js similarity index 100% rename from waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/ext/MainPage.js rename to waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/MainPage.js diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/ext/waspLogo.png b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/waspLogo.png similarity index 100% rename from waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/ext/waspLogo.png rename to waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest b/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest index d20fb91970..93901d86ab 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest @@ -1,6 +1,6 @@ waspNew/.wasproot -waspNew/ext/.waspignore -waspNew/ext/Main.css -waspNew/ext/MainPage.js -waspNew/ext/waspLogo.png waspNew/main.wasp +waspNew/src/.waspignore +waspNew/src/client/Main.css +waspNew/src/client/MainPage.js +waspNew/src/client/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/.wasproot b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/.wasproot +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/ext/.waspignore b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/.waspignore similarity index 100% rename from waspc/e2e-test/test-outputs/waspNew-golden/waspNew/ext/.waspignore rename to waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/.waspignore diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/ext/Main.css b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/Main.css similarity index 100% rename from waspc/e2e-test/test-outputs/waspNew-golden/waspNew/ext/Main.css rename to waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/Main.css diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/ext/MainPage.js b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/MainPage.js similarity index 100% rename from waspc/e2e-test/test-outputs/waspNew-golden/waspNew/ext/MainPage.js rename to waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/MainPage.js diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/ext/waspLogo.png b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/waspLogo.png similarity index 100% rename from waspc/e2e-test/test-outputs/waspNew-golden/waspNew/ext/waspLogo.png rename to waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/waspLogo.png From 1d4e0d8aceafab028f5b7466f34f6d4212dcb692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 12:08:03 +0100 Subject: [PATCH 17/65] Update e2e test outputs --- .../waspBuild/.wasp/build/.waspchecksums | 21 ----- .../.wasp/build/server/src/ext-src/Main.css | 81 ------------------ .../build/server/src/ext-src/MainPage.js | 41 --------- .../build/server/src/ext-src/waspLogo.png | Bin 24877 -> 0 bytes .../waspCompile/.wasp/out/.waspchecksums | 21 ----- .../.wasp/out/server/src/ext-src/Main.css | 81 ------------------ .../.wasp/out/server/src/ext-src/MainPage.js | 41 --------- .../.wasp/out/server/src/ext-src/waspLogo.png | Bin 24877 -> 0 bytes .../waspJob/.wasp/out/.waspchecksums | 28 ------ .../.wasp/out/server/src/ext-src/Main.css | 81 ------------------ .../.wasp/out/server/src/ext-src/MainPage.js | 41 --------- .../.wasp/out/server/src/ext-src/waspLogo.png | Bin 24877 -> 0 bytes .../.wasp/out/web-app/src/ext-src/jobs/bar.js | 4 - .../waspMigrate/.wasp/out/.waspchecksums | 21 ----- .../.wasp/out/server/src/ext-src/Main.css | 81 ------------------ .../.wasp/out/server/src/ext-src/MainPage.js | 41 --------- .../.wasp/out/server/src/ext-src/waspLogo.png | Bin 24877 -> 0 bytes 17 files changed, 583 deletions(-) delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/Main.css delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/MainPage.js delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/waspLogo.png delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/Main.css delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/MainPage.js delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/waspLogo.png delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/Main.css delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/MainPage.js delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/waspLogo.png delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jobs/bar.js delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/Main.css delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/MainPage.js delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/waspLogo.png diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums index ccd4f55cb9..07d4000443 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums @@ -83,27 +83,6 @@ ], "20c67ca197da3de2d37528ceaff2e40af910be8177f346c6d5c2b2f983810c43" ], - [ - [ - "file", - "server/src/ext-src/Main.css" - ], - "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" - ], - [ - [ - "file", - "server/src/ext-src/MainPage.js" - ], - "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" - ], - [ - [ - "file", - "server/src/ext-src/waspLogo.png" - ], - "0f05a89eb945d6d7326110e88776e402833b356202b06d0a8bf652e118d3fd2f" - ], [ [ "file", diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/Main.css b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/Main.css deleted file mode 100644 index bd0bd36b1b..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/Main.css +++ /dev/null @@ -1,81 +0,0 @@ -* { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - box-sizing: border-box; -} - -.container { - min-height: 100vh; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -main { - padding: 5rem 0; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -main p { - font-size: 1.2rem; -} - -.logo { - margin-bottom: 2rem; -} - -.logo img { - max-height: 200px; -} - -.welcome-title { - font-weight: 500; -} - -.welcome-subtitle { - font-weight: 400; - margin-bottom: 3rem; -} - -.buttons { - display: flex; - flex-direction: row; -} - -.buttons .button:not(:last-child) { - margin-right: 0.5rem; -} - -.button { - border-radius: 3px; - font-size: 1.2rem; - padding: 1rem 2rem; - text-align: center; - font-weight: 700; - text-decoration: none; -} - -.button-filled { - border: 2px solid #bf9900; - background-color: #bf9900; - color: #f4f4f4; -} - -.button-outline { - border: 2px solid #8a9cff; - color: #8a9cff; - background-color: none; -} - -code { - border-radius: 5px; - padding: 0.2rem; - background: #efefef; - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, - Bitstream Vera Sans Mono, Courier New, monospace; -} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/MainPage.js b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/MainPage.js deleted file mode 100644 index 529a4f2860..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/MainPage.js +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react' -import waspLogo from './waspLogo.png' -import './Main.css' - -const MainPage = () => { - return ( -
-
-
- wasp -
- -

Welcome to Wasp - you just started a new app!

-

- This is page MainPage located at route /. - Open ext/MainPage.js to edit it. -

- - -
-
- ) -} -export default MainPage diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/waspLogo.png b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/waspLogo.png deleted file mode 100644 index d39a9443a8153b158b76f51dda2e42f3b34a9169..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24877 zcmYg&bwHEf_dkq*gusvzkd_XWZiaMsk5K8HN=eC7L}^I@=>{1+8fKsfBHazrDJlJX zHhh1+zdt}^&vWj%_q4D&@u0Q`pkmVX8C5AIU~ z)%!TeU$<6)|0vm;sXJ(EgFMLG9itLx;iO8y!!UFN2mo zq)jePR{z?S5zd_RmRQaZ-s9hvY*-G+Oxe@2<0oVZfp&r(y9J>p3&!au#tGc~p9srF zAB;|^ifJFEt%%)gXctrOY4{#rqqEt1xTkb3!(+}xznhxTyW5O1&mGAeSrGMyHN_nG z?TGqr2QvkBmpLAO$gs>l{eEyp`6DQEYsx(*Bh8sFS53e{0S6asK=sCeKOzSL&H4%= z)_*5Z$w+15V|*(m`!s!DO8{#AMBb{$UEsy4e{c!Y5&n<4&n9ksLx)_0G2i0@jz;lo zB%W>I9&9kR_>^~7hEe^RXE{~RrGT=S;(|<(lSZ#YWPc4C`Mv%#uc0)n(9$sh;zydf=06^E^RE}Ufgw9; zA?U@vUs*hac|4FiHAK9g1#&w_!!1puuRk&ldA*ftbnx_2@R~?Ec#;R@zv$7QA3ERp*U@$*=Gv)1J{Q8RU{AVR)UMk z^rvrZ#=okD`zvTtKy4Fn5Ux~2x-7GGAu32QV-g!A`8*zV#iYB<`9|x(cLQq#HL;EO zs!!RAgW9#FD0(7G{^3CZ%H?$g$>Z5gb0Byx#-}&D-@Axe* z&I+BmbqDt+Wn1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#e7EI}*=h=y+2cf_di5@h8iWfu zY`Re<9J#_OB9;>FCVQQ=OU4T)`CEDGx=$LlX4r0OR4%>xd>?%WM388~nGY`kV&j5d z#^qgx8fSGj+)boYY360q&E=YEh~|=VMd|OWU&ekrRFg9lddgp;bId&b@!*HIjj^v?44kvS z3yU<>-KmW5bJlm~$E@J{sxd { - return ( -
-
-
- wasp -
- -

Welcome to Wasp - you just started a new app!

-

- This is page MainPage located at route /. - Open ext/MainPage.js to edit it. -

- - -
-
- ) -} -export default MainPage diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/waspLogo.png b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/waspLogo.png deleted file mode 100644 index d39a9443a8153b158b76f51dda2e42f3b34a9169..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24877 zcmYg&bwHEf_dkq*gusvzkd_XWZiaMsk5K8HN=eC7L}^I@=>{1+8fKsfBHazrDJlJX zHhh1+zdt}^&vWj%_q4D&@u0Q`pkmVX8C5AIU~ z)%!TeU$<6)|0vm;sXJ(EgFMLG9itLx;iO8y!!UFN2mo zq)jePR{z?S5zd_RmRQaZ-s9hvY*-G+Oxe@2<0oVZfp&r(y9J>p3&!au#tGc~p9srF zAB;|^ifJFEt%%)gXctrOY4{#rqqEt1xTkb3!(+}xznhxTyW5O1&mGAeSrGMyHN_nG z?TGqr2QvkBmpLAO$gs>l{eEyp`6DQEYsx(*Bh8sFS53e{0S6asK=sCeKOzSL&H4%= z)_*5Z$w+15V|*(m`!s!DO8{#AMBb{$UEsy4e{c!Y5&n<4&n9ksLx)_0G2i0@jz;lo zB%W>I9&9kR_>^~7hEe^RXE{~RrGT=S;(|<(lSZ#YWPc4C`Mv%#uc0)n(9$sh;zydf=06^E^RE}Ufgw9; zA?U@vUs*hac|4FiHAK9g1#&w_!!1puuRk&ldA*ftbnx_2@R~?Ec#;R@zv$7QA3ERp*U@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ks?PTt-)|5$$>agZ%9WlWMO~fA~%@h z3Yz=2tYB<*j4my>_32jxHxFv#4yMy6m+V2V1@wH0x|0LzJR}$nW);N9nO!r5YTb+k9&@Vlqb$WWu=JR-B6w@ zTxOiLX~sG0yg9e#j(>yIXcSDb68n7$RAS!)oN|L#e7EI}*=h=y+2cf_di5@h8iWfu zY`Re<9J#_OB9;>FCVQQ=OU4T)`CEDGx=$LlX4r0OR4%>xd>?%WM388~nGY`kV&j5d z#^qgx8fSGj+)boYY360q&E=YEh~|=VMd|OWU&ekrRFg9lddgp;bId&b@!*HIjj^v?44kvS z3yU<>-KmW5bJlm~$E@J{sxd { - return ( -
-
-
- wasp -
- -

Welcome to Wasp - you just started a new app!

-

- This is page MainPage located at route /. - Open ext/MainPage.js to edit it. -

- - -
-
- ) -} -export default MainPage diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/waspLogo.png b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/waspLogo.png deleted file mode 100644 index d39a9443a8153b158b76f51dda2e42f3b34a9169..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24877 zcmYg&bwHEf_dkq*gusvzkd_XWZiaMsk5K8HN=eC7L}^I@=>{1+8fKsfBHazrDJlJX zHhh1+zdt}^&vWj%_q4D&@u0Q`pkmVX8C5AIU~ z)%!TeU$<6)|0vm;sXJ(EgFMLG9itLx;iO8y!!UFN2mo zq)jePR{z?S5zd_RmRQaZ-s9hvY*-G+Oxe@2<0oVZfp&r(y9J>p3&!au#tGc~p9srF zAB;|^ifJFEt%%)gXctrOY4{#rqqEt1xTkb3!(+}xznhxTyW5O1&mGAeSrGMyHN_nG z?TGqr2QvkBmpLAO$gs>l{eEyp`6DQEYsx(*Bh8sFS53e{0S6asK=sCeKOzSL&H4%= z)_*5Z$w+15V|*(m`!s!DO8{#AMBb{$UEsy4e{c!Y5&n<4&n9ksLx)_0G2i0@jz;lo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4msLWE}){?wC% z7=R@)cqBQfiKKtcy=>$#R4hxHfwk2Ti$bLH-vRD$QH*K&vyyIa2C0@L54l0HAkfgx zGOsZJl##0WX5SYdB6!EOV|E&R;*k{s=wj4eCL>I7T(MW92}WXZ78}<5xpn9P`!<9W@RMoOdj?Ks?PTt-)|5$$>agZ%9WlWMO~fA~%@h z3Yz=2tYB<*j4my>_32jxHxFv#4yMy6m+V2V1@wH0x|0LzJR}$nW);N9nO!r5YTb+k9&@Vlqb$WWu=JR-B6w@ zTxOiLX~sG0yg9e#j(>yIXcSDb68n7$RAS!)oN|L#e7EI}*=h=y+2cf_di5@h8iWfu zY`Re<9J#_OB9;>FCVQQ=OU4T)`CEDGx=$LlX4r0OR4%>xd>?%WM388~nGY`kV&j5d z#^qgx8fSGj+)boYY360q&E=YEh~|=VMd|OWU&ekrRFg9lddgp;bId&b@!*HIjj^v?44kvS z3yU<>-KmW5bJlm~$E@J{sxd { - return 1 - } - diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums index 0fde03b3e9..49caaef6fe 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums @@ -83,27 +83,6 @@ ], "20c67ca197da3de2d37528ceaff2e40af910be8177f346c6d5c2b2f983810c43" ], - [ - [ - "file", - "server/src/ext-src/Main.css" - ], - "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" - ], - [ - [ - "file", - "server/src/ext-src/MainPage.js" - ], - "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" - ], - [ - [ - "file", - "server/src/ext-src/waspLogo.png" - ], - "0f05a89eb945d6d7326110e88776e402833b356202b06d0a8bf652e118d3fd2f" - ], [ [ "file", diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/Main.css b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/Main.css deleted file mode 100644 index bd0bd36b1b..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/Main.css +++ /dev/null @@ -1,81 +0,0 @@ -* { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - box-sizing: border-box; -} - -.container { - min-height: 100vh; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -main { - padding: 5rem 0; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -main p { - font-size: 1.2rem; -} - -.logo { - margin-bottom: 2rem; -} - -.logo img { - max-height: 200px; -} - -.welcome-title { - font-weight: 500; -} - -.welcome-subtitle { - font-weight: 400; - margin-bottom: 3rem; -} - -.buttons { - display: flex; - flex-direction: row; -} - -.buttons .button:not(:last-child) { - margin-right: 0.5rem; -} - -.button { - border-radius: 3px; - font-size: 1.2rem; - padding: 1rem 2rem; - text-align: center; - font-weight: 700; - text-decoration: none; -} - -.button-filled { - border: 2px solid #bf9900; - background-color: #bf9900; - color: #f4f4f4; -} - -.button-outline { - border: 2px solid #8a9cff; - color: #8a9cff; - background-color: none; -} - -code { - border-radius: 5px; - padding: 0.2rem; - background: #efefef; - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, - Bitstream Vera Sans Mono, Courier New, monospace; -} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/MainPage.js b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/MainPage.js deleted file mode 100644 index 529a4f2860..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/MainPage.js +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react' -import waspLogo from './waspLogo.png' -import './Main.css' - -const MainPage = () => { - return ( -
-
-
- wasp -
- -

Welcome to Wasp - you just started a new app!

-

- This is page MainPage located at route /. - Open ext/MainPage.js to edit it. -

- - -
-
- ) -} -export default MainPage diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/waspLogo.png b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/waspLogo.png deleted file mode 100644 index d39a9443a8153b158b76f51dda2e42f3b34a9169..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24877 zcmYg&bwHEf_dkq*gusvzkd_XWZiaMsk5K8HN=eC7L}^I@=>{1+8fKsfBHazrDJlJX zHhh1+zdt}^&vWj%_q4D&@u0Q`pkmVX8C5AIU~ z)%!TeU$<6)|0vm;sXJ(EgFMLG9itLx;iO8y!!UFN2mo zq)jePR{z?S5zd_RmRQaZ-s9hvY*-G+Oxe@2<0oVZfp&r(y9J>p3&!au#tGc~p9srF zAB;|^ifJFEt%%)gXctrOY4{#rqqEt1xTkb3!(+}xznhxTyW5O1&mGAeSrGMyHN_nG z?TGqr2QvkBmpLAO$gs>l{eEyp`6DQEYsx(*Bh8sFS53e{0S6asK=sCeKOzSL&H4%= z)_*5Z$w+15V|*(m`!s!DO8{#AMBb{$UEsy4e{c!Y5&n<4&n9ksLx)_0G2i0@jz;lo zB%W>I9&9kR_>^~7hEe^RXE{~RrGT=S;(|<(lSZ#YWPc4C`Mv%#uc0)n(9$sh;zydf=06^E^RE}Ufgw9; zA?U@vUs*hac|4FiHAK9g1#&w_!!1puuRk&ldA*ftbnx_2@R~?Ec#;R@zv$7QA3ERp*U@$*=Gv)1J{Q8RU{AVR)UMk z^rvrZ#=okD`zvTtKy4Fn5Ux~2x-7GGAu32QV-g!A`8*zV#iYB<`9|x(cLQq#HL;EO zs!!RAgW9#FD0(7G{^3CZ%H?$g$>Z5gb0Byx#-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#j(>yIXcSDb68n7$RAS!)oN|L#e7EI}*=h=y+2cf_di5@h8iWfu zY`Re<9J#_OB9;>FCVQQ=OU4T)`CEDGx=$LlX4r0OR4%>xd>?%WM388~nGY`kV&j5d z#^qgx8fSGj+)boYY360q&E=YEh~|=VMd|OWU&ekrRFg9lddgp;bId&b@!*HIjj^v?44kvS z3yU<>-KmW5bJlm~$E@J{sxd Date: Mon, 31 Oct 2022 13:43:41 +0100 Subject: [PATCH 18/65] Fix formatting --- .../cli/src/Wasp/Cli/Command/CreateNewProject.hs | 16 ++++++++-------- waspc/src/Wasp/Generator/ServerGenerator.hs | 8 ++++---- .../src/Wasp/Generator/ServerGenerator/AuthG.hs | 10 +++++----- .../ServerGenerator/ExternalCodeGenerator.hs | 2 +- waspc/src/Wasp/Generator/WebAppGenerator.hs | 8 ++++---- .../WebAppGenerator/ExternalCodeGenerator.hs | 4 ++-- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index 752216b8cc..1696ea6999 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -48,14 +48,14 @@ parseProjectInfo :: String -> Command ProjectInfo parseProjectInfo name | isValidWaspIdentifier appName = return $ ProjectInfo name appName | otherwise = - throwProjectCreationError $ - intercalate - "\n" - [ "The project's name is not in the valid format!", - indent 2 "- It can start with a letter or an underscore.", - indent 2 "- It can contain only letters, numbers, dashes, or underscores.", - indent 2 "- It can't be a Wasp keyword." - ] + throwProjectCreationError $ + intercalate + "\n" + [ "The project's name is not in the valid format!", + indent 2 "- It can start with a letter or an underscore.", + indent 2 "- It can contain only letters, numbers, dashes, or underscores.", + indent 2 "- It can't be a Wasp keyword." + ] where appName = kebabToCamelCase name diff --git a/waspc/src/Wasp/Generator/ServerGenerator.hs b/waspc/src/Wasp/Generator/ServerGenerator.hs index f4e05b4888..40f242d7e2 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator.hs @@ -74,10 +74,10 @@ genDotEnv spec = return $ case AS.dotEnvServerFile spec of Just srcFilePath | not $ AS.isBuild spec -> - [ createCopyFileDraft - (C.serverRootDirInProjectRootDir dotEnvInServerRootDir) - srcFilePath - ] + [ createCopyFileDraft + (C.serverRootDirInProjectRootDir dotEnvInServerRootDir) + srcFilePath + ] _ -> [] dotEnvInServerRootDir :: Path' (Rel C.ServerRootDir) File' diff --git a/waspc/src/Wasp/Generator/ServerGenerator/AuthG.hs b/waspc/src/Wasp/Generator/ServerGenerator/AuthG.hs index 20251f5805..e83040820b 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator/AuthG.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator/AuthG.hs @@ -175,11 +175,11 @@ genUtilsJs auth = return $ C.mkTmplFdWithDstAndData tmplFile dstFile (Just tmplD genGoogleAuth :: AS.Auth.Auth -> Generator [FileDraft] genGoogleAuth auth | AS.Auth.isGoogleAuthEnabled auth = - sequence - [ copyTmplFile [relfile|routes/auth/passport/google/google.js|], - copyTmplFile [relfile|routes/auth/passport/google/googleDefaults.js|], - genGoogleConfigJs auth - ] + sequence + [ copyTmplFile [relfile|routes/auth/passport/google/google.js|], + copyTmplFile [relfile|routes/auth/passport/google/googleDefaults.js|], + genGoogleConfigJs auth + ] | otherwise = return [] where copyTmplFile = return . C.mkSrcTmplFd diff --git a/waspc/src/Wasp/Generator/ServerGenerator/ExternalCodeGenerator.hs b/waspc/src/Wasp/Generator/ServerGenerator/ExternalCodeGenerator.hs index 58b038f350..a146410b2b 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator/ExternalCodeGenerator.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator/ExternalCodeGenerator.hs @@ -35,4 +35,4 @@ mkExtCodeGeneratorStrategy extCodeDirInServerSrcDir = C.serverRootDirInProjectRootDir C.serverSrcDirInServerRootDir extCodeDirInServerSrcDir - } \ No newline at end of file + } diff --git a/waspc/src/Wasp/Generator/WebAppGenerator.hs b/waspc/src/Wasp/Generator/WebAppGenerator.hs index ae0bb7d352..f546e92e50 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator.hs @@ -59,10 +59,10 @@ genDotEnv spec = return $ case AS.dotEnvClientFile spec of Just srcFilePath | not $ AS.isBuild spec -> - [ createCopyFileDraft - (C.webAppRootDirInProjectRootDir dotEnvInWebAppRootDir) - srcFilePath - ] + [ createCopyFileDraft + (C.webAppRootDirInProjectRootDir dotEnvInWebAppRootDir) + srcFilePath + ] _ -> [] dotEnvInWebAppRootDir :: Path' (Rel C.WebAppRootDir) File' diff --git a/waspc/src/Wasp/Generator/WebAppGenerator/ExternalCodeGenerator.hs b/waspc/src/Wasp/Generator/WebAppGenerator/ExternalCodeGenerator.hs index d1d2441325..f23ef787c2 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator/ExternalCodeGenerator.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator/ExternalCodeGenerator.hs @@ -1,7 +1,7 @@ module Wasp.Generator.WebAppGenerator.ExternalCodeGenerator ( extClientCodeGeneratorStrategy, extSharedCodeGeneratorStrategy, - extClientCodeDirInWebAppSrcDir + extClientCodeDirInWebAppSrcDir, ) where @@ -35,4 +35,4 @@ mkExtCodeGeneratorStrategy extCodeDirInWebAppSrcDir = C.webAppRootDirInProjectRootDir C.webAppSrcDirInWebAppRootDir extCodeDirInWebAppSrcDir - } \ No newline at end of file + } From 281c3cf7b42acf438863f642845ba5bf112e0e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 13:47:04 +0100 Subject: [PATCH 19/65] Fix bug in compile function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Martin Šošić --- waspc/src/Wasp/Lib.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index cec54798b6..ec9adb3dc5 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -45,12 +45,12 @@ compile :: CompileOptions -> IO ([CompileWarning], [CompileError]) compile waspDir outDir options = do - compileWarnings <- maybeToList <$> warnIfDotEnvPresent waspDir - appSpecOrCompileErrors <- analyzeProject waspDir options - compileWarningsAndErrors <- case appSpecOrCompileErrors of - Left analyzerErrors -> return (compileWarnings, analyzerErrors) - Right appSpec -> generateCode appSpec outDir options - return $ (compileWarnings, []) <> compileWarningsAndErrors + compileWarningsAndErrors <- + analyzeProject waspDir options >>= \case + Left analyzerErrors -> return ([], analyzerErrors) + Right appSpec -> generateCode appSpec outDir options + dotEnvWarnings <- maybeToList <$> warnIfDotEnvPresent waspDir + return $ (dotEnvWarnings, []) <> compileWarningsAndErrors analyzeProject :: Path' Abs (Dir WaspProjectDir) -> From a64832ca6f350172427cf410d28d62f604e61c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 13:52:11 +0100 Subject: [PATCH 20/65] Change map to fmap in compile function --- waspc/src/Wasp/Lib.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index ec9adb3dc5..d1af0be321 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -69,7 +69,7 @@ generateCode :: generateCode appSpec outDir options = do (generatorWarnings, generatorErrors) <- Generator.writeWebAppCode appSpec outDir (sendMessage options) let filteredWarnings = generatorWarningsFilter options generatorWarnings - return (map show filteredWarnings, map show generatorErrors) + return (show <$> filteredWarnings, show <$> generatorErrors) -- | Checks the wasp directory for potential problems, and issues warnings if any are found. warnIfDotEnvPresent :: Path' Abs (Dir WaspProjectDir) -> IO (Maybe CompileWarning) From b30e3ded23a88f8c0732668cd22042aaaa82df29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 13:54:13 +0100 Subject: [PATCH 21/65] Fix formatting --- waspc/src/Wasp/Lib.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index d1af0be321..f880148608 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -46,7 +46,7 @@ compile :: IO ([CompileWarning], [CompileError]) compile waspDir outDir options = do compileWarningsAndErrors <- - analyzeProject waspDir options >>= \case + analyzeProject waspDir options >>= \case Left analyzerErrors -> return ([], analyzerErrors) Right appSpec -> generateCode appSpec outDir options dotEnvWarnings <- maybeToList <$> warnIfDotEnvPresent waspDir From f40a8ce44518915ab7f6c0b8c70d6967ea958e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 14:26:28 +0100 Subject: [PATCH 22/65] Force git to include empty directories --- waspc/data/Cli/templates/new/src/client/.gitkeep | 2 ++ waspc/data/Cli/templates/new/src/server/.gitkeep | 2 ++ waspc/data/Cli/templates/new/src/shared/.gitkeep | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 waspc/data/Cli/templates/new/src/client/.gitkeep create mode 100644 waspc/data/Cli/templates/new/src/server/.gitkeep create mode 100644 waspc/data/Cli/templates/new/src/shared/.gitkeep diff --git a/waspc/data/Cli/templates/new/src/client/.gitkeep b/waspc/data/Cli/templates/new/src/client/.gitkeep new file mode 100644 index 0000000000..5a5f457cef --- /dev/null +++ b/waspc/data/Cli/templates/new/src/client/.gitkeep @@ -0,0 +1,2 @@ +This file forces Git to commit an empty directory. + diff --git a/waspc/data/Cli/templates/new/src/server/.gitkeep b/waspc/data/Cli/templates/new/src/server/.gitkeep new file mode 100644 index 0000000000..5a5f457cef --- /dev/null +++ b/waspc/data/Cli/templates/new/src/server/.gitkeep @@ -0,0 +1,2 @@ +This file forces Git to commit an empty directory. + diff --git a/waspc/data/Cli/templates/new/src/shared/.gitkeep b/waspc/data/Cli/templates/new/src/shared/.gitkeep new file mode 100644 index 0000000000..5a5f457cef --- /dev/null +++ b/waspc/data/Cli/templates/new/src/shared/.gitkeep @@ -0,0 +1,2 @@ +This file forces Git to commit an empty directory. + From ddc8682c8c4299f8131ec6734b35c9ced1edcfc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 14:30:57 +0100 Subject: [PATCH 23/65] Remove extra empty line from .gitkeep files --- waspc/data/Cli/templates/new/src/client/.gitkeep | 1 - waspc/data/Cli/templates/new/src/server/.gitkeep | 1 - waspc/data/Cli/templates/new/src/shared/.gitkeep | 1 - 3 files changed, 3 deletions(-) diff --git a/waspc/data/Cli/templates/new/src/client/.gitkeep b/waspc/data/Cli/templates/new/src/client/.gitkeep index 5a5f457cef..878bca16e5 100644 --- a/waspc/data/Cli/templates/new/src/client/.gitkeep +++ b/waspc/data/Cli/templates/new/src/client/.gitkeep @@ -1,2 +1 @@ This file forces Git to commit an empty directory. - diff --git a/waspc/data/Cli/templates/new/src/server/.gitkeep b/waspc/data/Cli/templates/new/src/server/.gitkeep index 5a5f457cef..878bca16e5 100644 --- a/waspc/data/Cli/templates/new/src/server/.gitkeep +++ b/waspc/data/Cli/templates/new/src/server/.gitkeep @@ -1,2 +1 @@ This file forces Git to commit an empty directory. - diff --git a/waspc/data/Cli/templates/new/src/shared/.gitkeep b/waspc/data/Cli/templates/new/src/shared/.gitkeep index 5a5f457cef..878bca16e5 100644 --- a/waspc/data/Cli/templates/new/src/shared/.gitkeep +++ b/waspc/data/Cli/templates/new/src/shared/.gitkeep @@ -1,2 +1 @@ This file forces Git to commit an empty directory. - From 94a11a7bee7a4dda7b6353f75726226fc30ea0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 14:47:41 +0100 Subject: [PATCH 24/65] Add .jsconfig to enable go-to-definition --- .../Cli/templates/new/src/client/.gitkeep | 2 -- .../templates/new/src/client/jsconfig.json | 20 +++++++++++++++++++ .../Cli/templates/new/src/server/.gitkeep | 2 -- .../templates/new/src/server/jsconfig.json | 18 +++++++++++++++++ .../Cli/templates/new/src/shared/.gitkeep | 2 -- .../templates/new/src/shared/jsconfig.json | 15 ++++++++++++++ 6 files changed, 53 insertions(+), 6 deletions(-) delete mode 100644 waspc/data/Cli/templates/new/src/client/.gitkeep create mode 100644 waspc/data/Cli/templates/new/src/client/jsconfig.json delete mode 100644 waspc/data/Cli/templates/new/src/server/.gitkeep create mode 100644 waspc/data/Cli/templates/new/src/server/jsconfig.json delete mode 100644 waspc/data/Cli/templates/new/src/shared/.gitkeep create mode 100644 waspc/data/Cli/templates/new/src/shared/jsconfig.json diff --git a/waspc/data/Cli/templates/new/src/client/.gitkeep b/waspc/data/Cli/templates/new/src/client/.gitkeep deleted file mode 100644 index 5a5f457cef..0000000000 --- a/waspc/data/Cli/templates/new/src/client/.gitkeep +++ /dev/null @@ -1,2 +0,0 @@ -This file forces Git to commit an empty directory. - diff --git a/waspc/data/Cli/templates/new/src/client/jsconfig.json b/waspc/data/Cli/templates/new/src/client/jsconfig.json new file mode 100644 index 0000000000..7cd2f39f90 --- /dev/null +++ b/waspc/data/Cli/templates/new/src/client/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} \ No newline at end of file diff --git a/waspc/data/Cli/templates/new/src/server/.gitkeep b/waspc/data/Cli/templates/new/src/server/.gitkeep deleted file mode 100644 index 5a5f457cef..0000000000 --- a/waspc/data/Cli/templates/new/src/server/.gitkeep +++ /dev/null @@ -1,2 +0,0 @@ -This file forces Git to commit an empty directory. - diff --git a/waspc/data/Cli/templates/new/src/server/jsconfig.json b/waspc/data/Cli/templates/new/src/server/jsconfig.json new file mode 100644 index 0000000000..8181e5d3b4 --- /dev/null +++ b/waspc/data/Cli/templates/new/src/server/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} \ No newline at end of file diff --git a/waspc/data/Cli/templates/new/src/shared/.gitkeep b/waspc/data/Cli/templates/new/src/shared/.gitkeep deleted file mode 100644 index 5a5f457cef..0000000000 --- a/waspc/data/Cli/templates/new/src/shared/.gitkeep +++ /dev/null @@ -1,2 +0,0 @@ -This file forces Git to commit an empty directory. - diff --git a/waspc/data/Cli/templates/new/src/shared/jsconfig.json b/waspc/data/Cli/templates/new/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/data/Cli/templates/new/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} From eb29d50a4f339cb769e9a1a62f79c73f46600069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 14:48:40 +0100 Subject: [PATCH 25/65] Watch shared directory for changes --- waspc/cli/src/Wasp/Cli/Command/Watch.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/waspc/cli/src/Wasp/Cli/Command/Watch.hs b/waspc/cli/src/Wasp/Cli/Command/Watch.hs index 37c45fdde8..f2a4504098 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Watch.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Watch.hs @@ -41,6 +41,7 @@ watch waspProjectDir outDir = FSN.withManager $ \mgr -> do _ <- FSN.watchDirChan mgr (SP.fromAbsDir waspProjectDir) eventFilter chan _ <- FSN.watchTreeChan mgr (SP.fromAbsDir $ waspProjectDir Common.extClientCodeDirInWaspProjectDir) eventFilter chan _ <- FSN.watchTreeChan mgr (SP.fromAbsDir $ waspProjectDir Common.extServerCodeDirInWaspProjectDir) eventFilter chan + _ <- FSN.watchTreeChan mgr (SP.fromAbsDir $ waspProjectDir Common.extSharedCodeDirInWaspProjectDir) eventFilter chan listenForEvents chan currentTime where listenForEvents :: Chan FSN.Event -> UTCTime -> IO () From efca38a4b1eab77e24e705f10ad5555e8fcec511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 14:53:51 +0100 Subject: [PATCH 26/65] Add final newline to jsconfigs --- waspc/data/Cli/templates/new/src/client/jsconfig.json | 2 +- waspc/data/Cli/templates/new/src/server/jsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/waspc/data/Cli/templates/new/src/client/jsconfig.json b/waspc/data/Cli/templates/new/src/client/jsconfig.json index 7cd2f39f90..02fb2e32a8 100644 --- a/waspc/data/Cli/templates/new/src/client/jsconfig.json +++ b/waspc/data/Cli/templates/new/src/client/jsconfig.json @@ -17,4 +17,4 @@ ] } } -} \ No newline at end of file +} diff --git a/waspc/data/Cli/templates/new/src/server/jsconfig.json b/waspc/data/Cli/templates/new/src/server/jsconfig.json index 8181e5d3b4..4717bc04bd 100644 --- a/waspc/data/Cli/templates/new/src/server/jsconfig.json +++ b/waspc/data/Cli/templates/new/src/server/jsconfig.json @@ -15,4 +15,4 @@ ] } } -} \ No newline at end of file +} From 9fa7e9a05ef1162c5453b08ffe4cd306bc3006d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 14:59:08 +0100 Subject: [PATCH 27/65] Fix regular and e2e tests --- .../waspBuild-golden/files.manifest | 7 +++++ .../waspBuild/.wasp/build/.waspchecksums | 28 +++++++++++++++++++ .../.wasp/build/server/src/ext-src/.gitkeep | 1 + .../.wasp/build/server/src/shared/.gitkeep | 1 + .../.wasp/build/web-app/src/ext-src/.gitkeep | 1 + .../.wasp/build/web-app/src/shared/.gitkeep | 1 + .../waspBuild/src/client/.gitkeep | 1 + .../waspBuild/src/server/.gitkeep | 1 + .../waspBuild/src/shared/.gitkeep | 1 + .../waspCompile-golden/files.manifest | 7 +++++ .../waspCompile/.wasp/out/.waspchecksums | 28 +++++++++++++++++++ .../.wasp/out/server/src/ext-src/.gitkeep | 1 + .../.wasp/out/server/src/shared/.gitkeep | 1 + .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 + .../.wasp/out/web-app/src/shared/.gitkeep | 1 + .../waspCompile/src/client/.gitkeep | 1 + .../waspCompile/src/server/.gitkeep | 1 + .../waspCompile/src/shared/.gitkeep | 1 + .../waspJob-golden/files.manifest | 7 +++++ .../waspJob/.wasp/out/.waspchecksums | 28 +++++++++++++++++++ .../.wasp/out/server/src/ext-src/.gitkeep | 1 + .../.wasp/out/server/src/shared/.gitkeep | 1 + .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 + .../.wasp/out/web-app/src/shared/.gitkeep | 1 + .../waspJob/src/client/.gitkeep | 1 + .../waspJob/src/server/.gitkeep | 1 + .../waspJob/src/shared/.gitkeep | 1 + .../waspMigrate-golden/files.manifest | 7 +++++ .../waspMigrate/.wasp/out/.waspchecksums | 28 +++++++++++++++++++ .../.wasp/out/server/src/ext-src/.gitkeep | 1 + .../.wasp/out/server/src/shared/.gitkeep | 1 + .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 + .../.wasp/out/web-app/src/shared/.gitkeep | 1 + .../waspMigrate/src/client/.gitkeep | 1 + .../waspMigrate/src/server/.gitkeep | 1 + .../waspMigrate/src/shared/.gitkeep | 1 + .../waspNew-golden/files.manifest | 3 ++ .../waspNew/src/client/.gitkeep | 1 + .../waspNew/src/server/.gitkeep | 1 + .../waspNew/src/shared/.gitkeep | 1 + waspc/test/Generator/WebAppGeneratorTest.hs | 1 + 41 files changed, 175 insertions(+) create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest b/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest index a5ba6207c4..519e8f0a9a 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest @@ -11,6 +11,7 @@ waspBuild/.wasp/build/server/src/config.js waspBuild/.wasp/build/server/src/core/AuthError.js waspBuild/.wasp/build/server/src/core/HttpError.js waspBuild/.wasp/build/server/src/dbClient.js +waspBuild/.wasp/build/server/src/ext-src/.gitkeep waspBuild/.wasp/build/server/src/jobs/core/Job.js waspBuild/.wasp/build/server/src/jobs/core/SubmittedJob.js waspBuild/.wasp/build/server/src/jobs/core/allJobs.js @@ -20,6 +21,7 @@ waspBuild/.wasp/build/server/src/jobs/core/simpleJob.js waspBuild/.wasp/build/server/src/routes/index.js waspBuild/.wasp/build/server/src/routes/operations/index.js waspBuild/.wasp/build/server/src/server.js +waspBuild/.wasp/build/server/src/shared/.gitkeep waspBuild/.wasp/build/server/src/utils.js waspBuild/.wasp/build/web-app/.npmrc waspBuild/.wasp/build/web-app/README.md @@ -32,6 +34,7 @@ waspBuild/.wasp/build/web-app/src/actions/core.js waspBuild/.wasp/build/web-app/src/actions/index.js waspBuild/.wasp/build/web-app/src/api.js waspBuild/.wasp/build/web-app/src/config.js +waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep waspBuild/.wasp/build/web-app/src/ext-src/Main.css waspBuild/.wasp/build/web-app/src/ext-src/MainPage.js waspBuild/.wasp/build/web-app/src/ext-src/waspLogo.png @@ -46,10 +49,14 @@ waspBuild/.wasp/build/web-app/src/queries/index.js waspBuild/.wasp/build/web-app/src/queryClient.js waspBuild/.wasp/build/web-app/src/router.js waspBuild/.wasp/build/web-app/src/serviceWorker.js +waspBuild/.wasp/build/web-app/src/shared/.gitkeep waspBuild/.wasp/build/web-app/src/utils.js waspBuild/.wasproot waspBuild/main.wasp waspBuild/src/.waspignore +waspBuild/src/client/.gitkeep waspBuild/src/client/Main.css waspBuild/src/client/MainPage.js waspBuild/src/client/waspLogo.png +waspBuild/src/server/.gitkeep +waspBuild/src/shared/.gitkeep diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums index 07d4000443..b821e4b01d 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums @@ -83,6 +83,13 @@ ], "20c67ca197da3de2d37528ceaff2e40af910be8177f346c6d5c2b2f983810c43" ], + [ + [ + "file", + "server/src/ext-src/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -146,6 +153,13 @@ ], "3ee2212932180883fabe36bc22e18e2167a63cdbca8bde2dd595419ae2a34e95" ], + [ + [ + "file", + "server/src/shared/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -237,6 +251,13 @@ ], "a30d5ae7c1b317a7132cac93f4b5bffc3daf11f4f07b5e0d977d063810ffdd11" ], + [ + [ + "file", + "web-app/src/ext-src/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -335,6 +356,13 @@ ], "0b097cb6e2c83821630a33de933893bf75de49731b18ce3c25fc5384866fbac0" ], + [ + [ + "file", + "web-app/src/shared/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest b/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest index 5294497adf..b692e909f8 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest @@ -11,6 +11,7 @@ waspCompile/.wasp/out/server/src/config.js waspCompile/.wasp/out/server/src/core/AuthError.js waspCompile/.wasp/out/server/src/core/HttpError.js waspCompile/.wasp/out/server/src/dbClient.js +waspCompile/.wasp/out/server/src/ext-src/.gitkeep waspCompile/.wasp/out/server/src/jobs/core/Job.js waspCompile/.wasp/out/server/src/jobs/core/SubmittedJob.js waspCompile/.wasp/out/server/src/jobs/core/allJobs.js @@ -20,6 +21,7 @@ waspCompile/.wasp/out/server/src/jobs/core/simpleJob.js waspCompile/.wasp/out/server/src/routes/index.js waspCompile/.wasp/out/server/src/routes/operations/index.js waspCompile/.wasp/out/server/src/server.js +waspCompile/.wasp/out/server/src/shared/.gitkeep waspCompile/.wasp/out/server/src/utils.js waspCompile/.wasp/out/web-app/.npmrc waspCompile/.wasp/out/web-app/README.md @@ -32,6 +34,7 @@ waspCompile/.wasp/out/web-app/src/actions/core.js waspCompile/.wasp/out/web-app/src/actions/index.js waspCompile/.wasp/out/web-app/src/api.js waspCompile/.wasp/out/web-app/src/config.js +waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep waspCompile/.wasp/out/web-app/src/ext-src/Main.css waspCompile/.wasp/out/web-app/src/ext-src/MainPage.js waspCompile/.wasp/out/web-app/src/ext-src/waspLogo.png @@ -46,10 +49,14 @@ waspCompile/.wasp/out/web-app/src/queries/index.js waspCompile/.wasp/out/web-app/src/queryClient.js waspCompile/.wasp/out/web-app/src/router.js waspCompile/.wasp/out/web-app/src/serviceWorker.js +waspCompile/.wasp/out/web-app/src/shared/.gitkeep waspCompile/.wasp/out/web-app/src/utils.js waspCompile/.wasproot waspCompile/main.wasp waspCompile/src/.waspignore +waspCompile/src/client/.gitkeep waspCompile/src/client/Main.css waspCompile/src/client/MainPage.js waspCompile/src/client/waspLogo.png +waspCompile/src/server/.gitkeep +waspCompile/src/shared/.gitkeep diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums index 494e423a8a..2e899d885a 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums @@ -83,6 +83,13 @@ ], "20c67ca197da3de2d37528ceaff2e40af910be8177f346c6d5c2b2f983810c43" ], + [ + [ + "file", + "server/src/ext-src/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -146,6 +153,13 @@ ], "3ee2212932180883fabe36bc22e18e2167a63cdbca8bde2dd595419ae2a34e95" ], + [ + [ + "file", + "server/src/shared/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -237,6 +251,13 @@ ], "a30d5ae7c1b317a7132cac93f4b5bffc3daf11f4f07b5e0d977d063810ffdd11" ], + [ + [ + "file", + "web-app/src/ext-src/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -335,6 +356,13 @@ ], "0b097cb6e2c83821630a33de933893bf75de49731b18ce3c25fc5384866fbac0" ], + [ + [ + "file", + "web-app/src/shared/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest b/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest index b69946ae23..c298d62578 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest @@ -11,6 +11,7 @@ waspJob/.wasp/out/server/src/config.js waspJob/.wasp/out/server/src/core/AuthError.js waspJob/.wasp/out/server/src/core/HttpError.js waspJob/.wasp/out/server/src/dbClient.js +waspJob/.wasp/out/server/src/ext-src/.gitkeep waspJob/.wasp/out/server/src/ext-src/jobs/bar.js waspJob/.wasp/out/server/src/jobs/MySpecialJob.js waspJob/.wasp/out/server/src/jobs/core/Job.js @@ -22,6 +23,7 @@ waspJob/.wasp/out/server/src/jobs/core/simpleJob.js waspJob/.wasp/out/server/src/routes/index.js waspJob/.wasp/out/server/src/routes/operations/index.js waspJob/.wasp/out/server/src/server.js +waspJob/.wasp/out/server/src/shared/.gitkeep waspJob/.wasp/out/server/src/utils.js waspJob/.wasp/out/web-app/.npmrc waspJob/.wasp/out/web-app/README.md @@ -34,6 +36,7 @@ waspJob/.wasp/out/web-app/src/actions/core.js waspJob/.wasp/out/web-app/src/actions/index.js waspJob/.wasp/out/web-app/src/api.js waspJob/.wasp/out/web-app/src/config.js +waspJob/.wasp/out/web-app/src/ext-src/.gitkeep waspJob/.wasp/out/web-app/src/ext-src/Main.css waspJob/.wasp/out/web-app/src/ext-src/MainPage.js waspJob/.wasp/out/web-app/src/ext-src/waspLogo.png @@ -48,11 +51,15 @@ waspJob/.wasp/out/web-app/src/queries/index.js waspJob/.wasp/out/web-app/src/queryClient.js waspJob/.wasp/out/web-app/src/router.js waspJob/.wasp/out/web-app/src/serviceWorker.js +waspJob/.wasp/out/web-app/src/shared/.gitkeep waspJob/.wasp/out/web-app/src/utils.js waspJob/.wasproot waspJob/main.wasp waspJob/src/.waspignore +waspJob/src/client/.gitkeep waspJob/src/client/Main.css waspJob/src/client/MainPage.js waspJob/src/client/waspLogo.png +waspJob/src/server/.gitkeep waspJob/src/server/jobs/bar.js +waspJob/src/shared/.gitkeep diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums index 457ac5651d..e3805e65c7 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums @@ -83,6 +83,13 @@ ], "20c67ca197da3de2d37528ceaff2e40af910be8177f346c6d5c2b2f983810c43" ], + [ + [ + "file", + "server/src/ext-src/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -160,6 +167,13 @@ ], "25cee89ea082bef40d13a6ba01718ecaa0933c92991c9d395dc8602215c61255" ], + [ + [ + "file", + "server/src/shared/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -251,6 +265,13 @@ ], "a30d5ae7c1b317a7132cac93f4b5bffc3daf11f4f07b5e0d977d063810ffdd11" ], + [ + [ + "file", + "web-app/src/ext-src/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -349,6 +370,13 @@ ], "0b097cb6e2c83821630a33de933893bf75de49731b18ce3c25fc5384866fbac0" ], + [ + [ + "file", + "web-app/src/shared/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest b/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest index 843a206145..38c2c80e25 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest @@ -16,6 +16,7 @@ waspMigrate/.wasp/out/server/src/config.js waspMigrate/.wasp/out/server/src/core/AuthError.js waspMigrate/.wasp/out/server/src/core/HttpError.js waspMigrate/.wasp/out/server/src/dbClient.js +waspMigrate/.wasp/out/server/src/ext-src/.gitkeep waspMigrate/.wasp/out/server/src/jobs/core/Job.js waspMigrate/.wasp/out/server/src/jobs/core/SubmittedJob.js waspMigrate/.wasp/out/server/src/jobs/core/allJobs.js @@ -25,6 +26,7 @@ waspMigrate/.wasp/out/server/src/jobs/core/simpleJob.js waspMigrate/.wasp/out/server/src/routes/index.js waspMigrate/.wasp/out/server/src/routes/operations/index.js waspMigrate/.wasp/out/server/src/server.js +waspMigrate/.wasp/out/server/src/shared/.gitkeep waspMigrate/.wasp/out/server/src/utils.js waspMigrate/.wasp/out/web-app/.npmrc waspMigrate/.wasp/out/web-app/README.md @@ -37,6 +39,7 @@ waspMigrate/.wasp/out/web-app/src/actions/core.js waspMigrate/.wasp/out/web-app/src/actions/index.js waspMigrate/.wasp/out/web-app/src/api.js waspMigrate/.wasp/out/web-app/src/config.js +waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep waspMigrate/.wasp/out/web-app/src/ext-src/Main.css waspMigrate/.wasp/out/web-app/src/ext-src/MainPage.js waspMigrate/.wasp/out/web-app/src/ext-src/waspLogo.png @@ -51,12 +54,16 @@ waspMigrate/.wasp/out/web-app/src/queries/index.js waspMigrate/.wasp/out/web-app/src/queryClient.js waspMigrate/.wasp/out/web-app/src/router.js waspMigrate/.wasp/out/web-app/src/serviceWorker.js +waspMigrate/.wasp/out/web-app/src/shared/.gitkeep waspMigrate/.wasp/out/web-app/src/utils.js waspMigrate/.wasproot waspMigrate/main.wasp waspMigrate/migrations/migration_lock.toml waspMigrate/migrations/no-date-foo/migration.sql waspMigrate/src/.waspignore +waspMigrate/src/client/.gitkeep waspMigrate/src/client/Main.css waspMigrate/src/client/MainPage.js waspMigrate/src/client/waspLogo.png +waspMigrate/src/server/.gitkeep +waspMigrate/src/shared/.gitkeep diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums index 49caaef6fe..b37c7d6d7f 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums @@ -83,6 +83,13 @@ ], "20c67ca197da3de2d37528ceaff2e40af910be8177f346c6d5c2b2f983810c43" ], + [ + [ + "file", + "server/src/ext-src/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -146,6 +153,13 @@ ], "3ee2212932180883fabe36bc22e18e2167a63cdbca8bde2dd595419ae2a34e95" ], + [ + [ + "file", + "server/src/shared/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -237,6 +251,13 @@ ], "a30d5ae7c1b317a7132cac93f4b5bffc3daf11f4f07b5e0d977d063810ffdd11" ], + [ + [ + "file", + "web-app/src/ext-src/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", @@ -335,6 +356,13 @@ ], "0b097cb6e2c83821630a33de933893bf75de49731b18ce3c25fc5384866fbac0" ], + [ + [ + "file", + "web-app/src/shared/.gitkeep" + ], + "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + ], [ [ "file", diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest b/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest index 93901d86ab..0955538620 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest @@ -1,6 +1,9 @@ waspNew/.wasproot waspNew/main.wasp waspNew/src/.waspignore +waspNew/src/client/.gitkeep waspNew/src/client/Main.css waspNew/src/client/MainPage.js waspNew/src/client/waspLogo.png +waspNew/src/server/.gitkeep +waspNew/src/shared/.gitkeep diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/test/Generator/WebAppGeneratorTest.hs b/waspc/test/Generator/WebAppGeneratorTest.hs index 87da105030..f48d731b7c 100644 --- a/waspc/test/Generator/WebAppGeneratorTest.hs +++ b/waspc/test/Generator/WebAppGeneratorTest.hs @@ -37,6 +37,7 @@ spec_WebAppGenerator = do ], AS.externalClientFiles = [], AS.externalServerFiles = [], + AS.externalSharedFiles = [], AS.isBuild = False, AS.migrationsDir = Nothing, AS.dotEnvServerFile = Nothing, From 661b2820096883d68e2ef8718efd6cbf72c948c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 31 Oct 2022 15:03:37 +0100 Subject: [PATCH 28/65] Update e2e tests --- .../waspBuild-golden/files.manifest | 14 +++++----- .../waspBuild/.wasp/build/.waspchecksums | 24 ++++++++-------- .../.wasp/build/server/src/ext-src/.gitkeep | 1 - .../build/server/src/ext-src/jsconfig.json | 18 ++++++++++++ .../.wasp/build/server/src/shared/.gitkeep | 1 - .../build/server/src/shared/jsconfig.json | 15 ++++++++++ .../.wasp/build/web-app/src/ext-src/.gitkeep | 1 - .../build/web-app/src/ext-src/jsconfig.json | 20 +++++++++++++ .../.wasp/build/web-app/src/shared/.gitkeep | 1 - .../build/web-app/src/shared/jsconfig.json | 15 ++++++++++ .../waspBuild/src/client/.gitkeep | 1 - .../waspBuild/src/client/jsconfig.json | 20 +++++++++++++ .../waspBuild/src/server/.gitkeep | 1 - .../waspBuild/src/server/jsconfig.json | 18 ++++++++++++ .../waspBuild/src/shared/.gitkeep | 1 - .../waspBuild/src/shared/jsconfig.json | 15 ++++++++++ .../waspCompile-golden/files.manifest | 14 +++++----- .../waspCompile/.wasp/out/.waspchecksums | 24 ++++++++-------- .../.wasp/out/server/src/ext-src/.gitkeep | 1 - .../out/server/src/ext-src/jsconfig.json | 18 ++++++++++++ .../.wasp/out/server/src/shared/.gitkeep | 1 - .../.wasp/out/server/src/shared/jsconfig.json | 15 ++++++++++ .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 - .../out/web-app/src/ext-src/jsconfig.json | 20 +++++++++++++ .../.wasp/out/web-app/src/shared/.gitkeep | 1 - .../out/web-app/src/shared/jsconfig.json | 15 ++++++++++ .../waspCompile/src/client/.gitkeep | 1 - .../waspCompile/src/client/jsconfig.json | 20 +++++++++++++ .../waspCompile/src/server/.gitkeep | 1 - .../waspCompile/src/server/jsconfig.json | 18 ++++++++++++ .../waspCompile/src/shared/.gitkeep | 1 - .../waspCompile/src/shared/jsconfig.json | 15 ++++++++++ .../waspJob-golden/files.manifest | 14 +++++----- .../waspJob/.wasp/out/.waspchecksums | 28 +++++++++---------- .../.wasp/out/server/src/ext-src/.gitkeep | 1 - .../out/server/src/ext-src/jsconfig.json | 18 ++++++++++++ .../.wasp/out/server/src/shared/.gitkeep | 1 - .../.wasp/out/server/src/shared/jsconfig.json | 15 ++++++++++ .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 - .../out/web-app/src/ext-src/jsconfig.json | 20 +++++++++++++ .../.wasp/out/web-app/src/shared/.gitkeep | 1 - .../out/web-app/src/shared/jsconfig.json | 15 ++++++++++ .../waspJob/src/client/.gitkeep | 1 - .../waspJob/src/client/jsconfig.json | 20 +++++++++++++ .../waspJob/src/server/.gitkeep | 1 - .../waspJob/src/server/jsconfig.json | 18 ++++++++++++ .../waspJob/src/shared/.gitkeep | 1 - .../waspJob/src/shared/jsconfig.json | 15 ++++++++++ .../waspMigrate-golden/files.manifest | 14 +++++----- .../waspMigrate/.wasp/out/.waspchecksums | 24 ++++++++-------- .../.wasp/out/server/src/ext-src/.gitkeep | 1 - .../out/server/src/ext-src/jsconfig.json | 18 ++++++++++++ .../.wasp/out/server/src/shared/.gitkeep | 1 - .../.wasp/out/server/src/shared/jsconfig.json | 15 ++++++++++ .../.wasp/out/web-app/src/ext-src/.gitkeep | 1 - .../out/web-app/src/ext-src/jsconfig.json | 20 +++++++++++++ .../.wasp/out/web-app/src/shared/.gitkeep | 1 - .../out/web-app/src/shared/jsconfig.json | 15 ++++++++++ .../waspMigrate/src/client/.gitkeep | 1 - .../waspMigrate/src/client/jsconfig.json | 20 +++++++++++++ .../waspMigrate/src/server/.gitkeep | 1 - .../waspMigrate/src/server/jsconfig.json | 18 ++++++++++++ .../waspMigrate/src/shared/.gitkeep | 1 - .../waspMigrate/src/shared/jsconfig.json | 15 ++++++++++ .../waspNew-golden/files.manifest | 6 ++-- .../waspNew/src/client/.gitkeep | 1 - .../waspNew/src/client/jsconfig.json | 20 +++++++++++++ .../waspNew/src/server/.gitkeep | 1 - .../waspNew/src/server/jsconfig.json | 18 ++++++++++++ .../waspNew/src/shared/.gitkeep | 1 - .../waspNew/src/shared/jsconfig.json | 15 ++++++++++ 71 files changed, 618 insertions(+), 112 deletions(-) delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json delete mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep create mode 100644 waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest b/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest index 519e8f0a9a..d65040fe4e 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/files.manifest @@ -11,7 +11,7 @@ waspBuild/.wasp/build/server/src/config.js waspBuild/.wasp/build/server/src/core/AuthError.js waspBuild/.wasp/build/server/src/core/HttpError.js waspBuild/.wasp/build/server/src/dbClient.js -waspBuild/.wasp/build/server/src/ext-src/.gitkeep +waspBuild/.wasp/build/server/src/ext-src/jsconfig.json waspBuild/.wasp/build/server/src/jobs/core/Job.js waspBuild/.wasp/build/server/src/jobs/core/SubmittedJob.js waspBuild/.wasp/build/server/src/jobs/core/allJobs.js @@ -21,7 +21,7 @@ waspBuild/.wasp/build/server/src/jobs/core/simpleJob.js waspBuild/.wasp/build/server/src/routes/index.js waspBuild/.wasp/build/server/src/routes/operations/index.js waspBuild/.wasp/build/server/src/server.js -waspBuild/.wasp/build/server/src/shared/.gitkeep +waspBuild/.wasp/build/server/src/shared/jsconfig.json waspBuild/.wasp/build/server/src/utils.js waspBuild/.wasp/build/web-app/.npmrc waspBuild/.wasp/build/web-app/README.md @@ -34,9 +34,9 @@ waspBuild/.wasp/build/web-app/src/actions/core.js waspBuild/.wasp/build/web-app/src/actions/index.js waspBuild/.wasp/build/web-app/src/api.js waspBuild/.wasp/build/web-app/src/config.js -waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep waspBuild/.wasp/build/web-app/src/ext-src/Main.css waspBuild/.wasp/build/web-app/src/ext-src/MainPage.js +waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json waspBuild/.wasp/build/web-app/src/ext-src/waspLogo.png waspBuild/.wasp/build/web-app/src/index.css waspBuild/.wasp/build/web-app/src/index.js @@ -49,14 +49,14 @@ waspBuild/.wasp/build/web-app/src/queries/index.js waspBuild/.wasp/build/web-app/src/queryClient.js waspBuild/.wasp/build/web-app/src/router.js waspBuild/.wasp/build/web-app/src/serviceWorker.js -waspBuild/.wasp/build/web-app/src/shared/.gitkeep +waspBuild/.wasp/build/web-app/src/shared/jsconfig.json waspBuild/.wasp/build/web-app/src/utils.js waspBuild/.wasproot waspBuild/main.wasp waspBuild/src/.waspignore -waspBuild/src/client/.gitkeep waspBuild/src/client/Main.css waspBuild/src/client/MainPage.js +waspBuild/src/client/jsconfig.json waspBuild/src/client/waspLogo.png -waspBuild/src/server/.gitkeep -waspBuild/src/shared/.gitkeep +waspBuild/src/server/jsconfig.json +waspBuild/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums index b821e4b01d..35edf2646a 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums @@ -86,9 +86,9 @@ [ [ "file", - "server/src/ext-src/.gitkeep" + "server/src/ext-src/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "e98029fbee40f31740206da4db736fb3214e51c6c909179cbaff73f472f0d1dc" ], [ [ @@ -156,9 +156,9 @@ [ [ "file", - "server/src/shared/.gitkeep" + "server/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" ], [ [ @@ -254,23 +254,23 @@ [ [ "file", - "web-app/src/ext-src/.gitkeep" + "web-app/src/ext-src/Main.css" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" ], [ [ "file", - "web-app/src/ext-src/Main.css" + "web-app/src/ext-src/MainPage.js" ], - "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" + "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" ], [ [ "file", - "web-app/src/ext-src/MainPage.js" + "web-app/src/ext-src/jsconfig.json" ], - "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" + "aadd91757ac44c9b83beb6536ee877d76ee8a11513ecc870ad972beb768ae3b6" ], [ [ @@ -359,9 +359,9 @@ [ [ "file", - "web-app/src/shared/.gitkeep" + "web-app/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest b/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest index b692e909f8..3857a9c106 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/files.manifest @@ -11,7 +11,7 @@ waspCompile/.wasp/out/server/src/config.js waspCompile/.wasp/out/server/src/core/AuthError.js waspCompile/.wasp/out/server/src/core/HttpError.js waspCompile/.wasp/out/server/src/dbClient.js -waspCompile/.wasp/out/server/src/ext-src/.gitkeep +waspCompile/.wasp/out/server/src/ext-src/jsconfig.json waspCompile/.wasp/out/server/src/jobs/core/Job.js waspCompile/.wasp/out/server/src/jobs/core/SubmittedJob.js waspCompile/.wasp/out/server/src/jobs/core/allJobs.js @@ -21,7 +21,7 @@ waspCompile/.wasp/out/server/src/jobs/core/simpleJob.js waspCompile/.wasp/out/server/src/routes/index.js waspCompile/.wasp/out/server/src/routes/operations/index.js waspCompile/.wasp/out/server/src/server.js -waspCompile/.wasp/out/server/src/shared/.gitkeep +waspCompile/.wasp/out/server/src/shared/jsconfig.json waspCompile/.wasp/out/server/src/utils.js waspCompile/.wasp/out/web-app/.npmrc waspCompile/.wasp/out/web-app/README.md @@ -34,9 +34,9 @@ waspCompile/.wasp/out/web-app/src/actions/core.js waspCompile/.wasp/out/web-app/src/actions/index.js waspCompile/.wasp/out/web-app/src/api.js waspCompile/.wasp/out/web-app/src/config.js -waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep waspCompile/.wasp/out/web-app/src/ext-src/Main.css waspCompile/.wasp/out/web-app/src/ext-src/MainPage.js +waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json waspCompile/.wasp/out/web-app/src/ext-src/waspLogo.png waspCompile/.wasp/out/web-app/src/index.css waspCompile/.wasp/out/web-app/src/index.js @@ -49,14 +49,14 @@ waspCompile/.wasp/out/web-app/src/queries/index.js waspCompile/.wasp/out/web-app/src/queryClient.js waspCompile/.wasp/out/web-app/src/router.js waspCompile/.wasp/out/web-app/src/serviceWorker.js -waspCompile/.wasp/out/web-app/src/shared/.gitkeep +waspCompile/.wasp/out/web-app/src/shared/jsconfig.json waspCompile/.wasp/out/web-app/src/utils.js waspCompile/.wasproot waspCompile/main.wasp waspCompile/src/.waspignore -waspCompile/src/client/.gitkeep waspCompile/src/client/Main.css waspCompile/src/client/MainPage.js +waspCompile/src/client/jsconfig.json waspCompile/src/client/waspLogo.png -waspCompile/src/server/.gitkeep -waspCompile/src/shared/.gitkeep +waspCompile/src/server/jsconfig.json +waspCompile/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums index 2e899d885a..c71f587d47 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums @@ -86,9 +86,9 @@ [ [ "file", - "server/src/ext-src/.gitkeep" + "server/src/ext-src/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "e98029fbee40f31740206da4db736fb3214e51c6c909179cbaff73f472f0d1dc" ], [ [ @@ -156,9 +156,9 @@ [ [ "file", - "server/src/shared/.gitkeep" + "server/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" ], [ [ @@ -254,23 +254,23 @@ [ [ "file", - "web-app/src/ext-src/.gitkeep" + "web-app/src/ext-src/Main.css" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" ], [ [ "file", - "web-app/src/ext-src/Main.css" + "web-app/src/ext-src/MainPage.js" ], - "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" + "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" ], [ [ "file", - "web-app/src/ext-src/MainPage.js" + "web-app/src/ext-src/jsconfig.json" ], - "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" + "aadd91757ac44c9b83beb6536ee877d76ee8a11513ecc870ad972beb768ae3b6" ], [ [ @@ -359,9 +359,9 @@ [ [ "file", - "web-app/src/shared/.gitkeep" + "web-app/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest b/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest index c298d62578..bee4b5d8cf 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspJob-golden/files.manifest @@ -11,8 +11,8 @@ waspJob/.wasp/out/server/src/config.js waspJob/.wasp/out/server/src/core/AuthError.js waspJob/.wasp/out/server/src/core/HttpError.js waspJob/.wasp/out/server/src/dbClient.js -waspJob/.wasp/out/server/src/ext-src/.gitkeep waspJob/.wasp/out/server/src/ext-src/jobs/bar.js +waspJob/.wasp/out/server/src/ext-src/jsconfig.json waspJob/.wasp/out/server/src/jobs/MySpecialJob.js waspJob/.wasp/out/server/src/jobs/core/Job.js waspJob/.wasp/out/server/src/jobs/core/SubmittedJob.js @@ -23,7 +23,7 @@ waspJob/.wasp/out/server/src/jobs/core/simpleJob.js waspJob/.wasp/out/server/src/routes/index.js waspJob/.wasp/out/server/src/routes/operations/index.js waspJob/.wasp/out/server/src/server.js -waspJob/.wasp/out/server/src/shared/.gitkeep +waspJob/.wasp/out/server/src/shared/jsconfig.json waspJob/.wasp/out/server/src/utils.js waspJob/.wasp/out/web-app/.npmrc waspJob/.wasp/out/web-app/README.md @@ -36,9 +36,9 @@ waspJob/.wasp/out/web-app/src/actions/core.js waspJob/.wasp/out/web-app/src/actions/index.js waspJob/.wasp/out/web-app/src/api.js waspJob/.wasp/out/web-app/src/config.js -waspJob/.wasp/out/web-app/src/ext-src/.gitkeep waspJob/.wasp/out/web-app/src/ext-src/Main.css waspJob/.wasp/out/web-app/src/ext-src/MainPage.js +waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json waspJob/.wasp/out/web-app/src/ext-src/waspLogo.png waspJob/.wasp/out/web-app/src/index.css waspJob/.wasp/out/web-app/src/index.js @@ -51,15 +51,15 @@ waspJob/.wasp/out/web-app/src/queries/index.js waspJob/.wasp/out/web-app/src/queryClient.js waspJob/.wasp/out/web-app/src/router.js waspJob/.wasp/out/web-app/src/serviceWorker.js -waspJob/.wasp/out/web-app/src/shared/.gitkeep +waspJob/.wasp/out/web-app/src/shared/jsconfig.json waspJob/.wasp/out/web-app/src/utils.js waspJob/.wasproot waspJob/main.wasp waspJob/src/.waspignore -waspJob/src/client/.gitkeep waspJob/src/client/Main.css waspJob/src/client/MainPage.js +waspJob/src/client/jsconfig.json waspJob/src/client/waspLogo.png -waspJob/src/server/.gitkeep waspJob/src/server/jobs/bar.js -waspJob/src/shared/.gitkeep +waspJob/src/server/jsconfig.json +waspJob/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums index e3805e65c7..e6a40a6612 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums @@ -86,16 +86,16 @@ [ [ "file", - "server/src/ext-src/.gitkeep" + "server/src/ext-src/jobs/bar.js" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "2e126f35b3a3e9a289e0dcfd8707fe903c6a053e0cf85899fb5f686d77dd3eb5" ], [ [ "file", - "server/src/ext-src/jobs/bar.js" + "server/src/ext-src/jsconfig.json" ], - "2e126f35b3a3e9a289e0dcfd8707fe903c6a053e0cf85899fb5f686d77dd3eb5" + "e98029fbee40f31740206da4db736fb3214e51c6c909179cbaff73f472f0d1dc" ], [ [ @@ -170,9 +170,9 @@ [ [ "file", - "server/src/shared/.gitkeep" + "server/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" ], [ [ @@ -268,23 +268,23 @@ [ [ "file", - "web-app/src/ext-src/.gitkeep" + "web-app/src/ext-src/Main.css" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" ], [ [ "file", - "web-app/src/ext-src/Main.css" + "web-app/src/ext-src/MainPage.js" ], - "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" + "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" ], [ [ "file", - "web-app/src/ext-src/MainPage.js" + "web-app/src/ext-src/jsconfig.json" ], - "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" + "aadd91757ac44c9b83beb6536ee877d76ee8a11513ecc870ad972beb768ae3b6" ], [ [ @@ -373,9 +373,9 @@ [ [ "file", - "web-app/src/shared/.gitkeep" + "web-app/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest b/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest index 38c2c80e25..4f47793612 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/files.manifest @@ -16,7 +16,7 @@ waspMigrate/.wasp/out/server/src/config.js waspMigrate/.wasp/out/server/src/core/AuthError.js waspMigrate/.wasp/out/server/src/core/HttpError.js waspMigrate/.wasp/out/server/src/dbClient.js -waspMigrate/.wasp/out/server/src/ext-src/.gitkeep +waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json waspMigrate/.wasp/out/server/src/jobs/core/Job.js waspMigrate/.wasp/out/server/src/jobs/core/SubmittedJob.js waspMigrate/.wasp/out/server/src/jobs/core/allJobs.js @@ -26,7 +26,7 @@ waspMigrate/.wasp/out/server/src/jobs/core/simpleJob.js waspMigrate/.wasp/out/server/src/routes/index.js waspMigrate/.wasp/out/server/src/routes/operations/index.js waspMigrate/.wasp/out/server/src/server.js -waspMigrate/.wasp/out/server/src/shared/.gitkeep +waspMigrate/.wasp/out/server/src/shared/jsconfig.json waspMigrate/.wasp/out/server/src/utils.js waspMigrate/.wasp/out/web-app/.npmrc waspMigrate/.wasp/out/web-app/README.md @@ -39,9 +39,9 @@ waspMigrate/.wasp/out/web-app/src/actions/core.js waspMigrate/.wasp/out/web-app/src/actions/index.js waspMigrate/.wasp/out/web-app/src/api.js waspMigrate/.wasp/out/web-app/src/config.js -waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep waspMigrate/.wasp/out/web-app/src/ext-src/Main.css waspMigrate/.wasp/out/web-app/src/ext-src/MainPage.js +waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json waspMigrate/.wasp/out/web-app/src/ext-src/waspLogo.png waspMigrate/.wasp/out/web-app/src/index.css waspMigrate/.wasp/out/web-app/src/index.js @@ -54,16 +54,16 @@ waspMigrate/.wasp/out/web-app/src/queries/index.js waspMigrate/.wasp/out/web-app/src/queryClient.js waspMigrate/.wasp/out/web-app/src/router.js waspMigrate/.wasp/out/web-app/src/serviceWorker.js -waspMigrate/.wasp/out/web-app/src/shared/.gitkeep +waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json waspMigrate/.wasp/out/web-app/src/utils.js waspMigrate/.wasproot waspMigrate/main.wasp waspMigrate/migrations/migration_lock.toml waspMigrate/migrations/no-date-foo/migration.sql waspMigrate/src/.waspignore -waspMigrate/src/client/.gitkeep waspMigrate/src/client/Main.css waspMigrate/src/client/MainPage.js +waspMigrate/src/client/jsconfig.json waspMigrate/src/client/waspLogo.png -waspMigrate/src/server/.gitkeep -waspMigrate/src/shared/.gitkeep +waspMigrate/src/server/jsconfig.json +waspMigrate/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums index b37c7d6d7f..bc42c17a1d 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums @@ -86,9 +86,9 @@ [ [ "file", - "server/src/ext-src/.gitkeep" + "server/src/ext-src/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "e98029fbee40f31740206da4db736fb3214e51c6c909179cbaff73f472f0d1dc" ], [ [ @@ -156,9 +156,9 @@ [ [ "file", - "server/src/shared/.gitkeep" + "server/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" ], [ [ @@ -254,23 +254,23 @@ [ [ "file", - "web-app/src/ext-src/.gitkeep" + "web-app/src/ext-src/Main.css" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" ], [ [ "file", - "web-app/src/ext-src/Main.css" + "web-app/src/ext-src/MainPage.js" ], - "4c1268c55a99589564123ebe1ebbea76ac545b85f4d17eaea76e981db269dba7" + "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" ], [ [ "file", - "web-app/src/ext-src/MainPage.js" + "web-app/src/ext-src/jsconfig.json" ], - "c9ed9b5271f648715373095f43d60a2ab3e47f159c6dd6f3337ed22e5b73e80c" + "aadd91757ac44c9b83beb6536ee877d76ee8a11513ecc870ad972beb768ae3b6" ], [ [ @@ -359,9 +359,9 @@ [ [ "file", - "web-app/src/shared/.gitkeep" + "web-app/src/shared/jsconfig.json" ], - "3c93961ee5013ddc0149b57c9eb7b469aea5f3cb197429bded0d20498a267b06" + "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest b/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest index 0955538620..733afa0d13 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest +++ b/waspc/e2e-test/test-outputs/waspNew-golden/files.manifest @@ -1,9 +1,9 @@ waspNew/.wasproot waspNew/main.wasp waspNew/src/.waspignore -waspNew/src/client/.gitkeep waspNew/src/client/Main.css waspNew/src/client/MainPage.js +waspNew/src/client/jsconfig.json waspNew/src/client/waspLogo.png -waspNew/src/server/.gitkeep -waspNew/src/shared/.gitkeep +waspNew/src/server/jsconfig.json +waspNew/src/shared/jsconfig.json diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json new file mode 100644 index 0000000000..02fb2e32a8 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "esModuleInterop": true, + "allowJs": true, + "jsx": "preserve", + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/web-app/src/*" + ], + "*": [ + "*", + "../../.wasp/out/web-app/node_modules/*", + "../../.wasp/out/web-app/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json new file mode 100644 index 0000000000..4717bc04bd --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "@wasp/*": [ + "../../.wasp/out/server/src/*" + ], + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json new file mode 100644 index 0000000000..4c430a8193 --- /dev/null +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "allowJs": true, + "target": "es2018", + "baseUrl": ".", + "paths": { + "*": [ + "*", + "../../.wasp/out/server/node_modules/*", + "../../.wasp/out/server/node_modules/@types/*" + ] + } + } +} From 8674887d83ac27b6b54330766b905d77d4bb2bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 4 Nov 2022 12:18:21 +0100 Subject: [PATCH 29/65] Fix cli template packaging and update todoApp --- .../src/Wasp/Cli/Command/CreateNewProject.hs | 2 +- waspc/examples/todoApp/.gitignore | 5 +-- waspc/examples/todoApp/.wasproot | 2 +- .../examples/todoApp/{ext => src}/.waspignore | 0 waspc/examples/todoApp/src/client/.gitkeep | 1 + .../todoApp/{ext => src/client}/Main.css | 0 .../todoApp/{ext => src/client}/Todo.js | 0 .../{ext => src/client}/clientSetup.js | 0 .../{ext => src/client}/pages/About.js | 0 .../todoApp/{ext => src/client}/pages/Main.js | 0 .../{ext => src/client}/pages/ProfilePage.js | 0 .../todoApp/{ext => src/client}/pages/Task.js | 0 .../{ext => src/client}/pages/auth/Login.js | 0 .../{ext => src/client}/pages/auth/Signup.js | 0 waspc/examples/todoApp/src/server/.gitkeep | 1 + .../todoApp/{ext => src/server}/actions.js | 0 .../{ext => src/server}/auth/google.js | 0 .../todoApp/{ext => src/server}/jobs/bar.js | 0 .../todoApp/{ext => src/server}/queries.js | 0 .../{ext => src/server}/serverSetup.js | 0 waspc/examples/todoApp/src/shared/.gitkeep | 1 + waspc/examples/todoApp/todoApp.wasp | 38 +++++++++---------- .../Evaluation/TypedExpr/Combinators.hs | 19 ++++++---- waspc/waspc.cabal | 7 ++++ 24 files changed, 44 insertions(+), 32 deletions(-) rename waspc/examples/todoApp/{ext => src}/.waspignore (100%) create mode 100644 waspc/examples/todoApp/src/client/.gitkeep rename waspc/examples/todoApp/{ext => src/client}/Main.css (100%) rename waspc/examples/todoApp/{ext => src/client}/Todo.js (100%) rename waspc/examples/todoApp/{ext => src/client}/clientSetup.js (100%) rename waspc/examples/todoApp/{ext => src/client}/pages/About.js (100%) rename waspc/examples/todoApp/{ext => src/client}/pages/Main.js (100%) rename waspc/examples/todoApp/{ext => src/client}/pages/ProfilePage.js (100%) rename waspc/examples/todoApp/{ext => src/client}/pages/Task.js (100%) rename waspc/examples/todoApp/{ext => src/client}/pages/auth/Login.js (100%) rename waspc/examples/todoApp/{ext => src/client}/pages/auth/Signup.js (100%) create mode 100644 waspc/examples/todoApp/src/server/.gitkeep rename waspc/examples/todoApp/{ext => src/server}/actions.js (100%) rename waspc/examples/todoApp/{ext => src/server}/auth/google.js (100%) rename waspc/examples/todoApp/{ext => src/server}/jobs/bar.js (100%) rename waspc/examples/todoApp/{ext => src/server}/queries.js (100%) rename waspc/examples/todoApp/{ext => src/server}/serverSetup.js (100%) create mode 100644 waspc/examples/todoApp/src/shared/.gitkeep diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index 1696ea6999..f2700ec2fb 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -97,7 +97,7 @@ writeMainWaspFile waspProjectDir (ProjectInfo projectName appName) = writeFile a "", "route RootRoute { path: \"/\", to: MainPage }", "page MainPage {", - " component: import Main from \"@ext/MainPage.js\"", + " component: import Main from \"@client/MainPage.js\"", "}" ] diff --git a/waspc/examples/todoApp/.gitignore b/waspc/examples/todoApp/.gitignore index d319a97e82..c51177f6dc 100644 --- a/waspc/examples/todoApp/.gitignore +++ b/waspc/examples/todoApp/.gitignore @@ -1,4 +1,3 @@ /.wasp/ -.env -.env.server -.env.client \ No newline at end of file +/.env.server +/.env.client diff --git a/waspc/examples/todoApp/.wasproot b/waspc/examples/todoApp/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/waspc/examples/todoApp/.wasproot +++ b/waspc/examples/todoApp/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/waspc/examples/todoApp/ext/.waspignore b/waspc/examples/todoApp/src/.waspignore similarity index 100% rename from waspc/examples/todoApp/ext/.waspignore rename to waspc/examples/todoApp/src/.waspignore diff --git a/waspc/examples/todoApp/src/client/.gitkeep b/waspc/examples/todoApp/src/client/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/examples/todoApp/src/client/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/ext/Main.css b/waspc/examples/todoApp/src/client/Main.css similarity index 100% rename from waspc/examples/todoApp/ext/Main.css rename to waspc/examples/todoApp/src/client/Main.css diff --git a/waspc/examples/todoApp/ext/Todo.js b/waspc/examples/todoApp/src/client/Todo.js similarity index 100% rename from waspc/examples/todoApp/ext/Todo.js rename to waspc/examples/todoApp/src/client/Todo.js diff --git a/waspc/examples/todoApp/ext/clientSetup.js b/waspc/examples/todoApp/src/client/clientSetup.js similarity index 100% rename from waspc/examples/todoApp/ext/clientSetup.js rename to waspc/examples/todoApp/src/client/clientSetup.js diff --git a/waspc/examples/todoApp/ext/pages/About.js b/waspc/examples/todoApp/src/client/pages/About.js similarity index 100% rename from waspc/examples/todoApp/ext/pages/About.js rename to waspc/examples/todoApp/src/client/pages/About.js diff --git a/waspc/examples/todoApp/ext/pages/Main.js b/waspc/examples/todoApp/src/client/pages/Main.js similarity index 100% rename from waspc/examples/todoApp/ext/pages/Main.js rename to waspc/examples/todoApp/src/client/pages/Main.js diff --git a/waspc/examples/todoApp/ext/pages/ProfilePage.js b/waspc/examples/todoApp/src/client/pages/ProfilePage.js similarity index 100% rename from waspc/examples/todoApp/ext/pages/ProfilePage.js rename to waspc/examples/todoApp/src/client/pages/ProfilePage.js diff --git a/waspc/examples/todoApp/ext/pages/Task.js b/waspc/examples/todoApp/src/client/pages/Task.js similarity index 100% rename from waspc/examples/todoApp/ext/pages/Task.js rename to waspc/examples/todoApp/src/client/pages/Task.js diff --git a/waspc/examples/todoApp/ext/pages/auth/Login.js b/waspc/examples/todoApp/src/client/pages/auth/Login.js similarity index 100% rename from waspc/examples/todoApp/ext/pages/auth/Login.js rename to waspc/examples/todoApp/src/client/pages/auth/Login.js diff --git a/waspc/examples/todoApp/ext/pages/auth/Signup.js b/waspc/examples/todoApp/src/client/pages/auth/Signup.js similarity index 100% rename from waspc/examples/todoApp/ext/pages/auth/Signup.js rename to waspc/examples/todoApp/src/client/pages/auth/Signup.js diff --git a/waspc/examples/todoApp/src/server/.gitkeep b/waspc/examples/todoApp/src/server/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/examples/todoApp/src/server/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/ext/actions.js b/waspc/examples/todoApp/src/server/actions.js similarity index 100% rename from waspc/examples/todoApp/ext/actions.js rename to waspc/examples/todoApp/src/server/actions.js diff --git a/waspc/examples/todoApp/ext/auth/google.js b/waspc/examples/todoApp/src/server/auth/google.js similarity index 100% rename from waspc/examples/todoApp/ext/auth/google.js rename to waspc/examples/todoApp/src/server/auth/google.js diff --git a/waspc/examples/todoApp/ext/jobs/bar.js b/waspc/examples/todoApp/src/server/jobs/bar.js similarity index 100% rename from waspc/examples/todoApp/ext/jobs/bar.js rename to waspc/examples/todoApp/src/server/jobs/bar.js diff --git a/waspc/examples/todoApp/ext/queries.js b/waspc/examples/todoApp/src/server/queries.js similarity index 100% rename from waspc/examples/todoApp/ext/queries.js rename to waspc/examples/todoApp/src/server/queries.js diff --git a/waspc/examples/todoApp/ext/serverSetup.js b/waspc/examples/todoApp/src/server/serverSetup.js similarity index 100% rename from waspc/examples/todoApp/ext/serverSetup.js rename to waspc/examples/todoApp/src/server/serverSetup.js diff --git a/waspc/examples/todoApp/src/shared/.gitkeep b/waspc/examples/todoApp/src/shared/.gitkeep new file mode 100644 index 0000000000..878bca16e5 --- /dev/null +++ b/waspc/examples/todoApp/src/shared/.gitkeep @@ -0,0 +1 @@ +This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/todoApp.wasp b/waspc/examples/todoApp/todoApp.wasp index 6bc48af3df..9ab76c9c56 100644 --- a/waspc/examples/todoApp/todoApp.wasp +++ b/waspc/examples/todoApp/todoApp.wasp @@ -12,18 +12,18 @@ app todoApp { methods: { usernameAndPassword: {}, // google: { - // configFn: import { config } from "@ext/auth/google.js", - // getUserFieldsFn: import { getUserFields } from "@ext/auth/google.js" + // configFn: import { config } from "@server/auth/google.js", + // getUserFieldsFn: import { getUserFields } from "@server/auth/google.js" // } }, onAuthFailedRedirectTo: "/login", onAuthSucceededRedirectTo: "/profile" }, server: { - setupFn: import setup from "@ext/serverSetup.js" + setupFn: import setup from "@server/serverSetup.js" }, client: { - setupFn: import setup from "@ext/clientSetup.js" + setupFn: import setup from "@client/clientSetup.js" }, db: { system: PostgreSQL @@ -58,29 +58,29 @@ psl=} route SignupRoute { path: "/signup", to: SignupPage } page SignupPage { - component: import Signup from "@ext/pages/auth/Signup" + component: import Signup from "@client/pages/auth/Signup" } route LoginRoute { path: "/login", to: LoginPage } page LoginPage { - component: import Login from "@ext/pages/auth/Login" + component: import Login from "@client/pages/auth/Login" } route HomeRoute { path: "/", to: MainPage } page MainPage { authRequired: true, - component: import Main from "@ext/pages/Main" + component: import Main from "@client/pages/Main" } route AboutRoute { path: "/about", to: AboutPage } page AboutPage { - component: import About from "@ext/pages/About" + component: import About from "@client/pages/About" } route ProfileRoute { path: "/profile", to: ProfilePage } page ProfilePage { authRequired: true, - component: import { ProfilePage } from "@ext/pages/ProfilePage" + component: import { ProfilePage } from "@client/pages/ProfilePage" } // Page for viewing a specific task @@ -88,53 +88,53 @@ page ProfilePage { route TaskRoute { path: "/task/:id", to: TaskPage } page TaskPage { authRequired: true, - component: import Task from "@ext/pages/Task" + component: import Task from "@client/pages/Task" } // --------- Queries --------- // query getTasks { - fn: import { getTasks } from "@ext/queries.js", + fn: import { getTasks } from "@server/queries.js", entities: [Task] } query getNumTasks { - fn: import { getNumTasks } from "@ext/queries.js", + fn: import { getNumTasks } from "@server/queries.js", entities: [Task], auth: false } query getTask { - fn: import { getTask } from "@ext/queries.js", + fn: import { getTask } from "@server/queries.js", entities: [Task] } // --------- Actions --------- // action createTask { - fn: import { createTask } from "@ext/actions.js", + fn: import { createTask } from "@server/actions.js", entities: [Task] } action updateTaskIsDone { - fn: import { updateTaskIsDone } from "@ext/actions.js", + fn: import { updateTaskIsDone } from "@server/actions.js", entities: [Task] } action deleteCompletedTasks { - fn: import { deleteCompletedTasks } from "@ext/actions.js", + fn: import { deleteCompletedTasks } from "@server/actions.js", entities: [Task] } action toggleAllTasks { - fn: import { toggleAllTasks } from "@ext/actions.js", + fn: import { toggleAllTasks } from "@server/actions.js", entities: [Task] } job mySpecialJob { executor: PgBoss, perform: { - fn: import { foo } from "@ext/jobs/bar.js", + fn: import { foo } from "@server/jobs/bar.js", executorOptions: { pgBoss: {=json { "retryLimit": 1 } json=} } @@ -145,7 +145,7 @@ job mySpecialJob { job mySpecialScheduledJob { executor: PgBoss, perform: { - fn: import { foo } from "@ext/jobs/bar.js" + fn: import { foo } from "@server/jobs/bar.js" }, schedule: { cron: "0 * * * *", diff --git a/waspc/src/Wasp/Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs b/waspc/src/Wasp/Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs index 5bdbbeca06..ff43a9102e 100644 --- a/waspc/src/Wasp/Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs +++ b/waspc/src/Wasp/Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs @@ -17,6 +17,7 @@ module Wasp.Analyzer.Evaluator.Evaluation.TypedExpr.Combinators ) where +import Control.Applicative ((<|>)) import Control.Arrow (left) import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy.UTF8 as ByteStringLazyUTF8 @@ -155,24 +156,26 @@ tuple4 eval1 eval2 eval3 eval4 = evaluation $ \(typeDefs, bindings) -> withCtx $ -- | An evaluation that expects an "ExtImport". extImport :: TypedExprEvaluation AppSpec.ExtImport.ExtImport extImport = evaluation' . withCtx $ \ctx -> \case - TypedAST.ExtImport name extFileFP -> + TypedAST.ExtImport name extImportPath -> -- NOTE(martin): This parsing here could instead be done in Parser. -- I don't have a very good reason for doing it here instead of Parser, except -- for being somewhat simpler to implement. -- So we might want to move it to Parser at some point in the future, if we -- figure out that is better (it sounds/feels like it could be). - case stripPrefix extPrefix extFileFP of + case stripImportPrefix extImportPath of Just relFileFP -> case SP.parseRelFileP relFileFP of - Left err -> Left $ ER.mkEvaluationError ctx $ ER.ParseError $ ER.EvaluationParseError $ show err + Left err -> mkError ctx $ show err Right relFileSP -> pure $ AppSpec.ExtImport.ExtImport name relFileSP Nothing -> - Left $ - ER.mkEvaluationError ctx $ - ER.ParseError $ - ER.EvaluationParseError $ "Path in external import must start with \"" ++ extPrefix ++ "\"!" + mkError + ctx + $ "Path in external import must start with \"" ++ serverPrefix ++ "\"" ++ " or \"" ++ clientPrefix ++ "\"!" expr -> Left $ ER.mkEvaluationError ctx $ ER.ExpectedType T.ExtImportType (TypedAST.exprType expr) where - extPrefix = "@ext/" + mkError ctx msg = Left $ ER.mkEvaluationError ctx $ ER.ParseError $ ER.EvaluationParseError msg + stripImportPrefix importPath = stripPrefix serverPrefix importPath <|> stripPrefix clientPrefix importPath + serverPrefix = "@server/" + clientPrefix = "@client/" -- | An evaluation that expects a "JSON". json :: TypedExprEvaluation AppSpec.JSON.JSON diff --git a/waspc/waspc.cabal b/waspc/waspc.cabal index 43c7d717e0..a1bffc9b69 100644 --- a/waspc/waspc.cabal +++ b/waspc/waspc.cabal @@ -44,6 +44,13 @@ data-files: Cli/templates/**/*.css Cli/templates/**/*.js Cli/templates/**/*.png + Cli/templates/new/.gitignore + Cli/templates/new/.wasproot + Cli/templates/new/src/.waspignore + Cli/templates/new/src/client/.gitkeep + Cli/templates/new/src/server/.gitkeep + Cli/templates/new/src/shared/.gitkeep + data-dir: data/ source-repository head From 0cb63697fc049773bb183f2e8262a4a88151999c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 4 Nov 2022 12:39:23 +0100 Subject: [PATCH 30/65] Add a shared function demo to todoApp --- waspc/examples/todoApp/src/client/clientSetup.js | 3 +++ waspc/examples/todoApp/src/server/serverSetup.js | 2 ++ waspc/examples/todoApp/src/shared/util.js | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 waspc/examples/todoApp/src/shared/util.js diff --git a/waspc/examples/todoApp/src/client/clientSetup.js b/waspc/examples/todoApp/src/client/clientSetup.js index d966d22d5e..827b0afad1 100644 --- a/waspc/examples/todoApp/src/client/clientSetup.js +++ b/waspc/examples/todoApp/src/client/clientSetup.js @@ -1,3 +1,6 @@ +import { sayHi } from '../shared/util' + export default function setup() { console.log("This was called from the client setup function") + sayHi() } diff --git a/waspc/examples/todoApp/src/server/serverSetup.js b/waspc/examples/todoApp/src/server/serverSetup.js index 9aecb64551..5eabe9b961 100644 --- a/waspc/examples/todoApp/src/server/serverSetup.js +++ b/waspc/examples/todoApp/src/server/serverSetup.js @@ -1,10 +1,12 @@ import { mySpecialJob } from '@wasp/jobs/mySpecialJob.js' +import { sayHi } from '../shared/util.js' let someResource = undefined export const getSomeResource = () => someResource const setup = async () => { + sayHi() await new Promise(resolve => setTimeout(resolve, 2000)) someResource = 'This resource is now set up.' console.log('Custom server setup done!') diff --git a/waspc/examples/todoApp/src/shared/util.js b/waspc/examples/todoApp/src/shared/util.js new file mode 100644 index 0000000000..76de186600 --- /dev/null +++ b/waspc/examples/todoApp/src/shared/util.js @@ -0,0 +1,3 @@ +export function sayHi() { + console.log("This is coming from shared function.") +} From 8bb94cc453a2c5e022105b6704871db0ac1f6528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 4 Nov 2022 15:17:33 +0100 Subject: [PATCH 31/65] Update waspc and e2e tests --- waspc/e2e-test/Tests/WaspJobTest.hs | 2 +- .../waspBuild-golden/waspBuild/main.wasp | 2 +- .../waspCompile-golden/waspCompile/main.wasp | 2 +- .../waspJob-golden/waspJob/main.wasp | 4 ++-- .../waspMigrate-golden/waspMigrate/main.wasp | 2 +- .../waspNew-golden/waspNew/main.wasp | 2 +- waspc/test/Analyzer/EvaluatorTest.hs | 2 +- waspc/test/Analyzer/Parser/ConcreteParserTest.hs | 6 +++--- waspc/test/AnalyzerTest.hs | 16 ++++++++-------- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/waspc/e2e-test/Tests/WaspJobTest.hs b/waspc/e2e-test/Tests/WaspJobTest.hs index 1ddf446701..bb2295fd53 100644 --- a/waspc/e2e-test/Tests/WaspJobTest.hs +++ b/waspc/e2e-test/Tests/WaspJobTest.hs @@ -16,7 +16,7 @@ waspJob = do " job MySpecialJob { \n\ \ executor: PgBoss, \n\ \ perform: { \n\ - \ fn: import { foo } from \"@ext/jobs/bar.js\" \n\ + \ fn: import { foo } from \"@server/jobs/bar.js\" \n\ \ } \n\ \ } \n" diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/main.wasp b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/main.wasp index a2d95169c5..4bbd625756 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/main.wasp +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/main.wasp @@ -8,5 +8,5 @@ app waspBuild { route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/main.wasp b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/main.wasp index fe8dec46a0..e1f9b611e7 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/main.wasp +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/main.wasp @@ -7,5 +7,5 @@ app waspCompile { route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/main.wasp b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/main.wasp index da739c9615..346854dd04 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/main.wasp +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/main.wasp @@ -8,12 +8,12 @@ app waspJob { route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } job MySpecialJob { executor: PgBoss, perform: { - fn: import { foo } from "@ext/jobs/bar.js" + fn: import { foo } from "@server/jobs/bar.js" } } diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/main.wasp b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/main.wasp index 2a91066116..b5de396e50 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/main.wasp +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/main.wasp @@ -7,7 +7,7 @@ app waspMigrate { route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } entity Task {=psl id Int @id @default(autoincrement()) diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/main.wasp b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/main.wasp index 711459104f..ce5e5d9ead 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/main.wasp +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/main.wasp @@ -7,5 +7,5 @@ app waspNew { route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } diff --git a/waspc/test/Analyzer/EvaluatorTest.hs b/waspc/test/Analyzer/EvaluatorTest.hs index 62994f1010..7829c59f51 100644 --- a/waspc/test/Analyzer/EvaluatorTest.hs +++ b/waspc/test/Analyzer/EvaluatorTest.hs @@ -199,7 +199,7 @@ spec_Evaluator = do let typeDefs = TD.addDeclType @Special $ TD.empty let source = [ "special Test {", - " imps: [import { field } from \"@ext/main.js\", import main from \"@ext/main.js\"],", + " imps: [import { field } from \"@server/main.js\", import main from \"@server/main.js\"],", " json: {=json { \"key\": 1 } json=}", "}" ] diff --git a/waspc/test/Analyzer/Parser/ConcreteParserTest.hs b/waspc/test/Analyzer/Parser/ConcreteParserTest.hs index 42975544b8..0b71a9bfb5 100644 --- a/waspc/test/Analyzer/Parser/ConcreteParserTest.hs +++ b/waspc/test/Analyzer/Parser/ConcreteParserTest.hs @@ -41,15 +41,15 @@ spec_ParseCSTExpression = do parseCSTExpression [token T.KwFalse "false"] `shouldBeWithDiff` ([], [node BoolFalse 5 []]) it "Parses external imports" $ do - parseCSTExpression [token T.KwImport "import", token T.Identifier "main", token T.KwFrom "from", token T.String "\"@ext/main.js\""] + parseCSTExpression [token T.KwImport "import", token T.Identifier "main", token T.KwFrom "from", token T.String "\"@server/main.js\""] `shouldBeWithDiff` ( [], [ node ExtImport - 28 + 31 [ node (Token T.KwImport) 6 [], node ExtImportModule 4 [], node (Token T.KwFrom) 4 [], - node ExtImportPath 14 [] + node ExtImportPath 17 [] ] ] ) diff --git a/waspc/test/AnalyzerTest.hs b/waspc/test/AnalyzerTest.hs index 4a152d17c1..9b960b0092 100644 --- a/waspc/test/AnalyzerTest.hs +++ b/waspc/test/AnalyzerTest.hs @@ -54,10 +54,10 @@ spec_Analyzer = do " (\"redux\", \"^4.0.5\")", " ],", " server: {", - " setupFn: import { setupServer } from \"@ext/bar.js\"", + " setupFn: import { setupServer } from \"@server/bar.js\"", " },", " client: {", - " setupFn: import { setupClient } from \"@ext/baz.js\"", + " setupFn: import { setupClient } from \"@client/baz.js\"", " },", " db: {", " system: PostgreSQL", @@ -69,23 +69,23 @@ spec_Analyzer = do "psl=}", "", "page HomePage {", - " component: import Home from \"@ext/pages/Main\"", + " component: import Home from \"@client/pages/Main\"", "}", "", "page ProfilePage {", - " component: import { profilePage } from \"@ext/pages/Profile\",", + " component: import { profilePage } from \"@client/pages/Profile\",", " authRequired: true", "}", "", "route HomeRoute { path: \"/\", to: HomePage }", "", "query getUsers {", - " fn: import { getAllUsers } from \"@ext/foo.js\",", + " fn: import { getAllUsers } from \"@server/foo.js\",", " entities: [User]", "}", "", "action updateUser {", - " fn: import { updateUser } from \"@ext/foo.js\",", + " fn: import { updateUser } from \"@server/foo.js\",", " entities: [User],", " auth: true", "}", @@ -93,7 +93,7 @@ spec_Analyzer = do "job BackgroundJob {", " executor: PgBoss,", " perform: {", - " fn: import { backgroundJob } from \"@ext/jobs/baz.js\",", + " fn: import { backgroundJob } from \"@server/jobs/baz.js\",", " executorOptions: {", " pgBoss: {=json { \"retryLimit\": 1 } json=}", " }", @@ -291,7 +291,7 @@ spec_Analyzer = do let source = unlines [ "route HomeRoute { path: \"/\", to: HomePage }", - "page HomePage { component: import Home from \"@ext/HomePage.js\" }" + "page HomePage { component: import Home from \"@client/HomePage.js\" }" ] isRight (analyze source) `shouldBe` True From 5f478559204e4e74137a2312a31061e134a5fa95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 4 Nov 2022 16:58:30 +0100 Subject: [PATCH 32/65] Fix compiler warnings and rename function --- waspc/cli/src/Wasp/Cli/Command/Deps.hs | 4 ++-- waspc/src/Wasp/Lib.hs | 10 +++++----- waspc/test/AppSpec/ValidTest.hs | 1 + waspc/test/Generator/WebAppGeneratorTest.hs | 7 ++++++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/Deps.hs b/waspc/cli/src/Wasp/Cli/Command/Deps.hs index 9da61e9f1d..ed7d5acd39 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Deps.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Deps.hs @@ -14,13 +14,13 @@ import Wasp.Cli.Terminal (title) import qualified Wasp.Generator.NpmDependencies as N import qualified Wasp.Generator.ServerGenerator as ServerGenerator import qualified Wasp.Generator.WebAppGenerator as WebAppGenerator -import Wasp.Lib (analyzeProject) +import Wasp.Lib (analyzeWaspProject) import qualified Wasp.Util.Terminal as Term deps :: Command () deps = do waspProjectDir <- findWaspProjectRootDirFromCwd - appSpecOrAnalyzerErrors <- liftIO $ analyzeProject waspProjectDir (defaultCompileOptions waspProjectDir) + appSpecOrAnalyzerErrors <- liftIO $ analyzeWaspProject waspProjectDir (defaultCompileOptions waspProjectDir) appSpec <- either (throwError . CommandError "Determining dependencies failed due to a compilation error in your Wasp project" . unwords) diff --git a/waspc/src/Wasp/Lib.hs b/waspc/src/Wasp/Lib.hs index 4422d4fba5..74405c0e9b 100644 --- a/waspc/src/Wasp/Lib.hs +++ b/waspc/src/Wasp/Lib.hs @@ -3,7 +3,7 @@ module Wasp.Lib Generator.start, ProjectRootDir, findWaspFile, - analyzeProject, + analyzeWaspProject, compileAndRenderDockerfile, CompileError, CompileWarning, @@ -48,17 +48,17 @@ compile :: IO ([CompileWarning], [CompileError]) compile waspDir outDir options = do compileWarningsAndErrors <- - analyzeProject waspDir options >>= \case + analyzeWaspProject waspDir options >>= \case Left analyzerErrors -> return ([], analyzerErrors) Right appSpec -> generateCode appSpec outDir options dotEnvWarnings <- maybeToList <$> warnIfDotEnvPresent waspDir return $ (dotEnvWarnings, []) <> compileWarningsAndErrors -analyzeProject :: +analyzeWaspProject :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> IO (Either [CompileError] AS.AppSpec) -analyzeProject waspDir options = runExceptT $ do +analyzeWaspProject waspDir options = runExceptT $ do waspFilePath <- ExceptT $ left pure <$> findWaspFile waspDir declarations <- ExceptT $ left pure <$> analyzeWaspFileContent waspFilePath ExceptT $ constructAppSpec waspDir options declarations @@ -162,7 +162,7 @@ loadUserDockerfileContents waspDir = do compileAndRenderDockerfile :: Path' Abs (Dir WaspProjectDir) -> CompileOptions -> IO (Either [CompileError] Text) compileAndRenderDockerfile waspDir compileOptions = do - appSpecOrAnalyzerErrors <- analyzeProject waspDir compileOptions + appSpecOrAnalyzerErrors <- analyzeWaspProject waspDir compileOptions case appSpecOrAnalyzerErrors of Left errors -> return $ Left errors Right appSpec -> do diff --git a/waspc/test/AppSpec/ValidTest.hs b/waspc/test/AppSpec/ValidTest.hs index c73523e614..1bb66f4f7a 100644 --- a/waspc/test/AppSpec/ValidTest.hs +++ b/waspc/test/AppSpec/ValidTest.hs @@ -189,6 +189,7 @@ spec_AppSpecValid = do { AS.decls = [basicAppDecl], AS.externalClientFiles = [], AS.externalServerFiles = [], + AS.externalSharedFiles = [], AS.isBuild = False, AS.migrationsDir = Nothing, AS.dotEnvServerFile = Nothing, diff --git a/waspc/test/Generator/WebAppGeneratorTest.hs b/waspc/test/Generator/WebAppGeneratorTest.hs index f48d731b7c..3409772066 100644 --- a/waspc/test/Generator/WebAppGeneratorTest.hs +++ b/waspc/test/Generator/WebAppGeneratorTest.hs @@ -14,6 +14,7 @@ import qualified Wasp.Generator.FileDraft.TextFileDraft as TextFD import Wasp.Generator.Monad (runGenerator) import Wasp.Generator.WebAppGenerator import qualified Wasp.Generator.WebAppGenerator.Common as Common +import qualified Wasp.AppSpec.App.Wasp as AS.App -- TODO(martin): We could maybe define Arbitrary instance for AppSpec, define properties -- over generator functions and then do property testing on them, that would be cool. @@ -26,7 +27,11 @@ spec_WebAppGenerator = do [ AS.Decl.makeDecl "TestApp" AS.App.App - { AS.App.title = "Test App", + { + AS.App.title = "Test App", + AS.App.wasp = AS.App.Wasp { + AS.App.version = "0.6.0.0" + }, AS.App.db = Nothing, AS.App.server = Nothing, AS.App.client = Nothing, From 54e0b023ee670c3be721d13cf2569beb2008556a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 4 Nov 2022 17:08:46 +0100 Subject: [PATCH 33/65] Rename mkError to mkParserError --- .../Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/waspc/src/Wasp/Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs b/waspc/src/Wasp/Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs index ff43a9102e..e0da203357 100644 --- a/waspc/src/Wasp/Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs +++ b/waspc/src/Wasp/Analyzer/Evaluator/Evaluation/TypedExpr/Combinators.hs @@ -164,15 +164,15 @@ extImport = evaluation' . withCtx $ \ctx -> \case -- figure out that is better (it sounds/feels like it could be). case stripImportPrefix extImportPath of Just relFileFP -> case SP.parseRelFileP relFileFP of - Left err -> mkError ctx $ show err + Left err -> mkParseError ctx $ show err Right relFileSP -> pure $ AppSpec.ExtImport.ExtImport name relFileSP Nothing -> - mkError + mkParseError ctx $ "Path in external import must start with \"" ++ serverPrefix ++ "\"" ++ " or \"" ++ clientPrefix ++ "\"!" expr -> Left $ ER.mkEvaluationError ctx $ ER.ExpectedType T.ExtImportType (TypedAST.exprType expr) where - mkError ctx msg = Left $ ER.mkEvaluationError ctx $ ER.ParseError $ ER.EvaluationParseError msg + mkParseError ctx msg = Left $ ER.mkEvaluationError ctx $ ER.ParseError $ ER.EvaluationParseError msg stripImportPrefix importPath = stripPrefix serverPrefix importPath <|> stripPrefix clientPrefix importPath serverPrefix = "@server/" clientPrefix = "@client/" From 0ae2631e5bd4e50a73e10217dbe19e29b649688b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 4 Nov 2022 17:14:31 +0100 Subject: [PATCH 34/65] Remove redundant empty line --- waspc/waspc.cabal | 1 - 1 file changed, 1 deletion(-) diff --git a/waspc/waspc.cabal b/waspc/waspc.cabal index fd580f2f93..b97770fa82 100644 --- a/waspc/waspc.cabal +++ b/waspc/waspc.cabal @@ -50,7 +50,6 @@ data-files: Cli/templates/new/src/client/.gitkeep Cli/templates/new/src/server/.gitkeep Cli/templates/new/src/shared/.gitkeep - data-dir: data/ source-repository head From fc76fb60dcf2642c0a8a2475efad495931a9fc3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 4 Nov 2022 18:25:46 +0100 Subject: [PATCH 35/65] Fix test warnings --- waspc/test/AppSpec/ValidTest.hs | 5 ++++- waspc/test/Generator/WebAppGeneratorTest.hs | 15 +++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/waspc/test/AppSpec/ValidTest.hs b/waspc/test/AppSpec/ValidTest.hs index 1bb66f4f7a..2b3e3172cc 100644 --- a/waspc/test/AppSpec/ValidTest.hs +++ b/waspc/test/AppSpec/ValidTest.hs @@ -18,6 +18,7 @@ import qualified Wasp.AppSpec.Valid as ASV import qualified Wasp.Psl.Ast.Model as PslM import qualified Wasp.SemanticVersion as SV import qualified Wasp.Version as WV +import StrongPath (parseAbsDir) spec_AppSpecValid :: Spec spec_AppSpecValid = do @@ -187,6 +188,7 @@ spec_AppSpecValid = do basicAppSpec = AS.AppSpec { AS.decls = [basicAppDecl], + AS.waspProjectDir = fromJust $ parseAbsDir "/wasp-project", AS.externalClientFiles = [], AS.externalServerFiles = [], AS.externalSharedFiles = [], @@ -194,7 +196,8 @@ spec_AppSpecValid = do AS.migrationsDir = Nothing, AS.dotEnvServerFile = Nothing, AS.dotEnvClientFile = Nothing, - AS.userDockerfileContents = Nothing + AS.userDockerfileContents = Nothing, + AS.configFiles = [] } basicPage = diff --git a/waspc/test/Generator/WebAppGeneratorTest.hs b/waspc/test/Generator/WebAppGeneratorTest.hs index b8b2c47119..4fe200493a 100644 --- a/waspc/test/Generator/WebAppGeneratorTest.hs +++ b/waspc/test/Generator/WebAppGeneratorTest.hs @@ -1,10 +1,13 @@ module Generator.WebAppGeneratorTest where +import Data.Maybe (fromJust) +import StrongPath (parseAbsDir) import qualified StrongPath as SP import System.FilePath (()) import Test.Tasty.Hspec import qualified Wasp.AppSpec as AS import qualified Wasp.AppSpec.App as AS.App +import qualified Wasp.AppSpec.App.Wasp as AS.App import qualified Wasp.AppSpec.Core.Decl as AS.Decl import Wasp.Generator.FileDraft import qualified Wasp.Generator.FileDraft.CopyDirFileDraft as CopyDirFD @@ -14,7 +17,6 @@ import qualified Wasp.Generator.FileDraft.TextFileDraft as TextFD import Wasp.Generator.Monad (runGenerator) import Wasp.Generator.WebAppGenerator import qualified Wasp.Generator.WebAppGenerator.Common as Common -import qualified Wasp.AppSpec.App.Wasp as AS.App -- TODO(martin): We could maybe define Arbitrary instance for AppSpec, define properties -- over generator functions and then do property testing on them, that would be cool. @@ -27,11 +29,11 @@ spec_WebAppGenerator = do [ AS.Decl.makeDecl "TestApp" AS.App.App - { - AS.App.title = "Test App", - AS.App.wasp = AS.App.Wasp { - AS.App.version = "0.6.0.0" - }, + { AS.App.title = "Test App", + AS.App.wasp = + AS.App.Wasp + { AS.App.version = "0.6.0.0" + }, AS.App.db = Nothing, AS.App.server = Nothing, AS.App.client = Nothing, @@ -40,6 +42,7 @@ spec_WebAppGenerator = do AS.App.head = Nothing } ], + AS.waspProjectDir = fromJust $ parseAbsDir "/wasp-project", AS.externalClientFiles = [], AS.externalServerFiles = [], AS.externalSharedFiles = [], From dc2914014407c905809d9bf5029e0d8f7a8b563e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 4 Nov 2022 18:33:40 +0100 Subject: [PATCH 36/65] Fix formatting --- waspc/test/AppSpec/ValidTest.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waspc/test/AppSpec/ValidTest.hs b/waspc/test/AppSpec/ValidTest.hs index 2b3e3172cc..9a3b6027e2 100644 --- a/waspc/test/AppSpec/ValidTest.hs +++ b/waspc/test/AppSpec/ValidTest.hs @@ -3,6 +3,7 @@ module AppSpec.ValidTest where import Data.Maybe (fromJust) +import StrongPath (parseAbsDir) import qualified StrongPath as SP import Test.Tasty.Hspec import qualified Wasp.AppSpec as AS @@ -18,7 +19,6 @@ import qualified Wasp.AppSpec.Valid as ASV import qualified Wasp.Psl.Ast.Model as PslM import qualified Wasp.SemanticVersion as SV import qualified Wasp.Version as WV -import StrongPath (parseAbsDir) spec_AppSpecValid :: Spec spec_AppSpecValid = do From ca662e8635072e745b1f07dba51179d74ed76514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 7 Nov 2022 12:09:35 +0100 Subject: [PATCH 37/65] Update waspc.cabal with jsconfigs --- waspc/waspc.cabal | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/waspc/waspc.cabal b/waspc/waspc.cabal index fd580f2f93..6e6799e9b4 100644 --- a/waspc/waspc.cabal +++ b/waspc/waspc.cabal @@ -43,13 +43,11 @@ data-files: Cli/bash-completion Cli/templates/**/*.css Cli/templates/**/*.js + Cli/templates/**/*.json Cli/templates/**/*.png Cli/templates/new/.gitignore Cli/templates/new/.wasproot Cli/templates/new/src/.waspignore - Cli/templates/new/src/client/.gitkeep - Cli/templates/new/src/server/.gitkeep - Cli/templates/new/src/shared/.gitkeep data-dir: data/ From d10e877fdca168d1108028ccb0bec543a210f1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 7 Nov 2022 16:47:56 +0100 Subject: [PATCH 38/65] Minimize jsconfig.json files --- .../templates/new/src/client/jsconfig.json | 27 ++++++++++++------- .../templates/new/src/server/jsconfig.json | 25 +++++++++++------ .../templates/new/src/shared/jsconfig.json | 22 ++++++++++----- 3 files changed, 49 insertions(+), 25 deletions(-) diff --git a/waspc/data/Cli/templates/new/src/client/jsconfig.json b/waspc/data/Cli/templates/new/src/client/jsconfig.json index 02fb2e32a8..e9b5551fd7 100644 --- a/waspc/data/Cli/templates/new/src/client/jsconfig.json +++ b/waspc/data/Cli/templates/new/src/client/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/data/Cli/templates/new/src/server/jsconfig.json b/waspc/data/Cli/templates/new/src/server/jsconfig.json index 4717bc04bd..9e996fc5df 100644 --- a/waspc/data/Cli/templates/new/src/server/jsconfig.json +++ b/waspc/data/Cli/templates/new/src/server/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/data/Cli/templates/new/src/shared/jsconfig.json b/waspc/data/Cli/templates/new/src/shared/jsconfig.json index 4c430a8193..0c4e7f7eb1 100644 --- a/waspc/data/Cli/templates/new/src/shared/jsconfig.json +++ b/waspc/data/Cli/templates/new/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } From cb3351c9e8f884f1819e3e91a97fa4a385aba91e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 7 Nov 2022 16:50:32 +0100 Subject: [PATCH 39/65] Add jsconfigs to waspc todoApp --- waspc/examples/todoApp/src/client/.gitkeep | 1 - .../examples/todoApp/src/client/jsconfig.json | 27 +++++++++++++++++++ waspc/examples/todoApp/src/server/.gitkeep | 1 - .../examples/todoApp/src/server/jsconfig.json | 27 +++++++++++++++++++ waspc/examples/todoApp/src/shared/.gitkeep | 1 - .../examples/todoApp/src/shared/jsconfig.json | 23 ++++++++++++++++ 6 files changed, 77 insertions(+), 3 deletions(-) delete mode 100644 waspc/examples/todoApp/src/client/.gitkeep create mode 100644 waspc/examples/todoApp/src/client/jsconfig.json delete mode 100644 waspc/examples/todoApp/src/server/.gitkeep create mode 100644 waspc/examples/todoApp/src/server/jsconfig.json delete mode 100644 waspc/examples/todoApp/src/shared/.gitkeep create mode 100644 waspc/examples/todoApp/src/shared/jsconfig.json diff --git a/waspc/examples/todoApp/src/client/.gitkeep b/waspc/examples/todoApp/src/client/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/examples/todoApp/src/client/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/src/client/jsconfig.json b/waspc/examples/todoApp/src/client/jsconfig.json new file mode 100644 index 0000000000..e9b5551fd7 --- /dev/null +++ b/waspc/examples/todoApp/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/examples/todoApp/src/server/.gitkeep b/waspc/examples/todoApp/src/server/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/examples/todoApp/src/server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/src/server/jsconfig.json b/waspc/examples/todoApp/src/server/jsconfig.json new file mode 100644 index 0000000000..9e996fc5df --- /dev/null +++ b/waspc/examples/todoApp/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/waspc/examples/todoApp/src/shared/.gitkeep b/waspc/examples/todoApp/src/shared/.gitkeep deleted file mode 100644 index 878bca16e5..0000000000 --- a/waspc/examples/todoApp/src/shared/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -This file forces Git to commit an empty directory. diff --git a/waspc/examples/todoApp/src/shared/jsconfig.json b/waspc/examples/todoApp/src/shared/jsconfig.json new file mode 100644 index 0000000000..0c4e7f7eb1 --- /dev/null +++ b/waspc/examples/todoApp/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} From 48d7e27f41491ad11cdf553616eb8de3a0cbe87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 7 Nov 2022 16:51:13 +0100 Subject: [PATCH 40/65] Update e2e tests --- .../waspBuild/.wasp/build/.waspchecksums | 8 +++--- .../build/server/src/ext-src/jsconfig.json | 25 +++++++++++------ .../build/server/src/shared/jsconfig.json | 22 ++++++++++----- .../build/web-app/src/ext-src/jsconfig.json | 27 ++++++++++++------- .../build/web-app/src/shared/jsconfig.json | 22 ++++++++++----- .../waspBuild/src/client/jsconfig.json | 27 ++++++++++++------- .../waspBuild/src/server/jsconfig.json | 25 +++++++++++------ .../waspBuild/src/shared/jsconfig.json | 22 ++++++++++----- .../waspCompile/.wasp/out/.waspchecksums | 8 +++--- .../out/server/src/ext-src/jsconfig.json | 25 +++++++++++------ .../.wasp/out/server/src/shared/jsconfig.json | 22 ++++++++++----- .../out/web-app/src/ext-src/jsconfig.json | 27 ++++++++++++------- .../out/web-app/src/shared/jsconfig.json | 22 ++++++++++----- .../waspCompile/src/client/jsconfig.json | 27 ++++++++++++------- .../waspCompile/src/server/jsconfig.json | 25 +++++++++++------ .../waspCompile/src/shared/jsconfig.json | 22 ++++++++++----- .../waspJob/.wasp/out/.waspchecksums | 8 +++--- .../out/server/src/ext-src/jsconfig.json | 25 +++++++++++------ .../.wasp/out/server/src/shared/jsconfig.json | 22 ++++++++++----- .../out/web-app/src/ext-src/jsconfig.json | 27 ++++++++++++------- .../out/web-app/src/shared/jsconfig.json | 22 ++++++++++----- .../waspJob/src/client/jsconfig.json | 27 ++++++++++++------- .../waspJob/src/server/jsconfig.json | 25 +++++++++++------ .../waspJob/src/shared/jsconfig.json | 22 ++++++++++----- .../waspMigrate/.wasp/out/.waspchecksums | 8 +++--- .../out/server/src/ext-src/jsconfig.json | 25 +++++++++++------ .../.wasp/out/server/src/shared/jsconfig.json | 22 ++++++++++----- .../out/web-app/src/ext-src/jsconfig.json | 27 ++++++++++++------- .../out/web-app/src/shared/jsconfig.json | 22 ++++++++++----- .../waspMigrate/src/client/jsconfig.json | 27 ++++++++++++------- .../waspMigrate/src/server/jsconfig.json | 25 +++++++++++------ .../waspMigrate/src/shared/jsconfig.json | 22 ++++++++++----- .../waspNew/src/client/jsconfig.json | 27 ++++++++++++------- .../waspNew/src/server/jsconfig.json | 25 +++++++++++------ .../waspNew/src/shared/jsconfig.json | 22 ++++++++++----- 35 files changed, 517 insertions(+), 269 deletions(-) diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums index 73262897f8..d901c2c021 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums @@ -88,7 +88,7 @@ "file", "server/src/ext-src/jsconfig.json" ], - "e98029fbee40f31740206da4db736fb3214e51c6c909179cbaff73f472f0d1dc" + "42fd38df4f109c66819b62349f8293f142e91466bbf3e0866ec389f922212069" ], [ [ @@ -158,7 +158,7 @@ "file", "server/src/shared/jsconfig.json" ], - "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" + "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" ], [ [ @@ -270,7 +270,7 @@ "file", "web-app/src/ext-src/jsconfig.json" ], - "aadd91757ac44c9b83beb6536ee877d76ee8a11513ecc870ad972beb768ae3b6" + "419c64a8ba73a981064139dd6dd40ec7344bb404f9bd04a1d5fd4c9a6a8d00ed" ], [ [ @@ -354,7 +354,7 @@ "file", "web-app/src/shared/jsconfig.json" ], - "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" + "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums index 284f63472f..0ded2a6a3a 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums @@ -88,7 +88,7 @@ "file", "server/src/ext-src/jsconfig.json" ], - "e98029fbee40f31740206da4db736fb3214e51c6c909179cbaff73f472f0d1dc" + "42fd38df4f109c66819b62349f8293f142e91466bbf3e0866ec389f922212069" ], [ [ @@ -158,7 +158,7 @@ "file", "server/src/shared/jsconfig.json" ], - "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" + "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" ], [ [ @@ -270,7 +270,7 @@ "file", "web-app/src/ext-src/jsconfig.json" ], - "aadd91757ac44c9b83beb6536ee877d76ee8a11513ecc870ad972beb768ae3b6" + "419c64a8ba73a981064139dd6dd40ec7344bb404f9bd04a1d5fd4c9a6a8d00ed" ], [ [ @@ -354,7 +354,7 @@ "file", "web-app/src/shared/jsconfig.json" ], - "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" + "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums index c487bbc82b..83d80768df 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums @@ -95,7 +95,7 @@ "file", "server/src/ext-src/jsconfig.json" ], - "e98029fbee40f31740206da4db736fb3214e51c6c909179cbaff73f472f0d1dc" + "42fd38df4f109c66819b62349f8293f142e91466bbf3e0866ec389f922212069" ], [ [ @@ -172,7 +172,7 @@ "file", "server/src/shared/jsconfig.json" ], - "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" + "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" ], [ [ @@ -284,7 +284,7 @@ "file", "web-app/src/ext-src/jsconfig.json" ], - "aadd91757ac44c9b83beb6536ee877d76ee8a11513ecc870ad972beb768ae3b6" + "419c64a8ba73a981064139dd6dd40ec7344bb404f9bd04a1d5fd4c9a6a8d00ed" ], [ [ @@ -368,7 +368,7 @@ "file", "web-app/src/shared/jsconfig.json" ], - "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" + "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums index 77d42492f9..3a847fc621 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums @@ -88,7 +88,7 @@ "file", "server/src/ext-src/jsconfig.json" ], - "e98029fbee40f31740206da4db736fb3214e51c6c909179cbaff73f472f0d1dc" + "42fd38df4f109c66819b62349f8293f142e91466bbf3e0866ec389f922212069" ], [ [ @@ -158,7 +158,7 @@ "file", "server/src/shared/jsconfig.json" ], - "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" + "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" ], [ [ @@ -270,7 +270,7 @@ "file", "web-app/src/ext-src/jsconfig.json" ], - "aadd91757ac44c9b83beb6536ee877d76ee8a11513ecc870ad972beb768ae3b6" + "419c64a8ba73a981064139dd6dd40ec7344bb404f9bd04a1d5fd4c9a6a8d00ed" ], [ [ @@ -354,7 +354,7 @@ "file", "web-app/src/shared/jsconfig.json" ], - "69dbe2db7fa67e2aea51af091f03d064a883ba91444784d1ed96018505e961c6" + "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json index 02fb2e32a8..89afee9af4 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json @@ -1,19 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "esModuleInterop": true, - "allowJs": true, - "jsx": "preserve", - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/web-app/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/web-app/node_modules/*", - "../../.wasp/out/web-app/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json index 4717bc04bd..4b90288b69 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json @@ -1,17 +1,26 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", "paths": { + // Resolve all "@wasp" imports to the generated source code "@wasp/*": [ - "../../.wasp/out/server/src/*" + "src/*" ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json index 4c430a8193..0f5b083d1b 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json @@ -1,14 +1,22 @@ { "compilerOptions": { - "module": "commonjs", - "allowJs": true, - "target": "es2018", - "baseUrl": ".", + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping "*": [ - "*", - "../../.wasp/out/server/node_modules/*", - "../../.wasp/out/server/node_modules/@types/*" + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" ] } } From 0ab3560f20f9852646014a3e5e1e7ca408c6fa99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Mon, 7 Nov 2022 17:24:38 +0100 Subject: [PATCH 41/65] Update e2e tests --- .../waspBuild-golden/waspBuild/.wasp/build/.waspchecksums | 8 ++++---- .../.wasp/build/server/src/ext-src/jsconfig.json | 2 +- .../waspBuild/.wasp/build/server/src/shared/jsconfig.json | 2 +- .../.wasp/build/web-app/src/ext-src/jsconfig.json | 4 ++-- .../.wasp/build/web-app/src/shared/jsconfig.json | 2 +- .../waspBuild-golden/waspBuild/src/client/jsconfig.json | 4 ++-- .../waspBuild-golden/waspBuild/src/server/jsconfig.json | 2 +- .../waspBuild-golden/waspBuild/src/shared/jsconfig.json | 2 +- .../waspCompile/.wasp/out/.waspchecksums | 8 ++++---- .../.wasp/out/server/src/ext-src/jsconfig.json | 2 +- .../waspCompile/.wasp/out/server/src/shared/jsconfig.json | 2 +- .../.wasp/out/web-app/src/ext-src/jsconfig.json | 4 ++-- .../.wasp/out/web-app/src/shared/jsconfig.json | 2 +- .../waspCompile/src/client/jsconfig.json | 4 ++-- .../waspCompile/src/server/jsconfig.json | 2 +- .../waspCompile/src/shared/jsconfig.json | 2 +- .../waspJob-golden/waspJob/.wasp/out/.waspchecksums | 8 ++++---- .../waspJob/.wasp/out/server/src/ext-src/jsconfig.json | 2 +- .../waspJob/.wasp/out/server/src/shared/jsconfig.json | 2 +- .../waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json | 4 ++-- .../waspJob/.wasp/out/web-app/src/shared/jsconfig.json | 2 +- .../waspJob-golden/waspJob/src/client/jsconfig.json | 4 ++-- .../waspJob-golden/waspJob/src/server/jsconfig.json | 2 +- .../waspJob-golden/waspJob/src/shared/jsconfig.json | 2 +- .../waspMigrate/.wasp/out/.waspchecksums | 8 ++++---- .../.wasp/out/server/src/ext-src/jsconfig.json | 2 +- .../waspMigrate/.wasp/out/server/src/shared/jsconfig.json | 2 +- .../.wasp/out/web-app/src/ext-src/jsconfig.json | 4 ++-- .../.wasp/out/web-app/src/shared/jsconfig.json | 2 +- .../waspMigrate/src/client/jsconfig.json | 4 ++-- .../waspMigrate/src/server/jsconfig.json | 2 +- .../waspMigrate/src/shared/jsconfig.json | 2 +- .../waspNew-golden/waspNew/src/client/jsconfig.json | 4 ++-- .../waspNew-golden/waspNew/src/server/jsconfig.json | 2 +- .../waspNew-golden/waspNew/src/shared/jsconfig.json | 2 +- 35 files changed, 56 insertions(+), 56 deletions(-) diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums index d901c2c021..dca5a39c52 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums @@ -88,7 +88,7 @@ "file", "server/src/ext-src/jsconfig.json" ], - "42fd38df4f109c66819b62349f8293f142e91466bbf3e0866ec389f922212069" + "4130060d02d39d5fdc11bdb288cfe08d36dc89be29ade017b16db6477e63c47a" ], [ [ @@ -158,7 +158,7 @@ "file", "server/src/shared/jsconfig.json" ], - "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ @@ -270,7 +270,7 @@ "file", "web-app/src/ext-src/jsconfig.json" ], - "419c64a8ba73a981064139dd6dd40ec7344bb404f9bd04a1d5fd4c9a6a8d00ed" + "06804c81fa3b227c1b3a04e950f8db9ed85bf41d042b90e8e8332856016e113f" ], [ [ @@ -354,7 +354,7 @@ "file", "web-app/src/shared/jsconfig.json" ], - "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/ext-src/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/server/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/ext-src/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/web-app/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/client/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/server/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums index 0ded2a6a3a..f5680645c5 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums @@ -88,7 +88,7 @@ "file", "server/src/ext-src/jsconfig.json" ], - "42fd38df4f109c66819b62349f8293f142e91466bbf3e0866ec389f922212069" + "4130060d02d39d5fdc11bdb288cfe08d36dc89be29ade017b16db6477e63c47a" ], [ [ @@ -158,7 +158,7 @@ "file", "server/src/shared/jsconfig.json" ], - "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ @@ -270,7 +270,7 @@ "file", "web-app/src/ext-src/jsconfig.json" ], - "419c64a8ba73a981064139dd6dd40ec7344bb404f9bd04a1d5fd4c9a6a8d00ed" + "06804c81fa3b227c1b3a04e950f8db9ed85bf41d042b90e8e8332856016e113f" ], [ [ @@ -354,7 +354,7 @@ "file", "web-app/src/shared/jsconfig.json" ], - "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/ext-src/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/server/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/web-app/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/client/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/server/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums index 83d80768df..82c4e21a7e 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums @@ -95,7 +95,7 @@ "file", "server/src/ext-src/jsconfig.json" ], - "42fd38df4f109c66819b62349f8293f142e91466bbf3e0866ec389f922212069" + "4130060d02d39d5fdc11bdb288cfe08d36dc89be29ade017b16db6477e63c47a" ], [ [ @@ -172,7 +172,7 @@ "file", "server/src/shared/jsconfig.json" ], - "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ @@ -284,7 +284,7 @@ "file", "web-app/src/ext-src/jsconfig.json" ], - "419c64a8ba73a981064139dd6dd40ec7344bb404f9bd04a1d5fd4c9a6a8d00ed" + "06804c81fa3b227c1b3a04e950f8db9ed85bf41d042b90e8e8332856016e113f" ], [ [ @@ -368,7 +368,7 @@ "file", "web-app/src/shared/jsconfig.json" ], - "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/ext-src/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/server/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/web-app/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/client/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/server/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums index 3a847fc621..e59fa9f556 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums @@ -88,7 +88,7 @@ "file", "server/src/ext-src/jsconfig.json" ], - "42fd38df4f109c66819b62349f8293f142e91466bbf3e0866ec389f922212069" + "4130060d02d39d5fdc11bdb288cfe08d36dc89be29ade017b16db6477e63c47a" ], [ [ @@ -158,7 +158,7 @@ "file", "server/src/shared/jsconfig.json" ], - "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ @@ -270,7 +270,7 @@ "file", "web-app/src/ext-src/jsconfig.json" ], - "419c64a8ba73a981064139dd6dd40ec7344bb404f9bd04a1d5fd4c9a6a8d00ed" + "06804c81fa3b227c1b3a04e950f8db9ed85bf41d042b90e8e8332856016e113f" ], [ [ @@ -354,7 +354,7 @@ "file", "web-app/src/shared/jsconfig.json" ], - "cd5fbcde0cb39ec5570acd4e26bc7795b4a1707f1eb3b32f7351681208208c74" + "6972bc64315755788fd02be62c44ea8ffb60dd874b863fca2878f6160ab4b0e2" ], [ [ diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/ext-src/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/server/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/ext-src/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/web-app/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/client/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/server/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json index 89afee9af4..e9b5551fd7 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/client/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/web-app/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], @@ -18,7 +18,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json index 4b90288b69..9e996fc5df 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/server/jsconfig.json @@ -8,7 +8,7 @@ // set to define the "paths" option. "baseUrl": "../../.wasp/out/server/", "paths": { - // Resolve all "@wasp" imports to the generated source code + // Resolve all "@wasp" imports to the generated source code. "@wasp/*": [ "src/*" ], diff --git a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json index 0f5b083d1b..0c4e7f7eb1 100644 --- a/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json +++ b/waspc/e2e-test/test-outputs/waspNew-golden/waspNew/src/shared/jsconfig.json @@ -14,7 +14,7 @@ // Start by looking for the definiton inside the node modules root // directory... "node_modules/*", - // ... If that fails, Try to find it inside definitely-typed type + // ... If that fails, try to find it inside definitely-typed type // definitions. "node_modules/@types/*" ] From ee84bced30f9b6b1b39a4d147c7c69d41a8eaa44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 01:37:02 +0100 Subject: [PATCH 42/65] Update docs for new project structure --- web/docs/integrations/css-frameworks.md | 22 +-- web/docs/language/features.md | 129 ++++++++---------- web/docs/language/overview.md | 36 +++-- web/docs/language/syntax.md | 9 +- web/docs/tutorials/todo-app/auth.md | 20 +-- .../todo-app/creating-new-project.md | 49 ++++--- web/docs/tutorials/todo-app/creating-tasks.md | 12 +- web/docs/tutorials/todo-app/dependencies.md | 6 +- web/docs/tutorials/todo-app/listing-tasks.md | 22 +-- web/docs/tutorials/todo-app/updating-tasks.md | 8 +- 10 files changed, 164 insertions(+), 149 deletions(-) diff --git a/web/docs/integrations/css-frameworks.md b/web/docs/integrations/css-frameworks.md index 1772b3ed50..27d834c27e 100644 --- a/web/docs/integrations/css-frameworks.md +++ b/web/docs/integrations/css-frameworks.md @@ -11,13 +11,19 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; To enable support for Tailwind in your Wasp project, you simply need to add two config files (`tailwind.config.js` and `postcss.config.js`) to the root directory. When they are present, Wasp will add the necessary NPM dependencies and copy your config files into the generated project output. You can then start adding [Tailwind CSS directives](https://tailwindcss.com/docs/functions-and-directives#directives) to your CSS files and `className`s to your React components. ### New project tree overview -```bash title="tree ." {3,7-8} +```bash title="tree ." {6,13-14} . -├── ext -│   ├── Main.css -│   ├── MainPage.js -│   └── waspLogo.png ├── main.wasp +├── src +│   ├── client +│   │   ├── jsconfig.json +│   │   ├── Main.css +│   │   ├── MainPage.js +│   │   └── waspLogo.png +│   ├── server +│   │   └── jsconfig.json +│   └── shared +│   └── jsconfig.json ├── postcss.config.js └── tailwind.config.js ``` @@ -48,8 +54,8 @@ module.exports = { } ``` -#### 3) Update `./ext/Main.css` -```css title="./ext/Main.css" {1-3} +#### 3) Update `./src/client/Main.css` +```css title="./src/client//Main.css" {1-3} @tailwind base; @tailwind components; @tailwind utilities; @@ -58,7 +64,7 @@ module.exports = { ``` #### 4) Start using Tailwind 🥳 -```html title="./ext/MainPage.js" +```html title="./src/client/MainPage.js"

Hello world!

diff --git a/web/docs/language/features.md b/web/docs/language/features.md index 1cbeee256d..8c9c2c530a 100644 --- a/web/docs/language/features.md +++ b/web/docs/language/features.md @@ -22,9 +22,12 @@ app todoApp { ### Fields #### `wasp: dict` (required) -Wasp compiler configuration. -Check [`app.wasp`](/docs/language/features#compiler-configuration) for more -details. +Wasp compiler configuration. It is a dictionary a single field: +- `version: string` (required) - version declares the compatible Wasp versions for the app. It should contain a valid [SemVer range](https://github.com/npm/node-semver#ranges). + +:::info +For now, the version field only supports caret ranges (i.e., `^x.y.z`). Support for the full specification will come in a future version of Wasp +::: #### `title: string` (required) Title of your app. It will be displayed in the browser tab, next to the favicon. @@ -58,7 +61,7 @@ Check [`app.dependencies`](/docs/language/features#dependencies) for more detail ```css page MainPage { - component: import Main from "@ext/pages/Main", + component: import Main from "@client/pages/Main", authRequired: false // optional } ``` @@ -67,9 +70,8 @@ Normally you will also want to associate `page` with a `route`, otherwise it won ### Fields -#### `component: ExtImport` (required) +#### `component: ClientImport` (required) Import statement of the React element that implements the page component. -See importing external code for details. #### `authRequired: bool` (optional) Can be specified only if [`app.auth`](/docs/language/features#authentication--authorization) is defined. @@ -115,7 +117,7 @@ started: // ... route TaskRoute { path: "/task/:id", to: TaskPage } page TaskPage { - component: import Task from "@ext/pages/Task" + component: import Task from "@client/pages/Task" } ``` @@ -141,11 +143,11 @@ Navigation can be performed from the React code via `` component, also us // ... route HomeRoute { path: "/home", to: HomePage } page HomePage { - component: import Home from "@ext/pages/Home" + component: import Home from "@client/pages/Home" } ``` -```jsx title="pages/OtherPage.js" +```jsx title="client/pages/OtherPage.js" import React from 'react' import { Link } from "react-router-dom" @@ -217,7 +219,7 @@ Take a look at [the examples of usage](#using-the-query) to see how to pass this 3. `context`: An additional context object **injected into the Query by Wasp**. This object contains user session information, as well as information about entities. The examples here won't use the context for simplicity purposes. You can read more about it in the [section about using entities in queries](#using-entities-in-queries). Here's an example of two simple Queries: -```js title="ext/queries.js" +```js title="src/server/queries.js" // our "database" const tasks = [ { id: 1, description: "Buy some eggs", isDone: true }, @@ -241,7 +243,7 @@ export const getFilteredTasks = async (args) => { #### Declaring a Query in Wasp After implementing your Queries in NodeJS, all that's left to do before using them is tell Wasp about it! You can easily do this with the `query` declaration, which supports the following fields: -- `fn: ExtImport` (required) - The import statement of the Query's NodeJs implementation. +- `fn: ServerImport` (required) - The import statement of the Query's NodeJs implementation. - `entities: [Entity]` (optional) - A list of entities you wish to use inside your Query. We'll leave this option aside for now. You can read more about it [here](#using-entities-in-queries). @@ -254,11 +256,11 @@ With that in mind, this is how you might declare the Queries that use the implem // its implementation. We're changing the name to emphasize the difference. query fetchAllTasks { - fn: import { getAllTasks } from "@ext/queries.js" + fn: import { getAllTasks } from "@server/queries.js" } query fetchFilteredTasks { - fn: import { getFilteredTasks } from "@ext/queries.js" + fn: import { getFilteredTasks } from "@server/queries.js" } ``` @@ -349,7 +351,7 @@ For security reasons, all exceptions thrown in the Query's NodeJS implementation Hiding error details by default helps against accidentally leaking possibly sensitive information over the network. If you do want to pass additional error information to the client, you can construct and throw an appropriate `HttpError` in your NodeJS Query function: -```js title=ext/queries.js +```js title=src/server/queries.js import HttpError from '@wasp/core/HttpError.js' export const getTasks = async (args, context) => { @@ -370,18 +372,18 @@ To use an Entity in your Query, add it to the query declaration in Wasp: ```c {4,9} title="main.wasp" query fetchAllTasks { - fn: import { getAllTasks } from "@ext/queries.js", + fn: import { getAllTasks } from "@src/server/queries.js", entities: [Task] } query fetchFilteredTasks { - fn: import { getFilteredTasks } from "@ext/queries.js", + fn: import { getFilteredTasks } from "@src/server/queries.js", entities: [Task] } ``` Wasp will inject the specified Entity into the Query's `context` argument, giving you access to the Entity's Prisma API: -```js title="ext/queries.js" +```js title="src/server/queries.js" export const getAllTasks = async (args, context) => { return context.entities.Task.findMany({}) } @@ -406,7 +408,7 @@ Read more about the [`useAction` hook](#the-useaction-hook) below. Here's an implementation of a simple Action: -```js title=actions.js +```js title=src/server/actions.js export const sayHi = async () => { console.log('The client said Hi!') } @@ -417,7 +419,7 @@ Its corresponding declaration in Wasp: // ... action sayHi { - fn: import { sayHi } from "@ext/actions.js" + fn: import { sayHi } from "@server/actions.js" } ``` And an example of how to import and call the declared Action: @@ -431,7 +433,7 @@ sayHi() ``` Here's an example on how you might define a less contrived Action. -```js title=actions.js +```js title=src/server/actions.js // ... export const updateTaskIsDone = ({ id, isDone }, context) => { return context.entities.Task.update({ @@ -442,13 +444,13 @@ export const updateTaskIsDone = ({ id, isDone }, context) => { ``` ```c title=main.wasp action updateTaskIsDone { - fn: import { updateTaskIsDone } from "@ext/actions.js", + fn: import { updateTaskIsDone } from "@server/actions.js", entities: [Task] } ``` And here is how you might use it: -```js {4,18} title=pages/Task.js +```js {4,18} title=client/pages/Task.js import React from 'react' import { useQuery } from '@wasp/queries' import fetchTask from '@wasp/queries/fetchTask' @@ -490,7 +492,7 @@ The `useAction` hook accepts two arguments: **NOTE:** The `updateQuery` function must be a pure function. It must return the desired cache value identified by the `getQuerySpecifier` function and _must not_ perform any side effects. Also, make sure you only update the query caches affected by your action causing the optimistic update (Wasp cannot yet verify this). Finally, your implementation of the `updateQuery` function should work correctly regardless of the state of `oldData` (e.g., don't rely on array positioning). If you need to do something else during your optimistic update, you can directly use _react-query_'s lower-level API (read more about it [here](#advanced-usage)). Here's an example showing how to configure the Action from the previous example to perform an optimistic update: -```jsx {3,9,10,11,12,13,14,15,16,27} title=pages/Task.js +```jsx {3,9,10,11,12,13,14,15,16,27} title=client/pages/Task.js import React from 'react' import { useQuery } from '@wasp/queries' import { useAction } from '@wasp/actions' @@ -624,7 +626,7 @@ To declare a `job` in Wasp, simply add a declaration with a reference to an `asy job mySpecialJob { executor: PgBoss, perform: { - fn: import { foo } from "@ext/jobs/bar.js" + fn: import { foo } from "@server/jobs/bar.js" } } ``` @@ -651,7 +653,7 @@ If you have work that needs to be done on some recurring basis, you can add a `s job mySpecialJob { executor: PgBoss, perform: { - fn: import { foo } from "@ext/jobs/bar.js" + fn: import { foo } from "@server/jobs/bar.js" }, schedule: { cron: "0 * * * *", @@ -670,7 +672,7 @@ job mySpecialJob { executor: PgBoss, entities: [Task], perform: { - fn: import { foo } from "@ext/jobs/bar.js", + fn: import { foo } from "@server/jobs/bar.js", executorOptions: { pgBoss: {=json { "retryLimit": 1 } json=} } @@ -692,8 +694,8 @@ job mySpecialJob { #### `perform: dict` (required) - - ##### `fn: fn` (required) - An `async` JavaScript function of work to be performed. It receives a JSON value as the first argument and context containing any declared entities as the second. Here is a sample signature: + - ##### `fn: ServerImport` (required) + An `async` JavaScript function of work to be performed. Since Wasp executes jobs on the server, you must import it from `@server`. The function receives a JSON value as the first argument and context containing any declared entities as the second. Here is a sample signature: ```js export async function foo(args, context) { @@ -958,7 +960,7 @@ const SignOut = () => { #### Reset password Coming soon. -### Updating user's password +### Updating a user's password If you need to update user's password, you can do it safely via Prisma client, e.g. within an action: ```js export const updatePassword = async (args, context) => { @@ -975,14 +977,13 @@ in your `.wasp` file, Wasp already set a middleware on Prisma that makes sure wh is created or updated on the user entity, it is also hashed before it is stored to the database. -### Accessing currently logged in user +### Accessing the currently logged in user When authentication is enabled in a Wasp app, we need a way to tell whether a user is logged in and access its data. With that, we can further implement access control and decide which content is private and which public. -#### On client -On client, Wasp provides `useAuth` React hook to be used within the functional components. -`useAuth` is actually a thin wrapper over Wasp's `useQuery` hook and returns data in the exactly same -format. +#### On the client +On the client, Wasp provides a React hook you can use in functional components - `useAuth`. +This hook is actually a thin wrapper over Wasp's [`useQuery` hook](http://localhost:3002/docs/language/features#the-usequery-hook) and returns data in the same format. ### `useAuth()` #### `import statement`: @@ -991,7 +992,7 @@ import useAuth from '@wasp/auth/useAuth.js' ``` ##### Example of usage: -```js title="ext/pages/MainPage.js" +```js title="client/pages/MainPage.js" import React from 'react' import { Link } from 'react-router-dom' @@ -1022,14 +1023,12 @@ const Main = () => { export default Main ``` -#### On server +#### On the server -When authentication is enabled, all the operations (actions and queries) will have `user` object -present in the `context` argument. `context.user` will contain all the fields from the user entity -except for the password. +When authentication is enabled, all operations (actions and queries) will have access to the `user` through the `context` argument. `context.user` will contain all the fields from the user entity except for the password. ##### Example of usage: -```js title="ext/actions.js" +```js title="src/server/actions.js" import HttpError from '@wasp/core/HttpError.js' export const createTask = async (task, context) => { @@ -1098,8 +1097,8 @@ If you require modifications to the above, you can add one or more of the follow externalAuthEntity: SocialLogin, methods: { google: { - configFn: import { config } from "@ext/auth/google.js", - getUserFieldsFn: import { getUserFields } from "@ext/auth/google.js" + configFn: import { config } from "@server/auth/google.js", + getUserFieldsFn: import { getUserFields } from "@server/auth/google.js" } }, ... @@ -1107,7 +1106,7 @@ If you require modifications to the above, you can add one or more of the follow ``` - `configFn`: This function should return an object with the following shape: - ```js + ```js title=src/server/auth/google.js export function config() { // ... return { @@ -1116,11 +1115,15 @@ If you require modifications to the above, you can add one or more of the follow scope: ['profile'] // must include at least 'profile' } } + + // ... ``` - `getUserFieldsFn`: This function should return the user fields to use when creating a new user upon their first Google login. The context contains a User entity for DB access, and the args are what the OAuth provider responds with. Here is how you could generate a username based on the Google display name. In your model, you could choose to add more attributes and set additional information. - ```js + ```js title=src/server/auth/google.js import { generateAvailableUsername } from '@wasp/core/auth.js' + // ... + export async function getUserFields(_context, args) { const username = await generateAvailableUsername(args.profile.displayName.split(' '), { separator: '.' }) return { username } @@ -1182,30 +1185,6 @@ entity SocialLogin {=psl psl=} ``` -## Compiler configuration - -You can configure Wasp's compiler using the `wasp` field inside the `app` -declaration. - -```c -app MyApp { - wasp: { - version: "^0.6.0" - }, - // ... -} -``` - -`app.wasp` is a dictionary with the following fields: - -#### `version: string` (required) - -`version` declares the compatible Wasp versions for the app. It is specified -in a SemVer format. - -**Note**: For now, `version` only supports the format `^x.y.z`. This -will be extended in the future to support full Semantic Versioning. - ## Client configuration You can configure the client using the `client` field inside the `app` @@ -1216,14 +1195,14 @@ app MyApp { title: "My app", // ... client: { - setupFn: import mySetupFunction from "@ext/myClientSetupCode.js" + setupFn: import mySetupFunction from "@client/myClientSetupCode.js" } } ``` `app.client` is a dictionary with the following fields: -#### `setupFn: ExtImport` (optional) +#### `setupFn: ClientImport` (optional) `setupFn` declares a JavaScript function that Wasp executes on the client before everything else. It is expected to be asynchronous, and @@ -1235,7 +1214,7 @@ client-side periodic jobs). Here's a dummy example of such a function: -```js title="ext/myClientSetupCode.js" +```js title="src/client/myClientSetupCode.js" export default async function mySetupFunction() { let count = 1; setInterval( @@ -1286,14 +1265,14 @@ app MyApp { title: "My app", // ... server: { - setupFn: import mySetupFunction from "@ext/myServerSetupCode.js" + setupFn: import mySetupFunction from "@server/myServerSetupCode.js" } } ``` `app.server` is a dictionary with following fields: -#### `setupFn: ExtImport` (optional) +#### `setupFn: ServerImport` (optional) `setupFn` declares a JS function that will be executed on server start. This function is expected to be async and will be awaited before server continues with its setup and starts serving any requests. @@ -1305,7 +1284,7 @@ In case you want to store some values for later use, or to be accessed by the Op Dummy example of such function and its usage: -```js title="ext/myServerSetupCode.js" +```js title="src/server/myServerSetupCode.js" let someResource = undefined const mySetupFunction = async () => { @@ -1320,7 +1299,7 @@ export const getSomeResource = () => someResource export default mySetupFunction ``` -```js title="ext/queries.js" +```js title="src/server/queries.js" import { getSomeResource } from './myServerSetupCode.js' ... diff --git a/web/docs/language/overview.md b/web/docs/language/overview.md index 3167d5197e..4a4a7fa6a2 100644 --- a/web/docs/language/overview.md +++ b/web/docs/language/overview.md @@ -9,19 +9,35 @@ The basic idea is that the higher-level overview of an app (e.g. pages, routes, Basic structure of a Wasp project is: - `*.wasp` file -- `ext/` directory -> Contains non-wasp code (JS, CSS, ...) structured in any way you want. +- The `src/` folder -> Contains non-wasp code (JS, CSS, ...). You can structure it however you want, as long as you put it somewhere inside the correct subfolder: + - The `src/server` folder - Contains your server code (i.e., executed by Node JS). + - The `src/client` folder - Contains your client code (i.e., executed by JS in user's browsers). + - The `src/shared` folder - Contains the code you want to share between the server and the client (e.g., utility functions). -When referencing code from `ext/` in your `*.wasp` file, you do it as `@ext/relative/path/of/file/in/ext/dir`. +When referencing code from `src/server` in your `*.wasp` file, you do it as `@server/relative/path/of/file/in/the/server/dir`. + +When referencing code from `src/client` in your `*.wasp` file, you do it as `@client/relative/path/of/file/in/the/client/dir`. + +You can't reference shared code inside the Wasp file, but you can import and use it in all code that lives in `src/client` or `src/server`. Use a relative import to do this. For example, the file `src/server/something.js` can import a shared function from `src/shared/utilities.js` like this: +```js +import someFunction from '../shared/utilities.js' + +// ... +``` -# Simple example +# Simple example +We're omitting all pregenerated none-code files Wasp needs to function (e.g., `jsconfig.json` and `.wasproot`) and are focusing only on the files you would write yourself: ```yaml TodoApp/ - main.wasp - - ext/ - - operations.js - - pages/ - - Main.js + - src/ + - server/ + - operations.js + - client/ + - pages/ + - Main.js + - shared/ ``` ```css title="main.wasp" @@ -35,16 +51,16 @@ app todoApp { route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/pages/Main" + component: import Main from "@client/pages/Main" } query getTasks { - fn: import { getTasks } from "@ext/operations.js", + fn: import { getTasks } from "@server/operations.js", entities: [Task] } action createTask { - fn: import { createTask } from "@ext/operations.js", + fn: import { createTask } from "@server/operations.js", entities: [Task] } diff --git a/web/docs/language/syntax.md b/web/docs/language/syntax.md index e78fcbe7f8..dfd3353b01 100644 --- a/web/docs/language/syntax.md +++ b/web/docs/language/syntax.md @@ -16,7 +16,7 @@ app MyApp { route RootRoute { path: "/", to: DashboardPage } page DashboardPage { - component: import Dashboard from "@ext/Dashboard.js" + component: import Dashboard from "@client/Dashboard.js" } ``` @@ -49,8 +49,11 @@ While fundamental types are here to be basic building blocks of a language, and - **bool** (`true`, `false`) - **number** (`12`, `14.5`) - **declaration reference** (name of existing declaration: `TaskPage`, `updateTask`) - - **ExtImport** (external import) (`import Foo from "@ext/bar.js"`, `import { Smth } from "@ext/a/b.js"`) - - path has to be relative and start with "@ext". It is considered to be relative to the `ext/` directory. + - **ServerImport** (external server import) (`import Foo from "@server/bar.js"`, `import { Smth } from "@server/a/b.js"`) + - The path start with "@server". The rest is relative to the `src/server` directory. + - import has to be a default import `import Foo` or a single named import `import { Foo }`. + - **ClientImport** (external client import) (`import Foo from "@client/bar.js"`, `import { Smth } from "@client/a/b.js"`) + - The path has to start with "@client". The rest is relative to the `src/client` directory. - import has to be a default import `import Foo` or a single named import `import { Foo }`. - **json** (`{=json { a: 5, b: ["hi"] } json=}`) - **psl** (Prisma Schema Language) (`{=psl psl=}`) diff --git a/web/docs/tutorials/todo-app/auth.md b/web/docs/tutorials/todo-app/auth.md index 1751a2c99f..60b2916b95 100644 --- a/web/docs/tutorials/todo-app/auth.md +++ b/web/docs/tutorials/todo-app/auth.md @@ -10,7 +10,7 @@ Let's define a Todo list (luckily we have an app for that now ;)) to get this do - [ ] Add Wasp entity `User`. - [ ] Add `auth` Wasp declaration. - [ ] Add `Login` and `Signup` pages -- [ ] Modify `ext/MainPage.js` so that it requires authentication. +- [ ] Modify `src/client/MainPage.js` so that it requires authentication. - [ ] Add Prisma relation between `User` and `Task` entities. - [ ] Modify our queries and actions so that they work only with the tasks belonging to the authenticated user. - [ ] Add logout button. @@ -79,18 +79,18 @@ When we defined `app.auth` we got login and signup forms generated for us, but n route SignupRoute { path: "/signup", to: SignupPage } page SignupPage { - component: import Signup from "@ext/SignupPage" + component: import Signup from "@client/SignupPage" } route LoginRoute { path: "/login", to: LoginPage } page LoginPage { - component: import Login from "@ext/LoginPage" + component: import Login from "@client/LoginPage" } ``` Great, Wasp now knows how to route these and where to find the pages. Now to the React code of the pages: -```jsx title="ext/LoginPage.js" +```jsx title="src/client/LoginPage.js" import React from 'react' import { Link } from 'react-router-dom' @@ -113,7 +113,7 @@ export default LoginPage The Signup page is very similar to the login one: -```jsx title="ext/SignupPage.js" +```jsx title="src/client/SignupPage.js" import React from 'react' import { Link } from 'react-router-dom' @@ -145,7 +145,7 @@ There is a specific Wasp feature that allows us to achieve this in a simple way: // ... page MainPage { authRequired: true, - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } ``` @@ -154,7 +154,7 @@ If an unauthenticated user tries to access route `/` where our page `MainPage` i Also, when `authRequired` is set to `true`, the React component of a page (specified by `component` property within `page`) will be provided `user` object as a prop. It can be accessed like this: -```jsx {1} title="ext/MainPage.js" +```jsx {1} title="src/client/MainPage.js" const MainPage = ({ user }) => { // do something with user } @@ -222,7 +222,7 @@ However, for this tutorial, for the sake of simplicity, we will stick with this. ## Updating operations to forbid access to non-authenticated users Next, let's update the queries and actions to forbid access to non-authenticated users and to operate only on the currently logged in user's tasks: -```js {1,4,6} title="ext/queries.js" +```js {1,4,6} title="@server/queries.js" import HttpError from '@wasp/core/HttpError.js' export const getTasks = async (args, context) => { @@ -233,7 +233,7 @@ export const getTasks = async (args, context) => { } ``` -```js {1,4,8,14,15,16} title="ext/actions.js" +```js {1,4,8,14,15,16} title="@server/actions.js" import HttpError from '@wasp/core/HttpError.js' export const createTask = async ({ description }, context) => { @@ -281,7 +281,7 @@ You will see that each user has its own tasks, just as we specified in our code! ## Logout button Last, but not the least, let's add logout functionality: -```jsx {2,10} title="MainPage.js" +```jsx {2,10} title="src/client/MainPage.js" // ... import logout from '@wasp/auth/logout.js' //... diff --git a/web/docs/tutorials/todo-app/creating-new-project.md b/web/docs/tutorials/todo-app/creating-new-project.md index 7887c63f1e..d729fabf57 100644 --- a/web/docs/tutorials/todo-app/creating-new-project.md +++ b/web/docs/tutorials/todo-app/creating-new-project.md @@ -1,5 +1,5 @@ --- -title: "Creating new project" +title: "Creating a new project" --- import useBaseUrl from '@docusaurus/useBaseUrl'; @@ -32,17 +32,28 @@ We just set the foundations of our app! We don't have yet the features to show i ## Taking a closer look at the code -Let's inspect Wasp project that we just created: +Let's inspect the Wasp project we just created: ```bash -TodoApp/ -├── main.wasp # Here goes our Wasp code. -├── ext/ # Here goes our (external) JS/CSS/HTML/... code. -│ └── MainPage.js -│ └── Main.css -│ └── waspLogo.png +. ├── .gitignore +├── main.wasp # Our wasp code goes here. +├── src +│   ├── client # Our external client code (JS/CSS/HTML) goes here. +│   │   ├── jsconfig.json +│   │   ├── Main.css +│   │   ├── MainPage.js +│   │   └── waspLogo.png +│   ├── server # Our external server code (Node JS) goes here. +│   │   └── jsconfig.json +│   ├── shared # Our external shared code goes here. +│   │   └── jsconfig.json +│   └── .waspignore └── .wasproot ``` +By _extranal code_, we mean _"the code you write"_ (as opposed to the code generated by Wasp). Wasp expects you to separate all external code into three folders to make it clear which runtime executes what: +- `src/server` - Contains the code executed on the server (i.e., in Node) +- `src/client` - Contains the code executed on the client (i.e., JS in the browser) +- `src/shared` - Contains the code you want to use on both the client and the server (e.g., utility functions) Let's start with the `main.wasp` file, which introduces 3 new concepts: [app](language/features.md#app), @@ -60,15 +71,15 @@ app TodoApp { // Main declaration, defines a new web app. route RootRoute { path: "/", to: MainPage } // Render page MainPage on url `/` (default url). page MainPage { - // We specify that ReactJS implementation of our page can be - // found in `ext/MainPage.js` as a default export (uses standard - // js import syntax). - component: import Main from "@ext/MainPage.js" + // We specify that ReactJS implementation of our page can be found in + // `@client/MainPage.js` as a default export (uses standard js import syntax). + // You can use @client to reference files inside the src/client folder. + component: import Main from "@client/MainPage.js" } ``` -And now to that React component we referenced in the `page MainPage { ... }` declaration in `main.wasp`: -```jsx title="ext/MainPage.js" +Let's now take a look at that React component we referenced in the `page MainPage { ... }` declaration in `main.wasp`: +```jsx title="src/client/MainPage.js" import React from 'react' import waspLogo from './waspLogo.png' import './Main.css' @@ -78,10 +89,10 @@ const MainPage = () => { } export default MainPage ``` -As we can see, this is just a simple functional React component, using the CSS and Wasp logo files that are next to it. +As we can see, this is simply a functional React component which uses the CSS and Wasp logo files sitting next to it in the `src/client` dir. -This is all the code! -Wasp in the background takes care of everything else needed to define, build and run a web app. +This is all the code we need! +Wasp quitely takes care of everything else needed to define, build, and run a web app. :::tip `wasp start` automatically picks up the changes you make and restarts the app, so keep it running. @@ -90,9 +101,9 @@ Wasp in the background takes care of everything else needed to define, build and ## Cleaning up Let's make our first changes! -To prepare the clean slate for building the TodoApp, delete all the files from `ext/` dir except for `MainPage.js`, and let's also make `MainPage` component much simpler: +To prepare the clean slate for building the TodoApp, the files `Main.css` and `waspLogo.png` from the `src/client/` folder (`src/shared` and `src/server` are already clean). The `jsconfig.json` files are necessary for IDE support, so it's important to keep it. Now that `src/client` contains only `jsconfig.json` and `MainPage.js` let's start by making the `MainPage` component much simpler: -```jsx title="ext/MainPage.js" +```jsx title="src/client/MainPage.js" import React from 'react' const MainPage = () => { diff --git a/web/docs/tutorials/todo-app/creating-tasks.md b/web/docs/tutorials/todo-app/creating-tasks.md index 46cc096891..579c3e5429 100644 --- a/web/docs/tutorials/todo-app/creating-tasks.md +++ b/web/docs/tutorials/todo-app/creating-tasks.md @@ -5,8 +5,8 @@ title: "Creating tasks" import useBaseUrl from '@docusaurus/useBaseUrl'; To enable the creation of new tasks, we will need two things: -1. a Wasp action that creates a new task. -2. a React form that calls that action with the new task's data. +1. A Wasp action that creates a new task. +2. A React form that calls that action with the new task's data. ## Action Creating an action is very similar to creating a query. @@ -18,7 +18,7 @@ First we declare the action in Wasp: // ... action createTask { - fn: import { createTask } from "@ext/actions.js", + fn: import { createTask } from "@server/actions.js", entities: [Task] } ``` @@ -26,7 +26,7 @@ action createTask { ### JS implementation Next, we define a JS function for that action: -```js title="ext/actions.js" +```js title="src/server/actions.js" export const createTask = async (args, context) => { return context.entities.Task.create({ data: { description: args.description } @@ -35,12 +35,12 @@ export const createTask = async (args, context) => { ``` :::tip -We put the JS function in a new file `ext/actions.js`, but we could have put it anywhere we wanted! There are no limitations here, as long as the import statement in the Wasp file is correct and it is inside the `ext/` dir. +We put the JS function in a new file `src/server/actions.js`, but we could have put it anywhere we wanted! There are no limitations here, as long as the import statement in the Wasp file is correct and the source file is inside the `src/server` folder. ::: ## React form -```jsx {5,12,39-61} title="ext/MainPage.js" +```jsx {5,12,39-61} title="src/client/MainPage.js" import React from 'react' import { useQuery } from '@wasp/queries' diff --git a/web/docs/tutorials/todo-app/dependencies.md b/web/docs/tutorials/todo-app/dependencies.md index 8389cb0d72..4a8f0dea6f 100644 --- a/web/docs/tutorials/todo-app/dependencies.md +++ b/web/docs/tutorials/todo-app/dependencies.md @@ -28,7 +28,7 @@ wasp start to have Wasp download and install the new dependency. If `wasp start` is already running, Wasp will detect the dependency change, and restart automatically. Next, let's create a new component `Clocks` where we can play with the clocks. -```jsx title="ext/Clocks.js" +```jsx title="src/client/Clocks.js" import React, { useEffect, useState } from 'react' import Clock from 'react-clock' import 'react-clock/dist/Clock.css' @@ -51,7 +51,7 @@ export default () => { ``` And let's import it in our main React component. -```jsx {2,11} title="ext/MainPage.js" +```jsx {2,11} title="src/client/MainPage.js" // ... import Clocks from './Clocks' @@ -70,6 +70,6 @@ const MainPage = () => { } // ... ``` -As you can see, importing other files from `/ext` is completely normal, just use the relative path. +As you can see, importing other files from `src/client` is completely normal, just use the relative path. The same goes for all files under `src/server`. You can't (and shouldn't) import files from `src/client` into `src/server` and vice versa. If you want to share code between the two runtimes, you can use a relative import to import anything from `src/shared` into both the client code and the server code. That is it! We added a dependency and used it in our project. diff --git a/web/docs/tutorials/todo-app/listing-tasks.md b/web/docs/tutorials/todo-app/listing-tasks.md index 779408c5e7..8c76cc7f85 100644 --- a/web/docs/tutorials/todo-app/listing-tasks.md +++ b/web/docs/tutorials/todo-app/listing-tasks.md @@ -20,7 +20,7 @@ To list tasks, we will need two things: ## Wasp query Let's implement `getTasks` [query](language/features.md#query). -It consists of a declaration in Wasp and implementation in JS (in `ext/` directory). +It consists of a declaration in Wasp and implementation in JS (in `src/server/` directory). ### Wasp declaration Add the following code to `main.wasp`: @@ -29,8 +29,8 @@ Add the following code to `main.wasp`: query getTasks { // We specify that JS implementation of the query (which is an async JS function) - // can be found in `ext/queries.js` as named export `getTasks`. - fn: import { getTasks } from "@ext/queries.js", + // can be found in `@server/queries.js` as the named export `getTasks`. + fn: import { getTasks } from "@server/queries.js", // We tell Wasp that this query is doing something with entity `Task`. With that, Wasp will // automatically refresh the results of this query when tasks change. entities: [Task] @@ -38,9 +38,9 @@ query getTasks { ``` ### JS implementation -Next, create a new file `ext/queries.js` and define the JS function that we just imported in the `query` declaration above: +Next, create a new file `src/server/queries.js` and define the JS we've just used in the `query` declaration above: -```js title="ext/queries.js" +```js title="src/server/queries.js" export const getTasks = async (args, context) => { return context.entities.Task.findMany({}) } @@ -54,14 +54,14 @@ Query function parameters: Since we declared in `main.wasp` that our query uses entity Task, Wasp injected a [Prisma client](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/crud) for entity Task as `context.entities.Task` - we used it above to fetch all the tasks from the database. :::info -Queries and actions are NodeJS functions that are executed on the server. +Queries and actions are NodeJS functions that are executed on the server. Therefore, we put them in the `src/server` folder. ::: ## Invoking the query from React -Finally, let's use the query we just created, `getTasks`, in our React component to list the tasks: +We've just said that the queries we write are executed on the server, but Wasp will generate client-side querie functions (taking care of the network and cache invalidation in the background). Let's finally use the query we've just created, `getTasks`, in our React component to list the tasks: -```jsx {3-4,7-16,19-32} title="ext/MainPage.js" +```jsx {3-4,7-16,19-32} title="src/client/MainPage.js" import React from 'react' import getTasks from '@wasp/queries/getTasks' @@ -98,9 +98,9 @@ const TasksList = (props) => { export default MainPage ``` -All of this is just regular React, except for the two special `@wasp` imports: - - `import getTasks from '@wasp/queries/getTasks'`: provides us with our freshly defined Wasp query. - - `import { useQuery } from '@wasp/queries'`: provides us with Wasp's [useQuery](language/features.md#usequery) React hook which is actually just a thin wrapper over [react-query](https://github.com/tannerlinsley/react-query)'s [useQuery](https://react-query.tanstack.com/docs/guides/queries) hook, behaving very similarly while offering some extra integration with Wasp. +Most of this is just regular React, the only exception being two special `@wasp` imports: + - `import getTasks from '@wasp/queries/getTasks'` - Gives us our freshly defined Wasp query. + - `import { useQuery } from '@wasp/queries'` - Gives us Wasp's [useQuery](language/features.md#the-usequery-hook) React hook which is actually just a thin wrapper over [react-query](https://github.com/tannerlinsley/react-query)'s [useQuery](https://react-query.tanstack.com/docs/guides/queries) hook, behaving very similarly while offering some extra integration with Wasp. While we could call query directly as `getTasks()`, calling it as `useQuery(getTasks)` gives us reactivity- the React component gets re-rendered if the result of the query changes. diff --git a/web/docs/tutorials/todo-app/updating-tasks.md b/web/docs/tutorials/todo-app/updating-tasks.md index ed17265b7e..1bf4d9f7fb 100644 --- a/web/docs/tutorials/todo-app/updating-tasks.md +++ b/web/docs/tutorials/todo-app/updating-tasks.md @@ -19,15 +19,15 @@ We declare a Wasp action: // ... action updateTask { - fn: import { updateTask } from "@ext/actions.js", + fn: import { updateTask } from "@server/actions.js", entities: [Task] } ``` ### JS implementation -We define the JS implementation of the Wasp action in `ext/actions.js`: -```js title="ext/actions.js" +We define the JS implementation of the Wasp action in `src/server/actions.js`: +```js title="src/server/actions.js" // ... export const updateTask = async (args, context) => { @@ -43,7 +43,7 @@ export const updateTask = async (args, context) => { ## React logic And we update the React component: -```jsx {2,7-16,23} title="ext/MainPage.js" +```jsx {2,7-16,23} title="src/client/MainPage.js" // ... import updateTask from '@wasp/actions/updateTask' From 313d2b77e9e9e48eb927b2397b95820eb0989bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 01:37:34 +0100 Subject: [PATCH 43/65] Update todoApp example to new structure --- examples/tutorials/TodoApp/.gitignore | 2 ++ examples/tutorials/TodoApp/.wasproot | 2 +- examples/tutorials/TodoApp/main.wasp | 12 ++++---- .../TodoApp/{ext => src}/.waspignore | 0 .../TodoApp/{ext => src/client}/Clocks.js | 0 .../TodoApp/{ext => src/client}/LoginPage.js | 0 .../TodoApp/{ext => src/client}/MainPage.js | 0 .../TodoApp/{ext => src/client}/SignupPage.js | 0 .../TodoApp/src/client/jsconfig.json | 27 ++++++++++++++++++ .../TodoApp/{ext => src/client}/waspLogo.png | Bin .../TodoApp/{ext => src/server}/actions.js | 0 .../TodoApp/src/server/jsconfig.json | 27 ++++++++++++++++++ .../TodoApp/{ext => src/server}/queries.js | 0 .../TodoApp/src/shared/jsconfig.json | 23 +++++++++++++++ 14 files changed, 86 insertions(+), 7 deletions(-) rename examples/tutorials/TodoApp/{ext => src}/.waspignore (100%) rename examples/tutorials/TodoApp/{ext => src/client}/Clocks.js (100%) rename examples/tutorials/TodoApp/{ext => src/client}/LoginPage.js (100%) rename examples/tutorials/TodoApp/{ext => src/client}/MainPage.js (100%) rename examples/tutorials/TodoApp/{ext => src/client}/SignupPage.js (100%) create mode 100644 examples/tutorials/TodoApp/src/client/jsconfig.json rename examples/tutorials/TodoApp/{ext => src/client}/waspLogo.png (100%) rename examples/tutorials/TodoApp/{ext => src/server}/actions.js (100%) create mode 100644 examples/tutorials/TodoApp/src/server/jsconfig.json rename examples/tutorials/TodoApp/{ext => src/server}/queries.js (100%) create mode 100644 examples/tutorials/TodoApp/src/shared/jsconfig.json diff --git a/examples/tutorials/TodoApp/.gitignore b/examples/tutorials/TodoApp/.gitignore index 8867bf3557..c51177f6dc 100644 --- a/examples/tutorials/TodoApp/.gitignore +++ b/examples/tutorials/TodoApp/.gitignore @@ -1 +1,3 @@ /.wasp/ +/.env.server +/.env.client diff --git a/examples/tutorials/TodoApp/.wasproot b/examples/tutorials/TodoApp/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/examples/tutorials/TodoApp/.wasproot +++ b/examples/tutorials/TodoApp/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/examples/tutorials/TodoApp/main.wasp b/examples/tutorials/TodoApp/main.wasp index e32d81ef7d..a30e38c4ff 100644 --- a/examples/tutorials/TodoApp/main.wasp +++ b/examples/tutorials/TodoApp/main.wasp @@ -21,17 +21,17 @@ app TodoApp { route RootRoute { path: "/", to: MainPage } page MainPage { authRequired: true, - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } route SignupRoute { path: "/signup", to: SignupPage } page SignupPage { - component: import Signup from "@ext/SignupPage" + component: import Signup from "@client/SignupPage" } route LoginRoute { path: "/login", to: LoginPage } page LoginPage { - component: import Login from "@ext/LoginPage" + component: import Login from "@client/LoginPage" } entity User {=psl @@ -50,16 +50,16 @@ entity Task {=psl psl=} query getTasks { - fn: import { getTasks } from "@ext/queries.js", + fn: import { getTasks } from "@server/queries.js", entities: [Task] } action createTask { - fn: import { createTask } from "@ext/actions.js", + fn: import { createTask } from "@server/actions.js", entities: [Task] } action updateTask { - fn: import { updateTask } from "@ext/actions.js", + fn: import { updateTask } from "@server/actions.js", entities: [Task] } diff --git a/examples/tutorials/TodoApp/ext/.waspignore b/examples/tutorials/TodoApp/src/.waspignore similarity index 100% rename from examples/tutorials/TodoApp/ext/.waspignore rename to examples/tutorials/TodoApp/src/.waspignore diff --git a/examples/tutorials/TodoApp/ext/Clocks.js b/examples/tutorials/TodoApp/src/client/Clocks.js similarity index 100% rename from examples/tutorials/TodoApp/ext/Clocks.js rename to examples/tutorials/TodoApp/src/client/Clocks.js diff --git a/examples/tutorials/TodoApp/ext/LoginPage.js b/examples/tutorials/TodoApp/src/client/LoginPage.js similarity index 100% rename from examples/tutorials/TodoApp/ext/LoginPage.js rename to examples/tutorials/TodoApp/src/client/LoginPage.js diff --git a/examples/tutorials/TodoApp/ext/MainPage.js b/examples/tutorials/TodoApp/src/client/MainPage.js similarity index 100% rename from examples/tutorials/TodoApp/ext/MainPage.js rename to examples/tutorials/TodoApp/src/client/MainPage.js diff --git a/examples/tutorials/TodoApp/ext/SignupPage.js b/examples/tutorials/TodoApp/src/client/SignupPage.js similarity index 100% rename from examples/tutorials/TodoApp/ext/SignupPage.js rename to examples/tutorials/TodoApp/src/client/SignupPage.js diff --git a/examples/tutorials/TodoApp/src/client/jsconfig.json b/examples/tutorials/TodoApp/src/client/jsconfig.json new file mode 100644 index 0000000000..e9b5551fd7 --- /dev/null +++ b/examples/tutorials/TodoApp/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/tutorials/TodoApp/ext/waspLogo.png b/examples/tutorials/TodoApp/src/client/waspLogo.png similarity index 100% rename from examples/tutorials/TodoApp/ext/waspLogo.png rename to examples/tutorials/TodoApp/src/client/waspLogo.png diff --git a/examples/tutorials/TodoApp/ext/actions.js b/examples/tutorials/TodoApp/src/server/actions.js similarity index 100% rename from examples/tutorials/TodoApp/ext/actions.js rename to examples/tutorials/TodoApp/src/server/actions.js diff --git a/examples/tutorials/TodoApp/src/server/jsconfig.json b/examples/tutorials/TodoApp/src/server/jsconfig.json new file mode 100644 index 0000000000..9e996fc5df --- /dev/null +++ b/examples/tutorials/TodoApp/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/tutorials/TodoApp/ext/queries.js b/examples/tutorials/TodoApp/src/server/queries.js similarity index 100% rename from examples/tutorials/TodoApp/ext/queries.js rename to examples/tutorials/TodoApp/src/server/queries.js diff --git a/examples/tutorials/TodoApp/src/shared/jsconfig.json b/examples/tutorials/TodoApp/src/shared/jsconfig.json new file mode 100644 index 0000000000..0c4e7f7eb1 --- /dev/null +++ b/examples/tutorials/TodoApp/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} From bbef734fb72ca52d731344a2792e4e6dd7aa5306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 01:52:38 +0100 Subject: [PATCH 44/65] Update ItWaspsOnMyMachine --- .../tutorials/ItWaspsOnMyMachine/.gitignore | 3 +- .../tutorials/ItWaspsOnMyMachine/.wasproot | 2 +- .../tutorials/ItWaspsOnMyMachine/main.wasp | 8 +++--- .../20220819110846_init/migration.sql | 5 ---- .../{ext => src}/.waspignore | 0 .../{ext => src/client}/MainPage.js | 0 .../src/client/jsconfig.json | 27 ++++++++++++++++++ .../client}/sponge-bob-excuses.jpg | Bin .../{ext => src/server}/actions.js | 0 .../src/server/jsconfig.json | 27 ++++++++++++++++++ .../{ext => src/server}/queries.js | 0 .../src/shared/jsconfig.json | 23 +++++++++++++++ 12 files changed, 84 insertions(+), 11 deletions(-) delete mode 100644 examples/tutorials/ItWaspsOnMyMachine/migrations/20220819110846_init/migration.sql rename examples/tutorials/ItWaspsOnMyMachine/{ext => src}/.waspignore (100%) rename examples/tutorials/ItWaspsOnMyMachine/{ext => src/client}/MainPage.js (100%) create mode 100644 examples/tutorials/ItWaspsOnMyMachine/src/client/jsconfig.json rename examples/tutorials/ItWaspsOnMyMachine/{ext => src/client}/sponge-bob-excuses.jpg (100%) rename examples/tutorials/ItWaspsOnMyMachine/{ext => src/server}/actions.js (100%) create mode 100644 examples/tutorials/ItWaspsOnMyMachine/src/server/jsconfig.json rename examples/tutorials/ItWaspsOnMyMachine/{ext => src/server}/queries.js (100%) create mode 100644 examples/tutorials/ItWaspsOnMyMachine/src/shared/jsconfig.json diff --git a/examples/tutorials/ItWaspsOnMyMachine/.gitignore b/examples/tutorials/ItWaspsOnMyMachine/.gitignore index 706b2ddffd..c51177f6dc 100644 --- a/examples/tutorials/ItWaspsOnMyMachine/.gitignore +++ b/examples/tutorials/ItWaspsOnMyMachine/.gitignore @@ -1,2 +1,3 @@ /.wasp/ -/.env +/.env.server +/.env.client diff --git a/examples/tutorials/ItWaspsOnMyMachine/.wasproot b/examples/tutorials/ItWaspsOnMyMachine/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/examples/tutorials/ItWaspsOnMyMachine/.wasproot +++ b/examples/tutorials/ItWaspsOnMyMachine/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/examples/tutorials/ItWaspsOnMyMachine/main.wasp b/examples/tutorials/ItWaspsOnMyMachine/main.wasp index b5da61620a..941e882492 100644 --- a/examples/tutorials/ItWaspsOnMyMachine/main.wasp +++ b/examples/tutorials/ItWaspsOnMyMachine/main.wasp @@ -16,7 +16,7 @@ app ItWaspsOnMyMachine { route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } entity Excuse {=psl @@ -25,17 +25,17 @@ entity Excuse {=psl psl=} query getExcuse { - fn: import { getExcuse } from "@ext/queries.js", + fn: import { getExcuse } from "@client/queries.js", entities: [Excuse] } query getAllSavedExcuses { - fn: import { getAllSavedExcuses } from "@ext/queries.js", + fn: import { getAllSavedExcuses } from "@server/queries.js", entities: [Excuse] } action saveExcuse { - fn: import { saveExcuse } from "@ext/actions.js", + fn: import { saveExcuse } from "@server/actions.js", entities: [Excuse] } diff --git a/examples/tutorials/ItWaspsOnMyMachine/migrations/20220819110846_init/migration.sql b/examples/tutorials/ItWaspsOnMyMachine/migrations/20220819110846_init/migration.sql deleted file mode 100644 index 345b870e02..0000000000 --- a/examples/tutorials/ItWaspsOnMyMachine/migrations/20220819110846_init/migration.sql +++ /dev/null @@ -1,5 +0,0 @@ --- CreateTable -CREATE TABLE "Excuse" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "text" TEXT NOT NULL -); diff --git a/examples/tutorials/ItWaspsOnMyMachine/ext/.waspignore b/examples/tutorials/ItWaspsOnMyMachine/src/.waspignore similarity index 100% rename from examples/tutorials/ItWaspsOnMyMachine/ext/.waspignore rename to examples/tutorials/ItWaspsOnMyMachine/src/.waspignore diff --git a/examples/tutorials/ItWaspsOnMyMachine/ext/MainPage.js b/examples/tutorials/ItWaspsOnMyMachine/src/client/MainPage.js similarity index 100% rename from examples/tutorials/ItWaspsOnMyMachine/ext/MainPage.js rename to examples/tutorials/ItWaspsOnMyMachine/src/client/MainPage.js diff --git a/examples/tutorials/ItWaspsOnMyMachine/src/client/jsconfig.json b/examples/tutorials/ItWaspsOnMyMachine/src/client/jsconfig.json new file mode 100644 index 0000000000..e9b5551fd7 --- /dev/null +++ b/examples/tutorials/ItWaspsOnMyMachine/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/tutorials/ItWaspsOnMyMachine/ext/sponge-bob-excuses.jpg b/examples/tutorials/ItWaspsOnMyMachine/src/client/sponge-bob-excuses.jpg similarity index 100% rename from examples/tutorials/ItWaspsOnMyMachine/ext/sponge-bob-excuses.jpg rename to examples/tutorials/ItWaspsOnMyMachine/src/client/sponge-bob-excuses.jpg diff --git a/examples/tutorials/ItWaspsOnMyMachine/ext/actions.js b/examples/tutorials/ItWaspsOnMyMachine/src/server/actions.js similarity index 100% rename from examples/tutorials/ItWaspsOnMyMachine/ext/actions.js rename to examples/tutorials/ItWaspsOnMyMachine/src/server/actions.js diff --git a/examples/tutorials/ItWaspsOnMyMachine/src/server/jsconfig.json b/examples/tutorials/ItWaspsOnMyMachine/src/server/jsconfig.json new file mode 100644 index 0000000000..9e996fc5df --- /dev/null +++ b/examples/tutorials/ItWaspsOnMyMachine/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/tutorials/ItWaspsOnMyMachine/ext/queries.js b/examples/tutorials/ItWaspsOnMyMachine/src/server/queries.js similarity index 100% rename from examples/tutorials/ItWaspsOnMyMachine/ext/queries.js rename to examples/tutorials/ItWaspsOnMyMachine/src/server/queries.js diff --git a/examples/tutorials/ItWaspsOnMyMachine/src/shared/jsconfig.json b/examples/tutorials/ItWaspsOnMyMachine/src/shared/jsconfig.json new file mode 100644 index 0000000000..0c4e7f7eb1 --- /dev/null +++ b/examples/tutorials/ItWaspsOnMyMachine/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} From 3a93ab412780ba935d0ee85331f012fb12d3aabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 10:15:40 +0100 Subject: [PATCH 45/65] Update thoughts --- examples/thoughts/.env | 1 - examples/thoughts/.env.server | 1 + examples/thoughts/.gitignore | 2 ++ examples/thoughts/{ext => }/.waspignore | 0 examples/thoughts/.wasproot | 2 +- examples/thoughts/main.wasp | 14 ++++----- .../thoughts/{ext => src/client}/Layout.css | 0 .../thoughts/{ext => src/client}/Layout.js | 0 .../thoughts/{ext => src/client}/LoginPage.js | 0 .../thoughts/{ext => src/client}/Main.css | 0 .../thoughts/{ext => src/client}/MainPage.js | 0 .../{ext => src/client}/SignupPage.js | 0 examples/thoughts/{ext => src/client}/Tag.css | 0 examples/thoughts/{ext => src/client}/Tag.js | 0 .../{ext => src/client}/TagsSidebar.css | 0 .../{ext => src/client}/TagsSidebar.js | 0 .../thoughts/{ext => src/client}/Thought.css | 0 .../{ext => src/client}/ThoughtsPage.css | 0 .../{ext => src/client}/ThoughtsPage.js | 0 .../{ext => src/client}/TopNavbar.css | 0 .../thoughts/{ext => src/client}/TopNavbar.js | 0 .../{ext => src/client}/WaspSourceHeader.js | 0 .../client}/addWaspSourceHeader.js | 0 examples/thoughts/src/client/jsconfig.json | 27 ++++++++++++++++++ .../thoughts/{ext => src/client}/waspLogo.png | Bin .../thoughts/{ext => src/server}/actions.js | 0 examples/thoughts/src/server/jsconfig.json | 27 ++++++++++++++++++ .../thoughts/{ext => src/server}/queries.js | 0 examples/thoughts/src/shared/jsconfig.json | 23 +++++++++++++++ 29 files changed, 88 insertions(+), 9 deletions(-) delete mode 100644 examples/thoughts/.env create mode 100644 examples/thoughts/.env.server rename examples/thoughts/{ext => }/.waspignore (100%) rename examples/thoughts/{ext => src/client}/Layout.css (100%) rename examples/thoughts/{ext => src/client}/Layout.js (100%) rename examples/thoughts/{ext => src/client}/LoginPage.js (100%) rename examples/thoughts/{ext => src/client}/Main.css (100%) rename examples/thoughts/{ext => src/client}/MainPage.js (100%) rename examples/thoughts/{ext => src/client}/SignupPage.js (100%) rename examples/thoughts/{ext => src/client}/Tag.css (100%) rename examples/thoughts/{ext => src/client}/Tag.js (100%) rename examples/thoughts/{ext => src/client}/TagsSidebar.css (100%) rename examples/thoughts/{ext => src/client}/TagsSidebar.js (100%) rename examples/thoughts/{ext => src/client}/Thought.css (100%) rename examples/thoughts/{ext => src/client}/ThoughtsPage.css (100%) rename examples/thoughts/{ext => src/client}/ThoughtsPage.js (100%) rename examples/thoughts/{ext => src/client}/TopNavbar.css (100%) rename examples/thoughts/{ext => src/client}/TopNavbar.js (100%) rename examples/thoughts/{ext => src/client}/WaspSourceHeader.js (100%) rename examples/thoughts/{ext => src/client}/addWaspSourceHeader.js (100%) create mode 100644 examples/thoughts/src/client/jsconfig.json rename examples/thoughts/{ext => src/client}/waspLogo.png (100%) rename examples/thoughts/{ext => src/server}/actions.js (100%) create mode 100644 examples/thoughts/src/server/jsconfig.json rename examples/thoughts/{ext => src/server}/queries.js (100%) create mode 100644 examples/thoughts/src/shared/jsconfig.json diff --git a/examples/thoughts/.env b/examples/thoughts/.env deleted file mode 100644 index fe236cf6f5..0000000000 --- a/examples/thoughts/.env +++ /dev/null @@ -1 +0,0 @@ -DATABASE_URL=postgresql://postgres:devpass@localhost:5432/thoughts-dev diff --git a/examples/thoughts/.env.server b/examples/thoughts/.env.server new file mode 100644 index 0000000000..2f99aba2ae --- /dev/null +++ b/examples/thoughts/.env.server @@ -0,0 +1 @@ +DATABASE_URL=postgresql://postgres:devpass1234@localhost:5432/thoughts-dev diff --git a/examples/thoughts/.gitignore b/examples/thoughts/.gitignore index 8867bf3557..c51177f6dc 100644 --- a/examples/thoughts/.gitignore +++ b/examples/thoughts/.gitignore @@ -1 +1,3 @@ /.wasp/ +/.env.server +/.env.client diff --git a/examples/thoughts/ext/.waspignore b/examples/thoughts/.waspignore similarity index 100% rename from examples/thoughts/ext/.waspignore rename to examples/thoughts/.waspignore diff --git a/examples/thoughts/.wasproot b/examples/thoughts/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/examples/thoughts/.wasproot +++ b/examples/thoughts/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/examples/thoughts/main.wasp b/examples/thoughts/main.wasp index b4173bb770..be43d308af 100644 --- a/examples/thoughts/main.wasp +++ b/examples/thoughts/main.wasp @@ -19,38 +19,38 @@ app Thoughts { route MainRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js", + component: import Main from "@client/MainPage.js", authRequired: true } route ThoughtsRoute { path: "/thoughts", to: ThoughtsPage } page ThoughtsPage { - component: import Thoughts from "@ext/ThoughtsPage.js", + component: import Thoughts from "@client/ThoughtsPage.js", authRequired: true } route LoginRoute { path: "/login", to: LoginPage } page LoginPage { - component: import Login from "@ext/LoginPage.js" + component: import Login from "@client/LoginPage.js" } route SignupRoute { path: "/signup", to: SignupPage } page SignupPage { - component: import Signup from "@ext/SignupPage" + component: import Signup from "@client/SignupPage" } action createThought { - fn: import { createThought } from "@ext/actions.js", + fn: import { createThought } from "@server/actions.js", entities: [Thought, Tag] } query getThoughts { - fn: import { getThoughts } from "@ext/queries.js", + fn: import { getThoughts } from "@server/queries.js", entities: [Thought] } query getTags { - fn: import { getTags } from "@ext/queries.js", + fn: import { getTags } from "@server/queries.js", entities: [Tag] } diff --git a/examples/thoughts/ext/Layout.css b/examples/thoughts/src/client/Layout.css similarity index 100% rename from examples/thoughts/ext/Layout.css rename to examples/thoughts/src/client/Layout.css diff --git a/examples/thoughts/ext/Layout.js b/examples/thoughts/src/client/Layout.js similarity index 100% rename from examples/thoughts/ext/Layout.js rename to examples/thoughts/src/client/Layout.js diff --git a/examples/thoughts/ext/LoginPage.js b/examples/thoughts/src/client/LoginPage.js similarity index 100% rename from examples/thoughts/ext/LoginPage.js rename to examples/thoughts/src/client/LoginPage.js diff --git a/examples/thoughts/ext/Main.css b/examples/thoughts/src/client/Main.css similarity index 100% rename from examples/thoughts/ext/Main.css rename to examples/thoughts/src/client/Main.css diff --git a/examples/thoughts/ext/MainPage.js b/examples/thoughts/src/client/MainPage.js similarity index 100% rename from examples/thoughts/ext/MainPage.js rename to examples/thoughts/src/client/MainPage.js diff --git a/examples/thoughts/ext/SignupPage.js b/examples/thoughts/src/client/SignupPage.js similarity index 100% rename from examples/thoughts/ext/SignupPage.js rename to examples/thoughts/src/client/SignupPage.js diff --git a/examples/thoughts/ext/Tag.css b/examples/thoughts/src/client/Tag.css similarity index 100% rename from examples/thoughts/ext/Tag.css rename to examples/thoughts/src/client/Tag.css diff --git a/examples/thoughts/ext/Tag.js b/examples/thoughts/src/client/Tag.js similarity index 100% rename from examples/thoughts/ext/Tag.js rename to examples/thoughts/src/client/Tag.js diff --git a/examples/thoughts/ext/TagsSidebar.css b/examples/thoughts/src/client/TagsSidebar.css similarity index 100% rename from examples/thoughts/ext/TagsSidebar.css rename to examples/thoughts/src/client/TagsSidebar.css diff --git a/examples/thoughts/ext/TagsSidebar.js b/examples/thoughts/src/client/TagsSidebar.js similarity index 100% rename from examples/thoughts/ext/TagsSidebar.js rename to examples/thoughts/src/client/TagsSidebar.js diff --git a/examples/thoughts/ext/Thought.css b/examples/thoughts/src/client/Thought.css similarity index 100% rename from examples/thoughts/ext/Thought.css rename to examples/thoughts/src/client/Thought.css diff --git a/examples/thoughts/ext/ThoughtsPage.css b/examples/thoughts/src/client/ThoughtsPage.css similarity index 100% rename from examples/thoughts/ext/ThoughtsPage.css rename to examples/thoughts/src/client/ThoughtsPage.css diff --git a/examples/thoughts/ext/ThoughtsPage.js b/examples/thoughts/src/client/ThoughtsPage.js similarity index 100% rename from examples/thoughts/ext/ThoughtsPage.js rename to examples/thoughts/src/client/ThoughtsPage.js diff --git a/examples/thoughts/ext/TopNavbar.css b/examples/thoughts/src/client/TopNavbar.css similarity index 100% rename from examples/thoughts/ext/TopNavbar.css rename to examples/thoughts/src/client/TopNavbar.css diff --git a/examples/thoughts/ext/TopNavbar.js b/examples/thoughts/src/client/TopNavbar.js similarity index 100% rename from examples/thoughts/ext/TopNavbar.js rename to examples/thoughts/src/client/TopNavbar.js diff --git a/examples/thoughts/ext/WaspSourceHeader.js b/examples/thoughts/src/client/WaspSourceHeader.js similarity index 100% rename from examples/thoughts/ext/WaspSourceHeader.js rename to examples/thoughts/src/client/WaspSourceHeader.js diff --git a/examples/thoughts/ext/addWaspSourceHeader.js b/examples/thoughts/src/client/addWaspSourceHeader.js similarity index 100% rename from examples/thoughts/ext/addWaspSourceHeader.js rename to examples/thoughts/src/client/addWaspSourceHeader.js diff --git a/examples/thoughts/src/client/jsconfig.json b/examples/thoughts/src/client/jsconfig.json new file mode 100644 index 0000000000..e9b5551fd7 --- /dev/null +++ b/examples/thoughts/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/thoughts/ext/waspLogo.png b/examples/thoughts/src/client/waspLogo.png similarity index 100% rename from examples/thoughts/ext/waspLogo.png rename to examples/thoughts/src/client/waspLogo.png diff --git a/examples/thoughts/ext/actions.js b/examples/thoughts/src/server/actions.js similarity index 100% rename from examples/thoughts/ext/actions.js rename to examples/thoughts/src/server/actions.js diff --git a/examples/thoughts/src/server/jsconfig.json b/examples/thoughts/src/server/jsconfig.json new file mode 100644 index 0000000000..9e996fc5df --- /dev/null +++ b/examples/thoughts/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/thoughts/ext/queries.js b/examples/thoughts/src/server/queries.js similarity index 100% rename from examples/thoughts/ext/queries.js rename to examples/thoughts/src/server/queries.js diff --git a/examples/thoughts/src/shared/jsconfig.json b/examples/thoughts/src/shared/jsconfig.json new file mode 100644 index 0000000000..0c4e7f7eb1 --- /dev/null +++ b/examples/thoughts/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} From 28b841d091e4ebba5dc124d108b6d5b213888baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 10:24:27 +0100 Subject: [PATCH 46/65] Update Waspello to new structure --- examples/waspello/.gitignore | 3 +- examples/waspello/.wasproot | 2 +- examples/waspello/main.wasp | 20 ++++++------- examples/waspello/{ext => src}/.waspignore | 0 .../waspello/{ext => src/client}/LoginPage.js | 0 .../waspello/{ext => src/client}/Main.css | 0 .../waspello/{ext => src/client}/MainPage.js | 0 .../waspello/{ext => src/client}/Navbar.css | 0 .../waspello/{ext => src/client}/Navbar.js | 0 .../{ext => src/client}/PositionContext.js | 0 .../waspello/{ext => src/client}/Signup.css | 0 .../{ext => src/client}/SignupPage.js | 0 .../{ext => src/client}/UserPageLayout.css | 0 .../{ext => src/client}/UserPageLayout.js | 0 .../{ext => src/client}/WaspSourceHeader.js | 0 .../client}/addWaspSourceHeader.js | 0 examples/waspello/src/client/jsconfig.json | 27 ++++++++++++++++++ .../waspello/{ext => src/client}/waspLogo.png | Bin .../client}/waspello-logo-navbar.svg | 0 .../{ext => src/client}/waspello-logo.svg | 0 .../waspello/{ext => src/server}/actions.js | 0 examples/waspello/src/server/jsconfig.json | 27 ++++++++++++++++++ .../waspello/{ext => src/server}/queries.js | 0 examples/waspello/src/shared/jsconfig.json | 23 +++++++++++++++ 24 files changed, 90 insertions(+), 12 deletions(-) rename examples/waspello/{ext => src}/.waspignore (100%) rename examples/waspello/{ext => src/client}/LoginPage.js (100%) rename examples/waspello/{ext => src/client}/Main.css (100%) rename examples/waspello/{ext => src/client}/MainPage.js (100%) rename examples/waspello/{ext => src/client}/Navbar.css (100%) rename examples/waspello/{ext => src/client}/Navbar.js (100%) rename examples/waspello/{ext => src/client}/PositionContext.js (100%) rename examples/waspello/{ext => src/client}/Signup.css (100%) rename examples/waspello/{ext => src/client}/SignupPage.js (100%) rename examples/waspello/{ext => src/client}/UserPageLayout.css (100%) rename examples/waspello/{ext => src/client}/UserPageLayout.js (100%) rename examples/waspello/{ext => src/client}/WaspSourceHeader.js (100%) rename examples/waspello/{ext => src/client}/addWaspSourceHeader.js (100%) create mode 100644 examples/waspello/src/client/jsconfig.json rename examples/waspello/{ext => src/client}/waspLogo.png (100%) rename examples/waspello/{ext => src/client}/waspello-logo-navbar.svg (100%) rename examples/waspello/{ext => src/client}/waspello-logo.svg (100%) rename examples/waspello/{ext => src/server}/actions.js (100%) create mode 100644 examples/waspello/src/server/jsconfig.json rename examples/waspello/{ext => src/server}/queries.js (100%) create mode 100644 examples/waspello/src/shared/jsconfig.json diff --git a/examples/waspello/.gitignore b/examples/waspello/.gitignore index 706b2ddffd..c51177f6dc 100644 --- a/examples/waspello/.gitignore +++ b/examples/waspello/.gitignore @@ -1,2 +1,3 @@ /.wasp/ -/.env +/.env.server +/.env.client diff --git a/examples/waspello/.wasproot b/examples/waspello/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/examples/waspello/.wasproot +++ b/examples/waspello/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/examples/waspello/main.wasp b/examples/waspello/main.wasp index 2b4a340bc2..81ded14ee8 100644 --- a/examples/waspello/main.wasp +++ b/examples/waspello/main.wasp @@ -28,17 +28,17 @@ app trello { route MainRoute { path: "/", to: Main } page Main { authRequired: true, - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } route SignupRoute { path: "/signup", to: Signup } page Signup { - component: import Signup from "@ext/SignupPage" + component: import Signup from "@client/SignupPage" } route LoginRoute { path: "/login", to: Login } page Login { - component: import Login from "@ext/LoginPage" + component: import Login from "@client/LoginPage" } // Entities @@ -80,41 +80,41 @@ psl=} // ------------------- Queries and actions query getListsAndCards { - fn: import { getListsAndCards } from "@ext/queries.js", + fn: import { getListsAndCards } from "@server/queries.js", entities: [List, Card] } // Lists action createList { - fn: import { createList } from "@ext/actions.js", + fn: import { createList } from "@server/actions.js", entities: [List] } action updateList { - fn: import { updateList } from "@ext/actions.js", + fn: import { updateList } from "@server/actions.js", entities: [List] } action deleteList { - fn: import { deleteList } from "@ext/actions.js", + fn: import { deleteList } from "@server/actions.js", entities: [List, Card] } action createListCopy { - fn: import { createListCopy } from "@ext/actions.js", + fn: import { createListCopy } from "@server/actions.js", entities: [List, Card] } // Cards action createCard { - fn: import { createCard } from "@ext/actions.js", + fn: import { createCard } from "@server/actions.js", entities: [Card] } action updateCard { - fn: import { updateCard } from "@ext/actions.js", + fn: import { updateCard } from "@server/actions.js", entities: [Card] } diff --git a/examples/waspello/ext/.waspignore b/examples/waspello/src/.waspignore similarity index 100% rename from examples/waspello/ext/.waspignore rename to examples/waspello/src/.waspignore diff --git a/examples/waspello/ext/LoginPage.js b/examples/waspello/src/client/LoginPage.js similarity index 100% rename from examples/waspello/ext/LoginPage.js rename to examples/waspello/src/client/LoginPage.js diff --git a/examples/waspello/ext/Main.css b/examples/waspello/src/client/Main.css similarity index 100% rename from examples/waspello/ext/Main.css rename to examples/waspello/src/client/Main.css diff --git a/examples/waspello/ext/MainPage.js b/examples/waspello/src/client/MainPage.js similarity index 100% rename from examples/waspello/ext/MainPage.js rename to examples/waspello/src/client/MainPage.js diff --git a/examples/waspello/ext/Navbar.css b/examples/waspello/src/client/Navbar.css similarity index 100% rename from examples/waspello/ext/Navbar.css rename to examples/waspello/src/client/Navbar.css diff --git a/examples/waspello/ext/Navbar.js b/examples/waspello/src/client/Navbar.js similarity index 100% rename from examples/waspello/ext/Navbar.js rename to examples/waspello/src/client/Navbar.js diff --git a/examples/waspello/ext/PositionContext.js b/examples/waspello/src/client/PositionContext.js similarity index 100% rename from examples/waspello/ext/PositionContext.js rename to examples/waspello/src/client/PositionContext.js diff --git a/examples/waspello/ext/Signup.css b/examples/waspello/src/client/Signup.css similarity index 100% rename from examples/waspello/ext/Signup.css rename to examples/waspello/src/client/Signup.css diff --git a/examples/waspello/ext/SignupPage.js b/examples/waspello/src/client/SignupPage.js similarity index 100% rename from examples/waspello/ext/SignupPage.js rename to examples/waspello/src/client/SignupPage.js diff --git a/examples/waspello/ext/UserPageLayout.css b/examples/waspello/src/client/UserPageLayout.css similarity index 100% rename from examples/waspello/ext/UserPageLayout.css rename to examples/waspello/src/client/UserPageLayout.css diff --git a/examples/waspello/ext/UserPageLayout.js b/examples/waspello/src/client/UserPageLayout.js similarity index 100% rename from examples/waspello/ext/UserPageLayout.js rename to examples/waspello/src/client/UserPageLayout.js diff --git a/examples/waspello/ext/WaspSourceHeader.js b/examples/waspello/src/client/WaspSourceHeader.js similarity index 100% rename from examples/waspello/ext/WaspSourceHeader.js rename to examples/waspello/src/client/WaspSourceHeader.js diff --git a/examples/waspello/ext/addWaspSourceHeader.js b/examples/waspello/src/client/addWaspSourceHeader.js similarity index 100% rename from examples/waspello/ext/addWaspSourceHeader.js rename to examples/waspello/src/client/addWaspSourceHeader.js diff --git a/examples/waspello/src/client/jsconfig.json b/examples/waspello/src/client/jsconfig.json new file mode 100644 index 0000000000..e9b5551fd7 --- /dev/null +++ b/examples/waspello/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/waspello/ext/waspLogo.png b/examples/waspello/src/client/waspLogo.png similarity index 100% rename from examples/waspello/ext/waspLogo.png rename to examples/waspello/src/client/waspLogo.png diff --git a/examples/waspello/ext/waspello-logo-navbar.svg b/examples/waspello/src/client/waspello-logo-navbar.svg similarity index 100% rename from examples/waspello/ext/waspello-logo-navbar.svg rename to examples/waspello/src/client/waspello-logo-navbar.svg diff --git a/examples/waspello/ext/waspello-logo.svg b/examples/waspello/src/client/waspello-logo.svg similarity index 100% rename from examples/waspello/ext/waspello-logo.svg rename to examples/waspello/src/client/waspello-logo.svg diff --git a/examples/waspello/ext/actions.js b/examples/waspello/src/server/actions.js similarity index 100% rename from examples/waspello/ext/actions.js rename to examples/waspello/src/server/actions.js diff --git a/examples/waspello/src/server/jsconfig.json b/examples/waspello/src/server/jsconfig.json new file mode 100644 index 0000000000..9e996fc5df --- /dev/null +++ b/examples/waspello/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/waspello/ext/queries.js b/examples/waspello/src/server/queries.js similarity index 100% rename from examples/waspello/ext/queries.js rename to examples/waspello/src/server/queries.js diff --git a/examples/waspello/src/shared/jsconfig.json b/examples/waspello/src/shared/jsconfig.json new file mode 100644 index 0000000000..0c4e7f7eb1 --- /dev/null +++ b/examples/waspello/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} From 42dfff975b6bafc8b129fbad1309644c47295d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 10:32:37 +0100 Subject: [PATCH 47/65] Update Waspleau to new structure --- examples/waspleau/.gitignore | 3 +- examples/waspleau/.wasproot | 2 +- examples/waspleau/main.wasp | 10 +++---- examples/waspleau/{ext => src}/.waspignore | 0 .../waspleau/{ext => src/client}/MainPage.js | 0 .../{ext => src/client}/WaspSourceHeader.js | 0 .../client}/addWaspSourceHeader.js | 0 examples/waspleau/src/client/jsconfig.json | 27 ++++++++++++++++++ .../waspleau/{ext => src/client}/style.css | 0 .../waspleau/{ext => src/client}/waspLogo.png | Bin .../waspleau/{ext => src/server}/dashboard.js | 0 examples/waspleau/src/server/jsconfig.json | 27 ++++++++++++++++++ .../{ext => src/server}/serverSetup.js | 0 .../{ext => src/server}/workers/github.js | 0 .../{ext => src/server}/workers/loadTime.js | 0 .../{ext => src/server}/workers/utils.js | 0 examples/waspleau/src/shared/jsconfig.json | 23 +++++++++++++++ 17 files changed, 85 insertions(+), 7 deletions(-) rename examples/waspleau/{ext => src}/.waspignore (100%) rename examples/waspleau/{ext => src/client}/MainPage.js (100%) rename examples/waspleau/{ext => src/client}/WaspSourceHeader.js (100%) rename examples/waspleau/{ext => src/client}/addWaspSourceHeader.js (100%) create mode 100644 examples/waspleau/src/client/jsconfig.json rename examples/waspleau/{ext => src/client}/style.css (100%) rename examples/waspleau/{ext => src/client}/waspLogo.png (100%) rename examples/waspleau/{ext => src/server}/dashboard.js (100%) create mode 100644 examples/waspleau/src/server/jsconfig.json rename examples/waspleau/{ext => src/server}/serverSetup.js (100%) rename examples/waspleau/{ext => src/server}/workers/github.js (100%) rename examples/waspleau/{ext => src/server}/workers/loadTime.js (100%) rename examples/waspleau/{ext => src/server}/workers/utils.js (100%) create mode 100644 examples/waspleau/src/shared/jsconfig.json diff --git a/examples/waspleau/.gitignore b/examples/waspleau/.gitignore index 18686dc05f..4ec620481a 100644 --- a/examples/waspleau/.gitignore +++ b/examples/waspleau/.gitignore @@ -1,3 +1,4 @@ /.wasp/ -/.env +/.env.server +/.env.client .DS_Store diff --git a/examples/waspleau/.wasproot b/examples/waspleau/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/examples/waspleau/.wasproot +++ b/examples/waspleau/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/examples/waspleau/main.wasp b/examples/waspleau/main.wasp index 1345f2e07e..573455299b 100644 --- a/examples/waspleau/main.wasp +++ b/examples/waspleau/main.wasp @@ -6,7 +6,7 @@ app waspleau { title: "Waspleau", server: { - setupFn: import serverSetup from "@ext/serverSetup.js" + setupFn: import serverSetup from "@server/serverSetup.js" }, db: { system: PostgreSQL }, @@ -19,7 +19,7 @@ app waspleau { job github { executor: PgBoss, perform: { - fn: import { workerFunction } from "@ext/workers/github.js" + fn: import { workerFunction } from "@server/workers/github.js" }, schedule: { cron: "*/10 * * * *" @@ -30,7 +30,7 @@ job github { job loadTime { executor: PgBoss, perform: { - fn: import { workerFunction } from "@ext/workers/loadTime.js" + fn: import { workerFunction } from "@server/workers/loadTime.js" }, schedule: { cron: "*/5 * * * *", @@ -51,10 +51,10 @@ psl=} route RootsRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } query dashboard { - fn: import { refreshDashboardData } from "@ext/dashboard.js", + fn: import { refreshDashboardData } from "@server/dashboard.js", entities: [Metric] } diff --git a/examples/waspleau/ext/.waspignore b/examples/waspleau/src/.waspignore similarity index 100% rename from examples/waspleau/ext/.waspignore rename to examples/waspleau/src/.waspignore diff --git a/examples/waspleau/ext/MainPage.js b/examples/waspleau/src/client/MainPage.js similarity index 100% rename from examples/waspleau/ext/MainPage.js rename to examples/waspleau/src/client/MainPage.js diff --git a/examples/waspleau/ext/WaspSourceHeader.js b/examples/waspleau/src/client/WaspSourceHeader.js similarity index 100% rename from examples/waspleau/ext/WaspSourceHeader.js rename to examples/waspleau/src/client/WaspSourceHeader.js diff --git a/examples/waspleau/ext/addWaspSourceHeader.js b/examples/waspleau/src/client/addWaspSourceHeader.js similarity index 100% rename from examples/waspleau/ext/addWaspSourceHeader.js rename to examples/waspleau/src/client/addWaspSourceHeader.js diff --git a/examples/waspleau/src/client/jsconfig.json b/examples/waspleau/src/client/jsconfig.json new file mode 100644 index 0000000000..e9b5551fd7 --- /dev/null +++ b/examples/waspleau/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/waspleau/ext/style.css b/examples/waspleau/src/client/style.css similarity index 100% rename from examples/waspleau/ext/style.css rename to examples/waspleau/src/client/style.css diff --git a/examples/waspleau/ext/waspLogo.png b/examples/waspleau/src/client/waspLogo.png similarity index 100% rename from examples/waspleau/ext/waspLogo.png rename to examples/waspleau/src/client/waspLogo.png diff --git a/examples/waspleau/ext/dashboard.js b/examples/waspleau/src/server/dashboard.js similarity index 100% rename from examples/waspleau/ext/dashboard.js rename to examples/waspleau/src/server/dashboard.js diff --git a/examples/waspleau/src/server/jsconfig.json b/examples/waspleau/src/server/jsconfig.json new file mode 100644 index 0000000000..9e996fc5df --- /dev/null +++ b/examples/waspleau/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/waspleau/ext/serverSetup.js b/examples/waspleau/src/server/serverSetup.js similarity index 100% rename from examples/waspleau/ext/serverSetup.js rename to examples/waspleau/src/server/serverSetup.js diff --git a/examples/waspleau/ext/workers/github.js b/examples/waspleau/src/server/workers/github.js similarity index 100% rename from examples/waspleau/ext/workers/github.js rename to examples/waspleau/src/server/workers/github.js diff --git a/examples/waspleau/ext/workers/loadTime.js b/examples/waspleau/src/server/workers/loadTime.js similarity index 100% rename from examples/waspleau/ext/workers/loadTime.js rename to examples/waspleau/src/server/workers/loadTime.js diff --git a/examples/waspleau/ext/workers/utils.js b/examples/waspleau/src/server/workers/utils.js similarity index 100% rename from examples/waspleau/ext/workers/utils.js rename to examples/waspleau/src/server/workers/utils.js diff --git a/examples/waspleau/src/shared/jsconfig.json b/examples/waspleau/src/shared/jsconfig.json new file mode 100644 index 0000000000..0c4e7f7eb1 --- /dev/null +++ b/examples/waspleau/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} From 8eb1c76463d353b2fa2b74295509ca54a6f90eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 13:28:21 +0100 Subject: [PATCH 48/65] Update Realworld to new structure, fix warnings --- examples/realworld/.gitignore | 3 +- examples/realworld/.wasproot | 2 +- examples/realworld/main.wasp | 46 +++++++++--------- examples/realworld/{ext => src}/.waspignore | 0 .../realworld/{ext => src/client}/MainPage.js | 1 + .../realworld/{ext => src/client}/Navbar.js | 0 .../{ext => src/client}/WaspSourceHeader.js | 0 .../client}/addWaspSourceHeader.js | 0 .../article/components/ArticleEditorPage.js | 0 .../client}/article/components/ArticleList.js | 5 +- .../components/ArticleListPaginated.js | 0 .../article/components/ArticleViewPage.js | 2 +- .../{ext => src/client}/auth/LoginPage.js | 0 .../{ext => src/client}/auth/SignupPage.js | 0 examples/realworld/src/client/jsconfig.json | 27 ++++++++++ .../realworld/{ext => src/client}/smiley.jpg | Bin .../user/components/UserProfilePage.js | 0 .../user/components/UserSettingsPage.js | 0 .../realworld/{ext => src/client}/utils.js | 0 .../{ext => src/client}/waspLogo.png | Bin .../{ext => src/server}/article/actions.js | 0 .../{ext => src/server}/article/queries.js | 0 examples/realworld/src/server/jsconfig.json | 27 ++++++++++ .../{ext => src/server}/user/actions.js | 0 .../{ext => src/server}/user/queries.js | 0 examples/realworld/src/shared/jsconfig.json | 23 +++++++++ 26 files changed, 107 insertions(+), 29 deletions(-) rename examples/realworld/{ext => src}/.waspignore (100%) rename examples/realworld/{ext => src/client}/MainPage.js (99%) rename examples/realworld/{ext => src/client}/Navbar.js (100%) rename examples/realworld/{ext => src/client}/WaspSourceHeader.js (100%) rename examples/realworld/{ext => src/client}/addWaspSourceHeader.js (100%) rename examples/realworld/{ext => src/client}/article/components/ArticleEditorPage.js (100%) rename examples/realworld/{ext => src/client}/article/components/ArticleList.js (95%) rename examples/realworld/{ext => src/client}/article/components/ArticleListPaginated.js (100%) rename examples/realworld/{ext => src/client}/article/components/ArticleViewPage.js (98%) rename examples/realworld/{ext => src/client}/auth/LoginPage.js (100%) rename examples/realworld/{ext => src/client}/auth/SignupPage.js (100%) create mode 100644 examples/realworld/src/client/jsconfig.json rename examples/realworld/{ext => src/client}/smiley.jpg (100%) rename examples/realworld/{ext => src/client}/user/components/UserProfilePage.js (100%) rename examples/realworld/{ext => src/client}/user/components/UserSettingsPage.js (100%) rename examples/realworld/{ext => src/client}/utils.js (100%) rename examples/realworld/{ext => src/client}/waspLogo.png (100%) rename examples/realworld/{ext => src/server}/article/actions.js (100%) rename examples/realworld/{ext => src/server}/article/queries.js (100%) create mode 100644 examples/realworld/src/server/jsconfig.json rename examples/realworld/{ext => src/server}/user/actions.js (100%) rename examples/realworld/{ext => src/server}/user/queries.js (100%) create mode 100644 examples/realworld/src/shared/jsconfig.json diff --git a/examples/realworld/.gitignore b/examples/realworld/.gitignore index 6b0390424c..c51177f6dc 100644 --- a/examples/realworld/.gitignore +++ b/examples/realworld/.gitignore @@ -1,2 +1,3 @@ /.wasp/ -.env +/.env.server +/.env.client diff --git a/examples/realworld/.wasproot b/examples/realworld/.wasproot index 3caa053db5..ca2cfdb482 100644 --- a/examples/realworld/.wasproot +++ b/examples/realworld/.wasproot @@ -1 +1 @@ -File marking the root of Wasp project. \ No newline at end of file +File marking the root of Wasp project. diff --git a/examples/realworld/main.wasp b/examples/realworld/main.wasp index ba3fcceeb3..163c1b8abe 100644 --- a/examples/realworld/main.wasp +++ b/examples/realworld/main.wasp @@ -35,39 +35,39 @@ app Conduit { route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } route LogInRoute { path: "/login", to: LogInPage } page LogInPage { - component: import LogIn from "@ext/auth/LoginPage.js" + component: import LogIn from "@client/auth/LoginPage.js" } route RegisterRoute { path: "/register", to: SignUpPage } page SignUpPage { - component: import SignUp from "@ext/auth/SignupPage.js" + component: import SignUp from "@client/auth/SignupPage.js" } route UserSettingsRoute { path: "/settings", to: UserSettingsPage } page UserSettingsPage { authRequired: true, - component: import UserSettings from "@ext/user/components/UserSettingsPage.js" + component: import UserSettings from "@client/user/components/UserSettingsPage.js" } route UserProfileRoute { path: "/@:username", to: UserProfilePage } page UserProfilePage { - component: import UserProfile from "@ext/user/components/UserProfilePage.js" + component: import UserProfile from "@client/user/components/UserProfilePage.js" } route ArticleEditorRoute { path: "/editor/:articleSlug?", to: ArticleEditorPage } page ArticleEditorPage { authRequired: true, - component: import ArticleEditor from "@ext/article/components/ArticleEditorPage.js" + component: import ArticleEditor from "@client/article/components/ArticleEditorPage.js" } route ArticleViewRoute { path: "/article/:articleSlug", to: ArticleViewPage } page ArticleViewPage { - component: import ArticleView from "@ext/article/components/ArticleViewPage.js" + component: import ArticleView from "@client/article/components/ArticleViewPage.js" } // ----------------- Entities ------------------ // @@ -123,84 +123,84 @@ psl=} // ----------------- User operations ------------------ // query getUser { - fn: import { getUser } from "@ext/user/queries.js", + fn: import { getUser } from "@server/user/queries.js", entities: [User] } action updateUser { - fn: import { updateUser } from "@ext/user/actions.js", + fn: import { updateUser } from "@server/user/actions.js", entities: [User] } action followUser { - fn: import { followUser } from "@ext/user/actions.js", + fn: import { followUser } from "@server/user/actions.js", entities: [User] } // ----------------- Article operations ------------------ // query getArticlesByUser { - fn: import { getArticlesByUser } from "@ext/article/queries.js", + fn: import { getArticlesByUser } from "@server/article/queries.js", entities: [Article] } query getFavoritedArticles { - fn: import { getFavoritedArticles } from "@ext/article/queries.js", + fn: import { getFavoritedArticles } from "@server/article/queries.js", entities: [Article] } query getFollowedArticles { - fn: import { getFollowedArticles } from "@ext/article/queries.js", + fn: import { getFollowedArticles } from "@server/article/queries.js", entities: [Article, User] } query getAllArticles { - fn: import { getAllArticles } from "@ext/article/queries.js", + fn: import { getAllArticles } from "@server/article/queries.js", entities: [Article] } query getArticle { - fn: import { getArticle } from "@ext/article/queries.js", + fn: import { getArticle } from "@server/article/queries.js", entities: [Article] } query getArticleComments { - fn: import { getArticleComments } from "@ext/article/queries.js", + fn: import { getArticleComments } from "@server/article/queries.js", entities: [Comment] } action createArticle { - fn: import { createArticle } from "@ext/article/actions.js", + fn: import { createArticle } from "@server/article/actions.js", entities: [Article] } action updateArticle { - fn: import { updateArticle } from "@ext/article/actions.js", + fn: import { updateArticle } from "@server/article/actions.js", entities: [Article] } action deleteArticle { - fn: import { deleteArticle } from "@ext/article/actions.js", + fn: import { deleteArticle } from "@server/article/actions.js", entities: [Article] } action setArticleFavorited { - fn: import { setArticleFavorited } from "@ext/article/actions.js", + fn: import { setArticleFavorited } from "@server/article/actions.js", entities: [Article] } action createComment { - fn: import { createComment } from "@ext/article/actions.js", + fn: import { createComment } from "@server/article/actions.js", entities: [Comment] } action deleteComment { - fn: import { deleteComment } from "@ext/article/actions.js", + fn: import { deleteComment } from "@server/article/actions.js", entities: [Comment] } query getTags { - fn: import { getTags } from "@ext/article/queries.js", + fn: import { getTags } from "@server/article/queries.js", entities: [ArticleTag, Article] } diff --git a/examples/realworld/ext/.waspignore b/examples/realworld/src/.waspignore similarity index 100% rename from examples/realworld/ext/.waspignore rename to examples/realworld/src/.waspignore diff --git a/examples/realworld/ext/MainPage.js b/examples/realworld/src/client/MainPage.js similarity index 99% rename from examples/realworld/ext/MainPage.js rename to examples/realworld/src/client/MainPage.js index 1bd5a0fbc6..8fa9031116 100644 --- a/examples/realworld/ext/MainPage.js +++ b/examples/realworld/src/client/MainPage.js @@ -128,6 +128,7 @@ const Tags = () => { Popular tags { popularTags.map(tag => ( diff --git a/examples/realworld/ext/Navbar.js b/examples/realworld/src/client/Navbar.js similarity index 100% rename from examples/realworld/ext/Navbar.js rename to examples/realworld/src/client/Navbar.js diff --git a/examples/realworld/ext/WaspSourceHeader.js b/examples/realworld/src/client/WaspSourceHeader.js similarity index 100% rename from examples/realworld/ext/WaspSourceHeader.js rename to examples/realworld/src/client/WaspSourceHeader.js diff --git a/examples/realworld/ext/addWaspSourceHeader.js b/examples/realworld/src/client/addWaspSourceHeader.js similarity index 100% rename from examples/realworld/ext/addWaspSourceHeader.js rename to examples/realworld/src/client/addWaspSourceHeader.js diff --git a/examples/realworld/ext/article/components/ArticleEditorPage.js b/examples/realworld/src/client/article/components/ArticleEditorPage.js similarity index 100% rename from examples/realworld/ext/article/components/ArticleEditorPage.js rename to examples/realworld/src/client/article/components/ArticleEditorPage.js diff --git a/examples/realworld/ext/article/components/ArticleList.js b/examples/realworld/src/client/article/components/ArticleList.js similarity index 95% rename from examples/realworld/ext/article/components/ArticleList.js rename to examples/realworld/src/client/article/components/ArticleList.js index af60f6c40f..195529a9e1 100644 --- a/examples/realworld/ext/article/components/ArticleList.js +++ b/examples/realworld/src/client/article/components/ArticleList.js @@ -75,10 +75,9 @@ const Article = (props) => { - - { article.tags.map(t => ( - + { article.tags.map(tag => ( + ))} diff --git a/examples/realworld/ext/article/components/ArticleListPaginated.js b/examples/realworld/src/client/article/components/ArticleListPaginated.js similarity index 100% rename from examples/realworld/ext/article/components/ArticleListPaginated.js rename to examples/realworld/src/client/article/components/ArticleListPaginated.js diff --git a/examples/realworld/ext/article/components/ArticleViewPage.js b/examples/realworld/src/client/article/components/ArticleViewPage.js similarity index 98% rename from examples/realworld/ext/article/components/ArticleViewPage.js rename to examples/realworld/src/client/article/components/ArticleViewPage.js index 9b1134252b..459741258a 100644 --- a/examples/realworld/ext/article/components/ArticleViewPage.js +++ b/examples/realworld/src/client/article/components/ArticleViewPage.js @@ -112,7 +112,7 @@ const ArticleViewPage = (props) => {
Tags: - { article.tags.map(tag => ) } + { article.tags.map(tag => ) }
{ isMyArticle && ( diff --git a/examples/realworld/ext/auth/LoginPage.js b/examples/realworld/src/client/auth/LoginPage.js similarity index 100% rename from examples/realworld/ext/auth/LoginPage.js rename to examples/realworld/src/client/auth/LoginPage.js diff --git a/examples/realworld/ext/auth/SignupPage.js b/examples/realworld/src/client/auth/SignupPage.js similarity index 100% rename from examples/realworld/ext/auth/SignupPage.js rename to examples/realworld/src/client/auth/SignupPage.js diff --git a/examples/realworld/src/client/jsconfig.json b/examples/realworld/src/client/jsconfig.json new file mode 100644 index 0000000000..e9b5551fd7 --- /dev/null +++ b/examples/realworld/src/client/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/web-app/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/realworld/ext/smiley.jpg b/examples/realworld/src/client/smiley.jpg similarity index 100% rename from examples/realworld/ext/smiley.jpg rename to examples/realworld/src/client/smiley.jpg diff --git a/examples/realworld/ext/user/components/UserProfilePage.js b/examples/realworld/src/client/user/components/UserProfilePage.js similarity index 100% rename from examples/realworld/ext/user/components/UserProfilePage.js rename to examples/realworld/src/client/user/components/UserProfilePage.js diff --git a/examples/realworld/ext/user/components/UserSettingsPage.js b/examples/realworld/src/client/user/components/UserSettingsPage.js similarity index 100% rename from examples/realworld/ext/user/components/UserSettingsPage.js rename to examples/realworld/src/client/user/components/UserSettingsPage.js diff --git a/examples/realworld/ext/utils.js b/examples/realworld/src/client/utils.js similarity index 100% rename from examples/realworld/ext/utils.js rename to examples/realworld/src/client/utils.js diff --git a/examples/realworld/ext/waspLogo.png b/examples/realworld/src/client/waspLogo.png similarity index 100% rename from examples/realworld/ext/waspLogo.png rename to examples/realworld/src/client/waspLogo.png diff --git a/examples/realworld/ext/article/actions.js b/examples/realworld/src/server/article/actions.js similarity index 100% rename from examples/realworld/ext/article/actions.js rename to examples/realworld/src/server/article/actions.js diff --git a/examples/realworld/ext/article/queries.js b/examples/realworld/src/server/article/queries.js similarity index 100% rename from examples/realworld/ext/article/queries.js rename to examples/realworld/src/server/article/queries.js diff --git a/examples/realworld/src/server/jsconfig.json b/examples/realworld/src/server/jsconfig.json new file mode 100644 index 0000000000..9e996fc5df --- /dev/null +++ b/examples/realworld/src/server/jsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server/", + "paths": { + // Resolve all "@wasp" imports to the generated source code. + "@wasp/*": [ + "src/*" + ], + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, Try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} diff --git a/examples/realworld/ext/user/actions.js b/examples/realworld/src/server/user/actions.js similarity index 100% rename from examples/realworld/ext/user/actions.js rename to examples/realworld/src/server/user/actions.js diff --git a/examples/realworld/ext/user/queries.js b/examples/realworld/src/server/user/queries.js similarity index 100% rename from examples/realworld/ext/user/queries.js rename to examples/realworld/src/server/user/queries.js diff --git a/examples/realworld/src/shared/jsconfig.json b/examples/realworld/src/shared/jsconfig.json new file mode 100644 index 0000000000..0c4e7f7eb1 --- /dev/null +++ b/examples/realworld/src/shared/jsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + // The following settings enable IDE support in user-provided source files. + // Editing them might break features like import autocompletion and + // definition lookup. Don't change them unless you know what you're doing. + // + // The relative path to the generated web app's root directory. This must be + // set to define the "paths" option. + "baseUrl": "../../.wasp/out/server", + "paths": { + // Resolve all non-relative imports to the correct node module. Source: + // https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping + "*": [ + // Start by looking for the definiton inside the node modules root + // directory... + "node_modules/*", + // ... If that fails, try to find it inside definitely-typed type + // definitions. + "node_modules/@types/*" + ] + } + } +} From f384d140603eafc4d29546b917829209eae18fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 13:40:35 +0100 Subject: [PATCH 49/65] Fix directory tree watching on wasp start --- waspc/cli/src/Wasp/Cli/Command/Watch.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/Watch.hs b/waspc/cli/src/Wasp/Cli/Command/Watch.hs index ac92e22151..9dd10bb2c9 100644 --- a/waspc/cli/src/Wasp/Cli/Command/Watch.hs +++ b/waspc/cli/src/Wasp/Cli/Command/Watch.hs @@ -40,7 +40,7 @@ watch waspProjectDir outDir ongoingCompilationResultMVar = FSN.withManager $ \mg currentTime <- getCurrentTime chan <- newChan _ <- FSN.watchDirChan mgr (SP.fromAbsDir waspProjectDir) eventFilter chan - let watchProjectSubdirTree path = FSN.watchDirChan mgr (SP.fromAbsDir $ waspProjectDir path) eventFilter chan + let watchProjectSubdirTree path = FSN.watchTreeChan mgr (SP.fromAbsDir $ waspProjectDir path) eventFilter chan _ <- watchProjectSubdirTree Common.extClientCodeDirInWaspProjectDir _ <- watchProjectSubdirTree Common.extServerCodeDirInWaspProjectDir _ <- watchProjectSubdirTree Common.extSharedCodeDirInWaspProjectDir From d4a4c07b6946e102c082c5362fd5b401e6e4de9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 16:50:09 +0100 Subject: [PATCH 50/65] Implement review feedback --- waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs index e94393940f..d57c2637f1 100644 --- a/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs +++ b/waspc/cli/src/Wasp/Cli/Command/CreateNewProject.hs @@ -28,12 +28,13 @@ data ProjectInfo = ProjectInfo } createNewProject :: String -> Command () -createNewProject projectName = do - projectInfo <- parseProjectInfo projectName +createNewProject projectNameCandidate = do + projectInfo <- parseProjectInfo projectNameCandidate createWaspProjectDir projectInfo - liftIO printGettingStartedInstructions + liftIO $ printGettingStartedInstructions $ _projectName projectInfo where - printGettingStartedInstructions = do + printGettingStartedInstructions :: String -> IO () + printGettingStartedInstructions projectName = do putStrLn $ Term.applyStyles [Term.Green] ("Created new Wasp app in ./" ++ projectName ++ " directory!") putStrLn "To run it, do:" putStrLn "" From 399057c6979d483f01515ce2edefd7783cf6a5b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 19:33:17 +0100 Subject: [PATCH 51/65] Fix typo in docs Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- web/docs/tutorials/todo-app/creating-new-project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/docs/tutorials/todo-app/creating-new-project.md b/web/docs/tutorials/todo-app/creating-new-project.md index d729fabf57..1dee3dab00 100644 --- a/web/docs/tutorials/todo-app/creating-new-project.md +++ b/web/docs/tutorials/todo-app/creating-new-project.md @@ -50,7 +50,7 @@ Let's inspect the Wasp project we just created: │   └── .waspignore └── .wasproot ``` -By _extranal code_, we mean _"the code you write"_ (as opposed to the code generated by Wasp). Wasp expects you to separate all external code into three folders to make it clear which runtime executes what: +By _external code_, we mean _"the code you write"_ (as opposed to the code generated by Wasp). Wasp expects you to separate all external code into three folders to make it clear which runtime executes what: - `src/server` - Contains the code executed on the server (i.e., in Node) - `src/client` - Contains the code executed on the client (i.e., JS in the browser) - `src/shared` - Contains the code you want to use on both the client and the server (e.g., utility functions) From 96b6b1e56cf7ace3c1dc278875f57d5a68cece65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 19:34:00 +0100 Subject: [PATCH 52/65] Fix typo in docs Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- web/docs/language/syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/docs/language/syntax.md b/web/docs/language/syntax.md index dfd3353b01..a42ae724b8 100644 --- a/web/docs/language/syntax.md +++ b/web/docs/language/syntax.md @@ -50,7 +50,7 @@ While fundamental types are here to be basic building blocks of a language, and - **number** (`12`, `14.5`) - **declaration reference** (name of existing declaration: `TaskPage`, `updateTask`) - **ServerImport** (external server import) (`import Foo from "@server/bar.js"`, `import { Smth } from "@server/a/b.js"`) - - The path start with "@server". The rest is relative to the `src/server` directory. + - The path has to start with "@server". The rest is relative to the `src/server` directory. - import has to be a default import `import Foo` or a single named import `import { Foo }`. - **ClientImport** (external client import) (`import Foo from "@client/bar.js"`, `import { Smth } from "@client/a/b.js"`) - The path has to start with "@client". The rest is relative to the `src/client` directory. From 87c7c71d2040ae14d73d7bc1afa5351dce04eef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 19:34:48 +0100 Subject: [PATCH 53/65] Fix another typo in docs Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- web/docs/tutorials/todo-app/listing-tasks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/docs/tutorials/todo-app/listing-tasks.md b/web/docs/tutorials/todo-app/listing-tasks.md index 8c76cc7f85..4aa7ed9e87 100644 --- a/web/docs/tutorials/todo-app/listing-tasks.md +++ b/web/docs/tutorials/todo-app/listing-tasks.md @@ -59,7 +59,7 @@ Queries and actions are NodeJS functions that are executed on the server. Theref ## Invoking the query from React -We've just said that the queries we write are executed on the server, but Wasp will generate client-side querie functions (taking care of the network and cache invalidation in the background). Let's finally use the query we've just created, `getTasks`, in our React component to list the tasks: +We've just said that the queries we write are executed on the server, but Wasp will generate client-side query functions (taking care of the network and cache invalidation in the background). Let's finally use the query we've just created, `getTasks`, in our React component to list the tasks: ```jsx {3-4,7-16,19-32} title="src/client/MainPage.js" import React from 'react' From 8e8887790891431c485e301de14984799a6d68f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 19:35:09 +0100 Subject: [PATCH 54/65] Add src prefix to file path in docs Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- web/docs/language/features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/docs/language/features.md b/web/docs/language/features.md index 8c9c2c530a..709867ef68 100644 --- a/web/docs/language/features.md +++ b/web/docs/language/features.md @@ -992,7 +992,7 @@ import useAuth from '@wasp/auth/useAuth.js' ``` ##### Example of usage: -```js title="client/pages/MainPage.js" +```js title="src/client/pages/MainPage.js" import React from 'react' import { Link } from 'react-router-dom' From 4f68e6974a311a864bbb83c2368cdbbe2c54d37d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Wed, 9 Nov 2022 23:06:15 +0100 Subject: [PATCH 55/65] Remove env server file --- examples/thoughts/.env.server | 1 - 1 file changed, 1 deletion(-) delete mode 100644 examples/thoughts/.env.server diff --git a/examples/thoughts/.env.server b/examples/thoughts/.env.server deleted file mode 100644 index 2f99aba2ae..0000000000 --- a/examples/thoughts/.env.server +++ /dev/null @@ -1 +0,0 @@ -DATABASE_URL=postgresql://postgres:devpass1234@localhost:5432/thoughts-dev From 06f0b358c7de77bbce45bfebdd174887859373b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Thu, 10 Nov 2022 01:32:01 +0100 Subject: [PATCH 56/65] Apply suggestions from code review Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- web/docs/language/features.md | 6 +++--- web/docs/tutorials/todo-app/auth.md | 4 ++-- web/docs/tutorials/todo-app/creating-new-project.md | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/docs/language/features.md b/web/docs/language/features.md index 709867ef68..743601e438 100644 --- a/web/docs/language/features.md +++ b/web/docs/language/features.md @@ -22,7 +22,7 @@ app todoApp { ### Fields #### `wasp: dict` (required) -Wasp compiler configuration. It is a dictionary a single field: +Wasp compiler configuration. It is a dictionary with a single field: - `version: string` (required) - version declares the compatible Wasp versions for the app. It should contain a valid [SemVer range](https://github.com/npm/node-semver#ranges). :::info @@ -372,12 +372,12 @@ To use an Entity in your Query, add it to the query declaration in Wasp: ```c {4,9} title="main.wasp" query fetchAllTasks { - fn: import { getAllTasks } from "@src/server/queries.js", + fn: import { getAllTasks } from "@server/queries.js", entities: [Task] } query fetchFilteredTasks { - fn: import { getFilteredTasks } from "@src/server/queries.js", + fn: import { getFilteredTasks } from "@server/queries.js", entities: [Task] } ``` diff --git a/web/docs/tutorials/todo-app/auth.md b/web/docs/tutorials/todo-app/auth.md index 60b2916b95..a8e45bc106 100644 --- a/web/docs/tutorials/todo-app/auth.md +++ b/web/docs/tutorials/todo-app/auth.md @@ -222,7 +222,7 @@ However, for this tutorial, for the sake of simplicity, we will stick with this. ## Updating operations to forbid access to non-authenticated users Next, let's update the queries and actions to forbid access to non-authenticated users and to operate only on the currently logged in user's tasks: -```js {1,4,6} title="@server/queries.js" +```js {1,4,6} title="src/server/queries.js" import HttpError from '@wasp/core/HttpError.js' export const getTasks = async (args, context) => { @@ -233,7 +233,7 @@ export const getTasks = async (args, context) => { } ``` -```js {1,4,8,14,15,16} title="@server/actions.js" +```js {1,4,8,14,15,16} title="src/server/actions.js" import HttpError from '@wasp/core/HttpError.js' export const createTask = async ({ description }, context) => { diff --git a/web/docs/tutorials/todo-app/creating-new-project.md b/web/docs/tutorials/todo-app/creating-new-project.md index 1dee3dab00..89ba6cef90 100644 --- a/web/docs/tutorials/todo-app/creating-new-project.md +++ b/web/docs/tutorials/todo-app/creating-new-project.md @@ -92,7 +92,7 @@ export default MainPage As we can see, this is simply a functional React component which uses the CSS and Wasp logo files sitting next to it in the `src/client` dir. This is all the code we need! -Wasp quitely takes care of everything else needed to define, build, and run a web app. +Wasp quietly takes care of everything else needed to define, build, and run a web app. :::tip `wasp start` automatically picks up the changes you make and restarts the app, so keep it running. @@ -101,7 +101,7 @@ Wasp quitely takes care of everything else needed to define, build, and run a we ## Cleaning up Let's make our first changes! -To prepare the clean slate for building the TodoApp, the files `Main.css` and `waspLogo.png` from the `src/client/` folder (`src/shared` and `src/server` are already clean). The `jsconfig.json` files are necessary for IDE support, so it's important to keep it. Now that `src/client` contains only `jsconfig.json` and `MainPage.js` let's start by making the `MainPage` component much simpler: +To prepare the clean slate for building the TodoApp, the files `Main.css` and `waspLogo.png` from the `src/client/` folder (`src/shared` and `src/server` are already clean). The `jsconfig.json` files are necessary for IDE support, so it's important to keep them. Now that `src/client` contains only `jsconfig.json` and `MainPage.js` let's start by making the `MainPage` component much simpler: ```jsx title="src/client/MainPage.js" import React from 'react' From fe754131d31aad9745c1ed0c153cb69cc48e647d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Thu, 10 Nov 2022 01:37:47 +0100 Subject: [PATCH 57/65] Address code review comments --- web/docs/language/features.md | 4 ++-- .../tutorials/todo-app/creating-new-project.md | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/docs/language/features.md b/web/docs/language/features.md index 743601e438..a9ad090749 100644 --- a/web/docs/language/features.md +++ b/web/docs/language/features.md @@ -147,7 +147,7 @@ page HomePage { } ``` -```jsx title="client/pages/OtherPage.js" +```jsx title="src/client/pages/OtherPage.js" import React from 'react' import { Link } from "react-router-dom" @@ -450,7 +450,7 @@ action updateTaskIsDone { ``` And here is how you might use it: -```js {4,18} title=client/pages/Task.js +```js {4,18} title=src/client/pages/Task.js import React from 'react' import { useQuery } from '@wasp/queries' import fetchTask from '@wasp/queries/fetchTask' diff --git a/web/docs/tutorials/todo-app/creating-new-project.md b/web/docs/tutorials/todo-app/creating-new-project.md index 89ba6cef90..595b02ca07 100644 --- a/web/docs/tutorials/todo-app/creating-new-project.md +++ b/web/docs/tutorials/todo-app/creating-new-project.md @@ -36,16 +36,16 @@ Let's inspect the Wasp project we just created: ```bash . ├── .gitignore -├── main.wasp # Our wasp code goes here. +├── main.wasp # Your wasp code goes here. ├── src -│   ├── client # Our external client code (JS/CSS/HTML) goes here. +│   ├── client # Your client code (JS/CSS/HTML) goes here. │   │   ├── jsconfig.json │   │   ├── Main.css │   │   ├── MainPage.js │   │   └── waspLogo.png -│   ├── server # Our external server code (Node JS) goes here. +│   ├── server # Your server code (Node JS) goes here. │   │   └── jsconfig.json -│   ├── shared # Our external shared code goes here. +│   ├── shared # Your shared code goes here. │   │   └── jsconfig.json │   └── .waspignore └── .wasproot @@ -72,8 +72,8 @@ route RootRoute { path: "/", to: MainPage } // Render page MainPage on url `/` ( page MainPage { // We specify that ReactJS implementation of our page can be found in - // `@client/MainPage.js` as a default export (uses standard js import syntax). - // You can use @client to reference files inside the src/client folder. + // `src/client/MainPage.js` as a default export (uses standard js import syntax). + // Use '@client' to reference files inside the src/client folder. component: import Main from "@client/MainPage.js" } ``` @@ -101,7 +101,7 @@ Wasp quietly takes care of everything else needed to define, build, and run a we ## Cleaning up Let's make our first changes! -To prepare the clean slate for building the TodoApp, the files `Main.css` and `waspLogo.png` from the `src/client/` folder (`src/shared` and `src/server` are already clean). The `jsconfig.json` files are necessary for IDE support, so it's important to keep them. Now that `src/client` contains only `jsconfig.json` and `MainPage.js` let's start by making the `MainPage` component much simpler: +To prepare the clean slate for building the TodoApp, delete the files `Main.css` and `waspLogo.png` from the `src/client/` folder (`src/shared` and `src/server` are already clean). The `jsconfig.json` files are necessary for IDE support, so it's important to keep them. Now that `src/client` contains only `jsconfig.json` and `MainPage.js` let's start by making the `MainPage` component much simpler: ```jsx title="src/client/MainPage.js" import React from 'react' From a89df7948ad377076043ff9a76d07d8eb813f561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Thu, 10 Nov 2022 11:48:13 +0100 Subject: [PATCH 58/65] Fix incorrect path in docs --- web/docs/tutorials/todo-app/listing-tasks.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/docs/tutorials/todo-app/listing-tasks.md b/web/docs/tutorials/todo-app/listing-tasks.md index 4aa7ed9e87..f993021300 100644 --- a/web/docs/tutorials/todo-app/listing-tasks.md +++ b/web/docs/tutorials/todo-app/listing-tasks.md @@ -29,7 +29,8 @@ Add the following code to `main.wasp`: query getTasks { // We specify that JS implementation of the query (which is an async JS function) - // can be found in `@server/queries.js` as the named export `getTasks`. + // can be found in `src/server/queries.js` as the named export `getTasks`. + // Use '@server' to reference files inside the src/server folder. fn: import { getTasks } from "@server/queries.js", // We tell Wasp that this query is doing something with entity `Task`. With that, Wasp will // automatically refresh the results of this query when tasks change. From 55022852520cd5b8087043b6189f5276d85658c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Thu, 10 Nov 2022 11:56:05 +0100 Subject: [PATCH 59/65] Fix references to ext in docs --- web/docs/language/features.md | 2 +- web/src/pages/index.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/docs/language/features.md b/web/docs/language/features.md index a9ad090749..ed323d4bd7 100644 --- a/web/docs/language/features.md +++ b/web/docs/language/features.md @@ -1236,7 +1236,7 @@ function. Wasp exposes a `configureQueryClient` hook that lets you configure _react-query_'s `QueryClient` object: -```js title="ext/myClientSetupCode.js" +```js title="src/client/myClientSetupCode.js" import { configureQueryClient } from '@wasp/queries' export default async function mySetupFunction() { diff --git a/web/src/pages/index.js b/web/src/pages/index.js index 7d6775cf04..dfc8a9ce3b 100644 --- a/web/src/pages/index.js +++ b/web/src/pages/index.js @@ -136,7 +136,7 @@ function HeroCodeExample() { route RootRoute { path: "/", to: MainPage } page MainPage { /* import your React code */ - component: import Main from "@ext/Main.js" + component: import Main from "@client/Main.js" } ` return ( @@ -168,7 +168,7 @@ app todoApp { /* routing */ route RootRoute { path: "/", to: MainPage } page MainPage { - component: import Main from "@ext/Main" /* import your React code */ + component: import Main from "@client/Main" /* import your React code */ } ` @@ -184,7 +184,7 @@ export default () => Hello World! { createAppMainComponentCode } @@ -221,7 +221,7 @@ psl=} page MainPage { authRequired: true, /* available only to logged in users */ - component: import Main from "@ext/Main" + component: import Main from "@client/Main" } ` @@ -240,7 +240,7 @@ export default ({ user }) => { { exampleCode } - + { mainUsingAuthCode } @@ -262,7 +262,7 @@ entity Task {=psl psl=} query getTasks { - fn: import { getTasks } from "@ext/queries.js", /* import Node.js function */ + fn: import { getTasks } from "@server/queries.js", /* import Node.js function */ /* A list of entities this query uses - useful for automatic invalidation and refetching */ entities: [Task] } @@ -291,12 +291,12 @@ export default () => { { defineEntityWaspCode } { getTasksQueryCode } - + { todoUsingGetTasksCode } From 676fc856ee67d57d22dfb67209f7eef71a808321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 11 Nov 2022 12:18:32 +0100 Subject: [PATCH 60/65] Edit changelog and add migration guide --- waspc/ChangeLog.md | 104 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/waspc/ChangeLog.md b/waspc/ChangeLog.md index a69286b04b..aa546bfe6b 100644 --- a/waspc/ChangeLog.md +++ b/waspc/ChangeLog.md @@ -7,6 +7,110 @@ - Removes default `index.css` file that provided basic `body` defaults. Now, there is no default CSS applied. - Updates required Node LTS version from version 16 to version 18. This Node ecosystem change happened on 2022-10-25: https://github.com/nodejs/Release +#### Significant changes to Wasp project structure +This was the file tree of a newly generated in the previous version of Wasp +(i.e., this was what you used to get by running `wasp new project`): +``` +. +├── ext +│   ├── Main.css +│   ├── MainPage.js +│   ├── .waspignore +│   └── waspLogo.png +├── .gitignore +├── main.wasp +└── .wasproot +``` +This is the file tree of a newly generated project in the newest release of Wasp (i.e., this is what you will +get by running `wasp new project` from this point onwards): +``` +. +├── .gitignore +├── main.wasp +├── src +│   ├── client +│   │   ├── jsconfig.json +│   │   ├── Main.css +│   │   ├── MainPage.js +│   │   └── waspLogo.png +│   ├── server +│   │   └── jsconfig.json +│   ├── shared +│   │   └── jsconfig.json +│   └── .waspignore +└── .wasproot +``` +Main differences: +- All server-side code must be located inside the `src/server` directory. Wasp +declarations must import this code with `import foo from "@server/foo.js"` +(instead of `import foo from "@ext/foo.js"`) +- All client-side code must be located inside the `src/client` directory. Wasp +declarations must import this code with `import foo from "@client/bar.js"` +(instead of `import bar from "@ext/bar.js"`) +- All shared code (i.e., used on both the client and the server) must be +located inside the `src/shared` and imported where needed through a relative import. +- Each of these subdirectories (i.e., `src/server`, `src/client`, and +`src/shared`) comes with a pregenerated `jsconfig.json` file. This file helps +with IDE support (e.g., jumping to definitions, previewing types, etc.) and you +shouldn't delete it. + +The new structure is fully reflected in [our docs](https://wasp-lang.dev/docs/language/overview), but we'll also +provide a quick guide for migrating existing projects. + +##### Migrating an existing Wasp project to the new structure + +You can easily migrate your old Wasp project to the new structure by following a +series of steps. Assuming you have a project called `foo` inside the +directory `foo`, you should: + 1. Install the latest version of Wasp + 2. Rename your project's root directory to something like `foo_old` + 3. Create a new project by running `wasp new foo` + 4. Copy all server-side code from `foo_old/ext` to `foo/src/server` + 5. Copy all client-side code from `foo_old/ext` to `foo/src/client` + 6. Copy all shared code (if any) from `foo_old/ext` to `foo/src/shared` and + adapt imports in files that reference it: + - For example, `import bar from './bar.js'` becomes `import bar from "../shared/bar.js"` + 7. Copy all lines you might have added to `foo_old/.gitignore` into + `foo/.gitignore` + 8. Finally, copy `foo_old/main.wasp` to `foo/main.wasp` and correct external + imports: + - Queries, Actions, Jobs, and the Server setup function must import their code from `@server` + - Pages and the Client setup function must import their code from `@client` + + For example, if you previously had something like: + ```js + page LoginPage { + // This previously resolved to ext/LoginPage.js + component: import Login from "@ext/LoginPage.js" + } + + // ... + + query getTasks { + // This previously resolved to ext/queries.js + fn: import { getTasks } from "@ext/queries.js", + } + ``` + + You should change it to: + + ```js + page LoginPage { + // This resolves to src/client/LoginPage.js + component: import Login from "@client/LoginPage.js" + } + + // ... + + query getTasks { + // This resolves to src/server/queries.js + fn: import { getTasks } from "@server/queries.js", + } + ``` + Do this for all external imports in your `.wasp` file. After you're done, there shouldn't be any occurences of the string `"@ext"`. + +That's it! You should now have a fully working Wasp project in the `foo` directory. + ### [NEW FEATURE] Dockerfile customization You can now customize the default Wasp Dockerfile by either extending/replacing our build stages or using your own custom logic. To make use of this feature, simply add a Dockerfile to the root of your project and it will be appended to the bottom of the existing Wasp Dockerfile. From ccf96ffd53c02f0cec84aa25eaf8c722ee24d97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 11 Nov 2022 14:14:00 +0100 Subject: [PATCH 61/65] Further update docs to new structure --- web/docs/cli.md | 2 +- web/docs/language/features.md | 2 +- web/docs/tutorials/todo-app/creating-new-project.md | 2 +- web/src/pages/index.js | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/docs/cli.md b/web/docs/cli.md index 01d48e9838..df51f92ede 100644 --- a/web/docs/cli.md +++ b/web/docs/cli.md @@ -56,7 +56,7 @@ Discord (chat): https://discord.gg/rzdnErX To setup Bash completion, execute `wasp completion` and follow the instructions. ### In project - - `wasp start` runs Wasp app in development mode. It opens a browser tab with your application running, and watches for any changes to .wasp or files in ext/ to automatically reflect in the browser. It also shows messages from web app, server and database on stdout/stderr. + - `wasp start` runs Wasp app in development mode. It opens a browser tab with your application running, and watches for any changes to .wasp or files in `src/` to automatically reflect in the browser. It also shows messages from the web app, the server and the database on stdout/stderr. - `wasp clean` deletes all generated code and other cached artifacts. If using SQlite, it also deletes the SQlite database. It is the Wasp equivalent to "try shutting it down and turning back on". diff --git a/web/docs/language/features.md b/web/docs/language/features.md index ed323d4bd7..055ab287da 100644 --- a/web/docs/language/features.md +++ b/web/docs/language/features.md @@ -631,7 +631,7 @@ job mySpecialJob { } ``` -Then, in your [Operations](/docs/language/features#queries-and-actions-aka-operations) or [setupFn](/docs/language/features#setupfn-extimport-optional) (or any other NodeJS code), you can submit work to be done: +Then, in your [Operations](/docs/language/features#queries-and-actions-aka-operations) or [setupFn](/docs/language/features#setupfn-serverimport-optional) (or any other NodeJS code), you can submit work to be done: ```js import { mySpecialJob } from '@wasp/jobs/mySpecialJob.js' diff --git a/web/docs/tutorials/todo-app/creating-new-project.md b/web/docs/tutorials/todo-app/creating-new-project.md index 595b02ca07..e6b3da4bdb 100644 --- a/web/docs/tutorials/todo-app/creating-new-project.md +++ b/web/docs/tutorials/todo-app/creating-new-project.md @@ -50,7 +50,7 @@ Let's inspect the Wasp project we just created: │   └── .waspignore └── .wasproot ``` -By _external code_, we mean _"the code you write"_ (as opposed to the code generated by Wasp). Wasp expects you to separate all external code into three folders to make it clear which runtime executes what: +By _your code_, we mean _"the code you write"_ (as opposed to the code generated by Wasp). Wasp expects you to separate all external code into three folders to make it clear which runtime executes what: - `src/server` - Contains the code executed on the server (i.e., in Node) - `src/client` - Contains the code executed on the client (i.e., JS in the browser) - `src/shared` - Contains the code you want to use on both the client and the server (e.g., utility functions) diff --git a/web/src/pages/index.js b/web/src/pages/index.js index dfc8a9ce3b..cbab86a345 100644 --- a/web/src/pages/index.js +++ b/web/src/pages/index.js @@ -1,7 +1,6 @@ import React, { useState, useEffect } from 'react'; import clsx from 'clsx'; import Layout from '@theme/Layout'; -import CodeBlock from '@theme/CodeBlock'; import CodeBlockWithTitle from '../components/CodeBlockWithTitle' import EmailSignupForm from '../components/EmailSignupForm/index.js' import Link from '@docusaurus/Link'; From a2e847e0f54db594e7fdb60a33851b17e099d40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 11 Nov 2022 14:15:47 +0100 Subject: [PATCH 62/65] Update blogs about example apps to new structure --- web/blog/2021-12-02-waspello.md | 10 +-- web/blog/2022-01-27-waspleau.md | 18 ++--- .../2022-06-15-jobs-feature-announcement.md | 66 +++++++++++++++++-- .../2022-09-05-dev-excuses-app-tutrial.md | 18 ++--- 4 files changed, 85 insertions(+), 27 deletions(-) diff --git a/web/blog/2021-12-02-waspello.md b/web/blog/2021-12-02-waspello.md index 7a732e99f3..b7d8d87a72 100644 --- a/web/blog/2021-12-02-waspello.md +++ b/web/blog/2021-12-02-waspello.md @@ -102,7 +102,7 @@ The first step is to declare to Wasp there will be a query, point to the actual ```js title="main.wasp | Declaration of a query in Wasp" query getListsAndCards { // Points to the function which contains query logic. - fn: import { getListsAndCards } from "@ext/queries.js", + fn: import { getListsAndCards } from "@server/queries.js", // This query depends on List and Card entities. // If any of them changes this query will get re-fetched (cache invalidation). @@ -113,7 +113,7 @@ query getListsAndCards { The main point of this declaration is for Wasp to be aware of the query and thus be able to **do a lot of heavy lifting for us - e.g. it will make the query available to the client without any extra code**, all that developer needs to do is import it in their React component. **Another big thing is cache invalidation / automatic re-fetching of the query once the data changes** (this is why it is important to declare which entities it depends on). The remaining step is to write the function with the query logic: -```js title="ext/queries.js | Query logic, using Prisma SDK via Node.js" +```js title="src/server/queries.js | Query logic, using Prisma SDK via Node.js" export const getListsAndCards = async (args, context) => { // Only authenticated users can execute this query. if (!context.user) { throw new HttpError(403) } @@ -135,15 +135,15 @@ To display all the nice data we have, we'll use React components. There are no l route MainRoute { path: "/", to: Main } page Main { authRequired: true, - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } ``` All pretty straightforward so far! As you can see here, Wasp also provides [authentication out-of-the-box](/docs/language/features#authentication--authorization). -Currently, the majority of the client logic of Waspello is contained in `ext/MainPage.js` (we should break it down a little 😅 - [you can help us!](https://github.com/wasp-lang/wasp/issues/334)). Just to give you an idea, here's a quick glimpse into it: +Currently, the majority of the client logic of Waspello is contained in `src/client/MainPage.js` (we should break it down a little 😅 - [you can help us!](https://github.com/wasp-lang/wasp/issues/334)). Just to give you an idea, here's a quick glimpse into it: -```js title="ext/MainPage.js | Using React component in Wasp" +```js title="src/client/MainPage.js | Using React component in Wasp" // "Special" imports provided by Wasp. import { useQuery } from '@wasp/queries' import getListsAndCards from '@wasp/queries/getListsAndCards' diff --git a/web/blog/2022-01-27-waspleau.md b/web/blog/2022-01-27-waspleau.md index 2ff0720f3c..39c6260bc9 100644 --- a/web/blog/2022-01-27-waspleau.md +++ b/web/blog/2022-01-27-waspleau.md @@ -60,12 +60,12 @@ app waspleau { ... server: { - setupFn: import serverSetup from "@ext/serverSetup.js" + setupFn: import serverSetup from "@server/serverSetup.js" } } ``` -```js title="serverSetup.js" +```js title="src/server/serverSetup.js" import Queue from 'bull' const queue = new Queue('waspleau', process.env.REDIS_URL || 'redis://127.0.0.1:6379', @@ -85,7 +85,7 @@ export default async () => { Awesome, we can now enqueue and process background jobs, but how can we make it easy to create many different kinds of jobs and schedule them to run at different intervals? For Waspleau, we created our own type of worker object convention to help standardize and simplify adding more: -```js title="workers/template.js" +```js title="src/server/workers/template.js" const workerFunction = async (opts) => { return [ { name: 'Metric 1 name', value: 'foo', updatedAt: ... }, @@ -98,7 +98,7 @@ export const workerTemplate = { name: 'Job Name', fn: workerFunction, schedule: With this `workerFunction` setup, we can return one or more metrics per worker type. Waspleau can easily use any module that exports this shape. Here is a real example from the demo that makes HTTP calls to GitHub’s API with Axios: -```js title="workers/github.js" +```js title="src/server/workers/github.js" import axios from 'axios' const workerFunction = async (opts) => { @@ -124,7 +124,7 @@ const workerFunction = async (opts) => { export const githubWorker = { name: 'GitHub API', fn: workerFunction, schedule: '*/10 * * * *' } ``` -_Note: Please see the [actual serverSetup.js file](https://github.com/wasp-lang/wasp/blob/main/examples/waspleau/ext/serverSetup.js) for how we use this abstraction in practice._ +_Note: Please see the [actual serverSetup.js file](https://github.com/wasp-lang/wasp/blob/main/examples/waspleau/src/server/serverSetup.js) for how we use this abstraction in practice._ ### Server → client @@ -134,11 +134,11 @@ We now have jobs running and data updating at regular intervals, nice, but we st ... query dashboard { - fn: import { refreshDashboardData } from "@ext/dashboard.js" + fn: import { refreshDashboardData } from "@server/dashboard.js" } ``` -```js title="dashboard.js" +```js title="src/server/dashboard.js" import { getDashboardData } from './serverSetup.js' export const refreshDashboardData = async (_args, _context) => { @@ -146,7 +146,7 @@ export const refreshDashboardData = async (_args, _context) => { } ``` -```js title="serverSetup.js" +```js title="src/server/serverSetup.js" ... const dashboardData = {} // This is updated in the queue process callback @@ -155,7 +155,7 @@ export const getDashboardData = () => Object.values(dashboardData).flat() From there, we can request it on the frontend in React components as usual and also set a one-minute client-side refetch interval just for good measure: -```js title="MainPage.js" +```js title="src/client/MainPage.js" ... const { data: dashboardData, isFetching, error } = useQuery(refreshDashboardData, null, { refetchInterval: 60 * 1000 }) diff --git a/web/blog/2022-06-15-jobs-feature-announcement.md b/web/blog/2022-06-15-jobs-feature-announcement.md index c547065fa4..464739c702 100644 --- a/web/blog/2022-06-15-jobs-feature-announcement.md +++ b/web/blog/2022-06-15-jobs-feature-announcement.md @@ -45,7 +45,25 @@ You wouldn’t want the server to delay sending its HTTP response until those ar The typical solution here is to use a job queue of some kind. They are not impossible to set up, of course, but there is a fair amount of boilerplate involved, some operational expertise/overhead required, and moving from one system to another when you outgrow it is usually a challenge. These are the exact areas where we feel Wasp can provide real value, so we are happy to introduce Wasp Jobs to help out with this! - +```js title=src/server/workers/github.js +import axios from 'axios' +import { upsertMetric } from './utils.js' + +export async function workerFunction() { + const response = await axios.get('https://api.github.com/repos/wasp-lang/wasp') + + const metrics = [ + { name: 'Wasp GitHub Stars', value: response.data.stargazers_count }, + { name: 'Wasp GitHub Language', value: response.data.language }, + { name: 'Wasp GitHub Forks', value: response.data.forks }, + { name: 'Wasp GitHub Open Issues', value: response.data.open_issues }, + ] + + await Promise.all(metrics.map(upsertMetric)) + + return metrics +} +``` Wasp allows you to write a regular async JavaScript function (like the one above that gathers GitHub metrics and stores them in the DB) and have it run within the context of a job queue system, which we call an executor. You can manually submit work to be done on the server, or specify a cron schedule to have your job automatically invoked. And, best of all, as we add more job executors in the future, you can change where it runs on a single line in your .wasp file. @@ -72,11 +90,51 @@ However, we will also continue to expand the number of job execution runtimes we If you are a regular reader of this blog (thank you, you deserve a raise! 😊), you may recall we created an example app of a metrics dashboard called [Waspleau](https://wasp-lang.dev/blog/2022/01/27/waspleau) that used workers in the background to make periodic HTTP calls for data. In that example, we didn’t yet have access to recurring jobs in Wasp, so we used Bull for scheduled jobs instead. To set up our queue-related logic we had to have this huge `setupFn` wiring it all up; but now, we can remove all that code and simply use jobs instead! Here is what the new DSL looks like: - +```js title=main.wasp +// A cron job for fetching GitHub stats +job getGithubStats { + executor: PgBoss, + perform: { + fn: import { workerFunction } from "@server/workers/github.js" + }, + schedule: { + cron: "*/10 * * * *" + } +} + +// A cron job to measure how long a webpage takes to load +job calcPageLoadTime { + executor: PgBoss, + perform: { + fn: import { workerFunction } from "@server/workers/loadTime.js" + }, + schedule: { + cron: "*/5 * * * *", + args: {=json { + "url": "https://wasp-lang.dev", + "name": "wasp-lang.dev Load Time" + } json=} + } +} +``` And here is an example of how you can reference and invoke jobs on the server. *Note: We did not even need to do this step since jobs with a schedule are automatically configured to run at the desired time.* - - +```js title=src/server/serverSetup.js +/** +* These Jobs are automatically scheduled by Wasp. +* However, let's kick them off on server setup to ensure we have data right away. +*/ +import { github } from '@wasp/jobs/getGithubStats.js' +import { loadTime } from '@wasp/jobs/calcPageLoadTime.js' + +export default async function () { + await github.submit() + await loadTime.submit({ + url: "https://wasp-lang.dev", + name: "wasp-lang.dev Load Time" + }) +} +``` And voila, it is really that simple. Wasp takes care of setting up pg-boss and hooking up all your job callbacks, leaving you to focus on what matters- your own code. Here is a visual of what is happening behind the scenes: diff --git a/web/blog/2022-09-05-dev-excuses-app-tutrial.md b/web/blog/2022-09-05-dev-excuses-app-tutrial.md index 4ae364b6a4..9161e7b363 100644 --- a/web/blog/2022-09-05-dev-excuses-app-tutrial.md +++ b/web/blog/2022-09-05-dev-excuses-app-tutrial.md @@ -102,9 +102,9 @@ app ItWaspsOnMyMachine { // Render page MainPage on url `/` (default url). route RootRoute { path: "/", to: MainPage } -// ReactJS implementation of our page located in `ext/MainPage.js` as a default export +// ReactJS implementation of our page located in `src/client/MainPage.js` as a default export. page MainPage { - component: import Main from "@ext/MainPage.js" + component: import Main from "@client/MainPage.js" } // Prisma database entity @@ -115,19 +115,19 @@ psl=} // Query declaration to get a new excuse query getExcuse { - fn: import { getExcuse } from "@ext/queries.js", + fn: import { getExcuse } from "@server/queries.js", entities: [Excuse] } // Query declaration to get all excuses query getAllSavedExcuses { - fn: import { getAllSavedExcuses } from "@ext/queries.js", + fn: import { getAllSavedExcuses } from "@server/queries.js", entities: [Excuse] } // Action to save current excuse action saveExcuse { - fn: import { saveExcuse } from "@ext/actions.js", + fn: import { saveExcuse } from "@server/actions.js", entities: [Excuse] } ``` @@ -139,9 +139,9 @@ Also, we’ve declared a database entity called `Excuse`, queries, and action. T `Queries` are here when we need to fetch/read something, while `actions` are here when we need to change/update data. Both query and action declaration consists of two lines – a reference to the file that contains implementation and a data model to operate on. You can find more info [in the docs](https://wasp-lang.dev/docs/tutorials/todo-app/listing-tasks#introducing-operations-queries-and-actions). So let’s proceed with queries/actions. -**2) Create two files: “actions.js” and “queries.js” in the `ext` folder.** +**2) Create two files: “actions.js” and “queries.js” in the `src/server` folder.** -```js title=".../ext/actions.js | Defining an action" +```js title="src/server/actions.js | Defining an action" export const saveExcuse = async (excuse, context) => { return context.entities.Excuse.create({ data: { text: excuse.text } @@ -149,7 +149,7 @@ export const saveExcuse = async (excuse, context) => { } ``` -```js title=".../ext/queries.js | Defining queries" +```js title="src/server/queries.js | Defining queries" import axios from 'axios'; export const getExcuse = async () => { @@ -175,7 +175,7 @@ That’s it! We finished our back-end. 🎉 Now, let’s use those queries/actio **3) Let’s erase everything we had in the `MainPage.js` file and substitute it with our new UI.** -```js title=".../ext/MainPage.js | Updating the UI" +```js title="src/client/MainPage.js | Updating the UI" import React, { useState } from 'react' import { useQuery } from '@wasp/queries' import getExcuse from '@wasp/queries/getExcuse' From 995d6ea3da34ec2a5eb890da960189b70b0d7314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 11 Nov 2022 16:29:19 +0100 Subject: [PATCH 63/65] Fix typo in docs Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- waspc/ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waspc/ChangeLog.md b/waspc/ChangeLog.md index aa546bfe6b..e1804c0c61 100644 --- a/waspc/ChangeLog.md +++ b/waspc/ChangeLog.md @@ -8,7 +8,7 @@ - Updates required Node LTS version from version 16 to version 18. This Node ecosystem change happened on 2022-10-25: https://github.com/nodejs/Release #### Significant changes to Wasp project structure -This was the file tree of a newly generated in the previous version of Wasp +This was the file tree of a newly generated project in the previous version of Wasp (i.e., this was what you used to get by running `wasp new project`): ``` . From 145fb46cd5547416d2a89edefad4734433a89dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 11 Nov 2022 16:31:02 +0100 Subject: [PATCH 64/65] Update typo on frontpage Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- web/src/pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/pages/index.js b/web/src/pages/index.js index cbab86a345..1711ae0060 100644 --- a/web/src/pages/index.js +++ b/web/src/pages/index.js @@ -295,7 +295,7 @@ export default () => { > { getTasksQueryCode } - + { todoUsingGetTasksCode } From 39411d5c914b63511b052ba1d89910da5e32eb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 11 Nov 2022 16:31:18 +0100 Subject: [PATCH 65/65] Add missing src in docs Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com> --- web/docs/language/features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/docs/language/features.md b/web/docs/language/features.md index 055ab287da..faadc4384b 100644 --- a/web/docs/language/features.md +++ b/web/docs/language/features.md @@ -492,7 +492,7 @@ The `useAction` hook accepts two arguments: **NOTE:** The `updateQuery` function must be a pure function. It must return the desired cache value identified by the `getQuerySpecifier` function and _must not_ perform any side effects. Also, make sure you only update the query caches affected by your action causing the optimistic update (Wasp cannot yet verify this). Finally, your implementation of the `updateQuery` function should work correctly regardless of the state of `oldData` (e.g., don't rely on array positioning). If you need to do something else during your optimistic update, you can directly use _react-query_'s lower-level API (read more about it [here](#advanced-usage)). Here's an example showing how to configure the Action from the previous example to perform an optimistic update: -```jsx {3,9,10,11,12,13,14,15,16,27} title=client/pages/Task.js +```jsx {3,9,10,11,12,13,14,15,16,27} title=src/client/pages/Task.js import React from 'react' import { useQuery } from '@wasp/queries' import { useAction } from '@wasp/actions'