@blaze-cms/nextjs-tools 0.146.0-node18-core-styles-tooltips.46 → 0.146.0-node18-tooltips.38

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/CHANGELOG.md CHANGED
@@ -3,21 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [0.146.0-node18-core-styles-tooltips.46](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.45...v0.146.0-node18-core-styles-tooltips.46) (2026-01-16)
7
-
8
- **Note:** Version bump only for package @blaze-cms/nextjs-tools
9
-
10
-
11
-
12
-
13
-
14
- # [0.146.0-node18-core-styles-tooltips.45](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.44...v0.146.0-node18-core-styles-tooltips.45) (2026-01-15)
6
+ # [0.146.0-node18-tooltips.38](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.37...v0.146.0-node18-tooltips.38) (2026-01-27)
15
7
 
16
8
 
17
9
  ### Bug Fixes
18
10
 
19
11
  * changed plugin logic ([451b8af](https://github.com/thebyte9/blaze/commit/451b8afd47fade28b0143c128cf645fe90557424))
20
- * snapshots ([2283a3d](https://github.com/thebyte9/blaze/commit/2283a3da71117b93fc3f52d8ddb6373fd10fa2eb))
21
12
 
22
13
 
23
14
  ### Features
@@ -28,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
28
19
 
29
20
 
30
21
 
31
- # [0.146.0-node18-core-styles-tooltips.44](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.43...v0.146.0-node18-core-styles-tooltips.44) (2026-01-02)
22
+ # [0.146.0-node18-tooltips.37](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.36...v0.146.0-node18-tooltips.37) (2026-01-08)
32
23
 
33
24
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
34
25
 
@@ -36,7 +27,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
36
27
 
37
28
 
38
29
 
39
- # [0.146.0-node18-core-styles-tooltips.43](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.42...v0.146.0-node18-core-styles-tooltips.43) (2025-12-17)
30
+ # [0.146.0-node18-tooltips.35](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.34...v0.146.0-node18-tooltips.35) (2025-12-17)
40
31
 
41
32
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
42
33
 
@@ -44,7 +35,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
44
35
 
45
36
 
46
37
 
47
- # [0.146.0-node18-core-styles-tooltips.42](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.41...v0.146.0-node18-core-styles-tooltips.42) (2025-12-17)
38
+ # [0.146.0-node18-tooltips.34](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.33...v0.146.0-node18-tooltips.34) (2025-12-17)
48
39
 
49
40
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
50
41
 
@@ -52,7 +43,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
52
43
 
53
44
 
54
45
 
55
- # [0.146.0-node18-core-styles-tooltips.41](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.40...v0.146.0-node18-core-styles-tooltips.41) (2025-12-15)
46
+ # [0.146.0-node18-tooltips.33](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.32...v0.146.0-node18-tooltips.33) (2025-12-15)
56
47
 
57
48
 
58
49
  ### Features
@@ -63,39 +54,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
63
54
 
64
55
 
65
56
 
66
- # [0.146.0-node18-core-styles-tooltips.38](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.37...v0.146.0-node18-core-styles-tooltips.38) (2025-12-04)
67
-
68
- **Note:** Version bump only for package @blaze-cms/nextjs-tools
69
-
70
-
71
-
72
-
73
-
74
- # [0.146.0-node18-core-styles-tooltips.34](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.33...v0.146.0-node18-core-styles-tooltips.34) (2025-11-27)
75
-
76
- **Note:** Version bump only for package @blaze-cms/nextjs-tools
77
-
78
-
79
-
80
-
81
-
82
- # [0.146.0-node18-core-styles-tooltips.32](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.31...v0.146.0-node18-core-styles-tooltips.32) (2025-11-26)
83
-
84
- **Note:** Version bump only for package @blaze-cms/nextjs-tools
85
-
86
-
87
-
88
-
89
-
90
- # [0.146.0-node18-core-styles-tooltips.31](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.30...v0.146.0-node18-core-styles-tooltips.31) (2025-11-26)
91
-
92
- **Note:** Version bump only for package @blaze-cms/nextjs-tools
93
-
94
-
95
-
96
-
97
-
98
- # [0.146.0-node18-core-styles-tooltips.30](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.29...v0.146.0-node18-core-styles-tooltips.30) (2025-11-25)
57
+ # [0.146.0-node18-tooltips.32](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.31...v0.146.0-node18-tooltips.32) (2025-12-15)
99
58
 
100
59
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
101
60
 
@@ -103,7 +62,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
103
62
 
104
63
 
105
64
 
106
- # [0.146.0-node18-core-styles-tooltips.29](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.28...v0.146.0-node18-core-styles-tooltips.29) (2025-11-17)
65
+ # [0.146.0-node18-tooltips.30](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.29...v0.146.0-node18-tooltips.30) (2025-11-17)
107
66
 
108
67
 
109
68
  ### Features
@@ -114,15 +73,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
114
73
 
115
74
 
116
75
 
117
- # [0.146.0-node18-core-styles-tooltips.27](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.26...v0.146.0-node18-core-styles-tooltips.27) (2025-11-13)
118
-
119
- **Note:** Version bump only for package @blaze-cms/nextjs-tools
120
-
121
-
122
-
123
-
124
-
125
- # [0.146.0-node18-core-styles-tooltips.26](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.25...v0.146.0-node18-core-styles-tooltips.26) (2025-11-12)
76
+ # [0.146.0-node18-tooltips.28](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.27...v0.146.0-node18-tooltips.28) (2025-11-10)
126
77
 
127
78
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
128
79
 
@@ -130,7 +81,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
130
81
 
131
82
 
132
83
 
133
- # [0.146.0-node18-core-styles-tooltips.25](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.24...v0.146.0-node18-core-styles-tooltips.25) (2025-11-07)
84
+ # [0.146.0-node18-tooltips.27](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.26...v0.146.0-node18-tooltips.27) (2025-11-06)
134
85
 
135
86
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
136
87
 
@@ -138,7 +89,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
138
89
 
139
90
 
140
91
 
141
- # [0.146.0-node18-core-styles-tooltips.24](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.23...v0.146.0-node18-core-styles-tooltips.24) (2025-11-03)
92
+ # [0.146.0-node18-tooltips.26](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.25...v0.146.0-node18-tooltips.26) (2025-10-29)
142
93
 
143
94
 
144
95
  ### Bug Fixes
@@ -154,7 +105,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
154
105
 
155
106
 
156
107
 
157
- # [0.146.0-node18-core-styles-tooltips.23](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.22...v0.146.0-node18-core-styles-tooltips.23) (2025-10-27)
108
+ # [0.146.0-node18-tooltips.25](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.24...v0.146.0-node18-tooltips.25) (2025-10-28)
158
109
 
159
110
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
160
111
 
@@ -162,7 +113,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
162
113
 
163
114
 
164
115
 
165
- # [0.146.0-node18-core-styles-tooltips.22](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.21...v0.146.0-node18-core-styles-tooltips.22) (2025-10-20)
116
+ # [0.146.0-node18-tooltips.24](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.23...v0.146.0-node18-tooltips.24) (2025-10-27)
166
117
 
167
118
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
168
119
 
@@ -170,7 +121,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
170
121
 
171
122
 
172
123
 
173
- # [0.146.0-node18-core-styles-tooltips.21](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.20...v0.146.0-node18-core-styles-tooltips.21) (2025-10-07)
124
+ # [0.146.0-node18-tooltips.23](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.22...v0.146.0-node18-tooltips.23) (2025-10-20)
174
125
 
175
126
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
176
127
 
@@ -178,7 +129,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
178
129
 
179
130
 
180
131
 
181
- # [0.146.0-node18-core-styles-tooltips.20](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.19...v0.146.0-node18-core-styles-tooltips.20) (2025-10-03)
132
+ # [0.146.0-node18-tooltips.22](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.21...v0.146.0-node18-tooltips.22) (2025-10-17)
182
133
 
183
134
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
184
135
 
@@ -186,7 +137,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
186
137
 
187
138
 
188
139
 
189
- # [0.146.0-node18-core-styles-tooltips.19](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.18...v0.146.0-node18-core-styles-tooltips.19) (2025-10-01)
140
+ # [0.146.0-node18-tooltips.21](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.20...v0.146.0-node18-tooltips.21) (2025-10-14)
190
141
 
191
142
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
192
143
 
@@ -194,7 +145,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
194
145
 
195
146
 
196
147
 
197
- # [0.146.0-node18-core-styles-tooltips.18](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.17...v0.146.0-node18-core-styles-tooltips.18) (2025-09-29)
148
+ # [0.146.0-node18-tooltips.19](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.18...v0.146.0-node18-tooltips.19) (2025-10-10)
198
149
 
199
150
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
200
151
 
@@ -202,7 +153,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
202
153
 
203
154
 
204
155
 
205
- # [0.146.0-node18-core-styles-tooltips.15](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.14...v0.146.0-node18-core-styles-tooltips.15) (2025-09-23)
156
+ # [0.146.0-node18-tooltips.18](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.17...v0.146.0-node18-tooltips.18) (2025-10-07)
206
157
 
207
158
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
208
159
 
@@ -210,18 +161,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
210
161
 
211
162
 
212
163
 
213
- # [0.146.0-node18-core-styles-tooltips.14](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.13...v0.146.0-node18-core-styles-tooltips.14) (2025-09-18)
214
-
215
-
216
- ### Bug Fixes
217
-
218
- * force debug link to open in new tab ([#4907](https://github.com/thebyte9/blaze/issues/4907)) ([59abc33](https://github.com/thebyte9/blaze/commit/59abc3356636f5f8eb6ff911101947c878dbd213))
219
-
220
-
221
-
222
-
223
-
224
- # [0.146.0-node18-core-styles-tooltips.13](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.12...v0.146.0-node18-core-styles-tooltips.13) (2025-09-15)
164
+ # [0.146.0-node18-tooltips.13](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.12...v0.146.0-node18-tooltips.13) (2025-10-02)
225
165
 
226
166
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
227
167
 
@@ -229,7 +169,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
229
169
 
230
170
 
231
171
 
232
- # [0.146.0-node18-core-styles-tooltips.12](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.11...v0.146.0-node18-core-styles-tooltips.12) (2025-08-27)
172
+ # [0.146.0-node18-tooltips.11](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.10...v0.146.0-node18-tooltips.11) (2025-10-01)
233
173
 
234
174
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
235
175
 
@@ -237,30 +177,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
237
177
 
238
178
 
239
179
 
240
- # [0.146.0-node18-core-styles-tooltips.11](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.10...v0.146.0-node18-core-styles-tooltips.11) (2025-08-27)
241
-
242
-
243
- ### Features
244
-
245
- * add support for custom 404 page using custom error 404 slug and fallback rendering ([#4839](https://github.com/thebyte9/blaze/issues/4839)) ([67554a3](https://github.com/thebyte9/blaze/commit/67554a3febc2871d73bd127753edf3b918a1a0b7))
246
- * chart component ([#4846](https://github.com/thebyte9/blaze/issues/4846)) ([f74bd5a](https://github.com/thebyte9/blaze/commit/f74bd5aecc6078e725f92c523d8da0916a612d88))
247
-
248
-
249
-
250
-
251
-
252
- # [0.146.0-node18-core-styles-tooltips.8](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.7...v0.146.0-node18-core-styles-tooltips.8) (2025-07-25)
253
-
254
-
255
- ### Bug Fixes
180
+ # [0.146.0-node18-tooltips.8](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.7...v0.146.0-node18-tooltips.8) (2025-09-24)
256
181
 
257
- * restore favion loading in the frontend ([#4851](https://github.com/thebyte9/blaze/issues/4851)) ([f1c31bb](https://github.com/thebyte9/blaze/commit/f1c31bb2213f79b1d4b6b1ae6e5d5bd2b150fdf8))
182
+ **Note:** Version bump only for package @blaze-cms/nextjs-tools
258
183
 
259
184
 
260
185
 
261
186
 
262
187
 
263
- # [0.146.0-node18-core-styles-tooltips.5](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.4...v0.146.0-node18-core-styles-tooltips.5) (2025-07-18)
188
+ # [0.146.0-node18-tooltips.4](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.3...v0.146.0-node18-tooltips.4) (2025-09-22)
264
189
 
265
190
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
266
191
 
@@ -268,18 +193,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
268
193
 
269
194
 
270
195
 
271
- # [0.146.0-node18-core-styles-tooltips.4](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.3...v0.146.0-node18-core-styles-tooltips.4) (2025-07-10)
196
+ # [0.146.0-node18-tooltips.3](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.2...v0.146.0-node18-tooltips.3) (2025-09-18)
272
197
 
273
198
 
274
199
  ### Bug Fixes
275
200
 
276
- * respond to live blog item size changes for laze loaded image, live blog title and global light box fix ([#4730](https://github.com/thebyte9/blaze/issues/4730)) ([5dd38d8](https://github.com/thebyte9/blaze/commit/5dd38d8d9e5983c55d3053d440eb7ab618688920))
201
+ * force debug link to open in new tab ([#4907](https://github.com/thebyte9/blaze/issues/4907)) ([59abc33](https://github.com/thebyte9/blaze/commit/59abc3356636f5f8eb6ff911101947c878dbd213))
277
202
 
278
203
 
279
204
 
280
205
 
281
206
 
282
- # [0.146.0-node18-core-styles-tooltips.2](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.1...v0.146.0-node18-core-styles-tooltips.2) (2025-06-20)
207
+ # [0.146.0-node18-tooltips.2](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.1...v0.146.0-node18-tooltips.2) (2025-09-17)
283
208
 
284
209
  **Note:** Version bump only for package @blaze-cms/nextjs-tools
285
210
 
@@ -287,34 +212,32 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
287
212
 
288
213
 
289
214
 
290
- # [0.146.0-node18-core-styles-tooltips.1](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.0...v0.146.0-node18-core-styles-tooltips.1) (2025-06-20)
215
+ # [0.146.0-node18-tooltips.1](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.0...v0.146.0-node18-tooltips.1) (2025-09-10)
291
216
 
292
-
293
- ### Features
294
-
295
- * added frontend links for editor mode ([#4801](https://github.com/thebyte9/blaze/issues/4801)) ([d5de370](https://github.com/thebyte9/blaze/commit/d5de370203abf467fcc3819d06c7375f4a6c1eb9))
217
+ **Note:** Version bump only for package @blaze-cms/nextjs-tools
296
218
 
297
219
 
298
220
 
299
221
 
300
222
 
301
- # [0.146.0-node18-core-styles-tooltips.0](https://github.com/thebyte9/blaze/compare/v0.145.0...v0.146.0-node18-core-styles-tooltips.0) (2025-06-18)
223
+ # [0.146.0-node18-tooltips.0](https://github.com/thebyte9/blaze/compare/v0.145.0...v0.146.0-node18-tooltips.0) (2025-09-09)
302
224
 
303
225
 
304
226
  ### Bug Fixes
305
227
 
306
- * adds default root selector to readme ([cfb5095](https://github.com/thebyte9/blaze/commit/cfb50956d95df485fe4486f632d32400b46806f7))
307
228
  * bumped apollo versions ([b371dc7](https://github.com/thebyte9/blaze/commit/b371dc7e7bbe814a0cc4d57af2b959ab5e1b1bfd))
308
229
  * fixed breaking tests, updated next to 14 ([fecb0e1](https://github.com/thebyte9/blaze/commit/fecb0e1d822bd69ebbaa084072a219f0fddd23f1))
309
230
  * fixed more tests ([46a2fb9](https://github.com/thebyte9/blaze/commit/46a2fb9467f9f3c9cf320c9caf36c66503cc1f49))
310
231
  * fixed remaining failing tests ([8a5963f](https://github.com/thebyte9/blaze/commit/8a5963ff8a0bf615a2ced9fb77b8986a9b05d80c))
311
- * fixes readme layout ([9dbdd8e](https://github.com/thebyte9/blaze/commit/9dbdd8ee96cb4a716e1e42c224939ac22ac6af0d))
312
232
  * lint errors for reegex ([daaf750](https://github.com/thebyte9/blaze/commit/daaf7506d22f9578072c71f5557d0b6bf6185018))
313
233
  * linting fix for reading return values from promise executor functions ([7edb563](https://github.com/thebyte9/blaze/commit/7edb563a4cbfa37188f26c1ae709ffe8ed837d69))
314
234
  * linting fixed automatically ([73135b9](https://github.com/thebyte9/blaze/commit/73135b9b8b0d5407e2e1dfba42ab2381f290607f))
315
235
  * only do parent redirect when there are graphql errors ([#4697](https://github.com/thebyte9/blaze/issues/4697)) ([1ec63ba](https://github.com/thebyte9/blaze/commit/1ec63ba95c21c11d41721f07346945742d7237ae))
316
236
  * prevent 404 error when no data is returned from and improve redi… ([#4688](https://github.com/thebyte9/blaze/issues/4688)) ([3a5af3d](https://github.com/thebyte9/blaze/commit/3a5af3ddf65d67456971d2d75525235c30965633))
237
+ * respond to live blog item size changes for laze loaded image, live blog title and global light box fix ([#4730](https://github.com/thebyte9/blaze/issues/4730)) ([5dd38d8](https://github.com/thebyte9/blaze/commit/5dd38d8d9e5983c55d3053d440eb7ab618688920))
238
+ * restore favion loading in the frontend ([#4851](https://github.com/thebyte9/blaze/issues/4851)) ([f1c31bb](https://github.com/thebyte9/blaze/commit/f1c31bb2213f79b1d4b6b1ae6e5d5bd2b150fdf8))
317
239
  * set blank cache-control header to override nextjs default of 0 ([#4783](https://github.com/thebyte9/blaze/issues/4783)) ([2f1653e](https://github.com/thebyte9/blaze/commit/2f1653ed3756a90575c48f8a2253776958c6c0ff))
240
+ * show pagebuilder tabs when no components added ([#4844](https://github.com/thebyte9/blaze/issues/4844)) ([2cbb24d](https://github.com/thebyte9/blaze/commit/2cbb24df95b38d4c8f4575814daadebd74ba04d4))
318
241
  * udpated yarn lock ([0cd4fa4](https://github.com/thebyte9/blaze/commit/0cd4fa4a185fca4b80b57e472badb771dd649ec2))
319
242
  * updated with dev ([90f545f](https://github.com/thebyte9/blaze/commit/90f545f1beabb35e26ba6fb2b45a7a0dfd072927))
320
243
  * updated with dev ([729bb6e](https://github.com/thebyte9/blaze/commit/729bb6ee7e87946081d51564a4ab45538f7be1e7))
@@ -325,7 +248,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
325
248
 
326
249
  ### Features
327
250
 
251
+ * add support for custom 404 page using custom error 404 slug and fallback rendering ([#4839](https://github.com/thebyte9/blaze/issues/4839)) ([67554a3](https://github.com/thebyte9/blaze/commit/67554a3febc2871d73bd127753edf3b918a1a0b7))
252
+ * added frontend links for editor mode ([#4801](https://github.com/thebyte9/blaze/issues/4801)) ([d5de370](https://github.com/thebyte9/blaze/commit/d5de370203abf467fcc3819d06c7375f4a6c1eb9))
328
253
  * allow . (dot) character in route regex ([#4552](https://github.com/thebyte9/blaze/issues/4552)) ([9be0fe0](https://github.com/thebyte9/blaze/commit/9be0fe0dd0dac2e0891c2d965a20c6b2e02165cc))
254
+ * chart component ([#4846](https://github.com/thebyte9/blaze/issues/4846)) ([f74bd5a](https://github.com/thebyte9/blaze/commit/f74bd5aecc6078e725f92c523d8da0916a612d88))
329
255
  * debug sidebar now shows on error if enabled ([#4667](https://github.com/thebyte9/blaze/issues/4667)) ([01d43e1](https://github.com/thebyte9/blaze/commit/01d43e19c160980cfc8259c1a951ab70ebe70eb0))
330
256
  * open frontend debug toolbar with a url param ([#4771](https://github.com/thebyte9/blaze/issues/4771)) ([37b8ea5](https://github.com/thebyte9/blaze/commit/37b8ea59a5ed4be0912465717adeb079fd6b3a89))
331
257
  * updated react to 18 ([9335f84](https://github.com/thebyte9/blaze/commit/9335f8432b376494501abb9c3deef1ddaa9b35a8))
package/README.md CHANGED
@@ -90,15 +90,16 @@ If is possible to create a custom error page by adding a page with the slug "cus
90
90
  ## Environment variables
91
91
 
92
92
  | Name | Description | Type | Default |
93
- |---|---|---|---|
93
+ |---|---|---|
94
94
  | BLAZE_FRONTEND_HOST | Frontend host (used to identify host) | String | |
95
- | BLAZE_ROUTE_REGEX | Override default route regex | Regex | /^\/[a-z0-9€_\/]+(?:[-\/\.]{1,2}[a-z0-9\/€_\/]+)*$|^\/$/ |
95
+ | BLAZE_ROUTE_REGEX | Override default route regex | /^\/[a-z0-9€*\/]+(?:[-\/\.]{1,2}[a-z0-9\/€*\/]+)*$|^\/$/ |
96
96
  | BLAZE_CACHE_CONTROL_HEADER | Cache-Control header to set on page requests | String | "" |
97
- | BLAZE_STATIC_ROUTE_STORE_KEY | Override store for static file routes | String | default |
98
- | BLAZE_ROUTE_PATTERN_SITEMAP | Override sitemap route | String | /sitemap.xml |
97
+ | BLAZE_STATIC_ROUTE_STORE_KEY | Override store for static file routes | default |
98
+ | BLAZE_ROUTE_PATTERN_SITEMAP | Override sitemap route | /sitemap.xml |
99
99
  | BLAZE_CONTENT_SITEMAP_URL_PREFIX | Prefix for sitemap URL, used in frontend static route e.g. /sitemap/sitemap-0.xml. This needs to match the value set in the API app. | String | |
100
- | BLAZE_ROOT_SELECTOR_CLASSES_LIMIT | The number of root-selector classes to display. If the variable is not set, it defaults to 1, displaying only the highest-level parent class. | String | 1 |
101
- | BLAZE_BUILD_ENV_PREFIX_REGEX | '\|' separated list of allowed environment variable prefixes. Any environment variable that matches this prefix pattern will be dynamically added to the next environment config and will be available in code for use. If the environment variable has a "BUILD_" prefix, then this prefix will be removed from the next environment variable name before assigning it. i.e. BUILD_THIRD_PARTY_ENV will become THIRD_PARTY_ENV in the build. Prefixes BLAZE\|GOOGLE\|JWPLAYER\|DFP are added for backward compatibility and will be deprecated. We recommend to use new and change existing environment variables with "BUILD_" prefix. | String | BLAZE\|GOOGLE\|JWPLAYER\|DFP\|BUILD |
100
+ | BLAZE_ROOT_SELECTOR_CLASSES_LIMIT | The number of root-selector classes to display. 0 or unset will show noe | String | |
101
+ | BLAZE_BUILD_ENV_PREFIX_REGEX | '\|' separated list of allowed environment variable prefixes. Any environment variable that matches this prefix pattern will be dynamically added to the next environment config and will be available in code for use. If the environment variable has a "BUILD_" prefix, then this prefix will be removed from the next environment variable name before assigning it. i.e. BUILD_THIRD_PARTY_ENV will become THIRD_PARTY_ENV in the build. Prefixes BLAZE\|GOOGLE\|JWPLAYER\|DFP are added for backward compatibility and will be deprecated. We recommend to use new and change existing environment variables with "BUILD_" prefix. | BLAZE\|GOOGLE\|JWPLAYER\|DFP\|BUILD |
102
+ | BLAZE_CONTENT_SITEMAP_URL_PREFIX | Prefix for sitemap URL, used in frontend static route e.g. /sitemap/sitemap-0.xml. This needs to match value set in API app. | String | |
102
103
  | BLAZE_DISABLE_REDIRECT_WITH_QUERY | Do not add query string to redirects | String | |
103
104
 
104
105
  ## Events emitted
@@ -205,7 +206,7 @@ When checking new code or build configs make sure to check the [following things
205
206
 
206
207
  ## Root selector classes
207
208
 
208
- To make styling of sections of a site simpler, it is possible to enable setting root selector classes at the top of the Resolver page structure that are generated based on the url hierarchy. If the variable is not set, it defaults to 1, displaying only the highest-level parent class.
209
+ To make styling of sections of a site simpler, it is possible to enable setting root selector classes at the top of the Resolver page structure that are generated based on the url hierarchy.
209
210
 
210
211
  For example the following url, `/parent/child/article-123` might be broken into the following classes
211
212
 
package/example.env CHANGED
@@ -3,6 +3,6 @@ BLAZE_FRONTEND_HOST=thisisblaze.com
3
3
  BLAZE_ROUTE_PATTERN_SITEMAP="/sitemap.xml"
4
4
  BLAZE_CONTENT_SITEMAP_URL_PREFIX="sitemap"
5
5
  #BLAZE_ROUTE_REGEX="^\/[a-z0-9€_\/]+(?:[-\/]{1,2}[a-z0-9\/€_\/]+)*$|^\/$"
6
- BLAZE_ROOT_SELECTOR_CLASSES_LIMIT="1"
6
+ BLAZE_ROOT_SELECTOR_CLASSES_LIMIT="2"
7
7
  BLAZE_CACHE_CONTROL_HEADER="max-age=0"
8
8
  BLAZE_DISABLE_REDIRECT_WITH_QUERY=""
@@ -34,7 +34,7 @@ var _getRootSelectorClasses = _interopRequireDefault(require("./get-root-selecto
34
34
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
35
35
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
36
36
  var getRootClassesLimit = function getRootClassesLimit() {
37
- return Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT || 1);
37
+ return Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT);
38
38
  };
39
39
  var checkUrl = /*#__PURE__*/function () {
40
40
  var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"check-url.js","names":["_queryString","require","_reactPageBuilder","_coreAuthUi","_constants","_query","_checkParent","_interopRequireDefault","_checkPreviewUrl","_handleStaticRoutes","_getPageData","_getRootSelectorClasses","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","getRootClassesLimit","Number","process","env","BLAZE_ROOT_SELECTOR_CLASSES_LIMIT","checkUrl","_ref","_asyncToGenerator2","_regenerator","mark","_callee","props","asPath","apolloClient","res","req","query","blazeApp","disableSsr","fullUrl","_parseUrl","url","handler","previewData","urlCheckOptions","result","wrap","_callee$","_context","prev","next","getFullUrl","parseUrl","BLAZE_STATUS_URL","abrupt","isStatusPage","handleStaticRoutes","getHandler","setHeader","BLAZE_X_FRAME_OPTIONS","BLAZE_X_FRAME_OPTIONS_DEFAULT","getHeader","BLAZE_CACHE_CONTROL_HEADER","checkPreviewUrl","checkAccessToken","cache","extract","getPreviewData","doUrlCheck","handle404Error","sent","stop","_x","_ref2","_callee2","_result$pageData","_result$pageData2","rootSelectorClasses","_callee2$","_context2","getPageData","pageData","getRootSelectorClasses","isPreview","_x2","_x3","getHost","_ref3","_ref3$headers","headers","BLAZE_FRONTEND_HOST","host","concat","HTTPS","_window","window","_window$location","location","protocol","hostname","port","urlPort","COLON","DOUBLE_SLASH","_ref4","_callee3","args","_args$errorCheckCode","errorCheckCode","_yield$apolloClient$q","_yield$apolloClient$q2","_yield$apolloClient$q3","_yield$apolloClient$q4","_yield$apolloClient$q5","itemId","itemEntity","urlTo","_yield$apolloClient$q6","_callee3$","_context3","ROUTE_REGEX","test","Error","checkUrlQuery","variables","data","setCustomCacheControlHeaders","handleRedirect","events","emit","message","statusCode","getUnpublishedEntityName","t0","handleUrlError","_x4","handleError","err","error","networkError","writeHead","write","end","graphQLErrors","NOT_FOUND_STATUS_CODE","errorCode","_ref5","errorMessage","customError","redirectUrl","BLAZE_DISABLE_REDIRECT_WITH_QUERY","queryString","split","doRedirect","_ref6","_ref6$cacheControlMax","cacheControlMaxAge","Location","href","redirecting","_x5","_x6","_handleUrlError","_callee4","parentUrl","parentPATH","_callee4$","_context4","ERROR_URLS","custom404","checkParent","_default","exports"],"sources":["../../src/helpers/check-url.js"],"sourcesContent":["import { parseUrl } from 'query-string';\nimport { getUnpublishedEntityName } from '@blaze-cms/react-page-builder';\nimport { checkAccessToken } from '@blaze-cms/core-auth-ui';\nimport {\n HTTPS,\n DOUBLE_SLASH,\n COLON,\n NOT_FOUND_STATUS_CODE,\n BLAZE_X_FRAME_OPTIONS_DEFAULT,\n ROUTE_REGEX,\n ERROR_URLS\n} from '../constants';\nimport { checkUrlQuery } from '../application/query';\nimport checkParent from './check-parent';\nimport checkPreviewUrl from './check-preview-url';\nimport handleStaticRoutes from './handle-static-routes';\nimport getPageData from './get-page-data';\nimport getRootSelectorClasses from './get-root-selector-classes';\n\nconst getRootClassesLimit = () => Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT || 1);\n\nconst checkUrl = async props => {\n const { asPath, apolloClient, res, req, query, blazeApp, disableSsr } = props;\n const fullUrl = getFullUrl(req, asPath);\n const { url } = parseUrl(asPath);\n\n if (process.env.BLAZE_STATUS_URL && url === process.env.BLAZE_STATUS_URL) {\n return { isStatusPage: true };\n }\n\n if (res) {\n const handler = handleStaticRoutes.getHandler(asPath);\n\n res.setHeader(\n 'X-Frame-Options',\n process.env.BLAZE_X_FRAME_OPTIONS || BLAZE_X_FRAME_OPTIONS_DEFAULT\n );\n\n if (!res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', process.env.BLAZE_CACHE_CONTROL_HEADER || ' ');\n }\n\n if (handler) {\n return handler(props);\n }\n }\n\n const previewData = checkPreviewUrl(url, query);\n\n if (!previewData && disableSsr) return { disableSsr: true };\n\n await checkAccessToken(apolloClient, {\n ...props,\n disableSsr: !Object.keys(apolloClient.cache.extract()).length // empty cache means SSR was disabled\n });\n\n if (previewData) return getPreviewData(previewData, apolloClient);\n const urlCheckOptions = { asPath, url, apolloClient, res };\n const result = await doUrlCheck({\n ...urlCheckOptions,\n handle404Error: true,\n blazeApp\n });\n return { ...result, fullUrl } || {};\n};\n\nconst getPreviewData = async (previewData, apolloClient) => {\n const result = await getPageData({ ...previewData, apolloClient });\n const { pageData: { url } = {} } = result;\n const rootSelectorClasses = getRootSelectorClasses(url, getRootClassesLimit());\n return { ...previewData, rootSelectorClasses, ...result, isPreview: true };\n};\n\nconst getHost = ({ headers = {} }) =>\n process.env.BLAZE_FRONTEND_HOST ||\n headers['x-request-host'] ||\n headers['x-forwarded-host'] ||\n headers.host;\n\nconst getFullUrl = (req, asPath) => {\n if (req) {\n return `${HTTPS}${getHost(req)}${asPath}`;\n }\n const {\n location: { protocol, hostname, port }\n } = window;\n const urlPort = port ? `${COLON}${port}` : '';\n\n return `${protocol}${DOUBLE_SLASH}${hostname}${urlPort}${asPath}`;\n};\n\nconst doUrlCheck = async args => {\n const { asPath, url, apolloClient, res, blazeApp, errorCheckCode = false } = args;\n try {\n if (!ROUTE_REGEX.test(url)) {\n throw Error('Invalid URL');\n }\n const { data: { checkUrl: { itemId, itemEntity, urlTo, pageData = {} } = {} } = {} } =\n await apolloClient.query({\n query: checkUrlQuery,\n variables: { url }\n });\n\n setCustomCacheControlHeaders(pageData, res);\n\n if (urlTo && (urlTo !== url || errorCheckCode)) {\n return handleRedirect({ errorCheckCode, url, urlTo, asPath, res });\n }\n const rootSelectorClasses = getRootSelectorClasses(url, getRootClassesLimit());\n\n if (errorCheckCode) {\n blazeApp.events.emit('monitor:log', { message: `Serving custom ${errorCheckCode} page` });\n if (res) res.statusCode = errorCheckCode;\n }\n\n return {\n pageData,\n rootSelectorClasses,\n itemId,\n itemEntity: getUnpublishedEntityName(itemEntity)\n };\n } catch (err) {\n return handleUrlError(err, args);\n }\n};\n\nconst handleError = (err, res, handle404Error, blazeApp) => {\n blazeApp.events.emit('monitor:log', { error: err });\n if (!res) return {};\n if (err.networkError) {\n res.writeHead(500, { 'Content-Type': 'text/plain' });\n res.write('500 Internal Server Error\\n');\n res.end();\n } else if (handle404Error && err.graphQLErrors && err.graphQLErrors.length) {\n res.statusCode = NOT_FOUND_STATUS_CODE;\n return { errorCode: NOT_FOUND_STATUS_CODE };\n }\n\n return {};\n};\n\nfunction handleRedirect({ errorCheckCode, url, urlTo, asPath, res }) {\n if (errorCheckCode) {\n const errorMessage = `Cannot redirect ${url}`;\n const customError = new Error(errorMessage);\n customError.graphQLErrors = [errorMessage];\n throw customError;\n }\n let redirectUrl = urlTo;\n if (process.env.BLAZE_DISABLE_REDIRECT_WITH_QUERY !== 'true') {\n const queryString = asPath.split('?')[1];\n redirectUrl = queryString ? `${urlTo}?${queryString}` : urlTo;\n }\n\n return doRedirect(res, redirectUrl);\n}\n\nfunction setCustomCacheControlHeaders(pageData, res) {\n const { cacheControlMaxAge = null } = pageData || {};\n\n if (res && cacheControlMaxAge !== null && cacheControlMaxAge >= 0) {\n res.setHeader('Cache-Control', `max-age=${cacheControlMaxAge}`);\n }\n}\n\nfunction doRedirect(res, redirectUrl) {\n if (res) {\n res.writeHead(301, { Location: redirectUrl });\n res.end();\n } else {\n window.location.href = redirectUrl;\n }\n\n return { redirecting: true };\n}\n\nasync function handleUrlError(err, args) {\n const { asPath, res, handle404Error, blazeApp, errorCheckCode } = args;\n if (!err.graphQLErrors || !err.graphQLErrors.length) {\n return handleError(err, res, handle404Error, blazeApp);\n }\n\n if (!errorCheckCode) {\n const result = await doUrlCheck({\n ...args,\n url: ERROR_URLS.custom404,\n errorCheckCode: NOT_FOUND_STATUS_CODE\n });\n\n if (handle404Error) {\n const parentUrl = checkParent(asPath);\n if (parentUrl) {\n return doRedirect(res, parentUrl);\n }\n }\n return result;\n }\n\n const parentPATH = checkParent(asPath);\n if (handle404Error && parentPATH) {\n return doRedirect(res, parentPATH);\n }\n\n return handleError(err, res, handle404Error, blazeApp);\n}\n\nexport default checkUrl;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;A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AA;EAAA,CACvD;EAAA,OAAAD,eAAA,CAAAvJ,KAAA,OAAAE,SAAA;AAAA;AAAA,IAAA8J,QAAA,GAAAC,OAAA,cAEcnJ,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"check-url.js","names":["_queryString","require","_reactPageBuilder","_coreAuthUi","_constants","_query","_checkParent","_interopRequireDefault","_checkPreviewUrl","_handleStaticRoutes","_getPageData","_getRootSelectorClasses","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","getRootClassesLimit","Number","process","env","BLAZE_ROOT_SELECTOR_CLASSES_LIMIT","checkUrl","_ref","_asyncToGenerator2","_regenerator","mark","_callee","props","asPath","apolloClient","res","req","query","blazeApp","disableSsr","fullUrl","_parseUrl","url","handler","previewData","urlCheckOptions","result","wrap","_callee$","_context","prev","next","getFullUrl","parseUrl","BLAZE_STATUS_URL","abrupt","isStatusPage","handleStaticRoutes","getHandler","setHeader","BLAZE_X_FRAME_OPTIONS","BLAZE_X_FRAME_OPTIONS_DEFAULT","getHeader","BLAZE_CACHE_CONTROL_HEADER","checkPreviewUrl","checkAccessToken","cache","extract","getPreviewData","doUrlCheck","handle404Error","sent","stop","_x","_ref2","_callee2","_result$pageData","_result$pageData2","rootSelectorClasses","_callee2$","_context2","getPageData","pageData","getRootSelectorClasses","isPreview","_x2","_x3","getHost","_ref3","_ref3$headers","headers","BLAZE_FRONTEND_HOST","host","concat","HTTPS","_window","window","_window$location","location","protocol","hostname","port","urlPort","COLON","DOUBLE_SLASH","_ref4","_callee3","args","_args$errorCheckCode","errorCheckCode","_yield$apolloClient$q","_yield$apolloClient$q2","_yield$apolloClient$q3","_yield$apolloClient$q4","_yield$apolloClient$q5","itemId","itemEntity","urlTo","_yield$apolloClient$q6","_callee3$","_context3","ROUTE_REGEX","test","Error","checkUrlQuery","variables","data","setCustomCacheControlHeaders","handleRedirect","events","emit","message","statusCode","getUnpublishedEntityName","t0","handleUrlError","_x4","handleError","err","error","networkError","writeHead","write","end","graphQLErrors","NOT_FOUND_STATUS_CODE","errorCode","_ref5","errorMessage","customError","redirectUrl","BLAZE_DISABLE_REDIRECT_WITH_QUERY","queryString","split","doRedirect","_ref6","_ref6$cacheControlMax","cacheControlMaxAge","Location","href","redirecting","_x5","_x6","_handleUrlError","_callee4","parentUrl","parentPATH","_callee4$","_context4","ERROR_URLS","custom404","checkParent","_default","exports"],"sources":["../../src/helpers/check-url.js"],"sourcesContent":["import { parseUrl } from 'query-string';\nimport { getUnpublishedEntityName } from '@blaze-cms/react-page-builder';\nimport { checkAccessToken } from '@blaze-cms/core-auth-ui';\nimport {\n HTTPS,\n DOUBLE_SLASH,\n COLON,\n NOT_FOUND_STATUS_CODE,\n BLAZE_X_FRAME_OPTIONS_DEFAULT,\n ROUTE_REGEX,\n ERROR_URLS\n} from '../constants';\nimport { checkUrlQuery } from '../application/query';\nimport checkParent from './check-parent';\nimport checkPreviewUrl from './check-preview-url';\nimport handleStaticRoutes from './handle-static-routes';\nimport getPageData from './get-page-data';\nimport getRootSelectorClasses from './get-root-selector-classes';\n\nconst getRootClassesLimit = () => Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT);\n\nconst checkUrl = async props => {\n const { asPath, apolloClient, res, req, query, blazeApp, disableSsr } = props;\n const fullUrl = getFullUrl(req, asPath);\n const { url } = parseUrl(asPath);\n\n if (process.env.BLAZE_STATUS_URL && url === process.env.BLAZE_STATUS_URL) {\n return { isStatusPage: true };\n }\n\n if (res) {\n const handler = handleStaticRoutes.getHandler(asPath);\n\n res.setHeader(\n 'X-Frame-Options',\n process.env.BLAZE_X_FRAME_OPTIONS || BLAZE_X_FRAME_OPTIONS_DEFAULT\n );\n\n if (!res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', process.env.BLAZE_CACHE_CONTROL_HEADER || ' ');\n }\n\n if (handler) {\n return handler(props);\n }\n }\n\n const previewData = checkPreviewUrl(url, query);\n\n if (!previewData && disableSsr) return { disableSsr: true };\n\n await checkAccessToken(apolloClient, {\n ...props,\n disableSsr: !Object.keys(apolloClient.cache.extract()).length // empty cache means SSR was disabled\n });\n\n if (previewData) return getPreviewData(previewData, apolloClient);\n const urlCheckOptions = { asPath, url, apolloClient, res };\n const result = await doUrlCheck({\n ...urlCheckOptions,\n handle404Error: true,\n blazeApp\n });\n return { ...result, fullUrl } || {};\n};\n\nconst getPreviewData = async (previewData, apolloClient) => {\n const result = await getPageData({ ...previewData, apolloClient });\n const { pageData: { url } = {} } = result;\n const rootSelectorClasses = getRootSelectorClasses(url, getRootClassesLimit());\n return { ...previewData, rootSelectorClasses, ...result, isPreview: true };\n};\n\nconst getHost = ({ headers = {} }) =>\n process.env.BLAZE_FRONTEND_HOST ||\n headers['x-request-host'] ||\n headers['x-forwarded-host'] ||\n headers.host;\n\nconst getFullUrl = (req, asPath) => {\n if (req) {\n return `${HTTPS}${getHost(req)}${asPath}`;\n }\n const {\n location: { protocol, hostname, port }\n } = window;\n const urlPort = port ? `${COLON}${port}` : '';\n\n return `${protocol}${DOUBLE_SLASH}${hostname}${urlPort}${asPath}`;\n};\n\nconst doUrlCheck = async args => {\n const { asPath, url, apolloClient, res, blazeApp, errorCheckCode = false } = args;\n try {\n if (!ROUTE_REGEX.test(url)) {\n throw Error('Invalid URL');\n }\n const { data: { checkUrl: { itemId, itemEntity, urlTo, pageData = {} } = {} } = {} } =\n await apolloClient.query({\n query: checkUrlQuery,\n variables: { url }\n });\n\n setCustomCacheControlHeaders(pageData, res);\n\n if (urlTo && (urlTo !== url || errorCheckCode)) {\n return handleRedirect({ errorCheckCode, url, urlTo, asPath, res });\n }\n const rootSelectorClasses = getRootSelectorClasses(url, getRootClassesLimit());\n\n if (errorCheckCode) {\n blazeApp.events.emit('monitor:log', { message: `Serving custom ${errorCheckCode} page` });\n if (res) res.statusCode = errorCheckCode;\n }\n\n return {\n pageData,\n rootSelectorClasses,\n itemId,\n itemEntity: getUnpublishedEntityName(itemEntity)\n };\n } catch (err) {\n return handleUrlError(err, args);\n }\n};\n\nconst handleError = (err, res, handle404Error, blazeApp) => {\n blazeApp.events.emit('monitor:log', { error: err });\n if (!res) return {};\n if (err.networkError) {\n res.writeHead(500, { 'Content-Type': 'text/plain' });\n res.write('500 Internal Server Error\\n');\n res.end();\n } else if (handle404Error && err.graphQLErrors && err.graphQLErrors.length) {\n res.statusCode = NOT_FOUND_STATUS_CODE;\n return { errorCode: NOT_FOUND_STATUS_CODE };\n }\n\n return {};\n};\n\nfunction handleRedirect({ errorCheckCode, url, urlTo, asPath, res }) {\n if (errorCheckCode) {\n const errorMessage = `Cannot redirect ${url}`;\n const customError = new Error(errorMessage);\n customError.graphQLErrors = [errorMessage];\n throw customError;\n }\n let redirectUrl = urlTo;\n if (process.env.BLAZE_DISABLE_REDIRECT_WITH_QUERY !== 'true') {\n const queryString = asPath.split('?')[1];\n redirectUrl = queryString ? `${urlTo}?${queryString}` : urlTo;\n }\n\n return doRedirect(res, redirectUrl);\n}\n\nfunction setCustomCacheControlHeaders(pageData, res) {\n const { cacheControlMaxAge = null } = pageData || {};\n\n if (res && cacheControlMaxAge !== null && cacheControlMaxAge >= 0) {\n res.setHeader('Cache-Control', `max-age=${cacheControlMaxAge}`);\n }\n}\n\nfunction doRedirect(res, redirectUrl) {\n if (res) {\n res.writeHead(301, { Location: redirectUrl });\n res.end();\n } else {\n window.location.href = redirectUrl;\n }\n\n return { redirecting: true };\n}\n\nasync function handleUrlError(err, args) {\n const { asPath, res, handle404Error, blazeApp, errorCheckCode } = args;\n if (!err.graphQLErrors || !err.graphQLErrors.length) {\n return handleError(err, res, handle404Error, blazeApp);\n }\n\n if (!errorCheckCode) {\n const result = await doUrlCheck({\n ...args,\n url: ERROR_URLS.custom404,\n errorCheckCode: NOT_FOUND_STATUS_CODE\n });\n\n if (handle404Error) {\n const parentUrl = checkParent(asPath);\n if (parentUrl) {\n return doRedirect(res, parentUrl);\n }\n }\n return result;\n }\n\n const parentPATH = checkParent(asPath);\n if (handle404Error && parentPATH) {\n return doRedirect(res, parentPATH);\n }\n\n return handleError(err, res, handle404Error, blazeApp);\n}\n\nexport default checkUrl;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AASA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,mBAAA,GAAAF,sBAAA,CAAAN,OAAA;AACA,IAAAS,YAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,uBAAA,GAAAJ,sBAAA,CAAAN,OAAA;AAAiE,SAAAW,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,aAAAhB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,SAAA,CAAAjH,MAAA,WAG7BkF,WAAW,CAACC,GAAG,EAAEvG,GAAG,EAAEmC,cAAc,EAAEhC,QAAQ,CAAC;QAAA;QAAA;UAAA,OAAAkI,SAAA,CAAAhG,IAAA;MAAA;IAAA,GAAA4F,QAAA;EAAA,CACvD;EAAA,OAAAD,eAAA,CAAAvJ,KAAA,OAAAE,SAAA;AAAA;AAAA,IAAA8J,QAAA,GAAAC,OAAA,cAEcnJ,QAAQ","ignoreList":[]}
@@ -11,7 +11,7 @@ import checkPreviewUrl from './check-preview-url';
11
11
  import handleStaticRoutes from './handle-static-routes';
12
12
  import getPageData from './get-page-data';
13
13
  import getRootSelectorClasses from './get-root-selector-classes';
14
- const getRootClassesLimit = () => Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT || 1);
14
+ const getRootClassesLimit = () => Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT);
15
15
  const checkUrl = async props => {
16
16
  const {
17
17
  asPath,
@@ -1 +1 @@
1
- {"version":3,"file":"check-url.js","names":["parseUrl","getUnpublishedEntityName","checkAccessToken","HTTPS","DOUBLE_SLASH","COLON","NOT_FOUND_STATUS_CODE","BLAZE_X_FRAME_OPTIONS_DEFAULT","ROUTE_REGEX","ERROR_URLS","checkUrlQuery","checkParent","checkPreviewUrl","handleStaticRoutes","getPageData","getRootSelectorClasses","getRootClassesLimit","Number","process","env","BLAZE_ROOT_SELECTOR_CLASSES_LIMIT","checkUrl","props","asPath","apolloClient","res","req","query","blazeApp","disableSsr","fullUrl","getFullUrl","url","BLAZE_STATUS_URL","isStatusPage","handler","getHandler","setHeader","BLAZE_X_FRAME_OPTIONS","getHeader","BLAZE_CACHE_CONTROL_HEADER","previewData","_objectSpread","Object","keys","cache","extract","length","getPreviewData","urlCheckOptions","result","doUrlCheck","handle404Error","pageData","rootSelectorClasses","isPreview","getHost","headers","BLAZE_FRONTEND_HOST","host","location","protocol","hostname","port","window","urlPort","args","errorCheckCode","test","Error","data","itemId","itemEntity","urlTo","variables","setCustomCacheControlHeaders","handleRedirect","events","emit","message","statusCode","err","handleUrlError","handleError","error","networkError","writeHead","write","end","graphQLErrors","errorCode","errorMessage","customError","redirectUrl","BLAZE_DISABLE_REDIRECT_WITH_QUERY","queryString","split","doRedirect","cacheControlMaxAge","Location","href","redirecting","custom404","parentUrl","parentPATH"],"sources":["../../src/helpers/check-url.js"],"sourcesContent":["import { parseUrl } from 'query-string';\nimport { getUnpublishedEntityName } from '@blaze-cms/react-page-builder';\nimport { checkAccessToken } from '@blaze-cms/core-auth-ui';\nimport {\n HTTPS,\n DOUBLE_SLASH,\n COLON,\n NOT_FOUND_STATUS_CODE,\n BLAZE_X_FRAME_OPTIONS_DEFAULT,\n ROUTE_REGEX,\n ERROR_URLS\n} from '../constants';\nimport { checkUrlQuery } from '../application/query';\nimport checkParent from './check-parent';\nimport checkPreviewUrl from './check-preview-url';\nimport handleStaticRoutes from './handle-static-routes';\nimport getPageData from './get-page-data';\nimport getRootSelectorClasses from './get-root-selector-classes';\n\nconst getRootClassesLimit = () => Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT || 1);\n\nconst checkUrl = async props => {\n const { asPath, apolloClient, res, req, query, blazeApp, disableSsr } = props;\n const fullUrl = getFullUrl(req, asPath);\n const { url } = parseUrl(asPath);\n\n if (process.env.BLAZE_STATUS_URL && url === process.env.BLAZE_STATUS_URL) {\n return { isStatusPage: true };\n }\n\n if (res) {\n const handler = handleStaticRoutes.getHandler(asPath);\n\n res.setHeader(\n 'X-Frame-Options',\n process.env.BLAZE_X_FRAME_OPTIONS || BLAZE_X_FRAME_OPTIONS_DEFAULT\n );\n\n if (!res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', process.env.BLAZE_CACHE_CONTROL_HEADER || ' ');\n }\n\n if (handler) {\n return handler(props);\n }\n }\n\n const previewData = checkPreviewUrl(url, query);\n\n if (!previewData && disableSsr) return { disableSsr: true };\n\n await checkAccessToken(apolloClient, {\n ...props,\n disableSsr: !Object.keys(apolloClient.cache.extract()).length // empty cache means SSR was disabled\n });\n\n if (previewData) return getPreviewData(previewData, apolloClient);\n const urlCheckOptions = { asPath, url, apolloClient, res };\n const result = await doUrlCheck({\n ...urlCheckOptions,\n handle404Error: true,\n blazeApp\n });\n return { ...result, fullUrl } || {};\n};\n\nconst getPreviewData = async (previewData, apolloClient) => {\n const result = await getPageData({ ...previewData, apolloClient });\n const { pageData: { url } = {} } = result;\n const rootSelectorClasses = getRootSelectorClasses(url, getRootClassesLimit());\n return { ...previewData, rootSelectorClasses, ...result, isPreview: true };\n};\n\nconst getHost = ({ headers = {} }) =>\n process.env.BLAZE_FRONTEND_HOST ||\n headers['x-request-host'] ||\n headers['x-forwarded-host'] ||\n headers.host;\n\nconst getFullUrl = (req, asPath) => {\n if (req) {\n return `${HTTPS}${getHost(req)}${asPath}`;\n }\n const {\n location: { protocol, hostname, port }\n } = window;\n const urlPort = port ? `${COLON}${port}` : '';\n\n return `${protocol}${DOUBLE_SLASH}${hostname}${urlPort}${asPath}`;\n};\n\nconst doUrlCheck = async args => {\n const { asPath, url, apolloClient, res, blazeApp, errorCheckCode = false } = args;\n try {\n if (!ROUTE_REGEX.test(url)) {\n throw Error('Invalid URL');\n }\n const { data: { checkUrl: { itemId, itemEntity, urlTo, pageData = {} } = {} } = {} } =\n await apolloClient.query({\n query: checkUrlQuery,\n variables: { url }\n });\n\n setCustomCacheControlHeaders(pageData, res);\n\n if (urlTo && (urlTo !== url || errorCheckCode)) {\n return handleRedirect({ errorCheckCode, url, urlTo, asPath, res });\n }\n const rootSelectorClasses = getRootSelectorClasses(url, getRootClassesLimit());\n\n if (errorCheckCode) {\n blazeApp.events.emit('monitor:log', { message: `Serving custom ${errorCheckCode} page` });\n if (res) res.statusCode = errorCheckCode;\n }\n\n return {\n pageData,\n rootSelectorClasses,\n itemId,\n itemEntity: getUnpublishedEntityName(itemEntity)\n };\n } catch (err) {\n return handleUrlError(err, args);\n }\n};\n\nconst handleError = (err, res, handle404Error, blazeApp) => {\n blazeApp.events.emit('monitor:log', { error: err });\n if (!res) return {};\n if (err.networkError) {\n res.writeHead(500, { 'Content-Type': 'text/plain' });\n res.write('500 Internal Server Error\\n');\n res.end();\n } else if (handle404Error && err.graphQLErrors && err.graphQLErrors.length) {\n res.statusCode = NOT_FOUND_STATUS_CODE;\n return { errorCode: NOT_FOUND_STATUS_CODE };\n }\n\n return {};\n};\n\nfunction handleRedirect({ errorCheckCode, url, urlTo, asPath, res }) {\n if (errorCheckCode) {\n const errorMessage = `Cannot redirect ${url}`;\n const customError = new Error(errorMessage);\n customError.graphQLErrors = [errorMessage];\n throw customError;\n }\n let redirectUrl = urlTo;\n if (process.env.BLAZE_DISABLE_REDIRECT_WITH_QUERY !== 'true') {\n const queryString = asPath.split('?')[1];\n redirectUrl = queryString ? `${urlTo}?${queryString}` : urlTo;\n }\n\n return doRedirect(res, redirectUrl);\n}\n\nfunction setCustomCacheControlHeaders(pageData, res) {\n const { cacheControlMaxAge = null } = pageData || {};\n\n if (res && cacheControlMaxAge !== null && cacheControlMaxAge >= 0) {\n res.setHeader('Cache-Control', `max-age=${cacheControlMaxAge}`);\n }\n}\n\nfunction doRedirect(res, redirectUrl) {\n if (res) {\n res.writeHead(301, { Location: redirectUrl });\n res.end();\n } else {\n window.location.href = redirectUrl;\n }\n\n return { redirecting: true };\n}\n\nasync function handleUrlError(err, args) {\n const { asPath, res, handle404Error, blazeApp, errorCheckCode } = args;\n if (!err.graphQLErrors || !err.graphQLErrors.length) {\n return handleError(err, res, handle404Error, blazeApp);\n }\n\n if (!errorCheckCode) {\n const result = await doUrlCheck({\n ...args,\n url: ERROR_URLS.custom404,\n errorCheckCode: NOT_FOUND_STATUS_CODE\n });\n\n if (handle404Error) {\n const parentUrl = checkParent(asPath);\n if (parentUrl) {\n return doRedirect(res, parentUrl);\n }\n }\n return result;\n }\n\n const parentPATH = checkParent(asPath);\n if (handle404Error && parentPATH) {\n return doRedirect(res, parentPATH);\n }\n\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AOrD,MAAM;EACf;EAEA,MAAMsD,UAAU,GAAG7F,WAAW,CAACY,MAAM,CAAC;EACtC,IAAI6B,cAAc,IAAIoD,UAAU,EAAE;IAChC,OAAOP,UAAU,CAACxE,GAAG,EAAE+E,UAAU,CAAC;EACpC;EAEA,OAAOrB,WAAW,CAACF,GAAG,EAAExD,GAAG,EAAE2B,cAAc,EAAExB,QAAQ,CAAC;AACxD;AAEA,eAAeP,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"check-url.js","names":["parseUrl","getUnpublishedEntityName","checkAccessToken","HTTPS","DOUBLE_SLASH","COLON","NOT_FOUND_STATUS_CODE","BLAZE_X_FRAME_OPTIONS_DEFAULT","ROUTE_REGEX","ERROR_URLS","checkUrlQuery","checkParent","checkPreviewUrl","handleStaticRoutes","getPageData","getRootSelectorClasses","getRootClassesLimit","Number","process","env","BLAZE_ROOT_SELECTOR_CLASSES_LIMIT","checkUrl","props","asPath","apolloClient","res","req","query","blazeApp","disableSsr","fullUrl","getFullUrl","url","BLAZE_STATUS_URL","isStatusPage","handler","getHandler","setHeader","BLAZE_X_FRAME_OPTIONS","getHeader","BLAZE_CACHE_CONTROL_HEADER","previewData","_objectSpread","Object","keys","cache","extract","length","getPreviewData","urlCheckOptions","result","doUrlCheck","handle404Error","pageData","rootSelectorClasses","isPreview","getHost","headers","BLAZE_FRONTEND_HOST","host","location","protocol","hostname","port","window","urlPort","args","errorCheckCode","test","Error","data","itemId","itemEntity","urlTo","variables","setCustomCacheControlHeaders","handleRedirect","events","emit","message","statusCode","err","handleUrlError","handleError","error","networkError","writeHead","write","end","graphQLErrors","errorCode","errorMessage","customError","redirectUrl","BLAZE_DISABLE_REDIRECT_WITH_QUERY","queryString","split","doRedirect","cacheControlMaxAge","Location","href","redirecting","custom404","parentUrl","parentPATH"],"sources":["../../src/helpers/check-url.js"],"sourcesContent":["import { parseUrl } from 'query-string';\nimport { getUnpublishedEntityName } from '@blaze-cms/react-page-builder';\nimport { checkAccessToken } from '@blaze-cms/core-auth-ui';\nimport {\n HTTPS,\n DOUBLE_SLASH,\n COLON,\n NOT_FOUND_STATUS_CODE,\n BLAZE_X_FRAME_OPTIONS_DEFAULT,\n ROUTE_REGEX,\n ERROR_URLS\n} from '../constants';\nimport { checkUrlQuery } from '../application/query';\nimport checkParent from './check-parent';\nimport checkPreviewUrl from './check-preview-url';\nimport handleStaticRoutes from './handle-static-routes';\nimport getPageData from './get-page-data';\nimport getRootSelectorClasses from './get-root-selector-classes';\n\nconst getRootClassesLimit = () => Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT);\n\nconst checkUrl = async props => {\n const { asPath, apolloClient, res, req, query, blazeApp, disableSsr } = props;\n const fullUrl = getFullUrl(req, asPath);\n const { url } = parseUrl(asPath);\n\n if (process.env.BLAZE_STATUS_URL && url === process.env.BLAZE_STATUS_URL) {\n return { isStatusPage: true };\n }\n\n if (res) {\n const handler = handleStaticRoutes.getHandler(asPath);\n\n res.setHeader(\n 'X-Frame-Options',\n process.env.BLAZE_X_FRAME_OPTIONS || BLAZE_X_FRAME_OPTIONS_DEFAULT\n );\n\n if (!res.getHeader('Cache-Control')) {\n res.setHeader('Cache-Control', process.env.BLAZE_CACHE_CONTROL_HEADER || ' ');\n }\n\n if (handler) {\n return handler(props);\n }\n }\n\n const previewData = checkPreviewUrl(url, query);\n\n if (!previewData && disableSsr) return { disableSsr: true };\n\n await checkAccessToken(apolloClient, {\n ...props,\n disableSsr: !Object.keys(apolloClient.cache.extract()).length // empty cache means SSR was disabled\n });\n\n if (previewData) return getPreviewData(previewData, apolloClient);\n const urlCheckOptions = { asPath, url, apolloClient, res };\n const result = await doUrlCheck({\n ...urlCheckOptions,\n handle404Error: true,\n blazeApp\n });\n return { ...result, fullUrl } || {};\n};\n\nconst getPreviewData = async (previewData, apolloClient) => {\n const result = await getPageData({ ...previewData, apolloClient });\n const { pageData: { url } = {} } = result;\n const rootSelectorClasses = getRootSelectorClasses(url, getRootClassesLimit());\n return { ...previewData, rootSelectorClasses, ...result, isPreview: true };\n};\n\nconst getHost = ({ headers = {} }) =>\n process.env.BLAZE_FRONTEND_HOST ||\n headers['x-request-host'] ||\n headers['x-forwarded-host'] ||\n headers.host;\n\nconst getFullUrl = (req, asPath) => {\n if (req) {\n return `${HTTPS}${getHost(req)}${asPath}`;\n }\n const {\n location: { protocol, hostname, port }\n } = window;\n const urlPort = port ? `${COLON}${port}` : '';\n\n return `${protocol}${DOUBLE_SLASH}${hostname}${urlPort}${asPath}`;\n};\n\nconst doUrlCheck = async args => {\n const { asPath, url, apolloClient, res, blazeApp, errorCheckCode = false } = args;\n try {\n if (!ROUTE_REGEX.test(url)) {\n throw Error('Invalid URL');\n }\n const { data: { checkUrl: { itemId, itemEntity, urlTo, pageData = {} } = {} } = {} } =\n await apolloClient.query({\n query: checkUrlQuery,\n variables: { url }\n });\n\n setCustomCacheControlHeaders(pageData, res);\n\n if (urlTo && (urlTo !== url || errorCheckCode)) {\n return handleRedirect({ errorCheckCode, url, urlTo, asPath, res });\n }\n const rootSelectorClasses = getRootSelectorClasses(url, getRootClassesLimit());\n\n if (errorCheckCode) {\n blazeApp.events.emit('monitor:log', { message: `Serving custom ${errorCheckCode} page` });\n if (res) res.statusCode = errorCheckCode;\n }\n\n return {\n pageData,\n rootSelectorClasses,\n itemId,\n itemEntity: getUnpublishedEntityName(itemEntity)\n };\n } catch (err) {\n return handleUrlError(err, args);\n }\n};\n\nconst handleError = (err, res, handle404Error, blazeApp) => {\n blazeApp.events.emit('monitor:log', { error: err });\n if (!res) return {};\n if (err.networkError) {\n res.writeHead(500, { 'Content-Type': 'text/plain' });\n res.write('500 Internal Server Error\\n');\n res.end();\n } else if (handle404Error && err.graphQLErrors && err.graphQLErrors.length) {\n res.statusCode = NOT_FOUND_STATUS_CODE;\n return { errorCode: NOT_FOUND_STATUS_CODE };\n }\n\n return {};\n};\n\nfunction handleRedirect({ errorCheckCode, url, urlTo, asPath, res }) {\n if (errorCheckCode) {\n const errorMessage = `Cannot redirect ${url}`;\n const customError = new Error(errorMessage);\n customError.graphQLErrors = [errorMessage];\n throw customError;\n }\n let redirectUrl = urlTo;\n if (process.env.BLAZE_DISABLE_REDIRECT_WITH_QUERY !== 'true') {\n const queryString = asPath.split('?')[1];\n redirectUrl = queryString ? `${urlTo}?${queryString}` : urlTo;\n }\n\n return doRedirect(res, redirectUrl);\n}\n\nfunction setCustomCacheControlHeaders(pageData, res) {\n const { cacheControlMaxAge = null } = pageData || {};\n\n if (res && cacheControlMaxAge !== null && cacheControlMaxAge >= 0) {\n res.setHeader('Cache-Control', `max-age=${cacheControlMaxAge}`);\n }\n}\n\nfunction doRedirect(res, redirectUrl) {\n if (res) {\n res.writeHead(301, { Location: redirectUrl });\n res.end();\n } else {\n window.location.href = redirectUrl;\n }\n\n return { redirecting: true };\n}\n\nasync function handleUrlError(err, args) {\n const { asPath, res, handle404Error, blazeApp, errorCheckCode } = args;\n if (!err.graphQLErrors || !err.graphQLErrors.length) {\n return handleError(err, res, handle404Error, blazeApp);\n }\n\n if (!errorCheckCode) {\n const result = await doUrlCheck({\n ...args,\n url: ERROR_URLS.custom404,\n errorCheckCode: NOT_FOUND_STATUS_CODE\n });\n\n if (handle404Error) {\n const parentUrl = checkParent(asPath);\n if (parentUrl) {\n return doRedirect(res, parentUrl);\n }\n }\n return result;\n }\n\n const parentPATH = checkParent(asPath);\n if (handle404Error && parentPATH) {\n return doRedirect(res, parentPATH);\n }\n\n return handleError(err, res, handle404Error, blazeApp);\n}\n\nexport default checkUrl;\n"],"mappings":";;;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,wBAAwB,QAAQ,+BAA+B;AACxE,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SACEC,KAAK,EACLC,YAAY,EACZC,KAAK,EACLC,qBAAqB,EACrBC,6BAA6B,EAC7BC,WAAW,EACXC,UAAU,QACL,cAAc;AACrB,SAASC,aAAa,QAAQ,sBAAsB;AACpD,OAAOC,WAAW,MAAM,gBAA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extjs-tools",
3
- "version": "0.146.0-node18-core-styles-tooltips.46",
3
+ "version": "0.146.0-node18-tooltips.38",
4
4
  "description": "Blaze nextjs tools",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-es/index.js",
@@ -28,23 +28,23 @@
28
28
  "license": "GPL-3.0",
29
29
  "dependencies": {
30
30
  "@apollo/client": "3.13.8",
31
- "@blaze-cms/core-auth-ui": "0.146.0-node18-core-styles-tooltips.46",
32
- "@blaze-cms/core-errors": "0.146.0-node18-core-styles-tooltips.46",
33
- "@blaze-cms/core-errors-ui": "0.146.0-node18-core-styles-tooltips.46",
34
- "@blaze-cms/core-ui": "0.146.0-node18-core-styles-tooltips.46",
35
- "@blaze-cms/nextjs-components": "0.146.0-node18-core-styles-tooltips.46",
36
- "@blaze-cms/plugin-auth-fe": "0.146.0-node18-core-styles-tooltips.46",
37
- "@blaze-cms/plugin-auth-local-fe": "0.146.0-node18-core-styles-tooltips.46",
38
- "@blaze-cms/plugin-chart": "0.146.0-node18-core-styles-tooltips.46",
39
- "@blaze-cms/plugin-google-maps-fe": "0.146.0-node18-core-styles-tooltips.46",
40
- "@blaze-cms/plugin-gtm-fe": "0.146.0-node18-core-styles-tooltips.46",
41
- "@blaze-cms/plugin-page-builder-fe": "0.146.0-node18-core-styles-tooltips.46",
42
- "@blaze-cms/plugin-preview-fe": "0.146.0-node18-core-styles-tooltips.46",
43
- "@blaze-cms/plugin-search-ui": "0.146.0-node18-core-styles-tooltips.46",
44
- "@blaze-cms/plugin-structured-data-fe": "0.146.0-node18-core-styles-tooltips.46",
45
- "@blaze-cms/plugin-translation-fe": "0.146.0-node18-core-styles-tooltips.46",
46
- "@blaze-cms/react-page-builder": "0.146.0-node18-core-styles-tooltips.46",
47
- "@blaze-cms/setup-ui": "0.146.0-node18-core-styles-tooltips.46",
31
+ "@blaze-cms/core-auth-ui": "0.146.0-node18-tooltips.32",
32
+ "@blaze-cms/core-errors": "0.146.0-node18-tooltips.0",
33
+ "@blaze-cms/core-errors-ui": "0.146.0-node18-tooltips.0",
34
+ "@blaze-cms/core-ui": "0.146.0-node18-tooltips.32",
35
+ "@blaze-cms/nextjs-components": "0.146.0-node18-tooltips.38",
36
+ "@blaze-cms/plugin-auth-fe": "0.146.0-node18-tooltips.38",
37
+ "@blaze-cms/plugin-auth-local-fe": "0.146.0-node18-tooltips.38",
38
+ "@blaze-cms/plugin-chart": "0.146.0-node18-tooltips.38",
39
+ "@blaze-cms/plugin-google-maps-fe": "0.146.0-node18-tooltips.38",
40
+ "@blaze-cms/plugin-gtm-fe": "0.146.0-node18-tooltips.38",
41
+ "@blaze-cms/plugin-page-builder-fe": "0.146.0-node18-tooltips.38",
42
+ "@blaze-cms/plugin-preview-fe": "0.146.0-node18-tooltips.32",
43
+ "@blaze-cms/plugin-search-ui": "0.146.0-node18-tooltips.37",
44
+ "@blaze-cms/plugin-structured-data-fe": "0.146.0-node18-tooltips.25",
45
+ "@blaze-cms/plugin-translation-fe": "0.146.0-node18-tooltips.38",
46
+ "@blaze-cms/react-page-builder": "0.146.0-node18-tooltips.38",
47
+ "@blaze-cms/setup-ui": "0.146.0-node18-tooltips.0",
48
48
  "@blaze-react/switches": "0.8.0-alpha.112",
49
49
  "autoprefixer": "^10.2.3",
50
50
  "core-js": "^3.2.1",
@@ -72,5 +72,5 @@
72
72
  "lib/*",
73
73
  "lib-es/*"
74
74
  ],
75
- "gitHead": "424c3c1f446e3cfa3a50106bdb98f4f5eeaed800"
75
+ "gitHead": "c47206fe5d789c5d3828b10016d73894feac3ae9"
76
76
  }
@@ -17,7 +17,7 @@ import handleStaticRoutes from './handle-static-routes';
17
17
  import getPageData from './get-page-data';
18
18
  import getRootSelectorClasses from './get-root-selector-classes';
19
19
 
20
- const getRootClassesLimit = () => Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT || 1);
20
+ const getRootClassesLimit = () => Number(process.env.BLAZE_ROOT_SELECTOR_CLASSES_LIMIT);
21
21
 
22
22
  const checkUrl = async props => {
23
23
  const { asPath, apolloClient, res, req, query, blazeApp, disableSsr } = props;
@@ -4,7 +4,6 @@ exports[`Application query should get check url query 1`] = `
4
4
  Object {
5
5
  "definitions": Array [
6
6
  Object {
7
- "description": undefined,
8
7
  "directives": Array [],
9
8
  "kind": "OperationDefinition",
10
9
  "name": Object {
@@ -386,7 +385,6 @@ Object {
386
385
  "variableDefinitions": Array [
387
386
  Object {
388
387
  "defaultValue": undefined,
389
- "description": undefined,
390
388
  "directives": Array [],
391
389
  "kind": "VariableDefinition",
392
390
  "type": Object {
@@ -422,7 +420,6 @@ exports[`Application query should get page query 1`] = `
422
420
  Object {
423
421
  "definitions": Array [
424
422
  Object {
425
- "description": undefined,
426
423
  "directives": Array [],
427
424
  "kind": "OperationDefinition",
428
425
  "name": Object {
@@ -751,7 +748,6 @@ Object {
751
748
  "variableDefinitions": Array [
752
749
  Object {
753
750
  "defaultValue": undefined,
754
- "description": undefined,
755
751
  "directives": Array [],
756
752
  "kind": "VariableDefinition",
757
753
  "type": Object {
@@ -787,7 +783,6 @@ exports[`Application query should match get entity schema 1`] = `
787
783
  Object {
788
784
  "definitions": Array [
789
785
  Object {
790
- "description": undefined,
791
786
  "directives": Array [],
792
787
  "kind": "OperationDefinition",
793
788
  "name": Object {
@@ -869,7 +864,6 @@ Object {
869
864
  "variableDefinitions": Array [
870
865
  Object {
871
866
  "defaultValue": undefined,
872
- "description": undefined,
873
867
  "directives": Array [],
874
868
  "kind": "VariableDefinition",
875
869
  "type": Object {
@@ -5,7 +5,6 @@ Object {
5
5
  "fileQuery": Object {
6
6
  "definitions": Array [
7
7
  Object {
8
- "description": undefined,
9
8
  "directives": Array [],
10
9
  "kind": "OperationDefinition",
11
10
  "name": Object {
@@ -87,7 +86,6 @@ Object {
87
86
  "variableDefinitions": Array [
88
87
  Object {
89
88
  "defaultValue": undefined,
90
- "description": undefined,
91
89
  "directives": Array [],
92
90
  "kind": "VariableDefinition",
93
91
  "type": Object {
@@ -5,7 +5,6 @@ Object {
5
5
  "fileQuery": Object {
6
6
  "definitions": Array [
7
7
  Object {
8
- "description": undefined,
9
8
  "directives": Array [],
10
9
  "kind": "OperationDefinition",
11
10
  "name": undefined,
@@ -5,7 +5,6 @@ Object {
5
5
  "fileQuery": Object {
6
6
  "definitions": Array [
7
7
  Object {
8
- "description": undefined,
9
8
  "directives": Array [],
10
9
  "kind": "OperationDefinition",
11
10
  "name": undefined,
@@ -5,7 +5,6 @@ Object {
5
5
  "fileQuery": Object {
6
6
  "definitions": Array [
7
7
  Object {
8
- "description": undefined,
9
8
  "directives": Array [],
10
9
  "kind": "OperationDefinition",
11
10
  "name": Object {
@@ -128,7 +127,6 @@ Object {
128
127
  "variableDefinitions": Array [
129
128
  Object {
130
129
  "defaultValue": undefined,
131
- "description": undefined,
132
130
  "directives": Array [],
133
131
  "kind": "VariableDefinition",
134
132
  "type": Object {
@@ -5,7 +5,6 @@ Object {
5
5
  "fileQuery": Object {
6
6
  "definitions": Array [
7
7
  Object {
8
- "description": undefined,
9
8
  "directives": Array [],
10
9
  "kind": "OperationDefinition",
11
10
  "name": undefined,