### Combined Configuration Example Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/blueprint-json.md An example showing how to include plugins and multiple seed categories in a single configuration file. ```json { "plugins": [ "https://facturascripts.com/plugins/commandpalette" ], "seed": { "customers": [ { "codcliente": "CDEMO1", "nombre": "Cliente Demo" } ], "suppliers": [ { "codproveedor": "PDEMO1", "nombre": "Proveedor Demo" } ], "products": [ { "referencia": "SKU-DEMO-001", "descripcion": "Producto demo", "precio": 19.95 } ] } } ``` -------------------------------- ### Configure Installation Base Data Source: https://context7.com/erseco/facturascripts-playground/llms.txt Sets up the core environment parameters such as company details, tax regimes, and default accounting plans, mimicking the FacturaScripts installation wizard. ```json { "install": { "codpais": "ESP", "empresa": "Mi Empresa Demo", "cifnif": "B12345678", "tipoidfiscal": "NIF", "direccion": "Calle Principal 1", "codpostal": "28001", "ciudad": "Madrid", "provincia": "Madrid", "regimeniva": "General", "codimpuesto": "IVA21", "defaultplan": true, "costpricepolicy": "average", "ventasinstock": false, "updatesupplierprices": true } } ``` -------------------------------- ### Example FacturaScripts Blueprint JSON Source: https://context7.com/erseco/facturascripts-playground/llms.txt A complete blueprint example demonstrating the installation of the CommandPalette plugin and the creation of comprehensive demo data for customers, suppliers, and products. This JSON structure defines the initial state and configuration for a FacturaScripts instance. ```json { "$schema": "./assets/blueprints/blueprint-schema.json", "meta": { "title": "FacturaScripts Playground Blueprint Sample", "author": "facturascripts-playground", "description": "Ejemplo de blueprint con plugins y datos demo." }, "debug": { "enabled": false }, "landingPage": "/AdminPlugins", "siteOptions": { "title": "FacturaScripts Playground Demo", "locale": "es_ES", "timezone": "Europe/Madrid" }, "login": { "username": "admin", "password": "admin" }, "plugins": [ "https://facturascripts.com/plugins/commandpalette" ], "seed": { "customers": [ { "codcliente": "CDEMO1", "nombre": "Cliente Demo", "cifnif": "12345678Z", "email": "cliente@example.com", "telefono1": "+34910000001", "direccion": "Calle Demo 1", "ciudad": "Madrid", "provincia": "Madrid", "codpais": "ESP" } ], "suppliers": [ { "codproveedor": "PDEMO1", "nombre": "Proveedor Demo", "cifnif": "B12345678", "email": "proveedor@example.com", "telefono1": "+34910000002" } ], "products": [ { "referencia": "SKU-DEMO-001", "descripcion": "Producto demo", "precio": 19.95, "stockfis": 25 } ] }, "install": { "codpais": "ESP", "empresa": "Empresa Demo", "cifnif": "B99999999", "ciudad": "Madrid", "regimeniva": "General", "defaultplan": true } } ``` -------------------------------- ### Install Plugins via Blueprint Source: https://context7.com/erseco/facturascripts-playground/llms.txt Shows how to specify plugins for installation within the blueprint. Supports local plugins, direct ZIP URLs, and GitHub repository links. ```json { "plugins": [ "MiPlugin", "https://facturascripts.com/plugins/commandpalette", "https://github.com/NeoRazorX/mi-plugin/tree/develop" ] } ``` -------------------------------- ### Install Remote Plugin from URL in FacturaScripts Source: https://github.com/erseco/facturascripts-playground/blob/main/README.md This JSON configuration installs a plugin directly from a remote URL. The runtime will download, install, and activate the plugin from the provided link. ```json { "plugins": [ "https://facturascripts.com/plugins/commandpalette" ] } ``` -------------------------------- ### Local Documentation Preview with MkDocs Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/development.md Sets up a Python virtual environment, installs documentation dependencies, and serves a local preview of the documentation using MkDocs. ```bash python3 -m venv .venv . .venv/bin/activate python -m pip install -r requirements-docs.txt mkdocs serve ``` -------------------------------- ### Serve Local Documentation Source: https://context7.com/erseco/facturascripts-playground/llms.txt Commands to set up a Python virtual environment, install documentation dependencies, and serve or build the MkDocs documentation locally. ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements-docs.txt mkdocs serve mkdocs build --strict ``` -------------------------------- ### Blueprint JSON Configuration Example Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/blueprint-json.md A complete example of a blueprint.json file, demonstrating various configuration options for FacturaScripts Playground. This includes meta information, debug settings, landing page, site options, login credentials, plugins, and seed data for customers, suppliers, and products. ```json { "$schema": "./assets/blueprints/blueprint-schema.json", "meta": { "title": "Demo FacturaScripts", "author": "equipo-dev", "description": "Configuracion base para pruebas locales." }, "debug": { "enabled": true }, "landingPage": "/", "siteOptions": { "title": "FacturaScripts Demo", "locale": "es_ES", "timezone": "Europe/Madrid" }, "login": { "username": "admin", "password": "admin" }, "plugins": [ "MiPlugin", "https://facturascripts.com/DownloadBuild/440/stable" ], "seed": { "customers": [ { "codcliente": "CDEMO1", "nombre": "Cliente Demo", "cifnif": "12345678Z", "email": "cliente@example.com" } ], "suppliers": [ { "codproveedor": "PDEMO1", "nombre": "Proveedor Demo", "cifnif": "B12345678" } ], "products": [ { "referencia": "SKU-DEMO-001", "descripcion": "Producto demo", "precio": 19.95 } ] } } ``` -------------------------------- ### Environment Installation Configuration Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/blueprint-json.md Configures the base installation settings for the FacturaScripts environment, such as company details and regional settings. ```json { "install": { "codpais": "ESP", "empresa": "Mi Empresa Demo", "cifnif": "B12345678", "ciudad": "Madrid", "provincia": "Madrid", "regimeniva": "General", "defaultplan": true } } ``` -------------------------------- ### POST /addons/materialize Source: https://context7.com/erseco/facturascripts-playground/llms.txt Installs plugins and applies seed data based on a provided blueprint configuration. ```APIDOC ## POST /addons/materialize ### Description Installs plugins and applies seed data from a normalized blueprint to the FacturaScripts environment. ### Method POST ### Endpoint /addons/materialize ### Parameters #### Request Body - **php** (object) - Required - The PHP instance interface. - **blueprint** (object) - Required - The normalized blueprint configuration object. - **fsRoot** (string) - Required - The root directory path for FacturaScripts. - **publish** (function) - Optional - Callback for progress and status messages. - **config** (object) - Optional - Playground configuration settings. - **manifestVersion** (string) - Optional - Version identifier for the manifest. ### Request Example { "php": "[PHPInstance]", "blueprint": "[NormalizedBlueprint]", "fsRoot": "/www/facturascripts", "manifestVersion": "1.0.0:abc123" } ### Response #### Success Response (200) - **manifestVersion** (string) - The version identifier used. - **blueprintHash** (string) - SHA256 hash of the applied blueprint. - **materializedAt** (string) - ISO timestamp of completion. - **plugins** (array) - List of installed and enabled plugins. - **seed** (object) - Summary of created/updated entities (customers, suppliers, products). #### Response Example { "manifestVersion": "1.0.0:abc123", "blueprintHash": "sha256...", "materializedAt": "2024-01-15T10:30:00.000Z", "plugins": [{"name": "CommandPalette", "installed": true, "enabled": true}], "seed": {"customers": {"created": 1, "updated": 0}} } ``` -------------------------------- ### Install Plugin from GitHub Branch or PR in FacturaScripts Source: https://github.com/erseco/facturascripts-playground/blob/main/README.md This JSON configuration allows installing plugins directly from GitHub, enabling testing of specific branches or pull requests. Replace placeholders with actual owner, repository, and branch/PR details. ```json { "plugins": [ "https://github.com///tree/", "https://github.com///pull/123" ] } ``` -------------------------------- ### Execute Local Playground with Docker Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/getting-started.md Clones the FacturaScripts playground repository and starts the local environment using Docker Compose. After execution, the playground can be accessed via a web browser at http://localhost:8085. ```bash git clone https://github.com/erseco/facturascripts-playground.git cd facturascripts-playground make up ``` -------------------------------- ### Execute Makefile Commands Source: https://context7.com/erseco/facturascripts-playground/llms.txt Provides automation commands for project maintenance, including dependency installation, server management, testing, and linting. ```bash make deps make prepare make bundle make serve make up make test make test-e2e make lint make clean ``` -------------------------------- ### Materialize Addons from Blueprint Source: https://context7.com/erseco/facturascripts-playground/llms.txt Installs plugins and applies seed data from a defined blueprint. It requires a PHP instance, blueprint configuration, and root path, returning the materialized state including plugin status and seed results. ```javascript import { materializeBlueprintAddons } from "./src/runtime/addons.js"; const state = await materializeBlueprintAddons({ php: phpInstance, blueprint: normalizedBlueprint, fsRoot: "/www/facturascripts", publish: (msg, progress) => console.log(msg), config: playgroundConfig, manifestVersion: "1.0.0:abc123" }); console.log(state); ``` -------------------------------- ### Bootstrap Runtime API (JavaScript) Source: https://context7.com/erseco/facturascripts-playground/llms.txt The `bootstrapFacturaScripts` function initializes the PHP-WASM runtime, mounts the FacturaScripts core, and executes the initial setup based on a normalized blueprint. It provides progress updates via a callback and returns the path to navigate after successful initialization. ```javascript import { bootstrapFacturaScripts } from "./src/runtime/bootstrap.js"; // Función de publicación de progreso const publish = (message, progress) => { console.log(`[${Math.round(progress * 100)}%] ${message}`); }; // Ejecutar bootstrap const result = await bootstrapFacturaScripts({ config: playgroundConfig, // Configuración de playground.config.json blueprint: normalizedBlueprint, // Blueprint normalizado clean: false, // true para limpiar estado anterior php: phpInstance, // Instancia de @php-wasm/web publish: publish, // Callback de progreso runtimeId: "php83" // ID del runtime PHP }); // Resultado: { readyPath: "/" } // readyPath es la ruta a la que navegar tras el bootstrap console.log(`FacturaScripts listo en: ${result.readyPath}`); ``` -------------------------------- ### Build FacturaScripts Bundle Script Source: https://github.com/erseco/facturascripts-playground/blob/main/README.md This shell script is responsible for building the read-only FacturaScripts bundle. It handles cloning the source code, cleaning unnecessary directories, patching extensions for WASM compatibility, and running composer and npm installations. ```bash #!/bin/bash # Default values SOURCE_REPO="https://github.com/erseco/facturascripts.git" SOURCE_BRANCH="feature/add-sqlite-support" # Clone or update source code if [ -d "facturascripts" ]; then cd facturascripts git pull origin $SOURCE_BRANCH else git clone --branch $SOURCE_BRANCH $SOURCE_REPO facturascripts cd facturascripts fi # Remove unnecessary directories rm -rf vendor/bin rm -rf tests rm -rf docs # Patch extensions for WASM compatibility (example) # sed -i 's/extension_loaded(\'json\')/true/' some_file.php # Composer install composer install --no-dev --optimize-autoloader # NPM install if package.json exists if [ -f "package.json" ]; then npm install --production fi # Generate read-only bundle (example command, actual command may vary) # php console.php build:bundle --output=../assets/facturascripts/ # Update manifest (example command) # cp manifest.json ../assets/manifests/latest.json cd .. echo "FacturaScripts bundle build process completed." ``` -------------------------------- ### Normalize Blueprint API (JavaScript) Source: https://context7.com/erseco/facturascripts-playground/llms.txt The `normalizeBlueprint` function processes and validates a raw blueprint, applying default values from the playground's configuration. It ensures consistency and completeness of the blueprint before it's used for setup. The `buildDefaultBlueprint` function creates a standard blueprint based on provided configuration. ```javascript import { normalizeBlueprint, buildDefaultBlueprint } from "./src/shared/blueprint.js"; // Configuración del playground const config = { siteTitle: "FacturaScripts Playground", locale: "es_ES", timezone: "Europe/Madrid", landingPath: "/", admin: { username: "admin", password: "admin", email: "admin@example.com" } }; // Blueprint raw del usuario const rawBlueprint = { landingPage: "/AdminPlugins", plugins: ["CommandPalette"], seed: { customers: [{ codcliente: "C001", nombre: "Cliente Test" }] } }; // Normalizar blueprint con valores por defecto const normalized = normalizeBlueprint(rawBlueprint, config); console.log(normalized); // { // $schema: "...", // meta: { title: "FacturaScripts Playground Blueprint", ... }, // debug: { enabled: false }, // landingPage: "/AdminPlugins", // siteOptions: { title: "FacturaScripts Playground", locale: "es_ES", timezone: "Europe/Madrid" }, // login: { username: "admin", password: "admin" }, // plugins: [{ name: "CommandPalette", source: { type: "bundled" }, state: "activate" }], // seed: { customers: [...], suppliers: [], products: [] }, // install: { codpais: "ESP", empresa: "Empresa Playground", ... } // } // Crear blueprint por defecto const defaultBlueprint = buildDefaultBlueprint(config); ``` -------------------------------- ### Building FacturaScripts Bundle with Environment Variables Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/development.md Demonstrates how to build the FacturaScripts bundle using a make command, specifying source repository, branch, and directories via environment variables. ```bash FS_REF=https://github.com//facturascripts.git FS_REF_BRANCH= make bundle ``` -------------------------------- ### Load Blueprints via URL and CLI Source: https://context7.com/erseco/facturascripts-playground/llms.txt Demonstrates how to load a blueprint configuration into the playground using URL parameters or by generating a base64url encoded string for direct injection. ```bash # Cargar blueprint desde archivo JSON local o remoto https://tu-playground.com/?blueprint=/ruta/al/archivo.json # Cargar blueprint codificado en base64url https://tu-playground.com/?blueprint-data=eyIkc2NoZW1hIjoiLi9hc3NldHMvYmx1ZXByaW50cy9ibHVlcHJpbnQtc2NoZW1hLmpzb24iLCJtZXRhIjp7InRpdGxlIjoiRGVtbyJ9fQ # Generar base64url desde JSON echo '{"meta":{"title":"Demo"}}' | base64 | tr '+/' '-_' | tr -d '=' ``` -------------------------------- ### POST /api/runtime/bootstrap Source: https://context7.com/erseco/facturascripts-playground/llms.txt Initializes the PHP-WASM runtime and mounts the FacturaScripts core using a normalized blueprint. ```APIDOC ## POST /api/runtime/bootstrap ### Description Bootstraps the FacturaScripts environment by configuring the PHP-WASM instance and applying the provided blueprint settings. ### Method POST ### Endpoint /api/runtime/bootstrap ### Parameters #### Request Body - **config** (object) - Required - Playground configuration. - **blueprint** (object) - Required - The normalized blueprint. - **clean** (boolean) - Optional - Whether to clear previous state. - **runtimeId** (string) - Required - The target PHP runtime identifier. ### Request Example { "config": { "siteTitle": "Demo" }, "blueprint": { "install": { "empresa": "Demo" } }, "clean": false, "runtimeId": "php83" } ### Response #### Success Response (200) - **readyPath** (string) - The URL path to navigate to after successful initialization. #### Response Example { "readyPath": "/" } ``` -------------------------------- ### Local Documentation Build with MkDocs Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/development.md Builds the project documentation locally using MkDocs with the --strict flag to enforce documentation standards and catch errors. ```bash mkdocs build --strict ``` -------------------------------- ### Configure Custom Build Environment Source: https://context7.com/erseco/facturascripts-playground/llms.txt Demonstrates how to override default build parameters using environment variables for custom forks, branches, or server ports. ```bash FS_REF=https://github.com/mi-org/facturascripts.git FS_REF_BRANCH=mi-rama make bundle PORT=9090 make serve FS_REF=https://github.com/mi-org/facturascripts.git \ FS_REF_BRANCH=feature-nueva \ PORT=3000 \ make up ``` -------------------------------- ### Seed Demo Products Source: https://context7.com/erseco/facturascripts-playground/llms.txt Defines the structure for product management using the referencia key. Supports configuration for pricing, stock levels, and tax settings. ```json { "seed": { "products": [ { "referencia": "SKU-DEMO-001", "descripcion": "Producto demo básico", "precio": 19.95, "stockfis": 25, "codfamilia": "GENERAL", "codimpuesto": "IVA21", "sevende": true, "secompra": true }, { "referencia": "SKU-DEMO-002", "descripcion": "Producto premium", "precio": 99.00, "stockfis": 10, "ventasinstock": false } ] } } ``` -------------------------------- ### Development Commands for FacturaScripts Playground Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/development.md A collection of make commands used for managing dependencies, preparing the project, bundling, testing, linting, and serving the FacturaScripts Playground. ```bash make deps make prepare make bundle make test make test-e2e make lint make serve ``` -------------------------------- ### Define Blueprint Configuration Source: https://context7.com/erseco/facturascripts-playground/llms.txt A blueprint describes the initial state of the ERP, including site options, credentials, and initial data seeding. It acts as a portable configuration file for the playground. ```json { "$schema": "./assets/blueprints/blueprint-schema.json", "meta": { "title": "Demo FacturaScripts", "author": "equipo-dev", "description": "Configuración base para pruebas locales." }, "debug": { "enabled": true }, "landingPage": "/", "siteOptions": { "title": "FacturaScripts Demo", "locale": "es_ES", "timezone": "Europe/Madrid" }, "login": { "username": "admin", "password": "admin" }, "plugins": [], "seed": { "customers": [], "suppliers": [], "products": [] }, "install": { "codpais": "ESP", "empresa": "Empresa Playground", "cifnif": "00000014Z", "regimeniva": "General", "defaultplan": true } } ``` -------------------------------- ### Configure Global Playground Settings Source: https://context7.com/erseco/facturascripts-playground/llms.txt Defines the global configuration for the playground instance, including bundle versions, runtime selection, and network permissions. This JSON file is essential for initializing the environment. ```json { "bundleVersion": "2026-build202603271102", "defaultBlueprintUrl": "./assets/blueprints/default.blueprint.json", "addonProxyPath": "/__addon_proxy__", "addonProxyUrl": "https://zip-proxy.erseco.workers.dev/", "outboundHttp": { "allowedHosts": [ "github.com", "codeload.github.com", "objects.githubusercontent.com", "facturascripts.com" ] }, "siteTitle": "FacturaScripts Playground", "landingPath": "/", "locale": "es_ES", "timezone": "Europe/Madrid", "autologin": true, "resetOnVersionMismatch": true, "admin": { "username": "admin", "password": "admin", "email": "admin@example.com" }, "runtimes": [ { "id": "php81", "label": "PHP 8.1", "phpVersion": "8.1", "default": false }, { "id": "php82", "label": "PHP 8.2", "phpVersion": "8.2", "default": false }, { "id": "php83", "label": "PHP 8.3", "phpVersion": "8.3", "default": true }, { "id": "php84", "label": "PHP 8.4", "phpVersion": "8.4", "default": false } ] } ``` -------------------------------- ### Create Idempotent Demo Data with Seed in FacturaScripts Source: https://github.com/erseco/facturascripts-playground/blob/main/README.md This JSON configuration uses the 'seed' property to create or update demo data for customers, suppliers, and products. This ensures data can be reloaded without creating duplicates. ```json { "seed": { "customers": [ { "codcliente": "CDEMO1", "nombre": "Cliente Demo" } ], "suppliers": [ { "codproveedor": "PDEMO1", "nombre": "Proveedor Demo" } ], "products": [ { "referencia": "SKU-DEMO-001", "descripcion": "Producto demo", "precio": 19.95 } ] } } ``` -------------------------------- ### Seed Demo Customers Source: https://context7.com/erseco/facturascripts-playground/llms.txt Defines the structure for creating or updating customers idempotently using the codcliente key. This JSON configuration allows for bulk insertion of customer contact and location details. ```json { "seed": { "customers": [ { "codcliente": "CDEMO1", "nombre": "Cliente Demo", "razonsocial": "Cliente Demo S.L.", "cifnif": "12345678Z", "email": "cliente@example.com", "telefono1": "+34910000001", "direccion": "Calle Demo 1", "codpostal": "28001", "ciudad": "Madrid", "provincia": "Madrid", "codpais": "ESP" }, { "codcliente": "CDEMO2", "nombre": "Segundo Cliente", "cifnif": "87654321A", "email": "cliente2@example.com" } ] } } ``` -------------------------------- ### Activate Plugin in FacturaScripts Playground Source: https://github.com/erseco/facturascripts-playground/blob/main/README.md This JSON configuration activates a plugin that is already present in the FacturaScripts runtime. It's a straightforward way to enable existing extensions. ```json { "plugins": [ "MiPlugin" ] } ``` -------------------------------- ### POST /api/blueprint/normalize Source: https://context7.com/erseco/facturascripts-playground/llms.txt Normalizes a raw blueprint object by applying default configuration values from the playground environment. ```APIDOC ## POST /api/blueprint/normalize ### Description Processes a raw user-provided blueprint and merges it with the playground's default configuration to ensure all required fields are present. ### Method POST ### Endpoint /api/blueprint/normalize ### Parameters #### Request Body - **rawBlueprint** (object) - Required - The partial blueprint provided by the user. - **config** (object) - Required - The playground environment configuration. ### Request Example { "rawBlueprint": { "landingPage": "/AdminPlugins", "plugins": ["CommandPalette"] }, "config": { "siteTitle": "FacturaScripts Playground", "locale": "es_ES" } } ### Response #### Success Response (200) - **normalized** (object) - The complete, validated blueprint object. #### Response Example { "$schema": "./assets/blueprints/blueprint-schema.json", "meta": { "title": "FacturaScripts Playground Blueprint" }, "siteOptions": { "title": "FacturaScripts Playground", "locale": "es_ES" } } ``` -------------------------------- ### Validate Blueprint and Runtime Syntax Source: https://context7.com/erseco/facturascripts-playground/llms.txt Validates blueprint JSON structure against a schema using ajv-cli and performs syntax checks on critical runtime files using Node.js. ```bash node --check src/shared/blueprint.js npx ajv validate -s assets/blueprints/blueprint-schema.json -d mi-blueprint.json node --check src/runtime/bootstrap.js node --check src/runtime/addons.js node --check sw.js node --check php-worker.js ``` -------------------------------- ### Rebuild Project Bundle Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/getting-started.md Rebuilds the FacturaScripts project bundle. Allows specifying a custom Git repository and branch for the FacturaScripts core using environment variables FS_REF and FS_REF_BRANCH. ```bash make bundle ``` ```bash FS_REF=https://github.com//facturascripts.git FS_REF_BRANCH= make bundle ``` -------------------------------- ### POST /blueprint/validate Source: https://context7.com/erseco/facturascripts-playground/llms.txt Validates a blueprint configuration file against the project's JSON schema. ```APIDOC ## POST /blueprint/validate ### Description Validates a provided blueprint JSON file against the official blueprint-schema.json to ensure structural integrity. ### Method POST ### Endpoint /blueprint/validate ### Parameters #### Request Body - **blueprint** (file/json) - Required - The blueprint file to validate. ### Request Example { "blueprint": "mi-blueprint.json" } ### Response #### Success Response (200) - **status** (string) - Validation result status. - **errors** (array) - List of validation errors if any. ``` -------------------------------- ### Define Product Seed Data Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/blueprint-json.md Defines the JSON structure for seeding product records. The 'referencia' field is mandatory. ```json { "seed": { "products": [ { "referencia": "SKU-DEMO-001", "descripcion": "Producto demo", "precio": 19.95, "stockfis": 25 } ] } } ``` -------------------------------- ### Syntax Checking with Node.js Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/development.md Utilizes the Node.js --check flag to verify the JavaScript syntax of various project files, ensuring code integrity before execution. ```javascript node --check src/shell/main.js node --check sw.js node --check php-worker.js node --check src/runtime/bootstrap.js node --check src/runtime/addons.js node --check src/runtime/crash-recovery.js node --check src/runtime/manifest.js node --check src/runtime/networking.js node --check src/runtime/php-compat.js node --check src/runtime/php-loader.js node --check src/runtime/wizard-script.js node --check src/runtime/vfs.js node --check src/shared/blueprint.js node --check src/shared/config.js node --check src/shared/paths.js node --check src/shared/storage.js ``` -------------------------------- ### Seed Demo Suppliers Source: https://context7.com/erseco/facturascripts-playground/llms.txt Defines the structure for creating or updating suppliers using the codproveedor key. It includes fields for legal name, tax identification, and contact information. ```json { "seed": { "suppliers": [ { "codproveedor": "PDEMO1", "nombre": "Proveedor Demo", "razonsocial": "Proveedor Demo S.A.", "cifnif": "B12345678", "email": "proveedor@example.com", "telefono1": "+34910000002", "direccion": "Avenida Industrial 50", "ciudad": "Barcelona", "provincia": "Barcelona", "codpais": "ESP" } ] } } ``` -------------------------------- ### End-to-End Testing with Playwright Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/development.md Executes end-to-end tests using Playwright against a locally running instance of FacturaScripts, verifying UI interactions and basic persistence. ```bash make up make test-e2e ``` -------------------------------- ### Validate JavaScript and MkDocs Build Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/getting-started.md Performs validation checks on key JavaScript files within the project using Node.js and builds the MkDocs documentation in strict mode to catch errors. This helps ensure code quality and documentation integrity. ```bash node --check src/shell/main.js node --check src/runtime/bootstrap.js node --check src/runtime/vfs.js node --check sw.js node --check php-worker.js mkdocs build --strict ``` -------------------------------- ### Validate JavaScript Syntax for Core Modules Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/blueprint-json.md Use the Node.js check flag to verify the syntax of critical runtime and shared modules. This ensures that the JavaScript files are free of syntax errors before deployment or execution. ```bash node --check src/shared/blueprint.js node --check src/runtime/bootstrap.js node --check src/runtime/addons.js ``` -------------------------------- ### Define Supplier Seed Data Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/blueprint-json.md Defines the JSON structure for seeding supplier records. The 'codproveedor' field is mandatory. ```json { "seed": { "suppliers": [ { "codproveedor": "PDEMO1", "nombre": "Proveedor Demo", "cifnif": "B12345678", "email": "proveedor@example.com" } ] } } ``` -------------------------------- ### Define Customer Seed Data Source: https://github.com/erseco/facturascripts-playground/blob/main/docs/blueprint-json.md Defines the JSON structure for seeding customer records. The 'codcliente' field is mandatory for identifying records. ```json { "seed": { "customers": [ { "codcliente": "CDEMO1", "nombre": "Cliente Demo", "cifnif": "12345678Z", "email": "cliente@example.com", "telefono1": "+34910000001", "direccion": "Calle Demo 1", "ciudad": "Madrid", "provincia": "Madrid", "codpais": "ESP" } ] } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.