bare-stow 0.1.3 → 0.1.4
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/index.d.ts +2 -3
- package/lib/protocol.d.ts +9 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import URL from 'bare-url'
|
|
2
|
+
import { PackOptions } from 'bare-pack'
|
|
2
3
|
|
|
3
4
|
interface Artifact {
|
|
4
5
|
extension?: string
|
|
@@ -46,11 +47,9 @@ interface RPCClient {
|
|
|
46
47
|
type: string
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
interface StowOptions {
|
|
50
|
+
interface StowOptions extends Omit<PackOptions, 'offload' | 'linked' | 'resolve' | 'aliases'> {
|
|
50
51
|
client?: RPC | RPCName
|
|
51
52
|
server?: RPC | RPCName
|
|
52
|
-
base?: URL | string
|
|
53
|
-
hosts?: string[]
|
|
54
53
|
resolveTarget?(name: string): Target
|
|
55
54
|
resolveRPC?(name: string): RPC
|
|
56
55
|
}
|
package/lib/protocol.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { Duplex } from 'bare-stream'
|
|
1
|
+
import { Duplex, DuplexEvents } from 'bare-stream'
|
|
2
2
|
|
|
3
3
|
declare const CONTROL: number
|
|
4
4
|
declare const USER: number
|
|
5
5
|
|
|
6
|
-
interface
|
|
6
|
+
interface ProtocolEvents extends DuplexEvents {
|
|
7
|
+
ready: []
|
|
8
|
+
terminate: []
|
|
9
|
+
exit: [code: number]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface Protocol<E extends ProtocolEvents = ProtocolEvents> extends Duplex<E> {
|
|
7
13
|
send(type: string, payload?: object): Promise<void>
|
|
8
14
|
}
|
|
9
15
|
|
|
@@ -13,4 +19,4 @@ declare class Protocol {
|
|
|
13
19
|
|
|
14
20
|
declare function attach(stream: Duplex): Protocol
|
|
15
21
|
|
|
16
|
-
export { type Protocol, attach, CONTROL, USER }
|
|
22
|
+
export { type Protocol, ProtocolEvents, attach, CONTROL, USER }
|