@openclaw/googlechat 2026.7.1-beta.1 → 2026.7.1-beta.4

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.
Files changed (179) hide show
  1. package/dist/{actions-BaygKCqu.js → actions-BacnMHv0.js} +2 -2
  2. package/dist/api.js +2 -2
  3. package/dist/{approval-auth-BxSuKX1J.js → approval-auth-C_BVZZFA.js} +2 -2
  4. package/dist/{approval-handler.runtime-AQl0xUss.js → approval-handler.runtime-BnkufknT.js} +7 -5
  5. package/dist/{channel-BQMTDOKw.js → channel-_o671C-U.js} +9 -8
  6. package/dist/{channel-base-Qh87GFW_.js → channel-base-DJICAvKH.js} +7 -6
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/{channel.adapters-CFEUpRK6.js → channel.adapters-FEj7zUjh.js} +53 -3
  9. package/dist/{channel.runtime-BBH8WHto.js → channel.runtime-CYmt7Ybo.js} +2 -8
  10. package/dist/directory-contract-api.js +1 -1
  11. package/dist/setup-plugin-api.js +1 -1
  12. package/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  13. package/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
  14. package/node_modules/gaxios/package.json +7 -9
  15. package/node_modules/google-auth-library/build/src/auth/gdchclient.d.ts +47 -0
  16. package/node_modules/google-auth-library/build/src/auth/gdchclient.js +307 -0
  17. package/node_modules/google-auth-library/build/src/auth/googleauth.d.ts +5 -4
  18. package/node_modules/google-auth-library/build/src/auth/googleauth.js +18 -1
  19. package/node_modules/google-auth-library/build/src/index.d.ts +1 -0
  20. package/node_modules/google-auth-library/build/src/index.js +4 -1
  21. package/node_modules/google-auth-library/package.json +5 -7
  22. package/npm-shrinkwrap.json +11 -39
  23. package/package.json +6 -6
  24. package/node_modules/gcp-metadata/node_modules/gaxios/LICENSE +0 -202
  25. package/node_modules/gcp-metadata/node_modules/gaxios/README.md +0 -240
  26. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.d.ts +0 -1
  27. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.js +0 -109
  28. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.js.map +0 -1
  29. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/browser-test/test.browser.d.ts +0 -1
  30. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/browser-test/test.browser.js +0 -81
  31. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/browser-test/test.browser.js.map +0 -1
  32. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/common.d.ts +0 -329
  33. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/common.js +0 -311
  34. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/common.js.map +0 -1
  35. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/gaxios.d.ts +0 -104
  36. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/gaxios.js +0 -564
  37. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/gaxios.js.map +0 -1
  38. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/index.d.ts +0 -15
  39. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/index.js +0 -48
  40. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/index.js.map +0 -1
  41. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/interceptor.d.ts +0 -25
  42. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/interceptor.js +0 -22
  43. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/interceptor.js.map +0 -1
  44. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/retry.d.ts +0 -8
  45. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/retry.js +0 -165
  46. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/retry.js.map +0 -1
  47. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/util.cjs +0 -16
  48. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/util.cjs.map +0 -1
  49. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/src/util.d.cts +0 -7
  50. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/system-test/test.install.d.ts +0 -1
  51. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/system-test/test.install.js +0 -128
  52. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/system-test/test.install.js.map +0 -1
  53. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.getch.d.ts +0 -1
  54. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.getch.js +0 -1444
  55. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.getch.js.map +0 -1
  56. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.index.d.ts +0 -1
  57. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.index.js +0 -61
  58. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.index.js.map +0 -1
  59. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.retry.d.ts +0 -1
  60. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.retry.js +0 -367
  61. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/test/test.retry.js.map +0 -1
  62. package/node_modules/gcp-metadata/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +0 -1
  63. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/browser-test/browser-test-runner.d.ts +0 -1
  64. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/browser-test/browser-test-runner.js +0 -71
  65. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/browser-test/browser-test-runner.js.map +0 -1
  66. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/browser-test/test.browser.d.ts +0 -1
  67. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/browser-test/test.browser.js +0 -76
  68. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/browser-test/test.browser.js.map +0 -1
  69. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/package.json +0 -1
  70. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/common.d.ts +0 -329
  71. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/common.js +0 -303
  72. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/common.js.map +0 -1
  73. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/gaxios.d.ts +0 -104
  74. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/gaxios.js +0 -557
  75. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/gaxios.js.map +0 -1
  76. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/index.d.ts +0 -15
  77. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/index.js +0 -29
  78. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/index.js.map +0 -1
  79. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/interceptor.d.ts +0 -25
  80. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/interceptor.js +0 -18
  81. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/interceptor.js.map +0 -1
  82. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/retry.d.ts +0 -8
  83. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/retry.js +0 -162
  84. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/retry.js.map +0 -1
  85. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/util.cjs +0 -15
  86. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/util.cjs.map +0 -1
  87. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/src/util.d.cts +0 -7
  88. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/system-test/test.install.d.ts +0 -1
  89. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/system-test/test.install.js +0 -123
  90. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/system-test/test.install.js.map +0 -1
  91. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.getch.d.ts +0 -1
  92. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.getch.js +0 -1406
  93. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.getch.js.map +0 -1
  94. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.index.d.ts +0 -1
  95. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.index.js +0 -23
  96. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.index.js.map +0 -1
  97. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.retry.d.ts +0 -1
  98. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.retry.js +0 -362
  99. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/test/test.retry.js.map +0 -1
  100. package/node_modules/gcp-metadata/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +0 -1
  101. package/node_modules/gcp-metadata/node_modules/gaxios/package.json +0 -105
  102. package/node_modules/google-auth-library/node_modules/gaxios/LICENSE +0 -202
  103. package/node_modules/google-auth-library/node_modules/gaxios/README.md +0 -240
  104. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.d.ts +0 -1
  105. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.js +0 -109
  106. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.js.map +0 -1
  107. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/test.browser.d.ts +0 -1
  108. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/test.browser.js +0 -81
  109. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/test.browser.js.map +0 -1
  110. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/common.d.ts +0 -329
  111. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/common.js +0 -311
  112. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/common.js.map +0 -1
  113. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/gaxios.d.ts +0 -104
  114. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/gaxios.js +0 -564
  115. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/gaxios.js.map +0 -1
  116. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/index.d.ts +0 -15
  117. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/index.js +0 -48
  118. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/index.js.map +0 -1
  119. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/interceptor.d.ts +0 -25
  120. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/interceptor.js +0 -22
  121. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/interceptor.js.map +0 -1
  122. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/retry.d.ts +0 -8
  123. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/retry.js +0 -165
  124. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/retry.js.map +0 -1
  125. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/util.cjs +0 -16
  126. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/util.cjs.map +0 -1
  127. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/util.d.cts +0 -7
  128. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/system-test/test.install.d.ts +0 -1
  129. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/system-test/test.install.js +0 -128
  130. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/system-test/test.install.js.map +0 -1
  131. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.getch.d.ts +0 -1
  132. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.getch.js +0 -1444
  133. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.getch.js.map +0 -1
  134. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.index.d.ts +0 -1
  135. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.index.js +0 -61
  136. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.index.js.map +0 -1
  137. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.retry.d.ts +0 -1
  138. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.retry.js +0 -367
  139. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.retry.js.map +0 -1
  140. package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +0 -1
  141. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/browser-test-runner.d.ts +0 -1
  142. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/browser-test-runner.js +0 -71
  143. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/browser-test-runner.js.map +0 -1
  144. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/test.browser.d.ts +0 -1
  145. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/test.browser.js +0 -76
  146. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/test.browser.js.map +0 -1
  147. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/package.json +0 -1
  148. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/common.d.ts +0 -329
  149. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/common.js +0 -303
  150. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/common.js.map +0 -1
  151. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/gaxios.d.ts +0 -104
  152. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/gaxios.js +0 -557
  153. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/gaxios.js.map +0 -1
  154. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/index.d.ts +0 -15
  155. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/index.js +0 -29
  156. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/index.js.map +0 -1
  157. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/interceptor.d.ts +0 -25
  158. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/interceptor.js +0 -18
  159. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/interceptor.js.map +0 -1
  160. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/retry.d.ts +0 -8
  161. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/retry.js +0 -162
  162. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/retry.js.map +0 -1
  163. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/util.cjs +0 -15
  164. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/util.cjs.map +0 -1
  165. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/util.d.cts +0 -7
  166. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/system-test/test.install.d.ts +0 -1
  167. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/system-test/test.install.js +0 -123
  168. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/system-test/test.install.js.map +0 -1
  169. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.getch.d.ts +0 -1
  170. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.getch.js +0 -1406
  171. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.getch.js.map +0 -1
  172. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.index.d.ts +0 -1
  173. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.index.js +0 -23
  174. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.index.js.map +0 -1
  175. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.retry.d.ts +0 -1
  176. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.retry.js +0 -362
  177. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.retry.js.map +0 -1
  178. package/node_modules/google-auth-library/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +0 -1
  179. package/node_modules/google-auth-library/node_modules/gaxios/package.json +0 -105
