Skip to content

Git-less install path so embedders inherit bundling in single-process / no-git runtimes #60

@melvincarvalho

Description

@melvincarvalho

Problem

jspod install (and the first-run bootstrap that seeds the default bundle) installs each app by git clone + git push to the pod's git-receive endpoint:

  • index.js runInstall()spawnSync('git', ['clone', …]) then a git push to <pod>/public/apps/<name> (requires the pod started with --git).

That needs a git binary, child_process spawning, and the git HTTP backend. None of those exist on nodejs-mobile (the Android app, js-pod/android) — no git, no forking. So:

Ask

Add a git-less install path to jspod so embedders inherit bundling instead of reimplementing it:

  • Resolve a bundle/app to its files over HTTP — e.g. the jsDelivr per-file tree API (https://data.jsdelivr.com/v1/package/gh/<org>/<repo>@<ref>) + https://cdn.jsdelivr.net/gh/<org>/<repo>@<ref>/<file> — instead of git clone.
  • Write the files into the pod (directly to <root>/public/apps/<name>/ on disk for in-process, or PUT via the Solid HTTP API with the IdP token for remote).
  • Expose it as a callable function (not just the CLI) and wire it into the in-process bootstrap (afterReady), so first-run default bundle install works in git-less runtimes.
  • Keep the git path as the default where git is available; pick git-less when git/spawn aren't (flag or auto-detect).

Payoff

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions