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

Sprint 56: Development to Staging #1387

Merged
merged 23 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
89ce19e
fixed the issue of logger path not setting up from env variable and v…
cs-raj Apr 12, 2024
9f5b267
Merge pull request #1374 from contentstack/staging
cs-raj Apr 15, 2024
53dffcf
Fix: Added option for seperate path for logs for import and export an…
cs-raj Apr 16, 2024
0914043
Merge branch 'development' into bugfix/CS-44008
cs-raj Apr 16, 2024
28ed170
corrected the unnecessary space
cs-raj Apr 16, 2024
37d2325
fix: Added the new Logs path to the logs and in sample config
cs-raj Apr 16, 2024
cf6d7f7
Merge pull request #1372 from contentstack/bugfix/CS-44008
cs-raj Apr 16, 2024
832ac71
fix: Handled the case when yes flag is passed for skipping the market…
cs-raj Apr 19, 2024
5926cf1
Merge branch 'staging' into staging-to-development
cs-raj Apr 19, 2024
58e38bb
package-lock update
cs-raj Apr 19, 2024
ca5660b
Merge pull request #1383 from contentstack/staging-to-development
cs-raj Apr 19, 2024
57bec12
Merge branch 'development' into bugfix/CS-44776
cs-raj Apr 19, 2024
cba785b
Merge pull request #1379 from contentstack/bugfix/CS-44776
cs-raj Apr 19, 2024
b547d4d
added new script for update of references used in entries
cs-raj Apr 22, 2024
5903fa6
PR fixes
cs-raj Apr 22, 2024
194de88
Merge branch 'development' into feat/CS-44747
cs-raj Apr 23, 2024
e9e9455
PR fixes
cs-raj Apr 23, 2024
bdb7687
Merge pull request #1384 from contentstack/feat/CS-44747
cs-raj Apr 23, 2024
a0236d2
Ui text updated
cs-raj Apr 24, 2024
644f539
fix when entry does not have title or title is empty
cs-raj Apr 24, 2024
6f43296
Merge pull request #1385 from contentstack/fix/Ui-Text-Fixed
cs-raj Apr 24, 2024
cd10799
lock-file-update
cs-raj Apr 24, 2024
f9da746
Merge pull request #1386 from contentstack/fix/lock-file-update
cs-raj Apr 24, 2024
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
104 changes: 52 additions & 52 deletions package-lock.json

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

15 changes: 11 additions & 4 deletions packages/contentstack-audit/src/modules/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,14 @@ export default class Entries {
const entries = (await fsUtility.readChunkFiles.next()) as Record<string, EntryStruct>;
for (const entryUid in entries) {
let { title } = entries[entryUid];
if (!title) {

if (entries[entryUid].hasOwnProperty('title') && !title) {
this.isEntryWithoutTitleField = true;
this.log(
`The 'title' field in Entry with UID '${entryUid}' of Content Type '${uid}' in Locale '${code}' is empty.`,
`error`,
);
} else if (!title) {
this.isEntryWithoutTitleField = true;
this.log(
`Entry with UID '${entryUid}' of Content Type '${uid}' in Locale '${code}' does not have a 'title' field.`,
Expand All @@ -993,8 +1000,8 @@ export default class Entries {
}
}
}
if (this.isEntryWithoutTitleField) {
throw Error(`Entries found with missing 'title' field! Please make the data corrections and re-run the audit.`);
}
// if (this.isEntryWithoutTitleField) {
// throw Error(`Entries found with missing 'title' field! Please make the data corrections and re-run the audit.`);
// }
}
}
4 changes: 2 additions & 2 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
"@colors/colors": "^1.5.0",
"@contentstack/cli-cm-export": "~1.11.1",
"@contentstack/cli-cm-import": "~1.15.1",
"@contentstack/cli-cm-export": "~1.11.2",
"@contentstack/cli-cm-import": "~1.15.2",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.6.0",
"async": "^3.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export-to-csv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
}
},
"repository": "https://github.com/contentstack/cli"
}
}
4 changes: 2 additions & 2 deletions packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-export",
"description": "Contentstack CLI plugin to export content from stack",
"version": "1.11.1",
"version": "1.11.2",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down Expand Up @@ -98,4 +98,4 @@
}
},
"repository": "https://github.com/contentstack/cli"
}
}
10 changes: 7 additions & 3 deletions packages/contentstack-export/src/commands/cm/stacks/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
flags,
ContentstackClient,
FlagInput,
pathValidator
pathValidator,
} from '@contentstack/cli-utilities';
import { ModuleExporter } from '../../../export';
import { setupExportConfig, log, formatError, writeExportMetaFile } from '../../../utils';
Expand Down Expand Up @@ -105,15 +105,19 @@ export default class ExportCommand extends Command {
let exportConfig = await setupExportConfig(flags);
// Note setting host to create cma client
exportConfig.host = this.cmaHost;
exportDir = exportConfig.data || exportConfig.exportDir;
exportDir = exportConfig.cliLogsPath || exportConfig.data || exportConfig.exportDir;
const managementAPIClient: ContentstackClient = await managementSDKClient(exportConfig);
const moduleExporter = new ModuleExporter(managementAPIClient, exportConfig);
await moduleExporter.start();
if (!exportConfig.branches?.length) {
writeExportMetaFile(exportConfig);
}
log(exportConfig, `The content of the stack ${exportConfig.apiKey} has been exported successfully!`, 'success');
log(exportConfig, `The log has been stored at '${pathValidator(path.join(exportDir, 'logs', 'export'))}'`, 'success');
log(
exportConfig,
`The log has been stored at '${pathValidator(path.join(exportDir, 'logs', 'export'))}'`,
'success',
);
} catch (error) {
log({ data: exportDir } as ExportConfig, `Failed to export stack content - ${formatError(error)}`, 'error');
log({ data: exportDir } as ExportConfig, `The log has been stored at ${exportDir}`, 'info');
Expand Down
3 changes: 2 additions & 1 deletion packages/contentstack-export/src/types/export-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Modules } from '.';
import DefaultConfig from './default-config';

export default interface ExportConfig extends DefaultConfig {
cliLogsPath: string;
exportDir: string;
data: string;
management_token?: string;
Expand All @@ -27,7 +28,7 @@ export default interface ExportConfig extends DefaultConfig {
access_token?: string;
org_uid?: string;
source_stack?: string;
sourceStackName?:string;
sourceStackName?: string;
}

type branch = {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function init(_logPath: string) {
}

export const log = async (config: ExportConfig, message: any, type: string) => {
const logsPath = config.data;
const logsPath = config.cliLogsPath || config.data;
// ignoring the type argument, as we are not using it to create a logfile anymore
if (type !== 'error') {
// removed type argument from init method
Expand Down
Loading
Loading