Skip to content

Commit a53c561

Browse files
authored
5.3.3 release (#70)
1 parent 2137574 commit a53c561

518 files changed

Lines changed: 15142 additions & 44747 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.20.2
1+
v22.13.0

LICENSE.md

100755100644
File mode changed.

Makefile

100755100644
Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ install: package.json ## Install dependencies
1414
copy-config-example: ## Copy config of the example. Usage DEPLOY_ENV=[dev|integration|layer7] make copy-config-example.
1515
cp packages/example/config/config-${DEPLOY_ENV}.js packages/example/public/config.js
1616

17-
copy-config-healthcare: ## Copy config of the healthcare. Usage DEPLOY_ENV=[dev|integration|layer7] make copy-config-healthcare.
18-
cp packages/healthcare/config/config-${DEPLOY_ENV}.js packages/healthcare/public/config.js
19-
20-
generate-mock-data: ## Generate new data for the mock server. Usage OUTPUT_FILE=my-file.json make generate-mock-data. OUTPUT_FILE is optionnal.
21-
./packages/layer7-apihub-mock/bin/generateData.js ${OUTPUT_FILE}
22-
2317
#### Build ####
2418

2519
build: ## Build the library
@@ -28,18 +22,12 @@ build: ## Build the library
2822
build-example: ## Build the example
2923
@yarn build-example
3024

31-
build-healthcare: ## Build the healthcare
32-
@yarn build-healthcare
33-
3425

3526
#### Run ####
3627

3728
start: copy-config-example build ## Starts the application in development mode
3829
@yarn start-example
3930

40-
start-healthcare: copy-config-healthcare build ## Starts the application in development mode
41-
@yarn start-healthcare
42-
4331
watch-lib: ## Starts the library in development mode
4432
@yarn start-lib
4533

@@ -54,7 +42,7 @@ test-unit: ## Runs the unit tests. Usage make test-unit.
5442
test-unit-coverage: ## Runs the unit tests with coverage report. Usage make test-unit-coverage.
5543
@yarn test:coverage
5644

57-
test-e2e: copy-config-example build build-example ## Runs the end-to-end tests. Usage BROWSER=[chrome|firefox] make test-e2e.
45+
test-e2e: build build-example ## Runs the end-to-end tests. Usage BROWSER=[chrome|firefox] make test-e2e.
5846
@NODE_ENV=test cd cypress && yarn -s start
5947

6048
test-e2e-local: ## Opens the end-to-end tests GUI. Usage make test-e2e-local.
@@ -68,25 +56,14 @@ lint: ## Runs linting tools
6856

6957

7058
#### Deployment ####
71-
7259
copy-deploy-config-example: ## Copy config of the example. Usage DEPLOY_ENV=[dev|integration|staging] make copy-deploy-config-example.
7360
cp packages/example/config/config-${DEPLOY_ENV}.js packages/example/build/config.js
7461

75-
copy-deploy-config-healthcare: ## Copy config of the healthcare. Usage DEPLOY_ENV=[dev|integration|staging] make copy-deploy-config-healthcare.
76-
cp packages/healthcare/config/config-${DEPLOY_ENV}.js packages/healthcare/build/config.js
77-
7862
deploy-example: copy-deploy-config-example ## Deploy the example on AWS S3. Usage DEPLOY_ENV=[dev|integration|staging] make deploy-example.
7963
aws s3 rm s3://broadcom-apihub.marmelab.com/example --recursive
8064
aws s3 sync packages/example/build/ s3://broadcom-apihub.marmelab.com/example
8165
aws s3 cp packages/example/build/index.html s3://broadcom-apihub.marmelab.com/example/index.html --cache-control="max-age=120"
8266
aws cloudfront create-invalidation --distribution-id E1AOZQ3R1CQ7R6 --paths "/*"
8367

84-
deploy-healthcare: copy-deploy-config-healthcare ## Deploy the healthcare on AWS S3. Usage DEPLOY_ENV=[dev|integration|staging] make deploy-healthcare.
85-
aws s3 rm s3://broadcom-apihub.marmelab.com/healthcare --recursive
86-
aws s3 sync packages/healthcare/build/ s3://broadcom-apihub.marmelab.com/healthcare
87-
aws s3 cp packages/healthcare/build/index.html s3://broadcom-apihub.marmelab.com/healthcare/index.html --cache-control="max-age=120"
88-
aws cloudfront create-invalidation --distribution-id E2X6V50RZK09GM --paths "/*"
89-
90-
deploy: build build-example build-healthcare ## Deploy all on AWS S3. Usage DEPLOY_ENV=[dev|integration|staging] make deploy.
68+
deploy: build build-example ## Deploy all on AWS S3. Usage DEPLOY_ENV=[dev|integration|staging] make deploy.
9169
make deploy-example
92-
make deploy-healthcare

OVERVIEW.md

100755100644
File mode changed.

README.md

Lines changed: 7 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,6 @@ The Example app has the same source code as the standard API Hub. [The Example a
2424
- [Auto-detect the API Hub URL](./packages/example/README.md##auto-detect-the-api-hub-url)
2525
- [Customization Tutorials](./packages/example/README.md##customization-tutorials)
2626

27-
### Healthcare App [Deprecated]
28-
29-
> **_Note:_** The Healthcare app is now deprecated. It will no longer be actively maintained and will not receive new features or updates, including bug fixes. This deprecation is part of our ongoing efforts to improve the repository and streamline functionality.
30-
31-
[The Healthcare app](./packages/healthcare/README.md) demonstrates a possible customized variation of API Hub with a Healthcare theme. It includes the same developer features as the Example app. It further extends the API Hub to include custom pages and additional calls (PAPI and Portal Metrics API). You use this app with the mock server.
32-
33-
The Healthcare app README includes the following information:
34-
35-
- [Available users](./packages/healthcare/README.md##available-users)
36-
- [Customize the Healthcare app](./packages/layer7-apihub-mock/README.md##customize-the-healthcare-app)
37-
38-
### Layer7 API Hub Mock Server [Deprecated]
39-
40-
> **_Note:_** Layer7 API Hub Mock Server is now deprecated. It will no longer be actively maintained and will not receive new features or updates, including bug fixes. This deprecation is part of our ongoing efforts to improve the repository and streamline functionality.
41-
42-
[The Layer7 API Hub mock server README](./packages/layer7-apihub-mock/README.md) includes the following information:
43-
44-
- [Start the mock server in your client application](./packages/layer7-apihub-mock/README.md##start-the-cock-server-in-your-client-application)
45-
- [Available users](./packages/layer7-apihub-mock/README.md##available-users)
46-
- [Customize the mock server](./packages/layer7-apihub-mock/README.md##customize-the-mock-server)
47-
48-
### Cypress End-To-End Testing
49-
50-
The end-to-end (E2E) tests are for the Example app.
51-
52-
For more information about this testing, see [the Cypress - End-To-End Testing README](./cypress/README.md).
5327

5428
## Quick Start
5529

@@ -61,7 +35,7 @@ Before setting up your local development environment, ensure that you have compl
6135

6236
- You have installed [Yarn](https://yarnpkg.com/).
6337
- You have installed GNU Make 3.81 or later.
64-
- You have installed Node v12.20.2.
38+
- You have installed Node v22.13.0.
6539

6640
### Install the JavaScript Dependencies
6741

@@ -81,12 +55,6 @@ To start the **Example app**, issue the following command:
8155
make start
8256
```
8357

84-
To start the **Healthcare app**, issue the following command:
85-
86-
```sh
87-
make start-healthcare
88-
```
89-
9058
### Run the Tests
9159

9260
Run the unit tests and the E2E tests by issuing the following command:
@@ -103,20 +71,6 @@ Run only the unit tests by issuing the following command:
10371
make test-unit
10472
```
10573

106-
#### End-To-End Tests
107-
108-
Run only the E2E tests:
109-
110-
```sh
111-
make test-e2e
112-
```
113-
114-
Open the E2E tests GUI (useful for writing and debugging E2E tests):
115-
116-
```sh
117-
make test-e2e-local
118-
```
119-
12074
## Deploy the Example App
12175

12276
Build the API Hub library, the Example app, and then copy the production configuration by issuing the following commands:
@@ -149,10 +103,11 @@ $ cd packages && yarn create react-app my-own-apihub --scripts-version=3.2.0
149103
# in packages/my-own-apihub/package.json
150104
"dependencies": {
151105
"layer7-apihub": "~1.0.0",
152-
"layer7-apihub-mock": "~1.0.0",
153-
"react": "~16.13.1",
154-
"react-admin": "~3.6.2",
155-
"react-scripts": "~3.2.0"
106+
"react": "^18.3.1",
107+
"react-dom": "^18.3.1",
108+
"react-admin": "^5.7.3",
109+
"react-helmet": "~6.1.0",
110+
"tss-react": "~4.9.4"
156111
},
157112
```
158113

@@ -191,26 +146,7 @@ const App = () => {
191146
};
192147
```
193148

194-
6. Add the mock server to the `index.js` file
195-
196-
```js
197-
// in packages/my-own-apihub/src/index.js
198-
import { startApiHubMockedServer } from 'layer7-apihub-mock';
199-
...
200-
const { ENABLE_MOCK, MOCK_SERVER_INDICATOR_LINK } = global.APIHUB_CONFIG;
201-
export const shouldEnableMock = (enableMock = ENABLE_MOCK) =>
202-
enableMock === 'true' || enableMock === true;
203-
if (!shouldEnableMock(ENABLE_MOCK)) {
204-
ReactDOM.render(<App />, document.getElementById('root'));
205-
} else {
206-
console.log('Starting the mocked server');
207-
startApiHubMockedServer({
208-
runningIndicatorLink: MOCK_SERVER_INDICATOR_LINK,
209-
}).then(() => ReactDOM.render(<App />, document.getElementById('root')));
210-
}
211-
```
212-
213-
7. Start the bare-bones my-own-apihub app by issuing the following commands:
149+
6. Start the bare-bones my-own-apihub app by issuing the following commands:
214150

215151
```
216152
$ cd packages/my-own-apihub

conf/ci/settings.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Copyright © 2025 Broadcom Inc. and its subsidiaries. All Rights Reserved. -->
3+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
6+
<mirrors>
7+
<mirror>
8+
<id>artifactory</id>
9+
<mirrorOf>*</mirrorOf>
10+
<url>https://usw1.packages.broadcom.com:443/artifactory/apim-maven-virtual</url>
11+
</mirror>
12+
</mirrors>
13+
<servers>
14+
<server>
15+
<id>artifactory</id>
16+
<username>${artifactory.username}</username>
17+
<password>${artifactory.password}</password>
18+
</server>
19+
<server>
20+
<id>layer7-snapshot-repo</id>
21+
<username>${artifactory.username}</username>
22+
<password>${artifactory.password}</password>
23+
</server>
24+
<server>
25+
<id>layer7-release-repo</id>
26+
<username>${artifactory.username}</username>
27+
<password>${artifactory.password}</password>
28+
</server>
29+
</servers>
30+
</settings>
31+

cypress/.eslintrc

100755100644
File mode changed.

cypress/README.md

100755100644
File mode changed.

cypress/cypress.json

100755100644
File mode changed.

cypress/integration/accountSetup.js

100755100644
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright © 2025 Broadcom Inc. and its subsidiaries. All Rights Reserved.
2+
13
// / <reference types="Cypress" />
24

35
describe('Account Setup', () => {

0 commit comments

Comments
 (0)