MCPcopy Create free account
hub / github.com/chakra-ui/panda / setConfigDependencies

Method setConfigDependencies

packages/node/src/builder.ts:32–50  ·  view source on GitHub ↗
(options: SetupContextOptions)

Source from the content-addressed store, hash-verified

30 private configDependencies: Set<string> = new Set()
31
32 setConfigDependencies(options: SetupContextOptions) {
33 const tsOptions = this.context?.conf.tsOptions ?? { baseUrl: undefined, pathMappings: [] }
34 const compilerOptions = this.context?.conf.tsconfig?.compilerOptions ?? {}
35
36 const { deps: foundDeps } = getConfigDependencies(options.configPath, tsOptions, compilerOptions)
37 const cwd = options?.cwd ?? this.context?.config.cwd ?? process.cwd()
38
39 const configDeps = new Set([
40 ...foundDeps,
41 ...(this.context?.conf.dependencies ?? []).map((file) => resolve(cwd, file)),
42 ])
43
44 configDeps.forEach((file) => {
45 this.configDependencies.add(file)
46 })
47
48 logger.debug('builder', 'Config dependencies')
49 logger.debug('builder', configDeps)
50 }
51
52 setup = async (options: { configPath?: string; cwd?: string } = {}) => {
53 logger.debug('builder', '🚧 Setup')

Callers 1

BuilderClass · 0.95

Calls 4

getConfigDependenciesFunction · 0.90
forEachMethod · 0.80
cwdMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected