Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@foxitsoftware/mcp-server-foxit-cloudapi

Package Overview
Dependencies
Maintainers
20
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foxitsoftware/mcp-server-foxit-cloudapi - npm Package Compare versions

Comparing version
1.1.0
to
1.1.1
+5
-3
build/action/CombinePDF.js

@@ -31,7 +31,9 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
if ((0, util_1.isPath)(args.path)) {
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-combine_pdf.pdf`;
if (typeof args.path === 'string') {
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-combine_pdf.pdf`;
}
else {
doc.value = `${(0, path_1.basename)(args.path[0], (0, path_1.extname)(args.path[0]))}-combine_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path[0]) ? (0, path_1.basename)(args.path[0], (0, path_1.extname)(args.path[0])) : 'download';
doc.value = `${prefixName}-combine_pdf.pdf`;
}

@@ -38,0 +40,0 @@ const resultPath = await (0, service_1.saveFile)({

@@ -28,3 +28,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.basePath, (0, path_1.extname)(args.basePath))}-compare_pdf.${args.resultType}`;
const prefixName = (0, util_1.isPath)(args.basePath) ? (0, path_1.basename)(args.basePath, (0, path_1.extname)(args.basePath)) : 'download';
doc.value = `${prefixName}-compare_pdf.${args.resultType}`;
const resultPath = await (0, service_1.saveFile)({

@@ -31,0 +32,0 @@ doc,

@@ -25,3 +25,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-compress_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-compress_pdf.pdf`;
const resultPath = await (0, service_1.saveFile)({

@@ -28,0 +29,0 @@ doc,

@@ -33,3 +33,4 @@ "use strict";

};
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-convert_pdf.${extFormatMap[args.format]}`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-convert_pdf.${extFormatMap[args.format]}`;
const resultPath = await (0, service_1.saveFile)({

@@ -36,0 +37,0 @@ doc,

@@ -25,3 +25,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-create_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-create_pdf.pdf`;
const resultPath = await (0, service_1.saveFile)({

@@ -28,0 +29,0 @@ doc,

@@ -35,10 +35,10 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId }, undefined, 120);
let fileName = '';
let prefixName = '';
if (args.format === 'url') {
fileName = args.url.replace(/(:\/\/)|[.?&#]/g, '_');
prefixName = "download";
}
else {
fileName = (0, path_1.basename)(args.path, (0, path_1.extname)(args.path));
prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
}
doc.value = `${fileName}-create_pdf_from_html.pdf`;
doc.value = `${prefixName}-create_pdf_from_html.pdf`;
const resultPath = await (0, service_1.saveFile)({

@@ -45,0 +45,0 @@ doc,

@@ -30,3 +30,4 @@ "use strict";

};
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-extract_pdf.${modeExtMap[args.mode]}`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-extract_pdf.${modeExtMap[args.mode]}`;
const resultPath = await (0, service_1.saveFile)({

@@ -33,0 +34,0 @@ doc,

@@ -25,3 +25,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-flatten_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-flatten_pdf.pdf`;
const resultPath = await (0, service_1.saveFile)({

@@ -28,0 +29,0 @@ doc,

@@ -24,3 +24,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-linearize_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-linearize_pdf.pdf`;
const resultPath = await (0, service_1.saveFile)({

@@ -27,0 +28,0 @@ doc,

@@ -30,3 +30,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-manipulation_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-manipulation_pdf.pdf`;
const resultPath = await (0, service_1.saveFile)({

@@ -33,0 +34,0 @@ doc,

@@ -38,3 +38,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-protect_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-protect_pdf.pdf`;
const resultPath = await (0, service_1.saveFile)({

@@ -41,0 +42,0 @@ doc,

@@ -25,3 +25,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-remove_password.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-remove_password.pdf`;
const resultPath = await (0, service_1.saveFile)({

@@ -28,0 +29,0 @@ doc,

@@ -34,3 +34,4 @@ "use strict";

const doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-sign_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-sign_pdf.pdf`;
const resultPath = await (0, service_1.saveFile)({ doc, path: args.path }, env);

@@ -37,0 +38,0 @@ return {

@@ -27,3 +27,4 @@ "use strict";

let doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-split_pdf.zip`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-split_pdf.zip`;
const resultPath = await (0, service_1.saveFile)({

@@ -30,0 +31,0 @@ doc,

@@ -46,3 +46,4 @@ "use strict";

const doc = await (0, service_1.requestTask)(res, { clientId: env.clientId });
doc.value = `${(0, path_1.basename)(args.path, (0, path_1.extname)(args.path))}-watermark_pdf.pdf`;
const prefixName = (0, util_1.isPath)(args.path) ? (0, path_1.basename)(args.path, (0, path_1.extname)(args.path)) : 'download';
doc.value = `${prefixName}-watermark_pdf.pdf`;
const resultPath = await (0, service_1.saveFile)({ doc, path: args.path }, env);

@@ -49,0 +50,0 @@ return {

@@ -107,2 +107,6 @@ "use strict";

// }
if (params.fileUrl) {
params.fileUrl = decodeURIComponent(params.fileUrl);
}
(0, util_1.logToFile)('==>', 'post', `/api/client/sn`, params);
const { data } = await axios_1.default.post(`${constant_1.SERVICE_API_BASE}/api/client/sn`, params);

@@ -116,3 +120,3 @@ // logToFile('<==', `/api/client/sn`, data);

async function requestFileUpload(params) {
params.fileUrl = decodeURIComponent(params.fileUrl); // 需要对`%20`等转义字符进行解码,否则接口会报错
params.fileUrl = encodeURIComponent(params.fileUrl);
const { data: res } = await devConsoleAxios.post(`/api/file/upload?fileUrl=${params.fileUrl}`, params);

@@ -119,0 +123,0 @@ if (res.code !== 0) {

@@ -62,3 +62,3 @@ #!/usr/bin/env node

name: 'mcp-server-foxit-cloudapi',
version: '1.1.0',
version: '1.1.1',
}, {

@@ -65,0 +65,0 @@ capabilities: {

{
"name": "@foxitsoftware/mcp-server-foxit-cloudapi",
"version": "1.1.0",
"version": "1.1.1",
"description": "MCP server for using the Foxit Cloud API",

@@ -5,0 +5,0 @@ "author": "Foxit Software Inc.",

Sorry, the diff of this file is too big to display