@bleed-believer/cli
Advanced tools
+15
-4
@@ -0,5 +1,5 @@ | ||
| import { resolve, basename } from 'node:path'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { Transpiler, PathAliasPlugin } from './lib/transpiler/index.js'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { Tsconfig } from './lib/tsconfig/index.js'; | ||
| import { resolve } from 'node:path'; | ||
| const tsconfigPath = resolve(process.env['BLEED-BELIEVER-CLI-TSCONFIG'] ?? | ||
@@ -21,7 +21,18 @@ 'tsconfig.json'); | ||
| try { | ||
| const { code } = await transpiler.transpile(path); | ||
| const { code, map } = await transpiler.transpile(path); | ||
| let source = code; | ||
| if (map) { | ||
| const mapObj = JSON.parse(map); | ||
| mapObj.sources = [basename(path)]; | ||
| mapObj.sourceRoot = ''; | ||
| const base64Map = Buffer | ||
| .from(JSON.stringify(mapObj)) | ||
| .toString('base64'); | ||
| source = code.replace(/\/\/# sourceMappingURL=\S+$/m, ''); | ||
| source += `\n//# sourceMappingURL=data:application/json;base64,${base64Map}`; | ||
| } | ||
| const out = { | ||
| shortCircuit: true, | ||
| format: 'module', | ||
| source: code | ||
| source | ||
| }; | ||
@@ -28,0 +39,0 @@ cache.set(url, out); |
+1
-1
| { | ||
| "name": "@bleed-believer/cli", | ||
| "version": "0.0.6-alpha.0", | ||
| "version": "1.0.0", | ||
| "description": "A ts-node replacement with path alias resolution and SWC under the hood", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
67122
0.76%979
1.14%0
-100%0
-100%