|
1 | 1 | { |
2 | 2 | "name": "monoco", |
3 | | - "version": "0.5.2", |
| 3 | + "version": "0.5.3", |
4 | 4 | "description": "A Model and a NoSQL Database for Components", |
5 | 5 | "_id": "e89c617b6b15d24", |
6 | 6 | "schemas": { |
|
110 | 110 | "default": "" |
111 | 111 | }, |
112 | 112 | "action": { |
113 | | - "type": "string", |
| 113 | + "type": "javascript", |
114 | 114 | "readOnly": false, |
115 | 115 | "mandatory": true, |
116 | 116 | "default": "" |
|
616 | 616 | "type": "string", |
617 | 617 | "core": true |
618 | 618 | }, |
619 | | - "javascript": { |
620 | | - "name": "javascript", |
621 | | - "type": "string", |
622 | | - "core": true |
623 | | - }, |
624 | 619 | "collection": { |
625 | 620 | "name": "collection", |
626 | 621 | "type": "object", |
|
674 | 669 | }, |
675 | 670 | "core": true |
676 | 671 | }, |
| 672 | + "javascript": { |
| 673 | + "name": "javascript", |
| 674 | + "type": "string", |
| 675 | + "core": true |
| 676 | + }, |
677 | 677 | "message": { |
678 | 678 | "name": "message", |
679 | 679 | "type": "object", |
|
773 | 773 | "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); } } }}", |
774 | 774 | "core": true |
775 | 775 | }, |
776 | | - "165d7138981b5fd": { |
777 | | - "_id": "165d7138981b5fd", |
| 776 | + "1d75f1f9691dbd5": { |
| 777 | + "_id": "1d75f1f9691dbd5", |
778 | 778 | "component": "Monoco", |
779 | 779 | "state": "error", |
780 | 780 | "action": "function error(data) { console.error('monoco: ' + data.message, data.error); }", |
781 | 781 | "core": true |
782 | 782 | }, |
783 | | - "12fa41bbe21ebea": { |
784 | | - "_id": "12fa41bbe21ebea", |
| 783 | + "1a43f1f22a195b5": { |
| 784 | + "_id": "1a43f1f22a195b5", |
785 | 785 | "component": "Monoco", |
786 | 786 | "state": "find", |
787 | 787 | "action": "function find(Class, query) { return $component.find(Class, query);}", |
788 | 788 | "core": true, |
789 | 789 | "useCoreAPI": true |
790 | 790 | }, |
791 | | - "17e0c1585319f98": { |
792 | | - "_id": "17e0c1585319f98", |
| 791 | + "1301a1999816801": { |
| 792 | + "_id": "1301a1999816801", |
793 | 793 | "component": "Monoco", |
794 | 794 | "state": "system", |
795 | 795 | "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; }", |
796 | 796 | "core": true |
797 | 797 | }, |
798 | | - "1b9381e2b71dbfb": { |
799 | | - "_id": "1b9381e2b71dbfb", |
| 798 | + "1da34136b319baa": { |
| 799 | + "_id": "1da34136b319baa", |
800 | 800 | "component": "Monoco", |
801 | 801 | "state": "warning", |
802 | 802 | "action": "function warning(message) { console.warn('monoco: ' + message); }", |
803 | 803 | "core": true |
804 | 804 | }, |
805 | | - "13651149071abcc": { |
806 | | - "_id": "13651149071abcc", |
| 805 | + "130aa1c1d1174c2": { |
| 806 | + "_id": "130aa1c1d1174c2", |
807 | 807 | "component": "MonocoChannel", |
808 | 808 | "state": "listen", |
809 | 809 | "action": "function listen(event, action) { $channel.listen(event, action); }", |
810 | 810 | "core": true, |
811 | 811 | "useCoreAPI": true |
812 | 812 | }, |
813 | | - "1c0a81c78e13485": { |
814 | | - "_id": "1c0a81c78e13485", |
| 813 | + "1418c1ca9a18ca0": { |
| 814 | + "_id": "1418c1ca9a18ca0", |
815 | 815 | "component": "MonocoChannel", |
816 | 816 | "state": "send", |
817 | 817 | "action": "function send(message) { return $channel.send(message); }", |
818 | 818 | "core": true, |
819 | 819 | "useCoreAPI": true |
820 | 820 | }, |
821 | | - "101091f20e19997": { |
822 | | - "_id": "101091f20e19997", |
| 821 | + "1e11d17e321edb6": { |
| 822 | + "_id": "1e11d17e321edb6", |
823 | 823 | "component": "MonocoClassInfo", |
824 | 824 | "state": "collection", |
825 | 825 | "action": "function collection(name) { var result = {}; if (this.metamodel()[name] === 'collection') { result = this.model()[name]; } return result; }", |
826 | 826 | "core": true |
827 | 827 | }, |
828 | | - "156b41f10715cd3": { |
829 | | - "_id": "156b41f10715cd3", |
| 828 | + "1af251e24c103a1": { |
| 829 | + "_id": "1af251e24c103a1", |
830 | 830 | "component": "MonocoClassInfo", |
831 | 831 | "state": "collections", |
832 | 832 | "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; }", |
833 | 833 | "core": true |
834 | 834 | }, |
835 | | - "1f42716da8168bb": { |
836 | | - "_id": "1f42716da8168bb", |
| 835 | + "1461a1c6dd1b848": { |
| 836 | + "_id": "1461a1c6dd1b848", |
837 | 837 | "component": "MonocoClassInfo", |
838 | 838 | "state": "event", |
839 | 839 | "action": "function event(name) { var result = {}; if (this.metamodel()[name] === 'event') { result = this.model()[name]; } return result; }", |
840 | 840 | "core": true |
841 | 841 | }, |
842 | | - "1aa6e132e11ddc6": { |
843 | | - "_id": "1aa6e132e11ddc6", |
| 842 | + "102ba1d1dc1891e": { |
| 843 | + "_id": "102ba1d1dc1891e", |
844 | 844 | "component": "MonocoClassInfo", |
845 | 845 | "state": "events", |
846 | 846 | "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; }", |
847 | 847 | "core": true |
848 | 848 | }, |
849 | | - "10035104eb10a1a": { |
850 | | - "_id": "10035104eb10a1a", |
| 849 | + "180e11627c1d8eb": { |
| 850 | + "_id": "180e11627c1d8eb", |
851 | 851 | "component": "MonocoClassInfo", |
852 | 852 | "state": "method", |
853 | 853 | "action": "function method(name) { var result = {}; if (this.metamodel()[name] === 'method') { result = this.model()[name]; } return result; }", |
854 | 854 | "core": true |
855 | 855 | }, |
856 | | - "10b391126a1634b": { |
857 | | - "_id": "10b391126a1634b", |
| 856 | + "179801c5fb1c2fb": { |
| 857 | + "_id": "179801c5fb1c2fb", |
858 | 858 | "component": "MonocoClassInfo", |
859 | 859 | "state": "methods", |
860 | 860 | "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; }", |
861 | 861 | "core": true |
862 | 862 | }, |
863 | | - "1718d13d1c10b45": { |
864 | | - "_id": "1718d13d1c10b45", |
| 863 | + "1b54e18aeb10298": { |
| 864 | + "_id": "1b54e18aeb10298", |
865 | 865 | "component": "MonocoClassInfo", |
866 | 866 | "state": "properties", |
867 | 867 | "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; }", |
868 | 868 | "core": true |
869 | 869 | }, |
870 | | - "1792f1f6f3118dc": { |
871 | | - "_id": "1792f1f6f3118dc", |
| 870 | + "14a541768d11b26": { |
| 871 | + "_id": "14a541768d11b26", |
872 | 872 | "component": "MonocoClassInfo", |
873 | 873 | "state": "property", |
874 | 874 | "action": "function property(name) { var result = {}; if (this.metamodel()[name] === 'property') { result = this.model()[name]; } return result; }", |
875 | 875 | "core": true |
876 | 876 | }, |
877 | | - "1b437190c51afe4": { |
878 | | - "_id": "1b437190c51afe4", |
| 877 | + "1f4741d38514c8d": { |
| 878 | + "_id": "1f4741d38514c8d", |
879 | 879 | "component": "MonocoComponent", |
880 | 880 | "state": "destroy", |
881 | 881 | "action": "function destroy() { $component.destroy(this.id()); }", |
882 | 882 | "core": true, |
883 | 883 | "useCoreAPI": true |
884 | 884 | }, |
885 | | - "109c116a2c17164": { |
886 | | - "_id": "109c116a2c17164", |
| 885 | + "157671c45f1d95d": { |
| 886 | + "_id": "157671c45f1d95d", |
887 | 887 | "component": "MonocoComponent", |
888 | 888 | "state": "off", |
889 | 889 | "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 + \"'\"}); } } }", |
890 | 890 | "core": true, |
891 | 891 | "useCoreAPI": true |
892 | 892 | }, |
893 | | - "1d07e1115b10a9d": { |
894 | | - "_id": "1d07e1115b10a9d", |
| 893 | + "15dfd10478113ad": { |
| 894 | + "_id": "15dfd10478113ad", |
895 | 895 | "component": "MonocoComponent", |
896 | 896 | "state": "require", |
897 | 897 | "action": "function require(id) { return $component.get(id); }", |
898 | 898 | "core": true, |
899 | 899 | "useCoreAPI": true |
900 | 900 | }, |
901 | | - "195541e3c9137cb": { |
902 | | - "_id": "195541e3c9137cb", |
| 901 | + "170cc156c81793b": { |
| 902 | + "_id": "170cc156c81793b", |
903 | 903 | "component": "MonocoDatabase", |
904 | 904 | "state": "subsystem", |
905 | 905 | "action": "function subsystem(params) { return $db.subsystem(params); }", |
906 | 906 | "core": true, |
907 | 907 | "useCoreAPI": true |
908 | 908 | }, |
909 | | - "1b06e16b3c176ed": { |
910 | | - "_id": "1b06e16b3c176ed", |
| 909 | + "1648d1563a1de03": { |
| 910 | + "_id": "1648d1563a1de03", |
911 | 911 | "component": "MonocoDatabase", |
912 | 912 | "state": "system", |
913 | 913 | "action": "function system(system) { return $db.system(system); }", |
914 | 914 | "core": true, |
915 | 915 | "useCoreAPI": true |
916 | 916 | }, |
917 | | - "1e8b31f1fb18dfc": { |
918 | | - "_id": "1e8b31f1fb18dfc", |
| 917 | + "10c2d155f4140d9": { |
| 918 | + "_id": "10c2d155f4140d9", |
919 | 919 | "component": "MonocoMetamodel", |
920 | 920 | "state": "create", |
921 | 921 | "action": "function create() { $metamodel.create(); }", |
922 | 922 | "core": true, |
923 | 923 | "useCoreAPI": true |
924 | 924 | }, |
925 | | - "1f3f41430a170cf": { |
926 | | - "_id": "1f3f41430a170cf", |
| 925 | + "1d9301ad441bf52": { |
| 926 | + "_id": "1d9301ad441bf52", |
927 | 927 | "component": "MonocoMetamodel", |
928 | 928 | "state": "schema", |
929 | 929 | "action": "function schema(schema) { $metamodel.schema(schema); }", |
930 | 930 | "core": true, |
931 | 931 | "useCoreAPI": true |
932 | 932 | }, |
933 | | - "13a201059413949": { |
934 | | - "_id": "13a201059413949", |
| 933 | + "16c6112d19123b1": { |
| 934 | + "_id": "16c6112d19123b1", |
935 | 935 | "component": "MonocoMetamodel", |
936 | 936 | "state": "type", |
937 | 937 | "action": "function type(type) { $metamodel.type(type); }", |
938 | 938 | "core": true, |
939 | 939 | "useCoreAPI": true |
940 | 940 | }, |
941 | | - "1f53713acf1f5ce": { |
942 | | - "_id": "1f53713acf1f5ce", |
| 941 | + "1a9a41cd1714603": { |
| 942 | + "_id": "1a9a41cd1714603", |
943 | 943 | "component": "MonocoSystem", |
944 | 944 | "state": "sync", |
945 | 945 | "action": "function sync() { var dump = $db.dump(); this.schemas(dump.schemas); this.types(dump.types); this.behaviors(dump.behaviors); this.components(dump.components); }", |
946 | 946 | "core": true, |
947 | 947 | "useCoreAPI": true |
948 | 948 | }, |
949 | | - "1557318a1c1306f": { |
950 | | - "_id": "1557318a1c1306f", |
| 949 | + "1955216597188d9": { |
| 950 | + "_id": "1955216597188d9", |
951 | 951 | "component": "e89c617b6b15d24", |
952 | 952 | "state": "main", |
953 | 953 | "action": "function main() { var monoco = $component.get('monoco'); monoco.ready(); }", |
|
959 | 959 | "Monoco": { |
960 | 960 | "monoco": { |
961 | 961 | "_id": "monoco", |
962 | | - "version": "0.5.2" |
| 962 | + "version": "0.5.3" |
963 | 963 | } |
964 | 964 | }, |
965 | 965 | "MonocoChannel": { |
|
0 commit comments