Skip to content

Commit 1e46efb

Browse files
committed
chore: add more logging
1 parent af7072b commit 1e46efb

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/client/metadataApiRetrieve.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,17 @@ export class MetadataApiRetrieve extends MetadataTransfer<
141141
throw new SfError(messages.getMessage('error_no_job_id', ['retrieve']), 'MissingJobIdError');
142142
}
143143

144+
this.logger.debug('getting connection instance');
144145
const connection = await this.getConnection();
145146

146147
// Cast RetrieveResult returned by jsForce to MetadataApiRetrieveStatus
148+
this.logger.debug('calling metadata.checkRetrieveStatus');
147149
const status = (await connection.metadata.checkRetrieveStatus(this.id)) as MetadataApiRetrieveStatus;
150+
this.logger.debug('successfully called metadata.checkRetrieveStatus');
151+
152+
this.logger.debug(`status.status: ${status.status}`);
153+
this.logger.debug(`status.done: ${status.done}`);
154+
this.logger.debug(`status.success: ${status.success}`);
148155

149156
return {
150157
...status,
@@ -245,7 +252,9 @@ export class MetadataApiRetrieve extends MetadataTransfer<
245252
apiVersion: this.components?.sourceApiVersion ?? (await connection.retrieveMaxApiVersion()),
246253
...(manifestData ? { unpackaged: manifestData } : {}),
247254
...(this.options.singlePackage ? { singlePackage: this.options.singlePackage } : {}),
248-
...(this.options.rootTypesWithDependencies ? { rootTypesWithDependencies: this.options.rootTypesWithDependencies } : {}),
255+
...(this.options.rootTypesWithDependencies
256+
? { rootTypesWithDependencies: this.options.rootTypesWithDependencies }
257+
: {}),
249258
// if we're retrieving with packageNames add it
250259
// otherwise don't - it causes errors if undefined or an empty array
251260
...(packageNames.length ? { packageNames } : {}),

src/client/metadataTransfer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ export abstract class MetadataTransfer<
246246
mdapiStatus = await this.checkStatus();
247247
completed = mdapiStatus?.done;
248248
if (!completed) {
249+
this.logger.debug('emitting update event');
249250
this.event.emit('update', mdapiStatus);
251+
this.logger.debug('emited update event successfully');
250252
}
251253
} catch (e) {
252254
this.logger.error(e);

0 commit comments

Comments
 (0)