discord-message-transcript 1.3.2-dev.1.52 → 1.3.2-dev.1.54
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.
|
@@ -63,7 +63,7 @@ export async function cloudinaryCdnResolver(url, fileName, cloudName, apiKey, ap
|
|
|
63
63
|
status: res.status,
|
|
64
64
|
message: body?.error?.message ?? "Invalid upload parameters.",
|
|
65
65
|
hint: "Check folder name, file URL accessibility, and signature.",
|
|
66
|
-
errorMessage: body?.error?.message
|
|
66
|
+
errorMessage: body?.error?.message
|
|
67
67
|
});
|
|
68
68
|
case 401:
|
|
69
69
|
case 403:
|
|
@@ -73,7 +73,7 @@ export async function cloudinaryCdnResolver(url, fileName, cloudName, apiKey, ap
|
|
|
73
73
|
status: res.status,
|
|
74
74
|
message: "Cloudinary rejected credentials.",
|
|
75
75
|
hint: "Check apiKey/apiSecret and cloudName.",
|
|
76
|
-
errorMessage: body?.error?.message
|
|
76
|
+
errorMessage: body?.error?.message
|
|
77
77
|
});
|
|
78
78
|
case 420:
|
|
79
79
|
throw new CDNProviderError({
|
|
@@ -82,7 +82,7 @@ export async function cloudinaryCdnResolver(url, fileName, cloudName, apiKey, ap
|
|
|
82
82
|
status: res.status,
|
|
83
83
|
message: "Cloudinary rate limit exceeded.",
|
|
84
84
|
hint: "Reduce concurrency.",
|
|
85
|
-
errorMessage: body?.error?.message
|
|
85
|
+
errorMessage: body?.error?.message
|
|
86
86
|
});
|
|
87
87
|
case 500:
|
|
88
88
|
throw new CDNProviderError({
|
|
@@ -91,7 +91,7 @@ export async function cloudinaryCdnResolver(url, fileName, cloudName, apiKey, ap
|
|
|
91
91
|
status: res.status,
|
|
92
92
|
message: "Cloudinary has a internal error.",
|
|
93
93
|
hint: "Contact support or check https://status.cloudinary.com.",
|
|
94
|
-
errorMessage: body?.error?.message
|
|
94
|
+
errorMessage: body?.error?.message
|
|
95
95
|
});
|
|
96
96
|
default:
|
|
97
97
|
throw new CDNProviderError({
|
|
@@ -99,7 +99,7 @@ export async function cloudinaryCdnResolver(url, fileName, cloudName, apiKey, ap
|
|
|
99
99
|
code: "HTTP_ERROR",
|
|
100
100
|
status: res.status,
|
|
101
101
|
message: `Unexpected Cloudinary response.`,
|
|
102
|
-
errorMessage: body?.error?.message
|
|
102
|
+
errorMessage: body?.error?.message
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -9,7 +9,7 @@ export async function uploadCareCdnResolver(url, publicKey, cdnDomain, disableWa
|
|
|
9
9
|
provider: "UPLOADCARE",
|
|
10
10
|
code: "CONFIG_MISSING",
|
|
11
11
|
message: "Uploadcare configuration is missing required fields.",
|
|
12
|
-
hint: "Verify cdnDomain and
|
|
12
|
+
hint: "Verify cdnDomain and publicKey."
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
const form = new FormData();
|
package/dist/index.js
CHANGED
|
@@ -100,8 +100,12 @@ export async function renderHTMLFromJSON(jsonString, options = {}) {
|
|
|
100
100
|
json.options.selfContained = options?.selfContained ?? false;
|
|
101
101
|
json.options.watermark = options.watermark ?? json.options.watermark;
|
|
102
102
|
const officialReturnType = options?.returnType ?? ReturnType.Attachment;
|
|
103
|
-
if (
|
|
103
|
+
if (options.returnType && options.returnType != ReturnType.Attachment) {
|
|
104
|
+
json.options.returnType = options.returnType;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
104
107
|
json.options.returnType = ReturnTypeBase.Buffer;
|
|
108
|
+
}
|
|
105
109
|
const result = await outputBase(json);
|
|
106
110
|
if (officialReturnType == ReturnType.Attachment) {
|
|
107
111
|
if (!(result instanceof Buffer)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "discord-message-transcript",
|
|
3
|
-
"version": "1.3.2-dev.1.
|
|
3
|
+
"version": "1.3.2-dev.1.54",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/HenriqueMairesse/discord-message-transcript#readme",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"discord-message-transcript-base": "1.3.2-dev.1.
|
|
48
|
+
"discord-message-transcript-base": "1.3.2-dev.1.54"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"discord.js": ">=14.19.0 <15"
|