@openstrap/plugin-contract 0.1.1 → 0.1.2
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/Transport.d.ts +19 -0
- package/index.d.ts +1 -0
- package/package.json +6 -1
package/Transport.d.ts
CHANGED
|
@@ -62,6 +62,20 @@ export type TransportConnection = Transport & {
|
|
|
62
62
|
authMethods: readonly string[];
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* How a standard OpenSSH client reaches a machine through a transport: what openstrap hands a tool
|
|
67
|
+
* it runs against the machine, such as Ansible, that speaks OpenSSH rather than openstrap's ports.
|
|
68
|
+
*/
|
|
69
|
+
export type OpenSshAccess = {
|
|
70
|
+
host: string;
|
|
71
|
+
port: number;
|
|
72
|
+
user: string;
|
|
73
|
+
/** The private key to log in with, where the transport logs in by key. Absent where it does not. */
|
|
74
|
+
privateKey?: string;
|
|
75
|
+
/** `ssh -o` options the transport needs, as name and value. */
|
|
76
|
+
options?: Readonly<Record<string, string>>;
|
|
77
|
+
};
|
|
78
|
+
|
|
65
79
|
/**
|
|
66
80
|
* Opens a transport to a target.
|
|
67
81
|
*
|
|
@@ -90,5 +104,10 @@ export type TransportConnector = {
|
|
|
90
104
|
* key it was given rather than one of the connector's own. Nothing is kept.
|
|
91
105
|
*/
|
|
92
106
|
publicKeyOf?(privateKey: string): Promise<string>;
|
|
107
|
+
/**
|
|
108
|
+
* How an OpenSSH client reaches the machine the way this transport does. Optional: a transport
|
|
109
|
+
* that is not SSH underneath has nothing to say to OpenSSH.
|
|
110
|
+
*/
|
|
111
|
+
openSshAccess?(request: TransportConnectionRequest): Promise<OpenSshAccess>;
|
|
93
112
|
connect(request: TransportConnectionRequest): Promise<TransportConnection>;
|
|
94
113
|
};
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openstrap/plugin-contract",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The shape an OpenStrap plugin has. Types only: no runtime code, so a plugin depends on the contract and never on OpenStrap.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"README.md"
|
|
15
15
|
],
|
|
16
16
|
"license": "UNLICENSED",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/yardencom/openstrap.git",
|
|
20
|
+
"directory": "contract"
|
|
21
|
+
},
|
|
17
22
|
"publishConfig": {
|
|
18
23
|
"access": "public"
|
|
19
24
|
}
|