@exodus/analytics-validation
Advanced tools
+7
-5
| { | ||
| "name": "@exodus/analytics-validation", | ||
| "version": "2.80.1", | ||
| "version": "3.0.0", | ||
| "type": "module", | ||
| "description": "JSON schemas for analytics events, to prevent sensitive data from being sent up to the infamous cloud", | ||
@@ -31,8 +32,9 @@ "author": "Exodus Movement, Inc.", | ||
| "scripts": { | ||
| "build": "node scripts/build-schemasafe.js && node scripts/build-types.mjs && run -T tsc -p tsconfig.build.json", | ||
| "build:generated": "node scripts/build-schemasafe.mjs && node scripts/build-types.mjs", | ||
| "build": "yarn build:generated && run -T tsc -p tsconfig.build.json", | ||
| "build:watch": "yarn build -w", | ||
| "clean": "run -T tsc --build --clean", | ||
| "prepublishOnly": "yarn run -T build --scope @exodus/analytics-validation", | ||
| "test": "node scripts/build-schemasafe.js && run -T exodus-test --jest --esbuild", | ||
| "lint": "node scripts/build-schemasafe.js && run -T tsc --noEmit && run -T eslint .", | ||
| "test": "node scripts/build-schemasafe.mjs && run -T exodus-test --jest --esbuild", | ||
| "lint": "yarn build:generated && run -T tsc --noEmit && run -T eslint .", | ||
| "lint:fix": "yarn lint --fix" | ||
@@ -57,3 +59,3 @@ }, | ||
| }, | ||
| "gitHead": "c4b115b9768e67dc6480cd272c6a27d5fec33d13" | ||
| "gitHead": "c9c9d0f5d4642f38d4055989160baefacc3f410e" | ||
| } |
+16
-11
@@ -1,3 +0,4 @@ | ||
| const fs = require('fs') | ||
| const path = require('path') | ||
| import fs from 'node:fs' | ||
| import path from 'node:path' | ||
| import { fileURLToPath } from 'node:url' | ||
@@ -25,2 +26,4 @@ const schemas = {} | ||
| const __filename = fileURLToPath(import.meta.url) | ||
| const __dirname = path.dirname(__filename) | ||
| const schemaDir = path.join(__dirname, './lib') | ||
@@ -38,11 +41,13 @@ const schemaNames = fs.readdirSync(schemaDir) | ||
| // as were used to compile schemas at build time | ||
| module.exports = { | ||
| extraFormats: true, | ||
| formats: { | ||
| 'any-string': (str) => typeof str === 'string', | ||
| 'semver-string': semVerRegEx, | ||
| locale: localeRegEx, | ||
| }, | ||
| schemas, | ||
| mode: 'default', | ||
| export const extraFormats = true | ||
| export const formats = { | ||
| 'any-string': (str) => typeof str === 'string', | ||
| 'semver-string': semVerRegEx, | ||
| locale: localeRegEx, | ||
| } | ||
| export const mode = 'default' | ||
| export { schemas } | ||
| const schemasafeConfig = { extraFormats, formats, schemas, mode } | ||
| export default schemasafeConfig |
Sorry, the diff of this file is too big to display
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
437424
0.14%16032
0.02%0
-100%Yes
NaN