v1.7.5 · npm · docker · git · soubory

Jeden přístav
pro všechny
vaše balíky.

Hostujte npm balíčky, Docker image, git repozitáře i soubory na vlastním serveru. Co nemáte, se stáhne a uloží do cache. Co publikujete, se může samo zreplikovat dál.

8repozitářů
4balíčků
29git repozitářů
736 minuptime
~/projekt
$ npm config set registry http://npm-rr.aip.fir.ma/
$ npm install lodash
✓ lodash z cache · npmjs-fallback
$ docker push npm-rr.aip.fir.ma/web/app:2.4.0
✓ 2.4.0: digest sha256:…
$ git push http://npm-rr.aip.fir.ma/git/tym/api.git main
✓ tym/api → replikováno dál

Začínáme

1

Nastavte registr

npm config set registry http://npm-rr.aip.fir.ma/
# jen pro jeden projekt (.npmrc):
registry=http://npm-rr.aip.fir.ma/
# jen vlastní scope:
@firma:registry=http://npm-rr.aip.fir.ma/
2

Přihlaste se a publikujte

npm login --registry http://npm-rr.aip.fir.ma/ --auth-type=legacy
# nebo token do .npmrc:
//npm-rr.aip.fir.ma/:_authToken=<token>
npm publish
3

Instalujte cokoli

npm install lodash      # z cache / upstreamu
npm install @firma/lib  # z lokálního repozitáře
yarn config set npmRegistryServer http://npm-rr.aip.fir.ma/
pnpm config set registry http://npm-rr.aip.fir.ma/
RepozitářTypAdresaPopis
npm výchozínpmhttp://npm-rr.aip.fir.ma/Výchozí npm repozitář
filesgenerichttp://npm-rr.aip.fir.ma/r/files/Obecné soubory / artefakty
dockerdockernpm-rr.aip.fir.ma/<image>Docker / OCI image (Docker Registry API v2 na /v2/)
gitgithttp://npm-rr.aip.fir.ma/git/<název>.gitGit repozitáře (git clone/push přes HTTP na /git/)
mujtestgithttp://npm-rr.aip.fir.ma/r/mujtest/<název>.git
mujtest2githttp://npm-rr.aip.fir.ma/r/mujtest2/<název>.git
php-web-eshopgithttp://npm-rr.aip.fir.ma/r/php-web-eshop/<název>.git
testgenerichttp://npm-rr.aip.fir.ma/r/test/jjjj

Čtyři kotviště, jedna adresa

npm a spol.

Publikace, dist-tagy, vyhledávání a audit. Funguje s yarn, pnpm, bun i deno.

npm publish --registry http://npm-rr.aip.fir.ma/

Docker image

Docker Registry API v2: push, pull, multi-platform indexy a úklid nepoužitých vrstev.

docker push npm-rr.aip.fir.ma/tym/app:1.0

Git

Clone a push přes HTTP, chráněné větve, zrcadla z GitHubu a automatický push zpět.

git push http://npm-rr.aip.fir.ma/git/tym/api.git

Soubory

Buildy, archivy a dokumentace s retencí, kvótami a neměnnými verzemi.

curl -T app.zip http://npm-rr.aip.fir.ma/r/files/

Klienti maintainer m5ike

curl -fsSL http://npm-rr.aip.fir.ma/install.sh | bash

Všechny nástroje volají správcovské API přes klientskou knihovnu, která se generuje při sestavení serveru ze specifikace API. Instalátor je uloží do ~/.local/bin; jen vybraný klient: | bash -s -- rr_bash-cli.

@m5ike/rr-client

v1.7.5

RR Registry API client library (JavaScript/TypeScript, Node.js and browser) - generated from the server API spec

npm install -g @m5ike/rr-client --registry http://npm-rr.aip.fir.ma/
m5ike-rr-client-1.7.5.tgz16.7 kB · knihovna

@m5ike/rr_bash-cli

v1.7.5

RR Registry - bash command line client (rr) using the generated bash API library rr-api.sh

npm install -g @m5ike/rr_bash-cli --registry http://npm-rr.aip.fir.ma/

@m5ike/rr_bash-gui

v1.7.5

RR Registry - bash GUI (whiptail/dialog menus) for complete registry administration via rr-api.sh

npm install -g @m5ike/rr_bash-gui --registry http://npm-rr.aip.fir.ma/

@m5ike/rr_web-guicli

v1.7.5

RR Registry - Web GUI + Node.js CLI (rr-web): serve the administration web GUI locally against any RR server and call the API from the command line

npm install -g @m5ike/rr_web-guicli --registry http://npm-rr.aip.fir.ma/

Směrování, které myslí za vás

Pravidla podle masky URL, klíče nebo hlavičky rozhodnou, odkud se obsah vezme a kam se po publikaci pošle dál.

1 · požadaveknpm, docker, git/~klíč/, /r/repo/, X-RR-Key
2 · rr.registryalways → lokální → notfoundprefix, glob, regex, klíč, hlavička
lokálněvlastní balíčky a repozitáře
z cachedo vypršení TTL, při výpadku stale
upstreamnpmjs, GitHub, firemní registr
push → dálreplikace po každé publikaci

Správa a dokumentace

Web GUI

Repozitáře, balíčky, git, image, soubory, pravidla, cache, webhooky, úlohy a uživatelé. Tabulky s řazením a seskupením, okna v okně, paleta příkazů ⌘K.

Otevřít administraci

REST API

Všechny operace na http://npm-rr.aip.fir.ma/api/v1. Specifikace /api/v1/spec, reference API.md.

curl -H "Authorization: Bearer $TOKEN" \
  http://npm-rr.aip.fir.ma/api/v1/repos