@mylasecurity/gate 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/bin/gate.mjs +4 -2
  2. package/package.json +2 -2
package/bin/gate.mjs CHANGED
@@ -2585,7 +2585,8 @@ function runServe(io, opts) {
2585
2585
  }
2586
2586
 
2587
2587
  // src/cli.ts
2588
- import { pathToFileURL } from "node:url";
2588
+ import { fileURLToPath } from "node:url";
2589
+ import { realpathSync } from "node:fs";
2589
2590
  var realIo = {
2590
2591
  out: (s) => process.stdout.write(s + "\n"),
2591
2592
  err: (s) => process.stderr.write(s + "\n")
@@ -2795,10 +2796,11 @@ async function main(argv, io = realIo) {
2795
2796
  }
2796
2797
  }
2797
2798
  var isDirectRun = (() => {
2799
+ if (true) return true;
2798
2800
  const invoked = process.argv[1];
2799
2801
  if (!invoked) return false;
2800
2802
  try {
2801
- return import.meta.url === pathToFileURL(invoked).href;
2803
+ return realpathSync(fileURLToPath(import.meta.url)) === realpathSync(invoked);
2802
2804
  } catch {
2803
2805
  return false;
2804
2806
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mylasecurity/gate",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "license": "MIT",
5
5
  "description": "Put the Myla Gate in front of your AI agents: coding agents (Claude Code, Cursor, Codex) through their hooks, and any MCP client through its servers. Backs up first, prints exactly what it changed.",
6
6
  "homepage": "https://mylasecurity.app",
@@ -23,7 +23,7 @@
23
23
  "node": ">=18"
24
24
  },
25
25
  "scripts": {
26
- "build": "npx --yes esbuild src/cli.ts --bundle --platform=node --format=esm --target=node18 --tsconfig=../../tsconfig.json --banner:js=\"#!/usr/bin/env node\" --outfile=bin/gate.mjs",
26
+ "build": "npx --yes esbuild src/cli.ts --bundle --platform=node --format=esm --target=node18 --define:__GATE_BUNDLE__=true --tsconfig=../../tsconfig.json --banner:js=\"#!/usr/bin/env node\" --outfile=bin/gate.mjs",
27
27
  "prepublishOnly": "npm run build"
28
28
  },
29
29
  "files": [