@modern-js/server-core 2.65.6-alpha.0 → 2.67.0

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.
@@ -32,7 +32,7 @@ function injectRoute(route) {
32
32
  };
33
33
  }
34
34
  function getPageRoutes(routes) {
35
- return routes.filter((route) => !route.isApi).sort(import_utils.sortRoutes);
35
+ return routes.filter((route) => route.entryName).sort(import_utils.sortRoutes);
36
36
  }
37
37
  const injectRoutePlugin = () => ({
38
38
  name: "@modern-js/plugin-inject-route",
@@ -30,7 +30,7 @@ function injectRoute(route) {
30
30
  }
31
31
  function getPageRoutes(routes) {
32
32
  return routes.filter(function(route) {
33
- return !route.isApi;
33
+ return route.entryName;
34
34
  }).sort(sortRoutes);
35
35
  }
36
36
  var injectRoutePlugin = function() {
@@ -9,7 +9,7 @@ function injectRoute(route) {
9
9
  };
10
10
  }
11
11
  function getPageRoutes(routes) {
12
- return routes.filter((route) => !route.isApi).sort(sortRoutes);
12
+ return routes.filter((route) => route.entryName).sort(sortRoutes);
13
13
  }
14
14
  const injectRoutePlugin = () => ({
15
15
  name: "@modern-js/plugin-inject-route",
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import { type Server as NodeServer } from 'node:http';
4
2
  import type { Server as NodeHttpsServer } from 'node:https';
5
3
  import type { NodeRequest, NodeResponse, RequestHandler } from '../../types';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Server as NodeServer } from 'node:http';
3
2
  import type { ServerPluginLegacy } from '../../../types';
4
3
  export declare const injectNodeSeverPlugin: ({ nodeServer, }: {
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  /**
4
2
  * The following code is modified based on
5
3
  * https://github.com/remix-run/remix/blob/f7defe0b46c50947f6269d5ab5b6e3fe59339054/packages/remix-node/stream.ts#L3
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingMessage } from 'http';
3
2
  import type { CacheControl, CacheOption, Container } from '@modern-js/types';
4
3
  import type { RequestHandler, RequestHandlerOptions } from '../../types/requestHandler';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingMessage } from 'http';
3
2
  import type { Logger, Metrics, Reporter, ServerRoute } from '@modern-js/types';
4
3
  import type { Monitors, ClientManifest as RscClientManifest, SSRManifest as RscSSRManifest, ServerManifest as RscServerManifest } from '@modern-js/types/server';
@@ -35,8 +35,8 @@ export declare class ServerBase<E extends Env = any> {
35
35
  get put(): import("hono/types").HandlerInterface<E, "put", {}, "/">;
36
36
  get delete(): import("hono/types").HandlerInterface<E, "delete", {}, "/">;
37
37
  get patch(): import("hono/types").HandlerInterface<E, "patch", {}, "/">;
38
- get handle(): (request: Request, Env?: {} | E["Bindings"] | undefined, executionCtx?: import("hono/dist/types/context").ExecutionContext | undefined) => Response | Promise<Response>;
39
- get request(): (input: RequestInfo | URL, requestInit?: RequestInit | undefined, Env?: {} | E["Bindings"] | undefined, executionCtx?: import("hono/dist/types/context").ExecutionContext | undefined) => Response | Promise<Response>;
38
+ get handle(): (request: Request, Env?: {} | E["Bindings"] | undefined, executionCtx?: import("hono/dist/types/context").ExecutionContext) => Response | Promise<Response>;
39
+ get request(): (input: RequestInfo | URL, requestInit?: RequestInit, Env?: {} | E["Bindings"] | undefined, executionCtx?: import("hono/dist/types/context").ExecutionContext) => Response | Promise<Response>;
40
40
  get notFound(): (handler: import("hono").NotFoundHandler<E>) => Hono<E, {}, "/">;
41
41
  get onError(): (handler: import("hono").ErrorHandler<E>) => Hono<E, {}, "/">;
42
42
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingMessage, Server as NodeServer, ServerResponse } from 'http';
3
2
  import type { CacheOption, Container, HttpMethodDecider, Logger, Metrics, MiddlewareContext, Reporter, ServerRoute, UnstableMiddleware } from '@modern-js/types';
4
3
  import type { MiddlewareHandler } from 'hono';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingMessage } from 'node:http';
3
2
  import type { Logger, Metrics, Monitors, Reporter, ClientManifest as RscClientManifest, SSRManifest as RscSSRManifest, ServerManifest as RscServerManifest } from '@modern-js/types';
4
3
  import type { ServerManifest } from './server';
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.65.6-alpha.0",
18
+ "version": "2.67.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -53,10 +53,10 @@
53
53
  "flatted": "^3.2.9",
54
54
  "hono": "^3.12.2",
55
55
  "ts-deepmerge": "7.0.2",
56
- "@modern-js/plugin": "2.65.5",
57
- "@modern-js/runtime-utils": "2.65.5",
58
- "@modern-js/plugin-v2": "2.65.6-alpha.0",
59
- "@modern-js/utils": "2.65.5"
56
+ "@modern-js/plugin": "2.67.0",
57
+ "@modern-js/runtime-utils": "2.67.0",
58
+ "@modern-js/plugin-v2": "2.67.0",
59
+ "@modern-js/utils": "2.67.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/jest": "^29",
@@ -66,9 +66,9 @@
66
66
  "jest": "^29",
67
67
  "ts-jest": "^29.1.0",
68
68
  "typescript": "^5",
69
- "@modern-js/types": "2.65.5",
70
- "@scripts/build": "2.65.5",
71
- "@scripts/jest-config": "2.65.5"
69
+ "@modern-js/types": "2.67.0",
70
+ "@scripts/build": "2.66.0",
71
+ "@scripts/jest-config": "2.66.0"
72
72
  },
73
73
  "sideEffects": false,
74
74
  "publishConfig": {