🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@bleed-believer/cli

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bleed-believer/cli - npm Package Compare versions

Comparing version
0.0.6-alpha.0
to
1.0.0
+15
-4
dist/hooks.js

@@ -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);

{
"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",