npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mostajs/orm-copy-data-ui-html

v0.1.0

Published

IHM zéro-dépendance de @mostajs/orm-copy-data : source/destinations, entités, progression et journal en direct, rapport de copie. Rendu pur (état → HTML), l'hôte exécute.

Readme

@mostajs/orm-copy-data-ui-html

Auteur : Dr Hamid MADANI [email protected] · Licence : AGPL-3.0-or-later Niveau : N2 (composé / UI) · Zéro dépendance runtime

IHM de @mostajs/orm-copy-data : copier, migrer, exporter et sauvegarder les données d'une application @mostajs sans ligne de commande.

Couvre toutes les capacités du moteur :

| | | |---|---| | Sources | db (13 dialectes) · csv · json · sql | | Destinations (multiples) | db · csv · json · sql-dump | | Options | entités à copier · batchSize · progression · journal | | Résultat | copiés / erreurs / durée par entité, première erreur |

Architecture — qui exécute quoi

Ce module est une bibliothèque de rendu pure : des fonctions état → chaîne HTML. Elle ne copie rien, n'ouvre aucune connexion, et est donc testable sous Node sans navigateur ni base de données.

L'exécution appartient à l'application hôte, qui implémente un contrat HTTP de 4 routes. C'est délibéré : cette IHM manipule des URI de bases de production. L'authentification et les droits doivent rester chez l'hôte, pas dans une couche de présentation.

GET  /copy                   → l'IHM              (copyPage)
POST /copy/inspect           → teste la source, liste les entités
POST /copy/run               → lance la copie     → { jobId }
GET  /copy/events/:jobId     → SSE : progress · log · result

examples/server.mjs implémente ce contrat de bout en bout : c'est la démo ET le modèle à recopier.

Garde-fous

  1. Simulation (dry-run) par défaut — l'écriture réelle est un choix explicite, confirmé.
  2. Mots de passe masqués dans tout rendu et tout journal (postgres://user:***@hôte/base).
  3. Confirmation obligatoire avant d'écrire vers une base de destination.
  4. Aucune URI persistée par le module : l'hôte décide s'il les stocke, et où.

Installation

npm i @mostajs/orm-copy-data-ui-html
# peer (côté hôte, pour exécuter) : @mostajs/orm-copy-data >= 0.3.1

Exemple

import { copyPage } from '@mostajs/orm-copy-data-ui-html';

app.get('/copy', (req, res) => {
  res.send(copyPage({
    source: { type: 'db', dialect: 'sqljs', uri: './data/app.sqlite' },
    dests:  [{ type: 'db', dialect: 'postgres', uri: process.env.PG_URI }],
    dryRun: true,
  }));
});

Démo

npm run example   # http://localhost:8788

Copie un JSON vers JSON + CSV — une vraie copie par le vrai moteur, sans exiger de base de données. Basculer vers PostgreSQL ne change qu'un champ du formulaire.

Tests

npm test                          # 17 tests de rendu (mjs-unit, §11.1.bis)
node test-scripts/e2e-demo.mjs    # E2E : contrat HTTP + SSE + copie réelle sur disque

Les tests couvrent en priorité ce qui fait mal : fuite de mot de passe dans le HTML/le journal/le rapport, injection HTML, simulation qui écrirait par erreur, et rapport qui présenterait une copie partiellement en erreur comme un succès.

API

copyPage · sourceForm · destForm · entityPicker · progressPanel · logPanel · resultReport · dryRunBadge · maskUri · escapeHtml · CSS · SOURCE_TYPES · DEST_TYPES · DIALECTS.

Voir llms.txt pour les signatures.