@atlaspack/logger 2.14.5-canary.38 → 2.14.5-canary.380

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
@@ -1,5 +1,275 @@
1
1
  # @atlaspack/logger
2
2
 
3
+ ## 2.14.42
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`e8ea59b`](https://github.com/atlassian-labs/atlaspack/commit/e8ea59beabb4b4fef647dc9ebea3519b6d56d7b5), [`3753cb1`](https://github.com/atlassian-labs/atlaspack/commit/3753cb1bf9155eaf3a1a8f952886864682738647), [`8826fd0`](https://github.com/atlassian-labs/atlaspack/commit/8826fd02c29c9c67cf0c80da41f424257fbdef93), [`225683f`](https://github.com/atlassian-labs/atlaspack/commit/225683f7c59355da53b7004d2b8596701ce3af41), [`43adda0`](https://github.com/atlassian-labs/atlaspack/commit/43adda06bf3b6a404b54f8ba2a3b810d92e61d75), [`dbcaabb`](https://github.com/atlassian-labs/atlaspack/commit/dbcaabbf15d4fbc8ecd9c0be58cf7b2317eebfc4)]:
8
+ - @atlaspack/rust@3.20.0
9
+ - @atlaspack/types-internal@2.22.7
10
+
11
+ ## 2.14.41
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`fc3adc0`](https://github.com/atlassian-labs/atlaspack/commit/fc3adc098f583e40d6d7687412cac6dde7cbb3f3), [`f33f9c4`](https://github.com/atlassian-labs/atlaspack/commit/f33f9c48dd24b319df352d197e4a83cbb1b053bc), [`53da216`](https://github.com/atlassian-labs/atlaspack/commit/53da216320e19c9b71b001386eb420d05f111db8)]:
16
+ - @atlaspack/rust@3.19.0
17
+ - @atlaspack/types-internal@2.22.6
18
+
19
+ ## 2.14.40
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [[`564fb4f`](https://github.com/atlassian-labs/atlaspack/commit/564fb4fecc2a20bdeb951863a8fac29b618d91b7), [`9df722c`](https://github.com/atlassian-labs/atlaspack/commit/9df722c38b225054883693ba9731344f701767a7), [`34b01ec`](https://github.com/atlassian-labs/atlaspack/commit/34b01ec03e2264bd617be000465821e1ed11eae5), [`6e5fec1`](https://github.com/atlassian-labs/atlaspack/commit/6e5fec1406c53257be7e7fbe06c028beda70fcf1), [`e4e5522`](https://github.com/atlassian-labs/atlaspack/commit/e4e55222422d8c73653d3ea09f1a0d13946345b9)]:
24
+ - @atlaspack/rust@3.18.0
25
+ - @atlaspack/types-internal@2.22.5
26
+
27
+ ## 2.14.39
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [[`7cb8569`](https://github.com/atlassian-labs/atlaspack/commit/7cb85698143e381fcb887173b2bfd15f0aea7918), [`695339e`](https://github.com/atlassian-labs/atlaspack/commit/695339e4fd46df9590013c2ef4de74cb22225927)]:
32
+ - @atlaspack/rust@3.17.0
33
+ - @atlaspack/types-internal@2.22.4
34
+
35
+ ## 2.14.38
36
+
37
+ ### Patch Changes
38
+
39
+ - Updated dependencies [[`515149d`](https://github.com/atlassian-labs/atlaspack/commit/515149d0a0767d844af803efdc611646780ad0fe), [`02cc8b3`](https://github.com/atlassian-labs/atlaspack/commit/02cc8b32c06ca6b51806b33f6f707ca06e55e957), [`02cc8b3`](https://github.com/atlassian-labs/atlaspack/commit/02cc8b32c06ca6b51806b33f6f707ca06e55e957)]:
40
+ - @atlaspack/rust@3.16.0
41
+ - @atlaspack/types-internal@2.22.3
42
+
43
+ ## 2.14.37
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies []:
48
+ - @atlaspack/types-internal@2.22.2
49
+
50
+ ## 2.14.36
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies [[`362a85d`](https://github.com/atlassian-labs/atlaspack/commit/362a85deb9722f769eeb5099bae915f8b858a126), [`c81b368`](https://github.com/atlassian-labs/atlaspack/commit/c81b368db20af701d9e019a11272b138f9cfe080)]:
55
+ - @atlaspack/rust@3.15.0
56
+ - @atlaspack/types-internal@2.22.1
57
+
58
+ ## 2.14.35
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies [[`00fa643`](https://github.com/atlassian-labs/atlaspack/commit/00fa6433202bfd3311479f6314c9ec878a789f2c)]:
63
+ - @atlaspack/types-internal@2.22.0
64
+
65
+ ## 2.14.34
66
+
67
+ ### Patch Changes
68
+
69
+ - Updated dependencies [[`787290a`](https://github.com/atlassian-labs/atlaspack/commit/787290a63b3f781e7af86097201dfdb5a36c8551), [`cbb66a5`](https://github.com/atlassian-labs/atlaspack/commit/cbb66a554f7ad679fd4dfc9e2bf2d5abb859f846), [`7815a93`](https://github.com/atlassian-labs/atlaspack/commit/7815a931b18983c3f34a39990b2f4b8b86855cc6), [`25aa273`](https://github.com/atlassian-labs/atlaspack/commit/25aa2735f4db920960de3d65d3a427775086b7d5), [`9468e16`](https://github.com/atlassian-labs/atlaspack/commit/9468e164e8ca20a5e8f552f5dc203aa3716cb154), [`e55c80c`](https://github.com/atlassian-labs/atlaspack/commit/e55c80cd0ae3cc40356fe063cb7d45fbb9095356)]:
70
+ - @atlaspack/rust@3.14.0
71
+ - @atlaspack/types-internal@2.21.3
72
+
73
+ ## 2.14.33
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [[`96f1d7f`](https://github.com/atlassian-labs/atlaspack/commit/96f1d7f3efef12ce4f5966e34d00b299fcefb4dd), [`91738fd`](https://github.com/atlassian-labs/atlaspack/commit/91738fd77cb6b3b7acc93e799327ec283d27f7c0), [`38f3569`](https://github.com/atlassian-labs/atlaspack/commit/38f3569a7024357c43274666312bc6d024bfe5f9), [`3f6a3b8`](https://github.com/atlassian-labs/atlaspack/commit/3f6a3b8df4589fd4d65c072281c7f33bd37341d6), [`96f1d7f`](https://github.com/atlassian-labs/atlaspack/commit/96f1d7f3efef12ce4f5966e34d00b299fcefb4dd), [`d8024ce`](https://github.com/atlassian-labs/atlaspack/commit/d8024ce5c9ced1a9bc39144c979138be3a12b2fb), [`308e7ff`](https://github.com/atlassian-labs/atlaspack/commit/308e7ff979c05c1ae97fe6b08a65666b53d86cc7), [`d98c992`](https://github.com/atlassian-labs/atlaspack/commit/d98c992a56121a4f9f6a011ced5e103f96fe3999)]:
78
+ - @atlaspack/rust@3.13.0
79
+ - @atlaspack/types-internal@2.21.2
80
+
81
+ ## 2.14.32
82
+
83
+ ### Patch Changes
84
+
85
+ - Updated dependencies [[`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b), [`25fee72`](https://github.com/atlassian-labs/atlaspack/commit/25fee723d2228d0482ec8a8f1b8379ccd2977ce7), [`6fac01d`](https://github.com/atlassian-labs/atlaspack/commit/6fac01dbb1bfc5b971176c1a1c008297bf4b8f91), [`432d571`](https://github.com/atlassian-labs/atlaspack/commit/432d571ea4e9fc67be12304fcafe8c445e844174), [`042cd95`](https://github.com/atlassian-labs/atlaspack/commit/042cd95a32ad38cd02d57aa3344c36d4e7ab8f9c), [`28f5424`](https://github.com/atlassian-labs/atlaspack/commit/28f5424f7e2080dd4fbbeb1bc5314a530197a23e), [`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b), [`5710532`](https://github.com/atlassian-labs/atlaspack/commit/57105322b26ce42af2cbfcc0506cff929e50b630), [`44eb8c3`](https://github.com/atlassian-labs/atlaspack/commit/44eb8c388d3e63f1ef5d835aee7aee5d1bb0620f)]:
86
+ - @atlaspack/rust@3.12.0
87
+ - @atlaspack/types-internal@2.21.1
88
+
89
+ ## 2.14.31
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [[`7dd5bd8`](https://github.com/atlassian-labs/atlaspack/commit/7dd5bd89ff60c7b324347d772729eb4c3314f01e), [`c8a0e51`](https://github.com/atlassian-labs/atlaspack/commit/c8a0e51b1096d038a64644ad02fe68383f58682a), [`8eb84ee`](https://github.com/atlassian-labs/atlaspack/commit/8eb84ee61a42bfe87c58079b610802b07a6a13e4), [`71900f3`](https://github.com/atlassian-labs/atlaspack/commit/71900f3508d53c3882ca8ea71501ba3069687d4e), [`73168c2`](https://github.com/atlassian-labs/atlaspack/commit/73168c275a5d9abff9907bcf536b340bca1ed5f0), [`617a318`](https://github.com/atlassian-labs/atlaspack/commit/617a318ddc9419b38360257353fec50b9051ee13), [`2c4953e`](https://github.com/atlassian-labs/atlaspack/commit/2c4953e20dc1a6b012792081667aefeb9340505e), [`3fe7d4e`](https://github.com/atlassian-labs/atlaspack/commit/3fe7d4e821bee162fcbbaf9278b107a5eead944f)]:
94
+ - @atlaspack/rust@3.11.0
95
+ - @atlaspack/types-internal@2.21.0
96
+
97
+ ## 2.14.30
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [[`ec3abe4`](https://github.com/atlassian-labs/atlaspack/commit/ec3abe4dffc98560a850fd2f71fb566577e6c99c), [`c7fe3f7`](https://github.com/atlassian-labs/atlaspack/commit/c7fe3f76f247e9e20299e205e2df0a16c418eaf2), [`cfb4707`](https://github.com/atlassian-labs/atlaspack/commit/cfb4707087498e4fa4dcf10753fe984a248d196b), [`1468695`](https://github.com/atlassian-labs/atlaspack/commit/1468695fc0c9d06f060a6da9e9b0e154f11dff34), [`f31b041`](https://github.com/atlassian-labs/atlaspack/commit/f31b04107e9077c9946aadb99f6f91bb69703bb7), [`8180981`](https://github.com/atlassian-labs/atlaspack/commit/8180981be14c00f9570adb70d3f350bd91d6ec0a), [`ae77e74`](https://github.com/atlassian-labs/atlaspack/commit/ae77e7452a466b43b3fa5bed24d4ba26345ed765), [`f0a496f`](https://github.com/atlassian-labs/atlaspack/commit/f0a496f70fc8652e090cf1b3f6260e8cfbb796e2), [`540f253`](https://github.com/atlassian-labs/atlaspack/commit/540f253dfdcd1a5caebbdc0b197319d439404aae)]:
102
+ - @atlaspack/rust@3.10.0
103
+ - @atlaspack/types-internal@2.20.8
104
+
105
+ ## 2.14.29
106
+
107
+ ### Patch Changes
108
+
109
+ - Updated dependencies [[`339b600`](https://github.com/atlassian-labs/atlaspack/commit/339b60095d755742cea50f811d08ccc44a4ae521), [`373ee2d`](https://github.com/atlassian-labs/atlaspack/commit/373ee2d3b5cc315df1e90e647619f915892e2b87)]:
110
+ - @atlaspack/rust@3.9.1
111
+ - @atlaspack/types-internal@2.20.7
112
+
113
+ ## 2.14.28
114
+
115
+ ### Patch Changes
116
+
117
+ - Updated dependencies [[`02f6aa1`](https://github.com/atlassian-labs/atlaspack/commit/02f6aa1906953fc184d2b49c905c2ef815cb878d), [`58527ee`](https://github.com/atlassian-labs/atlaspack/commit/58527eec15c1aebaaadbeb63586f3082c16beae3), [`525898e`](https://github.com/atlassian-labs/atlaspack/commit/525898e33cc229a4bc938ae853732be36d20c01a), [`cfb39a0`](https://github.com/atlassian-labs/atlaspack/commit/cfb39a0d729eb620cf2ca1611750a2bf7a080d08), [`d0c7bea`](https://github.com/atlassian-labs/atlaspack/commit/d0c7bea04458255b4c5d4299600e734b5f919fe1), [`1086c6a`](https://github.com/atlassian-labs/atlaspack/commit/1086c6a2c59271b63b3fb78e6acdb9d3a0dbf354), [`9cd9521`](https://github.com/atlassian-labs/atlaspack/commit/9cd9521978f783046e2ae4ce78f2de7aeb07d073)]:
118
+ - @atlaspack/rust@3.9.0
119
+ - @atlaspack/types-internal@2.20.6
120
+
121
+ ## 2.14.27
122
+
123
+ ### Patch Changes
124
+
125
+ - Updated dependencies [[`79a7e22`](https://github.com/atlassian-labs/atlaspack/commit/79a7e22ef119891a2f4180a9d3cc66b38dd52092), [`c372f3f`](https://github.com/atlassian-labs/atlaspack/commit/c372f3fd6fce8200d5cf47f41bc7895c6cbb5558), [`17dfea9`](https://github.com/atlassian-labs/atlaspack/commit/17dfea9e9f3169807808520df9c09ebf70dc8b10), [`27fd73f`](https://github.com/atlassian-labs/atlaspack/commit/27fd73fa07d358653f1be6f2d15d72dc5d8fc2fd), [`3091fa3`](https://github.com/atlassian-labs/atlaspack/commit/3091fa36425ecffe3938e55247a035b08cda37a2)]:
126
+ - @atlaspack/rust@3.8.3
127
+ - @atlaspack/types-internal@2.20.5
128
+
129
+ ## 2.14.26
130
+
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies []:
134
+ - @atlaspack/types-internal@2.20.4
135
+
136
+ ## 2.14.25
137
+
138
+ ### Patch Changes
139
+
140
+ - Updated dependencies []:
141
+ - @atlaspack/types-internal@2.20.3
142
+
143
+ ## 2.14.24
144
+
145
+ ### Patch Changes
146
+
147
+ - Updated dependencies [[`0207171`](https://github.com/atlassian-labs/atlaspack/commit/0207171e59e985c51e105aec2e0a99de174374bd), [`bbe4e28`](https://github.com/atlassian-labs/atlaspack/commit/bbe4e28c89e5e9284bd730075d4d6f2a3cb37b21)]:
148
+ - @atlaspack/rust@3.8.2
149
+ - @atlaspack/types-internal@2.20.2
150
+
151
+ ## 2.14.23
152
+
153
+ ### Patch Changes
154
+
155
+ - [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
156
+
157
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922), [`686a398`](https://github.com/atlassian-labs/atlaspack/commit/686a398faa1f9e19cbf9274add2c46e246bafba8)]:
158
+ - @atlaspack/diagnostic@2.14.4
159
+ - @atlaspack/rust@3.8.1
160
+ - @atlaspack/types-internal@2.20.1
161
+ - @atlaspack/events@2.14.4
162
+
163
+ ## 2.14.22
164
+
165
+ ### Patch Changes
166
+
167
+ - Updated dependencies [[`eedcbc4`](https://github.com/atlassian-labs/atlaspack/commit/eedcbc408fc1e86a2a8e25f1a41c57146d8529e1), [`5a0363f`](https://github.com/atlassian-labs/atlaspack/commit/5a0363f1086e81068959b87e92064bed5a11a9b4), [`038e87a`](https://github.com/atlassian-labs/atlaspack/commit/038e87a7858d39556d59d3a2d17db534d45f62c6), [`f6532d7`](https://github.com/atlassian-labs/atlaspack/commit/f6532d7a4f7f007bd4e5e36af04dd466f0b9f572), [`0684997`](https://github.com/atlassian-labs/atlaspack/commit/0684997c127a6204af1376b36e556fddd1ba5557), [`602f8ed`](https://github.com/atlassian-labs/atlaspack/commit/602f8ed9d8381301df8b2cc82c1d5cf6f2f94fec)]:
168
+ - @atlaspack/types-internal@2.20.0
169
+ - @atlaspack/rust@3.8.0
170
+
171
+ ## 2.14.21
172
+
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies [[`53dd47b`](https://github.com/atlassian-labs/atlaspack/commit/53dd47bd6d23cd47f87297347f03a609ab38a03d)]:
176
+ - @atlaspack/rust@3.7.0
177
+ - @atlaspack/types-internal@2.19.5
178
+
179
+ ## 2.14.20
180
+
181
+ ### Patch Changes
182
+
183
+ - Updated dependencies []:
184
+ - @atlaspack/types-internal@2.19.4
185
+
186
+ ## 2.14.19
187
+
188
+ ### Patch Changes
189
+
190
+ - Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
191
+ - @atlaspack/rust@3.6.2
192
+ - @atlaspack/types-internal@2.19.3
193
+
194
+ ## 2.14.18
195
+
196
+ ### Patch Changes
197
+
198
+ - [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
199
+
200
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
201
+ - @atlaspack/types-internal@2.19.2
202
+ - @atlaspack/diagnostic@2.14.3
203
+ - @atlaspack/events@2.14.3
204
+ - @atlaspack/rust@3.6.1
205
+
206
+ ## 2.14.17
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies []:
211
+ - @atlaspack/types-internal@2.19.1
212
+
213
+ ## 2.14.16
214
+
215
+ ### Patch Changes
216
+
217
+ - Updated dependencies [[`ad26146`](https://github.com/atlassian-labs/atlaspack/commit/ad26146f13b4c1cc65d4a0f9c67060b90ef14ff3), [`f1b48e7`](https://github.com/atlassian-labs/atlaspack/commit/f1b48e7a04e005cef0f36a3e692087a9ecdb6f7a), [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45)]:
218
+ - @atlaspack/rust@3.6.0
219
+ - @atlaspack/types-internal@2.19.0
220
+
221
+ ## 2.14.15
222
+
223
+ ### Patch Changes
224
+
225
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
226
+ - @atlaspack/rust@3.5.0
227
+
228
+ ## 2.14.14
229
+
230
+ ### Patch Changes
231
+
232
+ - [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
233
+
234
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
235
+ - @atlaspack/diagnostic@2.14.2
236
+ - @atlaspack/events@2.14.2
237
+ - @atlaspack/rust@3.4.2
238
+
239
+ ## 2.14.13
240
+
241
+ ### Patch Changes
242
+
243
+ - Updated dependencies [[`becf977`](https://github.com/atlassian-labs/atlaspack/commit/becf977f625d5ee46dae3d4c679f173bf5f40cc0), [`f0f7c71`](https://github.com/atlassian-labs/atlaspack/commit/f0f7c7168a1d3d18c6f30d2daed611275692b7c5)]:
244
+ - @atlaspack/rust@3.4.1
245
+
246
+ ## 2.14.12
247
+
248
+ ### Patch Changes
249
+
250
+ - Updated dependencies [[`c75bf55`](https://github.com/atlassian-labs/atlaspack/commit/c75bf553fff4decc285b5fd499a275853b18f8f2)]:
251
+ - @atlaspack/rust@3.4.0
252
+
253
+ ## 2.14.11
254
+
255
+ ### Patch Changes
256
+
257
+ - [#650](https://github.com/atlassian-labs/atlaspack/pull/650) [`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb) Thanks [@alshdavid](https://github.com/alshdavid)! - Remove package.json#exports
258
+
259
+ ## 2.14.10
260
+
261
+ ### Patch Changes
262
+
263
+ - Updated dependencies [[`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
264
+ - @atlaspack/rust@3.3.5
265
+
266
+ ## 2.14.9
267
+
268
+ ### Patch Changes
269
+
270
+ - Updated dependencies [[`124b7ff`](https://github.com/atlassian-labs/atlaspack/commit/124b7fff44f71aac9fbad289a9a9509b3dfc9aaa), [`e052521`](https://github.com/atlassian-labs/atlaspack/commit/e0525210850ed1606146eb86991049cf567c5dec), [`15c6d70`](https://github.com/atlassian-labs/atlaspack/commit/15c6d7000bd89da876bc590aa75b17a619a41896), [`e4d966c`](https://github.com/atlassian-labs/atlaspack/commit/e4d966c3c9c4292c5013372ae65b10d19d4bacc6), [`42a775d`](https://github.com/atlassian-labs/atlaspack/commit/42a775de8eec638ad188f3271964170d8c04d84b), [`29c2f10`](https://github.com/atlassian-labs/atlaspack/commit/29c2f106de9679adfb5afa04e1910471dc65a427), [`1ef91fc`](https://github.com/atlassian-labs/atlaspack/commit/1ef91fcc863fdd2831511937083dbbc1263b3d9d)]:
271
+ - @atlaspack/rust@3.3.4
272
+
3
273
  ## 2.14.8
4
274
 
5
275
  ### Patch Changes
package/dist/Logger.js ADDED
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTERNAL_ORIGINAL_CONSOLE = exports.PluginLogger = exports.instrumentAsync = exports.instrument = void 0;
4
+ exports.patchConsole = patchConsole;
5
+ exports.unpatchConsole = unpatchConsole;
6
+ const events_1 = require("@atlaspack/events");
7
+ const util_1 = require("util");
8
+ const diagnostic_1 = require("@atlaspack/diagnostic");
9
+ var tracer_1 = require("./tracer");
10
+ Object.defineProperty(exports, "instrument", { enumerable: true, get: function () { return tracer_1.instrument; } });
11
+ Object.defineProperty(exports, "instrumentAsync", { enumerable: true, get: function () { return tracer_1.instrumentAsync; } });
12
+ class Logger {
13
+ constructor() {
14
+ this.logEmitter = new events_1.ValueEmitter();
15
+ }
16
+ onLog(cb) {
17
+ return this.logEmitter.addListener(cb);
18
+ }
19
+ verbose(diagnostic) {
20
+ this.logEmitter.emit({
21
+ type: 'log',
22
+ level: 'verbose',
23
+ diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],
24
+ });
25
+ }
26
+ info(diagnostic) {
27
+ this.log(diagnostic);
28
+ }
29
+ log(diagnostic) {
30
+ this.logEmitter.emit({
31
+ type: 'log',
32
+ level: 'info',
33
+ diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],
34
+ });
35
+ }
36
+ warn(diagnostic) {
37
+ this.logEmitter.emit({
38
+ type: 'log',
39
+ level: 'warn',
40
+ diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],
41
+ });
42
+ }
43
+ error(input, realOrigin) {
44
+ let diagnostic = (0, diagnostic_1.anyToDiagnostic)(input);
45
+ if (typeof realOrigin === 'string') {
46
+ diagnostic = Array.isArray(diagnostic)
47
+ ? diagnostic.map((d) => {
48
+ return { ...d, origin: realOrigin };
49
+ })
50
+ : {
51
+ ...diagnostic,
52
+ origin: realOrigin,
53
+ };
54
+ }
55
+ this.logEmitter.emit({
56
+ type: 'log',
57
+ level: 'error',
58
+ diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic],
59
+ });
60
+ }
61
+ progress(message) {
62
+ this.logEmitter.emit({
63
+ type: 'log',
64
+ level: 'progress',
65
+ message,
66
+ });
67
+ }
68
+ }
69
+ const logger = new Logger();
70
+ exports.default = logger;
71
+ class PluginLogger {
72
+ /** @private */
73
+ constructor(opts) {
74
+ this.origin = opts.origin;
75
+ }
76
+ /** @private */
77
+ updateOrigin(diagnostic) {
78
+ return Array.isArray(diagnostic)
79
+ ? diagnostic.map((d) => {
80
+ return { ...d, origin: this.origin };
81
+ })
82
+ : { ...diagnostic, origin: this.origin };
83
+ }
84
+ verbose(diagnostic) {
85
+ logger.verbose(this.updateOrigin(diagnostic));
86
+ }
87
+ info(diagnostic) {
88
+ logger.info(this.updateOrigin(diagnostic));
89
+ }
90
+ log(diagnostic) {
91
+ logger.log(this.updateOrigin(diagnostic));
92
+ }
93
+ warn(diagnostic) {
94
+ logger.warn(this.updateOrigin(diagnostic));
95
+ }
96
+ error(input) {
97
+ logger.error(input, this.origin);
98
+ }
99
+ /** @private */
100
+ progress(message) {
101
+ logger.progress(message);
102
+ }
103
+ }
104
+ exports.PluginLogger = PluginLogger;
105
+ /** @private */
106
+ exports.INTERNAL_ORIGINAL_CONSOLE = { ...console };
107
+ let consolePatched = false;
108
+ /**
109
+ * Patch `console` APIs within workers to forward their messages to the Logger
110
+ * at the appropriate levels.
111
+ * @private
112
+ */
113
+ function patchConsole() {
114
+ // Skip if console is already patched...
115
+ if (consolePatched)
116
+ return;
117
+ /* eslint-disable no-console */
118
+ console.log = console.info = (...messages) => {
119
+ logger.info(messagesToDiagnostic(messages));
120
+ };
121
+ console.debug = (...messages) => {
122
+ // TODO: dedicated debug level?
123
+ logger.verbose(messagesToDiagnostic(messages));
124
+ };
125
+ console.warn = (...messages) => {
126
+ logger.warn(messagesToDiagnostic(messages));
127
+ };
128
+ console.error = (...messages) => {
129
+ logger.error(messagesToDiagnostic(messages));
130
+ };
131
+ /* eslint-enable no-console */
132
+ consolePatched = true;
133
+ }
134
+ /** @private */
135
+ function unpatchConsole() {
136
+ // Skip if console isn't patched...
137
+ if (!consolePatched)
138
+ return;
139
+ /* eslint-disable no-console */
140
+ console.log = exports.INTERNAL_ORIGINAL_CONSOLE.log;
141
+ console.info = exports.INTERNAL_ORIGINAL_CONSOLE.info;
142
+ console.debug = exports.INTERNAL_ORIGINAL_CONSOLE.debug;
143
+ console.warn = exports.INTERNAL_ORIGINAL_CONSOLE.warn;
144
+ console.error = exports.INTERNAL_ORIGINAL_CONSOLE.error;
145
+ /* eslint-enable no-console */
146
+ consolePatched = false;
147
+ }
148
+ function messagesToDiagnostic(messages) {
149
+ if (messages.length === 1 && messages[0] instanceof Error) {
150
+ let error = messages[0];
151
+ let diagnostic = (0, diagnostic_1.errorToDiagnostic)(error);
152
+ if (Array.isArray(diagnostic)) {
153
+ return diagnostic.map((d) => {
154
+ return {
155
+ ...d,
156
+ skipFormatting: true,
157
+ };
158
+ });
159
+ }
160
+ else {
161
+ return {
162
+ ...diagnostic,
163
+ skipFormatting: true,
164
+ };
165
+ }
166
+ }
167
+ else {
168
+ return {
169
+ message: joinLogMessages(messages),
170
+ origin: 'console',
171
+ skipFormatting: true,
172
+ };
173
+ }
174
+ }
175
+ function joinLogMessages(messages) {
176
+ return messages
177
+ .map((m) => (typeof m === 'string' ? m : (0, util_1.inspect)(m)))
178
+ .join(' ');
179
+ }
package/dist/tracer.js ADDED
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tracer = void 0;
4
+ exports.instrument = instrument;
5
+ exports.instrumentAsync = instrumentAsync;
6
+ const rust_1 = require("@atlaspack/rust");
7
+ exports.tracer = new rust_1.AtlaspackTracer();
8
+ function instrument(label, fn) {
9
+ const span = exports.tracer.enter(label);
10
+ try {
11
+ const result = fn();
12
+ return result;
13
+ }
14
+ finally {
15
+ exports.tracer.exit(span);
16
+ }
17
+ }
18
+ async function instrumentAsync(label, fn) {
19
+ const span = exports.tracer.enter(label);
20
+ let result;
21
+ try {
22
+ result = await fn();
23
+ }
24
+ finally {
25
+ exports.tracer.exit(span);
26
+ }
27
+ return result;
28
+ }
package/lib/Logger.js CHANGED
@@ -41,12 +41,12 @@ function _diagnostic() {
41
41
  }
42
42
  var _tracer = require("./tracer");
43
43
  class Logger {
44
- #logEmitter /*: ValueEmitter<LogEvent> */ = new (_events().ValueEmitter)();
44
+ logEmitter = new (_events().ValueEmitter)();
45
45
  onLog(cb) {
46
- return this.#logEmitter.addListener(cb);
46
+ return this.logEmitter.addListener(cb);
47
47
  }
48
48
  verbose(diagnostic) {
49
- this.#logEmitter.emit({
49
+ this.logEmitter.emit({
50
50
  type: 'log',
51
51
  level: 'verbose',
52
52
  diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic]
@@ -56,14 +56,14 @@ class Logger {
56
56
  this.log(diagnostic);
57
57
  }
58
58
  log(diagnostic) {
59
- this.#logEmitter.emit({
59
+ this.logEmitter.emit({
60
60
  type: 'log',
61
61
  level: 'info',
62
62
  diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic]
63
63
  });
64
64
  }
65
65
  warn(diagnostic) {
66
- this.#logEmitter.emit({
66
+ this.logEmitter.emit({
67
67
  type: 'log',
68
68
  level: 'warn',
69
69
  diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic]
@@ -82,14 +82,14 @@ class Logger {
82
82
  origin: realOrigin
83
83
  };
84
84
  }
85
- this.#logEmitter.emit({
85
+ this.logEmitter.emit({
86
86
  type: 'log',
87
87
  level: 'error',
88
88
  diagnostics: Array.isArray(diagnostic) ? diagnostic : [diagnostic]
89
89
  });
90
90
  }
91
91
  progress(message) {
92
- this.#logEmitter.emit({
92
+ this.logEmitter.emit({
93
93
  type: 'log',
94
94
  level: 'progress',
95
95
  message
@@ -158,23 +158,16 @@ function patchConsole() {
158
158
  if (consolePatched) return;
159
159
 
160
160
  /* eslint-disable no-console */
161
- // $FlowFixMe
162
161
  console.log = console.info = (...messages) => {
163
162
  logger.info(messagesToDiagnostic(messages));
164
163
  };
165
-
166
- // $FlowFixMe
167
164
  console.debug = (...messages) => {
168
165
  // TODO: dedicated debug level?
169
166
  logger.verbose(messagesToDiagnostic(messages));
170
167
  };
171
-
172
- // $FlowFixMe
173
168
  console.warn = (...messages) => {
174
169
  logger.warn(messagesToDiagnostic(messages));
175
170
  };
176
-
177
- // $FlowFixMe
178
171
  console.error = (...messages) => {
179
172
  logger.error(messagesToDiagnostic(messages));
180
173
  };
@@ -189,19 +182,10 @@ function unpatchConsole() {
189
182
  if (!consolePatched) return;
190
183
 
191
184
  /* eslint-disable no-console */
192
- // $FlowFixMe
193
185
  console.log = INTERNAL_ORIGINAL_CONSOLE.log;
194
-
195
- // $FlowFixMe
196
186
  console.info = INTERNAL_ORIGINAL_CONSOLE.info;
197
-
198
- // $FlowFixMe
199
187
  console.debug = INTERNAL_ORIGINAL_CONSOLE.debug;
200
-
201
- // $FlowFixMe
202
188
  console.warn = INTERNAL_ORIGINAL_CONSOLE.warn;
203
-
204
- // $FlowFixMe
205
189
  console.error = INTERNAL_ORIGINAL_CONSOLE.error;
206
190
 
207
191
  /* eslint-enable no-console */