@gallop.software/studio 2.3.87 → 2.3.89
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/client/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-NLWtKEEw.js"></script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -4291,23 +4291,20 @@ async function handleGenerateFeaturedImage(request) {
|
|
|
4291
4291
|
};
|
|
4292
4292
|
try {
|
|
4293
4293
|
const packageJsonPath2 = getWorkspacePath("package.json");
|
|
4294
|
-
let projectName = "featured-image";
|
|
4295
4294
|
let homepageUrl = customUrl || process.env.STUDIO_DEV_SITE_URL || "http://localhost:3000";
|
|
4296
4295
|
try {
|
|
4297
4296
|
const packageJsonContent = await fs10.readFile(packageJsonPath2, "utf8");
|
|
4298
4297
|
const packageJson2 = JSON.parse(packageJsonContent);
|
|
4299
|
-
projectName = packageJson2.name || "featured-image";
|
|
4300
4298
|
if (!customUrl && packageJson2.homepage) {
|
|
4301
4299
|
homepageUrl = packageJson2.homepage;
|
|
4302
4300
|
}
|
|
4303
4301
|
} catch {
|
|
4304
4302
|
}
|
|
4305
|
-
const outputPath = getPublicPath(
|
|
4306
|
-
const relativePath = `public
|
|
4303
|
+
const outputPath = getPublicPath(`screenshot.jpg`);
|
|
4304
|
+
const relativePath = `public/screenshot.jpg`;
|
|
4307
4305
|
sendEvent({
|
|
4308
4306
|
type: "start",
|
|
4309
4307
|
total: 4,
|
|
4310
|
-
projectName,
|
|
4311
4308
|
url: homepageUrl,
|
|
4312
4309
|
output: relativePath
|
|
4313
4310
|
});
|
|
@@ -4366,7 +4363,7 @@ async function handleGenerateFeaturedImage(request) {
|
|
|
4366
4363
|
const width = metadata.width || 0;
|
|
4367
4364
|
const height = metadata.height || 0;
|
|
4368
4365
|
const meta = await loadMeta();
|
|
4369
|
-
const metaKey =
|
|
4366
|
+
const metaKey = `/screenshot.jpg`;
|
|
4370
4367
|
setMetaEntry(meta, metaKey, {
|
|
4371
4368
|
o: { w: width, h: height }
|
|
4372
4369
|
});
|
|
@@ -4376,7 +4373,7 @@ async function handleGenerateFeaturedImage(request) {
|
|
|
4376
4373
|
processed: 1,
|
|
4377
4374
|
errors: 0,
|
|
4378
4375
|
outputPath: relativePath,
|
|
4379
|
-
message: `
|
|
4376
|
+
message: `Screenshot saved to ${relativePath}`
|
|
4380
4377
|
});
|
|
4381
4378
|
} finally {
|
|
4382
4379
|
await browser.close();
|
|
@@ -4387,7 +4384,7 @@ async function handleGenerateFeaturedImage(request) {
|
|
|
4387
4384
|
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
4388
4385
|
sendEvent({
|
|
4389
4386
|
type: "error",
|
|
4390
|
-
message: `Failed to generate
|
|
4387
|
+
message: `Failed to generate screenshot: ${errorMessage}`
|
|
4391
4388
|
});
|
|
4392
4389
|
controller.close();
|
|
4393
4390
|
}
|
|
@@ -4442,22 +4439,13 @@ async function handleGetFeaturedImageOptions() {
|
|
|
4442
4439
|
}
|
|
4443
4440
|
async function handleCheckFeaturedImage() {
|
|
4444
4441
|
try {
|
|
4445
|
-
const
|
|
4446
|
-
|
|
4447
|
-
try {
|
|
4448
|
-
const packageJsonContent = await fs10.readFile(packageJsonPath2, "utf8");
|
|
4449
|
-
const packageJson2 = JSON.parse(packageJsonContent);
|
|
4450
|
-
projectName = packageJson2.name || "featured-image";
|
|
4451
|
-
} catch {
|
|
4452
|
-
}
|
|
4453
|
-
const expectedFilename = `${projectName}.jpg`;
|
|
4454
|
-
const metaKey = `/${projectName}.jpg`;
|
|
4442
|
+
const expectedFilename = `screenshot.jpg`;
|
|
4443
|
+
const metaKey = `/screenshot.jpg`;
|
|
4455
4444
|
const meta = await loadMeta();
|
|
4456
4445
|
const exists = metaKey in meta && !Array.isArray(meta[metaKey]);
|
|
4457
4446
|
return jsonResponse({
|
|
4458
4447
|
filename: expectedFilename,
|
|
4459
|
-
exists
|
|
4460
|
-
projectName
|
|
4448
|
+
exists
|
|
4461
4449
|
});
|
|
4462
4450
|
} catch (error) {
|
|
4463
4451
|
console.error("Check featured image error:", error);
|