@camstack/addon-provider-bosch 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.31] - 2026-10-28
11
+
12
+ ### Changed
13
+
14
+ - The Home Connect and HomeCom sign-in pages open under the shared vendor-login path
15
+
10
16
  ## [0.1.30] - 2026-10-27
11
17
 
12
18
  ### Changed
@@ -1,4 +1,4 @@
1
- import { D as errMsg } from "./dist-DBUnIovD.mjs";
1
+ import { O as errMsg } from "./dist-DxO4cucS.mjs";
2
2
  import { randomBytes } from "node:crypto";
3
3
  //#region src/shared/oauth-callback.ts
4
4
  /** A code on its own: no scheme, no query, no separators. */
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BioIJ3NA.js");
1
+ const require_dist = require("./dist-NdDwxHvT.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  //#region src/shared/oauth-callback.ts
4
4
  /** A code on its own: no scheme, no query, no separators. */
@@ -90420,6 +90420,17 @@ function ingestReading(input) {
90420
90420
  };
90421
90421
  }
90422
90422
  /**
90423
+ * The data-plane prefix every `VendorLoginProxy` is served under
90424
+ * (`/addon/<addonId>/vendor-login/<attemptId>/<vendorHost>/…`).
90425
+ *
90426
+ * The hub consults an addon's data-plane prefixes BEFORE its HTTP routes, so a
90427
+ * prefix equal to the first segment of a route the addon serves swallows that
90428
+ * route. A sign-in addon serves `/login/start|status|commit|cancel`; the proxy
90429
+ * therefore lives on a segment no addon route uses. One constant, so the entry
90430
+ * path, the mount and the docs cannot drift apart.
90431
+ */
90432
+ var VENDOR_LOGIN_PROXY_PREFIX = "vendor-login";
90433
+ /**
90423
90434
  * Where an OAuth round-trip ends: the admin-ui completion route
90424
90435
  * (`/sso-complete`, the page every popup sign-in already lands on), with the
90425
90436
  * OUTCOME in the URL fragment.
@@ -90661,19 +90672,17 @@ function sendPlain(res, status, text) {
90661
90672
  }
90662
90673
  var VendorLoginProxy = class {
90663
90674
  #addonId;
90664
- #prefix;
90665
90675
  #logger;
90666
90676
  #now;
90667
90677
  #fetch;
90668
90678
  #attempts = /* @__PURE__ */ new Map();
90669
90679
  constructor(options) {
90670
90680
  this.#addonId = options.addonId;
90671
- this.#prefix = options.prefix;
90672
90681
  this.#logger = options.logger;
90673
90682
  this.#now = options.now ?? (() => Date.now());
90674
90683
  this.#fetch = options.fetchFn ?? globalThis.fetch.bind(globalThis);
90675
90684
  }
90676
- /** The `DataPlaneHandler` to pass to `ctx.dataPlane.serve({ prefix, access: 'admin', … })`. */
90685
+ /** The `DataPlaneHandler` to pass to `ctx.dataPlane.serve({ prefix: VENDOR_LOGIN_PROXY_PREFIX, access: 'admin', … })`. */
90677
90686
  handler = (req, res) => this.#handle(req, res);
90678
90687
  /** Register an attempt. A one-shot capability: refused hosts are rejected up front. */
90679
90688
  open(spec) {
@@ -90710,11 +90719,11 @@ var VendorLoginProxy = class {
90710
90719
  basePath: "",
90711
90720
  upstreams: attempt.upstreams
90712
90721
  }, url.host) === void 0) return null;
90713
- return `/addon/${this.#addonId}/${this.#prefix}/${attemptId}/${url.host}${url.pathname}${url.search}`;
90722
+ return `/addon/${this.#addonId}/${VENDOR_LOGIN_PROXY_PREFIX}/${attemptId}/${url.host}${url.pathname}${url.search}`;
90714
90723
  }
90715
90724
  #routeFor(attemptId, attempt, forwardedPrefix) {
