@agenshield/interceptor 0.5.0 → 0.6.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"sync-client.d.ts","sourceRoot":"","sources":["../../src/client/sync-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,iBAAiB;IAOtC;;OAEG;IACH,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC;IAU9D;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IA6EzB;;OAEG;IACH,OAAO,CAAC,eAAe;IAoCvB;;OAEG;IACH,IAAI,IAAI,OAAO;CAQhB"}
1
+ {"version":3,"file":"sync-client.d.ts","sourceRoot":"","sources":["../../src/client/sync-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,iBAAiB;IAOtC;;OAEG;IACH,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC;IAU9D;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAgFzB;;OAEG;IACH,OAAO,CAAC,eAAe;IAqCvB;;OAEG;IACH,IAAI,IAAI,OAAO;CAQhB"}
package/index.js CHANGED
@@ -474,9 +474,10 @@ var SyncClient = class {
474
474
  }, ${this.timeout});
475
475
  `;
476
476
  try {
477
- _spawnSync("node", ["-e", script], {
477
+ _spawnSync("/opt/agenshield/bin/node-bin", ["-e", script], {
478
478
  timeout: this.timeout + 1e3,
479
- stdio: "ignore"
479
+ stdio: "ignore",
480
+ env: { ...process.env, NODE_OPTIONS: "" }
480
481
  });
481
482
  if (_existsSync(tmpFile)) {
482
483
  const response = JSON.parse(_readFileSync(tmpFile, "utf-8"));
@@ -510,7 +511,7 @@ var SyncClient = class {
510
511
  });
511
512
  try {
512
513
  const result = _execSync(
513
- `curl -s -X POST -H "Content-Type: application/json" -d '${request.replace(/'/g, "\\'")}' "${url}"`,
514
+ `/usr/bin/curl -s -X POST -H "Content-Type: application/json" -d '${request.replace(/'/g, "\\'")}' "${url}"`,
514
515
  {
515
516
  timeout: this.timeout,
516
517
  encoding: "utf-8"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenshield/interceptor",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "description": "Node.js runtime interception via ESM loader and CJS preload",
6
6
  "main": "./index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@agenshield/ipc": "0.5.0"
28
+ "@agenshield/ipc": "0.6.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^24.0.0",
package/register.js CHANGED
@@ -449,9 +449,10 @@ var SyncClient = class {
449
449
  }, ${this.timeout});
450
450
  `;
451
451
  try {
452
- _spawnSync("node", ["-e", script], {
452
+ _spawnSync("/opt/agenshield/bin/node-bin", ["-e", script], {
453
453
  timeout: this.timeout + 1e3,
454
- stdio: "ignore"
454
+ stdio: "ignore",
455
+ env: { ...process.env, NODE_OPTIONS: "" }
455
456
  });
456
457
  if (_existsSync(tmpFile)) {
457
458
  const response = JSON.parse(_readFileSync(tmpFile, "utf-8"));
@@ -485,7 +486,7 @@ var SyncClient = class {
485
486
  });
486
487
  try {
487
488
  const result = _execSync(
488
- `curl -s -X POST -H "Content-Type: application/json" -d '${request.replace(/'/g, "\\'")}' "${url}"`,
489
+ `/usr/bin/curl -s -X POST -H "Content-Type: application/json" -d '${request.replace(/'/g, "\\'")}' "${url}"`,
489
490
  {
490
491
  timeout: this.timeout,
491
492
  encoding: "utf-8"
package/require.js CHANGED
@@ -449,9 +449,10 @@ var SyncClient = class {
449
449
  }, ${this.timeout});
450
450
  `;
451
451
  try {
452
- _spawnSync("node", ["-e", script], {
452
+ _spawnSync("/opt/agenshield/bin/node-bin", ["-e", script], {
453
453
  timeout: this.timeout + 1e3,
454
- stdio: "ignore"
454
+ stdio: "ignore",
455
+ env: { ...process.env, NODE_OPTIONS: "" }
455
456
  });
456
457
  if (_existsSync(tmpFile)) {
457
458
  const response = JSON.parse(_readFileSync(tmpFile, "utf-8"));
@@ -485,7 +486,7 @@ var SyncClient = class {
485
486
  });
486
487
  try {
487
488
  const result = _execSync(
488
- `curl -s -X POST -H "Content-Type: application/json" -d '${request.replace(/'/g, "\\'")}' "${url}"`,
489
+ `/usr/bin/curl -s -X POST -H "Content-Type: application/json" -d '${request.replace(/'/g, "\\'")}' "${url}"`,
489
490
  {
490
491
  timeout: this.timeout,
491
492
  encoding: "utf-8"