@@ -51,8 +51,8 @@ const printError = (message: string) => {
5151
5252const runAdd = async ( parsed : Extract < CliCommand , { command : "add" } > ) => {
5353 const options = parsed . options ;
54- const { addSources } = await import ( "../add" ) ;
55- const { runSync } = await import ( "../sync" ) ;
54+ const { addSources } = await import ( "../commands/ add" ) ;
55+ const { runSync } = await import ( "../commands/ sync" ) ;
5656 if ( parsed . entries . length === 0 ) {
5757 throw new Error (
5858 "Usage: docs-cache add [--source <repo> --target <dir>] <repo...>" ,
@@ -111,8 +111,8 @@ const runRemove = async (
111111 parsed : Extract < CliCommand , { command : "remove" } > ,
112112) => {
113113 const options = parsed . options ;
114- const { removeSources } = await import ( "../remove" ) ;
115- const { pruneCache } = await import ( "../prune" ) ;
114+ const { removeSources } = await import ( "../commands/ remove" ) ;
115+ const { pruneCache } = await import ( "../commands/ prune" ) ;
116116 if ( parsed . ids . length === 0 ) {
117117 throw new Error ( "Usage: docs-cache remove <id...>" ) ;
118118 }
@@ -158,7 +158,7 @@ const runStatus = async (
158158 parsed : Extract < CliCommand , { command : "status" } > ,
159159) => {
160160 const options = parsed . options ;
161- const { getStatus, printStatus } = await import ( "../status" ) ;
161+ const { getStatus, printStatus } = await import ( "../commands/ status" ) ;
162162 const status = await getStatus ( {
163163 configPath : options . config ,
164164 cacheDirOverride : options . cacheDir ,
@@ -173,7 +173,7 @@ const runStatus = async (
173173
174174const runClean = async ( parsed : Extract < CliCommand , { command : "clean" } > ) => {
175175 const options = parsed . options ;
176- const { cleanCache } = await import ( "../clean" ) ;
176+ const { cleanCache } = await import ( "../commands/ clean" ) ;
177177 const result = await cleanCache ( {
178178 configPath : options . config ,
179179 cacheDirOverride : options . cacheDir ,
@@ -196,7 +196,7 @@ const runCleanCache = async (
196196 parsed : Extract < CliCommand , { command : "clean-cache" } > ,
197197) => {
198198 const options = parsed . options ;
199- const { cleanGitCache } = await import ( "../clean-git-cache" ) ;
199+ const { cleanGitCache } = await import ( "../commands/ clean-git-cache" ) ;
200200 const result = await cleanGitCache ( ) ;
201201 if ( options . json ) {
202202 process . stdout . write ( `${ JSON . stringify ( result , null , 2 ) } \n` ) ;
@@ -224,7 +224,7 @@ const runCleanCache = async (
224224
225225const runPrune = async ( parsed : Extract < CliCommand , { command : "prune" } > ) => {
226226 const options = parsed . options ;
227- const { pruneCache } = await import ( "../prune" ) ;
227+ const { pruneCache } = await import ( "../commands/ prune" ) ;
228228 const result = await pruneCache ( {
229229 configPath : options . config ,
230230 cacheDirOverride : options . cacheDir ,
@@ -247,7 +247,7 @@ const runSyncCommand = async (
247247 parsed : Extract < CliCommand , { command : "sync" } > ,
248248) => {
249249 const options = parsed . options ;
250- const { printSyncPlan, runSync } = await import ( "../sync" ) ;
250+ const { printSyncPlan, runSync } = await import ( "../commands/ sync" ) ;
251251 const plan = await runSync ( {
252252 configPath : options . config ,
253253 cacheDirOverride : options . cacheDir ,
@@ -269,7 +269,7 @@ const runVerify = async (
269269 parsed : Extract < CliCommand , { command : "verify" } > ,
270270) => {
271271 const options = parsed . options ;
272- const { printVerify, verifyCache } = await import ( "../verify" ) ;
272+ const { printVerify, verifyCache } = await import ( "../commands/ verify" ) ;
273273 const report = await verifyCache ( {
274274 configPath : options . config ,
275275 cacheDirOverride : options . cacheDir ,
@@ -287,7 +287,7 @@ const runVerify = async (
287287
288288const runInit = async ( parsed : Extract < CliCommand , { command : "init" } > ) => {
289289 const options = parsed . options ;
290- const { initConfig } = await import ( "../init" ) ;
290+ const { initConfig } = await import ( "../commands/ init" ) ;
291291 if ( options . config ) {
292292 throw new Error ( "Init does not accept --config. Use the project root." ) ;
293293 }
0 commit comments