{"id":37494156,"url":"https://github.com/morganzwest/hsemulator","last_synced_at":"2026-01-27T13:08:26.039Z","repository":{"id":332114876,"uuid":"1126227328","full_name":"morganzwest/hsemulator","owner":"morganzwest","description":"Local test runner for HubSpot Workflow Custom Code Actions (JS \u0026 Python) with fixtures, assertions, snapshots, and execution budgets.","archived":false,"fork":false,"pushed_at":"2026-01-21T00:33:37.000Z","size":172,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T11:29:52.119Z","etag":null,"topics":["cli","hubspot","internal-tool"],"latest_commit_sha":null,"homepage":"https://hsemulator.readthedocs.io/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/morganzwest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-01T12:42:00.000Z","updated_at":"2026-01-21T00:31:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/morganzwest/hsemulator","commit_stats":null,"previous_names":["morganzwest/local-hubspot-emulator"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/morganzwest/hsemulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morganzwest%2Fhsemulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morganzwest%2Fhsemulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morganzwest%2Fhsemulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morganzwest%2Fhsemulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morganzwest","download_url":"https://codeload.github.com/morganzwest/hsemulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morganzwest%2Fhsemulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28813268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","hubspot","internal-tool"],"created_at":"2026-01-16T07:42:17.148Z","updated_at":"2026-01-27T13:08:26.033Z","avatar_url":"https://github.com/morganzwest.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HubSpot Emulator (hsemulator)\n\n**hsemulator** is a local test runner and execution engine for **HubSpot Workflow Custom Code Actions**.\n\nIt allows you to run the *exact JavaScript or Python code* you paste into HubSpot locally, using real workflow event payloads, with support for assertions, snapshots, execution budgets, and flaky-run detection.\n\nThe goal is to make developing HubSpot custom code feel closer to Lambda-style local development—without relying on the HubSpot UI for iteration.\n\n---\n\n## Why hsemulator exists\n\nDeveloping HubSpot custom code today typically means:\n\n* Writing code in an editor\n* Copying it into the HubSpot UI\n* Triggering a workflow\n* Reading logs in a browser\n* Repeating\n\nhsemulator replaces that loop with a local, deterministic workflow:\n\n* Code stays in your editor\n* Events are fixtures\n* Failures are explicit\n* Regressions are caught automatically\n\nNo UI-driven iteration required.\n\n---\n\n## When to use it\n\nUse hsemulator when you want to:\n\n* Develop and debug HubSpot custom code locally\n* Validate logic using real workflow event payloads\n* Catch regressions with assertions and snapshots\n* Enforce execution limits during development or CI\n* Reduce copy–paste cycles into the HubSpot UI\n\nDo **not** use it to:\n\n* Fully emulate HubSpot’s runtime or infrastructure\n* Mock HubSpot APIs or rate limits\n* Replace integration or end-to-end tests\n\n---\n\n## Core capabilities\n\n* Local execution of JS and Python custom code actions\n* Fixture-based event input\n* Assertions against output and metadata\n* Snapshot testing for regression detection\n* Execution budgets (time and memory)\n* Flaky-run detection via repeat execution\n* Structured execution summaries and events\n* CI-friendly, machine-readable output\n\n---\n\n## Engine-first architecture (new)\n\nAs of **v0.4.0**, hsemulator is built around a **standalone execution engine**.\n\nAll execution behaviour—validation, lifecycle management, event emission, and result generation—lives in a single engine layer. Interfaces such as the CLI or HTTP runtime simply invoke the engine and interpret its outputs.\n\nThis means:\n\n* The CLI is now *one* way to communicate with the engine\n* Execution behaviour is consistent across all entry points\n* New interfaces can be added without rewriting execution logic\n\nThis architecture allows hsemulator to grow beyond a CLI-only tool while preserving deterministic, testable execution.\n\n---\n\n## HTTP runtime (optional)\n\nIn addition to the CLI, hsemulator now includes an **HTTP runtime**.\n\nThis allows executions to be triggered via API endpoints (e.g. `/execute`, `/validate`) while using the same underlying engine as the CLI.\n\nThe HTTP runtime is optional and intended for:\n\n* remote execution\n* service-based workflows\n* future integrations and automation\n\nThe CLI remains the primary developer interface.\n\n---\n\n## Documentation\n\n📖 **Full documentation is available on Read the Docs:**\n\n👉 [Read our Documentation](https://hsemulator.readthedocs.io/)\n\nStart here if you want:\n\n* Installation instructions\n* Project structure\n* Configuration reference\n* Assertions, snapshots, budgets, and CI usage\n\n---\n\n## Developer notes (Rust / Cargo)\n\nhsemulator is written in **Rust** and distributed as a standalone binary.\n\n### Building locally\n\n```bash\ncargo build\n```\n\n### Running from source\n\n```bash\ncargo run -- run\n```\n\n### Release builds\n\n```bash\ncargo build --release\n```\n\nThe release binary is what gets packaged into the installer.\nEnd users do **not** need Rust or Cargo installed.\n\n---\n\n## High-level architecture\n\nAt a high level, hsemulator works like this:\n\n```\nfixture.json\n     │\n     ▼\nexecution engine\n     │\n     ▼\nruntime shim (Node / Python)\n     │\n     ▼\nyour HubSpot custom code\n     │\n     ▼\nstructured output + events\n     │\n     ├─ assertions\n     ├─ budgets\n     └─ snapshots\n```\n\nEach run is isolated, deterministic, and fully observable.\n\n---\n\n## Contributing / feedback\n\nIssues, bug reports, and feature requests are welcome:\n\n👉 [https://github.com/morganzwest/hsemulator/issues](https://github.com/morganzwest/hsemulator/issues)\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorganzwest%2Fhsemulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorganzwest%2Fhsemulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorganzwest%2Fhsemulator/lists"}