nextjs-middleware-stack 1.1.1 โ†’ 2.0.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 CHANGED
@@ -1,155 +1,186 @@
1
- # ๐Ÿšฃ๏ธ `middlewareStack` โ€“ A Lightweight Middleware Router for Next.js
1
+ # ๐Ÿšฃ `middlewareStack` โ€“ A Composable Middleware Router for Next.js
2
2
 
3
- A composable middleware stack for Next.js, supporting `string`-based route patterns (with dynamic parameters and wildcards), raw `RegExp` objects, and custom sync/async predicate functions.
3
+ A lightweight, composable middleware stack for Next.js that supports:
4
4
 
5
- Perfect for building layered request logic like authentication, logging, redirects, or feature flags in Next.js Edge or Node middlewares.
5
+ - `string` route patterns (with dynamic parameters & wildcards)
6
+ - Raw `RegExp`
7
+ - Sync/async predicate functions
8
+ - Strict `pipe()` composition API
9
+
10
+ Perfect for authentication gates, logging, redirects, feature flags, i18n integration, and layered request logic in Next.js Edge or Node runtimes.
6
11
 
7
12
  ---
8
13
 
9
14
  ## โœจ Features
10
15
 
11
- - โœ… Simple pattern matching with support for:
16
+ - โœ… Clean `pipe()` API (no tuple arrays)
17
+ - โœ… String pattern matching via `compare-path`
18
+
12
19
  - `:param` dynamic segments
13
- - `**` wildcards (greedy)
14
- - โœ… `RegExp` support
15
- - โœ… Custom `PatternFn` support: `(req) => boolean | Promise<boolean>`
16
- - โœ… Middleware short-circuiting (first matching response stops the stack)
17
- - โœ… Fully compatible with `next/server` and middleware in `apps/<name>/src/middleware.ts`
20
+ - `**` greedy wildcards
21
+
22
+ - โœ… Native `RegExp` support
23
+ - โœ… Sync or async predicate matching
24
+ - โœ… Middleware short-circuiting
25
+ - โœ… Edge & Node compatible
26
+ - โœ… Type-safe enforcement of `pipe()` usage
18
27
 
19
28
  ---
20
29
 
21
30
  ## ๐Ÿ“ฆ Installation
22
31
 
23
32
  ```bash
24
- npm install compare-path
33
+ npm install nextjs-middleware-stack
25
34
  ```
26
35
 
27
36
  ---
28
37
 
29
38
  ## ๐Ÿง  API
30
39
 
31
- ### `middlewareStack(routes: [Pattern, MiddlewareHandler][])`
40
+ ### `pipe(pattern, handler)`
32
41
 
33
- Creates a Next.js-compatible middleware handler from an ordered list of route matchers and handler functions.
42
+ Creates a middleware pipe.
34
43
 
35
44
  ```ts
36
45
  export type PatternFn = (req: Request) => boolean | Promise<boolean>
37
46
  export type Pattern = PatternFn | string | RegExp
38
47
  ```
39
48
 
40
- #### Parameters:
49
+ #### Parameters
50
+
51
+ - `pattern`
41
52
 
42
- - `routes`: An array of tuples where:
43
- - The first item is a `Pattern`:
44
- - a string pattern (e.g., `/users/:id`)
45
- - a `RegExp`
46
- - a function/async function `(req) => boolean | Promise<boolean>`
47
- - The second item is a handler function `(req: NextRequest) => Response | void | Promise<Response | void>`.
53
+ - string route shape (`/users/:id`)
54
+ - `RegExp`
55
+ - predicate function `(req) => boolean | Promise<boolean>`
48
56
 
49
- #### Returns:
57
+ - `handler`
50
58
 
51
- - A function `(req: NextRequest) => Promise<Response | void>` โ€“ ready to be exported as default from `middleware.ts`.
59
+ - `(req: Request) => Response | void | Promise<Response | void>`
60
+
61
+ > `pipe()` must be used. Raw `[pattern, handler]` tuples are not supported.
52
62
 
53
63
  ---
54
64
 
55
- ## ๐Ÿ“Š Supported Path Shapes
65
+ ### `middlewareStack(pipes)`
56
66
 
57
- You can use `string`-based shape patterns (powered by `compare-path`), `RegExp`, or predicate functions.
67
+ ```ts
68
+ middlewareStack(pipes: Pipe[])
69
+ ```
58
70
 
59
- | Shape | Matches Path Example |
60
- | --------------- | --------------------------- |
61
- | `/user/:id` | `/user/42` |
62
- | `/users/[id]` | `/users/42` (same as above) |
63
- | `/docs/**/edit` | `/docs/api/v1/intro/edit` |
64
- | `/a/:x/**/b/:y` | `/a/1/foo/bar/b/2` |
71
+ Creates a Next.js-compatible middleware handler from an ordered list of `pipe()` calls.
65
72
 
