Commit Graph

547 Commits

Author SHA1 Message Date
Shayne Czyzewski
adcb15a41c
Adds a simple pass-through Jobs implementation. (#553) 2022-04-13 12:30:29 -04:00
Martin Sosic
801ba69e54 Increased resolution of module graph produced by run script. 2022-04-13 14:19:17 +02:00
Phil de Joux
45a1ffd5c5
Change NOTE to a warning. (#552) 2022-04-06 21:09:33 +02:00
Shayne Czyzewski
302fcc11d8
Adds support for basic Wasp job DSL parsing (#540) 2022-04-06 10:07:45 -04:00
Phil de Joux
f9008e81bf
Add a warning in the project file to run cabal update. (#526) 2022-04-06 15:10:11 +02:00
Shayne Czyzewski
f91dbdc6fa
Change termination method of spawned processes on *nix (#524) 2022-03-31 11:55:42 -04:00
Filip Sodić
b3d9014e37
Allow Wasp identifiers for project names (#520)
* Allow Wasp identifiers for project names

* Rename initialState to makeInitialState

* Fix formatting

* Use parser to parse Wasp identifiers

* Add newline at the end of Wasp.Analyzer.Parser

* Fix newline at the end of Wasp.Analyzer.Parser

* Clean up and rename parsing

* Fix newline at the end of Wasp.Analyzer.Parser

* Add tests for new parser functions

* Fix formatting

* Fix formatting

* Reformat where statement

* Address PR comments and remove redundant module

* Remove keywords from error message

* Fix formatting in CreateNewProject.hs

* Remove redundant note on duplication
2022-03-30 01:25:56 +02:00
Shayne Czyzewski
52ec8d7232
Improve performance of writing FileDrafts (#506)
Closes #503 

Co-authored-by: Martijn Faassen <martijn@wasp-lang.dev>
2022-03-29 08:53:28 -04:00
Shayne Czyzewski
31b01838ae
Add missing react-app data-files (#529)
Co-authored-by: shayneczyzewski <shayne.czyzewski@gmail.com>
2022-03-28 19:26:37 +02:00
Shayne Czyzewski
a4a2b03a81
Swap cabal freeze file for index-state (#519) 2022-03-24 08:50:14 -04:00
Filip Sodić
52badd651e
[Analyzer] Reverse the order of Wasp error messages (#500)
* Reverse the order for TypeError messages

* Remove redundant import and unused pragma

* Remove redundant import and unused pragma

* Reverse additional type error messages

* Remove redundant import

* Format util test file

* Address PR comments

* Add empty line to TypeError.hs

* Address PR comments

* Format TypeError.hs

* Reverse message order in evaluation errors

* Extract common error message functions

* Add tests for EvaluationErrors

* Improve naming in Wasp.ErrorMessage

* Fix formatting

* Fix formatting

* Format code

* Change naming and syntax in ErrorMessage

* hange names in EvaluationError tests

* Add full stops to documentation

* Fix formatting in tests
2022-03-23 13:18:43 +01:00
Shayne Czyzewski
1995ccdb9d
Make CLI code testable (#510) 2022-03-23 08:04:09 -04:00
Phil de Joux
318eb03294
Edit of setup section around ghcup and with-compiler. (#511) 2022-03-22 15:19:22 +01:00
Filip Sodić
8a3fba8831
Require LTS version of Node for Wasp (#504)
* Require LTS node and npm on client and server

* Update node and npm versions in the docs

* Add npmrc and nvmrc to WebAppGenerator

* Change function name in test

* Add newline to nvmrc

* Add newline to Common.hs

* Remove extra empty line in nvmrc

* Remove extra empty line in Common.hs

* Update end to end tests for node LTS

* Add newline at the end of server/nvmrc

* Ensure Node version 16 in CI

* Fix broken ci file

* Change how Wasp specifies required versions

* Fix formatting

* Use type alias for semantic versions

* Remove incorrect comment on Prisma LTS

* Update e2e checksums

* Fix typo in gitignore

Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>

* Sort e2e checksums

* Extract semantic version to its module

* Fix formatting

* Fix formatting again

* Add comment explaining nvmrc

* Add tests and change semver naming

* Add natural numbers and formatting to semver

* Add newline at the end of semver module

* Add missing space to node mismatch message

Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
2022-03-21 15:00:19 +01:00
Phil de Joux
790a9b609e
Remove duplicate hlint ignore. (#514) 2022-03-18 12:46:11 +01:00
Martin Sosic
e40c664e20 Removed leftover package.yaml. 2022-03-18 12:43:02 +01:00
Phil de Joux
08704f4117
Follow hlint suggestions. (#513) 2022-03-18 12:33:37 +01:00
Martin Sosic
7865110085 Constrained versions of dev tools (ormolu, hlint, stan). 2022-03-17 17:58:30 +01:00
Martin Šošić
da8d3a1d85
Check in CI that cabal freeze file is up to date. (#508) 2022-03-17 14:22:58 +01:00
Martin Sosic
27a22fcf3e Added command to ./run for printing module graph of our code. 2022-03-17 14:20:59 +01:00
Martin Šošić
2a16bfd3cf
App spec validation (#459) 2022-03-17 12:36:36 +01:00
Martin Sosic
ac0567fa6a Added some more info about how we parallelize cabal compilation. 2022-03-16 22:27:35 +01:00
Martin Šošić
857912c2cc
Migrated Wasp from Stack to Cabal (#471)
Co-authored-by: shayneczyzewski <shayne.czyzewski@gmail.com>
2022-03-16 16:00:18 +01:00
Shayne Czyzewski
038ae0132f
Ensure .waspchecksums file is sorted (#507) 2022-03-15 20:51:50 -04:00
Shayne Czyzewski
8bc004ef29
Makes Wasp smarter when writing over existing generated files (#486)
Closes #209
2022-03-15 07:43:52 -04:00
Filip Sodić
5c6c10dc46
Add function definition rules to code style guide (#502) 2022-03-10 17:57:10 +01:00
Martijn Faassen
b6f738416a
Use send message protocol in cli (#493)
Use cliSendMessage everywhere in CLI

Instead of using waspSays and friends, we use the new cliSendMessage protocol everywhere to
send messages. For convenience we introduce a cliSendMessageC that's lifted to commands.

We handle CommandErrors specially now, and have a special way to display errors (failures) and warnings
with a heading.
2022-03-09 15:43:41 +01:00
Shayne Czyzewski
f68c2d5a8b
Remove python2 dependency from e2e and update README (#497) 2022-03-09 07:46:41 -05:00
Shayne Czyzewski
f24ed0d347
Fixes database setup message type (#488) 2022-03-04 15:38:07 -05:00
Shayne Czyzewski
4ecc46eab3
Adds golden output dirs for E2E testing (Part 2) (#475) 2022-03-01 15:42:31 -05:00
Shayne Czyzewski
84821005f4
Adds E2E CLI testing support via Golden Tests (Part 1) (#470) 2022-03-01 15:00:51 -05:00
Martin Šošić
8c3f60a617
Added instructions to publish docs on new release. 2022-03-01 12:05:45 +01:00
Shayne Czyzewski
9d060d7428
Check for main branch in new-release script (#476) 2022-02-25 07:40:28 -05:00
Martijn Faassen
f944f0beb3
Send messages from the setup phase (#472)
We introduce a SendMessage protocol. 

We implement it in the CLI as that knows how to send messages. We also pass it into the generator so that it can reach the setup phase. There we use it to emit messages on the CLI.
2022-02-24 12:20:37 +01:00
Shayne Czyzewski
22cdd5b70a
Added release process notes to README (#474) 2022-02-23 13:59:56 -05:00
shayneczyzewski
c1bf9bff4a Updated wasp version to 0.4.0.0. 2022-02-23 11:19:45 -05:00
Shayne Czyzewski
4bf9cc93e3
Added CHANGELOG entry for 0.4.0.0 (#473) 2022-02-23 08:21:40 -05:00
Martin Sosic
600e4eace6 Added a bit on TODO/NOTE in code style guide. 2022-02-22 18:37:43 +01:00
Martin Sosic
16632fb74c Added code style guide to waspc/README.md. 2022-02-22 17:57:14 +01:00
Martijn Faassen
540a4d0ded
Do npm install as part of generation process, only when needed (#464)
Create a seperate runSetup function

This does the `npm install` (if required) and the database setup.

Since this is now happening in the generation phase, this means we don't need
`compileAndSetup` anymore.

Since compile now sets up the dependencies, we only need to compile in any db command

Reworked the naming and types of combining the various dependencies.
2022-02-18 17:23:14 +01:00
Martijn Faassen
2b050fb9c7 Fix error handling bug
Errors were not properly handled as `error` was not bound
2022-02-16 18:42:11 +01:00
Shayne Czyzewski
09a72a7e1a
Upgrade Prisma to version 3.9.1 (#452) 2022-02-11 17:55:41 -05:00
Martijn Faassen
830bb43be1 We can compare PackageJsonDependencies independent of dependency order
Use an explicit Ord to enforce dependencies are compared by name.
2022-02-11 11:05:02 +01:00
Martijn Faassen
27b3c83f7a Introduce combinePackageDependencies
This is the base operation used now to combine package dependencies. It
knows about dev dependencies too. I've adjusted the code for
both web app and server to use this.

I've factored out commonalities in error handling into PackageJsonGenerator

We now support devDependencies for web app and in the deps command

We also have nicer functions to generate the package json entries
directly from the PackageJsonDependencies structure
2022-02-11 11:05:02 +01:00
Shayne Czyzewski
f0ec477dbd
fix: error when running prisma generate without entities (#457) 2022-02-10 07:24:50 -05:00
Martijn Faassen
55d9e1bbd8
Resolve dependencies refactor (#449)
Create a new resolveDependencies

Use Map to do differences between Wasp and user package.json dependencies.

This is now used internally in resolveNpmDeps.

Also fixes a bug in the conflict error message, where the wasp and user dependency
were previously not properly distinguished.

Add .vscode and move everything that appears text editor related to a section
2022-02-09 14:02:19 +01:00
Martijn Faassen
8a97732c71
Merge pull request #450 from wasp-lang/269-compile-and-npm-install
269 compile and npm install
2022-02-08 17:12:53 +01:00
Martin Sosic
a0b7477d19 Renamed all references to master branch into main branch. 2022-02-08 15:34:32 +01:00
Martijn Faassen
91a40a6105 Revert to the previous behavior for now.
Leave comments in place on what to do once we can skip `npm install`.
2022-02-08 11:00:24 +01:00
Shayne Czyzewski
2ccc0408c4
Adds Prisma client generation during app generation (#444)
Closes #427
2022-02-07 15:09:22 -05:00
Martijn Faassen
55d9bd1ef1 We now run compile and install each time the wasp file changes 2022-02-07 12:56:46 +01:00
Martijn Faassen
988929fbdc Factor out this function into its own module
We also need to reuse it during watch
2022-02-07 12:56:41 +01:00
Martijn Faassen
ae5f498b65 Rename to compileAndSetup
Until (and if) we ever rename setup, we should use this simpler name.

And it involves npm install of two projects, not one one anyway.
2022-02-07 12:55:24 +01:00
Martijn Faassen
4f1088ddf5 Remove commented out code 2022-02-07 12:55:24 +01:00
Martijn Faassen
901a9b9f0e Factor out a compileAndInstall 2022-02-07 12:55:24 +01:00
Martijn Faassen
a93269c88a Add .vscode local config to gitignore 2022-02-07 12:55:24 +01:00
Martin Sosic
2e9c9c63e1 Updated wasp version to 0.3.0.0. 2022-02-04 11:52:30 +01:00
Martin Sosic
f59b432269 Added CHANGELOG entry for 0.3.0.0 version, added simple error when 'app' is missing. 2022-02-04 11:51:58 +01:00
Shayne Czyzewski
c2f9eff3b8
fix: todo example error from missing entity (#446)
Co-authored-by: shayneczyzewski <shayne.czyzewski@gmail.com>
2022-02-02 19:38:47 +01:00
Martijn Faassen
cb33f2d545 When we build, do not generate .env 2022-01-31 14:09:07 +01:00
Shayne Czyzewski
c516113f11
feat: Warns user if Prisma needs to be migrated because of schema.prisma changes (#424)
Closes #214
2022-01-27 15:14:29 -05:00
Shayne Czyzewski
82cb481c96
feat: Adds Generator monad for more flexible error and warning handling (#433)
Closes #123
2022-01-23 09:21:31 -05:00
Martin Šošić
8d2c33ab28
Replace Wasp with AppSpec and Parser with Analyzer. (#423) 2022-01-20 11:45:14 +01:00
Shayne Czyzewski
b74eb88ff0
Makes DbGenerator responsible for movement of migrations dir (#420)
Closes #105
2022-01-12 11:28:21 -05:00
Martin Šošić
fe915158d9
Polished AppSpec: added missing fields + deps are not tuples. (#417) 2022-01-11 13:59:13 +01:00
Martin Šošić
5f534f7bcf
Added concept of SourceRegion to Ctx. (#409) 2022-01-08 23:55:52 +01:00
Martin Šošić
424def31d6
TypeError now uses WithCtx internally. (#408) 2022-01-08 23:54:32 +01:00
Martin Šošić
7a0f75b539
Enriched Evaluation errors with parse context + made them showable. (#407) 2022-01-08 23:52:26 +01:00
Martin Šošić
82bec83769
Better type error messages (and context). (#400)
- Enriched Parser.AST, TypeChecker.AST and TypeError with Ctx.
2022-01-08 23:50:48 +01:00
Shayne Czyzewski
cdee0ff0d3
feature: Makes CLI output easier to see success and failure (#418)
Closes #212
2022-01-05 09:15:38 -05:00
Martin Sosic
c7ce883b5a Improved parse errors (added expected tokens, nicer error messages).
- Added expected tokens.
- Nice error messages + source position.
2021-12-21 16:36:49 +01:00
Shayne Czyzewski
081f3c149a
feature: Delays recompilation until no file changes in last 1s (#403)
Closes #191
2021-12-17 08:39:59 -05:00
Shayne Czyzewski
4156cebb20
fix: Propagates deletion of DB migrations dir from Wasp src to the generated project (#383)
Fixes #211
2021-12-13 12:06:42 -05:00
Shayne Czyzewski
f444eaae47
feat(auth): Added flexible validation checks for User entity email and password (#376)
Adds an additional Prisma middleware for User entity validation checks that the user can disable and/or extend

Closes #88 and fixes #100
2021-12-07 13:22:56 -05:00
Martin Sosic
6756fa4d88 Added tuple to Wasp language. 2021-12-07 15:05:41 +01:00
Martin Šošić
880cd39226
Added support for custom evaluation to Analyzer. (#375) 2021-12-07 14:44:01 +01:00
Martin Šošić
bb3964ae6f
Made Dependencies and Entity full-featured (in AppSpec and Analyzer) (#374) 2021-11-26 15:26:03 +01:00
Martin Sosic
4eb5fac817 Added Server and Database to AppSpec / Analyzer. 2021-11-25 14:09:46 +01:00
Martin Sosic
c86ecdf62c Added Dependencies to AppSpec and Analyzer. 2021-11-25 14:09:46 +01:00
Martin Sosic
032e57a46b Added Action to AppSpec and Analyzer. 2021-11-25 14:09:46 +01:00
Martin Sosic
637e2e20aa Added Query to AppSpec and Analyzer. 2021-11-25 14:09:46 +01:00
Martin Sosic
41f8c531e5 Added TODO for AppSpec.Entity. 2021-11-25 12:06:29 +01:00
Martin Šošić
18c5165df8
Added Route to AppSpec. (#372) 2021-11-25 12:02:02 +01:00
Martin Šošić
ee30923f7a
Added support for Page in Analyzer. (#371) 2021-11-25 10:47:50 +01:00
Martin Šošić
8d946b9ed7
Added support in Analyzer for AppSpec to have record as dict field. (#369) 2021-11-24 23:18:25 +01:00
Giovanni Garufi
dcd1549211
auth: Add onAuthSucceededRedirectTo option (#350)
Allows a user to specify a redirect target in case of successful authentication.
This used to be hardcoded to /, and the current implementation will fallback to that if the property is not specified.

Change-type: minor
Signed-off-by: Giovanni Garufi <nazrhom@gmail.com>
2021-11-22 14:23:19 +01:00
Martin Sosic
ff2543b42f Reviewed remaining hlint rules. 2021-11-17 12:24:39 +01:00
Phil de Joux
89c9d6a1db
ref: Fixed most of the hlint suggestions. (#366) 2021-11-17 00:36:46 +01:00
Martin Sosic
a1abc2e6d5 Ormolu and hlint are now managed via stack and can be run via ./run script. 2021-11-16 21:28:17 +01:00
Martin Šošić
2d09576af6
./run script can now run stan - static analyzer. (#365) 2021-11-16 20:43:55 +01:00
Phil de Joux
ace42b360e
Get set up to run stan for static analysis (#364)
* fix: Get set up to run stan with its default setup.

Show how to install stan with stack.

* Use the same resolver by way of a snapshot.
2021-11-16 17:22:30 +01:00
Martin Sosic
2064b9a3e7 Updated .hlint.yaml so it contains correct list of default extensions. 2021-11-15 19:23:17 +01:00
Martin Sosic
95e71eb48e Renamed wasp cli executable from wasp to wasp-cli. 2021-11-12 18:13:59 +01:00
Phil de Joux
41077ea2bd fix: flag when new project name is a reserved word.
fixes #354.
2021-11-11 19:45:14 +01:00
Martin Šošić
3feeed555f
Moved all src/ modules into Wasp module, and all cli/ modules into Wasp.Cli module. 2021-11-11 13:26:20 +01:00
Martin Šošić
4773ae36e3
Wrote initial version of new Wasp AST: AppSpec (#353)
* Introduced AppSpec, replacement for previous Wasp.hs as a core IR in Wasp.

* Organized AppSpec into Core and Domain.

* Removed Domain from AppSpec.

* Moved ExternalCode.File to AppSpec.

* Added some TODOs.

* Added IsDecl to AppSpec.

* Removed ExternalCode File reexports.

* Added comments.
2021-11-10 16:27:27 +01:00
Vinícius Andrade
dfd6773cc1
Fixed lint errors in Todo Tutorial (#349)
* Fixed lint errors in waspc Todo example

Signed-off-by: Vini Andrade <vini.andrade.dev@gmail.com>

* Fixed lint errors in example TodoApp

Signed-off-by: Vini Andrade <vini.andrade.dev@gmail.com>

* Fixed lint errors in todo app docs

Signed-off-by: Vini Andrade <vini.andrade.dev@gmail.com>
2021-11-08 14:19:15 +01:00
Phil de Joux
422c354abc
Bump resolver to the latest LTS version, lts-18.15 for ghc-8.10.7. (#351) 2021-11-04 22:39:26 +01:00
(´⌣`ʃƪ)
2ce24cdfa0
refactor: convert functions in Util.IO to use StrongPath instead of Path (#346)
* refactor: convert functions in Util.IO to use StrongPath instead of Path

* Clean up import in IO

* Updated version of strong-path to the newest one, that doesn't cause version conflicts.

* Tightened types a bit in Util/IO.hs

Co-authored-by: Martin Sosic <sosic.martin@gmail.com>
2021-10-28 14:07:26 +02:00
Martin Šošić
a7a69ff207
[Analyzer] Instead of directly embedding Declarations into AST, now they are referenced via Ref (#343) 2021-10-22 11:59:51 +02:00
Martin Sosic
07f111903c Removed install.sh script and updated links to download installer script. 2021-10-12 12:41:19 +02:00
ShawSumma
70ba7f0608 fix spelling mistake in react component 2021-10-06 22:17:25 +02:00
Martin Šošić
a5f2eb03c8
Merge pull request #300 from wasp-lang/analyzer-evaluator
feat: Implement evaluator for new type checker
2021-09-22 23:39:45 +02:00
Martin Sosic
a25f8fc809 Renamed Evaluation.Core to Evaluation.Internal. 2021-09-22 23:30:42 +02:00
Martin Sosic
84f32b0e67 fixed ormolu 2021-09-21 21:16:34 +02:00
Martin Sosic
70fc06ee15 IsEnumType now has enumEvaluate method. 2021-09-21 21:04:10 +02:00
Martin Sosic
08eec6f1c7 Added declEvaluate function. 2021-09-21 19:43:59 +02:00
Martin Sosic
074529d79c Made TypeDefinitions implementation Internal. 2021-09-18 00:08:42 +02:00
Martin Sosic
11f494df81 fix 2021-09-17 23:28:38 +02:00
Martin Sosic
22c00d6310 Refactored TH.hs into multiple files. 2021-09-17 13:35:18 +02:00
Martin Sosic
60e8574f9d fix 2021-09-17 12:20:21 +02:00
Martin Sosic
674c3ec3a7 fix 2021-09-17 12:09:44 +02:00
Martin Sosic
dd96f724e1 Refactored Evaluator.Combinators into more structured code. 2021-09-17 11:52:41 +02:00
Martin Sosic
123765c494 fix 2021-09-17 10:10:36 +02:00
Martin Sosic
5c19d42ed1 fix 2021-09-16 16:08:43 +02:00
Martin Sosic
5a1ba5017a fix 2021-09-16 14:47:34 +02:00
Martin Sosic
cb50008b98 fix 2021-09-14 17:08:53 +02:00
Martin Sosic
147d1d6466 Separated EvalCtx from evaluation input in Evaluator.Combinators and
removed duplication.
2021-09-14 14:05:12 +02:00
Martin Šošić
7a32aa38c4
IsDeclType and IsEnumType now have toDeclType and toEnumType functions. (#304) 2021-09-14 11:57:48 +02:00
Martin Šošić
9455697c51
Added IsDeclType constraint to Decl, hidden its internal representation. (#303) 2021-09-14 11:19:12 +02:00
Martin Šošić
d283aabdaf
Added some general Analyzer docs. (#302) 2021-09-14 11:13:54 +02:00
Saatvik Shah
347cca6d9b
Move bash completion logic to Haskell (#305)
This patch moves majority of the bash completion logic from Bash to
Haskell taking advantage of the environment variables exposed by the
`complete` builtin to infer and suggest possible outputs.

Co-authored-by: sshah1 <saatvik.shah@imc.com>
2021-09-06 13:09:03 +02:00
craigmc08
c99e9a9050 Suggestions from code review 2021-08-24 12:00:06 -04:00
Craig McIlwrath
d37cfed9f9
Apply suggestions from code review
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
2021-08-24 11:53:22 -04:00
zant
76acbfd52a
feat: Implement wasp info command (#295) 2021-08-23 18:13:04 +02:00
craigmc08
43450647c7 Fix some comments 2021-08-22 14:19:38 -04:00
craigmc08
9686eaf4dc Add test for Analyzer module 2021-08-22 13:33:44 -04:00
craigmc08
b294e42889 Refactor EvaluationError type 2021-08-22 13:18:12 -04:00
Martin Sosic
af201435be Updated wasp version to 0.2.2.2. 2021-08-20 17:50:57 +02:00
Martin Sosic
0a33598b7f fix: Fixed compiler thinking auth is enabled per operation when it is not. 2021-08-20 17:47:55 +02:00
craigmc08
923a9ad35a Refactoring 2021-08-07 09:22:52 -04:00
craigmc08
2507a71abe Add evaluation for import, json, psl 2021-08-05 15:22:21 -04:00
craigmc08
5f3f845416 More cleanup in TH 2021-08-05 14:34:46 -04:00
craigmc08
865a5196aa Refactor evaluator TH code and add more comments 2021-08-05 13:25:13 -04:00
craigmc08
4120bc53dc Add TH generation for IsDeclType, IsEnumType instances 2021-08-05 13:25:13 -04:00
craigmc08
d043548ecc Get evaluation working a bit
Code is probably not great, but passing tests for generating haskell
data structures exist!

Still have to hand write IsDeclType and IsEnumType instances, but it's cool
2021-08-05 13:25:13 -04:00
craigmc08
a65a964b76 Add TODO for tests in Util.Control.Monad 2021-08-05 13:17:49 -04:00
craigmc08
96450aa31d Suggestions from code review 2021-08-05 13:17:49 -04:00
craigmc08
6f178115dc Suggestions from code review 2021-08-05 13:17:49 -04:00
craigmc08
d335562263 Suggestions from code review 2021-08-05 13:17:49 -04:00
Craig McIlwrath
5d013fab6d Apply suggestions from code review
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
2021-08-05 13:17:49 -04:00
craigmc08
31a4ebaee3 Refactor typechecker tests 2021-08-05 13:17:49 -04:00
craigmc08
e1e062479e Suggestions from code review 2021-08-05 13:17:49 -04:00
Craig McIlwrath
46206c3fb3 Apply suggestions from code review
Co-authored-by: Martin Šošić <Martinsos@users.noreply.github.com>
2021-08-05 13:17:49 -04:00
craigmc08
c456ca8d2e Reorganize typechecker tests
Now matches typechecker module structure, and a couple more tests were added to
test more behavior.
2021-08-05 13:17:49 -04:00
craigmc08
f25f206b91 Remove some useless comments 2021-08-05 13:17:49 -04:00
craigmc08
2f173bc8b7 Refactor TypeChecker unifyTypes
The dicttype case is more clear now
2021-08-05 13:17:49 -04:00
craigmc08
cf55594eda Refactor typechecker module
Move code into Analyzer.TypeChecker.Internal to clean up interface, change lots of
names to be more readable, add comments to explain the complex parts of typechecker
code.
2021-08-05 13:17:49 -04:00
craigmc08
5ab608b8f1 Refactor TypeError
Instead of just a string, now the possible errors are enumerated. Recursive
error structures are used for dictionary/list type errors. Tests are updated
to check behavior of the new type errors.
2021-08-05 13:17:49 -04:00
craigmc08
51b6cda07a Implement Decl, Enum type checking 2021-08-05 13:17:49 -04:00
craigmc08
0357921162 Implement type checking for lists and dictionaries
Currently fails to type check empty lists, because the requisite type
inference has not been added yet.
2021-08-05 13:17:49 -04:00
craigmc08
ce7ee253bd Implement type checking of literal expressions
Type checks literal expressions + variables. Tests are included for all of
these cases as well.
2021-08-05 13:17:49 -04:00
Martin Sosic
b1ff2566a1 Updated wasp version to 0.2.2.1. 2021-07-22 17:18:03 +02:00
Martin Sosic
7d73f4969b fix: Improved error message when route points to non-existing page (#286). 2021-07-22 17:13:49 +02:00
Martin Šošić
f7b203ed5c
Added more details on how we use ormolu for formatting 2021-07-22 15:43:47 +02:00
Martin Sosic
1ae8887a71 Updated wasp version to 0.2.2.0. 2021-07-22 13:43:27 +02:00
Martin Šošić
d86b53cb24
Merge pull request #279 from saatvikshah/auth_opt_out
Allow operations to opt out of auth middleware
2021-07-21 16:28:18 +02:00
Martin Sosic
748dfb5725 feat: Wasp can now run custom setup code on server start (#199). 2021-07-21 16:14:38 +02:00
Martin Sosic
0b02e45354 Formatted tests with ormolu. 2021-07-21 16:13:21 +02:00
Martin Sosic
29fd18dbcc Formatted with ormolu. 2021-07-21 16:05:55 +02:00
Saatvik Shah
d8bd9ce674 Add task counter to ToDo app 2021-07-20 21:37:35 +02:00
Saatvik Shah
3791b0ee7c Merge remote-tracking branch 'upstream/master' into auth_opt_out 2021-07-18 18:46:18 +02:00
Martin Sosic
d9d4ae378c docs: Design doc for custom server setup code. 2021-07-16 17:31:07 +02:00
Craig McIlwrath
be03c2a153
feat(analyzer): add new Analyzer module and implement parser
Implements the parser for the new wasp Analyzer. Additionally fixes some ambiguities/inconsistencies in the wasplang document.

Closes #274
2021-07-16 09:34:12 -04:00
Martin Sosic
deae726444 Added instructions for creating a design doc (DD). 2021-07-15 15:48:57 +02:00
Saatvik Shah
d0c5114a52 Address review comments 2021-07-09 08:04:29 +02:00
Saatvik Shah
c71eb58ea9 Merge remote-tracking branch 'upstream/master' into auth_opt_out 2021-07-05 21:26:47 +02:00
Saatvik Shah
a85b408b60 Allow operations to opt out of auth middleware
This patch allows operations to individually specify whether they want
to use or opt out of auth middleware, via an additional `auth` argument
under the actions/queries sections. If left unspecified it is assumed to
be true.

This is addressed by removing the current global auth middleware
registration, and adding it instead to individual operation route
specification.
2021-07-05 21:20:56 +02:00
Martin Sosic
eae7b20938 Replaced couple of last usages of Path with StrongPath. 2021-07-05 17:47:28 +02:00
Martin Sosic
3bae54c3e8 Added new migration to examples/todoApp. 2021-07-05 17:47:28 +02:00
Martin Sosic
7c7eaa5409 Updated StrongPath to 1.0.0.0, from Hackage. 2021-07-05 17:47:28 +02:00
Martin Sosic
e81635a1eb Updated wasp version to 0.2.1.0. 2021-06-29 16:51:45 +02:00
Craig McIlwrath
83b00d03ce
docs: Added documentation formally describing wasp lang 2021-06-17 14:58:46 -04:00
Trieu Huy Vu
a18be1ab27
feat(cli): CLI now supports bash completion (#224)
Co-authored-by: Trieu Vu <trieuv@strategicdata.com.au>
2021-06-16 13:40:31 +02:00
tolarianwiz
2d54d005e5
refactor: extract server npm dev dependencies
Now dev dependencies in package.json are no more hardcoded, instead they are generated (like dependencies) from ServerGenerator.hs and inserted as devDepsChunk.
2021-05-31 20:30:08 +02:00
Martin Sosic
dea6986d82 fix: 'wasp db migrate-dev' now works when interactivity is needed. Fixes #229 2021-05-20 14:35:46 +02:00
tolarianwiz
f363ed1c24 feat(cli): add 'wasp deps' command that lists dependencies used in the project by wasp (#238) 2021-05-20 14:15:36 +02:00
caz-gh
df619ff943 feat: add 'helmet' to node server dependencies 2021-05-19 16:40:56 +02:00
Martin Sosic
8d3e3830f4 fix: bumped Prisma version to 2.22.1. 2021-05-18 21:18:05 +02:00
Sameer Kolhar
092bb70db2
cli: clean up /build before wasp build (#230)
fix: build/ dir is now cleaned before creating new build (#230)
2021-05-17 16:10:08 +02:00
tolarianwiz
79bb1c7a82
Improved error message when wasp build detects that SQLite is used (#226)
Improved error message when wasp build detects that SQLite is used.
2021-05-11 16:34:32 +02:00
Martin Šošić
f399fa5076
Update README.md 2021-05-04 18:07:06 +02:00
Martin Sosic
1219a57bc9 Formatted whole codebase with ormolu. 2021-04-28 17:44:00 +02:00
Sameer Kolhar
6844313144 feat(cli): Enriched wasp telemetry CLI command to show more telemetry info. 2021-04-28 17:07:25 +02:00
Martin Sosic
dfaca5b58c Added -haddock flag to stack so that we have docs for all dependencies when developing. 2021-04-28 15:07:32 +02:00
Martin Sosic
21dcdb2e6b Small fixes in Haskell code, mostly haddock fixes. 2021-04-28 14:38:24 +02:00
Manikandan Sundararajan
bf6299c0dd fix(cli): Check if project name is valid when creating new project. 2021-04-27 18:12:30 +02:00
Martin Sosic
932912617e Added commit convention to README. 2021-04-26 20:29:35 +02:00
Martin Sosic
3a5c1cae73 Small updates in the waspc/README. 2021-04-26 18:16:37 +02:00
Martin Sosic
04f35b4e8f Updated wasp version to 0.2.0.1. 2021-04-25 08:46:31 +02:00
Martin Sosic
0d98334c88 Fixed GH actions. They now fully work, with releases. 2021-04-25 08:44:48 +02:00
Martin Sosic
fe73794566 Tiny fix in README. 2021-04-21 20:05:36 +02:00
Martin Sosic
40b6b0b5fc Updated wasp version to 0.2.0.0. 2021-04-21 14:22:55 +02:00
Martin Šošić
f9e8f88b66
Upgraded to Prisma 2.21 (stable migrations) + postgre can be used in local dev.
- `wasp db migrate-save` and `wasp db migrate-up` got replaced with `wasp db migrate-dev`.
- Wasp now has a declarative way to express which db is used, postgresql or sqlite: `db { system: PostgreSQL }`.
- Prisma is now at the latest version, 2.21. PSL parser was upgraded to work with this.
- PostgreSQL can now be used for local development.
- We migrated examples/realworld to work with this new version of Wasp.
2021-04-21 14:06:25 +02:00
Martin Sosic
57cd5a8a6f Updated wasp version to 0.1.11.0. 2021-04-16 13:01:48 +02:00
Martin Šošić
92937b5e65
Implemented support for dotenv file. (#208) 2021-04-16 12:43:57 +02:00
Martin Sosic
7c855f42df Bumped react-scripts version from 4.0.2 to 4.0.3. 2021-04-06 21:55:23 +02:00
Martin Sosic
ad50214e56 Updated wasp version to 0.1.10.2. 2021-03-30 23:42:48 +02:00
Martin Sosic
300b4caafe Switched from Control.Exception to UnliftIO.Exception, that handles async exceptions by default. 2021-03-30 23:41:20 +02:00
Martin Šošić
779cff3745
Enabled input in proxied CLI commands + fixed encoding of proxied output. (#202)
Co-authored-by: Matija Sosic <matija.sosic@gmail.com>
2021-03-15 17:11:04 +01:00
Martin Šošić
ad3bdd32ae
Implemented PSL model parser, used it for Entity. (#201) 2021-03-15 17:10:01 +01:00
Craig McIlwrath
82ea947981
Add ext/.waspignore file (#196) 2021-03-03 09:35:27 +01:00
Trieu Vu
2bb96cf9fb missing mustache delimiter 2021-02-23 12:08:02 +01:00
Trieu Vu
7eca9b37a3 generate userEntityLower for signup.js 2021-02-23 12:08:02 +01:00
Trieu Vu
4e95c4dcda remove createNewUser, use a direct call to prisma 2021-02-23 12:08:02 +01:00
Martin Šošić
b34d450f37
Clarified development steps in README 2021-02-23 12:00:56 +01:00
Sameer Kolhar
486ea76d19
cli: add telemetry command (#186) 2021-02-22 18:32:04 +01:00
Matija Sosic
696455d469 Updated wasp version to 0.1.10.1. 2021-02-22 16:10:37 +01:00
Matija Sosic
3eb926ef22
Fixes #187 - copying files from ext that do not exist. (#189) 2021-02-22 16:09:17 +01:00
Martin Sosic
19bba532a5 Updated linux/osx strings in installer telemetry to match cli telemetry values. 2021-02-11 22:35:52 +01:00
Martin Sosic
89300a9e0a Added very basic telemetry to installer script. 2021-02-11 22:26:30 +01:00
Martin Sosic
69d93911e1 Updated wasp version to 0.1.10.0. 2021-02-10 15:50:30 +01:00
Martin Sosic
80d6278798 Updated axios version in web app (to fix security vulnerability. 2021-02-09 22:26:32 +01:00
Martin Sosic
118a50b060 Updated CRA from 4.0.0 to 4.0.2 . 2021-02-09 21:13:08 +01:00
Martin Sosic
9c23b17b99 Added 'Wasp is in Alpha' note to CLI. 2021-02-09 17:29:08 +01:00
Jack Carroll
01642db6fa
Handle case when JWT token verification fails (#177)
* handle case when JWT token verification fails

* added more verbose error handling to to jwt verify

* updated error handling to throw unknown errors

* Fix

Co-authored-by: Martin Sosic <sosic.martin@gmail.com>
2021-02-09 17:00:31 +01:00
Martin Sosic
80ab13d4e4 Improved error message when node is missing or too low version. 2021-02-09 15:49:48 +01:00
Jack Carroll
d0ce3ed672
added documentation for bypassing stack build errors on macOS Big Sur (#179) 2021-02-09 15:40:32 +01:00
Martin Sosic
693cf13d69 Polished 'wasp new' template a little bit. 2021-02-09 14:31:00 +01:00
Matija Sosic
0207276a01
Added welcome page to the newly created app. (#178) 2021-02-09 13:13:51 +01:00
Martin Sosic
e32bca9007 Prettified CLI usage output. 2021-02-09 11:19:29 +01:00
Martin Sosic
e1aa7723b5 Cleaned up output on success from 'wasp new'. 2021-02-08 15:28:37 +01:00
Martin Sosic
819f11b7b3 Updated install script to be more user friendly. 2021-02-08 15:13:47 +01:00
Matija Sosic
f07f8e199b
Using material-ui in waspc todo example. (#171) 2021-02-06 13:41:22 +01:00
Martin Sosic
aada425e44 Updated wasp version to 0.1.9.7. 2021-02-05 14:43:34 +01:00
Martin Sosic
0e98099028 Added tracking of 'build' command in telemetry. 2021-02-05 14:40:46 +01:00
Martin Sosic
332fe32c4c compileIOWithOptions now has nicer code. 2021-02-05 12:18:12 +01:00
Martin Sosic
3ef8cf425f Updated wasp version to 0.1.9.6. 2021-02-04 17:46:14 +01:00
Martin Sosic
6abcf496c4 Fixed migrations not being copied on 'wasp build'. 2021-02-04 17:45:38 +01:00
Martin Sosic
cd015d59e8 Fixed missing isAuthEnabled in ToJSON for RouterTemplateData. 2021-02-04 14:54:50 +01:00
Martin Sosic
69bbc3268f Updated wasp version to 0.1.9.5. 2021-02-04 14:19:28 +01:00
Martin Sosic
ecd2fd36f2 Fixed places where auth stuff was used even when no auth. 2021-02-04 14:18:59 +01:00
Matija Sosic
316c727a8c
Implemented app.head property. (#170) 2021-02-04 11:42:01 +01:00
Martin Sosic
45015c4264 Updated wasp version to 0.1.9.4. 2021-02-03 19:38:27 +01:00
Martin Sosic
93b7ce3ea7 Fixed warnings in Haskell. 2021-02-03 19:38:10 +01:00
Martin Šošić
cfa6985abd
Added support for manual deployment of generated code (backend and frontend) (#167) 2021-02-03 19:26:14 +01:00
Matija Sosic
eddfe4c569 Updated wasp version to 0.1.9.3. 2021-02-01 17:54:55 +01:00
Matija Sosic
647814e920
Implemented "wasp build" cmd - generates different schema.prisma. (#166)
* Implemented "wasp build" cmd - generates different schema.prisma.

* PR fixes.
2021-02-01 17:37:42 +01:00
Matija Sosic
68155711e8
Implemented FE ACL & updated the examples. (#165)
* Implemented FE ACL & updated the examples.

* PR fixes, fixed tests.
2021-02-01 16:32:07 +01:00
Martin Sosic
181ae7894b Updated wasp version to 0.1.9.2. 2021-01-25 22:05:48 +01:00
Martin Sosic
57d847d6e3 Implemented CLI telemetry. 2021-01-25 22:00:10 +01:00
Matija Sosic
242c51f6a8
Made auth more flexible - not generating pages & routes anymore, just the forms. (#161) 2021-01-25 19:39:50 +01:00
Martin Sosic
56284ae7bc Updated wasp version to 0.1.9.1. 2020-12-18 11:29:09 +01:00
Martin Sosic
2d0eb0a967 Fix #159: error if 'auth' not defined. 2020-12-18 11:25:43 +01:00
Martin Sosic
7d7a2cb016 Updated wasp version to 0.1.9. 2020-12-10 15:54:57 +01:00
Martin Sosic
f52b719291 Fixed prisma version to 2.12.1 . 2020-12-10 15:54:17 +01:00
Martin Sosic
75e17f4dc4 Install script is now posix compliant. 2020-12-07 17:22:46 +01:00
Martin Sosic
6a4469c370 Merge branch 'master' into realworld 2020-12-01 11:54:57 +01:00
Matija Sosic
26cd45af88 Updated wasp version to 0.1.8. 2020-11-27 18:18:24 +01:00
Matija Sosic
6527319581
Added password hashing middleware to Prisma instance - dev cannot change/update password without it being hashed. (#149) 2020-11-27 18:11:54 +01:00