@termix-ssh/plugin-sdk 1.0.7 → 1.0.8
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/CHANGELOG.md
CHANGED
package/PLUGIN-GUIDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Termix plugin guide
|
|
2
2
|
|
|
3
|
-
SDK 1.0.
|
|
3
|
+
SDK 1.0.8 | Plugin API 1.2.0
|
|
4
4
|
|
|
5
5
|
This guide is for anyone, person or AI coding tool, building a Termix plugin. It ships inside
|
|
6
6
|
`@termix-ssh/plugin-sdk`, so the copy in your `node_modules` always matches the SDK you have installed.
|
|
@@ -283,7 +283,8 @@ router.post("/notes", async (req, res) => {
|
|
|
283
283
|
- The `@openapi` path is the full path, starting with `/plugin-api/<id>/`. `build` turns these into
|
|
284
284
|
`dist/openapi.json` and the docs site renders them.
|
|
285
285
|
- `ctx.http.router({ public: ["/webhook/:token"], bodyLimit: "20mb", rawBody: false })`. Public routes
|
|
286
|
-
have no actor: check their token yourself
|
|
286
|
+
have no actor: check their token yourself. Core allows 120 public requests a minute per address;
|
|
287
|
+
`publicRateLimit` raises that for a proxied page that loads its own assets.
|
|
287
288
|
- `ctx.http.baseUrl(req)` is the public address, for callback URLs.
|
|
288
289
|
- `ctx.ws.route("/live", (socket, conn) => ...)`. Long lived sockets should check
|
|
289
290
|
`conn.isDataUnlocked()` per message.
|
package/dist/backend.d.ts
CHANGED
|
@@ -303,6 +303,13 @@ export interface PluginRouterOptions {
|
|
|
303
303
|
* (multer, a raw body for signature checking, a proxied stream).
|
|
304
304
|
*/
|
|
305
305
|
rawBody?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Requests per minute one address may make to this plugin's public routes.
|
|
308
|
+
* Defaults to 120, which a proxied page loading its own scripts and images
|
|
309
|
+
* can pass on its own. Capped at 10000, and an admin's
|
|
310
|
+
* TERMIX_PLUGIN_PUBLIC_RATE_LIMIT wins over it.
|
|
311
|
+
*/
|
|
312
|
+
publicRateLimit?: number;
|
|
306
313
|
}
|
|
307
314
|
/**
|
|
308
315
|
* HTTP routes, served at /plugin-api/<id>/ by the main backend server.
|
|
@@ -52016,6 +52016,8 @@ var en_default = {
|
|
|
52016
52016
|
pinAppRailDesc: "Keep the left sidebar app rail always expanded instead of expanding on hover",
|
|
52017
52017
|
expandAppRailOnHover: "Expand App Rail on Hover",
|
|
52018
52018
|
expandAppRailOnHoverDesc: "Allow the left sidebar app rail to expand when the pointer moves over it",
|
|
52019
|
+
appRailHoverPushesContent: "Push content when it expands",
|
|
52020
|
+
appRailHoverPushesContentDesc: "Make room for the expanded rail instead of opening it over the page. Open sessions, like remote desktop, resize each time",
|
|
52019
52021
|
showPinAppRailButton: "Show Pin App Rail Button",
|
|
52020
52022
|
showPinAppRailButtonDesc: "Show a button in the app rail to pin it open. Off by default.",
|
|
52021
52023
|
settingsNavigation: "Navigation",
|
|
@@ -53584,7 +53586,7 @@ async function pluginWsUrl(pluginId, path2, options2 = {}) {
|
|
|
53584
53586
|
}
|
|
53585
53587
|
const token = await fetchSocketTicket() ?? localStorage.getItem("jwt");
|
|
53586
53588
|
const protocols2 = websocketAuthProtocols(token);
|
|
53587
|
-
const devProxy = !define_import_meta_env_default.VITE_API_HOST
|
|
53589
|
+
const devProxy = !define_import_meta_env_default.VITE_API_HOST;
|
|
53588
53590
|
const wsProtocol = window.location.protocol === "https:" ? "wss" : "ws";
|
|
53589
53591
|
if (devProxy) {
|
|
53590
53592
|
return {
|
package/dist/host/ui.js
CHANGED
package/package.json
CHANGED