66
- > Use RegExp when you need full regex control.
73
+ Returns:
67
74
 
68
- Use a predicate function when matching depends on request headers, cookies, or any custom runtime logic.
75
+ ```ts
76
+ ;(req: Request) => Promise<Response | void>
77
+ ```
78
+
79
+ Ready to export as default from `middleware.ts`.
69
80
 
70
81
  ---
71
82
 
72
- ## ๐Ÿงช Example Usage (Auth Middleware)
83
+ ## ๐Ÿš€ Example (Authentication Middleware)
73
84
 
74
85
  ```ts
75
- // File: apps/example-app/src/middleware.ts
86
+ // apps/example-app/src/middleware.ts
76
87
  import { NextResponse } from 'next/server'
77
- import { middlewareStack } from './utils/middleware-stack'
88
+ import { middlewareStack, pipe } from 'nextjs-middleware-stack'
78
89
  import { validateAuthToken } from './utils/validate-jwt'
79
90
 
80
91
  export default middlewareStack([
81
- [
82
- /^\/dashboard\/.*/,
83
- async (req) => {
84
- const token = req.cookies.get('AUTH_TOKEN')?.value
85
- const isValid = token && (await validateAuthToken(token))
86
- if (!isValid) return NextResponse.redirect(new URL('/login', req.url))
87
- },
88
- ],
89
- [
90
- '/public/:page',
91
- async (req) => {
92
- console.log('Logging public page hit')
93
- },
94
- ],
92
+ pipe(/^\/dashboard\/.*/, async (req) => {
93
+ const token = req.cookies.get('AUTH_TOKEN')?.value
94
+ const isValid = token && (await validateAuthToken(token))
95
+
96
+ if (!isValid) {
97
+ return NextResponse.redirect(new URL('/login', req.url))
98
+ }
99
+ }),
100
+
101
+ pipe('/public/:page', async () => {
102
+ console.log('Public page hit')
103
+ }),
104
+
105
+ // Always run last
106
+ pipe(
107
+ () => true,
108
+ async () => {
109
+ console.log('Final middleware')
110
+ }
111
+ ),
95
112
  ])
96
113
  ```
97
114
 
98
115
  ---
99
116
 
100
- ## ๐Ÿงช Example with String Matching
117
+ ## ๐Ÿ“Š Supported Path Shapes
118
+
119
+ String patterns are powered by `compare-path`.
120
+
121
+ | Pattern | Matches |
122
+ | --------------- | ------------------------- |
123
+ | `/user/:id` | `/user/42` |
124
+ | `/users/[id]` | `/users/42` |
125
+ | `/docs/**/edit` | `/docs/api/v1/intro/edit` |
126
+ | `/a/:x/**/b/:y` | `/a/1/foo/bar/b/2` |
127
+
128
+ Use `RegExp` for advanced matching.
129
+
130
+ Use a predicate function when matching depends on:
131
+
132
+ - Cookies
133
+ - Headers
134
+ - Geo
135
+ - Runtime conditions
136
+ - Feature flags
137
+
138
+ ---
139
+
140
+ ## ๐Ÿงช Example: String Matching
101
141
 
102
142
  ```ts
103
- // File: apps/example-app/src/middleware.ts
104
- import { middlewareStack } from './utils/middleware-stack'
143
+ import { middlewareStack, pipe } from 'nextjs-middleware-stack'
105
144
 
106
145
  export default middlewareStack([
107
- [
108
- '/users/:id',
109
- async (req) => {
110
- // Handle specific user route
111
- },
112
- ],
113
- [
114
- 'cars/:id',
115
- async (req) => {
116
- // Same as above with different route
117
- },
118
- ],
119
- [
120
- 'hello/**',
121
- async (req) => {
122
- // Match anything starting with /hello/
123
- },
124
- ],
146
+ pipe('/users/:id', async (req) => {
147
+ // Handle specific user route
148
+ }),
149
+
150
+ pipe('cars/:id', async () => {
151
+ // Match /cars/123
152
+ }),
153
+
154
+ pipe('hello/**', async () => {
155
+ // Match anything under /hello/
156
+ }),
125
157
  ])
126
158
  ```
127
159
 
128
160
  ---
129
161
 
130
- ## ๐Ÿงช Example with `PatternFn`
162
+ ## ๐Ÿงช Example: Predicate Function
131
163
 
132
164
  ```ts
133
- import { middlewareStack } from './utils/middleware-stack'
165
+ import { middlewareStack, pipe } from 'nextjs-middleware-stack'
134
166
 
135
167
  export default middlewareStack([
136
- [
168
+ pipe(
137
169
  async (req) => {
138
- // Match only API requests that include an auth header
139
170
  return req.url.includes('/api/') && !!req.headers.get('authorization')
140
171
  },
141
- async (req) => {
142
- // Custom logic for authenticated API requests
143
- },
144
- ],
172
+ async () => {
173
+ console.log('Authenticated API request')
174
+ }
175
+ ),
145
176
  ])
146
177
  ```
