@aiot-toolkit/shared-utils 1.0.18-uxoptimize-beta.2 → 1.0.19-media-beta.1
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.
package/compilation-config.js
CHANGED
|
@@ -28,6 +28,13 @@ const compileOptionsMeta = {
|
|
|
28
28
|
APP: 'app-chunks.json',
|
|
29
29
|
PAGE: 'page-chunks.json'
|
|
30
30
|
},
|
|
31
|
+
|
|
32
|
+
// vela抽取公共JS的文名称
|
|
33
|
+
velaSplitChunksNameEnum: {
|
|
34
|
+
APP: 'app-chunks.js',
|
|
35
|
+
PAGE: 'page-chunks.js'
|
|
36
|
+
},
|
|
37
|
+
|
|
31
38
|
// 自定义包名的枚举
|
|
32
39
|
buildNameFormat: {
|
|
33
40
|
DEFAULT: 'DEFAULT',
|
|
@@ -114,7 +121,12 @@ const compileOptionsObject = {
|
|
|
114
121
|
/**
|
|
115
122
|
* 设置是否不打包rpk
|
|
116
123
|
*/
|
|
117
|
-
disableBuildRpk: false
|
|
124
|
+
disableBuildRpk: false,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 是否使用protobuf打包二进制文件
|
|
128
|
+
*/
|
|
129
|
+
enableProtobuf: false
|
|
118
130
|
}
|
|
119
131
|
|
|
120
132
|
/**
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const vdom_pb=require("./vdom_pb");class AIOT{constructor(e){this.funcArr=[],this.chld=[],this.idCount=-1,this.expCell=new vdom_pb.ExportCell,this.aiotf=e,this.optArr=[]}init(e){this.expCell.setTagname(e)}parseObj(e){let t=new vdom_pb.StyleValueArr;for(let r in e){let s=new vdom_pb.StyleKey,i=new vdom_pb.OneStyleValue;s.setValue(r),i.setKey(s);let l=Object.prototype.toString.call(e[r]);if("[object Number]"===l)i.setDoublevl(e[r]);else if("[object String]"===l)i.setStringvl(e[r]);else if("[object Function]"===l)null==this.aiotf?(this.funcArr.push(e[r]),i.setFuncid(this.funcArr.length-1)):(this.aiotf.funcArr.push(e[r]),i.setFuncid(this.aiotf.funcArr.length-1));else if("[object Object]"===l){let t=new vdom_pb.StyleValueArr;t=this.parseObj(e[r]),i.setStylevlarr(t)}else if("[object Array]"===l){let t=new vdom_pb.StringArr;t.setStringvlarrList(e[r]),i.setStringarr(t)}else"[object Boolean]"===l&&i.setBoolvl(e[r]);t.addVlarr(i)}return t}__ce__(e,t,r){let s=new vdom_pb.TemplateOne,i=new vdom_pb.TemplateUnit;if(i.setType("__ce__"),i.setTag(e),Array.isArray(r)&&r.length>0){let e=[];for(let t in r)e.push(r[t].id_);s.setChldsidList(e)}s.setId(++this.idCount);let l=this.parseObj(t.__opts__);return i.setOptsarrList(l.getVlarrList()),s.setCv(i),this.expCell.addTemplatearr(s),{id_:this.idCount,aiot_:this}}__ci__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__ci__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT(this);l.funcArr=this.funcArr,l.optArr=this.optArr;let n=t(l),o=Object.prototype.toString.call(n);if("[object Object]"===o)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===o)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}return this.funcArr=l.aiotf.funcArr,r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cf__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cf__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT;l.optArr=this.optArr;let n=t(undefined,undefined,l),o=Object.prototype.toString.call(n);if("[object Object]"===o)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===o)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}if(l.funcArr.length>0){const t=function(e,t){return l.aiotf.funcArr};t.aiotfor=l,t.aiotfor.key=e.__opts__.key,t.aiotfor.value=e.__opts__.value,this.funcArr.push(t),s.setFuncrender(this.funcArr.length-1)}else s.setFuncrender(-1);return r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cc__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cc__"),s.setTag(e),r.setId(++this.idCount);let i=this.parseObj(t.__opts__);return s.setOptsarrList(i.getVlarrList()),r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}__cb__(e,t){let r=new vdom_pb.TemplateOne,s=new vdom_pb.TemplateUnit;s.setType("__cb__"),r.setId(++this.idCount);let i=this.parseObj(e.__opts__);s.setOptsarrList(i.getVlarrList());let l=new AIOT;l.optArr=this.optArr;let n=t(undefined,l),o=Object.prototype.toString.call(n);if("[object Object]"===o)s.setTemplaterenderList(n.aiot_.expCell.getTemplatearrList());else if("[object Array]"===o)for(let e in n){s.setTemplaterenderList(n[e].aiot_.expCell.getTemplatearrList());break}if(l.funcArr.length>0){const e=function(e){return l.aiotf.funcArr};e.aiotcb=l,this.funcArr.push(e),s.setFuncrender(this.funcArr.length-1)}else s.setFuncrender(-1);return r.setCv(s),this.expCell.addTemplatearr(r),{id_:this.idCount,aiot_:this}}}module.exports=AIOT;
|
|
2
|
+
//# sourceMappingURL=protobuf.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.extractFunctions=extractFunctions,exports.createBin=createBin;const vdom_pb=require("./vdom_pb"),Path=require("path"),fs=require("fs"),AIOT=require("./protobuf");function translateStyle(e,t){const r=t.expCell;return e.forEach((e=>{const t=e[0],a=e[1],n=r.addCssarr();t.forEach((e=>{const t=n.addSelectorarr();t.setId(e[0]),t.setName(e[1])})),Object.keys(a).forEach((e=>{const t=a[e],r=n.addStylearr(),s=new vdom_pb.StyleKey;switch(s.setValue(e),r.setKey(s),typeof t){case"string":r.setStringvl(t);break;case"number":Number.isInteger(t)?r.setInt32vl(t):r.setDoublevl(t)}}))})),r}function translateTemplate(template,aiot){const vm={};template&&eval(`(${template})`)(vm)}function createItem(e,t,r){let a=new AIOT;return a.init(e||"entry"),translateTemplate(r,a),translateStyle(t,a),a}function extractFunctions(e){let t=new AIOT;return t.init("temp"),translateTemplate(e,t),t}function createBin(e,t,r,a){const n=r.map(((e,r)=>createItem(t[r],JSON.parse(e),a[r])));let s=new vdom_pb.ExportArr;s.clearValuearrList(),n.forEach((e=>{s.addValuearr(e.expCell)}));const c=Path.dirname(e);fs.existsSync(c)||fs.mkdirSync(c,{recursive:!0});let l=s.serializeBinary();fs.writeFileSync(e,l)}
|
|
2
|
+
//# sourceMappingURL=protobufControl.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var jspb=require("google-protobuf"),goog=jspb,global=Function("return this")();goog.exportSymbol("proto.CssCell",null,global),goog.exportSymbol("proto.ExportArr",null,global),goog.exportSymbol("proto.ExportCell",null,global),goog.exportSymbol("proto.OneStyleValue",null,global),goog.exportSymbol("proto.SelectorKey",null,global),goog.exportSymbol("proto.StringArr",null,global),goog.exportSymbol("proto.StyleKey",null,global),goog.exportSymbol("proto.StyleValueArr",null,global),goog.exportSymbol("proto.TemplateOne",null,global),goog.exportSymbol("proto.TemplateUnit",null,global),goog.exportSymbol("proto.Version",null,global),proto.StringArr=function(e){jspb.Message.initialize(this,e,0,-1,proto.StringArr.repeatedFields_,null)},goog.inherits(proto.StringArr,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.StringArr.displayName="proto.StringArr"),proto.StringArr.repeatedFields_=[1],jspb.Message.GENERATE_TO_OBJECT&&(proto.StringArr.prototype.toObject=function(e){return proto.StringArr.toObject(e,this)},proto.StringArr.toObject=function(e,t){var r={stringvlarrList:jspb.Message.getRepeatedField(t,1)};return e&&(r.$jspbMessageInstance=t),r}),proto.StringArr.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.StringArr;return proto.StringArr.deserializeBinaryFromReader(r,t)},proto.StringArr.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readString();e.addStringvlarr(r);break;default:t.skipField()}}return e},proto.StringArr.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.StringArr.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.StringArr.serializeBinaryToWriter=function(e,t){var r;(r=e.getStringvlarrList()).length>0&&t.writeRepeatedString(1,r)},proto.StringArr.prototype.getStringvlarrList=function(){return jspb.Message.getRepeatedField(this,1)},proto.StringArr.prototype.setStringvlarrList=function(e){jspb.Message.setField(this,1,e||[])},proto.StringArr.prototype.addStringvlarr=function(e,t){jspb.Message.addToRepeatedField(this,1,e,t)},proto.StringArr.prototype.clearStringvlarrList=function(){this.setStringvlarrList([])},proto.StyleKey=function(e){jspb.Message.initialize(this,e,0,-1,null,null)},goog.inherits(proto.StyleKey,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.StyleKey.displayName="proto.StyleKey"),jspb.Message.GENERATE_TO_OBJECT&&(proto.StyleKey.prototype.toObject=function(e){return proto.StyleKey.toObject(e,this)},proto.StyleKey.toObject=function(e,t){var r={index:jspb.Message.getFieldWithDefault(t,1,0),value:jspb.Message.getFieldWithDefault(t,2,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.StyleKey.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.StyleKey;return proto.StyleKey.deserializeBinaryFromReader(r,t)},proto.StyleKey.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt32();e.setIndex(r);break;case 2:r=t.readString();e.setValue(r);break;default:t.skipField()}}return e},proto.StyleKey.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.StyleKey.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.StyleKey.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getIndex())&&t.writeInt32(1,r),(r=e.getValue()).length>0&&t.writeString(2,r)},proto.StyleKey.prototype.getIndex=function(){return jspb.Message.getFieldWithDefault(this,1,0)},proto.StyleKey.prototype.setIndex=function(e){jspb.Message.setProto3IntField(this,1,e)},proto.StyleKey.prototype.getValue=function(){return jspb.Message.getFieldWithDefault(this,2,"")},proto.StyleKey.prototype.setValue=function(e){jspb.Message.setProto3StringField(this,2,e)},proto.OneStyleValue=function(e){jspb.Message.initialize(this,e,0,-1,null,proto.OneStyleValue.oneofGroups_)},goog.inherits(proto.OneStyleValue,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.OneStyleValue.displayName="proto.OneStyleValue"),proto.OneStyleValue.oneofGroups_=[[2,3,4,5,6,7,8]],proto.OneStyleValue.ValueCase={VALUE_NOT_SET:0,INT32VL:2,BOOLVL:3,FUNCID:4,DOUBLEVL:5,STRINGVL:6,STRINGARR:7,STYLEVLARR:8},proto.OneStyleValue.prototype.getValueCase=function(){return jspb.Message.computeOneofCase(this,proto.OneStyleValue.oneofGroups_[0])},jspb.Message.GENERATE_TO_OBJECT&&(proto.OneStyleValue.prototype.toObject=function(e){return proto.OneStyleValue.toObject(e,this)},proto.OneStyleValue.toObject=function(e,t){var r,o={key:(r=t.getKey())&&proto.StyleKey.toObject(e,r),int32vl:jspb.Message.getFieldWithDefault(t,2,0),boolvl:jspb.Message.getFieldWithDefault(t,3,!1),funcid:jspb.Message.getFieldWithDefault(t,4,0),doublevl:+jspb.Message.getFieldWithDefault(t,5,0),stringvl:jspb.Message.getFieldWithDefault(t,6,""),stringarr:(r=t.getStringarr())&&proto.StringArr.toObject(e,r),stylevlarr:(r=t.getStylevlarr())&&proto.StyleValueArr.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.OneStyleValue.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.OneStyleValue;return proto.OneStyleValue.deserializeBinaryFromReader(r,t)},proto.OneStyleValue.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new proto.StyleKey;t.readMessage(r,proto.StyleKey.deserializeBinaryFromReader),e.setKey(r);break;case 2:r=t.readInt32();e.setInt32vl(r);break;case 3:r=t.readBool();e.setBoolvl(r);break;case 4:r=t.readInt32();e.setFuncid(r);break;case 5:r=t.readDouble();e.setDoublevl(r);break;case 6:r=t.readString();e.setStringvl(r);break;case 7:r=new proto.StringArr;t.readMessage(r,proto.StringArr.deserializeBinaryFromReader),e.setStringarr(r);break;case 8:r=new proto.StyleValueArr;t.readMessage(r,proto.StyleValueArr.deserializeBinaryFromReader),e.setStylevlarr(r);break;default:t.skipField()}}return e},proto.OneStyleValue.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.OneStyleValue.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.OneStyleValue.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getKey())&&t.writeMessage(1,r,proto.StyleKey.serializeBinaryToWriter),null!=(r=jspb.Message.getField(e,2))&&t.writeInt32(2,r),null!=(r=jspb.Message.getField(e,3))&&t.writeBool(3,r),null!=(r=jspb.Message.getField(e,4))&&t.writeInt32(4,r),null!=(r=jspb.Message.getField(e,5))&&t.writeDouble(5,r),null!=(r=jspb.Message.getField(e,6))&&t.writeString(6,r),null!=(r=e.getStringarr())&&t.writeMessage(7,r,proto.StringArr.serializeBinaryToWriter),null!=(r=e.getStylevlarr())&&t.writeMessage(8,r,proto.StyleValueArr.serializeBinaryToWriter)},proto.OneStyleValue.prototype.getKey=function(){return jspb.Message.getWrapperField(this,proto.StyleKey,1)},proto.OneStyleValue.prototype.setKey=function(e){jspb.Message.setWrapperField(this,1,e)},proto.OneStyleValue.prototype.clearKey=function(){this.setKey(void 0)},proto.OneStyleValue.prototype.hasKey=function(){return null!=jspb.Message.getField(this,1)},proto.OneStyleValue.prototype.getInt32vl=function(){return jspb.Message.getFieldWithDefault(this,2,0)},proto.OneStyleValue.prototype.setInt32vl=function(e){jspb.Message.setOneofField(this,2,proto.OneStyleValue.oneofGroups_[0],e)},proto.OneStyleValue.prototype.clearInt32vl=function(){jspb.Message.setOneofField(this,2,proto.OneStyleValue.oneofGroups_[0],void 0)},proto.OneStyleValue.prototype.hasInt32vl=function(){return null!=jspb.Message.getField(this,2)},proto.OneStyleValue.prototype.getBoolvl=function(){return jspb.Message.getFieldWithDefault(this,3,!1)},proto.OneStyleValue.prototype.setBoolvl=function(e){jspb.Message.setOneofField(this,3,proto.OneStyleValue.oneofGroups_[0],e)},proto.OneStyleValue.prototype.clearBoolvl=function(){jspb.Message.setOneofField(this,3,proto.OneStyleValue.oneofGroups_[0],void 0)},proto.OneStyleValue.prototype.hasBoolvl=function(){return null!=jspb.Message.getField(this,3)},proto.OneStyleValue.prototype.getFuncid=function(){return jspb.Message.getFieldWithDefault(this,4,0)},proto.OneStyleValue.prototype.setFuncid=function(e){jspb.Message.setOneofField(this,4,proto.OneStyleValue.oneofGroups_[0],e)},proto.OneStyleValue.prototype.clearFuncid=function(){jspb.Message.setOneofField(this,4,proto.OneStyleValue.oneofGroups_[0],void 0)},proto.OneStyleValue.prototype.hasFuncid=function(){return null!=jspb.Message.getField(this,4)},proto.OneStyleValue.prototype.getDoublevl=function(){return+jspb.Message.getFieldWithDefault(this,5,0)},proto.OneStyleValue.prototype.setDoublevl=function(e){jspb.Message.setOneofField(this,5,proto.OneStyleValue.oneofGroups_[0],e)},proto.OneStyleValue.prototype.clearDoublevl=function(){jspb.Message.setOneofField(this,5,proto.OneStyleValue.oneofGroups_[0],void 0)},proto.OneStyleValue.prototype.hasDoublevl=function(){return null!=jspb.Message.getField(this,5)},proto.OneStyleValue.prototype.getStringvl=function(){return jspb.Message.getFieldWithDefault(this,6,"")},proto.OneStyleValue.prototype.setStringvl=function(e){jspb.Message.setOneofField(this,6,proto.OneStyleValue.oneofGroups_[0],e)},proto.OneStyleValue.prototype.clearStringvl=function(){jspb.Message.setOneofField(this,6,proto.OneStyleValue.oneofGroups_[0],void 0)},proto.OneStyleValue.prototype.hasStringvl=function(){return null!=jspb.Message.getField(this,6)},proto.OneStyleValue.prototype.getStringarr=function(){return jspb.Message.getWrapperField(this,proto.StringArr,7)},proto.OneStyleValue.prototype.setStringarr=function(e){jspb.Message.setOneofWrapperField(this,7,proto.OneStyleValue.oneofGroups_[0],e)},proto.OneStyleValue.prototype.clearStringarr=function(){this.setStringarr(void 0)},proto.OneStyleValue.prototype.hasStringarr=function(){return null!=jspb.Message.getField(this,7)},proto.OneStyleValue.prototype.getStylevlarr=function(){return jspb.Message.getWrapperField(this,proto.StyleValueArr,8)},proto.OneStyleValue.prototype.setStylevlarr=function(e){jspb.Message.setOneofWrapperField(this,8,proto.OneStyleValue.oneofGroups_[0],e)},proto.OneStyleValue.prototype.clearStylevlarr=function(){this.setStylevlarr(void 0)},proto.OneStyleValue.prototype.hasStylevlarr=function(){return null!=jspb.Message.getField(this,8)},proto.StyleValueArr=function(e){jspb.Message.initialize(this,e,0,-1,proto.StyleValueArr.repeatedFields_,null)},goog.inherits(proto.StyleValueArr,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.StyleValueArr.displayName="proto.StyleValueArr"),proto.StyleValueArr.repeatedFields_=[1],jspb.Message.GENERATE_TO_OBJECT&&(proto.StyleValueArr.prototype.toObject=function(e){return proto.StyleValueArr.toObject(e,this)},proto.StyleValueArr.toObject=function(e,t){var r={vlarrList:jspb.Message.toObjectList(t.getVlarrList(),proto.OneStyleValue.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),proto.StyleValueArr.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.StyleValueArr;return proto.StyleValueArr.deserializeBinaryFromReader(r,t)},proto.StyleValueArr.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new proto.OneStyleValue;t.readMessage(r,proto.OneStyleValue.deserializeBinaryFromReader),e.addVlarr(r);break;default:t.skipField()}}return e},proto.StyleValueArr.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.StyleValueArr.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.StyleValueArr.serializeBinaryToWriter=function(e,t){var r;(r=e.getVlarrList()).length>0&&t.writeRepeatedMessage(1,r,proto.OneStyleValue.serializeBinaryToWriter)},proto.StyleValueArr.prototype.getVlarrList=function(){return jspb.Message.getRepeatedWrapperField(this,proto.OneStyleValue,1)},proto.StyleValueArr.prototype.setVlarrList=function(e){jspb.Message.setRepeatedWrapperField(this,1,e)},proto.StyleValueArr.prototype.addVlarr=function(e,t){return jspb.Message.addToRepeatedWrapperField(this,1,e,proto.OneStyleValue,t)},proto.StyleValueArr.prototype.clearVlarrList=function(){this.setVlarrList([])},proto.SelectorKey=function(e){jspb.Message.initialize(this,e,0,-1,null,null)},goog.inherits(proto.SelectorKey,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.SelectorKey.displayName="proto.SelectorKey"),jspb.Message.GENERATE_TO_OBJECT&&(proto.SelectorKey.prototype.toObject=function(e){return proto.SelectorKey.toObject(e,this)},proto.SelectorKey.toObject=function(e,t){var r={id:jspb.Message.getFieldWithDefault(t,1,0),name:jspb.Message.getFieldWithDefault(t,2,"")};return e&&(r.$jspbMessageInstance=t),r}),proto.SelectorKey.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.SelectorKey;return proto.SelectorKey.deserializeBinaryFromReader(r,t)},proto.SelectorKey.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt32();e.setId(r);break;case 2:r=t.readString();e.setName(r);break;default:t.skipField()}}return e},proto.SelectorKey.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.SelectorKey.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.SelectorKey.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getId())&&t.writeInt32(1,r),(r=e.getName()).length>0&&t.writeString(2,r)},proto.SelectorKey.prototype.getId=function(){return jspb.Message.getFieldWithDefault(this,1,0)},proto.SelectorKey.prototype.setId=function(e){jspb.Message.setProto3IntField(this,1,e)},proto.SelectorKey.prototype.getName=function(){return jspb.Message.getFieldWithDefault(this,2,"")},proto.SelectorKey.prototype.setName=function(e){jspb.Message.setProto3StringField(this,2,e)},proto.CssCell=function(e){jspb.Message.initialize(this,e,0,-1,proto.CssCell.repeatedFields_,null)},goog.inherits(proto.CssCell,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.CssCell.displayName="proto.CssCell"),proto.CssCell.repeatedFields_=[1,2],jspb.Message.GENERATE_TO_OBJECT&&(proto.CssCell.prototype.toObject=function(e){return proto.CssCell.toObject(e,this)},proto.CssCell.toObject=function(e,t){var r={selectorarrList:jspb.Message.toObjectList(t.getSelectorarrList(),proto.SelectorKey.toObject,e),stylearrList:jspb.Message.toObjectList(t.getStylearrList(),proto.OneStyleValue.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),proto.CssCell.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.CssCell;return proto.CssCell.deserializeBinaryFromReader(r,t)},proto.CssCell.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new proto.SelectorKey;t.readMessage(r,proto.SelectorKey.deserializeBinaryFromReader),e.addSelectorarr(r);break;case 2:r=new proto.OneStyleValue;t.readMessage(r,proto.OneStyleValue.deserializeBinaryFromReader),e.addStylearr(r);break;default:t.skipField()}}return e},proto.CssCell.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.CssCell.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.CssCell.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getSelectorarrList()).length>0&&t.writeRepeatedMessage(1,r,proto.SelectorKey.serializeBinaryToWriter),(r=e.getStylearrList()).length>0&&t.writeRepeatedMessage(2,r,proto.OneStyleValue.serializeBinaryToWriter)},proto.CssCell.prototype.getSelectorarrList=function(){return jspb.Message.getRepeatedWrapperField(this,proto.SelectorKey,1)},proto.CssCell.prototype.setSelectorarrList=function(e){jspb.Message.setRepeatedWrapperField(this,1,e)},proto.CssCell.prototype.addSelectorarr=function(e,t){return jspb.Message.addToRepeatedWrapperField(this,1,e,proto.SelectorKey,t)},proto.CssCell.prototype.clearSelectorarrList=function(){this.setSelectorarrList([])},proto.CssCell.prototype.getStylearrList=function(){return jspb.Message.getRepeatedWrapperField(this,proto.OneStyleValue,2)},proto.CssCell.prototype.setStylearrList=function(e){jspb.Message.setRepeatedWrapperField(this,2,e)},proto.CssCell.prototype.addStylearr=function(e,t){return jspb.Message.addToRepeatedWrapperField(this,2,e,proto.OneStyleValue,t)},proto.CssCell.prototype.clearStylearrList=function(){this.setStylearrList([])},proto.TemplateUnit=function(e){jspb.Message.initialize(this,e,0,-1,proto.TemplateUnit.repeatedFields_,null)},goog.inherits(proto.TemplateUnit,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.TemplateUnit.displayName="proto.TemplateUnit"),proto.TemplateUnit.repeatedFields_=[5,6],jspb.Message.GENERATE_TO_OBJECT&&(proto.TemplateUnit.prototype.toObject=function(e){return proto.TemplateUnit.toObject(e,this)},proto.TemplateUnit.toObject=function(e,t){var r={type:jspb.Message.getFieldWithDefault(t,1,""),tag:jspb.Message.getFieldWithDefault(t,2,""),optsid:jspb.Message.getFieldWithDefault(t,3,0),funcrender:jspb.Message.getFieldWithDefault(t,4,0),optsarrList:jspb.Message.toObjectList(t.getOptsarrList(),proto.OneStyleValue.toObject,e),templaterenderList:jspb.Message.toObjectList(t.getTemplaterenderList(),proto.TemplateOne.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),proto.TemplateUnit.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.TemplateUnit;return proto.TemplateUnit.deserializeBinaryFromReader(r,t)},proto.TemplateUnit.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readString();e.setType(r);break;case 2:r=t.readString();e.setTag(r);break;case 3:r=t.readInt32();e.setOptsid(r);break;case 4:r=t.readInt32();e.setFuncrender(r);break;case 5:r=new proto.OneStyleValue;t.readMessage(r,proto.OneStyleValue.deserializeBinaryFromReader),e.addOptsarr(r);break;case 6:r=new proto.TemplateOne;t.readMessage(r,proto.TemplateOne.deserializeBinaryFromReader),e.addTemplaterender(r);break;default:t.skipField()}}return e},proto.TemplateUnit.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.TemplateUnit.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.TemplateUnit.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getType()).length>0&&t.writeString(1,r),(r=e.getTag()).length>0&&t.writeString(2,r),0!==(r=e.getOptsid())&&t.writeInt32(3,r),0!==(r=e.getFuncrender())&&t.writeInt32(4,r),(r=e.getOptsarrList()).length>0&&t.writeRepeatedMessage(5,r,proto.OneStyleValue.serializeBinaryToWriter),(r=e.getTemplaterenderList()).length>0&&t.writeRepeatedMessage(6,r,proto.TemplateOne.serializeBinaryToWriter)},proto.TemplateUnit.prototype.getType=function(){return jspb.Message.getFieldWithDefault(this,1,"")},proto.TemplateUnit.prototype.setType=function(e){jspb.Message.setProto3StringField(this,1,e)},proto.TemplateUnit.prototype.getTag=function(){return jspb.Message.getFieldWithDefault(this,2,"")},proto.TemplateUnit.prototype.setTag=function(e){jspb.Message.setProto3StringField(this,2,e)},proto.TemplateUnit.prototype.getOptsid=function(){return jspb.Message.getFieldWithDefault(this,3,0)},proto.TemplateUnit.prototype.setOptsid=function(e){jspb.Message.setProto3IntField(this,3,e)},proto.TemplateUnit.prototype.getFuncrender=function(){return jspb.Message.getFieldWithDefault(this,4,0)},proto.TemplateUnit.prototype.setFuncrender=function(e){jspb.Message.setProto3IntField(this,4,e)},proto.TemplateUnit.prototype.getOptsarrList=function(){return jspb.Message.getRepeatedWrapperField(this,proto.OneStyleValue,5)},proto.TemplateUnit.prototype.setOptsarrList=function(e){jspb.Message.setRepeatedWrapperField(this,5,e)},proto.TemplateUnit.prototype.addOptsarr=function(e,t){return jspb.Message.addToRepeatedWrapperField(this,5,e,proto.OneStyleValue,t)},proto.TemplateUnit.prototype.clearOptsarrList=function(){this.setOptsarrList([])},proto.TemplateUnit.prototype.getTemplaterenderList=function(){return jspb.Message.getRepeatedWrapperField(this,proto.TemplateOne,6)},proto.TemplateUnit.prototype.setTemplaterenderList=function(e){jspb.Message.setRepeatedWrapperField(this,6,e)},proto.TemplateUnit.prototype.addTemplaterender=function(e,t){return jspb.Message.addToRepeatedWrapperField(this,6,e,proto.TemplateOne,t)},proto.TemplateUnit.prototype.clearTemplaterenderList=function(){this.setTemplaterenderList([])},proto.TemplateOne=function(e){jspb.Message.initialize(this,e,0,-1,proto.TemplateOne.repeatedFields_,null)},goog.inherits(proto.TemplateOne,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.TemplateOne.displayName="proto.TemplateOne"),proto.TemplateOne.repeatedFields_=[2],jspb.Message.GENERATE_TO_OBJECT&&(proto.TemplateOne.prototype.toObject=function(e){return proto.TemplateOne.toObject(e,this)},proto.TemplateOne.toObject=function(e,t){var r,o={id:jspb.Message.getFieldWithDefault(t,1,0),chldsidList:jspb.Message.getRepeatedField(t,2),cv:(r=t.getCv())&&proto.TemplateUnit.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),proto.TemplateOne.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.TemplateOne;return proto.TemplateOne.deserializeBinaryFromReader(r,t)},proto.TemplateOne.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt32();e.setId(r);break;case 2:r=t.readPackedInt32();e.setChldsidList(r);break;case 3:r=new proto.TemplateUnit;t.readMessage(r,proto.TemplateUnit.deserializeBinaryFromReader),e.setCv(r);break;default:t.skipField()}}return e},proto.TemplateOne.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.TemplateOne.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.TemplateOne.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getId())&&t.writeInt32(1,r),(r=e.getChldsidList()).length>0&&t.writePackedInt32(2,r),null!=(r=e.getCv())&&t.writeMessage(3,r,proto.TemplateUnit.serializeBinaryToWriter)},proto.TemplateOne.prototype.getId=function(){return jspb.Message.getFieldWithDefault(this,1,0)},proto.TemplateOne.prototype.setId=function(e){jspb.Message.setProto3IntField(this,1,e)},proto.TemplateOne.prototype.getChldsidList=function(){return jspb.Message.getRepeatedField(this,2)},proto.TemplateOne.prototype.setChldsidList=function(e){jspb.Message.setField(this,2,e||[])},proto.TemplateOne.prototype.addChldsid=function(e,t){jspb.Message.addToRepeatedField(this,2,e,t)},proto.TemplateOne.prototype.clearChldsidList=function(){this.setChldsidList([])},proto.TemplateOne.prototype.getCv=function(){return jspb.Message.getWrapperField(this,proto.TemplateUnit,3)},proto.TemplateOne.prototype.setCv=function(e){jspb.Message.setWrapperField(this,3,e)},proto.TemplateOne.prototype.clearCv=function(){this.setCv(void 0)},proto.TemplateOne.prototype.hasCv=function(){return null!=jspb.Message.getField(this,3)},proto.ExportCell=function(e){jspb.Message.initialize(this,e,0,-1,proto.ExportCell.repeatedFields_,null)},goog.inherits(proto.ExportCell,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.ExportCell.displayName="proto.ExportCell"),proto.ExportCell.repeatedFields_=[2,3],jspb.Message.GENERATE_TO_OBJECT&&(proto.ExportCell.prototype.toObject=function(e){return proto.ExportCell.toObject(e,this)},proto.ExportCell.toObject=function(e,t){var r={tagname:jspb.Message.getFieldWithDefault(t,1,""),cssarrList:jspb.Message.toObjectList(t.getCssarrList(),proto.CssCell.toObject,e),templatearrList:jspb.Message.toObjectList(t.getTemplatearrList(),proto.TemplateOne.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),proto.ExportCell.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.ExportCell;return proto.ExportCell.deserializeBinaryFromReader(r,t)},proto.ExportCell.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readString();e.setTagname(r);break;case 2:r=new proto.CssCell;t.readMessage(r,proto.CssCell.deserializeBinaryFromReader),e.addCssarr(r);break;case 3:r=new proto.TemplateOne;t.readMessage(r,proto.TemplateOne.deserializeBinaryFromReader),e.addTemplatearr(r);break;default:t.skipField()}}return e},proto.ExportCell.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.ExportCell.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.ExportCell.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getTagname()).length>0&&t.writeString(1,r),(r=e.getCssarrList()).length>0&&t.writeRepeatedMessage(2,r,proto.CssCell.serializeBinaryToWriter),(r=e.getTemplatearrList()).length>0&&t.writeRepeatedMessage(3,r,proto.TemplateOne.serializeBinaryToWriter)},proto.ExportCell.prototype.getTagname=function(){return jspb.Message.getFieldWithDefault(this,1,"")},proto.ExportCell.prototype.setTagname=function(e){jspb.Message.setProto3StringField(this,1,e)},proto.ExportCell.prototype.getCssarrList=function(){return jspb.Message.getRepeatedWrapperField(this,proto.CssCell,2)},proto.ExportCell.prototype.setCssarrList=function(e){jspb.Message.setRepeatedWrapperField(this,2,e)},proto.ExportCell.prototype.addCssarr=function(e,t){return jspb.Message.addToRepeatedWrapperField(this,2,e,proto.CssCell,t)},proto.ExportCell.prototype.clearCssarrList=function(){this.setCssarrList([])},proto.ExportCell.prototype.getTemplatearrList=function(){return jspb.Message.getRepeatedWrapperField(this,proto.TemplateOne,3)},proto.ExportCell.prototype.setTemplatearrList=function(e){jspb.Message.setRepeatedWrapperField(this,3,e)},proto.ExportCell.prototype.addTemplatearr=function(e,t){return jspb.Message.addToRepeatedWrapperField(this,3,e,proto.TemplateOne,t)},proto.ExportCell.prototype.clearTemplatearrList=function(){this.setTemplatearrList([])},proto.Version=function(e){jspb.Message.initialize(this,e,0,-1,null,null)},goog.inherits(proto.Version,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.Version.displayName="proto.Version"),jspb.Message.GENERATE_TO_OBJECT&&(proto.Version.prototype.toObject=function(e){return proto.Version.toObject(e,this)},proto.Version.toObject=function(e,t){var r={versionname:jspb.Message.getFieldWithDefault(t,1,""),versioncode:jspb.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),proto.Version.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.Version;return proto.Version.deserializeBinaryFromReader(r,t)},proto.Version.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readString();e.setVersionname(r);break;case 2:r=t.readInt32();e.setVersioncode(r);break;default:t.skipField()}}return e},proto.Version.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.Version.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.Version.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVersionname()).length>0&&t.writeString(1,r),0!==(r=e.getVersioncode())&&t.writeInt32(2,r)},proto.Version.prototype.getVersionname=function(){return jspb.Message.getFieldWithDefault(this,1,"")},proto.Version.prototype.setVersionname=function(e){jspb.Message.setProto3StringField(this,1,e)},proto.Version.prototype.getVersioncode=function(){return jspb.Message.getFieldWithDefault(this,2,0)},proto.Version.prototype.setVersioncode=function(e){jspb.Message.setProto3IntField(this,2,e)},proto.ExportArr=function(e){jspb.Message.initialize(this,e,0,-1,proto.ExportArr.repeatedFields_,null)},goog.inherits(proto.ExportArr,jspb.Message),goog.DEBUG&&!COMPILED&&(proto.ExportArr.displayName="proto.ExportArr"),proto.ExportArr.repeatedFields_=[2],jspb.Message.GENERATE_TO_OBJECT&&(proto.ExportArr.prototype.toObject=function(e){return proto.ExportArr.toObject(e,this)},proto.ExportArr.toObject=function(e,t){var r,o={ver:(r=t.getVer())&&proto.Version.toObject(e,r),valuearrList:jspb.Message.toObjectList(t.getValuearrList(),proto.ExportCell.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),proto.ExportArr.deserializeBinary=function(e){var t=new jspb.BinaryReader(e),r=new proto.ExportArr;return proto.ExportArr.deserializeBinaryFromReader(r,t)},proto.ExportArr.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new proto.Version;t.readMessage(r,proto.Version.deserializeBinaryFromReader),e.setVer(r);break;case 2:r=new proto.ExportCell;t.readMessage(r,proto.ExportCell.deserializeBinaryFromReader),e.addValuearr(r);break;default:t.skipField()}}return e},proto.ExportArr.prototype.serializeBinary=function(){var e=new jspb.BinaryWriter;return proto.ExportArr.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.ExportArr.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getVer())&&t.writeMessage(1,r,proto.Version.serializeBinaryToWriter),(r=e.getValuearrList()).length>0&&t.writeRepeatedMessage(2,r,proto.ExportCell.serializeBinaryToWriter)},proto.ExportArr.prototype.getVer=function(){return jspb.Message.getWrapperField(this,proto.Version,1)},proto.ExportArr.prototype.setVer=function(e){jspb.Message.setWrapperField(this,1,e)},proto.ExportArr.prototype.clearVer=function(){this.setVer(void 0)},proto.ExportArr.prototype.hasVer=function(){return null!=jspb.Message.getField(this,1)},proto.ExportArr.prototype.getValuearrList=function(){return jspb.Message.getRepeatedWrapperField(this,proto.ExportCell,2)},proto.ExportArr.prototype.setValuearrList=function(e){jspb.Message.setRepeatedWrapperField(this,2,e)},proto.ExportArr.prototype.addValuearr=function(e,t){return jspb.Message.addToRepeatedWrapperField(this,2,e,proto.ExportCell,t)},proto.ExportArr.prototype.clearValuearrList=function(){this.setValuearrList([])},goog.object.extend(exports,proto);
|
|
2
|
+
//# sourceMappingURL=vdom_pb.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiot-toolkit/shared-utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19-media-beta.1",
|
|
4
4
|
"description": "aiot shared utils",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=8.0.0"
|
|
@@ -25,10 +25,11 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"chalk": "^2.4.2",
|
|
28
|
+
"google-protobuf": "^3.21.2",
|
|
28
29
|
"qrcode-terminal": "^0.12.0"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"strip-ansi": "^5.2.0"
|
|
32
33
|
},
|
|
33
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "e6e9bb70ea7a79580003ebf9380ab411d4133cef"
|
|
34
35
|
}
|