vovk 3.0.0-beta.76 → 3.0.0-beta.77

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/cjs/VovkApp.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { NextRequest } from 'next/server';
2
2
  import { HttpMethod, HttpStatus, type RouteHandler, type VovkController, type DecoratorOptions, type VovkRequest } from './types';
3
3
  export declare class VovkApp {
4
4
  #private;
5
- segmentName: string;
5
+ segmentName: string | undefined;
6
6
  private static getHeadersFromOptions;
7
7
  routes: Record<HttpMethod, Map<VovkController, Record<string, RouteHandler>>>;
8
8
  GET: (req: NextRequest, data: {
package/cjs/VovkApp.js CHANGED
@@ -225,7 +225,7 @@ class VovkApp {
225
225
  return this.#respondWithError({
226
226
  req,
227
227
  statusCode: types_1.HttpStatus.NOT_FOUND,
228
- message: `Route "${path.join('/')}" is not found`,
228
+ message: `Route "${path.join('/')}" is not found at ${this.segmentName ?? 'the root'} segment.`,
229
229
  });
230
230
  }
231
231
  const { staticMethod, controller } = handler;
@@ -254,9 +254,7 @@ class VovkApp {
254
254
  typeof result[Symbol.asyncIterator] === 'function'));
255
255
  if (isIterator) {
256
256
  const streamResponse = new JSONLinesResponse_1.JSONLinesResponse(req, {
257
- headers: {
258
- ..._a.getHeadersFromOptions(staticMethod._options),
259
- },
257
+ headers: _a.getHeadersFromOptions(staticMethod._options),
260
258
  });
261
259
  void (async () => {
262
260
  try {
package/mjs/VovkApp.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { NextRequest } from 'next/server';
2
2
  import { HttpMethod, HttpStatus, type RouteHandler, type VovkController, type DecoratorOptions, type VovkRequest } from './types';
3
3
  export declare class VovkApp {
4
4
  #private;
5
- segmentName: string;
5
+ segmentName: string | undefined;
6
6
  private static getHeadersFromOptions;
7
7
  routes: Record<HttpMethod, Map<VovkController, Record<string, RouteHandler>>>;
8
8
  GET: (req: NextRequest, data: {
package/mjs/VovkApp.js CHANGED
@@ -225,7 +225,7 @@ class VovkApp {
225
225
  return this.#respondWithError({
226
226
  req,
227
227
  statusCode: types_1.HttpStatus.NOT_FOUND,
228
- message: `Route "${path.join('/')}" is not found`,
228
+ message: `Route "${path.join('/')}" is not found at ${this.segmentName ?? 'the root'} segment.`,
229
229
  });
230
230
  }
231
231
  const { staticMethod, controller } = handler;
@@ -254,9 +254,7 @@ class VovkApp {
254
254
  typeof result[Symbol.asyncIterator] === 'function'));
255
255
  if (isIterator) {
256
256
  const streamResponse = new JSONLinesResponse_1.JSONLinesResponse(req, {
257
- headers: {
258
- ..._a.getHeadersFromOptions(staticMethod._options),
259
- },
257
+ headers: _a.getHeadersFromOptions(staticMethod._options),
260
258
  });
261
259
  void (async () => {
262
260
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-beta.76",
3
+ "version": "3.0.0-beta.77",
4
4
  "main": "./cjs/index.js",
5
5
  "module": "./mjs/index.js",
6
6
  "types": "./mjs/index.d.ts",