90716
90725
  return {
90717
- basePath: `${forwardedPrefix}/addon/${this.#addonId}/${this.#prefix}/${attemptId}`,
90726
+ basePath: `${forwardedPrefix}/addon/${this.#addonId}/${VENDOR_LOGIN_PROXY_PREFIX}/${attemptId}`,
90718
90727
  upstreams: attempt.upstreams
90719
90728
  };
90720
90729
  }
@@ -90864,4 +90873,4 @@ var VendorLoginProxy = class {
90864
90873
  var MB = 1024 * 1024;
90865
90874
  1024 * MB, 3072 * MB;
90866
90875
  //#endregion
90867
- export { defineCustomActions as A, string as B, temperatureSensorCapability as C, errMsg as D, DeviceType as E, boolean as F, unknown as H, literal as I, number as L, isSecretMarkerLike as M, _enum as N, createEvent as O, array as P, object as R, switchCapability as S, DeviceRole as T, EventCategory as U, union as V, numericSensorCapability as _, VendorLoginProxy as a, runningFromDishwasherOperation as b, climateControlCapability as c, deviceAdoptionCapability as d, dishwasherCapability as f, ingestReading as g, heatingValveCapability as h, RUNNING_STATE_COLD as i, isSecretMarker as j, customAction as k, connectionTestCapability as l, eventEmitterCapability as m, BaseDeviceProvider as n, batteryCapability as o, enumSensorCapability as p, DishwasherOperationStateSchema as r, binaryCapability as s, BaseDevice as t, consumablesCapability as u, powerMeterCapability as v, waterHeaterCapability as w, runningStateCapability as x, quantityFromUnit as y, record as z };
90876
+ export { customAction as A, record as B, switchCapability as C, DeviceType as D, DeviceRole as E, array as F, union as H, boolean as I, literal as L, isSecretMarker as M, isSecretMarkerLike as N, errMsg as O, _enum as P, number as R, runningStateCapability as S, waterHeaterCapability as T, unknown as U, string as V, EventCategory as W, ingestReading as _, VENDOR_LOGIN_PROXY_PREFIX as a, quantityFromUnit as b, binaryCapability as c, consumablesCapability as d, deviceAdoptionCapability as f, heatingValveCapability as g, eventEmitterCapability as h, RUNNING_STATE_COLD as i, defineCustomActions as j, createEvent as k, climateControlCapability as l, enumSensorCapability as m, BaseDeviceProvider as n, VendorLoginProxy as o, dishwasherCapability as p, DishwasherOperationStateSchema as r, batteryCapability as s, BaseDevice as t, connectionTestCapability as u, numericSensorCapability as v, temperatureSensorCapability as w, runningFromDishwasherOperation as x, powerMeterCapability as y, object as z };
@@ -90420,6 +90420,17 @@ function ingestReading(input) {
90420
90420
  };
90421
90421
  }
90422
90422
  /**
90423
+ * The data-plane prefix every `VendorLoginProxy` is served under
90424
+ * (`/addon/<addonId>/vendor-login/<attemptId>/<vendorHost>/…`).
90425
+ *
90426
+ * The hub consults an addon's data-plane prefixes BEFORE its HTTP routes, so a
90427
+ * prefix equal to the first segment of a route the addon serves swallows that
90428
+ * route. A sign-in addon serves `/login/start|status|commit|cancel`; the proxy
90429
+ * therefore lives on a segment no addon route uses. One constant, so the entry
90430
+ * path, the mount and the docs cannot drift apart.
90431
+ */
90432
+ var VENDOR_LOGIN_PROXY_PREFIX = "vendor-login";
90433
+ /**
90423
90434
  * Where an OAuth round-trip ends: the admin-ui completion route
90424
90435
  * (`/sso-complete`, the page every popup sign-in already lands on), with the
90425
90436
  * OUTCOME in the URL fragment.
@@ -90661,19 +90672,17 @@ function sendPlain(res, status, text) {
90661
90672
  }
90662
90673
  var VendorLoginProxy = class {
90663
90674
  #addonId;
90664
- #prefix;
90665
90675
  #logger;
90666
90676
  #now;
90667
90677
  #fetch;
90668
90678
  #attempts = /* @__PURE__ */ new Map();
