Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions waspc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Remember to check out the [migration guide](https://wasp.sh/docs/0.27/migration-
- `HttpError` moved from `wasp/server` to `wasp/errors`. ([#5379](https://github.com/wasp-lang/wasp/pull/5379))
- `HttpError`'s third argument is now an options object, so its data is passed as `new HttpError(403, "Not allowed", { data })`. ([#5379](https://github.com/wasp-lang/wasp/pull/5379))
- On the client, failed requests now throw an `HttpError`, whose `data` is the `data` the error was thrown with on the server. Before, they threw an undocumented error whose `data` held the whole response body. ([#5379](https://github.com/wasp-lang/wasp/pull/5379))
- Removed `wasp start db`. Use `wasp db start` instead, or let `wasp start` start the dev database for you. ([#5399](https://github.com/wasp-lang/wasp/pull/5399))

### 🎉 New Features

Expand Down
11 changes: 2 additions & 9 deletions waspc/cli/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import Wasp.Cli.Command.CreateNewProject.AvailableTemplates (availableStarterTem
import qualified Wasp.Cli.Command.Db.Migrate as Command.Db.Migrate
import qualified Wasp.Cli.Command.Db.Reset as Command.Db.Reset
import qualified Wasp.Cli.Command.Db.Seed as Command.Db.Seed
import qualified Wasp.Cli.Command.Db.Start as Command.Db.Start
import qualified Wasp.Cli.Command.Db.Studio as Command.Db.Studio
import Wasp.Cli.Command.Deploy (deploy)
import Wasp.Cli.Command.Deps (deps)
Expand All @@ -32,7 +33,6 @@ import Wasp.Cli.Command.Install (install)
import Wasp.Cli.Command.News (news)
import Wasp.Cli.Command.Show (showCommand)
import Wasp.Cli.Command.Start (start)
import qualified Wasp.Cli.Command.Start.Db as Command.Start.Db
import Wasp.Cli.Command.Studio (studio)
import qualified Wasp.Cli.Command.Telemetry as Telemetry
import Wasp.Cli.Command.Uninstall (uninstall)
Expand Down Expand Up @@ -60,7 +60,6 @@ main = withUtf8 . (`E.catch` handleInternalErrors) $ do
let commandCall = case args of
[helpArg] | isHelpArg helpArg -> Command.Call.Help
("new" : newArgs) -> Command.Call.New newArgs
("start" : "db" : startDbArgs) -> Command.Call.StartDb startDbArgs
("start" : startArgs) -> Command.Call.Start startArgs
["clean"] -> Command.Call.Clean
["install"] -> Command.Call.Install
Expand Down Expand Up @@ -89,7 +88,6 @@ main = withUtf8 . (`E.catch` handleInternalErrors) $ do
case commandCall of
Command.Call.New newArgs -> runCommand $ createNewProject newArgs
Command.Call.Start startArgs -> runCommand $ start startArgs
Command.Call.StartDb startDbArgs -> runCommand $ Command.Start.Db.start startDbArgs
Command.Call.Clean -> runCommand clean
Command.Call.Install -> runCommand install
Command.Call.Compile -> runCommand compileCommand
Expand Down Expand Up @@ -168,10 +166,6 @@ printUsage =
" If not specified, Wasp picks the first free port when the default one is taken.",
" Optionally specify the URLs the client and the server are reachable at,",
" if they differ from http://localhost:<port> (e.g. a LAN hostname or an HTTPS tunnel).",
cmd " start db [--db-port <port>] [--db-image <image>] [--db-volume-mount-path <path>]",
" Starts managed development database for you.",
" Optionally specify a custom port, Docker image, or Docker volume mount path.",
" If the port is not specified, Wasp picks the first free port when the default one is taken.",
cmd " db <db-cmd> [args] Executes a database command. Run 'wasp db help' for more info.",
cmd " install Sets up all internal Wasp npm dependencies and runs npm install.",
cmd " clean Deletes the generated app, all cached artifacts, and the node_modules dir.",
Expand Down Expand Up @@ -220,7 +214,7 @@ dbCli :: [String] -> IO ()
dbCli args = case args of
[helpArg] | isHelpArg helpArg -> printDbUsage
-- These commands don't require an existing and running database.
"start" : optionalStartArgs -> runCommand $ Command.Start.Db.start optionalStartArgs
"start" : optionalStartArgs -> runCommand $ Command.Db.Start.start optionalStartArgs
-- These commands require an existing and running database.
"reset" : resetArgs -> runCommand $ withArguments Command.Db.Reset.resetArgsParser Command.Db.Reset.reset resetArgs
"migrate-dev" : optionalMigrateArgs -> runCommand $ withArguments Command.Db.Migrate.migrateArgsParser Command.Db.Migrate.migrateDev optionalMigrateArgs
Expand All @@ -239,7 +233,6 @@ printDbUsage =
title "COMMANDS",
cmd $ intercalate "\n" [
" start [--db-port <port>] [--db-image <image>] [--db-volume-mount-path <path>]",
" Alias for `wasp start db`.",
" Starts managed development database for you.",
" Optionally specify a custom port, Docker image, or Docker volume mount path.",
" If the port is not specified, Wasp picks the first free port when the default one is taken."
Expand Down
1 change: 0 additions & 1 deletion waspc/cli/src/Wasp/Cli/Command/Call.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module Wasp.Cli.Command.Call where
data Call
= New Arguments
| Start Arguments
| StartDb Arguments
| Clean
| Install
| Uninstall Arguments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Wasp.Cli.Command.Start.Db
module Wasp.Cli.Command.Db.Start
( start,
)
where
Expand Down Expand Up @@ -40,4 +40,4 @@ start = withArguments startDbArgsParser $ \devDbOptions -> do
"Nothing to do! You are all good, you are using SQLite which doesn't need to be started."

startDbArgsParser :: ArgsParser DevDbOptions
startDbArgsParser = ArgsParser "wasp start db" devDbOptionsParser
startDbArgsParser = ArgsParser "wasp db start" devDbOptionsParser
4 changes: 0 additions & 4 deletions waspc/e2e-tests/ShellCommands.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module ShellCommands
waspCliBuild,
waspCliBuildStart,
waspCliStart,
waspCliStartDb,
waspCliClean,
waspCliStudio,
waspCliDbStudio,
Expand Down Expand Up @@ -190,9 +189,6 @@ waspCliCompile = return "$WASP_CLI_CMD compile"
waspCliStart :: ShellCommandBuilder WaspProjectContext ShellCommand
waspCliStart = return "$WASP_CLI_CMD start"

waspCliStartDb :: ShellCommandBuilder WaspProjectContext ShellCommand
waspCliStartDb = return "$WASP_CLI_CMD start db"

waspCliBuild :: ShellCommandBuilder WaspProjectContext ShellCommand
waspCliBuild = return "$WASP_CLI_CMD build"

Expand Down
4 changes: 2 additions & 2 deletions waspc/e2e-tests/Tests/WaspSpecAvailableTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ShellCommands
waspCliCompile,
waspCliCompletion,
waspCliDbReset,
waspCliDbStart,
waspCliDeploy,
waspCliDeps,
waspCliDockerfile,
Expand All @@ -23,7 +24,6 @@ import ShellCommands
waspCliShowBuild,
waspCliShowSpec,
waspCliStart,
waspCliStartDb,
waspCliStudio,
waspCliTelemetry,
waspCliVersion,
Expand Down Expand Up @@ -53,7 +53,7 @@ waspSpecAvailableTest =
waspCliStudio,
waspCliDbReset,
waspCliDeploy ["fly", "setup"],
waspCliStartDb,
waspCliDbStart,
waspCliStart
]
]
Expand Down
2 changes: 1 addition & 1 deletion waspc/waspc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ library cli-lib
Wasp.Cli.Command.Db.Migrate
Wasp.Cli.Command.Db.Reset
Wasp.Cli.Command.Db.Seed
Wasp.Cli.Command.Db.Start
Wasp.Cli.Command.Db.Studio
Wasp.Cli.Command.Deploy
Wasp.Cli.Command.Deps
Expand All @@ -506,7 +507,6 @@ library cli-lib
Wasp.Cli.Command.Show.Table
Wasp.Cli.Command.Start
Wasp.Cli.Command.Start.ArgumentsParser
Wasp.Cli.Command.Start.Db
Wasp.Cli.Command.Studio
Wasp.Cli.Command.Telemetry
Wasp.Cli.Command.Telemetry.Common
Expand Down
Loading