@visulima/connect 3.0.17 → 3.0.19
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 +22 -0
- package/README.md +2 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +0 -9
- package/dist/index.d.mts +0 -9
- package/dist/index.d.ts +0 -9
- package/dist/index.mjs +3 -3
- package/dist/packem_shared/{EdgeRouter-CFgSlm_Z.mjs → EdgeRouter-D0oWFTsY.mjs} +1 -1
- package/dist/packem_shared/{EdgeRouter-TBKA2Kga.cjs → EdgeRouter-DxN8Qadz.cjs} +1 -1
- package/dist/packem_shared/{Router-C6WMSlDY.cjs → Router-Bh6INaMr.cjs} +2 -2
- package/dist/packem_shared/{Router-T36iDyOm.mjs → Router-CcNSmWZS.mjs} +2 -2
- package/dist/packem_shared/{createRouter-wIi6EqTp.mjs → createRouter-Cnl03FK3.mjs} +2 -2
- package/dist/packem_shared/{createRouter-L_jA7a27.cjs → createRouter-mXdLB4lt.cjs} +2 -2
- package/package.json +2 -66
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## @visulima/connect [3.0.19](https://github.com/visulima/visulima/compare/@visulima/connect@3.0.18...@visulima/connect@3.0.19) (2025-03-07)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* updated @visulima/packem and other dev deps, for better bundling size ([e940581](https://github.com/visulima/visulima/commit/e9405812201594e54dd81d17ddb74177df5f3c24))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous Chores
|
|
8
|
+
|
|
9
|
+
* updated dev dependencies ([487a976](https://github.com/visulima/visulima/commit/487a976932dc7c39edfc19ffd3968960ff338066))
|
|
10
|
+
|
|
11
|
+
## @visulima/connect [3.0.18](https://github.com/visulima/visulima/compare/@visulima/connect@3.0.17...@visulima/connect@3.0.18) (2025-01-25)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* fixed wrong node version range in package.json ([4ae2929](https://github.com/visulima/visulima/commit/4ae292984681c71a770e4d4560432f7b7c5a141a))
|
|
16
|
+
|
|
17
|
+
### Miscellaneous Chores
|
|
18
|
+
|
|
19
|
+
* fixed typescript url ([fe65a8c](https://github.com/visulima/visulima/commit/fe65a8c0296ece7ee26474c70d065b06d4d0da89))
|
|
20
|
+
* updated all dev dependencies ([37fb298](https://github.com/visulima/visulima/commit/37fb298b2af7c63be64252024e54bb3af6ddabec))
|
|
21
|
+
* updated all dev dependencies and all dependencies in the app folder ([87f4ccb](https://github.com/visulima/visulima/commit/87f4ccbf9f7900ec5b56f3c1477bc4a0ef571bcf))
|
|
22
|
+
|
|
1
23
|
## @visulima/connect [3.0.17](https://github.com/visulima/visulima/compare/@visulima/connect@3.0.16...@visulima/connect@3.0.17) (2025-01-12)
|
|
2
24
|
|
|
3
25
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -621,7 +621,8 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
621
621
|
The visulima connect is open-sourced software licensed under the [MIT][license-url]
|
|
622
622
|
|
|
623
623
|
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
624
|
-
|
|
624
|
+
|
|
625
|
+
[typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript"
|
|
625
626
|
[license-image]: https://img.shields.io/npm/l/@visulima/connect?color=blueviolet&style=for-the-badge
|
|
626
627
|
[license-url]: LICENSE.md "license"
|
|
627
628
|
[npm-image]: https://img.shields.io/npm/v/@visulima/connect/latest.svg?style=for-the-badge&logo=npm
|
package/dist/index.cjs
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
|
|
5
5
|
const expressWrapper = require('./packem_shared/expressWrapper-Cp6GmLZm.cjs');
|
|
6
6
|
const withZod = require('./packem_shared/withZod-DdTDLdDj.cjs');
|
|
7
|
-
const EdgeRouter = require('./packem_shared/EdgeRouter-
|
|
8
|
-
const createRouter = require('./packem_shared/createRouter-
|
|
9
|
-
const Router = require('./packem_shared/Router-
|
|
7
|
+
const EdgeRouter = require('./packem_shared/EdgeRouter-DxN8Qadz.cjs');
|
|
8
|
+
const createRouter = require('./packem_shared/createRouter-mXdLB4lt.cjs');
|
|
9
|
+
const Router = require('./packem_shared/Router-Bh6INaMr.cjs');
|
|
10
10
|
const sendJson = require('./packem_shared/sendJson-CvRoSFt-.cjs');
|
|
11
11
|
|
|
12
12
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import * as zod from 'zod';
|
|
3
2
|
import { AnyZodObject, ZodObject } from 'zod';
|
|
4
3
|
|
|
5
4
|
type HttpMethod = "CONNECT" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "TRACE";
|
|
@@ -86,14 +85,6 @@ declare const createRouter: <Request extends IncomingMessage, Response extends S
|
|
|
86
85
|
body?: AnyZodObject;
|
|
87
86
|
headers?: AnyZodObject;
|
|
88
87
|
query?: AnyZodObject;
|
|
89
|
-
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
|
|
90
|
-
body?: unknown;
|
|
91
|
-
headers?: unknown;
|
|
92
|
-
query?: unknown;
|
|
93
|
-
}, {
|
|
94
|
-
body?: unknown;
|
|
95
|
-
headers?: unknown;
|
|
96
|
-
query?: unknown;
|
|
97
88
|
}>>(options?: HandlerOptions<RoutesExtendedRequestHandler<Request, Response, Response, Route<Nextable<FunctionLike>>[]>>) => NodeRouter<Request, Response, Schema>;
|
|
98
89
|
|
|
99
90
|
type NextFunction = (error?: any) => void;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import * as zod from 'zod';
|
|
3
2
|
import { AnyZodObject, ZodObject } from 'zod';
|
|
4
3
|
|
|
5
4
|
type HttpMethod = "CONNECT" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "TRACE";
|
|
@@ -86,14 +85,6 @@ declare const createRouter: <Request extends IncomingMessage, Response extends S
|
|
|
86
85
|
body?: AnyZodObject;
|
|
87
86
|
headers?: AnyZodObject;
|
|
88
87
|
query?: AnyZodObject;
|
|
89
|
-
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
|
|
90
|
-
body?: unknown;
|
|
91
|
-
headers?: unknown;
|
|
92
|
-
query?: unknown;
|
|
93
|
-
}, {
|
|
94
|
-
body?: unknown;
|
|
95
|
-
headers?: unknown;
|
|
96
|
-
query?: unknown;
|
|
97
88
|
}>>(options?: HandlerOptions<RoutesExtendedRequestHandler<Request, Response, Response, Route<Nextable<FunctionLike>>[]>>) => NodeRouter<Request, Response, Schema>;
|
|
98
89
|
|
|
99
90
|
type NextFunction = (error?: any) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import * as zod from 'zod';
|
|
3
2
|
import { AnyZodObject, ZodObject } from 'zod';
|
|
4
3
|
|
|
5
4
|
type HttpMethod = "CONNECT" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "TRACE";
|
|
@@ -86,14 +85,6 @@ declare const createRouter: <Request extends IncomingMessage, Response extends S
|
|
|
86
85
|
body?: AnyZodObject;
|
|
87
86
|
headers?: AnyZodObject;
|
|
88
87
|
query?: AnyZodObject;
|
|
89
|
-
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
|
|
90
|
-
body?: unknown;
|
|
91
|
-
headers?: unknown;
|
|
92
|
-
query?: unknown;
|
|
93
|
-
}, {
|
|
94
|
-
body?: unknown;
|
|
95
|
-
headers?: unknown;
|
|
96
|
-
query?: unknown;
|
|
97
88
|
}>>(options?: HandlerOptions<RoutesExtendedRequestHandler<Request, Response, Response, Route<Nextable<FunctionLike>>[]>>) => NodeRouter<Request, Response, Schema>;
|
|
98
89
|
|
|
99
90
|
type NextFunction = (error?: any) => void;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as expressWrapper } from './packem_shared/expressWrapper-Dfp803bO.mjs';
|
|
2
2
|
export { default as withZod } from './packem_shared/withZod-DGhSvb93.mjs';
|
|
3
|
-
export { EdgeRouter, createEdgeRouter } from './packem_shared/EdgeRouter-
|
|
4
|
-
export { NodeRouter, createRouter as createNodeRouter, createRouter } from './packem_shared/createRouter-
|
|
5
|
-
export { Router } from './packem_shared/Router-
|
|
3
|
+
export { EdgeRouter, createEdgeRouter } from './packem_shared/EdgeRouter-D0oWFTsY.mjs';
|
|
4
|
+
export { NodeRouter, createRouter as createNodeRouter, createRouter } from './packem_shared/createRouter-Cnl03FK3.mjs';
|
|
5
|
+
export { Router } from './packem_shared/Router-CcNSmWZS.mjs';
|
|
6
6
|
export { default as sendJson } from './packem_shared/sendJson-CIcILWip.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import withZod from './withZod-DGhSvb93.mjs';
|
|
2
|
-
import { Router } from './Router-
|
|
2
|
+
import { Router } from './Router-CcNSmWZS.mjs';
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
5
|
const withZod = require('./withZod-DdTDLdDj.cjs');
|
|
6
|
-
const Router = require('./Router-
|
|
6
|
+
const Router = require('./Router-Bh6INaMr.cjs');
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
9
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -18,7 +18,7 @@ class Router {
|
|
|
18
18
|
let index = 0;
|
|
19
19
|
const next = /* @__PURE__ */ __name(() => {
|
|
20
20
|
const function_ = fns[++index];
|
|
21
|
-
if (function_ ===
|
|
21
|
+
if (function_ === void 0) {
|
|
22
22
|
return Promise.resolve();
|
|
23
23
|
}
|
|
24
24
|
return function_(...arguments_, next);
|
|
@@ -72,7 +72,7 @@ class Router {
|
|
|
72
72
|
if (matches === null) {
|
|
73
73
|
continue;
|
|
74
74
|
}
|
|
75
|
-
if (matches.groups !==
|
|
75
|
+
if (matches.groups !== void 0) {
|
|
76
76
|
Object.keys(matches.groups).forEach((key) => {
|
|
77
77
|
parameters[key] = matches.groups[key];
|
|
78
78
|
});
|
|
@@ -14,7 +14,7 @@ class Router {
|
|
|
14
14
|
let index = 0;
|
|
15
15
|
const next = /* @__PURE__ */ __name(() => {
|
|
16
16
|
const function_ = fns[++index];
|
|
17
|
-
if (function_ ===
|
|
17
|
+
if (function_ === void 0) {
|
|
18
18
|
return Promise.resolve();
|
|
19
19
|
}
|
|
20
20
|
return function_(...arguments_, next);
|
|
@@ -68,7 +68,7 @@ class Router {
|
|
|
68
68
|
if (matches === null) {
|
|
69
69
|
continue;
|
|
70
70
|
}
|
|
71
|
-
if (matches.groups !==
|
|
71
|
+
if (matches.groups !== void 0) {
|
|
72
72
|
Object.keys(matches.groups).forEach((key) => {
|
|
73
73
|
parameters[key] = matches.groups[key];
|
|
74
74
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import withZod from './withZod-DGhSvb93.mjs';
|
|
2
|
-
import { Router } from './Router-
|
|
2
|
+
import { Router } from './Router-CcNSmWZS.mjs';
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
6
|
const onNoMatch = /* @__PURE__ */ __name(async (request, response) => {
|
|
7
7
|
response.statusCode = 404;
|
|
8
|
-
response.end(request.method === "HEAD" ?
|
|
8
|
+
response.end(request.method === "HEAD" ? void 0 : `Route ${request.method} ${request.url} not found`);
|
|
9
9
|
}, "onNoMatch");
|
|
10
10
|
const onError = /* @__PURE__ */ __name(async (error, _request, response) => {
|
|
11
11
|
response.statusCode = 500;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
5
|
const withZod = require('./withZod-DdTDLdDj.cjs');
|
|
6
|
-
const Router = require('./Router-
|
|
6
|
+
const Router = require('./Router-Bh6INaMr.cjs');
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
9
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
10
|
const onNoMatch = /* @__PURE__ */ __name(async (request, response) => {
|
|
11
11
|
response.statusCode = 404;
|
|
12
|
-
response.end(request.method === "HEAD" ?
|
|
12
|
+
response.end(request.method === "HEAD" ? void 0 : `Route ${request.method} ${request.url} not found`);
|
|
13
13
|
}, "onNoMatch");
|
|
14
14
|
const onError = /* @__PURE__ */ __name(async (error, _request, response) => {
|
|
15
15
|
response.statusCode = 500;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/connect",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.19",
|
|
4
4
|
"description": "The minimal router and middleware layer for Next.js, Micro, Vercel, or Node.js http/http2 with support for zod validation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -73,46 +73,11 @@
|
|
|
73
73
|
"http-errors": "^2.0.0",
|
|
74
74
|
"regexparam": "^3.0.0"
|
|
75
75
|
},
|
|
76
|
-
"devDependencies": {
|
|
77
|
-
"@anolilab/eslint-config": "^15.0.3",
|
|
78
|
-
"@anolilab/prettier-config": "^5.0.14",
|
|
79
|
-
"@anolilab/semantic-release-pnpm": "^1.1.6",
|
|
80
|
-
"@anolilab/semantic-release-preset": "^9.0.3",
|
|
81
|
-
"@arethetypeswrong/cli": "^0.17.2",
|
|
82
|
-
"@babel/core": "^7.26.0",
|
|
83
|
-
"@rushstack/eslint-plugin-security": "^0.8.3",
|
|
84
|
-
"@types/http-errors": "^2.0.4",
|
|
85
|
-
"@types/node": "18.19.15",
|
|
86
|
-
"@visulima/nextra-theme-docs": "4.0.26",
|
|
87
|
-
"@visulima/packem": "1.10.7",
|
|
88
|
-
"@vitest/coverage-v8": "^2.1.8",
|
|
89
|
-
"@vitest/ui": "^2.1.8",
|
|
90
|
-
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
91
|
-
"cross-env": "^7.0.3",
|
|
92
|
-
"esbuild": "0.24.2",
|
|
93
|
-
"eslint": "8.57.0",
|
|
94
|
-
"eslint-plugin-deprecation": "^3.0.0",
|
|
95
|
-
"eslint-plugin-etc": "^2.0.3",
|
|
96
|
-
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
|
|
97
|
-
"eslint-plugin-mdx": "^3.1.5",
|
|
98
|
-
"eslint-plugin-vitest": "^0.4.1",
|
|
99
|
-
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
100
|
-
"eslint-plugin-zod": "^1.4.0",
|
|
101
|
-
"express": "^4.21.2",
|
|
102
|
-
"fastify": "^5.2.1",
|
|
103
|
-
"isomorphic-fetch": "^3.0.0",
|
|
104
|
-
"prettier": "^3.4.2",
|
|
105
|
-
"rimraf": "6.0.1",
|
|
106
|
-
"semantic-release": "24.2.1",
|
|
107
|
-
"typescript": "5.7.3",
|
|
108
|
-
"vitest": "^2.1.8",
|
|
109
|
-
"zod": "^3.24.1"
|
|
110
|
-
},
|
|
111
76
|
"peerDependencies": {
|
|
112
77
|
"zod": "^3.22.4"
|
|
113
78
|
},
|
|
114
79
|
"engines": {
|
|
115
|
-
"node": ">=18
|
|
80
|
+
"node": ">=18.0.0 <=23.x"
|
|
116
81
|
},
|
|
117
82
|
"os": [
|
|
118
83
|
"darwin",
|
|
@@ -122,34 +87,5 @@
|
|
|
122
87
|
"publishConfig": {
|
|
123
88
|
"access": "public",
|
|
124
89
|
"provenance": true
|
|
125
|
-
},
|
|
126
|
-
"anolilab": {
|
|
127
|
-
"eslint-config": {
|
|
128
|
-
"plugin": {
|
|
129
|
-
"tsdoc": false
|
|
130
|
-
},
|
|
131
|
-
"warn_on_unsupported_typescript_version": false,
|
|
132
|
-
"info_on_disabling_jsx_react_rule": false,
|
|
133
|
-
"info_on_disabling_prettier_conflict_rule": false,
|
|
134
|
-
"info_on_disabling_jsonc_sort_keys_rule": false,
|
|
135
|
-
"info_on_disabling_etc_no_deprecated": false
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
"scripts": {
|
|
139
|
-
"build": "cross-env NODE_ENV=development packem build",
|
|
140
|
-
"build:prod": "cross-env NODE_ENV=production packem build",
|
|
141
|
-
"clean": "rimraf node_modules dist .eslintcache",
|
|
142
|
-
"dev": "pnpm run build --watch",
|
|
143
|
-
"lint:attw": "attw --pack",
|
|
144
|
-
"lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
|
|
145
|
-
"lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
|
|
146
|
-
"lint:package-json": "publint --strict",
|
|
147
|
-
"lint:prettier": "prettier --config=.prettierrc.cjs --check .",
|
|
148
|
-
"lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
|
|
149
|
-
"lint:types": "tsc --noEmit",
|
|
150
|
-
"test": "vitest run",
|
|
151
|
-
"test:coverage": "vitest run --coverage",
|
|
152
|
-
"test:ui": "vitest --ui --coverage.enabled=true",
|
|
153
|
-
"test:watch": "vitest"
|
|
154
90
|
}
|
|
155
91
|
}
|