Skip to content

Commit

Permalink
ci: release (#7354)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Dec 12, 2024
1 parent 49fe12d commit 54d0187
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 34 deletions.
22 changes: 0 additions & 22 deletions .changeset/great-moose-rhyme.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/content/3.middleware/3.api/middleware.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -5152,7 +5152,7 @@
{
"kind": "PropertySignature",
"canonicalReference": "@vue-storefront/middleware!Integration#errorHandler:member",
"docComment": "",
"docComment": "/**\n * Custom error handler for middleware.\n *\n * This function is invoked whenever an error occurs during middleware execution. Alokai provides a default error handler, which will be used if this property is not set.\n *\n * @param error - The error object or value that triggered the handler.\n *\n * @param req - The HTTP request object associated with the error.\n *\n * @param res - The HTTP response object for sending a response.\n *\n * @example\n * ```ts\n * {\n * errorHandler: (error, req, res) => {\n * if (typeof error === \"object\" && error !== null && \"message\" in error) {\n * res.status(500).send({ message: (error as any).message });\n * } else {\n * res.status(500).send({ message: \"An unknown error occurred\" });\n * }\n * }\n * }\n * ```\n *\n * @example\n *\n * Using the default error handler with custom behavior\n * ```ts\n * import { defaultErrorHandler } from \"@vue-storefront/middleware\";\n *\n * {\n * errorHandler: (error, req, res) => {\n * // Perform custom actions before delegating to the default error handler\n * defaultErrorHandler(error, req, res);\n * }\n * };\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
Expand Down
31 changes: 24 additions & 7 deletions docs/content/3.middleware/4.reference/change-log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Change log

## 5.3.0

### Minor Changes

**[ADDED]** `defaultErrorHandler` is now exported from the package. Example usage:

```ts
import type { Integration } from "@vue-storefront/middleware";
import type { MiddlewareConfig } from "@vsf-enterprise/sapcc-api";
import { defaultErrorHandler } from "@vue-storefront/middleware";

export const config = {
integrations: {
commerce: {
errorHandler: (error, req, res) => {
// Perform custom actions before delegating to the default error handler
defaultErrorHandler(error, req, res);
},
} satisfies Integration<MiddlewareConfig>,
},
};
```

## 5.2.0

### Minor Changes
Expand Down Expand Up @@ -46,7 +69,7 @@ Please, read the [Getting Started guide](https://docs.alokai.com/middleware/guid

### Patch Changes

- **[FIXED]** Now parameters are properly sanitized and validated before being used in the middleware.
- **[FIXED]** a potential XSS (Cross-Site Scripting) vulnerability in the middleware. Now, each parameter is properly sanitized and validated before being used in the middleware.

## 5.0.0

Expand Down Expand Up @@ -170,12 +193,6 @@ const { createApiClient } = apiClientFactory({
export { createApiClient };
```
- **[CHANGED]** - Middleware `getApiClient` is now an asynchronous function. Please, read the [data federation](https://docs.alokai.com/middleware/guides/federation#using-getapiclient-method-to-access-different-api-client) guide to get more information.
:::warning
This change may introduce breaking changes in some projects. Please ensure to update your project accordingly if necessary.
:::
## 4.0.1
### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
### Patch Changes

- Updated dependencies:
- @vue-storefront/middleware@5.1.0 - Please refer to the [middleware changelog](https://docs.alokai.com/middleware/reference/change-log#_510) for more details.
- @vue-storefront/middleware@5.1.0

## 4.1.1

### Patch Changes

- Updated dependencies:
- @vue-storefront/middleware@5.0.0 - Please refer to the [middleware changelog](https://docs.alokai.com/middleware/reference/change-log#_500) for more details.
- @vue-storefront/middleware@5.0.0

## 4.1.0

Expand Down
23 changes: 23 additions & 0 deletions packages/middleware/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Change log

## 5.3.0

### Minor Changes

**[ADDED]** `defaultErrorHandler` is now exported from the package. Example usage:

```ts
import type { Integration } from "@vue-storefront/middleware";
import type { MiddlewareConfig } from "@vsf-enterprise/sapcc-api";
import { defaultErrorHandler } from "@vue-storefront/middleware";

export const config = {
integrations: {
commerce: {
errorHandler: (error, req, res) => {
// Perform custom actions before delegating to the default error handler
defaultErrorHandler(error, req, res);
},
} satisfies Integration<MiddlewareConfig>,
},
};
```

## 5.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/middleware/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/middleware",
"version": "5.2.0",
"version": "5.3.0",
"main": "lib/index.cjs.js",
"module": "lib/index.es.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@types/jest": "^29.0.3",
"@types/node": "^18.11.17",
"@vue-storefront/middleware": "5.2.0",
"@vue-storefront/middleware": "5.3.0",
"axios": "^1.6.7",
"babel-preset-node": "^5.1.1",
"isomorphic-fetch": "^3.0.0",
Expand Down

0 comments on commit 54d0187

Please sign in to comment.