@raclettejs/workbench 0.0.1

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.
Files changed (89) hide show
  1. package/README.md +1 -0
  2. package/config/compositions.js +282 -0
  3. package/config/interactionLinks.js +164 -0
  4. package/i18n/de-DE.json +245 -0
  5. package/i18n/en-EU.json +245 -0
  6. package/i18n/sk-SK.json +245 -0
  7. package/package.json +63 -0
  8. package/packages.json +33 -0
  9. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionConfiguration.vue +140 -0
  10. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionIntegration.vue +3 -0
  11. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionWidgetsLayout.vue +129 -0
  12. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetContextMenu.vue +53 -0
  13. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetIcon.vue +99 -0
  14. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetList.vue +122 -0
  15. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetRenderer.vue +65 -0
  16. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetSettings.vue +96 -0
  17. package/plugins/pacifico__compositions/frontend/widgets/CompositionCreateWidget.vue +51 -0
  18. package/plugins/pacifico__compositions/frontend/widgets/CompositionEditWidget.vue +66 -0
  19. package/plugins/pacifico__compositions/frontend/widgets/CompositionListWidget.vue +132 -0
  20. package/plugins/pacifico__compositions/raclette.plugin.ts +8 -0
  21. package/plugins/pacifico__core/backend/index.ts +25 -0
  22. package/plugins/pacifico__core/backend/routes.ts +220 -0
  23. package/plugins/pacifico__core/raclette.plugin.ts +9 -0
  24. package/plugins/pacifico__interactionLinks/frontend/components/InteractionLinkConfiguration.vue +145 -0
  25. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkCreateWidget.vue +48 -0
  26. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkEditWidget.vue +66 -0
  27. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkListWidget.vue +126 -0
  28. package/plugins/pacifico__interactionLinks/raclette.plugin.ts +8 -0
  29. package/plugins/pacifico__plugins/frontend/index.ts +42 -0
  30. package/plugins/pacifico__plugins/frontend/widgets/PluginDetailWidget.vue +26 -0
  31. package/plugins/pacifico__plugins/frontend/widgets/PluginListWidget.vue +59 -0
  32. package/plugins/pacifico__plugins/raclette.plugin.ts +8 -0
  33. package/plugins/pacifico__tags/frontend/components/TagConfiguration.vue +99 -0
  34. package/plugins/pacifico__tags/frontend/widgets/TagCreateWidget.vue +43 -0
  35. package/plugins/pacifico__tags/frontend/widgets/TagEditWidget.vue +64 -0
  36. package/plugins/pacifico__tags/frontend/widgets/TagListWidget.vue +71 -0
  37. package/plugins/pacifico__tags/raclette.plugin.ts +8 -0
  38. package/plugins/pacifico__users/frontend/components/UserConfiguration.vue +110 -0
  39. package/plugins/pacifico__users/frontend/widgets/UserCreateWidget.vue +48 -0
  40. package/plugins/pacifico__users/frontend/widgets/UserEditWidget.vue +64 -0
  41. package/plugins/pacifico__users/frontend/widgets/UserListWidget.vue +86 -0
  42. package/plugins/pacifico__users/raclette.plugin.ts +8 -0
  43. package/raclette.config.js +150 -0
  44. package/services/frontend/.DS_Store +0 -0
  45. package/services/frontend/public/favicon.png +0 -0
  46. package/services/frontend/public/home-icon.png +0 -0
  47. package/services/frontend/public/logo.png +0 -0
  48. package/services/frontend/src/app/.DS_Store +0 -0
  49. package/services/frontend/src/app/components/BaseDataTable.vue +284 -0
  50. package/services/frontend/src/app/components/dynamicForm/DynamicForm.vue +207 -0
  51. package/services/frontend/src/app/components/dynamicForm/DynamicFormTypes.ts +63 -0
  52. package/services/frontend/src/app/components/dynamicForm/DynamicInput.vue +344 -0
  53. package/services/frontend/src/app/components/dynamicForm/TextDivider.vue +13 -0
  54. package/services/frontend/src/app/components/dynamicForm/testing/DynamicFormInputTesting.vue +477 -0
  55. package/services/frontend/src/app/components/dynamicForm/typedInputs/CheckboxInput.vue +16 -0
  56. package/services/frontend/src/app/components/dynamicForm/typedInputs/ColorInput.vue +52 -0
  57. package/services/frontend/src/app/components/dynamicForm/typedInputs/CompositionInput.vue +32 -0
  58. package/services/frontend/src/app/components/dynamicForm/typedInputs/IconInput.vue +40 -0
  59. package/services/frontend/src/app/components/dynamicForm/typedInputs/ListInput.vue +51 -0
  60. package/services/frontend/src/app/components/dynamicForm/typedInputs/LocalizedInput.vue +51 -0
  61. package/services/frontend/src/app/components/dynamicForm/typedInputs/PasswordInput.vue +23 -0
  62. package/services/frontend/src/app/components/dynamicForm/typedInputs/RecordInput.vue +91 -0
  63. package/services/frontend/src/app/components/dynamicForm/typedInputs/SwitchInput.vue +17 -0
  64. package/services/frontend/src/app/components/dynamicForm/typedInputs/TagsInput.vue +58 -0
  65. package/services/frontend/src/app/components/dynamicForm/typedInputs/TriggerInput.vue +159 -0
  66. package/services/frontend/src/app/components/dynamicForm/typedInputs/UserInput.vue +63 -0
  67. package/services/frontend/src/app/components/dynamicForm/typedInputs/mdi-icons.ts +7002 -0
  68. package/services/frontend/src/app/components/dynamicForm/validators.ts +19 -0
  69. package/services/frontend/src/app/components/stepNavigator/StepNavigator.vue +331 -0
  70. package/services/frontend/src/app/components/stepNavigator/StepNavigatorTypes.ts +12 -0
  71. package/services/frontend/src/app/composables/useUserHelper.ts +254 -0
  72. package/services/frontend/src/app/composables/useVantaFog.ts +37 -0
  73. package/services/frontend/src/app/composables/useWorkbenchPlugins.ts +44 -0
  74. package/services/frontend/src/orchestrator/.DS_Store +0 -0
  75. package/services/frontend/src/orchestrator/LoginApp.vue +62 -0
  76. package/services/frontend/src/orchestrator/WelcomeScreen.vue +39 -0
  77. package/services/frontend/src/orchestrator/assets/styles/themes/dark.ts +39 -0
  78. package/services/frontend/src/orchestrator/assets/styles/themes/highContrast.ts +39 -0
  79. package/services/frontend/src/orchestrator/assets/styles/themes/light.ts +39 -0
  80. package/services/frontend/src/orchestrator/components/InitProjectScreen.vue +298 -0
  81. package/services/frontend/src/orchestrator/components/LoginScreen.vue +73 -0
  82. package/services/frontend/src/orchestrator/components/RacletteAdCorner.vue +313 -0
  83. package/services/frontend/src/orchestrator/components/layout/AppButton.vue +109 -0
  84. package/services/frontend/src/orchestrator/components/layout/AppHeadline.vue +46 -0
  85. package/services/frontend/src/orchestrator/components/layout/AppLabelledInput.vue +94 -0
  86. package/services/frontend/src/orchestrator/components/layout/AppModal.vue +28 -0
  87. package/services/frontend/src/orchestrator/components/layout/SvgButtonArrow.vue +14 -0
  88. package/services/frontend/src/orchestrator/composables/useWelcomeScreen.ts +19 -0
  89. package/yarn.lock +3435 -0
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <TagConfiguration
3
+ v-if="editableTag"
4
+ v-model="editableTag"
5
+ :disabled="isLoading || editableTag.locked"
6
+ is-editing
7
+ @save="onSubmit"
8
+ />
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ import { type Tag } from "@raclettejs/core"
13
+ import {
14
+ usePluginApi,
15
+ useRouteState,
16
+ } from "@raclettejs/core/orchestrator/composables"
17
+ import { computed, ref, toRaw } from "vue"
18
+ import TagConfiguration from "../components/TagConfiguration.vue"
19
+ import { clone } from "ramda"
20
+ import { DEFAULT_SLOT_NAME } from "@raclettejs/core/orchestrator/router/routeParserHelper"
21
+
22
+ const props = defineProps<{
23
+ uuid: string
24
+ }>()
25
+
26
+ const { compositionSlots, triggerInteractionLinkById } = useRouteState()
27
+ const { $data } = usePluginApi("raclette__core")
28
+
29
+ const id = computed(
30
+ () =>
31
+ compositionSlots.value.find((slot) => slot.slotName === DEFAULT_SLOT_NAME)
32
+ ?.slotParams?.id,
33
+ )
34
+
35
+ const { data } = $data.tag.get({
36
+ params: { _id: id.value },
37
+ options: {
38
+ immediate: true,
39
+ cb: () => {
40
+ if (!tag.value) {
41
+ return navigateBack()
42
+ }
43
+
44
+ editableTag.value = clone(tag.value)
45
+ },
46
+ },
47
+ })
48
+
49
+ const { execute: executeUpdate, isLoading } = $data.tag.update()
50
+
51
+ const editableTag = ref<Tag>()
52
+
53
+ const tag = computed<Tag | undefined>(() => {
54
+ if (!id.value) {
55
+ return undefined
56
+ }
57
+
58
+ return data.value?.[id.value]
59
+ })
60
+
61
+ const navigateBack = () => triggerInteractionLinkById("tagListInteractionLink")
62
+
63
+ const onSubmit = async () => await executeUpdate(toRaw(editableTag.value))
64
+ </script>
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <BaseDataTable
3
+ :items="parsedTags"
4
+ :loading="tagsLoading"
5
+ :headers="headers"
6
+ create-interaction-link-id="tagCreateInteractionLink"
7
+ edit-interaction-link-id="tagEditInteractionLink"
8
+ :data-name="$t('workbench.tagList.dataName')"
9
+ :data-article="$t('workbench.tagList.dataArticle')"
10
+ @delete="deleteTag"
11
+ />
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
16
+ import { computed } from "vue"
17
+ import type { Tag } from "@raclettejs/core"
18
+ import { useI18n } from "vue-i18n"
19
+ import BaseDataTable from "@app/components/BaseDataTable.vue"
20
+ import { formatDistance } from "date-fns"
21
+
22
+ const { t } = useI18n()
23
+
24
+ const headers = computed<{ title: string; key: keyof Tag }[]>(() => [
25
+ {
26
+ title: t("workbench.tagList.tableHeaders.title"),
27
+ key: "title",
28
+ },
29
+ {
30
+ title: t("workbench.tagList.tableHeaders.type"),
31
+ key: "type",
32
+ },
33
+ {
34
+ title: t("workbench.tagList.tableHeaders.updatedAt"),
35
+ key: "updatedAt",
36
+ },
37
+ ])
38
+
39
+ const props = defineProps<{
40
+ uuid: string
41
+ }>()
42
+
43
+ const { $data, $socket } = usePluginApi("raclette__core")
44
+
45
+ const {
46
+ data: tags,
47
+ execute,
48
+ isLoading: tagsLoading,
49
+ } = $data.tag.getAll({
50
+ options: { immediate: true },
51
+ })
52
+
53
+ const { execute: executeDelete } = $data.tag.delete({
54
+ options: { cb: () => execute() },
55
+ })
56
+
57
+ const parsedTags = computed(() => {
58
+ if (tags.value) {
59
+ return Object.values(tags.value as { [key: string]: Tag }).map((tag) => ({
60
+ ...tag,
61
+ tags: tag?.tags?.map((t) => tags.value?.[t]) ?? [],
62
+ updatedAt: formatDistance(new Date(tag.updatedAt), new Date()),
63
+ }))
64
+ }
65
+ return []
66
+ })
67
+
68
+ const deleteTag = async (tag: Tag) => await executeDelete({ _id: tag._id })
69
+
70
+ $socket.on("tagCreated", () => execute())
71
+ </script>
@@ -0,0 +1,8 @@
1
+ export default {
2
+ name: "tags",
3
+ author: "pacifico",
4
+ version: "0.0.1",
5
+ description: "A plugin for tags",
6
+ // Specify where the main frontend and backend entry points are
7
+ frontendDir: "./frontend",
8
+ }
@@ -0,0 +1,110 @@
1
+ <template>
2
+ <StepNavigator
3
+ :steps
4
+ :is-saving="disabled"
5
+ :show-save-button="isEditing"
6
+ @save="$emit('save')"
7
+ @save-and-finish="$emit('save-and-finish')"
8
+ >
9
+ <!-- @vue-generic {UserCreate | UserUpdate} -->
10
+ <DynamicForm
11
+ ref="dynamicFormRef"
12
+ v-model="user"
13
+ :data="inputFields"
14
+ :disabled
15
+ :title="
16
+ isEditing
17
+ ? $t('workbench.userEdit.title')
18
+ : $t('workbench.userCreate.title')
19
+ "
20
+ route-back-interaction-link-id="userListInteractionLink"
21
+ />
22
+ </StepNavigator>
23
+ </template>
24
+
25
+ <script setup lang="ts">
26
+ import { useI18n } from "vue-i18n"
27
+ import type { UserCreate, UserUpdate } from "@raclettejs/core"
28
+ import DynamicForm from "@app/components/dynamicForm/DynamicForm.vue"
29
+ import { DynamicFormItem } from "@app/components/dynamicForm/DynamicFormTypes"
30
+ import { computed, useTemplateRef } from "vue"
31
+ import { emailValidator } from "@app/components/dynamicForm/validators"
32
+ import StepNavigator from "@app/components/stepNavigator/StepNavigator.vue"
33
+ import { Step } from "@app/components/stepNavigator/StepNavigatorTypes"
34
+
35
+ const props = defineProps<{ disabled?: boolean; isEditing?: boolean }>()
36
+
37
+ defineEmits<{
38
+ (e: "save"): void
39
+ (e: "save-and-finish"): void
40
+ }>()
41
+
42
+ const user = defineModel<UserCreate | UserUpdate>({ required: true })
43
+
44
+ const dynamicFormRef = useTemplateRef("dynamicFormRef")
45
+
46
+ const { t } = useI18n()
47
+
48
+ const inputFields = computed<DynamicFormItem<UserCreate | UserUpdate>[]>(() => [
49
+ {
50
+ divider: t("workbench.userConfiguration.dividers.general"),
51
+ },
52
+ {
53
+ title: t("workbench.userConfiguration.email.title"),
54
+ description: t("workbench.userConfiguration.email.description"),
55
+ inputType: "text",
56
+ field: "email",
57
+ prependIcon: "at",
58
+ validation: {
59
+ required: true,
60
+ customValidator: emailValidator,
61
+ },
62
+ },
63
+ {
64
+ title: t("workbench.userConfiguration.password.title"),
65
+ inputType: "password",
66
+ field: "password",
67
+ prependIcon: "key-variant",
68
+ validation: {
69
+ required: !props.isEditing,
70
+ },
71
+ },
72
+ {
73
+ title: t("workbench.userConfiguration.firstname.title"),
74
+ inputType: "text",
75
+ field: "firstname",
76
+ prependIcon: "text-short",
77
+ },
78
+ {
79
+ title: t("workbench.userConfiguration.lastname.title"),
80
+ inputType: "text",
81
+ field: "lastname",
82
+ prependIcon: "text-short",
83
+ },
84
+ {
85
+ title: t("workbench.userConfiguration.tags.title"),
86
+ description: t("workbench.userConfiguration.tags.description"),
87
+ inputType: "tags",
88
+ field: "tags",
89
+ prependIcon: "tag-multiple",
90
+ },
91
+ ])
92
+
93
+ const validateForm = (): boolean => {
94
+ const validateAllFields = dynamicFormRef.value?.validateAllFields
95
+
96
+ if (validateAllFields) {
97
+ const isValid = !!validateAllFields()
98
+
99
+ return isValid
100
+ }
101
+ return true
102
+ }
103
+
104
+ const steps = computed<Step[]>(() => [
105
+ {
106
+ id: "config",
107
+ validator: validateForm,
108
+ },
109
+ ])
110
+ </script>
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <!-- <DynamicFormInputTesting /> -->
3
+ <UserConfiguration
4
+ v-model="newUser"
5
+ :disabled="isLoading"
6
+ @save-and-finish="onSubmit"
7
+ />
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ import { ref } from "vue"
12
+ import UserConfiguration from "../components/UserConfiguration.vue"
13
+ import { UserCreate } from "@raclettejs/core"
14
+ import {
15
+ useRouteState,
16
+ usePluginApi,
17
+ } from "@raclettejs/core/orchestrator/composables"
18
+ import { DEFAULT_SLOT_NAME } from "@raclettejs/core/orchestrator/router/routeParserHelper"
19
+
20
+ const props = defineProps<{
21
+ uuid: string
22
+ }>()
23
+
24
+ const { $data } = usePluginApi("raclette__core")
25
+ const { triggerInteractionLinkById } = useRouteState()
26
+
27
+ const { execute, isLoading, error } = $data.user.create()
28
+
29
+ const newUser = ref<UserCreate>({
30
+ email: "",
31
+ firstname: "",
32
+ lastname: "",
33
+ email_verified: true,
34
+ tags: [],
35
+ password: "",
36
+ account: "",
37
+ })
38
+
39
+ const navigateBack = () => triggerInteractionLinkById("userListInteractionLink")
40
+
41
+ const onSubmit = async () => {
42
+ await execute(newUser.value)
43
+
44
+ if (!error.value) {
45
+ navigateBack()
46
+ }
47
+ }
48
+ </script>
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <UserConfiguration
3
+ v-if="editableUser"
4
+ v-model="editableUser"
5
+ :disabled="isLoading"
6
+ isEditing
7
+ @save="onSubmit"
8
+ />
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ import type { User } from "@raclettejs/core"
13
+ import {
14
+ usePluginApi,
15
+ useRouteState,
16
+ } from "@raclettejs/core/orchestrator/composables"
17
+ import { computed, ref, toRaw } from "vue"
18
+ import UserConfiguration from "../components/UserConfiguration.vue"
19
+ import { clone } from "ramda"
20
+ import { DEFAULT_SLOT_NAME } from "@raclettejs/core/orchestrator/router/routeParserHelper"
21
+
22
+ const props = defineProps<{
23
+ uuid: string
24
+ }>()
25
+
26
+ const { compositionSlots, triggerInteractionLinkById } = useRouteState()
27
+ const { $data } = usePluginApi("raclette__core")
28
+
29
+ const id = computed(
30
+ () =>
31
+ compositionSlots.value.find((slot) => slot.slotName === DEFAULT_SLOT_NAME)
32
+ ?.slotParams?.id,
33
+ )
34
+
35
+ const { data } = $data.user.get({
36
+ params: { _id: id.value },
37
+ options: {
38
+ immediate: true,
39
+ cb: () => {
40
+ if (!user.value) {
41
+ return navigateBack()
42
+ }
43
+
44
+ editableUser.value = clone(user.value)
45
+ },
46
+ },
47
+ })
48
+
49
+ const { execute: executeUpdate, isLoading } = $data.user.update()
50
+
51
+ const editableUser = ref<User>()
52
+
53
+ const user = computed<User | undefined>(() => {
54
+ if (!id.value) {
55
+ return undefined
56
+ }
57
+
58
+ return data.value?.[id.value]
59
+ })
60
+
61
+ const navigateBack = () => triggerInteractionLinkById("userListInteractionLink")
62
+
63
+ const onSubmit = async () => await executeUpdate(toRaw(editableUser.value))
64
+ </script>
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <BaseDataTable
3
+ :items="parsedUsers"
4
+ :loading="usersLoading || tagsLoading"
5
+ :headers="headers"
6
+ create-interaction-link-id="userCreateInteractionLink"
7
+ edit-interaction-link-id="userEditInteractionLink"
8
+ :data-name="$t('workbench.userList.dataName')"
9
+ :data-article="$t('workbench.userList.dataArticle')"
10
+ :delete-validator="(user) => user._id !== $user?._id"
11
+ @delete="deleteUser"
12
+ />
13
+ </template>
14
+
15
+ <script setup lang="ts">
16
+ import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
17
+ import { computed } from "vue"
18
+ import type { User } from "@raclettejs/core"
19
+ import { formatDistance } from "date-fns"
20
+ import { useI18n } from "vue-i18n"
21
+ import BaseDataTable from "@app/components/BaseDataTable.vue"
22
+
23
+ const props = defineProps<{
24
+ uuid: string
25
+ }>()
26
+
27
+ const { t } = useI18n()
28
+
29
+ const headers = computed<{ title: string; key: keyof User }[]>(() => [
30
+ {
31
+ title: t("workbench.userList.tableHeaders.email"),
32
+ key: "email",
33
+ },
34
+ {
35
+ title: t("workbench.userList.tableHeaders.lastname"),
36
+ key: "lastname",
37
+ },
38
+ {
39
+ title: t("workbench.userList.tableHeaders.firstname"),
40
+ key: "firstname",
41
+ },
42
+ {
43
+ title: t("workbench.userList.tableHeaders.tags"),
44
+ key: "tags",
45
+ },
46
+ {
47
+ title: t("workbench.userList.tableHeaders.updatedAt"),
48
+ key: "updatedAt",
49
+ },
50
+ ])
51
+
52
+ const { $data, $socket, $user } = usePluginApi("raclette__core")
53
+
54
+ const {
55
+ data: users,
56
+ execute,
57
+ isLoading: usersLoading,
58
+ } = $data.user.getAll({
59
+ options: { immediate: true },
60
+ })
61
+
62
+ const { data: tags, isLoading: tagsLoading } = $data.tag.getAll({
63
+ options: { immediate: true },
64
+ })
65
+
66
+ const { execute: executeDelete } = $data.user.delete({
67
+ options: { cb: () => execute() },
68
+ })
69
+
70
+ const parsedUsers = computed(() => {
71
+ if (users.value && tags.value) {
72
+ return Object.values(users.value as { [key: string]: User }).map(
73
+ (user) => ({
74
+ ...user,
75
+ tags: user.tags.map((tag) => tags.value?.[tag]),
76
+ updatedAt: formatDistance(new Date(user.updatedAt), new Date()),
77
+ }),
78
+ )
79
+ }
80
+ return []
81
+ })
82
+
83
+ const deleteUser = async (user: User) => await executeDelete({ _id: user._id })
84
+
85
+ $socket.on("userCreated", () => execute())
86
+ </script>
@@ -0,0 +1,8 @@
1
+ export default {
2
+ name: "users",
3
+ author: "pacifico",
4
+ version: "0.0.1",
5
+ description: "A plugin for users",
6
+ // Specify where the main frontend and backend entry points are
7
+ frontendDir: "./frontend",
8
+ }
@@ -0,0 +1,150 @@
1
+ import { defineRacletteConfig } from "@raclettejs/core"
2
+ import compositions from "./config/compositions.js"
3
+ import interactionLinks from "./config/interactionLinks.js"
4
+
5
+ export default defineRacletteConfig({
6
+ name: "raclette-workbench",
7
+
8
+ // Configure services
9
+ services: {
10
+ frontend: {
11
+ enabled: true,
12
+ port: 8083,
13
+ volumes: [
14
+ {
15
+ source:
16
+ process.env.RACLETTE_APP_PATH + "/plugins" || "../../../plugins",
17
+ target: "/app/external-app-plugins",
18
+ mustExist: true,
19
+ },
20
+ {
21
+ source:
22
+ process.env.RACLETTE_APP_PATH + "/workbench/plugins" ||
23
+ "../../../workbench/plugins",
24
+ target: "/app/src/workbenchPlugins",
25
+ mustExist: true,
26
+ },
27
+ ],
28
+ },
29
+ backend: {
30
+ enabled: true,
31
+ port: 8084,
32
+ volumes: [
33
+ {
34
+ source:
35
+ process.env.RACLETTE_APP_PATH + "/workbench/plugins" ||
36
+ "../../../workbench/plugins",
37
+ target: "/app/src/workbenchPlugins",
38
+ mustExist: true,
39
+ },
40
+ ],
41
+ },
42
+ mongodb: {
43
+ name: "raclette-mongodb",
44
+ enabled: true,
45
+ port: 27017,
46
+ volume: "raclette-mongodb",
47
+ databaseName: "raclette",
48
+ },
49
+ cache: {
50
+ name: "raclette-cache",
51
+ volume: "raclette-cache",
52
+ enabled: true,
53
+ port: 6379,
54
+ db: 1,
55
+ },
56
+ },
57
+
58
+ // Environment-specific configuration
59
+ env: {
60
+ development: {
61
+ RACLETTE_DEBUG_MODE: true,
62
+ },
63
+ production: {},
64
+ },
65
+ global: {
66
+ authTokenExpiryDays: 1,
67
+ },
68
+ frontend: {
69
+ meta: {
70
+ title: "Workbench",
71
+ },
72
+ preventNotifications: {
73
+ checkToken: {
74
+ status: 500,
75
+ },
76
+ },
77
+ i18n: {
78
+ locales: ["en-EU"],
79
+ priorities: {
80
+ "app-workbench": 5, // this is explicit i18n coming from the app ONLY for the workbench
81
+ "app-app": 7, // this is the app i18n which we additionally mount to the workbench
82
+ app: 10, // this is the i18n of the workbench
83
+ ".": 30, // this is raclette core (always)
84
+ },
85
+ },
86
+ framework: "vue", // this should be set by the orchestrator later
87
+ },
88
+ backend: {
89
+ additionalPluginPaths: ["/app/src/workbenchPlugins"],
90
+ onlyAllowLoginWithAdminTag: true,
91
+ sockets: {
92
+ autoSend: {
93
+ compositions: false,
94
+ interactionLinks: false,
95
+ customData: {
96
+ compositions,
97
+ interactionLinks,
98
+ },
99
+ },
100
+ security: {
101
+ requireAuth: true,
102
+ tokenValidation: "jwt",
103
+ },
104
+ },
105
+ },
106
+ sourceDirectories: [
107
+ // we allow to mount the app's shared dir also in the workbench, but with lower priority
108
+ {
109
+ name: "external-app-shared",
110
+ path: process.env.RACLETTE_APP_PATH + "/shared" || "../../../shared",
111
+ priority: 15, // Between workbench (10) and core (30)
112
+ folderMappings: {
113
+ ".": "backend/src/shared/app", // Mount external shared to /app subfolder
114
+ },
115
+ },
116
+ {
117
+ name: "external-app-workbench-i18n",
118
+ path: process.env.RACLETTE_APP_PATH || "../../..",
119
+ priority: 9, // run after the default "app" copying
120
+ folderMappings: {
121
+ "./i18n": "frontend/src/orchestrator/i18n/app-app", // Mount app i18n to /app-app subfolder
122
+ "./workbench/i18n": "frontend/src/orchestrator/i18n/app-workbench", // Mount app external workbench-i18n to /app-workbench subfolder
123
+ },
124
+ },
125
+ ],
126
+ packageMerging: {
127
+ frontend: [
128
+ { file: "./packages.json", key: "frontend" },
129
+ {
130
+ file: process.env.RACLETTE_APP_PATH + "/packages.json",
131
+ key: "workbench.frontend",
132
+ },
133
+ ],
134
+ backend: [
135
+ { file: "./packages.json", key: "backend" },
136
+ {
137
+ file: process.env.RACLETTE_APP_PATH + "/packages.json",
138
+ key: "workbench.backend",
139
+ },
140
+ ],
141
+ },
142
+ lockFiles: {
143
+ frontend: process.env.RACLETTE_APP_PATH + "/workbench.frontend.yarn.lock",
144
+ backend: process.env.RACLETTE_APP_PATH + "/workbench.backend.yarn.lock",
145
+ },
146
+
147
+ eslint: {
148
+ useRecommended: true,
149
+ },
150
+ })
Binary file