* Support typing backend queries
* Implement types for actions and extract entities
* Add Prisma entities to the frontend
* Add frontend types to internal todoApp
* Undo moving for easier review
* Revert back to generating a query.js file
* Rename buildEntityData
* Fix structural typing bug
* Rename function for making entity json data
* Expand EntityMap to improve readability
* Remove leftover testing artifacts
* Remove wasp prefix from _entityName
* Remove solved todo in schema template
* Fix docs in method
* Adding uninstall command (#953)
* Adding uninstall command
* Updates docs and changelog related to the uninstall command
* Use StrongPath instead of FilePath
* Fix review feedback
* Move prisma client generation messages
* Generalize FileDraft functions
* Generate prisma clients using ENV
* Fix schema checksum check
* Small refactor in db generator
* Run prisma generate from server root dir
* Fix types for useAction
* Fix type error for useAction
* Fix schema generation in Dockerfile
* Refactor passing env vars to prisma schema
* Fix useAction types
* Replace Prelude readFile with SP readFile
* Add comment for prisma/client in web app
* Replace Prelude writeFile with SP writeFile
* Replace do and if with ifM
* Rename readProjectTelemetryFile
* Refactor readOrCreateUserSignatureFile
* Remove redundant comment
* Fix typo in variable name
* Simulate unions with a type class
* Further improve strongpath types
* Add expand types to types index
* Remove redundant comment
* Organize internal type modules
* Fix formatting
* Remove leftover code
* Generate prisma clients after migration
* Change ModuleRootDir to ComponentRootDir
* Remove solved todo
* Improve naming
* Remove redundant env variable
* Improve formatting
* Fix errors after merging
* Include input and output types
* Temporarily delete _types
* Restore _types index
* Add types to queries
* Rename WaspEntity to Entity
* Change local function name
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Rename local function again
* Update changelog
* Fix error type in useQuery
* Rename Component to AppComponent
* Refactor DbGenerator
* Explain Abs paths in SP helpers
* Update e2e tests
* Fix formatting
* Change signature for doesFileExist
* Change signature for SP functions
* Remove redundant do block
* Fix formatting
* Reorder functions
* Rename module to appComponent in functions
* Rename module to component in functions
* Rename telemetry cache function
* Fix formatting
* Update changelog
* Remove redundant import
* Update e2e tests
---------
Co-authored-by: Mihovil Ilakovac <mihovil@ilakovac.com>
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Support typing backend queries
* Implement types for actions and extract entities
* Add Prisma entities to the frontend
* Add frontend types to internal todoApp
* Undo moving for easier review
* Revert back to generating a query.js file
* Rename buildEntityData
* Remove solved todo in schema template
* Fix docs in method
* Adding uninstall command (#953)
* Adding uninstall command
* Updates docs and changelog related to the uninstall command
* Use StrongPath instead of FilePath
* Fix review feedback
* Move prisma client generation messages
* Generalize FileDraft functions
* Generate prisma clients using ENV
* Fix schema checksum check
* Small refactor in db generator
* Run prisma generate from server root dir
* Fix types for useAction
* Fix type error for useAction
* Fix schema generation in Dockerfile
* Refactor passing env vars to prisma schema
* Fix useAction types
* Replace Prelude readFile with SP readFile
* Add comment for prisma/client in web app
* Replace Prelude writeFile with SP writeFile
* Replace do and if with ifM
* Rename readProjectTelemetryFile
* Refactor readOrCreateUserSignatureFile
* Remove redundant comment
* Fix typo in variable name
* Simulate unions with a type class
* Further improve strongpath types
* Generate prisma clients after migration
* Change ModuleRootDir to ComponentRootDir
* Remove solved todo
* Improve naming
* Remove redundant env variable
* Improve formatting
* Fix errors after merging
* Change local function name
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Rename local function again
* Update changelog
* Fix error type in useQuery
* Rename Component to AppComponent
* Refactor DbGenerator
* Explain Abs paths in SP helpers
* Update e2e tests
* Fix formatting
* Change signature for doesFileExist
* Change signature for SP functions
* Remove redundant do block
* Fix formatting
* Reorder functions
* Rename module to appComponent in functions
* Rename module to component in functions
* Rename telemetry cache function
* Fix formatting
---------
Co-authored-by: Mihovil Ilakovac <mihovil@ilakovac.com>
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* feat: add type variable for operation input argument
* Pass where object by name.
* Change default type of operator input to `never`.
* Update e2e checksums.
* Rename operation Result type to Output, remove redundant default types.
---------
Co-authored-by: Bas Dirks <bas.dirks@bettyblocks.com>
* Support typing backend queries
* Implement types for actions and extract entities
* Add CR fixes
* Add type to imports and exports for entities
* Change query extensions back to .js
* Tidy up default arguments for operation types
* Don't throw syntax error when there are no entities
* Update e2e tests
* Fix formatting
* Fix typo in comment
* Update changelog and bump project version
* Update todo app tutorial
* Remove trailing spaces from clocks
* Match MainPage with tutorial
* Add newline to end of action.js
* Fix newline at the end of action.js
* Fix typo in tutorial
* Update web/docs/tutorials/todo-app/creating-new-project.md
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Update web/docs/tutorials/todo-app/creating-new-project.md
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Fix jsx typo in tutorial
* Remove React import from e2e tests
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Add typescript support to generator
* Change jsconfig to tsconfig for client
* Change Main.js to Main.tsx
* Implement TypeScript support on client
* Fix formatting
* Fixes in actions/index.ts
* Remove extra types from comments
* Update waspc/src/Wasp/Generator/ServerGenerator.hs
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Remove server-specific typescript stuff
* Fix useQuery type
* Add typeroots to client tsconfig
* Improve TypeScript support on client
* Remove tsx extension from template wasp file
* Format code
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Separate ext code to client and server
* Use skeleton in createNewProject and refactor
* Refactor Lib.hs to use ExceptT
* Fix formatting
* Pop up returns
* Extract liftIO and add a do block
Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com>
* Address some review comments
* Add skeleton comment
* Extract common CommandError message
* Separate skeleton comment into two rows
* Move server and client dirs into src
* Simplify maybeToEither
* Further refactor Lib.hs
* Further simplify skeleton comment
* Add shared code directory to project structure
* Update e2e test inputs
* Update e2e test outputs
* Fix formatting
* Fix bug in compile function
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Change map to fmap in compile function
* Fix formatting
* Force git to include empty directories
* Remove extra empty line from .gitkeep files
* Add .jsconfig to enable go-to-definition
* Watch shared directory for changes
* Add final newline to jsconfigs
* Fix regular and e2e tests
* Update e2e tests
* Fix cli template packaging and update todoApp
* Add a shared function demo to todoApp
* Update waspc and e2e tests
* Fix compiler warnings and rename function
* Rename mkError to mkParserError
* Remove redundant empty line
* Fix test warnings
* Fix formatting
* Update waspc.cabal with jsconfigs
* Minimize jsconfig.json files
* Add jsconfigs to waspc todoApp
* Update e2e tests
* Update e2e tests
* Fix directory tree watching on wasp start
* Implement review feedback
Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com>
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Separate ext code to client and server
* Use skeleton in createNewProject and refactor
* Refactor Lib.hs to use ExceptT
* Fix formatting
* Pop up returns
* Extract liftIO and add a do block
Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com>
* Address some review comments
* Add skeleton comment
* Extract common CommandError message
* Separate skeleton comment into two rows
* Move server and client dirs into src
* Simplify maybeToEither
* Further refactor Lib.hs
* Further simplify skeleton comment
* Add shared code directory to project structure
* Update e2e test inputs
* Update e2e test outputs
* Fix formatting
* Fix bug in compile function
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Change map to fmap in compile function
* Fix formatting
* Force git to include empty directories
* Remove extra empty line from .gitkeep files
* Watch shared directory for changes
* Fix regular and e2e tests
* Fix cli template packaging and update todoApp
* Add a shared function demo to todoApp
* Update waspc and e2e tests
* Fix compiler warnings and rename function
* Rename mkError to mkParserError
* Remove redundant empty line
* Fix test warnings
* Fix formatting
* Fix directory tree watching on wasp start
* Implement review feedback
Co-authored-by: Shayne Czyzewski <523636+shayneczyzewski@users.noreply.github.com>
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
* Add trailing slash note in deploying document
* Remove trailing slash, if present in the wasp backend URL
* e2e-test for trailing slash fix
* e2e test for trailing slash in wasp backend url
* Fix e2e-tests checksums
Co-authored-by: Filip Sodić <filip.sodic@gmail.com>
* Fix query cache key generation issue
* Make waspc/todoApp return tasks in consistent order
* Implement basic support for optimistic updates
* Fix query cache key generation issue again
* Add action counter to prevent flickering updates
* Add remove todo to action counter
* Count only optimistically updated cache keys
* Make waspc/todoApp return tasks in consistent order
(cherry picked from commit 57606c74e4)
* Reduce duplication in frontend actions and queries
* Fix formatting
* Fix optimistic updates after merge
* Experimenting
* Hash queries before counting
* Rename parameters in counter
* Add task done toggling to task page
* Fixes after merge
* Fix wrong condition in example todo app
* Simplify counter with react-query's internal hash
* Remove console log and add notes
* Clear up some todos and tidy up
* Fix formatting
* Remove leftover todo
* Fix a bug that caused double action calls
* Simplify query key hashing function
* Revert accidental blog changes
* Revert accidental blog changes
* Apply optimistic updates on each query response
* Clean up code for optimistic updates
* Clean up more code for optimistic updates
* Remove redundant optimistic update tuple list
* Rename query to queryKey
* Return previous data from onMutate
* Move counter into the constructor function
* Move updatesHandler into the constructor function
* Remove debug logs from optimisticUpdatesMap
* Rename and refactor optimistic updates
* Fix typo in comments
* Remove the option to directly specify query key
* Remove flickering fixes for optimistic updates
* Add optimistic updates to Task.js
* First round of code review feedback
* Remove react query's additional options from hook
* Futher review feedback and code docs
* Fix and document error handling for optimistic updates
* Fix formatting and remove comment
* Further document optimistic update mechanisms
* Fix memory leak in updates handler map
* Update optimistic update docs
* Improve comment for useAction
* Further improve comments in actions/index
* Heavily comment actions/index
* Fix capitalization in action/index
* Add types to actions/index
* Fix jsdoc types in actions/index
* Comment testing sleeps
* Comment sleep function in todoApp/ext/actions
* Properly handle type errors in actions/index
* Fix formatting in actions/index
* Rename an argument in actions/index
* Move updateFn change to optimistic update instantiation
* Extract common functionality in actions/index
* Reuse common functionality for optimistic updates
* Fix formatting in actions/index
* Comment the internal action mechanism
* Add jsdoc types to actions/index
* Revise jsdoc in actions/index
* Document makeOptimisticUpdateMutationFn
* Add updateQuery constraints
* Address PR comments
* Update e2e tests
* Mention optimistic updates in cache invalidation
* Further elaborate updateQuery constraints
* Update e2e tests