Skip to content

Commit b2c2780

Browse files
author
Erwan Carriou
committed
Fix bug on monoco.system API
1 parent ee23608 commit b2c2780

Some content is hidden

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

45 files changed

+233
-233
lines changed

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.6.5",
3+
"version": "0.6.6",
44
"description": "A Model and a NoSQL Database for Components",
55
"license": "GPL-3.0",
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: 48 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.json

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monoco",
3-
"version": "0.6.5",
3+
"version": "0.6.6",
44
"description": "A Model and a NoSQL Database for Components",
55
"_id": "e89c617b6b15d24",
66
"schemas": {
@@ -762,165 +762,165 @@
762762
"action": "function main() { 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.require('monoco').load(system.href, true); } else { this.require('monoco').load(system.href, false); } } if (length === 0) { this.require('monoco').ready(); } }}",
763763
"core": true
764764
},
765-
"19abc1e8061bf6a": {
766-
"_id": "19abc1e8061bf6a",
765+
"1d8ea13b841657f": {
766+
"_id": "1d8ea13b841657f",
767767
"component": "Monoco",
768768
"state": "error",
769769
"action": "function error(data) { console.error('monoco: ' + data.message, data.error); }",
770770
"core": true
771771
},
772-
"12ddb1525a136e3": {
773-
"_id": "12ddb1525a136e3",
772+
"1beb7120a31c7f0": {
773+
"_id": "1beb7120a31c7f0",
774774
"component": "Monoco",
775775
"state": "system",
776-
"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; }",
776+
"action": "function system(name) { var System = null, system = {}, systemId = '', result = [], conf = {}; if (name) { conf.master = true; conf.name = name; System = this.require('MonocoSystem'); system = new System(conf); } else { result = $db.MonocoSystem.find({ 'master': true }); if (result.length) { systemId = result[0]._id; system = $component.get(systemId); } } return system;}",
777777
"core": true
778778
},
779-
"1d7f91f3a61981d": {
780-
"_id": "1d7f91f3a61981d",
779+
"15b09135281558a": {
780+
"_id": "15b09135281558a",
781781
"component": "Monoco",
782782
"state": "warning",
783783
"action": "function warning(message) { console.warn('monoco: ' + message); }",
784784
"core": true
785785
},
786-
"1f1ec148d51ef29": {
787-
"_id": "1f1ec148d51ef29",
786+
"1be1c1e47513856": {
787+
"_id": "1be1c1e47513856",
788788
"component": "MonocoChannel",
789789
"state": "listen",
790790
"action": "function listen(event, action) { $channel.listen(event, action); }",
791791
"core": true,
792792
"useCoreAPI": true
793793
},
794-
"111d71a6261835f": {
795-
"_id": "111d71a6261835f",
794+
"1724919c5e1717b": {
795+
"_id": "1724919c5e1717b",
796796
"component": "MonocoChannel",
797797
"state": "send",
798798
"action": "function send(message) { return $channel.send(message); }",
799799
"core": true,
800800
"useCoreAPI": true
801801
},
802-
"14e5218fb312da9": {
803-
"_id": "14e5218fb312da9",
802+
"148341e75812479": {
803+
"_id": "148341e75812479",
804804
"component": "MonocoClassInfo",
805805
"state": "collection",
806806
"action": "function collection(name) { var result = {}; if (this.metamodel()[name] === 'collection') { result = this.model()[name]; } return result; }",
807807
"core": true
808808
},
809-
"1541a120951c2e8": {
810-
"_id": "1541a120951c2e8",
809+
"1a15a123451ad22": {
810+
"_id": "1a15a123451ad22",
811811
"component": "MonocoClassInfo",
812812
"state": "collections",
813813
"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; }",
814814
"core": true
815815
},
816-
"13afd1bb351b287": {
817-
"_id": "13afd1bb351b287",
816+
"111b71a79d1126d": {
817+
"_id": "111b71a79d1126d",
818818
"component": "MonocoClassInfo",
819819
"state": "event",
820820
"action": "function event(name) { var result = {}; if (this.metamodel()[name] === 'event') { result = this.model()[name]; } return result; }",
821821
"core": true
822822
},
823-
"14a5910c801513b": {
824-
"_id": "14a5910c801513b",
823+
"165091cc8c17137": {
824+
"_id": "165091cc8c17137",
825825
"component": "MonocoClassInfo",
826826
"state": "events",
827827
"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; }",
828828
"core": true
829829
},
830-
"127d71d01d1f118": {
831-
"_id": "127d71d01d1f118",
830+
"15fdf14c1015ccb": {
831+
"_id": "15fdf14c1015ccb",
832832
"component": "MonocoClassInfo",
833833
"state": "method",
834834
"action": "function method(name) { var result = {}; if (this.metamodel()[name] === 'method') { result = this.model()[name]; } return result; }",
835835
"core": true
836836
},
837-
"13c1e15c97106fa": {
838-
"_id": "13c1e15c97106fa",
837+
"18b201b0ff1f069": {
838+
"_id": "18b201b0ff1f069",
839839
"component": "MonocoClassInfo",
840840
"state": "methods",
841841
"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; }",
842842
"core": true
843843
},
844-
"1148b1579d1c337": {
845-
"_id": "1148b1579d1c337",
844+
"16822125ea160b3": {
845+
"_id": "16822125ea160b3",
846846
"component": "MonocoClassInfo",
847847
"state": "properties",
848848
"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; }",
849849
"core": true
850850
},
851-
"151441dd321c49a": {
852-
"_id": "151441dd321c49a",
851+
"153651b73b1e19b": {
852+
"_id": "153651b73b1e19b",
853853
"component": "MonocoClassInfo",
854854
"state": "property",
855855
"action": "function property(name) { var result = {}; if (this.metamodel()[name] === 'property') { result = this.model()[name]; } return result; }",
856856
"core": true
857857
},
858-
"172061151717e82": {
859-
"_id": "172061151717e82",
858+
"1abd11501813100": {
859+
"_id": "1abd11501813100",
860860
"component": "MonocoComponent",
861861
"state": "destroy",
862862
"action": "function destroy() { $component.destroy(this.id()); }",
863863
"core": true,
864864
"useCoreAPI": true
865865
},
866-
"103231088913bc9": {
867-
"_id": "103231088913bc9",
866+
"1a755107de1bbc6": {
867+
"_id": "1a755107de1bbc6",
868868
"component": "MonocoComponent",
869869
"state": "off",
870870
"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 + \"'\"}); } } }",
871871
"core": true,
872872
"useCoreAPI": true
873873
},
874-
"1688a1f2f511efa": {
875-
"_id": "1688a1f2f511efa",
874+
"1123715c321d206": {
875+
"_id": "1123715c321d206",
876876
"component": "MonocoComponent",
877877
"state": "require",
878878
"action": "function require(id) { return $component.get(id); }",
879879
"core": true,
880880
"useCoreAPI": true
881881
},
882-
"156781141b13357": {
883-
"_id": "156781141b13357",
882+
"157fa1e64919930": {
883+
"_id": "157fa1e64919930",
884884
"component": "MonocoDatabase",
885885
"state": "subsystem",
886886
"action": "function subsystem(params) { return $db.subsystem(params); }",
887887
"core": true,
888888
"useCoreAPI": true
889889
},
890-
"19a9211da21537b": {
891-
"_id": "19a9211da21537b",
890+
"19b6510efb1756f": {
891+
"_id": "19b6510efb1756f",
892892
"component": "MonocoDatabase",
893893
"state": "system",
894894
"action": "function system(system) { return $db.system(system); }",
895895
"core": true,
896896
"useCoreAPI": true
897897
},
898-
"1c6de1036413c57": {
899-
"_id": "1c6de1036413c57",
898+
"14c3c1a77a1607b": {
899+
"_id": "14c3c1a77a1607b",
900900
"component": "MonocoMetamodel",
901901
"state": "create",
902902
"action": "function create() { $metamodel.create(); }",
903903
"core": true,
904904
"useCoreAPI": true
905905
},
906-
"1fee91461b1544e": {
907-
"_id": "1fee91461b1544e",
906+
"1da4d12d1319611": {
907+
"_id": "1da4d12d1319611",
908908
"component": "MonocoMetamodel",
909909
"state": "schema",
910910
"action": "function schema(schema) { $metamodel.schema(schema); }",
911911
"core": true,
912912
"useCoreAPI": true
913913
},
914-
"1a71a19e5b16c12": {
915-
"_id": "1a71a19e5b16c12",
914+
"1a0021589912d96": {
915+
"_id": "1a0021589912d96",
916916
"component": "MonocoMetamodel",
917917
"state": "type",
918918
"action": "function type(type) { $metamodel.type(type); }",
919919
"core": true,
920920
"useCoreAPI": true
921921
},
922-
"11cf91277b11aaf": {
923-
"_id": "11cf91277b11aaf",
922+
"1f88a17eff11ceb": {
923+
"_id": "1f88a17eff11ceb",
924924
"component": "MonocoSystem",
925925
"state": "sync",
926926
"action": "function sync() { var dump = $db.dump(); this.schemas(dump.schemas); this.types(dump.types); this.behaviors(dump.behaviors); this.components(dump.components); }",
@@ -932,7 +932,7 @@
932932
"Monoco": {
933933
"monoco": {
934934
"_id": "monoco",
935-
"version": "0.6.5"
935+
"version": "0.6.6"
936936
}
937937
},
938938
"MonocoChannel": {

0 commit comments

Comments
 (0)