@itsbjoern/roost 0.1.8 → 0.1.9
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 +5 -8
- package/bin/{roost-bin → roost} +0 -0
- package/install.js +4 -14
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
## @itsbjoern/roost
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
CLI and JavaScript API for Roost (local HTTPS reverse proxy with automatic cert management). The package ships with platform-specific binaries (like [Biome](https://github.com/biomejs/biome)); after install you can run `roost` directly.
|
|
4
4
|
|
|
5
5
|
### Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
# Global install — use `roost` from anywhere:
|
|
9
8
|
npm install -g @itsbjoern/roost
|
|
10
|
-
|
|
11
|
-
# Local install — use via npx:
|
|
12
|
-
npm install @itsbjoern/roost
|
|
13
9
|
```
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
### Usage
|
|
16
12
|
|
|
17
13
|
```bash
|
|
18
14
|
roost init # after global install
|
|
19
|
-
npx roost init #
|
|
15
|
+
npx roost init # without installing (npm)
|
|
20
16
|
```
|
|
21
17
|
|
|
18
|
+
If `roost` is not found after a global install, add your package manager's global bin to `PATH` (e.g. `export PATH="$PATH:$(npm config get prefix)/bin"` for npm, or `export PATH="$PATH:$HOME/.bun/bin"` for Bun).
|
|
19
|
+
|
|
22
20
|
### JavaScript API
|
|
23
21
|
|
|
24
22
|
Use the package as a library to get cert/key **contents** (or paths) for HTTPS config. Use `getDomainCerts` for build tools—returns literal PEM strings, no file reads:
|
|
@@ -31,4 +29,3 @@ const { cert, key } = await getDomainCerts('api.local', { generate: true });
|
|
|
31
29
|
```
|
|
32
30
|
|
|
33
31
|
See the [main README](https://github.com/itsbjoern/roost#javascript-api) for full API docs and examples.
|
|
34
|
-
|
package/bin/{roost-bin → roost}
RENAMED
|
Binary file
|
package/install.js
CHANGED
|
@@ -112,26 +112,16 @@ async function main() {
|
|
|
112
112
|
cwd: binDir,
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
-
const
|
|
116
|
-
const
|
|
115
|
+
const exeName = process.platform === "win32" ? "roost.exe" : "roost";
|
|
116
|
+
const binPath = path.join(binDir, exeName);
|
|
117
117
|
|
|
118
|
-
const exists = fs.existsSync(
|
|
118
|
+
const exists = fs.existsSync(binPath);
|
|
119
119
|
if (!exists) {
|
|
120
120
|
throw new Error(
|
|
121
|
-
`Extracted archive did not contain expected binary at ${
|
|
121
|
+
`Extracted archive did not contain expected binary at ${binPath}`
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
// On Unix, archive contains "roost" which would overwrite the Node wrapper.
|
|
126
|
-
// Rename to roost-bin so bin/roost stays as the wrapper script.
|
|
127
|
-
let binPath;
|
|
128
|
-
if (process.platform === "win32") {
|
|
129
|
-
binPath = extractedPath; // already bin/roost.exe
|
|
130
|
-
} else {
|
|
131
|
-
binPath = path.join(binDir, "roost-bin");
|
|
132
|
-
await fs.promises.rename(extractedPath, binPath);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
125
|
if (process.platform !== "win32") {
|
|
136
126
|
await fs.promises.chmod(binPath, 0o755);
|
|
137
127
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itsbjoern/roost",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Roost CLI - local HTTPS reverse proxy with automatic cert management",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"roost": "bin/roost"
|
|
9
9
|
},
|
|
10
|
+
"optionalDependencies": {
|
|
11
|
+
"@itsbjoern/roost-darwin-arm64": "0.1.9",
|
|
12
|
+
"@itsbjoern/roost-linux-x64": "0.1.9",
|
|
13
|
+
"@itsbjoern/roost-win32-x64": "0.1.9"
|
|
14
|
+
},
|
|
10
15
|
"scripts": {
|
|
11
16
|
"build": "tsc",
|
|
12
17
|
"postinstall": "node install.js",
|