@modern-js/app-tools 2.0.0-beta.1 → 2.0.0-beta.3
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/CHANGELOG.md +445 -0
- package/bin/modern.js +10 -1
- package/dist/js/modern/analyze/constants.js +2 -0
- package/dist/js/modern/analyze/generateCode.js +39 -19
- package/dist/js/modern/analyze/getBundleEntry.js +1 -1
- package/dist/js/modern/analyze/getFileSystemEntry.js +1 -1
- package/dist/js/modern/analyze/getHtmlTemplate.js +1 -1
- package/dist/js/modern/analyze/getServerRoutes.js +8 -4
- package/dist/js/modern/analyze/index.js +12 -27
- package/dist/js/modern/analyze/nestedRoutes.js +17 -6
- package/dist/js/modern/analyze/templates.js +59 -27
- package/dist/js/modern/analyze/utils.js +30 -4
- package/dist/js/modern/builder/builderPlugins/compatModern.js +18 -12
- package/dist/js/modern/builder/index.js +31 -16
- package/dist/js/modern/builder/loaders/routerLoader.js +20 -0
- package/dist/js/modern/builder/loaders/serverModuleLoader.js +4 -0
- package/dist/js/modern/builder/share.js +1 -1
- package/dist/js/modern/commands/build.js +8 -2
- package/dist/js/modern/commands/dev.js +37 -32
- package/dist/js/modern/commands/inspect.js +4 -2
- package/dist/js/modern/config/default.js +206 -0
- package/dist/js/modern/config/index.js +2 -0
- package/dist/js/modern/config/initial/createHtmlConfig.js +32 -0
- package/dist/js/modern/{builder → config/initial}/createOutputConfig.js +16 -15
- package/dist/js/modern/config/initial/createSourceConfig.js +32 -0
- package/dist/js/modern/config/initial/createToolsConfig.js +41 -0
- package/dist/js/modern/config/initial/index.js +11 -0
- package/dist/js/modern/config/initial/inits.js +117 -0
- package/dist/js/modern/config/initial/transformNormalizedConfig.js +40 -0
- package/dist/js/modern/defineConfig.js +12 -0
- package/dist/js/modern/hooks.js +23 -19
- package/dist/js/modern/index.js +7 -5
- package/dist/js/modern/initialize/index.js +72 -0
- package/dist/js/modern/schema/Schema.js +39 -0
- package/dist/js/modern/schema/index.js +139 -0
- package/dist/js/modern/schema/legacy.js +284 -0
- package/dist/js/modern/types/config/deploy.js +0 -0
- package/dist/js/modern/types/config/dev.js +0 -0
- package/dist/js/modern/types/config/experiments.js +0 -0
- package/dist/js/modern/types/config/html.js +0 -0
- package/dist/js/modern/types/config/index.js +2 -0
- package/dist/js/modern/types/config/output.js +0 -0
- package/dist/js/modern/types/config/performance.js +0 -0
- package/dist/js/modern/types/config/security.js +0 -0
- package/dist/js/modern/types/config/source.js +0 -0
- package/dist/js/modern/types/config/tools.js +0 -0
- package/dist/js/modern/types/hooks.js +0 -0
- package/dist/js/modern/types/index.js +4 -0
- package/dist/js/modern/types/legacyConfig/deploy.js +0 -0
- package/dist/js/modern/types/legacyConfig/dev.js +0 -0
- package/dist/js/modern/types/legacyConfig/index.js +0 -0
- package/dist/js/modern/types/legacyConfig/output.js +1 -0
- package/dist/js/modern/types/legacyConfig/source.js +0 -0
- package/dist/js/modern/types/legacyConfig/tools.js +0 -0
- package/dist/js/modern/utils/config.js +1 -1
- package/dist/js/modern/utils/createFileWatcher.js +82 -0
- package/dist/js/modern/utils/restart.js +17 -0
- package/dist/js/node/analyze/constants.js +5 -1
- package/dist/js/node/analyze/generateCode.js +37 -17
- package/dist/js/node/analyze/getBundleEntry.js +1 -1
- package/dist/js/node/analyze/getFileSystemEntry.js +1 -1
- package/dist/js/node/analyze/getHtmlTemplate.js +1 -1
- package/dist/js/node/analyze/getServerRoutes.js +8 -4
- package/dist/js/node/analyze/index.js +13 -39
- package/dist/js/node/analyze/nestedRoutes.js +15 -4
- package/dist/js/node/analyze/templates.js +60 -27
- package/dist/js/node/analyze/utils.js +31 -3
- package/dist/js/node/builder/builderPlugins/compatModern.js +18 -12
- package/dist/js/node/builder/index.js +32 -16
- package/dist/js/node/builder/loaders/routerLoader.js +27 -0
- package/dist/js/node/builder/loaders/serverModuleLoader.js +11 -0
- package/dist/js/node/builder/share.js +1 -1
- package/dist/js/node/commands/build.js +8 -2
- package/dist/js/node/commands/dev.js +37 -32
- package/dist/js/node/commands/inspect.js +4 -2
- package/dist/js/node/config/default.js +213 -0
- package/dist/js/node/config/index.js +31 -0
- package/dist/js/node/config/initial/createHtmlConfig.js +38 -0
- package/dist/js/node/{builder → config/initial}/createOutputConfig.js +16 -15
- package/dist/js/node/config/initial/createSourceConfig.js +38 -0
- package/dist/js/node/config/initial/createToolsConfig.js +47 -0
- package/dist/js/node/config/initial/index.js +24 -0
- package/dist/js/node/config/initial/inits.js +127 -0
- package/dist/js/node/config/initial/transformNormalizedConfig.js +46 -0
- package/dist/js/node/defineConfig.js +20 -0
- package/dist/js/node/hooks.js +23 -28
- package/dist/js/node/index.js +30 -16
- package/dist/js/node/initialize/index.js +79 -0
- package/dist/js/node/schema/Schema.js +46 -0
- package/dist/js/node/schema/index.js +152 -0
- package/dist/js/node/schema/legacy.js +291 -0
- package/dist/js/node/types/config/deploy.js +0 -0
- package/dist/js/node/types/config/dev.js +0 -0
- package/dist/js/node/types/config/experiments.js +0 -0
- package/dist/js/node/types/config/html.js +0 -0
- package/dist/js/node/types/config/index.js +16 -0
- package/dist/js/node/types/config/output.js +0 -0
- package/dist/js/node/types/config/performance.js +0 -0
- package/dist/js/node/types/config/security.js +0 -0
- package/dist/js/node/types/config/source.js +0 -0
- package/dist/js/node/types/config/tools.js +0 -0
- package/dist/js/node/types/hooks.js +0 -0
- package/dist/js/node/types/index.js +38 -0
- package/dist/js/node/types/legacyConfig/deploy.js +0 -0
- package/dist/js/node/types/legacyConfig/dev.js +0 -0
- package/dist/js/node/types/legacyConfig/index.js +0 -0
- package/dist/js/node/types/legacyConfig/output.js +5 -0
- package/dist/js/node/types/legacyConfig/source.js +0 -0
- package/dist/js/node/types/legacyConfig/tools.js +0 -0
- package/dist/js/node/utils/config.js +1 -1
- package/dist/js/node/utils/createFileWatcher.js +91 -0
- package/dist/js/node/utils/restart.js +23 -0
- package/dist/js/treeshaking/analyze/constants.js +2 -0
- package/dist/js/treeshaking/analyze/generateCode.js +138 -82
- package/dist/js/treeshaking/analyze/getBundleEntry.js +1 -1
- package/dist/js/treeshaking/analyze/getFileSystemEntry.js +1 -1
- package/dist/js/treeshaking/analyze/getHtmlTemplate.js +1 -1
- package/dist/js/treeshaking/analyze/getServerRoutes.js +7 -5
- package/dist/js/treeshaking/analyze/index.js +10 -26
- package/dist/js/treeshaking/analyze/nestedRoutes.js +98 -55
- package/dist/js/treeshaking/analyze/templates.js +175 -101
- package/dist/js/treeshaking/analyze/utils.js +80 -4
- package/dist/js/treeshaking/builder/builderPlugins/compatModern.js +18 -12
- package/dist/js/treeshaking/builder/index.js +29 -16
- package/dist/js/treeshaking/builder/loaders/routerLoader.js +14 -0
- package/dist/js/treeshaking/builder/loaders/serverModuleLoader.js +4 -0
- package/dist/js/treeshaking/builder/share.js +1 -1
- package/dist/js/treeshaking/commands/build.js +33 -23
- package/dist/js/treeshaking/commands/dev.js +56 -43
- package/dist/js/treeshaking/commands/inspect.js +8 -3
- package/dist/js/treeshaking/config/default.js +199 -0
- package/dist/js/treeshaking/config/index.js +2 -0
- package/dist/js/treeshaking/config/initial/createHtmlConfig.js +31 -0
- package/dist/js/treeshaking/config/initial/createOutputConfig.js +70 -0
- package/dist/js/treeshaking/config/initial/createSourceConfig.js +41 -0
- package/dist/js/treeshaking/config/initial/createToolsConfig.js +38 -0
- package/dist/js/treeshaking/config/initial/index.js +11 -0
- package/dist/js/treeshaking/config/initial/inits.js +114 -0
- package/dist/js/treeshaking/config/initial/transformNormalizedConfig.js +38 -0
- package/dist/js/treeshaking/defineConfig.js +14 -0
- package/dist/js/treeshaking/hooks.js +23 -19
- package/dist/js/treeshaking/index.js +7 -5
- package/dist/js/treeshaking/initialize/index.js +121 -0
- package/dist/js/treeshaking/schema/Schema.js +75 -0
- package/dist/js/treeshaking/schema/index.js +138 -0
- package/dist/js/treeshaking/schema/legacy.js +273 -0
- package/dist/js/treeshaking/types/config/deploy.js +0 -0
- package/dist/js/treeshaking/types/config/dev.js +0 -0
- package/dist/js/treeshaking/types/config/experiments.js +0 -0
- package/dist/js/treeshaking/types/config/html.js +0 -0
- package/dist/js/treeshaking/types/config/index.js +2 -0
- package/dist/js/treeshaking/types/config/output.js +0 -0
- package/dist/js/treeshaking/types/config/performance.js +0 -0
- package/dist/js/treeshaking/types/config/security.js +0 -0
- package/dist/js/treeshaking/types/config/source.js +0 -0
- package/dist/js/treeshaking/types/config/tools.js +0 -0
- package/dist/js/treeshaking/types/hooks.js +0 -0
- package/dist/js/treeshaking/types/index.js +4 -0
- package/dist/js/treeshaking/types/legacyConfig/deploy.js +0 -0
- package/dist/js/treeshaking/types/legacyConfig/dev.js +0 -0
- package/dist/js/treeshaking/types/legacyConfig/index.js +0 -0
- package/dist/js/treeshaking/types/legacyConfig/output.js +1 -0
- package/dist/js/treeshaking/types/legacyConfig/source.js +0 -0
- package/dist/js/treeshaking/types/legacyConfig/tools.js +0 -0
- package/dist/js/treeshaking/utils/config.js +1 -1
- package/dist/js/treeshaking/utils/createFileWatcher.js +123 -0
- package/dist/js/treeshaking/utils/restart.js +45 -0
- package/dist/types/analyze/constants.d.ts +2 -0
- package/dist/types/analyze/generateCode.d.ts +3 -2
- package/dist/types/analyze/getBundleEntry.d.ts +2 -2
- package/dist/types/analyze/getFileSystemEntry.d.ts +2 -2
- package/dist/types/analyze/getHtmlTemplate.d.ts +3 -3
- package/dist/types/analyze/getServerRoutes.d.ts +3 -2
- package/dist/types/analyze/index.d.ts +3 -41
- package/dist/types/analyze/templates.d.ts +9 -8
- package/dist/types/analyze/utils.d.ts +10 -2
- package/dist/types/builder/builderPlugins/compatModern.d.ts +2 -2
- package/dist/types/builder/index.d.ts +5 -2
- package/dist/types/builder/loaders/routerLoader.d.ts +3 -0
- package/dist/types/builder/loaders/serverModuleLoader.d.ts +3 -0
- package/dist/types/builder/share.d.ts +2 -2
- package/dist/types/commands/build.d.ts +2 -2
- package/dist/types/commands/deploy.d.ts +2 -2
- package/dist/types/commands/dev.d.ts +2 -2
- package/dist/types/commands/inspect.d.ts +9 -1
- package/dist/types/commands/start.d.ts +2 -2
- package/dist/types/config/default.d.ts +3 -0
- package/dist/types/config/index.d.ts +2 -0
- package/dist/types/config/initial/createHtmlConfig.d.ts +2 -0
- package/dist/types/config/initial/createOutputConfig.d.ts +2 -0
- package/dist/types/config/initial/createSourceConfig.d.ts +2 -0
- package/dist/types/config/initial/createToolsConfig.d.ts +2 -0
- package/dist/types/config/initial/index.d.ts +4 -0
- package/dist/types/config/initial/inits.d.ts +4 -0
- package/dist/types/config/initial/transformNormalizedConfig.d.ts +2 -0
- package/dist/types/defineConfig.d.ts +7 -0
- package/dist/types/hooks.d.ts +2 -42
- package/dist/types/index.d.ts +5 -5
- package/dist/types/initialize/index.d.ts +3 -0
- package/dist/types/schema/Schema.d.ts +14 -0
- package/dist/types/schema/index.d.ts +4 -0
- package/dist/types/schema/legacy.d.ts +3 -0
- package/dist/types/types/config/deploy.d.ts +9 -0
- package/dist/types/types/config/dev.d.ts +13 -0
- package/dist/types/types/config/experiments.d.ts +4 -0
- package/dist/types/types/config/html.d.ts +4 -0
- package/dist/types/types/config/index.d.ts +62 -0
- package/dist/types/types/config/output.d.ts +23 -0
- package/dist/types/types/config/performance.d.ts +4 -0
- package/dist/types/types/config/security.d.ts +4 -0
- package/dist/types/types/config/source.d.ts +22 -0
- package/dist/types/types/config/tools.d.ts +22 -0
- package/dist/types/types/hooks.d.ts +81 -0
- package/dist/types/types/index.d.ts +23 -0
- package/dist/types/types/legacyConfig/deploy.d.ts +8 -0
- package/dist/types/types/legacyConfig/dev.d.ts +12 -0
- package/dist/types/types/legacyConfig/index.d.ts +33 -0
- package/dist/types/types/legacyConfig/output.d.ts +51 -0
- package/dist/types/types/legacyConfig/source.d.ts +25 -0
- package/dist/types/types/legacyConfig/tools.d.ts +16 -0
- package/dist/types/utils/config.d.ts +2 -2
- package/dist/types/utils/createFileWatcher.d.ts +4 -0
- package/dist/types/utils/printInstructions.d.ts +3 -3
- package/dist/types/utils/restart.d.ts +3 -0
- package/lib/types.d.ts +1 -1
- package/package.json +28 -25
- package/dist/js/modern/builder/createHtmlConfig.js +0 -58
- package/dist/js/modern/builder/createSourceConfig.js +0 -74
- package/dist/js/modern/builder/createToolsConfig.js +0 -87
- package/dist/js/node/builder/createHtmlConfig.js +0 -68
- package/dist/js/node/builder/createSourceConfig.js +0 -82
- package/dist/js/node/builder/createToolsConfig.js +0 -94
- package/dist/js/treeshaking/builder/createHtmlConfig.js +0 -59
- package/dist/js/treeshaking/builder/createOutputConfig.js +0 -70
- package/dist/js/treeshaking/builder/createSourceConfig.js +0 -88
- package/dist/js/treeshaking/builder/createToolsConfig.js +0 -85
- package/dist/types/builder/createHtmlConfig.d.ts +0 -6
- package/dist/types/builder/createOutputConfig.d.ts +0 -3
- package/dist/types/builder/createSourceConfig.d.ts +0 -5
- package/dist/types/builder/createToolsConfig.d.ts +0 -13
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAppContext } from '@modern-js/core';
|
|
2
2
|
import type { Entrypoint, ServerRoute } from '@modern-js/types';
|
|
3
|
+
import type { AppNormalizedConfig } from '../types';
|
|
3
4
|
export declare const getServerRoutes: (entrypoints: Entrypoint[], {
|
|
4
5
|
appContext,
|
|
5
6
|
config
|
|
6
7
|
}: {
|
|
7
8
|
appContext: IAppContext;
|
|
8
|
-
config:
|
|
9
|
+
config: AppNormalizedConfig;
|
|
9
10
|
}) => ServerRoute[];
|
|
@@ -1,42 +1,4 @@
|
|
|
1
|
-
import type { CliPlugin
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export declare const modifyEntryImports: import("@modern-js/plugin").AsyncWaterfall<{
|
|
5
|
-
imports: ImportStatement[];
|
|
6
|
-
entrypoint: Entrypoint;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const modifyEntryExport: import("@modern-js/plugin").AsyncWaterfall<{
|
|
9
|
-
entrypoint: Entrypoint;
|
|
10
|
-
exportStatement: string;
|
|
11
|
-
}>;
|
|
12
|
-
export declare const addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
|
|
13
|
-
export declare const modifyEntryRuntimePlugins: import("@modern-js/plugin").AsyncWaterfall<{
|
|
14
|
-
entrypoint: Entrypoint;
|
|
15
|
-
plugins: RuntimePlugin[];
|
|
16
|
-
}>;
|
|
17
|
-
export declare const modifyEntryRenderFunction: import("@modern-js/plugin").AsyncWaterfall<{
|
|
18
|
-
entrypoint: Entrypoint;
|
|
19
|
-
code: string;
|
|
20
|
-
}>;
|
|
21
|
-
export declare const modifyAsyncEntry: import("@modern-js/plugin").AsyncWaterfall<{
|
|
22
|
-
entrypoint: Entrypoint;
|
|
23
|
-
code: string;
|
|
24
|
-
}>;
|
|
25
|
-
export declare const modifyFileSystemRoutes: import("@modern-js/plugin").AsyncWaterfall<{
|
|
26
|
-
entrypoint: Entrypoint;
|
|
27
|
-
routes: RouteLegacy[] | (NestedRoute | PageRoute)[];
|
|
28
|
-
}>;
|
|
29
|
-
export declare const modifyServerRoutes: import("@modern-js/plugin").AsyncWaterfall<{
|
|
30
|
-
routes: ServerRoute[];
|
|
31
|
-
}>;
|
|
32
|
-
export declare const htmlPartials: import("@modern-js/plugin").AsyncWaterfall<{
|
|
33
|
-
entrypoint: Entrypoint;
|
|
34
|
-
partials: HtmlPartials;
|
|
35
|
-
}>;
|
|
36
|
-
export declare const beforeGenerateRoutes: import("@modern-js/plugin").AsyncWaterfall<{
|
|
37
|
-
entrypoint: Entrypoint;
|
|
38
|
-
code: string;
|
|
39
|
-
}>;
|
|
40
|
-
export declare const addDefineTypes: import("@modern-js/plugin").AsyncWaterfall<void>;
|
|
41
|
-
declare const _default: () => CliPlugin<AppHooks>;
|
|
1
|
+
import type { CliPlugin } from '@modern-js/core';
|
|
2
|
+
import { AppTools } from '../types';
|
|
3
|
+
declare const _default: () => CliPlugin<AppTools>;
|
|
42
4
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RuntimePlugin } from '@modern-js/core';
|
|
2
1
|
import type { Entrypoint, NestedRoute, PageRoute, RouteLegacy } from '@modern-js/types';
|
|
2
|
+
import type { RuntimePlugin } from '../types';
|
|
3
3
|
export declare const index: ({
|
|
4
4
|
mountId,
|
|
5
5
|
imports,
|
|
@@ -27,22 +27,23 @@ export declare const html: (partials: {
|
|
|
27
27
|
}) => string;
|
|
28
28
|
export declare const routesForServer: ({
|
|
29
29
|
routes,
|
|
30
|
-
|
|
30
|
+
internalDirectory,
|
|
31
|
+
entryName
|
|
31
32
|
}: {
|
|
32
33
|
routes: (NestedRoute | PageRoute)[];
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
basename: string;
|
|
36
|
-
};
|
|
34
|
+
internalDirectory: string;
|
|
35
|
+
entryName: string;
|
|
37
36
|
}) => string;
|
|
38
37
|
export declare const fileSystemRoutes: ({
|
|
39
38
|
routes,
|
|
40
39
|
ssrMode,
|
|
41
40
|
nestedRoutesEntry,
|
|
42
|
-
entryName
|
|
41
|
+
entryName,
|
|
42
|
+
internalDirectory
|
|
43
43
|
}: {
|
|
44
44
|
routes: RouteLegacy[] | (NestedRoute | PageRoute)[];
|
|
45
45
|
ssrMode: 'string' | 'stream' | false;
|
|
46
46
|
nestedRoutesEntry?: string | undefined;
|
|
47
47
|
entryName: string;
|
|
48
|
-
|
|
48
|
+
internalDirectory: string;
|
|
49
|
+
}) => Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Entrypoint } from '@modern-js/types';
|
|
2
|
-
import type { ImportStatement } from '
|
|
2
|
+
import type { ImportStatement } from '../types';
|
|
3
3
|
export declare const walkDirectory: (dir: string) => string[];
|
|
4
4
|
export declare const getDefaultImports: ({
|
|
5
5
|
entrypoint,
|
|
@@ -15,4 +15,12 @@ export declare const getDefaultImports: ({
|
|
|
15
15
|
internalDirectory: string;
|
|
16
16
|
}) => ImportStatement[];
|
|
17
17
|
export declare const isRouteComponentFile: (filePath: string) => boolean;
|
|
18
|
-
export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
|
|
18
|
+
export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
|
|
19
|
+
export declare const parseModule: ({
|
|
20
|
+
source,
|
|
21
|
+
filename
|
|
22
|
+
}: {
|
|
23
|
+
source: string;
|
|
24
|
+
filename: string;
|
|
25
|
+
}) => Promise<readonly [imports: readonly import("es-module-lexer").ImportSpecifier[], exports: readonly import("es-module-lexer").ExportSpecifier[], facade: boolean]>;
|
|
26
|
+
export declare const hasLoader: (filename: string) => Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuilderPlugin } from '@modern-js/builder-shared';
|
|
2
2
|
import type { BuilderPluginAPI } from '@modern-js/builder-webpack-provider';
|
|
3
|
-
import type { IAppContext,
|
|
3
|
+
import type { IAppContext, AppNormalizedConfig } from '../../types';
|
|
4
4
|
declare type Parameter<T extends (arg: any) => void> = Parameters<T>[0];
|
|
5
5
|
declare type FnParameter<T extends {
|
|
6
6
|
[p: string]: (arg: any) => void;
|
|
@@ -9,5 +9,5 @@ export declare type PluginCompatModernOptions = FnParameter<Partial<Pick<Builder
|
|
|
9
9
|
/**
|
|
10
10
|
* Provides default configuration consistent with `@modern-js/webpack`
|
|
11
11
|
*/
|
|
12
|
-
export declare const PluginCompatModern: (appContext: IAppContext, modernConfig:
|
|
12
|
+
export declare const PluginCompatModern: (appContext: IAppContext, modernConfig: AppNormalizedConfig, options?: PluginCompatModernOptions) => BuilderPlugin<BuilderPluginAPI>;
|
|
13
13
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { BuilderInstance, BuilderTarget, CreateBuilderOptions } from '@modern-js/builder';
|
|
2
|
-
import
|
|
2
|
+
import { BuilderConfig } from '@modern-js/builder-webpack-provider';
|
|
3
|
+
import type { IAppContext } from '@modern-js/core';
|
|
4
|
+
import type { AppNormalizedConfig } from '../types';
|
|
3
5
|
import { PluginCompatModernOptions } from './builderPlugins/compatModern';
|
|
4
6
|
export declare type BuilderOptions = {
|
|
5
7
|
target?: BuilderTarget | BuilderTarget[];
|
|
6
|
-
normalizedConfig:
|
|
8
|
+
normalizedConfig: AppNormalizedConfig;
|
|
7
9
|
appContext: IAppContext;
|
|
8
10
|
compatPluginConfig?: PluginCompatModernOptions;
|
|
9
11
|
};
|
|
@@ -12,4 +14,5 @@ export declare function createBuilderForEdenX({
|
|
|
12
14
|
appContext,
|
|
13
15
|
compatPluginConfig
|
|
14
16
|
}: BuilderOptions): Promise<BuilderInstance>;
|
|
17
|
+
export declare function createBuilderProviderConfig(normalizedConfig: AppNormalizedConfig, appContext: IAppContext): BuilderConfig;
|
|
15
18
|
export declare function createBuilderOptions(target: BuilderTarget | BuilderTarget[], appContext: IAppContext): CreateBuilderOptions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { WebpackChain } from '@modern-js/builder-webpack-provider';
|
|
3
|
-
import {
|
|
4
|
-
export declare function createCopyPattern(appContext: IAppContext, config:
|
|
3
|
+
import { AppNormalizedConfig, IAppContext } from '../types';
|
|
4
|
+
export declare function createCopyPattern(appContext: IAppContext, config: AppNormalizedConfig, patternsType: 'upload' | 'public', chain?: WebpackChain): {
|
|
5
5
|
info: (file: {
|
|
6
6
|
sourceFilename: string;
|
|
7
7
|
}) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PluginAPI } from '@modern-js/core';
|
|
2
2
|
import type { BuildOptions } from '../utils/types';
|
|
3
|
-
import type {
|
|
4
|
-
export declare const build: (api: PluginAPI<
|
|
3
|
+
import type { AppTools } from '../types';
|
|
4
|
+
export declare const build: (api: PluginAPI<AppTools>, options?: BuildOptions) => Promise<void>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PluginAPI } from '@modern-js/core';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const deploy: (api: PluginAPI<
|
|
2
|
+
import type { AppTools } from '../types';
|
|
3
|
+
export declare const deploy: (api: PluginAPI<AppTools>, options: any) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PluginAPI } from '@modern-js/core';
|
|
2
2
|
import { DevOptions } from '../utils/types';
|
|
3
|
-
import type {
|
|
4
|
-
export declare const dev: (api: PluginAPI<
|
|
3
|
+
import type { AppTools } from '../types';
|
|
4
|
+
export declare const dev: (api: PluginAPI<AppTools>, options: DevOptions) => Promise<void>;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import type { PluginAPI } from '@modern-js/core';
|
|
2
2
|
import type { InspectOptions } from '../utils/types';
|
|
3
|
-
|
|
3
|
+
import type { AppTools } from '../types';
|
|
4
|
+
export declare const inspect: (api: PluginAPI<AppTools>, options: InspectOptions) => Promise<{
|
|
5
|
+
builderConfig: string;
|
|
6
|
+
bundlerConfigs: string[];
|
|
7
|
+
origin: {
|
|
8
|
+
builderConfig: Record<string, any>;
|
|
9
|
+
bundlerConfigs: Record<string, any>[];
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PluginAPI } from '@modern-js/core';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const start: (api: PluginAPI<
|
|
2
|
+
import type { AppTools } from '../types';
|
|
3
|
+
export declare const start: (api: PluginAPI<AppTools>) => Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AppNormalizedConfig, IAppContext, AppLegacyUserConfig, AppUserConfig } from '../../types';
|
|
2
|
+
export { transformNormalizedConfig } from './transformNormalizedConfig';
|
|
3
|
+
export declare function checkIsLegacyConfig(config: AppLegacyUserConfig | AppUserConfig): config is AppLegacyUserConfig;
|
|
4
|
+
export declare function initialNormalizedConfig(config: AppNormalizedConfig, appContext: IAppContext): AppNormalizedConfig;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AppNormalizedConfig, IAppContext } from '../../types';
|
|
2
|
+
export declare function initHtmlConfig(config: AppNormalizedConfig, appContext: IAppContext): import("@modern-js/builder-shared").SharedHtmlConfig;
|
|
3
|
+
export declare function initSourceConfig(config: AppNormalizedConfig, appContext: IAppContext): void;
|
|
4
|
+
export declare function initToolsConfig(config: AppNormalizedConfig): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppUserConfig, AppLegacyUserConfig } from './types';
|
|
2
|
+
export declare const defineConfig: (config: AppUserConfig) => AppUserConfig;
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated
|
|
5
|
+
* Using defineConfig first.
|
|
6
|
+
*/
|
|
7
|
+
export declare const defineLegacyConfig: (config: AppLegacyUserConfig) => AppLegacyUserConfig;
|
package/dist/types/hooks.d.ts
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const afterDev: import("@modern-js/plugin").AsyncWorkflow<void, unknown>;
|
|
4
|
-
export declare const beforeCreateCompiler: import("@modern-js/plugin").AsyncWorkflow<{
|
|
5
|
-
bundlerConfigs: webpack.Configuration[];
|
|
6
|
-
}, unknown>;
|
|
7
|
-
export declare const afterCreateCompiler: import("@modern-js/plugin").AsyncWorkflow<{
|
|
8
|
-
compiler: webpack.Compiler | webpack.MultiCompiler | undefined;
|
|
9
|
-
}, unknown>;
|
|
10
|
-
export declare const beforePrintInstructions: import("@modern-js/plugin").AsyncWaterfall<{
|
|
11
|
-
instructions: string;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const beforeBuild: import("@modern-js/plugin").AsyncWorkflow<{
|
|
14
|
-
bundlerConfigs?: webpack.Configuration[] | undefined;
|
|
15
|
-
}, unknown>;
|
|
16
|
-
export declare const afterBuild: import("@modern-js/plugin").AsyncWorkflow<{
|
|
17
|
-
stats?: webpack.Stats | webpack.MultiStats | undefined;
|
|
18
|
-
}, unknown>;
|
|
19
|
-
export declare const beforeDeploy: import("@modern-js/plugin").AsyncWorkflow<Record<string, any>, unknown>;
|
|
20
|
-
export declare const afterDeploy: import("@modern-js/plugin").AsyncWorkflow<Record<string, any>, unknown>;
|
|
21
|
-
export declare const hooks: {
|
|
22
|
-
beforeDev: import("@modern-js/plugin").AsyncWorkflow<void, unknown>;
|
|
23
|
-
afterDev: import("@modern-js/plugin").AsyncWorkflow<void, unknown>;
|
|
24
|
-
beforeCreateCompiler: import("@modern-js/plugin").AsyncWorkflow<{
|
|
25
|
-
bundlerConfigs: webpack.Configuration[];
|
|
26
|
-
}, unknown>;
|
|
27
|
-
afterCreateCompiler: import("@modern-js/plugin").AsyncWorkflow<{
|
|
28
|
-
compiler: webpack.Compiler | webpack.MultiCompiler | undefined;
|
|
29
|
-
}, unknown>;
|
|
30
|
-
beforePrintInstructions: import("@modern-js/plugin").AsyncWaterfall<{
|
|
31
|
-
instructions: string;
|
|
32
|
-
}>;
|
|
33
|
-
beforeBuild: import("@modern-js/plugin").AsyncWorkflow<{
|
|
34
|
-
bundlerConfigs?: webpack.Configuration[] | undefined;
|
|
35
|
-
}, unknown>;
|
|
36
|
-
afterBuild: import("@modern-js/plugin").AsyncWorkflow<{
|
|
37
|
-
stats?: webpack.Stats | webpack.MultiStats | undefined;
|
|
38
|
-
}, unknown>;
|
|
39
|
-
beforeDeploy: import("@modern-js/plugin").AsyncWorkflow<Record<string, any>, unknown>;
|
|
40
|
-
afterDeploy: import("@modern-js/plugin").AsyncWorkflow<Record<string, any>, unknown>;
|
|
41
|
-
};
|
|
42
|
-
export declare type AppHooks = typeof hooks;
|
|
1
|
+
import { AppToolsHooks } from './types/hooks';
|
|
2
|
+
export declare const hooks: AppToolsHooks;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
declare const _default: () => CliPlugin<
|
|
1
|
+
import { CliPlugin } from '@modern-js/core';
|
|
2
|
+
import { AppTools } from './types';
|
|
3
|
+
export * from './defineConfig';
|
|
4
|
+
export * from './types';
|
|
5
|
+
declare const _default: () => CliPlugin<AppTools>;
|
|
6
6
|
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare type ValidateSchema = {
|
|
2
|
+
target: string;
|
|
3
|
+
schema: any;
|
|
4
|
+
};
|
|
5
|
+
export declare class Schema extends Map<string, any> {
|
|
6
|
+
private schema;
|
|
7
|
+
constructor(baseSchema?: Record<string, any>);
|
|
8
|
+
setSchema(key: string, object: Record<string, any>): this;
|
|
9
|
+
set(key: string, value: any): this;
|
|
10
|
+
has(key: string): boolean;
|
|
11
|
+
get(key: string): any;
|
|
12
|
+
delete(key: string): boolean;
|
|
13
|
+
generate(): ValidateSchema[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface MicroFrontend {
|
|
2
|
+
enableHtmlEntry?: boolean;
|
|
3
|
+
externalBasicLibrary?: boolean;
|
|
4
|
+
moduleApp?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DeployUserConfig {
|
|
7
|
+
microFrontend?: boolean | MicroFrontend;
|
|
8
|
+
}
|
|
9
|
+
export declare type DeployNormalizedConfig = DeployUserConfig;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
|
|
2
|
+
declare type BuilderEnvConfig = Required<BuilderConfig>['dev'];
|
|
3
|
+
export declare type DevProxyOptions = string | Record<string, string>;
|
|
4
|
+
export interface DevUserConfig extends Pick<BuilderEnvConfig, 'assetPrefix' | 'https'> {
|
|
5
|
+
/**
|
|
6
|
+
* The configuration of `dev.proxy` is provided by `proxy` plugin.
|
|
7
|
+
* Please use `yarn new` or `pnpm new` to enable the corresponding capability.
|
|
8
|
+
* @requires `proxy` plugin
|
|
9
|
+
*/
|
|
10
|
+
proxy?: string | Record<string, string>;
|
|
11
|
+
}
|
|
12
|
+
export declare type DevNormalizedConfig = DevUserConfig;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
|
|
2
|
+
export declare type BuilderExperimentsConfig = Required<BuilderConfig>['experiments'];
|
|
3
|
+
export declare type ExperimentsUserConfig = BuilderExperimentsConfig;
|
|
4
|
+
export declare type ExperimentsNormalizedConfig = ExperimentsUserConfig;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { UserConfig } from '@modern-js/core';
|
|
2
|
+
import type { ServerUserConfig, ServerNormalizedConfig, BffUserConfig, BffNormalizedConfig } from '@modern-js/server-core';
|
|
3
|
+
import type { AppToolsHooks } from '../hooks';
|
|
4
|
+
import type { OutputNormalizedConfig, OutputUserConfig } from './output';
|
|
5
|
+
import type { SourceNormalizedConfig, SourceUserConfig } from './source';
|
|
6
|
+
import type { DevNormalizedConfig, DevUserConfig } from './dev';
|
|
7
|
+
import type { ToolsNormalizedConfig, ToolsUserConfig } from './tools';
|
|
8
|
+
import type { HtmlNormalizedConfig, HtmlUserConfig } from './html';
|
|
9
|
+
import type { SecurityNormalizedConfig, SecurityUserConfig } from './security';
|
|
10
|
+
import type { DeployNormalizedConfig, DeployUserConfig } from './deploy';
|
|
11
|
+
import type { ExperimentsUserConfig, ExperimentsNormalizedConfig } from './experiments';
|
|
12
|
+
import type { PerformanceNormalizedConfig, PerformanceUserConfig } from './performance';
|
|
13
|
+
export * from './output';
|
|
14
|
+
export interface RuntimeUserConfig {
|
|
15
|
+
[name: string]: any;
|
|
16
|
+
}
|
|
17
|
+
export interface RuntimeByEntriesUserConfig {
|
|
18
|
+
[name: string]: RuntimeUserConfig;
|
|
19
|
+
}
|
|
20
|
+
export declare type RuntimeNormalizedConfig = RuntimeUserConfig;
|
|
21
|
+
export declare type RuntimeByEntriesNormalizedConfig = RuntimeByEntriesUserConfig;
|
|
22
|
+
export interface AppToolsUserConfig {
|
|
23
|
+
source?: SourceUserConfig;
|
|
24
|
+
output?: OutputUserConfig;
|
|
25
|
+
server?: ServerUserConfig;
|
|
26
|
+
dev?: DevUserConfig;
|
|
27
|
+
deploy?: DeployUserConfig;
|
|
28
|
+
html?: HtmlUserConfig;
|
|
29
|
+
tools?: ToolsUserConfig;
|
|
30
|
+
runtime?: RuntimeUserConfig;
|
|
31
|
+
security?: SecurityUserConfig;
|
|
32
|
+
runtimeByEntries?: RuntimeByEntriesUserConfig;
|
|
33
|
+
performance?: PerformanceUserConfig;
|
|
34
|
+
experiments?: ExperimentsUserConfig;
|
|
35
|
+
/**
|
|
36
|
+
* The configuration of `bff` is provided by `bff` plugin.
|
|
37
|
+
* Please use `yarn new` or `pnpm new` to enable the corresponding capability.
|
|
38
|
+
* @requires `bff` plugin
|
|
39
|
+
*/
|
|
40
|
+
bff?: BffUserConfig;
|
|
41
|
+
}
|
|
42
|
+
export declare type AppToolsNormalizedConfig = {
|
|
43
|
+
source: SourceNormalizedConfig;
|
|
44
|
+
bff: BffNormalizedConfig;
|
|
45
|
+
dev: DevNormalizedConfig;
|
|
46
|
+
deploy: DeployNormalizedConfig;
|
|
47
|
+
html: HtmlNormalizedConfig;
|
|
48
|
+
runtime: RuntimeNormalizedConfig;
|
|
49
|
+
runtimeByEntries: RuntimeByEntriesNormalizedConfig;
|
|
50
|
+
output: OutputNormalizedConfig;
|
|
51
|
+
security: SecurityNormalizedConfig;
|
|
52
|
+
server: ServerNormalizedConfig;
|
|
53
|
+
tools: ToolsNormalizedConfig;
|
|
54
|
+
performance: PerformanceNormalizedConfig;
|
|
55
|
+
experiments: ExperimentsNormalizedConfig;
|
|
56
|
+
cliOptions?: Record<string, any>;
|
|
57
|
+
_raw: UserConfig<{
|
|
58
|
+
hooks: AppToolsHooks;
|
|
59
|
+
userConfig: AppToolsUserConfig;
|
|
60
|
+
normalizedConfig: AppToolsNormalizedConfig;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
|
|
2
|
+
export declare type BuilderOutputConfig = Required<BuilderConfig>['output'];
|
|
3
|
+
export interface OutputUserConfig extends BuilderOutputConfig {
|
|
4
|
+
ssg?: SSGConfig;
|
|
5
|
+
enableModernMode?: boolean;
|
|
6
|
+
disableNodePolyfill?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare type OutputNormalizedConfig = OutputUserConfig;
|
|
9
|
+
export declare type SSGRouteOptions = string | {
|
|
10
|
+
url: string;
|
|
11
|
+
output?: string;
|
|
12
|
+
params?: Record<string, any>[];
|
|
13
|
+
headers?: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
export declare type SSGSingleEntryOptions = boolean | {
|
|
16
|
+
preventDefault?: string[];
|
|
17
|
+
headers?: Record<string, any>;
|
|
18
|
+
routes?: SSGRouteOptions[];
|
|
19
|
+
};
|
|
20
|
+
export declare type SSGMultiEntryOptions = Record<string, SSGSingleEntryOptions>;
|
|
21
|
+
export declare type SSGConfig = boolean | SSGSingleEntryOptions | SSGMultiEntryOptions | ((entryName: string, payload: {
|
|
22
|
+
baseUrl?: string;
|
|
23
|
+
}) => SSGSingleEntryOptions);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
|
|
2
|
+
export declare type BuilderPerformanceConfig = Required<BuilderConfig>['performance'];
|
|
3
|
+
export declare type PerformanceUserConfig = BuilderPerformanceConfig;
|
|
4
|
+
export declare type PerformanceNormalizedConfig = PerformanceUserConfig;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
|
|
2
|
+
export declare type BuilderSecurityConfig = Required<BuilderConfig>['security'];
|
|
3
|
+
export declare type SecurityUserConfig = BuilderSecurityConfig;
|
|
4
|
+
export declare type SecurityNormalizedConfig = SecurityUserConfig;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
|
|
2
|
+
export declare type BuilderSourceConfig = Required<BuilderConfig>['source'];
|
|
3
|
+
export declare type Entry = string | {
|
|
4
|
+
entry: string;
|
|
5
|
+
enableFileSystemRoutes?: boolean;
|
|
6
|
+
disableMount?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare type Entries = Record<string, Entry>;
|
|
9
|
+
export interface SourceUserConfig extends BuilderSourceConfig {
|
|
10
|
+
entries?: Entries;
|
|
11
|
+
enableAsyncEntry?: boolean;
|
|
12
|
+
disableDefaultEntries?: boolean;
|
|
13
|
+
entriesDir?: string;
|
|
14
|
+
configDir?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The configuration of `source.designSystem` is provided by `tailwindcss` plugin.
|
|
17
|
+
* Please use `yarn new` or `pnpm new` to enable the corresponding capability.
|
|
18
|
+
* @requires `tailwindcss` plugin
|
|
19
|
+
*/
|
|
20
|
+
designSystem?: Record<string, any>;
|
|
21
|
+
}
|
|
22
|
+
export declare type SourceNormalizedConfig = SourceUserConfig;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
|
|
2
|
+
import type { JestConfig } from '@modern-js/core';
|
|
3
|
+
import type { PluginSwcOptions } from '@modern-js/builder-plugin-swc';
|
|
4
|
+
import type { PluginEsbuildOptions } from '@modern-js/builder-plugin-esbuild';
|
|
5
|
+
export declare type BuilderToolsConfig = Required<BuilderConfig>['tools'];
|
|
6
|
+
/**
|
|
7
|
+
* The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.
|
|
8
|
+
* Please use `yarn new` or `pnpm new` to enable the corresponding capability.
|
|
9
|
+
* @requires `tailwindcss` plugin
|
|
10
|
+
*/
|
|
11
|
+
export declare type Tailwindcss = Record<string, any> | ((options: Record<string, any>) => Record<string, any> | void);
|
|
12
|
+
export interface ToolsUserConfig extends BuilderToolsConfig {
|
|
13
|
+
tailwindcss?: Tailwindcss;
|
|
14
|
+
jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
|
|
15
|
+
esbuild?: PluginEsbuildOptions;
|
|
16
|
+
/**
|
|
17
|
+
* The configuration of `swc` is provided by `swc` plugin.
|
|
18
|
+
* @requires `swc` plugin
|
|
19
|
+
*/
|
|
20
|
+
swc?: PluginSwcOptions;
|
|
21
|
+
}
|
|
22
|
+
export declare type ToolsNormalizedConfig = ToolsUserConfig;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { webpack } from '@modern-js/builder-webpack-provider';
|
|
2
|
+
import type { AsyncWaterfall, AsyncWorkflow, ParallelWorkflow } from '@modern-js/plugin';
|
|
3
|
+
import type { Entrypoint, HtmlPartials, NestedRoute, PageRoute, RouteLegacy, ServerRoute } from '@modern-js/types';
|
|
4
|
+
import type { Stats, MultiStats } from '@modern-js/builder-shared';
|
|
5
|
+
export interface ImportSpecifier {
|
|
6
|
+
local?: string;
|
|
7
|
+
imported?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ImportStatement {
|
|
10
|
+
specifiers: ImportSpecifier[];
|
|
11
|
+
value: string;
|
|
12
|
+
initialize?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RuntimePlugin {
|
|
15
|
+
name: string;
|
|
16
|
+
options: string;
|
|
17
|
+
args?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare type AppToolsHooks = {
|
|
20
|
+
modifyEntryExport: AsyncWaterfall<{
|
|
21
|
+
entrypoint: Entrypoint;
|
|
22
|
+
exportStatement: string;
|
|
23
|
+
}>;
|
|
24
|
+
modifyEntryImports: AsyncWaterfall<{
|
|
25
|
+
imports: ImportStatement[];
|
|
26
|
+
entrypoint: Entrypoint;
|
|
27
|
+
}>;
|
|
28
|
+
modifyEntryRuntimePlugins: AsyncWaterfall<{
|
|
29
|
+
entrypoint: Entrypoint;
|
|
30
|
+
plugins: RuntimePlugin[];
|
|
31
|
+
}>;
|
|
32
|
+
modifyEntryRenderFunction: AsyncWaterfall<{
|
|
33
|
+
entrypoint: Entrypoint;
|
|
34
|
+
code: string;
|
|
35
|
+
}>;
|
|
36
|
+
modifyAsyncEntry: AsyncWaterfall<{
|
|
37
|
+
entrypoint: Entrypoint;
|
|
38
|
+
code: string;
|
|
39
|
+
}>;
|
|
40
|
+
modifyFileSystemRoutes: AsyncWaterfall<{
|
|
41
|
+
entrypoint: Entrypoint;
|
|
42
|
+
routes: RouteLegacy[] | (NestedRoute | PageRoute)[];
|
|
43
|
+
}>;
|
|
44
|
+
modifyServerRoutes: AsyncWaterfall<{
|
|
45
|
+
routes: ServerRoute[];
|
|
46
|
+
}>;
|
|
47
|
+
htmlPartials: AsyncWaterfall<{
|
|
48
|
+
entrypoint: Entrypoint;
|
|
49
|
+
partials: HtmlPartials;
|
|
50
|
+
}>;
|
|
51
|
+
beforeGenerateRoutes: AsyncWaterfall<{
|
|
52
|
+
entrypoint: Entrypoint;
|
|
53
|
+
code: string;
|
|
54
|
+
}>;
|
|
55
|
+
addDefineTypes: AsyncWaterfall<void>;
|
|
56
|
+
beforeDev: AsyncWorkflow<void, unknown>;
|
|
57
|
+
afterDev: AsyncWorkflow<void, unknown>;
|
|
58
|
+
beforeCreateCompiler: AsyncWorkflow<{
|
|
59
|
+
bundlerConfigs: webpack.Configuration[];
|
|
60
|
+
}, unknown>;
|
|
61
|
+
afterCreateCompiler: AsyncWorkflow<{
|
|
62
|
+
compiler?: webpack.Compiler | webpack.MultiCompiler;
|
|
63
|
+
}, unknown>;
|
|
64
|
+
beforePrintInstructions: AsyncWaterfall<{
|
|
65
|
+
instructions: string;
|
|
66
|
+
}>;
|
|
67
|
+
beforeBuild: AsyncWorkflow<{
|
|
68
|
+
bundlerConfigs?: webpack.Configuration[];
|
|
69
|
+
}, unknown>;
|
|
70
|
+
afterBuild: AsyncWorkflow<{
|
|
71
|
+
stats?: Stats | MultiStats;
|
|
72
|
+
}, unknown>;
|
|
73
|
+
beforeDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
74
|
+
afterDeploy: AsyncWorkflow<Record<string, any>, unknown>;
|
|
75
|
+
watchFiles: ParallelWorkflow<void>;
|
|
76
|
+
fileChange: AsyncWorkflow<{
|
|
77
|
+
filename: string;
|
|
78
|
+
eventType: 'add' | 'change' | 'unlink';
|
|
79
|
+
}, void>;
|
|
80
|
+
beforeRestart: AsyncWorkflow<void, void>;
|
|
81
|
+
};
|