@raclettejs/core 0.1.14 → 0.1.16
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/CHANGELOG.md +12 -1
- package/package.json +2 -2
- package/services/backend/src/corePlugins/raclette__core/backend/datatypes/composition/composition.service.ts +4 -2
- package/services/backend/src/corePlugins/raclette__core/backend/datatypes/composition/routes/route.composition.getAll.ts +1 -0
- package/services/backend/src/corePlugins/raclette__core/backend/datatypes/interactionLink/interactionLink.service.ts +0 -1
- package/services/backend/src/corePlugins/raclette__core/backend/datatypes/interactionLink/routes/route.interactionLink.getAll.ts +1 -0
- package/services/backend/src/corePlugins/raclette__core/backend/datatypes/user/routes/route.user.getAll.ts +1 -1
- package/services/frontend/src/core/lib/data/writeDataHandler.ts +10 -3
- package/services/frontend/src/core/store/reducers/queries/effects.ts +0 -7
- package/services/frontend/src/orchestrator/i18n/de-DE.json +2 -0
- package/services/frontend/src/orchestrator/i18n/en-EU.json +2 -0
- package/services/frontend/src/orchestrator/i18n/sk.json +2 -0
- package/yarn.lock +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [0.1.
|
|
10
|
+
## [0.1.16] - 05.11.2025 <a href="https://gitlab.com/raclettejs/core/-/compare/v0.1.15...v0.1.16" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Frontend: axios Delete handling
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Frontend: added i18n keys
|
|
19
|
+
- Backend: getAll routes for core datatypes do now respect set filters
|
|
20
|
+
|
|
21
|
+
## [0.1.15] - 02.11.2025 <a href="https://gitlab.com/raclettejs/core/-/compare/v0.1.13...v0.1.15" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
|
|
11
22
|
|
|
12
23
|
### Fixed
|
|
13
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raclettejs/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "racletteJS core package",
|
|
5
5
|
"repository": "https://gitlab.com/raclettejs/core",
|
|
6
6
|
"author": "Pacifico Digital Explorations GmbH <info@raclettejs.com>",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@eslint/js": "9.35.0",
|
|
72
|
-
"@raclettejs/types": "0.1.
|
|
72
|
+
"@raclettejs/types": "0.1.16",
|
|
73
73
|
"@types/fs-extra": "11.0.4",
|
|
74
74
|
"@types/js-yaml": "4.0.9",
|
|
75
75
|
"@types/node": "24.5.1",
|
|
@@ -94,11 +94,12 @@ export class CompositionService {
|
|
|
94
94
|
*/
|
|
95
95
|
async _readAllCompositions(
|
|
96
96
|
fastify: PluginFastifyInstance,
|
|
97
|
+
filters: Record<string, any> = {},
|
|
97
98
|
): Promise<CompositionType[]> {
|
|
98
99
|
try {
|
|
99
100
|
return await this.compositionModel
|
|
100
101
|
.find({
|
|
101
|
-
|
|
102
|
+
...filters,
|
|
102
103
|
})
|
|
103
104
|
.lean()
|
|
104
105
|
} catch (error: any) {
|
|
@@ -113,8 +114,9 @@ export class CompositionService {
|
|
|
113
114
|
async getAllCompositions(
|
|
114
115
|
fastify: PluginFastifyInstance,
|
|
115
116
|
requestData: FrontendPayloadRequestData,
|
|
117
|
+
filters: Record<string, any> = {},
|
|
116
118
|
): Promise<FrontendPayload<CompositionType[]>> {
|
|
117
|
-
const compositions = await this._readAllCompositions(fastify)
|
|
119
|
+
const compositions = await this._readAllCompositions(fastify, filters)
|
|
118
120
|
|
|
119
121
|
return createCompositionPayload(fastify, compositions, requestData)
|
|
120
122
|
}
|
|
@@ -19,7 +19,7 @@ export default (fastify: PluginFastifyInstance) => {
|
|
|
19
19
|
) => {
|
|
20
20
|
try {
|
|
21
21
|
//TODO rework this once we have permission system in place
|
|
22
|
-
const filter: any = { isDeleted: false }
|
|
22
|
+
const filter: any = { isDeleted: req.query?.isDeleted || false }
|
|
23
23
|
if (req.query.account) {
|
|
24
24
|
filter.account = req.query.account
|
|
25
25
|
}
|
|
@@ -10,7 +10,6 @@ const createAxiosConfig = (appRequestCode, pluginItemRequestConfig) => {
|
|
|
10
10
|
"app-request-code": appRequestCode,
|
|
11
11
|
},
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
const channels = []
|
|
15
14
|
if (pluginItemRequestConfig.broadcast) {
|
|
16
15
|
channels.push("data")
|
|
@@ -77,6 +76,12 @@ const storeActions = {
|
|
|
77
76
|
})
|
|
78
77
|
},
|
|
79
78
|
}
|
|
79
|
+
const getAxiosPromise = async (method, target, source, config) => {
|
|
80
|
+
if (method === "delete") {
|
|
81
|
+
return await $api.axios.delete(target, config, { data: { source } })
|
|
82
|
+
}
|
|
83
|
+
return await $api.axios[method](target, source, config)
|
|
84
|
+
}
|
|
80
85
|
const writeData = async (actionId, operationDefinition, item, options) => {
|
|
81
86
|
const type = operationDefinition.dataTypeName
|
|
82
87
|
const cleanItem = removeCacheAttributes(item)
|
|
@@ -112,7 +117,8 @@ const writeData = async (actionId, operationDefinition, item, options) => {
|
|
|
112
117
|
config,
|
|
113
118
|
)
|
|
114
119
|
}
|
|
115
|
-
return await
|
|
120
|
+
return await getAxiosPromise(
|
|
121
|
+
operationDefinition.method,
|
|
116
122
|
validTarget,
|
|
117
123
|
cleanItem,
|
|
118
124
|
config,
|
|
@@ -124,7 +130,8 @@ const writeData = async (actionId, operationDefinition, item, options) => {
|
|
|
124
130
|
})
|
|
125
131
|
.catch((e) => reportError(e))
|
|
126
132
|
} else {
|
|
127
|
-
return await
|
|
133
|
+
return await getAxiosPromise(
|
|
134
|
+
operationDefinition.method,
|
|
128
135
|
validTarget,
|
|
129
136
|
cleanItem,
|
|
130
137
|
config,
|
|
@@ -44,13 +44,6 @@ const queriesEffects = (store) => {
|
|
|
44
44
|
if (updatedQuery) {
|
|
45
45
|
const { item, itemBefore } = updatedQuery
|
|
46
46
|
const { actionId } = action
|
|
47
|
-
if (!actionId || !item) {
|
|
48
|
-
log.store("effect queries/setCacheKey no Item or ActionId", {
|
|
49
|
-
updatedQuery,
|
|
50
|
-
action,
|
|
51
|
-
})
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
47
|
if (itemBefore?.cacheKey && itemBefore?.cacheKey !== item?.cacheKey) {
|
|
55
48
|
store.dispatch({
|
|
56
49
|
type: "queriesCache/remove",
|
package/yarn.lock
CHANGED
|
@@ -295,10 +295,10 @@
|
|
|
295
295
|
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b"
|
|
296
296
|
integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==
|
|
297
297
|
|
|
298
|
-
"@raclettejs/types@^0.1.
|
|
299
|
-
version "0.1.
|
|
300
|
-
resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.
|
|
301
|
-
integrity sha512-
|
|
298
|
+
"@raclettejs/types@^0.1.16":
|
|
299
|
+
version "0.1.16"
|
|
300
|
+
resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.16.tgz#9b8e6122c831b98822ec35bf90430dfb9a482aa6"
|
|
301
|
+
integrity sha512-HUkh4CP5yny3IwgYIHSh3zbpzakJgzmuRO3obtutVADO8tmRi9SAnQQMXK5X+3A51ZicdB9VPuhmw1r/Iv1SZA==
|
|
302
302
|
dependencies:
|
|
303
303
|
"@types/node" "24.5.2"
|
|
304
304
|
fastify "5.6.0"
|