phirepass-widgets 0.0.116 → 0.0.118
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/README.md +10 -20
- package/dist/cjs/{index-BCgmMoIq.js → index-C3v5xmUo.js} +3 -75
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-rdp.cjs.entry.js +5 -16
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +1470 -0
- package/dist/cjs/phirepass-terminal.cjs.entry.js +4 -4
- package/dist/cjs/phirepass-widgets.cjs.js +3 -3
- package/dist/cjs/{protocol-BjOgJZ9-.js → protocol-DCBMfc2u.js} +21 -277
- package/dist/collection/collection-manifest.json +1 -3
- package/dist/collection/common/channel.js +1 -21
- package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +13 -36
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +0 -122
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +31 -181
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-CsYQJXY2.js +1 -0
- package/dist/components/phirepass-rdp.js +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +5 -5
- package/dist/esm/{index-Dd9o0CbU.js → index-BVOulYtW.js} +3 -75
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-rdp.entry.js +5 -16
- package/dist/esm/phirepass-sftp-client.entry.js +1468 -0
- package/dist/esm/phirepass-terminal.entry.js +4 -4
- package/dist/esm/phirepass-widgets.js +4 -4
- package/dist/esm/{protocol-BekUePpu.js → protocol-CsYQJXY2.js} +20 -276
- package/dist/phirepass-widgets/{p-c28a9257.entry.js → p-7ea2fdbc.entry.js} +2 -2
- package/dist/phirepass-widgets/p-BVOulYtW.js +3 -0
- package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
- package/dist/phirepass-widgets/p-c1c616ca.entry.js +1 -0
- package/dist/phirepass-widgets/p-f1bc04a8.entry.js +1 -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/channel.d.ts +0 -30
- package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +0 -10
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +0 -30
- package/dist/types/components.d.ts +34 -434
- package/package.json +5 -19
- package/dist/cjs/phirepass-downloader_3.cjs.entry.js +0 -3812
- package/dist/collection/common/fetch.js +0 -44
- package/dist/collection/components/phirepass-downloader/form.js +0 -69
- package/dist/collection/components/phirepass-downloader/format.js +0 -105
- package/dist/collection/components/phirepass-downloader/jobs.js +0 -393
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +0 -1109
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +0 -1455
- package/dist/collection/components/phirepass-downloader/source.js +0 -120
- package/dist/collection/components/phirepass-downloader/views/dialogs.js +0 -34
- package/dist/collection/components/phirepass-downloader/views/fetch-form.js +0 -65
- package/dist/collection/components/phirepass-downloader/views/icons.js +0 -34
- package/dist/collection/components/phirepass-downloader/views/job-row.js +0 -91
- package/dist/collection/components/phirepass-downloader/views/notices.js +0 -15
- package/dist/collection/components/phirepass-downloader/views/states.js +0 -19
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +0 -225
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +0 -549
- package/dist/collection/components/phirepass-media-player/player.js +0 -118
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +0 -35
- package/dist/collection/testing/fixtures.js +0 -219
- package/dist/collection/testing/mock-channel.js +0 -410
- package/dist/components/p-5QoAejYG.js +0 -1
- package/dist/components/p-BekUePpu.js +0 -1
- package/dist/components/p-DIf-Ru26.js +0 -1
- package/dist/components/phirepass-downloader.d.ts +0 -11
- package/dist/components/phirepass-downloader.js +0 -1
- package/dist/components/phirepass-media-player.d.ts +0 -11
- package/dist/components/phirepass-media-player.js +0 -1
- package/dist/esm/phirepass-downloader_3.entry.js +0 -3808
- package/dist/phirepass-widgets/p-70a67e4d.entry.js +0 -1
- package/dist/phirepass-widgets/p-BekUePpu.js +0 -1
- package/dist/phirepass-widgets/p-Dd9o0CbU.js +0 -3
- package/dist/phirepass-widgets/p-ab33f71f.entry.js +0 -1
- package/dist/types/common/fetch.d.ts +0 -167
- package/dist/types/components/phirepass-downloader/form.d.ts +0 -54
- package/dist/types/components/phirepass-downloader/format.d.ts +0 -17
- package/dist/types/components/phirepass-downloader/jobs.d.ts +0 -123
- package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +0 -231
- package/dist/types/components/phirepass-downloader/source.d.ts +0 -61
- package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +0 -52
- package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +0 -31
- package/dist/types/components/phirepass-downloader/views/icons.d.ts +0 -5
- package/dist/types/components/phirepass-downloader/views/job-row.d.ts +0 -21
- package/dist/types/components/phirepass-downloader/views/notices.d.ts +0 -18
- package/dist/types/components/phirepass-downloader/views/states.d.ts +0 -38
- package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +0 -82
- package/dist/types/components/phirepass-media-player/player.d.ts +0 -53
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +0 -40
- package/dist/types/testing/fixtures.d.ts +0 -25
- package/dist/types/testing/mock-channel.d.ts +0 -132
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Channel } from 'phirepass-channel';
|
|
2
|
-
import type { Browsing, FetchOptions, FetchSource, SubscribeScope } from './fetch';
|
|
3
2
|
/**
|
|
4
3
|
* The part of `phirepass-channel`'s `Channel` the widgets actually call.
|
|
5
4
|
*
|
|
@@ -18,32 +17,3 @@ export type ChannelLike = Pick<Channel, 'connect' | 'disconnect' | 'is_connected
|
|
|
18
17
|
* the WASM module is never initialised, since nothing would use it.
|
|
19
18
|
*/
|
|
20
19
|
export type ChannelFactory = (endpoint: string, nodeId: string, serverId?: string) => ChannelLike;
|
|
21
|
-
/**
|
|
22
|
-
* The Remote Fetch methods (plan task T1.10). They are not in the published
|
|
23
|
-
* `phirepass-channel` yet, so they are written out here rather than picked:
|
|
24
|
-
* once the WASM build carries them, replace this with a `Pick` like the one
|
|
25
|
-
* above so the two can never drift.
|
|
26
|
-
*
|
|
27
|
-
* Every id is the server-minted `download_id` (a uuid string). Each method that
|
|
28
|
-
* expects an answer takes the `msg_id` the answer (or an `Error`) echoes.
|
|
29
|
-
*/
|
|
30
|
-
export interface DownloadChannelMethods {
|
|
31
|
-
send_download_start(node_id: string, source: FetchSource, sub_dir: string | null, browsing: Browsing | null, in_order: boolean, options: FetchOptions, msg_id?: number | null): void;
|
|
32
|
-
send_download_stop(download_id: string, discard: boolean, msg_id?: number | null): void;
|
|
33
|
-
send_download_resume(download_id: string, ignore_window: boolean, msg_id?: number | null): void;
|
|
34
|
-
send_download_set_order(download_id: string, in_order: boolean, msg_id?: number | null): void;
|
|
35
|
-
send_download_delete(download_id: string, delete_file: boolean, msg_id?: number | null): void;
|
|
36
|
-
send_download_subscribe(scope: SubscribeScope): void;
|
|
37
|
-
send_download_where(node_id: string, browsing: Browsing, msg_id?: number | null): void;
|
|
38
|
-
send_download_folders(node_id: string, sub_dir: string | null, msg_id?: number | null): void;
|
|
39
|
-
}
|
|
40
|
-
/** What `<phirepass-downloader>` needs from a channel: the connection plumbing plus the download events. */
|
|
41
|
-
export type DownloadChannelLike = Pick<ChannelLike, 'connect' | 'disconnect' | 'is_connected' | 'authenticate' | 'start_heartbeat' | 'stop_heartbeat' | 'on_connection_open' | 'on_connection_close' | 'on_connection_error' | 'on_connection_message' | 'on_protocol_message'> & Partial<DownloadChannelMethods>;
|
|
42
|
-
export type DownloadChannelFactory = (endpoint: string, nodeId: string, serverId?: string) => DownloadChannelLike;
|
|
43
|
-
/**
|
|
44
|
-
* Whether this channel can speak Remote Fetch. A channel built from a
|
|
45
|
-
* `phirepass-channel` release older than T1.10 cannot, and the widgets then
|
|
46
|
-
* keep the feature out of sight instead of offering buttons that do nothing.
|
|
47
|
-
* The folder picker's method is optional (phase 4) and checked where used.
|
|
48
|
-
*/
|
|
49
|
-
export declare function supportsDownloads(channel: unknown): channel is DownloadChannelLike & DownloadChannelMethods;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { Channel as PhirepassChannel } from 'phirepass-channel';
|
|
3
2
|
import { ConnectionState } from '../../common/protocol';
|
|
4
3
|
/**
|
|
5
4
|
* Remote desktop over RDP.
|
|
@@ -11,8 +10,6 @@ import { ConnectionState } from '../../common/protocol';
|
|
|
11
10
|
* headers nor a subprotocol on the socket it opens. See `RDP.md` in
|
|
12
11
|
* `phirepass-rs` for why the session is split across two sockets.
|
|
13
12
|
*/
|
|
14
|
-
/** What the RDP widget calls on its channel. */
|
|
15
|
-
type RdpChannelLike = Pick<PhirepassChannel, 'connect' | 'disconnect' | 'is_connected' | 'authenticate' | 'start_heartbeat' | 'stop_heartbeat' | 'on_connection_open' | 'on_connection_close' | 'on_connection_error' | 'on_connection_message' | 'on_protocol_message' | 'open_rdp_tunnel'>;
|
|
16
13
|
export declare class PhirepassRdp {
|
|
17
14
|
private channel;
|
|
18
15
|
private containerEl?;
|
|
@@ -93,12 +90,6 @@ export declare class PhirepassRdp {
|
|
|
93
90
|
clipboard: boolean;
|
|
94
91
|
onNodeIdChange(newValue?: string, _oldValue?: string): void;
|
|
95
92
|
serverId?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Supplies the channel instead of a WebSocket to the server — for demos,
|
|
98
|
-
* screenshots and tests, as on the terminal and SFTP client. A property
|
|
99
|
-
* only; read once, when the widget connects.
|
|
100
|
-
*/
|
|
101
|
-
channelFactory?: (endpoint: string, nodeId: string, serverId?: string) => RdpChannelLike;
|
|
102
93
|
onServerIdChange(_newValue?: string, _oldValue?: string): void;
|
|
103
94
|
connectionStateChanged: EventEmitter<[ConnectionState, unknown?]>;
|
|
104
95
|
private create_web_socket_endpoint;
|
|
@@ -208,4 +199,3 @@ export declare class PhirepassRdp {
|
|
|
208
199
|
private submit_credentials;
|
|
209
200
|
render(): any;
|
|
210
201
|
}
|
|
211
|
-
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import type { ChannelFactory } from '../../common/channel';
|
|
3
|
-
import { TorrentMenu } from './phirepass-sftp-client.fetch';
|
|
4
3
|
import { ConnectionState, SFTPListItem } from '../../common/protocol';
|
|
5
4
|
/** Which single-text-field dialog is open, if any. */
|
|
6
5
|
type PromptKind = 'mkdir' | 'rename';
|
|
7
6
|
type SortKey = 'name' | 'size' | 'modified';
|
|
8
7
|
export declare class PhirepassSftpClient {
|
|
9
|
-
el_host: HTMLElement;
|
|
10
8
|
private channel;
|
|
11
9
|
private domReady;
|
|
12
10
|
private runtimeReady;
|
|
@@ -104,33 +102,6 @@ export declare class PhirepassSftpClient {
|
|
|
104
102
|
filter: string;
|
|
105
103
|
sort_key: SortKey;
|
|
106
104
|
sort_asc: boolean;
|
|
107
|
-
/** True once the channel is authenticated: the downloader shares it from then on. */
|
|
108
|
-
channel_ready: boolean;
|
|
109
|
-
/** Running downloads, for the Fetch button's badge. */
|
|
110
|
-
fetch_count: number;
|
|
111
|
-
/** Files a download just finished into the open folder, highlighted as new. */
|
|
112
|
-
fresh_names: Array<string>;
|
|
113
|
-
/** K3: a part file whose download a delete would end. */
|
|
114
|
-
part_delete: {
|
|
115
|
-
download_id: string;
|
|
116
|
-
name: string;
|
|
117
|
-
busy: boolean;
|
|
118
|
-
} | null;
|
|
119
|
-
torrent_menu: TorrentMenu | null;
|
|
120
|
-
/** A listing file open in the player (not a download). */
|
|
121
|
-
listing_player: {
|
|
122
|
-
src: string;
|
|
123
|
-
name: string;
|
|
124
|
-
key: string;
|
|
125
|
-
} | null;
|
|
126
|
-
private downloaderEl?;
|
|
127
|
-
private fetch_enabled;
|
|
128
|
-
private stream_base;
|
|
129
|
-
private on_fetch_completed;
|
|
130
|
-
private on_show_in_folder;
|
|
131
|
-
private on_row_context_menu;
|
|
132
|
-
private play_listing_file;
|
|
133
|
-
private listing_can_play;
|
|
134
105
|
private toggle_max;
|
|
135
106
|
connectedCallback(): Promise<void>;
|
|
136
107
|
componentDidLoad(): void;
|
|
@@ -190,7 +161,6 @@ export declare class PhirepassSftpClient {
|
|
|
190
161
|
private disconnect_session;
|
|
191
162
|
private on_file_row_action;
|
|
192
163
|
private on_file_delete_action;
|
|
193
|
-
private open_delete_prompt;
|
|
194
164
|
private cancel_delete;
|
|
195
165
|
private confirm_delete;
|
|
196
166
|
private open_mkdir;
|