cob-cli 2.23.0 → 2.26.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/.gitmodules +27 -0
- package/bin/cob-cli.js +3 -1
- package/bin/handleAutoComplete.js +1 -4
- package/lib/commands/customize.js +213 -66
- package/package.json +3 -2
- package/.vscode/launch.json +0 -106
- package/customizations/backend.email.js +0 -10
- package/customizations/backend.js +0 -14
- package/customizations/backend.updateField.js +0 -11
- package/customizations/backend.vuepress.js +0 -35
- package/customizations/dashboard.dash.js +0 -11
- package/customizations/dashboard.js +0 -14
- package/customizations/dashboard.simple.js +0 -12
- package/customizations/dashboard.vue.empty.js +0 -12
- package/customizations/dashboard.vue.grid.js +0 -10
- package/customizations/dashboard.vue.js +0 -14
- package/customizations/dashboard.vue.menuAndGrid.js +0 -10
- package/customizations/frontend.common.js +0 -15
- package/customizations/frontend.easy.js +0 -16
- package/customizations/frontend.formatList.currency.js +0 -15
- package/customizations/frontend.formatList.js +0 -13
- package/customizations/frontend.js +0 -14
- package/customizations/importer.js +0 -10
- package/customizations/keywords.audit.js +0 -17
- package/customizations/keywords.calc.js +0 -17
- package/customizations/keywords.js +0 -15
- package/customizations/keywords.log.js +0 -17
- package/customizations/keywords.styleResults.js +0 -17
- package/templates/backend/vuepress/integrationm/actions/getVuePressDoc.groovy +0 -74
- package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarConfig.groovy +0 -42
- package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarRootElements.groovy +0 -17
- package/templates/backend/vuepress/others/vuepress/definition_contents_v234.json +0 -619
- package/templates/backend/vuepress/others/vuepress/nginx/README.md +0 -28
- package/templates/backend/vuepress/others/vuepress/package-lock.json +0 -29656
- package/templates/backend/vuepress/others/vuepress/package.json +0 -24
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/DescriptVideo.vue +0 -22
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/Graph.vue +0 -124
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/ReadingTime.vue +0 -26
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/References.vue +0 -228
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/components/RestrictedContent.vue +0 -77
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.js +0 -101
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/config.json +0 -31
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/enhanceApp.js +0 -14
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/nav/getNavTranslated.js +0 -52
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/plugins/References.js +0 -96
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/Logo-Cult-of-Bits-400x400-1.png +0 -0
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/favicon-cob.png +0 -0
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/public/logo.png +0 -0
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/index.styl +0 -39
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/styles/palette.styl +0 -17
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/LICENSE +0 -21
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/README.md +0 -11
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/AlgoliaSearchBox.vue +0 -172
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownLink.vue +0 -252
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/DropdownTransition.vue +0 -33
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Home.vue +0 -134
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLink.vue +0 -98
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/NavLinks.vue +0 -165
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Navbar.vue +0 -140
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Page.vue +0 -31
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageEdit.vue +0 -119
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/PageNav.vue +0 -163
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/Sidebar.vue +0 -64
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarButton.vue +0 -40
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarGroup.vue +0 -144
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLink.vue +0 -140
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/components/SidebarLinks.vue +0 -114
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/Badge.vue +0 -44
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeBlock.vue +0 -41
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/global-components/CodeGroup.vue +0 -120
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/index.js +0 -59
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/404.vue +0 -30
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/layouts/Layout.vue +0 -151
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/noopModule.js +0 -1
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/package.json +0 -44
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/arrow.styl +0 -22
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/code.styl +0 -137
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/config.styl +0 -1
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/custom-blocks.styl +0 -44
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/index.styl +0 -202
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/mobile.styl +0 -37
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/toc.styl +0 -3
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/styles/wrapper.styl +0 -10
- package/templates/backend/vuepress/others/vuepress/src/.vuepress/theme/util/index.js +0 -244
- package/templates/dashboards/cob-dashboard-html/demoDashboard.html +0 -18
- package/templates/dashboards/cob-dashboard-vue/package-lock.json +0 -25020
- package/templates/dashboards/cob-dashboard-vue/package.json +0 -21
- package/templates/dashboards/cob-dashboard-vue/src/App.vue +0 -26
- package/templates/dashboards/cob-dashboard-vue/src/dashboard.html +0 -31
- package/templates/dashboards/cob-dashboard-vue/src/main.js +0 -12
- package/templates/dashboards/cob-dashboard-vue/src/plugins/cobUiVueComponents.js +0 -6
- package/templates/dashboards/cob-dashboard-vue/src/plugins/vuetify.js +0 -9
- package/templates/dashboards/cob-dashboard-vue/vue.config.js +0 -104
- package/templates/dashboards/dash/dist/css/app.7b16c01a.css +0 -11
- package/templates/dashboards/dash/dist/dashboard.html +0 -25
- package/templates/dashboards/dash/dist/fonts/fa-brands-400.a78ffbbe.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-brands-400.cd2b4095.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-regular-400.b1a1bebb.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-regular-400.e8a1ba41.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-solid-900.55b416a8.woff2 +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-solid-900.73820155.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.0d6f5f18.ttf +0 -0
- package/templates/dashboards/dash/dist/fonts/fa-v4compatibility.786e6b33.woff2 +0 -0
- package/templates/dashboards/dash/dist/js/app.13b950c8.js +0 -199
- package/templates/dashboards/dash/dist/js/app.13b950c8.js.map +0 -1
- package/templates/dashboards/dash/package-lock.json +0 -22646
- package/templates/dashboards/dash/package.json +0 -27
- package/templates/dashboards/dash/src/App.vue +0 -124
- package/templates/dashboards/dash/src/assets/css/all.min.css +0 -6
- package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-brands-400.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-regular-400.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-solid-900.woff2 +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.ttf +0 -0
- package/templates/dashboards/dash/src/assets/webfonts/fa-v4compatibility.woff2 +0 -0
- package/templates/dashboards/dash/src/collector.js +0 -222
- package/templates/dashboards/dash/src/components/Attention.vue +0 -30
- package/templates/dashboards/dash/src/components/Board.vue +0 -35
- package/templates/dashboards/dash/src/components/Calendar.vue +0 -422
- package/templates/dashboards/dash/src/components/Dashboard.vue +0 -27
- package/templates/dashboards/dash/src/components/Filter.vue +0 -68
- package/templates/dashboards/dash/src/components/Kibana.vue +0 -138
- package/templates/dashboards/dash/src/components/Label.vue +0 -15
- package/templates/dashboards/dash/src/components/Menu.vue +0 -44
- package/templates/dashboards/dash/src/components/Totals.vue +0 -49
- package/templates/dashboards/dash/src/components/TotalsValue.vue +0 -59
- package/templates/dashboards/dash/src/components/shared/Instance.vue +0 -64
- package/templates/dashboards/dash/src/components/shared/Waiting.vue +0 -25
- package/templates/dashboards/dash/src/dashboard.html +0 -39
- package/templates/dashboards/dash/src/definition_dashboard_v0.json +0 -924
- package/templates/dashboards/dash/src/definition_dashboard_v1.json +0 -1
- package/templates/dashboards/dash/src/input.css +0 -9
- package/templates/dashboards/dash/src/main.js +0 -11
- package/templates/dashboards/dash/src/model/ComponentStatePersistence.js +0 -66
- package/templates/dashboards/dash/src/output.css +0 -314245
- package/templates/dashboards/dash/src/test_collector.js +0 -3719
- package/templates/dashboards/dash/src/utils/EsInstanceUtils.js +0 -8
- package/templates/dashboards/dash/tailwind.config.js +0 -12
- package/templates/dashboards/dash/vue.config.js +0 -104
- package/templates/frontend/common/css/_dualColumn.css +0 -46
- package/templates/frontend/common/css/_global.css +0 -19
- package/templates/frontend/common/css/_hidden.css +0 -13
- package/templates/frontend/common/css/_history.css +0 -13
- package/templates/frontend/common/css/_mobile.css +0 -125
- package/templates/frontend/common/css/customizations.__MERGE__.css +0 -5
- package/templates/frontend/common/js/cob/_disable_save_onSubdetail.js +0 -11
- package/templates/frontend/common/js/cob/_group_references.js +0 -22
- package/templates/frontend/common/js/cob/_show_hidden.js +0 -35
- package/templates/frontend/common/js/customizations2.__MERGE__.js +0 -3
- package/templates/frontend/easy/css/_easy/googlefonts.css +0 -360
- package/templates/frontend/easy/css/_easy/vuetify.cob-scoped.css +0 -10488
- package/templates/frontend/easy/js/_easy/lib/axios.min.js +0 -9
- package/templates/frontend/easy/js/_easy/lib/marked.min.js +0 -6
- package/templates/frontend/easy/js/_easy/lib/vue.js +0 -11912
- package/templates/frontend/easy/js/_easy/lib/vue.min.js +0 -6
- package/templates/frontend/easy/js/_easy/lib/vuetify.min.js +0 -6
- package/templates/frontend/easy/js/customizations2.__MERGE__.js +0 -22
- package/templates/frontend/easy/webapp/.browserslistrc +0 -2
- package/templates/frontend/easy/webapp/.eslintrc.js +0 -17
- package/templates/frontend/easy/webapp/README.md +0 -60
- package/templates/frontend/easy/webapp/babel.config.js +0 -5
- package/templates/frontend/easy/webapp/dist/css/app.a4fb91f8.css +0 -1
- package/templates/frontend/easy/webapp/dist/dashboard.html +0 -13
- package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js +0 -2
- package/templates/frontend/easy/webapp/dist/js/app.63a57dcd.js.map +0 -1
- package/templates/frontend/easy/webapp/package-lock.json +0 -32986
- package/templates/frontend/easy/webapp/package.json +0 -32
- package/templates/frontend/easy/webapp/postcss.config.js +0 -5
- package/templates/frontend/easy/webapp/public/dashboard.html +0 -13
- package/templates/frontend/easy/webapp/src/App.vue +0 -181
- package/templates/frontend/easy/webapp/src/assets/logo.png +0 -0
- package/templates/frontend/easy/webapp/src/components/HelloWorld.vue +0 -59
- package/templates/frontend/easy/webapp/src/components/PermBuilder.vue +0 -163
- package/templates/frontend/easy/webapp/src/components/PlanExecutor.vue +0 -225
- package/templates/frontend/easy/webapp/src/components/ProductPermBuilder.vue +0 -95
- package/templates/frontend/easy/webapp/src/components/RmDefinitionChooser.vue +0 -59
- package/templates/frontend/easy/webapp/src/components/RmDomainChooser.vue +0 -60
- package/templates/frontend/easy/webapp/src/components/RoleBuilder.vue +0 -73
- package/templates/frontend/easy/webapp/src/main.js +0 -19
- package/templates/frontend/easy/webapp/src/perm-templates.js +0 -189
- package/templates/frontend/easy/webapp/src/perms.js +0 -197
- package/templates/frontend/easy/webapp/vue.config.js +0 -66
- package/templates/frontend/formatList/currency/css/_format_currency.css +0 -11
- package/templates/frontend/formatList/currency/css/customizations.__MERGE__.css +0 -1
- package/templates/frontend/formatList/currency/js/cob/_format_currency.js +0 -11
- package/templates/frontend/formatList/currency/js/customizations2.__MERGE__.js +0 -1
- package/templates/gitignore +0 -14
- package/templates/keywords/audit/backend/scripts/_audit.groovy +0 -83
- package/templates/keywords/audit/frontend/js/cob/_audit.js +0 -24
- package/templates/keywords/audit/frontend/js/customizations2.__MERGE__.js +0 -1
- package/templates/keywords/calc/backend/scripts/_calc.groovy +0 -161
- package/templates/keywords/calc/frontend/js/cob/_calc.js +0 -193
- package/templates/keywords/calc/frontend/js/customizations2.__MERGE__.js +0 -1
- package/templates/keywords/log/backend/scripts/_log.groovy +0 -99
- package/templates/keywords/log/frontend/css/_log.css +0 -5
- package/templates/keywords/log/frontend/css/customizations.__MERGE__.css +0 -1
- package/templates/keywords/styleResults/frontend/css/_styleResults.css +0 -86
- package/templates/keywords/styleResults/frontend/css/customizations.__MERGE__.css +0 -1
- package/templates/keywords/styleResults/frontend/js/cob/_styleResults.js +0 -38
- package/templates/keywords/styleResults/frontend/js/customizations2.__MERGE__.js +0 -1
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'Common - Typical frontend customizations (https://learning.cultofbits.com)',
|
|
3
|
-
short: "Common",
|
|
4
|
-
questions: [
|
|
5
|
-
],
|
|
6
|
-
customization: async function (answers) {
|
|
7
|
-
console.log("\nApplying common frontend customizations ...")
|
|
8
|
-
|
|
9
|
-
const { copy } = require("../lib/task_lists/customize_copy");
|
|
10
|
-
const { mergeFiles } = require("../lib/task_lists/customize_mergeFiles");
|
|
11
|
-
const target = "./recordm/customUI/"
|
|
12
|
-
await copy("../../templates/frontend/common/",target)
|
|
13
|
-
await mergeFiles("Frontend.Common")
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'Easy - Permission management helper',
|
|
3
|
-
short: "Easy",
|
|
4
|
-
questions: [
|
|
5
|
-
],
|
|
6
|
-
customization: async function (answers) {
|
|
7
|
-
console.log("\nApplying easy customizations ...")
|
|
8
|
-
|
|
9
|
-
const { copy } = require("../lib/task_lists/customize_copy");
|
|
10
|
-
const { mergeFiles } = require("../lib/task_lists/customize_mergeFiles");
|
|
11
|
-
await copy("../../templates/frontend/easy/webapp/", "./userm/customUI/easy/")
|
|
12
|
-
await copy("../../templates/frontend/easy/css/", "./userm/customUI/css/")
|
|
13
|
-
await copy("../../templates/frontend/easy/js/", "./userm/customUI/js/")
|
|
14
|
-
await mergeFiles("Frontend.Easy")
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'FormatCurrency - Make $style[currency] available on definitions',
|
|
3
|
-
short: "Simple",
|
|
4
|
-
questions: [
|
|
5
|
-
],
|
|
6
|
-
customization: async function (answers) {
|
|
7
|
-
console.log("\nApplying FormatCurrency frontend customizations ...")
|
|
8
|
-
const { copy } = require("../lib/task_lists/customize_copy");
|
|
9
|
-
const { mergeFiles } = require("../lib/task_lists/customize_mergeFiles");
|
|
10
|
-
|
|
11
|
-
const target = "./recordm/customUI/"
|
|
12
|
-
await copy("../../templates/frontend/formatList/currency/",target)
|
|
13
|
-
await mergeFiles("frontend.formatList.currency.js")
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'FormatList - Add classes to change the style of specified columns in search results',
|
|
3
|
-
short: "FormatList",
|
|
4
|
-
followUp: [ {
|
|
5
|
-
type: 'list',
|
|
6
|
-
name: 'choosenFollowUp',
|
|
7
|
-
message: 'Select one?',
|
|
8
|
-
choices: [
|
|
9
|
-
require("./frontend.formatList.currency").option//,
|
|
10
|
-
// require("./frontend.formatList.percentage").option
|
|
11
|
-
]}
|
|
12
|
-
]
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'Frontend - Change behaviour of standard interface (https://learning.cultofbits.com)',
|
|
3
|
-
short: "Frontend",
|
|
4
|
-
followUp: [ {
|
|
5
|
-
type: 'list',
|
|
6
|
-
name: 'choosenFollowUp',
|
|
7
|
-
message: 'Select one?',
|
|
8
|
-
choices: [
|
|
9
|
-
require("./frontend.common").option,
|
|
10
|
-
require("./frontend.easy").option,
|
|
11
|
-
require("./frontend.formatList").option
|
|
12
|
-
]}
|
|
13
|
-
]
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'Importer - Add a server event based behaviour (https://learning.cultofbits.com)',
|
|
3
|
-
short: "Backend",
|
|
4
|
-
questions: [
|
|
5
|
-
require("../lib/task_lists/customize_questions").dashboardNameQuestion
|
|
6
|
-
],
|
|
7
|
-
customization: function (answers) {
|
|
8
|
-
console.log("TODO - importer:" + JSON.stringify(answers, null, ' '));
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'Audit - Allows for $user in definitions (https://learning.cultofbits.com/docs/cob-platform/admins/managing-information/available-customizations/audit/)',
|
|
3
|
-
short: "Audit",
|
|
4
|
-
questions: [
|
|
5
|
-
],
|
|
6
|
-
customization: async function (answers) {
|
|
7
|
-
console.log("\nApplying Audit keyword customizations ...")
|
|
8
|
-
|
|
9
|
-
const { copy } = require("../lib/task_lists/customize_copy");
|
|
10
|
-
const { mergeFiles } = require("../lib/task_lists/customize_mergeFiles");
|
|
11
|
-
const fe_target = "./recordm/customUI/"
|
|
12
|
-
await copy("../../templates/keywords/audit/frontend",fe_target)
|
|
13
|
-
const be_target = "./integrationm/"
|
|
14
|
-
await copy("../../templates/keywords/audit/backend",be_target)
|
|
15
|
-
await mergeFiles("Keyword.Audit")
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'Calc - Allows for $calc in definitions (https://learning.cultofbits.com)',
|
|
3
|
-
short: "Calc",
|
|
4
|
-
questions: [
|
|
5
|
-
],
|
|
6
|
-
customization: async function (answers) {
|
|
7
|
-
console.log("\nApplying Calc keyword customizations ...")
|
|
8
|
-
|
|
9
|
-
const { copy } = require("../lib/task_lists/customize_copy");
|
|
10
|
-
const { mergeFiles } = require("../lib/task_lists/customize_mergeFiles");
|
|
11
|
-
const fe_target = "./recordm/customUI/"
|
|
12
|
-
await copy("../../templates/keywords/calc/frontend",fe_target)
|
|
13
|
-
const be_target = "./integrationm/"
|
|
14
|
-
await copy("../../templates/keywords/calc/backend/",be_target)
|
|
15
|
-
await mergeFiles("Keyword.Calc")
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'Keywords - Add a keyword for use in definitions (https://learning.cultofbits.com/docs/cob-platform/admins/managing-information/available-customizations/)',
|
|
3
|
-
short: "Keywords",
|
|
4
|
-
followUp: [ {
|
|
5
|
-
type: 'list',
|
|
6
|
-
name: 'choosenFollowUp',
|
|
7
|
-
message: 'Select one?',
|
|
8
|
-
choices: [
|
|
9
|
-
require("./keywords.calc").option,
|
|
10
|
-
require("./keywords.audit").option,
|
|
11
|
-
require("./keywords.styleResults").option,
|
|
12
|
-
require("./keywords.log").option
|
|
13
|
-
]}
|
|
14
|
-
]
|
|
15
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'Log - Allows for $log in definitions (https://learning.cultofbits.com/docs/cob-platform/admins/managing-information/available-customizations/log/)',
|
|
3
|
-
short: "Log",
|
|
4
|
-
questions: [
|
|
5
|
-
],
|
|
6
|
-
customization: async function (answers) {
|
|
7
|
-
console.log("\nApplying Log keyword customizations ...")
|
|
8
|
-
|
|
9
|
-
const { copy } = require("../lib/task_lists/customize_copy");
|
|
10
|
-
const { mergeFiles } = require("../lib/task_lists/customize_mergeFiles");
|
|
11
|
-
const fe_target = "./recordm/customUI/"
|
|
12
|
-
await copy("../../templates/keywords/log/frontend",fe_target)
|
|
13
|
-
const be_target = "./integrationm/"
|
|
14
|
-
await copy("../../templates/keywords/log/backend",be_target)
|
|
15
|
-
await mergeFiles("Keyword.Log")
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
exports.option = {
|
|
2
|
-
name: 'StyleResult - Allows for $styleResults in definitions (https://learning.cultofbits.com/docs/cob-platform/admins/managing-information/available-customizations/styleResults/)',
|
|
3
|
-
short: "StyleResults",
|
|
4
|
-
questions: [
|
|
5
|
-
],
|
|
6
|
-
customization: async function (answers) {
|
|
7
|
-
console.log("\nApplying StyleResults keyword customizations ...")
|
|
8
|
-
|
|
9
|
-
const { copy } = require("../lib/task_lists/customize_copy");
|
|
10
|
-
const { mergeFiles } = require("../lib/task_lists/customize_mergeFiles");
|
|
11
|
-
const fe_target = "./recordm/customUI/"
|
|
12
|
-
await copy("../../templates/keywords/styleResults/frontend",fe_target)
|
|
13
|
-
const be_target = "./integrationm/"
|
|
14
|
-
await copy("../../templates/keywords/styleResults/backend",be_target)
|
|
15
|
-
await mergeFiles("Keyword.StyleResults")
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import groovy.transform.Field;
|
|
2
|
-
import org.apache.commons.logging.*;
|
|
3
|
-
|
|
4
|
-
import static utils.CobUtils.*;
|
|
5
|
-
import groovy.json.JsonOutput
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@Field log = LogFactory.getLog(getClass());
|
|
9
|
-
log.info("Building VuePress e-learning content part")
|
|
10
|
-
return JsonOutput.prettyPrint(JsonOutput.toJson( getVuePressDocs() ))
|
|
11
|
-
|
|
12
|
-
/********************************************************************************************/
|
|
13
|
-
|
|
14
|
-
def getVuePressDocs() {
|
|
15
|
-
def docs = [];
|
|
16
|
-
|
|
17
|
-
def contents = registosPaginadosAsMap(66,"*", actionPacks.get("rmRest"), "sortablefield", true)
|
|
18
|
-
contents.each { content ->
|
|
19
|
-
def langs = ["","pt","es"]
|
|
20
|
-
def contentLink = content["path"][0]
|
|
21
|
-
if( contentLink == "/site/home/" ) contentLink = "/";
|
|
22
|
-
|
|
23
|
-
if(!content["type"] || content["type"][0] == "SiteItem" && content["siteitemtype"][0] == "directory" ) return // No page for directories
|
|
24
|
-
|
|
25
|
-
langs.each { lang ->
|
|
26
|
-
def langPostfix = lang ? "-" + lang : ""
|
|
27
|
-
def contentMD = content["content"+langPostfix] ? content["content"+langPostfix][0] : content["content"] ? content["content"][0] : content["content-pt"] ? content["content-pt"][0] : content["content-es"] ? content["content-es"][0] : "";
|
|
28
|
-
|
|
29
|
-
contentMD = addToFrontmatter(contentMD, "id: " + content.id)
|
|
30
|
-
|
|
31
|
-
def isSitePath = contentLink =~ /^\/site\/([^\/]*)s\//
|
|
32
|
-
def isSolutionPath = contentLink =~ /^\/solutions\//
|
|
33
|
-
if( isSolutionPath ) {
|
|
34
|
-
contentMD = addToFrontmatter(contentMD, "target: Solution")
|
|
35
|
-
} else if( isSitePath ) {
|
|
36
|
-
// If the content link starts with /site/ then use the next path part as the type. This will enable NavBar activeLink.
|
|
37
|
-
// Notice we expect Types to be in the singular so we remove the 's' from the match on the type
|
|
38
|
-
contentMD = addToFrontmatter(contentMD, "target: " + isSitePath[0][1])
|
|
39
|
-
} else {
|
|
40
|
-
def target = ""
|
|
41
|
-
if(content && content["target"]) target = content["target"][0]
|
|
42
|
-
contentMD = addToFrontmatter(contentMD, "target: " + target)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if(content["visibility"][0] != "Public") {
|
|
46
|
-
contentMD = getJustFrontmatter(contentMD) + "<RestrictedContent/>"
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
def langPath = lang ? "/" + lang : ""
|
|
50
|
-
docs.push(["path": langPath + contentLink, "content": contentMD])
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return docs
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
def addToFrontmatter(content,expression) {
|
|
57
|
-
// Acrescentado um \n à avaliação do conteúdo para compensar o caso em que,
|
|
58
|
-
// quando só há frontmatter no conteúdo, o RM remove os trailing \n
|
|
59
|
-
// (terminando o conteúdo em --- e por isso depois não fazia match no split)
|
|
60
|
-
def frontmatterEval = (content+"\n")?.split("---")
|
|
61
|
-
if(frontmatterEval?.size()>2) {
|
|
62
|
-
frontmatterEval[1] += expression + "\n"
|
|
63
|
-
content = frontmatterEval.join("---\n")
|
|
64
|
-
} else {
|
|
65
|
-
content = "---\n" + expression + "\n---\n" + content
|
|
66
|
-
}
|
|
67
|
-
return content
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
def getJustFrontmatter(content) {
|
|
71
|
-
def splitContent = content?.split("---\n")
|
|
72
|
-
if(splitContent?.size()<=2) return ""
|
|
73
|
-
return splitContent[0..1].join("---\n") + "---\n"
|
|
74
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import groovy.transform.Field;
|
|
2
|
-
import org.apache.commons.logging.*;
|
|
3
|
-
|
|
4
|
-
import static utils.CobUtils.*;
|
|
5
|
-
import groovy.json.JsonOutput
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@Field log = LogFactory.getLog(getClass());
|
|
9
|
-
log.info("Building VuePress e-learning sidebar...")
|
|
10
|
-
|
|
11
|
-
def path = argsMap.path ;
|
|
12
|
-
def lang = (!argsMap.lang || argsMap.lang == "en") ? "" : argsMap.lang ;
|
|
13
|
-
def sidebarConfig = getVuePressSidebarConfig(path, lang, true)
|
|
14
|
-
return JsonOutput.prettyPrint(JsonOutput.toJson( sidebarConfig ))
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/********************************************************************************************/
|
|
18
|
-
|
|
19
|
-
def getVuePressSidebarConfig(path, lang, isRoot) {
|
|
20
|
-
def sidebar = [];
|
|
21
|
-
def pathField = isRoot ? "path.raw" : "parent_path.raw"; // no caso dos conteúdos de topo é necessário processar o próprio primeiro e depois os seus filhos
|
|
22
|
-
def contents = registosPaginadosAsMap(66, pathField+":\""+path+"\"", actionPacks.get("rmRest"), "sortablefield", true)
|
|
23
|
-
|
|
24
|
-
contents.each { content ->
|
|
25
|
-
def node = [:]
|
|
26
|
-
def nameSufixForLang = (lang && content["name-"+lang]) ? ("-"+lang) : content["name"] ? "" : content["name-pt"] ? "-pt" : "-es" ; // sufix shoud be the one specified in lang, unless it's content does not exist and, in that case, it will defaul to EN, then PT, then ES
|
|
27
|
-
def pathForLang = (lang ? "/" + lang : "") + content["path"][0]
|
|
28
|
-
def titleForLang = content["name"+nameSufixForLang][0]
|
|
29
|
-
|
|
30
|
-
def children = getVuePressSidebarConfig(content["path"][0], lang, false)
|
|
31
|
-
if(children.size == 0) {
|
|
32
|
-
node = [ pathForLang, titleForLang ]
|
|
33
|
-
} else {
|
|
34
|
-
node["title"] = titleForLang
|
|
35
|
-
node["path"] = pathForLang
|
|
36
|
-
node["children"] = [ pathForLang, *children ] // o truque de ter um grupo com conteúdo está em adicionar o próprio como filho mas depois esconder no html e mostrar o link do grupo com estilo de conteúdo normal
|
|
37
|
-
node["sidebarDepth"] = isRoot ? 1 : 0
|
|
38
|
-
}
|
|
39
|
-
sidebar.push(node)
|
|
40
|
-
}
|
|
41
|
-
return sidebar
|
|
42
|
-
}
|
package/templates/backend/vuepress/integrationm/actions/getVuePressSidebarRootElements.groovy
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import static utils.CobUtils.*;
|
|
3
|
-
import groovy.json.JsonOutput
|
|
4
|
-
|
|
5
|
-
return JsonOutput.prettyPrint(JsonOutput.toJson( getVuePressSidebarRootElements() ))
|
|
6
|
-
|
|
7
|
-
/********************************************************************************************/
|
|
8
|
-
|
|
9
|
-
def getVuePressSidebarRootElements() {
|
|
10
|
-
def sidebarRootElements = [];
|
|
11
|
-
|
|
12
|
-
def contents = registosPaginadosAsMap(66, "format.raw:Book", actionPacks.get("rmRest"), "sortablefield", true)
|
|
13
|
-
contents.each { content ->
|
|
14
|
-
sidebarRootElements.push(content["path"][0])
|
|
15
|
-
}
|
|
16
|
-
return sidebarRootElements
|
|
17
|
-
}
|