offsite 0.0.4 → 0.0.5
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 +7 -6
- package/apps/server/dist/main.mjs +11 -6
- package/apps/server/dist/main.mjs.map +1 -1
- package/apps/web/dist/apple-touch-icon.png +0 -0
- package/apps/web/dist/assets/{angular-html-prQpjz7s.js → angular-html-B53hPuXT.js} +1 -1
- package/apps/web/dist/assets/{angular-ts-BE4HJ5Uh.js → angular-ts--nhprFvo.js} +1 -1
- package/apps/web/dist/assets/{apl-CJ-NIQ-7.js → apl-BMZ6gSxk.js} +1 -1
- package/apps/web/dist/assets/{astro-CVkyXRVY.js → astro-BTM15MDF.js} +1 -1
- package/apps/web/dist/assets/{blade-CQFMHse_.js → blade-Dr8Nx-1X.js} +1 -1
- package/apps/web/dist/assets/{c-gqNWYRL8.js → c-CYWvPMKX.js} +1 -1
- package/apps/web/dist/assets/{chapel-CQ9_BV4j.js → chapel-C8sB6Foh.js} +1 -1
- package/apps/web/dist/assets/{cobol-D-9v184m.js → cobol-FnuKKfgs.js} +1 -1
- package/apps/web/dist/assets/{coffee-BE0tIOLL.js → coffee-DJrh6kIB.js} +1 -1
- package/apps/web/dist/assets/{cpp-CzOLC-NF.js → cpp-BLAvrTU1.js} +1 -1
- package/apps/web/dist/assets/{crystal-f1GcBNi_.js → crystal-BthZctDJ.js} +1 -1
- package/apps/web/dist/assets/{css-DlqRAumc.js → css-DjklwMwW.js} +1 -1
- package/apps/web/dist/assets/{edge-DQkkPJaW.js → edge-BunAX5o-.js} +1 -1
- package/apps/web/dist/assets/{elixir-ClG78o74.js → elixir-DgeksfSS.js} +1 -1
- package/apps/web/dist/assets/{elm-DZDmCmuw.js → elm-l1eWnD1P.js} +1 -1
- package/apps/web/dist/assets/{erb-B1mu0-DN.js → erb-JKFWiSFc.js} +1 -1
- package/apps/web/dist/assets/{git-rebase-x1gs-rK2.js → git-rebase-AsNqLj-a.js} +1 -1
- package/apps/web/dist/assets/{glimmer-js-Cjos1igW.js → glimmer-js-B8iwahHO.js} +1 -1
- package/apps/web/dist/assets/{glimmer-ts-CrR-PFvn.js → glimmer-ts-7zfF4XN6.js} +1 -1
- package/apps/web/dist/assets/{glsl-DR0G8e99.js → glsl-BJka2Ayq.js} +1 -1
- package/apps/web/dist/assets/{graphql-DKmrBZt7.js → graphql-7lx4uUDH.js} +1 -1
- package/apps/web/dist/assets/{hack-Brs_j9Xv.js → hack-Jm3cv9jc.js} +1 -1
- package/apps/web/dist/assets/{haml-8Lc-lF96.js → haml-Csl_BhoG.js} +1 -1
- package/apps/web/dist/assets/{handlebars-Ds8WdPdv.js → handlebars-CFp1rmy8.js} +1 -1
- package/apps/web/dist/assets/{html-C0gvYDho.js → html-D_zffrV4.js} +1 -1
- package/apps/web/dist/assets/{html-derivative-CU9dkErg.js → html-derivative-B-pqZuPW.js} +1 -1
- package/apps/web/dist/assets/{http-BE0w0Fty.js → http-CU_emOoa.js} +1 -1
- package/apps/web/dist/assets/{hurl-DqZk6YcW.js → hurl-BRBJ1eQP.js} +1 -1
- package/apps/web/dist/assets/index-CJuLsqhP.js +1148 -0
- package/apps/web/dist/assets/{java-PSSQ0YmM.js → java-DWuVSV9c.js} +1 -1
- package/apps/web/dist/assets/{javascript-Ci3r4rzs.js → javascript-CPq3YNXl.js} +1 -1
- package/apps/web/dist/assets/{jinja-lLTko9Wl.js → jinja-Cwr4gaQT.js} +1 -1
- package/apps/web/dist/assets/{jison-1BpHD5UK.js → jison-tIc7kJPc.js} +1 -1
- package/apps/web/dist/assets/{json-BAUn76M4.js → json-CuLUmV8d.js} +1 -1
- package/apps/web/dist/assets/{jsx-B8sFp1vz.js → jsx-c0vioNM-.js} +1 -1
- package/apps/web/dist/assets/{julia-C4TZ4EL9.js → julia-DL1_3nCX.js} +1 -1
- package/apps/web/dist/assets/{just-D5qIrqkp.js → just-Dz1Oq8ln.js} +1 -1
- package/apps/web/dist/assets/{latex-BL7XYxFg.js → latex-BtJjjmHB.js} +1 -1
- package/apps/web/dist/assets/{liquid-DBx9Hq7B.js → liquid-CUxfxikC.js} +1 -1
- package/apps/web/dist/assets/{lua-BqjicQyd.js → lua-FURW1z3g.js} +1 -1
- package/apps/web/dist/assets/{marko-CHgy7yaY.js → marko-D33gqJht.js} +1 -1
- package/apps/web/dist/assets/{mdc-DOloBwb8.js → mdc-rJL-euOm.js} +1 -1
- package/apps/web/dist/assets/{nginx-g7I1HPwV.js → nginx-CChB1oIE.js} +1 -1
- package/apps/web/dist/assets/{nim-O6zJV1LD.js → nim-C3VcT8nQ.js} +1 -1
- package/apps/web/dist/assets/{org-HLg4-757.js → org-CX9ySstM.js} +1 -1
- package/apps/web/dist/assets/{perl-B3cDKTai.js → perl-BmdWqdcq.js} +1 -1
- package/apps/web/dist/assets/{php-2eDApoU3.js → php-CMtd7vHw.js} +1 -1
- package/apps/web/dist/assets/{pug-itzGn-nK.js → pug-DRlx8d5w.js} +1 -1
- package/apps/web/dist/assets/{qml-sU0VtUmf.js → qml-WYwqwy0P.js} +1 -1
- package/apps/web/dist/assets/{r-C6mhPqgr.js → r-C1yAXCUm.js} +1 -1
- package/apps/web/dist/assets/{razor-CSzRtbW7.js → razor-RKu7WkDv.js} +1 -1
- package/apps/web/dist/assets/{regexp-BmdBJRV9.js → regexp-DuLU1P7q.js} +1 -1
- package/apps/web/dist/assets/{rst-BRxUd6sp.js → rst-CmK0AAXk.js} +1 -1
- package/apps/web/dist/assets/{ruby-CQHHOfmX.js → ruby-DwgaoIUu.js} +1 -1
- package/apps/web/dist/assets/{sas-DlaL8b25.js → sas-iTrXuHXc.js} +1 -1
- package/apps/web/dist/assets/{scss-Cc71ABWp.js → scss-CEysq-zA.js} +1 -1
- package/apps/web/dist/assets/{shellscript-CzA_LIIm.js → shellscript-B0mTpBTm.js} +1 -1
- package/apps/web/dist/assets/{shellsession-DESJlgp3.js → shellsession-BuzD9EVx.js} +1 -1
- package/apps/web/dist/assets/{soy-Nkvq88YN.js → soy-ClDsFuFk.js} +1 -1
- package/apps/web/dist/assets/{sql-CtPxrO7T.js → sql-Dc1h3orO.js} +1 -1
- package/apps/web/dist/assets/{stata-BacEfVTr.js → stata-l31dxrtC.js} +1 -1
- package/apps/web/dist/assets/{surrealql-CYW10JNe.js → surrealql-x6LM7pkl.js} +1 -1
- package/apps/web/dist/assets/{svelte-D3_tCKGs.js → svelte-CtkYFYuK.js} +1 -1
- package/apps/web/dist/assets/{templ-BGKIfY_b.js → templ-DHMinkR-.js} +1 -1
- package/apps/web/dist/assets/{tex-BkkYOaXX.js → tex-CXbWoQMY.js} +1 -1
- package/apps/web/dist/assets/{ts-tags-B02tnbpZ.js → ts-tags-BikYq-3m.js} +1 -1
- package/apps/web/dist/assets/{tsx-D3MB1IUf.js → tsx-zHJnYG9T.js} +1 -1
- package/apps/web/dist/assets/{twig-CPhw2wGK.js → twig-DKCfiSr9.js} +1 -1
- package/apps/web/dist/assets/{typescript-B7U4faGm.js → typescript-K9TDgxRD.js} +1 -1
- package/apps/web/dist/assets/{typst-CN9EZswy.js → typst-BpXkFpDR.js} +1 -1
- package/apps/web/dist/assets/{vue-YH8dfjo_.js → vue-BYYRFXPM.js} +1 -1
- package/apps/web/dist/assets/{vue-html-NwX2xzgp.js → vue-html-BR347tzO.js} +1 -1
- package/apps/web/dist/assets/{vue-vine-DoRmnjLj.js → vue-vine-Jv4OHYgW.js} +1 -1
- package/apps/web/dist/assets/{xml-DgfgLpPc.js → xml-DuYGU-7M.js} +1 -1
- package/apps/web/dist/assets/{xsl-CEwQRUK_.js → xsl-B950Zbyt.js} +1 -1
- package/apps/web/dist/assets/{yaml-CEFOzF95.js → yaml-XFYTn8dR.js} +1 -1
- package/apps/web/dist/icon-192.png +0 -0
- package/apps/web/dist/icon-512.png +0 -0
- package/apps/web/dist/icon-maskable-512.png +0 -0
- package/apps/web/dist/index.html +3 -1
- package/apps/web/dist/sw.js +1 -92
- package/package.json +1 -1
- package/apps/web/dist/assets/index-rgKS_aMw.js +0 -1148
package/README.md
CHANGED
|
@@ -20,12 +20,13 @@ Then open the pairing link it prints. It pairs this browser with the server, so
|
|
|
20
20
|
| `offsite pair` | Makes a pairing token for another browser and prints its links. `--name` labels it |
|
|
21
21
|
| `offsite unpair` | Lists paired browsers so you can pick which to unpair |
|
|
22
22
|
|
|
23
|
-
| Flag | Default | What it sets
|
|
24
|
-
| ----------- | ------------ |
|
|
25
|
-
| `--host` | `127.0.0.1` | Address to listen on
|
|
26
|
-
| `--port` | `47841` | Port to listen on
|
|
27
|
-
| `--dir` | `~/.offsite` | Folder for settings and accounts
|
|
28
|
-
| `--no-auth` | auth on | Accept connections without the pairing token
|
|
23
|
+
| Flag | Default | What it sets |
|
|
24
|
+
| ----------- | ------------ | ------------------------------------------------------------ |
|
|
25
|
+
| `--host` | `127.0.0.1` | Address to listen on |
|
|
26
|
+
| `--port` | `47841` | Port to listen on |
|
|
27
|
+
| `--dir` | `~/.offsite` | Folder for settings and accounts |
|
|
28
|
+
| `--no-auth` | auth on | Accept connections without the pairing token |
|
|
29
|
+
| `--no-pair` | pair on | Don't create a pairing token or print pairing links on start |
|
|
29
30
|
|
|
30
31
|
Pairing tokens stay in `tokens.json` inside `--dir`. A running offsite disconnects an unpaired browser within seconds.
|
|
31
32
|
|
|
@@ -47,7 +47,7 @@ function broadcast(event) {
|
|
|
47
47
|
//#region src/args.ts
|
|
48
48
|
let command = "web";
|
|
49
49
|
let name = null;
|
|
50
|
-
const program = new Command("offsite").description("Starts the server and the web app").option("--host <host>", "Address to listen on", "127.0.0.1").option("--port <port>", "Port to listen on", "47841").option("--dir <dir>", "Folder for settings and accounts", path.join(os.homedir(), ".offsite")).option("--no-auth", "Accept connections without the pairing token");
|
|
50
|
+
const program = new Command("offsite").description("Starts the server and the web app").option("--host <host>", "Address to listen on", "127.0.0.1").option("--port <port>", "Port to listen on", "47841").option("--dir <dir>", "Folder for settings and accounts", path.join(os.homedir(), ".offsite")).option("--no-auth", "Accept connections without the pairing token").option("--no-pair", "Don't create a pairing token or print pairing links");
|
|
51
51
|
program.command("web", { isDefault: true }).description("Starts the server and the web app, same as offsite");
|
|
52
52
|
program.command("serve").description("Starts only the server, without the web app").action(() => {
|
|
53
53
|
command = "serve";
|
|
@@ -5649,7 +5649,7 @@ if (findClaude() === null) {
|
|
|
5649
5649
|
process.exit(1);
|
|
5650
5650
|
}
|
|
5651
5651
|
const publicDir = path.join(import.meta.dirname, "..", "..", "web", "dist");
|
|
5652
|
-
const token = args.auth ? firstToken() : null;
|
|
5652
|
+
const token = args.auth && args.pair ? firstToken() : null;
|
|
5653
5653
|
const server = createServer((request, response) => {
|
|
5654
5654
|
const url = new URL(request.url ?? "/", "http://localhost");
|
|
5655
5655
|
if (url.pathname === "/version") {
|
|
@@ -5691,10 +5691,15 @@ if (args.auth) setInterval(() => {
|
|
|
5691
5691
|
}, UNPAIR_CHECK);
|
|
5692
5692
|
server.listen(port, args.host, () => {
|
|
5693
5693
|
startPush(`${args.host}:${port}`);
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5694
|
+
if (args.pair) {
|
|
5695
|
+
const links = pairingLinks(token);
|
|
5696
|
+
if (args.command === "web") console.log(`offsite is running at ${links.local}`);
|
|
5697
|
+
console.log(`Open it on ${HOSTED_APP}: ${links.hosted}`);
|
|
5698
|
+
} else {
|
|
5699
|
+
console.log(`offsite is running at ${address}`);
|
|
5700
|
+
console.log(`Open it on ${HOSTED_APP}`);
|
|
5701
|
+
}
|
|
5702
|
+
if (!args.auth) console.warn("auth is off; anyone who can reach this port can control this machine");
|
|
5698
5703
|
});
|
|
5699
5704
|
process.on("SIGINT", stop);
|
|
5700
5705
|
process.on("SIGTERM", stop);
|