just-bash 2.12.6 → 2.12.7

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.
@@ -39,6 +39,10 @@ export type AdapterFactory = (options: BashOptions) => EnvAdapter | Promise<EnvA
39
39
  * Utility for testing that a URL is blocked
40
40
  */
41
41
  export declare function expectBlocked(env: EnvAdapter, url: string, expectedUrl?: string): Promise<void>;
42
+ /**
43
+ * Utility for testing that a URL is blocked due to private IP
44
+ */
45
+ export declare function expectBlockedPrivate(env: EnvAdapter, url: string, expectedUrl?: string): Promise<void>;
42
46
  /**
43
47
  * Utility for testing that a URL succeeds with expected mock response
44
48
  */
@@ -57,6 +57,10 @@ export interface NetworkConfig {
57
57
  * Reject URLs with private/loopback IP addresses as hostnames.
58
58
  * This is a URL/hostname-level check only (no DNS resolution).
59
59
  * Useful for mitigating SSRF attacks. Default: false (opt-in).
60
+ *
61
+ * When enabled, the private IP check is enforced even when
62
+ * `dangerouslyAllowFullInternetAccess` is true, ensuring that
63
+ * internal/loopback addresses are never reachable.
60
64
  */
61
65
  denyPrivateRanges?: boolean;
62
66
  }
@@ -74,7 +78,7 @@ export interface FetchResult {
74
78
  * Error thrown when a URL is not allowed
75
79
  */
76
80
  export declare class NetworkAccessDeniedError extends Error {
77
- constructor(url: string);
81
+ constructor(url: string, reason?: string);
78
82
  }
79
83
  /**
80
84
  * Error thrown when too many redirects occur
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "just-bash",
3
- "version": "2.12.6",
3
+ "version": "2.12.7",
4
4
  "description": "A simulated bash environment with virtual filesystem",
5
5
  "repository": {
6
6
  "type": "git",