@raclettejs/core 0.1.25 → 0.1.26

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": "@raclettejs/core",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "racletteJS core package",
5
5
  "repository": "https://gitlab.com/raclettejs/core",
6
6
  "author": "Pacifico Digital Explorations GmbH <info@raclettejs.com>",
@@ -78,7 +78,7 @@
78
78
  "@emnapi/core": "1.9.2",
79
79
  "@emnapi/runtime": "1.9.2",
80
80
  "@eslint/js": "9.35.0",
81
- "@raclettejs/types": "^0.1.25",
81
+ "@raclettejs/types": "^0.1.26",
82
82
  "@types/fs-extra": "11.0.4",
83
83
  "@types/js-yaml": "4.0.9",
84
84
  "@types/node": "25.5.0",
@@ -126,7 +126,7 @@ export class ConfigService {
126
126
  public getFastifyRateLimits() {
127
127
  const config = this.getConfig()
128
128
 
129
- return config?.accessRateLimit ?? { max: 1000, timeWindow: "1 minute" }
129
+ return config?.accessRateLimit ?? { max: 1000, timeWindow: 60000 }
130
130
  }
131
131
  // Helper to check if a specific auto-send feature is enabled
132
132
  // Default to true unless explicitly set to false
@@ -6,16 +6,5 @@ import configService from "@c/config/configService"
6
6
  export default fastifyPlugin(async (fastify: FastifyInstance) => {
7
7
  const opts = configService.getFastifyRateLimits()
8
8
  fastify.log.info("Fastify Ratelimiter with opts " + JSON.stringify(opts))
9
- await fastify.register(rateLimit, opts)
10
- fastify.setNotFoundHandler(
11
- {
12
- preHandler: fastify.rateLimit({
13
- max: 4,
14
- timeWindow: 500,
15
- }),
16
- },
17
- function (request, reply) {
18
- reply.code(404).send({ why: "you do dat?" })
19
- },
20
- )
9
+ await fastify.register(rateLimit, { ...opts, global: true })
21
10
  })
@@ -42,6 +42,7 @@ const $writeDataApi = (
42
42
  if (options.responseType === "stream") {
43
43
  return writeData(actionId, operationDefinition, queryParams, options)
44
44
  }
45
+
45
46
  isLoadingSubject$.next(true)
46
47
  const resultData = await writeData(
47
48
  actionId,
@@ -49,8 +50,7 @@ const $writeDataApi = (
49
50
  queryParams,
50
51
  options,
51
52
  ).catch((e) => {
52
- const errorObj = e
53
- errorSubject$.next(errorObj)
53
+ errorSubject$.next(e.response)
54
54
  isLoadingSubject$.next(false)
55
55
  })
56
56
  responseSubject$.next(resultData?.response)
@@ -86,8 +86,7 @@ export const $queryApi = (
86
86
  queryParams,
87
87
  options,
88
88
  ).catch((e) => {
89
- const errorObj = e
90
- errorSubject$.next(errorObj)
89
+ errorSubject$.next(e.response)
91
90
  })
92
91
  responseSubject$.next(resultData?.response)
93
92
  if (callbacks[actionId] && typeof callbacks[actionId] === "function") {
@@ -122,26 +122,6 @@ const storePatterns = {
122
122
  uuid: false,
123
123
  version: "0.0.0",
124
124
  },
125
- page: {
126
- // the icon to be displayed in the page navigation
127
- icon: false,
128
- // this will determine if we always scroll to the last page position or
129
- // to the top whenever we enter this page
130
- scrollTop: false,
131
- // The title of the page if i18n from db
132
- title: "",
133
- // The title of the page if i18n key is handled in frontend
134
- titleI18n: "",
135
- // grid config for a page
136
- grid: configPatterns.grid,
137
- // the array containing the configs for the 1-n slots
138
- slots: [[]],
139
- // the name of the route configured in the vue router
140
- routeName: false,
141
- // The uuid of other unique identifier for the page within the application context
142
- uuid: false,
143
- version: "0.0.0",
144
- },
145
125
  widget: {
146
126
  // The title of the page if i18n from db
147
127
  title: "",
@@ -152,30 +132,15 @@ const storePatterns = {
152
132
  uuid: false,
153
133
  // the type of widget which represents a folder name under widgets and a config
154
134
  name: false,
155
- // a deeper abstractation level for widgets which are used as tools.
156
- // ie. type:''add' create a folder called 'add' and create a default.vue
157
- // or FACE.vue containing your add logic for a given widget
135
+ // any working state we want to have available in the store and not just the component
158
136
  workingState: {},
137
+ // any acutal config we provide to the widget
138
+ config: {},
139
+ // any data the widget want's to provide to other widgets/plugins/core such as serializers, connection hooks to other modules etc
140
+ public: {},
159
141
  version: "0.0.0",
160
- },
161
- tools: {
162
- // The title of the page if i18n from db
163
- title: "",
164
- // The title of the page if i18n key is handled in frontend
165
- titleI18n: "",
166
- // an array of route names this tool should be visible on. If array is empty, it will be visible everywhere
167
- pages: [],
168
- // an icon to be displayed in the tool wrapper
169
- icon: false,
170
- // a uniqe identifier for the tool
171
- uuid: false,
172
- // the widget which should serve as the functionallity of the tool
173
- widget: false,
174
- version: "0.0.0",
142
+ pluginKey: "",
175
143
  },
176
144
  }
177
145
 
178
- // add the widget store pattern to the tool
179
- storePatterns.tools.widget = storePatterns.widget
180
-
181
146
  export { loadingHold, applicationState, configPatterns, storePatterns }