Skip to content

Commit 3d4a4ae

Browse files
Erwan CarriouErwan Carriou
authored andcommitted
- you can now specify core objects with '_core' property
1 parent 904cee7 commit 3d4a4ae

16 files changed

+286
-243
lines changed

build/syrup.json

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -764,158 +764,158 @@
764764
"core": true,
765765
"useCoreAPI": true
766766
},
767-
"10a841bd1718cc6": {
768-
"_id": "10a841bd1718cc6",
767+
"1375319b4a10504": {
768+
"_id": "1375319b4a10504",
769769
"component": "Syrup",
770770
"state": "error",
771771
"action": "function error(data) {\n console.error('syrup: ' + data.message, data.error);\n}",
772772
"core": true
773773
},
774-
"1d51918d781d430": {
775-
"_id": "1d51918d781d430",
774+
"16a711a3ef1e7fa": {
775+
"_id": "16a711a3ef1e7fa",
776776
"component": "Syrup",
777777
"state": "system",
778778
"action": "function system(name) {\n var System = null,\n system = {},\n systemId = '',\n result = [],\n conf = {};\n \n if (name) {\n conf.master = true;\n conf.name = name;\n System = this.require('SyrupSystem');\n system = new System(conf);\n } else {\n result = $db.SyrupSystem.find({\n 'master': true\n });\n if (result.length) {\n systemId = result[0]._id;\n system = $component.get(systemId);\n }\n }\n return system;\n}",
779779
"core": true,
780780
"useCoreAPI": true
781781
},
782-
"1738b1e21a162f5": {
783-
"_id": "1738b1e21a162f5",
782+
"1368510af819590": {
783+
"_id": "1368510af819590",
784784
"component": "Syrup",
785785
"state": "warning",
786786
"action": "function warning(message) {\n console.warn('syrup: ' + message);\n}",
787787
"core": true
788788
},
789-
"1c17a199a515820": {
790-
"_id": "1c17a199a515820",
789+
"1a6e41371d1ca60": {
790+
"_id": "1a6e41371d1ca60",
791791
"component": "SyrupClassInfo",
792792
"state": "collection",
793793
"action": "function collection(name) {\n var result = {};\n if (this.metamodel()[name] === 'collection') {\n result = this.model()[name];\n } \n \n return result; \n}",
794794
"core": true
795795
},
796-
"1c80516864169ff": {
797-
"_id": "1c80516864169ff",
796+
"14469152cb1280c": {
797+
"_id": "14469152cb1280c",
798798
"component": "SyrupClassInfo",
799799
"state": "collections",
800800
"action": "function collections() {\n var keys = Object.keys(this.metamodel()),\n item = '',\n result = [],\n i = 0,\n length = 0;\n \n length = keys.length; \n \n for (i = 0; i < length; i++) { \n item = keys[i]; \n if (this.metamodel()[item] === 'collection') {\n result.push(item);\n }\n }\n \n return result;\n}",
801801
"core": true
802802
},
803-
"1624a194f511a50": {
804-
"_id": "1624a194f511a50",
803+
"193ef1f5b6180e6": {
804+
"_id": "193ef1f5b6180e6",
805805
"component": "SyrupClassInfo",
806806
"state": "event",
807807
"action": "function event(name) {\n var result = {};\n \n if (this.metamodel()[name] === 'event') {\n result = this.model()[name];\n } \n \n return result;\n}",
808808
"core": true
809809
},
810-
"1575b172571036a": {
811-
"_id": "1575b172571036a",
810+
"18a6d16c4c176bd": {
811+
"_id": "18a6d16c4c176bd",
812812
"component": "SyrupClassInfo",
813813
"state": "events",
814814
"action": "function events() {\n var keys = Object.keys(this.metamodel()),\n item = '',\n result = [],\n i = 0,\n length = 0;\n \n length = keys.length;\n \n for (i = 0; i < length; i++) {\n item = keys[i];\n if (this.metamodel()[item] === 'event') {\n result.push(item);\n }\n } \n return result;\n}",
815815
"core": true
816816
},
817-
"193011715e192d5": {
818-
"_id": "193011715e192d5",
817+
"1d10113518199d0": {
818+
"_id": "1d10113518199d0",
819819
"component": "SyrupClassInfo",
820820
"state": "method",
821821
"action": "function method(name) {\n var result = {};\n if (this.metamodel()[name] === 'method') {\n result = this.model()[name];\n \n }\n \n return result;\n}",
822822
"core": true
823823
},
824-
"174b6112991f3da": {
825-
"_id": "174b6112991f3da",
824+
"105fb15e2b13a1f": {
825+
"_id": "105fb15e2b13a1f",
826826
"component": "SyrupClassInfo",
827827
"state": "methods",
828828
"action": "function methods() {\n var keys = Object.keys(this.metamodel()),\n item = '',\n result = [],\n i = 0,\n length = 0;\n length = keys.length;\n for (i = 0; i < length; i++) {\n item = keys[i];\n if (this.metamodel()[item] === 'method') {\n result.push(item);\n }\n } \n \n return result;\n}",
829829
"core": true
830830
},
831-
"168c913f74118ac": {
832-
"_id": "168c913f74118ac",
831+
"18d3a19ae916cf8": {
832+
"_id": "18d3a19ae916cf8",
833833
"component": "SyrupClassInfo",
834834
"state": "properties",
835835
"action": "function properties() { \n var keys = Object.keys(this.metamodel()),\n item = '',\n result = [],\n i = 0,\n length = 0;\n length = keys.length;\n \n for (i = 0; i < length; i++) {\n item = keys[i];\n if (this.metamodel()[item] === 'property') {\n result.push(item);\n }\n } return result;\n}",
836836
"core": true
837837
},
838-
"1b35d186bf1516a": {
839-
"_id": "1b35d186bf1516a",
838+
"1cd2e1dbbe19816": {
839+
"_id": "1cd2e1dbbe19816",
840840
"component": "SyrupClassInfo",
841841
"state": "property",
842842
"action": "function property(name) {\n var result = {};\n \n if (this.metamodel()[name] === 'property') {\n result = this.model()[name];\n }\n return result;\n}",
843843
"core": true
844844
},
845-
"11c9e1964a1d7ab": {
846-
"_id": "11c9e1964a1d7ab",
845+
"199e81bb871a859": {
846+
"_id": "199e81bb871a859",
847847
"component": "SyrupComponent",
848848
"state": "destroy",
849849
"action": "function destroy() {\n $component.destroy(this.id());\n}",
850850
"core": true,
851851
"useCoreAPI": true
852852
},
853-
"196d217591153cc": {
854-
"_id": "196d217591153cc",
853+
"1dfd5199d61db88": {
854+
"_id": "1dfd5199d61db88",
855855
"component": "SyrupComponent",
856856
"state": "off",
857857
"action": "function off(state, behaviorId) {\n var args = [],\n i = 0,\n length = 0;\n length = arguments.length;\n \n for (i = 0; i < length - 6; i++) {\n args.push(arguments[i]);\n }\n \n if ($workflow.checkParams({\"component\": this, \"methodName\": \"off\", \"args\": args})) {\n if ($metamodel.isValidState(state, this.constructor.name)) {\n $behavior.remove({\"behaviorId\": behaviorId, \"componentId\": this.id(), \"state\": state});\n } else { $helper.getSyrup().warning({ \"message\":\"invoke 'off' method of component '\" + this.id() + \"' with an invalid state '\" + state + \"'\"}); \n }\n }\n}",
858858
"core": true,
859859
"useCoreAPI": true
860860
},
861-
"1ea001a30d1ddf6": {
862-
"_id": "1ea001a30d1ddf6",
861+
"1aec215fc111b02": {
862+
"_id": "1aec215fc111b02",
863863
"component": "SyrupComponent",
864864
"state": "require",
865865
"action": "function require(id) {\n return $component.get(id);\n}",
866866
"core": true,
867867
"useCoreAPI": true
868868
},
869-
"1d08f1f4821d53c": {
870-
"_id": "1d08f1f4821d53c",
869+
"14134143c615504": {
870+
"_id": "14134143c615504",
871871
"component": "SyrupDatabase",
872872
"state": "collections",
873873
"action": "function collections() {\n var result = {},\n collectionName = '';\n \n for (collectionName in $db.store) {\n if ($db.store.hasOwnProperty(collectionName) && collectionName.indexOf('Syrup') !== 0) {\n result[collectionName] = $db[collectionName];\n \n }\n }\n return result;\n}",
874874
"core": true,
875875
"useCoreAPI": true
876876
},
877-
"14b0c1c1d21c8e1": {
878-
"_id": "14b0c1c1d21c8e1",
877+
"1b25d1295914b50": {
878+
"_id": "1b25d1295914b50",
879879
"component": "SyrupDatabase",
880880
"state": "subsystem",
881881
"action": "function subsystem(params) {\n return $db.subsystem(params);\n}",
882882
"core": true,
883883
"useCoreAPI": true
884884
},
885-
"10c0015f4418a85": {
886-
"_id": "10c0015f4418a85",
885+
"147c016938199cd": {
886+
"_id": "147c016938199cd",
887887
"component": "SyrupDatabase",
888888
"state": "system",
889889
"action": "function system(system) {\n return $db.system(system);\n}",
890890
"core": true,
891891
"useCoreAPI": true
892892
},
893-
"1fd5b1e53514079": {
894-
"_id": "1fd5b1e53514079",
893+
"1410814bc011e64": {
894+
"_id": "1410814bc011e64",
895895
"component": "SyrupMetamodel",
896896
"state": "create",
897897
"action": "function create() {\n $metamodel.create();\n}",
898898
"core": true,
899899
"useCoreAPI": true
900900
},
901-
"1090d1835312227": {
902-
"_id": "1090d1835312227",
901+
"17bcf1d54e11d93": {
902+
"_id": "17bcf1d54e11d93",
903903
"component": "SyrupMetamodel",
904904
"state": "schema",
905905
"action": "function schema(schema) {\n $metamodel.schema(schema);\n}",
906906
"core": true,
907907
"useCoreAPI": true
908908
},
909-
"17ae31e8ef19280": {
910-
"_id": "17ae31e8ef19280",
909+
"121d91e9611d6fd": {
910+
"_id": "121d91e9611d6fd",
911911
"component": "SyrupMetamodel",
912912
"state": "type",
913913
"action": "function type(type) {\n $metamodel.type(type);\n}",
914914
"core": true,
915915
"useCoreAPI": true
916916
},
917-
"133151d95416825": {
918-
"_id": "133151d95416825",
917+
"1ceea11fb113cfb": {
918+
"_id": "1ceea11fb113cfb",
919919
"component": "SyrupSystem",
920920
"state": "sync",
921921
"action": "function sync() {\n var system = JSON.parse($db.system());\n \n this.schemas(system.schemas);\n this.types(system.types);\n this.behaviors(system.behaviors);\n this.components(system.components);\n}",

0 commit comments

Comments
 (0)