fix config
Publish to npm / publish (push) Failing after 8s

This commit is contained in:
2026-08-10 20:37:23 +08:00
parent 78ef6d9ca0
commit 1af5900593
2 changed files with 20 additions and 32 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ export const useSimApi = defineStore('simapi', {
},
actions: {
// 所有方法直接代理到 core
async loadFromFile(file: string = 'config.json'): Promise<void> {
async loadFromFile(file: string = '/config.json'): Promise<void> {
return this._core.loadFromFile(file)
},
@@ -76,8 +76,8 @@ export const useSimApi = defineStore('simapi', {
return this._core.getEndpoint(name)
},
async getVersion(endpointName?: string): Promise<SimApiVersions> {
return this._core.getVersion(endpointName)
async getConfig(reload = false, endpointName?: string): Promise<Map<string, object>> {
return this._core.getConfig(reload, endpointName)
},
},
})