Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ <h1>jspod docs</h1>
<a href="#auth-ladder">Auth ladder</a>
<a href="#backup">Backup &amp; reset</a>
<a href="#apps">Bundled apps</a>
<a href="#git">Git remote</a>
<a href="#links">Links</a>
</nav>

Expand Down Expand Up @@ -119,6 +120,21 @@ <h2 id="apps">Bundled Solid apps</h2>
<p>jspod bundles <a href="https://github.com/solid-apps/pilot">Pilot</a> at <code>/public/apps/pilot/</code>. It's served from your own pod, so same-origin sign-in works even on strict browsers (Brave with shields up).</p>
<p>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 <code>pod-data/public/apps/pilot/</code> and restart to re-seed from the current jspod's bundled copy.</p>

<h2 id="git">Git remote (your pod is a git server)</h2>
<p>jspod enables <a href="https://github.com/JavaScriptSolidServer/JavaScriptSolidServer">JSS</a>'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+).</p>

<h3>Clone a public path</h3>
<pre>git clone http://localhost:5444/public/apps/pilot ./pilot</pre>

<h3>Push to a new path (auto-creates the bare repo)</h3>
<pre>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</pre>
<p>Note: <code>git push</code> against a Solid pod needs the same DPoP-bound auth as any other Solid write. Easiest workaround today is to set an <code>Authorization</code> header via <code>git -c http.extraHeader=...</code> with a token obtained from <code>/signin.html</code>. Cleaner ergonomics are a known gap.</p>

<p>To opt out: <code>npx jspod --no-git</code>.</p>

<h2 id="links">Links</h2>
<ul>
<li><a href="https://github.com/JavaScriptSolidServer/jspod">jspod source</a> — issues, PRs, releases</li>
Expand Down
12 changes: 11 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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:'));
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
},
"dependencies": {
"chalk": "^5.6.2",
"javascript-solid-server": "^0.0.194"
"javascript-solid-server": "^0.0.195"
}
}