Skip to content

Commit 498f75b

Browse files
authored
Merge pull request #120 from contentstack/chore/DX-6926
Chore/dx 6926
2 parents 749b79a + ee186c6 commit 498f75b

5 files changed

Lines changed: 4 additions & 13 deletions

File tree

packages/contentstack-audit/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"fast-csv": "^4.3.6",
2626
"fs-extra": "^11.3.0",
2727
"lodash": "^4.18.1",
28-
"uuid": "^14.0.0",
2928
"winston": "^3.19.0"
3029
},
3130
"devDependencies": {

packages/contentstack-audit/src/audit-base-command.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import chalk from 'chalk';
22
import * as csv from 'fast-csv';
33
import { copy } from 'fs-extra';
4-
import { v4 as uuid } from 'uuid';
54
import isEmpty from 'lodash/isEmpty';
65
import { join, resolve } from 'path';
76
import cloneDeep from 'lodash/cloneDeep';
@@ -13,6 +12,7 @@ import {
1312
log,
1413
configHandler,
1514
createLogContext,
15+
generateUid,
1616
} from '@contentstack/cli-utilities';
1717
import { createWriteStream, existsSync, mkdirSync, readFileSync, writeFileSync, rmSync } from 'fs';
1818
import config from './config';
@@ -437,7 +437,7 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
437437
this.flags['copy-path'] ||
438438
this.flags['data-dir'] ||
439439
this.sharedConfig.basePath
440-
).replace(/\/+$/, '')}_backup_${uuid()}`;
440+
).replace(/\/+$/, '')}_backup_${generateUid()}`;
441441

442442
if (!existsSync(backupDirPath)) {
443443
mkdirSync(backupDirPath, { recursive: true });

packages/contentstack-import/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"merge": "^2.1.1",
2121
"mkdirp": "^1.0.4",
2222
"promise-limit": "^2.7.0",
23-
"uuid": "^14.0.0",
2423
"winston": "^3.19.0"
2524
},
2625
"devDependencies": {

packages/contentstack-import/src/import/modules/assets.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import isEmpty from 'lodash/isEmpty';
77
import uniq from 'lodash/uniq';
88
import { existsSync } from 'node:fs';
99
import includes from 'lodash/includes';
10-
import { v4 as uuid } from 'uuid';
1110
import { resolve as pResolve, join } from 'node:path';
12-
import { FsUtility, log, handleAndLogError } from '@contentstack/cli-utilities';
11+
import { FsUtility, log, handleAndLogError, generateUid } from '@contentstack/cli-utilities';
1312

1413
import config from '../../config';
1514
import { ModuleClassParams } from '../../types';
@@ -424,7 +423,7 @@ export default class ImportAssets extends BaseClass {
424423
// 2. if there are multiple assets fetched with same query, then check the parent uid against mapper created while importing folders
425424
// 3. Replace matched assets
426425
this.rootFolder = {
427-
uid: uuid(),
426+
uid: generateUid(),
428427
name: `Import-${formatDate()}`,
429428
parent_uid: null,
430429
created_at: null,

pnpm-lock.yaml

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)