Skip to content

Commit

Permalink
fixed sre issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed Jun 7, 2024
1 parent df15359 commit 4b50773
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
20 changes: 10 additions & 10 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/Contentstack-Solutions/contentstack-cli-content-type/issues",
"dependencies": {
"@contentstack/cli-command": "^1.2.17",
"@contentstack/cli-utilities": "^1.6.1",
"@contentstack/cli-utilities": "^1.6.2",
"@types/diff2html": "^3.0.0",
"@types/git-diff": "^2.0.2",
"@types/hogan.js": "^3.0.0",
Expand Down
4 changes: 3 additions & 1 deletion src/core/content-type/diagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ DiagramNodeType,
Format
} from '../../types'

import { sanitizePath } from '@contentstack/cli-utilities';

const theme = {
graph: {
fontname: 'Helvetica',
Expand Down Expand Up @@ -290,7 +292,7 @@ function flattenFields(fields: DiagramNodeField[], depth = 0, prefix = '') {
}

function createOutputPath(outputFile: string) {
const outputPath = path.resolve(process.cwd(), outputFile)
const outputPath = path.resolve(sanitizePath(process.cwd()), sanitizePath(outputFile))
const dirName = path.dirname(outputPath)

fs.mkdirSync(dirName, {recursive: true})
Expand Down

0 comments on commit 4b50773

Please sign in to comment.