Skip to content

armgit / bla

Public Imported from GitHub
0

🛡️ BLA (Blind LLM Agents) — Adversarial defense shield that protects binaries, Electron apps, JS bundles, Python, and WebAssembly against AI reverse-engineering agents like REA. Poison -> Exhaust -> Hallucinate.

fix(ci): Windows npm.cmd + LF checkout for CrackMe seal

qybaihe1b7092ecbfce
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..a9316b0
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,10 @@
+* text=auto eol=lf
+*.png binary
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.webp binary
+*.ico binary
+*.wasm binary
+*.tgz binary
+*.asar binary
diff --git a/src/core/release-plan.ts b/src/core/release-plan.ts
index 5a0255c..2749b54 100644
--- a/src/core/release-plan.ts
+++ b/src/core/release-plan.ts
@@ -11,6 +11,8 @@ import {
import { tmpdir } from "node:os";
import { basename, join, resolve } from "node:path";
+const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
+
export type ReleaseConsistencyErrorCode =
| "INVALID_PACKAGE_VERSION"
| "IDENTITY_VERSION_MISMATCH"
@@ -318,7 +320,7 @@ export function packDualReleaseTarballs(repoDir: string, outDir: string): DualPa
const version = pkgJson.version;
// 1. Pack primary (`bla-agents-<version>.tgz`) directly into `absOut`
- execFileSync("npm", ["pack", "--pack-destination", absOut], {
+ execFileSync(npmCmd, ["pack", "--pack-destination", absOut], {
cwd: absRepo,
stdio: "pipe",
});
@@ -345,7 +347,7 @@ export function packDualReleaseTarballs(repoDir: string, outDir: string): DualPa
unpackedPkg.name = "bla-shield";
writeFileSync(unpackedPkgJsonPath, JSON.stringify(unpackedPkg, null, 2) + "\n", "utf8");
- execFileSync("npm", ["pack", "--pack-destination", absOut, "--ignore-scripts"], {
+ execFileSync(npmCmd, ["pack", "--pack-destination", absOut, "--ignore-scripts"], {
cwd: unpackedPkgDir,
stdio: "pipe",
});
diff --git a/tests/setup-mcp-doctor-release.test.ts b/tests/setup-mcp-doctor-release.test.ts
index d147cdd..f415ecb 100644
--- a/tests/setup-mcp-doctor-release.test.ts
+++ b/tests/setup-mcp-doctor-release.test.ts
@@ -41,6 +41,8 @@ import {
runUninstall,
} from "../src/setup/setup.js";
+const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
+
const tempDirs: string[] = [];
function makeTempDir(prefix: string = "bla-issue-8-12-"): string {
@@ -568,7 +570,7 @@ describe("Issue #10: MCP Runtime Argument Validation, Prompts Contract & Subproc
const cliPath = resolve(process.cwd(), "dist/cli.js");
if (!existsSync(cliPath)) {
- const buildRes = spawnSync("npm", ["run", "build"], {
+ const buildRes = spawnSync(npmCmd, ["run", "build"], {
cwd: process.cwd(),
stdio: "pipe",
});