@kibocommerce/intra-tenant-catalog-clone v0.0.23
README.md
Catalog Intra Tenant Catalog Clone Utility (CLI Tool)
This CLI tool provides utilities for syncing, managing, and validating configurations related to catalogs in a given tenant.
Prerequisites
Ensure you have Node.js 16+ installed.
Setup
Install dependencies:
npm install @kibocommerce:intra-tenant-catalog-cloneMake sure the
.envfile is set up with the required environment variables:API_URL: The API endpoint.CLIENT_ID: Client ID for the API.CLIENT_SECRET: Client secret for the API.CATALOG_PAIRS: JSON array of source and destination catalog pairs.SITE_PAIRS: JSON array of source and destination site pairs.PRIME_CATALOG: Prime catalog number.MASTER_CATALOG: Master catalog number.
You can use the
init-envcommand to create an empty.envfile.
Available Commands
categories: Sync categories.settings: Sync site settings.entities: Sync entities.search-settings: Sync search settings.search-facets: Sync search facets.search-merchandising: Sync search merchandising settings.search-all: Sync all search-related settings.products: Sync products in catalogs.clean-category-prefixes: Clean category prefixes.- 'sync-content -pages -redirects -catalogContent -themeSettings': Syncs Content Pages , redirects , theme settings
validate-config: Validate the configuration settings.init-env: Creates an empty.envfile.
Usage
To use the CLI tool, run the following command:
npx @kibocommerce:intra-tenant-catalog-clone [command]Replace [command] with any of the available commands listed above.
Example:
npx @kibocommerce:intra-tenant-catalog-clone categoriesEnvironment Variables
Make sure you set up the following environment variables in your .env file:
API_URL=https://t***.com/api
CLIENT_ID=YourClientID
CLIENT_SECRET=YourClientSecret
CATALOG_PAIRS='[{"source":5,"destination":7}, {"source":6,"destination":8}]'
SITE_PAIRS='[{"source":100148,"destination":100150}, {"source":100149,"destination":100151}]'
PRIME_CATALOG=5
MASTER_CATALOG=2Contributing
Please raise an issue or pull request on our GitHub repository if you have any fixes, enhancements, or suggestions.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any issues, please reach out to our support team or check our documentation for more details.