fix(desktop): wails3 绑定 .js→.ts + 实机验证通过
wails3 build 重新生成绑定为 TypeScript(比 standalone generate 的 .js 更规范, tsconfig allowJs 保留以兼容两种)。整体迁移实机验证: - wails3 build 全过(前端 build → 绑定生成 → go build -tags production 原生编译 → 打包) - 原生二进制 bin/sundynix_desktop 启动,窗口开、进程稳、日志无 error/panic - app 前端加载后自动登录(持久态)并打通后端:gateway 收到 /spaces/current、 /me/spaces、/me/tenants、/stats/overview、/runs、/health 一整串鉴权请求全 200 - runtime 版本号不一致(npm alpha.97 vs CLI alpha2.117)未导致问题 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+6
-19
@@ -1,4 +1,3 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
@@ -11,52 +10,40 @@
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: Unused imports
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
|
||||
import { Call as $Call, CancellablePromise as $CancellablePromise } from "@wailsio/runtime";
|
||||
|
||||
/**
|
||||
* Notify 弹一条系统通知(best-effort:macOS 用 osascript,其它平台暂静默)。
|
||||
* @param {string} title
|
||||
* @param {string} body
|
||||
* @returns {$CancellablePromise<void>}
|
||||
*/
|
||||
export function Notify(title, body) {
|
||||
export function Notify(title: string, body: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(2739682372, title, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* OpenReport 把报告下载到临时目录,并用系统默认应用(Word/Pages/WPS)打开。
|
||||
* @param {string} url
|
||||
* @param {string} filename
|
||||
* @returns {$CancellablePromise<void>}
|
||||
*/
|
||||
export function OpenReport(url, filename) {
|
||||
export function OpenReport(url: string, filename: string): $CancellablePromise<void> {
|
||||
return $Call.ByID(802670751, url, filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ping 供前端探活 Go 桥是否就绪。
|
||||
* @returns {$CancellablePromise<string>}
|
||||
*/
|
||||
export function Ping() {
|
||||
export function Ping(): $CancellablePromise<string> {
|
||||
return $Call.ByID(1003072145);
|
||||
}
|
||||
|
||||
/**
|
||||
* ReadLocalFile 读取本地文件内容(本地文件系统 I/O)。
|
||||
* @param {string} path
|
||||
* @returns {$CancellablePromise<string>}
|
||||
*/
|
||||
export function ReadLocalFile(path) {
|
||||
export function ReadLocalFile(path: string): $CancellablePromise<string> {
|
||||
return $Call.ByID(4016121990, path);
|
||||
}
|
||||
|
||||
/**
|
||||
* SaveReportAs 弹原生"另存为"对话框,把 url 指向的报告(.docx)下载到用户选定路径。
|
||||
* 返回保存路径;用户取消则返回空串。
|
||||
* @param {string} url
|
||||
* @param {string} filename
|
||||
* @returns {$CancellablePromise<string>}
|
||||
*/
|
||||
export function SaveReportAs(url, filename) {
|
||||
export function SaveReportAs(url: string, filename: string): $CancellablePromise<string> {
|
||||
return $Call.ByID(1437856486, url, filename);
|
||||
}
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
Reference in New Issue
Block a user