@fncts/express 0.0.3 → 0.0.6
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/ExitHandler.d.ts +3 -3
- package/ExpressApp.d.ts +11 -12
- package/ExpressAppConfig.d.ts +3 -4
- package/RequestHandlerIO.d.ts +2 -2
- package/_cjs/ExpressApp.cjs +10 -10
- package/_cjs/ExpressApp.cjs.map +1 -1
- package/_cjs/ExpressAppConfig.cjs +1 -1
- package/_cjs/ExpressAppConfig.cjs.map +1 -1
- package/_cjs/global.cjs +6 -0
- package/_cjs/global.cjs.map +1 -0
- package/_cjs/index.cjs +5 -5
- package/_cjs/index.cjs.map +1 -1
- package/_mjs/ExpressApp.mjs +10 -10
- package/_mjs/ExpressApp.mjs.map +1 -1
- package/_mjs/ExpressAppConfig.mjs +1 -1
- package/_mjs/ExpressAppConfig.mjs.map +1 -1
- package/_mjs/global.mjs +2 -0
- package/_mjs/global.mjs.map +1 -0
- package/_mjs/index.mjs +5 -5
- package/_mjs/index.mjs.map +1 -1
- package/_src/ExitHandler.ts +1 -1
- package/_src/ExpressApp.ts +14 -13
- package/_src/ExpressAppConfig.ts +2 -2
- package/_src/RequestHandlerIO.ts +1 -1
- package/_src/global.ts +8 -0
- package/_src/index.ts +15 -12
- package/global.d.ts +9 -0
- package/index.d.ts +35 -35
- package/package.json +2 -2
package/ExitHandler.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Cause } from "@fncts/base/data/Cause";
|
2
|
-
import { URIO } from "@fncts/io/IO";
|
1
|
+
import { Cause } from "@fncts/base/data/Cause/definition";
|
2
|
+
import { URIO } from "@fncts/io/IO/definition";
|
3
3
|
import type { NextFunction, Request, Response } from "express";
|
4
4
|
export declare type ExitHandler<R> = (req: Request, res: Response, next: NextFunction) => (cause: Cause<never>) => URIO<R, any>;
|
5
5
|
export declare type ErasedExitHandler = ExitHandler<any>;
|
6
|
-
export declare function defaultExitHandler(_req: Request, _res: Response, _next: NextFunction): (cause: Cause<never>) => URIO<
|
6
|
+
export declare function defaultExitHandler(_req: Request, _res: Response, _next: NextFunction): (cause: Cause<never>) => URIO<never, void>;
|
package/ExpressApp.d.ts
CHANGED
@@ -1,27 +1,26 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
import { IO, URIO } from "@fncts/io/IO";
|
3
|
-
import {
|
4
|
-
import { Has } from "@fncts/base/typeclass";
|
5
|
-
import { Scope } from "@fncts/io/Scope";
|
2
|
+
import { IO, URIO } from "@fncts/io/IO/definition";
|
3
|
+
import { Scope } from "@fncts/io/Scope/definition";
|
6
4
|
import { Layer } from "@fncts/io/Layer";
|
7
|
-
import { Cause } from "@fncts/base/data/Cause";
|
5
|
+
import { Cause } from "@fncts/base/data/Cause/definition";
|
8
6
|
import type { ExpressAppConfig } from "./ExpressAppConfig.js";
|
9
7
|
import type { ErasedRequestHandlerIO, RequestHandlerRouteIO } from "./RequestHandlerIO";
|
8
|
+
import type { _R } from "@fncts/base/types";
|
10
9
|
import type { Express, NextFunction, Request, RequestHandler, Response } from "express";
|
11
10
|
import type { Server } from "http";
|
12
11
|
export interface ExpressApp {
|
13
12
|
readonly app: Express;
|
14
13
|
readonly server: Server;
|
15
|
-
readonly runtime: <Handlers extends Array<RequestHandlerRouteIO>>(handlers: Handlers) => IO<
|
14
|
+
readonly runtime: <Handlers extends Array<RequestHandlerRouteIO>>(handlers: Handlers) => IO<_R<{
|
16
15
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
17
16
|
}[number]>, never, ReadonlyArray<RequestHandler>>;
|
18
17
|
}
|
19
18
|
export declare const ExpressAppTag: import("@fncts/base/data/Tag.js").Tag<ExpressApp>;
|
20
|
-
export declare const makeExpressApp: IO<
|
21
|
-
export declare const LiveExpressApp: import("@fncts/io/Layer.js").Layer<
|
22
|
-
export declare type ExpressEnv =
|
23
|
-
export declare function LiveExpress(host: string, port: number): Layer<
|
19
|
+
export declare const makeExpressApp: IO<Scope | ExpressAppConfig, never, ExpressApp>;
|
20
|
+
export declare const LiveExpressApp: import("@fncts/io/Layer.js").Layer<ExpressAppConfig, never, ExpressApp>;
|
21
|
+
export declare type ExpressEnv = ExpressAppConfig | ExpressApp;
|
22
|
+
export declare function LiveExpress(host: string, port: number): Layer<never, never, ExpressEnv>;
|
24
23
|
export declare function LiveExpress<R>(host: string, port: number, exitHandler: (req: Request, res: Response, next: NextFunction) => (cause: Cause<never>) => URIO<R, void>): Layer<R, never, ExpressEnv>;
|
25
|
-
export declare function expressRuntime<Handlers extends Array<RequestHandlerRouteIO>>(handlers: never extends Handlers ? Array<RequestHandlerRouteIO> : Handlers): IO<
|
24
|
+
export declare function expressRuntime<Handlers extends Array<RequestHandlerRouteIO>>(handlers: never extends Handlers ? Array<RequestHandlerRouteIO> : Handlers): IO<_R<{
|
26
25
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
27
|
-
}[number]>
|
26
|
+
}[number]> | ExpressApp, never, ReadonlyArray<RequestHandler>>;
|
package/ExpressAppConfig.d.ts
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import { Layer } from "@fncts/io/Layer";
|
2
|
-
import {
|
3
|
-
import { Environment } from "@fncts/base/data/Environment";
|
2
|
+
import { Environment } from "@fncts/base/data/Environment/definition";
|
4
3
|
import type { ExitHandler } from "./ExitHandler.js";
|
5
4
|
export interface ExpressAppConfig {
|
6
5
|
readonly port: number;
|
7
6
|
readonly host: string;
|
8
|
-
readonly exitHandler: ExitHandler<
|
7
|
+
readonly exitHandler: ExitHandler<never>;
|
9
8
|
}
|
10
9
|
export declare const ExpressAppConfigTag: import("@fncts/base/data/Tag.js").Tag<ExpressAppConfig>;
|
11
|
-
export declare function LiveExpressAppConfig<R>(host: string, port: number, exitHandler: ExitHandler<R>): Layer<R, never,
|
10
|
+
export declare function LiveExpressAppConfig<R>(host: string, port: number, exitHandler: ExitHandler<R>): Layer<R, never, ExpressAppConfig>;
|
package/RequestHandlerIO.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { URIO } from "@fncts/io/IO";
|
1
|
+
import { URIO } from "@fncts/io/IO/definition";
|
2
2
|
import type { NextFunction, Request, Response } from "express";
|
3
3
|
import type { RouteParameters } from "express-serve-static-core";
|
4
4
|
export interface ParsedQs {
|
@@ -8,4 +8,4 @@ export interface RequestHandlerIO<R, Route extends string = any, P = RouteParame
|
|
8
8
|
(req: Request<P, ResBody, ReqBody, ReqQuery, Locals>, res: Response<ResBody, Locals>, next: NextFunction): URIO<R, void>;
|
9
9
|
}
|
10
10
|
export declare type ErasedRequestHandlerIO<R> = RequestHandlerIO<R, any, any, any, any, any, any>;
|
11
|
-
export declare type RequestHandlerRouteIO<R =
|
11
|
+
export declare type RequestHandlerRouteIO<R = never, Route extends string = any> = RequestHandlerIO<R, Route, RouteParameters<Route>>;
|
package/_cjs/ExpressApp.cjs
CHANGED
@@ -46,29 +46,29 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
46
46
|
const fileName_1 = "(@fncts/express) src/ExpressApp.ts";
|
47
47
|
const ExpressAppTag = /*#__PURE__*/tsplus_module_1.makeTag();
|
48
48
|
exports.ExpressAppTag = ExpressAppTag;
|
49
|
-
const makeExpressApp = /*#__PURE__*/tsplus_module_5.flatMap_( /*#__PURE__*/tsplus_module_6.acquireRelease(() => tsplus_module_5.succeed(() => new _AtomicBoolean.AtomicBoolean(true), fileName_1 + ":
|
49
|
+
const makeExpressApp = /*#__PURE__*/tsplus_module_5.flatMap_( /*#__PURE__*/tsplus_module_6.acquireRelease(() => tsplus_module_5.succeed(() => new _AtomicBoolean.AtomicBoolean(true), fileName_1 + ":35:28"), _ => tsplus_module_5.succeed(() => _.set(false), fileName_1 + ":35:86"), fileName_1 + ":35:68"), open => tsplus_module_5.flatMap_(tsplus_module_5.succeed(() => (0, _express.default)(), fileName_1 + ":37:27"), app => tsplus_module_5.flatMap_(tsplus_module_7.service(_ExpressAppConfig.ExpressAppConfigTag, fileName_1 + ":39:30"), config => tsplus_module_5.map_(tsplus_module_6.acquireRelease(() => tsplus_module_5.async(cb => {
|
50
50
|
const onError = err => {
|
51
|
-
cb(tsplus_module_5.halt(() => new _errors.NodeServerListenError(err), fileName_1 + ":
|
51
|
+
cb(tsplus_module_5.halt(() => new _errors.NodeServerListenError(err), fileName_1 + ":44:19"));
|
52
52
|
};
|
53
53
|
|
54
54
|
const server = app.listen(config.port, config.host, () => {
|
55
55
|
cb(tsplus_module_5.succeed(() => {
|
56
56
|
server.removeListener("error", onError);
|
57
57
|
return server;
|
58
|
-
}, fileName_1 + ":
|
58
|
+
}, fileName_1 + ":48:21"));
|
59
59
|
});
|
60
60
|
server.addListener("error", onError);
|
61
61
|
}), server => tsplus_module_5.async(cb => {
|
62
62
|
server.close(err => {
|
63
63
|
if (err) {
|
64
|
-
cb(tsplus_module_5.halt(() => new _errors.NodeServerCloseError(err), fileName_1 + ":
|
64
|
+
cb(tsplus_module_5.halt(() => new _errors.NodeServerCloseError(err), fileName_1 + ":59:23"));
|
65
65
|
} else {
|
66
66
|
cb(tsplus_module_5.via(tsplus_module_5.unit));
|
67
67
|
}
|
68
68
|
});
|
69
|
-
})), server => {
|
69
|
+
}), fileName_1 + ":55:22"), server => {
|
70
70
|
function runtime(handlers) {
|
71
|
-
return tsplus_module_5.map_(tsplus_module_5.map_(tsplus_module_4.runtime(fileName_1 + ":
|
71
|
+
return tsplus_module_5.map_(tsplus_module_5.map_(tsplus_module_4.runtime(fileName_1 + ":69:22"), r => new _IO.Runtime(r.environment, r.runtimeConfig), fileName_1 + ":76:11"), r => handlers.map(handler => (req, res, next) => r.unsafeRunAsync(tsplus_module_3.onTermination(() => open.get ? handler(req, res, next) : tsplus_module_2.interrupt, config.exitHandler(req, res, next), fileName_1 + ":82:82"), fileName_1 + ":81:31")), fileName_1 + ":77:11");
|
72
72
|
}
|
73
73
|
|
74
74
|
return {
|
@@ -76,16 +76,16 @@ const makeExpressApp = /*#__PURE__*/tsplus_module_5.flatMap_( /*#__PURE__*/tsplu
|
|
76
76
|
server,
|
77
77
|
runtime
|
78
78
|
};
|
79
|
-
}, fileName_1 + ":
|
79
|
+
}, fileName_1 + ":41:19"), fileName_1 + ":39:19"), fileName_1 + ":37:16"), fileName_1 + ":35:17");
|
80
80
|
exports.makeExpressApp = makeExpressApp;
|
81
|
-
const LiveExpressApp = /*#__PURE__*/tsplus_module_8.scoped(() => makeExpressApp, ExpressAppTag);
|
81
|
+
const LiveExpressApp = /*#__PURE__*/tsplus_module_8.scoped(() => makeExpressApp, ExpressAppTag, fileName_1 + ":95:43");
|
82
82
|
exports.LiveExpressApp = LiveExpressApp;
|
83
83
|
|
84
84
|
function LiveExpress(host, port, exitHandler) {
|
85
|
-
return tsplus_module_8.andTo_((0, _ExpressAppConfig.LiveExpressAppConfig)(host, port, exitHandler ?? _ExitHandler.defaultExitHandler), LiveExpressApp);
|
85
|
+
return tsplus_module_8.andTo_((0, _ExpressAppConfig.LiveExpressAppConfig)(host, port, exitHandler ?? _ExitHandler.defaultExitHandler), LiveExpressApp, fileName_1 + ":110:83");
|
86
86
|
}
|
87
87
|
|
88
88
|
function expressRuntime(handlers) {
|
89
|
-
return tsplus_module_7.serviceWithIO(_ => _.runtime(handlers), ExpressAppTag, fileName_1 + ":
|
89
|
+
return tsplus_module_7.serviceWithIO(_ => _.runtime(handlers), ExpressAppTag, fileName_1 + ":125:26");
|
90
90
|
}
|
91
91
|
//# sourceMappingURL=ExpressApp.cjs.map
|
package/_cjs/ExpressApp.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExpressApp.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"ExpressApp.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;AAm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Q,OAAT,CAAgEC,QAAhE,EAAkF;IAChF,OAAOpB,0FAOCqB,CAAD,IAAO,IAAIC,WAAJ,CAAYD,CAAC,CAACE,WAAd,EAA2BF,CAAC,CAACG,aAA7B,CAPP,EAOkD1B,qBAPlD,GAQCuB,CAAD,IACHD,QAAQ,CAACK,GAAT,CACGC,OAAD,IACE,CAACC,GAAD,EAAMC,GAAN,EAAWC,IAAX,KACER,CAAC,CAACS,cAAF,CACEC,oCAAC7B,IAAI,CAAC8B,GAAL,GAAWN,OAAO,CAACC,GAAD,EAAMC,GAAN,EAAWC,IAAX,CAAlB,GAAoCI,yBAArC,EAAkE3B,MAAM,CAAC4B,WAAP,CAAmBP,GAAnB,EAAwBC,GAAxB,EAA6BC,IAA7B,CAAlE,EAAoG/B,qBAApG,CADF,EACuGA,qBADvG,CAHN,CATG,EAeFA,qBAfE,CAAP;EAiBD;;EAED,OAAO;IACLK,GADK;IAELQ,MAFK;IAGLQ;EAHK,CAAP;CAjDY,wBAFH,wBAFC,wBADe,wBAApB;;AA6DA,MAAMgB,cAAc,gBAAGC,6BAAazC,cAAb,EAA6BF,aAA7B,EAA0CK,qBAA1C,CAAvB;;;AAUD,SAAUuC,WAAV,CACJvB,IADI,EAEJD,IAFI,EAGJqB,WAHI,EAGqG;EAEzG,OAAOE,mEAAqBtB,IAArB,EAA2BD,IAA3B,EAAiCqB,WAAW,IAAII,+BAAhD,GAA0EH,cAA1E,EAAwFrC,sBAAxF,CAAP;AACD;;AAEK,SAAUyC,cAAV,CACJnB,QADI,EACsE;EAW1E,OAAOhB,8BAAkBL,CAAD,IAAOA,CAAC,CAACoB,OAAF,CAAUC,QAAV,CAAxB,EAA6C3B,aAA7C,EAA0DK,sBAA1D,CAAP;AACD","names":["ExpressAppTag","tsplus_module_1","makeExpressApp","tsplus_module_6","AtomicBoolean","fileName_1","_","tsplus_module_5","set","open","app","tsplus_module_7","ExpressAppConfigTag","config","cb","onError","err","NodeServerListenError","server","listen","port","host","removeListener","addListener","close","NodeServerCloseError","runtime","handlers","r","Runtime","environment","runtimeConfig","map","handler","req","res","next","unsafeRunAsync","tsplus_module_3","get","tsplus_module_2","exitHandler","LiveExpressApp","tsplus_module_8","LiveExpress","defaultExitHandler","expressRuntime"],"sourceRoot":"","sources":["../_src/ExpressApp.ts"],"sourcesContent":[null]}
|
@@ -25,6 +25,6 @@ function LiveExpressAppConfig(host, port, exitHandler) {
|
|
25
25
|
host,
|
26
26
|
port,
|
27
27
|
exitHandler: (req, res, next) => cause => tsplus_module_2.provideEnvironment_(exitHandler(req, res, next)(cause), r, fileName_1 + ":20:104")
|
28
|
-
}), fileName_1 + ":17:23"), ExpressAppConfigTag);
|
28
|
+
}), fileName_1 + ":17:23"), ExpressAppConfigTag, fileName_1 + ":16:22");
|
29
29
|
}
|
30
30
|
//# sourceMappingURL=ExpressAppConfig.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExpressAppConfig.cjs","mappings":";;;;;;;;;;;;;;;;;;;AAQO,MAAMA,mBAAmB,gBAAGC,yBAA5B;;;AAED,SAAUC,oBAAV,CACJC,IADI,EAEJC,IAFI,EAGJC,WAHI,EAGuB;EAE3B,OAAOC,uBACLC,gCAAoBC,CAAD,KAAwB;IACzCL,IADyC;IAEzCC,IAFyC;IAGzCC,WAAW,EAAE,CAACI,GAAD,EAAMC,GAAN,EAAWC,IAAX,KAAqBC,KAAD,IAAWL,+CAAW,CAACE,GAAD,EAAMC,GAAN,EAAWC,IAAX,CAAX,CAA4BC,KAA5B,GAAsDJ,CAAtD,EAAuDK,sBAAvD;EAHH,CAAxB,CAAnB,EAIEA,qBAJF,CADK,EAMLb,mBANK,CAAP;AAQD","names":["ExpressAppConfigTag","tsplus_module_1","LiveExpressAppConfig","host","port","exitHandler","tsplus_module_3","tsplus_module_2","r","req","res","next","cause","fileName_1"],"sourceRoot":"","sources":["../_src/ExpressAppConfig.ts"],"sourcesContent":[null]}
|
1
|
+
{"version":3,"file":"ExpressAppConfig.cjs","mappings":";;;;;;;;;;;;;;;;;;;AAQO,MAAMA,mBAAmB,gBAAGC,yBAA5B;;;AAED,SAAUC,oBAAV,CACJC,IADI,EAEJC,IAFI,EAGJC,WAHI,EAGuB;EAE3B,OAAOC,uBACLC,gCAAoBC,CAAD,KAAwB;IACzCL,IADyC;IAEzCC,IAFyC;IAGzCC,WAAW,EAAE,CAACI,GAAD,EAAMC,GAAN,EAAWC,IAAX,KAAqBC,KAAD,IAAWL,+CAAW,CAACE,GAAD,EAAMC,GAAN,EAAWC,IAAX,CAAX,CAA4BC,KAA5B,GAAsDJ,CAAtD,EAAuDK,sBAAvD;EAHH,CAAxB,CAAnB,EAIEA,qBAJF,CADK,EAMLb,mBANK,EAMca,qBANd,CAAP;AAQD","names":["ExpressAppConfigTag","tsplus_module_1","LiveExpressAppConfig","host","port","exitHandler","tsplus_module_3","tsplus_module_2","r","req","res","next","cause","fileName_1"],"sourceRoot":"","sources":["../_src/ExpressAppConfig.ts"],"sourcesContent":[null]}
|
package/_cjs/global.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"global.cjs","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|
package/_cjs/index.cjs
CHANGED
@@ -127,18 +127,18 @@ exports.methods = methods;
|
|
127
127
|
|
128
128
|
function match(method) {
|
129
129
|
return function (path, ...handlers) {
|
130
|
-
return tsplus_module_1.flatMap_((0, _ExpressApp.expressRuntime)(handlers), expressHandlers => tsplus_module_2.serviceWithIO(service => tsplus_module_1.succeed(() => service.app[method](path, ...expressHandlers), fileName_1 + ":
|
130
|
+
return tsplus_module_1.flatMap_((0, _ExpressApp.expressRuntime)(handlers), expressHandlers => tsplus_module_2.serviceWithIO(service => tsplus_module_1.succeed(() => service.app[method](path, ...expressHandlers), fileName_1 + ":71:44"), _ExpressApp.ExpressAppTag, fileName_1 + ":70:23"), fileName_1 + ":69:84");
|
131
131
|
};
|
132
132
|
}
|
133
133
|
|
134
134
|
function use(...args) {
|
135
135
|
return tsplus_module_1.asUnit(tsplus_module_2.serviceWithIO(service => {
|
136
136
|
if (typeof args[0] === "function") {
|
137
|
-
return tsplus_module_1.flatMap_((0, _ExpressApp.expressRuntime)(args), expressHandlers => tsplus_module_1.succeed(() => service.app.use(...expressHandlers), fileName_1 + ":
|
137
|
+
return tsplus_module_1.flatMap_((0, _ExpressApp.expressRuntime)(args), expressHandlers => tsplus_module_1.succeed(() => service.app.use(...expressHandlers), fileName_1 + ":105:19"), fileName_1 + ":104:74");
|
138
138
|
} else {
|
139
|
-
return tsplus_module_1.flatMap_((0, _ExpressApp.expressRuntime)(args.slice(1) ?? []), expressHandlers => tsplus_module_1.succeed(() => service.app.use(args[0], ...expressHandlers), fileName_1 + ":
|
139
|
+
return tsplus_module_1.flatMap_((0, _ExpressApp.expressRuntime)(args.slice(1) ?? []), expressHandlers => tsplus_module_1.succeed(() => service.app.use(args[0], ...expressHandlers), fileName_1 + ":109:19"), fileName_1 + ":108:91");
|
140
140
|
}
|
141
|
-
}, _ExpressApp.ExpressAppTag, fileName_1 + ":
|
141
|
+
}, _ExpressApp.ExpressAppTag, fileName_1 + ":102:26"), fileName_1 + ":112:20");
|
142
142
|
}
|
143
143
|
|
144
144
|
const all = /*#__PURE__*/match("all");
|
@@ -197,6 +197,6 @@ const unsubscribe = /*#__PURE__*/match("unsubscribe");
|
|
197
197
|
exports.unsubscribe = unsubscribe;
|
198
198
|
|
199
199
|
function classic(_) {
|
200
|
-
return (req, res, next) => tsplus_module_1.succeed(() => _(req, res, next), fileName_1 + ":
|
200
|
+
return (req, res, next) => tsplus_module_1.succeed(() => _(req, res, next), fileName_1 + ":150:40");
|
201
201
|
}
|
202
202
|
//# sourceMappingURL=index.cjs.map
|
package/_cjs/index.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":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,gBAAUxB,KAAK,CAAC,MAAD,CAAzB;;AACA,MAAMyB,IAAI,gBAAUzB,KAAK,CAAC,MAAD,CAAzB;;AACA,MAAM0B,KAAK,gBAAS1B,KAAK,CAAC,OAAD,CAAzB;;AACA,MAAM2B,UAAU,gBAAI3B,KAAK,CAAC,YAAD,CAAzB;;AACA,MAAM4B,KAAK,gBAAS5B,KAAK,CAAC,OAAD,CAAzB;;AACA,MAAM6B,IAAI,gBAAU7B,KAAK,CAAC,MAAD,CAAzB;;AACA,MAAM8B,OAAO,gBAAO9B,KAAK,CAAC,UAAD,CAAzB;;AACA,MAAM+B,MAAM,gBAAQ/B,KAAK,CAAC,QAAD,CAAzB;;AACA,MAAMgC,QAAQ,gBAAMhC,KAAK,CAAC,UAAD,CAAzB;;AACA,MAAMiC,SAAS,gBAAKjC,KAAK,CAAC,WAAD,CAAzB;;AACA,MAAMkC,KAAK,gBAASlC,KAAK,CAAC,OAAD,CAAzB;;AACA,MAAMmC,MAAM,gBAAQnC,KAAK,CAAC,QAAD,CAAzB;;AACA,MAAMoC,MAAM,gBAAQpC,KAAK,CAAC,QAAD,CAAzB;;AACA,MAAMqC,SAAS,gBAAKrC,KAAK,CAAC,WAAD,CAAzB;;AACA,MAAMsC,KAAK,gBAAStC,KAAK,CAAC,OAAD,CAAzB;;AACA,MAAMuC,MAAM,gBAAQvC,KAAK,CAAC,QAAD,CAAzB;;AACA,MAAMwC,WAAW,gBAAGxC,KAAK,CAAC,aAAD,CAAzB;;;AAOD,SAAUyC,OAAV,CAAkBC,CAAlB,EAAwD;EAC5D,OAAO,CAACC,GAAD,EAAMC,GAAN,EAAWC,IAAX,KAAoBzC,wBAAW,MAAMsC,CAAC,CAACC,GAAD,EAAMC,GAAN,EAAWC,IAAX,CAAlB,EAAkCpC,sBAAlC,CAA3B;AACD","names":["methods","match","method","path","handlers","tsplus_module_1","expressHandlers","tsplus_module_2","service","app","fileName_1","ExpressAppTag","use","args","slice","all","get","post","put","delete_","patch","options","head","checkout","connect","copy","lock","merge","mkactivity","mkcol","move","mSearch","notify","propfind","proppatch","purge","report","search","subscribe","trace","unlock","unsubscribe","classic","_","req","res","next"],"sourceRoot":"","sources":["../_src/index.ts"],"sourcesContent":[null]}
|
package/_mjs/ExpressApp.mjs
CHANGED
@@ -15,29 +15,29 @@ import { defaultExitHandler } from "./ExitHandler.mjs";
|
|
15
15
|
import { LiveExpressAppConfig } from "./ExpressAppConfig.mjs";
|
16
16
|
import { ExpressAppConfigTag } from "./ExpressAppConfig.mjs";
|
17
17
|
export const ExpressAppTag = /*#__PURE__*/tsplus_module_1.makeTag();
|
18
|
-
export const makeExpressApp = /*#__PURE__*/tsplus_module_5.flatMap_( /*#__PURE__*/tsplus_module_6.acquireRelease(() => tsplus_module_5.succeed(() => new AtomicBoolean(true), fileName_1 + ":
|
18
|
+
export const makeExpressApp = /*#__PURE__*/tsplus_module_5.flatMap_( /*#__PURE__*/tsplus_module_6.acquireRelease(() => tsplus_module_5.succeed(() => new AtomicBoolean(true), fileName_1 + ":35:28"), _ => tsplus_module_5.succeed(() => _.set(false), fileName_1 + ":35:86"), fileName_1 + ":35:68"), open => tsplus_module_5.flatMap_(tsplus_module_5.succeed(() => express(), fileName_1 + ":37:27"), app => tsplus_module_5.flatMap_(tsplus_module_7.service(ExpressAppConfigTag, fileName_1 + ":39:30"), config => tsplus_module_5.map_(tsplus_module_6.acquireRelease(() => tsplus_module_5.async(cb => {
|
19
19
|
const onError = err => {
|
20
|
-
cb(tsplus_module_5.halt(() => new NodeServerListenError(err), fileName_1 + ":
|
20
|
+
cb(tsplus_module_5.halt(() => new NodeServerListenError(err), fileName_1 + ":44:19"));
|
21
21
|
};
|
22
22
|
|
23
23
|
const server = app.listen(config.port, config.host, () => {
|
24
24
|
cb(tsplus_module_5.succeed(() => {
|
25
25
|
server.removeListener("error", onError);
|
26
26
|
return server;
|
27
|
-
}, fileName_1 + ":
|
27
|
+
}, fileName_1 + ":48:21"));
|
28
28
|
});
|
29
29
|
server.addListener("error", onError);
|
30
30
|
}), server => tsplus_module_5.async(cb => {
|
31
31
|
server.close(err => {
|
32
32
|
if (err) {
|
33
|
-
cb(tsplus_module_5.halt(() => new NodeServerCloseError(err), fileName_1 + ":
|
33
|
+
cb(tsplus_module_5.halt(() => new NodeServerCloseError(err), fileName_1 + ":59:23"));
|
34
34
|
} else {
|
35
35
|
cb(tsplus_module_5.via(tsplus_module_5.unit));
|
36
36
|
}
|
37
37
|
});
|
38
|
-
})), server => {
|
38
|
+
}), fileName_1 + ":55:22"), server => {
|
39
39
|
function runtime(handlers) {
|
40
|
-
return tsplus_module_5.map_(tsplus_module_5.map_(tsplus_module_4.runtime(fileName_1 + ":
|
40
|
+
return tsplus_module_5.map_(tsplus_module_5.map_(tsplus_module_4.runtime(fileName_1 + ":69:22"), r => new Runtime(r.environment, r.runtimeConfig), fileName_1 + ":76:11"), r => handlers.map(handler => (req, res, next) => r.unsafeRunAsync(tsplus_module_3.onTermination(() => open.get ? handler(req, res, next) : tsplus_module_2.interrupt, config.exitHandler(req, res, next), fileName_1 + ":82:82"), fileName_1 + ":81:31")), fileName_1 + ":77:11");
|
41
41
|
}
|
42
42
|
|
43
43
|
return {
|
@@ -45,12 +45,12 @@ export const makeExpressApp = /*#__PURE__*/tsplus_module_5.flatMap_( /*#__PURE__
|
|
45
45
|
server,
|
46
46
|
runtime
|
47
47
|
};
|
48
|
-
}, fileName_1 + ":
|
49
|
-
export const LiveExpressApp = /*#__PURE__*/tsplus_module_8.scoped(() => makeExpressApp, ExpressAppTag);
|
48
|
+
}, fileName_1 + ":41:19"), fileName_1 + ":39:19"), fileName_1 + ":37:16"), fileName_1 + ":35:17");
|
49
|
+
export const LiveExpressApp = /*#__PURE__*/tsplus_module_8.scoped(() => makeExpressApp, ExpressAppTag, fileName_1 + ":95:43");
|
50
50
|
export function LiveExpress(host, port, exitHandler) {
|
51
|
-
return tsplus_module_8.andTo_(LiveExpressAppConfig(host, port, exitHandler ?? defaultExitHandler), LiveExpressApp);
|
51
|
+
return tsplus_module_8.andTo_(LiveExpressAppConfig(host, port, exitHandler ?? defaultExitHandler), LiveExpressApp, fileName_1 + ":110:83");
|
52
52
|
}
|
53
53
|
export function expressRuntime(handlers) {
|
54
|
-
return tsplus_module_7.serviceWithIO(_ => _.runtime(handlers), ExpressAppTag, fileName_1 + ":
|
54
|
+
return tsplus_module_7.serviceWithIO(_ => _.runtime(handlers), ExpressAppTag, fileName_1 + ":125:26");
|
55
55
|
}
|
56
56
|
//# sourceMappingURL=ExpressApp.mjs.map
|
package/_mjs/ExpressApp.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExpressApp.mjs","mappings":";;;;;;;;;
|
1
|
+
{"version":3,"file":"ExpressApp.mjs","mappings":";;;;;;;;;AAMA,SAASA,aAAT,QAA8B,oCAA9B;AACA,SAASC,OAAT,QAAwB,cAAxB;AACA,OAAOC,OAAP,MAAoB,SAApB;AAEA,SAASC,oBAAT,EAA+BC,qBAA/B,QAA4D,cAA5D;AACA,SAASC,kBAAT,QAAmC,mBAAnC;AACA,SAASC,oBAAT,QAAqC,wBAArC;AACA,SAASC,mBAAT,QAAoC,wBAApC;AAkBA,OAAO,MAAMC,aAAa,gBAAGC,yBAAtB;AAEP,OAAO,MAAMC,cAAc,uDACVC,mEAAW,IAAIX,aAAJ,CAAkB,IAAlB,CAAX,EAAkCY,qBAAlC,GAAoDC,CAAD,IAAOC,wBAAW,MAAMD,CAAC,CAACE,GAAF,CAAM,KAAN,CAAjB,EAA6BH,qBAA7B,CAA1D,EAAwFA,qBAAxF,CADU,EACnBI,IAAI,6BAEIF,wBAAW,MAAMZ,OAAO,EAAxB,EAA0BU,qBAA1B,CAFJ,EAEJK,GAAG,6BAEQC,wBAAWX,mBAAX,EAA8BK,qBAA9B,CAFR,EAEHO,MAAM,yBAGVR,2DAAgCS,EAAD,IAAO;EACpC,MAAMC,OAAO,GAAIC,GAAD,IAAe;IAC7BF,EAAE,CAACN,2BAAQ,IAA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qBAApG,CADF,EACuGA,qBADvG,CAHN,CATG,EAeFA,qBAfE,CAAP;EAiBD;;EAED,OAAO;IACLK,GADK;IAELM,MAFK;IAGLO;EAHK,CAAP;CAjDY,wBAFH,wBAFC,wBADe,wBAApB;AA6DP,OAAO,MAAMe,cAAc,gBAAGC,6BAAapC,cAAb,EAA6BF,aAA7B,EAA0CI,qBAA1C,CAAvB;AAUP,OAAM,SAAUmC,WAAV,CACJrB,IADI,EAEJD,IAFI,EAGJmB,WAHI,EAGqG;EAEzG,OAAOE,2CAAoB,CAACpB,IAAD,EAAOD,IAAP,EAAamB,WAAW,IAAIvC,kBAA5B,CAApB,EAA0EwC,cAA1E,EAAwFjC,sBAAxF,CAAP;AACD;AAED,OAAM,SAAUoC,cAAV,CACJjB,QADI,EACsE;EAW1E,OAAOb,8BAAkBL,CAAD,IAAOA,CAAC,CAACiB,OAAF,CAAUC,QAAV,CAAxB,EAA6CvB,aAA7C,EAA0DI,sBAA1D,CAAP;AACD","names":["AtomicBoolean","Runtime","express","NodeServerCloseError","NodeServerListenError","defaultExitHandler","LiveExpressAppConfig","ExpressAppConfigTag","ExpressAppTag","tsplus_module_1","makeExpressApp","tsplus_module_6","fileName_1","_","tsplus_module_5","set","open","app","tsplus_module_7","config","cb","onError","err","server","listen","port","host","removeListener","addListener","close","runtime","handlers","r","environment","runtimeConfig","map","handler","req","res","next","unsafeRunAsync","tsplus_module_3","get","tsplus_module_2","exitHandler","LiveExpressApp","tsplus_module_8","LiveExpress","expressRuntime"],"sourceRoot":"","sources":["../_src/ExpressApp.ts"],"sourcesContent":[null]}
|
@@ -8,6 +8,6 @@ export function LiveExpressAppConfig(host, port, exitHandler) {
|
|
8
8
|
host,
|
9
9
|
port,
|
10
10
|
exitHandler: (req, res, next) => cause => tsplus_module_2.provideEnvironment_(exitHandler(req, res, next)(cause), r, fileName_1 + ":20:104")
|
11
|
-
}), fileName_1 + ":17:23"), ExpressAppConfigTag);
|
11
|
+
}), fileName_1 + ":17:23"), ExpressAppConfigTag, fileName_1 + ":16:22");
|
12
12
|
}
|
13
13
|
//# sourceMappingURL=ExpressAppConfig.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ExpressAppConfig.mjs","mappings":";;;;AAQA,OAAO,MAAMA,mBAAmB,gBAAGC,yBAA5B;AAEP,OAAM,SAAUC,oBAAV,CACJC,IADI,EAEJC,IAFI,EAGJC,WAHI,EAGuB;EAE3B,OAAOC,uBACLC,gCAAoBC,CAAD,KAAwB;IACzCL,IADyC;IAEzCC,IAFyC;IAGzCC,WAAW,EAAE,CAACI,GAAD,EAAMC,GAAN,EAAWC,IAAX,KAAqBC,KAAD,IAAWL,+CAAW,CAACE,GAAD,EAAMC,GAAN,EAAWC,IAAX,CAAX,CAA4BC,KAA5B,GAAsDJ,CAAtD,EAAuDK,sBAAvD;EAHH,CAAxB,CAAnB,EAIEA,qBAJF,CADK,EAMLb,mBANK,CAAP;AAQD","names":["ExpressAppConfigTag","tsplus_module_1","LiveExpressAppConfig","host","port","exitHandler","tsplus_module_3","tsplus_module_2","r","req","res","next","cause","fileName_1"],"sourceRoot":"","sources":["../_src/ExpressAppConfig.ts"],"sourcesContent":[null]}
|
1
|
+
{"version":3,"file":"ExpressAppConfig.mjs","mappings":";;;;AAQA,OAAO,MAAMA,mBAAmB,gBAAGC,yBAA5B;AAEP,OAAM,SAAUC,oBAAV,CACJC,IADI,EAEJC,IAFI,EAGJC,WAHI,EAGuB;EAE3B,OAAOC,uBACLC,gCAAoBC,CAAD,KAAwB;IACzCL,IADyC;IAEzCC,IAFyC;IAGzCC,WAAW,EAAE,CAACI,GAAD,EAAMC,GAAN,EAAWC,IAAX,KAAqBC,KAAD,IAAWL,+CAAW,CAACE,GAAD,EAAMC,GAAN,EAAWC,IAAX,CAAX,CAA4BC,KAA5B,GAAsDJ,CAAtD,EAAuDK,sBAAvD;EAHH,CAAxB,CAAnB,EAIEA,qBAJF,CADK,EAMLb,mBANK,EAMca,qBANd,CAAP;AAQD","names":["ExpressAppConfigTag","tsplus_module_1","LiveExpressAppConfig","host","port","exitHandler","tsplus_module_3","tsplus_module_2","r","req","res","next","cause","fileName_1"],"sourceRoot":"","sources":["../_src/ExpressAppConfig.ts"],"sourcesContent":[null]}
|
package/_mjs/global.mjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"global.mjs","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|
package/_mjs/index.mjs
CHANGED
@@ -10,17 +10,17 @@ export * from "./RequestHandlerIO.mjs";
|
|
10
10
|
export const methods = ["all", "get", "post", "put", "delete", "patch", "options", "head", "checkout", "connect", "copy", "lock", "merge", "mkactivity", "mkcol", "move", "m-search", "notify", "propfind", "proppatch", "purge", "report", "search", "subscribe", "trace", "unlock", "unsubscribe"];
|
11
11
|
export function match(method) {
|
12
12
|
return function (path, ...handlers) {
|
13
|
-
return tsplus_module_1.flatMap_(expressRuntime(handlers), expressHandlers => tsplus_module_2.serviceWithIO(service => tsplus_module_1.succeed(() => service.app[method](path, ...expressHandlers), fileName_1 + ":
|
13
|
+
return tsplus_module_1.flatMap_(expressRuntime(handlers), expressHandlers => tsplus_module_2.serviceWithIO(service => tsplus_module_1.succeed(() => service.app[method](path, ...expressHandlers), fileName_1 + ":71:44"), ExpressAppTag, fileName_1 + ":70:23"), fileName_1 + ":69:84");
|
14
14
|
};
|
15
15
|
}
|
16
16
|
export function use(...args) {
|
17
17
|
return tsplus_module_1.asUnit(tsplus_module_2.serviceWithIO(service => {
|
18
18
|
if (typeof args[0] === "function") {
|
19
|
-
return tsplus_module_1.flatMap_(expressRuntime(args), expressHandlers => tsplus_module_1.succeed(() => service.app.use(...expressHandlers), fileName_1 + ":
|
19
|
+
return tsplus_module_1.flatMap_(expressRuntime(args), expressHandlers => tsplus_module_1.succeed(() => service.app.use(...expressHandlers), fileName_1 + ":105:19"), fileName_1 + ":104:74");
|
20
20
|
} else {
|
21
|
-
return tsplus_module_1.flatMap_(expressRuntime(args.slice(1) ?? []), expressHandlers => tsplus_module_1.succeed(() => service.app.use(args[0], ...expressHandlers), fileName_1 + ":
|
21
|
+
return tsplus_module_1.flatMap_(expressRuntime(args.slice(1) ?? []), expressHandlers => tsplus_module_1.succeed(() => service.app.use(args[0], ...expressHandlers), fileName_1 + ":109:19"), fileName_1 + ":108:91");
|
22
22
|
}
|
23
|
-
}, ExpressAppTag, fileName_1 + ":
|
23
|
+
}, ExpressAppTag, fileName_1 + ":102:26"), fileName_1 + ":112:20");
|
24
24
|
}
|
25
25
|
export const all = /*#__PURE__*/match("all");
|
26
26
|
export const get = /*#__PURE__*/match("get");
|
@@ -51,6 +51,6 @@ export const trace = /*#__PURE__*/match("trace");
|
|
51
51
|
export const unlock = /*#__PURE__*/match("unlock");
|
52
52
|
export const unsubscribe = /*#__PURE__*/match("unsubscribe");
|
53
53
|
export function classic(_) {
|
54
|
-
return (req, res, next) => tsplus_module_1.succeed(() => _(req, res, next), fileName_1 + ":
|
54
|
+
return (req, res, next) => tsplus_module_1.succeed(() => _(req, res, next), fileName_1 + ":150:40");
|
55
55
|
}
|
56
56
|
//# sourceMappingURL=index.mjs.map
|
package/_mjs/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","mappings":";;;
|
1
|
+
{"version":3,"file":"index.mjs","mappings":";;;AAOA,SAASA,aAAT,EAAwBC,cAAxB,QAA8C,kBAA9C;AAEA,cAAc,cAAd;AACA,cAAc,mBAAd;AACA,cAAc,kBAAd;AACA,cAAc,wBAAd;AACA,cAAc,wBAAd;AAEA,OAAO,MAAMC,OAAO,GAAG,CACrB,KADqB,EAErB,KAFqB,EAGrB,MAHqB,EAIrB,KAJqB,EAKrB,QALqB,EAMrB,OANqB,EAOrB,SAPqB,EAQrB,MARqB,EASrB,UATqB,EAUrB,SAVqB,EAWrB,MAXqB,EAYrB,MAZqB,EAarB,OAbqB,EAcrB,YAdqB,EAerB,OAfqB,EAgBrB,MAhBqB,EAiB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,MAAMkC,KAAK,gBAASlC,KAAK,CAAC,OAAD,CAAzB;AACP,OAAO,MAAMmC,MAAM,gBAAQnC,KAAK,CAAC,QAAD,CAAzB;AACP,OAAO,MAAMoC,MAAM,gBAAQpC,KAAK,CAAC,QAAD,CAAzB;AACP,OAAO,MAAMqC,SAAS,gBAAKrC,KAAK,CAAC,WAAD,CAAzB;AACP,OAAO,MAAMsC,KAAK,gBAAStC,KAAK,CAAC,OAAD,CAAzB;AACP,OAAO,MAAMuC,MAAM,gBAAQvC,KAAK,CAAC,QAAD,CAAzB;AACP,OAAO,MAAMwC,WAAW,gBAAGxC,KAAK,CAAC,aAAD,CAAzB;AAOP,OAAM,SAAUyC,OAAV,CAAkBC,CAAlB,EAAwD;EAC5D,OAAO,CAACC,GAAD,EAAMC,GAAN,EAAWC,IAAX,KAAoBzC,wBAAW,MAAMsC,CAAC,CAACC,GAAD,EAAMC,GAAN,EAAWC,IAAX,CAAlB,EAAkCpC,sBAAlC,CAA3B;AACD","names":["ExpressAppTag","expressRuntime","methods","match","method","path","handlers","tsplus_module_1","expressHandlers","tsplus_module_2","service","app","fileName_1","use","args","slice","all","get","post","put","delete_","delete","patch","options","head","checkout","connect","copy","lock","merge","mkactivity","mkcol","move","mSearch","notify","propfind","proppatch","purge","report","search","subscribe","trace","unlock","unsubscribe","classic","_","req","res","next"],"sourceRoot":"","sources":["../_src/index.ts"],"sourcesContent":[null]}
|
package/_src/ExitHandler.ts
CHANGED
@@ -8,7 +8,7 @@ export function defaultExitHandler(
|
|
8
8
|
_req: Request,
|
9
9
|
_res: Response,
|
10
10
|
_next: NextFunction,
|
11
|
-
): (cause: Cause<never>) => URIO<
|
11
|
+
): (cause: Cause<never>) => URIO<never, void> {
|
12
12
|
return (cause) =>
|
13
13
|
IO.succeed(() => {
|
14
14
|
if (cause.halted) {
|
package/_src/ExpressApp.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { ExpressAppConfig } from "./ExpressAppConfig.js";
|
2
2
|
import type { ErasedRequestHandlerIO, RequestHandlerRouteIO } from "./RequestHandlerIO";
|
3
|
+
import type { _R } from "@fncts/base/types";
|
3
4
|
import type { Express, NextFunction, Request, RequestHandler, Response } from "express";
|
4
5
|
import type { Server } from "http";
|
5
6
|
|
@@ -18,7 +19,7 @@ export interface ExpressApp {
|
|
18
19
|
readonly runtime: <Handlers extends Array<RequestHandlerRouteIO>>(
|
19
20
|
handlers: Handlers,
|
20
21
|
) => IO<
|
21
|
-
|
22
|
+
_R<
|
22
23
|
{
|
23
24
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
24
25
|
}[number]
|
@@ -30,7 +31,7 @@ export interface ExpressApp {
|
|
30
31
|
|
31
32
|
export const ExpressAppTag = Tag<ExpressApp>();
|
32
33
|
|
33
|
-
export const makeExpressApp: IO<
|
34
|
+
export const makeExpressApp: IO<Scope | ExpressAppConfig, never, ExpressApp> = Do((Δ) => {
|
34
35
|
const open = Δ(IO.succeed(new AtomicBoolean(true)).acquireRelease((_) => IO.succeed(() => _.set(false))));
|
35
36
|
|
36
37
|
const app = Δ(IO.succeed(() => express()));
|
@@ -38,7 +39,7 @@ export const makeExpressApp: IO<Has<Scope> & Has<ExpressAppConfig>, never, Expre
|
|
38
39
|
const config = Δ(IO.service(ExpressAppConfigTag));
|
39
40
|
|
40
41
|
const server = Δ(
|
41
|
-
IO.async<
|
42
|
+
IO.async<never, never, Server>((cb) => {
|
42
43
|
const onError = (err: Error) => {
|
43
44
|
cb(IO.halt(new NodeServerListenError(err)));
|
44
45
|
};
|
@@ -52,7 +53,7 @@ export const makeExpressApp: IO<Has<Scope> & Has<ExpressAppConfig>, never, Expre
|
|
52
53
|
});
|
53
54
|
server.addListener("error", onError);
|
54
55
|
}).acquireRelease((server) =>
|
55
|
-
IO.async<
|
56
|
+
IO.async<never, never, void>((cb) => {
|
56
57
|
server.close((err) => {
|
57
58
|
if (err) {
|
58
59
|
cb(IO.halt(new NodeServerCloseError(err)));
|
@@ -66,7 +67,7 @@ export const makeExpressApp: IO<Has<Scope> & Has<ExpressAppConfig>, never, Expre
|
|
66
67
|
|
67
68
|
function runtime<Handlers extends Array<RequestHandlerRouteIO>>(handlers: Handlers) {
|
68
69
|
return IO.runtime<
|
69
|
-
|
70
|
+
_R<
|
70
71
|
{
|
71
72
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
72
73
|
}[number]
|
@@ -93,9 +94,9 @@ export const makeExpressApp: IO<Has<Scope> & Has<ExpressAppConfig>, never, Expre
|
|
93
94
|
|
94
95
|
export const LiveExpressApp = Layer.scoped(makeExpressApp, ExpressAppTag);
|
95
96
|
|
96
|
-
export type ExpressEnv =
|
97
|
+
export type ExpressEnv = ExpressAppConfig | ExpressApp;
|
97
98
|
|
98
|
-
export function LiveExpress(host: string, port: number): Layer<
|
99
|
+
export function LiveExpress(host: string, port: number): Layer<never, never, ExpressEnv>;
|
99
100
|
export function LiveExpress<R>(
|
100
101
|
host: string,
|
101
102
|
port: number,
|
@@ -112,12 +113,12 @@ export function LiveExpress<R>(
|
|
112
113
|
export function expressRuntime<Handlers extends Array<RequestHandlerRouteIO>>(
|
113
114
|
handlers: never extends Handlers ? Array<RequestHandlerRouteIO> : Handlers,
|
114
115
|
): IO<
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
116
|
+
| _R<
|
117
|
+
{
|
118
|
+
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
119
|
+
}[number]
|
120
|
+
>
|
121
|
+
| ExpressApp,
|
121
122
|
never,
|
122
123
|
ReadonlyArray<RequestHandler>
|
123
124
|
> {
|
package/_src/ExpressAppConfig.ts
CHANGED
@@ -3,7 +3,7 @@ import type { ExitHandler } from "./ExitHandler.js";
|
|
3
3
|
export interface ExpressAppConfig {
|
4
4
|
readonly port: number;
|
5
5
|
readonly host: string;
|
6
|
-
readonly exitHandler: ExitHandler<
|
6
|
+
readonly exitHandler: ExitHandler<never>;
|
7
7
|
}
|
8
8
|
|
9
9
|
export const ExpressAppConfigTag = Tag<ExpressAppConfig>();
|
@@ -12,7 +12,7 @@ export function LiveExpressAppConfig<R>(
|
|
12
12
|
host: string,
|
13
13
|
port: number,
|
14
14
|
exitHandler: ExitHandler<R>,
|
15
|
-
): Layer<R, never,
|
15
|
+
): Layer<R, never, ExpressAppConfig> {
|
16
16
|
return Layer.fromIO(
|
17
17
|
IO.environmentWith((r: Environment<R>) => ({
|
18
18
|
host,
|
package/_src/RequestHandlerIO.ts
CHANGED
@@ -22,7 +22,7 @@ export interface RequestHandlerIO<
|
|
22
22
|
|
23
23
|
export type ErasedRequestHandlerIO<R> = RequestHandlerIO<R, any, any, any, any, any, any>;
|
24
24
|
|
25
|
-
export type RequestHandlerRouteIO<R =
|
25
|
+
export type RequestHandlerRouteIO<R = never, Route extends string = any> = RequestHandlerIO<
|
26
26
|
R,
|
27
27
|
Route,
|
28
28
|
RouteParameters<Route>
|
package/_src/global.ts
ADDED
package/_src/index.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { ExpressApp, ExpressEnv } from "./ExpressApp.js";
|
2
2
|
import type { ErasedRequestHandlerIO, RequestHandlerIO, RequestHandlerRouteIO } from "./RequestHandlerIO.js";
|
3
|
+
import type { _R } from "@fncts/base/types";
|
3
4
|
import type { NextHandleFunction } from "connect";
|
4
5
|
import type { RequestHandler } from "express";
|
5
6
|
import type { RouteParameters } from "express-serve-static-core";
|
@@ -55,8 +56,8 @@ export function match(method: Methods): {
|
|
55
56
|
path: Route,
|
56
57
|
...handlers: never extends Handlers ? Array<RequestHandlerIO<any, Route, RouteParameters<Route>>> : Handlers
|
57
58
|
): URIO<
|
58
|
-
ExpressEnv
|
59
|
-
|
59
|
+
| ExpressEnv
|
60
|
+
| _R<
|
60
61
|
{
|
61
62
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
62
63
|
}[number]
|
@@ -65,7 +66,7 @@ export function match(method: Methods): {
|
|
65
66
|
>;
|
66
67
|
} {
|
67
68
|
return function (path, ...handlers) {
|
68
|
-
return expressRuntime(handlers as Array<ErasedRequestHandlerIO<
|
69
|
+
return expressRuntime(handlers as Array<ErasedRequestHandlerIO<never>>).flatMap((expressHandlers) =>
|
69
70
|
IO.serviceWithIO(
|
70
71
|
(service: ExpressApp) => IO.succeed(() => service.app[method](path, ...expressHandlers)),
|
71
72
|
ExpressAppTag,
|
@@ -77,8 +78,8 @@ export function match(method: Methods): {
|
|
77
78
|
export function use<Handlers extends Array<RequestHandlerRouteIO>>(
|
78
79
|
...handlers: Handlers
|
79
80
|
): URIO<
|
80
|
-
ExpressEnv
|
81
|
-
|
81
|
+
| ExpressEnv
|
82
|
+
| _R<
|
82
83
|
{
|
83
84
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
84
85
|
}[number]
|
@@ -89,8 +90,8 @@ export function use<Route extends string, Handlers extends Array<RequestHandlerR
|
|
89
90
|
path: Route,
|
90
91
|
...handlers: never extends Handlers ? Array<RequestHandlerRouteIO<any, Route>> : Handlers
|
91
92
|
): URIO<
|
92
|
-
ExpressEnv
|
93
|
-
|
93
|
+
| ExpressEnv
|
94
|
+
| _R<
|
94
95
|
{
|
95
96
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
96
97
|
}[number]
|
@@ -100,9 +101,11 @@ export function use<Route extends string, Handlers extends Array<RequestHandlerR
|
|
100
101
|
export function use(...args: Array<any>): URIO<ExpressEnv, void> {
|
101
102
|
return IO.serviceWithIO((service: ExpressApp) => {
|
102
103
|
if (typeof args[0] === "function") {
|
103
|
-
return expressRuntime(args).flatMap((expressHandlers) =>
|
104
|
+
return expressRuntime(args as Array<RequestHandlerRouteIO>).flatMap((expressHandlers) =>
|
105
|
+
IO.succeed(() => service.app.use(...expressHandlers)),
|
106
|
+
);
|
104
107
|
} else {
|
105
|
-
return expressRuntime(args.slice(1) ?? []).flatMap((expressHandlers) =>
|
108
|
+
return expressRuntime((args as Array<RequestHandlerRouteIO>).slice(1) ?? []).flatMap((expressHandlers) =>
|
106
109
|
IO.succeed(() => service.app.use(args[0], ...expressHandlers)),
|
107
110
|
);
|
108
111
|
}
|
@@ -141,8 +144,8 @@ export const unsubscribe = match("unsubscribe");
|
|
141
144
|
/**
|
142
145
|
* Lift an express requestHandler into an effectified variant
|
143
146
|
*/
|
144
|
-
export function classic(_: NextHandleFunction): RequestHandlerIO<
|
145
|
-
export function classic(_: RequestHandler): RequestHandlerIO<
|
146
|
-
export function classic(_: RequestHandler | NextHandleFunction): RequestHandlerIO<
|
147
|
+
export function classic(_: NextHandleFunction): RequestHandlerIO<never, any>;
|
148
|
+
export function classic(_: RequestHandler): RequestHandlerIO<never, any>;
|
149
|
+
export function classic(_: RequestHandler | NextHandleFunction): RequestHandlerIO<never, any> {
|
147
150
|
return (req, res, next) => IO.succeed(() => _(req, res, next));
|
148
151
|
}
|
package/global.d.ts
ADDED
package/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { URIO } from "@fncts/io/IO";
|
2
|
-
import {
|
3
|
-
import type { ExpressApp, ExpressEnv } from "./ExpressApp.js";
|
1
|
+
import { URIO } from "@fncts/io/IO/definition";
|
2
|
+
import type { ExpressEnv } from "./ExpressApp.js";
|
4
3
|
import type { ErasedRequestHandlerIO, RequestHandlerIO, RequestHandlerRouteIO } from "./RequestHandlerIO.js";
|
4
|
+
import type { _R } from "@fncts/base/types";
|
5
5
|
import type { NextHandleFunction } from "connect";
|
6
6
|
import type { RequestHandler } from "express";
|
7
7
|
import type { RouteParameters } from "express-serve-static-core";
|
@@ -17,46 +17,46 @@ export interface ParamsDictionary {
|
|
17
17
|
[key: string]: string;
|
18
18
|
}
|
19
19
|
export declare function match(method: Methods): {
|
20
|
-
<Route extends string, Handlers extends Array<RequestHandlerRouteIO<any, Route>>>(path: Route, ...handlers: never extends Handlers ? Array<RequestHandlerIO<any, Route, RouteParameters<Route>>> : Handlers): URIO<ExpressEnv
|
20
|
+
<Route extends string, Handlers extends Array<RequestHandlerRouteIO<any, Route>>>(path: Route, ...handlers: never extends Handlers ? Array<RequestHandlerIO<any, Route, RouteParameters<Route>>> : Handlers): URIO<ExpressEnv | _R<{
|
21
21
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
22
22
|
}[number]>, void>;
|
23
23
|
};
|
24
|
-
export declare function use<Handlers extends Array<RequestHandlerRouteIO>>(...handlers: Handlers): URIO<ExpressEnv
|
24
|
+
export declare function use<Handlers extends Array<RequestHandlerRouteIO>>(...handlers: Handlers): URIO<ExpressEnv | _R<{
|
25
25
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
26
26
|
}[number]>, void>;
|
27
|
-
export declare function use<Route extends string, Handlers extends Array<RequestHandlerRouteIO<any, Route>>>(path: Route, ...handlers: never extends Handlers ? Array<RequestHandlerRouteIO<any, Route>> : Handlers): URIO<ExpressEnv
|
27
|
+
export declare function use<Route extends string, Handlers extends Array<RequestHandlerRouteIO<any, Route>>>(path: Route, ...handlers: never extends Handlers ? Array<RequestHandlerRouteIO<any, Route>> : Handlers): URIO<ExpressEnv | _R<{
|
28
28
|
[k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? URIO<R, void> : never;
|
29
29
|
}[number]>, void>;
|
30
|
-
export declare const all: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
31
|
-
export declare const get: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
32
|
-
export declare const post: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
33
|
-
export declare const put: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
34
|
-
declare const delete_: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
30
|
+
export declare const all: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
31
|
+
export declare const get: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
32
|
+
export declare const post: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
33
|
+
export declare const put: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
34
|
+
declare const delete_: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
35
35
|
export { delete_ as delete };
|
36
|
-
export declare const patch: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
37
|
-
export declare const options: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
38
|
-
export declare const head: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
39
|
-
export declare const checkout: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
40
|
-
export declare const connect: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
41
|
-
export declare const copy: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
42
|
-
export declare const lock: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
43
|
-
export declare const merge: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
44
|
-
export declare const mkactivity: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
45
|
-
export declare const mkcol: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
46
|
-
export declare const move: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
47
|
-
export declare const mSearch: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
48
|
-
export declare const notify: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
49
|
-
export declare const propfind: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
50
|
-
export declare const proppatch: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
51
|
-
export declare const purge: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
52
|
-
export declare const report: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
53
|
-
export declare const search: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
54
|
-
export declare const subscribe: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
55
|
-
export declare const trace: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
56
|
-
export declare const unlock: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
57
|
-
export declare const unsubscribe: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<
|
36
|
+
export declare const patch: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
37
|
+
export declare const options: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
38
|
+
export declare const head: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
39
|
+
export declare const checkout: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
40
|
+
export declare const connect: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
41
|
+
export declare const copy: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
42
|
+
export declare const lock: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
43
|
+
export declare const merge: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
44
|
+
export declare const mkactivity: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
45
|
+
export declare const mkcol: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
46
|
+
export declare const move: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
47
|
+
export declare const mSearch: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
48
|
+
export declare const notify: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
49
|
+
export declare const propfind: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
50
|
+
export declare const proppatch: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
51
|
+
export declare const purge: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
52
|
+
export declare const report: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
53
|
+
export declare const search: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
54
|
+
export declare const subscribe: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
55
|
+
export declare const trace: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
56
|
+
export declare const unlock: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
57
|
+
export declare const unsubscribe: <Route extends string, Handlers extends RequestHandlerRouteIO<any, Route>[]>(path: Route, ...handlers: never extends Handlers ? RequestHandlerIO<any, Route, RouteParameters<Route>, any, any, import("./RequestHandlerIO.js").ParsedQs, Record<string, any>>[] : Handlers) => import("@fncts/io/IO.js").URIO<ExpressEnv | import("@fncts/base/types").ExtractCovariantPhantom<{ [k in keyof Handlers]: [Handlers[k]] extends [ErasedRequestHandlerIO<infer R>] ? import("@fncts/io/IO.js").URIO<R, void> : never; }[number], "_R">, void>;
|
58
58
|
/**
|
59
59
|
* Lift an express requestHandler into an effectified variant
|
60
60
|
*/
|
61
|
-
export declare function classic(_: NextHandleFunction): RequestHandlerIO<
|
62
|
-
export declare function classic(_: RequestHandler): RequestHandlerIO<
|
61
|
+
export declare function classic(_: NextHandleFunction): RequestHandlerIO<never, any>;
|
62
|
+
export declare function classic(_: RequestHandler): RequestHandlerIO<never, any>;
|