@visulima/connect 3.0.18 → 3.0.20
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 +20 -0
- package/README.md +1 -0
- 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 +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## @visulima/connect [3.0.20](https://github.com/visulima/visulima/compare/@visulima/connect@3.0.19...@visulima/connect@3.0.20) (2025-05-30)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **connect:** update dependencies ([76d5963](https://github.com/visulima/visulima/commit/76d5963b1ed59632a80e02a653c3f46163aa6d25))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous Chores
|
|
8
|
+
|
|
9
|
+
* updated dev dependencies ([2433ed5](https://github.com/visulima/visulima/commit/2433ed5fb662e0303c37edee8ddc21b46c21263f))
|
|
10
|
+
|
|
11
|
+
## @visulima/connect [3.0.19](https://github.com/visulima/visulima/compare/@visulima/connect@3.0.18...@visulima/connect@3.0.19) (2025-03-07)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* updated @visulima/packem and other dev deps, for better bundling size ([e940581](https://github.com/visulima/visulima/commit/e9405812201594e54dd81d17ddb74177df5f3c24))
|
|
16
|
+
|
|
17
|
+
### Miscellaneous Chores
|
|
18
|
+
|
|
19
|
+
* updated dev dependencies ([487a976](https://github.com/visulima/visulima/commit/487a976932dc7c39edfc19ffd3968960ff338066))
|
|
20
|
+
|
|
1
21
|
## @visulima/connect [3.0.18](https://github.com/visulima/visulima/compare/@visulima/connect@3.0.17...@visulima/connect@3.0.18) (2025-01-25)
|
|
2
22
|
|
|
3
23
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -621,6 +621,7 @@ 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"
|
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