147
178
 
148
179
  ---
149
180
 
150
- ## ๐Ÿงน Integration in Next.js
181
+ ## ๐Ÿงน Next.js Integration
151
182
 
152
- You must also export the `config` to ensure the middleware applies to your desired routes:
183
+ You must also export `config` to control where middleware runs:
153
184
 
154
185
  ```ts
155
186
  export const config = {
@@ -157,7 +188,6 @@ export const config = {
157
188
  '/((?!_next|.*\\..*).*)', // Skip static assets
158
189
  '/(api|trpc)(.*)', // Always include API routes
159
190
  ],
160
- runtime: 'nodejs',
161
191
  }
162
192
  ```
163
193
 
@@ -165,20 +195,50 @@ export const config = {
165
195
 
166
196
  ## ๐Ÿง  How It Works
167
197
 
168
- Internally, `middlewareStack` will iterate through your routes and:
198
+ For each request:
199
+
200
+ 1. Iterate through pipes in order.
201
+ 2. Evaluate the `pattern`.
202
+ 3. If matched โ†’ execute the `handler`.
203
+ 4. If the handler returns a `Response`, execution stops.
204
+ 5. Otherwise โ†’ continue to the next pipe.
169
205
 
170
- 1. Compare the current request to each route pattern (`compare-path`, `RegExp`, or `PatternFn`).
171
- 2. If matched, execute the handler.
172
- 3. If a `Response` is returned from the handler, it stops further execution and returns immediately.
206
+ Middleware order matters.
173
207
 
174
208
  ---
175
209
 
176
210
  ## ๐Ÿ’ก Tips
177
211
 
178
- - Middleware order matters! First match wins.
179
- - Use RegExp for more complex or legacy patterns.
180
- - Use string shapes for clean, readable routes with parameters.
181
- - Use `PatternFn` for request-aware matching (cookies, headers, auth, geo, etc).
212
+ - Place authentication gates before public routes.
213
+ - Put always-run middleware last:
214
+
215
+ ```ts
216
+ pipe(() => true, someMiddleware)
217
+ ```
218
+
219
+ - Prefer string shapes for readability.
220
+ - Use predicate functions for request-aware logic.
221
+ - Use `RegExp` only when necessary.
222
+
223
+ ---
224
+
225
+ ## โš ๏ธ Breaking Change (v2+)
226
+
227
+ `middlewareStack` now accepts **only `pipe()` entries**.
228
+
229
+ Old style:
230
+
231
+ ```ts
232
+ middlewareStack([[/regex/, handler]])
233
+ ```
234
+
235
+ is no longer supported.
236
+
237
+ Migration:
238
+
239
+ ```ts
240
+ middlewareStack([pipe(/regex/, handler)])
241
+ ```
182
242
 
183
243
  ---
184
244
 
package/dist/main.d.ts CHANGED
@@ -1,5 +1,30 @@
1
- export type MiddlewareHandler<T = Request, R = Response> = (req: T) => R | void | Promise<R | void>;
1
+ /** A middleware handler that can short-circuit by returning a Response. */
2
+ export type MiddlewareHandler<T = Request> = (req: T) => Response | void | Promise<Response | void>;
3
+ /** A pattern function can be sync or async. */
2
4
  export type PatternFn = (req: Request) => boolean | Promise<boolean>;
3
5
  export type Pattern = PatternFn | string | RegExp;
4
- export declare function middlewareStack<T = Request, R = Response>(routes: [Pattern, MiddlewareHandler<T, R>][]): (req: T) => Promise<R | void>;
6
+ /**
7
+ * Opaque/Branded "Pipe" type. Enforces that consumers MUST use pipe() (raw tuples won't
8
+ * type-check).
9
+ */
10
+ declare const PIPE_BRAND: unique symbol;
11
+ export type Pipe<T extends Request = Request> = Readonly<{
12
+ /** Brand */
13
+ [PIPE_BRAND]: true;
14
+ pattern: Pattern;
15
+ handler: MiddlewareHandler<T>;
16
+ }>;
17
+ /** Create a middleware pipe (pattern + handler). */
18
+ export declare function pipe<T extends Request = Request>(pattern: Pattern, handler: MiddlewareHandler<T>): Pipe<T>;
19
+ /**
20
+ * Create a middleware stack that executes pipes in order.
21
+ *
22
+ * - For each pipe: if pattern matches, run handler.
23
+ * - If handler returns a Response, short-circuit and return it.
24
+ * - Otherwise continue to the next pipe.
25
+ *
26
+ * NOTE: This version enforces "pipe() only" (no raw [pattern, handler] tuples).
27
+ */
28
+ export declare function middlewareStack<T extends Request = Request>(pipes: ReadonlyArray<Pipe<T>>): (req: T) => Promise<Response | void>;
29
+ export {};
5
30
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CA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AE,iBAAiB,CAAC,CAAC,CAAC,GAC5B,IAAI,CAAC,CAAC,CAAC,CAET;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAC1E,KAAK,CAAC,KAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAuBhD"}
package/dist/main.js CHANGED
@@ -9,25 +9,44 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.pipe = pipe;
12
13
  exports.middlewareStack = middlewareStack;
13
14
  const compare_path_1 = require("compare-path");
14
- function middlewareStack(routes) {
15
+ /**
16
+ * Opaque/Branded "Pipe" type. Enforces that consumers MUST use pipe() (raw tuples won't
17
+ * type-check).
18
+ */
19
+ const PIPE_BRAND = Symbol('PIPE_BRAND');
20
+ /** Create a middleware pipe (pattern + handler). */
21
+ function pipe(pattern, handler) {
22
+ return { pattern, handler, [PIPE_BRAND]: true };
23
+ }
24
+ /**
25
+ * Create a middleware stack that executes pipes in order.
26
+ *
27
+ * - For each pipe: if pattern matches, run handler.
28
+ * - If handler returns a Response, short-circuit and return it.
29
+ * - Otherwise continue to the next pipe.
30
+ *
31
+ * NOTE: This version enforces "pipe() only" (no raw [pattern, handler] tuples).
32
+ */
33
+ function middlewareStack(pipes) {
15
34
  return (req) => __awaiter(this, void 0, void 0, function* () {
16
35
  var _a, _b;
17
- // const url = (req as MaybeNextRequest).nextUrl?.pathname ?? (req as Request).url
18
- const currentUrl = (_b = (_a = req.nextUrl) === null || _a === void 0 ? void 0 : _a.pathname) !== null && _b !== void 0 ? _b : new URL(req.url).pathname;
19
- for (const [pattern, handler] of routes) {
36
+ for (const { pattern, handler } of pipes) {
37
+ // Recompute each iteration: a previous handler may mutate req.nextUrl.pathname
38
+ const pathname = (_b = (_a = req.nextUrl) === null || _a === void 0 ? void 0 : _a.pathname) !== null && _b !== void 0 ? _b : new URL(req.url).pathname;
20
39
  const isMatch = typeof pattern === 'string'
21
- ? (0, compare_path_1.comparePath)(pattern, currentUrl)
40
+ ? (0, compare_path_1.comparePath)(pattern, pathname)[0]
22
41
  : pattern instanceof RegExp
23
- ? pattern.test(currentUrl)
42
+ ? pattern.test(pathname)
24
43
  : typeof pattern === 'function'
25
44
  ? yield pattern(req)
26
45
  : false;
27
46
  if (isMatch) {
28
47
  const result = yield handler(req);
29
- if (result)
30
- return result; // short-circuit if a handler returns a response
48
+ if (result !== undefined)
49
+ return result;
31
50
  }
32
51
  }
33
52
  });
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;AAMA,0CAyBC;AA/BD,+CAA0C;AAM1C,SAAgB,eAAe,CAC7B,MAA4C;IAE5C,OAAO,CAAO,GAAM,EAAqB,EAAE;;QAEzC,kFAAkF;QAClF,MAAM,UAAU,GACd,MAAA,MAAC,GAAwB,CAAC,OAAO,0CAAE,QAAQ,mCAAI,IAAI,GAAG,CAAE,GAAe,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAA;QAEvF,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,MAAM,EAAE,CAAC;YACxC,MAAM,OAAO,GACX,OAAO,OAAO,KAAK,QAAQ;gBACzB,CAAC,CAAC,IAAA,0BAAW,EAAC,OAAO,EAAE,UAAU,CAAC;gBAClC,CAAC,CAAC,OAAO,YAAY,MAAM;oBAC3B,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;oBAC1B,CAAC,CAAC,OAAO,OAAO,KAAK,UAAU;wBAC/B,CAAC,CAAC,MAAM,OAAO,CAAC,GAAc,CAAC;wBAC/B,CAAC,CAAC,KAAK,CAAA;YAEX,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM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AAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;gBACjC,IAAI,MAAM,KAAK,SAAS;oBAAE,OAAO,MAAM,CAAA;YACzC,CAAC;QACH,CAAC;IACH,CAAC,CAAA,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextjs-middleware-stack",
3
- "version": "1.1.1",
3
+ "version": "2.0.0",
4
4
  "description": "Composable route-based middleware for Next.js Middleware.",
5
5
  "author": "Islam Yamor",
6
6
  "license": "Apache-2.0",