Comparing version 1.7.51-dev to 1.7.52-dev
{ | ||
"name": "bdy", | ||
"preferGlobal": false, | ||
"version": "1.7.51-dev", | ||
"version": "1.7.52-dev", | ||
"type": "commonjs", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -37,6 +37,10 @@ const { resolve } = require('path'); | ||
}); | ||
chmodSync(this.dir, 0o777); | ||
} catch (err) { | ||
throw new Error(ERR_CANT_CREATE_DIR_IN_HOME('.bdy')); | ||
} | ||
try { | ||
chmodSync(this.dir, 0o777); | ||
} catch { | ||
// do nothing | ||
} | ||
} | ||
@@ -47,6 +51,10 @@ | ||
writeFileSync(this.file, '{}', 'utf-8'); | ||
chmodSync(this.file, 0o666); | ||
} catch (err) { | ||
throw new Error(ERR_CANT_CREATE_DIR_IN_HOME('.bdy/cfg.json')); | ||
} | ||
try { | ||
chmodSync(this.file, 0o666); | ||
} catch { | ||
// do nothing | ||
} | ||
} | ||
@@ -222,6 +230,10 @@ | ||
writeFileSync(this.file, JSON.stringify(this.json, null, 4), 'utf-8'); | ||
chmodSync(this.file, 0o666); | ||
} catch (err) { | ||
throw new Error(ERR_CANT_CREATE_DIR_IN_HOME('.bdy/cfg.json')); | ||
} | ||
try { | ||
chmodSync(this.file, 0o666); | ||
} catch { | ||
// do nothing | ||
} | ||
} | ||
@@ -228,0 +240,0 @@ } |
@@ -34,3 +34,7 @@ const pino = require('pino'); | ||
this.logStream = fs.openSync(this.logPath, 'w'); | ||
fs.chmodSync(this.logPath, 0o666); | ||
try { | ||
fs.chmodSync(this.logPath, 0o666); | ||
} catch { | ||
// do nothing | ||
} | ||
this.p = pino({ | ||
@@ -37,0 +41,0 @@ level: process.env.DEBUG === '1' ? 'debug' : 'info', |
@@ -252,3 +252,7 @@ const { resolve } = require('path'); | ||
mkdirSync(p, { recursive: true }); | ||
chmodSync(p, 0o777); | ||
try { | ||
chmodSync(p, 0o777); | ||
} catch { | ||
// do nothing | ||
} | ||
} | ||
@@ -255,0 +259,0 @@ return p; |
Possible typosquat attack
Supply chain riskThere is a package with a similar name that is downloaded much more often.
Did you mean |
---|
body |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
360556
8642
1