weapp-vite 6.3.5 → 6.4.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/client.d.ts +20 -8
- package/dist/auto-import-components/resolvers.d.ts +2 -2
- package/dist/auto-import-components/resolvers.mjs +1 -1
- package/dist/auto-routes.mjs +6 -6
- package/dist/{chunk-AECE67AJ.mjs → chunk-EQB3HW47.mjs} +2 -2
- package/dist/{chunk-QJLQRUJR.mjs → chunk-FT557YAP.mjs} +1509 -915
- package/dist/{chunk-H5CZANP5.mjs → chunk-J3ER3SPH.mjs} +1 -1
- package/dist/{chunk-7B6LS5J6.mjs → chunk-LDLACKTT.mjs} +2 -2
- package/dist/{chunk-MVHCUGOB.mjs → chunk-QAGDKFIK.mjs} +2 -2
- package/dist/{chunk-DG7SVSL5.mjs → chunk-QXZUIKYK.mjs} +63 -7
- package/dist/{chunk-H3QEQM4D.mjs → chunk-UTE2RKKL.mjs} +1 -1
- package/dist/{chunk-2IYVKVKJ.mjs → chunk-WJCP7XMA.mjs} +1 -1
- package/dist/{chunk-2OYPZUYQ.mjs → chunk-ZHHN4Z4L.mjs} +1 -1
- package/dist/cli.mjs +30 -17
- package/dist/{config-wdKtqToL.d.ts → config-B3IiW70I.d.ts} +116 -19
- package/dist/config.d.ts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/{file-QHQDDWXL.mjs → file-P3LR5UV7.mjs} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +9 -9
- package/dist/json.d.ts +2 -2
- package/dist/json.mjs +2 -2
- package/dist/{jsonMacros-LDUD7FP4.mjs → jsonMacros-BXP73WMT.mjs} +3 -3
- package/dist/runtime.mjs +2 -2
- package/dist/{types-Dxi4LfZo.d.ts → types-B6irZnLM.d.ts} +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.mjs +2 -2
- package/dist/volar.mjs +1 -1
- package/modules/analyze-dashboard/assets/echarts.js +2 -2
- package/package.json +8 -8
package/client.d.ts
CHANGED
|
@@ -4,17 +4,32 @@
|
|
|
4
4
|
export {}
|
|
5
5
|
|
|
6
6
|
declare global {
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
type RUNTIME_PLATFORM = MP_PLATFORM | 'web'
|
|
7
|
+
type RUNTIME_PLATFORM = 'weapp' | 'alipay' | 'tt' | 'swan' | 'jd' | 'xhs' | 'web'
|
|
10
8
|
|
|
11
9
|
interface ImportMetaEnv {
|
|
10
|
+
/**
|
|
11
|
+
* 当前运行平台标识。
|
|
12
|
+
* @example
|
|
13
|
+
* if (import.meta.env.PLATFORM === 'weapp') {
|
|
14
|
+
* console.log('WeChat Mini Program')
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
12
17
|
readonly PLATFORM: RUNTIME_PLATFORM
|
|
13
18
|
/**
|
|
14
|
-
*
|
|
19
|
+
* 是否 Web 运行时(H5)。
|
|
20
|
+
* @example
|
|
21
|
+
* if (import.meta.env.IS_WEB) {
|
|
22
|
+
* // web-only logic
|
|
23
|
+
* }
|
|
15
24
|
*/
|
|
16
|
-
readonly MP_PLATFORM: RUNTIME_PLATFORM
|
|
17
25
|
readonly IS_WEB: boolean
|
|
26
|
+
/**
|
|
27
|
+
* 是否小程序运行时。
|
|
28
|
+
* @example
|
|
29
|
+
* if (import.meta.env.IS_MINIPROGRAM) {
|
|
30
|
+
* // miniprogram-only logic
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
18
33
|
readonly IS_MINIPROGRAM: boolean
|
|
19
34
|
}
|
|
20
35
|
|
|
@@ -39,13 +54,10 @@ declare global {
|
|
|
39
54
|
function defineComponentJson(config: __WEAPP_COMPONENT_JSON__): __WEAPP_COMPONENT_JSON__
|
|
40
55
|
}
|
|
41
56
|
|
|
42
|
-
// MP_PLATFORM
|
|
43
|
-
// weapp / swan / alipay / tt / jd / xhs / qq / h5
|
|
44
57
|
declare module 'process' {
|
|
45
58
|
global {
|
|
46
59
|
namespace NodeJS {
|
|
47
60
|
interface ProcessEnv extends Dict<string> {
|
|
48
|
-
MP_PLATFORM: MP_PLATFORM
|
|
49
61
|
PLATFORM: RUNTIME_PLATFORM
|
|
50
62
|
}
|
|
51
63
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CreateResolver } from '../types-
|
|
2
|
-
export { E as ExternalMetadataFileCandidates, O as Options, a as ResolvedValue, R as Resolver,
|
|
1
|
+
import { C as CreateResolver } from '../types-B6irZnLM.js';
|
|
2
|
+
export { E as ExternalMetadataFileCandidates, O as Options, a as ResolvedValue, R as Resolver, b as ResolverFn, c as ResolverMeta, d as ResolverObject } from '../types-B6irZnLM.js';
|
|
3
3
|
|
|
4
4
|
declare const TDesignResolver: CreateResolver;
|
|
5
5
|
|
package/dist/auto-routes.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCompilerContext
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-FT557YAP.mjs";
|
|
4
|
+
import "./chunk-QXZUIKYK.mjs";
|
|
5
|
+
import "./chunk-EQB3HW47.mjs";
|
|
6
|
+
import "./chunk-J3ER3SPH.mjs";
|
|
7
|
+
import "./chunk-WJCP7XMA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
init_esm_shims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QAGDKFIK.mjs";
|
|
11
11
|
|
|
12
12
|
// src/auto-routes.ts
|
|
13
13
|
init_esm_shims();
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__commonJS,
|
|
3
3
|
__toESM,
|
|
4
4
|
init_esm_shims
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QAGDKFIK.mjs";
|
|
6
6
|
|
|
7
7
|
// ../../node_modules/.pnpm/merge@2.1.1/node_modules/merge/lib/src/index.js
|
|
8
8
|
var require_src = __commonJS({
|
|
@@ -303,7 +303,7 @@ async function extractConfigFromVue(vueFilePath) {
|
|
|
303
303
|
const setupContent = descriptor.scriptSetup?.content;
|
|
304
304
|
const hasMacroHint = typeof setupContent === "string" && /\bdefine(?:App|Page|Component)Json\s*\(/.test(setupContent);
|
|
305
305
|
if (hasMacroHint) {
|
|
306
|
-
const { extractJsonMacroFromScriptSetup } = await import("./jsonMacros-
|
|
306
|
+
const { extractJsonMacroFromScriptSetup } = await import("./jsonMacros-BXP73WMT.mjs");
|
|
307
307
|
try {
|
|
308
308
|
const extracted = await extractJsonMacroFromScriptSetup(
|
|
309
309
|
setupContent,
|