diff --git a/ts/migrate-from-other-systems/install_migration_toolkit.sh b/ts/migrate-from-other-systems/install_migration_toolkit.sh index 740ca78f..69b4a688 100644 --- a/ts/migrate-from-other-systems/install_migration_toolkit.sh +++ b/ts/migrate-from-other-systems/install_migration_toolkit.sh @@ -1,2 +1,2 @@ # Add the Migration toolkit to your app -npm i @kontent-ai-consulting/migration-toolkit --save-dev \ No newline at end of file +npm i @kontent-ai/migration-toolkit --save-dev \ No newline at end of file diff --git a/ts/migrate-from-other-systems/migration_toolkit_boilerplate.ts b/ts/migrate-from-other-systems/migration_toolkit_boilerplate.ts index 9eb12de8..37c97d1a 100644 --- a/ts/migrate-from-other-systems/migration_toolkit_boilerplate.ts +++ b/ts/migrate-from-other-systems/migration_toolkit_boilerplate.ts @@ -2,7 +2,7 @@ import { MigrationAsset, MigrationItem, importAsync, -} from "@kontent-ai-consulting/migration-toolkit"; +} from "@kontent-ai/migration-toolkit"; // 1. Map the exported content to MigrationItems const migrationItems: MigrationItem[] = []; @@ -13,8 +13,8 @@ const migrationAssets: MigrationAsset[] = []; await importAsync({ data: { assets: migrationAssets, - items: migrationItems + items: migrationItems, }, environmentId: "KONTENT_AI_ENVIRONMENT_ID", apiKey: "MANAGEMENT_API_KEY", -}); \ No newline at end of file +}); diff --git a/ts/migrate-from-other-systems/migration_toolkit_import_data.ts b/ts/migrate-from-other-systems/migration_toolkit_import_data.ts index b5f20c9f..65fbf6a3 100644 --- a/ts/migrate-from-other-systems/migration_toolkit_import_data.ts +++ b/ts/migrate-from-other-systems/migration_toolkit_import_data.ts @@ -1,30 +1,29 @@ import { - importAsync, - extractAsync // Only when importing from stored archives -} from "@kontent-ai-consulting/migration-toolkit"; + importAsync, + extractAsync, // Only when importing from stored archives +} from "@kontent-ai/migration-toolkit"; // Import from migration objects directly await importAsync({ - data: { - assets: migrationAssets, - items: migrationItems - }, - environmentId: "KONTENT_AI_ENVIRONMENT_ID", - apiKey: "MANAGEMENT_API_KEY", + data: { + assets: migrationAssets, + items: migrationItems, + }, + environmentId: "KONTENT_AI_ENVIRONMENT_ID", + apiKey: "MANAGEMENT_API_KEY", }); // Extract MigrationItem and MigrationAsset objects from archive const { assets, items } = await extractAsync({ - filename: 'core_content.zip' + filename: "core_content.zip", }); // Import from stored migration objects await importAsync({ - environmentId: "KONTENT_AI_ENVIRONMENT_ID", - apiKey: "MANAGEMENT_API_KEY", - data: { - assets: assets, - items: items - } + environmentId: "KONTENT_AI_ENVIRONMENT_ID", + apiKey: "MANAGEMENT_API_KEY", + data: { + assets: assets, + items: items, + }, }); - diff --git a/ts/migrate-from-other-systems/migration_toolkit_map_migrationasset.ts b/ts/migrate-from-other-systems/migration_toolkit_map_migrationasset.ts index bf34e50c..1fb8c714 100644 --- a/ts/migrate-from-other-systems/migration_toolkit_map_migrationasset.ts +++ b/ts/migrate-from-other-systems/migration_toolkit_map_migrationasset.ts @@ -1,4 +1,4 @@ -import { MigrationAsset } from "@kontent-ai-consulting/migration-toolkit"; +import { MigrationAsset } from "@kontent-ai/migration-toolkit"; import { readFileSync } from "fs"; // Only if loading local data const coverAsset: MigrationAsset = { diff --git a/ts/migrate-from-other-systems/migration_toolkit_map_migrationitem.ts b/ts/migrate-from-other-systems/migration_toolkit_map_migrationitem.ts index b0bdb3a9..b59809ec 100644 --- a/ts/migrate-from-other-systems/migration_toolkit_map_migrationitem.ts +++ b/ts/migrate-from-other-systems/migration_toolkit_map_migrationitem.ts @@ -3,7 +3,7 @@ import { MigrationElements, MigrationItem, elementsBuilder, -} from "@kontent-ai-consulting/migration-toolkit"; +} from "@kontent-ai/migration-toolkit"; // Define the structure of your Kontent.ai content type interface MovieType extends MigrationElements { diff --git a/ts/migrate-from-other-systems/migration_toolkit_migrationitem.ts b/ts/migrate-from-other-systems/migration_toolkit_migrationitem.ts index 79b6e8f1..6870e46e 100644 --- a/ts/migrate-from-other-systems/migration_toolkit_migrationitem.ts +++ b/ts/migrate-from-other-systems/migration_toolkit_migrationitem.ts @@ -1,3 +1,5 @@ +import { MigrationItem } from "@kontent-ai/migration-toolkit"; + const migrationItem: MigrationItem = { // Variant's metadata system: { diff --git a/ts/migrate-from-other-systems/migration_toolkit_store_mapped_data.ts b/ts/migrate-from-other-systems/migration_toolkit_store_mapped_data.ts index 41996e65..374ea238 100644 --- a/ts/migrate-from-other-systems/migration_toolkit_store_mapped_data.ts +++ b/ts/migrate-from-other-systems/migration_toolkit_store_mapped_data.ts @@ -1,12 +1,10 @@ -import { - storeAsync, -} from "@kontent-ai-consulting/migration-toolkit"; +import { storeAsync } from "@kontent-ai/migration-toolkit"; // Store your mapped data on the filesystem await storeAsync({ data: { assets: migrationAssets, - items: migrationItems + items: migrationItems, }, - filename: 'core_content.zip', -}); \ No newline at end of file + filename: "core_content.zip", +});