@matter/create 0.16.9 → 0.16.10-alpha.0-20260219-28569004a
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.config.d.ts","sourceRoot":"","sources":["../../src/build.config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC;;GAEG;AACH,wBAAsB,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"build.config.d.ts","sourceRoot":"","sources":["../../src/build.config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAKxC;;GAEG;AACH,wBAAsB,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,OAAO,iBAqExD"}
|
|
@@ -37,13 +37,21 @@ async function before({ project }) {
|
|
|
37
37
|
if (!entrypoint) {
|
|
38
38
|
continue;
|
|
39
39
|
}
|
|
40
|
+
const resolvedEntrypoint = examplesPkg.json.main ?? entrypoint;
|
|
41
|
+
if (!resolvedEntrypoint) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
entrypoint = resolvedEntrypoint;
|
|
45
|
+
if (entrypoint.startsWith("src/")) {
|
|
46
|
+
entrypoint = entrypoint.slice(4);
|
|
47
|
+
}
|
|
40
48
|
templates.push({
|
|
41
49
|
name,
|
|
42
50
|
dependencies: examplesPkg.json.dependencies ?? {},
|
|
43
51
|
optionalDependencies: examplesPkg.json.optionalDependencies,
|
|
44
52
|
engines: examplesPkg.json.engines,
|
|
45
53
|
description: match[1],
|
|
46
|
-
entrypoint
|
|
54
|
+
entrypoint
|
|
47
55
|
});
|
|
48
56
|
}
|
|
49
57
|
const tools = project.pkg.findPackage("@matter/tools").json;
|
|
@@ -1,6 +1,6 @@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I;AAC7C,qBAAa;AAAA,MACjB;AACA,YAAM,SAAS,MAAM,SAAS,MAAM,OAAO;AAE3C,YAAM,cAAc,UAAU,QAAQ,kBAAkB,MAAM,QAAQ;AACtE,YAAM,MAAM,QAAQ,WAAW,GAAG,EAAE,WAAW,KAAK,CAAC;AACrD,YAAM,UAAU,aAAa,MAAM;AAAA,IACvC;AAEA,QAAI,CAAC,YAAY;AACb;AAAA,IACJ;AAEA,UAAM,qBAAqB,YAAY,KAAK,QAAQ;AACpD,QAAI,CAAC,oBAAoB;AACrB;AAAA,IACJ;AAEA,iBAAa;AACb,QAAI,WAAW,WAAW,MAAM,GAAG;AAC/B,mBAAa,WAAW,MAAM,CAAC;AAAA,IACnC;AAEA,cAAU,KAAK;AAAA,MACX;AAAA,MACA,cAAc,YAAY,KAAK,gBAAgB,CAAC;AAAA,MAChD,sBAAsB,YAAY,KAAK;AAAA,MACvC,SAAS,YAAY,KAAK;AAAA,MAC1B,aAAa,MAAM,CAAC;AAAA,MACpB;AAAA,IACJ,CAAC;AAAA,EACL;AAEA,QAAM,QAAQ,QAAQ,IAAI,YAAY,eAAe,EAAE;AACvD,QAAM,oBAAoB,MAAM,cAAc;AAC9C,QAAM,mBAAmB,MAAM,kBAAkB,aAAa;AAE9D,QAAM,SAAiB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAEA,QAAM,UAAU,UAAU,QAAQ,2BAA2B,GAAG,KAAK,UAAU,QAAQ,QAAW,CAAC,CAAC;AACxG;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
12
12
|
},
|
|
13
13
|
"description": "Simple light controller",
|
|
14
|
-
"entrypoint": "
|
|
14
|
+
"entrypoint": "OnOffController.ts"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "examples-controller",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
27
27
|
},
|
|
28
28
|
"description": "Controller example to commission and connect devices",
|
|
29
|
-
"entrypoint": "
|
|
29
|
+
"entrypoint": "ControllerNode.ts"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"name": "examples-controller-shared-fabric",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
50
50
|
},
|
|
51
51
|
"description": "Air quality sensor example",
|
|
52
|
-
"entrypoint": "
|
|
52
|
+
"entrypoint": "AirQualitySensorDeviceNode.ts"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"name": "examples-device-bridge-onoff",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
61
61
|
},
|
|
62
62
|
"description": "Bridge for multiple OnOff light/sockets with a CLI command execution interface",
|
|
63
|
-
"entrypoint": "
|
|
63
|
+
"entrypoint": "BridgedDevicesNode.ts"
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"name": "examples-device-composed-onoff",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
72
72
|
},
|
|
73
73
|
"description": "Composed device for multiple OnOff light/sockets with a CLI command execution interface",
|
|
74
|
-
"entrypoint": "
|
|
74
|
+
"entrypoint": "ComposedDeviceNode.ts"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"name": "examples-device-composed-wc-light",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
83
83
|
},
|
|
84
84
|
"description": "Composed device with Window covering and a light endpoint that logs changes",
|
|
85
|
-
"entrypoint": "
|
|
85
|
+
"entrypoint": "IlluminatedRollerShade.ts"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"name": "examples-device-measuring-socket",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
94
94
|
},
|
|
95
95
|
"description": "Socket device that reports random Energy and Power measurements",
|
|
96
|
-
"entrypoint": "
|
|
96
|
+
"entrypoint": "MeasuredSocketDevice.ts"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"name": "examples-device-multiple-onoff",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
105
105
|
},
|
|
106
106
|
"description": "Multiple OnOff light/socket nodes in one process with a CLI command execution interface",
|
|
107
|
-
"entrypoint": "
|
|
107
|
+
"entrypoint": "MultiDeviceNode.ts"
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
"name": "examples-device-onoff",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
116
116
|
},
|
|
117
117
|
"description": "OnOff light/socket device with a CLI command execution interface",
|
|
118
|
-
"entrypoint": "
|
|
118
|
+
"entrypoint": "DeviceNode.ts"
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
"name": "examples-device-onoff-advanced",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
131
131
|
},
|
|
132
132
|
"description": "OnOff light/socket device with BLE support and advanced API usage",
|
|
133
|
-
"entrypoint": "
|
|
133
|
+
"entrypoint": "DeviceNodeFull.ts"
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
"name": "examples-device-onoff-light",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
142
142
|
},
|
|
143
143
|
"description": "OnOff light example which logs the state changes to the console",
|
|
144
|
-
"entrypoint": "
|
|
144
|
+
"entrypoint": "LightDevice.ts"
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"name": "examples-device-robotic-vacuum-cleaner",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
153
153
|
},
|
|
154
154
|
"description": "Robotic Vacuum Cleaner Example",
|
|
155
|
-
"entrypoint": "
|
|
155
|
+
"entrypoint": "RoboticVacuumCleanerDevice.ts"
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"name": "examples-device-sensor",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
164
164
|
},
|
|
165
165
|
"description": "Temperature/Humidity sensor with a CLI command interface to get the value",
|
|
166
|
-
"entrypoint": "
|
|
166
|
+
"entrypoint": "SensorDeviceNode.ts"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
"name": "examples-device-simple",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
175
175
|
},
|
|
176
176
|
"description": "A simple on/off device",
|
|
177
|
-
"entrypoint": "
|
|
177
|
+
"entrypoint": "main.ts"
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
"name": "examples-device-smoke-co-alarm",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
186
186
|
},
|
|
187
187
|
"description": "Smoke CO Alarm Example",
|
|
188
|
-
"entrypoint": "
|
|
188
|
+
"entrypoint": "SmokeCOAlarmDeviceNode.ts"
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
"name": "examples-mqtt-device",
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
198
198
|
},
|
|
199
199
|
"description": "Example device with MQTT control enabled",
|
|
200
|
-
"entrypoint": "
|
|
200
|
+
"entrypoint": "MqttDevice.ts"
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
"name": "examples-web-socket-device",
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
210
210
|
},
|
|
211
211
|
"description": "Example device with WebSocket control enabled",
|
|
212
|
-
"entrypoint": "
|
|
212
|
+
"entrypoint": "WebSocketDevice.ts"
|
|
213
213
|
}
|
|
214
214
|
]
|
|
215
215
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/create",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.10-alpha.0-20260219-28569004a",
|
|
4
4
|
"description": "Matter.js skeleton project generator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/matter-js/matter.js#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@matter/tools": "0.16.
|
|
35
|
+
"@matter/tools": "0.16.10-alpha.0-20260219-28569004a",
|
|
36
36
|
"@types/node": "^25.2.2",
|
|
37
37
|
"@types/tar-stream": "^3.1.4"
|
|
38
38
|
},
|
package/src/build.config.ts
CHANGED
|
@@ -33,7 +33,7 @@ export async function before({ project }: Project.Context) {
|
|
|
33
33
|
|
|
34
34
|
const baseLength = examplesPkg.resolve(`src/`).length + 1;
|
|
35
35
|
const sources = await examplesPkg.glob(`src/**/*.ts`);
|
|
36
|
-
let entrypoint;
|
|
36
|
+
let entrypoint: string | undefined;
|
|
37
37
|
for (const file of sources) {
|
|
38
38
|
const filename = file.slice(baseLength);
|
|
39
39
|
if (!entrypoint && filename.indexOf("/") === -1) {
|
|
@@ -50,13 +50,23 @@ export async function before({ project }: Project.Context) {
|
|
|
50
50
|
continue;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
const resolvedEntrypoint = examplesPkg.json.main ?? entrypoint;
|
|
54
|
+
if (!resolvedEntrypoint) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
entrypoint = resolvedEntrypoint;
|
|
59
|
+
if (entrypoint.startsWith("src/")) {
|
|
60
|
+
entrypoint = entrypoint.slice(4);
|
|
61
|
+
}
|
|
62
|
+
|
|
53
63
|
templates.push({
|
|
54
64
|
name,
|
|
55
65
|
dependencies: examplesPkg.json.dependencies ?? {},
|
|
56
66
|
optionalDependencies: examplesPkg.json.optionalDependencies,
|
|
57
67
|
engines: examplesPkg.json.engines,
|
|
58
68
|
description: match[1],
|
|
59
|
-
entrypoint
|
|
69
|
+
entrypoint,
|
|
60
70
|
});
|
|
61
71
|
}
|
|
62
72
|
|