alien-middleware 0.10.1 → 0.10.3

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.
@@ -2,6 +2,10 @@
2
2
  function noop() {
3
3
  }
4
4
  var isArray = /* @__PURE__ */ (() => Array.isArray)();
5
+ var asyncIteratorSymbol = (
6
+ /* c8 ignore next */
7
+ Symbol.asyncIterator || Symbol.for("Symbol.asyncIterator")
8
+ );
5
9
  function isFunction(value) {
6
10
  return typeof value === "function";
7
11
  }
@@ -116,8 +116,8 @@ type RequestContext<TEnv extends object = any, TProperties extends object = neve
116
116
  type MiddlewareContext<T extends MiddlewareChain | Middleware[]> = [
117
117
  T
118
118
  ] extends [never] ? RequestContext<{}, never, unknown> : T extends MiddlewareChain ? RequestContext<Env<T>, Properties<T>, Platform<T>> : T extends Middleware[] ? MiddlewareContext<ApplyMiddlewares<T>> : never;
119
- type IsolatedContext<T extends MiddlewareChain> = RequestContext<InputProperties<T>, InputEnv<T>, Platform<T>>;
120
- type RequestMiddleware<T extends MiddlewareChain = MiddlewareChain> = (context: RequestContext<InputProperties<T>, InputEnv<T>, Platform<T>>) => Awaitable<Response | RequestPlugin | void>;
119
+ type IsolatedContext<T extends MiddlewareChain> = RequestContext<InputEnv<T>, InputProperties<T>, Platform<T>>;
120
+ type RequestMiddleware<T extends MiddlewareChain = MiddlewareChain> = (context: RequestContext<InputEnv<T>, InputProperties<T>, Platform<T>>) => Awaitable<Response | RequestPlugin | void>;
121
121
  type ResponseCallback = (response: Response) => Awaitable<Response | void>;
122
122
  interface RequestHandler<T extends MiddlewareTypes = any> extends HattipHandler<T['platform']>, MiddlewareChain<T> {
123
123
  }
@@ -249,4 +249,4 @@ declare function chain<TEnv extends object = {}, TProperties extends object = {}
249
249
  }>;
250
250
  declare function chain<const T extends Middleware = Middleware<{}, {}, unknown>>(middleware: T): ApplyFirstMiddleware<T>;
251
251
 
252
- export { type ApplyMiddleware as A, type EmptyMiddlewareChain as E, type MiddlewareContext as M, type Router as R, MiddlewareChain as a, type RouteContext as b, type RouteHandler as c, chain as d, type ApplyMiddlewares as e, filterPlatform as f, type EnvAccessor as g, type ExtractMiddleware as h, type Middleware as i, type RequestContext as j, type RequestHandler as k, type RequestMiddleware as l, type RequestPlugin as m, type ResponseCallback as n };
252
+ export { type ApplyMiddleware as A, type EmptyMiddlewareChain as E, type HattipContext as H, type MiddlewareContext as M, type Router as R, MiddlewareChain as a, type RouteContext as b, type RouteHandler as c, chain as d, type ApplyMiddlewares as e, filterPlatform as f, type EnvAccessor as g, type ExtractMiddleware as h, type Middleware as i, type RequestContext as j, type RequestHandler as k, type RequestMiddleware as l, type RequestPlugin as m, type ResponseCallback as n };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { A as ApplyMiddleware, e as ApplyMiddlewares, g as EnvAccessor, h as ExtractMiddleware, i as Middleware, a as MiddlewareChain, M as MiddlewareContext, j as RequestContext, k as RequestHandler, l as RequestMiddleware, m as RequestPlugin, n as ResponseCallback, d as chain, f as filterPlatform } from './index-BRjj7Wf2.js';
1
+ export { A as ApplyMiddleware, e as ApplyMiddlewares, E as EmptyMiddlewareChain, g as EnvAccessor, h as ExtractMiddleware, H as HattipContext, i as Middleware, a as MiddlewareChain, M as MiddlewareContext, j as RequestContext, k as RequestHandler, l as RequestMiddleware, m as RequestPlugin, n as ResponseCallback, d as chain, f as filterPlatform } from './index-Bzfu9JE9.js';
2
2
  import '@hattip/core';
3
3
  import 'pathic';
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  MiddlewareChain,
3
3
  chain,
4
4
  filterPlatform
5
- } from "./chunk-BBMRIHZ5.js";
5
+ } from "./chunk-2YXTWP7H.js";
6
6
  export {
7
7
  MiddlewareChain,
8
8
  chain,
package/dist/router.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as Router, M as MiddlewareContext, a as MiddlewareChain, E as EmptyMiddlewareChain } from './index-BRjj7Wf2.js';
2
- export { b as RouteContext, c as RouteHandler } from './index-BRjj7Wf2.js';
1
+ import { R as Router, M as MiddlewareContext, a as MiddlewareChain, E as EmptyMiddlewareChain } from './index-Bzfu9JE9.js';
2
+ export { b as RouteContext, c as RouteHandler } from './index-Bzfu9JE9.js';
3
3
  import '@hattip/core';
4
4
  import 'pathic';
5
5
 
package/dist/router.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  defineParsedURL,
4
4
  isArray,
5
5
  isFunction
6
- } from "./chunk-BBMRIHZ5.js";
6
+ } from "./chunk-2YXTWP7H.js";
7
7
 
8
8
  // src/router.ts
9
9
  import { compilePaths } from "pathic";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "alien-middleware",
3
3
  "type": "module",
4
- "version": "0.10.1",
4
+ "version": "0.10.3",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",