Commit b69fb2f
authored
@W-19265242@ Configurable base paths for /mobify routes (PWA Kit 3.12 version) (#2892)
* Initial restore of base path PR
* Rename path functions
* Update commerce-sdk-react callbacks and slas private proxy endpoint
* Big update
* Replace getAppOrigin calls with useAppOrigin
* WIP - Filter the base path from all incoming requests to the server
* Remove base path from proxied requests + cleanup
* Use functions for proxy pathRewrite
* A bit of PR cleanup
* Lint cleanup
* More cleanup
* Fix tests
* Fix issues found by CI
* Lint for override asset
* Turn off slas private proxy
* Cleanup comments
* Update changelog entries
* Fix config
* Limit base path removal to /mobify or express route
* Adjust express filter
* Lint
* Fix dependency in generated apps
* Comment cleanup
* use envBasePath as a feature toggle for enabling the base path middleware
* Enable basepath removal middlware to handle express routes defined as regexes
* Apply suggestions
* Adjust app config template
* Use pathToRegexp rather than having manual regex interpretation
* escape the base path to not allow regex
* refactor
* Remove ?* from callback url
* Handle ? characters in express route
* Cache express regexes
* Handle properly formatted ()? express groups
* Comment cleanup
* Apply suggestions to reduce use of regex
* Add base path to social login redirectUri
* Lint
* Update comments and test
* Update test with more realistic scenario
* Remove path-to-regexp
* Refine convertExpressRouteToRegex further
* Move express route to regex logic to separate file
* Adjust logger and lock file
* Revert package-lock changes
---------
Signed-off-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com>1 parent 1611a5b commit b69fb2f
File tree
44 files changed
+731
-130
lines changed- packages
- commerce-sdk-react
- src
- auth
- components/StorefrontPreview
- pwa-kit-create-app
- assets
- bootstrap/js
- config
- overrides/app
- components/_app-config
- templates/@salesforce/retail-react-app/app
- components/_app-config
- pwa-kit-dev
- src
- configs/webpack
- ssr/server
- pwa-kit-react-sdk
- src/ssr/universal
- pwa-kit-runtime
- src
- ssr/server
- utils
- middleware
- ssr-server
- template-retail-react-app
- app
- components/_app-config
- hooks
- page-designer
- pages/checkout/partials
- utils
- config
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+731
-130
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
250 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
254 | 258 | | |
255 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
256 | 264 | | |
257 | 265 | | |
258 | 266 | | |
| |||
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
343 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
344 | 354 | | |
345 | 355 | | |
346 | 356 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
21 | 34 | | |
22 | 35 | | |
23 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
| 169 | + | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
| |||
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
253 | 257 | | |
254 | 258 | | |
255 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
256 | 265 | | |
257 | 266 | | |
258 | 267 | | |
| |||
264 | 273 | | |
265 | 274 | | |
266 | 275 | | |
267 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
268 | 281 | | |
269 | 282 | | |
270 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
packages/pwa-kit-create-app/assets/bootstrap/js/overrides/app/components/_app-config/index.jsx.hbs
Lines changed: 21 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
71 | 83 | | |
72 | 84 | | |
73 | 85 | | |
| |||
76 | 88 | | |
77 | 89 | | |
78 | 90 | | |
79 | | - | |
80 | | - | |
| 91 | + | |
| 92 | + | |
81 | 93 | | |
82 | 94 | | |
83 | 95 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 96 | + | |
| 97 | + | |
87 | 98 | | |
| 99 | + | |
88 | 100 | | |
| 101 | + | |
| 102 | + | |
89 | 103 | | |
| 104 | + | |
90 | 105 | | |
91 | 106 | | |
92 | 107 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| |||
0 commit comments