@anthropic-ai/claude-code 1.0.56 → 1.0.58

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropic-ai/claude-code",
3
- "version": "1.0.56",
3
+ "version": "1.0.58",
4
4
  "main": "sdk.mjs",
5
5
  "types": "sdk.d.ts",
6
6
  "bin": {
package/sdk.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
2
2
 
3
- // Version: 1.0.56
3
+ // Version: 1.0.58
4
4
 
5
5
  // src/entrypoints/sdk.ts
6
6
  import { spawn } from "child_process";
@@ -83,11 +83,20 @@ class Stream {
83
83
  }
84
84
  }
85
85
 
86
+ // src/utils/abortController.ts
87
+ import { setMaxListeners } from "events";
88
+ var DEFAULT_MAX_LISTENERS = 50;
89
+ function createAbortController(maxListeners = DEFAULT_MAX_LISTENERS) {
90
+ const controller = new AbortController;
91
+ setMaxListeners(maxListeners, controller.signal);
92
+ return controller;
93
+ }
94
+
86
95
  // src/entrypoints/sdk.ts
87
96
  function query({
88
97
  prompt,
89
98
  options: {
90
- abortController = new AbortController,
99
+ abortController = createAbortController(),
91
100
  allowedTools = [],
92
101
  appendSystemPrompt,
93
102
  customSystemPrompt,
Binary file