mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
refactored adapters to run test suites (#126)
* refactored adapters to run test suites * fix bun version for tests * added missing adapter tests and refactored examples to use `bknd.config.ts` where applicable
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { serveLambda } from "bknd/adapter/aws";
|
||||
import { serve } from "bknd/adapter/aws";
|
||||
|
||||
export const handler = serveLambda({
|
||||
export const handler = serve({
|
||||
// to get local assets, run `npx bknd copy-assets`
|
||||
// this is automatically done in `deploy.sh`
|
||||
assets: {
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "aws-lambda",
|
||||
"version": "1.0.0",
|
||||
"main": "index.mjs",
|
||||
"scripts": {
|
||||
"test": "esbuild index.mjs --bundle --format=cjs --platform=node --external:fs --outfile=dist/index.js && node test.js",
|
||||
"deploy": "./deploy.sh",
|
||||
"clean": "./clean.sh"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"bknd": "file:../../app/bknd-0.9.0-rc.1-11.tgz"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"dotenv": "^16.4.7"
|
||||
}
|
||||
"name": "aws-lambda",
|
||||
"version": "1.0.0",
|
||||
"main": "index.mjs",
|
||||
"scripts": {
|
||||
"test": "esbuild index.mjs --bundle --format=cjs --platform=node --external:fs --outfile=dist/index.js && node test.js",
|
||||
"deploy": "./deploy.sh",
|
||||
"clean": "./clean.sh"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"bknd": "file:../../app"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"dotenv": "^16.4.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@ const handler = require("./dist/index.js").handler;
|
||||
|
||||
const event = {
|
||||
httpMethod: "GET",
|
||||
path: "/",
|
||||
//path: "/api/system/config",
|
||||
//path: "/",
|
||||
path: "/api/system/config",
|
||||
//path: "/assets/main-B6sEDlfs.js",
|
||||
headers: {
|
||||
//"Content-Type": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "curl/7.64.1",
|
||||
Accept: "*/*",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user