Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/CS-42684-removed stray console.log #1225

Merged
merged 2 commits into from
Jan 2, 2024
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
12 changes: 6 additions & 6 deletions package-lock.json

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

1 change: 0 additions & 1 deletion packages/contentstack-export-to-csv/src/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
17 changes: 0 additions & 17 deletions packages/contentstack-migrate-rte/src/lib/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 === '') {
Expand Down Expand Up @@ -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) {
Expand All @@ -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 {
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-seed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
37 changes: 23 additions & 14 deletions pnpm-lock.yaml

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

Loading