@genesislcap/pbc-notify-seed 0.0.10 → 0.1.0
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/.genx/configure.js +17 -0
- package/.genx/package-lock.json +4 -4
- package/.genx/package.json +1 -1
- package/.genx/prompts.js +23 -2
- package/.genx/versions.json +3 -3
- package/client/src/pbc/notify/metadata.ts +3 -3
- package/package.json +1 -1
- package/server/{{appName}}-app/src/main/genesis/cfg/genesis-notify-system-definition.kts +26 -0
package/.genx/configure.js
CHANGED
|
@@ -4,6 +4,21 @@ const checks = require('./checks');
|
|
|
4
4
|
const versions = require('./versions.json');
|
|
5
5
|
const packageJson = require('./package.json');
|
|
6
6
|
|
|
7
|
+
const parseEntityList = (entityArray) => {
|
|
8
|
+
if (!entityArray) {
|
|
9
|
+
return "";
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
if (entityArray.length === 0) {
|
|
13
|
+
return ""
|
|
14
|
+
}
|
|
15
|
+
return `listOf(${entityArray.map(entity => JSON.stringify(entity)).join(", ")})`
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.error("Error parsing `notificationEntities` parameter as JSON:", error.message);
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
7
22
|
module.exports = async (data, utils) => {
|
|
8
23
|
const { editJSONFile } = utils;
|
|
9
24
|
const json = editJSONFile(packageJson);
|
|
@@ -11,6 +26,8 @@ module.exports = async (data, utils) => {
|
|
|
11
26
|
data.date = Date();
|
|
12
27
|
data.utils = utils;
|
|
13
28
|
data.versions = versions;
|
|
29
|
+
data.notificationEntitiesKotlin = parseEntityList(data.notificationEntities)
|
|
30
|
+
|
|
14
31
|
/**
|
|
15
32
|
* Run checks on project
|
|
16
33
|
*/
|
package/.genx/package-lock.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "@genesislcap/pbc-notify-genx",
|
|
9
9
|
"version": "1.0.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@genesislcap/seed-utils": "~14.
|
|
11
|
+
"@genesislcap/seed-utils": "~14.173.3",
|
|
12
12
|
"tslib": "^2.3.1"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"node_modules/@genesislcap/seed-utils": {
|
|
19
|
-
"version": "14.
|
|
20
|
-
"resolved": "https://registry.npmjs.org/@genesislcap/seed-utils/-/seed-utils-14.
|
|
21
|
-
"integrity": "sha512-
|
|
19
|
+
"version": "14.173.3",
|
|
20
|
+
"resolved": "https://registry.npmjs.org/@genesislcap/seed-utils/-/seed-utils-14.173.3.tgz",
|
|
21
|
+
"integrity": "sha512-wbSOO+hU3Pw/0ZQ6HgH20Vt0OF01FsQADufQpCEi1xdWE2BS+DL8l+B4uRS+eXmZyvXhHVvmCS2jjgF2ZLdIsQ==",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=20.0.0"
|
|
24
24
|
}
|
package/.genx/package.json
CHANGED
package/.genx/prompts.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
module.exports = async (inquirer, prevAns = {}) => await prompts(inquirer, prevAns);
|
|
2
2
|
|
|
3
|
+
const parseEntityList = (notificationEntities) => {
|
|
4
|
+
if (!notificationEntities){
|
|
5
|
+
return [];
|
|
6
|
+
}
|
|
7
|
+
try {
|
|
8
|
+
return JSON.parse(notificationEntities);
|
|
9
|
+
} catch (error) {
|
|
10
|
+
console.error("Error parsing `notificationEntities` parameter as JSON:", error.message);
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
3
15
|
const prompts = async (inquirer, prevAns) => {
|
|
4
16
|
const {
|
|
5
17
|
emailGatewayEnabled = prevAns.emailGatewayEnabled,
|
|
@@ -11,7 +23,8 @@ const prompts = async (inquirer, prevAns) => {
|
|
|
11
23
|
smtpPw = prevAns.smtpPw,
|
|
12
24
|
smtpProtocol = prevAns.smtpProtocol,
|
|
13
25
|
systemDefaultUserName = prevAns.systemDefaultUserName,
|
|
14
|
-
systemDefaultEmail = prevAns.systemDefaultEmail
|
|
26
|
+
systemDefaultEmail = prevAns.systemDefaultEmail,
|
|
27
|
+
notificationEntities = prevAns.notificationEntities
|
|
15
28
|
} = await inquirer.prompt([
|
|
16
29
|
{
|
|
17
30
|
name: 'screenGatewayEnabled',
|
|
@@ -82,6 +95,13 @@ const prompts = async (inquirer, prevAns) => {
|
|
|
82
95
|
message: 'System Default Email',
|
|
83
96
|
default: prevAns.systemDefaultEmail || "*",
|
|
84
97
|
when: ({emailGatewayEnabled}) => emailGatewayEnabled === true && prevAns.systemDefaultEmail === undefined,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'notificationEntities',
|
|
101
|
+
type: 'input',
|
|
102
|
+
message: 'Enter the entity names that users can use to create notification rules (config in json format)',
|
|
103
|
+
default: '[]',
|
|
104
|
+
when: !prevAns.notificationEntities
|
|
85
105
|
}
|
|
86
106
|
|
|
87
107
|
]);
|
|
@@ -95,6 +115,7 @@ const prompts = async (inquirer, prevAns) => {
|
|
|
95
115
|
smtpPw,
|
|
96
116
|
smtpProtocol,
|
|
97
117
|
systemDefaultUserName,
|
|
98
|
-
systemDefaultEmail
|
|
118
|
+
systemDefaultEmail,
|
|
119
|
+
notificationEntities: parseEntityList(notificationEntities)
|
|
99
120
|
};
|
|
100
121
|
};
|
package/.genx/versions.json
CHANGED
|
@@ -6,14 +6,14 @@ import type { AppMetadata } from '@genesislcap/foundation-shell/app';
|
|
|
6
6
|
export const metadata: AppMetadata = {
|
|
7
7
|
name: '@genesislcap/pbc-notify-ui',
|
|
8
8
|
description: 'Genesis Notify PBC',
|
|
9
|
-
version: '0.0
|
|
9
|
+
version: '0.1.0',
|
|
10
10
|
prerequisites: {
|
|
11
11
|
'@genesislcap/foundation-ui': '14.*',
|
|
12
12
|
gsf: '7.*',
|
|
13
13
|
},
|
|
14
14
|
dependencies: {
|
|
15
|
-
'@genesislcap/pbc-notify-ui': '1.0.
|
|
15
|
+
'@genesislcap/pbc-notify-ui': '1.0.30',
|
|
16
16
|
'@genesislcap/foundation-notifications': '14.*',
|
|
17
|
-
serverDepId: '7.2.0
|
|
17
|
+
serverDepId: '7.2.0',
|
|
18
18
|
},
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System : Genesis Business Library
|
|
3
|
+
* Sub-System : multi-pro-code-test Configuration
|
|
4
|
+
* Version : 1.0
|
|
5
|
+
* Copyright : (c) Genesis
|
|
6
|
+
* Date : 2022-03-18
|
|
7
|
+
* Function : Provide system definition config for multi-pro-code-test.
|
|
8
|
+
*
|
|
9
|
+
* Modification History
|
|
10
|
+
*/
|
|
11
|
+
systemDefinition {
|
|
12
|
+
global {
|
|
13
|
+
item("STORAGE_STRATEGY", "LOCAL")
|
|
14
|
+
item("LOCAL_STORAGE_FOLDER", "LOCAL_STORAGE")
|
|
15
|
+
|
|
16
|
+
{{#if notificationEntitiesKotlin}}
|
|
17
|
+
//List out the tables and view names that users can use to create notification rules
|
|
18
|
+
item("NOTIFY_ENTITY_LIST", {{{notificationEntitiesKotlin}}})
|
|
19
|
+
{{/if}}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
systems {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|