@@ -1,202 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
@@ -1,240 +0,0 @@
1
- # gaxios
2
-
3
- [![npm version](https://img.shields.io/npm/v/gaxios.svg)](https://www.npmjs.org/package/gaxios)
4
- [![codecov](https://codecov.io/gh/googleapis/gaxios/branch/master/graph/badge.svg)](https://codecov.io/gh/googleapis/gaxios)
5
- [![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts)
6
-
7
- > An HTTP request client that provides an `axios` like interface over top of `node-fetch`.
8
-
9
- ## Install
10
-
11
- ```sh
12
- $ npm install gaxios
13
- ```
14
-
15
- ## Example
16
-
17
- ```js
18
- import {request} from 'gaxios';
19
- const res = await request({url: 'https://google.com/'});
20
- ```
21
-
22
- ## `fetch`-Compatible API Example
23
-
24
- We offer a drop-in `fetch`-compatible API as well.
25
-
26
- ```js
27
- import {instance} from 'gaxios';
28
- const res = await instance.fetch('https://google.com/');
29
- ```
30
-
31
- To disable the auto-processing of the request body in `res.data`, set `{responseType: 'stream'}` or `.adapter` on a Gaxios instance's defaults or per-request.
32
-
33
- ## Setting Defaults
34
-
35
- Gaxios supports setting default properties both on the default instance, and on additional instances. This is often useful when making many requests to the same domain with the same base settings. For example:
36
-
37
- ```js
38
- import {Gaxios} from 'gaxios';
39
-
40
- const gaxios = new Gaxios();
41
-
42
- gaxios.defaults = {
43
- baseURL: 'https://example.com'
44
- headers: new Headers({
45
- Authorization: 'SOME_TOKEN'
46
- })
47
- }
48
-
49
- await gaxios.request({url: '/data'});
50
- ```
51
-
52
- Note that setting default values will take precedence
53
- over other authentication methods, i.e., application default credentials.
54
-
55
- ## `GaxiosResponse`
56
-
57
- The `GaxiosResponse` object extends the `fetch` API's [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object, with the addition of:
58
-
59
- - `config`: the configuration used for the request.
60
- - `data`: the transformed `.body`, such as JSON, text, arrayBuffer, or more.
61
-
62
- ## Request Options
63
-
64
- ```ts
65
- interface GaxiosOptions = {
66
- // The url to which the request should be sent. Required.
67
- url: string | URL,
68
-
69
- // The HTTP method to use for the request. Defaults to `GET`.
70
- method: 'GET',
71
-
72
- // The base Url to use for the request.
73
- // Resolved as `new URL(url, baseURL)`
74
- baseURL: 'https://example.com/v1/' | URL;
75
-
76
- // The HTTP methods to be sent with the request.
77
- headers: new Headers(),
78
-
79
- // The data to send in the body of the request. Objects will be serialized as JSON
80
- // except for:
81
- // - `ArrayBuffer`
82
- // - `Blob`
83
- // - `Buffer` (Node.js)
84
- // - `DataView`
85
- // - `File`
86
- // - `FormData`
87
- // - `ReadableStream`
88
- // - `stream.Readable` (Node.js)
89
- // - strings
90
- // - `TypedArray` (e.g. `Uint8Array`, `BigInt64Array`)
91
- // - `URLSearchParams`
92
- // - all other objects where:
93
- // - headers.get('Content-Type') === 'application/x-www-form-urlencoded' (as they will be serialized as `URLSearchParams`)
94
- //
95
- // Here are a few examples that would prevent setting `Content-Type: application/json` by default:
96
- // - data: JSON.stringify({some: 'data'}) // a `string`
97
- // - data: fs.readFile('./some-data.jpeg') // a `stream.Readable`
98
- data: {
99
- some: 'data'
100
- },
101
-
102
- // The max size of the http response content in bytes allowed.
103
- // Defaults to `0`, which is the same as unset.
104
- maxContentLength: 2000,
105
-
106
- // The query parameters that will be encoded using `URLSearchParams` and
107
- // appended to the url
108
- params: {
109
- querystring: 'parameters'
110
- },
111
-
112
- // The timeout for the HTTP request in milliseconds. No timeout by default.
113
- timeout: 60000,
114
-
115
- // Optional method to override making the actual HTTP request. Useful
116
- // for writing tests and instrumentation
117
- adapter?: async (options, defaultAdapter) => {
118
- const res = await defaultAdapter(options);
119
- res.data = {
120
- ...res.data,
121
- extraProperty: 'your extra property',
122
- };
123
- return res;
124
- };
125
-
126
- // The expected return type of the request. Options are:
127
- // 'json' | 'stream' | 'blob' | 'arraybuffer' | 'text' | 'unknown'
128
- // Defaults to `unknown`.
129
- //
130
- // If the `fetchImplementation` is native `fetch`, the
131
- // stream is a `ReadableStream`, otherwise `readable.Stream`.
132
- //
133
- // Note: Setting 'stream' does not consume the `Response#body` - this can
134
- // be useful for passthrough requests, where a consumer would like to
135
- // transform the `Response#body`, or for using Gaxios as a drop-in `fetch`
136
- // replacement.
137
- responseType: 'unknown',
138
-
139
- // The node.js http agent to use for the request.
140
- agent: someHttpsAgent,
141
-
142
- // Custom function to determine if the response is valid based on the
143
- // status code. Defaults to (>= 200 && < 300)
144
- validateStatus: (status: number) => true,
145
-
146
- /**
147
- * Implementation of `fetch` to use when making the API call. Will use
148
- * `node-fetch` by default.
149
- */
150
- fetchImplementation?: typeof fetch;
151
-
152
- // Configuration for retrying of requests.
153
- retryConfig: {
154
- // The number of times to retry the request. Defaults to 3.
155
- retry?: number;
156
-
157
- // The number of retries already attempted.
158
- currentRetryAttempt?: number;
159
-
160
- // The HTTP Methods that will be automatically retried.
161
- // Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']
162
- httpMethodsToRetry?: string[];
163
-
164
- // The HTTP response status codes that will automatically be retried.
165
- // Defaults to: [[100, 199], [408, 408], [429, 429], [500, 599]]
166
- statusCodesToRetry?: number[][];
167
-
168
- // Function to invoke when a retry attempt is made.
169
- onRetryAttempt?: (err: GaxiosError) => Promise<void> | void;
170
-
171
- // Function to invoke which determines if you should retry
172
- shouldRetry?: (err: GaxiosError) => Promise<boolean> | boolean;
173
-
174
- // When there is no response, the number of retries to attempt. Defaults to 2.
175
- noResponseRetries?: number;
176
-
177
- // The amount of time to initially delay the retry, in ms. Defaults to 100ms.
178
- retryDelay?: number;
179
- },
180
-
181
- // Enables default configuration for retries.
182
- retry: boolean,
183
-
184
- // Enables aborting via AbortController
185
- signal?: AbortSignal
186
-
187
- /**
188
- * A collection of parts to send as a `Content-Type: multipart/related` request.
189
- */
190
- multipart?: GaxiosMultipartOptions;
191
-
192
- /**
193
- * An optional proxy to use for requests.
194
- * Available via `process.env.HTTP_PROXY` and `process.env.HTTPS_PROXY` as well - with a preference for the this config option when multiple are available.
195
- * The `agent` option overrides this.
196
- *
197
- * @see {@link GaxiosOptions.noProxy}
198
- * @see {@link GaxiosOptions.agent}
199
- */
200
- proxy?: string | URL;
201
-
202
- /**
203
- * A list for excluding traffic for proxies.
204
- * Available via `process.env.NO_PROXY` as well as a common-separated list of strings - merged with any local `noProxy` rules.
205
- *
206
- * - When provided a string, it is matched by
207
- * - Wildcard `*.` and `.` matching are available. (e.g. `.example.com` or `*.example.com`)
208
- * - When provided a URL, it is matched by the `.origin` property.
209
- * - For example, requesting `https://example.com` with the following `noProxy`s would result in a no proxy use:
210
- * - new URL('https://example.com')
211
- * - new URL('https://example.com:443')
212
- * - The following would be used with a proxy:
213
- * - new URL('http://example.com:80')
214
- * - new URL('https://example.com:8443')
215
- * - When provided a regular expression it is used to match the stringified URL
216
- *
217
- * @see {@link GaxiosOptions.proxy}
218
- */
219
- noProxy?: (string | URL | RegExp)[];
220
-
221
- /**
222
- * An experimental, customizable error redactor.
223
- *
224
- * Set `false` to disable.
225
- *
226
- * @remarks
227
- *
228
- * This does not replace the requirement for an active Data Loss Prevention (DLP) provider. For DLP suggestions, see:
229
- * - https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data#dlp_deidentify_replace_infotype-nodejs
230
- * - https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#credentials_and_secrets
231
- *
232
- * @experimental
233
- */
234
- errorRedactor?: typeof defaultErrorRedactor | false;
235
- }
236
- ```
237
-
238
- ## License
239
-
240
- [Apache-2.0](https://github.com/googleapis/gaxios/blob/main/LICENSE)
@@ -1,109 +0,0 @@
1
- "use strict";
2
- // Copyright 2019 Google, LLC
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- var desc = Object.getOwnPropertyDescriptor(m, k);
17
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
- desc = { enumerable: true, get: function() { return m[k]; } };
19
- }
20
- Object.defineProperty(o, k2, desc);
21
- }) : (function(o, m, k, k2) {
22
- if (k2 === undefined) k2 = k;
23
- o[k2] = m[k];
24
- }));
25
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
- Object.defineProperty(o, "default", { enumerable: true, value: v });
27
- }) : function(o, v) {
28
- o["default"] = v;
29
- });
30
- var __importStar = (this && this.__importStar) || (function () {
31
- var ownKeys = function(o) {
32
- ownKeys = Object.getOwnPropertyNames || function (o) {
33
- var ar = [];
34
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
- return ar;
36
- };
37
- return ownKeys(o);
38
- };
39
- return function (mod) {
40
- if (mod && mod.__esModule) return mod;
41
- var result = {};
42
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
- __setModuleDefault(result, mod);
44
- return result;
45
- };
46
- })();
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- const express_1 = __importDefault(require("express"));
52
- const child_process_1 = require("child_process");
53
- const multiparty = __importStar(require("multiparty"));
54
- const cors_1 = __importDefault(require("cors"));
55
- const util_1 = require("util");
56
- const port = 7172;
57
- const exec = (0, util_1.promisify)(child_process_1.execFile);
58
- async function listen(app, port) {
59
- return new Promise((resolve, reject) => {
60
- const server = app.listen(port, (err) => {
61
- if (err) {
62
- reject(err);
63
- }
64
- resolve(server);
65
- });
66
- });
67
- }
68
- // Starts a web server that browser tests will use, then runs actual browser
69
- // tests.
70
- async function main() {
71
- const app = (0, express_1.default)();
72
- app.use((0, cors_1.default)());
73
- app.post('/path', (req, res) => {
74
- if (req.header('origin')) {
75
- res.set('Access-Control-Allow-Origin', req.header('origin'));
76
- }
77
- const form = new multiparty.Form({ autoFields: true });
78
- form.parse(req, (err, fields) => {
79
- if (err) {
80
- res.status(500).send({ message: err.message });
81
- }
82
- else {
83
- res.status(200).send(fields.null);
84
- }
85
- });
86
- });
87
- app.get('/path', (req, res) => {
88
- if (req.header('origin')) {
89
- res.set('Access-Control-Allow-Origin', req.header('origin'));
90
- }
91
- res.send('response');
92
- });
93
- app.get('/querystring', (req, res) => {
94
- if (req.header('origin')) {
95
- res.set('Access-Control-Allow-Origin', req.header('origin'));
96
- }
97
- const query = req.query.query;
98
- res.send(query || '');
99
- });
100
- const server = await listen(app, port);
101
- console.log(`[http server] I'm listening on port ${port}! Starting karma.`);
102
- await exec('karma', ['start']);
103
- server.close();
104
- console.log(`[http server] Karma has finished! I'm no longer listening on port ${port}!`);
105
- }
106
- main().catch(err => {
107
- console.log('Error:', err);
108
- });
109
- //# sourceMappingURL=browser-test-runner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-test-runner.js","sourceRoot":"","sources":["../../../browser-test/browser-test-runner.ts"],"names":[],"mappings":";AAAA,6BAA6B;AAC7B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjC,sDAA8B;AAE9B,iDAAuC;AACvC,uDA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AK,CAAC,GAAG,CAAC,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC"}
@@ -1,81 +0,0 @@
1
- "use strict";
2
- // Copyright 2019 Google, LLC
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- var __importDefault = (this && this.__importDefault) || function (mod) {
15
- return (mod && mod.__esModule) ? mod : { "default": mod };
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const assert_1 = __importDefault(require("assert"));
19
- const mocha_1 = require("mocha");
20
- const index_1 = require("../src/index");
21
- const port = 7172; // should match the port defined in `webserver.ts`
22
- (0, mocha_1.describe)('💻 browser tests', () => {
23
- (0, mocha_1.it)('should just work from browser', async () => {
24
- const result = await (0, index_1.request)({ url: `http://localhost:${port}/path` });
25
- assert_1.default.strictEqual(result.status, 200);
26
- assert_1.default.strictEqual(result.data, 'response');
27
- });
28
- (0, mocha_1.it)('should pass querystring parameters from browser', async () => {
29
- const result = await (0, index_1.request)({
30
- url: `http://localhost:${port}/querystring`,
31
- params: { query: 'value' },
32
- });
33
- assert_1.default.strictEqual(result.status, 200);
34
- assert_1.default.strictEqual(result.data, 'value');
35
- });
36
- (0, mocha_1.it)('should allow passing browser fetch explicitly', async () => {
37
- const result = await (0, index_1.request)({
38
- url: `http://localhost:${port}/path`,
39
- fetchImplementation: window.fetch,
40
- });
41
- assert_1.default.strictEqual(result.status, 200);
42
- });
43
- (0, mocha_1.it)('should support multipart post from the browser', async () => {
44
- const headers = new Headers();
45
- const multipart = [
46
- {
47
- 'Content-Type': 'application/json',
48
- body: JSON.stringify({ hello: 'world' }),
49
- },
50
- {
51
- 'Content-Type': 'text/plain',
52
- body: 'hello world!',
53
- },
54
- ];
55
- const boundary = globalThis?.crypto.randomUUID() || (await import('crypto')).randomUUID();
56
- const finale = `--${boundary}--`;
57
- headers.set('Content-Type', `multipart/related; boundary=${boundary}`);
58
- let content = '';
59
- for (const part of multipart) {
60
- const preamble = `--${boundary}\r\nContent-Type: ${part['Content-Type']}\r\n\r\n`;
61
- // rStream.push(preamble);
62
- content += preamble;
63
- if (typeof part.body === 'string') {
64
- content += part.body;
65
- content += '\r\n';
66
- }
67
- }
68
- content += finale;
69
- const result = await (0, index_1.request)({
70
- headers,
71
- data: content,
72
- method: 'POST',
73
- url: `http://localhost:${port}/path`,
74
- });
75
- assert_1.default.strictEqual(result.status, 200);
76
- const parts = result.data;
77
- assert_1.default.strictEqual(parts[0], '{"hello":"world"}');
78
- assert_1.default.strictEqual(parts[1], 'hello world!');
79
- });
80
- });
81
- //# sourceMappingURL=test.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.browser.js","sourceRoot":"","sources":["../../../browser-test/test.browser.ts"],"names":[],"mappings":";AAAA,6BAA6B;AAC7B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;AAEjC,oDAA4B;AAC5B,iCAAmC;AACnC,wCAAqC;AACrC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,kDAAkD;AAErE,IAAA,gBAAQ,EAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,IAAA,UAAE,EAAC,+BAA+B,EAAE,KAAK,IAAI,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,IAAA,eAAO,EAAC,EAAC,GAAG,EAAE,oBAAoB,IAAI,OAAO,EAAC,CAAC,CAAC;QACrE,gBAAM,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