liangzimixin 0.3.47 → 0.3.49
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/index.cjs +3 -2
- package/dist/setup-entry.cjs +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18133,6 +18133,7 @@ async function resolveAndUploadMedia(params) {
|
|
|
18133
18133
|
log3.info("media:imageDimensions", { fileName, ...imageDimensions });
|
|
18134
18134
|
}
|
|
18135
18135
|
log3.info("media:fileType", { fileName, fileType, mimeType, ext });
|
|
18136
|
+
const originalFileSize = buffer.length;
|
|
18136
18137
|
let encryptionMeta;
|
|
18137
18138
|
if (!params.skipEncrypt) {
|
|
18138
18139
|
try {
|
|
@@ -18170,7 +18171,7 @@ async function resolveAndUploadMedia(params) {
|
|
|
18170
18171
|
const msgType = fileType;
|
|
18171
18172
|
let contentPayload;
|
|
18172
18173
|
if (fileType === "file") {
|
|
18173
|
-
contentPayload = { fileId: uploadResult.fileKey, fileName, size:
|
|
18174
|
+
contentPayload = { fileId: uploadResult.fileKey, fileName, size: originalFileSize, ext };
|
|
18174
18175
|
} else if (fileType === "image") {
|
|
18175
18176
|
contentPayload = {
|
|
18176
18177
|
fileId: uploadResult.fileKey,
|
|
@@ -21176,7 +21177,7 @@ async function startPlugin(accountConfig, internalOverrides) {
|
|
|
21176
21177
|
appId: accountConfig.appId,
|
|
21177
21178
|
appSecret: accountConfig.appSecret
|
|
21178
21179
|
});
|
|
21179
|
-
const tokenStorePath = (0, import_node_path3.join)((0, import_node_os.homedir)(), TOKEN_STORE_DIR, "tokens");
|
|
21180
|
+
const tokenStorePath = (0, import_node_path3.join)((0, import_node_os.homedir)(), TOKEN_STORE_DIR, "tokens", accountConfig.appId);
|
|
21180
21181
|
const tokenStore = new TokenStore(tokenStorePath, cryptoEngine);
|
|
21181
21182
|
const tokenManager = new TokenManager({
|
|
21182
21183
|
oauthClient,
|
package/dist/setup-entry.cjs
CHANGED
|
@@ -4225,6 +4225,7 @@ async function resolveAndUploadMedia(params) {
|
|
|
4225
4225
|
log3.info("media:imageDimensions", { fileName, ...imageDimensions });
|
|
4226
4226
|
}
|
|
4227
4227
|
log3.info("media:fileType", { fileName, fileType, mimeType, ext });
|
|
4228
|
+
const originalFileSize = buffer.length;
|
|
4228
4229
|
let encryptionMeta;
|
|
4229
4230
|
if (!params.skipEncrypt) {
|
|
4230
4231
|
try {
|
|
@@ -4262,7 +4263,7 @@ async function resolveAndUploadMedia(params) {
|
|
|
4262
4263
|
const msgType = fileType;
|
|
4263
4264
|
let contentPayload;
|
|
4264
4265
|
if (fileType === "file") {
|
|
4265
|
-
contentPayload = { fileId: uploadResult.fileKey, fileName, size:
|
|
4266
|
+
contentPayload = { fileId: uploadResult.fileKey, fileName, size: originalFileSize, ext };
|
|
4266
4267
|
} else if (fileType === "image") {
|
|
4267
4268
|
contentPayload = {
|
|
4268
4269
|
fileId: uploadResult.fileKey,
|
|
@@ -20297,7 +20298,7 @@ async function startPlugin(accountConfig, internalOverrides) {
|
|
|
20297
20298
|
appId: accountConfig.appId,
|
|
20298
20299
|
appSecret: accountConfig.appSecret
|
|
20299
20300
|
});
|
|
20300
|
-
const tokenStorePath = (0, import_node_path3.join)((0, import_node_os.homedir)(), TOKEN_STORE_DIR, "tokens");
|
|
20301
|
+
const tokenStorePath = (0, import_node_path3.join)((0, import_node_os.homedir)(), TOKEN_STORE_DIR, "tokens", accountConfig.appId);
|
|
20301
20302
|
const tokenStore = new TokenStore(tokenStorePath, cryptoEngine);
|
|
20302
20303
|
const tokenManager = new TokenManager({
|
|
20303
20304
|
oauthClient,
|