Skip to content

Commit f06ba8f

Browse files
naman-contentstackclaude
andcommitted
refactor(import): remove unused detectAssetScanning method
The private method had no callers. Asset scanning detection is already handled in import-config-handler.ts via config.planStatus['assetsScan'], which feeds assetScanningEnabled and skipAssetsPublish. Keeping a second detection path with a different data source risked drift, and its bare catch reported "not enabled" on any API error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 355d400 commit f06ba8f

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎packages/contentstack-import/src/import/module-importer.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,6 @@ class ModuleImporter {
194194
log.error(`Audit failed with following error. ${error}`, this.importConfig.context);
195195
}
196196
}
197-
198-
private async detectAssetScanning(orgUid: string): Promise<boolean> {
199-
try {
200-
const orgDetails = await this.managementAPIClient.organization(orgUid).fetch({ include_plan: true });
201-
const features: Array<{ uid: string; enabled?: boolean }> = orgDetails?.plan?.features || [];
202-
return features.some((f) => (f.uid === 'assetsScan' || f.uid === 'amAssetsScan') && f.enabled === true);
203-
} catch {
204-
return false;
205-
}
206-
}
207197
}
208198

209199
export default ModuleImporter;

0 commit comments

Comments
 (0)