Skip to content

Commit 4ddc6a9

Browse files
committed
Merge types from .d.ts, delete .d.ts files
1 parent 765eb9b commit 4ddc6a9

20 files changed

+961
-2301
lines changed

providers/index.d.ts

Lines changed: 0 additions & 139 deletions
This file was deleted.

providers/index.ts

Lines changed: 135 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,141 @@ import mongoConfig from '../providers/stores/mongoConfig.ts'
2222
import upgradeAzureQueueConfig from '../providers/upgrade/azureQueueConfig.js'
2323
import upgradeMemoryQueueConfig from '../providers/upgrade/memoryQueueConfig.js'
2424
import * as recomputeHandler from '../providers/upgrade/recomputeHandler.js'
25+
import type { ICache } from './caching/index.js'
2526
import listBasedFilterConfig from './harvest/throttling/listBasedFilterConfig.ts'
27+
import type { Logger } from './logging/index.js'
2628

27-
export default {
29+
/** Factory function that creates a provider instance */
30+
export type ProviderFactory<T = any> = (options?: any) => T
31+
32+
/** Provider configuration for logging */
33+
export interface LoggingProviders {
34+
winston: ProviderFactory<Logger>
35+
}
36+
37+
/** Provider configuration for definition stores */
38+
export interface DefinitionProviders {
39+
azure: ProviderFactory
40+
file: ProviderFactory
41+
mongo: ProviderFactory
42+
mongoTrimmed: ProviderFactory
43+
dispatch: ProviderFactory
44+
}
45+
46+
/** Provider configuration for attachment stores */
47+
export interface AttachmentProviders {
48+
azure: ProviderFactory
49+
file: ProviderFactory
50+
}
51+
52+
/** Provider configuration for search providers */
53+
export interface SearchProviders {
54+
azure: ProviderFactory
55+
memory: ProviderFactory
56+
}
57+
58+
/** Provider configuration for caching providers */
59+
export interface CachingProviders {
60+
redis: ProviderFactory<ICache>
61+
memory: ProviderFactory<ICache>
62+
}
63+
64+
/** Provider configuration for authentication */
65+
export interface AuthProviders {
66+
github: ProviderFactory
67+
}
68+
69+
/** Paired queue factories used by recompute handlers */
70+
export interface RecomputeQueueFactories<T = any> {
71+
upgrade: ProviderFactory<T>
72+
compute: ProviderFactory<T>
73+
}
74+
75+
/** Provider configuration for upgrade queue */
76+
export interface UpgradeQueueProviders {
77+
azure: RecomputeQueueFactories
78+
memory: RecomputeQueueFactories
79+
}
80+
81+
/** Provider configuration for upgrade service */
82+
export interface UpgradeServiceProviders {
83+
onDemand: ProviderFactory
84+
/** @deprecated TODO: remove in favor of onDemand */
85+
versionCheck: ProviderFactory
86+
delayed: ProviderFactory
87+
/** @deprecated TODO: remove in favor of delayed */
88+
upgradeQueue: ProviderFactory
89+
}
90+
91+
/** Provider configuration for upgrade */
92+
export interface UpgradeProviders {
93+
queue: UpgradeQueueProviders
94+
service: UpgradeServiceProviders
95+
}
96+
97+
/** Provider configuration for curation queue */
98+
export interface CurationQueueProviders {
99+
azure: ProviderFactory
100+
memory: ProviderFactory
101+
}
102+
103+
/** Provider configuration for curation service */
104+
export interface CurationServiceProviders {
105+
github: ProviderFactory
106+
}
107+
108+
/** Provider configuration for curation store */
109+
export interface CurationStoreProviders {
110+
memory: ProviderFactory
111+
mongo: ProviderFactory
112+
}
113+
114+
/** Provider configuration for curation */
115+
export interface CurationProviders {
116+
queue: CurationQueueProviders
117+
service: CurationServiceProviders
118+
store: CurationStoreProviders
119+
}
120+
121+
/** Provider configuration for harvest queue */
122+
export interface HarvestQueueProviders {
123+
azure: ProviderFactory
124+
memory: ProviderFactory
125+
}
126+
127+
/** Provider configuration for harvest service */
128+
export interface HarvestServiceProviders {
129+
crawler: ProviderFactory
130+
crawlerQueue: ProviderFactory
131+
}
132+
133+
/** Provider configuration for harvest store */
134+
export interface HarvestStoreProviders {
135+
azure: ProviderFactory
136+
file: ProviderFactory
137+
}
138+
139+
/** Provider configuration for harvest */
140+
export interface HarvestProviders {
141+
queue: HarvestQueueProviders
142+
service: HarvestServiceProviders
143+
store: HarvestStoreProviders
144+
}
145+
146+
/** Central provider registry containing all provider factories */
147+
export interface Providers {
148+
logging: LoggingProviders
149+
definition: DefinitionProviders
150+
attachment: AttachmentProviders
151+
search: SearchProviders
152+
caching: CachingProviders
153+
auth: AuthProviders
154+
upgrade: UpgradeProviders
155+
curation: CurationProviders
156+
harvest: HarvestProviders
157+
}
158+
159+
const providers: Providers = {
28160
logging: {
29161
winston: winstonConfig
30162
},
@@ -91,3 +223,5 @@ export default {
91223
}
92224
}
93225
}
226+
227+
export default providers

providers/summary/cdsource.d.ts

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)