@bytecodealliance/componentize-js
Advanced tools
+1
-1
| { | ||
| "name": "@bytecodealliance/componentize-js", | ||
| "version": "0.19.1", | ||
| "version": "0.19.2", | ||
| "homepage": "https://github.com/bytecodealliance/componentize-js#readme", | ||
@@ -5,0 +5,0 @@ "description": "ESM -> WebAssembly Component creator, via a SpiderMonkey JS engine embedding", |
+1
-1
@@ -24,3 +24,3 @@ #! /usr/bin/env node | ||
| program | ||
| .version('0.19.1') | ||
| .version('0.19.2') | ||
| .description('Create a component from a JavaScript module') | ||
@@ -27,0 +27,0 @@ .usage('<js-source> --wit wit-world.wit -o <component-path>') |
+10
-4
@@ -8,3 +8,3 @@ import { freemem } from 'node:os'; | ||
| import { tmpdir } from 'node:os'; | ||
| import { resolve, join, dirname } from 'node:path'; | ||
| import { resolve, join, dirname, relative } from 'node:path'; | ||
| import { readFile, writeFile, mkdir, rm, stat } from 'node:fs/promises'; | ||
@@ -253,2 +253,3 @@ import { rmSync, existsSync } from 'node:fs'; | ||
| let currentDir = maybeWindowsPath(cwd()); | ||
| if (workspacePrefix.startsWith(currentDir)) { | ||
@@ -259,7 +260,13 @@ workspacePrefix = currentDir; | ||
| // Ensure source path is relative to workspacePrefix for the args list, | ||
| // regardless of the directory | ||
| if (resolve(sourcePath).startsWith(resolve(workspacePrefix))) { | ||
| sourcePath = relative(workspacePrefix, sourcePath); | ||
| } | ||
| let args = `--initializer-script-path ${initializerPath} --strip-path-prefix ${workspacePrefix}/ ${sourcePath}`; | ||
| runtimeArgs = runtimeArgs ? `${runtimeArgs} ${args}` : args; | ||
| let preopens = [`--dir ${sourcesDir}`]; | ||
| preopens.push(`--mapdir /::${workspacePrefix}`); | ||
| let preopens = [`--dir=${sourcesDir}`]; | ||
| preopens.push(`--mapdir=/::${workspacePrefix}`); | ||
@@ -285,3 +292,2 @@ let postProcess; | ||
| input: runtimeArgs, | ||
| shell: true, | ||
| encoding: 'utf-8', | ||
@@ -288,0 +294,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
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
Network access
Supply chain riskThis module accesses the network.
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
27299286
0.04%5082
0.08%