@modern-js/app-tools 2.39.2 → 2.40.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.
@@ -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
- };
@@ -1,169 +0,0 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
- import { ENTRY_NAME_PATTERN } from "@modern-js/utils";
3
- import { Schema } from "./Schema";
4
- var source = {
5
- entries: {
6
- type: "object",
7
- patternProperties: _define_property({}, ENTRY_NAME_PATTERN, {
8
- if: {
9
- type: "object"
10
- },
11
- then: {
12
- required: [
13
- "entry"
14
- ],
15
- properties: {
16
- entry: {
17
- type: [
18
- "string",
19
- "array"
20
- ]
21
- },
22
- disableMount: {
23
- type: "boolean"
24
- },
25
- customBootstrap: {
26
- type: "string"
27
- }
28
- },
29
- additionalProperties: false
30
- },
31
- else: {
32
- type: [
33
- "string",
34
- "array"
35
- ]
36
- }
37
- })
38
- },
39
- mainEntryName: {
40
- type: "string"
41
- },
42
- enableAsyncEntry: {
43
- type: "boolean"
44
- },
45
- disableDefaultEntries: {
46
- type: "boolean"
47
- },
48
- entriesDir: {
49
- type: "string"
50
- },
51
- disableEntryDirs: {
52
- type: "array"
53
- },
54
- configDir: {
55
- type: "string"
56
- },
57
- designSystem: {
58
- type: "object"
59
- }
60
- };
61
- var bff = {
62
- prefix: {
63
- type: "string"
64
- },
65
- httpMethodDecider: {
66
- type: "string",
67
- enum: [
68
- "functionName",
69
- "inputParams"
70
- ]
71
- },
72
- proxy: {
73
- type: "object",
74
- additionalProperties: {
75
- type: "string"
76
- }
77
- }
78
- };
79
- var output = {
80
- ssg: {
81
- typeof: [
82
- "boolean",
83
- "object",
84
- "function"
85
- ]
86
- },
87
- disableNodePolyfill: {
88
- type: "boolean"
89
- },
90
- enableInlineRouteManifests: {
91
- type: "boolean"
92
- }
93
- };
94
- var dev = {};
95
- var server = {
96
- routes: {
97
- type: "object"
98
- },
99
- publicRoutes: {
100
- type: "object"
101
- },
102
- ssr: {
103
- type: [
104
- "boolean",
105
- "object"
106
- ]
107
- },
108
- ssrByEntries: {
109
- type: "object"
110
- },
111
- baseUrl: {
112
- anyOf: [
113
- {
114
- type: "string"
115
- },
116
- {
117
- type: "array",
118
- items: {
119
- type: "string"
120
- }
121
- }
122
- ]
123
- },
124
- port: {
125
- type: "number"
126
- },
127
- logger: {
128
- type: [
129
- "boolean",
130
- "object"
131
- ]
132
- },
133
- metrics: {
134
- type: [
135
- "boolean",
136
- "object"
137
- ]
138
- },
139
- enableMicroFrontendDebug: {
140
- type: "boolean"
141
- },
142
- watchOptions: {
143
- type: "object"
144
- },
145
- compiler: {
146
- type: "string"
147
- },
148
- enableFrameworkExt: {
149
- type: "boolean"
150
- }
151
- };
152
- var tools = {
153
- esbuild: {
154
- typeof: [
155
- "object"
156
- ]
157
- }
158
- };
159
- var deploy = {};
160
- var builderPlugins = {
161
- type: "array"
162
- };
163
- var schema = new Schema();
164
- 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);
165
- import { default as default2 } from "./legacy";
166
- export {
167
- default2 as legacySchema,
168
- schema
169
- };