@modern-js/app-tools 2.53.1-alpha.4 → 2.54.1-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/modern.js +0 -2
- package/dist/cjs/builder/shared/builderPlugins/adapterHtml.js +2 -1
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +2 -2
- package/dist/cjs/commands/build.js +2 -0
- package/dist/cjs/commands/deploy.js +2 -2
- package/dist/cjs/commands/dev.js +19 -5
- package/dist/cjs/commands/index.js +113 -7
- package/dist/cjs/commands/serve.js +19 -5
- package/dist/cjs/hooks.js +5 -0
- package/dist/cjs/index.js +14 -83
- package/dist/cjs/plugins/analyze/constants.js +56 -0
- package/dist/cjs/{analyze → plugins/analyze}/generateCode.js +11 -84
- package/dist/cjs/{analyze → plugins/analyze}/getBundleEntry.js +11 -20
- package/dist/cjs/{analyze → plugins/analyze}/getFileSystemEntry.js +33 -47
- package/dist/cjs/{analyze → plugins/analyze}/getServerRoutes.js +1 -1
- package/dist/cjs/{analyze → plugins/analyze}/index.js +9 -24
- package/dist/cjs/plugins/analyze/templates.js +101 -0
- package/dist/cjs/{analyze → plugins/analyze}/utils.js +12 -55
- package/dist/cjs/plugins/deploy/platforms/netlify.js +2 -2
- package/dist/cjs/plugins/deploy/platforms/node.js +2 -2
- package/dist/cjs/plugins/deploy/platforms/vercel.js +2 -2
- package/dist/cjs/{initialize → plugins/initialize}/index.js +1 -1
- package/dist/cjs/plugins/serverBuild.js +10 -4
- package/dist/cjs/utils/createServer.js +1 -1
- package/dist/cjs/utils/{getServerInternalPlugins.js → loadPlugins.js} +18 -11
- package/dist/esm/builder/shared/builderPlugins/adapterHtml.js +4 -1
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.js +2 -2
- package/dist/esm/commands/build.js +16 -9
- package/dist/esm/commands/deploy.js +2 -2
- package/dist/esm/commands/dev.js +13 -9
- package/dist/esm/commands/index.js +411 -3
- package/dist/esm/commands/serve.js +12 -8
- package/dist/esm/hooks.js +5 -0
- package/dist/esm/index.js +12 -394
- package/dist/esm/plugins/analyze/constants.js +24 -0
- package/dist/esm/{analyze → plugins/analyze}/generateCode.js +27 -169
- package/dist/esm/plugins/analyze/getBundleEntry.js +101 -0
- package/dist/esm/plugins/analyze/getFileSystemEntry.js +195 -0
- package/dist/esm/{analyze → plugins/analyze}/getServerRoutes.js +1 -1
- package/dist/esm/{analyze → plugins/analyze}/index.js +42 -70
- package/dist/esm/plugins/analyze/templates.js +22 -0
- package/dist/esm/{analyze → plugins/analyze}/utils.js +13 -135
- package/dist/esm/plugins/deploy/platforms/netlify.js +5 -3
- package/dist/esm/plugins/deploy/platforms/node.js +5 -3
- package/dist/esm/plugins/deploy/platforms/vercel.js +5 -3
- package/dist/esm/{initialize → plugins/initialize}/index.js +1 -1
- package/dist/esm/plugins/serverBuild.js +13 -6
- package/dist/esm/utils/createServer.js +2 -2
- package/dist/esm/utils/loadPlugins.js +64 -0
- package/dist/esm-node/builder/shared/builderPlugins/adapterHtml.js +2 -1
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.js +2 -2
- package/dist/esm-node/commands/build.js +2 -0
- package/dist/esm-node/commands/deploy.js +2 -2
- package/dist/esm-node/commands/dev.js +11 -7
- package/dist/esm-node/commands/index.js +92 -3
- package/dist/esm-node/commands/serve.js +10 -6
- package/dist/esm-node/hooks.js +5 -0
- package/dist/esm-node/index.js +12 -79
- package/dist/esm-node/plugins/analyze/constants.js +24 -0
- package/dist/esm-node/{analyze → plugins/analyze}/generateCode.js +14 -87
- package/dist/esm-node/{analyze → plugins/analyze}/getBundleEntry.js +11 -20
- package/dist/esm-node/plugins/analyze/getFileSystemEntry.js +75 -0
- package/dist/esm-node/{analyze → plugins/analyze}/getServerRoutes.js +1 -1
- package/dist/esm-node/{analyze → plugins/analyze}/index.js +10 -25
- package/dist/esm-node/plugins/analyze/templates.js +75 -0
- package/dist/esm-node/{analyze → plugins/analyze}/utils.js +13 -52
- package/dist/esm-node/plugins/deploy/platforms/netlify.js +3 -3
- package/dist/esm-node/plugins/deploy/platforms/node.js +3 -3
- package/dist/esm-node/plugins/deploy/platforms/vercel.js +3 -3
- package/dist/esm-node/{initialize → plugins/initialize}/index.js +1 -1
- package/dist/esm-node/plugins/serverBuild.js +11 -5
- package/dist/esm-node/utils/createServer.js +2 -2
- package/dist/esm-node/utils/loadPlugins.js +21 -0
- package/dist/types/builder/builder-webpack/createCopyPattern.d.ts +2 -2
- package/dist/types/commands/index.d.ts +10 -3
- package/dist/types/config/initialize/inits.d.ts +1 -1
- package/dist/types/exports/server.d.ts +4 -0
- package/dist/types/index.d.ts +2 -5
- package/dist/types/plugins/analyze/constants.d.ts +9 -0
- package/dist/types/{analyze → plugins/analyze}/generateCode.d.ts +1 -1
- package/dist/types/plugins/analyze/getBundleEntry.d.ts +4 -0
- package/dist/types/plugins/analyze/getFileSystemEntry.d.ts +5 -0
- package/dist/types/{analyze → plugins/analyze}/getHtmlTemplate.d.ts +1 -1
- package/dist/types/{analyze → plugins/analyze}/getServerRoutes.d.ts +1 -1
- package/dist/types/{analyze → plugins/analyze}/index.d.ts +1 -1
- package/dist/types/plugins/analyze/templates.d.ts +19 -0
- package/dist/types/{analyze → plugins/analyze}/utils.d.ts +4 -6
- package/dist/types/{initialize → plugins/initialize}/index.d.ts +1 -1
- package/dist/types/types/hooks.d.ts +11 -1
- package/dist/types/utils/loadPlugins.d.ts +5 -0
- package/package.json +22 -22
- package/dist/cjs/analyze/constants.js +0 -122
- package/dist/cjs/analyze/getClientRoutes/getRoutes.js +0 -197
- package/dist/cjs/analyze/getClientRoutes/getRoutesLegacy.js +0 -195
- package/dist/cjs/analyze/getClientRoutes/index.js +0 -31
- package/dist/cjs/analyze/getClientRoutes/utils.js +0 -59
- package/dist/cjs/analyze/makeLegalIdentifier.js +0 -37
- package/dist/cjs/analyze/nestedRoutes.js +0 -295
- package/dist/cjs/analyze/templates.js +0 -444
- package/dist/esm/analyze/constants.js +0 -76
- package/dist/esm/analyze/getBundleEntry.js +0 -75
- package/dist/esm/analyze/getClientRoutes/getRoutes.js +0 -185
- package/dist/esm/analyze/getClientRoutes/getRoutesLegacy.js +0 -183
- package/dist/esm/analyze/getClientRoutes/index.js +0 -6
- package/dist/esm/analyze/getClientRoutes/utils.js +0 -28
- package/dist/esm/analyze/getFileSystemEntry.js +0 -113
- package/dist/esm/analyze/makeLegalIdentifier.js +0 -15
- package/dist/esm/analyze/nestedRoutes.js +0 -398
- package/dist/esm/analyze/templates.js +0 -435
- package/dist/esm/utils/getServerInternalPlugins.js +0 -40
- package/dist/esm-node/analyze/constants.js +0 -76
- package/dist/esm-node/analyze/getClientRoutes/getRoutes.js +0 -163
- package/dist/esm-node/analyze/getClientRoutes/getRoutesLegacy.js +0 -161
- package/dist/esm-node/analyze/getClientRoutes/index.js +0 -6
- package/dist/esm-node/analyze/getClientRoutes/utils.js +0 -22
- package/dist/esm-node/analyze/getFileSystemEntry.js +0 -89
- package/dist/esm-node/analyze/makeLegalIdentifier.js +0 -13
- package/dist/esm-node/analyze/nestedRoutes.js +0 -259
- package/dist/esm-node/analyze/templates.js +0 -405
- package/dist/esm-node/utils/getServerInternalPlugins.js +0 -15
- package/dist/types/analyze/constants.d.ts +0 -42
- package/dist/types/analyze/getBundleEntry.d.ts +0 -3
- package/dist/types/analyze/getClientRoutes/getRoutes.d.ts +0 -8
- package/dist/types/analyze/getClientRoutes/getRoutesLegacy.d.ts +0 -9
- package/dist/types/analyze/getClientRoutes/index.d.ts +0 -2
- package/dist/types/analyze/getClientRoutes/utils.d.ts +0 -5
- package/dist/types/analyze/getFileSystemEntry.d.ts +0 -4
- package/dist/types/analyze/makeLegalIdentifier.d.ts +0 -1
- package/dist/types/analyze/nestedRoutes.d.ts +0 -7
- package/dist/types/analyze/templates.d.ts +0 -30
- package/dist/types/utils/getServerInternalPlugins.d.ts +0 -2
- /package/dist/cjs/{analyze → plugins/analyze}/getHtmlTemplate.js +0 -0
- /package/dist/cjs/{analyze → plugins/analyze}/isDefaultExportFunction.js +0 -0
- /package/dist/esm/{analyze → plugins/analyze}/getHtmlTemplate.js +0 -0
- /package/dist/esm/{analyze → plugins/analyze}/isDefaultExportFunction.js +0 -0
- /package/dist/esm-node/{analyze → plugins/analyze}/getHtmlTemplate.js +0 -0
- /package/dist/esm-node/{analyze → plugins/analyze}/isDefaultExportFunction.js +0 -0
- /package/dist/types/{analyze → plugins/analyze}/isDefaultExportFunction.d.ts +0 -0
@@ -1,42 +0,0 @@
|
|
1
|
-
export declare const JS_EXTENSIONS: string[];
|
2
|
-
export declare const INDEX_FILE_NAME = "index";
|
3
|
-
export declare const APP_FILE_NAME = "App";
|
4
|
-
export declare const PAGES_DIR_NAME = "pages";
|
5
|
-
export declare const NESTED_ROUTES_DIR = "routes";
|
6
|
-
export declare const FILE_SYSTEM_ROUTES_FILE_NAME = "routes.js";
|
7
|
-
export declare const LOADER_EXPORT_NAME = "loader";
|
8
|
-
export declare const ACTION_EXPORT_NAME = "action";
|
9
|
-
export declare const TEMP_LOADERS_DIR = "__loaders__";
|
10
|
-
export declare const ENTRY_POINT_FILE_NAME = "index.jsx";
|
11
|
-
export declare const ENTRY_BOOTSTRAP_FILE_NAME = "bootstrap.jsx";
|
12
|
-
export declare const FILE_SYSTEM_ROUTES_DYNAMIC_REGEXP: RegExp;
|
13
|
-
export declare const FILE_SYSTEM_ROUTES_LAYOUT = "_layout";
|
14
|
-
export declare const FILE_SYSTEM_ROUTES_GLOBAL_LAYOUT = "_app";
|
15
|
-
export declare const FILE_SYSTEM_ROUTES_INDEX = "index";
|
16
|
-
export declare const FILE_SYSTEM_ROUTES_IGNORED_REGEX: RegExp;
|
17
|
-
export declare const HTML_PARTIALS_FOLDER = "html";
|
18
|
-
export declare const HTML_PARTIALS_EXTENSIONS: string[];
|
19
|
-
export declare const FILE_SYSTEM_ROUTES_COMPONENTS_DIR = "internal_components";
|
20
|
-
export declare const NESTED_ROUTE: {
|
21
|
-
LAYOUT_FILE: string;
|
22
|
-
LAYOUT_CONFIG_FILE: string;
|
23
|
-
LAYOUT_LOADER_FILE: string;
|
24
|
-
LAYOUT_DATA_FILE: string;
|
25
|
-
LAYOUT_CLIENT_LOADER: string;
|
26
|
-
PAGE_FILE: string;
|
27
|
-
PAGE_CONFIG_FILE: string;
|
28
|
-
PAGE_LOADER_FILE: string;
|
29
|
-
PAGE_DATA_FILE: string;
|
30
|
-
PAGE_CLIENT_LOADER: string;
|
31
|
-
SPLATE_FILE: string;
|
32
|
-
SPLATE_CONFIG_FILE: string;
|
33
|
-
SPLATE_LOADER_FILE: string;
|
34
|
-
SPLATE_DATA_FILE: string;
|
35
|
-
SPLATE_CLIENT_DATA: string;
|
36
|
-
LOADING_FILE: string;
|
37
|
-
ERROR_FILE: string;
|
38
|
-
LOADER_FILE: string;
|
39
|
-
};
|
40
|
-
export declare const APP_CONFIG_NAME = "config";
|
41
|
-
export declare const APP_INIT_EXPORTED = "init";
|
42
|
-
export declare const APP_INIT_IMPORTED = "appInit";
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import type { Entrypoint, NestedRouteForCli, PageRoute } from '@modern-js/types';
|
2
|
-
export declare const getClientRoutes: ({ entrypoint, srcDirectory, srcAlias, internalDirectory, internalDirAlias, }: {
|
3
|
-
entrypoint: Entrypoint;
|
4
|
-
srcDirectory: string;
|
5
|
-
srcAlias: string;
|
6
|
-
internalDirectory: string;
|
7
|
-
internalDirAlias: string;
|
8
|
-
}) => (NestedRouteForCli | PageRoute)[];
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { Entrypoint, RouteLegacy } from '@modern-js/types';
|
2
|
-
export type { RouteLegacy as Route };
|
3
|
-
export declare const getClientRoutes: ({ entrypoint, srcDirectory, srcAlias, internalDirectory, internalDirAlias, }: {
|
4
|
-
entrypoint: Entrypoint;
|
5
|
-
srcDirectory: string;
|
6
|
-
srcAlias: string;
|
7
|
-
internalDirectory: string;
|
8
|
-
internalDirAlias: string;
|
9
|
-
}) => RouteLegacy[];
|
@@ -1,5 +0,0 @@
|
|
1
|
-
declare const debug: import("@modern-js/utils/compiled/debug").Debugger;
|
2
|
-
export { debug };
|
3
|
-
export declare const findLayout: (dir: string) => string | false;
|
4
|
-
export declare const getRouteWeight: (route: string) => number;
|
5
|
-
export declare const shouldSkip: (file: string) => boolean;
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import type { Entrypoint } from '@modern-js/types';
|
2
|
-
import type { AppNormalizedConfig, IAppContext } from '../types';
|
3
|
-
export type { Entrypoint };
|
4
|
-
export declare const getFileSystemEntry: (appContext: IAppContext, config: AppNormalizedConfig<'shared'>) => Entrypoint[];
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function makeLegalIdentifier(str: string): string;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import type { NestedRouteForCli } from '@modern-js/types';
|
2
|
-
export declare const getRouteId: (componentPath: string, routesDir: string, entryName: string, isMainEntry: boolean) => string;
|
3
|
-
export declare const optimizeRoute: (routeTree: NestedRouteForCli) => NestedRouteForCli[];
|
4
|
-
export declare const walk: (dirname: string, rootDir: string, alias: {
|
5
|
-
name: string;
|
6
|
-
basename: string;
|
7
|
-
}, entryName: string, isMainEntry: boolean, oldVersion: boolean) => Promise<NestedRouteForCli | NestedRouteForCli[] | null>;
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import type { Entrypoint, NestedRouteForCli, PageRoute, RouteLegacy, SSRMode } from '@modern-js/types';
|
2
|
-
import type { AppNormalizedConfig, IAppContext, RuntimePlugin } from '../types';
|
3
|
-
export declare const index: ({ mountId, imports, renderFunction, exportStatement, }: {
|
4
|
-
mountId: string;
|
5
|
-
imports: string;
|
6
|
-
exportStatement: string;
|
7
|
-
renderFunction: string;
|
8
|
-
}) => string;
|
9
|
-
export declare const renderFunction: ({ plugins, customBootstrap, fileSystemRoutes, }: {
|
10
|
-
plugins: RuntimePlugin[];
|
11
|
-
customBootstrap?: string | false | undefined;
|
12
|
-
fileSystemRoutes: Entrypoint['fileSystemRoutes'];
|
13
|
-
}) => string;
|
14
|
-
export declare const html: (partials: {
|
15
|
-
top: string[];
|
16
|
-
head: string[];
|
17
|
-
body: string[];
|
18
|
-
}) => string;
|
19
|
-
export declare const routesForServer: ({ routes, }: {
|
20
|
-
routes: (NestedRouteForCli | PageRoute)[];
|
21
|
-
}) => string;
|
22
|
-
export declare const fileSystemRoutes: ({ routes, ssrMode, nestedRoutesEntry, entryName, internalDirectory, splitRouteChunks, }: {
|
23
|
-
routes: RouteLegacy[] | (NestedRouteForCli | PageRoute)[];
|
24
|
-
ssrMode?: SSRMode | undefined;
|
25
|
-
nestedRoutesEntry?: string | undefined;
|
26
|
-
entryName: string;
|
27
|
-
internalDirectory: string;
|
28
|
-
splitRouteChunks?: boolean | undefined;
|
29
|
-
}) => Promise<string>;
|
30
|
-
export declare function ssrLoaderCombinedModule(entrypoints: Entrypoint[], entrypoint: Entrypoint, config: AppNormalizedConfig<'shared'>, appContext: IAppContext): string | null;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|