90669
90679
  constructor(options) {
90670
90680
  this.#addonId = options.addonId;
90671
- this.#prefix = options.prefix;
90672
90681
  this.#logger = options.logger;
90673
90682
  this.#now = options.now ?? (() => Date.now());
90674
90683
  this.#fetch = options.fetchFn ?? globalThis.fetch.bind(globalThis);
90675
90684
  }
90676
- /** The `DataPlaneHandler` to pass to `ctx.dataPlane.serve({ prefix, access: 'admin', … })`. */
90685
+ /** The `DataPlaneHandler` to pass to `ctx.dataPlane.serve({ prefix: VENDOR_LOGIN_PROXY_PREFIX, access: 'admin', … })`. */
90677
90686
  handler = (req, res) => this.#handle(req, res);
90678
90687
  /** Register an attempt. A one-shot capability: refused hosts are rejected up front. */
90679
90688
  open(spec) {
@@ -90710,11 +90719,11 @@ var VendorLoginProxy = class {
90710
90719
  basePath: "",
90711
90720
  upstreams: attempt.upstreams
90712
90721
  }, url.host) === void 0) return null;
90713
- return `/addon/${this.#addonId}/${this.#prefix}/${attemptId}/${url.host}${url.pathname}${url.search}`;
90722
+ return `/addon/${this.#addonId}/${VENDOR_LOGIN_PROXY_PREFIX}/${attemptId}/${url.host}${url.pathname}${url.search}`;
90714
90723
  }
90715
90724
  #routeFor(attemptId, attempt, forwardedPrefix) {
90716
90725
  return {
90717
- basePath: `${forwardedPrefix}/addon/${this.#addonId}/${this.#prefix}/${attemptId}`,
90726
+ basePath: `${forwardedPrefix}/addon/${this.#addonId}/${VENDOR_LOGIN_PROXY_PREFIX}/${attemptId}`,
90718
90727
  upstreams: attempt.upstreams
90719
90728
  };
90720
90729
  }
@@ -90906,6 +90915,12 @@ Object.defineProperty(exports, "RUNNING_STATE_COLD", {
90906
90915
  return RUNNING_STATE_COLD;
90907
90916
  }
90908
90917
  });
