@wrongstack/tools 0.8.2 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builtin.js +100 -23
- package/dist/builtin.js.map +1 -1
- package/dist/codebase-index/index.js +14 -6
- package/dist/codebase-index/index.js.map +1 -1
- package/dist/exec.js +14 -2
- package/dist/exec.js.map +1 -1
- package/dist/fetch.js +48 -3
- package/dist/fetch.js.map +1 -1
- package/dist/index.js +100 -23
- package/dist/index.js.map +1 -1
- package/dist/logs.js +22 -11
- package/dist/logs.js.map +1 -1
- package/dist/pack.js +100 -23
- package/dist/pack.js.map +1 -1
- package/dist/replace.js +2 -1
- package/dist/replace.js.map +1 -1
- package/package.json +3 -2
|
@@ -5,7 +5,7 @@ import { createRequire } from 'node:module';
|
|
|
5
5
|
import * as fs from 'node:fs';
|
|
6
6
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
7
7
|
import * as ts from 'typescript';
|
|
8
|
-
import {
|
|
8
|
+
import { execFileSync, spawnSync } from 'node:child_process';
|
|
9
9
|
import * as os from 'node:os';
|
|
10
10
|
|
|
11
11
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -847,7 +847,7 @@ function syncGoParse(filePath, content, lang) {
|
|
|
847
847
|
mkdirSync(tmpDir, { recursive: true });
|
|
848
848
|
const scriptPath = path4.join(tmpDir, "parse.go");
|
|
849
849
|
writeFileSync(scriptPath, GO_PARSE_SCRIPT, "utf8");
|
|
850
|
-
const stdout =
|
|
850
|
+
const stdout = execFileSync("go", ["run", scriptPath], {
|
|
851
851
|
input: content,
|
|
852
852
|
timeout: 15e3,
|
|
853
853
|
encoding: "utf8",
|
|
@@ -1093,7 +1093,7 @@ function syncPyParse(filePath, lang) {
|
|
|
1093
1093
|
mkdirSync(tmpDir, { recursive: true });
|
|
1094
1094
|
const scriptPath = path4.join(tmpDir, "parse.py");
|
|
1095
1095
|
writeFileSync(scriptPath, PY_PARSE_SCRIPT, "utf8");
|
|
1096
|
-
const stdout =
|
|
1096
|
+
const stdout = execFileSync("python", [scriptPath, filePath], {
|
|
1097
1097
|
timeout: 15e3,
|
|
1098
1098
|
encoding: "utf8",
|
|
1099
1099
|
windowsHide: true
|
|
@@ -1131,11 +1131,19 @@ function parseSymbols4(opts) {
|
|
|
1131
1131
|
}
|
|
1132
1132
|
function checkNativeParser() {
|
|
1133
1133
|
try {
|
|
1134
|
-
|
|
1134
|
+
execFileSync("rustc", ["--version"], { stdio: "pipe" });
|
|
1135
1135
|
const toolsDir = path4.join(process.cwd(), "tools");
|
|
1136
1136
|
try {
|
|
1137
|
-
|
|
1138
|
-
"cargo
|
|
1137
|
+
execFileSync(
|
|
1138
|
+
"cargo",
|
|
1139
|
+
[
|
|
1140
|
+
"metadata",
|
|
1141
|
+
"--no-deps",
|
|
1142
|
+
"--format-version",
|
|
1143
|
+
"1",
|
|
1144
|
+
"--manifest-path",
|
|
1145
|
+
path4.join(toolsDir, "Cargo.toml")
|
|
1146
|
+
],
|
|
1139
1147
|
{ stdio: "pipe" }
|
|
1140
1148
|
);
|
|
1141
1149
|
return true;
|