@typeroll/mcp-server 0.38.0 → 0.38.1
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/extension-cli.js +14 -6
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/extension-cli.js
CHANGED
|
@@ -67,6 +67,19 @@ function executionOrigins(manifest) {
|
|
|
67
67
|
urls.push(value);
|
|
68
68
|
return [...new Set(urls.map((value) => new URL(value).origin))];
|
|
69
69
|
}
|
|
70
|
+
export function extensionMetadataUpdate(manifest, registered, manifestOrigins) {
|
|
71
|
+
const trusted = Array.isArray(registered.trusted_origins)
|
|
72
|
+
? registered.trusted_origins.map(String)
|
|
73
|
+
: [];
|
|
74
|
+
const update = {
|
|
75
|
+
name: manifest.name,
|
|
76
|
+
trusted_origins: [...new Set([...trusted, ...manifestOrigins])],
|
|
77
|
+
};
|
|
78
|
+
if (registered.distribution !== manifest.distribution) {
|
|
79
|
+
update.distribution = manifest.distribution;
|
|
80
|
+
}
|
|
81
|
+
return update;
|
|
82
|
+
}
|
|
70
83
|
async function api(path, init = {}, allowed = []) {
|
|
71
84
|
const baseUrl = process.env.TYPEROLL_API_URL?.trim().replace(/\/$/, '');
|
|
72
85
|
const apiKey = process.env.TYPEROLL_API_KEY?.trim();
|
|
@@ -126,14 +139,9 @@ export async function runExtensionCli(args) {
|
|
|
126
139
|
}
|
|
127
140
|
else {
|
|
128
141
|
const registered = current.data.extension;
|
|
129
|
-
const trusted = Array.isArray(registered?.trusted_origins) ? registered.trusted_origins.map(String) : [];
|
|
130
142
|
await api(`/api/developer/extensions/${encodeURIComponent(extensionId)}`, {
|
|
131
143
|
method: 'PATCH',
|
|
132
|
-
body: JSON.stringify(
|
|
133
|
-
name: manifest.name,
|
|
134
|
-
distribution: manifest.distribution,
|
|
135
|
-
trusted_origins: [...new Set([...trusted, ...executionOrigins(manifest)])],
|
|
136
|
-
}),
|
|
144
|
+
body: JSON.stringify(extensionMetadataUpdate(manifest, registered, executionOrigins(manifest))),
|
|
137
145
|
});
|
|
138
146
|
}
|
|
139
147
|
const pushed = await api(`/api/developer/extensions/${encodeURIComponent(extensionId)}/versions`, {
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typeroll/mcp-server",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"description": "Model Context Protocol server for the Typeroll public API. Use with Claude Code or any MCP-compatible client to manage a Typeroll site.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|