Compare commits

...
2 Commits
Author SHA1 Message Date
xrain 592607f1e2 fix config
Publish to npm / publish (push) Failing after 8s
2026-08-10 20:46:40 +08:00
xrain 7aee4b708d fix config
Publish to npm / publish (push) Failing after 8s
2026-08-10 20:44:33 +08:00
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ export class SimApiCore {
logout_url: '/auth/logout',
login_url: '/auth/login',
}
webConfig: Map<string, Map<string, object>> = new Map();
webConfig: Map<string, Record<string, object>> = new Map();
private api: SimApiApiConfig = {
endpoints: {default: ''},
@@ -213,7 +213,7 @@ export class SimApiCore {
console.log('[DEBUG]', ...args)
}
async getConfig(reload: boolean = false, endpointName: string = 'default'): Promise<Map<string, object>> {
async getConfig(reload: boolean = false, endpointName: string = 'default'): Promise<Record<string, object>> {
if (!this.webConfig.has(endpointName) || reload) {
const versions: SimApiVersions = {
uiApp: typeof AppVersion === 'undefined' ? "0.0.0-develop" : AppVersion,
+2 -1
View File
@@ -11,6 +11,7 @@ export const useSimApi = defineStore('simapi', {
_core: new SimApiCore(),
}),
getters: {
webConfig: state => state._core.webConfig,
IsDebug: state => state._core.isDebug
},
actions: {
@@ -76,7 +77,7 @@ export const useSimApi = defineStore('simapi', {
return this._core.getEndpoint(name)
},
async getConfig(reload = false, endpointName?: string): Promise<Map<string, object>> {
async getConfig(reload = false, endpointName?: string): Promise<Record<string, object>> {
return this._core.getConfig(reload, endpointName)
},
},