@weapp-core/schematics 6.0.1 → 6.0.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/README.md +45 -0
- package/dist/index.cjs +4094 -6903
- package/dist/index.d.cts +360 -337
- package/dist/index.d.ts +360 -337
- package/dist/index.js +4073 -6875
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
//#region src/generator.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @description 生成模板的目标类型
|
|
4
|
+
*/
|
|
1
5
|
type GenerateType = 'app' | 'page' | 'component';
|
|
6
|
+
/**
|
|
7
|
+
* @description JSON 输出扩展名
|
|
8
|
+
*/
|
|
2
9
|
type JsonExt = 'json' | 'js' | 'ts' | (string & {});
|
|
3
|
-
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/type.auto.d.ts
|
|
4
12
|
/**
|
|
5
13
|
* This file was automatically generated by json-schema-to-typescript.
|
|
6
14
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
@@ -10,247 +18,229 @@ type JsonExt = 'json' | 'js' | 'ts' | (string & {});
|
|
|
10
18
|
* 全局配置, 小程序根目录下的 app.json 文件用来对微信小程序进行全局配置。
|
|
11
19
|
*/
|
|
12
20
|
interface App$1 {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
21
|
+
appBar?: {
|
|
22
|
+
[k: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
componentFramework?: string;
|
|
25
|
+
convertRpxToVw?: boolean;
|
|
26
|
+
darkmode?: boolean;
|
|
27
|
+
debug?: boolean;
|
|
28
|
+
debugOptions?: {
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
embeddedAppIdList?: string[];
|
|
32
|
+
enablePassiveEvent?: {
|
|
33
|
+
[k: string]: unknown;
|
|
34
|
+
} | boolean;
|
|
35
|
+
entranceDeclare?: {
|
|
36
|
+
[k: string]: unknown;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 指定小程序的默认启动路径(首页),常见情景是从微信聊天列表页下拉启动、小程序列表启动等。如果不填,将默认为 pages 列表的第一项。不支持带页面路径参数。
|
|
40
|
+
*/
|
|
41
|
+
entryPagePath?: string;
|
|
42
|
+
functionalPages?: boolean;
|
|
43
|
+
halfPage?: {
|
|
44
|
+
[k: string]: unknown;
|
|
45
|
+
};
|
|
46
|
+
lazyCodeLoading?: string;
|
|
47
|
+
miniApp?: {
|
|
48
|
+
[k: string]: unknown;
|
|
49
|
+
};
|
|
50
|
+
networkTimeout?: {
|
|
51
|
+
connectSocket?: number;
|
|
52
|
+
downloadFile?: number;
|
|
53
|
+
request?: number;
|
|
54
|
+
uploadFile?: number;
|
|
55
|
+
[k: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* 用于指定小程序由哪些页面组成,每一项都对应一个页面的 路径(含文件名) 信息。文件名不需要写文件后缀,框架会自动去寻找对应位置的 .json, .js, .wxml, .wxss 四个文件进行处理。
|
|
59
|
+
*/
|
|
60
|
+
pages: string[];
|
|
61
|
+
permission?: {
|
|
62
|
+
[k: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
plugins?: {
|
|
65
|
+
[k: string]: unknown;
|
|
66
|
+
};
|
|
67
|
+
preloadRule?: {
|
|
68
|
+
[k: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
renderer?: "webview" | "skyline";
|
|
71
|
+
rendererOptions?: {
|
|
72
|
+
skyline?: {
|
|
73
|
+
defaultContentBox?: boolean;
|
|
74
|
+
defaultDisplayBlock?: boolean;
|
|
75
|
+
disableABTest?: boolean;
|
|
76
|
+
[k: string]: unknown;
|
|
48
77
|
};
|
|
78
|
+
[k: string]: unknown;
|
|
79
|
+
};
|
|
80
|
+
requiredBackgroundModes?: string[];
|
|
81
|
+
requiredPrivateInfos?: string[];
|
|
82
|
+
resizable?: boolean;
|
|
83
|
+
resolveAlias?: {
|
|
84
|
+
[k: string]: unknown;
|
|
85
|
+
};
|
|
86
|
+
serviceProviderTicket?: string;
|
|
87
|
+
singlePage?: {
|
|
88
|
+
[k: string]: unknown;
|
|
89
|
+
};
|
|
90
|
+
sitemapLocation?: string;
|
|
91
|
+
static?: {
|
|
92
|
+
[k: string]: unknown;
|
|
93
|
+
};
|
|
94
|
+
style?: string;
|
|
95
|
+
subPackages?: {
|
|
96
|
+
entry?: string;
|
|
97
|
+
independent?: boolean;
|
|
98
|
+
name?: string;
|
|
99
|
+
pages?: string[];
|
|
100
|
+
root?: string;
|
|
101
|
+
[k: string]: unknown;
|
|
102
|
+
}[];
|
|
103
|
+
subpackages?: {
|
|
104
|
+
entry?: string;
|
|
105
|
+
independent?: boolean;
|
|
106
|
+
name?: string;
|
|
107
|
+
pages?: string[];
|
|
108
|
+
root?: string;
|
|
109
|
+
[k: string]: unknown;
|
|
110
|
+
}[];
|
|
111
|
+
supportedMaterials?: {
|
|
112
|
+
[k: string]: unknown;
|
|
113
|
+
};
|
|
114
|
+
tabBar?: {
|
|
115
|
+
backgroundColor: string;
|
|
116
|
+
borderStyle?: "black" | "white";
|
|
117
|
+
color: string;
|
|
118
|
+
custom?: boolean;
|
|
49
119
|
/**
|
|
50
|
-
*
|
|
120
|
+
* @minItems 2
|
|
121
|
+
* @maxItems 5
|
|
51
122
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
[k: string]: unknown;
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
iconPath?: string;
|
|
147
|
-
pagePath: string;
|
|
148
|
-
selectedIconPath?: string;
|
|
149
|
-
text: string;
|
|
150
|
-
[k: string]: unknown;
|
|
151
|
-
}
|
|
152
|
-
] | [
|
|
153
|
-
{
|
|
154
|
-
iconPath?: string;
|
|
155
|
-
pagePath: string;
|
|
156
|
-
selectedIconPath?: string;
|
|
157
|
-
text: string;
|
|
158
|
-
[k: string]: unknown;
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
iconPath?: string;
|
|
162
|
-
pagePath: string;
|
|
163
|
-
selectedIconPath?: string;
|
|
164
|
-
text: string;
|
|
165
|
-
[k: string]: unknown;
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
iconPath?: string;
|
|
169
|
-
pagePath: string;
|
|
170
|
-
selectedIconPath?: string;
|
|
171
|
-
text: string;
|
|
172
|
-
[k: string]: unknown;
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
iconPath?: string;
|
|
176
|
-
pagePath: string;
|
|
177
|
-
selectedIconPath?: string;
|
|
178
|
-
text: string;
|
|
179
|
-
[k: string]: unknown;
|
|
180
|
-
}
|
|
181
|
-
] | [
|
|
182
|
-
{
|
|
183
|
-
iconPath?: string;
|
|
184
|
-
pagePath: string;
|
|
185
|
-
selectedIconPath?: string;
|
|
186
|
-
text: string;
|
|
187
|
-
[k: string]: unknown;
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
iconPath?: string;
|
|
191
|
-
pagePath: string;
|
|
192
|
-
selectedIconPath?: string;
|
|
193
|
-
text: string;
|
|
194
|
-
[k: string]: unknown;
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
iconPath?: string;
|
|
198
|
-
pagePath: string;
|
|
199
|
-
selectedIconPath?: string;
|
|
200
|
-
text: string;
|
|
201
|
-
[k: string]: unknown;
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
iconPath?: string;
|
|
205
|
-
pagePath: string;
|
|
206
|
-
selectedIconPath?: string;
|
|
207
|
-
text: string;
|
|
208
|
-
[k: string]: unknown;
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
iconPath?: string;
|
|
212
|
-
pagePath: string;
|
|
213
|
-
selectedIconPath?: string;
|
|
214
|
-
text: string;
|
|
215
|
-
[k: string]: unknown;
|
|
216
|
-
}
|
|
217
|
-
];
|
|
218
|
-
position?: "bottom" | "top";
|
|
219
|
-
selectedColor: string;
|
|
220
|
-
[k: string]: unknown;
|
|
221
|
-
};
|
|
222
|
-
themeLocation?: string;
|
|
223
|
-
useExtendedLib?: {
|
|
224
|
-
[k: string]: unknown;
|
|
225
|
-
};
|
|
226
|
-
usingComponents?: {
|
|
227
|
-
[k: string]: string;
|
|
228
|
-
};
|
|
229
|
-
window?: {
|
|
230
|
-
backgroundColor?: string;
|
|
231
|
-
backgroundColorBottom?: string;
|
|
232
|
-
backgroundColorTop?: string;
|
|
233
|
-
backgroundTextStyle?: "dark" | "light";
|
|
234
|
-
enablePullDownRefresh?: boolean;
|
|
235
|
-
handleWebviewPreload?: "static" | "manual" | "auto";
|
|
236
|
-
homeButton?: boolean;
|
|
237
|
-
initialRenderingCache?: "static" | "dynamic";
|
|
238
|
-
navigationBarBackgroundColor?: string;
|
|
239
|
-
navigationBarTextStyle?: string;
|
|
240
|
-
navigationBarTitleText?: string;
|
|
241
|
-
navigationStyle?: "default" | "custom";
|
|
242
|
-
onReachBottomDistance?: number;
|
|
243
|
-
pageOrientation?: "portrait" | "auto" | "landscape";
|
|
244
|
-
restartStrategy?: "homePage" | "homePageAndLatestPage";
|
|
245
|
-
visualEffectInBackground?: "none" | "hidden";
|
|
246
|
-
[k: string]: unknown;
|
|
247
|
-
};
|
|
248
|
-
workers?: string | {
|
|
249
|
-
isSubpackage?: boolean;
|
|
250
|
-
path?: string;
|
|
251
|
-
[k: string]: unknown;
|
|
252
|
-
};
|
|
123
|
+
list: [{
|
|
124
|
+
iconPath?: string;
|
|
125
|
+
pagePath: string;
|
|
126
|
+
selectedIconPath?: string;
|
|
127
|
+
text: string;
|
|
128
|
+
[k: string]: unknown;
|
|
129
|
+
}, {
|
|
130
|
+
iconPath?: string;
|
|
131
|
+
pagePath: string;
|
|
132
|
+
selectedIconPath?: string;
|
|
133
|
+
text: string;
|
|
134
|
+
[k: string]: unknown;
|
|
135
|
+
}] | [{
|
|
136
|
+
iconPath?: string;
|
|
137
|
+
pagePath: string;
|
|
138
|
+
selectedIconPath?: string;
|
|
139
|
+
text: string;
|
|
140
|
+
[k: string]: unknown;
|
|
141
|
+
}, {
|
|
142
|
+
iconPath?: string;
|
|
143
|
+
pagePath: string;
|
|
144
|
+
selectedIconPath?: string;
|
|
145
|
+
text: string;
|
|
146
|
+
[k: string]: unknown;
|
|
147
|
+
}, {
|
|
148
|
+
iconPath?: string;
|
|
149
|
+
pagePath: string;
|
|
150
|
+
selectedIconPath?: string;
|
|
151
|
+
text: string;
|
|
152
|
+
[k: string]: unknown;
|
|
153
|
+
}] | [{
|
|
154
|
+
iconPath?: string;
|
|
155
|
+
pagePath: string;
|
|
156
|
+
selectedIconPath?: string;
|
|
157
|
+
text: string;
|
|
158
|
+
[k: string]: unknown;
|
|
159
|
+
}, {
|
|
160
|
+
iconPath?: string;
|
|
161
|
+
pagePath: string;
|
|
162
|
+
selectedIconPath?: string;
|
|
163
|
+
text: string;
|
|
164
|
+
[k: string]: unknown;
|
|
165
|
+
}, {
|
|
166
|
+
iconPath?: string;
|
|
167
|
+
pagePath: string;
|
|
168
|
+
selectedIconPath?: string;
|
|
169
|
+
text: string;
|
|
170
|
+
[k: string]: unknown;
|
|
171
|
+
}, {
|
|
172
|
+
iconPath?: string;
|
|
173
|
+
pagePath: string;
|
|
174
|
+
selectedIconPath?: string;
|
|
175
|
+
text: string;
|
|
176
|
+
[k: string]: unknown;
|
|
177
|
+
}] | [{
|
|
178
|
+
iconPath?: string;
|
|
179
|
+
pagePath: string;
|
|
180
|
+
selectedIconPath?: string;
|
|
181
|
+
text: string;
|
|
182
|
+
[k: string]: unknown;
|
|
183
|
+
}, {
|
|
184
|
+
iconPath?: string;
|
|
185
|
+
pagePath: string;
|
|
186
|
+
selectedIconPath?: string;
|
|
187
|
+
text: string;
|
|
188
|
+
[k: string]: unknown;
|
|
189
|
+
}, {
|
|
190
|
+
iconPath?: string;
|
|
191
|
+
pagePath: string;
|
|
192
|
+
selectedIconPath?: string;
|
|
193
|
+
text: string;
|
|
194
|
+
[k: string]: unknown;
|
|
195
|
+
}, {
|
|
196
|
+
iconPath?: string;
|
|
197
|
+
pagePath: string;
|
|
198
|
+
selectedIconPath?: string;
|
|
199
|
+
text: string;
|
|
200
|
+
[k: string]: unknown;
|
|
201
|
+
}, {
|
|
202
|
+
iconPath?: string;
|
|
203
|
+
pagePath: string;
|
|
204
|
+
selectedIconPath?: string;
|
|
205
|
+
text: string;
|
|
206
|
+
[k: string]: unknown;
|
|
207
|
+
}];
|
|
208
|
+
position?: "bottom" | "top";
|
|
209
|
+
selectedColor: string;
|
|
210
|
+
[k: string]: unknown;
|
|
211
|
+
};
|
|
212
|
+
themeLocation?: string;
|
|
213
|
+
useExtendedLib?: {
|
|
253
214
|
[k: string]: unknown;
|
|
215
|
+
};
|
|
216
|
+
usingComponents?: {
|
|
217
|
+
[k: string]: string;
|
|
218
|
+
};
|
|
219
|
+
window?: {
|
|
220
|
+
backgroundColor?: string;
|
|
221
|
+
backgroundColorBottom?: string;
|
|
222
|
+
backgroundColorTop?: string;
|
|
223
|
+
backgroundTextStyle?: "dark" | "light";
|
|
224
|
+
enablePullDownRefresh?: boolean;
|
|
225
|
+
handleWebviewPreload?: "static" | "manual" | "auto";
|
|
226
|
+
homeButton?: boolean;
|
|
227
|
+
initialRenderingCache?: "static" | "dynamic";
|
|
228
|
+
navigationBarBackgroundColor?: string;
|
|
229
|
+
navigationBarTextStyle?: string;
|
|
230
|
+
navigationBarTitleText?: string;
|
|
231
|
+
navigationStyle?: "default" | "custom";
|
|
232
|
+
onReachBottomDistance?: number;
|
|
233
|
+
pageOrientation?: "portrait" | "auto" | "landscape";
|
|
234
|
+
restartStrategy?: "homePage" | "homePageAndLatestPage";
|
|
235
|
+
visualEffectInBackground?: "none" | "hidden";
|
|
236
|
+
[k: string]: unknown;
|
|
237
|
+
};
|
|
238
|
+
workers?: string | {
|
|
239
|
+
isSubpackage?: boolean;
|
|
240
|
+
path?: string;
|
|
241
|
+
[k: string]: unknown;
|
|
242
|
+
};
|
|
243
|
+
[k: string]: unknown;
|
|
254
244
|
}
|
|
255
245
|
/**
|
|
256
246
|
* This file was automatically generated by json-schema-to-typescript.
|
|
@@ -261,19 +251,19 @@ interface App$1 {
|
|
|
261
251
|
* 自定义组件配置
|
|
262
252
|
*/
|
|
263
253
|
interface Component$1 {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
[k: string]: unknown;
|
|
271
|
-
};
|
|
272
|
-
styleIsolation?: "isolated" | "apply-shared" | "shared";
|
|
273
|
-
usingComponents?: {
|
|
274
|
-
[k: string]: string;
|
|
275
|
-
};
|
|
254
|
+
component?: boolean;
|
|
255
|
+
componentFramework?: string;
|
|
256
|
+
componentGenerics?: {
|
|
257
|
+
[k: string]: unknown;
|
|
258
|
+
};
|
|
259
|
+
componentPlaceholder?: {
|
|
276
260
|
[k: string]: unknown;
|
|
261
|
+
};
|
|
262
|
+
styleIsolation?: "isolated" | "apply-shared" | "shared";
|
|
263
|
+
usingComponents?: {
|
|
264
|
+
[k: string]: string;
|
|
265
|
+
};
|
|
266
|
+
[k: string]: unknown;
|
|
277
267
|
}
|
|
278
268
|
/**
|
|
279
269
|
* This file was automatically generated by json-schema-to-typescript.
|
|
@@ -284,50 +274,50 @@ interface Component$1 {
|
|
|
284
274
|
* 页面配置, 支持对单个页面进行配置,可以在页面对应的 .json 文件来对本页面的表现进行配置
|
|
285
275
|
*/
|
|
286
276
|
interface Page$1 {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
};
|
|
318
|
-
[k: string]: unknown;
|
|
319
|
-
};
|
|
320
|
-
restartStrategy?: "homePage" | "homePageAndLatestPage";
|
|
321
|
-
singlePage?: {
|
|
322
|
-
[k: string]: unknown;
|
|
323
|
-
};
|
|
324
|
-
style?: string;
|
|
325
|
-
styleIsolation?: "page-isolated" | "page-apply-shared" | "page-shared";
|
|
326
|
-
usingComponents?: {
|
|
327
|
-
[k: string]: string;
|
|
277
|
+
backgroundColor?: string;
|
|
278
|
+
backgroundColorBottom?: string;
|
|
279
|
+
backgroundColorContent?: string;
|
|
280
|
+
backgroundColorTop?: string;
|
|
281
|
+
backgroundTextStyle?: "dark" | "light";
|
|
282
|
+
componentFramework?: string;
|
|
283
|
+
componentPlaceholder?: {
|
|
284
|
+
[k: string]: unknown;
|
|
285
|
+
};
|
|
286
|
+
disableScroll?: boolean;
|
|
287
|
+
enablePassiveEvent?: {
|
|
288
|
+
[k: string]: unknown;
|
|
289
|
+
} | boolean;
|
|
290
|
+
enablePullDownRefresh?: boolean;
|
|
291
|
+
handleWebviewPreload?: "static" | "manual" | "auto";
|
|
292
|
+
homeButton?: boolean;
|
|
293
|
+
initialRenderingCache?: "static" | "dynamic";
|
|
294
|
+
navigationBarBackgroundColor?: string;
|
|
295
|
+
navigationBarTextStyle?: string;
|
|
296
|
+
navigationBarTitleText?: string;
|
|
297
|
+
navigationStyle?: "default" | "custom";
|
|
298
|
+
onReachBottomDistance?: number;
|
|
299
|
+
pageOrientation?: "portrait" | "auto" | "landscape";
|
|
300
|
+
renderer?: "webview" | "skyline";
|
|
301
|
+
rendererOptions?: {
|
|
302
|
+
skyline?: {
|
|
303
|
+
defaultContentBox?: boolean;
|
|
304
|
+
defaultDisplayBlock?: boolean;
|
|
305
|
+
disableABTest?: boolean;
|
|
306
|
+
[k: string]: unknown;
|
|
328
307
|
};
|
|
329
|
-
visualEffectInBackground?: "none" | "hidden";
|
|
330
308
|
[k: string]: unknown;
|
|
309
|
+
};
|
|
310
|
+
restartStrategy?: "homePage" | "homePageAndLatestPage";
|
|
311
|
+
singlePage?: {
|
|
312
|
+
[k: string]: unknown;
|
|
313
|
+
};
|
|
314
|
+
style?: string;
|
|
315
|
+
styleIsolation?: "page-isolated" | "page-apply-shared" | "page-shared";
|
|
316
|
+
usingComponents?: {
|
|
317
|
+
[k: string]: string;
|
|
318
|
+
};
|
|
319
|
+
visualEffectInBackground?: "none" | "hidden";
|
|
320
|
+
[k: string]: unknown;
|
|
331
321
|
}
|
|
332
322
|
/**
|
|
333
323
|
* This file was automatically generated by json-schema-to-typescript.
|
|
@@ -338,14 +328,14 @@ interface Page$1 {
|
|
|
338
328
|
* https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/sitemap.html
|
|
339
329
|
*/
|
|
340
330
|
interface Sitemap$1 {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
331
|
+
rules: {
|
|
332
|
+
action?: "allow" | "disallow";
|
|
333
|
+
matching?: "exact" | "inclusive" | "exclusive" | "partial";
|
|
334
|
+
page: string;
|
|
335
|
+
params?: string[];
|
|
336
|
+
priority?: number;
|
|
337
|
+
}[];
|
|
338
|
+
[k: string]: unknown;
|
|
349
339
|
}
|
|
350
340
|
/**
|
|
351
341
|
* This file was automatically generated by json-schema-to-typescript.
|
|
@@ -353,13 +343,13 @@ interface Sitemap$1 {
|
|
|
353
343
|
* and run json-schema-to-typescript to regenerate this file.
|
|
354
344
|
*/
|
|
355
345
|
interface Theme$1 {
|
|
356
|
-
|
|
357
|
-
[k: string]: unknown;
|
|
358
|
-
};
|
|
359
|
-
light: {
|
|
360
|
-
[k: string]: unknown;
|
|
361
|
-
};
|
|
346
|
+
dark: {
|
|
362
347
|
[k: string]: unknown;
|
|
348
|
+
};
|
|
349
|
+
light: {
|
|
350
|
+
[k: string]: unknown;
|
|
351
|
+
};
|
|
352
|
+
[k: string]: unknown;
|
|
363
353
|
}
|
|
364
354
|
/**
|
|
365
355
|
* This file was automatically generated by json-schema-to-typescript.
|
|
@@ -370,52 +360,85 @@ interface Theme$1 {
|
|
|
370
360
|
* https://developers.weixin.qq.com/miniprogram/dev/framework/plugin/development.html#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6
|
|
371
361
|
*/
|
|
372
362
|
interface Plugin$1 {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
363
|
+
main?: string;
|
|
364
|
+
pages?: {
|
|
365
|
+
[k: string]: string;
|
|
366
|
+
};
|
|
367
|
+
publicComponents?: {
|
|
368
|
+
[k: string]: string;
|
|
369
|
+
};
|
|
370
|
+
[k: string]: unknown;
|
|
381
371
|
}
|
|
382
|
-
|
|
372
|
+
//#endregion
|
|
373
|
+
//#region src/type.d.ts
|
|
374
|
+
/**
|
|
375
|
+
* @description app.json 类型定义
|
|
376
|
+
*/
|
|
383
377
|
type App = App$1;
|
|
378
|
+
/**
|
|
379
|
+
* @description component.json 类型定义
|
|
380
|
+
*/
|
|
384
381
|
type Component = Component$1;
|
|
382
|
+
/**
|
|
383
|
+
* @description page.json 类型定义
|
|
384
|
+
*/
|
|
385
385
|
type Page = Page$1;
|
|
386
|
+
/**
|
|
387
|
+
* @description sitemap.json 类型定义
|
|
388
|
+
*/
|
|
386
389
|
type Sitemap = Sitemap$1;
|
|
390
|
+
/**
|
|
391
|
+
* @description theme.json 类型定义
|
|
392
|
+
*/
|
|
387
393
|
type Theme = Theme$1;
|
|
394
|
+
/**
|
|
395
|
+
* @description plugin.json 类型定义
|
|
396
|
+
*/
|
|
388
397
|
type Plugin = Plugin$1;
|
|
389
|
-
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region src/json.d.ts
|
|
390
400
|
declare const JSON_SCHEMA_DEFINITIONS: readonly [{
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
401
|
+
filename: "app.json";
|
|
402
|
+
typeName: "App";
|
|
403
|
+
schema: unknown;
|
|
394
404
|
}, {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
405
|
+
filename: "component.json";
|
|
406
|
+
typeName: "Component";
|
|
407
|
+
schema: unknown;
|
|
398
408
|
}, {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
409
|
+
filename: "page.json";
|
|
410
|
+
typeName: "Page";
|
|
411
|
+
schema: unknown;
|
|
402
412
|
}, {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
413
|
+
filename: "sitemap.json";
|
|
414
|
+
typeName: "Sitemap";
|
|
415
|
+
schema: unknown;
|
|
406
416
|
}, {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
417
|
+
filename: "theme.json";
|
|
418
|
+
typeName: "Theme";
|
|
419
|
+
schema: unknown;
|
|
410
420
|
}, {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
421
|
+
filename: "plugin.json";
|
|
422
|
+
typeName: "Plugin";
|
|
423
|
+
schema: unknown;
|
|
414
424
|
}];
|
|
415
|
-
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region src/index.d.ts
|
|
427
|
+
/**
|
|
428
|
+
* @description 生成 JS 模板(app/page/component)
|
|
429
|
+
*/
|
|
416
430
|
declare function generateJs(type?: GenerateType): "App({})" | "Page({})" | "Component({})";
|
|
431
|
+
/**
|
|
432
|
+
* @description 生成 WXSS 模板
|
|
433
|
+
*/
|
|
417
434
|
declare function generateWxss(): string;
|
|
435
|
+
/**
|
|
436
|
+
* @description 生成 WXML 模板
|
|
437
|
+
*/
|
|
418
438
|
declare function generateWxml(filepath?: string): string;
|
|
439
|
+
/**
|
|
440
|
+
* @description 生成 JSON/JS/TS 模板
|
|
441
|
+
*/
|
|
419
442
|
declare function generateJson(type?: GenerateType, ext?: JsonExt): string;
|
|
420
|
-
|
|
421
|
-
export { type App, type Component, type GenerateType, JSON_SCHEMA_DEFINITIONS, type Page, type Plugin, type Sitemap, type Theme, generateJs, generateJson, generateWxml, generateWxss };
|
|
443
|
+
//#endregion
|
|
444
|
+
export { type App, type Component, type GenerateType, JSON_SCHEMA_DEFINITIONS, type Page, type Plugin, type Sitemap, type Theme, generateJs, generateJson, generateWxml, generateWxss };
|