@vm0/cli 9.143.0 → 9.144.0
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/{chunk-FEQSPUBX.js → chunk-75VR4R5J.js} +41 -3
- package/{chunk-FEQSPUBX.js.map → chunk-75VR4R5J.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +92 -5
- package/zero.js.map +1 -1
|
@@ -74083,7 +74083,7 @@ if (DSN) {
|
|
|
74083
74083
|
init2({
|
|
74084
74084
|
dsn: DSN,
|
|
74085
74085
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
74086
|
-
release: "9.
|
|
74086
|
+
release: "9.144.0",
|
|
74087
74087
|
sendDefaultPii: false,
|
|
74088
74088
|
tracesSampleRate: 0,
|
|
74089
74089
|
shutdownTimeout: 500,
|
|
@@ -74102,7 +74102,7 @@ if (DSN) {
|
|
|
74102
74102
|
}
|
|
74103
74103
|
});
|
|
74104
74104
|
setContext("cli", {
|
|
74105
|
-
version: "9.
|
|
74105
|
+
version: "9.144.0",
|
|
74106
74106
|
command: process.argv.slice(2).join(" ")
|
|
74107
74107
|
});
|
|
74108
74108
|
setContext("runtime", {
|
|
@@ -105588,6 +105588,43 @@ async function generateWebVoice(options) {
|
|
|
105588
105588
|
}
|
|
105589
105589
|
return await response.json();
|
|
105590
105590
|
}
|
|
105591
|
+
async function generateWebImage(options) {
|
|
105592
|
+
const baseUrl = await getBaseUrl();
|
|
105593
|
+
const token = await getActiveToken();
|
|
105594
|
+
if (!token) {
|
|
105595
|
+
throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
|
|
105596
|
+
}
|
|
105597
|
+
const headers = {
|
|
105598
|
+
Authorization: `Bearer ${token}`,
|
|
105599
|
+
"Content-Type": "application/json"
|
|
105600
|
+
};
|
|
105601
|
+
const bypassSecret = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
|
|
105602
|
+
if (bypassSecret) {
|
|
105603
|
+
headers["x-vercel-protection-bypass"] = bypassSecret;
|
|
105604
|
+
}
|
|
105605
|
+
const response = await fetch(
|
|
105606
|
+
new URL("/api/zero/image-io/generate", baseUrl),
|
|
105607
|
+
{
|
|
105608
|
+
method: "POST",
|
|
105609
|
+
headers,
|
|
105610
|
+
body: JSON.stringify({
|
|
105611
|
+
prompt: options.prompt,
|
|
105612
|
+
...options.size ? { size: options.size } : {},
|
|
105613
|
+
...options.quality ? { quality: options.quality } : {},
|
|
105614
|
+
...options.background ? { background: options.background } : {},
|
|
105615
|
+
...options.outputFormat ? { outputFormat: options.outputFormat } : {}
|
|
105616
|
+
})
|
|
105617
|
+
}
|
|
105618
|
+
);
|
|
105619
|
+
if (!response.ok) {
|
|
105620
|
+
const { message, code } = await parseErrorBody(
|
|
105621
|
+
response,
|
|
105622
|
+
"Failed to generate image"
|
|
105623
|
+
);
|
|
105624
|
+
throw new ApiRequestError(message, code, response.status);
|
|
105625
|
+
}
|
|
105626
|
+
return await response.json();
|
|
105627
|
+
}
|
|
105591
105628
|
|
|
105592
105629
|
// src/lib/utils/prompt-utils.ts
|
|
105593
105630
|
init_esm_shims();
|
|
@@ -121804,6 +121841,7 @@ export {
|
|
|
121804
121841
|
downloadWebFile,
|
|
121805
121842
|
uploadWebFile,
|
|
121806
121843
|
generateWebVoice,
|
|
121844
|
+
generateWebImage,
|
|
121807
121845
|
getInstructionsStorageName,
|
|
121808
121846
|
parseGitHubUrl,
|
|
121809
121847
|
getInstructionsFilename,
|
|
@@ -121850,4 +121888,4 @@ undici/lib/web/fetch/body.js:
|
|
|
121850
121888
|
undici/lib/web/websocket/frame.js:
|
|
121851
121889
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
121852
121890
|
*/
|
|
121853
|
-
//# sourceMappingURL=chunk-
|
|
121891
|
+
//# sourceMappingURL=chunk-75VR4R5J.js.map
|