@node9/proxy 1.54.0 → 1.55.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.
package/dist/cli.js CHANGED
@@ -4241,6 +4241,15 @@ function applyManagedEgress(local, managed, locked) {
4241
4241
  locked.includes("egressMode")
4242
4242
  );
4243
4243
  }
4244
+ if (Array.isArray(managed.allow) && managed.allow.length > 0) {
4245
+ next.allow = [...managed.allow];
4246
+ }
4247
+ if (Array.isArray(managed.deny) && managed.deny.length > 0) {
4248
+ next.deny = [.../* @__PURE__ */ new Set([...local.deny ?? [], ...managed.deny])];
4249
+ }
4250
+ if (typeof managed.allowPrivate === "boolean") {
4251
+ next.allowPrivate = locked.includes("egressAllowPrivate") ? managed.allowPrivate : (local.allowPrivate ?? true) && managed.allowPrivate;
4252
+ }
4244
4253
  return next;
4245
4254
  }
4246
4255
  function applyManagedDlp(local, managed, locked) {
@@ -4489,11 +4498,15 @@ function getConfig(cwd) {
4489
4498
  );
4490
4499
  }
4491
4500
  if (mc.egress && typeof mc.egress === "object") {
4501
+ const hosts = (v) => Array.isArray(v) ? v.filter((h) => typeof h === "string") : void 0;
4492
4502
  mergedPolicy.egress = applyManagedEgress(
4493
4503
  mergedPolicy.egress,
4494
4504
  {
4495
4505
  enabled: typeof mc.egress.enabled === "boolean" ? mc.egress.enabled : void 0,
4496
- mode: typeof mc.egress.mode === "string" ? mc.egress.mode : void 0
4506
+ mode: typeof mc.egress.mode === "string" ? mc.egress.mode : void 0,
4507
+ allow: hosts(mc.egress.allow),
4508
+ deny: hosts(mc.egress.deny),
4509
+ allowPrivate: typeof mc.egress.allowPrivate === "boolean" ? mc.egress.allowPrivate : void 0
4497
4510
  },
4498
4511
  locked
4499
4512
  );
@@ -17049,7 +17062,17 @@ function extractManagedConfig(body) {
17049
17062
  const e = {};
17050
17063
  if (typeof mc.egress.enabled === "boolean") e.enabled = mc.egress.enabled;
17051
17064
  if (typeof mc.egress.mode === "string") e.mode = mc.egress.mode;
17052
- if (e.enabled !== void 0 || e.mode !== void 0) out.egress = e;
17065
+ const cleanHosts = (v) => Array.isArray(v) ? v.filter((h) => typeof h === "string") : [];
17066
+ const allow = cleanHosts(mc.egress.allow);
17067
+ const deny = cleanHosts(mc.egress.deny);
17068
+ if (allow.length) e.allow = allow;
17069
+ if (deny.length) e.deny = deny;
17070
+ if (typeof mc.egress.allowPrivate === "boolean") {
17071
+ e.allowPrivate = mc.egress.allowPrivate;
17072
+ }
17073
+ if (e.enabled !== void 0 || e.mode !== void 0 || e.allow !== void 0 || e.deny !== void 0 || e.allowPrivate !== void 0) {
17074
+ out.egress = e;
17075
+ }
17053
17076
  }
17054
17077
  if (mc.dlp && typeof mc.dlp === "object") {
17055
17078
  const d = {};
package/dist/cli.mjs CHANGED
@@ -4219,6 +4219,15 @@ function applyManagedEgress(local, managed, locked) {
4219
4219
  locked.includes("egressMode")
4220
4220
  );
4221
4221
  }
4222
+ if (Array.isArray(managed.allow) && managed.allow.length > 0) {
4223
+ next.allow = [...managed.allow];
4224
+ }
4225
+ if (Array.isArray(managed.deny) && managed.deny.length > 0) {
4226
+ next.deny = [.../* @__PURE__ */ new Set([...local.deny ?? [], ...managed.deny])];
4227
+ }
4228
+ if (typeof managed.allowPrivate === "boolean") {
4229
+ next.allowPrivate = locked.includes("egressAllowPrivate") ? managed.allowPrivate : (local.allowPrivate ?? true) && managed.allowPrivate;
4230
+ }
4222
4231
  return next;
4223
4232
  }
4224
4233
  function applyManagedDlp(local, managed, locked) {
@@ -4470,11 +4479,15 @@ function getConfig(cwd) {
4470
4479
  );
4471
4480
  }
