@modern-js/core 1.0.0-alpha.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 +10 -0
- package/LICENSE +21 -0
- package/README.md +32 -0
- package/bin/modern-js.js +18 -0
- package/dist/js/modern/config/defaults.js +102 -0
- package/dist/js/modern/config/index.js +104 -0
- package/dist/js/modern/config/mergeConfig.js +20 -0
- package/dist/js/modern/config/schema/deploy.js +34 -0
- package/dist/js/modern/config/schema/index.js +104 -0
- package/dist/js/modern/config/schema/output.js +147 -0
- package/dist/js/modern/config/schema/server.js +167 -0
- package/dist/js/modern/config/schema/source.js +59 -0
- package/dist/js/modern/config/schema/tools.js +33 -0
- package/dist/js/modern/context.js +25 -0
- package/dist/js/modern/index.js +137 -0
- package/dist/js/modern/initWatcher.js +51 -0
- package/dist/js/modern/loadEnv.js +12 -0
- package/dist/js/modern/loadPlugins.js +66 -0
- package/dist/js/modern/utils/commander.js +19 -0
- package/dist/js/modern/utils/repeatKeyWarning.js +18 -0
- package/dist/js/node/config/defaults.js +109 -0
- package/dist/js/node/config/index.js +142 -0
- package/dist/js/node/config/mergeConfig.js +32 -0
- package/dist/js/node/config/schema/deploy.js +43 -0
- package/dist/js/node/config/schema/index.js +126 -0
- package/dist/js/node/config/schema/output.js +156 -0
- package/dist/js/node/config/schema/server.js +176 -0
- package/dist/js/node/config/schema/source.js +68 -0
- package/dist/js/node/config/schema/tools.js +40 -0
- package/dist/js/node/context.js +52 -0
- package/dist/js/node/index.js +212 -0
- package/dist/js/node/initWatcher.js +72 -0
- package/dist/js/node/loadEnv.js +28 -0
- package/dist/js/node/loadPlugins.js +76 -0
- package/dist/js/node/utils/commander.js +35 -0
- package/dist/js/node/utils/repeatKeyWarning.js +31 -0
- package/dist/types/config/defaults.d.ts +27 -0
- package/dist/types/config/index.d.ts +125 -0
- package/dist/types/config/mergeConfig.d.ts +29 -0
- package/dist/types/config/schema/deploy.d.ts +33 -0
- package/dist/types/config/schema/index.d.ts +474 -0
- package/dist/types/config/schema/output.d.ts +146 -0
- package/dist/types/config/schema/server.d.ts +179 -0
- package/dist/types/config/schema/source.d.ts +58 -0
- package/dist/types/config/schema/tools.d.ts +33 -0
- package/dist/types/context.d.ts +20 -0
- package/dist/types/index.d.ts +86 -0
- package/dist/types/initWatcher.d.ts +4 -0
- package/dist/types/loadEnv.d.ts +1 -0
- package/dist/types/loadPlugins.d.ts +16 -0
- package/dist/types/utils/commander.d.ts +7 -0
- package/dist/types/utils/repeatKeyWarning.d.ts +3 -0
- package/modern.config.js +13 -0
- package/package.json +73 -0
- package/src/config/defaults.ts +104 -0
- package/src/config/index.ts +296 -0
- package/src/config/mergeConfig.ts +68 -0
- package/src/config/schema/deploy.ts +23 -0
- package/src/config/schema/index.ts +111 -0
- package/src/config/schema/output.ts +66 -0
- package/src/config/schema/server.ts +105 -0
- package/src/config/schema/source.ts +34 -0
- package/src/config/schema/tools.ts +15 -0
- package/src/context.ts +46 -0
- package/src/index.ts +240 -0
- package/src/initWatcher.ts +81 -0
- package/src/loadEnv.ts +21 -0
- package/src/loadPlugins.ts +81 -0
- package/src/types.d.ts +0 -0
- package/src/utils/commander.ts +22 -0
- package/src/utils/repeatKeyWarning.ts +29 -0
- package/tests/fixtures/load-plugin/not-found/package.json +3 -0
- package/tests/fixtures/load-plugin/not-found/test-plugin-a.js +1 -0
- package/tests/fixtures/load-plugin/user-plugins/package.json +3 -0
- package/tests/fixtures/load-plugin/user-plugins/test-plugin-a.js +1 -0
- package/tests/fixtures/load-plugin/user-plugins/test-plugin-b.js +3 -0
- package/tests/loadEnv.test.ts +100 -0
- package/tests/loadPlugin.test.ts +29 -0
- package/tests/mergeConfig.test.ts +78 -0
- package/tests/repeatKeyWarning.test.ts +68 -0
- package/tests/schema.test.ts +109 -0
- package/tests/tsconfig.json +13 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { MetaOptions } from '@modern-js/utils';
|
|
2
|
+
import { PluginConfig } from '../loadPlugins';
|
|
3
|
+
import { defaults } from './defaults';
|
|
4
|
+
import { NormalizedConfig } from './mergeConfig';
|
|
5
|
+
import { PluginValidateSchema } from './schema';
|
|
6
|
+
export { defaults as defaultsConfig };
|
|
7
|
+
export interface SourceConfig {
|
|
8
|
+
entries?: Record<string, string | {
|
|
9
|
+
entry: string;
|
|
10
|
+
enableFileSystemRoutes?: boolean;
|
|
11
|
+
disableMount?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
disableDefaultEntries?: boolean;
|
|
14
|
+
entriesDir?: string;
|
|
15
|
+
configDir?: string;
|
|
16
|
+
apiDir?: string;
|
|
17
|
+
envVars?: Array<string>;
|
|
18
|
+
globalVars?: Record<string, string>;
|
|
19
|
+
alias?: Record<string, string> | ((aliases: Record<string, string>) => Record<string, unknown>);
|
|
20
|
+
moduleScopes?: Array<string | RegExp> | ((scopes: Array<string | RegExp>) => Array<string | RegExp>);
|
|
21
|
+
include?: Array<string | RegExp>;
|
|
22
|
+
}
|
|
23
|
+
export interface OutputConfig {
|
|
24
|
+
assetPrefix?: string;
|
|
25
|
+
htmlPath?: string;
|
|
26
|
+
jsPath?: string;
|
|
27
|
+
cssPath?: string;
|
|
28
|
+
mediaPath?: string;
|
|
29
|
+
path?: string;
|
|
30
|
+
title?: string;
|
|
31
|
+
titleByEntries?: Record<string, string>;
|
|
32
|
+
meta?: MetaOptions;
|
|
33
|
+
metaByEntries?: Record<string, MetaOptions>;
|
|
34
|
+
inject?: 'body' | 'head' | boolean;
|
|
35
|
+
injectByEntries?: Record<string, 'body' | 'head' | boolean>;
|
|
36
|
+
mountId?: string;
|
|
37
|
+
favicon?: string;
|
|
38
|
+
faviconByEntries?: Record<string, string | undefined>;
|
|
39
|
+
copy?: Record<string, unknown>;
|
|
40
|
+
scriptExt?: Record<string, unknown>;
|
|
41
|
+
disableHtmlFolder?: boolean;
|
|
42
|
+
disableCssModuleExtension?: boolean;
|
|
43
|
+
disableCssExtract?: boolean;
|
|
44
|
+
enableCssModuleTSDeclaration?: boolean;
|
|
45
|
+
disableMinimize?: boolean;
|
|
46
|
+
enableInlineStyles?: boolean;
|
|
47
|
+
enableInlineScripts?: boolean;
|
|
48
|
+
disableSourceMap?: boolean;
|
|
49
|
+
disableInlineRuntimeChunk?: boolean;
|
|
50
|
+
disableAssetsCache?: boolean;
|
|
51
|
+
enableLatestDecorators?: boolean;
|
|
52
|
+
polyfill?: 'off' | 'usage' | 'entry' | 'ua';
|
|
53
|
+
dataUriLimit?: number;
|
|
54
|
+
templateParameters?: Record<string, unknown>;
|
|
55
|
+
templateParametersByEntries?: Record<string, Record<string, unknown> | undefined>;
|
|
56
|
+
cssModuleLocalIdentName?: string;
|
|
57
|
+
enableModernMode?: boolean;
|
|
58
|
+
federation?: boolean;
|
|
59
|
+
disableNodePolyfill?: boolean;
|
|
60
|
+
enableTsLoader?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface ServerConfig {
|
|
63
|
+
routes?: Record<string, string | {
|
|
64
|
+
route: string | string[];
|
|
65
|
+
disableSpa?: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
publicRoutes?: {
|
|
68
|
+
[filepath: string]: string;
|
|
69
|
+
};
|
|
70
|
+
ssr?: boolean | Record<string, unknown>;
|
|
71
|
+
ssrByEntries?: Record<string, boolean | Record<string, unknown>>;
|
|
72
|
+
baseUrl?: string | Array<string>;
|
|
73
|
+
port?: number;
|
|
74
|
+
logger?: Record<string, string>;
|
|
75
|
+
measure?: Record<string, string>;
|
|
76
|
+
}
|
|
77
|
+
export interface DevConfig {
|
|
78
|
+
assetPrefix?: string | boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface DeployConfig {
|
|
81
|
+
microFrontend?: {
|
|
82
|
+
enableHtmlEntry?: boolean;
|
|
83
|
+
};
|
|
84
|
+
domain?: string | Array<string>;
|
|
85
|
+
domainByEntries?: Record<string, string | Array<string>>;
|
|
86
|
+
}
|
|
87
|
+
declare type ConfigFunction = Record<string, unknown> | ((config: Record<string, unknown>) => Record<string, unknown> | void);
|
|
88
|
+
export interface ToolsConfig {
|
|
89
|
+
webpack?: ConfigFunction;
|
|
90
|
+
babel?: ConfigFunction;
|
|
91
|
+
autoprefixer?: ConfigFunction;
|
|
92
|
+
postcss?: ConfigFunction;
|
|
93
|
+
lodash?: ConfigFunction;
|
|
94
|
+
devServer?: Record<string, unknown>;
|
|
95
|
+
tsLoader?: ConfigFunction;
|
|
96
|
+
terser?: ConfigFunction;
|
|
97
|
+
minifyCss?: ConfigFunction;
|
|
98
|
+
esbuild?: Record<string, unknown>;
|
|
99
|
+
}
|
|
100
|
+
export declare type RuntimeConfig = Record<string, any>;
|
|
101
|
+
export interface RuntimeByEntriesConfig {
|
|
102
|
+
[name: string]: RuntimeConfig;
|
|
103
|
+
}
|
|
104
|
+
export interface UserConfig {
|
|
105
|
+
source?: SourceConfig;
|
|
106
|
+
output?: OutputConfig;
|
|
107
|
+
server?: ServerConfig;
|
|
108
|
+
dev?: DevConfig;
|
|
109
|
+
deploy?: DeployConfig;
|
|
110
|
+
tools?: ToolsConfig;
|
|
111
|
+
plugins?: PluginConfig;
|
|
112
|
+
runtime?: RuntimeConfig;
|
|
113
|
+
runtimeByEntries?: RuntimeByEntriesConfig;
|
|
114
|
+
}
|
|
115
|
+
export declare type ConfigParam = UserConfig | Promise<UserConfig> | ((env: any) => UserConfig | Promise<UserConfig>);
|
|
116
|
+
export interface LoadedConfig {
|
|
117
|
+
config: UserConfig;
|
|
118
|
+
filePath: string | false;
|
|
119
|
+
dependencies: string[];
|
|
120
|
+
pkgConfig: UserConfig;
|
|
121
|
+
jsConfig: UserConfig;
|
|
122
|
+
}
|
|
123
|
+
export declare const defineConfig: (config: ConfigParam) => ConfigParam;
|
|
124
|
+
export declare const loadUserConfig: (appDirectory: string, filePath?: string | undefined) => Promise<LoadedConfig>;
|
|
125
|
+
export declare const resolveConfig: (loaded: LoadedConfig, configs: UserConfig[], schemas: PluginValidateSchema[], isRestart: boolean, argv: string[]) => Promise<NormalizedConfig>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { UserConfig, SourceConfig, ToolsConfig } from '.';
|
|
2
|
+
export interface NormalizedSourceConfig extends Omit<SourceConfig, 'alias' | 'moduleScopes'> {
|
|
3
|
+
alias: SourceConfig['alias'] | Array<SourceConfig['alias']>;
|
|
4
|
+
moduleScopes: SourceConfig['moduleScopes'] | Array<SourceConfig['moduleScopes']>;
|
|
5
|
+
}
|
|
6
|
+
export interface NormalizedToolsConfig extends Omit<ToolsConfig, 'webpack' | 'babel' | 'postcss' | 'autoprefixer' | 'lodash' | 'tsLoader' | 'terser' | 'minifyCss' | 'esbuild'> {
|
|
7
|
+
webpack: ToolsConfig['webpack'] | Array<NonNullable<ToolsConfig['webpack']>>;
|
|
8
|
+
babel: ToolsConfig['babel'] | Array<NonNullable<ToolsConfig['babel']>>;
|
|
9
|
+
postcss: ToolsConfig['postcss'] | Array<NonNullable<ToolsConfig['postcss']>>;
|
|
10
|
+
autoprefixer: ToolsConfig['autoprefixer'] | Array<NonNullable<ToolsConfig['autoprefixer']>>;
|
|
11
|
+
lodash: ToolsConfig['lodash'] | Array<ToolsConfig['lodash']>;
|
|
12
|
+
tsLoader: ToolsConfig['tsLoader'] | Array<NonNullable<ToolsConfig['tsLoader']>>;
|
|
13
|
+
terser: ToolsConfig['terser'] | Array<NonNullable<ToolsConfig['terser']>>;
|
|
14
|
+
minifyCss: ToolsConfig['minifyCss'] | Array<NonNullable<ToolsConfig['minifyCss']>>;
|
|
15
|
+
esbuild: ToolsConfig['esbuild'] | Array<NonNullable<ToolsConfig['esbuild']>>;
|
|
16
|
+
}
|
|
17
|
+
export interface NormalizedConfig extends Omit<Required<UserConfig>, 'source' | 'tools'> {
|
|
18
|
+
source: NormalizedSourceConfig;
|
|
19
|
+
tools: NormalizedToolsConfig;
|
|
20
|
+
_raw: UserConfig;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* merge configuration from modern.config.js and plugins.
|
|
24
|
+
*
|
|
25
|
+
* @param configs - Configuration from modern.config.ts or plugin's config hook.
|
|
26
|
+
* @returns - normalized user config.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export declare const mergeConfig: (configs: Array<UserConfig | NormalizedConfig>) => NormalizedConfig;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const deploy: {
|
|
2
|
+
type: string;
|
|
3
|
+
properties: {
|
|
4
|
+
microFrontend: {
|
|
5
|
+
type: string;
|
|
6
|
+
dependencies: {
|
|
7
|
+
enableHtmlEntry: {
|
|
8
|
+
properties: {
|
|
9
|
+
enableLegacy: {
|
|
10
|
+
enum: boolean[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
properties: {
|
|
16
|
+
enableHtmlEntry: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
domain: {
|
|
22
|
+
type: string[];
|
|
23
|
+
};
|
|
24
|
+
domainByEntries: {
|
|
25
|
+
type: string;
|
|
26
|
+
patternProperties: {
|
|
27
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
28
|
+
type: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
export interface PluginValidateSchema {
|
|
3
|
+
target: string;
|
|
4
|
+
schema: JSONSchemaType<any>;
|
|
5
|
+
}
|
|
6
|
+
export declare const patchSchema: (pluginSchemas: Array<PluginValidateSchema | PluginValidateSchema[]>) => {
|
|
7
|
+
type: string;
|
|
8
|
+
additionalProperties: boolean;
|
|
9
|
+
properties: {
|
|
10
|
+
source: {
|
|
11
|
+
type: string;
|
|
12
|
+
additionalProperties: boolean;
|
|
13
|
+
properties: {
|
|
14
|
+
entries: {
|
|
15
|
+
type: string;
|
|
16
|
+
patternProperties: {
|
|
17
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
18
|
+
if: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
then: {
|
|
22
|
+
required: string[];
|
|
23
|
+
properties: {
|
|
24
|
+
entry: {
|
|
25
|
+
type: string[];
|
|
26
|
+
};
|
|
27
|
+
disableMount: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
enableFileSystemRoutes: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
additionalProperties: boolean;
|
|
35
|
+
};
|
|
36
|
+
else: {
|
|
37
|
+
type: string[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
alias: {
|
|
43
|
+
typeof: string[];
|
|
44
|
+
};
|
|
45
|
+
disableDefaultEntries: {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
envVars: {
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
globalVars: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
moduleScopes: {
|
|
55
|
+
instanceof: string[];
|
|
56
|
+
};
|
|
57
|
+
entriesDir: {
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
configDir: {
|
|
61
|
+
type: string;
|
|
62
|
+
};
|
|
63
|
+
include: {
|
|
64
|
+
type: string[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
output: {
|
|
69
|
+
type: string;
|
|
70
|
+
additionalProperties: boolean;
|
|
71
|
+
properties: {
|
|
72
|
+
assetPrefix: {
|
|
73
|
+
type: string;
|
|
74
|
+
};
|
|
75
|
+
path: {
|
|
76
|
+
type: string;
|
|
77
|
+
};
|
|
78
|
+
jsPath: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
cssPath: {
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
htmlPath: {
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
mediaPath: {
|
|
88
|
+
type: string;
|
|
89
|
+
};
|
|
90
|
+
mountId: {
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
favicon: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
faviconByEntries: {
|
|
97
|
+
type: string;
|
|
98
|
+
patternProperties: {
|
|
99
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
100
|
+
type: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
title: {
|
|
105
|
+
type: string;
|
|
106
|
+
};
|
|
107
|
+
titleByEntries: {
|
|
108
|
+
type: string;
|
|
109
|
+
patternProperties: {
|
|
110
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
111
|
+
type: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
meta: {
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
118
|
+
metaByEntries: {
|
|
119
|
+
type: string;
|
|
120
|
+
patternProperties: {
|
|
121
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
122
|
+
type: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
inject: {
|
|
127
|
+
enum: (string | boolean)[];
|
|
128
|
+
};
|
|
129
|
+
injectByEntries: {
|
|
130
|
+
type: string;
|
|
131
|
+
patternProperties: {
|
|
132
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
133
|
+
enum: (string | boolean)[];
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
copy: {
|
|
138
|
+
type: string;
|
|
139
|
+
};
|
|
140
|
+
scriptExt: {
|
|
141
|
+
type: string;
|
|
142
|
+
};
|
|
143
|
+
disableHtmlFolder: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
disableCssModuleExtension: {
|
|
147
|
+
type: string;
|
|
148
|
+
};
|
|
149
|
+
disableCssExtract: {
|
|
150
|
+
type: string;
|
|
151
|
+
};
|
|
152
|
+
enableCssModuleTSDeclaration: {
|
|
153
|
+
type: string;
|
|
154
|
+
};
|
|
155
|
+
disableMinimize: {
|
|
156
|
+
type: string;
|
|
157
|
+
};
|
|
158
|
+
enableInlineStyles: {
|
|
159
|
+
type: string;
|
|
160
|
+
};
|
|
161
|
+
enableInlineScripts: {
|
|
162
|
+
type: string;
|
|
163
|
+
};
|
|
164
|
+
disableSourceMap: {
|
|
165
|
+
type: string;
|
|
166
|
+
};
|
|
167
|
+
disableInlineRuntimeChunk: {
|
|
168
|
+
type: string;
|
|
169
|
+
};
|
|
170
|
+
disableAssetsCache: {
|
|
171
|
+
type: string;
|
|
172
|
+
};
|
|
173
|
+
enableLatestDecorators: {
|
|
174
|
+
type: string;
|
|
175
|
+
};
|
|
176
|
+
enableUsageBuiltIns: {
|
|
177
|
+
type: string;
|
|
178
|
+
};
|
|
179
|
+
enableTsLoader: {
|
|
180
|
+
type: string;
|
|
181
|
+
};
|
|
182
|
+
dataUriLimit: {
|
|
183
|
+
type: string;
|
|
184
|
+
};
|
|
185
|
+
templateParameters: {
|
|
186
|
+
type: string;
|
|
187
|
+
};
|
|
188
|
+
templateParametersByEntries: {
|
|
189
|
+
type: string;
|
|
190
|
+
patternProperties: {
|
|
191
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
192
|
+
type: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
polyfill: {
|
|
197
|
+
type: string;
|
|
198
|
+
enum: string[];
|
|
199
|
+
};
|
|
200
|
+
cssModuleLocalIdentName: {
|
|
201
|
+
type: string;
|
|
202
|
+
};
|
|
203
|
+
federation: {
|
|
204
|
+
type: string;
|
|
205
|
+
};
|
|
206
|
+
disableNodePolyfill: {
|
|
207
|
+
type: string;
|
|
208
|
+
};
|
|
209
|
+
enableModernMode: {
|
|
210
|
+
type: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
server: {
|
|
215
|
+
type: string;
|
|
216
|
+
additionalProperties: boolean;
|
|
217
|
+
properties: {
|
|
218
|
+
port: {
|
|
219
|
+
type: string;
|
|
220
|
+
};
|
|
221
|
+
ssr: {
|
|
222
|
+
if: {
|
|
223
|
+
type: string;
|
|
224
|
+
};
|
|
225
|
+
then: {
|
|
226
|
+
properties: {
|
|
227
|
+
disableLoadable: {
|
|
228
|
+
type: string;
|
|
229
|
+
};
|
|
230
|
+
disableHelmet: {
|
|
231
|
+
type: string;
|
|
232
|
+
};
|
|
233
|
+
disableRedirect: {
|
|
234
|
+
type: string;
|
|
235
|
+
};
|
|
236
|
+
enableAsyncData: {
|
|
237
|
+
type: string;
|
|
238
|
+
};
|
|
239
|
+
enableProductWarning: {
|
|
240
|
+
type: string;
|
|
241
|
+
};
|
|
242
|
+
timeout: {
|
|
243
|
+
type: string;
|
|
244
|
+
};
|
|
245
|
+
asyncDataTimeout: {
|
|
246
|
+
type: string;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
else: {
|
|
251
|
+
type: string;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
ssrByEntries: {
|
|
255
|
+
type: string;
|
|
256
|
+
patternProperties: {
|
|
257
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
258
|
+
if: {
|
|
259
|
+
type: string;
|
|
260
|
+
};
|
|
261
|
+
then: {
|
|
262
|
+
properties: {
|
|
263
|
+
disableLoadable: {
|
|
264
|
+
type: string;
|
|
265
|
+
};
|
|
266
|
+
disableHelmet: {
|
|
267
|
+
type: string;
|
|
268
|
+
};
|
|
269
|
+
disableRedirect: {
|
|
270
|
+
type: string;
|
|
271
|
+
};
|
|
272
|
+
enableProductWarning: {
|
|
273
|
+
type: string;
|
|
274
|
+
};
|
|
275
|
+
enableAsyncData: {
|
|
276
|
+
type: string;
|
|
277
|
+
};
|
|
278
|
+
timeout: {
|
|
279
|
+
type: string;
|
|
280
|
+
};
|
|
281
|
+
asyncDataTimeout: {
|
|
282
|
+
type: string;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
additionalProperties: boolean;
|
|
286
|
+
};
|
|
287
|
+
else: {
|
|
288
|
+
type: string;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
routes: {
|
|
294
|
+
type: string;
|
|
295
|
+
patternProperties: {
|
|
296
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
297
|
+
if: {
|
|
298
|
+
type: string;
|
|
299
|
+
};
|
|
300
|
+
then: {
|
|
301
|
+
properties: {
|
|
302
|
+
route: {
|
|
303
|
+
oneOf: ({
|
|
304
|
+
type: string;
|
|
305
|
+
properties: {
|
|
306
|
+
path: {
|
|
307
|
+
type: string;
|
|
308
|
+
};
|
|
309
|
+
headers: {
|
|
310
|
+
type: string;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
additionalProperties: boolean;
|
|
314
|
+
} | {
|
|
315
|
+
type: string;
|
|
316
|
+
items?: undefined;
|
|
317
|
+
} | {
|
|
318
|
+
type: string;
|
|
319
|
+
items: {
|
|
320
|
+
oneOf: ({
|
|
321
|
+
type: string;
|
|
322
|
+
properties: {
|
|
323
|
+
path: {
|
|
324
|
+
type: string;
|
|
325
|
+
};
|
|
326
|
+
headers: {
|
|
327
|
+
type: string;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
additionalProperties: boolean;
|
|
331
|
+
} | {
|
|
332
|
+
type: string;
|
|
333
|
+
})[];
|
|
334
|
+
};
|
|
335
|
+
})[];
|
|
336
|
+
};
|
|
337
|
+
disableSpa: {
|
|
338
|
+
type: string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
additionalProperties: boolean;
|
|
342
|
+
};
|
|
343
|
+
else: {
|
|
344
|
+
oneOf: ({
|
|
345
|
+
type: string;
|
|
346
|
+
items?: undefined;
|
|
347
|
+
} | {
|
|
348
|
+
type: string;
|
|
349
|
+
items: {
|
|
350
|
+
type: string;
|
|
351
|
+
};
|
|
352
|
+
})[];
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
publicRoutes: {
|
|
358
|
+
type: string;
|
|
359
|
+
patternProperties: {
|
|
360
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
361
|
+
type: string[];
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
baseUrl: {
|
|
366
|
+
oneOf: ({
|
|
367
|
+
type: string;
|
|
368
|
+
items?: undefined;
|
|
369
|
+
} | {
|
|
370
|
+
type: string;
|
|
371
|
+
items: {
|
|
372
|
+
type: string;
|
|
373
|
+
}[];
|
|
374
|
+
})[];
|
|
375
|
+
};
|
|
376
|
+
middleware: {
|
|
377
|
+
instanceof: string[];
|
|
378
|
+
};
|
|
379
|
+
renderHook: {
|
|
380
|
+
instanceof: string;
|
|
381
|
+
};
|
|
382
|
+
logger: {
|
|
383
|
+
type: string;
|
|
384
|
+
};
|
|
385
|
+
measure: {
|
|
386
|
+
type: string;
|
|
387
|
+
};
|
|
388
|
+
proxy: {
|
|
389
|
+
type: string;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
deploy: {
|
|
394
|
+
type: string;
|
|
395
|
+
properties: {
|
|
396
|
+
microFrontend: {
|
|
397
|
+
type: string;
|
|
398
|
+
dependencies: {
|
|
399
|
+
enableHtmlEntry: {
|
|
400
|
+
properties: {
|
|
401
|
+
enableLegacy: {
|
|
402
|
+
enum: boolean[];
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
properties: {
|
|
408
|
+
enableHtmlEntry: {
|
|
409
|
+
type: string;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
domain: {
|
|
414
|
+
type: string[];
|
|
415
|
+
};
|
|
416
|
+
domainByEntries: {
|
|
417
|
+
type: string;
|
|
418
|
+
patternProperties: {
|
|
419
|
+
"^[a-zA-Z0-9_-]+$": {
|
|
420
|
+
type: string[];
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
plugins: {
|
|
427
|
+
type: string;
|
|
428
|
+
additionalProperties: boolean;
|
|
429
|
+
};
|
|
430
|
+
dev: {
|
|
431
|
+
type: string;
|
|
432
|
+
properties: {
|
|
433
|
+
assetPrefix: {
|
|
434
|
+
type: string[];
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
additionalProperties: boolean;
|
|
438
|
+
};
|
|
439
|
+
tools: {
|
|
440
|
+
type: string;
|
|
441
|
+
additionalProperties: boolean;
|
|
442
|
+
properties: {
|
|
443
|
+
webpack: {
|
|
444
|
+
typeof: string[];
|
|
445
|
+
};
|
|
446
|
+
babel: {
|
|
447
|
+
typeof: string[];
|
|
448
|
+
};
|
|
449
|
+
postcss: {
|
|
450
|
+
typeof: string[];
|
|
451
|
+
};
|
|
452
|
+
lodash: {
|
|
453
|
+
typeof: string[];
|
|
454
|
+
};
|
|
455
|
+
devServer: {
|
|
456
|
+
type: string;
|
|
457
|
+
};
|
|
458
|
+
tsLoader: {
|
|
459
|
+
typeof: string[];
|
|
460
|
+
};
|
|
461
|
+
autoprefixer: {
|
|
462
|
+
typeof: string[];
|
|
463
|
+
};
|
|
464
|
+
terser: {
|
|
465
|
+
typeof: string[];
|
|
466
|
+
};
|
|
467
|
+
minifyCss: {
|
|
468
|
+
typeof: string[];
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
export declare const traverseSchema: (schema: ReturnType<typeof patchSchema>) => string[];
|