@robosystems/client 1.13.1 → 1.14.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/artifacts/LedgerClient.js +1 -1
- package/artifacts/LedgerClient.ts +2 -1
- package/artifacts/OperatorClient.js +2 -2
- package/artifacts/OperatorClient.ts +3 -2
- package/artifacts/QueryClient.js +1 -1
- package/artifacts/QueryClient.ts +1 -1
- package/artifacts/SSEClient.js +1 -1
- package/artifacts/SSEClient.ts +2 -1
- package/artifacts/graphql/client.js +1 -1
- package/artifacts/graphql/client.ts +2 -1
- package/artifacts/graphql/generated/graphql.d.ts +263 -2526
- package/artifacts/graphql/generated/graphql.ts +275 -2656
- package/client/index.d.ts +2 -0
- package/client/index.ts +2 -0
- package/client/utils.gen.d.ts +1 -1
- package/client/utils.gen.ts +2 -2
- package/client.gen.d.ts +2 -2
- package/client.gen.ts +2 -2
- package/core/auth.gen.d.ts +7 -0
- package/core/auth.gen.ts +7 -0
- package/core/params.gen.d.ts +2 -2
- package/core/params.gen.js +21 -13
- package/core/params.gen.ts +21 -12
- package/core/pathSerializer.gen.ts +6 -6
- package/core/queryKeySerializer.gen.d.ts +1 -1
- package/core/queryKeySerializer.gen.ts +1 -1
- package/core/types.gen.d.ts +5 -0
- package/core/types.gen.ts +6 -0
- package/core/utils.gen.ts +4 -4
- package/package.json +11 -8
- package/sdk/client/index.d.ts +2 -0
- package/sdk/client/index.ts +2 -0
- package/sdk/client/utils.gen.d.ts +1 -1
- package/sdk/client/utils.gen.ts +2 -2
- package/sdk/client.gen.d.ts +2 -2
- package/sdk/client.gen.ts +2 -2
- package/sdk/core/auth.gen.d.ts +7 -0
- package/sdk/core/auth.gen.ts +7 -0
- package/sdk/core/params.gen.d.ts +2 -2
- package/sdk/core/params.gen.js +21 -13
- package/sdk/core/params.gen.ts +21 -12
- package/sdk/core/pathSerializer.gen.ts +6 -6
- package/sdk/core/queryKeySerializer.gen.d.ts +1 -1
- package/sdk/core/queryKeySerializer.gen.ts +1 -1
- package/sdk/core/types.gen.d.ts +5 -0
- package/sdk/core/types.gen.ts +6 -0
- package/sdk/core/utils.gen.ts +4 -4
- package/sdk/sdk.gen.d.ts +199 -199
- package/sdk/sdk.gen.ts +199 -199
- package/sdk/types.gen.d.ts +6 -2
- package/sdk/types.gen.ts +6 -2
- package/sdk.gen.d.ts +199 -199
- package/sdk.gen.ts +199 -199
- package/types.gen.d.ts +6 -2
- package/types.gen.ts +6 -2
|
@@ -1146,7 +1146,7 @@ class LedgerClient {
|
|
|
1146
1146
|
const detail = err instanceof Error ? err.message : String(err);
|
|
1147
1147
|
throw new Error(`RoboSystems SDK: tokenProvider threw while resolving the request credential (${detail}). ` +
|
|
1148
1148
|
'Fix the tokenProvider passed in the client config (or via setSDKClientConfig) so it ' +
|
|
1149
|
-
'returns the current token, or null to send an unauthenticated (cookie-based) request.');
|
|
1149
|
+
'returns the current token, or null to send an unauthenticated (cookie-based) request.', { cause: err });
|
|
1150
1150
|
}
|
|
1151
1151
|
return token ?? null;
|
|
1152
1152
|
}
|
|
@@ -2516,7 +2516,8 @@ export class LedgerClient {
|
|
|
2516
2516
|
throw new Error(
|
|
2517
2517
|
`RoboSystems SDK: tokenProvider threw while resolving the request credential (${detail}). ` +
|
|
2518
2518
|
'Fix the tokenProvider passed in the client config (or via setSDKClientConfig) so it ' +
|
|
2519
|
-
'returns the current token, or null to send an unauthenticated (cookie-based) request.'
|
|
2519
|
+
'returns the current token, or null to send an unauthenticated (cookie-based) request.',
|
|
2520
|
+
{ cause: err }
|
|
2520
2521
|
)
|
|
2521
2522
|
}
|
|
2522
2523
|
return token ?? null
|
|
@@ -212,11 +212,11 @@ class OperatorClient {
|
|
|
212
212
|
}
|
|
213
213
|
catch (pollError) {
|
|
214
214
|
if (pollError instanceof PollAbort) {
|
|
215
|
-
throw new Error(pollError.message);
|
|
215
|
+
throw new Error(pollError.message, { cause: pollError });
|
|
216
216
|
}
|
|
217
217
|
consecutiveFailures += 1;
|
|
218
218
|
if (consecutiveFailures >= MAX_CONSECUTIVE_POLL_FAILURES) {
|
|
219
|
-
throw new Error(`Operator stream failed (${streamDetail}); status polling failed (${describeError(pollError)})
|
|
219
|
+
throw new Error(`Operator stream failed (${streamDetail}); status polling failed (${describeError(pollError)})`, { cause: pollError });
|
|
220
220
|
}
|
|
221
221
|
await sleep(interval);
|
|
222
222
|
continue;
|
|
@@ -328,12 +328,13 @@ export class OperatorClient {
|
|
|
328
328
|
consecutiveFailures = 0
|
|
329
329
|
} catch (pollError) {
|
|
330
330
|
if (pollError instanceof PollAbort) {
|
|
331
|
-
throw new Error(pollError.message)
|
|
331
|
+
throw new Error(pollError.message, { cause: pollError })
|
|
332
332
|
}
|
|
333
333
|
consecutiveFailures += 1
|
|
334
334
|
if (consecutiveFailures >= MAX_CONSECUTIVE_POLL_FAILURES) {
|
|
335
335
|
throw new Error(
|
|
336
|
-
`Operator stream failed (${streamDetail}); status polling failed (${describeError(pollError)})
|
|
336
|
+
`Operator stream failed (${streamDetail}); status polling failed (${describeError(pollError)})`,
|
|
337
|
+
{ cause: pollError }
|
|
337
338
|
)
|
|
338
339
|
}
|
|
339
340
|
await sleep(interval)
|
package/artifacts/QueryClient.js
CHANGED
|
@@ -164,7 +164,7 @@ class QueryClient {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
catch (error) {
|
|
167
|
-
throw new Error(`NDJSON stream reading error: ${error}
|
|
167
|
+
throw new Error(`NDJSON stream reading error: ${error}`, { cause: error });
|
|
168
168
|
}
|
|
169
169
|
// Report parse errors if any occurred
|
|
170
170
|
if (parseErrors.length > 0) {
|
package/artifacts/QueryClient.ts
CHANGED
|
@@ -232,7 +232,7 @@ export class QueryClient {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
} catch (error) {
|
|
235
|
-
throw new Error(`NDJSON stream reading error: ${error}
|
|
235
|
+
throw new Error(`NDJSON stream reading error: ${error}`, { cause: error })
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
// Report parse errors if any occurred
|
package/artifacts/SSEClient.js
CHANGED
|
@@ -105,7 +105,7 @@ class SSEClient {
|
|
|
105
105
|
const detail = err instanceof Error ? err.message : String(err);
|
|
106
106
|
throw new Error(`RoboSystems SDK: tokenProvider threw while resolving the SSE credential (${detail}). ` +
|
|
107
107
|
'Fix the tokenProvider passed in the client config (or via setSDKClientConfig) so it ' +
|
|
108
|
-
'returns the current token, or null to connect without one.');
|
|
108
|
+
'returns the current token, or null to connect without one.', { cause: err });
|
|
109
109
|
}
|
|
110
110
|
return token || undefined;
|
|
111
111
|
}
|
package/artifacts/SSEClient.ts
CHANGED
|
@@ -177,7 +177,8 @@ export class SSEClient {
|
|
|
177
177
|
throw new Error(
|
|
178
178
|
`RoboSystems SDK: tokenProvider threw while resolving the SSE credential (${detail}). ` +
|
|
179
179
|
'Fix the tokenProvider passed in the client config (or via setSDKClientConfig) so it ' +
|
|
180
|
-
'returns the current token, or null to connect without one.'
|
|
180
|
+
'returns the current token, or null to connect without one.',
|
|
181
|
+
{ cause: err }
|
|
181
182
|
)
|
|
182
183
|
}
|
|
183
184
|
return token || undefined
|
|
@@ -158,7 +158,7 @@ function createGraphQLClient(config, graphId) {
|
|
|
158
158
|
const detail = err instanceof Error ? err.message : String(err);
|
|
159
159
|
throw new Error(`RoboSystems SDK: tokenProvider threw while resolving the request credential (${detail}). ` +
|
|
160
160
|
'Fix the tokenProvider passed in the client config (or via setSDKClientConfig) so it ' +
|
|
161
|
-
'returns the current token, or null to send an unauthenticated (cookie-based) request.');
|
|
161
|
+
'returns the current token, or null to send an unauthenticated (cookie-based) request.', { cause: err });
|
|
162
162
|
}
|
|
163
163
|
if (!token) {
|
|
164
164
|
return request;
|
|
@@ -219,7 +219,8 @@ export function createGraphQLClient(config: GraphQLClientConfig, graphId: string
|
|
|
219
219
|
throw new Error(
|
|
220
220
|
`RoboSystems SDK: tokenProvider threw while resolving the request credential (${detail}). ` +
|
|
221
221
|
'Fix the tokenProvider passed in the client config (or via setSDKClientConfig) so it ' +
|
|
222
|
-
'returns the current token, or null to send an unauthenticated (cookie-based) request.'
|
|
222
|
+
'returns the current token, or null to send an unauthenticated (cookie-based) request.',
|
|
223
|
+
{ cause: err }
|
|
223
224
|
)
|
|
224
225
|
}
|
|
225
226
|
if (!token) {
|