From 7647a3779e7dd17cdb91e0d9ca9e2e6c7a166811 Mon Sep 17 00:00:00 2001 From: "INT\\ristim" Date: Mon, 7 Mar 2022 13:29:03 +0100 Subject: [PATCH 1/2] Updated the upgrade document --- _pages/fsa/fsa-updating-to-version-4.md | 61 ++++++++++--------------- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/_pages/fsa/fsa-updating-to-version-4.md b/_pages/fsa/fsa-updating-to-version-4.md index 4c7b116c2..818c33fe2 100644 --- a/_pages/fsa/fsa-updating-to-version-4.md +++ b/_pages/fsa/fsa-updating-to-version-4.md @@ -85,46 +85,14 @@ For more information, see the official [Angular Update Guide](https://update.ang Before upgrading your FSA Spartacus libraries to version 4.x, you must address the following prerequisites: -- **Angular CLI**: Version [12.0.5](https://update.angular.io/) or later -- **node.js**: Version 14.18.1 or later +- **Angular CLI**: Version [12.0.5](https://update.angular.io/) or later. +- **node.js**: Version 14.18.1 or later. - **Spartacus**: Minimum version [4.0](https://sap.github.io/spartacus-docs/updating-to-version-4/), the latest minor/patch version is recommended. -**NOTE**: In order for this upgrade to proceed without any errors, you need to have the new Spartacus app directory structure in place. -Simply changing the version in `package.json` file is not enough. -For instructions on how to create new app directory structure, see [Spartacus documentation](https://sap.github.io/spartacus-docs/updating-to-version-4/). - -### Specifying Configuration Options for FSA Spartacus - -Once you have created the new app directory structure as described in the previous step, you need to specify configuration options necessary for FSA. -This configuration should be declared after all other Spartacus modules, and should contain the following: - -```ts -provideConfig({ - backend: { - occ: { - prefix: '/occ/v2/', - baseUrl: '/--path to the server--/', - }, - }, - context: { - baseSite: ['financial'], - language: ['en', 'de'], - currency: ['EUR'], - urlParameters: ['baseSite', 'language', 'currency'], - }, - authentication: { - client_id: 'financial_customer', - client_secret: 'secret', - }, - features: { - consignmentTracking: true, - }, -}), -``` ### Updating FSA Spartacus -1. Depending on whether you use yarn or npm for installations, delete `yarn.lock` file or `package-lock.json` file from your project. +1. Depending on whether you use `yarn` or `npm` for installations, delete `yarn.lock` file or `package-lock.json` file from your project. 2. Go to the `package.json` file at the root of your project and replace existing dependencies with the following: @@ -190,9 +158,30 @@ provideConfig({ "zone.js": "~0.11.4" ``` -3. To complete the update, run the following commands: +3. Next, install dependencies with the following command: ```shell yarn install + ``` + +4. After the installation is completed, your app structure needs to be updated to meet new Spartacus requirements. + To do that, you need to replace the existing `app` folder with the one that contains the required structure. + You can download a ready-made `app` folder with the new structure on the link provided below. + Perform the following steps: + - [Download new app.zip](https://github.com/SAP/spartacus-financial-services-accelerator/releases/download/fsa-storefront-4.0.0/app.zip). + - Navigate to `mystore/src/`. + - Delete the existing `app` folder. + - Unpack the downloaded `app.zip` folder to that same location (`mystore/src/`). + + 5. Now that you have the new app structure, you need to set the `baseUrl`: + - Navigate to `app/spartacus`. + - Find and open `fs-configuration.module.ts`, which holds the configuration necessary for the FSA to function properly. + - Edit `baseUrl` property so that it points to your back-end server. + +6. To complete the update, run the following command: + + ```shell yarn start ``` + + From 93b33ae261b449bce8d89692f865b3b046428678 Mon Sep 17 00:00:00 2001 From: "INT\\ristim" Date: Mon, 7 Mar 2022 13:49:12 +0100 Subject: [PATCH 2/2] Small wording fix --- _pages/fsa/fsa-updating-to-version-4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pages/fsa/fsa-updating-to-version-4.md b/_pages/fsa/fsa-updating-to-version-4.md index 818c33fe2..84dfa11d4 100644 --- a/_pages/fsa/fsa-updating-to-version-4.md +++ b/_pages/fsa/fsa-updating-to-version-4.md @@ -175,7 +175,7 @@ Before upgrading your FSA Spartacus libraries to version 4.x, you must address t 5. Now that you have the new app structure, you need to set the `baseUrl`: - Navigate to `app/spartacus`. - - Find and open `fs-configuration.module.ts`, which holds the configuration necessary for the FSA to function properly. + - Find and open `fs-configuration.module.ts`, which holds the configuration necessary for the FSA to function correctly. - Edit `baseUrl` property so that it points to your back-end server. 6. To complete the update, run the following command: