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

SRE fixes #102

Merged
merged 1 commit into from
Jun 7, 2024
Merged
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
8,600 changes: 5,699 additions & 2,901 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@
},
"dependencies": {
"@contentstack/cli-command": "^1.2.17",
"@contentstack/cli-utilities": "^1.6.1",
"@contentstack/cli-utilities": "^1.6.2",
"@contentstack/management": "^1.16.0",
"cli-table3": "^0.6.0",
"cli-ux": "^6.0.9",
4 changes: 2 additions & 2 deletions src/utils/generate-output.ts
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import * as jsonexport from 'jsonexport'
import * as Table from 'cli-table3'
import * as path from 'path'
import * as fs from 'fs'
import { cliux } from '@contentstack/cli-utilities'
import { cliux, sanitizePath } from '@contentstack/cli-utilities'
const regexMessages = require('../../messages/index.json').validateRegex

export default async function generateOutput(flags: any, invalidRegex: any, tableData: any) {
@@ -15,7 +15,7 @@ export default async function generateOutput(flags: any, invalidRegex: any, tabl
if (!fs.existsSync(storagePath)) {
fs.mkdirSync(storagePath, {recursive: true})
}
storagePath = path.resolve(storagePath, resultFile)
storagePath = path.resolve(sanitizePath(storagePath), sanitizePath(resultFile))
jsonexport(invalidRegex, function (error: any, csv: any) {
if (error) {
throw new Error(regexMessages.errors.csvOutput)