From f84b832e61e6e349f67ea52cbe6c906d888acb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 10 Dec 2024 13:57:13 +0100 Subject: [PATCH 1/4] Add elaborating comment to analyze --- waspc/src/Wasp/Project/WaspFile.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/waspc/src/Wasp/Project/WaspFile.hs b/waspc/src/Wasp/Project/WaspFile.hs index fc94cbb547..f1d16299f8 100644 --- a/waspc/src/Wasp/Project/WaspFile.hs +++ b/waspc/src/Wasp/Project/WaspFile.hs @@ -117,9 +117,23 @@ compileWaspTsFile waspProjectDir tsconfigNodeFileInWaspProjectDir waspFilePath = ( runNodeCommandAsJob waspProjectDir "npx" + -- We're using tsc to compile the *.wasp.ts file into a JS file. + -- + -- The compilation rules mostly come from tsconfig.wasp.json but also + -- include several overrides: + -- - We don't keep all the rules in tsconfig.wasp.json because it + -- would give users a way to break things. + -- - We don't keep all the rules here (inline) because users would + -- suffer bad DX (no IDE support in *.wasp.ts file). [ "tsc", "-p", fromAbsFile (waspProjectDir tsconfigNodeFileInWaspProjectDir), + -- The tsconfig.wasp.json file has the noEmit flag on. + -- The file only exists IDE support, and we don't want users to + -- accidentally chage the outDir. + -- + -- Here, to actually generate the JS file in the desired location, + -- we must turn off the noEmit flag and specify the outDir. "--noEmit", "false", "--outDir", @@ -133,6 +147,8 @@ compileWaspTsFile waspProjectDir tsconfigNodeFileInWaspProjectDir waspFilePath = ExitSuccess -> Right absCompiledWaspJsFile where outDir = waspProjectDir dotWaspDirInWaspProjectDir + -- We know this will be the output JS file's location because it's how TSC + -- works (assuming we've specified the outDir, which we did). absCompiledWaspJsFile = outDir compiledWaspJsFileInDotWaspDir compiledWaspJsFileInDotWaspDir = castFile $ From c7932a952db806eeab6837d24ec7d218195465f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Tue, 10 Dec 2024 14:12:36 +0100 Subject: [PATCH 2/4] Inline getModelNames --- waspc/src/Wasp/Project/WaspFile.hs | 3 ++- waspc/src/Wasp/Psl/Ast/Schema.hs | 5 ----- waspc/waspls/src/Wasp/LSP/Prisma/Analyze.hs | 5 +++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/waspc/src/Wasp/Project/WaspFile.hs b/waspc/src/Wasp/Project/WaspFile.hs index f1d16299f8..23b0eae16d 100644 --- a/waspc/src/Wasp/Project/WaspFile.hs +++ b/waspc/src/Wasp/Project/WaspFile.hs @@ -43,6 +43,7 @@ import Wasp.Project.Common WaspTsFile, dotWaspDirInWaspProjectDir, ) +import qualified Wasp.Psl.Ast.Model as Psl.Schema.Model import qualified Wasp.Psl.Ast.Schema as Psl.Schema import Wasp.Util (orElse) import Wasp.Util.Aeson (encodeToString) @@ -186,7 +187,7 @@ executeMainWaspJsFileAndGetDeclsFile waspProjectDir prismaSchemaAst absCompiledM ExitSuccess -> return $ Right absDeclsOutputFile where absDeclsOutputFile = waspProjectDir dotWaspDirInWaspProjectDir [relfile|decls.json|] - allowedEntityNames = Psl.Schema.getModelNames prismaSchemaAst + allowedEntityNames = Psl.Schema.Model.getName <$> Psl.Schema.getModels prismaSchemaAst readDecls :: Psl.Schema.Schema -> Path' Abs (File AppSpecDeclsJsonFile) -> IO (Either [CompileError] [AS.Decl]) readDecls prismaSchemaAst declsJsonFile = runExceptT $ do diff --git a/waspc/src/Wasp/Psl/Ast/Schema.hs b/waspc/src/Wasp/Psl/Ast/Schema.hs index 403b4452dc..df551c9ea8 100644 --- a/waspc/src/Wasp/Psl/Ast/Schema.hs +++ b/waspc/src/Wasp/Psl/Ast/Schema.hs @@ -7,7 +7,6 @@ module Wasp.Psl.Ast.Schema getEnums, getDatasources, getGenerators, - getModelNames, ) where @@ -15,7 +14,6 @@ import Wasp.Psl.Ast.ConfigBlock (ConfigBlock) import qualified Wasp.Psl.Ast.ConfigBlock as Psl.ConfigBlock import Wasp.Psl.Ast.Enum (Enum) import Wasp.Psl.Ast.Model (Model) -import qualified Wasp.Psl.Ast.Model as Model import Wasp.Psl.Ast.Type (Type) import Wasp.Psl.Ast.View (View) import Prelude hiding (Enum) @@ -51,6 +49,3 @@ getGenerators schema = [generator | generator@((Psl.ConfigBlock.ConfigBlock Psl. getConfigBlocks :: Schema -> [ConfigBlock] getConfigBlocks (Schema blocks) = [configBlock | ConfigBlock configBlock <- blocks] - -getModelNames :: Schema -> [String] -getModelNames schema = map Model.getName $ getModels schema diff --git a/waspc/waspls/src/Wasp/LSP/Prisma/Analyze.hs b/waspc/waspls/src/Wasp/LSP/Prisma/Analyze.hs index 0ec4b7565d..49499cf538 100644 --- a/waspc/waspls/src/Wasp/LSP/Prisma/Analyze.hs +++ b/waspc/waspls/src/Wasp/LSP/Prisma/Analyze.hs @@ -8,7 +8,8 @@ import Wasp.LSP.ServerMonads (ServerM, modify) import qualified Wasp.LSP.ServerState as State import Wasp.Project (WaspProjectDir) import Wasp.Project.Analyze (analyzePrismaSchema) -import Wasp.Psl.Ast.Schema (getModelNames) +import qualified Wasp.Psl.Ast.Model as Model +import Wasp.Psl.Ast.Schema (getModels) analyzeAndSetPrismaSchema :: Path' Abs (Dir WaspProjectDir) -> ServerM () analyzeAndSetPrismaSchema waspDir = do @@ -18,7 +19,7 @@ analyzeAndSetPrismaSchema waspDir = do logOutput "warnings" $ show warnings (Right prismaSchemaAst, warnings) -> do logOutput "warnings" $ show warnings - logOutput "models" $ show $ getModelNames prismaSchemaAst + logOutput "models" $ show $ Model.getName <$> getModels prismaSchemaAst modify (State.prismaSchemaAst .~ prismaSchemaAst) where logOutput :: String -> String -> ServerM () From 0d8da669e02cf5f0de41cee68b9c36dbdb82301c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 20 Dec 2024 18:54:39 +0100 Subject: [PATCH 3/4] Fix wasp file --- waspc/src/Wasp/Project/WaspFile.hs | 114 +---------------------------- 1 file changed, 2 insertions(+), 112 deletions(-) diff --git a/waspc/src/Wasp/Project/WaspFile.hs b/waspc/src/Wasp/Project/WaspFile.hs index 16e92e8a6f..82502ca07a 100644 --- a/waspc/src/Wasp/Project/WaspFile.hs +++ b/waspc/src/Wasp/Project/WaspFile.hs @@ -21,6 +21,8 @@ import Wasp.Project.Common WaspFilePath (..), WaspProjectDir, ) +import Wasp.Project.WaspFile.TypeScript (analyzeWaspTsFile) +import Wasp.Project.WaspFile.WaspLang (analyzeWaspLangFile) import qualified Wasp.Psl.Ast.Schema as Psl.Schema import qualified Wasp.Util.IO as IOUtil @@ -53,115 +55,3 @@ analyzeWaspFile :: analyzeWaspFile waspDir prismaSchemaAst = \case WaspLang waspFilePath -> analyzeWaspLangFile prismaSchemaAst waspFilePath WaspTs waspFilePath -> analyzeWaspTsFile waspDir prismaSchemaAst waspFilePath - -analyzeWaspTsFile :: - Path' Abs (Dir WaspProjectDir) -> - Psl.Schema.Schema -> - Path' Abs (File WaspTsFile) -> - IO (Either [CompileError] [AS.Decl]) -analyzeWaspTsFile waspProjectDir prismaSchemaAst waspFilePath = runExceptT $ do - -- TODO: I'm not yet sure where tsconfig.wasp.json location should come from - -- because we also need that knowledge when generating a TS SDK project. - compiledWaspJsFile <- ExceptT $ compileWaspTsFile waspProjectDir [relfile|tsconfig.wasp.json|] waspFilePath - declsJsonFile <- ExceptT $ executeMainWaspJsFileAndGetDeclsFile waspProjectDir prismaSchemaAst compiledWaspJsFile - ExceptT $ readDecls prismaSchemaAst declsJsonFile - -analyzeWaspLangFile :: Psl.Schema.Schema -> Path' Abs (File WaspLangFile) -> IO (Either [CompileError] [AS.Decl]) -analyzeWaspLangFile prismaSchemaAst waspFilePath = do - waspFileContent <- IOUtil.readFile waspFilePath - left (map $ showCompilerErrorForTerminal (waspFilePath, waspFileContent)) - <$> analyzeWaspFileContent prismaSchemaAst waspFileContent - -analyzeWaspFileContent :: Psl.Schema.Schema -> String -> IO (Either [(String, Ctx)] [AS.Decl]) -analyzeWaspFileContent prismaSchemaAst = - return - . left (map Analyzer.getErrorMessageAndCtx) - . Analyzer.analyze prismaSchemaAst - -compileWaspTsFile :: - Path' Abs (Dir WaspProjectDir) -> - Path' (Rel WaspProjectDir) File' -> - Path' Abs (File WaspTsFile) -> - IO (Either [CompileError] (Path' Abs (File CompiledWaspJsFile))) -compileWaspTsFile waspProjectDir tsconfigNodeFileInWaspProjectDir waspFilePath = do - chan <- newChan - (_, tscExitCode) <- - concurrently - (readJobMessagesAndPrintThemPrefixed chan) - ( runNodeCommandAsJob - waspProjectDir - "npx" - [ "tsc", - "-p", - fromAbsFile (waspProjectDir tsconfigNodeFileInWaspProjectDir), - "--noEmit", - "false", - "--outDir", - fromAbsDir outDir - ] - J.Wasp - chan - ) - return $ case tscExitCode of - ExitFailure _status -> Left ["Got TypeScript compiler errors for " ++ fromAbsFile waspFilePath ++ "."] - ExitSuccess -> Right absCompiledWaspJsFile - where - outDir = waspProjectDir dotWaspDirInWaspProjectDir - absCompiledWaspJsFile = outDir compiledWaspJsFileInDotWaspDir - compiledWaspJsFileInDotWaspDir = - castFile $ - replaceRelExtension (basename waspFilePath) ".js" - `orElse` error ("Couldn't calculate the compiled JS file path for " ++ fromAbsFile waspFilePath ++ ".") - -executeMainWaspJsFileAndGetDeclsFile :: - Path' Abs (Dir WaspProjectDir) -> - Psl.Schema.Schema -> - Path' Abs (File CompiledWaspJsFile) -> - IO (Either [CompileError] (Path' Abs (File AppSpecDeclsJsonFile))) -executeMainWaspJsFileAndGetDeclsFile waspProjectDir prismaSchemaAst absCompiledMainWaspJsFile = do - chan <- newChan - (_, runExitCode) <- do - concurrently - (readJobMessagesAndPrintThemPrefixed chan) - ( runNodeCommandAsJob - waspProjectDir - "npx" - -- TODO: Figure out how to keep running instructions in a single - -- place (e.g., this is string the same as the package name, but it's - -- repeated in two places). - -- Before this, I had the entrypoint file hardcoded, which was bad - -- too: waspProjectDir [relfile|node_modules/wasp-config/dist/run.js|] - [ "wasp-config", - fromAbsFile absCompiledMainWaspJsFile, - fromAbsFile absDeclsOutputFile, - -- When the user is coding main.wasp.ts, TypeScript must know about - -- all the available entities to warn the user if they use an - -- entity that doesn't exist. - encodeToString allowedEntityNames - ] - J.Wasp - chan - ) - case runExitCode of - ExitFailure _status -> return $ Left ["Error while running the compiled *.wasp.ts file."] - ExitSuccess -> return $ Right absDeclsOutputFile - where - absDeclsOutputFile = waspProjectDir dotWaspDirInWaspProjectDir [relfile|decls.json|] - allowedEntityNames = Psl.Schema.getModelNames prismaSchemaAst - -readDecls :: Psl.Schema.Schema -> Path' Abs (File AppSpecDeclsJsonFile) -> IO (Either [CompileError] [AS.Decl]) -readDecls prismaSchemaAst declsJsonFile = runExceptT $ do - entityDecls <- liftEither entityDeclsOrErrors - remainingDecls <- ExceptT $ left (: []) <$> declsFromJsonOrError - return $ entityDecls ++ remainingDecls - where - entityDeclsOrErrors = - left (map fst) $ - left (map Analyzer.getErrorMessageAndCtx) $ - Analyzer.getEntityDecls prismaSchemaAst - - declsFromJsonOrError = do - declsBytestring <- IOUtil.readFileBytes declsJsonFile - return $ - left ("Error while reading the declarations from JSON: " ++) $ - Aeson.eitherDecode declsBytestring From 63c56d40a571043e96607ef71252ff51c67416a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 20 Dec 2024 19:11:25 +0100 Subject: [PATCH 4/4] Fix formatting --- waspc/src/Wasp/Generator/DbGenerator/Jobs.hs | 4 ++-- waspc/src/Wasp/Generator/DbGenerator/Operations.hs | 2 +- waspc/src/Wasp/Generator/NpmInstall.hs | 6 +++--- waspc/src/Wasp/Generator/SdkGenerator.hs | 6 +++--- waspc/src/Wasp/Generator/ServerGenerator/Setup.hs | 2 +- waspc/src/Wasp/Generator/ServerGenerator/Start.hs | 2 +- waspc/src/Wasp/Generator/Start.hs | 4 ++-- waspc/src/Wasp/Generator/Test.hs | 2 +- waspc/src/Wasp/Generator/WebAppGenerator/Setup.hs | 2 +- waspc/src/Wasp/Generator/WebAppGenerator/Start.hs | 2 +- waspc/src/Wasp/Generator/WebAppGenerator/Test.hs | 2 +- waspc/src/Wasp/NodePackageFFI.hs | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/waspc/src/Wasp/Generator/DbGenerator/Jobs.hs b/waspc/src/Wasp/Generator/DbGenerator/Jobs.hs index 3a1c0b28ea..bb93ec3fc6 100644 --- a/waspc/src/Wasp/Generator/DbGenerator/Jobs.hs +++ b/waspc/src/Wasp/Generator/DbGenerator/Jobs.hs @@ -19,10 +19,10 @@ import StrongPath.TH (relfile) import qualified System.Info import Wasp.Generator.Common (ProjectRootDir) import Wasp.Generator.DbGenerator.Common (MigrateArgs (..), dbSchemaFileInProjectRootDir) -import qualified Wasp.Job as J -import Wasp.Job.Process (runNodeCommandAsJob, runNodeCommandAsJobWithExtraEnv) import Wasp.Generator.ServerGenerator.Common (serverRootDirInProjectRootDir) import Wasp.Generator.ServerGenerator.Db.Seed (dbSeedNameEnvVarName) +import qualified Wasp.Job as J +import Wasp.Job.Process (runNodeCommandAsJob, runNodeCommandAsJobWithExtraEnv) import Wasp.Project.Common (WaspProjectDir, waspProjectDirFromProjectRootDir) migrateDev :: Path' Abs (Dir ProjectRootDir) -> MigrateArgs -> J.Job diff --git a/waspc/src/Wasp/Generator/DbGenerator/Operations.hs b/waspc/src/Wasp/Generator/DbGenerator/Operations.hs index 8a85e70f29..1b18d8d207 100644 --- a/waspc/src/Wasp/Generator/DbGenerator/Operations.hs +++ b/waspc/src/Wasp/Generator/DbGenerator/Operations.hs @@ -36,12 +36,12 @@ import Wasp.Generator.DbGenerator.Common ) import qualified Wasp.Generator.DbGenerator.Jobs as DbJobs import Wasp.Generator.FileDraft.WriteableMonad (WriteableMonad (copyDirectoryRecursive, doesDirectoryExist)) +import qualified Wasp.Generator.WriteFileDrafts as Generator.WriteFileDrafts import Wasp.Job.IO ( collectJobTextOutputUntilExitReceived, printJobMsgsUntilExitReceived, readJobMessagesAndPrintThemPrefixed, ) -import qualified Wasp.Generator.WriteFileDrafts as Generator.WriteFileDrafts import Wasp.Project.Db.Migrations (DbMigrationsDir) import Wasp.Util (checksumFromFilePath, hexToString) import Wasp.Util.IO (deleteFileIfExists, doesFileExist) diff --git a/waspc/src/Wasp/Generator/NpmInstall.hs b/waspc/src/Wasp/Generator/NpmInstall.hs index f9bda66efe..095f5d323c 100644 --- a/waspc/src/Wasp/Generator/NpmInstall.hs +++ b/waspc/src/Wasp/Generator/NpmInstall.hs @@ -16,15 +16,15 @@ import System.Exit (ExitCode (..)) import UnliftIO (race) import Wasp.AppSpec (AppSpec (waspProjectDir)) import Wasp.Generator.Common (ProjectRootDir) -import Wasp.Job (Job, JobMessage, JobType) -import qualified Wasp.Job as J -import Wasp.Job.IO.PrefixedWriter (PrefixedWriter, printJobMessagePrefixed, runPrefixedWriter) import Wasp.Generator.Monad (GeneratorError (..)) import Wasp.Generator.NpmInstall.Common (AllNpmDeps (..), getAllNpmDeps) import Wasp.Generator.NpmInstall.InstalledNpmDepsLog (forgetInstalledNpmDepsLog, loadInstalledNpmDepsLog, saveInstalledNpmDepsLog) import qualified Wasp.Generator.SdkGenerator as SdkGenerator import qualified Wasp.Generator.ServerGenerator.Setup as ServerSetup import qualified Wasp.Generator.WebAppGenerator.Setup as WebAppSetup +import Wasp.Job (Job, JobMessage, JobType) +import qualified Wasp.Job as J +import Wasp.Job.IO.PrefixedWriter (PrefixedWriter, printJobMessagePrefixed, runPrefixedWriter) import Wasp.Project.Common (WaspProjectDir, nodeModulesDirInWaspProjectDir) import qualified Wasp.Util.IO as IOUitl diff --git a/waspc/src/Wasp/Generator/SdkGenerator.hs b/waspc/src/Wasp/Generator/SdkGenerator.hs index 453e2da974..259d1f97e3 100644 --- a/waspc/src/Wasp/Generator/SdkGenerator.hs +++ b/waspc/src/Wasp/Generator/SdkGenerator.hs @@ -37,9 +37,6 @@ import Wasp.Generator.DbGenerator (getEntitiesForPrismaSchema) import qualified Wasp.Generator.DbGenerator.Auth as DbAuth import Wasp.Generator.FileDraft (FileDraft) import qualified Wasp.Generator.FileDraft as FD -import qualified Wasp.Job as J -import Wasp.Job.IO (readJobMessagesAndPrintThemPrefixed) -import Wasp.Job.Process (runNodeCommandAsJob) import Wasp.Generator.Monad (Generator) import qualified Wasp.Generator.NpmDependencies as N import Wasp.Generator.SdkGenerator.AuthG (genAuth) @@ -66,6 +63,9 @@ import Wasp.Generator.WebAppGenerator.Common reactVersion, ) import qualified Wasp.Generator.WebAppGenerator.Common as WebApp +import qualified Wasp.Job as J +import Wasp.Job.IO (readJobMessagesAndPrintThemPrefixed) +import Wasp.Job.Process (runNodeCommandAsJob) import qualified Wasp.Node.Version as NodeVersion import Wasp.Project.Common (WaspProjectDir) import qualified Wasp.Project.Db as Db diff --git a/waspc/src/Wasp/Generator/ServerGenerator/Setup.hs b/waspc/src/Wasp/Generator/ServerGenerator/Setup.hs index 9d5d97bc21..b0e44f571a 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator/Setup.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator/Setup.hs @@ -5,9 +5,9 @@ where import StrongPath (Abs, Dir, Path', ()) import Wasp.Generator.Common (ProjectRootDir) +import qualified Wasp.Generator.ServerGenerator.Common as Common import qualified Wasp.Job as J import Wasp.Job.Process (runNodeCommandAsJob) -import qualified Wasp.Generator.ServerGenerator.Common as Common installNpmDependencies :: Path' Abs (Dir ProjectRootDir) -> J.Job installNpmDependencies projectDir = do diff --git a/waspc/src/Wasp/Generator/ServerGenerator/Start.hs b/waspc/src/Wasp/Generator/ServerGenerator/Start.hs index 84560a9974..a2edb34f87 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator/Start.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator/Start.hs @@ -5,9 +5,9 @@ where import StrongPath (Abs, Dir, Path', ()) import Wasp.Generator.Common (ProjectRootDir) +import qualified Wasp.Generator.ServerGenerator.Common as Common import qualified Wasp.Job as J import Wasp.Job.Process (runNodeCommandAsJob) -import qualified Wasp.Generator.ServerGenerator.Common as Common startServer :: Path' Abs (Dir ProjectRootDir) -> J.Job startServer projectDir = do diff --git a/waspc/src/Wasp/Generator/Start.hs b/waspc/src/Wasp/Generator/Start.hs index ba7928469d..95c9848056 100644 --- a/waspc/src/Wasp/Generator/Start.hs +++ b/waspc/src/Wasp/Generator/Start.hs @@ -9,10 +9,10 @@ import Control.Concurrent.Extra (threadDelay) import Control.Monad (void) import StrongPath (Abs, Dir, Path') import Wasp.Generator.Common (ProjectRootDir) -import qualified Wasp.Job as J -import Wasp.Job.IO (readJobMessagesAndPrintThemPrefixed) import Wasp.Generator.ServerGenerator.Start (startServer) import Wasp.Generator.WebAppGenerator.Start (startWebApp) +import qualified Wasp.Job as J +import Wasp.Job.IO (readJobMessagesAndPrintThemPrefixed) -- | This is a blocking action, that will start the processes that run web app and server. -- It will run as long as one of those processes does not fail. diff --git a/waspc/src/Wasp/Generator/Test.hs b/waspc/src/Wasp/Generator/Test.hs index 4f07e9fbf2..cffdd87e9c 100644 --- a/waspc/src/Wasp/Generator/Test.hs +++ b/waspc/src/Wasp/Generator/Test.hs @@ -7,8 +7,8 @@ import Control.Concurrent (newChan) import Control.Concurrent.Async (concurrently) import StrongPath (Abs, Dir, Path') import System.Exit (ExitCode (..)) -import Wasp.Job.IO (readJobMessagesAndPrintThemPrefixed) import qualified Wasp.Generator.WebAppGenerator.Test as WebAppTest +import Wasp.Job.IO (readJobMessagesAndPrintThemPrefixed) import Wasp.Project.Common (WaspProjectDir) testWebApp :: [String] -> Path' Abs (Dir WaspProjectDir) -> IO (Either String ()) diff --git a/waspc/src/Wasp/Generator/WebAppGenerator/Setup.hs b/waspc/src/Wasp/Generator/WebAppGenerator/Setup.hs index c77d5db972..ec5082ea81 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator/Setup.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator/Setup.hs @@ -5,9 +5,9 @@ where import StrongPath (Abs, Dir, Path', ()) import Wasp.Generator.Common (ProjectRootDir) +import qualified Wasp.Generator.WebAppGenerator.Common as Common import qualified Wasp.Job as J import Wasp.Job.Process (runNodeCommandAsJob) -import qualified Wasp.Generator.WebAppGenerator.Common as Common installNpmDependencies :: Path' Abs (Dir ProjectRootDir) -> J.Job installNpmDependencies projectDir = do diff --git a/waspc/src/Wasp/Generator/WebAppGenerator/Start.hs b/waspc/src/Wasp/Generator/WebAppGenerator/Start.hs index 5391f78bc1..6bd126f6b3 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator/Start.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator/Start.hs @@ -5,9 +5,9 @@ where import StrongPath (Abs, Dir, Path', ()) import Wasp.Generator.Common (ProjectRootDir) +import qualified Wasp.Generator.WebAppGenerator.Common as Common import qualified Wasp.Job as J import Wasp.Job.Process (runNodeCommandAsJob) -import qualified Wasp.Generator.WebAppGenerator.Common as Common startWebApp :: Path' Abs (Dir ProjectRootDir) -> J.Job startWebApp projectDir = do diff --git a/waspc/src/Wasp/Generator/WebAppGenerator/Test.hs b/waspc/src/Wasp/Generator/WebAppGenerator/Test.hs index 490ba92410..fd832ca554 100644 --- a/waspc/src/Wasp/Generator/WebAppGenerator/Test.hs +++ b/waspc/src/Wasp/Generator/WebAppGenerator/Test.hs @@ -5,9 +5,9 @@ where import StrongPath (Abs, Dir, Path', relfile, ()) import qualified StrongPath as SP +import Wasp.Generator.WebAppGenerator.Common (webAppRootDirInProjectRootDir) import qualified Wasp.Job as J import Wasp.Job.Process (runNodeCommandAsJob) -import Wasp.Generator.WebAppGenerator.Common (webAppRootDirInProjectRootDir) import Wasp.Project.Common (WaspProjectDir, dotWaspDirInWaspProjectDir, generatedCodeDirInDotWaspDir) testWebApp :: [String] -> Path' Abs (Dir WaspProjectDir) -> J.Job diff --git a/waspc/src/Wasp/NodePackageFFI.hs b/waspc/src/Wasp/NodePackageFFI.hs index f445671658..439eadf774 100644 --- a/waspc/src/Wasp/NodePackageFFI.hs +++ b/waspc/src/Wasp/NodePackageFFI.hs @@ -23,7 +23,7 @@ import Wasp.Data (DataDir) import qualified Wasp.Data as Data import qualified Wasp.Node.Version as NodeVersion --- | This are the globally installed packages waspc runs directly from +-- | This are the globally installed packages waspc runs directly from -- their global installation path. data RunnablePackage = DeployPackage