@termix-ssh/plugin-sdk 1.0.24 → 1.0.25
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 +9 -0
- package/PLUGIN-GUIDE.md +1 -1
- package/dist/host/{PluginsTab-MNQU5OJ3.js → PluginsTab-NT64NFPK.js} +4 -4
- package/dist/host/{chunk-GRH7GSKG.js → chunk-D45W5IDI.js} +1 -1
- package/dist/host/{chunk-6WLECSNB.js → chunk-DUOTWQ4Y.js} +7 -5
- package/dist/host/{chunk-C52NRTA6.js → chunk-ENDXPKBA.js} +3 -3
- package/dist/host/{chunk-5W6F6GJJ.js → chunk-GTTGPAMQ.js} +4 -3
- package/dist/host/{chunk-DN6YKMFJ.js → chunk-GVJBUCYJ.js} +1 -1
- package/dist/host/{chunk-RWFXGG4Q.js → chunk-KAOL7264.js} +6 -6
- package/dist/host/{chunk-EKXGDM5P.js → chunk-QGWRLGQB.js} +1 -1
- package/dist/host/{chunk-IMPLAAUM.js → chunk-WAPKSDXJ.js} +1 -1
- package/dist/host/frame-host.js +5 -5
- package/dist/host/{linked-server-YCAJ2NX3.js → linked-server-2HT4BRH4.js} +1 -1
- package/dist/host/{rbac-api-A64TXDL5.js → rbac-api-NXDICNA4.js} +1 -1
- package/dist/host/testing-host.js +6 -6
- package/dist/host/types/src/types/host-sidebar-preferences.d.ts +1 -1
- package/dist/host/types/src/ui/api/user-management-api.d.ts +3 -1
- package/dist/host/ui.js +8 -8
- package/dist/host/{use-permissions-FLQAN6I7.js → use-permissions-MHDIU67P.js} +1 -1
- package/package.json +1 -1
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.25 | Plugin API 1.14.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.
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
sortPlugins,
|
|
30
30
|
uploadEntry,
|
|
31
31
|
youtubeEmbedUrl
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ENDXPKBA.js";
|
|
33
33
|
import {
|
|
34
34
|
Button,
|
|
35
35
|
FakeSwitch,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
PluginIcon,
|
|
38
38
|
SectionCard,
|
|
39
39
|
hasSettingsPage
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-WAPKSDXJ.js";
|
|
41
41
|
import {
|
|
42
42
|
ArrowDownWideNarrow,
|
|
43
43
|
BookOpen,
|
|
@@ -109,8 +109,8 @@ import {
|
|
|
109
109
|
updatePlugin,
|
|
110
110
|
uploadPlugin,
|
|
111
111
|
useConfirm
|
|
112
|
-
} from "./chunk-
|
|
113
|
-
import "./chunk-
|
|
112
|
+
} from "./chunk-GVJBUCYJ.js";
|
|
113
|
+
import "./chunk-DUOTWQ4Y.js";
|
|
114
114
|
import {
|
|
115
115
|
__toESM,
|
|
116
116
|
define_import_meta_env_default,
|
|
@@ -26,7 +26,7 @@ var inFlight = null;
|
|
|
26
26
|
function load() {
|
|
27
27
|
if (cache) return Promise.resolve(cache);
|
|
28
28
|
if (inFlight) return inFlight;
|
|
29
|
-
inFlight = import("./rbac-api-
|
|
29
|
+
inFlight = import("./rbac-api-NXDICNA4.js").then(({ getMyPermissions }) => getMyPermissions()).then((result) => {
|
|
30
30
|
cache = {
|
|
31
31
|
permissions: result.permissions ?? [],
|
|
32
32
|
isAdmin: !!result.isAdmin
|
|
@@ -5196,7 +5196,8 @@ var TRAY_TRIGGERS = [
|
|
|
5196
5196
|
var HOST_CLICK_BEHAVIORS = [
|
|
5197
5197
|
"newTab",
|
|
5198
5198
|
"focusExisting",
|
|
5199
|
-
"focusExistingDoubleClickNew"
|
|
5199
|
+
"focusExistingDoubleClickNew",
|
|
5200
|
+
"hostPage"
|
|
5200
5201
|
];
|
|
5201
5202
|
var STATUS_COLOR_SCHEMES = ["accent", "status"];
|
|
5202
5203
|
var FILTER_STATUS = [
|
|
@@ -5715,12 +5716,13 @@ async function revokeAllUserSessions(userId) {
|
|
|
5715
5716
|
handleApiError(error, "revoke all user sessions");
|
|
5716
5717
|
}
|
|
5717
5718
|
}
|
|
5718
|
-
async function createApiKey(name, userId, expiresAt) {
|
|
5719
|
+
async function createApiKey(name, userId, expiresAt, scopes) {
|
|
5719
5720
|
try {
|
|
5720
5721
|
const response = await authApi.post("/users/api-keys", {
|
|
5721
5722
|
name,
|
|
5722
5723
|
userId,
|
|
5723
|
-
expiresAt: expiresAt ?? null
|
|
5724
|
+
expiresAt: expiresAt ?? null,
|
|
5725
|
+
scopes: scopes?.length ? scopes : null
|
|
5724
5726
|
});
|
|
5725
5727
|
return response.data;
|
|
5726
5728
|
} catch (error) {
|
|
@@ -6340,7 +6342,7 @@ async function updateRole(roleId, roleData) {
|
|
|
6340
6342
|
try {
|
|
6341
6343
|
const response = await rbacApi.put(`/rbac/roles/${roleId}`, roleData);
|
|
6342
6344
|
if (roleData.permissions) {
|
|
6343
|
-
const { notifyPermissionsChanged } = await import("./use-permissions-
|
|
6345
|
+
const { notifyPermissionsChanged } = await import("./use-permissions-MHDIU67P.js");
|
|
6344
6346
|
notifyPermissionsChanged();
|
|
6345
6347
|
}
|
|
6346
6348
|
return response.data;
|
|
@@ -6947,7 +6949,7 @@ function createRemoteOriginApiInstance(path) {
|
|
|
6947
6949
|
});
|
|
6948
6950
|
instance.interceptors.request.use(
|
|
6949
6951
|
async (config) => {
|
|
6950
|
-
const { getLinkedSession: getLinkedSession2 } = await import("./linked-server-
|
|
6952
|
+
const { getLinkedSession: getLinkedSession2 } = await import("./linked-server-2HT4BRH4.js");
|
|
6951
6953
|
const linked = await getLinkedSession2();
|
|
6952
6954
|
config.baseURL = linked ? `${linked.serverUrl}${path}` : "http://no-server-configured";
|
|
6953
6955
|
if (config.headers.set) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const __termixNoGlob = () => ({});
|
|
2
2
|
import {
|
|
3
3
|
Button
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WAPKSDXJ.js";
|
|
5
5
|
import {
|
|
6
6
|
ChevronRight,
|
|
7
7
|
PANEL,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
cn,
|
|
11
11
|
gridSizeStyle,
|
|
12
12
|
useAreaPreferences
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GVJBUCYJ.js";
|
|
14
14
|
import {
|
|
15
15
|
isElectron
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DUOTWQ4Y.js";
|
|
17
17
|
import {
|
|
18
18
|
__commonJS,
|
|
19
19
|
__toESM,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
hasPermission,
|
|
4
4
|
resetPermissionsCache,
|
|
5
5
|
usePermissions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D45W5IDI.js";
|
|
7
7
|
import {
|
|
8
8
|
Columns2,
|
|
9
9
|
KeyRound,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
withIconBoundary,
|
|
52
52
|
withPluginContext,
|
|
53
53
|
withPluginScope
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-GVJBUCYJ.js";
|
|
55
55
|
import {
|
|
56
56
|
SYNC_CHANGED_EVENT,
|
|
57
57
|
TRUST_TOKEN_KEY,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
usePluginStore,
|
|
100
100
|
useTabTypes,
|
|
101
101
|
websocketAuthProtocols
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-DUOTWQ4Y.js";
|
|
103
103
|
import {
|
|
104
104
|
init_define_import_meta_env
|
|
105
105
|
} from "./chunk-YGYBM7SQ.js";
|
|
@@ -1405,6 +1405,7 @@ var en_default = {
|
|
|
1405
1405
|
hostClickBehavior: "Clicking a host",
|
|
1406
1406
|
hostClickBehaviorDesc: 'What happens when you click a host that already has an open tab. Ctrl/Cmd click, middle click, or "Open in new tab" always start a new one.',
|
|
1407
1407
|
hostClickNewTab: "Always open a new tab",
|
|
1408
|
+
hostClickHostPage: "Open the host page, when a plugin offers one",
|
|
1408
1409
|
hostClickFocusExisting: "Switch to the open tab",
|
|
1409
1410
|
hostClickFocusExistingDoubleNew: "Click to switch, double click for a new tab",
|
|
1410
1411
|
openInNewTab: "Open in new tab",
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
useCompanionState,
|
|
16
16
|
useIsMobile,
|
|
17
17
|
useSettingsComponents
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GTTGPAMQ.js";
|
|
19
19
|
import {
|
|
20
20
|
usePermissions
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-D45W5IDI.js";
|
|
22
22
|
import {
|
|
23
23
|
Button,
|
|
24
24
|
DefaultsOnly,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
SettingRow,
|
|
31
31
|
hasVisibleFields,
|
|
32
32
|
isFieldShown
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-WAPKSDXJ.js";
|
|
34
34
|
import {
|
|
35
35
|
ArrowDownToLine,
|
|
36
36
|
ArrowLeftToLine,
|
|
@@ -61,12 +61,12 @@ import {
|
|
|
61
61
|
pluginKey,
|
|
62
62
|
pluginName,
|
|
63
63
|
usePluginScope
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-GVJBUCYJ.js";
|
|
65
65
|
import {
|
|
66
66
|
getTabType,
|
|
67
67
|
unregisteredViewStatus,
|
|
68
68
|
usePluginStore
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-DUOTWQ4Y.js";
|
|
70
70
|
import {
|
|
71
71
|
init_define_import_meta_env
|
|
72
72
|
} from "./chunk-YGYBM7SQ.js";
|
|
@@ -1321,7 +1321,7 @@ function CompanionLayout({
|
|
|
1321
1321
|
// src/ui/shell/tabUtils.tsx
|
|
1322
1322
|
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1323
1323
|
var PluginsTab = lazy(
|
|
1324
|
-
() => import("./PluginsTab-
|
|
1324
|
+
() => import("./PluginsTab-NT64NFPK.js").then((m) => ({ default: m.PluginsTab }))
|
|
1325
1325
|
);
|
|
1326
1326
|
function preloadTabSurface(type) {
|
|
1327
1327
|
const loader = getTabType(type)?.preload;
|
package/dist/host/frame-host.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const __termixNoGlob = () => ({});
|
|
2
2
|
import {
|
|
3
3
|
Toaster
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QGWRLGQB.js";
|
|
5
5
|
import {
|
|
6
6
|
ThemeProvider,
|
|
7
7
|
createPluginApp,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
setPluginThemes,
|
|
13
13
|
sshHostToHost,
|
|
14
14
|
useTheme
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-GTTGPAMQ.js";
|
|
16
|
+
import "./chunk-D45W5IDI.js";
|
|
17
17
|
import {
|
|
18
18
|
SurfaceScope,
|
|
19
19
|
notifyShellReady,
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
setShellCallbacks,
|
|
22
22
|
setShellHosts,
|
|
23
23
|
shellHost
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GVJBUCYJ.js";
|
|
25
25
|
import {
|
|
26
26
|
getSSHHosts,
|
|
27
27
|
getTabType,
|
|
28
28
|
setFrontendState,
|
|
29
29
|
setPluginSummaries
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-DUOTWQ4Y.js";
|
|
31
31
|
import {
|
|
32
32
|
init_define_import_meta_env
|
|
33
33
|
} from "./chunk-YGYBM7SQ.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PluginViewPlaceholder,
|
|
8
8
|
renderTabContent,
|
|
9
9
|
trackTabHandle
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KAOL7264.js";
|
|
11
11
|
import {
|
|
12
12
|
RAIL_ITEMS,
|
|
13
13
|
ServerStatusProvider,
|
|
@@ -63,11 +63,11 @@ import {
|
|
|
63
63
|
setRemoteServerUrlForTesting,
|
|
64
64
|
useShellController,
|
|
65
65
|
useTabStageStore
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GTTGPAMQ.js";
|
|
67
67
|
import {
|
|
68
68
|
setPermissionsForTesting
|
|
69
|
-
} from "./chunk-
|
|
70
|
-
import "./chunk-
|
|
69
|
+
} from "./chunk-D45W5IDI.js";
|
|
70
|
+
import "./chunk-WAPKSDXJ.js";
|
|
71
71
|
import {
|
|
72
72
|
SurfaceScope,
|
|
73
73
|
notifyShellReady,
|
|
@@ -75,14 +75,14 @@ import {
|
|
|
75
75
|
setShellCallbacks,
|
|
76
76
|
setShellHosts,
|
|
77
77
|
setShellLayoutProvider
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-GVJBUCYJ.js";
|
|
79
79
|
import {
|
|
80
80
|
getTabType,
|
|
81
81
|
listTabTypes,
|
|
82
82
|
resetPluginStore,
|
|
83
83
|
setFrontendState,
|
|
84
84
|
setPluginSummaries
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-DUOTWQ4Y.js";
|
|
86
86
|
import {
|
|
87
87
|
init_define_import_meta_env
|
|
88
88
|
} from "./chunk-YGYBM7SQ.js";
|
|
@@ -18,7 +18,7 @@ export type HostGroupKey = "folder" | "tag" | "status" | "protocol" | "auth";
|
|
|
18
18
|
export type HostDensity = "comfortable" | "compact";
|
|
19
19
|
export type HostTrayTrigger = "always" | "hover" | "click" | "actionsOnly";
|
|
20
20
|
/** What clicking a host does when it already has an open tab. */
|
|
21
|
-
export type HostClickBehavior = "newTab" | "focusExisting" | "focusExistingDoubleClickNew";
|
|
21
|
+
export type HostClickBehavior = "newTab" | "focusExisting" | "focusExistingDoubleClickNew" | "hostPage";
|
|
22
22
|
export interface HostSidebarFilterState {
|
|
23
23
|
status: ("online" | "offline" | "pinned")[];
|
|
24
24
|
/** SSH auth type ids; plugins add their own. */
|
|
@@ -42,11 +42,13 @@ export interface ApiKey {
|
|
|
42
42
|
expiresAt: string | null;
|
|
43
43
|
lastUsedAt: string | null;
|
|
44
44
|
isActive: boolean;
|
|
45
|
+
/** Null for full access. */
|
|
46
|
+
scopes?: string[] | null;
|
|
45
47
|
}
|
|
46
48
|
export interface CreatedApiKey extends ApiKey {
|
|
47
49
|
token: string;
|
|
48
50
|
}
|
|
49
|
-
export declare function createApiKey(name: string, userId: string, expiresAt?: string): Promise<CreatedApiKey>;
|
|
51
|
+
export declare function createApiKey(name: string, userId: string, expiresAt?: string, scopes?: string[] | null): Promise<CreatedApiKey>;
|
|
50
52
|
export declare function getApiKeys(): Promise<{
|
|
51
53
|
apiKeys: ApiKey[];
|
|
52
54
|
}>;
|
package/dist/host/ui.js
CHANGED
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
useInstalledPlugins,
|
|
23
23
|
usePluginHostSections,
|
|
24
24
|
useTabHandlesVersion
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KAOL7264.js";
|
|
26
26
|
import {
|
|
27
27
|
Toaster
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-QGWRLGQB.js";
|
|
29
29
|
import {
|
|
30
30
|
ACCENT_PRESET_COLORS,
|
|
31
31
|
BUILTIN_THEMES,
|
|
@@ -170,10 +170,10 @@ import {
|
|
|
170
170
|
useThemes,
|
|
171
171
|
verifySecondFactor,
|
|
172
172
|
withProtocolSettings
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-GTTGPAMQ.js";
|
|
174
174
|
import {
|
|
175
175
|
usePermissions
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-D45W5IDI.js";
|
|
177
177
|
import {
|
|
178
178
|
AddButton,
|
|
179
179
|
Card,
|
|
@@ -194,7 +194,7 @@ import {
|
|
|
194
194
|
isPrerelease,
|
|
195
195
|
reportBetaFeedbackUrl,
|
|
196
196
|
reportCoreIssueUrl
|
|
197
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-ENDXPKBA.js";
|
|
198
198
|
import {
|
|
199
199
|
Button,
|
|
200
200
|
DefaultsOnly,
|
|
@@ -211,7 +211,7 @@ import {
|
|
|
211
211
|
hasVisibleFields,
|
|
212
212
|
isFieldShown,
|
|
213
213
|
useIsDefaultsEditor
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-WAPKSDXJ.js";
|
|
215
215
|
import {
|
|
216
216
|
Action,
|
|
217
217
|
Activity,
|
|
@@ -386,7 +386,7 @@ import {
|
|
|
386
386
|
useSurfaceKind,
|
|
387
387
|
useUiPreference,
|
|
388
388
|
useUiPreferencesContext
|
|
389
|
-
} from "./chunk-
|
|
389
|
+
} from "./chunk-GVJBUCYJ.js";
|
|
390
390
|
import {
|
|
391
391
|
CREDENTIAL_ROW_FIELD_KEYS,
|
|
392
392
|
PRESETS,
|
|
@@ -549,7 +549,7 @@ import {
|
|
|
549
549
|
useTabs,
|
|
550
550
|
useTabsSafe,
|
|
551
551
|
verifyPasswordResetCode
|
|
552
|
-
} from "./chunk-
|
|
552
|
+
} from "./chunk-DUOTWQ4Y.js";
|
|
553
553
|
import {
|
|
554
554
|
define_import_meta_env_default,
|
|
555
555
|
init_define_import_meta_env
|
package/package.json
CHANGED