-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post 0.16.0 cleanup #2490
Open
sodic
wants to merge
17
commits into
main
Choose a base branch
from
filip-post-016-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Post 0.16.0 cleanup #2490
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7f205ac
Reference the correct user tsconfig from server tsconfig
sodic f5790de
Add comment explaining outDir to tsconfig
sodic 4e2c7f9
Add clarifying comment for rootDir
sodic 6bb81dc
Add clarifying comment for project references
sodic b2364ef
Merge branch 'main' into filip-post-016-cleanup
sodic 6806f27
Restore ts-ignore to enable project build
sodic 53e56c8
Merge branch 'main' into filip-post-016-cleanup
sodic 1921aa8
Add default value for NODE_ENV
sodic fe484ea
Add apps for testing folder in .gitignore
sodic 4d28982
Refactor JsImport code in SdkGenerator
sodic fdcbd2c
Merge branch 'main' into filip-post-016-cleanup
sodic dc71f03
Fix listDirectory's signature
sodic 808d2ed
Improve tsconfig parse error message
sodic a56e226
Improve TS config validation messages
sodic 1890fca
Revert "Restore ts-ignore to enable project build"
sodic 6e9ae10
Revert "Add default value for NODE_ENV"
sodic bb481f9
Add srcTsConfigPath to tests to silence warnings
sodic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,6 @@ module-graph.png | |
|
||
# macOS related | ||
.DS_Store | ||
|
||
# apps for testing | ||
examples/ignored | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This got moved from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module Wasp.Generator.SdkGenerator.JsImport | ||
( extImportToJsImport, | ||
extOperationImportToImportJson, | ||
) | ||
where | ||
|
||
import qualified Data.Aeson as Aeson | ||
import Data.Maybe (fromJust) | ||
import StrongPath ((</>)) | ||
import qualified StrongPath as SP | ||
import qualified Wasp.AppSpec.ExtImport as EI | ||
import Wasp.Generator.Common (dropExtensionFromImportPath) | ||
import qualified Wasp.Generator.JsImport as GJI | ||
import qualified Wasp.Generator.SdkGenerator.Common as C | ||
import Wasp.JsImport (JsImport (..), JsImportPath (..)) | ||
import qualified Wasp.JsImport as JI | ||
|
||
extImportToJsImport :: EI.ExtImport -> JsImport | ||
extImportToJsImport extImport@(EI.ExtImport extImportName extImportPath) = | ||
JsImport | ||
{ _path = ModuleImportPath importPath, | ||
_name = importName, | ||
_importAlias = Just $ EI.importIdentifier extImport ++ "_ext" | ||
} | ||
where | ||
importPath = C.makeSdkImportPath $ dropExtensionFromImportPath $ extCodeDirP </> SP.castRel extImportPath | ||
extCodeDirP = fromJust $ SP.relDirToPosix C.extSrcDirInSdkRootDir | ||
importName = GJI.extImportNameToJsImportName extImportName | ||
|
||
extOperationImportToImportJson :: EI.ExtImport -> Aeson.Value | ||
extOperationImportToImportJson = | ||
GJI.jsImportToImportJson | ||
. Just | ||
. applyExtImportAlias | ||
. extImportToJsImport | ||
where | ||
applyExtImportAlias jsImport = | ||
jsImport {_importAlias = Just $ JI.getImportIdentifier jsImport ++ "_ext"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sneaked this in because I like to have experimental apps in the scope of
cabal run wasp-cli
but I don't like them polluting my commit history.