@neondatabase/functions 0.2.0 → 0.3.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/README.md +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -1
- package/package.json +1 -6
- package/dist/v1.d.ts +0 -2
- package/dist/v1.js +0 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install @neondatabase/functions
|
|
|
13
13
|
The API mirrors [`@vercel/functions`](https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package): import `waitUntil` and call it directly with the promise you want to keep alive.
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
|
-
import { waitUntil } from "@neondatabase/functions
|
|
16
|
+
import { waitUntil } from "@neondatabase/functions";
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
19
|
async fetch(req: Request): Promise<Response> {
|
|
@@ -42,7 +42,7 @@ To make `waitUntil` resolve to a given invocation, wrap the handler with
|
|
|
42
42
|
code should not need it.
|
|
43
43
|
|
|
44
44
|
```ts
|
|
45
|
-
import { runWithRequestContext } from "@neondatabase/functions
|
|
45
|
+
import { runWithRequestContext } from "@neondatabase/functions";
|
|
46
46
|
|
|
47
47
|
runWithRequestContext({ waitUntil: realWaitUntil }, () => handler(req));
|
|
48
48
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NEON_FUNCTIONS_CONTEXT, NeonFunctionsContext, WaitUntil, runWithRequestContext, waitUntil } from "./lib/wait-until.js";
|
|
2
|
-
export { NEON_FUNCTIONS_CONTEXT, NeonFunctionsContext, WaitUntil, runWithRequestContext, waitUntil };
|
|
2
|
+
export { NEON_FUNCTIONS_CONTEXT, type NeonFunctionsContext, type WaitUntil, runWithRequestContext, waitUntil };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neondatabase/functions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Runtime helpers for Neon Functions. Currently provides a `waitUntil` primitive for deferring async work past a response.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"neon",
|
|
@@ -27,11 +27,6 @@
|
|
|
27
27
|
"types": "./dist/index.d.ts",
|
|
28
28
|
"import": "./dist/index.js",
|
|
29
29
|
"default": "./dist/index.js"
|
|
30
|
-
},
|
|
31
|
-
"./v1": {
|
|
32
|
-
"types": "./dist/v1.d.ts",
|
|
33
|
-
"import": "./dist/v1.js",
|
|
34
|
-
"default": "./dist/v1.js"
|
|
35
30
|
}
|
|
36
31
|
},
|
|
37
32
|
"files": [
|
package/dist/v1.d.ts
DELETED
package/dist/v1.js
DELETED