@tryghost/ghst 0.16.6 → 0.17.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/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -803,7 +803,7 @@ function createLinuxAdapter() {
|
|
|
803
803
|
LINUX_ATTR_REF,
|
|
804
804
|
"__probe__"
|
|
805
805
|
]);
|
|
806
|
-
return probe.code === 0 || probe.code === 1;
|
|
806
|
+
return (probe.code === 0 || probe.code === 1) && probe.stderr.trim() === "";
|
|
807
807
|
} catch {
|
|
808
808
|
return false;
|
|
809
809
|
}
|
|
@@ -2761,8 +2761,14 @@ async function persistSiteCredential(alias, staffTokenInput, allowInsecureStorag
|
|
|
2761
2761
|
const available = await store.isAvailable().catch(() => false);
|
|
2762
2762
|
if (available) {
|
|
2763
2763
|
const credentialRef = credentialRefForAlias(alias);
|
|
2764
|
-
|
|
2765
|
-
|
|
2764
|
+
try {
|
|
2765
|
+
await store.set(credentialRef, staffTokenInput);
|
|
2766
|
+
return { credentialRef };
|
|
2767
|
+
} catch (err) {
|
|
2768
|
+
if (!allowInsecureStorage) {
|
|
2769
|
+
throw err;
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2766
2772
|
}
|
|
2767
2773
|
if (!allowInsecureStorage) {
|
|
2768
2774
|
throw new GhstError(
|
|
@@ -7089,10 +7095,9 @@ var mcpSiteArgSchema = SiteAliasSchema.optional();
|
|
|
7089
7095
|
var mcpSiteSchema = z6.object({
|
|
7090
7096
|
site: mcpSiteArgSchema
|
|
7091
7097
|
});
|
|
7092
|
-
var mcpOptionalSiteOnlySchema = z6.union([mcpSiteSchema, z6.undefined()]).transform((value) => value ?? {});
|
|
7093
7098
|
function withMcpSiteSchema(inputSchema) {
|
|
7094
7099
|
if (!inputSchema) {
|
|
7095
|
-
return
|
|
7100
|
+
return mcpSiteSchema;
|
|
7096
7101
|
}
|
|
7097
7102
|
const objectSchema = inputSchema;
|
|
7098
7103
|
const siteShape = { site: mcpSiteArgSchema };
|