Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fileignoreconfig:
- filename: package-lock.json
checksum: d3b93fad9630655f037e36b78fea3354f1a038988562254afdad0f6e54ece12d
checksum: 5e64367e6f00c41d8fec66e335f66202d97a0e75006c9ecd331ce8f5856e296a
- filename: pnpm-lock.yaml
checksum: aa6177859aaa87caf2892e8034657fd485c3abe7c13a833fd28449a1d33fa950
- filename: packages/contentstack-import-setup/test/unit/backup-handler.test.ts
Expand Down Expand Up @@ -30,7 +30,7 @@ fileignoreconfig:
- filename: packages/contentstack-import-setup/test/unit/import-setup.test.ts
checksum: 1eee4f461fa5b115894d1806a14af6f45336cbe6c0392f16078bd2877fadff67
- filename: packages/contentstack-import-setup/test/unit/login-handler.test.ts
checksum: e549f9ca3a9aae0d93b7284f7e771d55c0610725ddcb4333612df2f215e92769
checksum: 258b92de292ab1a99aef277709fb41a95e57ce294eef445f77a9edd3b93b87f4
- filename: packages/contentstack/README.md
checksum: 10f580c697d0b70b813428954b946e60609f41c42e78ca95ca3232443e725615
- filename: packages/contentstack-import-setup/test/unit/modules/assets.test.ts
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/contentstack-import-setup/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-import-setup",
"description": "Contentstack CLI plugin to setup the mappers and configurations for the import command",
"version": "1.7.0",
"version": "2.0.0-beta",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default interface ImportConfig extends DefaultConfig, ExternalConfig {
authtoken?: string;
destinationStackName?: string;
org_uid?: string;
contentVersion: number;
stackName?: string;
branchName: string;
selectedModules: Modules[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ const setupConfig = async (importCmdFlags: any): Promise<ImportConfig> => {
config.contentDir = path.resolve(config.contentDir);
//Note to support the old key
config.data = config.contentDir;
if (fileExistsSync(path.join(config.contentDir, 'export-info.json'))) {
config.contentVersion =
((await readFile(path.join(config.contentDir, 'export-info.json'))) || {}).contentVersion || 2;
} else {
config.contentVersion = 1;
}

const managementTokenAlias = importCmdFlags['management-token-alias'] || importCmdFlags['alias'];

Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import-setup/src/utils/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ImportConfig } from '../types';
let logger: Logger;

export function isImportConfig(config: ImportConfig | MessageType): config is ImportConfig {
return (config as ImportConfig).data !== undefined && (config as ImportConfig)?.contentVersion !== undefined;
return (config as ImportConfig).data !== undefined;
}

export function log(entry: LogEntry): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ describe('Backup Handler', () => {
branchName: '',
selectedModules: ['entries'],
backupDir: '',
contentVersion: 1,
region: 'us',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ describe('Common Helper Utilities', () => {
branchName: '',
selectedModules: ['entries'],
backupDir: '',
contentVersion: 1,
region: 'us',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,6 @@ describe('Import Config Handler', () => {
expect(config.branchName).to.equal('development');
});

it('should set default content version to 1', async () => {
const flags = {
'data-dir': contentDir,
};

const config = await setupConfig(flags);

expect(config.contentVersion).to.equal(1);
});

it('should ask for modules when none are provided', async () => {
const flags = {
'data-dir': contentDir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ describe('ImportSetup', () => {
branchName: '',
selectedModules: ['entries'],
backupDir: '',
contentVersion: 1,
region: 'us',
modules: {
extensions: {
Expand Down Expand Up @@ -58,6 +57,11 @@ describe('ImportSetup', () => {
fileName: 'environments',
dependencies: [],
},
locales: {
dirName: 'locales',
fileName: 'locales',
dependencies: [],
},
entries: {
dirName: 'entries',
fileName: 'entries',
Expand Down
Loading
Loading