@moostjs/event-http 0.6.47 → 0.6.48

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
@@ -549,7 +549,7 @@ const holdScopeUntilResponseCloses = { init: ({ unscope }) => {
549
549
  }
550
550
  const res = (0, _wooksjs_event_http.useResponse)(ctx).getRawRes(true);
551
551
  if (res.closed) unscope();
552
- else res.once("close", unscope);
552
+ else res.on("close", unscope);
553
553
  } };
554
554
  const LOGGER_TITLE = "moost-http";
555
555
  /**
@@ -754,7 +754,7 @@ const LOGGER_TITLE = "moost-http";
754
754
  image: "https://moost.org/moost-full-logo.svg",
755
755
  link: "https://moost.org/",
756
756
  poweredBy: "moostjs",
757
- version: "0.6.47"
757
+ version: "0.6.48"
758
758
  });
759
759
  if (httpApp && httpApp instanceof _wooksjs_event_http.WooksHttp) this.httpApp = httpApp;
760
760
  else if (httpApp) this.httpApp = (0, _wooksjs_event_http.createHttpApp)({
@@ -862,6 +862,12 @@ Object.defineProperty(exports, 'httpKind', {
862
862
  return _wooksjs_event_http.httpKind;
863
863
  }
864
864
  });
865
+ Object.defineProperty(exports, 'prerenderJson', {
866
+ enumerable: true,
867
+ get: function () {
868
+ return _wooksjs_event_http.prerenderJson;
869
+ }
870
+ });
865
871
  Object.defineProperty(exports, 'useHttpContext', {
866
872
  enumerable: true,
867
873
  get: function () {
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as moost from 'moost';
2
2
  import { TInterceptorPriority, TOvertakeFn, TInterceptorDef, TClassConstructor, TMoostAdapter, MOOST_ADAPTER_BRAND, TIsolatedSlot, EventContext, Moost, TConsoleBase, TMoostAdapterOptions } from 'moost';
3
3
  import * as _wooksjs_event_http from '@wooksjs/event-http';
4
4
  import { TCookieAttributes as TCookieAttributes$1, TCookieAttributesInput, WooksHttp, TWooksHttpOptions } from '@wooksjs/event-http';
5
- export { HttpError, TCacheControl, TCookieAttributesInput, TSetCookieData, httpKind, useHttpContext } from '@wooksjs/event-http';
5
+ export { HttpError, TCacheControl, TCookieAttributesInput, TPrerenderJsonOptions, TSetCookieData, httpKind, prerenderJson, useHttpContext } from '@wooksjs/event-http';
6
6
  import { IncomingMessage, ServerResponse } from 'http';
7
7
  import { Buffer } from 'buffer';
8
8
  import { ListenOptions } from 'net';
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { current } from "@wooksjs/event-core";
2
- import { HttpError, HttpError as HttpError$1, WooksHttp, WooksHttpResponse, createHttpApp, httpKind, httpKind as httpKind$1, useAuthorization, useCookies, useHeaders, useHttpContext, useRequest, useResponse, useUrlParams } from "@wooksjs/event-http";
2
+ import { HttpError, HttpError as HttpError$1, WooksHttp, WooksHttpResponse, createHttpApp, httpKind, httpKind as httpKind$1, prerenderJson, useAuthorization, useCookies, useHeaders, useHttpContext, useRequest, useResponse, useUrlParams } from "@wooksjs/event-http";
3
3
  import { Before, Intercept, Interceptor, MOOST_ADAPTER_BRAND, Overtake, Resolve, TInterceptorPriority, current as current$1, defineBeforeInterceptor, defineMoostEventHandler, forkEventContext, getMoostMate, globalKey, run } from "moost";
4
4
  import { seedBody, useBody } from "@wooksjs/http-body";
5
5
  import { createProvideRegistry } from "@prostojs/infact";
@@ -548,7 +548,7 @@ const holdScopeUntilResponseCloses = { init: ({ unscope }) => {
548
548
  }
549
549
  const res = useResponse(ctx).getRawRes(true);
550
550
  if (res.closed) unscope();
551
- else res.once("close", unscope);
551
+ else res.on("close", unscope);
552
552
  } };
553
553
  const LOGGER_TITLE = "moost-http";
554
554
  /**
@@ -753,7 +753,7 @@ const LOGGER_TITLE = "moost-http";
753
753
  image: "https://moost.org/moost-full-logo.svg",
754
754
  link: "https://moost.org/",
755
755
  poweredBy: "moostjs",
756
- version: "0.6.47"
756
+ version: "0.6.48"
757
757
  });
758
758
  if (httpApp && httpApp instanceof WooksHttp) this.httpApp = httpApp;
759
759
  else if (httpApp) this.httpApp = createHttpApp({
@@ -804,4 +804,4 @@ function isLocalOrigin(url) {
804
804
  }
805
805
 
806
806
  //#endregion
807
- export { All, AuthGuard, Authenticate, Authorization, Body, BodyReadTimeoutMs, BodySizeLimit, CompressedBodySizeLimit, Cookie, CookieAttrsRef, CookieRef, Delete, Get, Header, HeaderRef, HttpError, HttpMethod, Ip, IpList, Method, MoostHttp, Patch, Post, Put, Query, RawBody, Req, ReqId, Res, SetCookie, SetHeader, SetStatus, StatusRef, Upgrade, Url, defineAuthGuard, enableLocalFetch, extractTransports, globalBodyReadTimeoutMs, globalBodySizeLimit, globalCompressedBodySizeLimit, httpKind, useHttpContext };
807
+ export { All, AuthGuard, Authenticate, Authorization, Body, BodyReadTimeoutMs, BodySizeLimit, CompressedBodySizeLimit, Cookie, CookieAttrsRef, CookieRef, Delete, Get, Header, HeaderRef, HttpError, HttpMethod, Ip, IpList, Method, MoostHttp, Patch, Post, Put, Query, RawBody, Req, ReqId, Res, SetCookie, SetHeader, SetStatus, StatusRef, Upgrade, Url, defineAuthGuard, enableLocalFetch, extractTransports, globalBodyReadTimeoutMs, globalBodySizeLimit, globalCompressedBodySizeLimit, httpKind, prerenderJson, useHttpContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moostjs/event-http",
3
- "version": "0.6.47",
3
+ "version": "0.6.48",
4
4
  "description": "@moostjs/event-http",
5
5
  "keywords": [
6
6
  "composables",
@@ -38,16 +38,16 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@wooksjs/event-http": "^0.7.26",
42
- "@wooksjs/http-body": "^0.7.26"
41
+ "@wooksjs/event-http": "^0.7.27",
42
+ "@wooksjs/http-body": "^0.7.27"
43
43
  },
44
44
  "devDependencies": {
45
45
  "vitest": "3.2.7"
46
46
  },
47
47
  "peerDependencies": {
48
- "@prostojs/infact": "^0.6.0",
49
- "@wooksjs/event-core": "^0.7.26",
50
- "moost": "^0.6.47"
48
+ "@prostojs/infact": "^0.6.1",
49
+ "@wooksjs/event-core": "^0.7.27",
50
+ "moost": "^0.6.48"
51
51
  },
52
52
  "scripts": {
53
53
  "pub": "pnpm publish --access public",