mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
Remove the early bootstrap node def loading for now.
This commit is contained in:
@@ -45,9 +45,6 @@ const firebaseApp = initializeApp(getFirebaseConfig())
|
|||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
const pinia = createPinia()
|
const pinia = createPinia()
|
||||||
|
|
||||||
// Start early bootstrap (api.init, fetchNodeDefs) before Pinia is registered
|
|
||||||
const bootstrapStore = useBootstrapStore(pinia)
|
|
||||||
bootstrapStore.startEarlyBootstrap()
|
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
app,
|
app,
|
||||||
dsn: __SENTRY_DSN__,
|
dsn: __SENTRY_DSN__,
|
||||||
@@ -93,7 +90,7 @@ app
|
|||||||
modules: [VueFireAuth()]
|
modules: [VueFireAuth()]
|
||||||
})
|
})
|
||||||
|
|
||||||
// Start store bootstrap (settings, i18n, workflows) after Pinia is registered
|
const bootstrapStore = useBootstrapStore(pinia)
|
||||||
void bootstrapStore.startStoreBootstrap()
|
void bootstrapStore.startStoreBootstrap()
|
||||||
|
|
||||||
app.mount('#vue-app')
|
app.mount('#vue-app')
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ vi.mock('@/platform/settings/settingStore', () => ({
|
|||||||
load: vi.fn(() => {
|
load: vi.fn(() => {
|
||||||
mockIsSettingsReady.value = true
|
mockIsSettingsReady.value = true
|
||||||
}),
|
}),
|
||||||
isReady: mockIsSettingsReady,
|
get isReady() {
|
||||||
|
return mockIsSettingsReady.value
|
||||||
|
},
|
||||||
isLoading: ref(false),
|
isLoading: ref(false),
|
||||||
error: ref(undefined)
|
error: ref(undefined)
|
||||||
}))
|
}))
|
||||||
@@ -40,6 +42,13 @@ vi.mock('@/platform/workflow/management/stores/workflowStore', () => ({
|
|||||||
}))
|
}))
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
vi.mock('@/stores/userStore', () => ({
|
||||||
|
useUserStore: vi.fn(() => ({
|
||||||
|
initialize: vi.fn().mockResolvedValue(undefined),
|
||||||
|
needsLogin: false
|
||||||
|
}))
|
||||||
|
}))
|
||||||
|
|
||||||
describe('bootstrapStore', () => {
|
describe('bootstrapStore', () => {
|
||||||
let store: ReturnType<typeof useBootstrapStore>
|
let store: ReturnType<typeof useBootstrapStore>
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ export const useBootstrapStore = defineStore('bootstrap', () => {
|
|||||||
{ immediate: false }
|
{ immediate: false }
|
||||||
)
|
)
|
||||||
|
|
||||||
function startEarlyBootstrap() {}
|
|
||||||
|
|
||||||
async function startStoreBootstrap() {
|
async function startStoreBootstrap() {
|
||||||
// Defer settings and workflows if multi-user login is required
|
// Defer settings and workflows if multi-user login is required
|
||||||
// (settings API requires authentication in multi-user mode)
|
// (settings API requires authentication in multi-user mode)
|
||||||
@@ -44,7 +42,6 @@ export const useBootstrapStore = defineStore('bootstrap', () => {
|
|||||||
return {
|
return {
|
||||||
isI18nReady,
|
isI18nReady,
|
||||||
i18nError,
|
i18nError,
|
||||||
startEarlyBootstrap,
|
|
||||||
startStoreBootstrap
|
startStoreBootstrap
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user