-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adam McKee
committed
Nov 5, 2024
1 parent
cb3fa0f
commit 4c708c6
Showing
15 changed files
with
353 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 @@ | ||
{ | ||
"path": "routes/data/lambda.js" | ||
} |
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 @@ | ||
[ | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": "Identical" | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
fn_build/fixtures/swc/nodejs/js/http_route/expect_release.json
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,8 @@ | ||
[ | ||
{ | ||
"path": "routes/data/lambda.js", | ||
"result": { | ||
"Content": "export const DELETE=()=>{console.log(\"delete\")};" | ||
} | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
fn_build/fixtures/swc/nodejs/js/http_route/routes/data/lambda.js
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,3 @@ | ||
export const DELETE = () => { | ||
console.log('delete') | ||
} |
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,21 @@ | ||
use std::path::PathBuf; | ||
|
||
#[derive(Clone, Eq, Hash, PartialEq)] | ||
pub enum BuildMode { | ||
Debug, | ||
Release, | ||
} | ||
|
||
pub type FnBuildOutput = PathBuf; | ||
|
||
// pub enum FnBuildOutput { | ||
// Archive(PathBuf), | ||
// Directory(PathBuf), | ||
// } | ||
|
||
pub struct FnBuildSpec { | ||
pub entrypoint: PathBuf, | ||
pub mode: BuildMode, | ||
pub output: FnBuildOutput, | ||
pub project_dir: PathBuf, | ||
} |
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,22 @@ | ||
use crate::spec::FnBuildSpec; | ||
use crate::swc::build_js_fn; | ||
use crate::testing::{run_fixtures, BuildProcess, BuildProcessResult}; | ||
use std::path::PathBuf; | ||
use std::sync::Arc; | ||
|
||
struct JavaScriptBuild {} | ||
|
||
impl BuildProcess for JavaScriptBuild { | ||
fn build(&self, build_spec: FnBuildSpec) -> BuildProcessResult { | ||
Box::pin(build_js_fn(build_spec)) | ||
} | ||
} | ||
|
||
#[tokio::test] | ||
pub async fn test_nodejs_js_fixtures() { | ||
run_fixtures( | ||
Arc::new(Box::new(JavaScriptBuild {})), | ||
PathBuf::from("fixtures/swc/nodejs/js"), | ||
) | ||
.await; | ||
} |
Oops, something went wrong.