@localstack/appinspector-ui 1.0.0-dev-605049d7 → 1.0.0-dev-087296a1
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/README.md +4 -118
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -1,123 +1,9 @@
|
|
|
1
|
-
# LocalStack AppInspector
|
|
1
|
+
# LocalStack AppInspector UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package is used internally in different LocalStack products as an interface for App Inspector.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm install
|
|
8
|
+
npm install @localstack/appinspector-ui
|
|
9
9
|
```
|
|
10
|
-
|
|
11
|
-
### Environment Variables
|
|
12
|
-
|
|
13
|
-
The following environment variables are available:
|
|
14
|
-
|
|
15
|
-
- `VITE_LOCALSTACK_API_MOCK`: Set to `true` to use the mock API client.
|
|
16
|
-
|
|
17
|
-
Run `cp .env.example .env` to create a `.env` file, and customize it as needed.
|
|
18
|
-
|
|
19
|
-
## Development
|
|
20
|
-
|
|
21
|
-
Spin up component development:
|
|
22
|
-
|
|
23
|
-
```sh
|
|
24
|
-
npx storybook dev
|
|
25
|
-
# npm run storybook
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Spin up the end-to-end development:
|
|
29
|
-
|
|
30
|
-
```sh
|
|
31
|
-
npx vite
|
|
32
|
-
# npm run dev
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Testing
|
|
36
|
-
|
|
37
|
-
Run the component tests:
|
|
38
|
-
|
|
39
|
-
```sh
|
|
40
|
-
npx vitest --project=storybook
|
|
41
|
-
# npm run test:storybook
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Run the end-to-end tests:
|
|
45
|
-
|
|
46
|
-
```sh
|
|
47
|
-
npx playwright test
|
|
48
|
-
# npm run test:playwright
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Start the end-to-end interactive UI mode:
|
|
52
|
-
|
|
53
|
-
```sh
|
|
54
|
-
npx playwright test --ui
|
|
55
|
-
# npm run test:playwright:ui
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Update the end-to-end snapshots:
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
npx playwright test --update-snapshots
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Auto generate end-to-end tests with Codegen:
|
|
65
|
-
|
|
66
|
-
```sh
|
|
67
|
-
npx playwright codegen
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Show the end-to-end test results:
|
|
71
|
-
|
|
72
|
-
```sh
|
|
73
|
-
npx playwright show-report
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Snapshot testing
|
|
77
|
-
|
|
78
|
-
Snapshot testing is platform-dependent, meaning that snapshots for darwin (our computers) will likely differ from snapshots for linux (GitHub Actions).
|
|
79
|
-
|
|
80
|
-
The following script will update the snapshots for linux using docker:
|
|
81
|
-
|
|
82
|
-
```sh
|
|
83
|
-
npm run test:playwright:update-playwright-snapshots
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Testing on LocalStack Web
|
|
87
|
-
|
|
88
|
-
To try the integration in LocalStack Web, make sure to have the `localstack-web` repository alongside with this one, as seen here:
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
Code/
|
|
92
|
-
localstack-appinspector-ui/
|
|
93
|
-
localstack-web/
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
You can clone it with, and make sure to switch to the `integrate-studio-ui-prototype` branch name.
|
|
97
|
-
|
|
98
|
-
```sh
|
|
99
|
-
git clone https://github.com/localstack/localstack-web.git
|
|
100
|
-
git checkout integrate-studio-ui-prototype
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Now, install Husky globally:
|
|
104
|
-
|
|
105
|
-
```sh
|
|
106
|
-
npm install -g husky
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Then, run the following script:
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
make install-to-localstack-web
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
This will build and package App Inspector UI and install it in `localstack-web`'s related workspace dependencies. Now, you can go to `localstack-web` and run `make start-staged`.
|
|
116
|
-
|
|
117
|
-
Additionally, you can also run the following command to start a watcher:
|
|
118
|
-
|
|
119
|
-
```sh
|
|
120
|
-
make install-to-localstack-web-dev
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
This will start a watcher that will rebuild the App Inspector UI and install it in `localstack-web`'s related workspace dependencies.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@localstack/appinspector-ui",
|
|
3
|
-
"version": "1.0.0-dev-
|
|
3
|
+
"version": "1.0.0-dev-087296a1",
|
|
4
4
|
"description": "LocalStack AppInspector UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"build-storybook": "storybook build",
|
|
24
24
|
"check-types": "tsc -b",
|
|
25
25
|
"dev": "vite",
|
|
26
|
-
"postinstall": "husky",
|
|
27
26
|
"lint": "eslint --fix",
|
|
28
27
|
"localstack:start": "APPINSPECTOR_ENABLE=1 APPINSPECTOR_DEV_ENABLE=1 localstack start -d",
|
|
29
28
|
"localstack:stop": "localstack stop",
|