@termix-ssh/plugin-sdk 1.0.5 → 1.0.7
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 +12 -0
- package/PLUGIN-GUIDE.md +780 -0
- package/README.md +3 -3
- package/dist/ddl.js +9 -2
- package/dist/host/{chunk-KOOUKYW3.js → chunk-DIOJ3KW2.js} +1 -1
- package/dist/host/{chunk-VETPF5WI.js → chunk-LKN6OILD.js} +308 -78
- package/dist/host/{chunk-OEOKIKXC.js → chunk-NZG6HNQH.js} +9 -6
- package/dist/host/core-classes.json +1 -1
- package/dist/host/{linked-server-RWBK427T.js → linked-server-QAKKDBFM.js} +1 -1
- package/dist/host/{rbac-api-UJGGTQVA.js → rbac-api-5267EMX7.js} +1 -1
- package/dist/host/testing-host.js +3 -3
- package/dist/host/types/src/types/host-sidebar-preferences.d.ts +2 -0
- package/dist/host/types/src/types/onboarding.d.ts +1 -0
- package/dist/host/types/src/ui/api/plugins-api.d.ts +59 -4
- package/dist/host/types/src/ui/components/panel-layout.d.ts +0 -4
- package/dist/host/types/src/ui/hooks/use-mobile.d.ts +1 -0
- package/dist/host/types/src/ui/i18n/i18n.d.ts +1 -36
- package/dist/host/types/src/ui/i18n/languages.d.ts +13 -0
- package/dist/host/types/src/ui/lib/embedded-server-status.d.ts +1 -1
- package/dist/host/types/src/ui/lib/host-key-fingerprint.d.ts +5 -0
- package/dist/host/types/src/ui/lib/server-time.d.ts +5 -0
- package/dist/host/types/src/ui/main-axios.d.ts +5 -0
- package/dist/host/types/src/ui/ssh/dialogs/HostKeyVerificationDialog.d.ts +1 -1
- package/dist/host/ui.js +436 -67
- package/dist/host/{use-permissions-P3DC7ZDR.js → use-permissions-2P2TP6GY.js} +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
<img src="https://
|
|
3
|
+
<img src="https://termix.site/img/logo.svg" width="120" alt="Termix Logo" />
|
|
4
4
|
|
|
5
5
|
<h1>Termix Plugin SDK</h1>
|
|
6
6
|
|
|
@@ -50,7 +50,7 @@ in place of the flags. Reload the page to pick up frontend changes.
|
|
|
50
50
|
|
|
51
51
|
## Support
|
|
52
52
|
|
|
53
|
-
Bugs and ideas for the SDK or the `termix-plugin` CLI go in the [Termix repo](https://github.com/Termix-SSH/Termix/issues/new/choose).
|
|
53
|
+
Bugs and ideas for the SDK or the `termix-plugin` CLI go in the [Termix repo](https://github.com/Termix-SSH/Termix/issues/new/choose). Add as much detail as you can, in English if possible.
|
|
54
54
|
|
|
55
55
|
For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf) server.
|
|
56
56
|
|
|
@@ -58,4 +58,4 @@ For discussions and questions, join the [Discord](https://discord.gg/jVQGdvHDrf)
|
|
|
58
58
|
|
|
59
59
|
## License
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Apache License 2.0. See [LICENSE](https://github.com/Termix-SSH/Termix/blob/main/LICENSE).
|
package/dist/ddl.js
CHANGED
|
@@ -264,17 +264,24 @@ export function splitStatements(source) {
|
|
|
264
264
|
continue;
|
|
265
265
|
}
|
|
266
266
|
if (char === ";") {
|
|
267
|
-
if (current
|
|
267
|
+
if (hasSql(current))
|
|
268
268
|
statements.push(current.trim());
|
|
269
269
|
current = "";
|
|
270
270
|
continue;
|
|
271
271
|
}
|
|
272
272
|
current += char;
|
|
273
273
|
}
|
|
274
|
-
if (current
|
|
274
|
+
if (hasSql(current))
|
|
275
275
|
statements.push(current.trim());
|
|
276
276
|
return statements;
|
|
277
277
|
}
|
|
278
|
+
/** False for a chunk that is only comments, which a driver refuses to run. */
|
|
279
|
+
function hasSql(chunk) {
|
|
280
|
+
return (chunk
|
|
281
|
+
.replace(/--[^\n]*/g, "")
|
|
282
|
+
.replace(/\/\*[\s\S]*?\*\//g, "")
|
|
283
|
+
.trim() !== "");
|
|
284
|
+
}
|
|
278
285
|
/** DROP statement for a definition, for removePluginData. */
|
|
279
286
|
export function dropTableSql(dialect, pluginId, definition) {
|
|
280
287
|
const physical = prefixedTableName(pluginId, definition.name);
|
|
@@ -21,7 +21,7 @@ var inFlight = null;
|
|
|
21
21
|
function load() {
|
|
22
22
|
if (cache) return Promise.resolve(cache);
|
|
23
23
|
if (inFlight) return inFlight;
|
|
24
|
-
inFlight = import("./rbac-api-
|
|
24
|
+
inFlight = import("./rbac-api-5267EMX7.js").then(({ getMyPermissions }) => getMyPermissions()).then((result) => {
|
|
25
25
|
cache = {
|
|
26
26
|
permissions: result.permissions ?? [],
|
|
27
27
|
isAdmin: !!result.isAdmin
|