Port forward to ts-rs 8.1 (currently: git only; waiting for 8.1.1+) (#2443)

Port forward to ts-rs 8.1

We're just waiting on a release that includes a PR that we sent[1] for this
to use the cargo version. For now we'll have to use the git release.

[1]: c5109a00e4
This commit is contained in:
Paul Tagliamonte
2024-05-22 14:22:07 -04:00
committed by GitHub
parent e94b1bc12a
commit e3b9a6e5d8
8 changed files with 56 additions and 31 deletions

View File

@ -75,6 +75,7 @@ export class CoreDumpManager {
const osinfo: OsInfo = {
platform,
arch,
browser: 'tauri',
version: kernelVersion,
}
return JSON.stringify(osinfo)
@ -89,6 +90,7 @@ export class CoreDumpManager {
platform: userAgent,
arch: userAgent,
version: userAgent,
browser: userAgent,
}
return new Promise((resolve) => resolve(JSON.stringify(osinfo)))
}
@ -96,9 +98,9 @@ export class CoreDumpManager {
const parser = new UAParser(userAgent)
const parserResults = parser.getResult()
const osinfo: OsInfo = {
platform: parserResults.os.name,
arch: parserResults.cpu.architecture,
version: parserResults.os.version,
platform: parserResults.os.name || userAgent,
arch: parserResults.cpu.architecture || userAgent,
version: parserResults.os.version || userAgent,
browser: userAgent,
}
return new Promise((resolve) => resolve(JSON.stringify(osinfo)))