@modern-js/app-tools 2.39.2 → 2.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/analyze/getBundleEntry.js +2 -1
- package/dist/cjs/analyze/getHtmlTemplate.js +5 -5
- package/dist/cjs/analyze/index.js +0 -8
- package/dist/cjs/analyze/nestedRoutes.js +1 -2
- package/dist/cjs/analyze/utils.js +10 -0
- package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +1 -1
- package/dist/cjs/defineConfig.js +8 -6
- package/dist/cjs/initialize/index.js +0 -7
- package/dist/esm/analyze/getBundleEntry.js +2 -1
- package/dist/esm/analyze/getHtmlTemplate.js +5 -5
- package/dist/esm/analyze/index.js +0 -8
- package/dist/esm/analyze/nestedRoutes.js +1 -4
- package/dist/esm/analyze/utils.js +9 -0
- package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.js +1 -1
- package/dist/esm/config/initialize/inits.js +19 -19
- package/dist/esm/defineConfig.js +1 -1
- package/dist/esm/initialize/index.js +0 -7
- package/dist/esm-node/analyze/getBundleEntry.js +2 -1
- package/dist/esm-node/analyze/getHtmlTemplate.js +5 -5
- package/dist/esm-node/analyze/index.js +0 -8
- package/dist/esm-node/analyze/nestedRoutes.js +1 -2
- package/dist/esm-node/analyze/utils.js +9 -0
- package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.js +1 -1
- package/dist/esm-node/defineConfig.js +8 -6
- package/dist/esm-node/initialize/index.js +0 -7
- package/dist/types/analyze/utils.d.ts +2 -1
- package/package.json +26 -26
- package/dist/cjs/schema/Schema.js +0 -66
- package/dist/cjs/schema/index.js +0 -205
- package/dist/cjs/schema/legacy.js +0 -364
- package/dist/esm/schema/Schema.js +0 -82
- package/dist/esm/schema/index.js +0 -169
- package/dist/esm/schema/legacy.js +0 -333
- package/dist/esm-node/schema/Schema.js +0 -42
- package/dist/esm-node/schema/index.js +0 -170
- package/dist/esm-node/schema/legacy.js +0 -344
- package/dist/types/schema/Schema.d.ts +0 -14
- package/dist/types/schema/index.d.ts +0 -4
- package/dist/types/schema/legacy.d.ts +0 -3
@@ -1,66 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
-
};
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
-
for (let key of __getOwnPropNames(from))
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
-
}
|
16
|
-
return to;
|
17
|
-
};
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var Schema_exports = {};
|
20
|
-
__export(Schema_exports, {
|
21
|
-
Schema: () => Schema
|
22
|
-
});
|
23
|
-
module.exports = __toCommonJS(Schema_exports);
|
24
|
-
var import_define_property = require("@swc/helpers/_/_define_property");
|
25
|
-
var import_lodash = require("@modern-js/utils/lodash");
|
26
|
-
class Schema extends Map {
|
27
|
-
setSchema(key, object) {
|
28
|
-
Object.entries(object).forEach(([k, v]) => {
|
29
|
-
const target = `${key}.${k}`;
|
30
|
-
this.set(target, v);
|
31
|
-
});
|
32
|
-
return this;
|
33
|
-
}
|
34
|
-
set(key, value) {
|
35
|
-
if (this.has(key)) {
|
36
|
-
(0, import_lodash.merge)(this.schema[key], value);
|
37
|
-
} else {
|
38
|
-
this.schema[key] = value;
|
39
|
-
}
|
40
|
-
return this;
|
41
|
-
}
|
42
|
-
has(key) {
|
43
|
-
return key in this.schema;
|
44
|
-
}
|
45
|
-
get(key) {
|
46
|
-
return this.schema[key];
|
47
|
-
}
|
48
|
-
delete(key) {
|
49
|
-
return delete this.schema[key];
|
50
|
-
}
|
51
|
-
generate() {
|
52
|
-
return Object.entries(this.schema).map(([target, schema]) => ({
|
53
|
-
target,
|
54
|
-
schema
|
55
|
-
}));
|
56
|
-
}
|
57
|
-
constructor(baseSchema = {}) {
|
58
|
-
super();
|
59
|
-
(0, import_define_property._)(this, "schema", void 0);
|
60
|
-
this.schema = baseSchema;
|
61
|
-
}
|
62
|
-
}
|
63
|
-
// Annotate the CommonJS export names for ESM import in node:
|
64
|
-
0 && (module.exports = {
|
65
|
-
Schema
|
66
|
-
});
|
package/dist/cjs/schema/index.js
DELETED
@@ -1,205 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __create = Object.create;
|
3
|
-
var __defProp = Object.defineProperty;
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
-
var __export = (target, all) => {
|
9
|
-
for (var name in all)
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
-
};
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
-
for (let key of __getOwnPropNames(from))
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
-
}
|
18
|
-
return to;
|
19
|
-
};
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
-
mod
|
27
|
-
));
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var schema_exports = {};
|
30
|
-
__export(schema_exports, {
|
31
|
-
legacySchema: () => import_legacy.default,
|
32
|
-
schema: () => schema
|
33
|
-
});
|
34
|
-
module.exports = __toCommonJS(schema_exports);
|
35
|
-
var import_utils = require("@modern-js/utils");
|
36
|
-
var import_Schema = require("./Schema");
|
37
|
-
var import_legacy = __toESM(require("./legacy"));
|
38
|
-
const source = {
|
39
|
-
entries: {
|
40
|
-
type: "object",
|
41
|
-
patternProperties: {
|
42
|
-
[import_utils.ENTRY_NAME_PATTERN]: {
|
43
|
-
if: {
|
44
|
-
type: "object"
|
45
|
-
},
|
46
|
-
then: {
|
47
|
-
required: [
|
48
|
-
"entry"
|
49
|
-
],
|
50
|
-
properties: {
|
51
|
-
entry: {
|
52
|
-
type: [
|
53
|
-
"string",
|
54
|
-
"array"
|
55
|
-
]
|
56
|
-
},
|
57
|
-
disableMount: {
|
58
|
-
type: "boolean"
|
59
|
-
},
|
60
|
-
customBootstrap: {
|
61
|
-
type: "string"
|
62
|
-
}
|
63
|
-
},
|
64
|
-
additionalProperties: false
|
65
|
-
},
|
66
|
-
else: {
|
67
|
-
type: [
|
68
|
-
"string",
|
69
|
-
"array"
|
70
|
-
]
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
74
|
-
},
|
75
|
-
mainEntryName: {
|
76
|
-
type: "string"
|
77
|
-
},
|
78
|
-
enableAsyncEntry: {
|
79
|
-
type: "boolean"
|
80
|
-
},
|
81
|
-
disableDefaultEntries: {
|
82
|
-
type: "boolean"
|
83
|
-
},
|
84
|
-
entriesDir: {
|
85
|
-
type: "string"
|
86
|
-
},
|
87
|
-
disableEntryDirs: {
|
88
|
-
type: "array"
|
89
|
-
},
|
90
|
-
configDir: {
|
91
|
-
type: "string"
|
92
|
-
},
|
93
|
-
designSystem: {
|
94
|
-
type: "object"
|
95
|
-
}
|
96
|
-
};
|
97
|
-
const bff = {
|
98
|
-
prefix: {
|
99
|
-
type: "string"
|
100
|
-
},
|
101
|
-
httpMethodDecider: {
|
102
|
-
type: "string",
|
103
|
-
enum: [
|
104
|
-
"functionName",
|
105
|
-
"inputParams"
|
106
|
-
]
|
107
|
-
},
|
108
|
-
proxy: {
|
109
|
-
type: "object",
|
110
|
-
additionalProperties: {
|
111
|
-
type: "string"
|
112
|
-
}
|
113
|
-
}
|
114
|
-
};
|
115
|
-
const output = {
|
116
|
-
ssg: {
|
117
|
-
typeof: [
|
118
|
-
"boolean",
|
119
|
-
"object",
|
120
|
-
"function"
|
121
|
-
]
|
122
|
-
},
|
123
|
-
disableNodePolyfill: {
|
124
|
-
type: "boolean"
|
125
|
-
},
|
126
|
-
enableInlineRouteManifests: {
|
127
|
-
type: "boolean"
|
128
|
-
}
|
129
|
-
};
|
130
|
-
const dev = {};
|
131
|
-
const server = {
|
132
|
-
routes: {
|
133
|
-
type: "object"
|
134
|
-
},
|
135
|
-
publicRoutes: {
|
136
|
-
type: "object"
|
137
|
-
},
|
138
|
-
ssr: {
|
139
|
-
type: [
|
140
|
-
"boolean",
|
141
|
-
"object"
|
142
|
-
]
|
143
|
-
},
|
144
|
-
ssrByEntries: {
|
145
|
-
type: "object"
|
146
|
-
},
|
147
|
-
baseUrl: {
|
148
|
-
anyOf: [
|
149
|
-
{
|
150
|
-
type: "string"
|
151
|
-
},
|
152
|
-
{
|
153
|
-
type: "array",
|
154
|
-
items: {
|
155
|
-
type: "string"
|
156
|
-
}
|
157
|
-
}
|
158
|
-
]
|
159
|
-
},
|
160
|
-
port: {
|
161
|
-
type: "number"
|
162
|
-
},
|
163
|
-
logger: {
|
164
|
-
type: [
|
165
|
-
"boolean",
|
166
|
-
"object"
|
167
|
-
]
|
168
|
-
},
|
169
|
-
metrics: {
|
170
|
-
type: [
|
171
|
-
"boolean",
|
172
|
-
"object"
|
173
|
-
]
|
174
|
-
},
|
175
|
-
enableMicroFrontendDebug: {
|
176
|
-
type: "boolean"
|
177
|
-
},
|
178
|
-
watchOptions: {
|
179
|
-
type: "object"
|
180
|
-
},
|
181
|
-
compiler: {
|
182
|
-
type: "string"
|
183
|
-
},
|
184
|
-
enableFrameworkExt: {
|
185
|
-
type: "boolean"
|
186
|
-
}
|
187
|
-
};
|
188
|
-
const tools = {
|
189
|
-
esbuild: {
|
190
|
-
typeof: [
|
191
|
-
"object"
|
192
|
-
]
|
193
|
-
}
|
194
|
-
};
|
195
|
-
const deploy = {};
|
196
|
-
const builderPlugins = {
|
197
|
-
type: "array"
|
198
|
-
};
|
199
|
-
const schema = new import_Schema.Schema();
|
200
|
-
schema.setSchema("bff", bff).setSchema("dev", dev).setSchema("server", server).setSchema("source", source).setSchema("output", output).setSchema("tools", tools).setSchema("deploy", deploy).set("builderPlugin", builderPlugins);
|
201
|
-
// Annotate the CommonJS export names for ESM import in node:
|
202
|
-
0 && (module.exports = {
|
203
|
-
legacySchema,
|
204
|
-
schema
|
205
|
-
});
|
@@ -1,364 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
-
};
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
-
for (let key of __getOwnPropNames(from))
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
-
}
|
16
|
-
return to;
|
17
|
-
};
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var legacy_exports = {};
|
20
|
-
__export(legacy_exports, {
|
21
|
-
default: () => legacy_default
|
22
|
-
});
|
23
|
-
module.exports = __toCommonJS(legacy_exports);
|
24
|
-
var import_utils = require("@modern-js/utils");
|
25
|
-
var import_Schema = require("./Schema");
|
26
|
-
const source = {
|
27
|
-
entries: {
|
28
|
-
type: "object",
|
29
|
-
patternProperties: {
|
30
|
-
[import_utils.ENTRY_NAME_PATTERN]: {
|
31
|
-
if: {
|
32
|
-
type: "object"
|
33
|
-
},
|
34
|
-
then: {
|
35
|
-
required: [
|
36
|
-
"entry"
|
37
|
-
],
|
38
|
-
properties: {
|
39
|
-
entry: {
|
40
|
-
type: [
|
41
|
-
"string",
|
42
|
-
"array"
|
43
|
-
]
|
44
|
-
},
|
45
|
-
disableMount: {
|
46
|
-
type: "boolean"
|
47
|
-
}
|
48
|
-
},
|
49
|
-
additionalProperties: false
|
50
|
-
},
|
51
|
-
else: {
|
52
|
-
type: [
|
53
|
-
"string",
|
54
|
-
"array"
|
55
|
-
]
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
},
|
60
|
-
mainEntryName: {
|
61
|
-
type: "string"
|
62
|
-
},
|
63
|
-
preEntry: {
|
64
|
-
type: [
|
65
|
-
"string",
|
66
|
-
"array"
|
67
|
-
]
|
68
|
-
},
|
69
|
-
alias: {
|
70
|
-
typeof: [
|
71
|
-
"object",
|
72
|
-
"function"
|
73
|
-
]
|
74
|
-
},
|
75
|
-
enableAsyncEntry: {
|
76
|
-
type: "boolean"
|
77
|
-
},
|
78
|
-
disableDefaultEntries: {
|
79
|
-
type: "boolean"
|
80
|
-
},
|
81
|
-
envVars: {
|
82
|
-
type: "array"
|
83
|
-
},
|
84
|
-
globalVars: {
|
85
|
-
typeof: [
|
86
|
-
"object",
|
87
|
-
"function"
|
88
|
-
]
|
89
|
-
},
|
90
|
-
moduleScopes: {
|
91
|
-
instanceof: [
|
92
|
-
"Array",
|
93
|
-
"Function"
|
94
|
-
]
|
95
|
-
},
|
96
|
-
entriesDir: {
|
97
|
-
type: "string"
|
98
|
-
},
|
99
|
-
configDir: {
|
100
|
-
type: "string"
|
101
|
-
},
|
102
|
-
include: {
|
103
|
-
type: [
|
104
|
-
"array"
|
105
|
-
]
|
106
|
-
}
|
107
|
-
};
|
108
|
-
const output = {
|
109
|
-
assetPrefix: {
|
110
|
-
type: "string"
|
111
|
-
},
|
112
|
-
path: {
|
113
|
-
type: "string"
|
114
|
-
},
|
115
|
-
jsPath: {
|
116
|
-
type: "string"
|
117
|
-
},
|
118
|
-
cssPath: {
|
119
|
-
type: "string"
|
120
|
-
},
|
121
|
-
htmlPath: {
|
122
|
-
type: "string"
|
123
|
-
},
|
124
|
-
mediaPath: {
|
125
|
-
type: "string"
|
126
|
-
},
|
127
|
-
mountId: {
|
128
|
-
type: "string"
|
129
|
-
},
|
130
|
-
favicon: {
|
131
|
-
type: "string"
|
132
|
-
},
|
133
|
-
faviconByEntries: {
|
134
|
-
type: "object",
|
135
|
-
patternProperties: {
|
136
|
-
[import_utils.ENTRY_NAME_PATTERN]: {
|
137
|
-
type: "string"
|
138
|
-
}
|
139
|
-
}
|
140
|
-
},
|
141
|
-
title: {
|
142
|
-
type: "string"
|
143
|
-
},
|
144
|
-
titleByEntries: {
|
145
|
-
type: "object",
|
146
|
-
patternProperties: {
|
147
|
-
[import_utils.ENTRY_NAME_PATTERN]: {
|
148
|
-
type: "string"
|
149
|
-
}
|
150
|
-
}
|
151
|
-
},
|
152
|
-
meta: {
|
153
|
-
type: "object"
|
154
|
-
},
|
155
|
-
metaByEntries: {
|
156
|
-
type: "object",
|
157
|
-
patternProperties: {
|
158
|
-
[import_utils.ENTRY_NAME_PATTERN]: {
|
159
|
-
type: "object"
|
160
|
-
}
|
161
|
-
}
|
162
|
-
},
|
163
|
-
inject: {
|
164
|
-
enum: [
|
165
|
-
true,
|
166
|
-
"head",
|
167
|
-
"body",
|
168
|
-
false
|
169
|
-
]
|
170
|
-
},
|
171
|
-
injectByEntries: {
|
172
|
-
type: "object",
|
173
|
-
patternProperties: {
|
174
|
-
[import_utils.ENTRY_NAME_PATTERN]: {
|
175
|
-
enum: [
|
176
|
-
true,
|
177
|
-
"head",
|
178
|
-
"body",
|
179
|
-
false
|
180
|
-
]
|
181
|
-
}
|
182
|
-
}
|
183
|
-
},
|
184
|
-
copy: {
|
185
|
-
type: "array"
|
186
|
-
},
|
187
|
-
scriptExt: {
|
188
|
-
type: "object"
|
189
|
-
},
|
190
|
-
disableTsChecker: {
|
191
|
-
type: "boolean"
|
192
|
-
},
|
193
|
-
disableHtmlFolder: {
|
194
|
-
type: "boolean"
|
195
|
-
},
|
196
|
-
disableCssModuleExtension: {
|
197
|
-
type: "boolean"
|
198
|
-
},
|
199
|
-
disableCssExtract: {
|
200
|
-
type: "boolean"
|
201
|
-
},
|
202
|
-
enableCssModuleTSDeclaration: {
|
203
|
-
type: "boolean"
|
204
|
-
},
|
205
|
-
disableMinimize: {
|
206
|
-
type: "boolean"
|
207
|
-
},
|
208
|
-
enableInlineStyles: {
|
209
|
-
type: "boolean"
|
210
|
-
},
|
211
|
-
enableInlineScripts: {
|
212
|
-
type: "boolean"
|
213
|
-
},
|
214
|
-
disableSourceMap: {
|
215
|
-
type: "boolean"
|
216
|
-
},
|
217
|
-
disableInlineRuntimeChunk: {
|
218
|
-
type: "boolean"
|
219
|
-
},
|
220
|
-
disableAssetsCache: {
|
221
|
-
type: "boolean"
|
222
|
-
},
|
223
|
-
enableLatestDecorators: {
|
224
|
-
type: "boolean"
|
225
|
-
},
|
226
|
-
enableTsLoader: {
|
227
|
-
type: "boolean"
|
228
|
-
},
|
229
|
-
dataUriLimit: {
|
230
|
-
type: "number"
|
231
|
-
},
|
232
|
-
templateParameters: {
|
233
|
-
type: "object"
|
234
|
-
},
|
235
|
-
templateParametersByEntries: {
|
236
|
-
type: "object",
|
237
|
-
patternProperties: {
|
238
|
-
[import_utils.ENTRY_NAME_PATTERN]: {
|
239
|
-
type: "object"
|
240
|
-
}
|
241
|
-
}
|
242
|
-
},
|
243
|
-
polyfill: {
|
244
|
-
type: "string",
|
245
|
-
enum: [
|
246
|
-
"usage",
|
247
|
-
"entry",
|
248
|
-
"off",
|
249
|
-
"ua"
|
250
|
-
]
|
251
|
-
},
|
252
|
-
cssModuleLocalIdentName: {
|
253
|
-
type: "string"
|
254
|
-
},
|
255
|
-
federation: {
|
256
|
-
type: "object"
|
257
|
-
},
|
258
|
-
disableNodePolyfill: {
|
259
|
-
type: "boolean"
|
260
|
-
}
|
261
|
-
};
|
262
|
-
const server = {
|
263
|
-
routes: {
|
264
|
-
type: "object"
|
265
|
-
},
|
266
|
-
publicRoutes: {
|
267
|
-
type: "object"
|
268
|
-
},
|
269
|
-
ssr: {
|
270
|
-
type: [
|
271
|
-
"boolean",
|
272
|
-
"object"
|
273
|
-
]
|
274
|
-
},
|
275
|
-
ssrByEntries: {
|
276
|
-
type: "object"
|
277
|
-
},
|
278
|
-
baseUrl: {
|
279
|
-
anyOf: [
|
280
|
-
{
|
281
|
-
type: "string"
|
282
|
-
},
|
283
|
-
{
|
284
|
-
type: "array",
|
285
|
-
items: {
|
286
|
-
type: "string"
|
287
|
-
}
|
288
|
-
}
|
289
|
-
]
|
290
|
-
},
|
291
|
-
port: {
|
292
|
-
type: "number"
|
293
|
-
},
|
294
|
-
logger: {
|
295
|
-
type: [
|
296
|
-
"boolean",
|
297
|
-
"object"
|
298
|
-
]
|
299
|
-
},
|
300
|
-
metrics: {
|
301
|
-
type: [
|
302
|
-
"boolean",
|
303
|
-
"object"
|
304
|
-
]
|
305
|
-
},
|
306
|
-
enableMicroFrontendDebug: {
|
307
|
-
type: "boolean"
|
308
|
-
},
|
309
|
-
watchOptions: {
|
310
|
-
type: "object"
|
311
|
-
},
|
312
|
-
compiler: {
|
313
|
-
type: "string"
|
314
|
-
},
|
315
|
-
enableFrameworkExt: {
|
316
|
-
type: "boolean"
|
317
|
-
}
|
318
|
-
};
|
319
|
-
const dev = {
|
320
|
-
proxy: {
|
321
|
-
type: [
|
322
|
-
"boolean",
|
323
|
-
"object"
|
324
|
-
]
|
325
|
-
}
|
326
|
-
};
|
327
|
-
const deploy = {
|
328
|
-
microFrontend: {
|
329
|
-
type: [
|
330
|
-
"boolean",
|
331
|
-
"object"
|
332
|
-
]
|
333
|
-
}
|
334
|
-
};
|
335
|
-
const tools = {
|
336
|
-
tailwindcss: {
|
337
|
-
type: "object"
|
338
|
-
},
|
339
|
-
jest: {
|
340
|
-
typeof: [
|
341
|
-
"object",
|
342
|
-
"function"
|
343
|
-
]
|
344
|
-
},
|
345
|
-
esbuild: {
|
346
|
-
typeof: [
|
347
|
-
"object"
|
348
|
-
]
|
349
|
-
}
|
350
|
-
};
|
351
|
-
const bff = {
|
352
|
-
prefix: {
|
353
|
-
type: "string"
|
354
|
-
},
|
355
|
-
proxy: {
|
356
|
-
type: "object",
|
357
|
-
additionalProperties: {
|
358
|
-
type: "string"
|
359
|
-
}
|
360
|
-
}
|
361
|
-
};
|
362
|
-
const schema = new import_Schema.Schema();
|
363
|
-
schema.setSchema("bff", bff).setSchema("dev", dev).setSchema("server", server).setSchema("source", source).setSchema("output", output).setSchema("tools", tools).setSchema("deploy", deploy);
|
364
|
-
var legacy_default = schema;
|
@@ -1,82 +0,0 @@
|
|
1
|
-
import { _ as _assert_this_initialized } from "@swc/helpers/_/_assert_this_initialized";
|
2
|
-
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
|
3
|
-
import { _ as _create_class } from "@swc/helpers/_/_create_class";
|
4
|
-
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
5
|
-
import { _ as _inherits } from "@swc/helpers/_/_inherits";
|
6
|
-
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
7
|
-
import { _ as _wrap_native_super } from "@swc/helpers/_/_wrap_native_super";
|
8
|
-
import { _ as _create_super } from "@swc/helpers/_/_create_super";
|
9
|
-
import { merge } from "@modern-js/utils/lodash";
|
10
|
-
var Schema = /* @__PURE__ */ function(Map1) {
|
11
|
-
"use strict";
|
12
|
-
_inherits(Schema2, Map1);
|
13
|
-
var _super = _create_super(Schema2);
|
14
|
-
function Schema2() {
|
15
|
-
var baseSchema = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
16
|
-
_class_call_check(this, Schema2);
|
17
|
-
var _this;
|
18
|
-
_this = _super.call(this);
|
19
|
-
_define_property(_assert_this_initialized(_this), "schema", void 0);
|
20
|
-
_this.schema = baseSchema;
|
21
|
-
return _this;
|
22
|
-
}
|
23
|
-
_create_class(Schema2, [
|
24
|
-
{
|
25
|
-
key: "setSchema",
|
26
|
-
value: function setSchema(key, object) {
|
27
|
-
var _this = this;
|
28
|
-
Object.entries(object).forEach(function(param) {
|
29
|
-
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
30
|
-
var target = "".concat(key, ".").concat(k);
|
31
|
-
_this.set(target, v);
|
32
|
-
});
|
33
|
-
return this;
|
34
|
-
}
|
35
|
-
},
|
36
|
-
{
|
37
|
-
key: "set",
|
38
|
-
value: function set(key, value) {
|
39
|
-
if (this.has(key)) {
|
40
|
-
merge(this.schema[key], value);
|
41
|
-
} else {
|
42
|
-
this.schema[key] = value;
|
43
|
-
}
|
44
|
-
return this;
|
45
|
-
}
|
46
|
-
},
|
47
|
-
{
|
48
|
-
key: "has",
|
49
|
-
value: function has(key) {
|
50
|
-
return key in this.schema;
|
51
|
-
}
|
52
|
-
},
|
53
|
-
{
|
54
|
-
key: "get",
|
55
|
-
value: function get(key) {
|
56
|
-
return this.schema[key];
|
57
|
-
}
|
58
|
-
},
|
59
|
-
{
|
60
|
-
key: "delete",
|
61
|
-
value: function _delete(key) {
|
62
|
-
return delete this.schema[key];
|
63
|
-
}
|
64
|
-
},
|
65
|
-
{
|
66
|
-
key: "generate",
|
67
|
-
value: function generate() {
|
68
|
-
return Object.entries(this.schema).map(function(param) {
|
69
|
-
var _param = _sliced_to_array(param, 2), target = _param[0], schema = _param[1];
|
70
|
-
return {
|
71
|
-
target,
|
72
|
-
schema
|
73
|
-
};
|
74
|
-
});
|
75
|
-
}
|
76
|
-
}
|
77
|
-
]);
|
78
|
-
return Schema2;
|
79
|
-
}(_wrap_native_super(Map));
|
80
|
-
export {
|
81
|
-
Schema
|
82
|
-
};
|