@izara_project/izara-core-generate-service-code 1.0.26 → 1.0.27

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@izara_project/izara-core-generate-service-code",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Code for locally generating per service files",
5
5
  "author": "Sven Mason <thebarbariansven@gmail.com>",
6
6
  "license": "AGPL-3.0-or-later",
@@ -31,7 +31,7 @@ const { HANDLER, SOURCE_PATH, SAVE_FILE_NAME } = consts;
31
31
 
32
32
  const { shortNameHandler, defaultIamRolePerAction } = libs;
33
33
 
34
- const { firstLetterUpperCase: upperCase } = utils;
34
+ const { firstLetterUpperCase: upperCase, savePath } = utils;
35
35
 
36
36
  const templatePath = path.join(__dirname, 'template.ejs');
37
37
 
@@ -54,7 +54,14 @@ function createSourceParamsApi(_izContext, flowSchema, appPath) {
54
54
  return {
55
55
  templatePath: templatePath,
56
56
  templateData: {
57
- resourceYamlFlowSchemaFlowTag,
57
+ resourceLocation:
58
+ // path.join(
59
+ // SOURCE_PATH.resourceLocationFlowSchema,
60
+ // upperCase(flowSchema.flowTag),
61
+ // 'MainHandler/',
62
+ // 'source/'
63
+ // ),
64
+ savePath.flowSchemaFlowTag(flowSchema.flowTag),
58
65
  functionName,
59
66
  handlerType,
60
67
  additionalResourcePermission,
@@ -24,6 +24,9 @@ import {
24
24
  //(<optionalRequire>)
25
25
  //(</optionalRequire>)
26
26
 
27
+ //(<helperFunctions>)
28
+ //(</helperFunctions>)
29
+
27
30
  /**
28
31
  * description of function.
29
32
  * @param {Object} _izContext
@@ -81,6 +84,10 @@ export default async function <%- functionName %>Main (
81
84
  return '<%- functionName %> completed successfully';
82
85
  } catch (err) {
83
86
  _izContext.logger.error('error <%- functionName %>: ', err);
87
+
88
+ //(<errorHandling>)
89
+ //(</errorHandling>)
90
+
84
91
  throw (err);
85
92
  }
86
93
  }
@@ -21,6 +21,9 @@ import { handlePlugInHookTag } from '@izara_project/izara-core-library-plugin';
21
21
  //(<optionalRequire>)
22
22
  //(</optionalRequire>)
23
23
 
24
+ //(<helperFunctions>)
25
+ //(</helperFunctions>)
26
+
24
27
  /**
25
28
  * description of function.
26
29
  * @param {Object} _izContext
@@ -30,10 +33,8 @@ import { handlePlugInHookTag } from '@izara_project/izara-core-library-plugin';
30
33
  * @param {Object} requestParams.identifiers - identifiers for get data
31
34
  * @param {Object} requestParams.additionalRequest - additionalRequest
32
35
  *
33
- *
34
36
  * @returns {object} description of return value
35
37
  */
36
-
37
38
  export default async function <%- functionName %>Main (
38
39
  _izContext,
39
40
  requestParams,
@@ -85,6 +86,10 @@ export default async function <%- functionName %>Main (
85
86
  return '<%- functionName %> completed successfully';
86
87
  } catch (err) {
87
88
  _izContext.logger.error('error <%- functionName %>: ', err)
89
+
90
+ //(<errorHandling>)
91
+ //(</errorHandling>)
92
+
88
93
  throw (err)
89
94
  }
90
95
  }
@@ -19,6 +19,9 @@ along with this program. If not, see
19
19
  //(<optionalRequire>)
20
20
  //(</optionalRequire>)
21
21
 
22
+ //(<helperFunctions>)
23
+ //(</helperFunctions>)
24
+
22
25
  /**
23
26
  * description of function.
24
27
  * @param {Object} _izContext
@@ -28,10 +31,8 @@ along with this program. If not, see
28
31
  * @param {Object} requestParams.identifiers - identifiers for get data
29
32
  * @param {Object} requestParams.additionalRequest - additionalRequest
30
33
  *
31
- *
32
34
  * @returns {object} description of return value
33
35
  */
34
-
35
36
  export default async function <%- functionName %> (
36
37
  _izContext,
37
38
  requestParams,
@@ -49,6 +50,10 @@ export default async function <%- functionName %> (
49
50
 
50
51
  } catch (err) {
51
52
  _izContext.logger.error('error <%- functionName %>: ', err)
53
+
54
+ //(<errorHandling>)
55
+ //(</errorHandling>)
56
+
52
57
  throw (err)
53
58
  }
54
59
  }
@@ -22,7 +22,7 @@ import snsSharedLib from '@izara_project/izara-core-library-sns';
22
22
  const _izContext = { logger: Logger }
23
23
 
24
24
  export function generatedLambdaRole() {
25
- let externalLambdaRole = [ <%_ datas.forEach((data,dataIndex) => { %>
25
+ const externalLambdaRole = [ <%_ datas.forEach((data,dataIndex) => { %>
26
26
  {
27
27
  roleName: "<%- data.objectType %>",
28
28
  statement: [