@ued2345/laserbeak
Advanced tools
Comparing version 0.4.0-beta.1 to 0.4.0-beta.2
const fs = require('fs') | ||
const path = require('path') | ||
@@ -78,5 +79,14 @@ // 读取应用的 `package.json` 中的数据 | ||
// 把 Logger 的种子代码写入环境变量,便于在构建时自动嵌入 HTML | ||
function setSeedCode() { | ||
const filePath = path.join(__dirname, '../dist/logger-seed.min.js') | ||
const content = fs.readFileSync(filePath, 'utf8') | ||
process.env.VUE_APP_LOGGER_SEED_CODE = content | ||
console.log('[Logger] Read seed code and set to env variable `VUE_APP_LOGGER_SEED_CODE`.') | ||
} | ||
module.exports = { | ||
setAppInfo, | ||
setSentryRelease, | ||
setSeedCode, | ||
} |
{ | ||
"name": "@ued2345/laserbeak", | ||
"version": "0.4.0-beta.1", | ||
"version": "0.4.0-beta.2", | ||
"description": "JS SDK for logging systems", | ||
@@ -8,3 +8,3 @@ "main": "src/index.js", | ||
"scripts": { | ||
"build": "uglifyjs ./src/seed/index.js -o ./dist/logger-seed.min.js -c -m --stats --comments '/^!/'", | ||
"build": "npx uglifyjs ./src/seed/index.js -o ./dist/logger-seed.min.js -c -m --ie8 --timings --comments '/^!/'", | ||
"lint": "eslint ./**/*.js" | ||
@@ -28,4 +28,5 @@ }, | ||
"@ued2345/eslint-config": "^0.4.1", | ||
"eslint": "^6.7.2" | ||
"eslint": "^6.7.2", | ||
"uglify-js": "^3.8.0" | ||
} | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
11987
344
3
9