vargai 0.4.0-alpha10 → 0.4.0-alpha12

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/package.json CHANGED
@@ -64,7 +64,7 @@
64
64
  "replicate": "^1.4.0",
65
65
  "zod": "^4.2.1"
66
66
  },
67
- "version": "0.4.0-alpha10",
67
+ "version": "0.4.0-alpha12",
68
68
  "exports": {
69
69
  ".": "./src/index.ts",
70
70
  "./ai": "./src/ai-sdk/index.ts",
@@ -196,8 +196,16 @@ export function createElevenLabs(
196
196
  };
197
197
  }
198
198
 
199
- export const elevenlabs_provider = createElevenLabs();
200
- export { elevenlabs_provider as elevenlabs, VOICES };
199
+ let _elevenlabs: ElevenLabsProvider | undefined;
200
+ export const elevenlabs = new Proxy({} as ElevenLabsProvider, {
201
+ get(_, prop) {
202
+ if (!_elevenlabs) {
203
+ _elevenlabs = createElevenLabs();
204
+ }
205
+ return _elevenlabs[prop as keyof ElevenLabsProvider];
206
+ },
207
+ });
208
+ export { VOICES };
201
209
 
202
210
  export interface GenerateMusicOptions {
203
211
  prompt: string;
@@ -85,6 +85,11 @@ export const renderCmd = defineCommand({
85
85
  description: "skip all generation, use placeholders only",
86
86
  default: false,
87
87
  },
88
+ "no-cache": {
89
+ type: "boolean",
90
+ description: "disable cache (don't read or write)",
91
+ default: false,
92
+ },
88
93
  },
89
94
  async run({ args }) {
90
95
  const file = args.file as string;
@@ -123,9 +128,11 @@ export const renderCmd = defineCommand({
123
128
  console.log(`rendering ${file} → ${outputPath}${modeLabel}`);
124
129
  }
125
130
 
131
+ const useCache = !args["no-cache"] && mode !== "preview";
132
+
126
133
  const buffer = await render(component, {
127
134
  output: outputPath,
128
- cache: args.cache,
135
+ cache: useCache ? args.cache : undefined,
129
136
  mode,
130
137
  });
131
138