@modern-js/runtime 2.63.2 → 2.63.4
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/cjs/cli/code.js +2 -2
- package/dist/cjs/cli/index.js +102 -108
- package/dist/cjs/cli/ssr/index.js +49 -52
- package/dist/cjs/core/server/string/loadable.js +13 -3
- package/dist/cjs/document/cli/index.js +32 -34
- package/dist/cjs/router/cli/code/index.js +5 -5
- package/dist/cjs/router/cli/handler.js +6 -6
- package/dist/cjs/router/cli/index.js +76 -78
- package/dist/cjs/router/runtime/plugin.js +1 -4
- package/dist/cjs/state/cli/index.js +22 -24
- package/dist/esm/cli/code.js +3 -3
- package/dist/esm/cli/index.js +120 -130
- package/dist/esm/cli/ssr/index.js +50 -53
- package/dist/esm/core/server/string/loadable.js +17 -5
- package/dist/esm/document/cli/index.js +28 -30
- package/dist/esm/router/cli/code/index.js +8 -8
- package/dist/esm/router/cli/handler.js +6 -6
- package/dist/esm/router/cli/index.js +161 -157
- package/dist/esm/router/runtime/plugin.js +1 -4
- package/dist/esm/state/cli/index.js +23 -25
- package/dist/esm-node/cli/code.js +2 -2
- package/dist/esm-node/cli/index.js +102 -108
- package/dist/esm-node/cli/ssr/index.js +49 -52
- package/dist/esm-node/core/server/string/loadable.js +13 -3
- package/dist/esm-node/document/cli/index.js +32 -34
- package/dist/esm-node/router/cli/code/index.js +5 -5
- package/dist/esm-node/router/cli/handler.js +6 -6
- package/dist/esm-node/router/cli/index.js +76 -78
- package/dist/esm-node/router/runtime/plugin.js +1 -4
- package/dist/esm-node/state/cli/index.js +22 -24
- package/dist/types/cli/code.d.ts +2 -9
- package/dist/types/cli/index.d.ts +3 -3
- package/dist/types/cli/ssr/index.d.ts +2 -2
- package/dist/types/core/server/string/loadable.d.ts +3 -2
- package/dist/types/document/cli/index.d.ts +2 -2
- package/dist/types/router/cli/code/index.d.ts +3 -3
- package/dist/types/router/cli/code/templates.d.ts +2 -2
- package/dist/types/router/cli/handler.d.ts +4 -4
- package/dist/types/router/cli/index.d.ts +2 -2
- package/dist/types/router/runtime/types.d.ts +0 -10
- package/dist/types/state/cli/index.d.ts +2 -2
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppNormalizedConfig,
|
|
1
|
+
import type { AppNormalizedConfig, AppToolsContext } from '@modern-js/app-tools';
|
|
2
2
|
import type { Entrypoint, NestedRouteForCli, PageRoute, RouteLegacy, SSRMode } from '@modern-js/types';
|
|
3
3
|
export declare const routesForServer: ({ routesForServerLoaderMatches, }: {
|
|
4
4
|
routesForServerLoaderMatches: (NestedRouteForCli | PageRoute)[];
|
|
@@ -12,7 +12,7 @@ export declare const fileSystemRoutes: ({ metaName, routes, ssrMode, nestedRoute
|
|
|
12
12
|
internalDirectory: string;
|
|
13
13
|
splitRouteChunks?: boolean | undefined;
|
|
14
14
|
}) => Promise<string>;
|
|
15
|
-
export declare function ssrLoaderCombinedModule(entrypoints: Entrypoint[], entrypoint: Entrypoint, config: AppNormalizedConfig<'shared'>, appContext:
|
|
15
|
+
export declare function ssrLoaderCombinedModule(entrypoints: Entrypoint[], entrypoint: Entrypoint, config: AppNormalizedConfig<'shared'>, appContext: AppToolsContext<'shared'>): string | null;
|
|
16
16
|
export declare const runtimeGlobalContext: ({ metaName, srcDirectory, nestedRoutesEntry, internalSrcAlias, globalApp, }: {
|
|
17
17
|
metaName: string;
|
|
18
18
|
srcDirectory: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AppTools } from '@modern-js/app-tools';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CLIPluginAPI } from '@modern-js/plugin-v2';
|
|
3
3
|
import type { Entrypoint } from '@modern-js/types';
|
|
4
|
-
export declare function handleModifyEntrypoints(api:
|
|
5
|
-
export declare function handleGeneratorEntryCode(api:
|
|
6
|
-
export declare function handleFileChange(api:
|
|
4
|
+
export declare function handleModifyEntrypoints(api: CLIPluginAPI<AppTools<'shared'>>, entrypoints: Entrypoint[]): Promise<Entrypoint[]>;
|
|
5
|
+
export declare function handleGeneratorEntryCode(api: CLIPluginAPI<AppTools<'shared'>>, entrypoints: Entrypoint[]): Promise<Entrypoint[]>;
|
|
6
|
+
export declare function handleFileChange(api: CLIPluginAPI<AppTools<'shared'>>, e: any): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppTools,
|
|
1
|
+
import type { AppTools, CliPluginFuture } from '@modern-js/app-tools';
|
|
2
2
|
export { isRouteEntry } from './entry';
|
|
3
3
|
export { handleFileChange, handleModifyEntrypoints } from './handler';
|
|
4
|
-
export declare const routerPlugin: () =>
|
|
4
|
+
export declare const routerPlugin: () => CliPluginFuture<AppTools<'shared'>>;
|
|
5
5
|
export default routerPlugin;
|
|
@@ -2,16 +2,6 @@
|
|
|
2
2
|
import type { RequestContext } from '@modern-js/runtime-utils/node';
|
|
3
3
|
import type { Params, RouteObject, RouteProps } from '@modern-js/runtime-utils/router';
|
|
4
4
|
import type { NestedRoute, PageRoute } from '@modern-js/types';
|
|
5
|
-
declare global {
|
|
6
|
-
interface Window {
|
|
7
|
-
_SERVER_DATA?: {
|
|
8
|
-
router: {
|
|
9
|
-
baseUrl: string;
|
|
10
|
-
params: Record<string, string>;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
5
|
export type SingleRouteConfig = RouteProps & {
|
|
16
6
|
redirect?: string;
|
|
17
7
|
routes?: SingleRouteConfig[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AppTools,
|
|
2
|
-
export declare const statePlugin: () =>
|
|
1
|
+
import type { AppTools, CliPluginFuture } from '@modern-js/app-tools';
|
|
2
|
+
export declare const statePlugin: () => CliPluginFuture<AppTools<'shared'>>;
|
|
3
3
|
export default statePlugin;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.63.
|
|
18
|
+
"version": "2.63.4",
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=14.17.6"
|
|
21
21
|
},
|
|
@@ -200,11 +200,12 @@
|
|
|
200
200
|
"react-is": "^18",
|
|
201
201
|
"react-side-effect": "^2.1.1",
|
|
202
202
|
"styled-components": "^5.3.1",
|
|
203
|
-
"@modern-js/plugin": "2.63.
|
|
204
|
-
"@modern-js/
|
|
205
|
-
"@modern-js/
|
|
206
|
-
"@modern-js/runtime-utils": "2.63.
|
|
207
|
-
"@modern-js/
|
|
203
|
+
"@modern-js/plugin": "2.63.4",
|
|
204
|
+
"@modern-js/plugin-v2": "2.63.4",
|
|
205
|
+
"@modern-js/plugin-data-loader": "2.63.4",
|
|
206
|
+
"@modern-js/runtime-utils": "2.63.4",
|
|
207
|
+
"@modern-js/types": "2.63.4",
|
|
208
|
+
"@modern-js/utils": "2.63.4"
|
|
208
209
|
},
|
|
209
210
|
"peerDependencies": {
|
|
210
211
|
"react": ">=17",
|
|
@@ -212,7 +213,7 @@
|
|
|
212
213
|
},
|
|
213
214
|
"devDependencies": {
|
|
214
215
|
"@remix-run/web-fetch": "^4.1.3",
|
|
215
|
-
"@rsbuild/core": "1.1.
|
|
216
|
+
"@rsbuild/core": "1.1.12",
|
|
216
217
|
"@testing-library/react": "^13.4.0",
|
|
217
218
|
"@types/cookie": "0.6.0",
|
|
218
219
|
"@types/invariant": "^2.2.30",
|
|
@@ -228,10 +229,9 @@
|
|
|
228
229
|
"ts-node": "^10.9.1",
|
|
229
230
|
"typescript": "^5",
|
|
230
231
|
"webpack": "^5.97.1",
|
|
231
|
-
"@modern-js/app-tools": "2.63.
|
|
232
|
-
"@
|
|
233
|
-
"@scripts/
|
|
234
|
-
"@scripts/jest-config": "2.63.2"
|
|
232
|
+
"@modern-js/app-tools": "2.63.4",
|
|
233
|
+
"@scripts/build": "2.63.4",
|
|
234
|
+
"@scripts/jest-config": "2.63.4"
|
|
235
235
|
},
|
|
236
236
|
"sideEffects": false,
|
|
237
237
|
"publishConfig": {
|