oorja 1.6.6 → 1.6.7
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.
|
@@ -7,6 +7,7 @@ export default class TeleTypeCommand extends Command {
|
|
|
7
7
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
8
8
|
shell: flags.IOptionFlag<string>;
|
|
9
9
|
multiplex: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
10
|
+
new_room: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
10
11
|
};
|
|
11
12
|
static args: {
|
|
12
13
|
name: string;
|
|
@@ -11,11 +11,15 @@ const utils_1 = require("../../lib/utils");
|
|
|
11
11
|
const DEFAULT_SHELL = os.platform() === "win32" ? "powershell.exe" : process.env.SHELL || "bash";
|
|
12
12
|
class TeleTypeCommand extends command_1.Command {
|
|
13
13
|
async run() {
|
|
14
|
-
const { args, flags: { shell, multiplex }, } = this.parse(TeleTypeCommand);
|
|
14
|
+
const { args, flags: { shell, multiplex, new_room }, } = this.parse(TeleTypeCommand);
|
|
15
15
|
if (args.room) {
|
|
16
16
|
await this.streamToLink({ shell, multiplex, roomLink: args.room });
|
|
17
17
|
process.exit(0);
|
|
18
18
|
}
|
|
19
|
+
if (new_room) {
|
|
20
|
+
await this.createRoomAndStream({ shell, multiplex });
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
19
23
|
console.log("(use -h for description and options) \n");
|
|
20
24
|
// room not known, prompt
|
|
21
25
|
const ROOM = "To an existing room (you have the room link)";
|
|
@@ -110,5 +114,10 @@ TeleTypeCommand.flags = {
|
|
|
110
114
|
description: "Allows room users to WRITE TO YOUR SHELL i.e enables collaboration mode. Make sure you trust room participants. Off by default",
|
|
111
115
|
default: false,
|
|
112
116
|
}),
|
|
117
|
+
new_room: command_1.flags.boolean({
|
|
118
|
+
char: "n",
|
|
119
|
+
description: "Create new room",
|
|
120
|
+
default: false,
|
|
121
|
+
}),
|
|
113
122
|
};
|
|
114
123
|
TeleTypeCommand.args = [{ name: "room" }];
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.6.
|
|
1
|
+
{"version":"1.6.7","commands":{"signout":{"id":"signout","description":"Sign-out of oorja. Clears saved auth-token","pluginName":"oorja","pluginType":"core","aliases":[],"flags":{},"args":[]},"teletype":{"id":"teletype","description":"Launch a terminal streaming session in oorja.","pluginName":"oorja","pluginType":"core","aliases":["tty"],"examples":["\u001b[94m$ teletype\u001b[39m\nWill prompt to choose streaming destination - existing room or create a new one.\n\n","\u001b[94m$ teletype 'https://oorja.io/rooms?id=foo#key'\u001b[39m\nWill stream to the room specified by secret link, you must have joined the room before streaming.\n\n","\u001b[94m$ teletype -m\u001b[39m\nWill also allow room participants to write to your terminal!\n\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"shell":{"name":"shell","type":"option","char":"s","description":"shell to use. e.g. bash, fish","default":"/usr/bin/zsh"},"multiplex":{"name":"multiplex","type":"boolean","char":"m","description":"Allows room users to WRITE TO YOUR SHELL i.e enables collaboration mode. Make sure you trust room participants. Off by default","allowNo":false},"new_room":{"name":"new_room","type":"boolean","char":"n","description":"Create new room","allowNo":false}},"args":[{"name":"room"}]}}}
|