@settlemint/dalp-cli 3.1.19-main.35740775477 → 3.1.19-main.35747494922
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/dalp.js +19 -3
- package/dist/dalp.js.map +3 -3
- package/package.json +1 -1
package/dist/dalp.js
CHANGED
|
@@ -41671,6 +41671,19 @@ function sdkErrorFromEnvelope(payload, response) {
|
|
|
41671
41671
|
...Object.keys(data).length === 0 ? {} : { details: data }
|
|
41672
41672
|
});
|
|
41673
41673
|
}
|
|
41674
|
+
function malformedSuccessError(response, text) {
|
|
41675
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
41676
|
+
return new DalpSdkError({
|
|
41677
|
+
code: "sdk.transport.MALFORMED_RESPONSE",
|
|
41678
|
+
category: "dependency",
|
|
41679
|
+
status: response.status,
|
|
41680
|
+
retryable: true,
|
|
41681
|
+
message: `DALP API responded ${String(response.status)} without a JSON object body`,
|
|
41682
|
+
why: text === "" ? "The platform answered with an empty body where a JSON envelope was expected." : "The platform answered with a body that is not a JSON object, so the envelope cannot be read.",
|
|
41683
|
+
fix: "Check the base URL and any proxy in front of the API: a sign-in page, an HTML error page, or a truncated body reached the client instead of the API envelope.",
|
|
41684
|
+
details: { contentType, bodyLength: text.length, bodyPreview: text.slice(0, 120) }
|
|
41685
|
+
});
|
|
41686
|
+
}
|
|
41674
41687
|
async function readResponse(response) {
|
|
41675
41688
|
const text = await response.text();
|
|
41676
41689
|
let payload;
|
|
@@ -41682,6 +41695,9 @@ async function readResponse(response) {
|
|
|
41682
41695
|
if (!response.ok) {
|
|
41683
41696
|
throw makeDalpApiError(sdkErrorFromEnvelope(payload, response));
|
|
41684
41697
|
}
|
|
41698
|
+
if (payload === null || typeof payload !== "object") {
|
|
41699
|
+
throw makeDalpApiError(malformedSuccessError(response, text));
|
|
41700
|
+
}
|
|
41685
41701
|
return payload;
|
|
41686
41702
|
}
|
|
41687
41703
|
|
|
@@ -41910,7 +41926,7 @@ var WEBHOOK_MANIFEST_VERSION = Webhook.MANIFEST_VERSION;
|
|
|
41910
41926
|
// ../sdk/package.json
|
|
41911
41927
|
var package_default = {
|
|
41912
41928
|
name: "@settlemint/dalp-sdk",
|
|
41913
|
-
version: "3.1.19-main.
|
|
41929
|
+
version: "3.1.19-main.35747494922",
|
|
41914
41930
|
private: false,
|
|
41915
41931
|
description: "Fully typed SDK for the DALP tokenization platform API",
|
|
41916
41932
|
homepage: "https://settlemint.com",
|
|
@@ -108904,7 +108920,7 @@ async function runCommand(context, operation, errorContext = UNKNOWN_COMMAND_ERR
|
|
|
108904
108920
|
// package.json
|
|
108905
108921
|
var package_default2 = {
|
|
108906
108922
|
name: "@settlemint/dalp-cli",
|
|
108907
|
-
version: "3.1.19-main.
|
|
108923
|
+
version: "3.1.19-main.35747494922",
|
|
108908
108924
|
private: false,
|
|
108909
108925
|
description: "CLI for the Digital Asset Lifecycle Platform \u2014 manage tokens, identities, compliance, and more from the command line.",
|
|
108910
108926
|
homepage: "https://settlemint.com",
|
|
@@ -110267,4 +110283,4 @@ if (false) {}
|
|
|
110267
110283
|
// src/bin.ts
|
|
110268
110284
|
await cli.serve();
|
|
110269
110285
|
|
|
110270
|
-
//# debugId=
|
|
110286
|
+
//# debugId=770606DDD1DD805764756E2164756E21
|