forked from project-chip/zap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
354 lines (354 loc) · 17 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
{
"type": "commonjs",
"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 node16-linux-x64,node16-linux-arm64,node16-macos-x64,node16-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": "exec 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",
"regen-ts-type": "node src-script/regen-ts-type.js",
"renderer-api-regen": "node src-script/renderer-api-regen.js",
"doc": "jsdoc src-electron src-shared -r -u docs -d ./generated-html/ README.md",
"apidoc": "jsdoc2md src-shared/**/*.js src-electron/**/*.js > docs/api.md",
"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 ./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",
"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 --logToStdoutc --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 ./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",
"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",
"server": "node src-script/zap-start.js server --logToStdout --zcl ./zcl-builtin/silabs/zcl.json --zcl ./zcl-builtin/matter/zcl.json --gen ./test/gen-template/zigbee/gen-templates.json --reuseZapInstance",
"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 genmatter && npm run gendotdot && npm run genmeta && npm run genmeta2",
"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",
"gen3": "node src-script/zap-generate.js --genResultFile --stateDirectory ~/.zap/gen3 -z ./zcl-builtin/dotdot/library.xml -g ./test/gen-template/zigbee/gen-templates.json -i ./test/resource/generation-test-file-1.zap -o ./tmp",
"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/genmatter -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",
"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 ./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 ./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 --universal",
"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 node16-linux-x64 --output dist/zap-linux --compress GZip --options max-old-space-size=4096 .",
"pkg:win": "npx pkg -t node16-win-x64 --output dist/zap-win.exe --compress GZip --options max-old-space-size=4096 .",
"pkg:mac": "npx pkg -t node16-macos-x64 --output dist/zap-macos --compress GZip --options max-old-space-size=4096 .",
"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": {
"@babel/runtime": "^7.14.6",
"@types/yargs": "^15.0.5",
"axios": "^0.26.1",
"body-parser": "^1.19.0",
"bufferutil": "^4.0.3",
"bytebuffer": "^5.0.1",
"canvas": "^2.8.0",
"cookie-parser": "^1.4.5",
"core-js": "^3.21.1",
"corejs": "^1.0.0",
"crc": "^4.1.0",
"express": "^4.17.3",
"express-session": "^1.17.2",
"fast-glob": "^3.2.11",
"file-loader": "^6.2.0",
"glob": "^8.0.3",
"handlebars": "^4.7.7",
"http-status-codes": "^2.1.4",
"lodash": "^4.17.21",
"node-ipc": "^9.2.1",
"pino": "^7.9.2",
"promised-handlebars": "^2.0.1",
"properties": "^1.2.1",
"single-instance": "^0.0.1",
"source-map-support": "^0.5.19",
"sqlite3": "^5.0.2",
"toposort": "^2.0.2",
"utf-8-validate": "^5.0.5",
"uuid": "^8.3.2",
"vue-tour": "^2.0.0",
"ws": "^8.5.0",
"xml2js": "^0.4.23",
"xsdlibrary": "^1.3.6",
"yaml": "^1.10.2",
"yargs": "^17.4.0"
},
"devDependencies": {
"@babel/plugin-transform-regenerator": "^7.14.5",
"@babel/preset-typescript": "^7.14.5",
"@babel/runtime-corejs2": "^7.14.6",
"@cypress/code-coverage": "^3.9.12",
"@quasar/app": "^2.2.10",
"@quasar/extras": "^1.10.8",
"@quasar/quasar-app-extension-testing": "^1.0.3",
"@quasar/quasar-app-extension-testing-e2e-cypress": "^3.1.2",
"@quasar/quasar-app-extension-testing-unit-jest": "^2.2.2",
"@types/bytebuffer": "^5.0.42",
"@types/node-ipc": "^9.2.0",
"@types/sqlite3": "^3.1.7",
"@types/underscore": "^1.11.3",
"@vue/eslint-config-standard": "^6.0.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
"babel-plugin-istanbul": "^6.1.1",
"copy-webpack-plugin": "^6.3.2",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"cypress": "^8.7.0",
"date-fns": "^2.28.0",
"devtron": "^1.4.0",
"electron": "^17.1.2",
"electron-builder": "^22.11.7",
"electron-debug": "^3.2.0",
"electron-devtools-installer": "^3.2.0",
"electron-installer-dmg": "^3.0.0",
"electron-packager": "^15.2.0",
"electron-rebuild": "^2.3.5",
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.13.0",
"file-loader": "^6.2.0",
"folder-hash": "^4.0.1",
"husky": "^7.0.1",
"is-reachable": "^5.2.1",
"jest": "^27.0.6",
"jest-environment-jsdom": "^27.4.6",
"jest-junit": "^12.2.0",
"jest-sonar-reporter": "^2.0.0",
"jsdoc": "^3.6.6",
"jsdoc-to-markdown": "^7.0.1",
"jsdom": "^16.6.0",
"jsdom-global": "^3.0.2",
"license-checker": "^25.0.1",
"node-7z": "^3.0.0",
"node-abi": "^2.30.0",
"node-gyp": "^8.1.0",
"node-pre-gyp": "^0.17.0",
"nodejs-file-downloader": "^4.9.3",
"octokit": "^1.7.2",
"pkg": "^5.5.2",
"prettier": "^2.3.2",
"pretty-quick": "^3.1.1",
"quasar": "^1.15.21",
"ts-loader": "^8.0.17",
"typescript": "4.6",
"webpack-cli": "^4.7.2",
"webpack-node-externals": "^2.5.2"
},
"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 --ext .js,.vue src src-electron src-shared src-script test"
}
},
"prettier": {
"semi": false,
"overrides": [
{
"files": "src-electron/generator/matter/**/*.js",
"options": {
"semi": true
}
}
],
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"arrowParens": "always"
},
"build": {
"appId": "zap.id",
"artifactName": "${productName}-${os}.${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": [
"zip"
]
},
"linux": {
"category": "Development",
"target": [
"zip",
"deb",
"rpm"
]
},
"win": {
"target": [
"zip"
]
},
"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": [
"node16-linux-x64",
"node16-macos-x64",
"node16-win-x64"
],
"assets": [
"apack.json",
".version.json",
"dist/src-electron/icons/*",
"dist/src-electron/db/zap-schema.sql",
"zcl-builtin/**/*",
"spa/**/*",
"**/node_sqlite3.node"
]
}
}