Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,4 @@ export class PackageCommandService {
await this.packageService.listPackages();
}
}

public async batchExportPackages(packageKeys: string[], includeDependencies: boolean, excludeActionFlows?: boolean): Promise<void> {
await this.packageService.batchExportPackages(packageKeys, includeDependencies, excludeActionFlows);
}

public async batchImportPackages(spaceMappings: string[], dataModelMappingsFilePath: string, exportedPackagesFile: string, overwrite: boolean, excludeActionFlows?: boolean): Promise<void> {
await this.packageService.batchImportPackages(spaceMappings ?? [], dataModelMappingsFilePath, exportedPackagesFile, overwrite, excludeActionFlows);
}
}
33 changes: 0 additions & 33 deletions src/commands/studio/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,6 @@ import { SpaceCommandService } from "./command-service/space-command.service";
class Module extends IModule {

public register(context: Context, configurator: Configurator): void {
const exportCommand = configurator.command("export");
exportCommand.command("packages")
.description("Command to export all given packages")
.requiredOption("--packageKeys <packageKeys...>", "Exports only given package keys")
.option("--includeDependencies", "Include variables and dependencies", "")
.option("--excludeActionFlows", "Don't export action flows")
.deprecationNotice("`content-cli export packages` is deprecated and is expected to be removed in subsequent updates around: 01-09-2025.\n" +
"Please use `content-cli config export` instead.\n")
.action(this.batchExportPackages);

const importCommand = configurator.command("import");
importCommand.command("packages")
.description("Command to import all given packages")
.option(
"--spaceMappings <spaceMappings...>",
"List of mappings for importing packages to different target spaces. Mappings should follow format 'packageKey:targetSpaceKey'"
)
.option("--overwrite", "Flag to allow overwriting of packages")
.option("--excludeActionFlows", "Skip overwrite of action flows of package")
.option("--dataModelMappingsFile <dataModelMappingsFile>", "DataModel variable mappings file path. If missing, variables will be mapped from manifest file.")
.requiredOption("-f, --file <file>", "Exported packages file (relative path)")
.deprecationNotice("`content-cli import packages` is deprecated and is expected to be removed in subsequent updates around: 01-09-2025.\n" +
"Please use `content-cli config import` instead.\n")
.action(this.batchImportPackages);

const listCommand = configurator.command("list");
listCommand.command("packages")
.description("Command to list all packages")
Expand Down Expand Up @@ -104,14 +79,6 @@ class Module extends IModule {
.action(this.pushWidget);
}

private async batchExportPackages(context: Context, command: Command, options: OptionValues): Promise<void> {
await new PackageCommandService(context).batchExportPackages(options.packageKeys, options.includeDependencies, options.excludeActionFlows ?? false);
}

private async batchImportPackages(context: Context, command: Command, options: OptionValues): Promise<void> {
await new PackageCommandService(context).batchImportPackages(options.spaceMappings, options.dataModelMappingsFile, options.file, options.overwrite, options.excludeActionFlows);
}

private async listPackages(context: Context, command: Command, options: OptionValues): Promise<void> {
await new PackageCommandService(context).listPackages(options.json, options.includeDependencies, options.packageKeys);
}
Expand Down
Loading
Loading