vite-plugin-taro 0.6.18 → 0.6.19

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 (133) hide show
  1. package/client.d.ts +2 -3
  2. package/dist/index.js +213574 -0
  3. package/dist/node/plugins/wx/dev/react-refresh.d.ts +14 -13
  4. package/dist/node/utils/packages.d.ts +2 -0
  5. package/package.json +26 -26
  6. package/dist/node/plugins/client/client-taro.js +0 -59
  7. package/dist/node/plugins/client/constant.js +0 -4
  8. package/dist/node/plugins/client/inject-taro-framework-apis.js +0 -9
  9. package/dist/node/plugins/conditional/conditional-directives.js +0 -76
  10. package/dist/node/plugins/h5/constant.js +0 -3
  11. package/dist/node/plugins/h5/create-stencil-client-adapter.js +0 -94
  12. package/dist/node/plugins/h5/plugins.js +0 -179
  13. package/dist/node/plugins/h5/resolver/module-resolver.js +0 -20
  14. package/dist/node/plugins/h5/transform-app.js +0 -48
  15. package/dist/node/plugins/tailwind/tailwind-css.js +0 -3
  16. package/dist/node/plugins/wx/dev/create-hmr-results-stream.js +0 -57
  17. package/dist/node/plugins/wx/dev/dev-host.js +0 -361
  18. package/dist/node/plugins/wx/dev/hmr-files.js +0 -56
  19. package/dist/node/plugins/wx/dev/host-actions.js +0 -58
  20. package/dist/node/plugins/wx/dev/patch-publisher.js +0 -77
  21. package/dist/node/plugins/wx/dev/plugins.js +0 -164
  22. package/dist/node/plugins/wx/dev/react-refresh.js +0 -231
  23. package/dist/node/plugins/wx/dev/runtime-reports.js +0 -45
  24. package/dist/node/plugins/wx/dev/wx-dev-options.js +0 -178
  25. package/dist/node/plugins/wx/module/chunk-path.js +0 -18
  26. package/dist/node/plugins/wx/module/module.js +0 -79
  27. package/dist/node/plugins/wx/native/compile-native-component-interface.js +0 -30
  28. package/dist/node/plugins/wx/native/create-native-component-output.js +0 -39
  29. package/dist/node/plugins/wx/native/native-component-assets.js +0 -76
  30. package/dist/node/plugins/wx/native/native-component-interface.js +0 -203
  31. package/dist/node/plugins/wx/output/files.js +0 -21
  32. package/dist/node/plugins/wx/output/relative-root.js +0 -6
  33. package/dist/node/plugins/wx/output/templates.js +0 -358
  34. package/dist/node/plugins/wx/placer/placement.js +0 -245
  35. package/dist/node/plugins/wx/placer/placer.js +0 -147
  36. package/dist/node/plugins/wx/plugins.js +0 -152
  37. package/dist/node/plugins/wx/render/capsule.js +0 -54
  38. package/dist/node/plugins/wx/render/native.js +0 -543
  39. package/dist/node/plugins/wx/render/system-js/string-editor.js +0 -94
  40. package/dist/node/plugins/wx/render/system-js/system-js.js +0 -588
  41. package/dist/node/plugins/wx/render/transport.js +0 -103
  42. package/dist/node/plugins/wx/resolve/resolver.js +0 -102
  43. package/dist/node/plugins/wx/resolve/specialize-app-capsule.js +0 -9
  44. package/dist/node/plugins/wx/resolve/specialize-page-capsule.js +0 -11
  45. package/dist/node/plugins/wx/styles/plugins.js +0 -459
  46. package/dist/node/utils/constant.js +0 -1
  47. package/dist/node/utils/memoize.js +0 -86
  48. package/dist/node/utils/modules.js +0 -22
  49. package/dist/node/utils/once.js +0 -20
  50. package/dist/node/utils/oxc-transform.js +0 -57
  51. package/dist/node/utils/packages.js +0 -9
  52. package/dist/node/utils/project-config.js +0 -8
  53. package/dist/node/utils/transform.js +0 -32
  54. package/dist/node/utils/vite.js +0 -10
  55. package/dist/node/vpt.js +0 -15
  56. package/dist/options.js +0 -1
  57. package/dist/vite.js +0 -1
  58. package/src/node/plugins/client/client-taro.ts +0 -71
  59. package/src/node/plugins/client/constant.ts +0 -5
  60. package/src/node/plugins/client/inject-taro-framework-apis.ts +0 -11
  61. package/src/node/plugins/conditional/conditional-directives.ts +0 -94
  62. package/src/node/plugins/h5/constant.ts +0 -4
  63. package/src/node/plugins/h5/create-stencil-client-adapter.ts +0 -111
  64. package/src/node/plugins/h5/plugins.ts +0 -194
  65. package/src/node/plugins/h5/resolver/module-resolver.ts +0 -33
  66. package/src/node/plugins/h5/transform-app.ts +0 -90
  67. package/src/node/plugins/tailwind/tailwind-css.ts +0 -4
  68. package/src/node/plugins/wx/dev/create-hmr-results-stream.ts +0 -71
  69. package/src/node/plugins/wx/dev/dev-host.ts +0 -453
  70. package/src/node/plugins/wx/dev/hmr-files.ts +0 -80
  71. package/src/node/plugins/wx/dev/host-actions.ts +0 -88
  72. package/src/node/plugins/wx/dev/patch-publisher.ts +0 -92
  73. package/src/node/plugins/wx/dev/plugins.ts +0 -176
  74. package/src/node/plugins/wx/dev/react-refresh.ts +0 -253
  75. package/src/node/plugins/wx/dev/runtime-reports.ts +0 -70
  76. package/src/node/plugins/wx/dev/wx-dev-options.ts +0 -226
  77. package/src/node/plugins/wx/module/chunk-path.ts +0 -22
  78. package/src/node/plugins/wx/module/module.ts +0 -110
  79. package/src/node/plugins/wx/native/compile-native-component-interface.ts +0 -48
  80. package/src/node/plugins/wx/native/create-native-component-output.ts +0 -60
  81. package/src/node/plugins/wx/native/native-component-assets.ts +0 -113
  82. package/src/node/plugins/wx/native/native-component-interface.ts +0 -267
  83. package/src/node/plugins/wx/output/files.ts +0 -40
  84. package/src/node/plugins/wx/output/relative-root.ts +0 -7
  85. package/src/node/plugins/wx/output/templates.ts +0 -448
  86. package/src/node/plugins/wx/placer/placement.ts +0 -364
  87. package/src/node/plugins/wx/placer/placer.ts +0 -180
  88. package/src/node/plugins/wx/plugins.ts +0 -183
  89. package/src/node/plugins/wx/render/capsule.ts +0 -57
  90. package/src/node/plugins/wx/render/native.ts +0 -694
  91. package/src/node/plugins/wx/render/system-js/string-editor.ts +0 -116
  92. package/src/node/plugins/wx/render/system-js/system-js.ts +0 -821
  93. package/src/node/plugins/wx/render/transport.ts +0 -173
  94. package/src/node/plugins/wx/resolve/resolver.ts +0 -145
  95. package/src/node/plugins/wx/resolve/specialize-app-capsule.ts +0 -27
  96. package/src/node/plugins/wx/resolve/specialize-page-capsule.ts +0 -29
  97. package/src/node/plugins/wx/styles/plugins.ts +0 -595
  98. package/src/node/utils/constant.ts +0 -1
  99. package/src/node/utils/memoize.ts +0 -149
  100. package/src/node/utils/modules.ts +0 -37
  101. package/src/node/utils/once.ts +0 -21
  102. package/src/node/utils/oxc-transform.ts +0 -76
  103. package/src/node/utils/packages.ts +0 -11
  104. package/src/node/utils/project-config.ts +0 -10
  105. package/src/node/utils/transform.ts +0 -48
  106. package/src/node/utils/vite.ts +0 -22
  107. package/src/node/vpt.ts +0 -18
  108. package/src/options.ts +0 -82
  109. package/src/runtime/client/taro/api.ts +0 -11
  110. package/src/runtime/client/taro/component.ts +0 -1
  111. package/src/runtime/client/taro/define-native-component.ts +0 -15
  112. package/src/runtime/h5/app.ts +0 -25
  113. package/src/runtime/h5/taro-css.d.ts +0 -3
  114. package/src/runtime/h5/taro-runtime.ts +0 -7
  115. package/src/runtime/wx/amphibious/bootstrap.ts +0 -17
  116. package/src/runtime/wx/amphibious/transport.ts +0 -8
  117. package/src/runtime/wx/capsule/app.ts +0 -12
  118. package/src/runtime/wx/capsule/component.ts +0 -7
  119. package/src/runtime/wx/capsule/page.ts +0 -29
  120. package/src/runtime/wx/capsule/taro-runtime.ts +0 -8
  121. package/src/runtime/wx/dev/dev-runtime.ts +0 -464
  122. package/src/runtime/wx/native/app.ts +0 -4
  123. package/src/runtime/wx/native/component.ts +0 -4
  124. package/src/runtime/wx/native/custom-wrapper.ts +0 -4
  125. package/src/runtime/wx/native/page.ts +0 -6
  126. package/src/runtime/wx/systemjs/LICENSE +0 -10
  127. package/src/runtime/wx/systemjs/system-core.js +0 -370
  128. package/src/runtime/wx/systemjs/system.d.ts +0 -55
  129. package/src/runtime/wx/wechat.d.ts +0 -56
  130. package/src/vite.ts +0 -2
  131. /package/dist/{vite.d.ts → index.d.ts} +0 -0
  132. /package/dist/runtime/client/taro/{define-native-component.d.ts → native.d.ts} +0 -0
  133. /package/dist/runtime/client/taro/{define-native-component.js → native.js} +0 -0
