Skip to content

Commit b589b1b

Browse files
author
naman-contentstack
committed
chore: fix lint issues
1 parent c16270e commit b589b1b

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

packages/contentstack-bulk-operations/src/commands/cm/stacks/bulk-am-assets.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export default class BulkAmAssets extends BaseAmCommand {
5959
}),
6060
};
6161

62-
private printAmSummary(op: 'delete' | 'move', opts: { jobId?: string; count?: number; folderUid?: string; notice?: string; error?: string; spaceUid?: string }): void {
62+
private printAmSummary(
63+
op: 'delete' | 'move',
64+
opts: { jobId?: string; count?: number; folderUid?: string; notice?: string; error?: string; spaceUid?: string }
65+
): void {
6366
if (opts.error) {
6467
log.error($t(messages.AM_OPERATION_FAILED, { operation: op }), this.loggerContext);
6568
log.error(opts.error, this.loggerContext);
@@ -72,7 +75,10 @@ export default class BulkAmAssets extends BaseAmCommand {
7275
} else {
7376
log.success($t(messages.AM_MOVE_SUCCESS), this.loggerContext);
7477
if (opts.count !== undefined && opts.folderUid) {
75-
log.info($t(messages.AM_MOVE_ASSETS_COUNT, { count: opts.count, folderUid: opts.folderUid }), this.loggerContext);
78+
log.info(
79+
$t(messages.AM_MOVE_ASSETS_COUNT, { count: opts.count, folderUid: opts.folderUid }),
80+
this.loggerContext
81+
);
7682
}
7783
const statusUrl = generateAmJobStatusUrl(opts.spaceUid);
7884
if (statusUrl) log.info(statusUrl, this.loggerContext);

packages/contentstack-bulk-operations/src/messages/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,10 @@ const amBulkAssetsMsg = {
238238
AM_WORKSPACE_FLAG: 'AM workspace query parameter (default: main)',
239239
AM_ASSET_UIDS_FILE_FLAG:
240240
'Path to UTF-8 JSON file: exactly `{ "uids": ["uid1", "uid2"] }` (non-empty string array, no trimming; large lists: see docs for NODE_OPTIONS)',
241-
AM_LOCALE_FLAG: 'Locale code for bulk delete only (single locale per run). Not applicable for move — move always relocates all locale variants of an asset.',
242-
AM_LOCALE_NOT_ALLOWED_FOR_MOVE: '--locale is not applicable for the move operation. Move always relocates all locale variants of an asset. Remove --locale and try again.',
241+
AM_LOCALE_FLAG:
242+
'Locale code for bulk delete only (single locale per run). Not applicable for move — move always relocates all locale variants of an asset.',
243+
AM_LOCALE_NOT_ALLOWED_FOR_MOVE:
244+
'--locale is not applicable for the move operation. Move always relocates all locale variants of an asset. Remove --locale and try again.',
243245
AM_TARGET_FOLDER_FLAG: 'Destination AM folder UID for bulk move. Use "root" to move assets to the root folder.',
244246
AM_INVALID_OPERATION: 'Invalid operation: {operation}. Must be delete or move',
245247
AM_CONFIRM_SUMMARY: 'Proceed with AM {operation} on {count} item(s)?',

packages/contentstack-bulk-operations/src/utils/interactive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ export async function fillMissingAmFlags(flags: any): Promise<any> {
257257
!f['space-uid'] && '--space-uid',
258258
!f['org-uid'] && '--org-uid',
259259
!f['asset-uids-file'] && '--asset-uids-file',
260-
(f.operation === 'delete' && !f.locale) && '--locale',
261-
(f.operation === 'move' && !f['target-folder-uid']) && '--target-folder-uid',
260+
f.operation === 'delete' && !f.locale && '--locale',
261+
f.operation === 'move' && !f['target-folder-uid'] && '--target-folder-uid',
262262
].filter(Boolean);
263263
throw new Error(
264264
`Missing required flag(s): ${missing.join(', ')}. Provide all required flags when running in a non-interactive environment.`

0 commit comments

Comments
 (0)