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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@likewatt/models

v1.1.21

Published

Package privé contenant les modèles TypeScript partagés pour les applications Likewatt.

Readme

@likewatt/models

Package privé contenant les modèles TypeScript partagés pour les applications Likewatt.

Installation

npm install @likewatt/models

Description

Ce package exporte les modèles de données TypeScript utilisés dans l'écosystème Likewatt, incluant :

  • Entités principales : Site, Scenario, User, License, CollectiveSite, Invitation, ScenarioDefaultValue
  • Entités TypeORM : Analysis, Optimization, WebhookOutput, historiques (Co2, Enedis, FCR, Okwind, Pvgis, Spot, Tempo)
  • Modèles internes : Paramètres énergétiques (batteries, PV, éolien, hydrogène, stockage thermique, etc.)
  • Types frontend : Types TypeScript pour l'interface utilisateur
  • Énumérations : Types énumérés partagés

Structure

  • src/core/ : Entités principales et modèles internes
  • src/frontend/ : Types TypeScript pour le frontend
  • dist/ : Build compilé (CommonJS)

Technologies

  • TypeScript 5.x
  • TypeORM 0.3.x
  • Mongoose 8.x
  • NestJS decorators (Swagger, Mongoose)
  • Class Validator

Scripts disponibles

npm run build        # Compile le projet TypeScript
npm run format       # Formate le code avec Prettier
npm run lint         # Lint et fixe le code avec ESLint
npm run lint:quick   # Lint sans auto-fix
npm run release      # Crée une release automatique (conventional commits)
npm run release:minor # Crée une release minor
npm run release:major # Crée une release major

Convention de commit

Le projet utilise Husky et Commitlint pour enforcer les conventions de commit.

Format requis

<type>(<scope>): <subject>

<body>

<footer>

Types autorisés

  • feat: Nouvelle fonctionnalité
  • fix: Correction de bug
  • docs: Documentation
  • style: Formatage, point-virgules manquants, etc.
  • refactor: Refactoring du code
  • perf: Amélioration des performances
  • test: Ajout de tests
  • build: Changements du système de build
  • ci: Changements CI/CD
  • chore: Tâches de maintenance
  • revert: Revert d'un commit précédent

Exemples

feat(user): add authentication endpoint
fix(scenario): correct energy calculation
docs(readme): update installation instructions
refactor(battery): simplify params validation
ci(pipeline): add automatic versioning

Impact sur le versioning

  • feat: incrémente la version minor (1.0.0 → 1.1.0)
  • fix: incrémente la version patch (1.0.0 → 1.0.1)
  • BREAKING CHANGE dans le footer : incrémente la version major (1.0.0 → 2.0.0)

Release et versioning

Le package utilise standard-version pour le versioning sémantique basé sur les commits conventionnels.

Release automatique

Chaque push sur la branche main déclenche automatiquement :

  1. Installation des dépendances
  2. Build du projet
  3. Analyse des commits pour déterminer le type de version (patch/minor/major)
  4. Génération du CHANGELOG
  5. Publication sur le registry NPM privé

Release manuelle

Via Bitbucket Pipelines, possibilité de forcer un type de release :

  • patch : Correctifs (1.0.0 → 1.0.1)
  • minor : Nouvelles fonctionnalités (1.0.0 → 1.1.0)
  • major : Breaking changes (1.0.0 → 2.0.0)
  • prepatch, preminor, premajor, prerelease : Versions de pré-release

Configuration

  • Compilation : ES2019, CommonJS, avec decorators experimentaux
  • Output : dist/index.js (main), dist/index.d.ts (types)
  • Registry : NPM privé Likewatt

Confidentialité

Ce package est privé et ne doit pas être partagé en dehors de Likewatt.