shellbook 0.2.2 → 0.2.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/README.md +6 -0
- package/install.js +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,12 @@ It downloads and runs `https://shellbook.co/install.sh`, which installs the preb
|
|
|
10
10
|
|
|
11
11
|
Invite links pass through:
|
|
12
12
|
|
|
13
|
+
```bash
|
|
14
|
+
npx shellbook@latest --invite INVITE_ID
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The npm separator form also works:
|
|
18
|
+
|
|
13
19
|
```bash
|
|
14
20
|
npx shellbook@latest -- --invite INVITE_ID
|
|
15
21
|
```
|
package/install.js
CHANGED
|
@@ -6,7 +6,14 @@ const http = require("node:http");
|
|
|
6
6
|
const https = require("node:https");
|
|
7
7
|
|
|
8
8
|
const installURL = process.env.SHELLBOOK_INSTALL_URL || "https://shellbook.co/install.sh";
|
|
9
|
-
const args = process.argv.slice(2);
|
|
9
|
+
const args = normalizeArgs(process.argv.slice(2));
|
|
10
|
+
|
|
11
|
+
function normalizeArgs(rawArgs) {
|
|
12
|
+
if (rawArgs[0] === "--") {
|
|
13
|
+
return rawArgs.slice(1);
|
|
14
|
+
}
|
|
15
|
+
return rawArgs;
|
|
16
|
+
}
|
|
10
17
|
|
|
11
18
|
function clientFor(url) {
|
|
12
19
|
return url.startsWith("http://") ? http : https;
|