Skip to content

Commit

Permalink
Merge pull request #1323 from contentstack/fix/CS-44077
Browse files Browse the repository at this point in the history
Fix: Audit group field removal issue fix
  • Loading branch information
antonyagustine authored Mar 1, 2024
2 parents ad21c9f + bda90c3 commit a3bdd7e
Show file tree
Hide file tree
Showing 11 changed files with 139 additions and 238 deletions.
323 changes: 106 additions & 217 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-audit",
"version": "1.4.0",
"version": "1.4.1",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-audit/src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const config = {
showTerminalOutput: true,
skipRefs: ['sys_assets'],
skipFieldTypes: ['taxonomy'],
skipFieldTypes: ['taxonomy', 'group'],
modules: ['content-types', 'global-fields', 'entries'],
'fix-fields': ['reference', 'global_field', 'json:rte', 'json:extension', 'blocks', 'group'],
moduleConfig: {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@colors/colors": "^1.5.0",
"@contentstack/cli-cm-export": "~1.11.0",
"@contentstack/cli-cm-import": "~1.14.0",
"@contentstack/cli-cm-import": "~1.14.1",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.12",
"async": "^3.2.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@contentstack/cli-cm-import",
"description": "Contentstack CLI plugin to import content into stack",
"version": "1.14.0",
"version": "1.14.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-audit": "~1.4.0",
"@contentstack/cli-audit": "~1.4.1",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.12",
"@contentstack/management": "~1.15.3",
Expand Down
9 changes: 8 additions & 1 deletion packages/contentstack-import/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const config: DefaultConfig = {
taxonomies: {
dirName: 'taxonomies',
fileName: 'taxonomies.json',
}
},
},
languagesCode: [
'af-za',
Expand Down Expand Up @@ -388,6 +388,13 @@ const config: DefaultConfig = {
// useBackedupDir: '',
// backupConcurrency: 10,
onlyTSModules: ['taxonomies'],
auditConfig: {
noLog: false, // Skip logs printing on terminal
skipConfirm: true, // Skip confirmation if any
returnResponse: true, // On process completion should return config used in the command
noTerminalOutput: false, // Skip final audit table output on terminal
config: { basePath: '' }, // To overwrite any build-in config. And this config is equal to --config flag.
}
};

export default config;
10 changes: 3 additions & 7 deletions packages/contentstack-import/src/import/module-importer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,9 @@ class ModuleImporter {
*/
async auditImportData(logger: Logger) {
const basePath = resolve(this.importConfig.backupDir, 'logs', 'audit');
const auditConfig = {
noLog: false, // Skip logs printing on terminal
skipConfirm: true, // Skip confirmation if any
returnResponse: true, // On process completion should return config used in the command
noTerminalOutput: false, // Skip final audit table output on terminal
config: { basePath }, // To overwrite any build-in config. This config is equal to --config flag.
};
const auditConfig = this.importConfig.auditConfig
auditConfig.config.basePath = basePath;

try {
const args = [
'--data-dir',
Expand Down
9 changes: 9 additions & 0 deletions packages/contentstack-import/src/types/default-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,13 @@ export default interface DefaultConfig {
createBackupDir?: string;
overwriteSupportedModules: string[];
onlyTSModules: string[];
auditConfig?: {
noLog?: boolean; // Skip logs printing on terminal
skipConfirm?: boolean; // Skip confirmation if any
returnResponse?: boolean; // On process completion should return config used in the command
noTerminalOutput?: boolean; // Skip final audit table output on terminal
config?: {
basePath?: string
} & Record<string, any>; // To overwrite any build-in config. And this config is equal to --config flag.
};
}
2 changes: 1 addition & 1 deletion packages/contentstack-seed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-cm-import": "~1.14.0",
"@contentstack/cli-cm-import": "~1.14.1",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.12",
"inquirer": "8.2.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"prepack": "pnpm compile && oclif manifest && oclif readme"
},
"dependencies": {
"@contentstack/cli-audit": "~1.4.0",
"@contentstack/cli-audit": "~1.4.1",
"@contentstack/cli-auth": "~1.3.17",
"@contentstack/cli-cm-bootstrap": "~1.9.0",
"@contentstack/cli-cm-branches": "~1.0.22",
"@contentstack/cli-cm-bulk-publish": "~1.4.1",
"@contentstack/cli-cm-export": "~1.11.0",
"@contentstack/cli-cm-clone": "~1.10.1",
"@contentstack/cli-cm-export-to-csv": "~1.7.0",
"@contentstack/cli-cm-import": "~1.14.0",
"@contentstack/cli-cm-import": "~1.14.1",
"@contentstack/cli-cm-migrate-rte": "~1.4.15",
"@contentstack/cli-cm-seed": "~1.7.1",
"@contentstack/cli-command": "~1.2.17",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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

0 comments on commit a3bdd7e

Please sign in to comment.