Skip to content
代码片段 群组 项目
提交 1aa663d8 编辑于 作者: Timotej Ecimovic's avatar Timotej Ecimovic
浏览文件

Use the different test file for gen2 for testing an odd case with the CLI template.

上级 ebbe4987
No related branches found
No related tags found
无相关合并请求
......@@ -29,6 +29,7 @@
"pretty-quick": "pretty-quick",
"self-check": "electron src-electron/main-process/electron-main.js selfCheck",
"gen": "node src-script/zap-generate.js -z ./zcl-builtin/silabs/zcl.json -g ./test/gen-template/zigbee/gen-templates.json -i ./test/resource/save-file-test-regen.zap -o ./tmp",
"gen2": "node src-script/zap-generate.js -z ./zcl-builtin/silabs/zcl.json -g ./test/gen-template/zigbee/gen-templates.json -i ./test/resource/generation-test-file-1.zap -o ./tmp",
"pack": "node src-script/build-spa.js && electron-builder --dir",
"dist": "electron-builder",
"dist-all": "electron-builder -mwl",
......
......@@ -123,7 +123,7 @@ function user_all_attributes(options) {
* @returns Promise of the resolved blocks iterating over cluster commands.
*/
function all_user_cluster_commands(options) {
return queryImpexp
var promise = queryImpexp
.exportendPointTypeIds(this.global.db, this.global.sessionId)
.then((endpointTypes) =>
queryZcl.exportClustersAndEndpointDetailsFromEndpointTypes(
......@@ -140,6 +140,8 @@ function all_user_cluster_commands(options) {
.then((endpointCommands) =>
templateUtil.collectBlocks(endpointCommands, options, this)
)
return promise
//return templateUtil.templatePromise(this.global, promise)
}
/**
......
......@@ -27,14 +27,15 @@ const dbEnum = require('../../src-shared/db-enum.js')
* @param {*} promise
*/
function makeSynchronizablePromise(promise) {
// If promise is already synchronizable, just return it.
if (promise.isResolved) return promise
// Set initial state
// Set initial state of flags
var isPending = true
var isRejected = false
var isResolved = false
// Observe the promise, saving the fulfillment in a closure scope.
// Resolve the promise, observing its rejection or resolution.
var synchronizablePromise = promise.then(
function (resolutionValue) {
isResolved = true
......@@ -48,6 +49,7 @@ function makeSynchronizablePromise(promise) {
}
)
// Inject check functions.
synchronizablePromise.isResolved = function () {
return isResolved
}
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册