phirepass-widgets 0.0.41 → 0.0.42
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/cjs/{index-Rxdu9QG2.js → index-DTAHGGCM.js} +111 -44
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +225 -3
- package/dist/cjs/phirepass-terminal.cjs.entry.js +30 -815
- package/dist/cjs/phirepass-widgets.cjs.js +3 -3
- package/dist/cjs/protocol-C4R_gGQV.js +801 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/protocol.js +20 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +142 -1
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +509 -1
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.logo.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.max.svg +8 -0
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +12 -21
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-DgZMmpg7.js +1 -0
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +5 -5
- package/dist/esm/{index-C8ZFkLEv.js → index-D6RLmr6w.js} +111 -44
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-sftp-client.entry.js +225 -3
- package/dist/esm/phirepass-terminal.entry.js +9 -793
- package/dist/esm/phirepass-widgets.js +4 -4
- package/dist/esm/protocol-DgZMmpg7.js +796 -0
- package/dist/phirepass-widgets/p-79a71767.entry.js +1 -0
- package/dist/phirepass-widgets/p-D6RLmr6w.js +2 -0
- package/dist/phirepass-widgets/p-DgZMmpg7.js +1 -0
- package/dist/phirepass-widgets/p-bb70a3bd.entry.js +49 -0
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/protocol.d.ts +17 -0
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +42 -0
- package/dist/types/components/phirepass-terminal/phirepass-terminal.d.ts +1 -6
- package/dist/types/components.d.ts +97 -1
- package/package.json +5 -5
- package/dist/phirepass-widgets/p-2f3f0b69.entry.js +0 -49
- package/dist/phirepass-widgets/p-376ef3af.entry.js +0 -1
- package/dist/phirepass-widgets/p-C8ZFkLEv.js +0 -2
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as r}from"./p-
|
|
1
|
+
import{p as e,b as r}from"./p-D6RLmr6w.js";export{s as setNonce}from"./p-D6RLmr6w.js";import{g as n}from"./p-DQuL1Twl.js";(()=>{const r=import.meta.url,s={};return""!==r&&(s.resourcesUrl=new URL(".",r).href),e(s)})().then((async e=>(await n(),r([["p-79a71767",[[513,"phirepass-sftp-client",{name:[1],description:[1],hideHeader:[4,"hide-header"],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],token:[1],serverId:[1,"server-id"],max:[32],show_login_screen:[32],show_login_screen_username:[32],show_login_screen_password:[32],maximize:[64],minimize:[64]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]],["p-bb70a3bd",[[513,"phirepass-terminal",{terminalOptions:[16],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],token:[1],serverId:[1,"server-id"]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]]],e))));
|
|
@@ -34,4 +34,21 @@ export type ProtocolMessage = {
|
|
|
34
34
|
web: ProtocolMessageWebError | ProtocolMessageWebAuthSuccess | ProtocolMessageWebTunnelOpened | ProtocolMessageWebTunnelData | ProtocolMessageWebTunnelClosed;
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
|
+
export declare enum ProtocolMessageType {
|
|
38
|
+
Error = "Error",
|
|
39
|
+
AuthSuccess = "AuthSuccess",
|
|
40
|
+
TunnelOpened = "TunnelOpened",
|
|
41
|
+
TunnelClosed = "TunnelClosed",
|
|
42
|
+
TunnelData = "TunnelData"
|
|
43
|
+
}
|
|
44
|
+
export declare enum InputMode {
|
|
45
|
+
Username = 0,
|
|
46
|
+
Password = 1,
|
|
47
|
+
Default = 2
|
|
48
|
+
}
|
|
49
|
+
export declare enum ConnectionState {
|
|
50
|
+
Disconnected = "disconnected",
|
|
51
|
+
Connected = "connected",
|
|
52
|
+
Error = "error"
|
|
53
|
+
}
|
|
37
54
|
export { ErrorType as ProtocolMessageError };
|
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { ConnectionState } from '../../common/protocol';
|
|
1
3
|
export declare class PhirepassSftpClient {
|
|
4
|
+
private channel;
|
|
5
|
+
private domReady;
|
|
6
|
+
private runtimeReady;
|
|
7
|
+
private connected;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
hideHeader: boolean;
|
|
11
|
+
serverHost: string;
|
|
12
|
+
serverPort: number;
|
|
13
|
+
allowInsecure: boolean;
|
|
14
|
+
heartbeatInterval: number;
|
|
15
|
+
nodeId: string;
|
|
16
|
+
token: string;
|
|
17
|
+
onNodeIdChange(newValue?: string, _oldValue?: string): void;
|
|
18
|
+
serverId?: string;
|
|
19
|
+
onServerIdChange(_newValue?: string, _oldValue?: string): void;
|
|
20
|
+
maximizeEvent: EventEmitter<boolean> | undefined;
|
|
21
|
+
maximize(): Promise<void>;
|
|
22
|
+
minimize(): Promise<void>;
|
|
23
|
+
connectionStateChanged: EventEmitter<[ConnectionState, unknown?]>;
|
|
24
|
+
max: boolean;
|
|
25
|
+
show_login_screen: boolean;
|
|
26
|
+
show_login_screen_username: boolean;
|
|
27
|
+
show_login_screen_password: boolean;
|
|
28
|
+
private toggle_max;
|
|
29
|
+
connectedCallback(): Promise<void>;
|
|
30
|
+
componentDidLoad(): void;
|
|
31
|
+
disconnectedCallback(): Promise<void>;
|
|
32
|
+
private connect;
|
|
33
|
+
private try_connect;
|
|
34
|
+
private create_web_socket_endpoint;
|
|
35
|
+
private handle_error;
|
|
36
|
+
private handle_auth_success;
|
|
37
|
+
private handle_tunnel_opened;
|
|
38
|
+
private handle_tunnel_data;
|
|
39
|
+
private handle_tunnel_closed;
|
|
40
|
+
private open_comms;
|
|
41
|
+
private close_comms;
|
|
42
|
+
private clear_creds_buffer;
|
|
43
|
+
private reset_session_state;
|
|
2
44
|
render(): any;
|
|
3
45
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
|
|
3
|
-
Disconnected = "disconnected",
|
|
4
|
-
Connected = "connected",
|
|
5
|
-
Error = "error"
|
|
6
|
-
}
|
|
2
|
+
import { ConnectionState } from '../../common/protocol';
|
|
7
3
|
export declare class PhirepassTerminal {
|
|
8
4
|
private terminal;
|
|
9
5
|
private fitAddon;
|
|
@@ -94,4 +90,3 @@ export declare class PhirepassTerminal {
|
|
|
94
90
|
private submit_password;
|
|
95
91
|
render(): any;
|
|
96
92
|
}
|
|
97
|
-
export {};
|
|
@@ -5,8 +5,43 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { ConnectionState } from "./common/protocol";
|
|
9
|
+
export { ConnectionState } from "./common/protocol";
|
|
8
10
|
export namespace Components {
|
|
9
11
|
interface PhirepassSftpClient {
|
|
12
|
+
/**
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
"allowInsecure": boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @default 'Client'
|
|
18
|
+
*/
|
|
19
|
+
"description": string;
|
|
20
|
+
/**
|
|
21
|
+
* @default 30_000
|
|
22
|
+
*/
|
|
23
|
+
"heartbeatInterval": number;
|
|
24
|
+
/**
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
"hideHeader": boolean;
|
|
28
|
+
"maximize": () => Promise<void>;
|
|
29
|
+
"minimize": () => Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* @default 'SFTP'
|
|
32
|
+
*/
|
|
33
|
+
"name": string;
|
|
34
|
+
"nodeId": string;
|
|
35
|
+
/**
|
|
36
|
+
* @default "phirepass.com"
|
|
37
|
+
*/
|
|
38
|
+
"serverHost": string;
|
|
39
|
+
"serverId"?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @default 443
|
|
42
|
+
*/
|
|
43
|
+
"serverPort": number;
|
|
44
|
+
"token": string;
|
|
10
45
|
}
|
|
11
46
|
interface PhirepassTerminal {
|
|
12
47
|
/**
|
|
@@ -34,12 +69,28 @@ export namespace Components {
|
|
|
34
69
|
"token": string;
|
|
35
70
|
}
|
|
36
71
|
}
|
|
72
|
+
export interface PhirepassSftpClientCustomEvent<T> extends CustomEvent<T> {
|
|
73
|
+
detail: T;
|
|
74
|
+
target: HTMLPhirepassSftpClientElement;
|
|
75
|
+
}
|
|
37
76
|
export interface PhirepassTerminalCustomEvent<T> extends CustomEvent<T> {
|
|
38
77
|
detail: T;
|
|
39
78
|
target: HTMLPhirepassTerminalElement;
|
|
40
79
|
}
|
|
41
80
|
declare global {
|
|
81
|
+
interface HTMLPhirepassSftpClientElementEventMap {
|
|
82
|
+
"maximize": any;
|
|
83
|
+
"connectionStateChanged": [ConnectionState, unknown?];
|
|
84
|
+
}
|
|
42
85
|
interface HTMLPhirepassSftpClientElement extends Components.PhirepassSftpClient, HTMLStencilElement {
|
|
86
|
+
addEventListener<K extends keyof HTMLPhirepassSftpClientElementEventMap>(type: K, listener: (this: HTMLPhirepassSftpClientElement, ev: PhirepassSftpClientCustomEvent<HTMLPhirepassSftpClientElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
87
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
88
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
89
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
90
|
+
removeEventListener<K extends keyof HTMLPhirepassSftpClientElementEventMap>(type: K, listener: (this: HTMLPhirepassSftpClientElement, ev: PhirepassSftpClientCustomEvent<HTMLPhirepassSftpClientElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
91
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
92
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
93
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
43
94
|
}
|
|
44
95
|
var HTMLPhirepassSftpClientElement: {
|
|
45
96
|
prototype: HTMLPhirepassSftpClientElement;
|
|
@@ -71,6 +122,39 @@ declare namespace LocalJSX {
|
|
|
71
122
|
type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
|
|
72
123
|
|
|
73
124
|
interface PhirepassSftpClient {
|
|
125
|
+
/**
|
|
126
|
+
* @default false
|
|
127
|
+
*/
|
|
128
|
+
"allowInsecure"?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* @default 'Client'
|
|
131
|
+
*/
|
|
132
|
+
"description"?: string;
|
|
133
|
+
/**
|
|
134
|
+
* @default 30_000
|
|
135
|
+
*/
|
|
136
|
+
"heartbeatInterval"?: number;
|
|
137
|
+
/**
|
|
138
|
+
* @default false
|
|
139
|
+
*/
|
|
140
|
+
"hideHeader"?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* @default 'SFTP'
|
|
143
|
+
*/
|
|
144
|
+
"name"?: string;
|
|
145
|
+
"nodeId": string;
|
|
146
|
+
"onConnectionStateChanged"?: (event: PhirepassSftpClientCustomEvent<[ConnectionState, unknown?]>) => void;
|
|
147
|
+
"onMaximize"?: (event: PhirepassSftpClientCustomEvent<any>) => void;
|
|
148
|
+
/**
|
|
149
|
+
* @default "phirepass.com"
|
|
150
|
+
*/
|
|
151
|
+
"serverHost"?: string;
|
|
152
|
+
"serverId"?: string;
|
|
153
|
+
/**
|
|
154
|
+
* @default 443
|
|
155
|
+
*/
|
|
156
|
+
"serverPort"?: number;
|
|
157
|
+
"token": string;
|
|
74
158
|
}
|
|
75
159
|
interface PhirepassTerminal {
|
|
76
160
|
/**
|
|
@@ -99,6 +183,18 @@ declare namespace LocalJSX {
|
|
|
99
183
|
"token": string;
|
|
100
184
|
}
|
|
101
185
|
|
|
186
|
+
interface PhirepassSftpClientAttributes {
|
|
187
|
+
"name": string;
|
|
188
|
+
"description": string;
|
|
189
|
+
"hideHeader": boolean;
|
|
190
|
+
"serverHost": string;
|
|
191
|
+
"serverPort": number;
|
|
192
|
+
"allowInsecure": boolean;
|
|
193
|
+
"heartbeatInterval": number;
|
|
194
|
+
"nodeId": string;
|
|
195
|
+
"token": string;
|
|
196
|
+
"serverId": string;
|
|
197
|
+
}
|
|
102
198
|
interface PhirepassTerminalAttributes {
|
|
103
199
|
"serverHost": string;
|
|
104
200
|
"serverPort": number;
|
|
@@ -110,7 +206,7 @@ declare namespace LocalJSX {
|
|
|
110
206
|
}
|
|
111
207
|
|
|
112
208
|
interface IntrinsicElements {
|
|
113
|
-
"phirepass-sftp-client": PhirepassSftpClient
|
|
209
|
+
"phirepass-sftp-client": Omit<PhirepassSftpClient, keyof PhirepassSftpClientAttributes> & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes]?: PhirepassSftpClient[K] } & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes as `attr:${K}`]?: PhirepassSftpClientAttributes[K] } & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes as `prop:${K}`]?: PhirepassSftpClient[K] } & OneOf<"nodeId", PhirepassSftpClient["nodeId"], PhirepassSftpClientAttributes["nodeId"]> & OneOf<"token", PhirepassSftpClient["token"], PhirepassSftpClientAttributes["token"]>;
|
|
114
210
|
"phirepass-terminal": Omit<PhirepassTerminal, keyof PhirepassTerminalAttributes> & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes]?: PhirepassTerminal[K] } & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes as `attr:${K}`]?: PhirepassTerminalAttributes[K] } & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes as `prop:${K}`]?: PhirepassTerminal[K] } & OneOf<"nodeId", PhirepassTerminal["nodeId"], PhirepassTerminalAttributes["nodeId"]> & OneOf<"token", PhirepassTerminal["token"], PhirepassTerminalAttributes["token"]>;
|
|
115
211
|
}
|
|
116
212
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phirepass-widgets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"description": "Phirepass widgets for the web application",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"generate": "stencil generate"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@stencil/core": "^4.43.
|
|
44
|
+
"@stencil/core": "^4.43.4",
|
|
45
45
|
"@types/jest": "^29",
|
|
46
|
-
"@types/node": "^25.
|
|
46
|
+
"@types/node": "^25.6.0",
|
|
47
47
|
"jest": "^29",
|
|
48
48
|
"jest-cli": "^29",
|
|
49
|
-
"puppeteer": "^24.
|
|
49
|
+
"puppeteer": "^24.41.0"
|
|
50
50
|
},
|
|
51
51
|
"license": "AGPL-3.0-or-later",
|
|
52
52
|
"dependencies": {
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"@xterm/addon-web-links": "^0.12.0",
|
|
58
58
|
"@xterm/addon-webgl": "^0.19.0",
|
|
59
59
|
"@xterm/xterm": "^6.0.0",
|
|
60
|
-
"phirepass-channel": "^0.1.
|
|
60
|
+
"phirepass-channel": "^0.1.208"
|
|
61
61
|
}
|
|
62
62
|
}
|