@workerstack/clients 1.0.0-rc.26 → 1.0.0-rc.28

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 (277) hide show
  1. package/README.md +43 -43
  2. package/bin/{honey-clients.js → clients.js} +12 -12
  3. package/dist/cli.d.ts +3 -3
  4. package/dist/cli.js +14 -14
  5. package/dist/emit/cli/discovery.js +1 -1
  6. package/dist/emit/cli/install.js +2 -2
  7. package/dist/emit/cli/layout.js +1 -1
  8. package/dist/emit/cli/module.js +1 -1
  9. package/dist/emit/cli/release.js +1 -1
  10. package/dist/emit/csharp/errors.js +1 -1
  11. package/dist/emit/csharp/sdk-client.js +1 -1
  12. package/dist/emit/csharp/sdk-csproj.d.ts +1 -1
  13. package/dist/emit/csharp/sdk-csproj.js +2 -2
  14. package/dist/emit/csharp/sdk.d.ts +1 -1
  15. package/dist/emit/csharp/sdk.js +2 -2
  16. package/dist/emit/csharp/transport.js +2 -2
  17. package/dist/emit/csharp/types-record.d.ts +1 -1
  18. package/dist/emit/go/sdk-client.js +1 -1
  19. package/dist/emit/go/sdk.js +1 -1
  20. package/dist/emit/java/sdk-errors.js +5 -5
  21. package/dist/emit/java/sdk-op.d.ts +1 -1
  22. package/dist/emit/java/sdk.js +3 -3
  23. package/dist/emit/mcp/files.d.ts +1 -1
  24. package/dist/emit/mcp/mounted.js +2 -2
  25. package/dist/emit/mcp/runtime.js +1 -1
  26. package/dist/emit/mcp/server.js +1 -1
  27. package/dist/emit/python/errors.js +1 -1
  28. package/dist/emit/python/sdk-client.js +2 -2
  29. package/dist/emit/python/sdk-pyproject.js +4 -4
  30. package/dist/emit/python/sdk.d.ts +1 -1
  31. package/dist/emit/python/sdk.js +11 -11
  32. package/dist/emit/python/transport.js +1 -1
  33. package/dist/emit/rust/errors.js +2 -2
  34. package/dist/emit/rust/sdk-cargo.js +3 -3
  35. package/dist/emit/rust/sdk.d.ts +1 -1
  36. package/dist/emit/rust/sdk.js +2 -2
  37. package/dist/emit/shared/format.d.ts +1 -1
  38. package/dist/emit/shared/metadata.d.ts +1 -1
  39. package/dist/emit/shared/status-keys.d.ts +1 -1
  40. package/dist/emit/shared/status-keys.js +1 -1
  41. package/dist/emit/ts/app-client.js +2 -2
  42. package/dist/emit/ts/route-tree.d.ts +1 -1
  43. package/dist/emit/ts/route-tree.js +1 -12
  44. package/dist/emit/ts/sdk-types-preamble.js +16 -16
  45. package/dist/emit/ts/sdk-types.js +6 -6
  46. package/dist/emit/ts/tanstack-query.js +5 -5
  47. package/dist/emit/ts/type-gen.d.ts +4 -3
  48. package/dist/emit/ts/type-gen.js +86 -45
  49. package/dist/extract/chain.d.ts +10 -6
  50. package/dist/extract/chain.js +5 -19
  51. package/dist/extract/extract.d.ts +2 -2
  52. package/dist/extract/extract.js +40 -26
  53. package/dist/extract/serialize.js +1 -1
  54. package/dist/extract/walk.d.ts +15 -4
  55. package/dist/extract/walk.js +159 -15
  56. package/dist/gen/args.js +3 -3
  57. package/dist/gen/formatters.d.ts +6 -6
  58. package/dist/gen/formatters.js +7 -7
  59. package/dist/gen/process.d.ts +3 -3
  60. package/dist/gen/process.js +7 -7
  61. package/dist/gen/targets.d.ts +3 -3
  62. package/dist/gen/targets.js +3 -3
  63. package/dist/gen/write.d.ts +1 -1
  64. package/dist/gen/write.js +1 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.js +1 -1
  67. package/dist/ir/load.js +10 -10
  68. package/dist/ir/model.d.ts +6 -4
  69. package/dist/ir/sdk-model.d.ts +1 -1
  70. package/dist/ir/sdk-model.js +1 -1
  71. package/dist/ir/slots.d.ts +3 -3
  72. package/dist/ir/slots.js +12 -10
  73. package/dist/release/bootstrap.js +1 -1
  74. package/dist/release/bump-command.js +1 -1
  75. package/dist/release/cli.d.ts +4 -4
  76. package/dist/release/cli.js +6 -6
  77. package/dist/release/context.d.ts +1 -1
  78. package/dist/release/context.js +1 -1
  79. package/dist/release/digest.d.ts +1 -1
  80. package/dist/release/digest.js +2 -2
  81. package/dist/release/index.d.ts +1 -1
  82. package/dist/release/load.js +1 -1
  83. package/dist/release/manifest.js +1 -1
  84. package/dist/release/registries.js +3 -3
  85. package/dist/release/release-workflow.js +1 -1
  86. package/dist/release/spec-gate.d.ts +2 -2
  87. package/dist/release/spec-gate.js +2 -2
  88. package/dist/release/sync-command.d.ts +1 -1
  89. package/dist/release/sync-command.js +1 -1
  90. package/dist/release/sync-tree.js +1 -1
  91. package/dist/release/types.d.ts +6 -6
  92. package/dist/runtime/cli/body.go +1 -1
  93. package/dist/runtime/cli/config.go +3 -3
  94. package/dist/runtime/cli/discovery.go +1 -1
  95. package/dist/runtime/cli/format.go +1 -1
  96. package/dist/runtime/cli/log.go +1 -1
  97. package/dist/runtime/cli/output.go +1 -1
  98. package/dist/runtime/cli/params.go +1 -1
  99. package/dist/runtime/cli/run.go +1 -1
  100. package/dist/runtime/cli/socket.go +1 -1
  101. package/dist/runtime/cli/stream.go +1 -1
  102. package/dist/runtime/cli/target.go +1 -1
  103. package/dist/runtime/csharp/Adapters.cs +2 -2
  104. package/dist/runtime/csharp/Auth.cs +2 -2
  105. package/dist/runtime/csharp/Body.cs +3 -3
  106. package/dist/runtime/csharp/Config.cs +2 -2
  107. package/dist/runtime/csharp/Envelope.cs +3 -3
  108. package/dist/runtime/csharp/Errors.cs +10 -10
  109. package/dist/runtime/csharp/Events.cs +2 -2
  110. package/dist/runtime/csharp/Exchange.cs +4 -4
  111. package/dist/runtime/csharp/Handler.cs +3 -3
  112. package/dist/runtime/csharp/Hooks.cs +3 -3
  113. package/dist/runtime/csharp/Invalidation.cs +2 -2
  114. package/dist/runtime/csharp/Json.cs +2 -2
  115. package/dist/runtime/csharp/Log.cs +2 -2
  116. package/dist/runtime/csharp/Operation.cs +2 -2
  117. package/dist/runtime/csharp/Path.cs +2 -2
  118. package/dist/runtime/csharp/Query.cs +2 -2
  119. package/dist/runtime/csharp/Realtime.cs +2 -2
  120. package/dist/runtime/csharp/RealtimeLoop.cs +3 -3
  121. package/dist/runtime/csharp/Redirect.cs +2 -2
  122. package/dist/runtime/csharp/Result.cs +2 -2
  123. package/dist/runtime/csharp/Sse.cs +2 -2
  124. package/dist/runtime/csharp/Stale.cs +2 -2
  125. package/dist/runtime/csharp/Transport.cs +2 -2
  126. package/dist/runtime/csharp/TransportLongPoll.cs +2 -2
  127. package/dist/runtime/csharp/TransportSse.cs +2 -2
  128. package/dist/runtime/csharp/TransportWs.cs +2 -2
  129. package/dist/runtime/csharp/Wire.cs +2 -2
  130. package/dist/runtime/csharp/Ws.cs +2 -2
  131. package/dist/runtime/csharp/WsDial.cs +2 -2
  132. package/dist/runtime/go/auth.go +1 -1
  133. package/dist/runtime/go/body.go +2 -2
  134. package/dist/runtime/go/config.go +1 -1
  135. package/dist/runtime/go/errors.go +5 -5
  136. package/dist/runtime/go/export.go +10 -10
  137. package/dist/runtime/go/hooks.go +2 -2
  138. package/dist/runtime/go/invalidation.go +2 -2
  139. package/dist/runtime/go/log.go +1 -1
  140. package/dist/runtime/go/nullable.go +1 -1
  141. package/dist/runtime/go/options.go +1 -1
  142. package/dist/runtime/go/path.go +1 -1
  143. package/dist/runtime/go/query.go +2 -2
  144. package/dist/runtime/go/realtime.go +4 -4
  145. package/dist/runtime/go/realtime_loop.go +1 -1
  146. package/dist/runtime/go/redirect.go +2 -2
  147. package/dist/runtime/go/request.go +9 -9
  148. package/dist/runtime/go/result.go +2 -2
  149. package/dist/runtime/go/sse.go +3 -3
  150. package/dist/runtime/go/stale.go +1 -1
  151. package/dist/runtime/go/stream.go +2 -2
  152. package/dist/runtime/go/transport.go +2 -2
  153. package/dist/runtime/go/transport_longpoll.go +1 -1
  154. package/dist/runtime/go/transport_sse.go +2 -2
  155. package/dist/runtime/go/ws.go +1 -1
  156. package/dist/runtime/java/Answer.java +2 -2
  157. package/dist/runtime/java/ApiException.java +2 -2
  158. package/dist/runtime/java/BinaryBody.java +2 -2
  159. package/dist/runtime/java/Body.java +4 -4
  160. package/dist/runtime/java/Call.java +2 -2
  161. package/dist/runtime/java/CallLog.java +2 -2
  162. package/dist/runtime/java/ClientConfig.java +2 -2
  163. package/dist/runtime/java/ConnectionState.java +2 -2
  164. package/dist/runtime/java/Credential.java +2 -2
  165. package/dist/runtime/java/Deadline.java +2 -2
  166. package/dist/runtime/java/Decode.java +2 -2
  167. package/dist/runtime/java/Envelope.java +2 -2
  168. package/dist/runtime/java/ErrorEnvelope.java +3 -3
  169. package/dist/runtime/java/EventStream.java +2 -2
  170. package/dist/runtime/java/Exchange.java +2 -2
  171. package/dist/runtime/java/FilePart.java +2 -2
  172. package/dist/runtime/java/Flight.java +3 -3
  173. package/dist/runtime/java/Hooks.java +3 -3
  174. package/dist/runtime/java/Hops.java +2 -2
  175. package/dist/runtime/java/{HoneyException.java → HttpException.java} +4 -4
  176. package/dist/runtime/java/InvalidationConfig.java +2 -2
  177. package/dist/runtime/java/Json.java +3 -3
  178. package/dist/runtime/java/Keepalive.java +2 -2
  179. package/dist/runtime/java/LogEntry.java +2 -2
  180. package/dist/runtime/java/LongPollAdapter.java +2 -2
  181. package/dist/runtime/java/Operation.java +2 -2
  182. package/dist/runtime/java/Opt.java +2 -2
  183. package/dist/runtime/java/Pump.java +2 -2
  184. package/dist/runtime/java/RawResponse.java +2 -2
  185. package/dist/runtime/java/Realtime.java +2 -2
  186. package/dist/runtime/java/RealtimeLoop.java +4 -4
  187. package/dist/runtime/java/RedirectPolicy.java +2 -2
  188. package/dist/runtime/java/Redirects.java +2 -2
  189. package/dist/runtime/java/RequestContext.java +2 -2
  190. package/dist/runtime/java/RequestHook.java +2 -2
  191. package/dist/runtime/java/RequestOptions.java +2 -2
  192. package/dist/runtime/java/ResponseContext.java +2 -2
  193. package/dist/runtime/java/ResponseHook.java +2 -2
  194. package/dist/runtime/java/Result.java +2 -2
  195. package/dist/runtime/java/ResumableConnection.java +2 -2
  196. package/dist/runtime/java/SdkException.java +3 -3
  197. package/dist/runtime/java/Socket.java +2 -2
  198. package/dist/runtime/java/Sse.java +2 -2
  199. package/dist/runtime/java/SseAdapter.java +2 -2
  200. package/dist/runtime/java/SseEvent.java +2 -2
  201. package/dist/runtime/java/StaleMeta.java +2 -2
  202. package/dist/runtime/java/StaleTracker.java +2 -2
  203. package/dist/runtime/java/Transport.java +2 -2
  204. package/dist/runtime/java/TransportAdapter.java +2 -2
  205. package/dist/runtime/java/TransportConnection.java +2 -2
  206. package/dist/runtime/java/TransportKind.java +2 -2
  207. package/dist/runtime/java/TransportMessage.java +2 -2
  208. package/dist/runtime/java/TransportOptions.java +2 -2
  209. package/dist/runtime/java/TypedWebSocket.java +2 -2
  210. package/dist/runtime/java/UrlPath.java +2 -2
  211. package/dist/runtime/java/UrlQuery.java +2 -2
  212. package/dist/runtime/java/WsAdapter.java +2 -2
  213. package/dist/runtime/java/WsClose.java +2 -2
  214. package/dist/runtime/java/WsDial.java +2 -2
  215. package/dist/runtime/java/WsMessage.java +2 -2
  216. package/dist/runtime/mcp/call.ts +3 -3
  217. package/dist/runtime/mcp/result.ts +2 -2
  218. package/dist/runtime/python/__init__.py +1 -1
  219. package/dist/runtime/python/auth.py +1 -1
  220. package/dist/runtime/python/body.py +1 -1
  221. package/dist/runtime/python/config.py +1 -1
  222. package/dist/runtime/python/errors.py +11 -11
  223. package/dist/runtime/python/events.py +4 -4
  224. package/dist/runtime/python/exchange.py +1 -1
  225. package/dist/runtime/python/hooks.py +4 -4
  226. package/dist/runtime/python/invalidation.py +1 -1
  227. package/dist/runtime/python/log.py +1 -1
  228. package/dist/runtime/python/operation.py +1 -1
  229. package/dist/runtime/python/path.py +1 -1
  230. package/dist/runtime/python/query.py +1 -1
  231. package/dist/runtime/python/realtime.py +5 -5
  232. package/dist/runtime/python/redirect.py +1 -1
  233. package/dist/runtime/python/result.py +1 -1
  234. package/dist/runtime/python/send_async.py +4 -4
  235. package/dist/runtime/python/send_sync.py +3 -3
  236. package/dist/runtime/python/sse.py +1 -1
  237. package/dist/runtime/python/stale.py +1 -1
  238. package/dist/runtime/python/transport.py +1 -1
  239. package/dist/runtime/python/transport_longpoll.py +1 -1
  240. package/dist/runtime/python/transport_sse.py +1 -1
  241. package/dist/runtime/python/transport_ws.py +1 -1
  242. package/dist/runtime/python/ws.py +3 -3
  243. package/dist/runtime/rust/Cargo.lock +1 -1
  244. package/dist/runtime/rust/answer.rs +1 -1
  245. package/dist/runtime/rust/auth.rs +1 -1
  246. package/dist/runtime/rust/body.rs +2 -2
  247. package/dist/runtime/rust/call.rs +1 -1
  248. package/dist/runtime/rust/config.rs +1 -1
  249. package/dist/runtime/rust/envelope.rs +3 -3
  250. package/dist/runtime/rust/errors.rs +3 -3
  251. package/dist/runtime/rust/events.rs +1 -1
  252. package/dist/runtime/rust/exchange.rs +1 -1
  253. package/dist/runtime/rust/hooks.rs +1 -1
  254. package/dist/runtime/rust/invalidation.rs +1 -1
  255. package/dist/runtime/rust/log.rs +1 -1
  256. package/dist/runtime/rust/nullable.rs +1 -1
  257. package/dist/runtime/rust/path.rs +1 -1
  258. package/dist/runtime/rust/query.rs +1 -1
  259. package/dist/runtime/rust/realtime.rs +1 -1
  260. package/dist/runtime/rust/realtime_loop.rs +1 -1
  261. package/dist/runtime/rust/redirect.rs +1 -1
  262. package/dist/runtime/rust/request.rs +1 -1
  263. package/dist/runtime/rust/result.rs +1 -1
  264. package/dist/runtime/rust/sse.rs +1 -1
  265. package/dist/runtime/rust/stale.rs +1 -1
  266. package/dist/runtime/rust/transport.rs +1 -1
  267. package/dist/runtime/rust/transport_longpoll.rs +1 -1
  268. package/dist/runtime/rust/transport_sse.rs +1 -1
  269. package/dist/runtime/rust/transport_ws.rs +1 -1
  270. package/dist/runtime/rust/ws.rs +1 -1
  271. package/dist/runtime/ts/app-types.ts +5 -5
  272. package/dist/runtime/ts/app.ts +5 -5
  273. package/dist/runtime/ts/http.ts +3 -3
  274. package/dist/runtime/ts/path.ts +1 -1
  275. package/dist/runtime/ts/request.ts +1 -1
  276. package/dist/runtime/ts/sdk.ts +1 -1
  277. package/package.json +2 -29
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.IO;
@@ -7,7 +7,7 @@ using System.Net.Http;
7
7
  using System.Threading;
