@vercel/queue 0.0.0-alpha.17 → 0.0.0-alpha.18
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 +7 -7
- package/bin/local-discover.js +6 -6
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -41,10 +41,10 @@ vc env pull
|
|
|
41
41
|
|
|
42
42
|
### Next.js Lazy Loading
|
|
43
43
|
|
|
44
|
-
For Next.js API routes (or others that are lazy-loaded), run this simple command to
|
|
44
|
+
For Next.js API routes (or others that are lazy-loaded), run this simple command to initialize handlers:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
npx
|
|
47
|
+
npx vercel-queue-local-init
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
That's it! The script reads your `vercel.json`, finds your queue handlers, and triggers Next.js to load them.
|
|
@@ -55,8 +55,8 @@ That's it! The script reads your `vercel.json`, finds your queue handlers, and t
|
|
|
55
55
|
# Start your dev server
|
|
56
56
|
npm run dev
|
|
57
57
|
|
|
58
|
-
#
|
|
59
|
-
npx
|
|
58
|
+
# Initialize handlers (only needed for Next.js lazy loading)
|
|
59
|
+
npx vercel-queue-local-init
|
|
60
60
|
|
|
61
61
|
# Send messages - they process locally automatically!
|
|
62
62
|
```
|
|
@@ -65,13 +65,13 @@ npx @vercel/queue/local-discover
|
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
# Custom port
|
|
68
|
-
npx
|
|
68
|
+
npx vercel-queue-local-init --port 3001
|
|
69
69
|
|
|
70
70
|
# Different config file
|
|
71
|
-
npx
|
|
71
|
+
npx vercel-queue-local-init --config ./my-vercel.json
|
|
72
72
|
|
|
73
73
|
# Skip vercel.json, use defaults
|
|
74
|
-
npx
|
|
74
|
+
npx vercel-queue-local-init --no-vercel-config
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
### TypeScript Configuration
|
package/bin/local-discover.js
CHANGED
|
@@ -10,10 +10,10 @@ const path = require("path");
|
|
|
10
10
|
|
|
11
11
|
function showHelp() {
|
|
12
12
|
console.log(`
|
|
13
|
-
@vercel/queue local-
|
|
13
|
+
@vercel/queue local-init - Initialize queue handlers in local development
|
|
14
14
|
|
|
15
15
|
USAGE:
|
|
16
|
-
npx
|
|
16
|
+
npx vercel-queue-local-init [options]
|
|
17
17
|
|
|
18
18
|
OPTIONS:
|
|
19
19
|
--port <number> Port number for Next.js dev server (default: 3000)
|
|
@@ -22,10 +22,10 @@ OPTIONS:
|
|
|
22
22
|
--help, -h Show this help message
|
|
23
23
|
|
|
24
24
|
EXAMPLES:
|
|
25
|
-
npx
|
|
26
|
-
npx
|
|
27
|
-
npx
|
|
28
|
-
npx
|
|
25
|
+
npx vercel-queue-local-init
|
|
26
|
+
npx vercel-queue-local-init --port 3001
|
|
27
|
+
npx vercel-queue-local-init --config ./my-vercel.json
|
|
28
|
+
npx vercel-queue-local-init --no-vercel-config
|
|
29
29
|
`);
|
|
30
30
|
}
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/queue",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.18",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.mjs",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
|
+
"bin": {
|
|
12
|
+
"vercel-queue-local-init": "./bin/local-discover.js"
|
|
13
|
+
},
|
|
11
14
|
"exports": {
|
|
12
15
|
".": {
|
|
13
16
|
"import": {
|
|
@@ -18,8 +21,7 @@
|
|
|
18
21
|
"types": "./dist/index.d.ts",
|
|
19
22
|
"default": "./dist/index.js"
|
|
20
23
|
}
|
|
21
|
-
}
|
|
22
|
-
"./local-discover": "./bin/local-discover.js"
|
|
24
|
+
}
|
|
23
25
|
},
|
|
24
26
|
"files": [
|
|
25
27
|
"dist",
|