@izara_project/izara-market-library-service-schemas 1.0.64 → 1.0.66
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/package.json +1 -1
- package/src/GenerateCodeLibs/src/Consts.js +7 -2
- package/src/MainLibs/src/Consts.js +30 -24
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/create/template.ejs +4 -4
- package/src/reStructure/TemplateData/EndpointPerService/mainFunction/update/template.ejs +1 -1
- package/src/reStructure/TemplateData/findData/GetByStorage/getByDynamo.ejs +2 -1
- package/src/reStructure/TemplateData/findData/GetByStorage/getByGraph.ejs +2 -1
- package/src/reStructure/TemplateData/findData/mainFunction/template.ejs +2 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/confirmReserved/mainFunction/template.ejs +2 -0
- package/src/reStructure/TemplateData/flowSchema/components/upload/createObjectComplete/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/data.js +3 -1
- package/src/reStructure/TemplateData/flowSchema/components/upload/preSignUrl/reservedLimit/mainFunction/template.ejs +14 -0
- package/src/reStructure/TemplateData/flowSchema/flowSchemaOwnTopic/FlowSchemaComponent/handler/template.ejs +0 -4
- package/src/reStructure/TemplateData/perActionComplete/create/yaml/data.js +1 -1
- package/src/reStructure/TemplateData/perActionComplete/delete/yaml/data.js +1 -1
- package/src/reStructure/TemplateData/perActionComplete/get/yaml/data.js +1 -1
- package/src/reStructure/TemplateData/perActionComplete/update/yaml/data.js +1 -1
- package/src/reStructure/TemplateData/processLogical/yaml/data.js +2 -2
- package/src/reStructure/TemplateData/processLogicalPagination/yaml/dsq/data.js +1 -1
- package/src/reStructure/TemplateData/processLogicalPagination/yaml/sqs/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/api/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/data.js +132 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/dsq/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/inv/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/sqs/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/data.js +73 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/apiTemplate.ejs +155 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/dsqTemplate.ejs +202 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/invTemplate.ejs +144 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/handler/templateByHandler/sqsTemplate.ejs +181 -0
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/action/mainFunction/template.ejs +11 -11
- package/src/reStructure/TemplateData/relationshipPerAction/changeRelationship/complete/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/api/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/data.js +151 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/dsq/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/inv/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/sqs/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/data.js +73 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/apiTemplate.ejs +155 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/dsqTemplate.ejs +202 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/invTemplate.ejs +144 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/action/handler/templateByHandler/sqsTemplate.ejs +181 -0
- package/src/reStructure/TemplateData/relationshipPerAction/create/complete/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/api/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/data.js +151 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/dsq/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/inv/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/sqs/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/data.js +73 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/apiTemplate.ejs +155 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/dsqTemplate.ejs +202 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/invTemplate.ejs +144 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/action/handler/templateByHandler/sqsTemplate.ejs +181 -0
- package/src/reStructure/TemplateData/relationshipPerAction/delete/complete/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/generateTemplateData.js +131 -88
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/api/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/data.js +151 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/inv/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/data.js +73 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/apiTemplate.ejs +155 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/dsqTemplate.ejs +202 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/invTemplate.ejs +144 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/action/handler/templateByHandler/sqsTemplate.ejs +181 -0
- package/src/reStructure/TemplateData/relationshipPerAction/get/complete/functionYaml/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/data.js +153 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/data.js +73 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/apiTemplate.ejs +172 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/dsqTemplate.ejs +218 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/invTemplate.ejs +161 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/handler/templateByHandler/sqsTemplate.ejs +197 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/data.js +59 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/mainFunction/template.ejs +386 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/data.js +77 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/snsTemplate.ejs +59 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/action/sns-in-sqs/sqsTemplate.ejs +43 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/data.js +121 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/functionYaml/template.ejs +20 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/data.js +60 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/handler/sqs/template.ejs +129 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/data.js +56 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/mainFunction/template.ejs +159 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/data.js +71 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/sns-in-sqs/template.ejs +46 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/data.js +71 -0
- package/src/reStructure/TemplateData/relationshipPerAction/moveRelationship/complete/sns-out/template.ejs +10 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/api/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/data.js +154 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/dsq/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/inv/data.js +2 -2
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/sqs/data.js +1 -1
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/apiTemplate.ejs +20 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/dsqTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/invTemplate.ejs +13 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/functionYaml/templateByHandler/sqsTemplate.ejs +17 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/data.js +73 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/template.ejs +9 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/apiTemplate.ejs +155 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/dsqTemplate.ejs +202 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/invTemplate.ejs +144 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/action/handler/templateByHandler/sqsTemplate.ejs +181 -0
- package/src/reStructure/TemplateData/relationshipPerAction/update/complete/functionYaml/data.js +1 -1
|
@@ -30,27 +30,28 @@ const {
|
|
|
30
30
|
// UPDATE related imports
|
|
31
31
|
const updateActionImports = {
|
|
32
32
|
mainFunction: require('./update/action/mainFunction/data'),
|
|
33
|
-
functionYaml:
|
|
34
|
-
|
|
35
|
-
inv: require('./update/action/functionYaml/inv/data'),
|
|
36
|
-
dsq: require('./update/action/functionYaml/dsq/data'),
|
|
37
|
-
sqs: require('./update/action/functionYaml/sqs/data')
|
|
38
|
-
},
|
|
39
|
-
handler: {
|
|
40
|
-
api: require('./update/action/handler/api/data'),
|
|
41
|
-
inv: require('./update/action/handler/inv/data'),
|
|
42
|
-
dsq: require('./update/action/handler/dsq/data'),
|
|
43
|
-
sqs: require('./update/action/handler/sqs/data')
|
|
44
|
-
},
|
|
33
|
+
functionYaml: require('./update/action/functionYaml/data'),
|
|
34
|
+
handler: require('./update/action/handler/data'),
|
|
45
35
|
snsInSqs: require('./update/action/sns-in-sqs/data')
|
|
36
|
+
// functionYaml: {
|
|
37
|
+
// api: require('./update/action/functionYaml/api/data'),
|
|
38
|
+
// inv: require('./update/action/functionYaml/inv/data'),
|
|
39
|
+
// dsq: require('./update/action/functionYaml/dsq/data'),
|
|
40
|
+
// sqs: require('./update/action/functionYaml/sqs/data')
|
|
41
|
+
// },
|
|
42
|
+
// handler: {
|
|
43
|
+
// api: require('./update/action/handler/api/data'),
|
|
44
|
+
// inv: require('./update/action/handler/inv/data'),
|
|
45
|
+
// dsq: require('./update/action/handler/dsq/data'),
|
|
46
|
+
// sqs: require('./update/action/handler/sqs/data')
|
|
47
|
+
// },
|
|
48
|
+
|
|
46
49
|
};
|
|
47
50
|
|
|
48
51
|
const updateCompleteImports = {
|
|
49
52
|
mainFunction: require('./update/complete/mainFunction/data'),
|
|
50
53
|
functionYaml: require('./update/complete/functionYaml/data'),
|
|
51
|
-
handler:
|
|
52
|
-
sqs: require('./update/complete/handler/sqs/data')
|
|
53
|
-
},
|
|
54
|
+
handler: require('./update/complete/handler/sqs/data'),
|
|
54
55
|
snsInSqs: require('./update/complete/sns-in-sqs/data'),
|
|
55
56
|
snsOut: require('./update/complete/sns-out/data')
|
|
56
57
|
};
|
|
@@ -58,27 +59,28 @@ const updateCompleteImports = {
|
|
|
58
59
|
// CREATE related imports
|
|
59
60
|
const createActionImports = {
|
|
60
61
|
mainFunction: require('./create/action/mainFunction/data'),
|
|
61
|
-
functionYaml:
|
|
62
|
-
|
|
63
|
-
inv: require('./create/action/functionYaml/inv/data'),
|
|
64
|
-
dsq: require('./create/action/functionYaml/dsq/data'),
|
|
65
|
-
sqs: require('./create/action/functionYaml/sqs/data')
|
|
66
|
-
},
|
|
67
|
-
handler: {
|
|
68
|
-
api: require('./create/action/handler/api/data'),
|
|
69
|
-
inv: require('./create/action/handler/inv/data'),
|
|
70
|
-
dsq: require('./create/action/handler/dsq/data'),
|
|
71
|
-
sqs: require('./create/action/handler/sqs/data')
|
|
72
|
-
},
|
|
62
|
+
functionYaml: require('./create/action/functionYaml/data'),
|
|
63
|
+
handler: require("./create/action/handler/data"),
|
|
73
64
|
snsInSqs: require('./create/action/sns-in-sqs/data')
|
|
65
|
+
// functionYaml: {
|
|
66
|
+
// api: require('./create/action/functionYaml/api/data'),
|
|
67
|
+
// inv: require('./create/action/functionYaml/inv/data'),
|
|
68
|
+
// dsq: require('./create/action/functionYaml/dsq/data'),
|
|
69
|
+
// sqs: require('./create/action/functionYaml/sqs/data')
|
|
70
|
+
// },
|
|
71
|
+
// handler: {
|
|
72
|
+
// api: require('./create/action/handler/api/data'),
|
|
73
|
+
// inv: require('./create/action/handler/inv/data'),
|
|
74
|
+
// dsq: require('./create/action/handler/dsq/data'),
|
|
75
|
+
// sqs: require('./create/action/handler/sqs/data')
|
|
76
|
+
// },
|
|
77
|
+
|
|
74
78
|
};
|
|
75
79
|
|
|
76
80
|
const createCompleteImports = {
|
|
77
81
|
mainFunction: require('./create/complete/mainFunction/data'),
|
|
78
82
|
functionYaml: require('./create/complete/functionYaml/data'),
|
|
79
|
-
handler:
|
|
80
|
-
sqs: require('./create/complete/handler/sqs/data')
|
|
81
|
-
},
|
|
83
|
+
handler: require('./create/complete/handler/sqs/data'),
|
|
82
84
|
snsInSqs: require('./create/complete/sns-in-sqs/data'),
|
|
83
85
|
snsOut: require('./create/complete/sns-out/data')
|
|
84
86
|
};
|
|
@@ -86,54 +88,54 @@ const createCompleteImports = {
|
|
|
86
88
|
// DELETE related imports
|
|
87
89
|
const deleteActionImports = {
|
|
88
90
|
mainFunction: require('./delete/action/mainFunction/data'),
|
|
89
|
-
functionYaml:
|
|
90
|
-
|
|
91
|
-
dsq: require('./delete/action/functionYaml/dsq/data'),
|
|
92
|
-
inv: require('./delete/action/functionYaml/inv/data'),
|
|
93
|
-
sqs: require('./delete/action/functionYaml/sqs/data')
|
|
94
|
-
},
|
|
95
|
-
handler: {
|
|
96
|
-
api: require('./delete/action/handler/api/data'),
|
|
97
|
-
inv: require('./delete/action/handler/inv/data'),
|
|
98
|
-
dsq: require('./delete/action/handler/dsq/data'),
|
|
99
|
-
sqs: require('./delete/action/handler/sqs/data')
|
|
100
|
-
},
|
|
91
|
+
functionYaml: require('./delete/action/functionYaml/data'),
|
|
92
|
+
handler: require("./delete/action/handler/data"),
|
|
101
93
|
snsInSqs: require('./delete/action/sns-in-sqs/data')
|
|
94
|
+
// functionYaml: {
|
|
95
|
+
// api: require('./delete/action/functionYaml/api/data'),
|
|
96
|
+
// dsq: require('./delete/action/functionYaml/dsq/data'),
|
|
97
|
+
// inv: require('./delete/action/functionYaml/inv/data'),
|
|
98
|
+
// sqs: require('./delete/action/functionYaml/sqs/data')
|
|
99
|
+
// },
|
|
100
|
+
// handler: {
|
|
101
|
+
// api: require('./delete/action/handler/api/data'),
|
|
102
|
+
// inv: require('./delete/action/handler/inv/data'),
|
|
103
|
+
// dsq: require('./delete/action/handler/dsq/data'),
|
|
104
|
+
// sqs: require('./delete/action/handler/sqs/data')
|
|
105
|
+
// },
|
|
102
106
|
};
|
|
103
107
|
|
|
104
108
|
const deleteCompleteImports = {
|
|
105
109
|
mainFunction: require('./delete/complete/mainFunction/data'),
|
|
106
110
|
functionYaml: require('./delete/complete/functionYaml/data'),
|
|
107
|
-
handler:
|
|
108
|
-
sqs: require('./delete/complete/handler/sqs/data')
|
|
109
|
-
},
|
|
111
|
+
handler: require('./delete/complete/handler/sqs/data'),
|
|
110
112
|
snsInSqs: require('./delete/complete/sns-in-sqs/data'),
|
|
111
113
|
snsOut: require('./delete/complete/sns-out/data')
|
|
112
114
|
};
|
|
113
115
|
|
|
114
116
|
const getActionImports = {
|
|
115
117
|
mainFunction: require('./get/action/mainFunction/data'),
|
|
116
|
-
functionYaml:
|
|
117
|
-
|
|
118
|
-
dsq: require('./get/action/functionYaml/dsq/data'),
|
|
119
|
-
inv: require('./get/action/functionYaml/inv/data'),
|
|
120
|
-
sqs: require('./get/action/functionYaml/sqs/data')
|
|
121
|
-
},
|
|
122
|
-
handler: {
|
|
123
|
-
api: require('./get/action/handler/api/data'),
|
|
124
|
-
inv: require('./get/action/handler/inv/data'),
|
|
125
|
-
dsq: require('./get/action/handler/dsq/data'),
|
|
126
|
-
sqs: require('./get/action/handler/sqs/data')
|
|
127
|
-
},
|
|
118
|
+
functionYaml: require("./get/action/functionYaml/data"),
|
|
119
|
+
handler: require('./get/action/handler/data'),
|
|
128
120
|
snsInSqs: require('./get/action/sns-in-sqs/data')
|
|
121
|
+
// functionYaml: {
|
|
122
|
+
// api: require('./get/action/functionYaml/api/data'),
|
|
123
|
+
// dsq: require('./get/action/functionYaml/dsq/data'),
|
|
124
|
+
// inv: require('./get/action/functionYaml/inv/data'),
|
|
125
|
+
// sqs: require('./get/action/functionYaml/sqs/data')
|
|
126
|
+
// },
|
|
127
|
+
// handler: {
|
|
128
|
+
// api: require('./get/action/handler/api/data'),
|
|
129
|
+
// inv: require('./get/action/handler/inv/data'),
|
|
130
|
+
// dsq: require('./get/action/handler/dsq/data'),
|
|
131
|
+
// sqs: require('./get/action/handler/sqs/data')
|
|
132
|
+
// },
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
const getCompleteImports = {
|
|
132
136
|
mainFunction: require('./get/complete/mainFunction/data'),
|
|
133
137
|
functionYaml: require('./get/complete/functionYaml/data'),
|
|
134
|
-
handler:
|
|
135
|
-
sqs: require('./get/complete/handler/sqs/data')
|
|
136
|
-
},
|
|
138
|
+
handler: require('./get/complete/handler/sqs/data'),
|
|
137
139
|
snsInSqs: require('./get/complete/sns-in-sqs/data'),
|
|
138
140
|
snsOut: require('./get/complete/sns-out/data')
|
|
139
141
|
}
|
|
@@ -148,19 +150,36 @@ const changeRelationshipCompleteImports = {
|
|
|
148
150
|
|
|
149
151
|
const changeRelationshipActionImports = {
|
|
150
152
|
mainFunction: require('./changeRelationship/action/mainFunction/data'),
|
|
151
|
-
handler:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
handler: require('./changeRelationship/action/handler/data'),
|
|
154
|
+
snsInSqs: require('./changeRelationship/action/sns-in-sqs/data'),
|
|
155
|
+
functionYaml: require('./changeRelationship/action/functionYaml/data')
|
|
156
|
+
// handler: {
|
|
157
|
+
// api: require('./changeRelationship/action/handler/api/data'),
|
|
158
|
+
// dsp: require("./changeRelationship/action/handler/dsq/data"),
|
|
159
|
+
// inv: require('./changeRelationship/action/handler/inv/data'),
|
|
160
|
+
// sqs: require('./changeRelationship/action/handler/sqs/data')
|
|
161
|
+
// },
|
|
162
|
+
// functionYaml: {
|
|
163
|
+
// api: require('./changeRelationship/action/functionYaml/api/data'),
|
|
164
|
+
// dsp: require("./changeRelationship/action/functionYaml/dsq/data"),
|
|
165
|
+
// inv: require('./changeRelationship/action/functionYaml/inv/data'),
|
|
166
|
+
// sqs: require('./changeRelationship/action/functionYaml/sqs/data')
|
|
167
|
+
// },
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const moveRelationshipActionImports = {
|
|
171
|
+
mainFunction: require('./moveRelationship/action/mainFunction/data'),
|
|
172
|
+
functionYaml: require('./moveRelationship/action/functionYaml/data'),
|
|
173
|
+
handler: require('./moveRelationship/action/handler/data'),
|
|
174
|
+
snsInSqs: require("./moveRelationship/action/sns-in-sqs/data")
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const moveRelationshipCompleteImports = {
|
|
178
|
+
mainFunction: require('./moveRelationship/complete/mainFunction/data'),
|
|
179
|
+
functionYaml: require('./moveRelationship/complete/functionYaml/data'),
|
|
180
|
+
handler: require('./moveRelationship/complete/handler/sqs/data'),
|
|
181
|
+
snsInSqs: require("./moveRelationship/complete/sns-in-sqs/data"),
|
|
182
|
+
snsOut: require('./moveRelationship/complete/sns-out/data')
|
|
164
183
|
}
|
|
165
184
|
|
|
166
185
|
/**
|
|
@@ -186,11 +205,11 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
186
205
|
const updateMainFunction = updateActionImports.mainFunction(_izContext, saveFilePath);
|
|
187
206
|
const updateCompleteMainFunction = updateCompleteImports.mainFunction(_izContext, saveFilePath);
|
|
188
207
|
|
|
189
|
-
const updateFunctionYaml =
|
|
208
|
+
const updateFunctionYaml = updateActionImports.functionYaml(_izContext, allObjectRelationships, saveFilePath);
|
|
190
209
|
const updateCompleteYaml = updateCompleteImports.functionYaml(_izContext, saveFilePath);
|
|
191
210
|
|
|
192
|
-
const updateHandlers =
|
|
193
|
-
const updateCompleteHandler = updateCompleteImports.handler
|
|
211
|
+
const updateHandlers = updateActionImports.handler(_izContext, saveFilePath);
|
|
212
|
+
const updateCompleteHandler = updateCompleteImports.handler(_izContext, saveFilePath);
|
|
194
213
|
|
|
195
214
|
const updateSnsInSqs = updateActionImports.snsInSqs(_izContext, saveFilePath);
|
|
196
215
|
const updateCompleteSnsInSqs = updateCompleteImports.snsInSqs(_izContext, saveFilePath);
|
|
@@ -200,11 +219,11 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
200
219
|
const createMainFunction = createActionImports.mainFunction(_izContext, saveFilePath);
|
|
201
220
|
const createCompleteMainFunction = createCompleteImports.mainFunction(_izContext, saveFilePath);
|
|
202
221
|
|
|
203
|
-
const createFunctionYaml =
|
|
222
|
+
const createFunctionYaml = createActionImports.functionYaml(_izContext, allObjectRelationships, saveFilePath);
|
|
204
223
|
const createCompleteYaml = createCompleteImports.functionYaml(_izContext, saveFilePath);
|
|
205
224
|
|
|
206
|
-
const createHandlers =
|
|
207
|
-
const createCompleteHandler = createCompleteImports.handler
|
|
225
|
+
const createHandlers = createActionImports.handler(_izContext, saveFilePath);
|
|
226
|
+
const createCompleteHandler = createCompleteImports.handler(_izContext, saveFilePath);
|
|
208
227
|
|
|
209
228
|
const createSnsInSqs = createActionImports.snsInSqs(_izContext, saveFilePath);
|
|
210
229
|
const createCompleteSnsInSqs = createCompleteImports.snsInSqs(_izContext, saveFilePath);
|
|
@@ -214,11 +233,11 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
214
233
|
const deleteMainFunction = deleteActionImports.mainFunction(_izContext, saveFilePath);
|
|
215
234
|
const deleteCompleteMainFunction = deleteCompleteImports.mainFunction(_izContext, saveFilePath);
|
|
216
235
|
|
|
217
|
-
const deleteFunctionYaml =
|
|
236
|
+
const deleteFunctionYaml = deleteActionImports.functionYaml(_izContext, allObjectRelationships, saveFilePath);
|
|
218
237
|
const deleteCompleteYaml = deleteCompleteImports.functionYaml(_izContext, saveFilePath);
|
|
219
238
|
|
|
220
|
-
const deleteHandlers =
|
|
221
|
-
const deleteCompleteHandler = deleteCompleteImports.handler
|
|
239
|
+
const deleteHandlers = deleteActionImports.handler(_izContext, saveFilePath);
|
|
240
|
+
const deleteCompleteHandler = deleteCompleteImports.handler(_izContext, saveFilePath);
|
|
222
241
|
|
|
223
242
|
const deleteSnsInSqs = deleteActionImports.snsInSqs(_izContext, saveFilePath);
|
|
224
243
|
const deleteCompleteSnsInSqs = deleteCompleteImports.snsInSqs(_izContext, saveFilePath);
|
|
@@ -228,11 +247,11 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
228
247
|
const getMainFunction = getActionImports.mainFunction(_izContext, saveFilePath);
|
|
229
248
|
const getCompleteMainFunction = getCompleteImports.mainFunction(_izContext, saveFilePath);
|
|
230
249
|
|
|
231
|
-
const getFunctionYaml =
|
|
232
|
-
const getCompleteYaml = getCompleteImports.handler
|
|
250
|
+
const getFunctionYaml = getActionImports.functionYaml(_izContext, allObjectRelationships, saveFilePath);
|
|
251
|
+
const getCompleteYaml = getCompleteImports.handler(_izContext, saveFilePath);
|
|
233
252
|
|
|
234
253
|
const getHandlers = Object.values(getActionImports.handler).map(fn => fn(_izContext, saveFilePath)).flat();
|
|
235
|
-
const getCompleteHandler = getCompleteImports.handler
|
|
254
|
+
const getCompleteHandler = getCompleteImports.handler(_izContext, saveFilePath);
|
|
236
255
|
|
|
237
256
|
const getSnsInSqs = getActionImports.snsInSqs(_izContext, saveFilePath);
|
|
238
257
|
const getCompleteSnsInSqs = getCompleteImports.snsInSqs(_izContext, saveFilePath);
|
|
@@ -242,16 +261,26 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
242
261
|
const changeRelMainFunction = changeRelationshipActionImports.mainFunction(_izContext, saveFilePath);
|
|
243
262
|
const changeRelCompleteMainFunction = changeRelationshipCompleteImports.mainFunction(_izContext, saveFilePath);
|
|
244
263
|
|
|
245
|
-
const changeRelFunctionYaml =
|
|
264
|
+
const changeRelFunctionYaml = changeRelationshipActionImports.functionYaml(_izContext, saveFilePath);
|
|
246
265
|
const changeRelCompleteYaml = changeRelationshipCompleteImports.functionYaml(_izContext, saveFilePath);
|
|
247
266
|
|
|
248
|
-
const changeRelHandlers =
|
|
267
|
+
const changeRelHandlers = changeRelationshipActionImports.handler(_izContext, saveFilePath);
|
|
249
268
|
const changeRelCompleteHandler = changeRelationshipCompleteImports.handler(_izContext, saveFilePath);
|
|
250
269
|
|
|
251
270
|
const changeRelSnsInSqs = changeRelationshipActionImports.snsInSqs(_izContext, saveFilePath);
|
|
252
271
|
const changeRelCompleteSnsInSqs = changeRelationshipCompleteImports.snsInSqs(_izContext, saveFilePath);
|
|
253
272
|
const changeRelCompleteSnsOut = changeRelationshipCompleteImports.snsOut(_izContext, saveFilePath);
|
|
254
273
|
|
|
274
|
+
const moveRelMainFunction = moveRelationshipActionImports.mainFunction(_izContext, saveFilePath);
|
|
275
|
+
const moveRelFunctionYaml = moveRelationshipActionImports.functionYaml(_izContext, allObjectRelationships, saveFilePath);
|
|
276
|
+
const moveRelHandler = moveRelationshipActionImports.handler(_izContext, saveFilePath);
|
|
277
|
+
const moveRelSqs = moveRelationshipActionImports.snsInSqs(_izContext, saveFilePath);
|
|
278
|
+
|
|
279
|
+
const moveRelCompMainFunction = moveRelationshipCompleteImports.mainFunction(_izContext, saveFilePath);
|
|
280
|
+
const moveRelCompFunctionYaml = moveRelationshipCompleteImports.functionYaml(_izContext, saveFilePath);
|
|
281
|
+
const moveRelCompHandler = moveRelationshipCompleteImports.handler(_izContext, saveFilePath);
|
|
282
|
+
const moveRelCompSnsIn = moveRelationshipCompleteImports.snsInSqs(_izContext, saveFilePath);
|
|
283
|
+
const moveRelCompSnsOut = moveRelationshipCompleteImports.snsOut(_izContext, saveFilePath);
|
|
255
284
|
// Combine all generated data
|
|
256
285
|
const updateRelationshipData = [
|
|
257
286
|
...updateHandlers,
|
|
@@ -324,6 +353,19 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
324
353
|
...changeRelCompleteSnsInSqs,
|
|
325
354
|
...changeRelCompleteSnsOut,
|
|
326
355
|
];
|
|
356
|
+
|
|
357
|
+
const moveRelData = [
|
|
358
|
+
...moveRelFunctionYaml,
|
|
359
|
+
...moveRelMainFunction,
|
|
360
|
+
...moveRelHandler,
|
|
361
|
+
...moveRelSqs,
|
|
362
|
+
...moveRelCompFunctionYaml,
|
|
363
|
+
...moveRelCompHandler,
|
|
364
|
+
...moveRelCompMainFunction,
|
|
365
|
+
...moveRelCompSnsIn,
|
|
366
|
+
...moveRelCompSnsOut
|
|
367
|
+
]
|
|
368
|
+
|
|
327
369
|
// Combine all data sets
|
|
328
370
|
createSourceParams.push(
|
|
329
371
|
...updateRelationshipData,
|
|
@@ -334,7 +376,8 @@ async function generateCodeWithTemplate(_izContext, objSchemaPath) {
|
|
|
334
376
|
...deleteRelationshipCompleteData,
|
|
335
377
|
...getRelationshipData,
|
|
336
378
|
...getRelationshipCompleteData,
|
|
337
|
-
...changeRelData
|
|
379
|
+
...changeRelData,
|
|
380
|
+
...moveRelData
|
|
338
381
|
);
|
|
339
382
|
|
|
340
383
|
return createSourceParams;
|
package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/api/data.js
CHANGED
|
@@ -124,8 +124,8 @@ function createParamForCreateSource(allObjectRelationships, srcPath) {
|
|
|
124
124
|
handlerType,
|
|
125
125
|
additionalResourcePermission,
|
|
126
126
|
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
127
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.getRel) + upperCase(shortNameHandler(handlerType)),
|
|
128
|
-
|
|
127
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME(FUNCTION_NAME.getRel)) + upperCase(shortNameHandler(handlerType)),
|
|
128
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
|
|
129
129
|
},
|
|
130
130
|
setting: {
|
|
131
131
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2020 Sven Mason <http://izara.io>
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
|
5
|
+
it under the terms of the GNU Affero General Public License as
|
|
6
|
+
published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
License, or (at your option) any later version.
|
|
8
|
+
|
|
9
|
+
This program is distributed in the hope that it will be useful,
|
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
GNU Affero General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
'use strict';
|
|
19
|
+
const path = require('path');
|
|
20
|
+
|
|
21
|
+
const { ACTIONS, HANDLER, STORAGE_TYPES } = require('@izara_project/izara-core-library-service-schemas/src/Consts');
|
|
22
|
+
|
|
23
|
+
const { firstLetterLowerCase: lowerCase, firstLetterUpperCase: upperCase, getLocalConfig } = require("../../../../../../MainLibs/src/Utils.js");
|
|
24
|
+
const {
|
|
25
|
+
createIamRole,
|
|
26
|
+
resourceNames,
|
|
27
|
+
RESOURCE_CLASSES,
|
|
28
|
+
SOURCE_PATH,
|
|
29
|
+
SAVE_FILE_NAME,
|
|
30
|
+
FUNCTION_NAME,
|
|
31
|
+
SNS_RESOURCE,
|
|
32
|
+
defaultIamRolePerAction,
|
|
33
|
+
awaitingMultipleStepsRole,
|
|
34
|
+
shortNameHandler,
|
|
35
|
+
SHORT_FUNCTION_NAME,
|
|
36
|
+
SOURCE_GENERATE_IAM_ROLE,
|
|
37
|
+
checkDynamoTypeRelationship,
|
|
38
|
+
createDynamoDbComponentByLinks,
|
|
39
|
+
DYNAMO_RESOURCE,
|
|
40
|
+
SQS_RESOURCE
|
|
41
|
+
} = require("../../../../../../MainLibs/src/Consts.js");
|
|
42
|
+
const templatePath = path.join(__dirname, "./template.ejs")
|
|
43
|
+
|
|
44
|
+
const apiTemplate = path.join(__dirname, "././templateByHandler/apiTemplate.ejs")
|
|
45
|
+
const dsqTemplate = path.join(__dirname, "././templateByHandler/dsqTemplate.ejs")
|
|
46
|
+
const invTemplate = path.join(__dirname, "././templateByHandler/invTemplate.ejs")
|
|
47
|
+
const sqsTemplate = path.join(__dirname, "././templateByHandler/sqsTemplate.ejs")
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* receive objectSchema
|
|
51
|
+
* create data for updateRelationshipSchema
|
|
52
|
+
*
|
|
53
|
+
* @param {Object} objectSchema
|
|
54
|
+
* @return {{ templatePath, templateData, setting } }
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
function data(_izContext, allObjectRelationships, srcPath) {
|
|
58
|
+
let createSourceArray = [];
|
|
59
|
+
for (const handlerType of Object.values(HANDLER)) {
|
|
60
|
+
const createSourceParam = createParamForCreateSource(allObjectRelationships, handlerType, srcPath);
|
|
61
|
+
createSourceArray.push(createSourceParam);
|
|
62
|
+
}
|
|
63
|
+
// console.log("createSourceArrayInUpdaterelationShipSchemahdrSqs", createSourceArray)
|
|
64
|
+
return createSourceArray
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
function createParamForCreateSource(allObjectRelationships, handlerType, srcPath) {
|
|
69
|
+
|
|
70
|
+
let functionName = upperCase(FUNCTION_NAME.getRel)
|
|
71
|
+
let additionalResourcePermission = defaultIamRolePerAction();
|
|
72
|
+
|
|
73
|
+
additionalResourcePermission.push(awaitingMultipleStepsRole())
|
|
74
|
+
|
|
75
|
+
additionalResourcePermission.push(
|
|
76
|
+
createIamRole(
|
|
77
|
+
{
|
|
78
|
+
[RESOURCE_CLASSES.sqs]: [
|
|
79
|
+
SQS_RESOURCE.deleteMessage,
|
|
80
|
+
SQS_RESOURCE.getQueueAttributes,
|
|
81
|
+
SQS_RESOURCE.receiveMessage,
|
|
82
|
+
SQS_RESOURCE.sendMessage,
|
|
83
|
+
SQS_RESOURCE.getQueueUrl,
|
|
84
|
+
SQS_RESOURCE.deleteMessageBatch
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
[
|
|
88
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + upperCase(handlerType)),
|
|
89
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + upperCase(handlerType) + "DLQ"),
|
|
90
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + upperCase(handlerType)),
|
|
91
|
+
resourceNames(RESOURCE_CLASSES.sqs, upperCase(functionName) + upperCase(handlerType) + "DLQ"),
|
|
92
|
+
]
|
|
93
|
+
),
|
|
94
|
+
createIamRole(
|
|
95
|
+
{
|
|
96
|
+
[RESOURCE_CLASSES.sns]: [SNS_RESOURCE.publish, SNS_RESOURCE.subscribe]
|
|
97
|
+
},
|
|
98
|
+
[
|
|
99
|
+
resourceNames(RESOURCE_CLASSES.sns, upperCase(FUNCTION_NAME.getRelComplete) + "_Out"),
|
|
100
|
+
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_In"),
|
|
101
|
+
resourceNames(RESOURCE_CLASSES.sns, upperCase(functionName) + "_Out"),
|
|
102
|
+
]
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
for (const relationship of allObjectRelationships) {
|
|
107
|
+
let [storageType, relationshipTag, links] = checkDynamoTypeRelationship(relationship)
|
|
108
|
+
if (storageType === STORAGE_TYPES.dynamoDB) {
|
|
109
|
+
for (const link of links) {
|
|
110
|
+
let dynamoComponent = createDynamoDbComponentByLinks(link, relationshipTag)
|
|
111
|
+
additionalResourcePermission.push(
|
|
112
|
+
createIamRole(
|
|
113
|
+
{
|
|
114
|
+
[RESOURCE_CLASSES.dynamoDbTable]: [DYNAMO_RESOURCE.getItem]
|
|
115
|
+
},
|
|
116
|
+
[
|
|
117
|
+
resourceNames(RESOURCE_CLASSES.dynamoDbTable, upperCase(dynamoComponent.tableNameFrom)),
|
|
118
|
+
resourceNames(RESOURCE_CLASSES.dynamoDbTable, upperCase(dynamoComponent.tableNameTo))
|
|
119
|
+
]
|
|
120
|
+
)
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
templatePath: templatePath,
|
|
128
|
+
templateData: {
|
|
129
|
+
functionName,
|
|
130
|
+
handlerType,
|
|
131
|
+
additionalResourcePermission,
|
|
132
|
+
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
133
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME(FUNCTION_NAME.getRel)) + upperCase(shortNameHandler(handlerType)),
|
|
134
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole,
|
|
135
|
+
serviceTag: getLocalConfig(path.join(srcPath, "../"), "iz_serviceTag"),
|
|
136
|
+
apiTemplate,
|
|
137
|
+
dsqTemplate,
|
|
138
|
+
invTemplate,
|
|
139
|
+
sqsTemplate
|
|
140
|
+
},
|
|
141
|
+
setting: {
|
|
142
|
+
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
|
143
|
+
saveFileName: SAVE_FILE_NAME.functionRelationshipYaml,
|
|
144
|
+
fileExtension: '.yml',
|
|
145
|
+
isAppend: true
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
module.exports = data;
|
package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/dsq/data.js
CHANGED
|
@@ -127,8 +127,8 @@ function createParamForCreateSource(allObjectRelationships, srcPath) {
|
|
|
127
127
|
handlerType,
|
|
128
128
|
additionalResourcePermission,
|
|
129
129
|
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
130
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.getRel) + upperCase(shortNameHandler(handlerType)),
|
|
131
|
-
|
|
130
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME(FUNCTION_NAME.getRel)) + upperCase(shortNameHandler(handlerType)),
|
|
131
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
|
|
132
132
|
},
|
|
133
133
|
setting: {
|
|
134
134
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/inv/data.js
CHANGED
|
@@ -123,8 +123,8 @@ function createParamForCreateSource(allObjectRelationships, srcPath) {
|
|
|
123
123
|
handlerType,
|
|
124
124
|
additionalResourcePermission,
|
|
125
125
|
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
126
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.getRel) + upperCase(shortNameHandler(handlerType)),
|
|
127
|
-
|
|
126
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME(FUNCTION_NAME.getRel)) + upperCase(shortNameHandler(handlerType)),
|
|
127
|
+
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
|
|
128
128
|
},
|
|
129
129
|
setting: {
|
|
130
130
|
savePath: path.join(srcPath, SOURCE_PATH.appYaml),
|
package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/sqs/data.js
CHANGED
|
@@ -122,7 +122,7 @@ function createParamForCreateSource(allObjectRelationships, srcPath) {
|
|
|
122
122
|
handlerType,
|
|
123
123
|
additionalResourcePermission,
|
|
124
124
|
resourceLocation: SOURCE_PATH.resourceLocationRelationshipPerAction,
|
|
125
|
-
functionNameConfig: upperCase(SHORT_FUNCTION_NAME.getRel) + upperCase(shortNameHandler(handlerType)),
|
|
125
|
+
functionNameConfig: upperCase(SHORT_FUNCTION_NAME(FUNCTION_NAME.getRel)) + upperCase(shortNameHandler(handlerType)),
|
|
126
126
|
roleName: SOURCE_GENERATE_IAM_ROLE.RelationshipRole
|
|
127
127
|
},
|
|
128
128
|
setting: {
|
package/src/reStructure/TemplateData/relationshipPerAction/get/action/functionYaml/template.ejs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<% if (handlerType === "hdrApi") { %>
|
|
2
|
+
<%- include(apiTemplate),{ functionName, handlerType, additionalResourcePermission, resourceLocation, functionNameConfig, roleName, serviceTag } %>
|
|
3
|
+
<% } else if (handlerType === "hdrDsq") { %>
|
|
4
|
+
<%- include(dsqTemplate), { functionName, handlerType, additionalResourcePermission, resourceLocation, functionNameConfig, roleName } %>
|
|
5
|
+
<% } else if (handlerType === "hdrInv") { %>
|
|
6
|
+
<%- include(invTemplate), { functionName, handlerType, additionalResourcePermission, resourceLocation, functionNameConfig, roleName } %>
|
|
7
|
+
<% } else if (handlerType === "hdrSqs") { %>
|
|
8
|
+
<%- include(sqsTemplate),{ functionName, handlerType, additionalResourcePermission, resourceLocation, functionNameConfig, roleName } %>
|
|
9
|
+
<% } %>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<%_ const join = require('path').join; _%>
|
|
2
|
+
<%- firstLetterUpperCase(functionNameConfig) %>:
|
|
3
|
+
handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
|
|
4
|
+
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
5
|
+
events:
|
|
6
|
+
- http:
|
|
7
|
+
path: /<%- serviceTag %>/<%- firstLetterLowerCase(functionName) %>/<%- functionName %>/
|
|
8
|
+
method: put
|
|
9
|
+
cors: true
|
|
10
|
+
#<#Authorizer#>
|
|
11
|
+
#<#/Authorizer#>
|
|
12
|
+
role: <%- roleName %>Role
|
|
13
|
+
#<#<%- functionName %><%- firstLetterUpperCase(handlerType) %>IamRole#>
|
|
14
|
+
#<#/<%- functionName %><%- firstLetterUpperCase(handlerType) %>IamRole#>
|
|
15
|
+
<%_ function firstLetterUpperCase(text){
|
|
16
|
+
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
17
|
+
} _%>
|
|
18
|
+
<%_ function firstLetterLowerCase(str) {
|
|
19
|
+
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
20
|
+
} _%>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<%_ const join = require('path').join; _%>
|
|
2
|
+
<%- firstLetterUpperCase(functionNameConfig) %>:
|
|
3
|
+
handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
|
|
4
|
+
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
5
|
+
events:
|
|
6
|
+
- sqs:
|
|
7
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
8
|
+
batchSize: 10
|
|
9
|
+
role: <%- roleName %>Role
|
|
10
|
+
#<#<%- functionName %><%- firstLetterUpperCase(handlerType) %>IamRole#>
|
|
11
|
+
#<#/<%- functionName %><%- firstLetterUpperCase(handlerType) %>IamRole#>
|
|
12
|
+
<%_ function firstLetterUpperCase(text){
|
|
13
|
+
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
14
|
+
} _%>
|
|
15
|
+
<%_ function firstLetterLowerCase(str) {
|
|
16
|
+
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
17
|
+
} _%>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<%_ const join = require('path').join; _%>
|
|
2
|
+
<%- firstLetterUpperCase(functionNameConfig) %>:
|
|
3
|
+
handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
|
|
4
|
+
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
5
|
+
role: <%- roleName %>Role
|
|
6
|
+
#<#<%- functionName %><%- firstLetterUpperCase(handlerType) %>IamRole#>
|
|
7
|
+
#<#/<%- functionName %><%- firstLetterUpperCase(handlerType) %>IamRole#>
|
|
8
|
+
<%_ function firstLetterUpperCase(text){
|
|
9
|
+
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
10
|
+
} _%>
|
|
11
|
+
<%_ function firstLetterLowerCase(str) {
|
|
12
|
+
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
13
|
+
} _%>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<%_ const join = require('path').join; _%>
|
|
2
|
+
<%- firstLetterUpperCase(functionNameConfig) %>:
|
|
3
|
+
handler: <%- join(resourceLocation, `${firstLetterUpperCase(functionName)}_${firstLetterUpperCase(handlerType)}.main`)%>
|
|
4
|
+
name: ${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
5
|
+
events:
|
|
6
|
+
- sqs:
|
|
7
|
+
arn: arn:aws:sqs:${self:custom.iz_region}:${self:custom.iz_accountId}:${self:custom.iz_resourcePrefix}<%- firstLetterUpperCase(functionName) %><%- firstLetterUpperCase(handlerType) %>
|
|
8
|
+
batchSize: 10
|
|
9
|
+
role: <%- roleName %>Role
|
|
10
|
+
#<#<%- functionName %><%- firstLetterUpperCase(handlerType) %>IamRole#>
|
|
11
|
+
#<#/<%- functionName %><%- firstLetterUpperCase(handlerType) %>IamRole#>
|
|
12
|
+
<%_ function firstLetterUpperCase(text){
|
|
13
|
+
return text.charAt(0).toUpperCase() + text.slice(1)
|
|
14
|
+
} _%>
|
|
15
|
+
<%_ function firstLetterLowerCase(str) {
|
|
16
|
+
return str.charAt(0).toLowerCase() + str.slice(1)
|
|
17
|
+
} _%>
|