MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / init

Method init

packages/components/src/handler.ts:774–797  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

772 }
773
774 async init() {
775 if (this.initialized) return
776
777 try {
778 const hasAnalyticsConfig = Boolean(this.options.analytic)
779 if (!hasAnalyticsConfig && !tracingEnvEnabled()) return
780
781 const initial = hasAnalyticsConfig ? JSON.parse(this.options.analytic) : {}
782 const { analytic, envCredentials } = applyEnvTracingProviders(initial)
783 for (const provider in analytic) {
784 const providerStatus = analytic[provider].status as boolean
785 if (providerStatus) {
786 const credentialData =
787 envCredentials[provider] ??
788 (await getCredentialData((analytic[provider].credentialId as string) ?? '', this.options))
789 await this.initializeProvider(provider, analytic[provider], credentialData)
790 }
791 }
792
793 this.initialized = true
794 } catch (e) {
795 throw new Error(e)
796 }
797 }
798
799 hasActiveProviders(): boolean {
800 return Object.keys(this.handlers).length > 0

Callers

nothing calls this directly

Calls 5

initializeProviderMethod · 0.95
tracingEnvEnabledFunction · 0.90
applyEnvTracingProvidersFunction · 0.90
getCredentialDataFunction · 0.90
parseMethod · 0.65

Tested by

no test coverage detected