@modern-js/core 1.8.0 → 1.9.2

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.
Files changed (127) hide show
  1. package/.eslintrc.js +1 -0
  2. package/CHANGELOG.md +22 -0
  3. package/bin/modern-js.js +1 -1
  4. package/compiled/ajv/codegen.js +1 -0
  5. package/compiled/ajv/dist/ajv.d.ts +16 -0
  6. package/compiled/ajv/dist/compile/codegen/code.d.ts +40 -0
  7. package/compiled/ajv/dist/compile/codegen/index.d.ts +79 -0
  8. package/compiled/ajv/dist/compile/codegen/scope.d.ts +79 -0
  9. package/compiled/ajv/dist/compile/errors.d.ts +13 -0
  10. package/compiled/ajv/dist/compile/index.d.ts +80 -0
  11. package/compiled/ajv/dist/compile/ref_error.d.ts +6 -0
  12. package/compiled/ajv/dist/compile/resolve.d.ts +12 -0
  13. package/compiled/ajv/dist/compile/rules.d.ts +28 -0
  14. package/compiled/ajv/dist/compile/util.d.ts +40 -0
  15. package/compiled/ajv/dist/compile/validate/index.d.ts +42 -0
  16. package/compiled/ajv/dist/compile/validate/subschema.d.ts +47 -0
  17. package/compiled/ajv/dist/core.d.ts +173 -0
  18. package/compiled/ajv/dist/runtime/validation_error.d.ts +7 -0
  19. package/compiled/ajv/dist/types/index.d.ts +183 -0
  20. package/compiled/ajv/dist/types/json-schema.d.ts +124 -0
  21. package/compiled/ajv/dist/types/jtd-schema.d.ts +169 -0
  22. package/compiled/ajv/index.js +9 -0
  23. package/compiled/ajv/license +22 -0
  24. package/compiled/ajv/package.json +1 -0
  25. package/compiled/ajv/uri-js/dist/es5/uri.all.d.ts +59 -0
  26. package/compiled/ajv-keywords/ajv/dist/ajv.d.ts +16 -0
  27. package/compiled/ajv-keywords/ajv/dist/compile/codegen/code.d.ts +40 -0
  28. package/compiled/ajv-keywords/ajv/dist/compile/codegen/index.d.ts +79 -0
  29. package/compiled/ajv-keywords/ajv/dist/compile/codegen/scope.d.ts +79 -0
  30. package/compiled/ajv-keywords/ajv/dist/compile/errors.d.ts +13 -0
  31. package/compiled/ajv-keywords/ajv/dist/compile/index.d.ts +80 -0
  32. package/compiled/ajv-keywords/ajv/dist/compile/ref_error.d.ts +6 -0
  33. package/compiled/ajv-keywords/ajv/dist/compile/resolve.d.ts +12 -0
  34. package/compiled/ajv-keywords/ajv/dist/compile/rules.d.ts +28 -0
  35. package/compiled/ajv-keywords/ajv/dist/compile/util.d.ts +40 -0
  36. package/compiled/ajv-keywords/ajv/dist/compile/validate/index.d.ts +42 -0
  37. package/compiled/ajv-keywords/ajv/dist/compile/validate/subschema.d.ts +47 -0
  38. package/compiled/ajv-keywords/ajv/dist/core.d.ts +173 -0
  39. package/compiled/ajv-keywords/ajv/dist/runtime/validation_error.d.ts +7 -0
  40. package/compiled/ajv-keywords/ajv/dist/types/index.d.ts +183 -0
  41. package/compiled/ajv-keywords/ajv/dist/types/json-schema.d.ts +124 -0
  42. package/compiled/ajv-keywords/ajv/dist/types/jtd-schema.d.ts +169 -0
  43. package/compiled/ajv-keywords/dist/index.d.ts +4 -0
  44. package/compiled/ajv-keywords/index.js +1 -0
  45. package/compiled/ajv-keywords/license +21 -0
  46. package/compiled/ajv-keywords/package.json +1 -0
  47. package/compiled/ajv-keywords/uri-js/dist/es5/uri.all.d.ts +59 -0
  48. package/compiled/better-ajv-errors/ajv/dist/ajv.d.ts +16 -0
  49. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/code.d.ts +40 -0
  50. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/index.d.ts +79 -0
  51. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/scope.d.ts +79 -0
  52. package/compiled/better-ajv-errors/ajv/dist/compile/errors.d.ts +13 -0
  53. package/compiled/better-ajv-errors/ajv/dist/compile/index.d.ts +80 -0
  54. package/compiled/better-ajv-errors/ajv/dist/compile/ref_error.d.ts +6 -0
  55. package/compiled/better-ajv-errors/ajv/dist/compile/resolve.d.ts +12 -0
  56. package/compiled/better-ajv-errors/ajv/dist/compile/rules.d.ts +28 -0
  57. package/compiled/better-ajv-errors/ajv/dist/compile/util.d.ts +40 -0
  58. package/compiled/better-ajv-errors/ajv/dist/compile/validate/index.d.ts +42 -0
  59. package/compiled/better-ajv-errors/ajv/dist/compile/validate/subschema.d.ts +47 -0
  60. package/compiled/better-ajv-errors/ajv/dist/core.d.ts +173 -0
  61. package/compiled/better-ajv-errors/ajv/dist/runtime/validation_error.d.ts +7 -0
  62. package/compiled/better-ajv-errors/ajv/dist/types/index.d.ts +183 -0
  63. package/compiled/better-ajv-errors/ajv/dist/types/json-schema.d.ts +124 -0
  64. package/compiled/better-ajv-errors/ajv/dist/types/jtd-schema.d.ts +169 -0
  65. package/compiled/better-ajv-errors/index.js +1 -0
  66. package/compiled/better-ajv-errors/license +13 -0
  67. package/compiled/better-ajv-errors/package.json +1 -0
  68. package/compiled/better-ajv-errors/typings.d.ts +24 -0
  69. package/compiled/better-ajv-errors/uri-js/dist/es5/uri.all.d.ts +59 -0
  70. package/compiled/v8-compile-cache/index.js +1 -0
  71. package/compiled/v8-compile-cache/license +21 -0
  72. package/compiled/v8-compile-cache/package.json +1 -0
  73. package/dist/cli.d.ts +1 -0
  74. package/dist/cli.js +33 -0
  75. package/dist/config/defaults.d.ts +28 -0
  76. package/dist/config/defaults.js +98 -0
  77. package/dist/config/index.d.ts +12 -0
  78. package/dist/config/index.js +124 -0
  79. package/dist/config/mergeConfig.d.ts +30 -0
  80. package/dist/config/mergeConfig.js +26 -0
  81. package/dist/config/schema/deploy.d.ts +16 -0
  82. package/dist/config/schema/deploy.js +16 -0
  83. package/dist/config/schema/index.d.ts +466 -0
  84. package/dist/config/schema/index.js +94 -0
  85. package/dist/config/schema/output.d.ts +146 -0
  86. package/dist/config/schema/output.js +68 -0
  87. package/dist/config/schema/server.d.ts +182 -0
  88. package/dist/config/schema/server.js +107 -0
  89. package/dist/config/schema/source.d.ts +58 -0
  90. package/dist/config/schema/source.js +36 -0
  91. package/dist/config/schema/tools.d.ts +36 -0
  92. package/dist/config/schema/tools.js +19 -0
  93. package/dist/config/types/electron.d.ts +13 -0
  94. package/dist/config/types/electron.js +2 -0
  95. package/dist/config/types/index.d.ts +240 -0
  96. package/dist/config/types/index.js +2 -0
  97. package/dist/config/types/less.d.ts +10 -0
  98. package/dist/config/types/less.js +2 -0
  99. package/dist/config/types/sass.d.ts +8 -0
  100. package/dist/config/types/sass.js +2 -0
  101. package/dist/config/types/ssg.d.ts +13 -0
  102. package/dist/config/types/ssg.js +2 -0
  103. package/dist/config/types/test.d.ts +14 -0
  104. package/dist/config/types/test.js +2 -0
  105. package/dist/config/types/unbundle.d.ts +25 -0
  106. package/dist/config/types/unbundle.js +2 -0
  107. package/dist/context.d.ts +37 -0
  108. package/dist/context.js +59 -0
  109. package/dist/index.d.ts +64 -0
  110. package/dist/index.js +181 -0
  111. package/dist/initWatcher.d.ts +3 -0
  112. package/dist/initWatcher.js +75 -0
  113. package/dist/loadEnv.d.ts +1 -0
  114. package/dist/loadEnv.js +21 -0
  115. package/dist/loadPlugins.d.ts +41 -0
  116. package/dist/loadPlugins.js +109 -0
  117. package/dist/manager.d.ts +72 -0
  118. package/dist/manager.js +24 -0
  119. package/dist/pluginAPI.d.ts +12 -0
  120. package/dist/pluginAPI.js +16 -0
  121. package/dist/utils/commander.d.ts +4 -0
  122. package/dist/utils/commander.js +20 -0
  123. package/dist/utils/repeatKeyWarning.d.ts +3 -0
  124. package/dist/utils/repeatKeyWarning.js +22 -0
  125. package/package.json +16 -30
  126. package/tsconfig.json +3 -4
  127. package/modern.config.js +0 -6
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.resolveConfig = exports.loadUserConfig = exports.defineConfig = exports.addServerConfigToDeps = exports.mergeConfig = exports.defaultsConfig = void 0;
30
+ const load_config_1 = require("@modern-js/load-config");
31
+ const utils_1 = require("@modern-js/utils");
32
+ const lodash_1 = require("@modern-js/utils/lodash");
33
+ const ajv_1 = __importDefault(require("../../compiled/ajv"));
34
+ const ajv_keywords_1 = __importDefault(require("../../compiled/ajv-keywords"));
35
+ const better_ajv_errors_1 = __importDefault(require("../../compiled/better-ajv-errors"));
36
+ const repeatKeyWarning_1 = require("../utils/repeatKeyWarning");
37
+ const defaults_1 = require("./defaults");
38
+ Object.defineProperty(exports, "defaultsConfig", { enumerable: true, get: function () { return defaults_1.defaults; } });
39
+ const mergeConfig_1 = require("./mergeConfig");
40
+ Object.defineProperty(exports, "mergeConfig", { enumerable: true, get: function () { return mergeConfig_1.mergeConfig; } });
41
+ const schema_1 = require("./schema");
42
+ const debug = (0, utils_1.createDebugger)('resolve-config');
43
+ __exportStar(require("./types"), exports);
44
+ const addServerConfigToDeps = (dependencies, appDirectory, serverConfigFile) => __awaiter(void 0, void 0, void 0, function* () {
45
+ const serverConfig = yield (0, utils_1.getServerConfig)(appDirectory, serverConfigFile);
46
+ if (serverConfig) {
47
+ dependencies.push(serverConfig);
48
+ }
49
+ });
50
+ exports.addServerConfigToDeps = addServerConfigToDeps;
51
+ const defineConfig = (config) => config;
52
+ exports.defineConfig = defineConfig;
53
+ const loadUserConfig = (appDirectory, filePath, packageJsonConfig) => __awaiter(void 0, void 0, void 0, function* () {
54
+ const loaded = yield (0, load_config_1.loadConfig)(appDirectory, filePath, packageJsonConfig);
55
+ const config = !loaded
56
+ ? {}
57
+ : yield (typeof loaded.config === 'function'
58
+ ? loaded.config(0)
59
+ : loaded.config);
60
+ return {
61
+ config: (0, lodash_1.mergeWith)({}, config || {}, (loaded === null || loaded === void 0 ? void 0 : loaded.pkgConfig) || {}),
62
+ jsConfig: config || {},
63
+ pkgConfig: ((loaded === null || loaded === void 0 ? void 0 : loaded.pkgConfig) || {}),
64
+ filePath: loaded === null || loaded === void 0 ? void 0 : loaded.path,
65
+ dependencies: (loaded === null || loaded === void 0 ? void 0 : loaded.dependencies) || [],
66
+ };
67
+ });
68
+ exports.loadUserConfig = loadUserConfig;
69
+ const showAdditionalPropertiesError = (error) => {
70
+ if (error.keyword === 'additionalProperties' &&
71
+ error.params.additionalProperty) {
72
+ const target = [
73
+ error.instancePath.slice(1),
74
+ error.params.additionalProperty,
75
+ ]
76
+ .filter(Boolean)
77
+ .join('.');
78
+ const name = Object.keys(utils_1.PLUGIN_SCHEMAS).find(key => utils_1.PLUGIN_SCHEMAS[key].some((schemaItem) => schemaItem.target === target));
79
+ if (name) {
80
+ utils_1.signale.warn(`The configuration of ${utils_1.chalk.bold(target)} is provided by plugin ${utils_1.chalk.bold(name)}. Please use ${utils_1.chalk.bold('yarn new')} to enable the corresponding capability.\n`);
81
+ }
82
+ }
83
+ };
84
+ const resolveConfig = (loaded, configs, schemas, restartWithExistingPort, argv, onSchemaError = showAdditionalPropertiesError) => __awaiter(void 0, void 0, void 0, function* () {
85
+ var _a, _b;
86
+ const { config: userConfig, jsConfig, pkgConfig } = loaded;
87
+ const ajv = new ajv_1.default({ $data: true, strict: false });
88
+ (0, ajv_keywords_1.default)(ajv);
89
+ const validateSchema = (0, schema_1.patchSchema)(schemas);
90
+ const validate = ajv.compile(validateSchema);
91
+ (0, repeatKeyWarning_1.repeatKeyWarning)(validateSchema, jsConfig, pkgConfig);
92
+ // validate user config.
93
+ const valid = validate(userConfig);
94
+ if (!valid && ((_a = validate.errors) === null || _a === void 0 ? void 0 : _a.length)) {
95
+ onSchemaError(validate === null || validate === void 0 ? void 0 : validate.errors[0]);
96
+ const errors = (0, better_ajv_errors_1.default)(validateSchema, userConfig, (_b = validate.errors) === null || _b === void 0 ? void 0 : _b.map(e => (Object.assign(Object.assign({}, e), { dataPath: e.instancePath }))), {
97
+ indent: 2,
98
+ });
99
+ utils_1.signale.log(errors);
100
+ throw new Error(`Validate configuration error`);
101
+ }
102
+ // validate config from plugins.
103
+ for (const config of configs) {
104
+ if (!validate(config)) {
105
+ utils_1.signale.error(validate.errors);
106
+ throw new Error(`Validate configuration error.`);
107
+ }
108
+ }
109
+ const resolved = (0, mergeConfig_1.mergeConfig)([defaults_1.defaults, ...configs, userConfig]);
110
+ resolved._raw = loaded.config;
111
+ if ((0, utils_1.isDev)() && argv[0] === 'dev') {
112
+ if (restartWithExistingPort > 0) {
113
+ // dev server is restarted, should use existing port number
114
+ resolved.server.port = restartWithExistingPort;
115
+ }
116
+ else {
117
+ // get port for new dev server
118
+ resolved.server.port = yield (0, utils_1.getPort)(resolved.server.port);
119
+ }
120
+ }
121
+ debug('resolved %o', resolved);
122
+ return resolved;
123
+ });
124
+ exports.resolveConfig = resolveConfig;
@@ -0,0 +1,30 @@
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' | 'styledComponents'> {
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
+ styledComponents: ToolsConfig['styledComponents'] | Array<NonNullable<ToolsConfig['styledComponents']>>;
11
+ autoprefixer: ToolsConfig['autoprefixer'] | Array<NonNullable<ToolsConfig['autoprefixer']>>;
12
+ lodash: ToolsConfig['lodash'] | Array<ToolsConfig['lodash']>;
13
+ tsLoader: ToolsConfig['tsLoader'] | Array<NonNullable<ToolsConfig['tsLoader']>>;
14
+ terser: ToolsConfig['terser'] | Array<NonNullable<ToolsConfig['terser']>>;
15
+ minifyCss: ToolsConfig['minifyCss'] | Array<NonNullable<ToolsConfig['minifyCss']>>;
16
+ esbuild: ToolsConfig['esbuild'] | Array<NonNullable<ToolsConfig['esbuild']>>;
17
+ }
18
+ export interface NormalizedConfig extends Omit<Required<UserConfig>, 'source' | 'tools'> {
19
+ source: NormalizedSourceConfig;
20
+ tools: NormalizedToolsConfig;
21
+ cliOptions?: Record<string, any>;
22
+ _raw: UserConfig;
23
+ }
24
+ /**
25
+ * merge configuration from modern.config.js and plugins.
26
+ *
27
+ * @param configs - Configuration from modern.config.ts or plugin's config hook.
28
+ * @returns - normalized user config.
29
+ */
30
+ export declare const mergeConfig: (configs: Array<UserConfig | NormalizedConfig>) => NormalizedConfig;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mergeConfig = void 0;
4
+ const lodash_1 = require("@modern-js/utils/lodash");
5
+ const utils_1 = require("@modern-js/utils");
6
+ /**
7
+ * merge configuration from modern.config.js and plugins.
8
+ *
9
+ * @param configs - Configuration from modern.config.ts or plugin's config hook.
10
+ * @returns - normalized user config.
11
+ */
12
+ const mergeConfig = (configs) => (0, lodash_1.mergeWith)({}, ...configs, (target, source) => {
13
+ if (Array.isArray(target)) {
14
+ if (Array.isArray(source)) {
15
+ return [...target, ...source];
16
+ }
17
+ else {
18
+ return typeof source !== 'undefined' ? [...target, source] : target;
19
+ }
20
+ }
21
+ else if ((0, utils_1.isFunction)(source)) {
22
+ return typeof target !== 'undefined' ? [target, source] : [source];
23
+ }
24
+ return undefined;
25
+ });
26
+ exports.mergeConfig = mergeConfig;
@@ -0,0 +1,16 @@
1
+ export declare const deploy: {
2
+ type: string;
3
+ properties: {
4
+ domain: {
5
+ type: string[];
6
+ };
7
+ domainByEntries: {
8
+ type: string;
9
+ patternProperties: {
10
+ "^[a-zA-Z0-9_-]+$": {
11
+ type: string[];
12
+ };
13
+ };
14
+ };
15
+ };
16
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deploy = void 0;
4
+ const utils_1 = require("@modern-js/utils");
5
+ exports.deploy = {
6
+ type: 'object',
7
+ properties: {
8
+ domain: { type: ['array', 'string'] },
9
+ domainByEntries: {
10
+ type: 'object',
11
+ patternProperties: {
12
+ [utils_1.ENTRY_NAME_PATTERN]: { type: ['array', 'string'] },
13
+ },
14
+ },
15
+ },
16
+ };
@@ -0,0 +1,466 @@
1
+ import type { JSONSchemaType } from '../../../compiled/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
+ disableTsChecker: {
144
+ type: string;
145
+ };
146
+ disableHtmlFolder: {
147
+ type: string;
148
+ };
149
+ disableCssModuleExtension: {
150
+ type: string;
151
+ };
152
+ disableCssExtract: {
153
+ type: string;
154
+ };
155
+ enableCssModuleTSDeclaration: {
156
+ type: string;
157
+ };
158
+ disableMinimize: {
159
+ type: string;
160
+ };
161
+ enableInlineStyles: {
162
+ type: string;
163
+ };
164
+ enableInlineScripts: {
165
+ type: string;
166
+ };
167
+ disableSourceMap: {
168
+ type: string;
169
+ };
170
+ disableInlineRuntimeChunk: {
171
+ type: string;
172
+ };
173
+ disableAssetsCache: {
174
+ type: string;
175
+ };
176
+ enableLatestDecorators: {
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
+ metrics: {
386
+ type: string[];
387
+ };
388
+ proxy: {
389
+ type: string;
390
+ };
391
+ enableMicroFrontendDebug: {
392
+ type: string;
393
+ };
394
+ };
395
+ };
396
+ deploy: {
397
+ type: string;
398
+ properties: {
399
+ domain: {
400
+ type: string[];
401
+ };
402
+ domainByEntries: {
403
+ type: string;
404
+ patternProperties: {
405
+ "^[a-zA-Z0-9_-]+$": {
406
+ type: string[];
407
+ };
408
+ };
409
+ };
410
+ };
411
+ };
412
+ plugins: {
413
+ type: string;
414
+ additionalProperties: boolean;
415
+ };
416
+ dev: {
417
+ type: string;
418
+ properties: {
419
+ assetPrefix: {
420
+ type: string[];
421
+ };
422
+ https: {
423
+ type: string;
424
+ };
425
+ };
426
+ additionalProperties: boolean;
427
+ };
428
+ tools: {
429
+ type: string;
430
+ additionalProperties: boolean;
431
+ properties: {
432
+ webpack: {
433
+ typeof: string[];
434
+ };
435
+ babel: {
436
+ typeof: string[];
437
+ };
438
+ postcss: {
439
+ typeof: string[];
440
+ };
441
+ lodash: {
442
+ typeof: string[];
443
+ };
444
+ devServer: {
445
+ type: string;
446
+ };
447
+ tsLoader: {
448
+ typeof: string[];
449
+ };
450
+ autoprefixer: {
451
+ typeof: string[];
452
+ };
453
+ terser: {
454
+ typeof: string[];
455
+ };
456
+ minifyCss: {
457
+ typeof: string[];
458
+ };
459
+ styledComponents: {
460
+ typeof: string[];
461
+ };
462
+ };
463
+ };
464
+ };
465
+ };
466
+ export declare const traverseSchema: (schema: ReturnType<typeof patchSchema>) => string[];