From 0ea25d081f42a18f0a0a5e691b8b5feae2ffd048 Mon Sep 17 00:00:00 2001 From: Melvin Carvalho Date: Sat, 16 May 2026 18:05:18 +0200 Subject: [PATCH] feat: bump jss to 0.0.195 and enable --git by default JSS 0.0.195 (https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/466) adds auto-init on first push, which closes the last gap that prevented the git HTTP backend from being useful out of the box. This PR turns on JSS's git backend by default in jspod, so every fresh `npx jspod` produces a pod that is also a real git remote: - `git clone http://localhost:5444/public/apps/` for any public-read path - `git push http://localhost:5444/public/apps/` for any owner-write path (auto-creates the bare repo on first push) - `git pull` to stay current Implementation: - package.json: bump javascript-solid-server from ^0.0.194 to ^0.0.195 - options.git defaults true; new --no-git CLI flag for opt-out (matches existing --no-auth / --no-open shape) - --git or --no-git is always passed explicitly to JSS so the spawn intent is unambiguous regardless of JSS's own default - docs.html grows a "Git remote" section explaining clone / push / auth ergonomics with a link to the upstream Known follow-up (out of scope here): git CLI doesn't speak DPoP natively, so push from the CLI today needs `git -c http.extraHeader="Authorization: DPoP "`. Worth a dedicated jspod helper script + dedicated doc; tracked separately. Refs #1 #26 --- docs.html | 16 ++++++++++++++++ index.js | 12 +++++++++++- package.json | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/docs.html b/docs.html index cd0913e..db38aa5 100644 --- a/docs.html +++ b/docs.html @@ -40,6 +40,7 @@

jspod docs

Auth ladder Backup & reset Bundled apps +Git remote Links @@ -119,6 +120,21 @@

Bundled Solid apps

jspod bundles Pilot at /public/apps/pilot/. It's served from your own pod, so same-origin sign-in works even on strict browsers (Brave with shields up).

The bundle is copied skip-if-exists, so you can pin a specific Pilot version by editing the files locally and they'll survive jspod upgrades. Delete pod-data/public/apps/pilot/ and restart to re-seed from the current jspod's bundled copy.

+

Git remote (your pod is a git server)

+

jspod enables JSS's git HTTP backend by default. Any pod path you have ACL Read on is git-cloneable; any path you have ACL Write on is git-pushable. Fresh paths auto-initialize on first push (JSS 0.0.195+).

+ +

Clone a public path

+
git clone http://localhost:5444/public/apps/pilot ./pilot
+ +

Push to a new path (auto-creates the bare repo)

+
git clone https://github.com/solid-apps/penny.git
+cd penny
+git remote add pod http://localhost:5444/public/apps/penny
+git push pod main
+

Note: git push against a Solid pod needs the same DPoP-bound auth as any other Solid write. Easiest workaround today is to set an Authorization header via git -c http.extraHeader=... with a token obtained from /signin.html. Cleaner ergonomics are a known gap.

+ +

To opt out: npx jspod --no-git.

+
  • jspod source — issues, PRs, releases
  • diff --git a/index.js b/index.js index 7c97356..2b4dbfa 100755 --- a/index.js +++ b/index.js @@ -41,7 +41,8 @@ const options = { root: './pod-data', multiuser: false, auth: true, - open: true + open: true, + git: true }; // Auth-ladder rung-1 credentials. See issue #6: jspod ships a deliberately @@ -116,6 +117,8 @@ for (let i = 0; i < args.length; i++) { options.auth = false; } else if (arg === '--no-open') { options.open = false; + } else if (arg === '--no-git') { + options.git = false; } else if (arg === '--version' || arg === '-v') { console.log(`jspod v${pkg.version}`); process.exit(0); @@ -134,6 +137,7 @@ for (let i = 0; i < args.length; i++) { console.log(chalk.green(' --multiuser') + chalk.dim(' Enable multi-user mode')); console.log(chalk.green(' --no-auth') + chalk.dim(' Disable authentication')); console.log(chalk.green(' --no-open') + chalk.dim(' Do not open the browser automatically')); + console.log(chalk.green(' --no-git') + chalk.dim(' Disable JSS\'s git HTTP backend (it is on by default)')); console.log(chalk.green(' -v, --version') + chalk.dim(' Show jspod version')); console.log(chalk.green(' --help') + chalk.dim(' Show this help message\n')); console.log(chalk.white('Examples:')); @@ -386,6 +390,12 @@ if (!options.auth) { jssArgs.push('--public'); } +// Enable JSS's git HTTP backend by default so the pod is a real +// git remote (clone for public-read paths, push for owner-write +// paths, auto-init on first push since JSS 0.0.195). Users who +// don't want this surface can pass --no-git. +jssArgs.push(options.git ? '--git' : '--no-git'); + // Start JSS with enhanced PATH to find the binary const jss = spawn('jss', jssArgs, { stdio: 'inherit', diff --git a/package.json b/package.json index 4cf6f96..9c0a2f7 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,6 @@ }, "dependencies": { "chalk": "^5.6.2", - "javascript-solid-server": "^0.0.194" + "javascript-solid-server": "^0.0.195" } }