mulmocast 1.2.19 → 1.2.20
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/lib/index.node.d.ts
CHANGED
package/lib/index.node.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ImageProcessorParams } from "../../types/index.js";
|
|
2
|
+
export declare const updateVisionRootDir: (dir: string) => void;
|
|
2
3
|
export declare const imageType = "vision";
|
|
3
4
|
export declare const process: (params: ImageProcessorParams) => Promise<string | undefined>;
|
|
4
5
|
export declare const path: (params: ImageProcessorParams) => string;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { parrotingImagePath } from "./utils.js";
|
|
2
2
|
import { htmlPlugin } from "mulmocast-vision";
|
|
3
|
+
let rootDir = undefined;
|
|
4
|
+
export const updateVisionRootDir = (dir) => {
|
|
5
|
+
rootDir = dir;
|
|
6
|
+
};
|
|
3
7
|
export const imageType = "vision";
|
|
4
8
|
const toCreateName = (str) => {
|
|
5
9
|
return "create" + str.charAt(0).toUpperCase() + str.slice(1);
|
|
@@ -8,7 +12,7 @@ const processVision = async (params) => {
|
|
|
8
12
|
const { beat, imagePath } = params;
|
|
9
13
|
if (!beat?.image || beat.image.type !== imageType)
|
|
10
14
|
return;
|
|
11
|
-
const handler = new htmlPlugin({
|
|
15
|
+
const handler = new htmlPlugin({ rootDir });
|
|
12
16
|
await handler[toCreateName(beat.image.name)](beat.image.data, {
|
|
13
17
|
name: beat.image.name,
|
|
14
18
|
imageFilePath: imagePath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.node.js",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"graphai": "^2.0.14",
|
|
88
88
|
"jsdom": "^26.1.0",
|
|
89
89
|
"marked": "^16.2.0",
|
|
90
|
-
"mulmocast-vision": "^0.0.
|
|
90
|
+
"mulmocast-vision": "^0.0.2",
|
|
91
91
|
"ora": "^8.2.0",
|
|
92
92
|
"puppeteer": "^24.17.0",
|
|
93
93
|
"replicate": "^1.1.0",
|