4472
4481
  if (mc.egress && typeof mc.egress === "object") {
4482
+ const hosts = (v) => Array.isArray(v) ? v.filter((h) => typeof h === "string") : void 0;
4473
4483
  mergedPolicy.egress = applyManagedEgress(
4474
4484
  mergedPolicy.egress,
4475
4485
  {
4476
4486
  enabled: typeof mc.egress.enabled === "boolean" ? mc.egress.enabled : void 0,
4477
- mode: typeof mc.egress.mode === "string" ? mc.egress.mode : void 0
4487
+ mode: typeof mc.egress.mode === "string" ? mc.egress.mode : void 0,
4488
+ allow: hosts(mc.egress.allow),
4489
+ deny: hosts(mc.egress.deny),
4490
+ allowPrivate: typeof mc.egress.allowPrivate === "boolean" ? mc.egress.allowPrivate : void 0
4478
4491
  },
4479
4492
  locked
4480
4493
  );
@@ -17023,7 +17036,17 @@ function extractManagedConfig(body) {
17023
17036
  const e = {};
17024
17037
  if (typeof mc.egress.enabled === "boolean") e.enabled = mc.egress.enabled;
17025
17038
  if (typeof mc.egress.mode === "string") e.mode = mc.egress.mode;
17026
- if (e.enabled !== void 0 || e.mode !== void 0) out.egress = e;
17039
+ const cleanHosts = (v) => Array.isArray(v) ? v.filter((h) => typeof h === "string") : [];
17040
+ const allow = cleanHosts(mc.egress.allow);
17041
+ const deny = cleanHosts(mc.egress.deny);
17042
+ if (allow.length) e.allow = allow;
17043
+ if (deny.length) e.deny = deny;
17044
+ if (typeof mc.egress.allowPrivate === "boolean") {
17045
+ e.allowPrivate = mc.egress.allowPrivate;
17046
+ }
17047
+ if (e.enabled !== void 0 || e.mode !== void 0 || e.allow !== void 0 || e.deny !== void 0 || e.allowPrivate !== void 0) {
17048
+ out.egress = e;
17049
+ }
17027
17050
  }
17028
17051
  if (mc.dlp && typeof mc.dlp === "object") {
17029
17052
  const d = {};
package/dist/index.js CHANGED
@@ -3528,6 +3528,15 @@ function applyManagedEgress(local, managed, locked) {
3528
3528
  locked.includes("egressMode")
3529
3529
  );
3530
3530
  }
3531
+ if (Array.isArray(managed.allow) && managed.allow.length > 0) {
3532
+ next.allow = [...managed.allow];
3533
+ }
3534
+ if (Array.isArray(managed.deny) && managed.deny.length > 0) {
3535
+ next.deny = [.../* @__PURE__ */ new Set([...local.deny ?? [], ...managed.deny])];
3536
+ }
3537
+ if (typeof managed.allowPrivate === "boolean") {
3538
+ next.allowPrivate = locked.includes("egressAllowPrivate") ? managed.allowPrivate : (local.allowPrivate ?? true) && managed.allowPrivate;
3539
+ }
3531
3540
  return next;
3532
3541
  }
3533
3542
  var DLP_PII_ORDER = ["off", "block"];
@@ -4015,11 +4024,15 @@ function getConfig(cwd) {
4015
4024
  );
4016
4025
  }
4017
4026
  if (mc.egress && typeof mc.egress === "object") {
4027
+ const hosts = (v) => Array.isArray(v) ? v.filter((h) => typeof h === "string") : void 0;
4018
4028
  mergedPolicy.egress = applyManagedEgress(
4019
4029
  mergedPolicy.egress,
4020
4030
  {
4021
4031
  enabled: typeof mc.egress.enabled === "boolean" ? mc.egress.enabled : void 0,
4022
- mode: typeof mc.egress.mode === "string" ? mc.egress.mode : void 0
4032
+ mode: typeof mc.egress.mode === "string" ? mc.egress.mode : void 0,
4033
+ allow: hosts(mc.egress.allow),
4034
+ deny: hosts(mc.egress.deny),
4035
+ allowPrivate: typeof mc.egress.allowPrivate === "boolean" ? mc.egress.allowPrivate : void 0
4023
4036
  },
4024
4037
  locked
4025
4038
  );
package/dist/index.mjs CHANGED
@@ -3498,6 +3498,15 @@ function applyManagedEgress(local, managed, locked) {
3498
3498
  locked.includes("egressMode")
3499
3499
  );
3500
3500
  }
3501
+ if (Array.isArray(managed.allow) && managed.allow.length > 0) {
3502
+ next.allow = [...managed.allow];
3503
+ }
3504
+ if (Array.isArray(managed.deny) && managed.deny.length > 0) {
3505
+ next.deny = [.../* @__PURE__ */ new Set([...local.deny ?? [], ...managed.deny])];
3506
+ }
3507
+ if (typeof managed.allowPrivate === "boolean") {
3508
+ next.allowPrivate = locked.includes("egressAllowPrivate") ? managed.allowPrivate : (local.allowPrivate ?? true) && managed.allowPrivate;
3509
+ }
3501
3510
  return next;
3502
3511
  }
3503
3512
  var DLP_PII_ORDER = ["off", "block"];
@@ -3985,11 +3994,15 @@ function getConfig(cwd) {
3985
3994
  );
3986
3995
  }
3987
3996
  if (mc.egress && typeof mc.egress === "object") {
3997
+ const hosts = (v) => Array.isArray(v) ? v.filter((h) => typeof h === "string") : void 0;
3988
3998
  mergedPolicy.egress = applyManagedEgress(
3989
3999
  mergedPolicy.egress,
3990
4000
  {
3991
4001
  enabled: typeof mc.egress.enabled === "boolean" ? mc.egress.enabled : void 0,
3992
- mode: typeof mc.egress.mode === "string" ? mc.egress.mode : void 0
4002
+ mode: typeof mc.egress.mode === "string" ? mc.egress.mode : void 0,
4003
+ allow: hosts(mc.egress.allow),
4004
+ deny: hosts(mc.egress.deny),
4005
+ allowPrivate: typeof mc.egress.allowPrivate === "boolean" ? mc.egress.allowPrivate : void 0
3993
4006
  },
3994
4007
  locked
3995
4008
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "1.54.0",
3
+ "version": "1.55.0",
4
4
  "description": "The Sudo Command for AI Agents. Execution Security for Claude Code, Codex, Gemini, Cursor, Opencode, Pi, and any MCP server.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",