Skip to content

Commit 998bf60

Browse files
author
Erwan Carriou
committed
- fix bug when using 'useCoreAPI' parameter on 'on' method,
- update 'webType' monoco core addon and - update unit test
1 parent f907b97 commit 998bf60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+342
-310
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/node_modules/
2-
/coverage/
3-
/nbproject/
2+
/coverage/

addons/webType.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
"types": {
88
"html": {
99
"name": "html",
10-
"type": "string"
10+
"type": "string",
11+
"core": true
1112
},
1213
"css": {
1314
"name": "css",
14-
"type": "string"
15+
"type": "string",
16+
"core": true
1517
},
1618
"javascript": {
1719
"name": "javascript",
18-
"type": "string"
20+
"type": "string",
21+
"core": true
1922
}
2023
},
2124
"behaviors": {},

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monoco",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "A Model and a NoSQL Database for Componentsk",
55
"license": "GPLv3",
66
"homepage": "https://github.com/monocojs/monoco.git",

build/monoco-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.js

Lines changed: 65 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.json

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monoco",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "A Model and a NoSQL Database for Components",
55
"_id": "e89c617b6b15d24",
66
"schemas": {
@@ -608,15 +608,18 @@
608608
"types": {
609609
"html": {
610610
"name": "html",
611-
"type": "string"
611+
"type": "string",
612+
"core": true
612613
},
613614
"css": {
614615
"name": "css",
615-
"type": "string"
616+
"type": "string",
617+
"core": true
616618
},
617619
"javascript": {
618620
"name": "javascript",
619-
"type": "string"
621+
"type": "string",
622+
"core": true
620623
},
621624
"collection": {
622625
"name": "collection",
@@ -770,181 +773,181 @@
770773
"action": "function ready() { var systems = [], system = null, i = 0, length = 0; if (typeof document !== 'undefined') { systems = document.querySelectorAll('link[rel=system]'); length = systems.length; for (i = 0; i < length; i++) { system = systems[i]; if (system.getAttribute('async') === 'true') { this.load(system.href, true); } else { this.load(system.href, false); } } }}",
771774
"core": true
772775
},
773-
"10e1a1af4d1cb1b": {
774-
"_id": "10e1a1af4d1cb1b",
776+
"1ab6c1120813cd4": {
777+
"_id": "1ab6c1120813cd4",
775778
"component": "Monoco",
776779
"state": "error",
777780
"action": "function error(data) { console.error('monoco: ' + data.message, data.error); }",
778781
"core": true
779782
},
780-
"1a31b182dc1c6d6": {
781-
"_id": "1a31b182dc1c6d6",
783+
"1dd5b12d7018528": {
784+
"_id": "1dd5b12d7018528",
782785
"component": "Monoco",
783786
"state": "find",
784787
"action": "function find(Class, query) { return $component.find(Class, query);}",
785788
"core": true,
786789
"useCoreAPI": true
787790
},
788-
"1d5921a1c21540e": {
789-
"_id": "1d5921a1c21540e",
791+
"198d3192131c8cf": {
792+
"_id": "198d3192131c8cf",
790793
"component": "Monoco",
791794
"state": "system",
792795
"action": "function system(name) { var System = null, system = {}, result = [], conf = {}; if (name) { conf.master = true; conf.name = name; System = this.require('MonocoSystem'); system = new System(conf); } else { result = this.find('MonocoSystem', {'master': true}); if (result.length) { system = result[0]; } } return system; }",
793796
"core": true
794797
},
795-
"1e8681fed717143": {
796-
"_id": "1e8681fed717143",
798+
"1a82914e86119a9": {
799+
"_id": "1a82914e86119a9",
797800
"component": "Monoco",
798801
"state": "warning",
799802
"action": "function warning(message) { console.warn('monoco: ' + message); }",
800803
"core": true
801804
},
802-
"1c6711a7651a799": {
803-
"_id": "1c6711a7651a799",
805+
"1adee1f0551d3b3": {
806+
"_id": "1adee1f0551d3b3",
804807
"component": "MonocoChannel",
805808
"state": "listen",
806809
"action": "function listen(event, action) { $channel.listen(event, action); }",
807810
"core": true,
808811
"useCoreAPI": true
809812
},
810-
"11ea518e401aecb": {
811-
"_id": "11ea518e401aecb",
813+
"11ed51fcbc1efd4": {
814+
"_id": "11ed51fcbc1efd4",
812815
"component": "MonocoChannel",
813816
"state": "send",
814817
"action": "function send(message) { return $channel.send(message); }",
815818
"core": true,
816819
"useCoreAPI": true
817820
},
818-
"1af941c3d0112c4": {
819-
"_id": "1af941c3d0112c4",
821+
"1f1cb12dc915b94": {
822+
"_id": "1f1cb12dc915b94",
820823
"component": "MonocoClassInfo",
821824
"state": "collection",
822825
"action": "function collection(name) { var result = {}; if (this.metamodel()[name] === 'collection') { result = this.model()[name]; } return result; }",
823826
"core": true
824827
},
825-
"1aedd191f8147b9": {
826-
"_id": "1aedd191f8147b9",
828+
"1cbd813e6017b36": {
829+
"_id": "1cbd813e6017b36",
827830
"component": "MonocoClassInfo",
828831
"state": "collections",
829832
"action": "function collections() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'collection') { result.push(item); } } return result; }",
830833
"core": true
831834
},
832-
"1a4cc1194b1905e": {
833-
"_id": "1a4cc1194b1905e",
835+
"1bada164f41208d": {
836+
"_id": "1bada164f41208d",
834837
"component": "MonocoClassInfo",
835838
"state": "event",
836839
"action": "function event(name) { var result = {}; if (this.metamodel()[name] === 'event') { result = this.model()[name]; } return result; }",
837840
"core": true
838841
},
839-
"1ccab1220b12c3c": {
840-
"_id": "1ccab1220b12c3c",
842+
"18c93111c61cd38": {
843+
"_id": "18c93111c61cd38",
841844
"component": "MonocoClassInfo",
842845
"state": "events",
843846
"action": "function events() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'event') { result.push(item); } } return result; }",
844847
"core": true
845848
},
846-
"1703a1a84f1ce39": {
847-
"_id": "1703a1a84f1ce39",
849+
"14f2c16ce419477": {
850+
"_id": "14f2c16ce419477",
848851
"component": "MonocoClassInfo",
849852
"state": "method",
850853
"action": "function method(name) { var result = {}; if (this.metamodel()[name] === 'method') { result = this.model()[name]; } return result; }",
851854
"core": true
852855
},
853-
"1218611746144df": {
854-
"_id": "1218611746144df",
856+
"16073199f8139dc": {
857+
"_id": "16073199f8139dc",
855858
"component": "MonocoClassInfo",
856859
"state": "methods",
857860
"action": "function methods() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'method') { result.push(item); } } return result; }",
858861
"core": true
859862
},
860-
"1f7fc1edaf1dd73": {
861-
"_id": "1f7fc1edaf1dd73",
863+
"11b4a1ed2c11947": {
864+
"_id": "11b4a1ed2c11947",
862865
"component": "MonocoClassInfo",
863866
"state": "properties",
864867
"action": "function properties() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'property') { result.push(item); } } return result; }",
865868
"core": true
866869
},
867-
"10fd812697184a2": {
868-
"_id": "10fd812697184a2",
870+
"18708169141823a": {
871+
"_id": "18708169141823a",
869872
"component": "MonocoClassInfo",
870873
"state": "property",
871874
"action": "function property(name) { var result = {}; if (this.metamodel()[name] === 'property') { result = this.model()[name]; } return result; }",
872875
"core": true
873876
},
874-
"13a241289f18d75": {
875-
"_id": "13a241289f18d75",
877+
"18b46153d51fd8a": {
878+
"_id": "18b46153d51fd8a",
876879
"component": "MonocoComponent",
877880
"state": "destroy",
878881
"action": "function destroy() { $component.destroy(this.id()); }",
879882
"core": true,
880883
"useCoreAPI": true
881884
},
882-
"117a81b6191f511": {
883-
"_id": "117a81b6191f511",
885+
"16ea9113ba12e55": {
886+
"_id": "16ea9113ba12e55",
884887
"component": "MonocoComponent",
885888
"state": "off",
886889
"action": "function off(state, behaviorId) { var args = [], i = 0, length = 0; length = arguments.length; for (i = 0; i < length - 7; i++) { args.push(arguments[i]); } if ($workflow.checkParams({\"component\": this, \"methodName\": \"off\", \"args\": args})) { if ($metamodel.isValidState(state, this.constructor.name)) {$behavior.remove({\"behaviorId\": behaviorId, \"componentId\": this.id(), \"state\": state}); } else { $helper.getMonoco().warning({ \"message\":\"invoke 'off' method of component '\" + this.id() + \"' with an invalid state '\" + state + \"'\"}); } } }",
887890
"core": true,
888891
"useCoreAPI": true
889892
},
890-
"1c5361f7ca12086": {
891-
"_id": "1c5361f7ca12086",
893+
"126b51ea801654a": {
894+
"_id": "126b51ea801654a",
892895
"component": "MonocoComponent",
893896
"state": "require",
894897
"action": "function require(id) { return $component.get(id); }",
895898
"core": true,
896899
"useCoreAPI": true
897900
},
898-
"1c1dd1c8ce16e1b": {
899-
"_id": "1c1dd1c8ce16e1b",
901+
"1286c1612a1822f": {
902+
"_id": "1286c1612a1822f",
900903
"component": "MonocoDatabase",
901904
"state": "subsystem",
902905
"action": "function subsystem(params) { return $db.subsystem(params); }",
903906
"core": true,
904907
"useCoreAPI": true
905908
},
906-
"16d38108eb1ac7f": {
907-
"_id": "16d38108eb1ac7f",
909+
"177e615c721c6a0": {
910+
"_id": "177e615c721c6a0",
908911
"component": "MonocoDatabase",
909912
"state": "system",
910913
"action": "function system(system) { return $db.system(system); }",
911914
"core": true,
912915
"useCoreAPI": true
913916
},
914-
"1979b19ed31dd38": {
915-
"_id": "1979b19ed31dd38",
917+
"1bc661e40718c2e": {
918+
"_id": "1bc661e40718c2e",
916919
"component": "MonocoMetamodel",
917920
"state": "create",
918921
"action": "function create() { $metamodel.create(); }",
919922
"core": true,
920923
"useCoreAPI": true
921924
},
922-
"186801b42e12cee": {
923-
"_id": "186801b42e12cee",
925+
"11f02174d81367d": {
926+
"_id": "11f02174d81367d",
924927
"component": "MonocoMetamodel",
925928
"state": "schema",
926929
"action": "function schema(schema) { $metamodel.schema(schema); }",
927930
"core": true,
928931
"useCoreAPI": true
929932
},
930-
"13a6b1dc121711b": {
931-
"_id": "13a6b1dc121711b",
933+
"170f11b18216fbf": {
934+
"_id": "170f11b18216fbf",
932935
"component": "MonocoMetamodel",
933936
"state": "type",
934937
"action": "function type(type) { $metamodel.type(type); }",
935938
"core": true,
936939
"useCoreAPI": true
937940
},
938-
"195971aec01a075": {
939-
"_id": "195971aec01a075",
941+
"181dd19ee51dbfa": {
942+
"_id": "181dd19ee51dbfa",
940943
"component": "MonocoSystem",
941944
"state": "sync",
942945
"action": "function sync() { var dump = $db.dump(); this.schemas(dump.schemas); this.types(dump.types); this.behaviors(dump.behaviors); this.components(dump.components); }",
943946
"core": true,
944947
"useCoreAPI": true
945948
},
946-
"1700e1840b13469": {
947-
"_id": "1700e1840b13469",
949+
"1dc0718cfc18cd5": {
950+
"_id": "1dc0718cfc18cd5",
948951
"component": "e89c617b6b15d24",
949952
"state": "main",
950953
"action": "function main() { var monoco = $component.get('monoco'); monoco.ready(); }",
@@ -956,7 +959,7 @@
956959
"Monoco": {
957960
"monoco": {
958961
"_id": "monoco",
959-
"version": "0.5.0"
962+
"version": "0.5.1"
960963
}
961964
},
962965
"MonocoChannel": {

0 commit comments

Comments
 (0)