90918
+ Object.defineProperty(exports, "VENDOR_LOGIN_PROXY_PREFIX", {
90919
+ enumerable: true,
90920
+ get: function() {
90921
+ return VENDOR_LOGIN_PROXY_PREFIX;
90922
+ }
90923
+ });
90909
90924
  Object.defineProperty(exports, "VendorLoginProxy", {
90910
90925
  enumerable: true,
90911
90926
  get: function() {
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("../dist-BioIJ3NA.js");
3
- const require_account_integration_offline = require("../account-integration-offline-BMoYdiX2.js");
2
+ const require_dist = require("../dist-NdDwxHvT.js");
3
+ const require_account_integration_offline = require("../account-integration-offline-IvvrXQDg.js");
4
4
  let node_crypto = require("node:crypto");
5
5
  let node_tls = require("node:tls");
6
6
  let node_zlib = require("node:zlib");
@@ -1443,7 +1443,6 @@ function homeConnectFinishResult(account) {
1443
1443
  * proxy reaches nothing else. (Not verified against the live pages: no vendor credentials.)
1444
1444
  */
1445
1445
  var HOME_CONNECT_LOGIN_HOSTS = ["api.home-connect.com", "singlekey-id.com"];
1446
- var HOME_CONNECT_PROXY_PREFIX = "login";
1447
1446
  var HOME_CONNECT_APP_SCHEME = HOME_CONNECT_REDIRECT_URI.slice(0, HOME_CONNECT_REDIRECT_URI.indexOf("://") + 3);
1448
1447
  var homeConnectSignInClaims = require_account_integration_offline.createSignInClaims();
1449
1448
  /** Start an attempt whose `authorizeUrl` is the hub-relative proxied login page. */
@@ -5385,12 +5384,11 @@ var BoschHomeConnectProviderAddon = class extends require_dist.BaseDeviceProvide
5385
5384
  async serveLoginProxy() {
5386
5385
  const proxy = new require_dist.VendorLoginProxy({
5387
5386
  addonId: this.ctx.id,
5388
- prefix: HOME_CONNECT_PROXY_PREFIX,
5389
5387
  logger: this.ctx.logger
5390
5388
  });
5391
5389
  try {
5392
5390
  this.loginPlane = await this.ctx.dataPlane?.serve({
5393
- prefix: "login",
5391
+ prefix: "vendor-login",
5394
5392
  access: "admin",
5395
5393
  handler: proxy.handler
5396
5394
  }) ?? null;
@@ -1,5 +1,5 @@
1
- import { A as defineCustomActions, B as string, D as errMsg, E as DeviceType, F as boolean, H as unknown, I as literal, M as isSecretMarkerLike, N as _enum, O as createEvent, P as array, R as object, T as DeviceRole, U as EventCategory, V as union, _ as numericSensorCapability, a as VendorLoginProxy, b as runningFromDishwasherOperation, d as deviceAdoptionCapability, f as dishwasherCapability, g as ingestReading, i as RUNNING_STATE_COLD, j as isSecretMarker, k as customAction, l as connectionTestCapability, m as eventEmitterCapability, n as BaseDeviceProvider, p as enumSensorCapability, r as DishwasherOperationStateSchema, s as binaryCapability, t as BaseDevice, u as consumablesCapability, v as powerMeterCapability, x as runningStateCapability, y as quantityFromUnit, z as record } from "../dist-DBUnIovD.mjs";
2
- import { a as createSignInAttemptStore, i as openSignInProxy, n as cascadeRemoveDevicesForIntegration, o as loginFailureForAttempt, r as createSignInClaims, s as parseOAuthCallback, t as setIntegrationDevicesOnline } from "../account-integration-offline-pv6cqOKu.mjs";
1
+ import { A as customAction, B as record, D as DeviceType, E as DeviceRole, F as array, H as union, I as boolean, L as literal, M as isSecretMarker, N as isSecretMarkerLike, O as errMsg, P as _enum, S as runningStateCapability, U as unknown, V as string, W as EventCategory, _ as ingestReading, b as quantityFromUnit, c as binaryCapability, d as consumablesCapability, f as deviceAdoptionCapability, h as eventEmitterCapability, i as RUNNING_STATE_COLD, j as defineCustomActions, k as createEvent, m as enumSensorCapability, n as BaseDeviceProvider, o as VendorLoginProxy, p as dishwasherCapability, r as DishwasherOperationStateSchema, t as BaseDevice, u as connectionTestCapability, v as numericSensorCapability, x as runningFromDishwasherOperation, y as powerMeterCapability, z as object } from "../dist-DxO4cucS.mjs";
2
+ import { a as createSignInAttemptStore, i as openSignInProxy, n as cascadeRemoveDevicesForIntegration, o as loginFailureForAttempt, r as createSignInClaims, s as parseOAuthCallback, t as setIntegrationDevicesOnline } from "../account-integration-offline-Cfcp8s5x.mjs";
3
3
  import { createHash, randomBytes } from "node:crypto";
4
4
  import { connect } from "node:tls";
5
5
  import { inflateRawSync } from "node:zlib";
@@ -1442,7 +1442,6 @@ function homeConnectFinishResult(account) {
1442
1442
  * proxy reaches nothing else. (Not verified against the live pages: no vendor credentials.)
1443
1443
  */
1444
1444
  var HOME_CONNECT_LOGIN_HOSTS = ["api.home-connect.com", "singlekey-id.com"];
1445
- var HOME_CONNECT_PROXY_PREFIX = "login";
1446
1445
  var HOME_CONNECT_APP_SCHEME = HOME_CONNECT_REDIRECT_URI.slice(0, HOME_CONNECT_REDIRECT_URI.indexOf("://") + 3);
1447
1446
  var homeConnectSignInClaims = createSignInClaims();
1448
1447
  /** Start an attempt whose `authorizeUrl` is the hub-relative proxied login page. */
@@ -5384,12 +5383,11 @@ var BoschHomeConnectProviderAddon = class extends BaseDeviceProvider {
5384
5383
  async serveLoginProxy() {
5385
5384
  const proxy = new VendorLoginProxy({
5386
5385
  addonId: this.ctx.id,
5387
- prefix: HOME_CONNECT_PROXY_PREFIX,
5388
5386
  logger: this.ctx.logger
5389
5387
  });
5390
5388
  try {
5391
5389
  this.loginPlane = await this.ctx.dataPlane?.serve({
5392
- prefix: "login",
5390
+ prefix: "vendor-login",
5393
5391
  access: "admin",
5394
5392
  handler: proxy.handler
5395
5393
  }) ?? null;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("../dist-BioIJ3NA.js");
3
- const require_account_integration_offline = require("../account-integration-offline-BMoYdiX2.js");
2
+ const require_dist = require("../dist-NdDwxHvT.js");
3
+ const require_account_integration_offline = require("../account-integration-offline-IvvrXQDg.js");
4
4
  let node_crypto = require("node:crypto");
5
5
  //#region src/homecom/config.ts
6
6
  var HOMECOM_BRANDS = ["bosch", "buderus"];
@@ -1234,7 +1234,6 @@ var homeComSignInAttempts = require_account_integration_offline.createSignInAtte
1234
1234
  //#region src/homecom/homecom-sign-in-proxy.ts
1235
1235
  /** SingleKey ID serves the whole HomeCom login. (Not verified against the live pages: no vendor credentials.) */
1236
1236
  var HOMECOM_LOGIN_HOSTS = ["singlekey-id.com"];
1237
- var HOMECOM_PROXY_PREFIX = "login";
1238
1237
  var HOMECOM_APP_SCHEME = HOMECOM_REDIRECT_URI.slice(0, HOMECOM_REDIRECT_URI.indexOf("://") + 3);
1239
1238
  var homeComSignInClaims = require_account_integration_offline.createSignInClaims();
1240
1239
  /** Start an attempt whose `authorizeUrl` is the hub-relative proxied login page. */
@@ -2143,12 +2142,11 @@ var BoschHomeComProviderAddon = class extends require_dist.BaseDeviceProvider {
2143
2142
  async serveLoginProxy() {
2144
2143
  const proxy = new require_dist.VendorLoginProxy({
2145
2144
  addonId: this.ctx.id,
2146
- prefix: HOMECOM_PROXY_PREFIX,
2147
2145
  logger: this.ctx.logger
2148
2146
  });
2149
2147
  try {
2150
2148
  this.loginPlane = await this.ctx.dataPlane?.serve({
2151
- prefix: "login",
2149
+ prefix: "vendor-login",
2152
2150
  access: "admin",
2153
2151
  handler: proxy.handler
2154
2152
  }) ?? null;
@@ -1,5 +1,5 @@
1
- import { A as defineCustomActions, B as string, D as errMsg, E as DeviceType, F as boolean, I as literal, L as number, M as isSecretMarkerLike, N as _enum, P as array, R as object, U as EventCategory, a as VendorLoginProxy, c as climateControlCapability, d as deviceAdoptionCapability, j as isSecretMarker, k as customAction, l as connectionTestCapability, n as BaseDeviceProvider, t as BaseDevice, w as waterHeaterCapability } from "../dist-DBUnIovD.mjs";
2
- import { a as createSignInAttemptStore, i as openSignInProxy, n as cascadeRemoveDevicesForIntegration, o as loginFailureForAttempt, r as createSignInClaims, s as parseOAuthCallback, t as setIntegrationDevicesOnline } from "../account-integration-offline-pv6cqOKu.mjs";
1
+ import { A as customAction, D as DeviceType, F as array, I as boolean, L as literal, M as isSecretMarker, N as isSecretMarkerLike, O as errMsg, P as _enum, R as number, T as waterHeaterCapability, V as string, W as EventCategory, f as deviceAdoptionCapability, j as defineCustomActions, l as climateControlCapability, n as BaseDeviceProvider, o as VendorLoginProxy, t as BaseDevice, u as connectionTestCapability, z as object } from "../dist-DxO4cucS.mjs";
2
+ import { a as createSignInAttemptStore, i as openSignInProxy, n as cascadeRemoveDevicesForIntegration, o as loginFailureForAttempt, r as createSignInClaims, s as parseOAuthCallback, t as setIntegrationDevicesOnline } from "../account-integration-offline-Cfcp8s5x.mjs";
3
3
  import { createHash, randomBytes } from "node:crypto";
4
4
  //#region src/homecom/config.ts
5
5
  var HOMECOM_BRANDS = ["bosch", "buderus"];
@@ -1233,7 +1233,6 @@ var homeComSignInAttempts = createSignInAttemptStore();
1233
1233
  //#region src/homecom/homecom-sign-in-proxy.ts
1234
1234
  /** SingleKey ID serves the whole HomeCom login. (Not verified against the live pages: no vendor credentials.) */
1235
1235
  var HOMECOM_LOGIN_HOSTS = ["singlekey-id.com"];
1236
- var HOMECOM_PROXY_PREFIX = "login";
1237
1236
  var HOMECOM_APP_SCHEME = HOMECOM_REDIRECT_URI.slice(0, HOMECOM_REDIRECT_URI.indexOf("://") + 3);
1238
1237
  var homeComSignInClaims = createSignInClaims();
1239
1238
  /** Start an attempt whose `authorizeUrl` is the hub-relative proxied login page. */
@@ -2142,12 +2141,11 @@ var BoschHomeComProviderAddon = class extends BaseDeviceProvider {
2142
2141
  async serveLoginProxy() {
2143
2142
  const proxy = new VendorLoginProxy({
2144
2143
  addonId: this.ctx.id,
2145
- prefix: HOMECOM_PROXY_PREFIX,
2146
2144
  logger: this.ctx.logger
2147
2145
  });
2148
2146
  try {
2149
2147
  this.loginPlane = await this.ctx.dataPlane?.serve({
2150
- prefix: "login",
2148
+ prefix: "vendor-login",
2151
2149
  access: "admin",
2152
2150
  handler: proxy.handler
2153
2151
  }) ?? null;
package/dist/shc/addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region \0rolldown/runtime.js
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  //#endregion
5
- const require_dist = require("../dist-BioIJ3NA.js");
5
+ const require_dist = require("../dist-NdDwxHvT.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_https = require("node:https");
8
8
  let node_child_process = require("node:child_process");
@@ -1,4 +1,4 @@
1
- import { A as defineCustomActions, B as string, C as temperatureSensorCapability, D as errMsg, E as DeviceType, I as literal, L as number, N as _enum, P as array, R as object, S as switchCapability, U as EventCategory, c as climateControlCapability, d as deviceAdoptionCapability, h as heatingValveCapability, k as customAction, l as connectionTestCapability, n as BaseDeviceProvider, o as batteryCapability, t as BaseDevice } from "../dist-DBUnIovD.mjs";
1
+ import { A as customAction, C as switchCapability, D as DeviceType, F as array, L as literal, O as errMsg, P as _enum, R as number, V as string, W as EventCategory, f as deviceAdoptionCapability, g as heatingValveCapability, j as defineCustomActions, l as climateControlCapability, n as BaseDeviceProvider, s as batteryCapability, t as BaseDevice, u as connectionTestCapability, w as temperatureSensorCapability, z as object } from "../dist-DxO4cucS.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { request } from "node:https";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-bosch",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Bosch smart-home device-provider addons for CamStack — SHC, Home Connect, and HomeCom cloud integrations (scaffold)",
5
5
  "keywords": [
6
6
  "camstack",