@@ -1,370 +0,0 @@
1
- // biome-ignore-start lint: vendored SystemJS core
2
-
3
- /*
4
- * SystemJS Core
5
- *
6
- * Provides
7
- * - System.import and System.importSync
8
- * - System.register support for
9
- * live bindings, function hoisting through circular references,
10
- * reexports, dynamic import, import.meta.url, top-level await
11
- * - System.getRegister to get the registration
12
- * - Symbol.toStringTag support in Module objects
13
- * - Hookable System.createContext to customize import.meta
14
- *
15
- * Core comes with no System.prototype.resolve or
16
- * System.prototype.instantiate implementations
17
- */
18
- var envGlobal = global
19
- var hasSymbol = typeof Symbol !== 'undefined'
20
-
21
- function createMissingRegistrationError(id) {
22
- return Error('Module did not instantiate: ' + id)
23
- }
24
-
25
- export { REGISTRY, systemJSPrototype }
26
-
27
- var toStringTag = hasSymbol && Symbol.toStringTag
28
- var REGISTRY = hasSymbol ? Symbol() : '@'
29
-
30
- function SystemJS() {
31
- this[REGISTRY] = {}
32
- }
33
-
34
- var systemJSPrototype = SystemJS.prototype
35
-
36
- systemJSPrototype.import = function (id, parentId, meta) {
37
- var loader = this
38
- if (parentId && typeof parentId === 'object') meta = parentId
39
- var load = getOrCreateLoad(loader, id, undefined, meta)
40
- return Promise.resolve(load.C || topLevelLoad(loader, load))
41
- }
42
-
43
- /**
44
- * Instantiates, links, and evaluates a graph without yielding the current JavaScript turn.
45
- *
46
- * WX placement guarantees that every registration in a synchronous graph uses the main-package transport. Encountering
47
- * a thenable therefore indicates a fatal placement invariant violation. No rollback is attempted: rows already published
48
- * to the shared registry remain there and the current runtime heap must not be reused.
49
- */
50
- systemJSPrototype.importSync = function (id) {
51
- var loader = this
52
- var load = linkLoadSync(loader, id)
53
- var execution = postOrderExec(loader, load, {})
54
- if (isThenable(execution)) throw createAsyncGraphError(id)
55
-
56
- // Share completion and namespace identity with normal System.import calls.
57
- load.C = load.n
58
- return load.n
59
- }
60
-
61
- // Hookable createContext function -> allowing eg custom import meta
62
- systemJSPrototype.createContext = function (parentId) {
63
- return { url: parentId }
64
- }
65
-
66
- /** Publishes one synchronous row before linking dependencies so cycles observe the same live namespace. */
67
- function linkLoadSync(loader, id) {
68
- var existing = loader[REGISTRY][id]
69
- if (existing) return existing
70
-
71
- var registration = loader.instantiate(id)
72
- if (isThenable(registration)) throw createAsyncGraphError(id)
73
- if (!registration) throw createMissingRegistrationError(id)
74
-
75
- // This row is intentionally mutable SystemJS-owned linking and execution state.
76
- var load = {
77
- id: id,
78
- i: [],
79
- n: createModuleNamespace(),
80
- h: false,
81
- d: undefined,
82
- e: undefined,
83
- C: undefined
84
- }
85
- loader[REGISTRY][id] = load
86
-
87
- var declared = registration[1](
88
- createExport(load),
89
- registration[1].length === 2 ? createDeclarationContext(loader, id) : undefined
90
- )
91
- load.e = declared.execute || function () {}
92
- var setters = declared.setters || []
93
- load.d = registration[0].map(function (dependency, index) {
94
- var dependencyLoad = linkLoadSync(loader, dependency)
95
- var setter = setters[index]
96
- if (setter) {
97
- dependencyLoad.i.push(setter)
98
- if (dependencyLoad.h || dependencyLoad.C === dependencyLoad.n) setter(dependencyLoad.n)
99
- }
100
- return dependencyLoad
101
- })
102
- return load
103
- }
104
-
105
- /** Supplies dynamic import and import.meta using the canonical IDs emitted at build time. */
106
- function createDeclarationContext(loader, id) {
107
- return {
108
- import: function (dependency, meta) {
109
- return loader.import(dependency, undefined, meta)
110
- },
111
- meta: loader.createContext(id)
112
- }
113
- }
114
-
115
- /** Creates a live module namespace shared by both completion policies. */
116
- function createModuleNamespace() {
117
- var namespace = Object.create(null)
118
- if (toStringTag) Object.defineProperty(namespace, toStringTag, { value: 'Module' })
119
- return namespace
120
- }
121
-
122
- /** Creates the shared live-binding publisher used by synchronous and asynchronous load records. */
123
- function createExport(load) {
124
- return function (name, value) {
125
- load.h = true
126
- // This flag coalesces object-form exports into one importer notification pass.
127
- var changed = false
128
- if (typeof name === 'string') {
129
- if (!(name in load.n) || load.n[name] !== value) {
130
- load.n[name] = value
131
- changed = true
132
- }
133
- } else {
134
- for (var property in name) {
135
- var propertyValue = name[property]
136
- if (!(property in load.n) || load.n[property] !== propertyValue) {
137
- load.n[property] = propertyValue
138
- changed = true
139
- }
140
- }
141
- if (name && name.__esModule) load.n.__esModule = name.__esModule
142
- }
143
- if (changed) {
144
- for (var i = 0; i < load.i.length; i++) {
145
- var setter = load.i[i]
146
- if (setter) setter(load.n)
147
- }
148
- }
149
- return value
150
- }
151
- }
152
-
153
- /** Accepts cross-realm and custom thenables rather than only native Promises. */
154
- function isThenable(value) {
155
- return (
156
- value !== null && (typeof value === 'object' || typeof value === 'function') && typeof value.then === 'function'
157
- )
158
- }
159
-
160
- function createAsyncGraphError(id) {
161
- return Error('Cannot synchronously import ' + id + ': module graph is asynchronous')
162
- }
163
-
164
- var lastRegister
165
- systemJSPrototype.register = function (deps, declare, metas) {
166
- lastRegister = [deps, declare, metas]
167
- }
168
-
169
- /*
170
- * getRegister provides the last anonymous System.register call
171
- */
172
- systemJSPrototype.getRegister = function () {
173
- var _lastRegister = lastRegister
174
- lastRegister = undefined
175
- return _lastRegister
176
- }
177
-
178
- export function getOrCreateLoad(loader, id, firstParentUrl, meta) {
179
- var load = loader[REGISTRY][id]
180
- if (load) return load
181
-
182
- var importerSetters = []
183
- var ns = createModuleNamespace()
184
-
185
- var instantiatePromise = Promise.resolve()
186
- .then(function () {
187
- return loader.instantiate(id, firstParentUrl, meta)
188
- })
189
- .then(
190
- function (registration) {
191
- if (!registration) throw createMissingRegistrationError(id)
192
- var declared = registration[1](
193
- createExport(load),
194
- registration[1].length === 2 ? createDeclarationContext(loader, id) : undefined
195
- )
196
- load.e = declared.execute || function () {}
197
- return [registration[0], declared.setters || [], registration[2] || []]
198
- },
199
- function (err) {
200
- load.e = null
201
- load.er = err
202
- throw err
203
- }
204
- )
205
-
206
- var linkPromise = instantiatePromise.then(function (instantiation) {
207
- return Promise.all(
208
- instantiation[0].map(function (dep, i) {
209
- var setter = instantiation[1][i]
210
- var meta = instantiation[2][i]
211
- var depLoad = getOrCreateLoad(loader, dep, id, meta)
212
- // depLoad.I may be undefined for already-evaluated
213
- return Promise.resolve(depLoad.I).then(function () {
214
- if (setter) {
215
- depLoad.i.push(setter)
216
- // only run early setters when there are hoisted exports of that module
217
- // the timing works here as pending hoisted export calls will trigger through importerSetters
218
- if (depLoad.h || !depLoad.I) setter(depLoad.n)
219
- }
220
- return depLoad
221
- })
222
- })
223
- ).then(function (depLoads) {
224
- load.d = depLoads
225
- })
226
- })
227
-
228
- // Capital letter = a promise function
229
- return (load = loader[REGISTRY][id] =
230
- {
231
- id: id,
232
- // importerSetters, the setters functions registered to this dependency
233
- // we retain this to add more later
234
- i: importerSetters,
235
- // module namespace object
236
- n: ns,
237
- // extra module information for import assertion
238
- // shape like: { assert: { type: 'xyz' } }
239
- m: meta,
240
-
241
- // instantiate
242
- I: instantiatePromise,
243
- // link
244
- L: linkPromise,
245
- // whether it has hoisted exports
246
- h: false,
247
-
248
- // On instantiate completion we have populated:
249
- // dependency load records
250
- d: undefined,
251
- // execution function
252
- e: undefined,
253
-
254
- // On execution we have populated:
255
- // the execution error if any
256
- er: undefined,
257
- // in the case of TLA, the execution promise
258
- E: undefined,
259
-
260
- // On execution, L, I, E cleared
261
-
262
- // Promise for top-level completion
263
- C: undefined,
264
-
265
- // parent instantiator / executor
266
- p: undefined
267
- })
268
- }
269
-
270
- function instantiateAll(loader, load, parent, loaded) {
271
- if (!loaded[load.id]) {
272
- loaded[load.id] = true
273
- // load.L may be undefined for already-instantiated
274
- return Promise.resolve(load.L)
275
- .then(function () {
276
- if (!load.p || load.p.e === null) load.p = parent
277
- return Promise.all(
278
- load.d.map(function (dep) {
279
- return instantiateAll(loader, dep, parent, loaded)
280
- })
281
- )
282
- })
283
- .catch(function (err) {
284
- if (load.er) throw err
285
- load.e = null
286
- throw err
287
- })
288
- }
289
- }
290
-
291
- function topLevelLoad(loader, load) {
292
- return (load.C = instantiateAll(loader, load, load, {})
293
- .then(function () {
294
- return postOrderExec(loader, load, {})
295
- })
296
- .then(function () {
297
- return load.n
298
- }))
299
- }
300
-
301
- // the closest we can get to call(undefined)
302
- var nullContext = Object.freeze(Object.create(null))
303
-
304
- // returns a promise if and only if a top-level await subgraph
305
- // throws on sync errors
306
- function postOrderExec(loader, load, seen) {
307
- if (seen[load.id]) return
308
- seen[load.id] = true
309
-
310
- if (!load.e) {
311
- if (load.er) throw load.er
312
- if (load.E) return load.E
313
- return
314
- }
315
-
316
- // From here we're about to execute the load.
317
- // Because the execution may be async, we pop the `load.e` first.
318
- // So `load.e === null` always means the load has been executed or is executing.
319
- // To inspect the state:
320
- // - If `load.er` is truthy, the execution has threw or has been rejected;
321
- // - otherwise, either the `load.E` is a promise, means it's under async execution, or
322
- // - the `load.E` is null, means the load has completed the execution or has been async resolved.
323
- var exec = load.e
324
- load.e = null
325
-
326
- // deps execute first, unless circular
327
- var depLoadPromises
328
- load.d.forEach(function (depLoad) {
329
- try {
330
- var depLoadPromise = postOrderExec(loader, depLoad, seen)
331
- if (depLoadPromise) (depLoadPromises = depLoadPromises || []).push(depLoadPromise)
332
- } catch (err) {
333
- load.er = err
334
- throw err
335
- }
336
- })
337
- if (depLoadPromises) return Promise.all(depLoadPromises).then(doExec)
338
-
339
- return doExec()
340
-
341
- function doExec() {
342
- try {
343
- var execPromise = exec.call(nullContext)
344
- if (execPromise) {
345
- execPromise = execPromise.then(
346
- function () {
347
- load.C = load.n
348
- load.E = null // indicates completion
349
- },
350
- function (err) {
351
- load.er = err
352
- load.E = null
353
- throw err
354
- }
355
- )
356
- return (load.E = execPromise)
357
- }
358
- // (should be a promise, but a minify optimization to leave out Promise.resolve)
359
- load.C = load.n
360
- load.L = load.I = undefined
361
- } catch (err) {
362
- load.er = err
363
- throw err
364
- }
365
- }
366
- }
367
-
368
- envGlobal.System = new SystemJS()
369
-
370
- // biome-ignore-end lint: vendored SystemJS core
@@ -1,55 +0,0 @@
1
- export {}
2
-
3
- declare global {
4
- namespace System {
5
- /** A live SystemJS module namespace. */
6
- type Module = Readonly<Record<string, unknown>>
7
-
8
- /** Publishes bindings from a System.register declaration. */
9
- type Export = (name: string | Readonly<Record<string, unknown>>, value?: unknown) => unknown
10
-
11
- /** Receives live updates from a dependency namespace. */
12
- type Setter = (module: Module) => void
13
-
14
- /** The linker callbacks and evaluator returned by a module declaration. */
15
- interface Declaration {
16
- setters?: readonly (Setter | undefined)[]
17
- execute?: () => void | PromiseLike<void>
18
- }
19
-
20
- /** The import.meta object supplied to a module declaration. */
21
- interface Meta {
22
- readonly url: string
23
- readonly [name: string]: unknown
24
- }
25
-
26
- /** Runtime operations supplied to a module declaration. */
27
- interface Context {
28
- readonly import: (id: string) => Promise<Module>
29
- readonly meta: Meta
30
- }
31
-
32
- /** Declares a module without executing it. */
33
- type Declare = (exportBinding: Export, context: Context) => Declaration
34
-
35
- /** The registration captured from one System.register call. */
36
- type Registration = readonly [dependencies: readonly string[], declare: Declare]
37
-
38
- /** A hookable SystemJS loader instance. */
39
- interface Loader {
40
- /** Creates the import.meta context supplied to a registration declaration. */
41
- createContext(parentId: string): Meta
42
-
43
- /** Links and evaluates a graph through the normal asynchronous completion policy. */
44
- import(id: string): Promise<Module>
45
-
46
- /**
47
- * Uses the same registry and evaluator but requires every unresolved registration and execute function in the
48
- * static closure to complete synchronously. An asynchronous phase throws without rollback and must be treated
49
- * as a fatal placement invariant violation for the current runtime heap.
50
- */
51
- importSync(id: string): Module
52
- instantiate(id: string): Registration | PromiseLike<Registration>
53
- }
54
- }
55
- }
@@ -1,56 +0,0 @@
1
- /**
2
- * The WeChat global. Free-variable reads never resolve its properties (verified: the
3
- * free lookup is undefined while `global.X` exists), so everything stored here must be
4
- * accessed as an explicit member expression.
5
- */
6
- type WeChatGlobal = object
7
-
8
- /** The App-global Rolldown dev runtime; present only in wx development builds. */
9
- declare const __rolldown_runtime__:
10
- | {
11
- injectPageHmr(config: object): object
12
- }
13
- | undefined
14
-
15
- // This object is available everywhere, but no globalThis, window on WeChat Mini Program
16
- declare const global: WeChatGlobal
17
-
18
- /** Minimal wx.request surface used by the DevRuntime; application API types remain owned by Taro/WeChat packages. */
19
- type WeChatRequestOptions = Readonly<{
20
- url: string
21
- method: 'POST'
22
- data: unknown
23
- header: Readonly<Record<string, string>>
24
- timeout?: number
25
- success(result: unknown): void
26
- fail(error: unknown): void
27
- }>
28
-
29
- /** Native HTTP request API available in the Mini Program JavaScript environment. */
30
- declare const wx: {
31
- request(options: WeChatRequestOptions): void
32
- }
33
-
34
- /** Native Page surface used by the singleton App-data scheduler. */
35
- type WeChatPage = {
36
- setData(data: Readonly<Record<string, unknown>>, callback?: () => void): void
37
- }
38
-
39
- /** Returns every mounted native Page in stack order. */
40
- declare function getCurrentPages(): WeChatPage[]
41
-
42
- /** Registers the native WeChat Mini Program application. */
43
- declare function App(options: object): void
44
-
45
- /** Registers a native WeChat Mini Program page. */
46
- declare function Page(options: object): void
47
-
48
- /** Registers a native WeChat Mini Program component. */
49
- declare function Component(options: object): void
50
-
51
- /**
52
- * Returns the native WeChat Mini Program application instance.
53
- * Only available after App() is called.
54
- * https://developers.weixin.qq.com/miniprogram/dev/reference/api/getApp.html
55
- */
56
- declare function getApp(options: object): { globalData: unknown }
package/src/vite.ts DELETED
@@ -1,2 +0,0 @@
1
- export { default } from './node/vpt.ts'
2
- export type { VptJsonObject, VptOptions, VptPageOption, VptTarget } from './options.ts'
File without changes