@matter-server/ws-controller 0.7.0 → 0.7.1-alpha.0-20260519-621bab3
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.
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
* Copyright 2025-2026 Open Home Foundation
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
7
|
-
* Get the version of the @matter/main package.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getMatterVersion(): string;
|
|
10
6
|
/** Cached Matter.js SDK version */
|
|
11
7
|
export declare const MATTER_VERSION: string;
|
|
12
8
|
//# sourceMappingURL=matterVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matterVersion.d.ts","sourceRoot":"","sources":["../../../src/util/matterVersion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"matterVersion.d.ts","sourceRoot":"","sources":["../../../src/util/matterVersion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,mCAAmC;AACnC,eAAO,MAAM,cAAc,QAAU,CAAC"}
|
|
@@ -3,30 +3,9 @@
|
|
|
3
3
|
* Copyright 2025-2026 Open Home Foundation
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import { fileURLToPath } from "node:url";
|
|
9
|
-
function getMatterVersion() {
|
|
10
|
-
const matterMainUrl = import.meta.resolve("@matter/main");
|
|
11
|
-
const matterMainPath = fileURLToPath(matterMainUrl);
|
|
12
|
-
let dir = dirname(matterMainPath);
|
|
13
|
-
while (dir !== "/") {
|
|
14
|
-
try {
|
|
15
|
-
const packageJsonPath = join(dir, "package.json");
|
|
16
|
-
const content = readFileSync(packageJsonPath, "utf-8");
|
|
17
|
-
const pkg = JSON.parse(content);
|
|
18
|
-
if (pkg.name === "@matter/main") {
|
|
19
|
-
return pkg.version;
|
|
20
|
-
}
|
|
21
|
-
} catch {
|
|
22
|
-
}
|
|
23
|
-
dir = dirname(dir);
|
|
24
|
-
}
|
|
25
|
-
throw new Error("Could not find @matter/main package.json");
|
|
26
|
-
}
|
|
27
|
-
const MATTER_VERSION = getMatterVersion();
|
|
6
|
+
import { version } from "@matter/main";
|
|
7
|
+
const MATTER_VERSION = version;
|
|
28
8
|
export {
|
|
29
|
-
MATTER_VERSION
|
|
30
|
-
getMatterVersion
|
|
9
|
+
MATTER_VERSION
|
|
31
10
|
};
|
|
32
11
|
//# sourceMappingURL=matterVersion.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/util/matterVersion.ts"],
|
|
4
|
-
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,eAAe;AAGjB,MAAM,iBAAiB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter-server/ws-controller",
|
|
3
|
-
"version": "0.7.0",
|
|
3
|
+
"version": "0.7.1-alpha.0-20260519-621bab3",
|
|
4
4
|
"description": "matter.js based Matter controller library",
|
|
5
5
|
"homepage": "https://github.com/matter-js/matterjs-server",
|
|
6
6
|
"bugs": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"test": "matter-test --force-exit"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@matter-server/ws-client": "0.7.0",
|
|
40
|
+
"@matter-server/ws-client": "0.7.1-alpha.0-20260519-621bab3",
|
|
41
41
|
"@matter/dcl-data": ">=2026.5.1-5.1",
|
|
42
42
|
"@matter/main": "0.17.0-alpha.0-20260518-7f13c7285",
|
|
43
43
|
"@project-chip/matter.js": "0.17.0-alpha.0-20260518-7f13c7285",
|
|
@@ -4,42 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
* Utility to get the Matter.js SDK version from @matter/main package.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { readFileSync } from "node:fs";
|
|
12
|
-
import { dirname, join } from "node:path";
|
|
13
|
-
import { fileURLToPath } from "node:url";
|
|
14
|
-
|
|
15
|
-
interface PackageJson {
|
|
16
|
-
version: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Get the version of the @matter/main package.
|
|
21
|
-
*/
|
|
22
|
-
export function getMatterVersion(): string {
|
|
23
|
-
// Use import.meta.resolve for ESM-native module resolution
|
|
24
|
-
const matterMainUrl = import.meta.resolve("@matter/main");
|
|
25
|
-
const matterMainPath = fileURLToPath(matterMainUrl);
|
|
26
|
-
// Navigate up from the resolved module to find package.json
|
|
27
|
-
let dir = dirname(matterMainPath);
|
|
28
|
-
while (dir !== "/") {
|
|
29
|
-
try {
|
|
30
|
-
const packageJsonPath = join(dir, "package.json");
|
|
31
|
-
const content = readFileSync(packageJsonPath, "utf-8");
|
|
32
|
-
const pkg = JSON.parse(content) as PackageJson & { name?: string };
|
|
33
|
-
if (pkg.name === "@matter/main") {
|
|
34
|
-
return pkg.version;
|
|
35
|
-
}
|
|
36
|
-
} catch {
|
|
37
|
-
// Continue searching
|
|
38
|
-
}
|
|
39
|
-
dir = dirname(dir);
|
|
40
|
-
}
|
|
41
|
-
throw new Error("Could not find @matter/main package.json");
|
|
42
|
-
}
|
|
7
|
+
import { version } from "@matter/main";
|
|
43
8
|
|
|
44
9
|
/** Cached Matter.js SDK version */
|
|
45
|
-
export const MATTER_VERSION =
|
|
10
|
+
export const MATTER_VERSION = version;
|