@anansi/core 0.14.5 → 0.14.8
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 +14 -117
- package/dist/client.js +15 -3
- package/dist/client.js.map +1 -1
- package/dist/server.js +4 -8
- package/dist/server.js.map +1 -1
- package/lib/floodSpouts.d.ts +1 -0
- package/lib/floodSpouts.d.ts.map +1 -1
- package/lib/laySpouts.d.ts +1 -0
- package/lib/laySpouts.d.ts.map +1 -1
- package/lib/scripts/serve.js +8 -8
- package/lib/scripts/startDevserver.js +7 -7
- package/lib/spouts/app.d.ts +1 -0
- package/lib/spouts/app.d.ts.map +1 -1
- package/lib/spouts/app.server.d.ts +1 -0
- package/lib/spouts/app.server.d.ts.map +1 -1
- package/lib/spouts/document.server.js +4 -4
- package/lib/spouts/json.js +7 -2
- package/lib/spouts/restHooks.d.ts.map +1 -1
- package/lib/spouts/restHooks.js +9 -2
- package/lib/spouts/rhHelp.d.ts +1 -0
- package/lib/spouts/rhHelp.d.ts.map +1 -1
- package/lib/spouts/rhHelp.js +2 -6
- package/lib/spouts/types.d.ts +1 -0
- package/lib/spouts/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/spouts/json.tsx +5 -0
- package/src/spouts/restHooks.tsx +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,68 +3,63 @@
|
|
|
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.14.
|
|
6
|
+
### [0.14.8](https://github.com/ntucker/anansi/compare/@anansi/core@0.14.7...@anansi/core@0.14.8) (2022-07-26)
|
|
7
7
|
|
|
8
|
+
### 💅 Enhancement
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
* Provide warnings when SSR init has issues ([27c1c8a](https://github.com/ntucker/anansi/commit/27c1c8a90e474c01ad7c5a48d05dedc36508ede0))
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
### [0.14.7](https://github.com/ntucker/anansi/compare/@anansi/core@0.14.6...@anansi/core@0.14.7) (2022-07-23)
|
|
12
13
|
|
|
14
|
+
**Note:** Version bump only for package @anansi/core
|
|
13
15
|
|
|
16
|
+
### [0.14.6](https://github.com/ntucker/anansi/compare/@anansi/core@0.14.5...@anansi/core@0.14.6) (2022-07-19)
|
|
14
17
|
|
|
15
|
-
###
|
|
18
|
+
### 📦 Package
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
* Update babel monorepo to v7.18.9 ([#1583](https://github.com/ntucker/anansi/issues/1583)) ([f49c211](https://github.com/ntucker/anansi/commit/f49c211c633b6bbabdf50e4c8dd62cfd13015e22))
|
|
18
21
|
|
|
22
|
+
### [0.14.5](https://github.com/ntucker/anansi/compare/@anansi/core@0.14.4...@anansi/core@0.14.5) (2022-07-16)
|
|
23
|
+
|
|
24
|
+
### 📦 Package
|
|
19
25
|
|
|
26
|
+
* Update jest monorepo to ^28.1.3 ([#1579](https://github.com/ntucker/anansi/issues/1579)) ([67eb63f](https://github.com/ntucker/anansi/commit/67eb63f426580c74027114f33c5ebfa06c8a366b))
|
|
20
27
|
|
|
28
|
+
### [0.14.4](https://github.com/ntucker/anansi/compare/@anansi/core@0.14.3...@anansi/core@0.14.4) (2022-07-08)
|
|
21
29
|
|
|
30
|
+
**Note:** Version bump only for package @anansi/core
|
|
22
31
|
|
|
23
32
|
### [0.14.3](https://github.com/ntucker/anansi/compare/@anansi/core@0.14.1...@anansi/core@0.14.3) (2022-07-01)
|
|
24
33
|
|
|
25
|
-
|
|
26
34
|
### 🐛 Bug Fix
|
|
27
35
|
|
|
28
36
|
* Spout type removes provided props from needed props ([#1572](https://github.com/ntucker/anansi/issues/1572)) ([caa25fd](https://github.com/ntucker/anansi/commit/caa25fd73b1b381fea84427a26b44199d4b12314))
|
|
29
37
|
|
|
30
|
-
|
|
31
|
-
|
|
32
38
|
### [0.14.2](https://github.com/ntucker/anansi/compare/@anansi/core@0.14.1...@anansi/core@0.14.2) (2022-07-01)
|
|
33
39
|
|
|
34
|
-
|
|
35
40
|
### 🐛 Bug Fix
|
|
36
41
|
|
|
37
42
|
* Spout type removes provided props from needed props ([#1572](https://github.com/ntucker/anansi/issues/1572)) ([caa25fd](https://github.com/ntucker/anansi/commit/caa25fd73b1b381fea84427a26b44199d4b12314))
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
41
44
|
### [0.14.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.14.0...@anansi/core@0.14.1) (2022-06-29)
|
|
42
45
|
|
|
43
|
-
|
|
44
46
|
### 🐛 Bug Fix
|
|
45
47
|
|
|
46
48
|
* Provide rest-hooks package for rest-hooks/ssr ([#1569](https://github.com/ntucker/anansi/issues/1569)) ([1dbb8ae](https://github.com/ntucker/anansi/commit/1dbb8aec39ad3180a96e76827611b05b53d7e02f))
|
|
47
49
|
|
|
48
|
-
|
|
49
50
|
### 📦 Package
|
|
50
51
|
|
|
51
52
|
* Update babel monorepo to v7.18.6 ([#1566](https://github.com/ntucker/anansi/issues/1566)) ([1634f13](https://github.com/ntucker/anansi/commit/1634f1358de98ba724433ffb462094ad17f88b72))
|
|
52
53
|
* Update jest monorepo to ^28.1.2 ([#1567](https://github.com/ntucker/anansi/issues/1567)) ([2e614b1](https://github.com/ntucker/anansi/commit/2e614b1bc54ade3cf78717e7d26d606f5e917888))
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
55
|
## [0.14.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.13.0...@anansi/core@0.14.0) (2022-06-24)
|
|
57
56
|
|
|
58
|
-
|
|
59
57
|
### 🚀 Features
|
|
60
58
|
|
|
61
59
|
* Add Spout type for easy spout construction ([8f93eb3](https://github.com/ntucker/anansi/commit/8f93eb363f1bfe30d1ac30395df1a3d9fbd9cab3))
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
61
|
## [0.13.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.12.0...@anansi/core@0.13.0) (2022-06-23)
|
|
66
62
|
|
|
67
|
-
|
|
68
63
|
### ⚠ 💥 BREAKING CHANGES
|
|
69
64
|
|
|
70
65
|
* Must use appSpout; Spouts need two generics
|
|
@@ -73,116 +68,86 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
73
68
|
|
|
74
69
|
* Spouts produce props in both directions ([#1559](https://github.com/ntucker/anansi/issues/1559)) ([898cdde](https://github.com/ntucker/anansi/commit/898cdde500a204a7a4dc155ac7ee51930172380e))
|
|
75
70
|
|
|
76
|
-
|
|
77
|
-
|
|
78
71
|
## [0.12.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.11.2...@anansi/core@0.12.0) (2022-06-15)
|
|
79
72
|
|
|
80
|
-
|
|
81
73
|
### 🚀 Features
|
|
82
74
|
|
|
83
75
|
* Add onError option to laySpouts ([a0ef72b](https://github.com/ntucker/anansi/commit/a0ef72bcaab1440a3d997d21636f81ca767a5a1c))
|
|
84
76
|
|
|
85
|
-
|
|
86
77
|
### 💅 Enhancement
|
|
87
78
|
|
|
88
79
|
* Don't crash devserver on compiler errors ([3c764e4](https://github.com/ntucker/anansi/commit/3c764e4dd67a57409c64ff7dd144386623a1d93f))
|
|
89
80
|
|
|
90
|
-
|
|
91
81
|
### 📦 Package
|
|
92
82
|
|
|
93
83
|
* Update babel monorepo to v7.18.5 ([#1545](https://github.com/ntucker/anansi/issues/1545)) ([aaaa8bc](https://github.com/ntucker/anansi/commit/aaaa8bcaa4d9188e9671ee31dc09b7aa9e3ce988))
|
|
94
84
|
|
|
95
|
-
|
|
96
|
-
|
|
97
85
|
### [0.11.2](https://github.com/ntucker/anansi/compare/@anansi/core@0.11.1...@anansi/core@0.11.2) (2022-06-13)
|
|
98
86
|
|
|
99
|
-
|
|
100
87
|
### 💅 Enhancement
|
|
101
88
|
|
|
102
89
|
* Do not override 'unsafe-inline' with nonce for CSP ([cfbd2bd](https://github.com/ntucker/anansi/commit/cfbd2bdfa69ae97ef2db6a824496888420251371))
|
|
103
90
|
* Use 'text' to get inline JSON ([9ecdb07](https://github.com/ntucker/anansi/commit/9ecdb074d01e6f09c28a685433105cf0d6f711cc))
|
|
104
91
|
|
|
105
|
-
|
|
106
92
|
### 📦 Package
|
|
107
93
|
|
|
108
94
|
* Update `webpack-cli` to v4.10.0 ([#1543](https://github.com/ntucker/anansi/issues/1543)) ([298cb01](https://github.com/ntucker/anansi/commit/298cb018db2975fb5c926c48d2145d7c1f4515b9))
|
|
109
95
|
|
|
110
|
-
|
|
111
|
-
|
|
112
96
|
### [0.11.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.11.0...@anansi/core@0.11.1) (2022-06-13)
|
|
113
97
|
|
|
114
|
-
|
|
115
98
|
### 🐛 Bug Fix
|
|
116
99
|
|
|
117
100
|
* Use call user-config devServer.setupMiddleware ([99acd8c](https://github.com/ntucker/anansi/commit/99acd8c9386bfc338ef8733d19a734b2a8be21dd))
|
|
118
101
|
|
|
119
|
-
|
|
120
|
-
|
|
121
102
|
## [0.11.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.10.0...@anansi/core@0.11.0) (2022-06-12)
|
|
122
103
|
|
|
123
|
-
|
|
124
104
|
### 🚀 Features
|
|
125
105
|
|
|
126
106
|
* Add CSP support ([#1541](https://github.com/ntucker/anansi/issues/1541)) ([e8a7415](https://github.com/ntucker/anansi/commit/e8a7415db892d725b76a2d7d451670437d6fb8eb))
|
|
127
107
|
|
|
128
|
-
|
|
129
108
|
### 💅 Enhancement
|
|
130
109
|
|
|
131
110
|
* Multi-module server side devserver ([b1b6f87](https://github.com/ntucker/anansi/commit/b1b6f873f2a50a9af05683a80d587ac87d90f8f9))
|
|
132
111
|
|
|
133
|
-
|
|
134
|
-
|
|
135
112
|
## [0.10.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.9.0...@anansi/core@0.10.0) (2022-06-09)
|
|
136
113
|
|
|
137
|
-
|
|
138
114
|
### 🚀 Features
|
|
139
115
|
|
|
140
116
|
* add router onChange() ([5c981ed](https://github.com/ntucker/anansi/commit/5c981ed587b55a80fd4f604fc24fb143d2355a06))
|
|
141
117
|
|
|
142
|
-
|
|
143
118
|
### 💅 Enhancement
|
|
144
119
|
|
|
145
120
|
* Do require cache invalidation ourselves ([22b4e4c](https://github.com/ntucker/anansi/commit/22b4e4c2e4ce3d7de999813bd4e9397e770fe788))
|
|
146
121
|
* Improve devserver node 'require' reliability ([#1538](https://github.com/ntucker/anansi/issues/1538)) ([96b6a54](https://github.com/ntucker/anansi/commit/96b6a54562b97f116fc987b41fbf7547770debc8))
|
|
147
122
|
|
|
148
|
-
|
|
149
123
|
### 🐛 Bug Fix
|
|
150
124
|
|
|
151
125
|
* rootId is optional ([ff43166](https://github.com/ntucker/anansi/commit/ff43166d457ac93ffca2eae0738d81e734b6936e))
|
|
152
126
|
* SSR hot-reloading ([9809ad5](https://github.com/ntucker/anansi/commit/9809ad5798e9082554f0358fcd9c301a87e4acbf))
|
|
153
127
|
|
|
154
|
-
|
|
155
128
|
### 📦 Package
|
|
156
129
|
|
|
157
130
|
* Move compression to correct package ([1ce18ba](https://github.com/ntucker/anansi/commit/1ce18ba9d7dc4d04682184bc1fa74354684294bb))
|
|
158
131
|
* Update all non-major dependencies ([#1531](https://github.com/ntucker/anansi/issues/1531)) ([2677241](https://github.com/ntucker/anansi/commit/26772415c2763f35c1720a08bb4b5417214f20d3))
|
|
159
132
|
* Update jest monorepo to ^28.1.1 ([#1534](https://github.com/ntucker/anansi/issues/1534)) ([b73dea2](https://github.com/ntucker/anansi/commit/b73dea2ee14f914bdbca189000265693d7fb112f))
|
|
160
133
|
|
|
161
|
-
|
|
162
|
-
|
|
163
134
|
## [0.9.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.8.0...@anansi/core@0.9.0) (2022-05-29)
|
|
164
135
|
|
|
165
|
-
|
|
166
136
|
### 🚀 Features
|
|
167
137
|
|
|
168
138
|
* --serveProxy: [non-dev] uses webpack proxy config ([774f826](https://github.com/ntucker/anansi/commit/774f82646542d8acfcb0ddceb6fc75fcc2851a01))
|
|
169
139
|
* Add option to serve assets with production server ([bfb20eb](https://github.com/ntucker/anansi/commit/bfb20eb1564fc2c6b72fea79d0722ac6186797fe))
|
|
170
140
|
|
|
171
|
-
|
|
172
141
|
### 💅 Enhancement
|
|
173
142
|
|
|
174
143
|
* Handle root asset path ([a770c77](https://github.com/ntucker/anansi/commit/a770c77c4775b09ff86f26cfd5983eab5d211f74))
|
|
175
144
|
|
|
176
|
-
|
|
177
145
|
### 🐛 Bug Fix
|
|
178
146
|
|
|
179
147
|
* documentSpout options type ([6707d35](https://github.com/ntucker/anansi/commit/6707d3592f7f0ab772a10d623d1d765a9301c3ae))
|
|
180
148
|
|
|
181
|
-
|
|
182
|
-
|
|
183
149
|
## [0.8.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.7.4...@anansi/core@0.8.0) (2022-05-29)
|
|
184
150
|
|
|
185
|
-
|
|
186
151
|
### 🚀 Features
|
|
187
152
|
|
|
188
153
|
* Add anansi serve command ([#1525](https://github.com/ntucker/anansi/issues/1525)) ([ac5a396](https://github.com/ntucker/anansi/commit/ac5a396f9640ce18058813c1594d49367a8aa468))
|
|
@@ -190,181 +155,123 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
190
155
|
* Add production node service ([bceeb56](https://github.com/ntucker/anansi/commit/bceeb56c23c8f8c3dc4a15d35dc8877f277e3d2f))
|
|
191
156
|
* Handle devserver proxy ([e7c5b38](https://github.com/ntucker/anansi/commit/e7c5b38cdb60b236db15ffb28622889b0b771515))
|
|
192
157
|
|
|
193
|
-
|
|
194
|
-
|
|
195
158
|
### [0.7.4](https://github.com/ntucker/anansi/compare/@anansi/core@0.7.3...@anansi/core@0.7.4) (2022-05-28)
|
|
196
159
|
|
|
197
|
-
|
|
198
160
|
### 💅 Enhancement
|
|
199
161
|
|
|
200
162
|
* Stall SSR requests until build is ready ([fe2616a](https://github.com/ntucker/anansi/commit/fe2616ac2d957f7243310d896f4a2ad5cb7d910e))
|
|
201
163
|
|
|
202
|
-
|
|
203
|
-
|
|
204
164
|
### [0.7.3](https://github.com/ntucker/anansi/compare/@anansi/core@0.7.2...@anansi/core@0.7.3) (2022-05-28)
|
|
205
165
|
|
|
206
|
-
|
|
207
166
|
### 💅 Enhancement
|
|
208
167
|
|
|
209
168
|
* Require, then import fresh ([7de7d8d](https://github.com/ntucker/anansi/commit/7de7d8d73e533b69bdf78698965121a35375692c))
|
|
210
169
|
|
|
211
|
-
|
|
212
|
-
|
|
213
170
|
### [0.7.2](https://github.com/ntucker/anansi/compare/@anansi/core@0.7.1...@anansi/core@0.7.2) (2022-05-28)
|
|
214
171
|
|
|
215
|
-
|
|
216
172
|
### 💅 Enhancement
|
|
217
173
|
|
|
218
174
|
* More error handling ([129d444](https://github.com/ntucker/anansi/commit/129d44407ac3ea9838e240d82f774c73100cc9da))
|
|
219
175
|
|
|
220
|
-
|
|
221
|
-
|
|
222
176
|
### [0.7.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.7.0...@anansi/core@0.7.1) (2022-05-28)
|
|
223
177
|
|
|
224
|
-
|
|
225
178
|
### 💅 Enhancement
|
|
226
179
|
|
|
227
180
|
* Do not use additional express server for dev ([ce29cbb](https://github.com/ntucker/anansi/commit/ce29cbb0b8547b736a31f9bac6309338b6114bae))
|
|
228
181
|
* Target current node for server devbuild ([262bd1e](https://github.com/ntucker/anansi/commit/262bd1e79d56dacdb4114d8ea959d819df16b687))
|
|
229
182
|
|
|
230
|
-
|
|
231
183
|
### 🐛 Bug Fix
|
|
232
184
|
|
|
233
185
|
* SSR hot reloading ([3b08106](https://github.com/ntucker/anansi/commit/3b081066463020fdbef2c01efd4922d09e02d8aa))
|
|
234
186
|
|
|
235
|
-
|
|
236
|
-
|
|
237
187
|
## [0.7.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.6.1...@anansi/core@0.7.0) (2022-05-28)
|
|
238
188
|
|
|
239
|
-
|
|
240
189
|
### 🚀 Features
|
|
241
190
|
|
|
242
191
|
* env.entrypath override ([a918d32](https://github.com/ntucker/anansi/commit/a918d3247c22ea00d0e1d5395553752280d32d99))
|
|
243
192
|
|
|
244
|
-
|
|
245
193
|
### 💅 Enhancement
|
|
246
194
|
|
|
247
195
|
* Improve route asset identification ([c07e9a2](https://github.com/ntucker/anansi/commit/c07e9a29935e0e24f815371ad6610bed77da967e))
|
|
248
196
|
|
|
249
|
-
|
|
250
197
|
### 📦 Package
|
|
251
198
|
|
|
252
199
|
* Update babel monorepo to v7.18.2 ([#1520](https://github.com/ntucker/anansi/issues/1520)) ([e0fe514](https://github.com/ntucker/anansi/commit/e0fe5142b0c308aff24b86faef6d70084c80691f))
|
|
253
200
|
|
|
254
|
-
|
|
255
|
-
|
|
256
201
|
### [0.6.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.6.0...@anansi/core@0.6.1) (2022-05-24)
|
|
257
202
|
|
|
258
|
-
|
|
259
203
|
### 🐛 Bug Fix
|
|
260
204
|
|
|
261
205
|
* Don't error with 'React currently only supports piping to one writable stream' ([cf55fdb](https://github.com/ntucker/anansi/commit/cf55fdb82ee158e26ee596f86db0231faa8e98f5))
|
|
262
206
|
|
|
263
|
-
|
|
264
|
-
|
|
265
207
|
## [0.6.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.5.2...@anansi/core@0.6.0) (2022-05-22)
|
|
266
208
|
|
|
267
|
-
|
|
268
209
|
### 🚀 Features
|
|
269
210
|
|
|
270
211
|
* Return router in spout ([dfbb685](https://github.com/ntucker/anansi/commit/dfbb68577e05216178671262db488d8aab55021e))
|
|
271
212
|
|
|
272
|
-
|
|
273
|
-
|
|
274
213
|
### [0.5.2](https://github.com/ntucker/anansi/compare/@anansi/core@0.5.1...@anansi/core@0.5.2) (2022-05-21)
|
|
275
214
|
|
|
276
215
|
**Note:** Version bump only for package @anansi/core
|
|
277
216
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
217
|
### [0.5.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.5.0...@anansi/core@0.5.1) (2022-05-20)
|
|
283
218
|
|
|
284
|
-
|
|
285
219
|
### 📦 Package
|
|
286
220
|
|
|
287
221
|
* Update babel monorepo ([#1515](https://github.com/ntucker/anansi/issues/1515)) ([9d51b13](https://github.com/ntucker/anansi/commit/9d51b13218a67c17cfef56a1be88ac4af7933d03))
|
|
288
222
|
|
|
289
|
-
|
|
290
|
-
|
|
291
223
|
## [0.5.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.4.4...@anansi/core@0.5.0) (2022-05-18)
|
|
292
224
|
|
|
293
|
-
|
|
294
225
|
### 🚀 Features
|
|
295
226
|
|
|
296
227
|
* Add commonjs bundles ([#1508](https://github.com/ntucker/anansi/issues/1508)) ([3f1f5a2](https://github.com/ntucker/anansi/commit/3f1f5a2f881d3e314d9fd08d63607e0c8dbd34d1))
|
|
297
228
|
|
|
298
|
-
|
|
299
229
|
### 💅 Enhancement
|
|
300
230
|
|
|
301
231
|
* Ensure output works without WEBPACK_PUBLIC_HOST set ([1df3f57](https://github.com/ntucker/anansi/commit/1df3f57cf0d3966a371e89f8c2333f3f29e23b65))
|
|
302
232
|
* Only hydrate body content ([1a6412c](https://github.com/ntucker/anansi/commit/1a6412c2e2b55b176fa0491228888490e45de98f))
|
|
303
233
|
|
|
304
|
-
|
|
305
|
-
|
|
306
234
|
### [0.4.4](https://github.com/ntucker/anansi/compare/@anansi/core@0.4.3...@anansi/core@0.4.4) (2022-05-18)
|
|
307
235
|
|
|
308
|
-
|
|
309
236
|
### 💅 Enhancement
|
|
310
237
|
|
|
311
238
|
* Supress hydration warnings in head for stackblitz compat ([38ac992](https://github.com/ntucker/anansi/commit/38ac99237af30d97408fb23bfb95b3bbe5384a03))
|
|
312
239
|
|
|
313
|
-
|
|
314
|
-
|
|
315
240
|
### [0.4.3](https://github.com/ntucker/anansi/compare/@anansi/core@0.4.2...@anansi/core@0.4.3) (2022-05-18)
|
|
316
241
|
|
|
317
|
-
|
|
318
242
|
### 💅 Enhancement
|
|
319
243
|
|
|
320
244
|
* Use relative asset paths ([799b69e](https://github.com/ntucker/anansi/commit/799b69e52394edc26290b9f01ff60ad772f739da))
|
|
321
245
|
|
|
322
|
-
|
|
323
|
-
|
|
324
246
|
### [0.4.2](https://github.com/ntucker/anansi/compare/@anansi/core@0.4.1...@anansi/core@0.4.2) (2022-05-18)
|
|
325
247
|
|
|
326
248
|
**Note:** Version bump only for package @anansi/core
|
|
327
249
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
250
|
### [0.4.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.4.0...@anansi/core@0.4.1) (2022-05-18)
|
|
333
251
|
|
|
334
|
-
|
|
335
252
|
### 🐛 Bug Fix
|
|
336
253
|
|
|
337
254
|
* Server compilation ([d8a1c9a](https://github.com/ntucker/anansi/commit/d8a1c9a05718cde13c99d56dcc79a5cc823fa6bb))
|
|
338
255
|
|
|
339
|
-
|
|
340
|
-
|
|
341
256
|
## [0.4.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.3.1...@anansi/core@0.4.0) (2022-05-17)
|
|
342
257
|
|
|
343
|
-
|
|
344
258
|
### 🚀 Features
|
|
345
259
|
|
|
346
260
|
* SSR uses webpack devserver and responds to code changes ([#1504](https://github.com/ntucker/anansi/issues/1504)) ([25803a5](https://github.com/ntucker/anansi/commit/25803a5b49316c7e73846efbe774d5cbe3eb28a3))
|
|
347
261
|
|
|
348
|
-
|
|
349
262
|
### 📦 Package
|
|
350
263
|
|
|
351
264
|
* Update babel monorepo to v7.17.12 ([#1505](https://github.com/ntucker/anansi/issues/1505)) ([cdf449c](https://github.com/ntucker/anansi/commit/cdf449c234da377c6968847a500ef77d7340c5bb))
|
|
352
265
|
* Update jest monorepo to ^28.1.0 ([#1493](https://github.com/ntucker/anansi/issues/1493)) ([7cc9df4](https://github.com/ntucker/anansi/commit/7cc9df4a439a0743bf243a5ad8393c62c067aa44))
|
|
353
266
|
|
|
354
|
-
|
|
355
|
-
|
|
356
267
|
### [0.3.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.3.0...@anansi/core@0.3.1) (2022-05-04)
|
|
357
268
|
|
|
358
|
-
|
|
359
269
|
### 📦 Package
|
|
360
270
|
|
|
361
271
|
* Update all non-major dependencies ([#1490](https://github.com/ntucker/anansi/issues/1490)) ([c333a59](https://github.com/ntucker/anansi/commit/c333a595dd912e67f64e22b4c4af58e825e75cad))
|
|
362
272
|
|
|
363
|
-
|
|
364
|
-
|
|
365
273
|
## [0.3.0](https://github.com/ntucker/anansi/compare/@anansi/core@0.2.2...@anansi/core@0.3.0) (2022-04-30)
|
|
366
274
|
|
|
367
|
-
|
|
368
275
|
### ⚠ 💥 BREAKING CHANGES
|
|
369
276
|
|
|
370
277
|
* Requires TypeScript 4.3 and Jest 28
|
|
@@ -379,34 +286,24 @@ Co-authored-by: Nathaniel Tucker <me@ntucker.me>
|
|
|
379
286
|
* Update jest monorepo to ^28.0.3 ([#1486](https://github.com/ntucker/anansi/issues/1486)) ([a5b325a](https://github.com/ntucker/anansi/commit/a5b325af0166351f40c421d4a3a0bef59f6d1218))
|
|
380
287
|
* Update jest monorepo to v28 (major) ([#1479](https://github.com/ntucker/anansi/issues/1479)) ([06338de](https://github.com/ntucker/anansi/commit/06338de8bf871945dac4b6b35155e49fd062bfdb))
|
|
381
288
|
|
|
382
|
-
|
|
383
|
-
|
|
384
289
|
### [0.2.2](https://github.com/ntucker/anansi/compare/@anansi/core@0.2.1...@anansi/core@0.2.2) (2022-04-22)
|
|
385
290
|
|
|
386
|
-
|
|
387
291
|
### 💅 Enhancement
|
|
388
292
|
|
|
389
293
|
* Indicate compilation errors ([82682b9](https://github.com/ntucker/anansi/commit/82682b9ed22686eb58f5421b6043852d2006842e))
|
|
390
294
|
|
|
391
|
-
|
|
392
|
-
|
|
393
295
|
### [0.2.1](https://github.com/ntucker/anansi/compare/@anansi/core@0.2.0...@anansi/core@0.2.1) (2022-04-18)
|
|
394
296
|
|
|
395
|
-
|
|
396
297
|
### 🐛 Bug Fix
|
|
397
298
|
|
|
398
299
|
* Make start-anansi command executable in bash ([4ae313c](https://github.com/ntucker/anansi/commit/4ae313c7d2137df63e74e5a8064237189c04adc8))
|
|
399
300
|
|
|
400
|
-
|
|
401
|
-
|
|
402
301
|
## 0.2.0 (2022-04-18)
|
|
403
302
|
|
|
404
|
-
|
|
405
303
|
### 🚀 Features
|
|
406
304
|
|
|
407
305
|
* React 18 partial hydration SSR ([#1427](https://github.com/ntucker/anansi/issues/1427)) ([afe12fe](https://github.com/ntucker/anansi/commit/afe12fea2e0a0f9d9a759c2f533ab925ba0e8957)), closes [#1456](https://github.com/ntucker/anansi/issues/1456)
|
|
408
306
|
|
|
409
|
-
|
|
410
307
|
### 📦 Package
|
|
411
308
|
|
|
412
309
|
* Update all non-major dependencies ([#1472](https://github.com/ntucker/anansi/issues/1472)) ([903e452](https://github.com/ntucker/anansi/commit/903e452e58dfacb14808d23e1aa883d6126dae1f))
|
package/dist/client.js
CHANGED
|
@@ -93,7 +93,14 @@ function restHooksSpout(options = {
|
|
|
93
93
|
getManagers: () => [new core_namespaceObject.NetworkManager()]
|
|
94
94
|
}) {
|
|
95
95
|
return next => async props => {
|
|
96
|
-
|
|
96
|
+
var _props$initData;
|
|
97
|
+
|
|
98
|
+
const data = (_props$initData = props.initData) == null ? void 0 : _props$initData.resthooks;
|
|
99
|
+
|
|
100
|
+
if ( true && !data) {
|
|
101
|
+
console.error('Rest Hooks init data not found');
|
|
102
|
+
}
|
|
103
|
+
|
|
97
104
|
const nextProps = await next(props);
|
|
98
105
|
return { ...nextProps,
|
|
99
106
|
app: /*#__PURE__*/external_react_default().createElement(core_namespaceObject.CacheProvider, {
|
|
@@ -102,7 +109,7 @@ function restHooksSpout(options = {
|
|
|
102
109
|
__self: this,
|
|
103
110
|
__source: {
|
|
104
111
|
fileName: _jsxFileName,
|
|
105
|
-
lineNumber:
|
|
112
|
+
lineNumber: 27,
|
|
106
113
|
columnNumber: 9
|
|
107
114
|
}
|
|
108
115
|
}, nextProps.app)
|
|
@@ -175,7 +182,12 @@ function JSONSpout({
|
|
|
175
182
|
|
|
176
183
|
function getDatafromDOM(id) {
|
|
177
184
|
const element = document.querySelector(`#${id}`);
|
|
178
|
-
|
|
185
|
+
|
|
186
|
+
if (element && element.text === undefined) {
|
|
187
|
+
console.error(`#${id} is completely empty. This could be due to CSP issues.`);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return element != null && element.text ? JSON.parse(element == null ? void 0 : element.text) : undefined;
|
|
179
191
|
}
|
|
180
192
|
;// CONCATENATED MODULE: ./src/spouts/app.tsx
|
|
181
193
|
const appSpout = app => props => Promise.resolve({ ...props,
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","mappings":";;AAAA;AACA;AACA;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACNA;;ACAA;AAEA;AAIA;AAAA;AACA;;AACA;AAAA;AAAA;AAEA;AACA;;ACNA;AAIA;AACA;AAEA;AACA;AACA;;ACdA;;;ACAA;;;;ACAA;AASA;AAGA;AAAA;AAEA;AACA;AAEA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAHA;AAQA;AACA;;
|
|
1
|
+
{"version":3,"file":"client.js","mappings":";;AAAA;AACA;AACA;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACNA;;ACAA;AAEA;AAIA;AAAA;AACA;;AACA;AAAA;AAAA;AAEA;AACA;;ACNA;AAIA;AACA;AAEA;AACA;AACA;;ACdA;;;ACAA;;;;ACAA;AASA;AAGA;AAAA;AAEA;AAAA;;AACA;;AAEA;AACA;AACA;;AAEA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAHA;AAQA;AACA;;AChCA;;ACAA;;;ACAA;AACA;AACA;AAKA;AAaA;AAGA;AAAA;AACA;AAEA;AAEA;AACA;AACA;AAHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;;AAEA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAJA;AAMA;AACA;;AClDA;AACA;AADA;AAMA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;;AACA;AACA;;AACA;AACA;AAGA;;AACA;AACA;;ACrBA;AAGA;AAAA;;AAEA;;ACLA;AACA;AACA;AACA;AACA","sources":["/home/ntucker/src/anansi/packages/core/webpack/bootstrap","/home/ntucker/src/anansi/packages/core/webpack/runtime/compat get default export","/home/ntucker/src/anansi/packages/core/webpack/runtime/define property getters","/home/ntucker/src/anansi/packages/core/webpack/runtime/hasOwnProperty shorthand","/home/ntucker/src/anansi/packages/core/webpack/runtime/make namespace object","/home/ntucker/src/anansi/packages/core/external commonjs \"react-dom/client\"","/home/ntucker/src/anansi/packages/core/src/floodSpouts.tsx","/home/ntucker/src/anansi/packages/core/src/spouts/document.tsx","/home/ntucker/src/anansi/packages/core/external commonjs \"react\"","/home/ntucker/src/anansi/packages/core/external commonjs \"@rest-hooks/core\"","/home/ntucker/src/anansi/packages/core/src/spouts/restHooks.tsx","/home/ntucker/src/anansi/packages/core/external commonjs \"@anansi/router\"","/home/ntucker/src/anansi/packages/core/external commonjs \"history\"","/home/ntucker/src/anansi/packages/core/src/spouts/router.tsx","/home/ntucker/src/anansi/packages/core/src/spouts/json.tsx","/home/ntucker/src/anansi/packages/core/src/spouts/app.tsx","/home/ntucker/src/anansi/packages/core/src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-dom/client\");","import { hydrateRoot } from 'react-dom/client';\n\nexport default async function floodSpouts(\n spouts: (props: Record<string, unknown>) => Promise<{\n app: JSX.Element;\n }>,\n { rootId = 'anansi-root' }: { rootId?: string } = {},\n) {\n const { app } = await spouts({});\n\n hydrateRoot(document.getElementById(rootId) ?? document, app);\n}\n","import React from 'react';\nimport type { Route } from '@anansi/router';\n\nimport type { ClientSpout } from './types';\n\nexport default function documentSpout(options: {\n head?: React.ReactNode;\n title: string;\n}): ClientSpout {\n return next => async props => {\n const nextProps = await next(props);\n\n return nextProps;\n };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@rest-hooks/core\");","import {\n CacheProvider,\n Manager,\n NetworkManager,\n State,\n} from '@rest-hooks/core';\n\nimport type { ClientSpout } from './types';\n\nexport default function restHooksSpout(\n options: {\n getManagers: () => Manager[];\n } = { getManagers: () => [new NetworkManager()] },\n): ClientSpout<{ initData: Record<string, unknown> }> {\n return next => async props => {\n const data = props.initData?.resthooks as State<unknown>;\n\n if (process.env.NODE_ENV !== 'production' && !data) {\n console.error('Rest Hooks init data not found');\n }\n\n const nextProps = await next(props);\n\n return {\n ...nextProps,\n app: (\n <CacheProvider initialState={data} managers={options.getManagers()}>\n {nextProps.app}\n </CacheProvider>\n ),\n };\n };\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@anansi/router\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"history\");","import { Route, RouteProvider, RouteController } from '@anansi/router';\nimport React from 'react';\nimport { createBrowserHistory } from 'history';\nimport type { Update } from 'history';\n\nimport type { CreateRouter, ClientSpout } from './types';\n\nexport default function routerSpout<ResolveWith>(options: {\n resolveWith?: any;\n useResolveWith: () => ResolveWith;\n createRouter: CreateRouter<ResolveWith>;\n onChange?: (update: Update, callback: () => void | undefined) => void;\n}): ClientSpout<\n Record<string, unknown>,\n {\n matchedRoutes: Route<ResolveWith, any>[];\n } & {\n router: RouteController<Route<ResolveWith, any>>;\n }\n> {\n const createRouteComponent = (\n router: RouteController<Route<ResolveWith, any>>,\n ) =>\n function Router({ children }: { children: React.ReactNode }) {\n const resolveWith = options.useResolveWith();\n\n return (\n <RouteProvider\n router={router}\n resolveWith={resolveWith}\n onChange={options.onChange}\n >\n {children}\n </RouteProvider>\n );\n };\n\n return next => async props => {\n const history = createBrowserHistory();\n const router = options.createRouter(history);\n const matchedRoutes = router.getMatchedRoutes(history.location.pathname);\n\n const nextProps = await next({ ...props, matchedRoutes, router });\n\n const Router = createRouteComponent(router);\n return {\n ...nextProps,\n matchedRoutes,\n router,\n app: <Router>{nextProps.app}</Router>,\n };\n };\n}\n","import type { ClientSpout } from './types';\n\nexport default function JSONSpout({\n id = 'anansi-json',\n}: { id?: string } = {}): ClientSpout<\n Record<string, unknown>,\n { initData: Record<string, unknown> }\n> {\n return next => async props => {\n const initData = getDatafromDOM(id);\n return { ...(await next({ ...props, initData })), initData };\n };\n}\nfunction getDatafromDOM(id: string): Record<string, unknown> {\n const element: HTMLScriptElement | null = document.querySelector(`#${id}`);\n if (element && element.text === undefined) {\n console.error(\n `#${id} is completely empty. This could be due to CSP issues.`,\n );\n }\n return element?.text ? JSON.parse(element?.text) : undefined;\n}\n","const appSpout =\n (app: JSX.Element) =>\n <P extends Record<string, unknown>>(props: P) =>\n Promise.resolve({ ...props, app });\n\nexport default appSpout;\n","export { default as floodSpouts } from './floodSpouts';\nexport { default as documentSpout } from './spouts/document';\nexport { default as restHooksSpout } from './spouts/restHooks';\nexport { default as routerSpout } from './spouts/router';\nexport { default as JSONSpout } from './spouts/json';\nexport { default as appSpout } from './spouts/app';\nexport type { ServerProps } from './spouts/types';\nexport type { ClientSpout as Spout } from './spouts/types';\n"],"names":[],"sourceRoot":""}
|
package/dist/server.js
CHANGED
|
@@ -293,7 +293,7 @@ function DocumentSpout(options) {
|
|
|
293
293
|
|
|
294
294
|
const nextProps = await next(props);
|
|
295
295
|
const publicPath = props.clientManifest.publicPath;
|
|
296
|
-
if (Object.keys((_props$clientManifest = (_props$clientManifest2 = props.clientManifest)
|
|
296
|
+
if (Object.keys((_props$clientManifest = (_props$clientManifest2 = props.clientManifest) == null ? void 0 : _props$clientManifest2.entrypoints) != null ? _props$clientManifest : {}).length < 1 || publicPath === undefined) throw new Error('Manifest missing entries needed'); // TODO: consider using this package for build stats in future:
|
|
297
297
|
// https://github.com/facebook/react/tree/main/packages/react-server-dom-webpack
|
|
298
298
|
|
|
299
299
|
const assetMap = assets => assets.map(({
|
|
@@ -301,14 +301,14 @@ function DocumentSpout(options) {
|
|
|
301
301
|
}) => `${publicPath}${name}`);
|
|
302
302
|
|
|
303
303
|
const assetList = [];
|
|
304
|
-
Object.values((_props$clientManifest3 = (_props$clientManifest4 = props.clientManifest)
|
|
304
|
+
Object.values((_props$clientManifest3 = (_props$clientManifest4 = props.clientManifest) == null ? void 0 : _props$clientManifest4.entrypoints) != null ? _props$clientManifest3 : {}).forEach(entrypoint => {
|
|
305
305
|
var _entrypoint$assets;
|
|
306
306
|
|
|
307
307
|
assetList.push(...assetMap((_entrypoint$assets = entrypoint.assets) != null ? _entrypoint$assets : []));
|
|
308
308
|
});
|
|
309
309
|
new Set(assetMap(Object.values((_props$clientManifest5 = props.clientManifest.namedChunkGroups) != null ? _props$clientManifest5 : {}).filter(({
|
|
310
310
|
name
|
|
311
|
-
}) => nextProps.matchedRoutes.some(route => name
|
|
311
|
+
}) => nextProps.matchedRoutes.some(route => name == null ? void 0 : name.includes(route.name))).flatMap(chunk => {
|
|
312
312
|
var _chunk$assets;
|
|
313
313
|
|
|
314
314
|
return [...((_chunk$assets = chunk.assets) != null ? _chunk$assets : []), // any chunk preloads
|
|
@@ -371,11 +371,7 @@ function createPersistedStore(managers) {
|
|
|
371
371
|
const reducer = (0,core_namespaceObject.createReducer)(controller);
|
|
372
372
|
const enhancer = (0,external_redux_namespaceObject.applyMiddleware)(...(0,core_namespaceObject.applyManager)(managers, controller), external_rest_hooks_namespaceObject.PromiseifyMiddleware);
|
|
373
373
|
const store = (0,external_redux_namespaceObject.createStore)(reducer, core_namespaceObject.initialState, enhancer);
|
|
374
|
-
managers.forEach(manager =>
|
|
375
|
-
var _manager$init;
|
|
376
|
-
|
|
377
|
-
return (_manager$init = manager.init) === null || _manager$init === void 0 ? void 0 : _manager$init.call(manager, store.getState());
|
|
378
|
-
});
|
|
374
|
+
managers.forEach(manager => manager.init == null ? void 0 : manager.init(store.getState()));
|
|
379
375
|
|
|
380
376
|
const selector = state => state;
|
|
381
377
|
|