@camstack/addon-provider-bosch 0.1.37 → 0.1.39

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.
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_bosch_instances = require("../bosch-instances-CO8yIFzJ.js");
3
- const require_account_integration_offline = require("../account-integration-offline-VItxeiJg.js");
2
+ const require_bosch_instances = require("../bosch-instances-WlrW2PAy.js");
3
+ const require_account_integration_offline = require("../account-integration-offline-CG1-xGSm.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");
@@ -1408,9 +1408,14 @@ function homeConnectFinishResult(account) {
1408
1408
  /**
1409
1409
  * Home Connect signs in through its own identity pages, which end on `hcauth://auth/prod?...`
1410
1410
  * — an address no browser can open. These are the hosts those pages are served from; the
1411
- * proxy reaches nothing else. (Not verified against the live pages: no vendor credentials.)
1411
+ * proxy reaches nothing else. The authorize call redirects to SingleKey ID, whose page loads its
1412
+ * scripts from `cdn.singlekey-id.com` (see `HOMECOM_LOGIN_HOSTS`).
1412
1413
  */
1413
- var HOME_CONNECT_LOGIN_HOSTS = ["api.home-connect.com", "singlekey-id.com"];
1414
+ var HOME_CONNECT_LOGIN_HOSTS = [
1415
+ "api.home-connect.com",
1416
+ "singlekey-id.com",
1417
+ "cdn.singlekey-id.com"
1418
+ ];
1414
1419
  var HOME_CONNECT_APP_SCHEME = HOME_CONNECT_REDIRECT_URI.slice(0, HOME_CONNECT_REDIRECT_URI.indexOf("://") + 3);
1415
1420
  var homeConnectSignInClaims = require_account_integration_offline.createSignInClaims();
1416
1421
  /** Start an attempt whose `authorizeUrl` is the hub-relative proxied login page. */
@@ -5381,12 +5386,7 @@ var BoschHomeConnectProviderAddon = class extends require_bosch_instances.BaseDe
5381
5386
  const records = this.ctx.records;
5382
5387
  if (records === void 0) throw new Error("bosch-home-connect: ctx.records is required (hub-only addon)");
5383
5388
  await records.declare(homeConnectRecordKinds);
5384
- await this.runMigrations(require_bosch_instances.defineAddonMigrations(HOME_CONNECT_MIGRATIONS, homeConnectRowsPorts({
5385
- api: require_bosch_instances.defaultIntegrationApiOver(this.ctx.api),
5386
- secrets: this.ctx.secrets ?? null,
5387
- records,
5388
- warn: (message) => this.ctx.logger.warn(message)
5389
- })));
5389
+ await this.runMigrations(HOME_CONNECT_MIGRATIONS, (api) => homeConnectRowsPorts({ ...require_bosch_instances.rowsDepsOver(api) }));
5390
5390
  const built = buildHomeConnectInstances(records, {
5391
5391
  onChanged: () => this.reconcileIntegrations(),
5392
5392
  tester: this.buildConnectionTestProvider()
@@ -1,5 +1,5 @@
1
- import { $ as errMsg, B as isSecretMarkerLike, C as ingestReading, D as quantityFromUnit, E as powerMeterCapability, F as defineAddonMigrations, H as array, I as defineCustomActions, J as string, K as object, L as defineEntryKind, N as createEvent, O as runningFromDishwasherOperation, P as customAction, Q as DeviceType, R as entryBody, T as numericSensorCapability, U as boolean, V as _enum, W as literal, X as unknown, Y as union, Z as DeviceRole, _ as defaultIntegrationApiOver, a as BaseDevice, b as enumSensorCapability, c as RUNNING_STATE_COLD, d as VendorLoginProxy, et as EventCategory, g as consumablesCapability, h as connectionTestCapability, i as testBoschInstance, k as runningStateCapability, l as RecordIntegrationInstances, n as boschRowsPorts, o as BaseDeviceProvider, p as binaryCapability, q as record, r as keepBodyKeys, s as DishwasherOperationStateSchema, t as boschRowsMigration, v as deviceAdoptionCapability, w as integrationInstancesCapability, x as eventEmitterCapability, y as dishwasherCapability, z as isSecretMarker } from "../bosch-instances-BQiyzlPt.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-nChgZUlC.mjs";
1
+ import { $ as EventCategory, B as _enum, C as integrationInstancesCapability, D as rowsDepsOver, E as quantityFromUnit, F as defineCustomActions, G as object, H as boolean, I as defineEntryKind, J as union, K as record, L as entryBody, N as createEvent, O as runningFromDishwasherOperation, P as customAction, Q as errMsg, R as isSecretMarker, S as ingestReading, T as powerMeterCapability, U as literal, V as array, X as DeviceRole, Y as unknown, Z as DeviceType, _ as deviceAdoptionCapability, a as BaseDevice, b as eventEmitterCapability, c as RUNNING_STATE_COLD, d as VendorLoginProxy, g as consumablesCapability, h as connectionTestCapability, i as testBoschInstance, k as runningStateCapability, l as RecordIntegrationInstances, n as boschRowsPorts, o as BaseDeviceProvider, p as binaryCapability, q as string, r as keepBodyKeys, s as DishwasherOperationStateSchema, t as boschRowsMigration, v as dishwasherCapability, w as numericSensorCapability, y as enumSensorCapability, z as isSecretMarkerLike } from "../bosch-instances-GrNuqDFv.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-etjkhGaj.mjs";
3
3
  import { createHash, randomBytes } from "node:crypto";
4
4
  import { connect } from "node:tls";
5
5
  import { inflateRawSync } from "node:zlib";
@@ -1407,9 +1407,14 @@ function homeConnectFinishResult(account) {
1407
1407
  /**
1408
1408
  * Home Connect signs in through its own identity pages, which end on `hcauth://auth/prod?...`
1409
1409
  * — an address no browser can open. These are the hosts those pages are served from; the
1410
- * proxy reaches nothing else. (Not verified against the live pages: no vendor credentials.)
1410
+ * proxy reaches nothing else. The authorize call redirects to SingleKey ID, whose page loads its
1411
+ * scripts from `cdn.singlekey-id.com` (see `HOMECOM_LOGIN_HOSTS`).
1411
1412
  */
1412
- var HOME_CONNECT_LOGIN_HOSTS = ["api.home-connect.com", "singlekey-id.com"];
1413
+ var HOME_CONNECT_LOGIN_HOSTS = [
1414
+ "api.home-connect.com",
1415
+ "singlekey-id.com",
1416
+ "cdn.singlekey-id.com"
1417
+ ];
1413
1418
  var HOME_CONNECT_APP_SCHEME = HOME_CONNECT_REDIRECT_URI.slice(0, HOME_CONNECT_REDIRECT_URI.indexOf("://") + 3);
1414
1419
  var homeConnectSignInClaims = createSignInClaims();
1415
1420
  /** Start an attempt whose `authorizeUrl` is the hub-relative proxied login page. */
@@ -5380,12 +5385,7 @@ var BoschHomeConnectProviderAddon = class extends BaseDeviceProvider {
5380
5385
  const records = this.ctx.records;
5381
5386
  if (records === void 0) throw new Error("bosch-home-connect: ctx.records is required (hub-only addon)");
5382
5387
  await records.declare(homeConnectRecordKinds);
5383
- await this.runMigrations(defineAddonMigrations(HOME_CONNECT_MIGRATIONS, homeConnectRowsPorts({
5384
- api: defaultIntegrationApiOver(this.ctx.api),
5385
- secrets: this.ctx.secrets ?? null,
5386
- records,
5387
- warn: (message) => this.ctx.logger.warn(message)
5388
- })));
5388
+ await this.runMigrations(HOME_CONNECT_MIGRATIONS, (api) => homeConnectRowsPorts({ ...rowsDepsOver(api) }));
5389
5389
  const built = buildHomeConnectInstances(records, {
5390
5390
  onChanged: () => this.reconcileIntegrations(),
5391
5391
  tester: this.buildConnectionTestProvider()
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_bosch_instances = require("../bosch-instances-CO8yIFzJ.js");
3
- const require_account_integration_offline = require("../account-integration-offline-VItxeiJg.js");
2
+ const require_bosch_instances = require("../bosch-instances-WlrW2PAy.js");
3
+ const require_account_integration_offline = require("../account-integration-offline-CG1-xGSm.js");
4
4
  let node_crypto = require("node:crypto");
5
5
  //#region src/homecom/config.ts
6
6
  var HOMECOM_BRANDS = ["bosch", "buderus"];
@@ -1227,8 +1227,13 @@ function finishedFromGateways(tokens, resolved, listFailure) {
1227
1227
  var homeComSignInAttempts = require_account_integration_offline.createSignInAttemptStore();
1228
1228
  //#endregion
1229
1229
  //#region src/homecom/homecom-sign-in-proxy.ts
1230
- /** SingleKey ID serves the whole HomeCom login. (Not verified against the live pages: no vendor credentials.) */
1231
- var HOMECOM_LOGIN_HOSTS = ["singlekey-id.com"];
1230
+ /**
1231
+ * SingleKey ID serves the HomeCom login page; its scripts and styles come from `cdn.singlekey-id.com`
1232
+ * as `type=module` + `crossorigin` files, which the CDN does not CORS-enable for another origin —
1233
+ * served from the hub origin through the proxy they load, loaded directly they are refused and the
1234
+ * page has no script (only the email field, no way to continue).
1235
+ */
1236
+ var HOMECOM_LOGIN_HOSTS = ["singlekey-id.com", "cdn.singlekey-id.com"];
1232
1237
  var HOMECOM_APP_SCHEME = HOMECOM_REDIRECT_URI.slice(0, HOMECOM_REDIRECT_URI.indexOf("://") + 3);
1233
1238
  var homeComSignInClaims = require_account_integration_offline.createSignInClaims();
1234
1239
  /** Start an attempt whose `authorizeUrl` is the hub-relative proxied login page. */
@@ -2191,12 +2196,7 @@ var BoschHomeComProviderAddon = class extends require_bosch_instances.BaseDevice
2191
2196
  const records = this.ctx.records;
2192
2197
  if (records === void 0) throw new Error("bosch-homecom: ctx.records is required (hub-only addon)");
2193
2198
  await records.declare(homeComRecordKinds);
2194
- await this.runMigrations(require_bosch_instances.defineAddonMigrations(HOMECOM_MIGRATIONS, homeComRowsPorts({
2195
- api: require_bosch_instances.defaultIntegrationApiOver(this.ctx.api),
2196
- secrets: this.ctx.secrets ?? null,
2197
- records,
2198
- warn: (message) => this.ctx.logger.warn(message)
2199
- })));
2199
+ await this.runMigrations(HOMECOM_MIGRATIONS, (api) => homeComRowsPorts({ ...require_bosch_instances.rowsDepsOver(api) }));
2200
2200
  const built = buildHomeComInstances(records, {
2201
2201
  onChanged: () => this.reconcileIntegrations(),
2202
2202
  tester: this.buildConnectionTestProvider()
@@ -1,5 +1,5 @@
1
- import { $ as errMsg, F as defineAddonMigrations, G as number, H as array, I as defineCustomActions, J as string, K as object, L as defineEntryKind, M as waterHeaterCapability, P as customAction, Q as DeviceType, R as entryBody, U as boolean, V as _enum, W as literal, _ as defaultIntegrationApiOver, a as BaseDevice, d as VendorLoginProxy, et as EventCategory, h as connectionTestCapability, i as testBoschInstance, l as RecordIntegrationInstances, m as climateControlCapability, n as boschRowsPorts, o as BaseDeviceProvider, r as keepBodyKeys, t as boschRowsMigration, v as deviceAdoptionCapability, w as integrationInstancesCapability } from "../bosch-instances-BQiyzlPt.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-nChgZUlC.mjs";
1
+ import { $ as EventCategory, B as _enum, C as integrationInstancesCapability, D as rowsDepsOver, F as defineCustomActions, G as object, H as boolean, I as defineEntryKind, L as entryBody, M as waterHeaterCapability, P as customAction, Q as errMsg, U as literal, V as array, W as number, Z as DeviceType, _ as deviceAdoptionCapability, a as BaseDevice, d as VendorLoginProxy, h as connectionTestCapability, i as testBoschInstance, l as RecordIntegrationInstances, m as climateControlCapability, n as boschRowsPorts, o as BaseDeviceProvider, q as string, r as keepBodyKeys, t as boschRowsMigration } from "../bosch-instances-GrNuqDFv.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-etjkhGaj.mjs";
3
3
  import { createHash, randomBytes } from "node:crypto";
4
4
  //#region src/homecom/config.ts
5
5
  var HOMECOM_BRANDS = ["bosch", "buderus"];
@@ -1226,8 +1226,13 @@ function finishedFromGateways(tokens, resolved, listFailure) {
1226
1226
  var homeComSignInAttempts = createSignInAttemptStore();
1227
1227
  //#endregion
1228
1228
  //#region src/homecom/homecom-sign-in-proxy.ts
1229
- /** SingleKey ID serves the whole HomeCom login. (Not verified against the live pages: no vendor credentials.) */
1230
- var HOMECOM_LOGIN_HOSTS = ["singlekey-id.com"];
1229
+ /**
1230
+ * SingleKey ID serves the HomeCom login page; its scripts and styles come from `cdn.singlekey-id.com`
1231
+ * as `type=module` + `crossorigin` files, which the CDN does not CORS-enable for another origin —
1232
+ * served from the hub origin through the proxy they load, loaded directly they are refused and the
1233
+ * page has no script (only the email field, no way to continue).
1234
+ */
1235
+ var HOMECOM_LOGIN_HOSTS = ["singlekey-id.com", "cdn.singlekey-id.com"];
1231
1236
  var HOMECOM_APP_SCHEME = HOMECOM_REDIRECT_URI.slice(0, HOMECOM_REDIRECT_URI.indexOf("://") + 3);
1232
1237
  var homeComSignInClaims = createSignInClaims();
1233
1238
  /** Start an attempt whose `authorizeUrl` is the hub-relative proxied login page. */
@@ -2190,12 +2195,7 @@ var BoschHomeComProviderAddon = class extends BaseDeviceProvider {
2190
2195
  const records = this.ctx.records;
2191
2196
  if (records === void 0) throw new Error("bosch-homecom: ctx.records is required (hub-only addon)");
2192
2197
  await records.declare(homeComRecordKinds);
2193
- await this.runMigrations(defineAddonMigrations(HOMECOM_MIGRATIONS, homeComRowsPorts({
2194
- api: defaultIntegrationApiOver(this.ctx.api),
2195
- secrets: this.ctx.secrets ?? null,
2196
- records,
2197
- warn: (message) => this.ctx.logger.warn(message)
2198
- })));
2198
+ await this.runMigrations(HOMECOM_MIGRATIONS, (api) => homeComRowsPorts({ ...rowsDepsOver(api) }));
2199
2199
  const built = buildHomeComInstances(records, {
2200
2200
  onChanged: () => this.reconcileIntegrations(),
2201
2201
  tester: this.buildConnectionTestProvider()
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_bosch_instances = require("../bosch-instances-CO8yIFzJ.js");
5
+ const require_bosch_instances = require("../bosch-instances-WlrW2PAy.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");
@@ -23843,12 +23843,7 @@ var BoschShcProviderAddon = class extends require_bosch_instances.BaseDeviceProv
23843
23843
  const records = this.ctx.records;
23844
23844
  if (records === void 0) throw new Error("bosch-shc: ctx.records is required (hub-only addon)");
23845
23845
  await records.declare(shcRecordKinds);
23846
- await this.runMigrations(require_bosch_instances.defineAddonMigrations(SHC_MIGRATIONS, shcRowsPorts({
23847
- api: require_bosch_instances.defaultIntegrationApiOver(this.ctx.api),
23848
- secrets: this.ctx.secrets ?? null,
23849
- records,
23850
- warn: (message) => this.ctx.logger.warn(message)
23851
- })));
23846
+ await this.runMigrations(SHC_MIGRATIONS, (api) => shcRowsPorts({ ...require_bosch_instances.rowsDepsOver(api) }));
23852
23847
  const built = buildShcInstances(records, {
23853
23848
  onChanged: () => this.reconcileIntegrations(),
23854
23849
  tester: this.buildConnectionTestProvider()
@@ -1,4 +1,4 @@
1
- import { $ as errMsg, A as switchCapability, F as defineAddonMigrations, G as number, H as array, I as defineCustomActions, J as string, K as object, L as defineEntryKind, P as customAction, Q as DeviceType, R as entryBody, S as heatingValveCapability, V as _enum, W as literal, _ as defaultIntegrationApiOver, a as BaseDevice, et as EventCategory, f as batteryCapability, h as connectionTestCapability, i as testBoschInstance, j as temperatureSensorCapability, l as RecordIntegrationInstances, m as climateControlCapability, n as boschRowsPorts, o as BaseDeviceProvider, r as keepBodyKeys, t as boschRowsMigration, v as deviceAdoptionCapability, w as integrationInstancesCapability } from "../bosch-instances-BQiyzlPt.mjs";
1
+ import { $ as EventCategory, A as switchCapability, B as _enum, C as integrationInstancesCapability, D as rowsDepsOver, F as defineCustomActions, G as object, I as defineEntryKind, L as entryBody, P as customAction, Q as errMsg, U as literal, V as array, W as number, Z as DeviceType, _ as deviceAdoptionCapability, a as BaseDevice, f as batteryCapability, h as connectionTestCapability, i as testBoschInstance, j as temperatureSensorCapability, l as RecordIntegrationInstances, m as climateControlCapability, n as boschRowsPorts, o as BaseDeviceProvider, q as string, r as keepBodyKeys, t as boschRowsMigration, x as heatingValveCapability } from "../bosch-instances-GrNuqDFv.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { request } from "node:https";
@@ -23844,12 +23844,7 @@ var BoschShcProviderAddon = class extends BaseDeviceProvider {
23844
23844
  const records = this.ctx.records;
23845
23845
  if (records === void 0) throw new Error("bosch-shc: ctx.records is required (hub-only addon)");
23846
23846
  await records.declare(shcRecordKinds);
23847
- await this.runMigrations(defineAddonMigrations(SHC_MIGRATIONS, shcRowsPorts({
23848
- api: defaultIntegrationApiOver(this.ctx.api),
23849
- secrets: this.ctx.secrets ?? null,
23850
- records,
23851
- warn: (message) => this.ctx.logger.warn(message)
23852
- })));
23847
+ await this.runMigrations(SHC_MIGRATIONS, (api) => shcRowsPorts({ ...rowsDepsOver(api) }));
23853
23848
  const built = buildShcInstances(records, {
23854
23849
  onChanged: () => this.reconcileIntegrations(),
23855
23850
  tester: this.buildConnectionTestProvider()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-bosch",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
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",
@@ -141,7 +141,7 @@
141
141
  }
142
142
  ],
143
143
  "requires": {
144
- "server": ">=1.2.770"
144
+ "server": ">=1.2.780"
145
145
  }
146
146
  },
147
147
  "files": [