Skip to content

Commit

Permalink
Change src to ext-src
Browse files Browse the repository at this point in the history
  • Loading branch information
sodic committed Feb 5, 2025
1 parent f61e211 commit ccb7c63
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion waspc/data/Generator/templates/sdk/wasp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{=! expose it here (which leaks it to our users). We could avoid this by =}
{=! using relative imports inside SDK code (instead of library imports), =}
{=! but I didn't have time to implement it. =}
"./ext-src/*": "./dist/ext-src/*.js",
"./src/*": "./dist/src/*.js",
{=! Used by our code, uncodumented (but accessible) for users. =}
"./operations/*": "./dist/operations/*",
{=! Used by our code, uncodumented (but accessible) for users. =}
Expand Down
5 changes: 1 addition & 4 deletions waspc/src/Wasp/Generator/SdkGenerator/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ sdkTemplatesDirInTemplatesDir :: Path' (Rel TemplatesDir) (Dir SdkTemplatesDir)
sdkTemplatesDirInTemplatesDir = [reldir|sdk/wasp|]

extSrcDirInSdkRootDir :: Path' (Rel SdkRootDir) (Dir GeneratedExternalCodeDir)
extSrcDirInSdkRootDir = [reldir|ext-src|]
extSrcDirInSdkRootDir = [reldir|src|]

relDirToRelFileP :: Path Posix (Rel d) Dir' -> Path Posix (Rel d) File'
relDirToRelFileP path = fromJust $ SP.parseRelFileP $ removeTrailingSlash $ SP.fromRelDirP path
Expand All @@ -73,9 +73,6 @@ relDirToRelFileP path = fromJust $ SP.parseRelFileP $ removeTrailingSlash $ SP.f
makeSdkImportPath :: Path Posix (Rel SdkRootDir) File' -> Path Posix (Rel s) File'
makeSdkImportPath path = [reldirP|wasp|] </> path

extCodeDirInSdkRootDir :: Path' (Rel SdkRootDir) Dir'
extCodeDirInSdkRootDir = [reldir|ext-src|]

clientTemplatesDirInSdkTemplatesDir :: Path' (Rel SdkTemplatesDir) (Dir ClientTemplatesDir)
clientTemplatesDirInSdkTemplatesDir = [reldir|client|]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,5 @@ extImportToJsImport extImport@(EI.ExtImport extImportName extImportPath) =
}
where
importPath = C.makeSdkImportPath $ dropExtensionFromImportPath $ extCodeDirP </> SP.castRel extImportPath
extCodeDirP = fromJust $ SP.relDirToPosix C.extCodeDirInSdkRootDir
extCodeDirP = fromJust $ SP.relDirToPosix C.extSrcDirInSdkRootDir
importName = GJI.extImportNameToJsImportName extImportName
2 changes: 1 addition & 1 deletion waspc/src/Wasp/Project/ExternalConfig/TsConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ readTsConfigFile :: Path' Abs (File f) -> IO (Either String T.TsConfig)
readTsConfigFile tsConfigFile = do
tsConfigContent <- IOUtil.readFileBytes tsConfigFile
parseResult <- parseJsonWithComments . BS.toString $ tsConfigContent
return $ left ("Failed to parse tsconfig file" ++) parseResult
return $ left ("Failed to parse tsconfig file: " ++) parseResult

0 comments on commit ccb7c63

Please sign in to comment.