@8btc/ppt-generator-mcp 0.0.10 → 0.0.12
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/generate-ppt-slides.js +1 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generatePPTSlides = void 0;
|
|
4
|
-
const crypto_1 = require("crypto");
|
|
5
4
|
class CanvasBrowser {
|
|
6
5
|
constructor(width, height) {
|
|
7
6
|
this.el = document.createElement("canvas");
|
|
@@ -17,9 +16,7 @@ if (!globalThis.CanvasImpl) {
|
|
|
17
16
|
}
|
|
18
17
|
// 生成随机ID的函数
|
|
19
18
|
const nanoid = (length = 10) => {
|
|
20
|
-
return (
|
|
21
|
-
.toString("hex")
|
|
22
|
-
.slice(0, length);
|
|
19
|
+
return Math.random().toString(16).slice(0, length);
|
|
23
20
|
};
|
|
24
21
|
const generatePPTSlides = (templateSlides, outlineList, imgs = []) => {
|
|
25
22
|
const slides = [];
|
package/dist/index.js
CHANGED
|
@@ -105,7 +105,7 @@ class PPTGeneratorMCPServer {
|
|
|
105
105
|
templateFilePath = node_path_1.default.join(__dirname, "tpls", "tpl-2.json");
|
|
106
106
|
}
|
|
107
107
|
if (!outputPath) {
|
|
108
|
-
outputPath =
|
|
108
|
+
outputPath = process.cwd();
|
|
109
109
|
}
|
|
110
110
|
try {
|
|
111
111
|
fs_extra_1.default.ensureDirSync(outputPath);
|