@moostjs/event-http 0.5.28 → 0.5.29

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/dist/index.cjs CHANGED
@@ -26,7 +26,6 @@ const moost = __toESM(require("moost"));
26
26
  const __wooksjs_event_core = __toESM(require("@wooksjs/event-core"));
27
27
  const __wooksjs_event_http = __toESM(require("@wooksjs/event-http"));
28
28
  const __wooksjs_http_body = __toESM(require("@wooksjs/http-body"));
29
- const packages_moost_dist = __toESM(require("packages/moost/dist"));
30
29
  const __prostojs_infact = __toESM(require("@prostojs/infact"));
31
30
  const http = __toESM(require("http"));
32
31
  const https = __toESM(require("https"));
@@ -205,18 +204,18 @@ function SetStatus(...args) {
205
204
 
206
205
  //#endregion
207
206
  //#region packages/event-http/src/decorators/limits.decorator.ts
208
- const globalBodySizeLimit = (n) => (0, packages_moost_dist.defineInterceptorFn)(() => {
207
+ const globalBodySizeLimit = (n) => (0, moost.defineInterceptorFn)(() => {
209
208
  (0, __wooksjs_event_http.useRequest)().setMaxInflated(n);
210
- }, packages_moost_dist.TInterceptorPriority.BEFORE_ALL);
211
- const globalCompressedBodySizeLimit = (n) => (0, packages_moost_dist.defineInterceptorFn)(() => {
209
+ }, moost.TInterceptorPriority.BEFORE_ALL);
210
+ const globalCompressedBodySizeLimit = (n) => (0, moost.defineInterceptorFn)(() => {
212
211
  (0, __wooksjs_event_http.useRequest)().setMaxCompressed(n);
213
- }, packages_moost_dist.TInterceptorPriority.BEFORE_ALL);
214
- const globalBodyReadTimeoutMs = (n) => (0, packages_moost_dist.defineInterceptorFn)(() => {
212
+ }, moost.TInterceptorPriority.BEFORE_ALL);
213
+ const globalBodyReadTimeoutMs = (n) => (0, moost.defineInterceptorFn)(() => {
215
214
  (0, __wooksjs_event_http.useRequest)().setReadTimeoutMs(n);
216
- }, packages_moost_dist.TInterceptorPriority.BEFORE_ALL);
217
- const BodySizeLimit = (n) => (0, packages_moost_dist.Intercept)(globalBodySizeLimit(n));
218
- const CompressedBodySizeLimit = (n) => (0, packages_moost_dist.Intercept)(globalCompressedBodySizeLimit(n));
219
- const BodyReadTimeoutMs = (n) => (0, packages_moost_dist.Intercept)(globalBodyReadTimeoutMs(n));
215
+ }, moost.TInterceptorPriority.BEFORE_ALL);
216
+ const BodySizeLimit = (n) => (0, moost.Intercept)(globalBodySizeLimit(n));
217
+ const CompressedBodySizeLimit = (n) => (0, moost.Intercept)(globalCompressedBodySizeLimit(n));
218
+ const BodyReadTimeoutMs = (n) => (0, moost.Intercept)(globalBodyReadTimeoutMs(n));
220
219
 
221
220
  //#endregion
222
221
  //#region packages/event-http/src/event-http.ts
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  import { THook } from '@wooksjs/event-core';
3
3
  import { TCookieAttributes as TCookieAttributes$1, useSetCookies, WooksHttp, TWooksHttpOptions } from '@wooksjs/event-http';
4
4
  export { HttpError, TCacheControl, TCookieAttributesInput, TSetCookieData, useHttpContext } from '@wooksjs/event-http';
5
+ import * as moost from 'moost';
5
6
  import { TInterceptorFn, TMoostAdapter, Moost, TConsoleBase, TMoostAdapterOptions } from 'moost';
6
- import * as packages_moost_dist from 'packages/moost/dist';
7
7
  import * as _prostojs_infact from '@prostojs/infact';
8
8
  import * as http from 'http';
9
9
  import { TProstoRouterPathBuilder } from '@prostojs/router';
@@ -56,9 +56,9 @@ declare const setStatusInterceptor: (code: number, opts?: {
56
56
  }) => TInterceptorFn;
57
57
  declare function SetStatus(...args: Parameters<typeof setStatusInterceptor>): ClassDecorator & MethodDecorator;
58
58
 
59
- declare const globalBodySizeLimit: (n: number) => packages_moost_dist.TInterceptorFn;
60
- declare const globalCompressedBodySizeLimit: (n: number) => packages_moost_dist.TInterceptorFn;
61
- declare const globalBodyReadTimeoutMs: (n: number) => packages_moost_dist.TInterceptorFn;
59
+ declare const globalBodySizeLimit: (n: number) => moost.TInterceptorFn;
60
+ declare const globalCompressedBodySizeLimit: (n: number) => moost.TInterceptorFn;
61
+ declare const globalBodyReadTimeoutMs: (n: number) => moost.TInterceptorFn;
62
62
  declare const BodySizeLimit: (n: number) => ClassDecorator & MethodDecorator;
63
63
  declare const CompressedBodySizeLimit: (n: number) => ClassDecorator & MethodDecorator;
64
64
  declare const BodyReadTimeoutMs: (n: number) => ClassDecorator & MethodDecorator;
package/dist/index.mjs CHANGED
@@ -2,7 +2,6 @@ import { Intercept, Resolve, TInterceptorPriority, defineInterceptorFn, defineMo
2
2
  import { attachHook } from "@wooksjs/event-core";
3
3
  import { HttpError, WooksHttp, createHttpApp, useAuthorization, useCookies, useHeaders, useHttpContext, useRequest, useResponse, useSearchParams, useSetCookie, useSetCookies, useSetHeader, useStatus } from "@wooksjs/event-http";
4
4
  import { useBody } from "@wooksjs/http-body";
5
- import { Intercept as Intercept$1, TInterceptorPriority as TInterceptorPriority$1, defineInterceptorFn as defineInterceptorFn$1 } from "packages/moost/dist";
6
5
  import { createProvideRegistry } from "@prostojs/infact";
7
6
  import { Server } from "http";
8
7
  import { Server as Server$1 } from "https";
@@ -181,18 +180,18 @@ function SetStatus(...args) {
181
180
 
182
181
  //#endregion
183
182
  //#region packages/event-http/src/decorators/limits.decorator.ts
184
- const globalBodySizeLimit = (n) => defineInterceptorFn$1(() => {
183
+ const globalBodySizeLimit = (n) => defineInterceptorFn(() => {
185
184
  useRequest().setMaxInflated(n);
186
- }, TInterceptorPriority$1.BEFORE_ALL);
187
- const globalCompressedBodySizeLimit = (n) => defineInterceptorFn$1(() => {
185
+ }, TInterceptorPriority.BEFORE_ALL);
186
+ const globalCompressedBodySizeLimit = (n) => defineInterceptorFn(() => {
188
187
  useRequest().setMaxCompressed(n);
189
- }, TInterceptorPriority$1.BEFORE_ALL);
190
- const globalBodyReadTimeoutMs = (n) => defineInterceptorFn$1(() => {
188
+ }, TInterceptorPriority.BEFORE_ALL);
189
+ const globalBodyReadTimeoutMs = (n) => defineInterceptorFn(() => {
191
190
  useRequest().setReadTimeoutMs(n);
192
- }, TInterceptorPriority$1.BEFORE_ALL);
193
- const BodySizeLimit = (n) => Intercept$1(globalBodySizeLimit(n));
194
- const CompressedBodySizeLimit = (n) => Intercept$1(globalCompressedBodySizeLimit(n));
195
- const BodyReadTimeoutMs = (n) => Intercept$1(globalBodyReadTimeoutMs(n));
191
+ }, TInterceptorPriority.BEFORE_ALL);
192
+ const BodySizeLimit = (n) => Intercept(globalBodySizeLimit(n));
193
+ const CompressedBodySizeLimit = (n) => Intercept(globalCompressedBodySizeLimit(n));
194
+ const BodyReadTimeoutMs = (n) => Intercept(globalBodyReadTimeoutMs(n));
196
195
 
197
196
  //#endregion
198
197
  //#region packages/event-http/src/event-http.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moostjs/event-http",
3
- "version": "0.5.28",
3
+ "version": "0.5.29",
4
4
  "description": "@moostjs/event-http",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -43,7 +43,7 @@
43
43
  "@wooksjs/event-core": "^0.6.0",
44
44
  "@wooksjs/event-http": "^0.6.0",
45
45
  "@wooksjs/http-body": "^0.6.0",
46
- "moost": "^0.5.28"
46
+ "moost": "^0.5.29"
47
47
  },
48
48
  "devDependencies": {
49
49
  "vitest": "^3.0.5"