88 fetchCloudApp ,
99 FirestoreClientError ,
1010 type CloudApp ,
11- type FirestoreClientOptions ,
1211} from '../cloud/firestoreClient.js' ;
1312import { collectAppFiles } from '../core/appCollector.js' ;
1413import { ArtifactProps , type ArtifactProp } from '../core/artifacts.js' ;
@@ -18,7 +17,7 @@ import { getValidAuthSession } from '../auth/session.js';
1817import { withSpinner } from '../lib/spinner.js' ;
1918import { applyCloudStateToFs } from '../core/applyToFs.js' ;
2019import { type RootManifest } from '../core/manifest.js' ;
21- import { writeVerboseJson } from '../core/debugFiles.js' ;
20+ import { createFirestoreDebugOptions , writeVerboseJson } from '../core/debugFiles.js' ;
2221import { computePullPlan , type PullSummary } from '../core/sync.js' ;
2322import { applyCloudAssetsToFs , buildEnvConfigForCloudAssets } from '../core/pullAssets.js' ;
2423import { ui } from '../core/ui.js' ;
@@ -164,45 +163,7 @@ export async function pullCommand(options: PullOptions = {}): Promise<void> {
164163 }
165164 const { idToken, userId } = session ;
166165
167- const debugEnabled = verbose ;
168- const firestoreOptions : FirestoreClientOptions | undefined = debugEnabled
169- ? {
170- debug : ( event ) => {
171- // eslint-disable-next-line no-console
172- console . log (
173- `[debug:firestore] ${ event . kind } ` ,
174- JSON . stringify (
175- {
176- ...( event . kind === 'request' && {
177- method : event . method ,
178- url : event . url ,
179- context : event . context ,
180- } ) ,
181- ...( event . kind === 'response' && {
182- method : event . method ,
183- url : event . url ,
184- status : event . status ,
185- context : event . context ,
186- } ) ,
187- ...( event . kind === 'list_documents' && {
188- collection : event . collection ,
189- parentPath : event . parentPath ,
190- count : event . count ,
191- } ) ,
192- ...( event . kind === 'push_operation' && {
193- appId : event . appId ,
194- operation : event . operation ,
195- artifactKind : event . artifactKind ,
196- documentId : event . documentId ,
197- } ) ,
198- } ,
199- null ,
200- 2
201- )
202- ) ;
203- } ,
204- }
205- : undefined ;
166+ const firestoreOptions = verbose ? createFirestoreDebugOptions ( ) : undefined ;
206167
207168 const manifestPath = path . join ( projectRoot , '.manifest.json' ) ;
208169 const readManifest = ( ) : Promise < RootManifest > =>
0 commit comments