@certik/serverless-api 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 2.2.0
2
+
3
+ - added export for getRoutes in dev.ts
4
+
5
+ # 2.1.0
6
+
7
+ - added exports field to package.json mapping subpaths to dist/ counterparts
8
+
1
9
  # 2.0.0
2
10
 
3
11
  - Migrate the whole repo to typescript
package/README.md CHANGED
@@ -16,8 +16,8 @@ Create a `start-dev.js` file for dev
16
16
 
17
17
  ```
18
18
  import pathModule from "node:path";
19
- import { dirname, startLocalApp, getRoutes } from "@certik/serverless-api/dev.js";
20
- import { handler } from "@certik/serverless-api/entrypoint.js";
19
+ import { dirname, startLocalApp, getRoutes } from "@certik/serverless-api/dev";
20
+ import { handler } from "@certik/serverless-api/entrypoint";
21
21
 
22
22
  async function main() {
23
23
  const routes = await getRoutes(
@@ -37,7 +37,7 @@ Create a `deploy.js` file for pulumi deployment
37
37
 
38
38
  ```
39
39
  import pathModule from "node:path";
40
- import { dirname, createPulumiAPIApp, getRoutes } from "@certik/serverless-api/dev.js";
40
+ import { dirname, createPulumiAPIApp, getRoutes } from "@certik/serverless-api/dev";
41
41
 
42
42
  export default async function main() {
43
43
  return createPulumiAPIApp({
package/dist/dev.d.ts CHANGED
@@ -5,4 +5,6 @@
5
5
  * without pulling in the full library.
6
6
  */
7
7
  export { startLocalApp } from "./lib/dev.js";
8
+ export { getRoutes } from "./lib/routes.js";
9
+ export { dirname } from "./lib/path.js";
8
10
  //# sourceMappingURL=dev.d.ts.map
package/dist/dev.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
package/dist/dev.js CHANGED
@@ -5,4 +5,6 @@
5
5
  * without pulling in the full library.
6
6
  */
7
7
  export { startLocalApp } from "./lib/dev.js";
8
+ export { getRoutes } from "./lib/routes.js";
9
+ export { dirname } from "./lib/path.js";
8
10
  //# sourceMappingURL=dev.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/serverless-api",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "description": "A library that supports quick development and deployment for AWS lambda based serverless APIs",
5
5
  "license": "MIT",
6
6
  "author": "CertiK Engineering",
@@ -14,6 +14,28 @@
14
14
  "type": "module",
15
15
  "main": "dist/index.js",
16
16
  "types": "dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js"
21
+ },
22
+ "./dev": {
23
+ "types": "./dist/dev.d.ts",
24
+ "import": "./dist/dev.js"
25
+ },
26
+ "./entrypoint": {
27
+ "types": "./dist/entrypoint.d.ts",
28
+ "import": "./dist/entrypoint.js"
29
+ },
30
+ "./handler": {
31
+ "types": "./dist/handler.d.ts",
32
+ "import": "./dist/handler.js"
33
+ },
34
+ "./deploy": {
35
+ "types": "./dist/deploy.d.ts",
36
+ "import": "./dist/deploy.js"
37
+ }
38
+ },
17
39
  "scripts": {
18
40
  "build": "tsc",
19
41
  "start": "doppler run -- bun --watch start-dev.ts",
@@ -25,7 +47,6 @@
25
47
  "up:production": "doppler run --config prd -- pulumi up --stack production",
26
48
  "down": "doppler run -- pulumi down --stack dev",
27
49
  "down:production": "doppler run --config prd -- pulumi down --stack production",
28
- "prepare": "husky",
29
50
  "prepublishOnly": "tsc",
30
51
  "pub": "npm publish --access public"
31
52
  },
@@ -41,14 +62,10 @@
41
62
  "@types/node": "^25.3.3",
42
63
  "husky": "^9.1.7",
43
64
  "lint-staged": "^16.3.1",
44
- "oxfmt": "^0.35.0",
65
+ "oxfmt": "^0.36.0",
45
66
  "oxlint": "^1.50.0",
46
67
  "typescript": "^5.7.0"
47
68
  },
48
- "lint-staged": {
49
- "*.{ts,js}": "oxlint",
50
- "*": "oxfmt --no-error-on-unmatched-pattern"
51
- },
52
69
  "engines": {
53
70
  "node": ">= 20"
54
71
  }