diff --git a/package-lock.json b/package-lock.json index 4b190fa3a1..13600f4c87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4235,9 +4235,9 @@ } }, "node_modules/axios": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", - "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", + "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -24927,7 +24927,7 @@ "@contentstack/cli-utilities": "~1.5.10", "@contentstack/management": "~1.13.0", "@oclif/core": "^2.9.3", - "axios": "^1.6.0", + "axios": "^1.6.3", "big-json": "^3.2.0", "bluebird": "^3.7.2", "chalk": "^4.1.2", @@ -25398,7 +25398,7 @@ "@types/node": "^14.14.32", "@types/tar": "^6.1.3", "@types/tmp": "^0.2.0", - "axios": "^1.6.0", + "axios": "^1.6.3", "eslint": "^8.18.0", "eslint-config-oclif": "^4.0.0", "eslint-config-oclif-typescript": "^3.0.8", @@ -25462,7 +25462,7 @@ "@contentstack/management": "~1.13.0", "@contentstack/marketplace-sdk": "^1.0.1", "@oclif/core": "^2.9.3", - "axios": "^1.6.0", + "axios": "^1.6.3", "chalk": "^4.0.0", "cli-cursor": "^3.1.0", "cli-table": "^0.3.11", diff --git a/packages/contentstack-export-to-csv/src/util/index.js b/packages/contentstack-export-to-csv/src/util/index.js index c04c722a5c..4c646b3779 100644 --- a/packages/contentstack-export-to-csv/src/util/index.js +++ b/packages/contentstack-export-to-csv/src/util/index.js @@ -62,7 +62,6 @@ async function getOrganizations(managementAPIClient) { try { return await getOrganizationList(managementAPIClient, { skip: 0, page: 1, limit: 100 }, []); } catch (error) { - console.log(error); throw error; } } diff --git a/packages/contentstack-import/package.json b/packages/contentstack-import/package.json index 6da5117134..35c212e1b1 100644 --- a/packages/contentstack-import/package.json +++ b/packages/contentstack-import/package.json @@ -9,7 +9,7 @@ "@contentstack/cli-utilities": "~1.5.10", "@contentstack/management": "~1.13.0", "@oclif/core": "^2.9.3", - "axios": "^1.6.0", + "axios": "^1.6.3", "big-json": "^3.2.0", "bluebird": "^3.7.2", "chalk": "^4.1.2", diff --git a/packages/contentstack-migrate-rte/src/lib/util/index.js b/packages/contentstack-migrate-rte/src/lib/util/index.js index 509c0309aa..8deae400eb 100644 --- a/packages/contentstack-migrate-rte/src/lib/util/index.js +++ b/packages/contentstack-migrate-rte/src/lib/util/index.js @@ -158,7 +158,6 @@ function getGlobalField(stack, globalFieldUid) { }); } function throwConfigError(error) { - // console.log(error) const { name, path, argument } = error; let fieldName = path.join('.'); if (fieldName === '') { @@ -295,7 +294,6 @@ async function updateSingleContentTypeEntriesWithGlobalField(contentType, config async function updateSingleEntry(entry, contentType, config) { let schema = contentType.schema; let paths = config.paths; - // console.log("before entry update", entry) let entryUploadPath = uploadPaths(schema); entryUploadPath = Object.keys(entryUploadPath); for (const path of paths) { @@ -317,7 +315,6 @@ async function updateSingleEntry(entry, contentType, config) { console.error(`Error while unsetting resolved upload data: ${error.message}`); } await handleEntryUpdate(entry, config, 0); - // console.log("updated entry", entry) } async function handleEntryUpdate(entry, config, retry = 0) { try { @@ -380,7 +377,6 @@ function traverseSchemaForField(schema, path, field_uid) { return {}; } function isPathValid(schema, path) { - // console.log("path", path) let pathFrom = path.from.split('.'); let htmlParentPath = pathFrom.slice(0, pathFrom.length - 1).join('.'); const rteUid = pathFrom[pathFrom.length - 1]; @@ -434,10 +430,8 @@ function setEntryData(path, entry, schema, fieldMetaData) { if (field) { if (field.data_type === 'group' || field.data_type === 'global_field') { paths.shift(); - // console.log("paths", paths) let sub_entry_data = get(entry, field.uid); - // console.log("sub_Entry",sub_entry_data) if (isArray(sub_entry_data)) { for (const sub_data of sub_entry_data) { setEntryData(paths.join('.'), sub_data, field.schema, fieldMetaData); @@ -450,13 +444,10 @@ function setEntryData(path, entry, schema, fieldMetaData) { let ModularBlockUid = paths.shift(); let blockUid = paths.shift(); let blockField = find(field.blocks, { uid: blockUid }); - // console.log("blockUid",blockUid) if (blockField) { let modularBlockDetails = get(entry, ModularBlockUid) || []; - // console.log("modularBlockDetails",modularBlockDetails) for (const blocks of modularBlockDetails) { let blockdata = get(blocks, blockUid); - // console.log("blockData",blockdata) if (blockdata) { setEntryData(paths.join('.'), blockdata, blockField.schema, fieldMetaData); } @@ -497,10 +488,8 @@ function unsetResolvedUploadData(path, entry, schema, fieldMetaData) { if (field) { if (field.data_type === 'group' || field.data_type === 'global_field') { paths.shift(); - // console.log("paths", paths) let sub_entry_data = get(entry, field.uid); - // console.log("sub_Entry",sub_entry_data) if (isArray(sub_entry_data)) { for (const sub_data of sub_entry_data) { unsetResolvedUploadData(paths.join('.'), sub_data, field.schema, fieldMetaData); @@ -513,13 +502,10 @@ function unsetResolvedUploadData(path, entry, schema, fieldMetaData) { let ModularBlockUid = paths.shift(); let blockUid = paths.shift(); let blockField = find(field.blocks, { uid: blockUid }); - // console.log("blockUid",blockUid) if (blockField) { let modularBlockDetails = get(entry, ModularBlockUid) || []; - // console.log("modularBlockDetails",modularBlockDetails) for (const blocks of modularBlockDetails) { let blockdata = get(blocks, blockUid); - // console.log("blockData",blockdata) if (blockdata) { unsetResolvedUploadData(paths.join('.'), blockdata, blockField.schema, fieldMetaData); } @@ -560,7 +546,6 @@ function convertHtmlToJson(html) { doc = htmlToJson(htmlDoc); applyDirtyAttributesToBlock(doc); } catch (error) { - // console.log("err", err) throw new Error('Error while converting html '.concat(error.message)); } return doc; @@ -604,12 +589,10 @@ async function updateContentTypeForGlobalField(stack, global_field, config) { } else { throw new Error(`${globalField.uid} Global field is not referred in any content type.`); } - // console.log("globolfield", globalField) } function updateMigrationPath(globalFieldPaths, config) { const newPath = []; for (const path of config.paths) { - // console.log("path", path) for (const globalFieldPath of globalFieldPaths) { newPath.push({ from: globalFieldPath + '.' + path.from, to: globalFieldPath + '.' + path.to }); } diff --git a/packages/contentstack-seed/package.json b/packages/contentstack-seed/package.json index 5ebadf20a8..9b6f1ea5ec 100644 --- a/packages/contentstack-seed/package.json +++ b/packages/contentstack-seed/package.json @@ -22,7 +22,7 @@ "@types/node": "^14.14.32", "@types/tar": "^6.1.3", "@types/tmp": "^0.2.0", - "axios": "^1.6.0", + "axios": "^1.6.3", "eslint": "^8.18.0", "eslint-config-oclif": "^4.0.0", "eslint-config-oclif-typescript": "^3.0.8", diff --git a/packages/contentstack-utilities/package.json b/packages/contentstack-utilities/package.json index 691f2a40ec..e44f9b07e2 100644 --- a/packages/contentstack-utilities/package.json +++ b/packages/contentstack-utilities/package.json @@ -35,7 +35,7 @@ "@contentstack/management": "~1.13.0", "@contentstack/marketplace-sdk": "^1.0.1", "@oclif/core": "^2.9.3", - "axios": "^1.6.0", + "axios": "^1.6.3", "chalk": "^4.0.0", "cli-cursor": "^3.1.0", "cli-table": "^0.3.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79ceb6aafd..9c1b2f7b2b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -740,7 +740,7 @@ importers: '@types/tar': ^4.0.3 '@types/uuid': ^9.0.7 '@typescript-eslint/eslint-plugin': ^5.48.2 - axios: ^1.6.0 + axios: ^1.6.3 big-json: ^3.2.0 bluebird: ^3.7.2 chai: ^4.2.0 @@ -771,7 +771,7 @@ importers: '@contentstack/cli-utilities': link:../contentstack-utilities '@contentstack/management': 1.13.0_debug@4.3.4 '@oclif/core': 2.15.0_ogreqof3k35xezedraj6pnd45y - axios: 1.6.2_debug@4.3.4 + axios: 1.6.3_debug@4.3.4 big-json: 3.2.0 bluebird: 3.7.2 chalk: 4.1.2 @@ -994,7 +994,7 @@ importers: '@types/node': ^14.14.32 '@types/tar': ^6.1.3 '@types/tmp': ^0.2.0 - axios: ^1.6.0 + axios: ^1.6.3 eslint: ^8.18.0 eslint-config-oclif: ^4.0.0 eslint-config-oclif-typescript: ^3.0.8 @@ -1026,7 +1026,7 @@ importers: '@types/node': 14.18.63 '@types/tar': 6.1.10 '@types/tmp': 0.2.6 - axios: 1.6.2 + axios: 1.6.3 eslint: 8.55.0 eslint-config-oclif: 4.0.0_eslint@8.55.0 eslint-config-oclif-typescript: 3.0.26_sjjl3gun7puonkp27uqtyjm5b4 @@ -1051,7 +1051,7 @@ importers: '@types/node': ^14.14.32 '@types/sinon': ^10.0.2 '@types/traverse': ^0.6.34 - axios: ^1.6.0 + axios: ^1.6.3 chai: ^4.3.4 chalk: ^4.0.0 cli-cursor: ^3.1.0 @@ -1091,7 +1091,7 @@ importers: '@contentstack/management': 1.13.0_debug@4.3.4 '@contentstack/marketplace-sdk': 1.0.1_debug@4.3.4 '@oclif/core': 2.15.0_ogreqof3k35xezedraj6pnd45y - axios: 1.6.2_debug@4.3.4 + axios: 1.6.3_debug@4.3.4 chalk: 4.1.2 cli-cursor: 3.1.0 cli-table: 0.3.11 @@ -1607,7 +1607,7 @@ packages: '@contentstack/management': 1.13.0_debug@4.3.4 '@contentstack/marketplace-sdk': 1.0.1_debug@4.3.4 '@oclif/core': 2.15.0_typescript@4.9.5 - axios: 1.6.2_debug@4.3.4 + axios: 1.6.3_debug@4.3.4 chalk: 4.1.2 cli-cursor: 3.1.0 cli-table: 0.3.11 @@ -1661,7 +1661,7 @@ packages: /@contentstack/marketplace-sdk/1.0.1_debug@4.3.4: resolution: {integrity: sha512-E9amU6qwp4i1AzXiMX4UKYJSZ8wyhncGPx5MGpwGoM2WUfJqGMwH9o1bXLAzOSBu1a8yhOMOkz/ehLwYeq6Ufg==} dependencies: - axios: 1.6.2_debug@4.3.4 + axios: 1.6.3_debug@4.3.4 transitivePeerDependencies: - debug @@ -4749,8 +4749,17 @@ packages: xml2js: 0.5.0 dev: true - /axios/1.6.2: + /axios/1.6.2_debug@4.3.4: resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==} + dependencies: + follow-redirects: 1.15.3_debug@4.3.4 + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + + /axios/1.6.3: + resolution: {integrity: sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==} dependencies: follow-redirects: 1.15.3 form-data: 4.0.0 @@ -4759,8 +4768,8 @@ packages: - debug dev: true - /axios/1.6.2_debug@4.3.4: - resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==} + /axios/1.6.3_debug@4.3.4: + resolution: {integrity: sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==} dependencies: follow-redirects: 1.15.3_debug@4.3.4 form-data: 4.0.0 @@ -6534,7 +6543,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.13.2_7hj7rehet5x3fvq7nqub5sammm + '@typescript-eslint/parser': 6.13.2_sjjl3gun7puonkp27uqtyjm5b4 debug: 3.2.7 eslint: 8.55.0 eslint-import-resolver-node: 0.3.9 @@ -6564,7 +6573,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.13.2_7hj7rehet5x3fvq7nqub5sammm + '@typescript-eslint/parser': 6.13.2_sjjl3gun7puonkp27uqtyjm5b4 debug: 3.2.7 eslint: 8.55.0 eslint-import-resolver-typescript: 3.6.1_hdscurta55xxypqxbdhu44qa6e @@ -6669,7 +6678,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.13.2_7hj7rehet5x3fvq7nqub5sammm + '@typescript-eslint/parser': 6.13.2_sjjl3gun7puonkp27uqtyjm5b4 array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2