@rstreamlabs/webtty 1.10.0 → 1.11.1

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/index.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as $protobuf from 'protobufjs';
2
2
  import Long from 'long';
3
+ import { RemoteFileSystem, FileSystemError, RemoteFileSystemConfig, FileSystemItem, FileSystemMkdirOptions, FileSystemReadFileOptions, FileSystemReaddirOptions, FileSystemRequestOptions, FileSystemRmOptions, FileSystemWriteData, FileSystemWriteFileOptions, FileSystemWriteStreamOptions, resolveFileSystemURL } from '@rstreamlabs/filesystem';
4
+ export { parseWebDAVMultiStatus } from '@rstreamlabs/filesystem';
3
5
 
4
6
  /** Namespace rstream. */
5
7
  declare namespace rstream {
@@ -4825,6 +4827,10 @@ interface WebTTYClientConfig {
4825
4827
  * @default "websocket"
4826
4828
  */
4827
4829
  transport?: WebTTYClientTransport;
4830
+ /** Maximum encoded message size in bytes; defaults to 1 MiB. */
4831
+ maxMessageSize?: number;
4832
+ /** Per-client WebSocket implementation; use nodeWebSocketFactory in Node.js. */
4833
+ webSocketFactory?: WebTTYWebSocketFactory;
4828
4834
  /**
4829
4835
  * Browser WebTransport constructor options.
4830
4836
  *
@@ -4873,6 +4879,24 @@ interface WebTTYClientConfig {
4873
4879
  clientBrowserId?: string;
4874
4880
  }
4875
4881
  type WebTTYClientTransport = "websocket" | "webtransport";
4882
+ interface WebTTYWebSocketEvents {
4883
+ close: object;
4884
+ error: object;
4885
+ message: {
4886
+ readonly data: unknown;
4887
+ };
4888
+ open: object;
4889
+ }
4890
+ interface WebTTYWebSocket {
4891
+ readonly bufferedAmount: number;
4892
+ send(data: Uint8Array<ArrayBuffer>): void;
4893
+ close(): void;
4894
+ addEventListener<K extends keyof WebTTYWebSocketEvents>(type: K, listener: (event: WebTTYWebSocketEvents[K]) => void): void;
4895
+ removeEventListener<K extends keyof WebTTYWebSocketEvents>(type: K, listener: (event: WebTTYWebSocketEvents[K]) => void): void;
4896
+ }
4897
+ type WebTTYWebSocketFactory = (url: string, options: {
4898
+ maxMessageSize: number;
4899
+ }) => WebTTYWebSocket;
4876
4900
  interface WebTTYClientEndpointIdentity {
4877
4901
  /** Suite profile bound into client proof transcripts. */
4878
4902
  keyEnvelopeSuite?: WebTTYKeyEnvelopeSuite;
@@ -5068,6 +5092,7 @@ interface WebTTYEvents {
5068
5092
  * WebTTY client for managing remote execution sessions.
5069
5093
  */
5070
5094
  declare class WebTTY {
5095
+ private readonly connectionAbort;
5071
5096
  private connection;
5072
5097
  private connectionState;
5073
5098
  private heartbeatTimer;
@@ -5075,6 +5100,11 @@ declare class WebTTY {
5075
5100
  private readonly execConfig;
5076
5101
  private readonly events;
5077
5102
  private receiveQueue;
5103
+ private receivedBytes;
5104
+ private receivedMessages;
5105
+ private stdinClosed;
5106
+ private stderrClosed;
5107
+ private stdoutClosed;
5078
5108
  /**
5079
5109
  * Creates a new WebTTY instance.
5080
5110
  *
@@ -5124,6 +5154,7 @@ declare class WebTTY {
5124
5154
  private clientProofForAttach;
5125
5155
  private connectWebTransport;
5126
5156
  private handleConnectionMessage;
5157
+ private boundedMessagePayload;
5127
5158
  private trackReceiveQueue;
5128
5159
  private processMessage;
5129
5160
  private processDataMessage;
@@ -5344,83 +5375,22 @@ declare class WebTTYRemoteExecutor {
5344
5375
  runCommand(command: string, args?: readonly string[], options?: WebTTYRunCommandOptions): Promise<WebTTYCommandResult>;
5345
5376
  }
5346
5377
 
5347
- interface WebTTYFileSystemConfig {
5348
- authToken?: string;
5349
- fetch?: typeof fetch;
5350
- fsPath?: string;
5351
- headers?: HeadersInit;
5352
- url: WebTTYURLProvider;
5353
- }
5354
- interface WebTTYFileSystemItem {
5355
- kind: "directory" | "file";
5356
- modified?: string;
5357
- path: string;
5358
- size?: number;
5359
- }
5360
- interface WebTTYFileSystemRequestOptions {
5361
- signal?: AbortSignal;
5362
- }
5363
- interface WebTTYFileSystemReadFileOptions extends WebTTYFileSystemRequestOptions {
5364
- encoding?: string | null;
5365
- }
5366
- interface WebTTYFileSystemMkdirOptions extends WebTTYFileSystemRequestOptions {
5367
- recursive?: boolean;
5368
- }
5369
- interface WebTTYFileSystemReaddirOptions extends WebTTYFileSystemRequestOptions {
5370
- withFileTypes?: boolean;
5371
- }
5372
- interface WebTTYFileSystemRmOptions extends WebTTYFileSystemRequestOptions {
5373
- force?: boolean;
5374
- recursive?: boolean;
5375
- }
5376
- interface WebTTYFileSystemWriteFileOptions extends WebTTYFileSystemRequestOptions {
5377
- contentType?: string;
5378
- }
5379
- interface WebTTYFileSystemWriteStreamOptions extends WebTTYFileSystemRequestOptions {
5380
- contentType?: string;
5381
- }
5382
- type WebTTYFileSystemWriteData = BodyInit;
5383
- declare class WebTTYFileSystemError extends Error {
5384
- readonly operation: string;
5385
- readonly status: number;
5378
+ declare const resolveWebTTYFileSystemURL: typeof resolveFileSystemURL;
5379
+ type WebTTYFileSystemConfig = RemoteFileSystemConfig;
5380
+ type WebTTYFileSystemItem = FileSystemItem;
5381
+ type WebTTYFileSystemRequestOptions = FileSystemRequestOptions;
5382
+ type WebTTYFileSystemReadFileOptions = FileSystemReadFileOptions;
5383
+ type WebTTYFileSystemMkdirOptions = FileSystemMkdirOptions;
5384
+ type WebTTYFileSystemReaddirOptions = FileSystemReaddirOptions;
5385
+ type WebTTYFileSystemRmOptions = FileSystemRmOptions;
5386
+ type WebTTYFileSystemWriteFileOptions = FileSystemWriteFileOptions;
5387
+ type WebTTYFileSystemWriteStreamOptions = FileSystemWriteStreamOptions;
5388
+ type WebTTYFileSystemWriteData = FileSystemWriteData;
5389
+ declare class WebTTYFileSystemError extends FileSystemError {
5386
5390
  constructor(operation: string, status: number, message: string);
5387
5391
  }
5388
- declare function resolveWebTTYFileSystemURL(input: string | URL, remotePath?: string, fsPath?: string): URL;
5389
- declare function parseWebDAVMultiStatus(xml: string, fsPath?: string): WebTTYFileSystemItem[];
5390
- declare class WebTTYFileSystem {
5391
- private readonly config;
5392
- constructor(config: WebTTYFileSystemConfig);
5393
- list(path?: string, options?: WebTTYFileSystemRequestOptions): Promise<WebTTYFileSystemItem[]>;
5394
- readBytes(path: string, options?: WebTTYFileSystemRequestOptions): Promise<Uint8Array>;
5395
- readFile(path: string, options?: {
5396
- encoding?: null;
5397
- signal?: AbortSignal;
5398
- } | null): Promise<Uint8Array>;
5399
- readFile(path: string, options: {
5400
- encoding: string;
5401
- signal?: AbortSignal;
5402
- } | string): Promise<string>;
5403
- readText(path: string, options?: WebTTYFileSystemRequestOptions): Promise<string>;
5404
- readStream(path: string, options?: WebTTYFileSystemRequestOptions): Promise<ReadableStream<Uint8Array>>;
5405
- writeFile(path: string, data: WebTTYFileSystemWriteData, options?: WebTTYFileSystemWriteFileOptions): Promise<void>;
5406
- writeBytes(path: string, data: BodyInit, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5407
- writeStream(path: string, data: ReadableStream<Uint8Array>, options?: WebTTYFileSystemWriteStreamOptions): Promise<void>;
5408
- writeText(path: string, data: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5409
- copyFile(sourcePath: string, targetPath: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5410
- createDirectory(path: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5411
- exists(path: string, options?: WebTTYFileSystemRequestOptions): Promise<boolean>;
5412
- mkdir(path: string, options?: WebTTYFileSystemMkdirOptions): Promise<string | undefined>;
5413
- readdir(path: string, options: WebTTYFileSystemReaddirOptions & {
5414
- withFileTypes: true;
5415
- }): Promise<WebTTYFileSystemItem[]>;
5416
- readdir(path?: string, options?: WebTTYFileSystemReaddirOptions): Promise<string[]>;
5417
- rename(oldPath: string, newPath: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5418
- rm(path: string, options?: WebTTYFileSystemRmOptions): Promise<void>;
5419
- stat(path: string, options?: WebTTYFileSystemRequestOptions): Promise<WebTTYFileSystemItem>;
5420
- delete(path: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5421
- private createDirectoryRecursive;
5422
- private resourceURL;
5423
- private request;
5392
+ declare class WebTTYFileSystem extends RemoteFileSystem {
5393
+ protected createError(operation: string, status: number, message: string): WebTTYFileSystemError;
5424
5394
  }
5425
5395
 
5426
5396
  type WebTTYRecordedStreamType = "stdin" | "stdout" | "stderr";
@@ -5476,4 +5446,4 @@ declare function decryptWebTTYRecordedTextLog(events: readonly WebTTYRecordedSes
5476
5446
  declare function createWebTTYE2EReplayPayloadCryptoFromKeyGrant(grant: WebTTYRecordedKeyGrantDecryptMaterial, identity: WebTTYE2EIdentity): Promise<WebTTYE2EPayloadCrypto>;
5477
5447
  declare function renderWebTTYRecordedTextLog(events: readonly WebTTYRecordedSessionEvent[], chunks: readonly WebTTYReplayChunk[], options?: WebTTYRecordedTextLogOptions): WebTTYRecordedTextLog;
5478
5448
 
5479
- export { type ExecuteWebTTYCommandOptions, WebTTY, type WebTTYAttachCapability, type WebTTYAttachConfig, type WebTTYAttachRole, type WebTTYAuthRequirement, type WebTTYClientConfig, type WebTTYClientEndpointIdentity, type WebTTYClientProofTranscript, type WebTTYClientTransport, WebTTYCommand, type WebTTYCommandLog, type WebTTYCommandLogBytes, type WebTTYCommandOutput, type WebTTYCommandReadOptions, type WebTTYCommandResult, type WebTTYCommandStatus, type WebTTYCommandStream, type WebTTYE2EIdentity, type WebTTYE2EKeyContextConfig, type WebTTYE2EKeyContextRecipient, type WebTTYE2EKeyEnvelopeSuite, type WebTTYE2EKeyMaterial, type WebTTYE2EPayloadCipherSuite, type WebTTYE2EPayloadCrypto, type WebTTYE2EPayloadCryptoConfig, type WebTTYE2ERecipient, type WebTTYE2ERecipientKind, type WebTTYEncryptedPayload, type WebTTYEvents, type WebTTYExecutionConfig, type WebTTYExpectedServerIdentity, WebTTYFileSystem, type WebTTYFileSystemConfig, WebTTYFileSystemError, type WebTTYFileSystemItem, type WebTTYFileSystemMkdirOptions, type WebTTYFileSystemReadFileOptions, type WebTTYFileSystemReaddirOptions, type WebTTYFileSystemRequestOptions, type WebTTYFileSystemRmOptions, type WebTTYFileSystemWriteData, type WebTTYFileSystemWriteFileOptions, type WebTTYFileSystemWriteStreamOptions, type WebTTYKeyEnvelope, type WebTTYKeyEnvelopeSuite, type WebTTYOpenCapability, type WebTTYPayloadCipherSuite, type WebTTYPayloadCrypto, type WebTTYPayloadCryptoInfo, type WebTTYPayloadCryptoMetadata, type WebTTYProofSignature, type WebTTYRecordedCryptoMetadata, type WebTTYRecordedKeyGrantDecryptMaterial, type WebTTYRecordedSessionEvent, type WebTTYRecordedStreamType, type WebTTYRecordedTextLog, type WebTTYRecordedTextLogOptions, WebTTYRemoteExecutor, type WebTTYRemoteExecutorConfig, type WebTTYReplayChunk, type WebTTYRunCommandOptions, type WebTTYServerProofTranscript, type WebTTYSessionKeyGrant, type WebTTYSignatureSuite, type WebTTYSigningIdentity, type WebTTYURLProvider, type WebTTYWebTransportCertificateHash, type WebTTYWebTransportOptions, createWebTTYE2EClientPayloadCrypto, createWebTTYE2EKeyContext, createWebTTYE2EReplayPayloadCryptoFromKeyGrant, createWebTTYE2EServerPayloadCrypto, decodeWebTTYE2EKeyMaterial, decryptWebTTYRecordedEvent, decryptWebTTYRecordedTextLog, encodeWebTTYE2EKeyMaterial, executeWebTTYCommand, generateWebTTYE2EIdentity, generateWebTTYSigningIdentity, hashWebTTYAttachGrant, hashWebTTYClientCredential, hashWebTTYClientProofTranscript, hashWebTTYConfig, hashWebTTYServerProofTranscript, hashWebTTYSessionKeyGrant, openWebTTYCommand, parseWebDAVMultiStatus, renderWebTTYRecordedTextLog, resolveWebTTYExecutionURL, resolveWebTTYFileSystemURL, runWebTTYCommand, signWebTTYClientProofTranscript, signWebTTYServerProofTranscript, verifyWebTTYClientProofTranscript, verifyWebTTYServerProofTranscript, webTTYClientProofTranscriptBytes, webTTYE2EKeyID, webTTYFIPSCompatibleKeyEnvelopeSuite, webTTYFIPSCompatiblePayloadSuite, webTTYRecordedEventEncryptedPayload, webTTYServerProofTranscriptBytes, webTTYSigningKeyID };
5449
+ export { type ExecuteWebTTYCommandOptions, WebTTY, type WebTTYAttachCapability, type WebTTYAttachConfig, type WebTTYAttachRole, type WebTTYAuthRequirement, type WebTTYClientConfig, type WebTTYClientEndpointIdentity, type WebTTYClientProofTranscript, type WebTTYClientTransport, WebTTYCommand, type WebTTYCommandLog, type WebTTYCommandLogBytes, type WebTTYCommandOutput, type WebTTYCommandReadOptions, type WebTTYCommandResult, type WebTTYCommandStatus, type WebTTYCommandStream, type WebTTYE2EIdentity, type WebTTYE2EKeyContextConfig, type WebTTYE2EKeyContextRecipient, type WebTTYE2EKeyEnvelopeSuite, type WebTTYE2EKeyMaterial, type WebTTYE2EPayloadCipherSuite, type WebTTYE2EPayloadCrypto, type WebTTYE2EPayloadCryptoConfig, type WebTTYE2ERecipient, type WebTTYE2ERecipientKind, type WebTTYEncryptedPayload, type WebTTYEvents, type WebTTYExecutionConfig, type WebTTYExpectedServerIdentity, WebTTYFileSystem, type WebTTYFileSystemConfig, WebTTYFileSystemError, type WebTTYFileSystemItem, type WebTTYFileSystemMkdirOptions, type WebTTYFileSystemReadFileOptions, type WebTTYFileSystemReaddirOptions, type WebTTYFileSystemRequestOptions, type WebTTYFileSystemRmOptions, type WebTTYFileSystemWriteData, type WebTTYFileSystemWriteFileOptions, type WebTTYFileSystemWriteStreamOptions, type WebTTYKeyEnvelope, type WebTTYKeyEnvelopeSuite, type WebTTYOpenCapability, type WebTTYPayloadCipherSuite, type WebTTYPayloadCrypto, type WebTTYPayloadCryptoInfo, type WebTTYPayloadCryptoMetadata, type WebTTYProofSignature, type WebTTYRecordedCryptoMetadata, type WebTTYRecordedKeyGrantDecryptMaterial, type WebTTYRecordedSessionEvent, type WebTTYRecordedStreamType, type WebTTYRecordedTextLog, type WebTTYRecordedTextLogOptions, WebTTYRemoteExecutor, type WebTTYRemoteExecutorConfig, type WebTTYReplayChunk, type WebTTYRunCommandOptions, type WebTTYServerProofTranscript, type WebTTYSessionKeyGrant, type WebTTYSignatureSuite, type WebTTYSigningIdentity, type WebTTYURLProvider, type WebTTYWebSocket, type WebTTYWebSocketEvents, type WebTTYWebSocketFactory, type WebTTYWebTransportCertificateHash, type WebTTYWebTransportOptions, createWebTTYE2EClientPayloadCrypto, createWebTTYE2EKeyContext, createWebTTYE2EReplayPayloadCryptoFromKeyGrant, createWebTTYE2EServerPayloadCrypto, decodeWebTTYE2EKeyMaterial, decryptWebTTYRecordedEvent, decryptWebTTYRecordedTextLog, encodeWebTTYE2EKeyMaterial, executeWebTTYCommand, generateWebTTYE2EIdentity, generateWebTTYSigningIdentity, hashWebTTYAttachGrant, hashWebTTYClientCredential, hashWebTTYClientProofTranscript, hashWebTTYConfig, hashWebTTYServerProofTranscript, hashWebTTYSessionKeyGrant, openWebTTYCommand, renderWebTTYRecordedTextLog, resolveWebTTYExecutionURL, resolveWebTTYFileSystemURL, runWebTTYCommand, signWebTTYClientProofTranscript, signWebTTYServerProofTranscript, verifyWebTTYClientProofTranscript, verifyWebTTYServerProofTranscript, webTTYClientProofTranscriptBytes, webTTYE2EKeyID, webTTYFIPSCompatibleKeyEnvelopeSuite, webTTYFIPSCompatiblePayloadSuite, webTTYRecordedEventEncryptedPayload, webTTYServerProofTranscriptBytes, webTTYSigningKeyID };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as $protobuf from 'protobufjs';
2
2
  import Long from 'long';
3
+ import { RemoteFileSystem, FileSystemError, RemoteFileSystemConfig, FileSystemItem, FileSystemMkdirOptions, FileSystemReadFileOptions, FileSystemReaddirOptions, FileSystemRequestOptions, FileSystemRmOptions, FileSystemWriteData, FileSystemWriteFileOptions, FileSystemWriteStreamOptions, resolveFileSystemURL } from '@rstreamlabs/filesystem';
4
+ export { parseWebDAVMultiStatus } from '@rstreamlabs/filesystem';
3
5
 
4
6
  /** Namespace rstream. */
5
7
  declare namespace rstream {
@@ -4825,6 +4827,10 @@ interface WebTTYClientConfig {
4825
4827
  * @default "websocket"
4826
4828
  */
4827
4829
  transport?: WebTTYClientTransport;
4830
+ /** Maximum encoded message size in bytes; defaults to 1 MiB. */
4831
+ maxMessageSize?: number;
4832
+ /** Per-client WebSocket implementation; use nodeWebSocketFactory in Node.js. */
4833
+ webSocketFactory?: WebTTYWebSocketFactory;
4828
4834
  /**
4829
4835
  * Browser WebTransport constructor options.
4830
4836
  *
@@ -4873,6 +4879,24 @@ interface WebTTYClientConfig {
4873
4879
  clientBrowserId?: string;
4874
4880
  }
4875
4881
  type WebTTYClientTransport = "websocket" | "webtransport";
4882
+ interface WebTTYWebSocketEvents {
4883
+ close: object;
4884
+ error: object;
4885
+ message: {
4886
+ readonly data: unknown;
4887
+ };
4888
+ open: object;
4889
+ }
4890
+ interface WebTTYWebSocket {
4891
+ readonly bufferedAmount: number;
4892
+ send(data: Uint8Array<ArrayBuffer>): void;
4893
+ close(): void;
4894
+ addEventListener<K extends keyof WebTTYWebSocketEvents>(type: K, listener: (event: WebTTYWebSocketEvents[K]) => void): void;
4895
+ removeEventListener<K extends keyof WebTTYWebSocketEvents>(type: K, listener: (event: WebTTYWebSocketEvents[K]) => void): void;
4896
+ }
4897
+ type WebTTYWebSocketFactory = (url: string, options: {
4898
+ maxMessageSize: number;
4899
+ }) => WebTTYWebSocket;
4876
4900
  interface WebTTYClientEndpointIdentity {
4877
4901
  /** Suite profile bound into client proof transcripts. */
4878
4902
  keyEnvelopeSuite?: WebTTYKeyEnvelopeSuite;
@@ -5068,6 +5092,7 @@ interface WebTTYEvents {
5068
5092
  * WebTTY client for managing remote execution sessions.
5069
5093
  */
5070
5094
  declare class WebTTY {
5095
+ private readonly connectionAbort;
5071
5096
  private connection;
5072
5097
  private connectionState;
5073
5098
  private heartbeatTimer;
@@ -5075,6 +5100,11 @@ declare class WebTTY {
5075
5100
  private readonly execConfig;
5076
5101
  private readonly events;
5077
5102
  private receiveQueue;
5103
+ private receivedBytes;
5104
+ private receivedMessages;
5105
+ private stdinClosed;
5106
+ private stderrClosed;
5107
+ private stdoutClosed;
5078
5108
  /**
5079
5109
  * Creates a new WebTTY instance.
5080
5110
  *
@@ -5124,6 +5154,7 @@ declare class WebTTY {
5124
5154
  private clientProofForAttach;
5125
5155
  private connectWebTransport;
5126
5156
  private handleConnectionMessage;
5157
+ private boundedMessagePayload;
5127
5158
  private trackReceiveQueue;
5128
5159
  private processMessage;
5129
5160
  private processDataMessage;
@@ -5344,83 +5375,22 @@ declare class WebTTYRemoteExecutor {
5344
5375
  runCommand(command: string, args?: readonly string[], options?: WebTTYRunCommandOptions): Promise<WebTTYCommandResult>;
5345
5376
  }
5346
5377
 
5347
- interface WebTTYFileSystemConfig {
5348
- authToken?: string;
5349
- fetch?: typeof fetch;
5350
- fsPath?: string;
5351
- headers?: HeadersInit;
5352
- url: WebTTYURLProvider;
5353
- }
5354
- interface WebTTYFileSystemItem {
5355
- kind: "directory" | "file";
5356
- modified?: string;
5357
- path: string;
5358
- size?: number;
5359
- }
5360
- interface WebTTYFileSystemRequestOptions {
5361
- signal?: AbortSignal;
5362
- }
5363
- interface WebTTYFileSystemReadFileOptions extends WebTTYFileSystemRequestOptions {
5364
- encoding?: string | null;
5365
- }
5366
- interface WebTTYFileSystemMkdirOptions extends WebTTYFileSystemRequestOptions {
5367
- recursive?: boolean;
5368
- }
5369
- interface WebTTYFileSystemReaddirOptions extends WebTTYFileSystemRequestOptions {
5370
- withFileTypes?: boolean;
5371
- }
5372
- interface WebTTYFileSystemRmOptions extends WebTTYFileSystemRequestOptions {
5373
- force?: boolean;
5374
- recursive?: boolean;
5375
- }
5376
- interface WebTTYFileSystemWriteFileOptions extends WebTTYFileSystemRequestOptions {
5377
- contentType?: string;
5378
- }
5379
- interface WebTTYFileSystemWriteStreamOptions extends WebTTYFileSystemRequestOptions {
5380
- contentType?: string;
5381
- }
5382
- type WebTTYFileSystemWriteData = BodyInit;
5383
- declare class WebTTYFileSystemError extends Error {
5384
- readonly operation: string;
5385
- readonly status: number;
5378
+ declare const resolveWebTTYFileSystemURL: typeof resolveFileSystemURL;
5379
+ type WebTTYFileSystemConfig = RemoteFileSystemConfig;
5380
+ type WebTTYFileSystemItem = FileSystemItem;
5381
+ type WebTTYFileSystemRequestOptions = FileSystemRequestOptions;
5382
+ type WebTTYFileSystemReadFileOptions = FileSystemReadFileOptions;
5383
+ type WebTTYFileSystemMkdirOptions = FileSystemMkdirOptions;
5384
+ type WebTTYFileSystemReaddirOptions = FileSystemReaddirOptions;
5385
+ type WebTTYFileSystemRmOptions = FileSystemRmOptions;
5386
+ type WebTTYFileSystemWriteFileOptions = FileSystemWriteFileOptions;
5387
+ type WebTTYFileSystemWriteStreamOptions = FileSystemWriteStreamOptions;
5388
+ type WebTTYFileSystemWriteData = FileSystemWriteData;
5389
+ declare class WebTTYFileSystemError extends FileSystemError {
5386
5390
  constructor(operation: string, status: number, message: string);
5387
5391
  }
5388
- declare function resolveWebTTYFileSystemURL(input: string | URL, remotePath?: string, fsPath?: string): URL;
5389
- declare function parseWebDAVMultiStatus(xml: string, fsPath?: string): WebTTYFileSystemItem[];
5390
- declare class WebTTYFileSystem {
5391
- private readonly config;
5392
- constructor(config: WebTTYFileSystemConfig);
5393
- list(path?: string, options?: WebTTYFileSystemRequestOptions): Promise<WebTTYFileSystemItem[]>;
5394
- readBytes(path: string, options?: WebTTYFileSystemRequestOptions): Promise<Uint8Array>;
5395
- readFile(path: string, options?: {
5396
- encoding?: null;
5397
- signal?: AbortSignal;
5398
- } | null): Promise<Uint8Array>;
5399
- readFile(path: string, options: {
5400
- encoding: string;
5401
- signal?: AbortSignal;
5402
- } | string): Promise<string>;
5403
- readText(path: string, options?: WebTTYFileSystemRequestOptions): Promise<string>;
5404
- readStream(path: string, options?: WebTTYFileSystemRequestOptions): Promise<ReadableStream<Uint8Array>>;
5405
- writeFile(path: string, data: WebTTYFileSystemWriteData, options?: WebTTYFileSystemWriteFileOptions): Promise<void>;
5406
- writeBytes(path: string, data: BodyInit, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5407
- writeStream(path: string, data: ReadableStream<Uint8Array>, options?: WebTTYFileSystemWriteStreamOptions): Promise<void>;
5408
- writeText(path: string, data: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5409
- copyFile(sourcePath: string, targetPath: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5410
- createDirectory(path: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5411
- exists(path: string, options?: WebTTYFileSystemRequestOptions): Promise<boolean>;
5412
- mkdir(path: string, options?: WebTTYFileSystemMkdirOptions): Promise<string | undefined>;
5413
- readdir(path: string, options: WebTTYFileSystemReaddirOptions & {
5414
- withFileTypes: true;
5415
- }): Promise<WebTTYFileSystemItem[]>;
5416
- readdir(path?: string, options?: WebTTYFileSystemReaddirOptions): Promise<string[]>;
5417
- rename(oldPath: string, newPath: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5418
- rm(path: string, options?: WebTTYFileSystemRmOptions): Promise<void>;
5419
- stat(path: string, options?: WebTTYFileSystemRequestOptions): Promise<WebTTYFileSystemItem>;
5420
- delete(path: string, options?: WebTTYFileSystemRequestOptions): Promise<void>;
5421
- private createDirectoryRecursive;
5422
- private resourceURL;
5423
- private request;
5392
+ declare class WebTTYFileSystem extends RemoteFileSystem {
5393
+ protected createError(operation: string, status: number, message: string): WebTTYFileSystemError;
5424
5394
  }
5425
5395
 
5426
5396
  type WebTTYRecordedStreamType = "stdin" | "stdout" | "stderr";
@@ -5476,4 +5446,4 @@ declare function decryptWebTTYRecordedTextLog(events: readonly WebTTYRecordedSes
5476
5446
  declare function createWebTTYE2EReplayPayloadCryptoFromKeyGrant(grant: WebTTYRecordedKeyGrantDecryptMaterial, identity: WebTTYE2EIdentity): Promise<WebTTYE2EPayloadCrypto>;
5477
5447
  declare function renderWebTTYRecordedTextLog(events: readonly WebTTYRecordedSessionEvent[], chunks: readonly WebTTYReplayChunk[], options?: WebTTYRecordedTextLogOptions): WebTTYRecordedTextLog;
5478
5448
 
5479
- export { type ExecuteWebTTYCommandOptions, WebTTY, type WebTTYAttachCapability, type WebTTYAttachConfig, type WebTTYAttachRole, type WebTTYAuthRequirement, type WebTTYClientConfig, type WebTTYClientEndpointIdentity, type WebTTYClientProofTranscript, type WebTTYClientTransport, WebTTYCommand, type WebTTYCommandLog, type WebTTYCommandLogBytes, type WebTTYCommandOutput, type WebTTYCommandReadOptions, type WebTTYCommandResult, type WebTTYCommandStatus, type WebTTYCommandStream, type WebTTYE2EIdentity, type WebTTYE2EKeyContextConfig, type WebTTYE2EKeyContextRecipient, type WebTTYE2EKeyEnvelopeSuite, type WebTTYE2EKeyMaterial, type WebTTYE2EPayloadCipherSuite, type WebTTYE2EPayloadCrypto, type WebTTYE2EPayloadCryptoConfig, type WebTTYE2ERecipient, type WebTTYE2ERecipientKind, type WebTTYEncryptedPayload, type WebTTYEvents, type WebTTYExecutionConfig, type WebTTYExpectedServerIdentity, WebTTYFileSystem, type WebTTYFileSystemConfig, WebTTYFileSystemError, type WebTTYFileSystemItem, type WebTTYFileSystemMkdirOptions, type WebTTYFileSystemReadFileOptions, type WebTTYFileSystemReaddirOptions, type WebTTYFileSystemRequestOptions, type WebTTYFileSystemRmOptions, type WebTTYFileSystemWriteData, type WebTTYFileSystemWriteFileOptions, type WebTTYFileSystemWriteStreamOptions, type WebTTYKeyEnvelope, type WebTTYKeyEnvelopeSuite, type WebTTYOpenCapability, type WebTTYPayloadCipherSuite, type WebTTYPayloadCrypto, type WebTTYPayloadCryptoInfo, type WebTTYPayloadCryptoMetadata, type WebTTYProofSignature, type WebTTYRecordedCryptoMetadata, type WebTTYRecordedKeyGrantDecryptMaterial, type WebTTYRecordedSessionEvent, type WebTTYRecordedStreamType, type WebTTYRecordedTextLog, type WebTTYRecordedTextLogOptions, WebTTYRemoteExecutor, type WebTTYRemoteExecutorConfig, type WebTTYReplayChunk, type WebTTYRunCommandOptions, type WebTTYServerProofTranscript, type WebTTYSessionKeyGrant, type WebTTYSignatureSuite, type WebTTYSigningIdentity, type WebTTYURLProvider, type WebTTYWebTransportCertificateHash, type WebTTYWebTransportOptions, createWebTTYE2EClientPayloadCrypto, createWebTTYE2EKeyContext, createWebTTYE2EReplayPayloadCryptoFromKeyGrant, createWebTTYE2EServerPayloadCrypto, decodeWebTTYE2EKeyMaterial, decryptWebTTYRecordedEvent, decryptWebTTYRecordedTextLog, encodeWebTTYE2EKeyMaterial, executeWebTTYCommand, generateWebTTYE2EIdentity, generateWebTTYSigningIdentity, hashWebTTYAttachGrant, hashWebTTYClientCredential, hashWebTTYClientProofTranscript, hashWebTTYConfig, hashWebTTYServerProofTranscript, hashWebTTYSessionKeyGrant, openWebTTYCommand, parseWebDAVMultiStatus, renderWebTTYRecordedTextLog, resolveWebTTYExecutionURL, resolveWebTTYFileSystemURL, runWebTTYCommand, signWebTTYClientProofTranscript, signWebTTYServerProofTranscript, verifyWebTTYClientProofTranscript, verifyWebTTYServerProofTranscript, webTTYClientProofTranscriptBytes, webTTYE2EKeyID, webTTYFIPSCompatibleKeyEnvelopeSuite, webTTYFIPSCompatiblePayloadSuite, webTTYRecordedEventEncryptedPayload, webTTYServerProofTranscriptBytes, webTTYSigningKeyID };
5449
+ export { type ExecuteWebTTYCommandOptions, WebTTY, type WebTTYAttachCapability, type WebTTYAttachConfig, type WebTTYAttachRole, type WebTTYAuthRequirement, type WebTTYClientConfig, type WebTTYClientEndpointIdentity, type WebTTYClientProofTranscript, type WebTTYClientTransport, WebTTYCommand, type WebTTYCommandLog, type WebTTYCommandLogBytes, type WebTTYCommandOutput, type WebTTYCommandReadOptions, type WebTTYCommandResult, type WebTTYCommandStatus, type WebTTYCommandStream, type WebTTYE2EIdentity, type WebTTYE2EKeyContextConfig, type WebTTYE2EKeyContextRecipient, type WebTTYE2EKeyEnvelopeSuite, type WebTTYE2EKeyMaterial, type WebTTYE2EPayloadCipherSuite, type WebTTYE2EPayloadCrypto, type WebTTYE2EPayloadCryptoConfig, type WebTTYE2ERecipient, type WebTTYE2ERecipientKind, type WebTTYEncryptedPayload, type WebTTYEvents, type WebTTYExecutionConfig, type WebTTYExpectedServerIdentity, WebTTYFileSystem, type WebTTYFileSystemConfig, WebTTYFileSystemError, type WebTTYFileSystemItem, type WebTTYFileSystemMkdirOptions, type WebTTYFileSystemReadFileOptions, type WebTTYFileSystemReaddirOptions, type WebTTYFileSystemRequestOptions, type WebTTYFileSystemRmOptions, type WebTTYFileSystemWriteData, type WebTTYFileSystemWriteFileOptions, type WebTTYFileSystemWriteStreamOptions, type WebTTYKeyEnvelope, type WebTTYKeyEnvelopeSuite, type WebTTYOpenCapability, type WebTTYPayloadCipherSuite, type WebTTYPayloadCrypto, type WebTTYPayloadCryptoInfo, type WebTTYPayloadCryptoMetadata, type WebTTYProofSignature, type WebTTYRecordedCryptoMetadata, type WebTTYRecordedKeyGrantDecryptMaterial, type WebTTYRecordedSessionEvent, type WebTTYRecordedStreamType, type WebTTYRecordedTextLog, type WebTTYRecordedTextLogOptions, WebTTYRemoteExecutor, type WebTTYRemoteExecutorConfig, type WebTTYReplayChunk, type WebTTYRunCommandOptions, type WebTTYServerProofTranscript, type WebTTYSessionKeyGrant, type WebTTYSignatureSuite, type WebTTYSigningIdentity, type WebTTYURLProvider, type WebTTYWebSocket, type WebTTYWebSocketEvents, type WebTTYWebSocketFactory, type WebTTYWebTransportCertificateHash, type WebTTYWebTransportOptions, createWebTTYE2EClientPayloadCrypto, createWebTTYE2EKeyContext, createWebTTYE2EReplayPayloadCryptoFromKeyGrant, createWebTTYE2EServerPayloadCrypto, decodeWebTTYE2EKeyMaterial, decryptWebTTYRecordedEvent, decryptWebTTYRecordedTextLog, encodeWebTTYE2EKeyMaterial, executeWebTTYCommand, generateWebTTYE2EIdentity, generateWebTTYSigningIdentity, hashWebTTYAttachGrant, hashWebTTYClientCredential, hashWebTTYClientProofTranscript, hashWebTTYConfig, hashWebTTYServerProofTranscript, hashWebTTYSessionKeyGrant, openWebTTYCommand, renderWebTTYRecordedTextLog, resolveWebTTYExecutionURL, resolveWebTTYFileSystemURL, runWebTTYCommand, signWebTTYClientProofTranscript, signWebTTYServerProofTranscript, verifyWebTTYClientProofTranscript, verifyWebTTYServerProofTranscript, webTTYClientProofTranscriptBytes, webTTYE2EKeyID, webTTYFIPSCompatibleKeyEnvelopeSuite, webTTYFIPSCompatiblePayloadSuite, webTTYRecordedEventEncryptedPayload, webTTYServerProofTranscriptBytes, webTTYSigningKeyID };