You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that JSS 0.0.198 ships its own `jss install` subcommand (Phases 1+2+4 of JSS#464), jspod's wrapper-side install is duplicated infrastructure. The two implementations are byte-for-byte similar — both spawn `git clone` + dual-push, both have the same spec parser, both fetch tokens the same way.
Why consolidate
Single source of truth. Phase 5 (curated default set), Phase 6 (`--bundle`), Phase 3 (`--did` resolution) will all land in JSS first. If jspod's install stays separate, every new install feature requires double-porting.
Wrapper shrinks ~150 LoC (`runInstall`, `parseAppSpec`, `printInstallHelp`).
Behavior unchanged for users — `npx jspod install chrome` keeps working exactly the same.
A release cycle or two passes with the JSS install in the wild
Premature consolidation while JSS install is still evolving means re-doing this refactor each time the JSS-side interface shifts.
Sketch
Replace jspod's `runInstall` (~150 LoC) with a ~10-line delegation:
```js
async function runInstall(rest) {
// Default the --pod to the local jspod port; users can still
// override with --pod. Pass everything else through unchanged.
const args = ['install', ...rest];
if (!rest.includes('--pod')) {
args.push('--pod', http://localhost:${options.port});
}
const jssBin = join(__dirname, 'node_modules', '.bin', 'jss');
const child = spawn(jssBin, args, { stdio: 'inherit' });
await new Promise((resolve) => child.on('exit', (code) => {
process.exit(code || 0);
}));
}
```
Drop `parseAppSpec` and `printInstallHelp` — `jss install --help` is the source of truth.
Update jspod's main `--help` to mention "see `jss install --help` for the install subcommand options" or similar.
Risk
Behavior should be identical. Edge cases to verify:
Error messages: jspod's branded output (`✓ chrome → ...`) is replaced by jss's (also `✓ chrome → ...` — same shape today). If they ever diverge, the wrapper inherits whatever JSS does — that's the point.
`jspod`-specific defaults (e.g. default pod URL = 5444) get baked in through the `--pod` injection above.
Sibling
nosdav-server has the same situation; tracked separately on that repo.
Activity