@conduit-client/generator-ts 3.7.1 → 3.8.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/v1/index.js +16 -3
- package/dist/v1/index.js.map +1 -1
- package/package.json +7 -7
package/dist/v1/index.js
CHANGED
|
@@ -2422,7 +2422,7 @@ const FETCH_RESPONSE$1 = {
|
|
|
2422
2422
|
exportedSymbol: "FetchResponse",
|
|
2423
2423
|
isType: true
|
|
2424
2424
|
};
|
|
2425
|
-
const COERCE_RESPONSE_TO_FETCH_RESPONSE = {
|
|
2425
|
+
const COERCE_RESPONSE_TO_FETCH_RESPONSE$1 = {
|
|
2426
2426
|
module: "@conduit-client/utils",
|
|
2427
2427
|
exportedSymbol: "coerceResponseToFetchResponse",
|
|
2428
2428
|
isType: false
|
|
@@ -2578,7 +2578,7 @@ class HttpCommandGenerator extends CommandGenerator {
|
|
|
2578
2578
|
generateCoerceError() {
|
|
2579
2579
|
if (this.commandModel.errorStrategy.type === "fetchResponse") {
|
|
2580
2580
|
return code`async coerceError(errorResponse: Response):Promise<${FETCH_RESPONSE$1}<unknown>>{
|
|
2581
|
-
return ${COERCE_RESPONSE_TO_FETCH_RESPONSE}(errorResponse)
|
|
2581
|
+
return ${COERCE_RESPONSE_TO_FETCH_RESPONSE$1}(errorResponse)
|
|
2582
2582
|
}`;
|
|
2583
2583
|
}
|
|
2584
2584
|
return code``;
|
|
@@ -2594,6 +2594,11 @@ const CONVERT_AURA_ERRORS_TO_FETCH_RESPONSE = {
|
|
|
2594
2594
|
exportedSymbol: "getFetchResponseFromAuraError",
|
|
2595
2595
|
isType: false
|
|
2596
2596
|
};
|
|
2597
|
+
const COERCE_RESPONSE_TO_FETCH_RESPONSE = {
|
|
2598
|
+
module: "@conduit-client/utils",
|
|
2599
|
+
exportedSymbol: "coerceResponseToFetchResponse",
|
|
2600
|
+
isType: false
|
|
2601
|
+
};
|
|
2597
2602
|
const AURA_COMMAND_BASE_CLASS = {
|
|
2598
2603
|
module: "@conduit-client/command-aura-network/v1",
|
|
2599
2604
|
exportedSymbol: "AuraNetworkCommand",
|
|
@@ -2686,7 +2691,15 @@ class AuraCommandGenerator extends HttpCommandGenerator {
|
|
|
2686
2691
|
*/
|
|
2687
2692
|
generateCoerceError() {
|
|
2688
2693
|
if (this.commandModel.errorStrategy.type === "fetchResponse") {
|
|
2689
|
-
return code`
|
|
2694
|
+
return code`
|
|
2695
|
+
protected override coerceAuraErrors(auraErrors: any[]):${FETCH_RESPONSE}<unknown>{
|
|
2696
|
+
return ${CONVERT_AURA_ERRORS_TO_FETCH_RESPONSE}(auraErrors[0])
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
protected override async coerceError(errorResponse: Response):Promise<${FETCH_RESPONSE}<unknown>>{
|
|
2700
|
+
return ${COERCE_RESPONSE_TO_FETCH_RESPONSE}(errorResponse)
|
|
2701
|
+
}
|
|
2702
|
+
`;
|
|
2690
2703
|
}
|
|
2691
2704
|
return code``;
|
|
2692
2705
|
}
|