@gallop.software/studio 2.3.72 → 2.3.73
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-CrSFA6TY.js"></script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -4013,6 +4013,32 @@ async function handleGenerateFeaturedImage(request) {
|
|
|
4013
4013
|
}
|
|
4014
4014
|
});
|
|
4015
4015
|
}
|
|
4016
|
+
async function handleGetFeaturedImageOptions() {
|
|
4017
|
+
try {
|
|
4018
|
+
const packageJsonPath2 = getWorkspacePath("package.json");
|
|
4019
|
+
let projectName = "featured-image";
|
|
4020
|
+
let homepageUrl = null;
|
|
4021
|
+
const devUrl = process.env.STUDIO_DEV_SITE_URL || null;
|
|
4022
|
+
try {
|
|
4023
|
+
const packageJsonContent = await fs10.readFile(packageJsonPath2, "utf8");
|
|
4024
|
+
const packageJson2 = JSON.parse(packageJsonContent);
|
|
4025
|
+
projectName = packageJson2.name || "featured-image";
|
|
4026
|
+
homepageUrl = packageJson2.homepage || null;
|
|
4027
|
+
} catch {
|
|
4028
|
+
}
|
|
4029
|
+
return jsonResponse({
|
|
4030
|
+
projectName,
|
|
4031
|
+
devUrl,
|
|
4032
|
+
homepageUrl
|
|
4033
|
+
});
|
|
4034
|
+
} catch (error) {
|
|
4035
|
+
console.error("Get featured image options error:", error);
|
|
4036
|
+
return jsonResponse(
|
|
4037
|
+
{ error: "Failed to get featured image options" },
|
|
4038
|
+
{ status: 500 }
|
|
4039
|
+
);
|
|
4040
|
+
}
|
|
4041
|
+
}
|
|
4016
4042
|
async function handleCheckFeaturedImage() {
|
|
4017
4043
|
try {
|
|
4018
4044
|
const packageJsonPath2 = getWorkspacePath("package.json");
|
|
@@ -4112,6 +4138,10 @@ async function startServer(options) {
|
|
|
4112
4138
|
"/api/studio/check-featured-image",
|
|
4113
4139
|
wrapHandler(handleCheckFeaturedImage)
|
|
4114
4140
|
);
|
|
4141
|
+
app.get(
|
|
4142
|
+
"/api/studio/featured-image-options",
|
|
4143
|
+
wrapHandler(handleGetFeaturedImageOptions)
|
|
4144
|
+
);
|
|
4115
4145
|
app.post("/api/studio/upload", wrapRawHandler(handleUpload));
|
|
4116
4146
|
app.post("/api/studio/create-folder", wrapHandler(handleCreateFolder));
|
|
4117
4147
|
app.post("/api/studio/rename", wrapHandler(handleRename));
|