Skip to content

Commit

Permalink
No bold everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Jul 25, 2024
1 parent e7b3f1b commit 0e45166
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ export default function handleInsecureCSPValueError(
parsedCSP.get('script-src') &&
parsedCSP.get('script-src')?.includes("'unsafe-eval'")
) {
return bold(
`[manifest.json]: Insecure ${yellow(
'content-security-policy'
)} value "'${cyan('unsafe-eval')}'" in directive '${blue(
'script-src'
)}'.`
)
return `[manifest.json]: Insecure ${yellow(
'content-security-policy'
)} value "'${cyan('unsafe-eval')}'" in directive '${blue('script-src')}'.`
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import path from 'path'
import fs from 'fs'
import {bold} from '@colors/colors/safe'
import addProgressBar from '../../../helpers/addProgressBar'
import masterPreferences from './masterPreferences'

Expand All @@ -22,21 +21,18 @@ export default function createUserDataDir(
const userProfile = JSON.stringify(masterPreferences)

if (!silent) {
addProgressBar(
`πŸ‘€ Creating ${bold('Chrome')} user data directory...`,
() => {
const profilePath = path.resolve(__dirname, 'run-chrome-data-dir')
const preferences = path.join(profilePath, 'Default')
addProgressBar(`πŸ‘€ Creating ${'Chrome'} user data directory...`, () => {
const profilePath = path.resolve(__dirname, 'run-chrome-data-dir')
const preferences = path.join(profilePath, 'Default')

// Ensure directory exists
fs.mkdirSync(preferences, {recursive: true})
// Ensure directory exists
fs.mkdirSync(preferences, {recursive: true})

const preferencesPath = path.join(preferences, 'Preferences')
const preferencesPath = path.join(preferences, 'Preferences')

// Actually write the user preferences
fs.writeFileSync(preferencesPath, userProfile, 'utf8')
}
)
// Actually write the user preferences
fs.writeFileSync(preferencesPath, userProfile, 'utf8')
})
}

return path.resolve(__dirname, 'run-chrome-data-dir')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function createUserDataDir(
const userProfile = JSON.stringify(masterPreferences)

if (!silent) {
addProgressBar(`πŸ‘€ Creating ${bold('Edge')} user data directory...`, () => {
addProgressBar(`πŸ‘€ Creating ${'Edge'} user data directory...`, () => {
const profilePath = path.resolve(__dirname, 'run-edge-data-dir')
const preferences = path.join(profilePath, 'Default')

Expand Down
4 changes: 2 additions & 2 deletions programs/create/helpers/isDirectoryWriteable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
// β•šβ•β•β•β•β•β•β•šβ•β• β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β•β•

import fs from 'fs/promises'
import {bold} from '@colors/colors/safe'
import {green} from '@colors/colors/safe'

export default async function isDirectoryWriteable(
directory: string,
projectName: string
): Promise<boolean> {
try {
console.log(`🀝 - Ensuring ${bold(projectName)} folder exists...`)
console.log(`🀝 - Ensuring ${green(projectName)} folder exists...`)

await fs.mkdir(directory, {recursive: true})

Expand Down

0 comments on commit 0e45166

Please sign in to comment.