-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds
wasp deploy
CLI command for Fly.io (#961)
- Loading branch information
1 parent
979904d
commit b14ed94
Showing
41 changed files
with
4,478 additions
and
20 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Wasp.Cli.Command.Deploy | ||
( deploy, | ||
) | ||
where | ||
|
||
import Control.Monad.IO.Class (liftIO) | ||
import System.Environment (getExecutablePath) | ||
import Wasp.Cli.Command (Command) | ||
import Wasp.Cli.Command.Common (findWaspProjectRootDirFromCwd) | ||
import qualified Wasp.Lib as Lib | ||
|
||
deploy :: [String] -> Command () | ||
deploy cmdArgs = do | ||
waspProjectDir <- findWaspProjectRootDirFromCwd | ||
liftIO $ do | ||
-- `getExecutablePath` has some caveats: https://frasertweedale.github.io/blog-fp/posts/2022-05-10-improved-executable-path-queries.html | ||
-- Once we upgrade to GHC 9.4 we should change to `executablePath`, but this should be ok for our purposes. | ||
waspExePath <- getExecutablePath | ||
Lib.deploy waspExePath waspProjectDir cmdArgs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages |
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,83 @@ | ||
module.exports = { | ||
"env": { | ||
"es2020": true, | ||
"node": true | ||
}, | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 11, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
"tab" | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"eol-last": [ | ||
"error", | ||
"always" | ||
], | ||
"no-multiple-empty-lines": [ | ||
"error", | ||
{ | ||
"max": 2, | ||
"maxEOF": 1 | ||
} | ||
], | ||
"comma-spacing": [ | ||
"error", | ||
{ "before": false, "after": true } | ||
], | ||
"space-before-function-paren": ["error", { | ||
"anonymous": "always", | ||
"named": "never", | ||
"asyncArrow": "always" | ||
}], | ||
"comma-dangle": [ | ||
"error", | ||
"always-multiline" | ||
], | ||
"object-curly-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"padding-line-between-statements": [ | ||
"error", | ||
{ "blankLine": "always", "prev": "function", "next": "function" }, | ||
{ "blankLine": "always", "prev": "function", "next": "export" }, | ||
{ "blankLine": "always", "prev": "export", "next": "function" }, | ||
{ "blankLine": "always", "prev": "export", "next": "export" } | ||
], | ||
"no-duplicate-imports": "error", | ||
"@typescript-eslint/semi": [ | ||
"error", | ||
"always" | ||
], | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
} | ||
} | ||
], | ||
"@typescript-eslint/explicit-module-boundary-types": "error" | ||
} | ||
} |
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,2 @@ | ||
node_modules | ||
dist |
Empty file.
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,6 @@ | ||
To run the deploy package as a standalone TS project, run: | ||
```sh | ||
npm install | ||
npm run build | ||
node dist/index.js fly ... | ||
``` |
Oops, something went wrong.