mulmocast 0.0.13 → 0.0.15

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.
@@ -6,6 +6,6 @@ export declare const MulmoScriptMethods: {
6
6
  getAllSpeechProviders(script: MulmoScript): Set<Text2SpeechProvider>;
7
7
  getTextSlideStyle(script: MulmoScript, beat: MulmoBeat): string;
8
8
  getSpeechOptions(script: MulmoScript, beat: MulmoBeat): SpeechOptions | undefined;
9
- getImageAgentInfo(script: MulmoScript): Text2ImageAgentInfo;
9
+ getImageAgentInfo(script: MulmoScript, dryRun?: boolean): Text2ImageAgentInfo;
10
10
  getImageType(_: MulmoScript, beat: MulmoBeat): BeatMediaType;
11
11
  };
@@ -40,7 +40,7 @@ export const MulmoScriptMethods = {
40
40
  getSpeechOptions(script, beat) {
41
41
  return { ...script.speechParams.speakers[beat.speaker].speechOptions, ...beat.speechOptions };
42
42
  },
43
- getImageAgentInfo(script) {
43
+ getImageAgentInfo(script, dryRun = false) {
44
44
  // Notice that we copy imageParams from script and update
45
45
  // provider and model appropriately.
46
46
  const provider = text2ImageProviderSchema.parse(script.imageParams?.provider);
@@ -49,7 +49,7 @@ export const MulmoScriptMethods = {
49
49
  };
50
50
  return {
51
51
  provider,
52
- agent: provider === "google" ? "imageGoogleAgent" : "imageOpenaiAgent",
52
+ agent: dryRun ? "mediaMockAgent" : provider === "google" ? "imageGoogleAgent" : "imageOpenaiAgent",
53
53
  imageParams: { ...defaultImageParams, ...script.imageParams },
54
54
  };
55
55
  },
@@ -45,6 +45,7 @@ export type MulmoStudioContext = {
45
45
  fileDirs: FileDirs;
46
46
  studio: MulmoStudio;
47
47
  lang?: string;
48
+ dryRun?: boolean;
48
49
  force: boolean;
49
50
  caption?: string;
50
51
  sessionState: MulmoSessionState;
@@ -22,6 +22,7 @@ export const fileCacheAgentFilter = async (context, next) => {
22
22
  }
23
23
  };
24
24
  if (await shouldUseCache()) {
25
+ GraphAILogger.debug("cache");
25
26
  return true;
26
27
  }
27
28
  try {
@@ -24,7 +24,7 @@ export const renderHTMLToImage = async (html, outputPath, width, height, isMerma
24
24
  export const renderMarkdownToImage = async (markdown, style, outputPath, width, height) => {
25
25
  const header = `<head><style>${style}</style></head>`;
26
26
  const body = await marked(markdown);
27
- const html = `<htlm>${header}<body>${body}</body></html>`;
27
+ const html = `<html>${header}<body>${body}</body></html>`;
28
28
  await renderHTMLToImage(html, outputPath, width, height);
29
29
  };
30
30
  export const interpolate = (template, data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mulmocast",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -13,7 +13,6 @@
13
13
  "./assets/music/StarsBeyondEx.mp3",
14
14
  "./assets/audio/silent60sec.mp3",
15
15
  "./assets/html/",
16
- "./assets/font/",
17
16
  "./assets/templates/"
18
17
  ],
19
18
  "types": "./lib/types/index.d.ts",
@@ -59,17 +58,15 @@
59
58
  "@graphai/stream_agent_filter": "^2.0.2",
60
59
  "@graphai/vanilla": "^2.0.4",
61
60
  "@graphai/vanilla_node_agents": "^2.0.1",
62
- "@pdf-lib/fontkit": "^1.1.1",
63
61
  "canvas": "^3.1.0",
64
62
  "clipboardy": "^4.0.0",
65
63
  "dotenv": "^16.4.7",
66
64
  "fluent-ffmpeg": "^2.1.3",
67
65
  "google-auth-library": "^9.15.1",
68
- "graphai": "^2.0.5",
66
+ "graphai": "^2.0.6",
69
67
  "inquirer": "^12.6.1",
70
68
  "marked": "^15.0.12",
71
69
  "ora": "^8.2.0",
72
- "pdf-lib": "^1.17.1",
73
70
  "puppeteer": "^24.10.0",
74
71
  "yaml": "^2.8.0",
75
72
  "yargs": "^17.7.2",
@@ -77,17 +74,19 @@
77
74
  "zod-to-json-schema": "^3.24.5"
78
75
  },
79
76
  "devDependencies": {
77
+ "@anatine/zod-mock": "^3.14.0",
78
+ "@faker-js/faker": "^9.8.0",
80
79
  "@receptron/test_utils": "^2.0.0",
81
80
  "@types/fluent-ffmpeg": "^2.1.26",
82
81
  "@types/yargs": "^17.0.33",
83
- "eslint": "^9.28.0",
82
+ "eslint": "^9.29.0",
84
83
  "eslint-config-prettier": "^10.1.5",
85
84
  "eslint-plugin-prettier": "^5.4.1",
86
85
  "prettier": "^3.3.3",
87
86
  "ts-node": "^10.9.2",
88
- "tsx": "^4.19.4",
87
+ "tsx": "^4.20.3",
89
88
  "typescript": "^5.7.3",
90
- "typescript-eslint": "^8.33.1"
89
+ "typescript-eslint": "^8.34.0"
91
90
  },
92
91
  "engines": {
93
92
  "node": ">=16.0.0"
Binary file