@matterbridge/core 3.10.8-dev-20260904-3c0cd3b → 3.10.9-dev-20260904-cbaddbb

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.
@@ -2,6 +2,7 @@ import '@matter/nodejs';
2
2
  import EventEmitter from 'node:events';
3
3
  import fs from 'node:fs';
4
4
  import path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
5
6
  import { Crypto, Environment, LogFormat as MatterLogFormat, Logger, LogLevel as MatterLogLevel, StorageService, UINT16_MAX, UINT32_MAX, } from '@matter/general';
6
7
  import { Endpoint, ServerNode } from '@matter/node';
7
8
  import { BasicInformationServer } from '@matter/node/behaviors/basic-information';
@@ -417,6 +418,13 @@ export class MatterNode extends EventEmitter {
417
418
  else {
418
419
  rootEndpoint = ServerNode.RootEndpoint;
419
420
  }
421
+ if (process.env.MATTERBRIDGE_CHIP_TEST && fs.existsSync(path.join(path.dirname(fileURLToPath(import.meta.url)), 'chipTests.js'))) {
422
+ this.log.warn(' ****************************************************************************************');
423
+ this.log.warn(' * MATTERBRIDGE_CHIP_TEST environment variable is set. Running TestEventTrigger server. *');
424
+ this.log.warn(' ****************************************************************************************');
425
+ const { MatterbridgeGeneralDiagnosticsServer } = await import('./chipTests.js');
426
+ rootEndpoint = rootEndpoint.with(MatterbridgeGeneralDiagnosticsServer);
427
+ }
420
428
  const serverNode = await ServerNode.create(rootEndpoint, {
421
429
  id: storeId,
422
430
  environment: this.environment,
@@ -457,7 +465,7 @@ export class MatterNode extends EventEmitter {
457
465
  configurationVersion: await this.matterStorageContext.get('configurationVersion'),
458
466
  reachable: true,
459
467
  },
460
- ...(hasParameter('root-power-source')
468
+ ...(hasParameter('root-power-source') || process.env.MATTERBRIDGE_CHIP_TEST
461
469
  ? {
462
470
  powerSource: {
463
471
  status: PowerSource.PowerSourceStatus.Active,
@@ -1948,7 +1948,7 @@ export class Matterbridge extends EventEmitter {
1948
1948
  configurationVersion: await storageContext.get('configurationVersion'),
1949
1949
  reachable: true,
1950
1950
  },
1951
- ...(hasParameter('root-power-source')
1951
+ ...(hasParameter('root-power-source') || process.env.MATTERBRIDGE_CHIP_TEST
1952
1952
  ? {
1953
1953
  powerSource: {
1954
1954
  status: PowerSource.PowerSourceStatus.Active,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matterbridge/core",
3
- "version": "3.10.8-dev-20260904-3c0cd3b",
3
+ "version": "3.10.9-dev-20260904-cbaddbb",
4
4
  "description": "Matterbridge core library",
5
5
  "author": "https://github.com/Luligu",
6
6
  "homepage": "https://matterbridge.io/",
@@ -132,10 +132,10 @@
132
132
  },
133
133
  "dependencies": {
134
134
  "@matter/main": "0.17.9",
135
- "@matterbridge/dgram": "3.10.8-dev-20260904-3c0cd3b",
136
- "@matterbridge/thread": "3.10.8-dev-20260904-3c0cd3b",
137
- "@matterbridge/types": "3.10.8-dev-20260904-3c0cd3b",
138
- "@matterbridge/utils": "3.10.8-dev-20260904-3c0cd3b",
135
+ "@matterbridge/dgram": "3.10.9-dev-20260904-cbaddbb",
136
+ "@matterbridge/thread": "3.10.9-dev-20260904-cbaddbb",
137
+ "@matterbridge/types": "3.10.9-dev-20260904-cbaddbb",
138
+ "@matterbridge/utils": "3.10.9-dev-20260904-cbaddbb",
139
139
  "escape-html": "1.0.3",
140
140
  "express": "5.2.1",
141
141
  "express-rate-limit": "8.7.0",