@weapp-core/schematics 4.0.1-alpha.0 → 6.0.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/schemas/app.json CHANGED
@@ -1,454 +1,454 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "additionalProperties": {},
3
4
  "description": "全局配置, 小程序根目录下的 app.json 文件用来对微信小程序进行全局配置。",
4
- "type": "object",
5
5
  "properties": {
6
- "entryPagePath": {
7
- "description": "指定小程序的默认启动路径(首页),常见情景是从微信聊天列表页下拉启动、小程序列表启动等。如果不填,将默认为 pages 列表的第一项。不支持带页面路径参数。",
6
+ "$schema": {
8
7
  "type": "string"
9
8
  },
10
- "pages": {
11
- "description": "用于指定小程序由哪些页面组成,每一项都对应一个页面的 路径(含文件名) 信息。文件名不需要写文件后缀,框架会自动去寻找对应位置的 .json, .js, .wxml, .wxss 四个文件进行处理。",
12
- "type": "array",
9
+ "appBar": {
10
+ "additionalProperties": {},
11
+ "properties": {},
12
+ "type": "object"
13
+ },
14
+ "componentFramework": {
15
+ "type": "string"
16
+ },
17
+ "convertRpxToVw": {
18
+ "type": "boolean"
19
+ },
20
+ "darkmode": {
21
+ "type": "boolean"
22
+ },
23
+ "debug": {
24
+ "type": "boolean"
25
+ },
26
+ "debugOptions": {
27
+ "additionalProperties": {},
28
+ "properties": {},
29
+ "type": "object"
30
+ },
31
+ "embeddedAppIdList": {
13
32
  "items": {
14
33
  "type": "string"
15
- }
16
- },
17
- "window": {
18
- "type": "object",
19
- "properties": {
20
- "navigationBarBackgroundColor": {
21
- "default": "#000000",
22
- "type": "string"
23
- },
24
- "navigationBarTextStyle": {
25
- "default": "white",
26
- "type": "string"
27
- },
28
- "navigationBarTitleText": {
29
- "type": "string"
30
- },
31
- "navigationStyle": {
32
- "default": "default",
33
- "type": "string",
34
- "enum": [
35
- "default",
36
- "custom"
37
- ]
38
- },
39
- "homeButton": {
40
- "default": false,
41
- "type": "boolean"
42
- },
43
- "backgroundColor": {
44
- "default": "#ffffff",
45
- "type": "string"
46
- },
47
- "backgroundTextStyle": {
48
- "default": "dark",
49
- "type": "string",
50
- "enum": [
51
- "dark",
52
- "light"
53
- ]
54
- },
55
- "backgroundColorTop": {
56
- "default": "#ffffff",
57
- "type": "string"
58
- },
59
- "backgroundColorBottom": {
60
- "default": "#ffffff",
61
- "type": "string"
62
- },
63
- "enablePullDownRefresh": {
64
- "default": false,
65
- "type": "boolean"
66
- },
67
- "onReachBottomDistance": {
68
- "default": 50,
69
- "type": "number"
70
- },
71
- "pageOrientation": {
72
- "default": "portrait",
73
- "type": "string",
74
- "enum": [
75
- "portrait",
76
- "auto",
77
- "landscape"
78
- ]
79
- },
80
- "restartStrategy": {
81
- "default": "homePage",
82
- "type": "string",
83
- "enum": [
84
- "homePage",
85
- "homePageAndLatestPage"
86
- ]
87
- },
88
- "initialRenderingCache": {
89
- "type": "string",
90
- "enum": [
91
- "static",
92
- "dynamic"
93
- ]
94
- },
95
- "visualEffectInBackground": {
96
- "default": "none",
97
- "type": "string",
98
- "enum": [
99
- "none",
100
- "hidden"
101
- ]
102
- },
103
- "handleWebviewPreload": {
104
- "default": "static",
105
- "type": "string",
106
- "enum": [
107
- "static",
108
- "manual",
109
- "auto"
110
- ]
111
- }
112
34
  },
113
- "additionalProperties": {}
35
+ "type": "array"
114
36
  },
115
- "tabBar": {
116
- "type": "object",
117
- "properties": {
118
- "color": {
119
- "type": "string"
120
- },
121
- "selectedColor": {
122
- "type": "string"
123
- },
124
- "backgroundColor": {
125
- "type": "string"
126
- },
127
- "borderStyle": {
128
- "default": "black",
129
- "type": "string",
130
- "enum": [
131
- "black",
132
- "white"
133
- ]
134
- },
135
- "list": {
136
- "minItems": 2,
137
- "maxItems": 5,
138
- "type": "array",
139
- "items": {
140
- "type": "object",
141
- "properties": {
142
- "pagePath": {
143
- "type": "string"
144
- },
145
- "text": {
146
- "type": "string"
147
- },
148
- "iconPath": {
149
- "type": "string"
150
- },
151
- "selectedIconPath": {
152
- "type": "string"
153
- }
154
- },
155
- "required": [
156
- "pagePath",
157
- "text"
158
- ],
159
- "additionalProperties": {}
160
- }
161
- },
162
- "position": {
163
- "default": "bottom",
164
- "type": "string",
165
- "enum": [
166
- "bottom",
167
- "top"
168
- ]
37
+ "enablePassiveEvent": {
38
+ "anyOf": [
39
+ {
40
+ "additionalProperties": {},
41
+ "properties": {},
42
+ "type": "object"
169
43
  },
170
- "custom": {
44
+ {
171
45
  "type": "boolean"
172
46
  }
173
- },
174
- "required": [
175
- "color",
176
- "selectedColor",
177
- "backgroundColor",
178
- "list"
179
- ],
180
- "additionalProperties": {}
47
+ ]
48
+ },
49
+ "entranceDeclare": {
50
+ "additionalProperties": {},
51
+ "properties": {},
52
+ "type": "object"
53
+ },
54
+ "entryPagePath": {
55
+ "description": "指定小程序的默认启动路径(首页),常见情景是从微信聊天列表页下拉启动、小程序列表启动等。如果不填,将默认为 pages 列表的第一项。不支持带页面路径参数。",
56
+ "type": "string"
57
+ },
58
+ "functionalPages": {
59
+ "type": "boolean"
60
+ },
61
+ "halfPage": {
62
+ "additionalProperties": {},
63
+ "properties": {},
64
+ "type": "object"
65
+ },
66
+ "lazyCodeLoading": {
67
+ "type": "string"
68
+ },
69
+ "miniApp": {
70
+ "additionalProperties": {},
71
+ "properties": {},
72
+ "type": "object"
181
73
  },
182
74
  "networkTimeout": {
183
- "type": "object",
75
+ "additionalProperties": {},
184
76
  "properties": {
185
- "request": {
77
+ "connectSocket": {
186
78
  "default": 60000,
187
79
  "type": "number"
188
80
  },
189
- "connectSocket": {
81
+ "downloadFile": {
190
82
  "default": 60000,
191
83
  "type": "number"
192
84
  },
193
- "uploadFile": {
85
+ "request": {
194
86
  "default": 60000,
195
87
  "type": "number"
196
88
  },
197
- "downloadFile": {
89
+ "uploadFile": {
198
90
  "default": 60000,
199
91
  "type": "number"
200
92
  }
201
93
  },
202
- "additionalProperties": {}
94
+ "type": "object"
203
95
  },
204
- "debug": {
205
- "type": "boolean"
96
+ "pages": {
97
+ "description": "用于指定小程序由哪些页面组成,每一项都对应一个页面的 路径(含文件名) 信息。文件名不需要写文件后缀,框架会自动去寻找对应位置的 .json, .js, .wxml, .wxss 四个文件进行处理。",
98
+ "items": {
99
+ "type": "string"
100
+ },
101
+ "type": "array"
206
102
  },
207
- "functionalPages": {
208
- "type": "boolean"
103
+ "permission": {
104
+ "additionalProperties": {},
105
+ "properties": {},
106
+ "type": "object"
209
107
  },
210
- "subpackages": {
211
- "type": "array",
212
- "items": {
213
- "type": "object",
214
- "properties": {
215
- "root": {
216
- "type": "string"
217
- },
218
- "name": {
219
- "type": "string"
220
- },
221
- "pages": {
222
- "type": "array",
223
- "items": {
224
- "type": "string"
108
+ "plugins": {
109
+ "additionalProperties": {},
110
+ "properties": {},
111
+ "type": "object"
112
+ },
113
+ "preloadRule": {
114
+ "additionalProperties": {},
115
+ "properties": {},
116
+ "type": "object"
117
+ },
118
+ "renderer": {
119
+ "default": "webview",
120
+ "enum": [
121
+ "webview",
122
+ "skyline"
123
+ ],
124
+ "type": "string"
125
+ },
126
+ "rendererOptions": {
127
+ "additionalProperties": {},
128
+ "properties": {
129
+ "skyline": {
130
+ "additionalProperties": {},
131
+ "properties": {
132
+ "defaultContentBox": {
133
+ "default": false,
134
+ "type": "boolean"
135
+ },
136
+ "defaultDisplayBlock": {
137
+ "default": false,
138
+ "type": "boolean"
139
+ },
140
+ "disableABTest": {
141
+ "default": false,
142
+ "type": "boolean"
225
143
  }
226
144
  },
227
- "independent": {
228
- "type": "boolean"
229
- },
230
- "entry": {
231
- "type": "string"
232
- }
233
- },
234
- "additionalProperties": {}
235
- }
145
+ "type": "object"
146
+ }
147
+ },
148
+ "type": "object"
236
149
  },
237
- "subPackages": {
238
- "type": "array",
239
- "items": {
240
- "type": "object",
241
- "properties": {
242
- "root": {
243
- "type": "string"
244
- },
245
- "name": {
246
- "type": "string"
247
- },
248
- "pages": {
249
- "type": "array",
250
- "items": {
251
- "type": "string"
252
- }
253
- },
254
- "independent": {
255
- "type": "boolean"
256
- },
257
- "entry": {
258
- "type": "string"
259
- }
260
- },
261
- "additionalProperties": {}
262
- }
263
- },
264
- "workers": {
265
- "anyOf": [
266
- {
267
- "type": "string"
268
- },
269
- {
270
- "type": "object",
271
- "properties": {
272
- "path": {
273
- "type": "string"
274
- },
275
- "isSubpackage": {
276
- "type": "boolean"
277
- }
278
- },
279
- "additionalProperties": {}
280
- }
281
- ]
282
- },
283
- "requiredBackgroundModes": {
284
- "type": "array",
150
+ "requiredBackgroundModes": {
285
151
  "items": {
286
152
  "type": "string"
287
- }
153
+ },
154
+ "type": "array"
288
155
  },
289
156
  "requiredPrivateInfos": {
290
- "type": "array",
291
157
  "items": {
292
158
  "type": "string"
293
- }
294
- },
295
- "plugins": {
296
- "type": "object",
297
- "properties": {},
298
- "additionalProperties": {}
299
- },
300
- "preloadRule": {
301
- "type": "object",
302
- "properties": {},
303
- "additionalProperties": {}
159
+ },
160
+ "type": "array"
304
161
  },
305
162
  "resizable": {
306
163
  "type": "boolean"
307
164
  },
308
- "permission": {
309
- "type": "object",
165
+ "resolveAlias": {
166
+ "additionalProperties": {},
310
167
  "properties": {},
311
- "additionalProperties": {}
168
+ "type": "object"
312
169
  },
313
- "sitemapLocation": {
170
+ "serviceProviderTicket": {
314
171
  "type": "string"
315
172
  },
316
- "useExtendedLib": {
317
- "type": "object",
318
- "properties": {},
319
- "additionalProperties": {}
320
- },
321
- "entranceDeclare": {
322
- "type": "object",
173
+ "singlePage": {
174
+ "additionalProperties": {},
323
175
  "properties": {},
324
- "additionalProperties": {}
325
- },
326
- "darkmode": {
327
- "type": "boolean"
176
+ "type": "object"
328
177
  },
329
- "themeLocation": {
330
- "type": "string"
331
- },
332
- "lazyCodeLoading": {
178
+ "sitemapLocation": {
333
179
  "type": "string"
334
180
  },
335
- "supportedMaterials": {
336
- "type": "object",
181
+ "static": {
182
+ "additionalProperties": {},
337
183
  "properties": {},
338
- "additionalProperties": {}
184
+ "type": "object"
339
185
  },
340
- "serviceProviderTicket": {
186
+ "style": {
341
187
  "type": "string"
342
188
  },
343
- "embeddedAppIdList": {
344
- "type": "array",
189
+ "subPackages": {
345
190
  "items": {
346
- "type": "string"
347
- }
348
- },
349
- "halfPage": {
350
- "type": "object",
351
- "properties": {},
352
- "additionalProperties": {}
353
- },
354
- "debugOptions": {
355
- "type": "object",
356
- "properties": {},
357
- "additionalProperties": {}
191
+ "additionalProperties": {},
192
+ "properties": {
193
+ "entry": {
194
+ "type": "string"
195
+ },
196
+ "independent": {
197
+ "type": "boolean"
198
+ },
199
+ "name": {
200
+ "type": "string"
201
+ },
202
+ "pages": {
203
+ "items": {
204
+ "type": "string"
205
+ },
206
+ "type": "array"
207
+ },
208
+ "root": {
209
+ "type": "string"
210
+ }
211
+ },
212
+ "type": "object"
213
+ },
214
+ "type": "array"
358
215
  },
359
- "resolveAlias": {
360
- "type": "object",
361
- "properties": {},
362
- "additionalProperties": {}
216
+ "subpackages": {
217
+ "items": {
218
+ "additionalProperties": {},
219
+ "properties": {
220
+ "entry": {
221
+ "type": "string"
222
+ },
223
+ "independent": {
224
+ "type": "boolean"
225
+ },
226
+ "name": {
227
+ "type": "string"
228
+ },
229
+ "pages": {
230
+ "items": {
231
+ "type": "string"
232
+ },
233
+ "type": "array"
234
+ },
235
+ "root": {
236
+ "type": "string"
237
+ }
238
+ },
239
+ "type": "object"
240
+ },
241
+ "type": "array"
363
242
  },
364
- "miniApp": {
365
- "type": "object",
243
+ "supportedMaterials": {
244
+ "additionalProperties": {},
366
245
  "properties": {},
367
- "additionalProperties": {}
246
+ "type": "object"
368
247
  },
369
- "static": {
370
- "type": "object",
371
- "properties": {},
372
- "additionalProperties": {}
248
+ "tabBar": {
249
+ "additionalProperties": {},
250
+ "properties": {
251
+ "backgroundColor": {
252
+ "type": "string"
253
+ },
254
+ "borderStyle": {
255
+ "default": "black",
256
+ "enum": [
257
+ "black",
258
+ "white"
259
+ ],
260
+ "type": "string"
261
+ },
262
+ "color": {
263
+ "type": "string"
264
+ },
265
+ "custom": {
266
+ "type": "boolean"
267
+ },
268
+ "list": {
269
+ "items": {
270
+ "additionalProperties": {},
271
+ "properties": {
272
+ "iconPath": {
273
+ "type": "string"
274
+ },
275
+ "pagePath": {
276
+ "type": "string"
277
+ },
278
+ "selectedIconPath": {
279
+ "type": "string"
280
+ },
281
+ "text": {
282
+ "type": "string"
283
+ }
284
+ },
285
+ "required": [
286
+ "pagePath",
287
+ "text"
288
+ ],
289
+ "type": "object"
290
+ },
291
+ "maxItems": 5,
292
+ "minItems": 2,
293
+ "type": "array"
294
+ },
295
+ "position": {
296
+ "default": "bottom",
297
+ "enum": [
298
+ "bottom",
299
+ "top"
300
+ ],
301
+ "type": "string"
302
+ },
303
+ "selectedColor": {
304
+ "type": "string"
305
+ }
306
+ },
307
+ "required": [
308
+ "color",
309
+ "selectedColor",
310
+ "backgroundColor",
311
+ "list"
312
+ ],
313
+ "type": "object"
373
314
  },
374
- "convertRpxToVw": {
375
- "type": "boolean"
315
+ "themeLocation": {
316
+ "type": "string"
376
317
  },
377
- "appBar": {
378
- "type": "object",
318
+ "useExtendedLib": {
319
+ "additionalProperties": {},
379
320
  "properties": {},
380
- "additionalProperties": {}
321
+ "type": "object"
381
322
  },
382
- "style": {
383
- "type": "string"
323
+ "usingComponents": {
324
+ "additionalProperties": {
325
+ "type": "string"
326
+ },
327
+ "propertyNames": {
328
+ "type": "string"
329
+ },
330
+ "type": "object"
384
331
  },
385
- "singlePage": {
386
- "type": "object",
387
- "properties": {},
388
- "additionalProperties": {}
332
+ "window": {
333
+ "additionalProperties": {},
334
+ "properties": {
335
+ "backgroundColor": {
336
+ "default": "#ffffff",
337
+ "type": "string"
338
+ },
339
+ "backgroundColorBottom": {
340
+ "default": "#ffffff",
341
+ "type": "string"
342
+ },
343
+ "backgroundColorTop": {
344
+ "default": "#ffffff",
345
+ "type": "string"
346
+ },
347
+ "backgroundTextStyle": {
348
+ "default": "dark",
349
+ "enum": [
350
+ "dark",
351
+ "light"
352
+ ],
353
+ "type": "string"
354
+ },
355
+ "enablePullDownRefresh": {
356
+ "default": false,
357
+ "type": "boolean"
358
+ },
359
+ "handleWebviewPreload": {
360
+ "default": "static",
361
+ "enum": [
362
+ "static",
363
+ "manual",
364
+ "auto"
365
+ ],
366
+ "type": "string"
367
+ },
368
+ "homeButton": {
369
+ "default": false,
370
+ "type": "boolean"
371
+ },
372
+ "initialRenderingCache": {
373
+ "enum": [
374
+ "static",
375
+ "dynamic"
376
+ ],
377
+ "type": "string"
378
+ },
379
+ "navigationBarBackgroundColor": {
380
+ "default": "#000000",
381
+ "type": "string"
382
+ },
383
+ "navigationBarTextStyle": {
384
+ "default": "white",
385
+ "type": "string"
386
+ },
387
+ "navigationBarTitleText": {
388
+ "type": "string"
389
+ },
390
+ "navigationStyle": {
391
+ "default": "default",
392
+ "enum": [
393
+ "default",
394
+ "custom"
395
+ ],
396
+ "type": "string"
397
+ },
398
+ "onReachBottomDistance": {
399
+ "default": 50,
400
+ "type": "number"
401
+ },
402
+ "pageOrientation": {
403
+ "default": "portrait",
404
+ "enum": [
405
+ "portrait",
406
+ "auto",
407
+ "landscape"
408
+ ],
409
+ "type": "string"
410
+ },
411
+ "restartStrategy": {
412
+ "default": "homePage",
413
+ "enum": [
414
+ "homePage",
415
+ "homePageAndLatestPage"
416
+ ],
417
+ "type": "string"
418
+ },
419
+ "visualEffectInBackground": {
420
+ "default": "none",
421
+ "enum": [
422
+ "none",
423
+ "hidden"
424
+ ],
425
+ "type": "string"
426
+ }
427
+ },
428
+ "type": "object"
389
429
  },
390
- "enablePassiveEvent": {
430
+ "workers": {
391
431
  "anyOf": [
392
432
  {
393
- "type": "object",
394
- "properties": {},
395
- "additionalProperties": {}
433
+ "type": "string"
396
434
  },
397
435
  {
398
- "type": "boolean"
399
- }
400
- ]
401
- },
402
- "renderer": {
403
- "default": "webview",
404
- "type": "string",
405
- "enum": [
406
- "webview",
407
- "skyline"
408
- ]
409
- },
410
- "rendererOptions": {
411
- "type": "object",
412
- "properties": {
413
- "skyline": {
414
- "type": "object",
436
+ "additionalProperties": {},
415
437
  "properties": {
416
- "defaultDisplayBlock": {
417
- "default": false,
418
- "type": "boolean"
419
- },
420
- "defaultContentBox": {
421
- "default": false,
438
+ "isSubpackage": {
422
439
  "type": "boolean"
423
440
  },
424
- "disableABTest": {
425
- "default": false,
426
- "type": "boolean"
441
+ "path": {
442
+ "type": "string"
427
443
  }
428
444
  },
429
- "additionalProperties": {}
445
+ "type": "object"
430
446
  }
431
- },
432
- "additionalProperties": {}
433
- },
434
- "usingComponents": {
435
- "type": "object",
436
- "propertyNames": {
437
- "type": "string"
438
- },
439
- "additionalProperties": {
440
- "type": "string"
441
- }
442
- },
443
- "componentFramework": {
444
- "type": "string"
445
- },
446
- "$schema": {
447
- "type": "string"
447
+ ]
448
448
  }
449
449
  },
450
450
  "required": [
451
451
  "pages"
452
452
  ],
453
- "additionalProperties": {}
453
+ "type": "object"
454
454
  }