8
8
  using System.Threading.Tasks;
9
9
 
10
- namespace Honey.Runtime;
10
+ namespace Http.Runtime;
11
11
 
12
12
  internal sealed record Answered(int Status, Dictionary<string, string> Headers, byte[] Body, Uri Url, bool Over);
13
13
 
@@ -66,7 +66,7 @@ internal sealed class Exchange(Transport client, Operation op, Call call, bool s
66
66
  {
67
67
  return await AnswerAsync(deadline.Token).ConfigureAwait(false);
68
68
  }
69
- catch (HoneyException e)
69
+ catch (HttpException e)
70
70
  {
71
71
  _log.Failed(e);
72
72
  throw;
@@ -86,7 +86,7 @@ internal sealed class Exchange(Transport client, Operation op, Call call, bool s
86
86
  }
87
87
  }
88
88
 
89
- private HoneyException Failed(HoneyException error)
89
+ private HttpException Failed(HttpException error)
90
90
  {
91
91
  _log.Failed(error);
92
92
  return error;
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Linq;
4
4
  using System.Net;
@@ -6,11 +6,11 @@ using System.Net.Http;
6
6
  using System.Threading;
7
7
  using System.Threading.Tasks;
8
8
 
9
- namespace Honey.Runtime;
9
+ namespace Http.Runtime;
10
10
 
11
11
  internal sealed class StripHandler : DelegatingHandler
12
12
  {
13
- public static readonly HttpRequestOptionsKey<bool> Cross = new("honey.cross");
13
+ public static readonly HttpRequestOptionsKey<bool> Cross = new("http.cross");
14
14
 
15
15
  private static readonly string[] Safe = ["Accept", "Accept-Language", "User-Agent"];
16
16
 
@@ -1,10 +1,10 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Threading;
5
5
  using System.Threading.Tasks;
6
6
 
7
- namespace Honey.Runtime;
7
+ namespace Http.Runtime;
8
8
 
9
9
  /// <summary>
10
10
  /// A request about to be sent, before each attempt: a hook may change its method, URL, headers and body. Its
@@ -124,5 +124,5 @@ internal static class Hooks
124
124
  }
125
125
 
126
126
  public static bool Wraps(Exception error, CancellationToken token) =>
127
- error is not HoneyException && !(error is OperationCanceledException && token.IsCancellationRequested);
127
+ error is not HttpException && !(error is OperationCanceledException && token.IsCancellationRequested);
128
128
  }
@@ -1,9 +1,9 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System.Collections.Generic;
3
3
  using System.Linq;
4
4
  using System.Text;
5
5
 
6
- namespace Honey.Runtime;
6
+ namespace Http.Runtime;
7
7
 
8
8
  internal static class Invalidation
9
9
  {
@@ -1,11 +1,11 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Text.Json;
5
5
  using System.Text.Json.Serialization;
6
6
  using System.Text.Json.Serialization.Metadata;
7
7
 
8
- namespace Honey.Runtime;
8
+ namespace Http.Runtime;
9
9
 
10
10
  /// <summary>An optional nullable member: unset (the default, never written), null, or a value.</summary>
11
11
  public readonly struct Opt<T> : IEquatable<Opt<T>>
@@ -1,8 +1,8 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Diagnostics;
4
4
 
5
- namespace Honey.Runtime;
5
+ namespace Http.Runtime;
6
6
 
7
7
  /// <summary>
8
8
  /// One event of a call for <c>ClientConfig.OnLog</c>: <c>request_start</c> (debug), <c>response_received</c> (info
@@ -1,10 +1,10 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Text.Json;
5
5
  using System.Text.Json.Serialization.Metadata;
6
6
 
7
- namespace Honey.Runtime;
7
+ namespace Http.Runtime;
8
8
 
9
9
  internal sealed record Operation(string Method, string Path, string[] PathParams, bool Idempotent, string? Accept = null, string[]? Invalidates = null);
10
10
 
@@ -1,8 +1,8 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Text;
4
4
 
5
- namespace Honey.Runtime;
5
+ namespace Http.Runtime;
6
6
 
7
7
  internal static class UrlPath
8
8
  {
@@ -1,9 +1,9 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System.Collections.Generic;
3
3
  using System.Text;
4
4
  using System.Text.Json;
5
5
 
6
- namespace Honey.Runtime;
6
+ namespace Http.Runtime;
7
7
 
8
8
  internal static class UrlQuery
9
9
  {
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Text.Json;
@@ -6,7 +6,7 @@ using System.Text.Json.Serialization.Metadata;
6
6
  using System.Threading;
7
7
  using System.Threading.Tasks;
8
8
 
9
- namespace Honey.Runtime;
9
+ namespace Http.Runtime;
10
10
 
11
11
  /// <summary>Where a realtime connection stands.</summary>
12
12
  public enum ConnectionState
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.IO;
@@ -8,7 +8,7 @@ using System.Net.WebSockets;
8
8
  using System.Threading;
9
9
  using System.Threading.Tasks;
10
10
 
11
- namespace Honey.Runtime;
11
+ namespace Http.Runtime;
12
12
 
13
13
  /* ResumableConnection<T>'s loop (Python's realtime.py), its behavior documented there */
14
14
  internal sealed class RealtimeLoop(IReadOnlyList<ITransportAdapter> adapters, TransportOptions options, string url)
@@ -232,5 +232,5 @@ internal sealed class RealtimeLoop(IReadOnlyList<ITransportAdapter> adapters, Tr
232
232
 
233
233
  /* what an adapter's open or read throws when that transport failed; anything else is the caller's */
234
234
  private static bool Fails(Exception e) =>
235
- e is HoneyException or IOException or HttpRequestException or SocketException or WebSocketException;
235
+ e is HttpException or IOException or HttpRequestException or SocketException or WebSocketException;
236
236
  }
@@ -1,11 +1,11 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.IO;
5
5
  using System.Linq;
6
6
  using System.Net.Http;
7
7
 
8
- namespace Honey.Runtime;
8
+ namespace Http.Runtime;
9
9
 
10
10
  internal sealed record Hop(string Method, Uri Url, IReadOnlyDictionary<string, string> Headers, byte[]? Content, Stream? Stream, bool Cross);
11
11
 
@@ -1,8 +1,8 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Diagnostics.CodeAnalysis;
4
4
 
5
- namespace Honey.Runtime;
5
+ namespace Http.Runtime;
6
6
 
7
7
  /// <summary>
8
8
  /// A <c>client.Safe</c> call's answer: Ok, or Err holding the <see cref="SdkException"/> the client's method throws
@@ -1,11 +1,11 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Globalization;
5
5
  using System.IO;
6
6
  using System.Text;
7
7
 
8
- namespace Honey.Runtime;
8
+ namespace Http.Runtime;
9
9
 
10
10
  internal readonly record struct RawEvent(string Data, string? Event, string? Id, TimeSpan? Retry);
11
11
 
@@ -1,10 +1,10 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Diagnostics;
5
5
  using System.Linq;
6
6
 
7
- namespace Honey.Runtime;
7
+ namespace Http.Runtime;
8
8
 
9
9
  internal sealed record StaleMeta(string Selector, bool IsStale, IReadOnlyList<string> InvalidatedBy, long Seq)
10
10
  {
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Net.Http;
4
4
  using System.Text;
@@ -7,7 +7,7 @@ using System.Text.Json.Serialization.Metadata;
7
7
  using System.Threading;
8
8
  using System.Threading.Tasks;
9
9
 
10
- namespace Honey.Runtime;
10
+ namespace Http.Runtime;
11
11
 
12
12
  internal sealed partial class Transport : IDisposable
13
13
  {
@@ -1,10 +1,10 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System.Collections.Generic;
3
3
  using System.Text;
4
4
  using System.Threading;
5
5
  using System.Threading.Tasks;
6
6
 
7
- namespace Honey.Runtime;
7
+ namespace Http.Runtime;
8
8
 
9
9
  /// <summary>A realtime call polled through its exchange: one GET per message with the cursor, held up to 60 s whatever the timeout (a 204 polls again); a send is a POST.</summary>
10
10
  public sealed class LongPollAdapter : ITransportAdapter, IDialed
@@ -1,9 +1,9 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System.Collections.Generic;
3
3
  using System.Threading;
4
4
  using System.Threading.Tasks;
5
5
 
6
- namespace Honey.Runtime;
6
+ namespace Http.Runtime;
7
7
 
8
8
  /// <summary>A realtime call's event stream through its exchange: the cursor's id as Last-Event-ID, its token as a query param; a send is a POST.</summary>
9
9
  public sealed class SseAdapter : ITransportAdapter, IDialed
@@ -1,8 +1,8 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System.Threading;
3
3
  using System.Threading.Tasks;
4
4
 
5
- namespace Honey.Runtime;
5
+ namespace Http.Runtime;
6
6
 
7
7
  /// <summary>A realtime call's WebSocket: its own upgrade with the cursor as query params, no hook and no log on the dial.</summary>
8
8
  public sealed class WsAdapter : ITransportAdapter, IDialed
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Buffers;
4
4
  using System.Collections.Generic;
@@ -6,7 +6,7 @@ using System.Globalization;
6
6
  using System.Net.Http;
7
7
  using System.Net.Http.Headers;
8
8
 
9
- namespace Honey.Runtime;
9
+ namespace Http.Runtime;
10
10
 
11
11
  internal static class Wire
12
12
  {
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.IO;
4
4
  using System.Net.WebSockets;
@@ -8,7 +8,7 @@ using System.Text.Json.Serialization.Metadata;
8
8
  using System.Threading;
9
9
  using System.Threading.Tasks;
10
10
 
11
- namespace Honey.Runtime;
11
+ namespace Http.Runtime;
12
12
 
13
13
  /// <summary>One whole WebSocket message: its type and its data.</summary>
14
14
  public sealed record WsMessage(WebSocketMessageType Type, byte[] Data)
@@ -1,4 +1,4 @@
1
- // @generated by honey. DO NOT EDIT.
1
+ // @generated by clients. DO NOT EDIT.
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.IO;
@@ -11,7 +11,7 @@ using System.Text;
11
11
  using System.Threading;
12
12
  using System.Threading.Tasks;
13
13
 
14
- namespace Honey.Runtime;
14
+ namespace Http.Runtime;
15
15
 
16
16
  internal sealed partial class Transport
17
17
  {
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -62,7 +62,7 @@ func (b requestBody) bytes() ([]byte, error) {
62
62
  if b.hasJSON {
63
63
  encoded, err := json.Marshal(b.json)
64
64
  if err != nil {
65
- return nil, fmt.Errorf("honey: marshal body: %w", err)
65
+ return nil, fmt.Errorf("httpsdk: marshal body: %w", err)
66
66
  }
67
67
  return encoded, nil
68
68
  }
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -18,7 +18,7 @@ type APIError interface {
18
18
  Status() int
19
19
  }
20
20
 
21
- // ErrorKey is a honey error key. A declared key is a constant that is itself an error, so
21
+ // ErrorKey is a backend error key. A declared key is a constant that is itself an error, so
22
22
  // errors.Is(err, ErrItemNotFound) matches any *ClientError carrying that key.
23
23
  type ErrorKey string
24
24
 
@@ -31,7 +31,7 @@ type FieldError struct {
31
31
  Path string `json:"path"`
32
32
  }
33
33
 
34
- // ErrorEnvelope is honey's error body. Members it does not name, or that have another type than
34
+ // ErrorEnvelope is backend's error body. Members it does not name, or that have another type than
35
35
  // the envelope's, are kept raw in Extra.
36
36
  type ErrorEnvelope struct {
37
37
  Status int `json:"status,omitempty"`
@@ -42,7 +42,7 @@ type ErrorEnvelope struct {
42
42
  Extra map[string]json.RawMessage `json:"-"`
43
43
  }
44
44
 
45
- // ClientError is a non-2xx answer: its status, honey error key, a sanitized message, the parsed
45
+ // ClientError is a non-2xx answer: its status, backend error key, a sanitized message, the parsed
46
46
  // envelope, the raw body and the response (its Body re-readable). Reach it with errors.As:
47
47
  //
48
48
  // var ce *ClientError
@@ -141,7 +141,7 @@ func raiseForStatus(resp *http.Response, body []byte) error {
141
141
  return e
142
142
  }
143
143
 
144
- // parseEnvelope reads honey's envelope from a JSON object body, and the message to show: the
144
+ // parseEnvelope reads backend's envelope from a JSON object body, and the message to show: the
145
145
  // envelope's string message when it has one, else the body text.
146
146
  func parseEnvelope(body []byte) (ErrorEnvelope, string) {
147
147
  var env ErrorEnvelope
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -8,17 +8,17 @@ import (
8
8
  "net/http"
9
9
  )
10
10
 
11
- // The Honey* functions expose the SDK's URL, SSE and error handling to the generated CLI, so both
11
+ // The Http* functions expose the SDK's URL, SSE and error handling to the generated CLI, so both
12
12
  // send byte-identical requests and read answers the same way.
13
13
 
14
- // HoneyExpandPath fills a path template with escaped values and refuses "", "." and "..".
15
- func HoneyExpandPath(template string, params map[string]string) (string, error) {
14
+ // HttpExpandPath fills a path template with escaped values and refuses "", "." and "..".
15
+ func HttpExpandPath(template string, params map[string]string) (string, error) {
16
16
  return expandPath(template, params)
17
17
  }
18
18
 
19
- // HoneyBuildURL joins base and an escaped path (keeping the base path) and appends the query pairs
19
+ // HttpBuildURL joins base and an escaped path (keeping the base path) and appends the query pairs
20
20
  // in order.
21
- func HoneyBuildURL(baseURL, path string, query [][2]string) (string, error) {
21
+ func HttpBuildURL(baseURL, path string, query [][2]string) (string, error) {
22
22
  q := make(queryList, 0, len(query))
23
23
  for _, p := range query {
24
24
  q = append(q, queryPair{key: p[0], value: p[1]})
@@ -26,12 +26,12 @@ func HoneyBuildURL(baseURL, path string, query [][2]string) (string, error) {
26
26
  return buildURL(baseURL, path, q)
27
27
  }
28
28
 
29
- // HoneyParseSSEStream yields the events of an SSE response and closes its body.
30
- func HoneyParseSSEStream(ctx context.Context, resp *http.Response) iter.Seq2[SSEEvent[string], error] {
29
+ // HttpParseSSEStream yields the events of an SSE response and closes its body.
30
+ func HttpParseSSEStream(ctx context.Context, resp *http.Response) iter.Seq2[SSEEvent[string], error] {
31
31
  return parseSSEStream(ctx, resp)
32
32
  }
33
33
 
34
- // HoneyRaiseForStatus returns the typed error for a non-2xx response, or nil.
35
- func HoneyRaiseForStatus(resp *http.Response, body []byte) error {
34
+ // HttpRaiseForStatus returns the typed error for a non-2xx response, or nil.
35
+ func HttpRaiseForStatus(resp *http.Response, body []byte) error {
36
36
  return raiseForStatus(resp, body)
37
37
  }
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -38,7 +38,7 @@ type ResponseContext struct {
38
38
  func runHooks[C any](phase string, hooks []func(C) error, rc C) error {
39
39
  for _, hook := range hooks {
40
40
  if err := hook(rc); err != nil {
41
- return fmt.Errorf("honey: %s hook: %w", phase, err)
41
+ return fmt.Errorf("httpsdk: %s hook: %w", phase, err)
42
42
  }
43
43
  }
44
44
  return nil
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -85,7 +85,7 @@ func interpolatePath(template string, params map[string]string) (string, error)
85
85
  return prefix + escapePathSegment(val)
86
86
  })
87
87
  if missing != "" {
88
- return "", fmt.Errorf("honey: missing path param %q", missing)
88
+ return "", fmt.Errorf("httpsdk: missing path param %q", missing)
89
89
  }
90
90
  return out, nil
91
91
  }
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -121,7 +121,7 @@ func buildURL(baseURL, path string, query queryList) (string, error) {
121
121
  return "", err
122
122
  }
123
123
  if base.Scheme == "" || base.Host == "" {
124
- return "", fmt.Errorf("honey: base URL %q needs a scheme and host", baseURL)
124
+ return "", fmt.Errorf("httpsdk: base URL %q needs a scheme and host", baseURL)
125
125
  }
126
126
  if !strings.HasPrefix(path, "/") {
127
127
  path = "/" + path
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -45,7 +45,7 @@ const (
45
45
  )
46
46
 
47
47
  // ErrConnectionClosed is returned by Connect after Close.
48
- var ErrConnectionClosed = errors.New("honey: ResumableConnection closed")
48
+ var ErrConnectionClosed = errors.New("httpsdk: ResumableConnection closed")
49
49
 
50
50
  // ResumableConnection runs a chain of Transports: the last one that worked is tried first, then
51
51
  // the whole chain in order. Events arrive on Events() and a terminal error on Errors(); Close stops
@@ -79,7 +79,7 @@ type ResumableConnection struct {
79
79
  // defaults). It panics when transports is empty, a programming error.
80
80
  func NewResumableConnection(baseURL string, transports []Transport, opts *TransportOpts) *ResumableConnection {
81
81
  if len(transports) == 0 {
82
- panic("honey: NewResumableConnection requires at least one transport")
82
+ panic("httpsdk: NewResumableConnection requires at least one transport")
83
83
  }
84
84
  var o TransportOpts
85
85
  if opts != nil {
@@ -223,7 +223,7 @@ func (r *ResumableConnection) Send(ctx context.Context, data any) error {
223
223
  conn := r.conn
224
224
  r.mu.Unlock()
225
225
  if conn == nil {
226
- return errors.New("honey: ResumableConnection not connected")
226
+ return errors.New("httpsdk: ResumableConnection not connected")
227
227
  }
228
228
  return conn.Send(ctx, data)
229
229
  }
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -1,4 +1,4 @@
1
- // Code generated by honey. DO NOT EDIT.
1
+ // Code generated by clients. DO NOT EDIT.
2
2
 
3
3
  package sdk
4
4
 
@@ -58,7 +58,7 @@ func redirectClient(base *http.Client, policy RedirectPolicy) *http.Client {
58
58
  return next(req, via)
59
59
  }
60
60
  if len(via) >= maxRedirects {
61
- return errors.New("honey: stopped after " + strconv.Itoa(maxRedirects) + " redirects")
61
+ return errors.New("httpsdk: stopped after " + strconv.Itoa(maxRedirects) + " redirects")
62
62
  }
63
63
  return nil
64
64
  }