-
Notifications
You must be signed in to change notification settings - Fork 83
/
package.json
362 lines (362 loc) · 18.8 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
{
"name": "zap",
"version": "0.0.0",
"description": "Configuration tool for the Zigbee Cluster Library",
"productName": "zap",
"cordovaId": "",
"capacitorId": "",
"author": {
"name": "Silicon Labs",
"email": "[email protected]",
"url": "https://www.silabs.com/support"
},
"private": true,
"homepage": "https://github.com/project-chip/zap",
"repository": {
"type": "git",
"url": "[email protected]:project-chip/zap.git"
},
"main": "dist/src-electron/ui/main-ui.js",
"bin": "dist/src-electron/main-process/main.js",
"scripts": {
"download-artifact": "npx ts-node src-script/download-artifact.ts",
"pkg:download-artifact": "npx pkg src-script/download-artifact.js -t node18-linux-x64,node18-linux-arm64,node18-macos-x64,node18-win-x64 --output dist/download-artifact --compress GZip",
"compile:download-artifact": "tsc src-script/download-artifact.ts --esModuleInterop",
"test:download-artifact": "npx jest --collectCoverage=false ./test/download-artifact.test.js --testPathIgnorePatterns=[]",
"lic": "node src-script/license-check.js --production",
"lint": "eslint --ext .js,.vue src src-electron src-shared src-script test",
"lintfix": "eslint --fix --ext .js,.vue src src-electron src-shared src-script test",
"electron-build-dmg": "node src-script/build-dmg.js",
"clean:report": "rm -rf .nyc_output || true",
"tsc": "tsc --build ./tsconfig.json",
"test": " npm run test:unit && npm run test:e2e-ci && npm run report",
"test:unit": "node src-script/zap-versionstamp.js && jest --reporters=jest-junit --reporters=default --updateSnapshot",
"test:unit:verbose": "jest --updateSnapshot --verbose false",
"test:unit:coverage": "jest --coverage",
"test:unit:watch": "jest --watch",
"test:unit:watchAll": "jest --watchAll",
"test:e2e": "node src-script/zap-uitest.js open zigbee",
"test:e2e-ci": "node src-script/zap-uitest.js run zigbee",
"test:e2e-matter": "node src-script/zap-uitest.js open matter",
"test:e2e-matter-ci": "node src-script/zap-uitest.js run matter",
"report": "node src-script/zap-combine-reports.js",
"postinstall": "electron-builder install-app-deps && husky install && npm rebuild canvas --update-binary && npm run version-stamp",
"buildAndPack:win": "npm run build && npm run pack:win",
"buildAndPack:mac": "npm run build && npm run pack:mac && cp apack.json dist/mac",
"buildAndPack:linux": "npm run build && npm run pack:linux",
"zap-dev": "npm run build-spa && quasar dev -m electron",
"xml-validate": "zcl-builtin/shared/script/validate",
"xml-format": "zcl-builtin/shared/script/format",
"build": "npm run build-spa && npm run build-backend",
"build-spa": "node src-script/build-spa.js",
"build-backend": "node src-script/build-backend.js",
"doc": "jsdoc src-electron src-shared -r -u docs -d ./generated-html/ README.md",
"api-doc": "node src-script/generate-all-api-docs.js",
"helper-doc": "node src-script/generate-template-helper-docs.js",
"format-code": "pretty-quick",
"pretty-quick": "pretty-quick",
"version-stamp": "node src-script/zap-versionstamp.js",
"package-metadata": "node src-script/zap-package-metadata.js",
"zap": "node src-script/zap-start.js --logToStdout --gen ./test/gen-template/zigbee/gen-templates.json",
"zapall": "node src-script/zap-start.js --logToStdout --zcl ./test/resource/meta/zcl.json --zcl ./zcl-builtin/silabs/zcl.json --zcl ./zcl-builtin/matter/zcl.json --gen ./test/gen-template/zigbee/gen-templates.json --gen ./test/gen-template/matter/gen-test.json --gen ./test/resource/meta/gen-test.json",
"zapmultiprotocol": "node src-script/zap-start.js --logToStdout --zcl ./zcl-builtin/silabs/zcl.json --zcl ./zcl-builtin/matter/zcl-with-test-extensions.json --gen ./test/gen-template/zigbee/gen-templates.json --gen ./test/gen-template/matter/gen-test.json",
"zapzigbee": "node src-script/zap-start.js --logToStdout --zcl ./zcl-builtin/silabs/zcl.json --gen ./test/gen-template/zigbee/gen-templates.json",
"zapmatter": "node src-script/zap-start.js --logToStdout --zcl ./zcl-builtin/matter/zcl.json --gen ./test/gen-template/matter/gen-test.json",
"zapmeta": "node src-script/zap-start.js --logToStdout --zcl ./test/resource/meta/zcl.json --gen ./test/resource/meta/gen-test.json --in ./test/resource/test-meta.zap",
"zaphelp": "node src-script/zap-start.js --help",
"zap-dotdot": "node src-script/zap-start.js --logToStdout --zcl ./zcl-builtin/dotdot/library.xml -g ./test/gen-template/dotdot/dotdot-templates.json",
"zap-devserver": "node src-script/zap-start.js server --stateDirectory ~/.zap/zigbee-server/ --allowCors --logToStdout --gen ./test/gen-template/zigbee/gen-templates.json --reuseZapInstance",
"zigbeezap-devserver": "node src-script/zap-start.js server --stateDirectory ~/.zap/zigbee-server/ --allowCors --logToStdout --gen ./test/gen-template/zigbee/gen-templates.json --reuseZapInstance",
"matterzap-devserver": "node src-script/zap-start.js server --stateDirectory ~/.zap/matter-server/ --allowCors --logToStdout --zcl ./zcl-builtin/matter/zcl.json --gen ./test/resource/meta/gen-test.json --reuseZapInstance",
"matterzap-devserver2": "node src-script/zap-start.js server --stateDirectory --zcl ./zcl-builtin/matter/zcl.json --allowCors --logToStdout --gen ./test/gen-template/matter3/t.json --reuseZapInstance",
"zapall-devserver": "node src-script/zap-start.js server --stateDirectory --zcl ./zcl-builtin/silabs/zcl.json --zcl ./zcl-builtin/matter/zcl.json --allowCors --logToStdout --gen ./test/gen-template/zigbee/gen-templates.json --gen ./test/gen-template/matter/gen-test.json --gen --reuseZapInstance",
"server": "node src-script/zap-start.js server --stateDirectory ~/.zap/server/ --allowCors --logToStdout --zcl ./zcl-builtin/silabs/zcl.json --zcl ./zcl-builtin/matter/zcl.json --gen ./test/gen-template/zigbee/gen-templates.json --gen ./test/gen-template/matter/gen-test.json ",
"stop": "node src-script/zap-start.js stop --reuseZapInstance",
"status": "node src-script/zap-start.js status --reuseZapInstance",
"self-check": "node src-script/zap-start.js selfCheck -g ./test/gen-template/zigbee/gen-templates.json",
"post-import": "node src-script/zap-start.js convert --postImportScript test/resource/test-script.js test/resource/three-endpoint-device.zap -o test.zap",
"analyze": "node src-script/zap-start.js analyze ./test/resource/three-endpoint-device.zap",
"version": "node src-script/zap-start.js --version",
"metafile-check": "node src-script/zap-validate-metafiles.js",
"test:gen": "npm run gen && npm run gen2 && npm run genmatter && npm run genmatter1 && npm run genmatter2 && npm run gendotdot && npm run genmeta && npm run genmeta2 && npm run genfullth && npm run genmatter4",
"gen": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/gen -z ./zcl-builtin/silabs/zcl.json -g ./test/gen-template/zigbee/gen-templates.json -i ./test/resource/three-endpoint-device.zap -o ./tmp",
"gen2": "node src-script/zap-generate.js --genResultFile -z ./zcl-builtin/silabs/zcl.json -g ./test/gen-template/zigbee/gen-templates.json -i ./test/resource/generation-test-file-1.zap -o ./tmp",
"genfullth": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/genfullth -z ./zcl-builtin/silabs/zcl.json -g ./test/gen-template/zigbee2/gen-templates.json -i ./test/resource/full-th.zap -o ./tmp/full-th",
"genblank": "node src-script/zap-generate.js --genResultFile -z ./zcl-builtin/silabs/zcl.json -g ./test/gen-template/zigbee/gen-templates.json -o ./tmp",
"genmatter": "npm run genmatter1 && npm run genmatter2",
"genmatter1": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/genmatter1 -z ./zcl-builtin/matter/zcl.json -g ./test/gen-template/matter/gen-test.json -i ./test/resource/matter-test.zap -o ./tmp/matter1",
"genmatter2": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/genmatter2 -z ./zcl-builtin/matter/zcl.json -g ./test/gen-template/matter/gen-test.json -i ./test/resource/matter-switch.zap -o ./tmp/matter2",
"genmatter3": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/genmatter3 -z ./zcl-builtin/matter/zcl.json -g ./test/gen-template/matter3/t.json -i ./test/resource/matter-all-clusters.zap -o ./tmp/matter3",
"genmatter4": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/genmatter4 -z ./zcl-builtin/matter/zcl.json -g ./test/gen-template/matter4/m4.json -i ./test/gen-template/matter4/app.zap -o ./tmp/matter4",
"genmeta": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/genmeta -z ./test/resource/meta/zcl.json -g ./test/resource/meta/gen-test.json --appendGenerationSubdirectory -o ./tmp -i ./test/resource/test-meta.zap",
"genmeta2": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/genmeta --appendGenerationSubdirectory -o ./tmp -i ./test/resource/test-meta.zap --packageMatch fuzzy",
"gentest": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/gentest -z ./zcl-builtin/silabs/zcl.json -g ./test/gen-template/test/gen-test.json -o ./tmp",
"gendotdot": "node src-script/zap-generate.js --genResultFile -z ./zcl-builtin/dotdot/library.xml -g ./test/gen-template/dotdot/dotdot-templates.json -o ./tmp",
"convert": "node src-script/zap-convert.js -o {basename}.zap -z ./zcl-builtin/silabs/zcl.json -g test/gen-template/zigbee/gen-templates.json -i ./test/resource/isc/*.isc ./test/resource/*.zap",
"convert-dl": "node src-script/zap-convert.js -o {basename}.zap -z ./zcl-builtin/silabs/zcl.json -g test/gen-template/zigbee/gen-templates.json -i ./test/resource/isc/ha-door-lock.isc",
"refresh-zap": "node src-script/zap-convert.js -z zcl-builtin/silabs/zcl.json test/resource/three-endpoint-device.zap -g test/gen-template/zigbee/gen-templates.json -o test/resource/three-endpoint-device.zap",
"publish-linux": "exec electron-builder -l -p always",
"linuxpack-ui": "./dist/linux-unpacked/zap --zclProperties zcl-builtin/silabs/zcl-test.properties --genTemplateJson test/gen-template/zigbee/gen-templates.json",
"linuxpack-check": "./dist/linux-unpacked/zap selfCheck --zclProperties zcl-builtin/silabs/zcl-test.properties --genTemplateJson test/gen-template/zigbee/gen-templates.json",
"linuxpack-gen": "./dist/linux-unpacked/zap generate --noUi --noServer --zclProperties zcl-builtin/silabs/zcl-test.properties --genTemplateJson test/gen-template/zigbee/gen-templates.json --output tmp",
"linuxpack-help": "./dist/linux-unpacked/zap -?",
"helper-api-baseline": "npx tsc --build ./tsconfig.json && node src-script/gen-helper-api.js && pretty-quick",
"pack": "cross-env NODE_OPTIONS=--max-old-space-size=4096 electron-builder -mwl",
"pack:linux": "cross-env NODE_OPTIONS=--max-old-space-size=4096 electron-builder -l",
"pack:win": "cross-env NODE_OPTIONS=--max-old-space-size=4096 electron-builder -w",
"pack:mac": "cross-env NODE_OPTIONS=--max-old-space-size=4096 electron-builder -m",
"pack:mac:native": "cross-env NODE_OPTIONS=--max-old-space-size=4096 electron-builder -m",
"pack:cli:linux": "node ./src-script/pack-cli.js -p linux",
"pack:cli:win": "node ./src-script/pack-cli.js -p win",
"pack:cli:mac": "node ./src-script/pack-cli.js -p mac",
"pkg": "npx pkg --out-path dist/ --compress GZip --options max-old-space-size=4096 .",
"pkg:linux": "npx pkg -t node18-linux-x64,node18-linux-arm64 --public --no-bytecode --output dist/zap-linux --compress GZip --options max-old-space-size=4096 .",
"pkg-use-local-fork": "node ../pkg/lib-es5/bin.js -t node18-linux-x64 --output dist/zap-linux --compress GZip --options max-old-space-size=4096 .",
"pkg:win": "npx pkg -t node18-win-x64,node18-win-arm64 --public --no-bytecode --output dist/zap-win --compress GZip --options max-old-space-size=4096 .",
"pkg:mac": "npx pkg -t node18-macos-x64 --output dist/zap-macos --compress GZip --options max-old-space-size=4096 .",
"dist": "node src-script/build-release-package.js --output dist/release",
"dist:mac": "node src-script/build-release-package.js --platform m --output dist/release",
"dist:win": "node src-script/build-release-package.js --platform w --output dist/release",
"dist:linux": "node src-script/build-release-package.js --platform l --output dist/release",
"dist:all": "node src-script/build-release-package.js --platform mwl --output dist/release",
"mattersdk": "node src-script/zap-start.js regenerateSdk --sdk ~/git/matter/scripts/tools/sdk.json",
"metasdk": "node src-script/zap-start.js regenerateSdk --sdk test/resource/meta/sdk.json",
"zip": "node ./src-script/7zip-bin-wrapper.js"
},
"dependencies": {
"@globalhive/vuejs-tour": "^1.3.4",
"@quasar/extras": "^1.16.12",
"@types/yargs": "^15.0.5",
"axios": "^0.28.0",
"axios-cookiejar-support": "^5.0.2",
"bufferutil": "^4.0.7",
"bytebuffer": "^5.0.1",
"crc": "^4.1.0",
"express": "^4.19.2",
"express-session": "^1.18.0",
"fast-glob": "^3.2.11",
"find": "^0.3.0",
"fs-extra": "^11.2.0",
"handlebars": "^4.7.7",
"http-status-codes": "^2.1.4",
"lodash": "^4.17.21",
"node-cache": "^5.1.2",
"node-ipc": "^9.2.1",
"pino": "^9.3.2",
"promised-handlebars": "^2.0.1",
"properties": "^1.2.1",
"quasar": "^2.16.7",
"single-instance": "^0.0.1",
"source-map-support": "^0.5.19",
"sqlite3": "^5.1.4",
"toposort": "^2.0.2",
"tough-cookie": "^4.1.4",
"utf-8-validate": "^5.0.5",
"uuid": "^10.0.0",
"vue": "^3.4.36",
"vue-router": "^4.4.3",
"vuex": "^4.1.0",
"ws": "^8.18.0",
"xml2js": "^0.6.2",
"yaml": "^2.5.0",
"yargs": "^17.4.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.1",
"@babel/preset-typescript": "^7.24.7",
"@cypress/code-coverage": "^3.12.45",
"@quasar/app-webpack": "^3.13.3",
"@quasar/quasar-app-extension-testing": "^2.2.0",
"@quasar/quasar-app-extension-testing-e2e-cypress": "^6.1.0",
"@quasar/quasar-app-extension-testing-unit-jest": "^3.0.2",
"@vue/test-utils": "^2.4.6",
"7zip-bin": "^5.2.0",
"autoprefixer": "^10.4.20",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",
"cypress": "^13.6.6",
"date-fns": "^3.6.0",
"electron": "^31.3.1",
"electron-builder": "^24.0.0",
"electron-debug": "^4.0.0",
"electron-devtools-installer": "^3.2.0",
"electron-installer-dmg": "^5.0.1",
"electron-packager": "^17.1.2",
"electron-rebuild": "^3.0.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.7.0",
"eslint-plugin-vue": "^9.27.0",
"eslint-webpack-plugin": "^4.2.0",
"folder-hash": "^4.0.1",
"husky": "^9.1.4",
"is-reachable": "^5.2.1",
"jest": "^29.2.2",
"jest-junit": "^16.0.0",
"jest-sonar-reporter": "^2.0.0",
"jsdoc": "^4.0.3",
"jsdoc-to-markdown": "^8.0.3",
"license-checker": "^25.0.1",
"node-7z": "^3.0.0",
"node-gyp": "^10.2.0",
"nodejs-file-downloader": "^4.9.3",
"octokit": "^1.7.2",
"pkg": "^5.8.1",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"test-utils": "^1.1.1",
"typescript": "4.6",
"workbox-webpack-plugin": "^7.1.0"
},
"engines": {
"node": ">= 8.9.0",
"npm": ">= 5.6.0",
"yarn": ">= 1.6.0"
},
"browserslist": [
"last 1 version, not dead, ie >= 11"
],
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged && jsdoc src-electron src-shared -r -d ./generated-html/ && eslint ."
}
},
"build": {
"appId": "zap.id",
"artifactName": "${productName}-${os}-${arch}.${ext}",
"afterPack": "./src-script/pack-apack-win-linux.js",
"afterAllArtifactBuild": "./src-script/pack-apack-mac.js",
"mac": {
"category": "public.app-category.developer-tools",
"darkModeSupport": true,
"target": [
{
"target": "zip",
"arch": [
"x64",
"arm64"
]
}
]
},
"linux": {
"category": "Development",
"target": [
{
"target": "zip",
"arch": [
"x64",
"arm64"
]
},
{
"target": "deb",
"arch": "x64"
},
{
"target": "rpm",
"arch": "x64"
}
]
},
"win": {
"target": [
{
"target": "zip",
"arch": [
"x64",
"arm64"
]
}
]
},
"directories": {
"buildResources": "resource-build",
"output": "dist"
},
"nodeGypRebuild": false,
"npmRebuild": true,
"files": [
"**/*",
"apack.json",
"dist/backend",
"dist/src-electron",
"dist/src-shared",
"!test/**/*",
"!tmp/**/*",
"!**/node_modules/*/{CHANGES.md,History.md,CONTRIBUTING.md,CHANGELOG.md,README.md,README.md~,HISTORY.md,README,readme.md,readme}",
"!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}",
"!**/node_modules/*.d.ts",
"!**/node_modules/.bin",
"!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}",
"!.editorconfig",
"!**/._*",
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}",
"!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}",
"!**/{appveyor.yml,.travis.yml,circle.yml}",
"!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}",
"!generated-html/**/*",
"!docs/**/*",
"!.github/**/*",
"!src/**/*",
"!**/node_modules/sqlite3/build/Release/**/*",
"!quasar*",
"!test.*",
"!src-script/**/*",
"!src-electron/**/*",
"!src-shared/**/*",
"!dist/download-artifact*"
]
},
"nyc": {
"report-dir": "cypress-coverage",
"include": [
"src/**/*.js",
"src/**/*.ts",
"src-electron/**/*.js",
"src-electron/**/*.ts",
"src-shared/**/*.js",
"src-shared/**/*.ts"
]
},
"pkg": {
"scripts": [
"dist/src-electron/client/*.js",
"dist/src-electron/db/*.js",
"dist/src-electron/generator/*.js",
"dist/src-electron/ide-integration/*.js",
"dist/src-electron/importexport/*.js",
"dist/src-electron/main-process/*.js",
"dist/src-electron/rest/*.js",
"dist/src-electron/server/*.js",
"dist/src-electron/types/*.js",
"dist/src-electron/util/*.js",
"dist/src-electron/validation/*.js",
"dist/src-electron/zcl/*.js",
"dist/src-shared/**/*.js"
],
"targets": [
"node18-linux-x64",
"node18-macos-x64",
"node18-win-x64"
],
"assets": [
"apack.json",
".version.json",
"dist/src-electron/icons/*",
"dist/src-electron/db/zap-schema.sql",
"zcl-builtin/**/*",
"spa/**/*",
"**/node_sqlite3.node"
]
},
"regenTest": {
"matter": {
"failOnDiff": false
},
"zigbee": {
"failOnDiff": false
}
}
}