src/transport.ts has the Publisher interface, MqttPublisher (the client the bridge has at the time) and MemoryPublisher (tests without a broker); src/topics.ts names the four topics the library publishes to. Device, AlexaStatusMessage, AlexaErrorResponse and sendSceneResponse shared three copies of the publish-and-report code: they now call one send() that resolves the topic or "" and never rejects. registerDevice() and addDevice() work before connect(); a send() without a connection resolves "" and the "error" event says to call connect(). unregisterDevice() and clearDevices() take the publisher from the device. Device.setMqttClient() is gone, the first constructor argument of Device is ignored, and the message classes take a Publisher where they took the client. Tests: 108 -> 113. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
24 lines
2.3 KiB
TypeScript
24 lines
2.3 KiB
TypeScript
export { default as Alex2MQTT, DEFAULT_HOST } from "./Alex2Node.js";
|
|
export type { Alex2MQTTOptions } from "./Alex2Node.js";
|
|
export { default as Device } from "./device/Device.js";
|
|
export type { EndpointDefinition, EndpointJson } from "./device/Device.js";
|
|
export { Capability } from "./device/Capability.js";
|
|
export type { CapabilityJson, CommonOptions, Declaration } from "./device/Capability.js";
|
|
export { registry, DeclarationError, SchemaError } from "./registry/index.js";
|
|
export { Alexa, BrightnessController, ModeController, RangeController, TemperatureSensor, ToggleController, } from "./registry/index.js";
|
|
export { PowerController, EndpointHealth } from "./compat/enums.js";
|
|
export { asset, text, semantics, SemanticsBuilder } from "./registry/index.js";
|
|
export { ASSETS as Assets, UNITS_OF_MEASURE as Units, ACTIONS as Actions, STATES as States, DISPLAY_CATEGORIES as DisplayCategories, } from "./registry/index.js";
|
|
export type { ActionId, AssetId, DisplayCategoryName, StateId, UnitOfMeasure, ActionsToDirective, AnyDescriptor, CapabilityExtras, Declared, DirectiveDescriptor, EndpointView, EventDescriptor, InterfaceDescriptor, Label, PropertyDescriptor, Semantics, StatesToRange, StatesToValue, ActionName, StateName, Mode, Infer, Schema, Temperature, TimeInterval, } from "./registry/index.js";
|
|
export * as messages from "./messages/index.js";
|
|
export { AlexaError, AlexaErrors, MessageError, StateBuilder, property } from "./messages/index.js";
|
|
export type { ChangeCause, ChangeReportMessage, DeferredResponseMessage, ErrorResponseMessage, Header, ProactiveEventMessage, Property, PropertyOptions, ResponseMessage, SceneEventMessage, } from "./messages/index.js";
|
|
export * as topics from "./topics.js";
|
|
export { MemoryPublisher } from "./transport.js";
|
|
export type { Publisher, PublishResult } from "./transport.js";
|
|
export { AlexaInterface } from "./compat/AlexaInterface.js";
|
|
export type { SupportedMode } from "./compat/AlexaInterface.js";
|
|
export { ActionMapping } from "./compat/ActionMapping.js";
|
|
export { AlexaActions, AlexaErrorType, AlexaInterfaceType, DisplayCategory, PowerState, TemperatureSensorScale, ThermostatMode, } from "./compat/enums.js";
|
|
export { AlexaStatusMessage } from "./compat/AlexaStatusMessage.js";
|
|
export { AlexaErrorResponse } from "./compat/AlexaErrorResponse.js";
|