JSPM

bizzoptima-cli

0.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 221
    • Score
      100M100P100Q59155F
    • License MIT

    CLI officiel pour les développeurs de modules BizzOptima

    Package Exports

    • bizzoptima-cli
    • bizzoptima-cli/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bizzoptima-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    bizzoptima-cli

    CLI officiel pour les développeurs de modules BizzOptima.

    Installation

    npm install -g bizzoptima-cli

    Ou utilisez directement via npx :

    npx bizzoptima <commande>

    Configuration

    Par défaut, le CLI pointe vers l'API de production. Pour utiliser une autre URL :

    export BIZZOPTIMA_API_URL=http://localhost:4000

    Ou créez ~/.bizzoptima/config.json :

    {
      "apiUrl": "http://localhost:4000"
    }

    Commandes

    bizzoptima login

    Se connecter à votre compte développeur BizzOptima.

    bizzoptima login
    # Email : dev@example.com
    # Mot de passe : ••••••••
    # Connecté avec succès !

    Le token JWT est stocké dans ~/.bizzoptima/credentials.json.


    bizzoptima logout

    Supprimer la session locale.

    bizzoptima logout
    # Déconnecté (dev@example.com).

    bizzoptima whoami

    Afficher le profil du développeur connecté.

    bizzoptima whoami
    # Profil développeur BizzOptima
    # ─────────────────────────────────────
    #   Nom       : Alice Dupont
    #   Email     : dev@example.com
    #   Société   : Acme Corp
    #   Plan      : free
    #   Statut    : active
    #   Inscrit   : 01/06/2026

    bizzoptima init <module-id>

    Créer un nouveau module dans un dossier <module-id>/.

    bizzoptima init my-inventory-module

    Structure générée :

    my-inventory-module/
      src/
        index.tsx          ← composant React principal
      manifest.json        ← métadonnées du module
      package.json
      tsconfig.json
      .bizzmodignore       ← fichiers exclus du zip

    manifest.json généré :

    {
      "id": "my-inventory-module",
      "name": "Mon Module",
      "version": "1.0.0",
      "description": "",
      "author": "",
      "minAppVersion": "0.3.0",
      "permissions": [],
      "entryPoint": "dist/index.js"
    }

    bizzoptima build

    Compiler le module TypeScript et créer le fichier .bizzmod.

    Doit être lancé depuis le dossier racine du module (là où se trouve manifest.json).

    cd my-inventory-module
    npm install
    bizzoptima build

    Sortie :

    Compilation du module my-inventory-module v1.0.0
    
      TypeScript compilé → dist/
      my-inventory-module-1.0.0.bizzmod créé (42.3 kB)
    
      Fichiers inclus (8) :
        manifest.json
        dist/index.js
        dist/index.d.ts
        package.json
        tsconfig.json

    bizzoptima sign

    Signer le .bizzmod avec la clé Ed25519 BizzOptima via l'API.

    Requiert d'être connecté (bizzoptima login).

    bizzoptima sign

    Le backend valide le manifest.json contenu dans le zip, signe le bundle avec la clé privée Ed25519 et retourne le fichier .bizzmod signé. Le fichier local est remplacé par la version signée.

    Signature de my-inventory-module-1.0.0.bizzmod
    
      Module signé avec succès !
    
      Fichier      : my-inventory-module-1.0.0.bizzmod
      Hash SHA256  : a3f8b2c1d4e5...
      Signature    : MEUCIQDx8...

    bizzoptima publish

    Publier le .bizzmod signé dans le marketplace BizzOptima.

    Requiert d'être connecté (bizzoptima login).

    bizzoptima publish
    Publication de My Inventory Module v1.0.0
    
      Module publié avec succès !
    
      Module  : my-inventory-module v1.0.0
      Publié  : 27/06/2026 14:32:10
      URL     : https://bizzoptima.com/modules/my-inventory-module

    Workflow complet

    # 1. Créer un compte développeur sur bizzoptima.com (ou via l'API)
    # 2. Se connecter
    bizzoptima login
    
    # 3. Initialiser un nouveau module
    bizzoptima init mon-module
    cd mon-module
    
    # 4. Éditer src/index.tsx et manifest.json selon vos besoins
    npm install
    
    # 5. Compiler
    bizzoptima build
    
    # 6. Signer (requiert un compte actif)
    bizzoptima sign
    
    # 7. Publier
    bizzoptima publish

    Structure du .bizzmod

    Un fichier .bizzmod est un ZIP standard contenant :

    Fichier Description
    manifest.json Métadonnées du module (id, version, entryPoint…)
    dist/index.js Bundle JavaScript compilé (point d'entrée)
    signature.json Signature Ed25519 injectée lors de bizzoptima sign

    Variables d'environnement

    Variable Description Défaut
    BIZZOPTIMA_API_URL URL de l'API BizzOptima https://bizzoptimabackend.web.app

    Fichier .bizzmodignore

    Similaire à .gitignore — liste les fichiers/dossiers à exclure du .bizzmod :

    # Exclusions par défaut (toujours appliquées)
    node_modules
    .git
    src
    .bizzmodignore
    
    # Ajoutez vos exclusions ici
    *.test.ts
    coverage
    .env

    Enregistrement d'un compte développeur

    curl -X POST https://bizzoptimabackend.web.app/api/v1/developers/auth/register \
      -H "Content-Type: application/json" \
      -d '{
        "email": "dev@example.com",
        "password": "motdepasse123",
        "name": "Alice Dupont",
        "company": "Acme Corp"
      }'

    Les nouveaux comptes ont le statut pending. Contactez support@bizzoptima.com pour l'activation.