weapp-vite 7.4.0 → 7.6.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/README.md +59 -3
- package/THIRD_PARTY_NOTICES.md +60 -0
- package/bin/bootstrap.js +14 -1
- package/dist/action-B3YZMA-h.mjs +255 -0
- package/dist/action-BELcDNNv.mjs +139 -0
- package/dist/action-BOk3vGI7.mjs +1110 -0
- package/dist/action-DlC6JYpt.mjs +95 -0
- package/dist/action-zEDY7oh_.mjs +247 -0
- package/dist/adapters-CcHrsYaj.mjs +1 -0
- package/dist/analyze-DN79YOAH.mjs +184 -0
- package/dist/artifacts-BOyC9Fy-.mjs +106 -0
- package/dist/assets-C5_YYXNk.mjs +637 -0
- package/dist/auto-import-components/resolvers.mjs +1 -2
- package/dist/auto-import-presets/wevu-router.mjs +1 -2
- package/dist/auto-import-presets/wevu.mjs +1 -2
- package/dist/auto-routes.mjs +2 -1
- package/dist/budget-CTLOHwgI.d.mts +177 -0
- package/dist/budget-EOeEycc_.mjs +65 -0
- package/dist/builtProject-C29udgXY.mjs +541 -0
- package/dist/chunkStrategy-DY_LZIIe.mjs +1448 -0
- package/dist/classifier-DBJY__kg.mjs +88 -0
- package/dist/cli-acceptance.d.mts +1 -0
- package/dist/cli-acceptance.mjs +21 -0
- package/dist/cli.mjs +519 -5049
- package/dist/compatibility.mjs +1 -2
- package/dist/{config-Dbvj5yK7.d.mts → config-Bf6DWhyb.d.mts} +220 -76
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +1 -1
- package/dist/{constants-WOsG3Eqd.mjs → constants-DEZdcsMn.mjs} +1 -1
- package/dist/{createContext-UOEgeYnA.mjs → createCompilerContextInstance-aYwi8wQt.mjs} +36862 -32020
- package/dist/createContext-tApLtII-.mjs +15 -0
- package/dist/dashboard/analyze.d.mts +48 -0
- package/dist/dashboard/analyze.mjs +3 -0
- package/dist/dashboard/vite.d.mts +1 -1
- package/dist/dashboard.d.mts +3 -2
- package/dist/dashboard.mjs +1748 -1
- package/dist/dashboardTransport-C_Y6jMp-.mjs +16 -0
- package/dist/dashboardViteBridge-DCGR43aM.mjs +302 -0
- package/dist/dev-C2fgr_Xd.mjs +67 -0
- package/dist/devProvider-D-hTfsEO.mjs +3027 -0
- package/dist/docs/README.md +59 -3
- package/dist/docs/ai-workflows.md +4 -0
- package/dist/docs/doctor.md +38 -0
- package/dist/docs/getting-started.md +3 -1
- package/dist/docs/index.md +3 -1
- package/dist/docs/mcp.md +104 -1
- package/dist/docs/testing.md +29 -2
- package/dist/docs/troubleshooting.md +16 -0
- package/dist/docs/uni-app-component-libraries.md +8 -7
- package/dist/docs/upload.md +40 -3
- package/dist/docs/vite-plugin.md +171 -0
- package/dist/docs/vue-sfc.md +42 -0
- package/dist/docs/weapp-config.md +54 -0
- package/dist/docs/wevu-authoring.md +10 -0
- package/dist/doctor-worker.d.mts +1 -0
- package/dist/doctor-worker.mjs +60 -0
- package/dist/doctor.d.mts +144 -0
- package/dist/doctor.mjs +850 -0
- package/dist/engine-C66J0HLz.mjs +54 -0
- package/dist/eslint.mjs +1 -2
- package/dist/{file-giE9UMZa.mjs → file-CcIOmqhC.mjs} +58 -24
- package/dist/file-DtcteQ4G.mjs +1 -0
- package/dist/files-BqxFIPRp.mjs +45 -0
- package/dist/forwardConsole-B0Reo8Lf.mjs +511 -0
- package/dist/getInstance-BAIaU2y9.mjs +1 -0
- package/dist/getInstance-Dt9IQDKr.mjs +28 -0
- package/dist/history-BIiRCzbq.mjs +784 -0
- package/dist/i18n.d.mts +1 -1
- package/dist/index-D5rgBzYZ.d.mts +740 -0
- package/dist/index.d.mts +12 -10
- package/dist/index.mjs +3 -2
- package/dist/json.d.mts +1 -1
- package/dist/json.mjs +1 -2
- package/dist/lib-DjccSI1B.mjs +143 -0
- package/dist/lifecycle-C36WSbQS.mjs +413 -0
- package/dist/loadConfig-BWIsDXR4.mjs +59 -0
- package/dist/loadConfig-D-BpBgsk.mjs +1 -0
- package/dist/logBuildAppFinish-ChjwATMv.mjs +57 -0
- package/dist/logger-DGn5iEVN.mjs +1 -0
- package/dist/mcp-CYgX9HpO.mjs +86 -0
- package/dist/{mcp-BG6TliEg.mjs → mcp-Cj8Maqo6.mjs} +16 -7
- package/dist/mcp.d.mts +6 -3
- package/dist/mcp.mjs +1 -2
- package/dist/mcpClient-DVLvFLZv.mjs +287 -0
- package/dist/metadata-hwF7QRcS.mjs +59 -0
- package/dist/nodeEnv-BmH8UZPR.mjs +7 -0
- package/dist/openIde-CroqOgk5.mjs +648 -0
- package/dist/options-jqFwfD1G.mjs +34 -0
- package/dist/package-Cmakyy3J.mjs +4 -0
- package/dist/path-CYYIQGS7.mjs +44 -0
- package/dist/{platform-DTWs5QRi.mjs → platform-CnkySBKz.mjs} +1 -1
- package/dist/processCleanup-BQn2kTcK.mjs +19 -0
- package/dist/protocol-Cg6Jdlvb.mjs +141 -0
- package/dist/reader-sh_POQ9-.mjs +93 -0
- package/dist/realpathScope-Tf9mz-fh.mjs +23 -0
- package/dist/report-hyonPGbZ.mjs +107 -0
- package/dist/resolvedId-CiDl7SC1.mjs +60 -0
- package/dist/{resolvers-icNxkpcy.mjs → resolvers-Dod-euqX.mjs} +4 -1
- package/dist/resolvers.mjs +1 -2
- package/dist/runtime-CLUhQsdA.mjs +43 -0
- package/dist/{runtime-Ee2HY6gR.d.mts → runtime-DpVf714f.d.mts} +1 -1
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.mjs +1 -2
- package/dist/schematics-kO26eQRT.mjs +91 -0
- package/dist/session-D3zsdzIy.mjs +452 -0
- package/dist/test.d.mts +1 -0
- package/dist/test.mjs +204 -45
- package/dist/{types-CgZn5X6j.d.mts → types-D-kfuyVa.d.mts} +1 -2
- package/dist/types-D0FFexRF.d.mts +39 -0
- package/dist/types.d.mts +3 -3
- package/dist/{upload-D0RcEWrq.mjs → upload-DozK8UdN.mjs} +278 -15
- package/dist/upload-worker.mjs +136 -3
- package/dist/utils-Dy51PYAC.mjs +1034 -0
- package/dist/vite.d.mts +9 -0
- package/dist/vite.mjs +309 -0
- package/dist/volar.d.mts +2 -2
- package/dist/web-apis.mjs +1 -2
- package/dist/wxs-BT8btflA.mjs +112 -0
- package/dist/wxs-Z4VQDeJ_.mjs +1 -0
- package/package.json +80 -48
- package/dist/adapters-BwnMMIZR.mjs +0 -2
- package/dist/dashboard-BzaVesmQ.mjs +0 -558
- package/dist/file-D19nbDoN.mjs +0 -2
- package/dist/getInstance-CYF1vl5l.mjs +0 -2
- package/dist/index-DbqVupg0.d.mts +0 -246
- package/dist/logger-mt4mSTqV.mjs +0 -2
package/dist/test.mjs
CHANGED
|
@@ -1,82 +1,241 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { m as captureWatchDependencies, u as CompilerSession } from "./createCompilerContextInstance-aYwi8wQt.mjs";
|
|
2
|
+
import { a as parseSidecarModuleId, i as parseLogicalEntryId } from "./protocol-Cg6Jdlvb.mjs";
|
|
3
|
+
import { Q as chokidar_default } from "./devProvider-D-hTfsEO.mjs";
|
|
4
|
+
import { n as normalizePath, t as isPathInside } from "./path-CYYIQGS7.mjs";
|
|
3
5
|
import process from "node:process";
|
|
4
|
-
import
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import fs from "node:fs/promises";
|
|
8
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
9
|
+
//#region src/testArtifact/inputs.ts
|
|
10
|
+
const sessionId = randomUUID();
|
|
11
|
+
const excludedDirectories = /* @__PURE__ */ new Set([
|
|
12
|
+
".git",
|
|
13
|
+
".weapp-vite",
|
|
14
|
+
"node_modules"
|
|
15
|
+
]);
|
|
16
|
+
function resolveArtifactOutDir(cwd, options, generation = randomUUID()) {
|
|
17
|
+
if (options.outDir) return path.resolve(cwd, options.outDir);
|
|
18
|
+
const key = createHash("sha256").update(JSON.stringify({
|
|
19
|
+
configFile: options.configFile && path.resolve(cwd, options.configFile),
|
|
20
|
+
mode: options.mode ?? "test",
|
|
21
|
+
projectConfigPath: options.projectConfigPath && path.resolve(cwd, options.projectConfigPath),
|
|
22
|
+
skipNpm: options.skipNpm ?? false
|
|
23
|
+
})).digest("hex").slice(0, 16);
|
|
24
|
+
return path.join(cwd, ".weapp-vite/test-artifacts", `${process.pid}-${sessionId}`, key, generation);
|
|
25
|
+
}
|
|
26
|
+
function projectInputFiles(cwd) {
|
|
27
|
+
return [
|
|
28
|
+
...[
|
|
29
|
+
"vite.config",
|
|
30
|
+
"weapp-vite.config",
|
|
31
|
+
"vitest.config"
|
|
32
|
+
].flatMap((name) => [
|
|
33
|
+
"ts",
|
|
34
|
+
"mts",
|
|
35
|
+
"cts",
|
|
36
|
+
"js",
|
|
37
|
+
"mjs",
|
|
38
|
+
"cjs"
|
|
39
|
+
].map((ext) => `${name}.${ext}`)),
|
|
40
|
+
"package.json",
|
|
41
|
+
"pnpm-lock.yaml",
|
|
42
|
+
"package-lock.json",
|
|
43
|
+
"yarn.lock",
|
|
44
|
+
"tsconfig.json",
|
|
45
|
+
"project.config.json"
|
|
46
|
+
].map((file) => path.join(cwd, file));
|
|
47
|
+
}
|
|
48
|
+
/** 对真实输入及目录成员取内容摘要,覆盖同长度改写、新增路由和删除文件。 */
|
|
49
|
+
async function fingerprintPaths(paths, excluded = []) {
|
|
50
|
+
const hash = createHash("sha256");
|
|
51
|
+
const visited = /* @__PURE__ */ new Set();
|
|
52
|
+
const ignored = excluded.map((file) => path.resolve(file));
|
|
53
|
+
const visit = async (file) => {
|
|
54
|
+
if (ignored.some((root) => file === root || file.startsWith(`${root}${path.sep}`))) return;
|
|
55
|
+
hash.update(`${file}\0`);
|
|
56
|
+
try {
|
|
57
|
+
if ((await fs.stat(file)).isDirectory()) {
|
|
58
|
+
const real = await fs.realpath(file);
|
|
59
|
+
if (visited.has(real)) return;
|
|
60
|
+
visited.add(real);
|
|
61
|
+
const entries = await fs.readdir(file, { withFileTypes: true });
|
|
62
|
+
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) if (!excludedDirectories.has(entry.name)) await visit(path.join(file, entry.name));
|
|
63
|
+
} else hash.update(await fs.readFile(file));
|
|
64
|
+
} catch (error) {
|
|
65
|
+
if (error.code !== "ENOENT") throw error;
|
|
66
|
+
hash.update("missing");
|
|
67
|
+
}
|
|
68
|
+
hash.update("\0");
|
|
69
|
+
};
|
|
70
|
+
for (const file of [...new Set(paths)].sort()) await visit(path.resolve(file));
|
|
71
|
+
return hash.digest("hex");
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
5
74
|
//#region src/testArtifact.ts
|
|
6
75
|
let pendingBuild = Promise.resolve();
|
|
76
|
+
const artifactInputs = /* @__PURE__ */ new WeakMap();
|
|
7
77
|
function enqueueBuild(task) {
|
|
8
78
|
const result = pendingBuild.then(task, task);
|
|
9
79
|
pendingBuild = result.then(() => void 0, () => void 0);
|
|
10
80
|
return result;
|
|
11
81
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
82
|
+
async function isTestArtifactCurrent(artifact) {
|
|
83
|
+
const inputs = artifactInputs.get(artifact);
|
|
84
|
+
return inputs !== void 0 && inputs.fingerprint === await fingerprintPaths(inputs.paths);
|
|
14
85
|
}
|
|
15
86
|
async function buildTestArtifact(options = {}) {
|
|
16
87
|
return await enqueueBuild(async () => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
88
|
+
const session = new CompilerSession();
|
|
89
|
+
try {
|
|
90
|
+
const cwd = path.resolve(options.cwd ?? process.cwd());
|
|
91
|
+
const outDir = resolveArtifactOutDir(cwd, options);
|
|
92
|
+
const dependencies = new Set(projectInputFiles(cwd));
|
|
93
|
+
const discoveredInputs = /* @__PURE__ */ new Map();
|
|
94
|
+
const inlineConfig = {
|
|
95
|
+
plugins: [captureWatchDependencies((file) => {
|
|
96
|
+
dependencies.add(file);
|
|
97
|
+
if (!discoveredInputs.has(file)) discoveredInputs.set(file, fingerprintPaths([file]));
|
|
98
|
+
}), {
|
|
99
|
+
name: "weapp-vite:test-artifact-inputs",
|
|
100
|
+
generateBundle() {
|
|
101
|
+
for (const file of this.getModuleIds()) {
|
|
102
|
+
const clean = (parseLogicalEntryId(file)?.sourceId ?? parseSidecarModuleId(file)?.ownerId ?? file).split("?")[0];
|
|
103
|
+
if (path.isAbsolute(clean)) {
|
|
104
|
+
dependencies.add(clean);
|
|
105
|
+
for (const dependency of session.context.moduleGraphService.getTransformDependencies(clean)) dependencies.add(dependency);
|
|
106
|
+
for (const dependency of session.context.moduleGraphService.getEntryDependencies(clean)) dependencies.add(dependency.sourceId);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}],
|
|
111
|
+
build: {
|
|
112
|
+
emptyOutDir: true,
|
|
113
|
+
outDir
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
const ctx = await session.initialize({
|
|
117
|
+
cwd,
|
|
118
|
+
mode: options.mode ?? "test",
|
|
119
|
+
isDev: false,
|
|
120
|
+
configFile: options.configFile,
|
|
121
|
+
inlineConfig,
|
|
122
|
+
outputRoot: outDir,
|
|
123
|
+
projectConfigPath: options.projectConfigPath,
|
|
124
|
+
emitDefaultAutoImportOutputs: false,
|
|
125
|
+
preloadAppEntry: false,
|
|
126
|
+
syncSupportFiles: false
|
|
127
|
+
});
|
|
128
|
+
for (const file of ctx.configService.configFileDependencies ?? []) dependencies.add(file);
|
|
129
|
+
if (options.projectConfigPath) dependencies.add(path.resolve(cwd, options.projectConfigPath));
|
|
130
|
+
dependencies.add(ctx.configService.absoluteSrcRoot);
|
|
131
|
+
const initialInputs = [...dependencies];
|
|
132
|
+
const before = await fingerprintPaths(initialInputs, [outDir]);
|
|
133
|
+
await session.run(() => ctx.buildService.build({ skipNpm: options.skipNpm }));
|
|
134
|
+
const artifact = {
|
|
135
|
+
appConfigPath: path.join(ctx.configService.outDir, "app.json"),
|
|
136
|
+
miniprogramRootPath: ctx.configService.outDir,
|
|
137
|
+
projectPath: cwd,
|
|
138
|
+
sourceRootPath: ctx.configService.absoluteSrcRoot
|
|
139
|
+
};
|
|
140
|
+
const paths = [...dependencies, outDir];
|
|
141
|
+
const fingerprint = await fingerprintPaths(paths);
|
|
142
|
+
const stable = (await Promise.all([...discoveredInputs].map(async ([file, fingerprint]) => await fingerprint === await fingerprintPaths([file])))).every(Boolean) && before === await fingerprintPaths(initialInputs, [outDir]);
|
|
143
|
+
artifactInputs.set(artifact, {
|
|
144
|
+
paths,
|
|
145
|
+
fingerprint: stable ? fingerprint : ""
|
|
146
|
+
});
|
|
147
|
+
return artifact;
|
|
148
|
+
} finally {
|
|
149
|
+
await session.close();
|
|
150
|
+
}
|
|
42
151
|
});
|
|
43
152
|
}
|
|
44
153
|
async function watchTestArtifact(options = {}) {
|
|
45
154
|
let artifact = await buildTestArtifact(options);
|
|
46
155
|
let closed = false;
|
|
47
156
|
let scheduled;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
157
|
+
let active;
|
|
158
|
+
let dirty = false;
|
|
159
|
+
let forced = false;
|
|
160
|
+
let closing;
|
|
161
|
+
const watchedInputs = () => [...new Map(artifactInputs.get(artifact).paths.map((file) => [normalizePath(file), file])).values()].filter((file) => !isPathInside(artifact.miniprogramRootPath, file) && (normalizePath(file) === normalizePath(artifact.sourceRootPath) || !isPathInside(artifact.sourceRootPath, file)));
|
|
162
|
+
let watched = watchedInputs();
|
|
163
|
+
const watcher = chokidar_default.watch(watched, {
|
|
164
|
+
ignoreInitial: true,
|
|
165
|
+
ignored(file) {
|
|
166
|
+
if (watched.some((input) => isPathInside(file, input))) return false;
|
|
167
|
+
return /[/\\](?:node_modules|\.git|\.weapp-vite)(?:[/\\]|$)/.test(file) || isPathInside(artifact.miniprogramRootPath, file);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
const requestRebuild = (force) => {
|
|
171
|
+
if (closed) return Promise.reject(/* @__PURE__ */ new Error("The weapp-vite test artifact watcher has already closed."));
|
|
172
|
+
dirty = true;
|
|
173
|
+
forced ||= force;
|
|
174
|
+
if (!active) active = (async () => {
|
|
175
|
+
do {
|
|
176
|
+
dirty = false;
|
|
177
|
+
const forceBuild = forced;
|
|
178
|
+
forced = false;
|
|
179
|
+
if (!forceBuild && await isTestArtifactCurrent(artifact)) continue;
|
|
180
|
+
if (closed) break;
|
|
181
|
+
artifact = await buildTestArtifact(options);
|
|
182
|
+
if (!closed) {
|
|
183
|
+
const next = watchedInputs();
|
|
184
|
+
await watcher.unwatch(watched.filter((file) => !next.includes(file)));
|
|
185
|
+
watched = next;
|
|
186
|
+
watcher.add(watched);
|
|
187
|
+
await options.onRebuilt?.(artifact);
|
|
188
|
+
}
|
|
189
|
+
if (closed) break;
|
|
190
|
+
} while (dirty);
|
|
191
|
+
return artifact;
|
|
192
|
+
})().finally(() => {
|
|
193
|
+
active = void 0;
|
|
194
|
+
});
|
|
195
|
+
return active;
|
|
53
196
|
};
|
|
54
197
|
const scheduleRebuild = () => {
|
|
55
198
|
if (closed || scheduled) return;
|
|
56
199
|
scheduled = setTimeout(() => {
|
|
57
200
|
scheduled = void 0;
|
|
58
|
-
|
|
201
|
+
requestRebuild(false).catch((error) => {
|
|
202
|
+
if (!closed) options.onError?.(error);
|
|
203
|
+
});
|
|
59
204
|
}, 20);
|
|
60
205
|
};
|
|
61
|
-
const watcher = chokidar.watch(artifact.sourceRootPath, {
|
|
62
|
-
ignoreInitial: true,
|
|
63
|
-
ignored: [artifact.miniprogramRootPath]
|
|
64
|
-
});
|
|
65
206
|
watcher.on("add", scheduleRebuild);
|
|
66
207
|
watcher.on("change", scheduleRebuild);
|
|
67
208
|
watcher.on("unlink", scheduleRebuild);
|
|
209
|
+
watcher.on("error", (error) => options.onError?.(error));
|
|
210
|
+
try {
|
|
211
|
+
await new Promise((resolve, reject) => {
|
|
212
|
+
watcher.once("ready", resolve);
|
|
213
|
+
watcher.once("error", reject);
|
|
214
|
+
});
|
|
215
|
+
if (!await isTestArtifactCurrent(artifact)) await requestRebuild(false);
|
|
216
|
+
} catch (error) {
|
|
217
|
+
closed = true;
|
|
218
|
+
if (scheduled) clearTimeout(scheduled);
|
|
219
|
+
await watcher.close();
|
|
220
|
+
await active?.catch(() => void 0);
|
|
221
|
+
throw error;
|
|
222
|
+
}
|
|
68
223
|
return {
|
|
69
224
|
get artifact() {
|
|
70
225
|
return artifact;
|
|
71
226
|
},
|
|
72
|
-
|
|
73
|
-
if (
|
|
227
|
+
close() {
|
|
228
|
+
if (closing) return closing;
|
|
74
229
|
closed = true;
|
|
75
230
|
if (scheduled) clearTimeout(scheduled);
|
|
76
|
-
|
|
231
|
+
closing = (async () => {
|
|
232
|
+
await watcher.close();
|
|
233
|
+
await active?.catch(() => void 0);
|
|
234
|
+
})();
|
|
235
|
+
return closing;
|
|
77
236
|
},
|
|
78
|
-
rebuild
|
|
237
|
+
rebuild: () => requestRebuild(true)
|
|
79
238
|
};
|
|
80
239
|
}
|
|
81
240
|
//#endregion
|
|
82
|
-
export { buildTestArtifact, watchTestArtifact };
|
|
241
|
+
export { buildTestArtifact, isTestArtifactCurrent, watchTestArtifact };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//#region src/analyze/glassEasel/types.d.ts
|
|
2
|
+
type GlassEaselDiagnosticCode = 'GE001' | 'GE002' | 'GE003' | 'GE004' | 'GE005' | 'GE006';
|
|
3
|
+
type GlassEaselDiagnosticSeverity = 'error' | 'warning';
|
|
4
|
+
interface GlassEaselDiagnostic {
|
|
5
|
+
code: GlassEaselDiagnosticCode;
|
|
6
|
+
severity: GlassEaselDiagnosticSeverity;
|
|
7
|
+
message: string;
|
|
8
|
+
file: string;
|
|
9
|
+
line?: number;
|
|
10
|
+
column?: number;
|
|
11
|
+
normalized?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** 每个 source/output owner 的最近分析事实;日志去重状态不属于当前事实。 */
|
|
14
|
+
interface GlassEaselAnalysisFact {
|
|
15
|
+
kind: 'output' | 'source';
|
|
16
|
+
scope?: string;
|
|
17
|
+
detected: boolean;
|
|
18
|
+
diagnostics: Map<string, GlassEaselDiagnostic>;
|
|
19
|
+
sourceIds: Set<string>;
|
|
20
|
+
}
|
|
21
|
+
interface GlassEaselAnalyzeResult {
|
|
22
|
+
detected: boolean;
|
|
23
|
+
minimumBaseLibrary: '3.8.12';
|
|
24
|
+
migrationGuide: string;
|
|
25
|
+
diagnostics: GlassEaselDiagnostic[];
|
|
26
|
+
summary: {
|
|
27
|
+
errors: number;
|
|
28
|
+
warnings: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface GlassEaselTemplateFinding {
|
|
32
|
+
code: Extract<GlassEaselDiagnosticCode, 'GE002' | 'GE003' | 'GE004'>;
|
|
33
|
+
severity: GlassEaselDiagnosticSeverity;
|
|
34
|
+
message: string;
|
|
35
|
+
start: number;
|
|
36
|
+
normalized?: boolean;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { GlassEaselAnalyzeResult as n, GlassEaselTemplateFinding as r, GlassEaselAnalysisFact as t };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as Resolver } from "./index-CaXAtb9e.mjs";
|
|
2
2
|
import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-C7fCmf92.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { t as WeappI18nConfig } from "./types-
|
|
5
|
-
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, type ComputedDefinitions, type ConfigEnv, CopyGlobs, CopyOptions, DeprecatedInlineDynamicImports, EnhanceOptions, EnhanceWxmlOptions, Entry, EntryJsonFragment, GenerateDirsOptions, GenerateExtensionsOptions, GenerateFileType, GenerateFilenamesOptions, GenerateOptions, GenerateTemplate, GenerateTemplateContext, GenerateTemplateEntry, GenerateTemplateFactory, GenerateTemplateFileSource, GenerateTemplateInlineSource, GenerateTemplateScope, GenerateTemplatesConfig, HandleWxmlOptions, type InlineConfig, JsFormat, JsonConfig, JsonMergeContext, JsonMergeFunction, JsonMergeStage, JsonMergeStrategy, type MethodDefinitions, MpPlatform, MultiPlatformConfig, MultiPlatformProjectConfig, MultiPlatformProjectConfigs, NpmBuildOptions, NpmDependencyPattern, NpmMainPackageConfig, NpmPackageFilesConfig, NpmPluginPackageConfig, NpmStrategy, NpmSubPackageConfig, PageEntry, type Plugin, type PluginOption, ProjectConfig, type Ref, ResolvedAlias, type ResolvedConfig, type Resolver, type RolldownBuild, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatchOptions, type RolldownWatcher, ScanComponentItem, ScanWxmlOptions, SharedChunkDynamicImports, SharedChunkMode, SharedChunkOverride, SharedChunkStrategy, StyleConfigEntry, StyleConfigObject, StyleEntry, StyleScope, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, type ViteDevServer, WeappAnalyzeBudgetConfig, WeappAnalyzeConfig, WeappAnalyzeHistoryConfig, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappBuildScopeConfig, WeappBuildScopeObjectConfig, type WeappCompilerHmrAsset, type WeappCompilerHmrPreparation, type WeappCompilerHmrRequest, WeappCompilerOutputRequest, WeappCompilerPlugin, WeappCompilerPluginCapabilities, WeappCompilerPluginContext, WeappCompilerPluginController, WeappCompilerPluginFactory, WeappCompilerPluginOption, WeappCompilerPluginPhase, WeappCompilerResourceKind, WeappCompilerSourceClaim, WeappCompilerSourceRequest, WeappCompilerTransformResult, WeappDebugConfig, WeappForwardConsoleConfig, WeappForwardConsoleLogLevel, WeappHmrConfig, type WeappI18nConfig, WeappInjectRequestGlobalsConfig, WeappInjectRequestGlobalsTarget, WeappInjectWeapiConfig, WeappInjectWebRuntimeGlobalsConfig, WeappInjectWebRuntimeGlobalsTarget, WeappLibComponentJson, WeappLibConfig, WeappLibDtsOptions, WeappLibEntryContext, WeappLibFileName, WeappLibInternalDtsOptions, WeappLibVueTscOptions, WeappManagedAppTsconfigConfig, WeappManagedNodeTsconfigConfig, WeappManagedServerTsconfigConfig, WeappManagedSharedTsconfigConfig, WeappManagedTypeScriptConfig, WeappMcpConfig, WeappNpmConfig, WeappPreloadNetwork, WeappPreloadRule, WeappReactCompilerConfig, WeappReactConfig, WeappRequestRuntimeConfig, WeappRouteRule, WeappRouteRules, WeappSubPackageConfig, WeappTailwindcssOptions, WeappUniAppConfig, WeappUploadConfig, WeappViteConfig, type WeappViteHostMeta, WeappVitePluginApi, type WeappViteRuntime, WeappVueConfig, WeappVueTemplateConfig, WeappWebConfig, WeappWebRuntimeConfig, WeappWevuConfig, WeappWorkerConfig, WxmlAttribute, WxmlAttributeValue, WxmlDep, WxmlElementInfo, WxmlRemoveAttrRule, WxmlRemoveOptions, WxmlSourceLocation, WxmlTransform, WxmlTransformContext, WxmlTransformNode, WxmlTransformResult, WxmlTransformVisitor, WxmlValidate, WxmlValidationContext, WxmlValidationDiagnostic, WxmlValidationVisitor };
|
|
3
|
+
import { $ as WeappCompilerOutputRequest, $n as NpmPackageFilesConfig, $t as WeappUniAppConfig, A as Ref, An as GenerateDirsOptions, At as WeappAppPreludeConfig, B as BindingErrorLike, Bn as GenerateTemplateInlineSource, Br as WeappViteRuntime, Bt as WeappInjectWeapiConfig, Cn as AliasOptions, Cr as WeappLibVueTscOptions, Ct as AutoImportComponents, D as MethodDefinitions, Dn as CopyGlobs, Dr as WeappManagedSharedTsconfigConfig, Dt as HandleWxmlOptions, E as InlineConfig, En as ChunksConfig, Er as WeappManagedServerTsconfigConfig, Et as EnhanceWxmlOptions, F as RolldownPlugin, Fn as GenerateTemplate, Ft as WeappBuildScopeConfig, G as EntryJsonFragment, Gn as JsonMergeContext, Gt as WeappPreloadNetwork, H as BaseEntry, Hn as GenerateTemplatesConfig, Ht as WeappInjectWebRuntimeGlobalsTarget, I as RolldownPluginOption, In as GenerateTemplateContext, It as WeappBuildScopeObjectConfig, J as ScanComponentItem, Jn as JsonMergeStrategy, Jt as WeappReactConfig, K as PageEntry, Kn as JsonMergeFunction, Kt as WeappPreloadRule, L as RolldownWatchOptions, Ln as GenerateTemplateEntry, Lt as WeappHmrConfig, M as RolldownBuild, Mn as GenerateFileType, Mt as WeappAutoRoutesConfig, N as RolldownOptions, Nn as GenerateFilenamesOptions, Nt as WeappAutoRoutesInclude, O as Plugin, On as CopyOptions, Or as WeappManagedTypeScriptConfig, Ot as MultiPlatformConfig, P as RolldownOutput, Pn as GenerateOptions, Pt as WeappAutoRoutesIncludePattern, Q as WeappCompilerHmrRequest, Qn as NpmMainPackageConfig, Qt as WeappSubPackageConfig, R as RolldownWatcher, Rn as GenerateTemplateFactory, Rt as WeappInjectRequestGlobalsConfig, Sn as Alias, Sr as WeappLibInternalDtsOptions, St as WeappViteConfig, T as ConfigEnv, Tn as BuildNpmPackageMeta, Tr as WeappManagedNodeTsconfigConfig, Tt as EnhanceOptions, U as ComponentEntry, Un as JsFormat, Ut as WeappMcpConfig, V as AppEntry, Vn as GenerateTemplateScope, Vt as WeappInjectWebRuntimeGlobalsConfig, W as Entry, Wn as JsonConfig, Wt as WeappNpmConfig, X as WeappCompilerHmrAsset, Xn as NpmBuildOptions, Xt as WeappRouteRule, Y as WxmlDep, Yn as MpPlatform, Yt as WeappRequestRuntimeConfig, Z as WeappCompilerHmrPreparation, Zn as NpmDependencyPattern, Zt as WeappRouteRules, _n as WxmlTransformNode, _r as WeappLibComponentJson, _t as WeappDebugConfig, an as WxmlRemoveAttrRule, ar as SharedChunkMode, at as WeappCompilerPluginOption, b as ChangeEvent, bn as MultiPlatformProjectConfig, br as WeappLibEntryContext, bt as WeappTailwindcssOptions, cn as WxmlValidationContext, cr as StyleConfigEntry, ct as WeappCompilerSourceClaim, dn as WxmlAttribute, dr as StyleScope, dt as ProjectConfig, en as WeappVueConfig, er as NpmPluginPackageConfig, et as WeappCompilerPlugin, fn as WxmlAttributeValue, fr as SubPackage, ft as SubPackageMetaValue, gn as WxmlTransformContext, gr as SubPackageStyleScope, gt as WeappAnalyzeHistoryConfig, hn as WxmlTransform, hr as SubPackageStyleEntry, ht as WeappAnalyzeConfig, in as WeappWorkerConfig, ir as SharedChunkDynamicImports, it as WeappCompilerPluginFactory, j as ResolvedConfig, jn as GenerateExtensionsOptions, jr as WeappViteHostMeta, jt as WeappAppPreludeMode, k as PluginOption, kn as DeprecatedInlineDynamicImports, kr as WeappWebConfig, kt as ScanWxmlOptions, ln as WxmlValidationDiagnostic, lr as StyleConfigObject, lt as WeappCompilerSourceRequest, mn as WxmlSourceLocation, mr as SubPackageStyleConfigObject, mt as WeappAnalyzeBudgetConfig, nn as WeappWebRuntimeConfig, nr as NpmSubPackageConfig, nt as WeappCompilerPluginContext, on as WxmlRemoveOptions, or as SharedChunkOverride, ot as WeappCompilerPluginPhase, pn as WxmlElementInfo, pr as SubPackageStyleConfigEntry, pt as UserConfig, q as ComponentsMap, qn as JsonMergeStage, qt as WeappReactCompilerConfig, rn as WeappWevuConfig, rr as ResolvedAlias, rt as WeappCompilerPluginController, sn as WxmlValidate, sr as SharedChunkStrategy, st as WeappCompilerResourceKind, tn as WeappVueTemplateConfig, tr as NpmStrategy, tt as WeappCompilerPluginCapabilities, un as WxmlValidationVisitor, ur as StyleEntry, ut as WeappCompilerTransformResult, vn as WxmlTransformResult, vr as WeappLibConfig, vt as WeappForwardConsoleConfig, w as ComputedDefinitions, wn as AlipayNpmMode, wr as WeappManagedAppTsconfigConfig, wt as AutoImportComponentsOption, x as WeappVitePluginApi, xn as MultiPlatformProjectConfigs, xr as WeappLibFileName, xt as WeappUploadConfig, yn as WxmlTransformVisitor, yr as WeappLibDtsOptions, yt as WeappForwardConsoleLogLevel, z as ViteDevServer, zn as GenerateTemplateFileSource, zt as WeappInjectRequestGlobalsTarget } from "./config-Bf6DWhyb.mjs";
|
|
4
|
+
import { t as WeappI18nConfig } from "./types-D-kfuyVa.mjs";
|
|
5
|
+
export { Alias, AliasOptions, AlipayNpmMode, AppEntry, AutoImportComponents, AutoImportComponentsOption, AutoRoutes, AutoRoutesSubPackage, BaseEntry, BindingErrorLike, BuildNpmPackageMeta, ChangeEvent, ChunksConfig, ComponentEntry, ComponentsMap, type ComputedDefinitions, type ConfigEnv, CopyGlobs, CopyOptions, DeprecatedInlineDynamicImports, EnhanceOptions, EnhanceWxmlOptions, Entry, EntryJsonFragment, GenerateDirsOptions, GenerateExtensionsOptions, GenerateFileType, GenerateFilenamesOptions, GenerateOptions, GenerateTemplate, GenerateTemplateContext, GenerateTemplateEntry, GenerateTemplateFactory, GenerateTemplateFileSource, GenerateTemplateInlineSource, GenerateTemplateScope, GenerateTemplatesConfig, HandleWxmlOptions, type InlineConfig, JsFormat, type JsonConfig, type JsonMergeContext, type JsonMergeFunction, type JsonMergeStage, type JsonMergeStrategy, type MethodDefinitions, MpPlatform, MultiPlatformConfig, MultiPlatformProjectConfig, MultiPlatformProjectConfigs, NpmBuildOptions, NpmDependencyPattern, NpmMainPackageConfig, NpmPackageFilesConfig, NpmPluginPackageConfig, NpmStrategy, NpmSubPackageConfig, PageEntry, type Plugin, type PluginOption, ProjectConfig, type Ref, ResolvedAlias, type ResolvedConfig, type Resolver, type RolldownBuild, type RolldownOptions, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatchOptions, type RolldownWatcher, ScanComponentItem, ScanWxmlOptions, SharedChunkDynamicImports, SharedChunkMode, SharedChunkOverride, SharedChunkStrategy, StyleConfigEntry, StyleConfigObject, StyleEntry, StyleScope, SubPackage, SubPackageMetaValue, SubPackageStyleConfigEntry, SubPackageStyleConfigObject, SubPackageStyleEntry, SubPackageStyleScope, UserConfig, type ViteDevServer, WeappAnalyzeBudgetConfig, WeappAnalyzeConfig, WeappAnalyzeHistoryConfig, WeappAppPreludeConfig, WeappAppPreludeMode, WeappAutoRoutesConfig, WeappAutoRoutesInclude, WeappAutoRoutesIncludePattern, WeappBuildScopeConfig, WeappBuildScopeObjectConfig, type WeappCompilerHmrAsset, type WeappCompilerHmrPreparation, type WeappCompilerHmrRequest, WeappCompilerOutputRequest, WeappCompilerPlugin, WeappCompilerPluginCapabilities, WeappCompilerPluginContext, WeappCompilerPluginController, WeappCompilerPluginFactory, WeappCompilerPluginOption, WeappCompilerPluginPhase, WeappCompilerResourceKind, WeappCompilerSourceClaim, WeappCompilerSourceRequest, WeappCompilerTransformResult, WeappDebugConfig, WeappForwardConsoleConfig, WeappForwardConsoleLogLevel, WeappHmrConfig, type WeappI18nConfig, WeappInjectRequestGlobalsConfig, WeappInjectRequestGlobalsTarget, WeappInjectWeapiConfig, WeappInjectWebRuntimeGlobalsConfig, WeappInjectWebRuntimeGlobalsTarget, WeappLibComponentJson, WeappLibConfig, WeappLibDtsOptions, WeappLibEntryContext, WeappLibFileName, WeappLibInternalDtsOptions, WeappLibVueTscOptions, WeappManagedAppTsconfigConfig, WeappManagedNodeTsconfigConfig, WeappManagedServerTsconfigConfig, WeappManagedSharedTsconfigConfig, WeappManagedTypeScriptConfig, WeappMcpConfig, WeappNpmConfig, WeappPreloadNetwork, WeappPreloadRule, WeappReactCompilerConfig, WeappReactConfig, WeappRequestRuntimeConfig, WeappRouteRule, WeappRouteRules, WeappSubPackageConfig, WeappTailwindcssOptions, WeappUniAppConfig, WeappUploadConfig, WeappViteConfig, type WeappViteHostMeta, WeappVitePluginApi, type WeappViteRuntime, WeappVueConfig, WeappVueTemplateConfig, WeappWebConfig, WeappWebRuntimeConfig, WeappWevuConfig, WeappWorkerConfig, WxmlAttribute, WxmlAttributeValue, WxmlDep, WxmlElementInfo, WxmlRemoveAttrRule, WxmlRemoveOptions, WxmlSourceLocation, WxmlTransform, WxmlTransformContext, WxmlTransformNode, WxmlTransformResult, WxmlTransformVisitor, WxmlValidate, WxmlValidationContext, WxmlValidationDiagnostic, WxmlValidationVisitor };
|