-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.ts
More file actions
23 lines (17 loc) · 931 Bytes
/
base.ts
File metadata and controls
23 lines (17 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { CLIProgressManager } from '@contentstack/cli-utilities';
import type { AssetMapperImportSetupResult, RunAssetMapperImportSetupParams } from '../types/import-setup-asset-mapper';
/**
* Base for CLI import-setup flows that prepare AM exports (mappers, metadata) before full import.
* Mirrors ImportSpaces-style `setParentProgressManager`; callers log via `@contentstack/cli-utilities` `log` + `params.context`.
*/
export abstract class AssetManagementImportSetupAdapter {
private parentProgressManager: CLIProgressManager | null = null;
protected constructor(protected readonly params: RunAssetMapperImportSetupParams) {}
public setParentProgressManager(parent: CLIProgressManager): void {
this.parentProgressManager = parent;
}
protected resolveParentProgress(): CLIProgressManager | null {
return this.parentProgressManager;
}
abstract start(): Promise<AssetMapperImportSetupResult>;
}