vapor-chamber API reference - v1.3.0
    Preparing search index...

    Function unsealBus

    vapor-chamber — Lightweight command bus for Vue Vapor

    Architecture: CORE (zero dependencies, framework-agnostic): command-bus — dispatch, register, plugins, hooks, wildcard, request/respond testing — createTestBus, snapshot, time-travel

    OPTIONAL (tree-shaken when unused): plugins — logger, validator, history, debounce, throttle, authGuard, optimistic plugins-io — retry, persist, sync chamber — Vue composables: useCommand, useCommandBus, useCommandGroup, … chamber-vapor — Vue 3.6+ Vapor-specific API (requires Vue 3.6) http — postCommand, createHttpClient, CSRF token reading transports — createHttpBridge, createWsBridge, createSseBridge form — createFormBus, reactive form state schema — LLM tool-use layer, synthesize, toTools devtools — @vue/devtools-api integration (requires @vue/devtools-api) transitions — hook → bus dispatch bridge ssr — SSR dehydrate/rehydrate plugin directives — v-command Vue directive (requires Vue) vite — HMR plugin (requires Vite, see 'vapor-chamber/vite') iife — UMD/IIFE bundle (see 'vapor-chamber/iife')

    Sub-path exports that avoid pulling in optional code: 'vapor-chamber/transports' — HTTP + WS + SSE bridges 'vapor-chamber/transitions' — hook → bus dispatch 'vapor-chamber/ssr' — SSR dehydrate/rehydrate 'vapor-chamber/directives' — v-command directive 'vapor-chamber/vite' — Vite HMR plugin 'vapor-chamber/iife' — IIFE bundle (full) 'vapor-chamber/iife-core' — IIFE bundle (no Vapor custom-element, no Suspense paths) 'vapor-chamber/iife-elements' — IIFE bundle (core + Vapor custom-element)

    Changelog: v0.3.0 — Naming convention, wildcard listeners, request/response, authGuard, optimistic v0.4.0 — Vue 3.6 Vapor alignment, defineVaporCommand, onScopeDispose v0.4.1 — useCommandGroup, useCommandError v0.4.2 — Transport layer, retry/persist/sync plugins v0.4.3 — createTestBus snapshot/time-travel v0.5.0 — camelCase naming, HTTP client, CDCC splits, createFormBus, schema/LLM layer v0.6.0 — onBefore, once, offAll, BaseBus, commandKey; BatchResult successCount/failCount; form async validation (isValidating, isBusy); HttpError.code; noRetry; WS maxQueueSize; LlmAdapter; 419≠401 fix; CSRF refresh error propagation; WS queue expiry on reconnect; async request dedup; directive dispatch timeout; signal detection sync probe (globalThis.VUE); waitForVueDetection(); passthroughHandlers fix in TestBus; Vue >=3.6.0-beta.1 peer dep; useVaporCommand() composable; Vapor directive compat warning; tryAutoCleanup dev warning; Vite HMR .vapor.vue support; FormBus reactive:false headless mode; HttpBridge scopeController; WsBridge reactive connected signal v1.1.0 — Vue 3.6.0-beta.10 alignment: defineVaporCustomElement, defineVaporComponent, defineVaporAsyncComponent wrappers; useVaporAsyncCommand for Suspense-aware async dispatch; createTransitionBridge + useTransitionCommand; persist validate option; improved Vapor/VDOM interop awareness; HMR vapor↔vdom switch v1.2.0 — Vue 3.6.0-beta.11 alignment: peerDep bumped; defineVaporComponent JSDoc documents generics (#14770) + emits-vs-attrs split; build pipeline migrated from custom esbuild script to Vite programmatic API (scripts/build.mjs); IIFE split into three sized variants (full / core / elements) mirroring Vue's tree-shake axes; tsc now emits types only (emitDeclarationOnly) v1.0.0 — bus.query() CQRS read-only dispatch; bus.emit() domain events; Command.meta auto-stamped metadata (ts, id, correlationId, causationId); bus.registeredActions() introspection; TestBus.onBefore fires for real; TestBus.query/emit/registeredActions parity

    • Unseal a sealed bus. Dev/HMR only — if your production code never imports unsealBus, it gets tree-shaken out entirely, making seal() irreversible.

      Parameters

      Returns void

      // vite-hmr.ts
      import { unsealBus } from 'vapor-chamber';
      if (import.meta.hot) {
      unsealBus(bus);
      bus.clear();
      // re-register handlers...
      bus.seal();
      }