Skip to content

Commit

Permalink
chore: cr
Browse files Browse the repository at this point in the history
  • Loading branch information
zllkjc committed Feb 21, 2025
1 parent 5111c83 commit 0ebc812
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ function createSSRContext(
logger,
metrics,
reporter,
monitors,
} = options;

const { nonce, useJsonScript } = config;
Expand Down Expand Up @@ -146,7 +145,6 @@ function createSSRContext(
locals: locals || {},
},
reporter,
monitors,
mode: ssrMode,
onError,
onTiming,
Expand Down
3 changes: 1 addition & 2 deletions packages/runtime/plugin-runtime/src/core/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { OnError, OnTiming } from '@modern-js/app-tools';
import type { BaseSSRServerContext, Monitors } from '@modern-js/types';
import type { BaseSSRServerContext } from '@modern-js/types';
import type { RenderLevel } from './constants';
import type { LoaderResult } from './loader/loaderManager';

Expand Down Expand Up @@ -71,7 +71,6 @@ export type SSRServerContext = Pick<
loaderFailureMode?: 'clientRender' | 'errorBoundary';
onError: OnError;
onTiming: OnTiming;
monitors: Monitors;
useJsonScript?: boolean;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const routerPlugin = (
const { baseUrl } = request;
const _basename =
baseUrl === '/' ? urlJoin(baseUrl, basename) : baseUrl;
const { reporter, monitors } = context.ssrContext!;
const { reporter } = context.ssrContext!;
const requestContext = createRequestContext(
context.ssrContext?.loaderContext,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Monitors, RequestPayload } from '@modern-js/types';
import { type LoaderContext, createLoaderContext } from './createLoaderCtx';
import type { RequestPayload } from '@modern-js/types';
import type { LoaderContext } from './createLoaderCtx';

interface Get<P extends Record<string, unknown>> {
<Key extends keyof P>(key: Key): P[Key];
Expand Down
52 changes: 0 additions & 52 deletions tests/integration/server-monitors/CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion tests/integration/server-monitors/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## 用例说明

* 服务端自定义 Server 中间件用例
* monitors 用例

0 comments on commit 0ebc812

Please sign in to comment.