@axe-core/watcher 4.3.0-next.c9252381 → 4.3.0-next.cfe6a42e
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/EXTENSION-LICENSES-3RD-PARTY.md +3 -425
- package/dist/utils/sync-fetch-worker.mjs +65 -1
- package/dist/utils/sync-fetch.d.ts +32 -0
- package/dist/utils/sync-fetch.js +29 -11
- package/dist/utils/sync-fetch.js.map +1 -1
- package/dist/utils/writeVariables.d.ts +4 -1
- package/dist/utils/writeVariables.js +2 -1
- package/dist/utils/writeVariables.js.map +1 -1
- package/extension/axe.js +1 -1
- package/extension/background.js +1 -0
- package/extension/background.js.LICENSE.txt +1 -0
- package/extension/content.js +1 -1
- package/extension/gather-internals.js +1 -0
- package/extension/manifest.json +5 -1
- package/package.json +76 -18
|
@@ -1,427 +1,5 @@
|
|
|
1
1
|
# 3rd Party Licenses
|
|
2
2
|
|
|
3
|
-
## @datadog/browser-core
|
|
4
|
-
|
|
5
|
-
**Version**: 4.48.2
|
|
6
|
-
|
|
7
|
-
**License**: Apache-2.0
|
|
8
|
-
|
|
9
|
-
```txt
|
|
10
|
-
Apache License
|
|
11
|
-
Version 2.0, January 2004
|
|
12
|
-
http://www.apache.org/licenses/
|
|
13
|
-
|
|
14
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
15
|
-
|
|
16
|
-
1. Definitions.
|
|
17
|
-
|
|
18
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
19
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
20
|
-
|
|
21
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
22
|
-
the copyright owner that is granting the License.
|
|
23
|
-
|
|
24
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
25
|
-
other entities that control, are controlled by, or are under common
|
|
26
|
-
control with that entity. For the purposes of this definition,
|
|
27
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
28
|
-
direction or management of such entity, whether by contract or
|
|
29
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
30
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
31
|
-
|
|
32
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
33
|
-
exercising permissions granted by this License.
|
|
34
|
-
|
|
35
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
36
|
-
including but not limited to software source code, documentation
|
|
37
|
-
source, and configuration files.
|
|
38
|
-
|
|
39
|
-
"Object" form shall mean any form resulting from mechanical
|
|
40
|
-
transformation or translation of a Source form, including but
|
|
41
|
-
not limited to compiled object code, generated documentation,
|
|
42
|
-
and conversions to other media types.
|
|
43
|
-
|
|
44
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
45
|
-
Object form, made available under the License, as indicated by a
|
|
46
|
-
copyright notice that is included in or attached to the work
|
|
47
|
-
(an example is provided in the Appendix below).
|
|
48
|
-
|
|
49
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
50
|
-
form, that is based on (or derived from) the Work and for which the
|
|
51
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
52
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
53
|
-
of this License, Derivative Works shall not include works that remain
|
|
54
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
55
|
-
the Work and Derivative Works thereof.
|
|
56
|
-
|
|
57
|
-
"Contribution" shall mean any work of authorship, including
|
|
58
|
-
the original version of the Work and any modifications or additions
|
|
59
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
60
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
61
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
62
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
63
|
-
means any form of electronic, verbal, or written communication sent
|
|
64
|
-
to the Licensor or its representatives, including but not limited to
|
|
65
|
-
communication on electronic mailing lists, source code control systems,
|
|
66
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
67
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
68
|
-
excluding communication that is conspicuously marked or otherwise
|
|
69
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
70
|
-
|
|
71
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
72
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
73
|
-
subsequently incorporated within the Work.
|
|
74
|
-
|
|
75
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
76
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
79
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
80
|
-
Work and such Derivative Works in Source or Object form.
|
|
81
|
-
|
|
82
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
83
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
84
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
85
|
-
(except as stated in this section) patent license to make, have made,
|
|
86
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
87
|
-
where such license applies only to those patent claims licensable
|
|
88
|
-
by such Contributor that are necessarily infringed by their
|
|
89
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
90
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
91
|
-
institute patent litigation against any entity (including a
|
|
92
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
93
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
94
|
-
or contributory patent infringement, then any patent licenses
|
|
95
|
-
granted to You under this License for that Work shall terminate
|
|
96
|
-
as of the date such litigation is filed.
|
|
97
|
-
|
|
98
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
99
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
100
|
-
modifications, and in Source or Object form, provided that You
|
|
101
|
-
meet the following conditions:
|
|
102
|
-
|
|
103
|
-
(a) You must give any other recipients of the Work or
|
|
104
|
-
Derivative Works a copy of this License; and
|
|
105
|
-
|
|
106
|
-
(b) You must cause any modified files to carry prominent notices
|
|
107
|
-
stating that You changed the files; and
|
|
108
|
-
|
|
109
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
110
|
-
that You distribute, all copyright, patent, trademark, and
|
|
111
|
-
attribution notices from the Source form of the Work,
|
|
112
|
-
excluding those notices that do not pertain to any part of
|
|
113
|
-
the Derivative Works; and
|
|
114
|
-
|
|
115
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
116
|
-
distribution, then any Derivative Works that You distribute must
|
|
117
|
-
include a readable copy of the attribution notices contained
|
|
118
|
-
within such NOTICE file, excluding those notices that do not
|
|
119
|
-
pertain to any part of the Derivative Works, in at least one
|
|
120
|
-
of the following places: within a NOTICE text file distributed
|
|
121
|
-
as part of the Derivative Works; within the Source form or
|
|
122
|
-
documentation, if provided along with the Derivative Works; or,
|
|
123
|
-
within a display generated by the Derivative Works, if and
|
|
124
|
-
wherever such third-party notices normally appear. The contents
|
|
125
|
-
of the NOTICE file are for informational purposes only and
|
|
126
|
-
do not modify the License. You may add Your own attribution
|
|
127
|
-
notices within Derivative Works that You distribute, alongside
|
|
128
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
129
|
-
that such additional attribution notices cannot be construed
|
|
130
|
-
as modifying the License.
|
|
131
|
-
|
|
132
|
-
You may add Your own copyright statement to Your modifications and
|
|
133
|
-
may provide additional or different license terms and conditions
|
|
134
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
135
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
136
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
137
|
-
the conditions stated in this License.
|
|
138
|
-
|
|
139
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
140
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
141
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
142
|
-
this License, without any additional terms or conditions.
|
|
143
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
144
|
-
the terms of any separate license agreement you may have executed
|
|
145
|
-
with Licensor regarding such Contributions.
|
|
146
|
-
|
|
147
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
148
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
149
|
-
except as required for reasonable and customary use in describing the
|
|
150
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
151
|
-
|
|
152
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
153
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
154
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
155
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
156
|
-
implied, including, without limitation, any warranties or conditions
|
|
157
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
158
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
159
|
-
appropriateness of using or redistributing the Work and assume any
|
|
160
|
-
risks associated with Your exercise of permissions under this License.
|
|
161
|
-
|
|
162
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
163
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
164
|
-
unless required by applicable law (such as deliberate and grossly
|
|
165
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
166
|
-
liable to You for damages, including any direct, indirect, special,
|
|
167
|
-
incidental, or consequential damages of any character arising as a
|
|
168
|
-
result of this License or out of the use or inability to use the
|
|
169
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
170
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
171
|
-
other commercial damages or losses), even if such Contributor
|
|
172
|
-
has been advised of the possibility of such damages.
|
|
173
|
-
|
|
174
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
175
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
176
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
177
|
-
or other liability obligations and/or rights consistent with this
|
|
178
|
-
License. However, in accepting such obligations, You may act only
|
|
179
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
180
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
181
|
-
defend, and hold each Contributor harmless for any liability
|
|
182
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
183
|
-
of your accepting any such warranty or additional liability.
|
|
184
|
-
|
|
185
|
-
END OF TERMS AND CONDITIONS
|
|
186
|
-
|
|
187
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
188
|
-
|
|
189
|
-
To apply the Apache License to your work, attach the following
|
|
190
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
191
|
-
replaced with your own identifying information. (Don't include
|
|
192
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
193
|
-
comment syntax for the file format. We also recommend that a
|
|
194
|
-
file or class name and description of purpose be included on the
|
|
195
|
-
same "printed page" as the copyright notice for easier
|
|
196
|
-
identification within third-party archives.
|
|
197
|
-
|
|
198
|
-
Copyright 2019-Present Datadog, Inc.
|
|
199
|
-
|
|
200
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
201
|
-
you may not use this file except in compliance with the License.
|
|
202
|
-
You may obtain a copy of the License at
|
|
203
|
-
|
|
204
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
205
|
-
|
|
206
|
-
Unless required by applicable law or agreed to in writing, software
|
|
207
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
208
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
|
-
See the License for the specific language governing permissions and
|
|
210
|
-
limitations under the License.
|
|
211
|
-
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
## @datadog/browser-logs
|
|
215
|
-
|
|
216
|
-
**Version**: 4.48.2
|
|
217
|
-
|
|
218
|
-
**License**: Apache-2.0
|
|
219
|
-
|
|
220
|
-
```txt
|
|
221
|
-
Apache License
|
|
222
|
-
Version 2.0, January 2004
|
|
223
|
-
http://www.apache.org/licenses/
|
|
224
|
-
|
|
225
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
226
|
-
|
|
227
|
-
1. Definitions.
|
|
228
|
-
|
|
229
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
230
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
231
|
-
|
|
232
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
233
|
-
the copyright owner that is granting the License.
|
|
234
|
-
|
|
235
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
236
|
-
other entities that control, are controlled by, or are under common
|
|
237
|
-
control with that entity. For the purposes of this definition,
|
|
238
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
239
|
-
direction or management of such entity, whether by contract or
|
|
240
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
241
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
242
|
-
|
|
243
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
244
|
-
exercising permissions granted by this License.
|
|
245
|
-
|
|
246
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
247
|
-
including but not limited to software source code, documentation
|
|
248
|
-
source, and configuration files.
|
|
249
|
-
|
|
250
|
-
"Object" form shall mean any form resulting from mechanical
|
|
251
|
-
transformation or translation of a Source form, including but
|
|
252
|
-
not limited to compiled object code, generated documentation,
|
|
253
|
-
and conversions to other media types.
|
|
254
|
-
|
|
255
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
256
|
-
Object form, made available under the License, as indicated by a
|
|
257
|
-
copyright notice that is included in or attached to the work
|
|
258
|
-
(an example is provided in the Appendix below).
|
|
259
|
-
|
|
260
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
261
|
-
form, that is based on (or derived from) the Work and for which the
|
|
262
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
263
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
264
|
-
of this License, Derivative Works shall not include works that remain
|
|
265
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
266
|
-
the Work and Derivative Works thereof.
|
|
267
|
-
|
|
268
|
-
"Contribution" shall mean any work of authorship, including
|
|
269
|
-
the original version of the Work and any modifications or additions
|
|
270
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
271
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
272
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
273
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
274
|
-
means any form of electronic, verbal, or written communication sent
|
|
275
|
-
to the Licensor or its representatives, including but not limited to
|
|
276
|
-
communication on electronic mailing lists, source code control systems,
|
|
277
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
278
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
279
|
-
excluding communication that is conspicuously marked or otherwise
|
|
280
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
281
|
-
|
|
282
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
283
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
284
|
-
subsequently incorporated within the Work.
|
|
285
|
-
|
|
286
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
287
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
288
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
289
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
290
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
291
|
-
Work and such Derivative Works in Source or Object form.
|
|
292
|
-
|
|
293
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
294
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
295
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
296
|
-
(except as stated in this section) patent license to make, have made,
|
|
297
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
298
|
-
where such license applies only to those patent claims licensable
|
|
299
|
-
by such Contributor that are necessarily infringed by their
|
|
300
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
301
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
302
|
-
institute patent litigation against any entity (including a
|
|
303
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
304
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
305
|
-
or contributory patent infringement, then any patent licenses
|
|
306
|
-
granted to You under this License for that Work shall terminate
|
|
307
|
-
as of the date such litigation is filed.
|
|
308
|
-
|
|
309
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
310
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
311
|
-
modifications, and in Source or Object form, provided that You
|
|
312
|
-
meet the following conditions:
|
|
313
|
-
|
|
314
|
-
(a) You must give any other recipients of the Work or
|
|
315
|
-
Derivative Works a copy of this License; and
|
|
316
|
-
|
|
317
|
-
(b) You must cause any modified files to carry prominent notices
|
|
318
|
-
stating that You changed the files; and
|
|
319
|
-
|
|
320
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
321
|
-
that You distribute, all copyright, patent, trademark, and
|
|
322
|
-
attribution notices from the Source form of the Work,
|
|
323
|
-
excluding those notices that do not pertain to any part of
|
|
324
|
-
the Derivative Works; and
|
|
325
|
-
|
|
326
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
327
|
-
distribution, then any Derivative Works that You distribute must
|
|
328
|
-
include a readable copy of the attribution notices contained
|
|
329
|
-
within such NOTICE file, excluding those notices that do not
|
|
330
|
-
pertain to any part of the Derivative Works, in at least one
|
|
331
|
-
of the following places: within a NOTICE text file distributed
|
|
332
|
-
as part of the Derivative Works; within the Source form or
|
|
333
|
-
documentation, if provided along with the Derivative Works; or,
|
|
334
|
-
within a display generated by the Derivative Works, if and
|
|
335
|
-
wherever such third-party notices normally appear. The contents
|
|
336
|
-
of the NOTICE file are for informational purposes only and
|
|
337
|
-
do not modify the License. You may add Your own attribution
|
|
338
|
-
notices within Derivative Works that You distribute, alongside
|
|
339
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
340
|
-
that such additional attribution notices cannot be construed
|
|
341
|
-
as modifying the License.
|
|
342
|
-
|
|
343
|
-
You may add Your own copyright statement to Your modifications and
|
|
344
|
-
may provide additional or different license terms and conditions
|
|
345
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
346
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
347
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
348
|
-
the conditions stated in this License.
|
|
349
|
-
|
|
350
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
351
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
352
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
353
|
-
this License, without any additional terms or conditions.
|
|
354
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
355
|
-
the terms of any separate license agreement you may have executed
|
|
356
|
-
with Licensor regarding such Contributions.
|
|
357
|
-
|
|
358
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
359
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
360
|
-
except as required for reasonable and customary use in describing the
|
|
361
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
362
|
-
|
|
363
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
364
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
365
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
366
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
367
|
-
implied, including, without limitation, any warranties or conditions
|
|
368
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
369
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
370
|
-
appropriateness of using or redistributing the Work and assume any
|
|
371
|
-
risks associated with Your exercise of permissions under this License.
|
|
372
|
-
|
|
373
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
374
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
375
|
-
unless required by applicable law (such as deliberate and grossly
|
|
376
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
377
|
-
liable to You for damages, including any direct, indirect, special,
|
|
378
|
-
incidental, or consequential damages of any character arising as a
|
|
379
|
-
result of this License or out of the use or inability to use the
|
|
380
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
381
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
382
|
-
other commercial damages or losses), even if such Contributor
|
|
383
|
-
has been advised of the possibility of such damages.
|
|
384
|
-
|
|
385
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
386
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
387
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
388
|
-
or other liability obligations and/or rights consistent with this
|
|
389
|
-
License. However, in accepting such obligations, You may act only
|
|
390
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
391
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
392
|
-
defend, and hold each Contributor harmless for any liability
|
|
393
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
394
|
-
of your accepting any such warranty or additional liability.
|
|
395
|
-
|
|
396
|
-
END OF TERMS AND CONDITIONS
|
|
397
|
-
|
|
398
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
399
|
-
|
|
400
|
-
To apply the Apache License to your work, attach the following
|
|
401
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
402
|
-
replaced with your own identifying information. (Don't include
|
|
403
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
404
|
-
comment syntax for the file format. We also recommend that a
|
|
405
|
-
file or class name and description of purpose be included on the
|
|
406
|
-
same "printed page" as the copyright notice for easier
|
|
407
|
-
identification within third-party archives.
|
|
408
|
-
|
|
409
|
-
Copyright 2019-Present Datadog, Inc.
|
|
410
|
-
|
|
411
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
412
|
-
you may not use this file except in compliance with the License.
|
|
413
|
-
You may obtain a copy of the License at
|
|
414
|
-
|
|
415
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
416
|
-
|
|
417
|
-
Unless required by applicable law or agreed to in writing, software
|
|
418
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
419
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
420
|
-
See the License for the specific language governing permissions and
|
|
421
|
-
limitations under the License.
|
|
422
|
-
|
|
423
|
-
```
|
|
424
|
-
|
|
425
3
|
## balanced-match
|
|
426
4
|
|
|
427
5
|
**Version**: 4.0.4
|
|
@@ -457,7 +35,7 @@ SOFTWARE.
|
|
|
457
35
|
|
|
458
36
|
## brace-expansion
|
|
459
37
|
|
|
460
|
-
**Version**: 5.0.
|
|
38
|
+
**Version**: 5.0.6
|
|
461
39
|
|
|
462
40
|
**License**: MIT
|
|
463
41
|
|
|
@@ -548,7 +126,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
548
126
|
|
|
549
127
|
## eventemitter3
|
|
550
128
|
|
|
551
|
-
**Version**:
|
|
129
|
+
**Version**: 4.0.7
|
|
552
130
|
|
|
553
131
|
**License**: MIT
|
|
554
132
|
|
|
@@ -579,7 +157,7 @@ SOFTWARE.
|
|
|
579
157
|
|
|
580
158
|
## eventemitter3
|
|
581
159
|
|
|
582
|
-
**Version**:
|
|
160
|
+
**Version**: 5.0.4
|
|
583
161
|
|
|
584
162
|
**License**: MIT
|
|
585
163
|
|
|
@@ -101,8 +101,70 @@ export const shouldUseEnvProxy = function () {
|
|
|
101
101
|
* @property {Object} options - The fetch options.
|
|
102
102
|
* @property {number} timeout - The timeout in milliseconds.
|
|
103
103
|
* @property {MessagePort} port - The message port for communication.
|
|
104
|
+
* @property {SharedArrayBuffer} signalBuffer - Used to wake the main thread.
|
|
105
|
+
* Encoding: Int32Array of length 2.
|
|
106
|
+
* [0] wake-reason: 0 = still waiting, 1 = postMessage delivered,
|
|
107
|
+
* 2 = worker died before delivering a message.
|
|
108
|
+
* [1] exit code when [0] === 2; otherwise 0.
|
|
104
109
|
*/
|
|
105
|
-
const
|
|
110
|
+
const SIGNAL_WAITING = 0
|
|
111
|
+
const SIGNAL_POSTMESSAGE = 1
|
|
112
|
+
const SIGNAL_DIED = 2
|
|
113
|
+
|
|
114
|
+
const { url, options, timeout, port, signalBuffer } = workerData
|
|
115
|
+
const signalArray = new Int32Array(signalBuffer)
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Wake the main thread, which is blocked in Atomics.wait on signalArray[0].
|
|
119
|
+
* Call after every postMessage so the caller never spins waiting for a
|
|
120
|
+
* message that's already arrived. Idempotent — once signalArray[0] has been
|
|
121
|
+
* set, re-entry is a no-op.
|
|
122
|
+
*/
|
|
123
|
+
function notifyMainThread() {
|
|
124
|
+
if (Atomics.load(signalArray, 0) !== SIGNAL_WAITING) {
|
|
125
|
+
return
|
|
126
|
+
}
|
|
127
|
+
Atomics.store(signalArray, 0, SIGNAL_POSTMESSAGE)
|
|
128
|
+
Atomics.notify(signalArray, 0)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Worker-death watchdogs. These run inside the worker thread (unlike
|
|
132
|
+
// worker.on('error') / worker.on('exit') on the parent, which can't fire
|
|
133
|
+
// before syncFetch's synchronous throw because libuv events don't deliver
|
|
134
|
+
// while the main thread is in Atomics.wait or running sync code).
|
|
135
|
+
//
|
|
136
|
+
// They sit between top-level destructuring and the fetch try-block, which
|
|
137
|
+
// means any error originating before this point (bad workerData, broken
|
|
138
|
+
// imports) still falls back to the main thread's plain timeout. That trade
|
|
139
|
+
// is acceptable: catastrophic-startup is rare and unrecoverable.
|
|
140
|
+
process.on('uncaughtException', error => {
|
|
141
|
+
if (Atomics.load(signalArray, 0) !== SIGNAL_WAITING) {
|
|
142
|
+
return
|
|
143
|
+
}
|
|
144
|
+
// Forward through the normal port channel so the caller gets the full
|
|
145
|
+
// error chain. If postMessage itself throws (e.g. error wasn't cloneable),
|
|
146
|
+
// we have no remaining channel to deliver the error — force an exit so
|
|
147
|
+
// the death watchdog below fires synchronously and wakes the parent.
|
|
148
|
+
// Without this, installing an uncaughtException handler suppresses Node's
|
|
149
|
+
// default exit and the parent blocks for the full mainThreadTimeout.
|
|
150
|
+
try {
|
|
151
|
+
const wrapped = new FetchWorkerError({ url: sanitizeUrl(url) })
|
|
152
|
+
wrapped.cause = error
|
|
153
|
+
port.postMessage({ error: wrapped })
|
|
154
|
+
notifyMainThread()
|
|
155
|
+
} catch {
|
|
156
|
+
process.exit(1)
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
process.on('exit', code => {
|
|
161
|
+
if (Atomics.load(signalArray, 0) !== SIGNAL_WAITING) {
|
|
162
|
+
return
|
|
163
|
+
}
|
|
164
|
+
Atomics.store(signalArray, 1, code)
|
|
165
|
+
Atomics.store(signalArray, 0, SIGNAL_DIED)
|
|
166
|
+
Atomics.notify(signalArray, 0)
|
|
167
|
+
})
|
|
106
168
|
|
|
107
169
|
try {
|
|
108
170
|
let dispatcher = getGlobalDispatcher()
|
|
@@ -133,6 +195,7 @@ try {
|
|
|
133
195
|
port.postMessage({
|
|
134
196
|
data: responseData
|
|
135
197
|
})
|
|
198
|
+
notifyMainThread()
|
|
136
199
|
} catch (error) {
|
|
137
200
|
const HTTP_PROXY = process.env.http_proxy || process.env.HTTP_PROXY
|
|
138
201
|
const HTTPS_PROXY = process.env.https_proxy || process.env.HTTPS_PROXY
|
|
@@ -165,6 +228,7 @@ try {
|
|
|
165
228
|
port.postMessage({
|
|
166
229
|
error: err
|
|
167
230
|
})
|
|
231
|
+
notifyMainThread()
|
|
168
232
|
} finally {
|
|
169
233
|
port.close()
|
|
170
234
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export interface SyncFetchCustomOptions {
|
|
2
2
|
timeout?: number;
|
|
3
|
+
/**
|
|
4
|
+
* @internal Test-only override for the worker script path. Allows tests to
|
|
5
|
+
* substitute a fixture worker that intentionally dies before notifying, so
|
|
6
|
+
* the in-worker death watchdogs (process.on('uncaughtException') /
|
|
7
|
+
* process.on('exit')) and the signalBuffer-driven timeout error can be
|
|
8
|
+
* exercised end-to-end.
|
|
9
|
+
*/
|
|
10
|
+
_workerPath?: string;
|
|
3
11
|
}
|
|
4
12
|
export interface SyncFetchResponse {
|
|
5
13
|
status: number;
|
|
@@ -9,3 +17,27 @@ export interface SyncFetchResponse {
|
|
|
9
17
|
ok: boolean;
|
|
10
18
|
}
|
|
11
19
|
export declare function syncFetch(url: string, options?: RequestInit, customOptions?: SyncFetchCustomOptions): SyncFetchResponse;
|
|
20
|
+
/**
|
|
21
|
+
* Wake-reason values written to `signalArray[0]` by sync-fetch-worker.mjs.
|
|
22
|
+
*
|
|
23
|
+
* @internal Exported for tests.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SIGNAL_WAITING = 0;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const SIGNAL_POSTMESSAGE = 1;
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const SIGNAL_DIED = 2;
|
|
30
|
+
/**
|
|
31
|
+
* Build the diagnostic Error thrown when the worker fails to deliver a message
|
|
32
|
+
* before the main-thread timeout. When the worker's death-watchdog fired
|
|
33
|
+
* (`wakeReason === SIGNAL_DIED`) the exit code is folded into the message so
|
|
34
|
+
* the failure is debuggable instead of opaque. Otherwise the wait simply
|
|
35
|
+
* timed out and we report the plain timeout.
|
|
36
|
+
*
|
|
37
|
+
* @internal Exported for tests.
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildTimeoutError(args: {
|
|
40
|
+
mainThreadTimeout: number;
|
|
41
|
+
wakeReason: number;
|
|
42
|
+
exitCode: number;
|
|
43
|
+
}): Error;
|
package/dist/utils/sync-fetch.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SIGNAL_DIED = exports.SIGNAL_POSTMESSAGE = exports.SIGNAL_WAITING = void 0;
|
|
3
4
|
exports.syncFetch = syncFetch;
|
|
5
|
+
exports.buildTimeoutError = buildTimeoutError;
|
|
4
6
|
const node_worker_threads_1 = require("node:worker_threads");
|
|
5
7
|
const node_path_1 = require("node:path");
|
|
6
8
|
function syncFetch(url, options = {}, customOptions = {
|
|
@@ -10,28 +12,34 @@ function syncFetch(url, options = {}, customOptions = {
|
|
|
10
12
|
const processingBuffer = 3000;
|
|
11
13
|
const mainThreadTimeout = timeout + processingBuffer;
|
|
12
14
|
const { port1, port2 } = new node_worker_threads_1.MessageChannel();
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
15
|
+
const signalBuffer = new SharedArrayBuffer(8);
|
|
16
|
+
const signalArray = new Int32Array(signalBuffer);
|
|
17
|
+
const workerPath = customOptions._workerPath ?? (0, node_path_1.join)(__dirname, 'sync-fetch-worker.mjs');
|
|
18
|
+
const worker = new node_worker_threads_1.Worker(workerPath, {
|
|
16
19
|
name: 'sync-fetch',
|
|
17
20
|
eval: false,
|
|
18
21
|
workerData: {
|
|
19
22
|
url,
|
|
20
23
|
options,
|
|
21
24
|
timeout,
|
|
22
|
-
port: port2
|
|
25
|
+
port: port2,
|
|
26
|
+
signalBuffer
|
|
23
27
|
},
|
|
24
28
|
transferList: [port2]
|
|
25
29
|
});
|
|
26
|
-
|
|
30
|
+
worker.on('error', () => {
|
|
31
|
+
});
|
|
32
|
+
performance.mark('axe-watcher:sync-fetch:start');
|
|
27
33
|
let message;
|
|
28
34
|
try {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
Atomics.wait(signalArray, 0, 0, mainThreadTimeout);
|
|
36
|
+
message = (0, node_worker_threads_1.receiveMessageOnPort)(port1);
|
|
37
|
+
if (message === undefined) {
|
|
38
|
+
throw buildTimeoutError({
|
|
39
|
+
mainThreadTimeout,
|
|
40
|
+
wakeReason: Atomics.load(signalArray, 0),
|
|
41
|
+
exitCode: Atomics.load(signalArray, 1)
|
|
42
|
+
});
|
|
35
43
|
}
|
|
36
44
|
const { data, error } = message.message;
|
|
37
45
|
if (error) {
|
|
@@ -63,6 +71,16 @@ function syncFetch(url, options = {}, customOptions = {
|
|
|
63
71
|
});
|
|
64
72
|
}
|
|
65
73
|
}
|
|
74
|
+
exports.SIGNAL_WAITING = 0;
|
|
75
|
+
exports.SIGNAL_POSTMESSAGE = 1;
|
|
76
|
+
exports.SIGNAL_DIED = 2;
|
|
77
|
+
function buildTimeoutError(args) {
|
|
78
|
+
const { mainThreadTimeout, wakeReason, exitCode } = args;
|
|
79
|
+
const reason = wakeReason === exports.SIGNAL_DIED
|
|
80
|
+
? `worker exited with code ${exitCode} before responding`
|
|
81
|
+
: `worker thread did not respond within ${mainThreadTimeout}ms`;
|
|
82
|
+
return new Error(`Request timed out - ${reason}`);
|
|
83
|
+
}
|
|
66
84
|
function sanitizeHeaders(headers) {
|
|
67
85
|
if (!headers) {
|
|
68
86
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-fetch.js","sourceRoot":"","sources":["../../src/utils/sync-fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sync-fetch.js","sourceRoot":"","sources":["../../src/utils/sync-fetch.ts"],"names":[],"mappings":";;;AA2BA,8BAiHC;AAsBD,8CAWC;AA7KD,6DAI4B;AAC5B,yCAAgC;AAsBhC,SAAgB,SAAS,CACvB,GAAW,EACX,UAAuB,EAAE,EACzB,gBAAwC;IACtC,OAAO,EAAE,KAAM;CAChB;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,KAAM,CAAA;IAG/C,MAAM,gBAAgB,GAAG,IAAK,CAAA;IAC9B,MAAM,iBAAiB,GAAG,OAAO,GAAG,gBAAgB,CAAA;IAEpD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,oCAAc,EAAE,CAAA;IAc7C,MAAM,YAAY,GAAG,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAA;IAC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