Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/LICENSE +202 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/README.md +377 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/genai.d.ts +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/index.cjs +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/index.mjs +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/index.mjs.map +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/node/index.cjs +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/node/index.mjs +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/node/index.mjs.map +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/node/node.d.ts +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/web/index.mjs +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/web/index.mjs.map +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/web/web.d.ts +0 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node/package.json +4 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/.bin/uuid +3 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/CHANGELOG.md +397 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/LICENSE +202 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/README.md +210 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/common.d.ts +274 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/common.js +188 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/common.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/gaxios.d.ts +62 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/gaxios.js +480 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/gaxios.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/index.d.ts +15 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/index.js +48 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/index.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/interceptor.d.ts +25 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/interceptor.js +22 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/interceptor.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/retry.d.ts +8 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/retry.js +166 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/retry.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/util.d.ts +4 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/util.js +17 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/util.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/package.json +96 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/CHANGELOG.md +463 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/LICENSE +202 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/README.md +235 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/gcp-residency.d.ts +57 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/gcp-residency.js +114 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/gcp-residency.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/index.d.ts +156 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/index.js +408 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/index.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/package.json +73 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/google-auth-library/CHANGELOG.md +1394 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/google-auth-library/LICENSE +202 -0
- novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/google-auth-library/README.md +1470 -0
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ONDITIONS 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.
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/README.md
ADDED
|
@@ -0,0 +1,377 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Google Gen AI SDK for TypeScript and JavaScript
|
| 2 |
+
|
| 3 |
+
[](https://www.npmjs.com/package/@google/genai)
|
| 4 |
+
[](https://www.npmjs.com/package/@google/genai)
|
| 5 |
+
|
| 6 |
+
----------------------
|
| 7 |
+
**Documentation:** https://googleapis.github.io/js-genai/
|
| 8 |
+
|
| 9 |
+
----------------------
|
| 10 |
+
|
| 11 |
+
The Google Gen AI JavaScript SDK is designed for
|
| 12 |
+
TypeScript and JavaScript developers to build applications powered by Gemini. The SDK
|
| 13 |
+
supports both the [Gemini Developer API](https://ai.google.dev/gemini-api/docs)
|
| 14 |
+
and [Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview).
|
| 15 |
+
|
| 16 |
+
The Google Gen AI SDK is designed to work with Gemini 2.0 features.
|
| 17 |
+
|
| 18 |
+
> [!CAUTION]
|
| 19 |
+
> **API Key Security:** Avoid exposing API keys in client-side code.
|
| 20 |
+
> Use server-side implementations in production environments.
|
| 21 |
+
|
| 22 |
+
## Prerequisites
|
| 23 |
+
|
| 24 |
+
1. Node.js version 20 or later
|
| 25 |
+
|
| 26 |
+
### The following are required for Vertex AI users (excluding Vertex AI Studio)
|
| 27 |
+
1. [Select](https://console.cloud.google.com/project) or [create](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project) a Google Cloud project.
|
| 28 |
+
1. [Enable billing for your project](https://cloud.google.com/billing/docs/how-to/modify-project).
|
| 29 |
+
1. [Enable the Vertex AI API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com).
|
| 30 |
+
1. [Configure authentication](https://cloud.google.com/docs/authentication) for your project.
|
| 31 |
+
* [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install).
|
| 32 |
+
* [Initialize the gcloud CLI](https://cloud.google.com/sdk/docs/initializing).
|
| 33 |
+
* Create local authentication credentials for your user account:
|
| 34 |
+
|
| 35 |
+
```sh
|
| 36 |
+
gcloud auth application-default login
|
| 37 |
+
```
|
| 38 |
+
A list of accepted authentication options are listed in [GoogleAuthOptions](https://github.com/googleapis/google-auth-library-nodejs/blob/3ae120d0a45c95e36c59c9ac8286483938781f30/src/auth/googleauth.ts#L87) interface of google-auth-library-node.js GitHub repo.
|
| 39 |
+
|
| 40 |
+
## Installation
|
| 41 |
+
|
| 42 |
+
To install the SDK, run the following command:
|
| 43 |
+
|
| 44 |
+
```shell
|
| 45 |
+
npm install @google/genai
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Quickstart
|
| 49 |
+
|
| 50 |
+
The simplest way to get started is to use an API key from
|
| 51 |
+
[Google AI Studio](https://aistudio.google.com/apikey):
|
| 52 |
+
|
| 53 |
+
```typescript
|
| 54 |
+
import {GoogleGenAI} from '@google/genai';
|
| 55 |
+
const GEMINI_API_KEY = process.env.GEMINI_API_KEY;
|
| 56 |
+
|
| 57 |
+
const ai = new GoogleGenAI({apiKey: GEMINI_API_KEY});
|
| 58 |
+
|
| 59 |
+
async function main() {
|
| 60 |
+
const response = await ai.models.generateContent({
|
| 61 |
+
model: 'gemini-2.0-flash-001',
|
| 62 |
+
contents: 'Why is the sky blue?',
|
| 63 |
+
});
|
| 64 |
+
console.log(response.text);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
main();
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
## Initialization
|
| 71 |
+
|
| 72 |
+
The Google Gen AI SDK provides support for both the
|
| 73 |
+
[Google AI Studio](https://ai.google.dev/gemini-api/docs) and
|
| 74 |
+
[Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview)
|
| 75 |
+
implementations of the Gemini API.
|
| 76 |
+
|
| 77 |
+
### Gemini Developer API
|
| 78 |
+
|
| 79 |
+
For server-side applications, initialize using an API key, which can
|
| 80 |
+
be acquired from [Google AI Studio](https://aistudio.google.com/apikey):
|
| 81 |
+
|
| 82 |
+
```typescript
|
| 83 |
+
import { GoogleGenAI } from '@google/genai';
|
| 84 |
+
const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
#### Browser
|
| 88 |
+
|
| 89 |
+
> [!CAUTION]
|
| 90 |
+
> **API Key Security:** Avoid exposing API keys in client-side code.
|
| 91 |
+
> Use server-side implementations in production environments.
|
| 92 |
+
|
| 93 |
+
In the browser the initialization code is identical:
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
```typescript
|
| 97 |
+
import { GoogleGenAI } from '@google/genai';
|
| 98 |
+
const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
### Vertex AI
|
| 102 |
+
|
| 103 |
+
Sample code for VertexAI initialization:
|
| 104 |
+
|
| 105 |
+
```typescript
|
| 106 |
+
import { GoogleGenAI } from '@google/genai';
|
| 107 |
+
|
| 108 |
+
const ai = new GoogleGenAI({
|
| 109 |
+
vertexai: true,
|
| 110 |
+
project: 'your_project',
|
| 111 |
+
location: 'your_location',
|
| 112 |
+
});
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
### (Optional) (NodeJS only) Using environment variables:
|
| 116 |
+
|
| 117 |
+
For NodeJS environments, you can create a client by configuring the necessary
|
| 118 |
+
environment variables. Configuration setup instructions depends on whether
|
| 119 |
+
you're using the Gemini Developer API or the Gemini API in Vertex AI.
|
| 120 |
+
|
| 121 |
+
**Gemini Developer API:** Set `GOOGLE_API_KEY` as shown below:
|
| 122 |
+
|
| 123 |
+
```bash
|
| 124 |
+
export GOOGLE_API_KEY='your-api-key'
|
| 125 |
+
```
|
| 126 |
+
|
| 127 |
+
**Gemini API on Vertex AI:** Set `GOOGLE_GENAI_USE_VERTEXAI`,
|
| 128 |
+
`GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION`, as shown below:
|
| 129 |
+
|
| 130 |
+
```bash
|
| 131 |
+
export GOOGLE_GENAI_USE_VERTEXAI=true
|
| 132 |
+
export GOOGLE_CLOUD_PROJECT='your-project-id'
|
| 133 |
+
export GOOGLE_CLOUD_LOCATION='us-central1'
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
```typescript
|
| 137 |
+
import {GoogleGenAI} from '@google/genai';
|
| 138 |
+
|
| 139 |
+
const ai = new GoogleGenAI();
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
## API Selection
|
| 143 |
+
|
| 144 |
+
By default, the SDK uses the beta API endpoints provided by Google to support
|
| 145 |
+
preview features in the APIs. The stable API endpoints can be selected by
|
| 146 |
+
setting the API version to `v1`.
|
| 147 |
+
|
| 148 |
+
To set the API version use `apiVersion`. For example, to set the API version to
|
| 149 |
+
`v1` for Vertex AI:
|
| 150 |
+
|
| 151 |
+
```typescript
|
| 152 |
+
const ai = new GoogleGenAI({
|
| 153 |
+
vertexai: true,
|
| 154 |
+
project: 'your_project',
|
| 155 |
+
location: 'your_location',
|
| 156 |
+
apiVersion: 'v1'
|
| 157 |
+
});
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
To set the API version to `v1alpha` for the Gemini Developer API:
|
| 161 |
+
|
| 162 |
+
```typescript
|
| 163 |
+
const ai = new GoogleGenAI({
|
| 164 |
+
apiKey: 'GEMINI_API_KEY',
|
| 165 |
+
apiVersion: 'v1alpha'
|
| 166 |
+
});
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
## GoogleGenAI overview
|
| 170 |
+
|
| 171 |
+
All API features are accessed through an instance of the `GoogleGenAI` classes.
|
| 172 |
+
The submodules bundle together related API methods:
|
| 173 |
+
|
| 174 |
+
- [`ai.models`](https://googleapis.github.io/js-genai/release_docs/classes/models.Models.html):
|
| 175 |
+
Use `models` to query models (`generateContent`, `generateImages`, ...), or
|
| 176 |
+
examine their metadata.
|
| 177 |
+
- [`ai.caches`](https://googleapis.github.io/js-genai/release_docs/classes/caches.Caches.html):
|
| 178 |
+
Create and manage `caches` to reduce costs when repeatedly using the same
|
| 179 |
+
large prompt prefix.
|
| 180 |
+
- [`ai.chats`](https://googleapis.github.io/js-genai/release_docs/classes/chats.Chats.html):
|
| 181 |
+
Create local stateful `chat` objects to simplify multi turn interactions.
|
| 182 |
+
- [`ai.files`](https://googleapis.github.io/js-genai/release_docs/classes/files.Files.html):
|
| 183 |
+
Upload `files` to the API and reference them in your prompts.
|
| 184 |
+
This reduces bandwidth if you use a file many times, and handles files too
|
| 185 |
+
large to fit inline with your prompt.
|
| 186 |
+
- [`ai.live`](https://googleapis.github.io/js-genai/release_docs/classes/live.Live.html):
|
| 187 |
+
Start a `live` session for real time interaction, allows text + audio + video
|
| 188 |
+
input, and text or audio output.
|
| 189 |
+
|
| 190 |
+
## Samples
|
| 191 |
+
|
| 192 |
+
More samples can be found in the
|
| 193 |
+
[github samples directory](https://github.com/googleapis/js-genai/tree/main/sdk-samples).
|
| 194 |
+
|
| 195 |
+
### Streaming
|
| 196 |
+
|
| 197 |
+
For quicker, more responsive API interactions use the `generateContentStream`
|
| 198 |
+
method which yields chunks as they're generated:
|
| 199 |
+
|
| 200 |
+
```typescript
|
| 201 |
+
import {GoogleGenAI} from '@google/genai';
|
| 202 |
+
const GEMINI_API_KEY = process.env.GEMINI_API_KEY;
|
| 203 |
+
|
| 204 |
+
const ai = new GoogleGenAI({apiKey: GEMINI_API_KEY});
|
| 205 |
+
|
| 206 |
+
async function main() {
|
| 207 |
+
const response = await ai.models.generateContentStream({
|
| 208 |
+
model: 'gemini-2.0-flash-001',
|
| 209 |
+
contents: 'Write a 100-word poem.',
|
| 210 |
+
});
|
| 211 |
+
for await (const chunk of response) {
|
| 212 |
+
console.log(chunk.text);
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
main();
|
| 217 |
+
```
|
| 218 |
+
|
| 219 |
+
### Function Calling
|
| 220 |
+
|
| 221 |
+
To let Gemini to interact with external systems, you can provide
|
| 222 |
+
`functionDeclaration` objects as `tools`. To use these tools it's a 4 step
|
| 223 |
+
|
| 224 |
+
1. **Declare the function name, description, and parametersJsonSchema**
|
| 225 |
+
2. **Call `generateContent` with function calling enabled**
|
| 226 |
+
3. **Use the returned `FunctionCall` parameters to call your actual function**
|
| 227 |
+
3. **Send the result back to the model (with history, easier in `ai.chat`)
|
| 228 |
+
as a `FunctionResponse`**
|
| 229 |
+
|
| 230 |
+
```typescript
|
| 231 |
+
import {GoogleGenAI, FunctionCallingConfigMode, FunctionDeclaration, Type} from '@google/genai';
|
| 232 |
+
const GEMINI_API_KEY = process.env.GEMINI_API_KEY;
|
| 233 |
+
|
| 234 |
+
async function main() {
|
| 235 |
+
const controlLightDeclaration: FunctionDeclaration = {
|
| 236 |
+
name: 'controlLight',
|
| 237 |
+
parametersJsonSchema: {
|
| 238 |
+
type: 'object',
|
| 239 |
+
properties:{
|
| 240 |
+
brightness: {
|
| 241 |
+
type:'number',
|
| 242 |
+
},
|
| 243 |
+
colorTemperature: {
|
| 244 |
+
type:'string',
|
| 245 |
+
},
|
| 246 |
+
},
|
| 247 |
+
required: ['brightness', 'colorTemperature'],
|
| 248 |
+
},
|
| 249 |
+
};
|
| 250 |
+
|
| 251 |
+
const ai = new GoogleGenAI({apiKey: GEMINI_API_KEY});
|
| 252 |
+
const response = await ai.models.generateContent({
|
| 253 |
+
model: 'gemini-2.0-flash-001',
|
| 254 |
+
contents: 'Dim the lights so the room feels cozy and warm.',
|
| 255 |
+
config: {
|
| 256 |
+
toolConfig: {
|
| 257 |
+
functionCallingConfig: {
|
| 258 |
+
// Force it to call any function
|
| 259 |
+
mode: FunctionCallingConfigMode.ANY,
|
| 260 |
+
allowedFunctionNames: ['controlLight'],
|
| 261 |
+
}
|
| 262 |
+
},
|
| 263 |
+
tools: [{functionDeclarations: [controlLightDeclaration]}]
|
| 264 |
+
}
|
| 265 |
+
});
|
| 266 |
+
|
| 267 |
+
console.log(response.functionCalls);
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
main();
|
| 271 |
+
```
|
| 272 |
+
|
| 273 |
+
#### Model Context Protocol (MCP) support (experimental)
|
| 274 |
+
|
| 275 |
+
Built-in [MCP](https://modelcontextprotocol.io/introduction) support is an
|
| 276 |
+
experimental feature. You can pass a local MCP server as a tool directly.
|
| 277 |
+
|
| 278 |
+
```javascript
|
| 279 |
+
import { GoogleGenAI, FunctionCallingConfigMode , mcpToTool} from '@google/genai';
|
| 280 |
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
| 281 |
+
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
| 282 |
+
|
| 283 |
+
// Create server parameters for stdio connection
|
| 284 |
+
const serverParams = new StdioClientTransport({
|
| 285 |
+
command: "npx", // Executable
|
| 286 |
+
args: ["-y", "@philschmid/weather-mcp"] // MCP Server
|
| 287 |
+
});
|
| 288 |
+
|
| 289 |
+
const client = new Client(
|
| 290 |
+
{
|
| 291 |
+
name: "example-client",
|
| 292 |
+
version: "1.0.0"
|
| 293 |
+
}
|
| 294 |
+
);
|
| 295 |
+
|
| 296 |
+
// Configure the client
|
| 297 |
+
const ai = new GoogleGenAI({});
|
| 298 |
+
|
| 299 |
+
// Initialize the connection between client and server
|
| 300 |
+
await client.connect(serverParams);
|
| 301 |
+
|
| 302 |
+
// Send request to the model with MCP tools
|
| 303 |
+
const response = await ai.models.generateContent({
|
| 304 |
+
model: "gemini-2.5-flash",
|
| 305 |
+
contents: `What is the weather in London in ${new Date().toLocaleDateString()}?`,
|
| 306 |
+
config: {
|
| 307 |
+
tools: [mcpToTool(client)], // uses the session, will automatically call the tool using automatic function calling
|
| 308 |
+
},
|
| 309 |
+
});
|
| 310 |
+
console.log(response.text);
|
| 311 |
+
|
| 312 |
+
// Close the connection
|
| 313 |
+
await client.close();
|
| 314 |
+
```
|
| 315 |
+
|
| 316 |
+
### Generate Content
|
| 317 |
+
|
| 318 |
+
#### How to structure `contents` argument for `generateContent`
|
| 319 |
+
|
| 320 |
+
The SDK allows you to specify the following types in the `contents` parameter:
|
| 321 |
+
|
| 322 |
+
#### Content
|
| 323 |
+
|
| 324 |
+
- `Content`: The SDK will wrap the singular `Content` instance in an array which
|
| 325 |
+
contains only the given content instance
|
| 326 |
+
- `Content[]`: No transformation happens
|
| 327 |
+
|
| 328 |
+
#### Part
|
| 329 |
+
|
| 330 |
+
Parts will be aggregated on a singular Content, with role 'user'.
|
| 331 |
+
|
| 332 |
+
- `Part | string`: The SDK will wrap the `string` or `Part` in a `Content`
|
| 333 |
+
instance with role 'user'.
|
| 334 |
+
- `Part[] | string[]`: The SDK will wrap the full provided list into a single
|
| 335 |
+
`Content` with role 'user'.
|
| 336 |
+
|
| 337 |
+
**_NOTE:_** This doesn't apply to `FunctionCall` and `FunctionResponse` parts,
|
| 338 |
+
if you are specifying those, you need to explicitly provide the full
|
| 339 |
+
`Content[]` structure making it explicit which Parts are 'spoken' by the model,
|
| 340 |
+
or the user. The SDK will throw an exception if you try this.
|
| 341 |
+
|
| 342 |
+
## Error Handling
|
| 343 |
+
|
| 344 |
+
To handle errors raised by the API, the SDK provides this [ApiError](https://github.com/googleapis/js-genai/blob/main/src/errors.ts) class.
|
| 345 |
+
|
| 346 |
+
```typescript
|
| 347 |
+
import {GoogleGenAI} from '@google/genai';
|
| 348 |
+
const GEMINI_API_KEY = process.env.GEMINI_API_KEY;
|
| 349 |
+
|
| 350 |
+
const ai = new GoogleGenAI({apiKey: GEMINI_API_KEY});
|
| 351 |
+
|
| 352 |
+
async function main() {
|
| 353 |
+
await ai.models.generateContent({
|
| 354 |
+
model: 'non-existent-model',
|
| 355 |
+
contents: 'Write a 100-word poem.',
|
| 356 |
+
}).catch((e) => {
|
| 357 |
+
console.error('error name: ', e.name);
|
| 358 |
+
console.error('error message: ', e.message);
|
| 359 |
+
console.error('error status: ', e.status);
|
| 360 |
+
});
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
main();
|
| 364 |
+
```
|
| 365 |
+
|
| 366 |
+
## How is this different from the other Google AI SDKs
|
| 367 |
+
This SDK (`@google/genai`) is Google Deepmind’s "vanilla" SDK for its generative
|
| 368 |
+
AI offerings, and is where Google Deepmind adds new AI features.
|
| 369 |
+
|
| 370 |
+
Models hosted either on the [Vertex AI platform](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview) or the [Gemini Developer platform](https://ai.google.dev/gemini-api/docs) are accessible through this SDK.
|
| 371 |
+
|
| 372 |
+
Other SDKs may be offering additional AI frameworks on top of this SDK, or may
|
| 373 |
+
be targeting specific project environments (like Firebase).
|
| 374 |
+
|
| 375 |
+
The `@google/generative_language` and `@google-cloud/vertexai` SDKs are previous
|
| 376 |
+
iterations of this SDK and are no longer receiving new Gemini 2.0+ features.
|
| 377 |
+
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/genai.d.ts
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/index.cjs
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/index.mjs
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/index.mjs.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/node/index.cjs
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/node/index.mjs
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/node/index.mjs.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/node/node.d.ts
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/web/index.mjs
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/web/index.mjs.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/dist/web/web.d.ts
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node/package.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@google/genai/node",
|
| 3 |
+
"main": "../dist/node/index.js"
|
| 4 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/.bin/uuid
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30b5422b6c95ccdc402effd7d3354ca6a6bce621cf21d0379749ddf1f96c1ad7
|
| 3 |
+
size 44
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/CHANGELOG.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Changelog
|
| 2 |
+
|
| 3 |
+
## [6.7.1](https://github.com/googleapis/gaxios/compare/v6.7.0...v6.7.1) (2024-08-13)
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
### Bug Fixes
|
| 7 |
+
|
| 8 |
+
* Release uuid rollback ([#641](https://github.com/googleapis/gaxios/issues/641)) ([2e21115](https://github.com/googleapis/gaxios/commit/2e211158d5351d81de4e84f999ec3b41475ec0cd))
|
| 9 |
+
|
| 10 |
+
## [6.7.0](https://github.com/googleapis/gaxios/compare/v6.6.0...v6.7.0) (2024-06-27)
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
### Features
|
| 14 |
+
|
| 15 |
+
* Add additional retry configuration options ([#634](https://github.com/googleapis/gaxios/issues/634)) ([cb5c833](https://github.com/googleapis/gaxios/commit/cb5c833a9750bf6d0c0f8e27992bb44bd953566c))
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
### Bug Fixes
|
| 19 |
+
|
| 20 |
+
* **deps:** Update dependency uuid to v10 ([#629](https://github.com/googleapis/gaxios/issues/629)) ([6ff684e](https://github.com/googleapis/gaxios/commit/6ff684e6e6e5f4e5e6d270685b2ac0e4d28bc964))
|
| 21 |
+
|
| 22 |
+
## [6.6.0](https://github.com/googleapis/gaxios/compare/v6.5.0...v6.6.0) (2024-05-15)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
### Features
|
| 26 |
+
|
| 27 |
+
* Add request and response interceptors ([#619](https://github.com/googleapis/gaxios/issues/619)) ([059fe77](https://github.com/googleapis/gaxios/commit/059fe7708e6d98cc44814ec1fad7d412668a05b9))
|
| 28 |
+
|
| 29 |
+
## [6.5.0](https://github.com/googleapis/gaxios/compare/v6.4.0...v6.5.0) (2024-04-09)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
### Features
|
| 33 |
+
|
| 34 |
+
* Retry `408` by Default ([#616](https://github.com/googleapis/gaxios/issues/616)) ([9331f79](https://github.com/googleapis/gaxios/commit/9331f79f9c9d0c1f4f1f995e1928323f4feb5427))
|
| 35 |
+
* Support `proxy` option ([#614](https://github.com/googleapis/gaxios/issues/614)) ([2d14b3f](https://github.com/googleapis/gaxios/commit/2d14b3f54bc97111cb184cecf2379b55ceaca3c2))
|
| 36 |
+
|
| 37 |
+
## [6.4.0](https://github.com/googleapis/gaxios/compare/v6.3.0...v6.4.0) (2024-04-03)
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
### Features
|
| 41 |
+
|
| 42 |
+
* Enhance Error Redaction ([#609](https://github.com/googleapis/gaxios/issues/609)) ([b1d2875](https://github.com/googleapis/gaxios/commit/b1d28759110f91b37746f9b88aba92bf52df2fcc))
|
| 43 |
+
* Support multipart/related requests ([#610](https://github.com/googleapis/gaxios/issues/610)) ([086c824](https://github.com/googleapis/gaxios/commit/086c8240652bd893dff0dd4c097ef00f5777564e))
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
### Bug Fixes
|
| 47 |
+
|
| 48 |
+
* Error Redactor Case-Insensitive Matching ([#613](https://github.com/googleapis/gaxios/issues/613)) ([05e65ef](https://github.com/googleapis/gaxios/commit/05e65efda6d13e760d4f7f87be7d6cebeba3cc64))
|
| 49 |
+
|
| 50 |
+
## [6.3.0](https://github.com/googleapis/gaxios/compare/v6.2.0...v6.3.0) (2024-02-01)
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
### Features
|
| 54 |
+
|
| 55 |
+
* Support URL objects ([#598](https://github.com/googleapis/gaxios/issues/598)) ([ef40c61](https://github.com/googleapis/gaxios/commit/ef40c61fabf0a48b2f08be085ee0c56dc32cf78c))
|
| 56 |
+
|
| 57 |
+
## [6.2.0](https://github.com/googleapis/gaxios/compare/v6.1.1...v6.2.0) (2024-01-31)
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
### Features
|
| 61 |
+
|
| 62 |
+
* Extend `instanceof` Support for GaxiosError ([#593](https://github.com/googleapis/gaxios/issues/593)) ([4fd1fe2](https://github.com/googleapis/gaxios/commit/4fd1fe2c91b9888c4f976cf91e752d407b99ec75))
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
### Bug Fixes
|
| 66 |
+
|
| 67 |
+
* Do Not Mutate Config for Redacted Retries ([#597](https://github.com/googleapis/gaxios/issues/597)) ([4d1a551](https://github.com/googleapis/gaxios/commit/4d1a55134940031a1e0ff2392ab0b08c186166f0))
|
| 68 |
+
* Return text when content type is text/* ([#579](https://github.com/googleapis/gaxios/issues/579)) ([3cc1c76](https://github.com/googleapis/gaxios/commit/3cc1c76a08d98daac01c83bed6f9480320ec0a37))
|
| 69 |
+
|
| 70 |
+
## [6.1.1](https://github.com/googleapis/gaxios/compare/v6.1.0...v6.1.1) (2023-09-07)
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
### Bug Fixes
|
| 74 |
+
|
| 75 |
+
* Don't throw an error within a `GaxiosError` ([#569](https://github.com/googleapis/gaxios/issues/569)) ([035d9dd](https://github.com/googleapis/gaxios/commit/035d9dd833c3ad63148bc50facaee421f4792192))
|
| 76 |
+
|
| 77 |
+
## [6.1.0](https://github.com/googleapis/gaxios/compare/v6.0.4...v6.1.0) (2023-08-11)
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
### Features
|
| 81 |
+
|
| 82 |
+
* Prevent Auth Logging by Default ([#565](https://github.com/googleapis/gaxios/issues/565)) ([b28e562](https://github.com/googleapis/gaxios/commit/b28e5628f5964e2ecc04cc1df8a54948567a4b48))
|
| 83 |
+
|
| 84 |
+
## [6.0.4](https://github.com/googleapis/gaxios/compare/v6.0.3...v6.0.4) (2023-08-03)
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
### Bug Fixes
|
| 88 |
+
|
| 89 |
+
* **deps:** Update https-proxy-agent to 7.0.1 and fix imports and tests ([#560](https://github.com/googleapis/gaxios/issues/560)) ([5c877e2](https://github.com/googleapis/gaxios/commit/5c877e28c3c9336a87b50536c074cb215b779d8e))
|
| 90 |
+
|
| 91 |
+
## [6.0.3](https://github.com/googleapis/gaxios/compare/v6.0.2...v6.0.3) (2023-07-24)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
### Bug Fixes
|
| 95 |
+
|
| 96 |
+
* Handle invalid json when Content-Type=application/json ([#558](https://github.com/googleapis/gaxios/issues/558)) ([71602eb](https://github.com/googleapis/gaxios/commit/71602ebc2ab18d5af904b152723756f57fb13bce))
|
| 97 |
+
|
| 98 |
+
## [6.0.2](https://github.com/googleapis/gaxios/compare/v6.0.1...v6.0.2) (2023-07-20)
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
### Bug Fixes
|
| 102 |
+
|
| 103 |
+
* Revert attempting to convert 'text/plain', leave as data in GaxiosError ([#556](https://github.com/googleapis/gaxios/issues/556)) ([d603bde](https://github.com/googleapis/gaxios/commit/d603bde35f698564c028108d24c6891cec3b8ea1))
|
| 104 |
+
|
| 105 |
+
## [6.0.1](https://github.com/googleapis/gaxios/compare/v6.0.0...v6.0.1) (2023-07-20)
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
### Bug Fixes
|
| 109 |
+
|
| 110 |
+
* Add text to responseType switch statement ([#554](https://github.com/googleapis/gaxios/issues/554)) ([899cf1f](https://github.com/googleapis/gaxios/commit/899cf1fb088f49927624d526f6de212837a31b9d))
|
| 111 |
+
|
| 112 |
+
## [6.0.0](https://github.com/googleapis/gaxios/compare/v5.1.3...v6.0.0) (2023-07-12)
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
### ⚠ BREAKING CHANGES
|
| 116 |
+
|
| 117 |
+
* add status as a number to GaxiosError, change code to error code as a string ([#552](https://github.com/googleapis/gaxios/issues/552))
|
| 118 |
+
* migrate to Node 14 ([#548](https://github.com/googleapis/gaxios/issues/548))
|
| 119 |
+
* examine response content-type if no contentType is set ([#535](https://github.com/googleapis/gaxios/issues/535))
|
| 120 |
+
|
| 121 |
+
### Bug Fixes
|
| 122 |
+
|
| 123 |
+
* Add status as a number to GaxiosError, change code to error code as a string ([#552](https://github.com/googleapis/gaxios/issues/552)) ([88ba2e9](https://github.com/googleapis/gaxios/commit/88ba2e99e32b66d84725c9ea9ad95152bd1dc653))
|
| 124 |
+
* Examine response content-type if no contentType is set ([#535](https://github.com/googleapis/gaxios/issues/535)) ([cd8ca7b](https://github.com/googleapis/gaxios/commit/cd8ca7b209f0ba932082a80ace8fec608a71facf))
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
### Miscellaneous Chores
|
| 128 |
+
|
| 129 |
+
* Migrate to Node 14 ([#548](https://github.com/googleapis/gaxios/issues/548)) ([b9b26eb](https://github.com/googleapis/gaxios/commit/b9b26eb2c4af35633efd91770aa24c4b5d9019b4))
|
| 130 |
+
|
| 131 |
+
## [5.1.3](https://github.com/googleapis/gaxios/compare/v5.1.2...v5.1.3) (2023-07-05)
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
### Bug Fixes
|
| 135 |
+
|
| 136 |
+
* Translate GaxiosError message to object regardless of return type (return data as default) ([#546](https://github.com/googleapis/gaxios/issues/546)) ([adfd570](https://github.com/googleapis/gaxios/commit/adfd57068a98d03921d5383fed11a652a21d59dd))
|
| 137 |
+
|
| 138 |
+
## [5.1.2](https://github.com/googleapis/gaxios/compare/v5.1.1...v5.1.2) (2023-06-25)
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
### Bug Fixes
|
| 142 |
+
|
| 143 |
+
* Revert changes to error handling due to downstream breakage ([#544](https://github.com/googleapis/gaxios/issues/544)) ([64fbf07](https://github.com/googleapis/gaxios/commit/64fbf07f3697f40b75a9e7dbe8bff7f6243a9e12))
|
| 144 |
+
|
| 145 |
+
## [5.1.1](https://github.com/googleapis/gaxios/compare/v5.1.0...v5.1.1) (2023-06-23)
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
### Bug Fixes
|
| 149 |
+
|
| 150 |
+
* Translate GaxiosError message to object regardless of return type ([#537](https://github.com/googleapis/gaxios/issues/537)) ([563c653](https://github.com/googleapis/gaxios/commit/563c6537a06bc64d5c6e918090c00ec7a586cecb))
|
| 151 |
+
|
| 152 |
+
## [5.1.0](https://github.com/googleapis/gaxios/compare/v5.0.2...v5.1.0) (2023-03-06)
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
### Features
|
| 156 |
+
|
| 157 |
+
* Add support for custom backoff ([#498](https://github.com/googleapis/gaxios/issues/498)) ([4a34467](https://github.com/googleapis/gaxios/commit/4a344678110864d97818a8272ebcc5e1c4921b52))
|
| 158 |
+
|
| 159 |
+
## [5.0.2](https://github.com/googleapis/gaxios/compare/v5.0.1...v5.0.2) (2022-09-09)
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
### Bug Fixes
|
| 163 |
+
|
| 164 |
+
* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/gaxios/issues/1553)) ([#501](https://github.com/googleapis/gaxios/issues/501)) ([6f58d1e](https://github.com/googleapis/gaxios/commit/6f58d1e80ce6b196d17fbc75dc47d8d20804920a))
|
| 165 |
+
* use google-gax v3.3.0 ([6f58d1e](https://github.com/googleapis/gaxios/commit/6f58d1e80ce6b196d17fbc75dc47d8d20804920a))
|
| 166 |
+
|
| 167 |
+
## [5.0.1](https://github.com/googleapis/gaxios/compare/v5.0.0...v5.0.1) (2022-07-04)
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
### Bug Fixes
|
| 171 |
+
|
| 172 |
+
* **types:** loosen AbortSignal type ([5a379ca](https://github.com/googleapis/gaxios/commit/5a379ca123f08f286c4774711a7a3293bffc1ea6))
|
| 173 |
+
|
| 174 |
+
## [5.0.0](https://github.com/googleapis/gaxios/compare/v4.3.3...v5.0.0) (2022-04-20)
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
### ⚠ BREAKING CHANGES
|
| 178 |
+
|
| 179 |
+
* drop node 10 from engines list, update typescript to 4.6.3 (#477)
|
| 180 |
+
|
| 181 |
+
### Features
|
| 182 |
+
|
| 183 |
+
* handling missing process global ([c30395b](https://github.com/googleapis/gaxios/commit/c30395bbf34d889e75c7c72a7dff701dc7a98244))
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
### Build System
|
| 187 |
+
|
| 188 |
+
* drop node 10 from engines list, update typescript to 4.6.3 ([#477](https://github.com/googleapis/gaxios/issues/477)) ([a926962](https://github.com/googleapis/gaxios/commit/a9269624a70aa6305599cc0af079d0225ed6af50))
|
| 189 |
+
|
| 190 |
+
### [4.3.3](https://github.com/googleapis/gaxios/compare/v4.3.2...v4.3.3) (2022-04-08)
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
### Bug Fixes
|
| 194 |
+
|
| 195 |
+
* do not stringify form data ([#475](https://github.com/googleapis/gaxios/issues/475)) ([17370dc](https://github.com/googleapis/gaxios/commit/17370dcdfd4568d7f3f0855961030d238166836a))
|
| 196 |
+
|
| 197 |
+
### [4.3.2](https://www.github.com/googleapis/gaxios/compare/v4.3.1...v4.3.2) (2021-09-14)
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
### Bug Fixes
|
| 201 |
+
|
| 202 |
+
* address codeql warning with hostname matches ([#415](https://www.github.com/googleapis/gaxios/issues/415)) ([5a4d060](https://www.github.com/googleapis/gaxios/commit/5a4d06019343aa08e1bcf8e05108e22ac3b12636))
|
| 203 |
+
|
| 204 |
+
### [4.3.1](https://www.github.com/googleapis/gaxios/compare/v4.3.0...v4.3.1) (2021-09-02)
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
### Bug Fixes
|
| 208 |
+
|
| 209 |
+
* **build:** switch primary branch to main ([#427](https://www.github.com/googleapis/gaxios/issues/427)) ([819219e](https://www.github.com/googleapis/gaxios/commit/819219ed742814259c525bdf5721b28234019c08))
|
| 210 |
+
|
| 211 |
+
## [4.3.0](https://www.github.com/googleapis/gaxios/compare/v4.2.1...v4.3.0) (2021-05-26)
|
| 212 |
+
|
| 213 |
+
|
| 214 |
+
### Features
|
| 215 |
+
|
| 216 |
+
* allow cert and key to be provided for mTLS ([#399](https://www.github.com/googleapis/gaxios/issues/399)) ([d74ab91](https://www.github.com/googleapis/gaxios/commit/d74ab9125d581e46d655614729872e79317c740d))
|
| 217 |
+
|
| 218 |
+
### [4.2.1](https://www.github.com/googleapis/gaxios/compare/v4.2.0...v4.2.1) (2021-04-20)
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
### Bug Fixes
|
| 222 |
+
|
| 223 |
+
* **deps:** upgrade webpack and karma-webpack ([#379](https://www.github.com/googleapis/gaxios/issues/379)) ([75c9013](https://www.github.com/googleapis/gaxios/commit/75c90132e99c2f960c01e0faf0f8e947c920aa73))
|
| 224 |
+
|
| 225 |
+
## [4.2.0](https://www.github.com/googleapis/gaxios/compare/v4.1.0...v4.2.0) (2021-03-01)
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
### Features
|
| 229 |
+
|
| 230 |
+
* handle application/x-www-form-urlencoded/Buffer ([#374](https://www.github.com/googleapis/gaxios/issues/374)) ([ce21e9c](https://www.github.com/googleapis/gaxios/commit/ce21e9ccd228578a9f90bb2fddff797cec4a9402))
|
| 231 |
+
|
| 232 |
+
## [4.1.0](https://www.github.com/googleapis/gaxios/compare/v4.0.1...v4.1.0) (2020-12-08)
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
### Features
|
| 236 |
+
|
| 237 |
+
* add an option to configure the fetch impl ([#342](https://www.github.com/googleapis/gaxios/issues/342)) ([2e081ef](https://www.github.com/googleapis/gaxios/commit/2e081ef161d84aa435788e8d525d393dc7964117))
|
| 238 |
+
* add no_proxy env variable ([#361](https://www.github.com/googleapis/gaxios/issues/361)) ([efe72a7](https://www.github.com/googleapis/gaxios/commit/efe72a71de81d466160dde5da551f7a41acc3ac4))
|
| 239 |
+
|
| 240 |
+
### [4.0.1](https://www.github.com/googleapis/gaxios/compare/v4.0.0...v4.0.1) (2020-10-27)
|
| 241 |
+
|
| 242 |
+
|
| 243 |
+
### Bug Fixes
|
| 244 |
+
|
| 245 |
+
* prevent bonus ? with empty qs params ([#357](https://www.github.com/googleapis/gaxios/issues/357)) ([b155f76](https://www.github.com/googleapis/gaxios/commit/b155f76cbc4c234da1d99c26691296702342c205))
|
| 246 |
+
|
| 247 |
+
## [4.0.0](https://www.github.com/googleapis/gaxios/compare/v3.2.0...v4.0.0) (2020-10-21)
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
### ⚠ BREAKING CHANGES
|
| 251 |
+
|
| 252 |
+
* parameters in `url` and parameters provided via params will now be combined.
|
| 253 |
+
|
| 254 |
+
### Bug Fixes
|
| 255 |
+
|
| 256 |
+
* drop requirement on URL/combine url and params ([#338](https://www.github.com/googleapis/gaxios/issues/338)) ([e166bc6](https://www.github.com/googleapis/gaxios/commit/e166bc6721fd979070ab3d9c69b71ffe9ee061c7))
|
| 257 |
+
|
| 258 |
+
## [3.2.0](https://www.github.com/googleapis/gaxios/compare/v3.1.0...v3.2.0) (2020-09-14)
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
### Features
|
| 262 |
+
|
| 263 |
+
* add initial retry delay, and set default to 100ms ([#336](https://www.github.com/googleapis/gaxios/issues/336)) ([870326b](https://www.github.com/googleapis/gaxios/commit/870326b8245f16fafde0b0c32cfd2f277946e3a1))
|
| 264 |
+
|
| 265 |
+
## [3.1.0](https://www.github.com/googleapis/gaxios/compare/v3.0.4...v3.1.0) (2020-07-30)
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
### Features
|
| 269 |
+
|
| 270 |
+
* pass default adapter to adapter option ([#319](https://www.github.com/googleapis/gaxios/issues/319)) ([cf06bd9](https://www.github.com/googleapis/gaxios/commit/cf06bd9f51cbe707ed5973e390d31a091d4537c1))
|
| 271 |
+
|
| 272 |
+
### [3.0.4](https://www.github.com/googleapis/gaxios/compare/v3.0.3...v3.0.4) (2020-07-09)
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
### Bug Fixes
|
| 276 |
+
|
| 277 |
+
* typeo in nodejs .gitattribute ([#306](https://www.github.com/googleapis/gaxios/issues/306)) ([8514672](https://www.github.com/googleapis/gaxios/commit/8514672f9d56bc6f077dcbab050b3342d4e343c6))
|
| 278 |
+
|
| 279 |
+
### [3.0.3](https://www.github.com/googleapis/gaxios/compare/v3.0.2...v3.0.3) (2020-04-20)
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
### Bug Fixes
|
| 283 |
+
|
| 284 |
+
* apache license URL ([#468](https://www.github.com/googleapis/gaxios/issues/468)) ([#272](https://www.github.com/googleapis/gaxios/issues/272)) ([cf1b7cb](https://www.github.com/googleapis/gaxios/commit/cf1b7cb66e4c98405236834e63349931b4f35b90))
|
| 285 |
+
|
| 286 |
+
### [3.0.2](https://www.github.com/googleapis/gaxios/compare/v3.0.1...v3.0.2) (2020-03-24)
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
### Bug Fixes
|
| 290 |
+
|
| 291 |
+
* continue replacing application/x-www-form-urlencoded with application/json ([#263](https://www.github.com/googleapis/gaxios/issues/263)) ([dca176d](https://www.github.com/googleapis/gaxios/commit/dca176df0990f2c22255f9764405c496ea07ada2))
|
| 292 |
+
|
| 293 |
+
### [3.0.1](https://www.github.com/googleapis/gaxios/compare/v3.0.0...v3.0.1) (2020-03-23)
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
### Bug Fixes
|
| 297 |
+
|
| 298 |
+
* allow an alternate JSON content-type to be set ([#257](https://www.github.com/googleapis/gaxios/issues/257)) ([698a29f](https://www.github.com/googleapis/gaxios/commit/698a29ff3b22f30ea99ad190c4592940bef88f1f))
|
| 299 |
+
|
| 300 |
+
## [3.0.0](https://www.github.com/googleapis/gaxios/compare/v2.3.2...v3.0.0) (2020-03-19)
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
### ⚠ BREAKING CHANGES
|
| 304 |
+
|
| 305 |
+
* **deps:** TypeScript introduced breaking changes in generated code in 3.7.x
|
| 306 |
+
* drop Node 8 from engines field (#254)
|
| 307 |
+
|
| 308 |
+
### Features
|
| 309 |
+
|
| 310 |
+
* drop Node 8 from engines field ([#254](https://www.github.com/googleapis/gaxios/issues/254)) ([8c9fff7](https://www.github.com/googleapis/gaxios/commit/8c9fff7f92f70f029292c906c62d194c1d58827d))
|
| 311 |
+
* **deps:** updates to latest TypeScript ([#253](https://www.github.com/googleapis/gaxios/issues/253)) ([054267b](https://www.github.com/googleapis/gaxios/commit/054267bf12e1801c134e3b5cae92dcc5ea041fab))
|
| 312 |
+
|
| 313 |
+
### [2.3.2](https://www.github.com/googleapis/gaxios/compare/v2.3.1...v2.3.2) (2020-02-28)
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
### Bug Fixes
|
| 317 |
+
|
| 318 |
+
* update github repo in package ([#239](https://www.github.com/googleapis/gaxios/issues/239)) ([7e750cb](https://www.github.com/googleapis/gaxios/commit/7e750cbaaa59812817d725c74fb9d364c4b71096))
|
| 319 |
+
|
| 320 |
+
### [2.3.1](https://www.github.com/googleapis/gaxios/compare/v2.3.0...v2.3.1) (2020-02-13)
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
### Bug Fixes
|
| 324 |
+
|
| 325 |
+
* **deps:** update dependency https-proxy-agent to v5 ([#233](https://www.github.com/googleapis/gaxios/issues/233)) ([56de0a8](https://www.github.com/googleapis/gaxios/commit/56de0a824a2f9622e3e4d4bdd41adccd812a30b4))
|
| 326 |
+
|
| 327 |
+
## [2.3.0](https://www.github.com/googleapis/gaxios/compare/v2.2.2...v2.3.0) (2020-01-31)
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
### Features
|
| 331 |
+
|
| 332 |
+
* add promise support for onRetryAttempt and shouldRetry ([#223](https://www.github.com/googleapis/gaxios/issues/223)) ([061afa3](https://www.github.com/googleapis/gaxios/commit/061afa381a51d39823e63accf3dacd16e191f3b9))
|
| 333 |
+
|
| 334 |
+
### [2.2.2](https://www.github.com/googleapis/gaxios/compare/v2.2.1...v2.2.2) (2020-01-08)
|
| 335 |
+
|
| 336 |
+
|
| 337 |
+
### Bug Fixes
|
| 338 |
+
|
| 339 |
+
* **build:** add publication configuration ([#218](https://www.github.com/googleapis/gaxios/issues/218)) ([43e581f](https://www.github.com/googleapis/gaxios/commit/43e581ff4ed5e79d72f6f29748a5eebb6bff1229))
|
| 340 |
+
|
| 341 |
+
### [2.2.1](https://www.github.com/googleapis/gaxios/compare/v2.2.0...v2.2.1) (2020-01-04)
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
### Bug Fixes
|
| 345 |
+
|
| 346 |
+
* **deps:** update dependency https-proxy-agent to v4 ([#201](https://www.github.com/googleapis/gaxios/issues/201)) ([5cdeef2](https://www.github.com/googleapis/gaxios/commit/5cdeef288a0c5c544c0dc2659aafbb2215d06c4b))
|
| 347 |
+
* remove retryDelay option ([#203](https://www.github.com/googleapis/gaxios/issues/203)) ([d21e08d](https://www.github.com/googleapis/gaxios/commit/d21e08d2aada980d39bc5ca7093d54452be2d646))
|
| 348 |
+
|
| 349 |
+
## [2.2.0](https://www.github.com/googleapis/gaxios/compare/v2.1.1...v2.2.0) (2019-12-05)
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
### Features
|
| 353 |
+
|
| 354 |
+
* populate GaxiosResponse with raw response information (res.url) ([#189](https://www.github.com/googleapis/gaxios/issues/189)) ([53a7f54](https://www.github.com/googleapis/gaxios/commit/53a7f54cc0f20320d7a6a21a9a9f36050cec2eec))
|
| 355 |
+
|
| 356 |
+
|
| 357 |
+
### Bug Fixes
|
| 358 |
+
|
| 359 |
+
* don't retry a request that is aborted intentionally ([#190](https://www.github.com/googleapis/gaxios/issues/190)) ([ba9777b](https://www.github.com/googleapis/gaxios/commit/ba9777b15b5262f8288a8bb3cca49a1de8427d8e))
|
| 360 |
+
* **deps:** pin TypeScript below 3.7.0 ([5373f07](https://www.github.com/googleapis/gaxios/commit/5373f0793a765965a8221ecad2f99257ed1b7444))
|
| 361 |
+
|
| 362 |
+
### [2.1.1](https://www.github.com/googleapis/gaxios/compare/v2.1.0...v2.1.1) (2019-11-15)
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
### Bug Fixes
|
| 366 |
+
|
| 367 |
+
* **docs:** snippets are now replaced in jsdoc comments ([#183](https://www.github.com/googleapis/gaxios/issues/183)) ([8dd1324](https://www.github.com/googleapis/gaxios/commit/8dd1324256590bd2f2e9015c813950e1cd8cb330))
|
| 368 |
+
|
| 369 |
+
## [2.1.0](https://www.github.com/googleapis/gaxios/compare/v2.0.3...v2.1.0) (2019-10-09)
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
### Bug Fixes
|
| 373 |
+
|
| 374 |
+
* **deps:** update dependency https-proxy-agent to v3 ([#172](https://www.github.com/googleapis/gaxios/issues/172)) ([4a38f35](https://www.github.com/googleapis/gaxios/commit/4a38f35))
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
### Features
|
| 378 |
+
|
| 379 |
+
* **TypeScript:** agent can now be passed as builder method, rather than agent instance ([c84ddd6](https://www.github.com/googleapis/gaxios/commit/c84ddd6))
|
| 380 |
+
|
| 381 |
+
### [2.0.3](https://www.github.com/googleapis/gaxios/compare/v2.0.2...v2.0.3) (2019-09-11)
|
| 382 |
+
|
| 383 |
+
|
| 384 |
+
### Bug Fixes
|
| 385 |
+
|
| 386 |
+
* do not override content-type if its given ([#158](https://www.github.com/googleapis/gaxios/issues/158)) ([f49e0e6](https://www.github.com/googleapis/gaxios/commit/f49e0e6))
|
| 387 |
+
* improve stream detection logic ([6c41537](https://www.github.com/googleapis/gaxios/commit/6c41537))
|
| 388 |
+
* revert header change ([#161](https://www.github.com/googleapis/gaxios/issues/161)) ([b0f6a8b](https://www.github.com/googleapis/gaxios/commit/b0f6a8b))
|
| 389 |
+
|
| 390 |
+
### [2.0.2](https://www.github.com/googleapis/gaxios/compare/v2.0.1...v2.0.2) (2019-07-23)
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
### Bug Fixes
|
| 394 |
+
|
| 395 |
+
* check for existence of fetch before using it ([#138](https://www.github.com/googleapis/gaxios/issues/138)) ([79eb58d](https://www.github.com/googleapis/gaxios/commit/79eb58d))
|
| 396 |
+
* **docs:** make anchors work in jsdoc ([#139](https://www.github.com/googleapis/gaxios/issues/139)) ([85103bb](https://www.github.com/googleapis/gaxios/commit/85103bb))
|
| 397 |
+
* prevent double option processing ([#142](https://www.github.com/googleapis/gaxios/issues/142)) ([19b4b3c](https://www.github.com/googleapis/gaxios/commit/19b4b3c))
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/README.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# gaxios
|
| 2 |
+
|
| 3 |
+
[](https://www.npmjs.org/package/gaxios)
|
| 4 |
+
[](https://codecov.io/gh/googleapis/gaxios)
|
| 5 |
+
[](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 |
+
const {request} = require('gaxios');
|
| 19 |
+
const res = await request({
|
| 20 |
+
url: 'https://www.googleapis.com/discovery/v1/apis/',
|
| 21 |
+
});
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
## Setting Defaults
|
| 25 |
+
|
| 26 |
+
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:
|
| 27 |
+
|
| 28 |
+
```js
|
| 29 |
+
const gaxios = require('gaxios');
|
| 30 |
+
gaxios.instance.defaults = {
|
| 31 |
+
baseURL: 'https://example.com'
|
| 32 |
+
headers: {
|
| 33 |
+
Authorization: 'SOME_TOKEN'
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
gaxios.request({url: '/data'}).then(...);
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
Note that setting default values will take precedence
|
| 40 |
+
over other authentication methods, i.e., application default credentials.
|
| 41 |
+
|
| 42 |
+
## Request Options
|
| 43 |
+
|
| 44 |
+
```ts
|
| 45 |
+
interface GaxiosOptions = {
|
| 46 |
+
// The url to which the request should be sent. Required.
|
| 47 |
+
url: string,
|
| 48 |
+
|
| 49 |
+
// The HTTP method to use for the request. Defaults to `GET`.
|
| 50 |
+
method: 'GET',
|
| 51 |
+
|
| 52 |
+
// The base Url to use for the request. Prepended to the `url` property above.
|
| 53 |
+
baseURL: 'https://example.com';
|
| 54 |
+
|
| 55 |
+
// The HTTP methods to be sent with the request.
|
| 56 |
+
headers: { 'some': 'header' },
|
| 57 |
+
|
| 58 |
+
// The data to send in the body of the request. Data objects will be
|
| 59 |
+
// serialized as JSON.
|
| 60 |
+
//
|
| 61 |
+
// Note: if you would like to provide a Content-Type header other than
|
| 62 |
+
// application/json you you must provide a string or readable stream, rather
|
| 63 |
+
// than an object:
|
| 64 |
+
// data: JSON.stringify({some: 'data'})
|
| 65 |
+
// data: fs.readFile('./some-data.jpeg')
|
| 66 |
+
data: {
|
| 67 |
+
some: 'data'
|
| 68 |
+
},
|
| 69 |
+
|
| 70 |
+
// The max size of the http response content in bytes allowed.
|
| 71 |
+
// Defaults to `0`, which is the same as unset.
|
| 72 |
+
maxContentLength: 2000,
|
| 73 |
+
|
| 74 |
+
// The max number of HTTP redirects to follow.
|
| 75 |
+
// Defaults to 100.
|
| 76 |
+
maxRedirects: 100,
|
| 77 |
+
|
| 78 |
+
// The querystring parameters that will be encoded using `qs` and
|
| 79 |
+
// appended to the url
|
| 80 |
+
params: {
|
| 81 |
+
querystring: 'parameters'
|
| 82 |
+
},
|
| 83 |
+
|
| 84 |
+
// By default, we use the `querystring` package in node core to serialize
|
| 85 |
+
// querystring parameters. You can override that and provide your
|
| 86 |
+
// own implementation.
|
| 87 |
+
paramsSerializer: (params) => {
|
| 88 |
+
return qs.stringify(params);
|
| 89 |
+
},
|
| 90 |
+
|
| 91 |
+
// The timeout for the HTTP request in milliseconds. Defaults to 0.
|
| 92 |
+
timeout: 1000,
|
| 93 |
+
|
| 94 |
+
// Optional method to override making the actual HTTP request. Useful
|
| 95 |
+
// for writing tests and instrumentation
|
| 96 |
+
adapter?: async (options, defaultAdapter) => {
|
| 97 |
+
const res = await defaultAdapter(options);
|
| 98 |
+
res.data = {
|
| 99 |
+
...res.data,
|
| 100 |
+
extraProperty: 'your extra property',
|
| 101 |
+
};
|
| 102 |
+
return res;
|
| 103 |
+
};
|
| 104 |
+
|
| 105 |
+
// The expected return type of the request. Options are:
|
| 106 |
+
// json | stream | blob | arraybuffer | text | unknown
|
| 107 |
+
// Defaults to `unknown`.
|
| 108 |
+
responseType: 'unknown',
|
| 109 |
+
|
| 110 |
+
// The node.js http agent to use for the request.
|
| 111 |
+
agent: someHttpsAgent,
|
| 112 |
+
|
| 113 |
+
// Custom function to determine if the response is valid based on the
|
| 114 |
+
// status code. Defaults to (>= 200 && < 300)
|
| 115 |
+
validateStatus: (status: number) => true,
|
| 116 |
+
|
| 117 |
+
// Implementation of `fetch` to use when making the API call. By default,
|
| 118 |
+
// will use the browser context if available, and fall back to `node-fetch`
|
| 119 |
+
// in node.js otherwise.
|
| 120 |
+
fetchImplementation?: typeof fetch;
|
| 121 |
+
|
| 122 |
+
// Configuration for retrying of requests.
|
| 123 |
+
retryConfig: {
|
| 124 |
+
// The number of times to retry the request. Defaults to 3.
|
| 125 |
+
retry?: number;
|
| 126 |
+
|
| 127 |
+
// The number of retries already attempted.
|
| 128 |
+
currentRetryAttempt?: number;
|
| 129 |
+
|
| 130 |
+
// The HTTP Methods that will be automatically retried.
|
| 131 |
+
// Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']
|
| 132 |
+
httpMethodsToRetry?: string[];
|
| 133 |
+
|
| 134 |
+
// The HTTP response status codes that will automatically be retried.
|
| 135 |
+
// Defaults to: [[100, 199], [408, 408], [429, 429], [500, 599]]
|
| 136 |
+
statusCodesToRetry?: number[][];
|
| 137 |
+
|
| 138 |
+
// Function to invoke when a retry attempt is made.
|
| 139 |
+
onRetryAttempt?: (err: GaxiosError) => Promise<void> | void;
|
| 140 |
+
|
| 141 |
+
// Function to invoke which determines if you should retry
|
| 142 |
+
shouldRetry?: (err: GaxiosError) => Promise<boolean> | boolean;
|
| 143 |
+
|
| 144 |
+
// When there is no response, the number of retries to attempt. Defaults to 2.
|
| 145 |
+
noResponseRetries?: number;
|
| 146 |
+
|
| 147 |
+
// The amount of time to initially delay the retry, in ms. Defaults to 100ms.
|
| 148 |
+
retryDelay?: number;
|
| 149 |
+
},
|
| 150 |
+
|
| 151 |
+
// Enables default configuration for retries.
|
| 152 |
+
retry: boolean,
|
| 153 |
+
|
| 154 |
+
// Cancelling a request requires the `abort-controller` library.
|
| 155 |
+
// See https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal
|
| 156 |
+
signal?: AbortSignal
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* A collection of parts to send as a `Content-Type: multipart/related` request.
|
| 160 |
+
*/
|
| 161 |
+
multipart?: GaxiosMultipartOptions;
|
| 162 |
+
|
| 163 |
+
/**
|
| 164 |
+
* An optional proxy to use for requests.
|
| 165 |
+
* 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.
|
| 166 |
+
* The `agent` option overrides this.
|
| 167 |
+
*
|
| 168 |
+
* @see {@link GaxiosOptions.noProxy}
|
| 169 |
+
* @see {@link GaxiosOptions.agent}
|
| 170 |
+
*/
|
| 171 |
+
proxy?: string | URL;
|
| 172 |
+
/**
|
| 173 |
+
* A list for excluding traffic for proxies.
|
| 174 |
+
* Available via `process.env.NO_PROXY` as well as a common-separated list of strings - merged with any local `noProxy` rules.
|
| 175 |
+
*
|
| 176 |
+
* - When provided a string, it is matched by
|
| 177 |
+
* - Wildcard `*.` and `.` matching are available. (e.g. `.example.com` or `*.example.com`)
|
| 178 |
+
* - When provided a URL, it is matched by the `.origin` property.
|
| 179 |
+
* - For example, requesting `https://example.com` with the following `noProxy`s would result in a no proxy use:
|
| 180 |
+
* - new URL('https://example.com')
|
| 181 |
+
* - new URL('https://example.com:443')
|
| 182 |
+
* - The following would be used with a proxy:
|
| 183 |
+
* - new URL('http://example.com:80')
|
| 184 |
+
* - new URL('https://example.com:8443')
|
| 185 |
+
* - When provided a regular expression it is used to match the stringified URL
|
| 186 |
+
*
|
| 187 |
+
* @see {@link GaxiosOptions.proxy}
|
| 188 |
+
*/
|
| 189 |
+
noProxy?: (string | URL | RegExp)[];
|
| 190 |
+
|
| 191 |
+
/**
|
| 192 |
+
* An experimental, customizable error redactor.
|
| 193 |
+
*
|
| 194 |
+
* Set `false` to disable.
|
| 195 |
+
*
|
| 196 |
+
* @remarks
|
| 197 |
+
*
|
| 198 |
+
* This does not replace the requirement for an active Data Loss Prevention (DLP) provider. For DLP suggestions, see:
|
| 199 |
+
* - https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data#dlp_deidentify_replace_infotype-nodejs
|
| 200 |
+
* - https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#credentials_and_secrets
|
| 201 |
+
*
|
| 202 |
+
* @experimental
|
| 203 |
+
*/
|
| 204 |
+
errorRedactor?: typeof defaultErrorRedactor | false;
|
| 205 |
+
}
|
| 206 |
+
```
|
| 207 |
+
|
| 208 |
+
## License
|
| 209 |
+
|
| 210 |
+
[Apache-2.0](https://github.com/googleapis/gaxios/blob/master/LICENSE)
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/common.d.ts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Agent } from 'http';
|
| 2 |
+
import { URL } from 'url';
|
| 3 |
+
import { Readable } from 'stream';
|
| 4 |
+
/**
|
| 5 |
+
* Support `instanceof` operator for `GaxiosError`s in different versions of this library.
|
| 6 |
+
*
|
| 7 |
+
* @see {@link GaxiosError[Symbol.hasInstance]}
|
| 8 |
+
*/
|
| 9 |
+
export declare const GAXIOS_ERROR_SYMBOL: unique symbol;
|
| 10 |
+
export declare class GaxiosError<T = any> extends Error {
|
| 11 |
+
config: GaxiosOptions;
|
| 12 |
+
response?: GaxiosResponse<T> | undefined;
|
| 13 |
+
error?: (Error | NodeJS.ErrnoException) | undefined;
|
| 14 |
+
/**
|
| 15 |
+
* An Error code.
|
| 16 |
+
* See {@link https://nodejs.org/api/errors.html#errorcode error.code}
|
| 17 |
+
*
|
| 18 |
+
* @example
|
| 19 |
+
* 'ECONNRESET'
|
| 20 |
+
*/
|
| 21 |
+
code?: string;
|
| 22 |
+
/**
|
| 23 |
+
* An HTTP Status code.
|
| 24 |
+
* See {@link https://developer.mozilla.org/en-US/docs/Web/API/Response/status Response: status property}
|
| 25 |
+
*
|
| 26 |
+
* @example
|
| 27 |
+
* 500
|
| 28 |
+
*/
|
| 29 |
+
status?: number;
|
| 30 |
+
/**
|
| 31 |
+
* Support `instanceof` operator for `GaxiosError` across builds/duplicated files.
|
| 32 |
+
*
|
| 33 |
+
* @see {@link GAXIOS_ERROR_SYMBOL}
|
| 34 |
+
* @see {@link GaxiosError[Symbol.hasInstance]}
|
| 35 |
+
* @see {@link https://github.com/microsoft/TypeScript/issues/13965#issuecomment-278570200}
|
| 36 |
+
* @see {@link https://stackoverflow.com/questions/46618852/require-and-instanceof}
|
| 37 |
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/@@hasInstance#reverting_to_default_instanceof_behavior}
|
| 38 |
+
*/
|
| 39 |
+
[GAXIOS_ERROR_SYMBOL]: string;
|
| 40 |
+
/**
|
| 41 |
+
* Support `instanceof` operator for `GaxiosError` across builds/duplicated files.
|
| 42 |
+
*
|
| 43 |
+
* @see {@link GAXIOS_ERROR_SYMBOL}
|
| 44 |
+
* @see {@link GaxiosError[GAXIOS_ERROR_SYMBOL]}
|
| 45 |
+
*/
|
| 46 |
+
static [Symbol.hasInstance](instance: unknown): boolean;
|
| 47 |
+
constructor(message: string, config: GaxiosOptions, response?: GaxiosResponse<T> | undefined, error?: (Error | NodeJS.ErrnoException) | undefined);
|
| 48 |
+
}
|
| 49 |
+
export interface Headers {
|
| 50 |
+
[index: string]: any;
|
| 51 |
+
}
|
| 52 |
+
export type GaxiosPromise<T = any> = Promise<GaxiosResponse<T>>;
|
| 53 |
+
export interface GaxiosXMLHttpRequest {
|
| 54 |
+
responseURL: string;
|
| 55 |
+
}
|
| 56 |
+
export interface GaxiosResponse<T = any> {
|
| 57 |
+
config: GaxiosOptions;
|
| 58 |
+
data: T;
|
| 59 |
+
status: number;
|
| 60 |
+
statusText: string;
|
| 61 |
+
headers: Headers;
|
| 62 |
+
request: GaxiosXMLHttpRequest;
|
| 63 |
+
}
|
| 64 |
+
export interface GaxiosMultipartOptions {
|
| 65 |
+
headers: Headers;
|
| 66 |
+
content: string | Readable;
|
| 67 |
+
}
|
| 68 |
+
/**
|
| 69 |
+
* Request options that are used to form the request.
|
| 70 |
+
*/
|
| 71 |
+
export interface GaxiosOptions {
|
| 72 |
+
/**
|
| 73 |
+
* Optional method to override making the actual HTTP request. Useful
|
| 74 |
+
* for writing tests.
|
| 75 |
+
*/
|
| 76 |
+
adapter?: <T = any>(options: GaxiosOptions, defaultAdapter: (options: GaxiosOptions) => GaxiosPromise<T>) => GaxiosPromise<T>;
|
| 77 |
+
url?: string | URL;
|
| 78 |
+
/**
|
| 79 |
+
* @deprecated
|
| 80 |
+
*/
|
| 81 |
+
baseUrl?: string;
|
| 82 |
+
baseURL?: string | URL;
|
| 83 |
+
method?: 'GET' | 'HEAD' | 'POST' | 'DELETE' | 'PUT' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
| 84 |
+
headers?: Headers;
|
| 85 |
+
data?: any;
|
| 86 |
+
body?: any;
|
| 87 |
+
/**
|
| 88 |
+
* The maximum size of the http response content in bytes allowed.
|
| 89 |
+
*/
|
| 90 |
+
maxContentLength?: number;
|
| 91 |
+
/**
|
| 92 |
+
* The maximum number of redirects to follow. Defaults to 20.
|
| 93 |
+
*/
|
| 94 |
+
maxRedirects?: number;
|
| 95 |
+
follow?: number;
|
| 96 |
+
/**
|
| 97 |
+
* A collection of parts to send as a `Content-Type: multipart/related` request.
|
| 98 |
+
*/
|
| 99 |
+
multipart?: GaxiosMultipartOptions[];
|
| 100 |
+
params?: any;
|
| 101 |
+
paramsSerializer?: (params: {
|
| 102 |
+
[index: string]: string | number;
|
| 103 |
+
}) => string;
|
| 104 |
+
timeout?: number;
|
| 105 |
+
/**
|
| 106 |
+
* @deprecated ignored
|
| 107 |
+
*/
|
| 108 |
+
onUploadProgress?: (progressEvent: any) => void;
|
| 109 |
+
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'stream' | 'unknown';
|
| 110 |
+
agent?: Agent | ((parsedUrl: URL) => Agent);
|
| 111 |
+
validateStatus?: (status: number) => boolean;
|
| 112 |
+
retryConfig?: RetryConfig;
|
| 113 |
+
retry?: boolean;
|
| 114 |
+
signal?: any;
|
| 115 |
+
size?: number;
|
| 116 |
+
/**
|
| 117 |
+
* Implementation of `fetch` to use when making the API call. By default,
|
| 118 |
+
* will use the browser context if available, and fall back to `node-fetch`
|
| 119 |
+
* in node.js otherwise.
|
| 120 |
+
*/
|
| 121 |
+
fetchImplementation?: FetchImplementation;
|
| 122 |
+
cert?: string;
|
| 123 |
+
key?: string;
|
| 124 |
+
/**
|
| 125 |
+
* An optional proxy to use for requests.
|
| 126 |
+
* 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.
|
| 127 |
+
* The {@link GaxiosOptions.agent `agent`} option overrides this.
|
| 128 |
+
*
|
| 129 |
+
* @see {@link GaxiosOptions.noProxy}
|
| 130 |
+
* @see {@link GaxiosOptions.agent}
|
| 131 |
+
*/
|
| 132 |
+
proxy?: string | URL;
|
| 133 |
+
/**
|
| 134 |
+
* A list for excluding traffic for proxies.
|
| 135 |
+
* Available via `process.env.NO_PROXY` as well as a common-separated list of strings - merged with any local `noProxy` rules.
|
| 136 |
+
*
|
| 137 |
+
* - When provided a string, it is matched by
|
| 138 |
+
* - Wildcard `*.` and `.` matching are available. (e.g. `.example.com` or `*.example.com`)
|
| 139 |
+
* - When provided a URL, it is matched by the `.origin` property.
|
| 140 |
+
* - For example, requesting `https://example.com` with the following `noProxy`s would result in a no proxy use:
|
| 141 |
+
* - new URL('https://example.com')
|
| 142 |
+
* - new URL('https://example.com:443')
|
| 143 |
+
* - The following would be used with a proxy:
|
| 144 |
+
* - new URL('http://example.com:80')
|
| 145 |
+
* - new URL('https://example.com:8443')
|
| 146 |
+
* - When provided a regular expression it is used to match the stringified URL
|
| 147 |
+
*
|
| 148 |
+
* @see {@link GaxiosOptions.proxy}
|
| 149 |
+
*/
|
| 150 |
+
noProxy?: (string | URL | RegExp)[];
|
| 151 |
+
/**
|
| 152 |
+
* An experimental error redactor.
|
| 153 |
+
*
|
| 154 |
+
* @remarks
|
| 155 |
+
*
|
| 156 |
+
* This does not replace the requirement for an active Data Loss Prevention (DLP) provider. For DLP suggestions, see:
|
| 157 |
+
* - https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data#dlp_deidentify_replace_infotype-nodejs
|
| 158 |
+
* - https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#credentials_and_secrets
|
| 159 |
+
*
|
| 160 |
+
* @experimental
|
| 161 |
+
*/
|
| 162 |
+
errorRedactor?: typeof defaultErrorRedactor | false;
|
| 163 |
+
}
|
| 164 |
+
/**
|
| 165 |
+
* A partial object of `GaxiosResponse` with only redactable keys
|
| 166 |
+
*
|
| 167 |
+
* @experimental
|
| 168 |
+
*/
|
| 169 |
+
export type RedactableGaxiosOptions = Pick<GaxiosOptions, 'body' | 'data' | 'headers' | 'url'>;
|
| 170 |
+
/**
|
| 171 |
+
* A partial object of `GaxiosResponse` with only redactable keys
|
| 172 |
+
*
|
| 173 |
+
* @experimental
|
| 174 |
+
*/
|
| 175 |
+
export type RedactableGaxiosResponse<T = any> = Pick<GaxiosResponse<T>, 'config' | 'data' | 'headers'>;
|
| 176 |
+
/**
|
| 177 |
+
* Configuration for the Gaxios `request` method.
|
| 178 |
+
*/
|
| 179 |
+
export interface RetryConfig {
|
| 180 |
+
/**
|
| 181 |
+
* The number of times to retry the request. Defaults to 3.
|
| 182 |
+
*/
|
| 183 |
+
retry?: number;
|
| 184 |
+
/**
|
| 185 |
+
* The number of retries already attempted.
|
| 186 |
+
*/
|
| 187 |
+
currentRetryAttempt?: number;
|
| 188 |
+
/**
|
| 189 |
+
* The amount of time to initially delay the retry, in ms. Defaults to 100ms.
|
| 190 |
+
*/
|
| 191 |
+
retryDelay?: number;
|
| 192 |
+
/**
|
| 193 |
+
* The HTTP Methods that will be automatically retried.
|
| 194 |
+
* Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']
|
| 195 |
+
*/
|
| 196 |
+
httpMethodsToRetry?: string[];
|
| 197 |
+
/**
|
| 198 |
+
* The HTTP response status codes that will automatically be retried.
|
| 199 |
+
* Defaults to: [[100, 199], [408, 408], [429, 429], [500, 599]]
|
| 200 |
+
*/
|
| 201 |
+
statusCodesToRetry?: number[][];
|
| 202 |
+
/**
|
| 203 |
+
* Function to invoke when a retry attempt is made.
|
| 204 |
+
*/
|
| 205 |
+
onRetryAttempt?: (err: GaxiosError) => Promise<void> | void;
|
| 206 |
+
/**
|
| 207 |
+
* Function to invoke which determines if you should retry
|
| 208 |
+
*/
|
| 209 |
+
shouldRetry?: (err: GaxiosError) => Promise<boolean> | boolean;
|
| 210 |
+
/**
|
| 211 |
+
* When there is no response, the number of retries to attempt. Defaults to 2.
|
| 212 |
+
*/
|
| 213 |
+
noResponseRetries?: number;
|
| 214 |
+
/**
|
| 215 |
+
* Function to invoke which returns a promise. After the promise resolves,
|
| 216 |
+
* the retry will be triggered. If provided, this will be used in-place of
|
| 217 |
+
* the `retryDelay`
|
| 218 |
+
*/
|
| 219 |
+
retryBackoff?: (err: GaxiosError, defaultBackoffMs: number) => Promise<void>;
|
| 220 |
+
/**
|
| 221 |
+
* Time that the initial request was made. Users should not set this directly.
|
| 222 |
+
*/
|
| 223 |
+
timeOfFirstRequest?: number;
|
| 224 |
+
/**
|
| 225 |
+
* The length of time to keep retrying in ms. The last sleep period will
|
| 226 |
+
* be shortened as necessary, so that the last retry runs at deadline (and not
|
| 227 |
+
* considerably beyond it). The total time starting from when the initial
|
| 228 |
+
* request is sent, after which an error will be returned, regardless of the
|
| 229 |
+
* retrying attempts made meanwhile. Defaults to Number.MAX_SAFE_INTEGER indicating to effectively
|
| 230 |
+
* ignore totalTimeout.
|
| 231 |
+
*/
|
| 232 |
+
totalTimeout?: number;
|
| 233 |
+
maxRetryDelay?: number;
|
| 234 |
+
retryDelayMultiplier?: number;
|
| 235 |
+
}
|
| 236 |
+
export type FetchImplementation = (input: FetchRequestInfo, init?: FetchRequestInit) => Promise<FetchResponse>;
|
| 237 |
+
export type FetchRequestInfo = any;
|
| 238 |
+
export interface FetchResponse {
|
| 239 |
+
readonly status: number;
|
| 240 |
+
readonly statusText: string;
|
| 241 |
+
readonly url: string;
|
| 242 |
+
readonly body: unknown | null;
|
| 243 |
+
arrayBuffer(): Promise<unknown>;
|
| 244 |
+
blob(): Promise<unknown>;
|
| 245 |
+
readonly headers: FetchHeaders;
|
| 246 |
+
json(): Promise<any>;
|
| 247 |
+
text(): Promise<string>;
|
| 248 |
+
}
|
| 249 |
+
export interface FetchRequestInit {
|
| 250 |
+
method?: string;
|
| 251 |
+
}
|
| 252 |
+
export interface FetchHeaders {
|
| 253 |
+
append(name: string, value: string): void;
|
| 254 |
+
delete(name: string): void;
|
| 255 |
+
get(name: string): string | null;
|
| 256 |
+
has(name: string): boolean;
|
| 257 |
+
set(name: string, value: string): void;
|
| 258 |
+
forEach(callbackfn: (value: string, key: string) => void, thisArg?: any): void;
|
| 259 |
+
}
|
| 260 |
+
/**
|
| 261 |
+
* An experimental error redactor.
|
| 262 |
+
*
|
| 263 |
+
* @param config Config to potentially redact properties of
|
| 264 |
+
* @param response Config to potentially redact properties of
|
| 265 |
+
*
|
| 266 |
+
* @experimental
|
| 267 |
+
*/
|
| 268 |
+
export declare function defaultErrorRedactor<T = any>(data: {
|
| 269 |
+
config?: RedactableGaxiosOptions;
|
| 270 |
+
response?: RedactableGaxiosResponse<T>;
|
| 271 |
+
}): {
|
| 272 |
+
config?: RedactableGaxiosOptions;
|
| 273 |
+
response?: RedactableGaxiosResponse<T>;
|
| 274 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/common.js
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
// Copyright 2018 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 |
+
var _a;
|
| 18 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 19 |
+
exports.GaxiosError = exports.GAXIOS_ERROR_SYMBOL = void 0;
|
| 20 |
+
exports.defaultErrorRedactor = defaultErrorRedactor;
|
| 21 |
+
const url_1 = require("url");
|
| 22 |
+
const util_1 = require("./util");
|
| 23 |
+
const extend_1 = __importDefault(require("extend"));
|
| 24 |
+
/**
|
| 25 |
+
* Support `instanceof` operator for `GaxiosError`s in different versions of this library.
|
| 26 |
+
*
|
| 27 |
+
* @see {@link GaxiosError[Symbol.hasInstance]}
|
| 28 |
+
*/
|
| 29 |
+
exports.GAXIOS_ERROR_SYMBOL = Symbol.for(`${util_1.pkg.name}-gaxios-error`);
|
| 30 |
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
| 31 |
+
class GaxiosError extends Error {
|
| 32 |
+
/**
|
| 33 |
+
* Support `instanceof` operator for `GaxiosError` across builds/duplicated files.
|
| 34 |
+
*
|
| 35 |
+
* @see {@link GAXIOS_ERROR_SYMBOL}
|
| 36 |
+
* @see {@link GaxiosError[GAXIOS_ERROR_SYMBOL]}
|
| 37 |
+
*/
|
| 38 |
+
static [(_a = exports.GAXIOS_ERROR_SYMBOL, Symbol.hasInstance)](instance) {
|
| 39 |
+
if (instance &&
|
| 40 |
+
typeof instance === 'object' &&
|
| 41 |
+
exports.GAXIOS_ERROR_SYMBOL in instance &&
|
| 42 |
+
instance[exports.GAXIOS_ERROR_SYMBOL] === util_1.pkg.version) {
|
| 43 |
+
return true;
|
| 44 |
+
}
|
| 45 |
+
// fallback to native
|
| 46 |
+
return Function.prototype[Symbol.hasInstance].call(GaxiosError, instance);
|
| 47 |
+
}
|
| 48 |
+
constructor(message, config, response, error) {
|
| 49 |
+
var _b;
|
| 50 |
+
super(message);
|
| 51 |
+
this.config = config;
|
| 52 |
+
this.response = response;
|
| 53 |
+
this.error = error;
|
| 54 |
+
/**
|
| 55 |
+
* Support `instanceof` operator for `GaxiosError` across builds/duplicated files.
|
| 56 |
+
*
|
| 57 |
+
* @see {@link GAXIOS_ERROR_SYMBOL}
|
| 58 |
+
* @see {@link GaxiosError[Symbol.hasInstance]}
|
| 59 |
+
* @see {@link https://github.com/microsoft/TypeScript/issues/13965#issuecomment-278570200}
|
| 60 |
+
* @see {@link https://stackoverflow.com/questions/46618852/require-and-instanceof}
|
| 61 |
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/@@hasInstance#reverting_to_default_instanceof_behavior}
|
| 62 |
+
*/
|
| 63 |
+
this[_a] = util_1.pkg.version;
|
| 64 |
+
// deep-copy config as we do not want to mutate
|
| 65 |
+
// the existing config for future retries/use
|
| 66 |
+
this.config = (0, extend_1.default)(true, {}, config);
|
| 67 |
+
if (this.response) {
|
| 68 |
+
this.response.config = (0, extend_1.default)(true, {}, this.response.config);
|
| 69 |
+
}
|
| 70 |
+
if (this.response) {
|
| 71 |
+
try {
|
| 72 |
+
this.response.data = translateData(this.config.responseType, (_b = this.response) === null || _b === void 0 ? void 0 : _b.data);
|
| 73 |
+
}
|
| 74 |
+
catch (_c) {
|
| 75 |
+
// best effort - don't throw an error within an error
|
| 76 |
+
// we could set `this.response.config.responseType = 'unknown'`, but
|
| 77 |
+
// that would mutate future calls with this config object.
|
| 78 |
+
}
|
| 79 |
+
this.status = this.response.status;
|
| 80 |
+
}
|
| 81 |
+
if (error && 'code' in error && error.code) {
|
| 82 |
+
this.code = error.code;
|
| 83 |
+
}
|
| 84 |
+
if (config.errorRedactor) {
|
| 85 |
+
config.errorRedactor({
|
| 86 |
+
config: this.config,
|
| 87 |
+
response: this.response,
|
| 88 |
+
});
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
}
|
| 92 |
+
exports.GaxiosError = GaxiosError;
|
| 93 |
+
function translateData(responseType, data) {
|
| 94 |
+
switch (responseType) {
|
| 95 |
+
case 'stream':
|
| 96 |
+
return data;
|
| 97 |
+
case 'json':
|
| 98 |
+
return JSON.parse(JSON.stringify(data));
|
| 99 |
+
case 'arraybuffer':
|
| 100 |
+
return JSON.parse(Buffer.from(data).toString('utf8'));
|
| 101 |
+
case 'blob':
|
| 102 |
+
return JSON.parse(data.text());
|
| 103 |
+
default:
|
| 104 |
+
return data;
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
/**
|
| 108 |
+
* An experimental error redactor.
|
| 109 |
+
*
|
| 110 |
+
* @param config Config to potentially redact properties of
|
| 111 |
+
* @param response Config to potentially redact properties of
|
| 112 |
+
*
|
| 113 |
+
* @experimental
|
| 114 |
+
*/
|
| 115 |
+
function defaultErrorRedactor(data) {
|
| 116 |
+
const REDACT = '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.';
|
| 117 |
+
function redactHeaders(headers) {
|
| 118 |
+
if (!headers)
|
| 119 |
+
return;
|
| 120 |
+
for (const key of Object.keys(headers)) {
|
| 121 |
+
// any casing of `Authentication`
|
| 122 |
+
if (/^authentication$/i.test(key)) {
|
| 123 |
+
headers[key] = REDACT;
|
| 124 |
+
}
|
| 125 |
+
// any casing of `Authorization`
|
| 126 |
+
if (/^authorization$/i.test(key)) {
|
| 127 |
+
headers[key] = REDACT;
|
| 128 |
+
}
|
| 129 |
+
// anything containing secret, such as 'client secret'
|
| 130 |
+
if (/secret/i.test(key)) {
|
| 131 |
+
headers[key] = REDACT;
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
function redactString(obj, key) {
|
| 136 |
+
if (typeof obj === 'object' &&
|
| 137 |
+
obj !== null &&
|
| 138 |
+
typeof obj[key] === 'string') {
|
| 139 |
+
const text = obj[key];
|
| 140 |
+
if (/grant_type=/i.test(text) ||
|
| 141 |
+
/assertion=/i.test(text) ||
|
| 142 |
+
/secret/i.test(text)) {
|
| 143 |
+
obj[key] = REDACT;
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
function redactObject(obj) {
|
| 148 |
+
if (typeof obj === 'object' && obj !== null) {
|
| 149 |
+
if ('grant_type' in obj) {
|
| 150 |
+
obj['grant_type'] = REDACT;
|
| 151 |
+
}
|
| 152 |
+
if ('assertion' in obj) {
|
| 153 |
+
obj['assertion'] = REDACT;
|
| 154 |
+
}
|
| 155 |
+
if ('client_secret' in obj) {
|
| 156 |
+
obj['client_secret'] = REDACT;
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
if (data.config) {
|
| 161 |
+
redactHeaders(data.config.headers);
|
| 162 |
+
redactString(data.config, 'data');
|
| 163 |
+
redactObject(data.config.data);
|
| 164 |
+
redactString(data.config, 'body');
|
| 165 |
+
redactObject(data.config.body);
|
| 166 |
+
try {
|
| 167 |
+
const url = new url_1.URL('', data.config.url);
|
| 168 |
+
if (url.searchParams.has('token')) {
|
| 169 |
+
url.searchParams.set('token', REDACT);
|
| 170 |
+
}
|
| 171 |
+
if (url.searchParams.has('client_secret')) {
|
| 172 |
+
url.searchParams.set('client_secret', REDACT);
|
| 173 |
+
}
|
| 174 |
+
data.config.url = url.toString();
|
| 175 |
+
}
|
| 176 |
+
catch (_b) {
|
| 177 |
+
// ignore error - no need to parse an invalid URL
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
if (data.response) {
|
| 181 |
+
defaultErrorRedactor({ config: data.response.config });
|
| 182 |
+
redactHeaders(data.response.headers);
|
| 183 |
+
redactString(data.response, 'data');
|
| 184 |
+
redactObject(data.response.data);
|
| 185 |
+
}
|
| 186 |
+
return data;
|
| 187 |
+
}
|
| 188 |
+
//# sourceMappingURL=common.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/common.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;AAwZjC,oDAiGC;AAtfD,6BAAwB;AAExB,iCAA2B;AAC3B,oDAA4B;AAG5B;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,UAAG,CAAC,IAAI,eAAe,CAAC,CAAC;AAE1E,iEAAiE;AACjE,MAAa,WAAqB,SAAQ,KAAK;IA6B7C;;;;;OAKG;IACH,MAAM,CAAC,OARN,2BAAmB,EAQZ,MAAM,CAAC,WAAW,EAAC,CAAC,QAAiB;QAC3C,IACE,QAAQ;YACR,OAAO,QAAQ,KAAK,QAAQ;YAC5B,2BAAmB,IAAI,QAAQ;YAC/B,QAAQ,CAAC,2BAAmB,CAAC,KAAK,UAAG,CAAC,OAAO,EAC7C,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,qBAAqB;QACrB,OAAO,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAED,YACE,OAAe,EACR,MAAqB,EACrB,QAA4B,EAC5B,KAAqC;;QAE5C,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,WAAM,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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Agent } from 'http';
|
| 2 |
+
import { URL } from 'url';
|
| 3 |
+
import { GaxiosOptions, GaxiosPromise, GaxiosResponse } from './common';
|
| 4 |
+
import { GaxiosInterceptorManager } from './interceptor';
|
| 5 |
+
export declare class Gaxios {
|
| 6 |
+
#private;
|
| 7 |
+
protected agentCache: Map<string | URL, Agent | ((parsedUrl: URL) => Agent)>;
|
| 8 |
+
/**
|
| 9 |
+
* Default HTTP options that will be used for every HTTP request.
|
| 10 |
+
*/
|
| 11 |
+
defaults: GaxiosOptions;
|
| 12 |
+
/**
|
| 13 |
+
* Interceptors
|
| 14 |
+
*/
|
| 15 |
+
interceptors: {
|
| 16 |
+
request: GaxiosInterceptorManager<GaxiosOptions>;
|
| 17 |
+
response: GaxiosInterceptorManager<GaxiosResponse>;
|
| 18 |
+
};
|
| 19 |
+
/**
|
| 20 |
+
* The Gaxios class is responsible for making HTTP requests.
|
| 21 |
+
* @param defaults The default set of options to be used for this instance.
|
| 22 |
+
*/
|
| 23 |
+
constructor(defaults?: GaxiosOptions);
|
| 24 |
+
/**
|
| 25 |
+
* Perform an HTTP request with the given options.
|
| 26 |
+
* @param opts Set of HTTP options that will be used for this HTTP request.
|
| 27 |
+
*/
|
| 28 |
+
request<T = any>(opts?: GaxiosOptions): GaxiosPromise<T>;
|
| 29 |
+
private _defaultAdapter;
|
| 30 |
+
/**
|
| 31 |
+
* Internal, retryable version of the `request` method.
|
| 32 |
+
* @param opts Set of HTTP options that will be used for this HTTP request.
|
| 33 |
+
*/
|
| 34 |
+
protected _request<T = any>(opts?: GaxiosOptions): GaxiosPromise<T>;
|
| 35 |
+
private getResponseData;
|
| 36 |
+
/**
|
| 37 |
+
* By default, throw for any non-2xx status code
|
| 38 |
+
* @param status status code from the HTTP response
|
| 39 |
+
*/
|
| 40 |
+
private validateStatus;
|
| 41 |
+
/**
|
| 42 |
+
* Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo)
|
| 43 |
+
* @param params key value pars to encode
|
| 44 |
+
*/
|
| 45 |
+
private paramsSerializer;
|
| 46 |
+
private translateResponse;
|
| 47 |
+
/**
|
| 48 |
+
* Attempts to parse a response by looking at the Content-Type header.
|
| 49 |
+
* @param {FetchResponse} response the HTTP response.
|
| 50 |
+
* @returns {Promise<any>} a promise that resolves to the response data.
|
| 51 |
+
*/
|
| 52 |
+
private getResponseDataFromContentType;
|
| 53 |
+
/**
|
| 54 |
+
* Creates an async generator that yields the pieces of a multipart/related request body.
|
| 55 |
+
* This implementation follows the spec: https://www.ietf.org/rfc/rfc2387.txt. However, recursive
|
| 56 |
+
* multipart/related requests are not currently supported.
|
| 57 |
+
*
|
| 58 |
+
* @param {GaxioMultipartOptions[]} multipartOptions the pieces to turn into a multipart/related body.
|
| 59 |
+
* @param {string} boundary the boundary string to be placed between each part.
|
| 60 |
+
*/
|
| 61 |
+
private getMultipartRequest;
|
| 62 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/gaxios.js
ADDED
|
@@ -0,0 +1,480 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
// Copyright 2018 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 (mod) {
|
| 31 |
+
if (mod && mod.__esModule) return mod;
|
| 32 |
+
var result = {};
|
| 33 |
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
| 34 |
+
__setModuleDefault(result, mod);
|
| 35 |
+
return result;
|
| 36 |
+
};
|
| 37 |
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
| 38 |
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
| 39 |
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
| 40 |
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
| 41 |
+
};
|
| 42 |
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
| 43 |
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
| 44 |
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
| 45 |
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
| 46 |
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
| 47 |
+
};
|
| 48 |
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
| 49 |
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
| 50 |
+
};
|
| 51 |
+
var _Gaxios_instances, _a, _Gaxios_urlMayUseProxy, _Gaxios_applyRequestInterceptors, _Gaxios_applyResponseInterceptors, _Gaxios_prepareRequest, _Gaxios_proxyAgent, _Gaxios_getProxyAgent;
|
| 52 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 53 |
+
exports.Gaxios = void 0;
|
| 54 |
+
const extend_1 = __importDefault(require("extend"));
|
| 55 |
+
const https_1 = require("https");
|
| 56 |
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
| 57 |
+
const querystring_1 = __importDefault(require("querystring"));
|
| 58 |
+
const is_stream_1 = __importDefault(require("is-stream"));
|
| 59 |
+
const url_1 = require("url");
|
| 60 |
+
const common_1 = require("./common");
|
| 61 |
+
const retry_1 = require("./retry");
|
| 62 |
+
const stream_1 = require("stream");
|
| 63 |
+
const uuid_1 = require("uuid");
|
| 64 |
+
const interceptor_1 = require("./interceptor");
|
| 65 |
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
| 66 |
+
const fetch = hasFetch() ? window.fetch : node_fetch_1.default;
|
| 67 |
+
function hasWindow() {
|
| 68 |
+
return typeof window !== 'undefined' && !!window;
|
| 69 |
+
}
|
| 70 |
+
function hasFetch() {
|
| 71 |
+
return hasWindow() && !!window.fetch;
|
| 72 |
+
}
|
| 73 |
+
function hasBuffer() {
|
| 74 |
+
return typeof Buffer !== 'undefined';
|
| 75 |
+
}
|
| 76 |
+
function hasHeader(options, header) {
|
| 77 |
+
return !!getHeader(options, header);
|
| 78 |
+
}
|
| 79 |
+
function getHeader(options, header) {
|
| 80 |
+
header = header.toLowerCase();
|
| 81 |
+
for (const key of Object.keys((options === null || options === void 0 ? void 0 : options.headers) || {})) {
|
| 82 |
+
if (header === key.toLowerCase()) {
|
| 83 |
+
return options.headers[key];
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
return undefined;
|
| 87 |
+
}
|
| 88 |
+
class Gaxios {
|
| 89 |
+
/**
|
| 90 |
+
* The Gaxios class is responsible for making HTTP requests.
|
| 91 |
+
* @param defaults The default set of options to be used for this instance.
|
| 92 |
+
*/
|
| 93 |
+
constructor(defaults) {
|
| 94 |
+
_Gaxios_instances.add(this);
|
| 95 |
+
this.agentCache = new Map();
|
| 96 |
+
this.defaults = defaults || {};
|
| 97 |
+
this.interceptors = {
|
| 98 |
+
request: new interceptor_1.GaxiosInterceptorManager(),
|
| 99 |
+
response: new interceptor_1.GaxiosInterceptorManager(),
|
| 100 |
+
};
|
| 101 |
+
}
|
| 102 |
+
/**
|
| 103 |
+
* Perform an HTTP request with the given options.
|
| 104 |
+
* @param opts Set of HTTP options that will be used for this HTTP request.
|
| 105 |
+
*/
|
| 106 |
+
async request(opts = {}) {
|
| 107 |
+
opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_prepareRequest).call(this, opts);
|
| 108 |
+
opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyRequestInterceptors).call(this, opts);
|
| 109 |
+
return __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyResponseInterceptors).call(this, this._request(opts));
|
| 110 |
+
}
|
| 111 |
+
async _defaultAdapter(opts) {
|
| 112 |
+
const fetchImpl = opts.fetchImplementation || fetch;
|
| 113 |
+
const res = (await fetchImpl(opts.url, opts));
|
| 114 |
+
const data = await this.getResponseData(opts, res);
|
| 115 |
+
return this.translateResponse(opts, res, data);
|
| 116 |
+
}
|
| 117 |
+
/**
|
| 118 |
+
* Internal, retryable version of the `request` method.
|
| 119 |
+
* @param opts Set of HTTP options that will be used for this HTTP request.
|
| 120 |
+
*/
|
| 121 |
+
async _request(opts = {}) {
|
| 122 |
+
var _b;
|
| 123 |
+
try {
|
| 124 |
+
let translatedResponse;
|
| 125 |
+
if (opts.adapter) {
|
| 126 |
+
translatedResponse = await opts.adapter(opts, this._defaultAdapter.bind(this));
|
| 127 |
+
}
|
| 128 |
+
else {
|
| 129 |
+
translatedResponse = await this._defaultAdapter(opts);
|
| 130 |
+
}
|
| 131 |
+
if (!opts.validateStatus(translatedResponse.status)) {
|
| 132 |
+
if (opts.responseType === 'stream') {
|
| 133 |
+
let response = '';
|
| 134 |
+
await new Promise(resolve => {
|
| 135 |
+
(translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('data', chunk => {
|
| 136 |
+
response += chunk;
|
| 137 |
+
});
|
| 138 |
+
(translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('end', resolve);
|
| 139 |
+
});
|
| 140 |
+
translatedResponse.data = response;
|
| 141 |
+
}
|
| 142 |
+
throw new common_1.GaxiosError(`Request failed with status code ${translatedResponse.status}`, opts, translatedResponse);
|
| 143 |
+
}
|
| 144 |
+
return translatedResponse;
|
| 145 |
+
}
|
| 146 |
+
catch (e) {
|
| 147 |
+
const err = e instanceof common_1.GaxiosError
|
| 148 |
+
? e
|
| 149 |
+
: new common_1.GaxiosError(e.message, opts, undefined, e);
|
| 150 |
+
const { shouldRetry, config } = await (0, retry_1.getRetryConfig)(err);
|
| 151 |
+
if (shouldRetry && config) {
|
| 152 |
+
err.config.retryConfig.currentRetryAttempt =
|
| 153 |
+
config.retryConfig.currentRetryAttempt;
|
| 154 |
+
// The error's config could be redacted - therefore we only want to
|
| 155 |
+
// copy the retry state over to the existing config
|
| 156 |
+
opts.retryConfig = (_b = err.config) === null || _b === void 0 ? void 0 : _b.retryConfig;
|
| 157 |
+
return this._request(opts);
|
| 158 |
+
}
|
| 159 |
+
throw err;
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
async getResponseData(opts, res) {
|
| 163 |
+
switch (opts.responseType) {
|
| 164 |
+
case 'stream':
|
| 165 |
+
return res.body;
|
| 166 |
+
case 'json': {
|
| 167 |
+
let data = await res.text();
|
| 168 |
+
try {
|
| 169 |
+
data = JSON.parse(data);
|
| 170 |
+
}
|
| 171 |
+
catch (_b) {
|
| 172 |
+
// continue
|
| 173 |
+
}
|
| 174 |
+
return data;
|
| 175 |
+
}
|
| 176 |
+
case 'arraybuffer':
|
| 177 |
+
return res.arrayBuffer();
|
| 178 |
+
case 'blob':
|
| 179 |
+
return res.blob();
|
| 180 |
+
case 'text':
|
| 181 |
+
return res.text();
|
| 182 |
+
default:
|
| 183 |
+
return this.getResponseDataFromContentType(res);
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
/**
|
| 187 |
+
* By default, throw for any non-2xx status code
|
| 188 |
+
* @param status status code from the HTTP response
|
| 189 |
+
*/
|
| 190 |
+
validateStatus(status) {
|
| 191 |
+
return status >= 200 && status < 300;
|
| 192 |
+
}
|
| 193 |
+
/**
|
| 194 |
+
* Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo)
|
| 195 |
+
* @param params key value pars to encode
|
| 196 |
+
*/
|
| 197 |
+
paramsSerializer(params) {
|
| 198 |
+
return querystring_1.default.stringify(params);
|
| 199 |
+
}
|
| 200 |
+
translateResponse(opts, res, data) {
|
| 201 |
+
// headers need to be converted from a map to an obj
|
| 202 |
+
const headers = {};
|
| 203 |
+
res.headers.forEach((value, key) => {
|
| 204 |
+
headers[key] = value;
|
| 205 |
+
});
|
| 206 |
+
return {
|
| 207 |
+
config: opts,
|
| 208 |
+
data: data,
|
| 209 |
+
headers,
|
| 210 |
+
status: res.status,
|
| 211 |
+
statusText: res.statusText,
|
| 212 |
+
// XMLHttpRequestLike
|
| 213 |
+
request: {
|
| 214 |
+
responseURL: res.url,
|
| 215 |
+
},
|
| 216 |
+
};
|
| 217 |
+
}
|
| 218 |
+
/**
|
| 219 |
+
* Attempts to parse a response by looking at the Content-Type header.
|
| 220 |
+
* @param {FetchResponse} response the HTTP response.
|
| 221 |
+
* @returns {Promise<any>} a promise that resolves to the response data.
|
| 222 |
+
*/
|
| 223 |
+
async getResponseDataFromContentType(response) {
|
| 224 |
+
let contentType = response.headers.get('Content-Type');
|
| 225 |
+
if (contentType === null) {
|
| 226 |
+
// Maintain existing functionality by calling text()
|
| 227 |
+
return response.text();
|
| 228 |
+
}
|
| 229 |
+
contentType = contentType.toLowerCase();
|
| 230 |
+
if (contentType.includes('application/json')) {
|
| 231 |
+
let data = await response.text();
|
| 232 |
+
try {
|
| 233 |
+
data = JSON.parse(data);
|
| 234 |
+
}
|
| 235 |
+
catch (_b) {
|
| 236 |
+
// continue
|
| 237 |
+
}
|
| 238 |
+
return data;
|
| 239 |
+
}
|
| 240 |
+
else if (contentType.match(/^text\//)) {
|
| 241 |
+
return response.text();
|
| 242 |
+
}
|
| 243 |
+
else {
|
| 244 |
+
// If the content type is something not easily handled, just return the raw data (blob)
|
| 245 |
+
return response.blob();
|
| 246 |
+
}
|
| 247 |
+
}
|
| 248 |
+
/**
|
| 249 |
+
* Creates an async generator that yields the pieces of a multipart/related request body.
|
| 250 |
+
* This implementation follows the spec: https://www.ietf.org/rfc/rfc2387.txt. However, recursive
|
| 251 |
+
* multipart/related requests are not currently supported.
|
| 252 |
+
*
|
| 253 |
+
* @param {GaxioMultipartOptions[]} multipartOptions the pieces to turn into a multipart/related body.
|
| 254 |
+
* @param {string} boundary the boundary string to be placed between each part.
|
| 255 |
+
*/
|
| 256 |
+
async *getMultipartRequest(multipartOptions, boundary) {
|
| 257 |
+
const finale = `--${boundary}--`;
|
| 258 |
+
for (const currentPart of multipartOptions) {
|
| 259 |
+
const partContentType = currentPart.headers['Content-Type'] || 'application/octet-stream';
|
| 260 |
+
const preamble = `--${boundary}\r\nContent-Type: ${partContentType}\r\n\r\n`;
|
| 261 |
+
yield preamble;
|
| 262 |
+
if (typeof currentPart.content === 'string') {
|
| 263 |
+
yield currentPart.content;
|
| 264 |
+
}
|
| 265 |
+
else {
|
| 266 |
+
yield* currentPart.content;
|
| 267 |
+
}
|
| 268 |
+
yield '\r\n';
|
| 269 |
+
}
|
| 270 |
+
yield finale;
|
| 271 |
+
}
|
| 272 |
+
}
|
| 273 |
+
exports.Gaxios = Gaxios;
|
| 274 |
+
_a = Gaxios, _Gaxios_instances = new WeakSet(), _Gaxios_urlMayUseProxy = function _Gaxios_urlMayUseProxy(url, noProxy = []) {
|
| 275 |
+
var _b, _c;
|
| 276 |
+
const candidate = new url_1.URL(url);
|
| 277 |
+
const noProxyList = [...noProxy];
|
| 278 |
+
const noProxyEnvList = ((_c = ((_b = process.env.NO_PROXY) !== null && _b !== void 0 ? _b : process.env.no_proxy)) === null || _c === void 0 ? void 0 : _c.split(',')) || [];
|
| 279 |
+
for (const rule of noProxyEnvList) {
|
| 280 |
+
noProxyList.push(rule.trim());
|
| 281 |
+
}
|
| 282 |
+
for (const rule of noProxyList) {
|
| 283 |
+
// Match regex
|
| 284 |
+
if (rule instanceof RegExp) {
|
| 285 |
+
if (rule.test(candidate.toString())) {
|
| 286 |
+
return false;
|
| 287 |
+
}
|
| 288 |
+
}
|
| 289 |
+
// Match URL
|
| 290 |
+
else if (rule instanceof url_1.URL) {
|
| 291 |
+
if (rule.origin === candidate.origin) {
|
| 292 |
+
return false;
|
| 293 |
+
}
|
| 294 |
+
}
|
| 295 |
+
// Match string regex
|
| 296 |
+
else if (rule.startsWith('*.') || rule.startsWith('.')) {
|
| 297 |
+
const cleanedRule = rule.replace(/^\*\./, '.');
|
| 298 |
+
if (candidate.hostname.endsWith(cleanedRule)) {
|
| 299 |
+
return false;
|
| 300 |
+
}
|
| 301 |
+
}
|
| 302 |
+
// Basic string match
|
| 303 |
+
else if (rule === candidate.origin ||
|
| 304 |
+
rule === candidate.hostname ||
|
| 305 |
+
rule === candidate.href) {
|
| 306 |
+
return false;
|
| 307 |
+
}
|
| 308 |
+
}
|
| 309 |
+
return true;
|
| 310 |
+
}, _Gaxios_applyRequestInterceptors =
|
| 311 |
+
/**
|
| 312 |
+
* Applies the request interceptors. The request interceptors are applied after the
|
| 313 |
+
* call to prepareRequest is completed.
|
| 314 |
+
*
|
| 315 |
+
* @param {GaxiosOptions} options The current set of options.
|
| 316 |
+
*
|
| 317 |
+
* @returns {Promise<GaxiosOptions>} Promise that resolves to the set of options or response after interceptors are applied.
|
| 318 |
+
*/
|
| 319 |
+
async function _Gaxios_applyRequestInterceptors(options) {
|
| 320 |
+
let promiseChain = Promise.resolve(options);
|
| 321 |
+
for (const interceptor of this.interceptors.request.values()) {
|
| 322 |
+
if (interceptor) {
|
| 323 |
+
promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected);
|
| 324 |
+
}
|
| 325 |
+
}
|
| 326 |
+
return promiseChain;
|
| 327 |
+
}, _Gaxios_applyResponseInterceptors =
|
| 328 |
+
/**
|
| 329 |
+
* Applies the response interceptors. The response interceptors are applied after the
|
| 330 |
+
* call to request is made.
|
| 331 |
+
*
|
| 332 |
+
* @param {GaxiosOptions} options The current set of options.
|
| 333 |
+
*
|
| 334 |
+
* @returns {Promise<GaxiosOptions>} Promise that resolves to the set of options or response after interceptors are applied.
|
| 335 |
+
*/
|
| 336 |
+
async function _Gaxios_applyResponseInterceptors(response) {
|
| 337 |
+
let promiseChain = Promise.resolve(response);
|
| 338 |
+
for (const interceptor of this.interceptors.response.values()) {
|
| 339 |
+
if (interceptor) {
|
| 340 |
+
promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected);
|
| 341 |
+
}
|
| 342 |
+
}
|
| 343 |
+
return promiseChain;
|
| 344 |
+
}, _Gaxios_prepareRequest =
|
| 345 |
+
/**
|
| 346 |
+
* Validates the options, merges them with defaults, and prepare request.
|
| 347 |
+
*
|
| 348 |
+
* @param options The original options passed from the client.
|
| 349 |
+
* @returns Prepared options, ready to make a request
|
| 350 |
+
*/
|
| 351 |
+
async function _Gaxios_prepareRequest(options) {
|
| 352 |
+
var _b, _c, _d, _e;
|
| 353 |
+
const opts = (0, extend_1.default)(true, {}, this.defaults, options);
|
| 354 |
+
if (!opts.url) {
|
| 355 |
+
throw new Error('URL is required.');
|
| 356 |
+
}
|
| 357 |
+
// baseUrl has been deprecated, remove in 2.0
|
| 358 |
+
const baseUrl = opts.baseUrl || opts.baseURL;
|
| 359 |
+
if (baseUrl) {
|
| 360 |
+
opts.url = baseUrl.toString() + opts.url;
|
| 361 |
+
}
|
| 362 |
+
opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer;
|
| 363 |
+
if (opts.params && Object.keys(opts.params).length > 0) {
|
| 364 |
+
let additionalQueryParams = opts.paramsSerializer(opts.params);
|
| 365 |
+
if (additionalQueryParams.startsWith('?')) {
|
| 366 |
+
additionalQueryParams = additionalQueryParams.slice(1);
|
| 367 |
+
}
|
| 368 |
+
const prefix = opts.url.toString().includes('?') ? '&' : '?';
|
| 369 |
+
opts.url = opts.url + prefix + additionalQueryParams;
|
| 370 |
+
}
|
| 371 |
+
if (typeof options.maxContentLength === 'number') {
|
| 372 |
+
opts.size = options.maxContentLength;
|
| 373 |
+
}
|
| 374 |
+
if (typeof options.maxRedirects === 'number') {
|
| 375 |
+
opts.follow = options.maxRedirects;
|
| 376 |
+
}
|
| 377 |
+
opts.headers = opts.headers || {};
|
| 378 |
+
if (opts.multipart === undefined && opts.data) {
|
| 379 |
+
const isFormData = typeof FormData === 'undefined'
|
| 380 |
+
? false
|
| 381 |
+
: (opts === null || opts === void 0 ? void 0 : opts.data) instanceof FormData;
|
| 382 |
+
if (is_stream_1.default.readable(opts.data)) {
|
| 383 |
+
opts.body = opts.data;
|
| 384 |
+
}
|
| 385 |
+
else if (hasBuffer() && Buffer.isBuffer(opts.data)) {
|
| 386 |
+
// Do not attempt to JSON.stringify() a Buffer:
|
| 387 |
+
opts.body = opts.data;
|
| 388 |
+
if (!hasHeader(opts, 'Content-Type')) {
|
| 389 |
+
opts.headers['Content-Type'] = 'application/json';
|
| 390 |
+
}
|
| 391 |
+
}
|
| 392 |
+
else if (typeof opts.data === 'object') {
|
| 393 |
+
// If www-form-urlencoded content type has been set, but data is
|
| 394 |
+
// provided as an object, serialize the content using querystring:
|
| 395 |
+
if (!isFormData) {
|
| 396 |
+
if (getHeader(opts, 'content-type') ===
|
| 397 |
+
'application/x-www-form-urlencoded') {
|
| 398 |
+
opts.body = opts.paramsSerializer(opts.data);
|
| 399 |
+
}
|
| 400 |
+
else {
|
| 401 |
+
// } else if (!(opts.data instanceof FormData)) {
|
| 402 |
+
if (!hasHeader(opts, 'Content-Type')) {
|
| 403 |
+
opts.headers['Content-Type'] = 'application/json';
|
| 404 |
+
}
|
| 405 |
+
opts.body = JSON.stringify(opts.data);
|
| 406 |
+
}
|
| 407 |
+
}
|
| 408 |
+
}
|
| 409 |
+
else {
|
| 410 |
+
opts.body = opts.data;
|
| 411 |
+
}
|
| 412 |
+
}
|
| 413 |
+
else if (opts.multipart && opts.multipart.length > 0) {
|
| 414 |
+
// note: once the minimum version reaches Node 16,
|
| 415 |
+
// this can be replaced with randomUUID() function from crypto
|
| 416 |
+
// and the dependency on UUID removed
|
| 417 |
+
const boundary = (0, uuid_1.v4)();
|
| 418 |
+
opts.headers['Content-Type'] = `multipart/related; boundary=${boundary}`;
|
| 419 |
+
const bodyStream = new stream_1.PassThrough();
|
| 420 |
+
opts.body = bodyStream;
|
| 421 |
+
(0, stream_1.pipeline)(this.getMultipartRequest(opts.multipart, boundary), bodyStream, () => { });
|
| 422 |
+
}
|
| 423 |
+
opts.validateStatus = opts.validateStatus || this.validateStatus;
|
| 424 |
+
opts.responseType = opts.responseType || 'unknown';
|
| 425 |
+
if (!opts.headers['Accept'] && opts.responseType === 'json') {
|
| 426 |
+
opts.headers['Accept'] = 'application/json';
|
| 427 |
+
}
|
| 428 |
+
opts.method = opts.method || 'GET';
|
| 429 |
+
const proxy = opts.proxy ||
|
| 430 |
+
((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b.HTTPS_PROXY) ||
|
| 431 |
+
((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c.https_proxy) ||
|
| 432 |
+
((_d = process === null || process === void 0 ? void 0 : process.env) === null || _d === void 0 ? void 0 : _d.HTTP_PROXY) ||
|
| 433 |
+
((_e = process === null || process === void 0 ? void 0 : process.env) === null || _e === void 0 ? void 0 : _e.http_proxy);
|
| 434 |
+
const urlMayUseProxy = __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_urlMayUseProxy).call(this, opts.url, opts.noProxy);
|
| 435 |
+
if (opts.agent) {
|
| 436 |
+
// don't do any of the following options - use the user-provided agent.
|
| 437 |
+
}
|
| 438 |
+
else if (proxy && urlMayUseProxy) {
|
| 439 |
+
const HttpsProxyAgent = await __classPrivateFieldGet(_a, _a, "m", _Gaxios_getProxyAgent).call(_a);
|
| 440 |
+
if (this.agentCache.has(proxy)) {
|
| 441 |
+
opts.agent = this.agentCache.get(proxy);
|
| 442 |
+
}
|
| 443 |
+
else {
|
| 444 |
+
opts.agent = new HttpsProxyAgent(proxy, {
|
| 445 |
+
cert: opts.cert,
|
| 446 |
+
key: opts.key,
|
| 447 |
+
});
|
| 448 |
+
this.agentCache.set(proxy, opts.agent);
|
| 449 |
+
}
|
| 450 |
+
}
|
| 451 |
+
else if (opts.cert && opts.key) {
|
| 452 |
+
// Configure client for mTLS
|
| 453 |
+
if (this.agentCache.has(opts.key)) {
|
| 454 |
+
opts.agent = this.agentCache.get(opts.key);
|
| 455 |
+
}
|
| 456 |
+
else {
|
| 457 |
+
opts.agent = new https_1.Agent({
|
| 458 |
+
cert: opts.cert,
|
| 459 |
+
key: opts.key,
|
| 460 |
+
});
|
| 461 |
+
this.agentCache.set(opts.key, opts.agent);
|
| 462 |
+
}
|
| 463 |
+
}
|
| 464 |
+
if (typeof opts.errorRedactor !== 'function' &&
|
| 465 |
+
opts.errorRedactor !== false) {
|
| 466 |
+
opts.errorRedactor = common_1.defaultErrorRedactor;
|
| 467 |
+
}
|
| 468 |
+
return opts;
|
| 469 |
+
}, _Gaxios_getProxyAgent = async function _Gaxios_getProxyAgent() {
|
| 470 |
+
__classPrivateFieldSet(this, _a, __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent) || (await Promise.resolve().then(() => __importStar(require('https-proxy-agent')))).HttpsProxyAgent, "f", _Gaxios_proxyAgent);
|
| 471 |
+
return __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent);
|
| 472 |
+
};
|
| 473 |
+
/**
|
| 474 |
+
* A cache for the lazily-loaded proxy agent.
|
| 475 |
+
*
|
| 476 |
+
* Should use {@link Gaxios[#getProxyAgent]} to retrieve.
|
| 477 |
+
*/
|
| 478 |
+
// using `import` to dynamically import the types here
|
| 479 |
+
_Gaxios_proxyAgent = { value: void 0 };
|
| 480 |
+
//# sourceMappingURL=gaxios.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/gaxios.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"gaxios.js","sourceRoot":"","sources":["../../src/gaxios.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjC,oDAA4B;AAE5B,iCAA0C;AAC1C,4DAAmC;AACnC,8DAA6B;AAC7B,0DAAiC;AACjC,6BAAwB;AAExB,qCASkB;AAClB,mCAAuC;AACvC,mCAAqD;AACrD,+BAAwB;AACxB,+CAAuD;AAEvD,uDAAuD;AAEvD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,oBAAS,CAAC;AAEpD,SAAS,SAAS;IAChB,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,MAAM,CAAC;AACnD,CAAC;AAED,SAAS,QAAQ;IACf,OAAO,SAAS,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AACvC,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC;AACvC,CAAC;AA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C,GAAG;aACd,CAAC,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAED,IACE,OAAO,IAAI,CAAC,aAAa,KAAK,UAAU;QACxC,IAAI,CAAC,aAAa,KAAK,KAAK,EAC5B,CAAC;QACD,IAAI,CAAC,aAAa,GAAG,6BAAoB,CAAC;IAC5C,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,0BAkHM,KAAK;IACV,8FAAqB,CAAC,wDAAa,mBAAmB,GAAC,CAAC,CAAC,eAAe,0BAAA,CAAC;IAEzE,OAAO,uBAAA,IAAI,8BAAY,CAAC;AAC1B,CAAC;AAjBD;;;;GAIG;AACH,sDAAsD;AAC/C,sCAAW,CAAsD"}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { GaxiosOptions } from './common';
|
| 2 |
+
import { Gaxios } from './gaxios';
|
| 3 |
+
export { GaxiosError, GaxiosPromise, GaxiosResponse, Headers, RetryConfig, } from './common';
|
| 4 |
+
export { Gaxios, GaxiosOptions };
|
| 5 |
+
export * from './interceptor';
|
| 6 |
+
/**
|
| 7 |
+
* The default instance used when the `request` method is directly
|
| 8 |
+
* invoked.
|
| 9 |
+
*/
|
| 10 |
+
export declare const instance: Gaxios;
|
| 11 |
+
/**
|
| 12 |
+
* Make an HTTP request using the given options.
|
| 13 |
+
* @param opts Options for the request
|
| 14 |
+
*/
|
| 15 |
+
export declare function request<T>(opts: GaxiosOptions): Promise<import("./common").GaxiosResponse<T>>;
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
// Copyright 2018 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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
| 26 |
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
| 27 |
+
};
|
| 28 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 29 |
+
exports.instance = exports.Gaxios = exports.GaxiosError = void 0;
|
| 30 |
+
exports.request = request;
|
| 31 |
+
const gaxios_1 = require("./gaxios");
|
| 32 |
+
Object.defineProperty(exports, "Gaxios", { enumerable: true, get: function () { return gaxios_1.Gaxios; } });
|
| 33 |
+
var common_1 = require("./common");
|
| 34 |
+
Object.defineProperty(exports, "GaxiosError", { enumerable: true, get: function () { return common_1.GaxiosError; } });
|
| 35 |
+
__exportStar(require("./interceptor"), exports);
|
| 36 |
+
/**
|
| 37 |
+
* The default instance used when the `request` method is directly
|
| 38 |
+
* invoked.
|
| 39 |
+
*/
|
| 40 |
+
exports.instance = new gaxios_1.Gaxios();
|
| 41 |
+
/**
|
| 42 |
+
* Make an HTTP request using the given options.
|
| 43 |
+
* @param opts Options for the request
|
| 44 |
+
*/
|
| 45 |
+
async function request(opts) {
|
| 46 |
+
return exports.instance.request(opts);
|
| 47 |
+
}
|
| 48 |
+
//# sourceMappingURL=index.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;;AAyBjC,0BAEC;AAxBD,qCAAgC;AASxB,uFATA,eAAM,OASA;AAPd,mCAMkB;AALhB,qGAAA,WAAW,OAAA;AAOb,gDAA8B;AAE9B;;;GAGG;AACU,QAAA,QAAQ,GAAG,IAAI,eAAM,EAAE,CAAC;AAErC;;;GAGG;AACI,KAAK,UAAU,OAAO,CAAI,IAAmB;IAClD,OAAO,gBAAQ,CAAC,OAAO,CAAI,IAAI,CAAC,CAAC;AACnC,CAAC"}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/interceptor.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { GaxiosError, GaxiosOptions, GaxiosResponse } from './common';
|
| 2 |
+
/**
|
| 3 |
+
* Interceptors that can be run for requests or responses. These interceptors run asynchronously.
|
| 4 |
+
*/
|
| 5 |
+
export interface GaxiosInterceptor<T extends GaxiosOptions | GaxiosResponse> {
|
| 6 |
+
/**
|
| 7 |
+
* Function to be run when applying an interceptor.
|
| 8 |
+
*
|
| 9 |
+
* @param {T} configOrResponse The current configuration or response.
|
| 10 |
+
* @returns {Promise<T>} Promise that resolves to the modified set of options or response.
|
| 11 |
+
*/
|
| 12 |
+
resolved?: (configOrResponse: T) => Promise<T>;
|
| 13 |
+
/**
|
| 14 |
+
* Function to be run if the previous call to resolved throws / rejects or the request results in an invalid status
|
| 15 |
+
* as determined by the call to validateStatus.
|
| 16 |
+
*
|
| 17 |
+
* @param {GaxiosError} err The error thrown from the previously called resolved function.
|
| 18 |
+
*/
|
| 19 |
+
rejected?: (err: GaxiosError) => void;
|
| 20 |
+
}
|
| 21 |
+
/**
|
| 22 |
+
* Class to manage collections of GaxiosInterceptors for both requests and responses.
|
| 23 |
+
*/
|
| 24 |
+
export declare class GaxiosInterceptorManager<T extends GaxiosOptions | GaxiosResponse> extends Set<GaxiosInterceptor<T> | null> {
|
| 25 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/interceptor.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
// Copyright 2024 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 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 15 |
+
exports.GaxiosInterceptorManager = void 0;
|
| 16 |
+
/**
|
| 17 |
+
* Class to manage collections of GaxiosInterceptors for both requests and responses.
|
| 18 |
+
*/
|
| 19 |
+
class GaxiosInterceptorManager extends Set {
|
| 20 |
+
}
|
| 21 |
+
exports.GaxiosInterceptorManager = GaxiosInterceptorManager;
|
| 22 |
+
//# sourceMappingURL=interceptor.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/interceptor.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"interceptor.js","sourceRoot":"","sources":["../../src/interceptor.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAwBjC;;GAEG;AACH,MAAa,wBAEX,SAAQ,GAAgC;CAAG;AAF7C,4DAE6C"}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/retry.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { GaxiosError } from './common';
|
| 2 |
+
export declare function getRetryConfig(err: GaxiosError): Promise<{
|
| 3 |
+
shouldRetry: boolean;
|
| 4 |
+
config?: undefined;
|
| 5 |
+
} | {
|
| 6 |
+
shouldRetry: boolean;
|
| 7 |
+
config: import("./common").GaxiosOptions;
|
| 8 |
+
}>;
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/retry.js
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
// Copyright 2018 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 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 15 |
+
exports.getRetryConfig = getRetryConfig;
|
| 16 |
+
async function getRetryConfig(err) {
|
| 17 |
+
let config = getConfig(err);
|
| 18 |
+
if (!err || !err.config || (!config && !err.config.retry)) {
|
| 19 |
+
return { shouldRetry: false };
|
| 20 |
+
}
|
| 21 |
+
config = config || {};
|
| 22 |
+
config.currentRetryAttempt = config.currentRetryAttempt || 0;
|
| 23 |
+
config.retry =
|
| 24 |
+
config.retry === undefined || config.retry === null ? 3 : config.retry;
|
| 25 |
+
config.httpMethodsToRetry = config.httpMethodsToRetry || [
|
| 26 |
+
'GET',
|
| 27 |
+
'HEAD',
|
| 28 |
+
'PUT',
|
| 29 |
+
'OPTIONS',
|
| 30 |
+
'DELETE',
|
| 31 |
+
];
|
| 32 |
+
config.noResponseRetries =
|
| 33 |
+
config.noResponseRetries === undefined || config.noResponseRetries === null
|
| 34 |
+
? 2
|
| 35 |
+
: config.noResponseRetries;
|
| 36 |
+
config.retryDelayMultiplier = config.retryDelayMultiplier
|
| 37 |
+
? config.retryDelayMultiplier
|
| 38 |
+
: 2;
|
| 39 |
+
config.timeOfFirstRequest = config.timeOfFirstRequest
|
| 40 |
+
? config.timeOfFirstRequest
|
| 41 |
+
: Date.now();
|
| 42 |
+
config.totalTimeout = config.totalTimeout
|
| 43 |
+
? config.totalTimeout
|
| 44 |
+
: Number.MAX_SAFE_INTEGER;
|
| 45 |
+
config.maxRetryDelay = config.maxRetryDelay
|
| 46 |
+
? config.maxRetryDelay
|
| 47 |
+
: Number.MAX_SAFE_INTEGER;
|
| 48 |
+
// If this wasn't in the list of status codes where we want
|
| 49 |
+
// to automatically retry, return.
|
| 50 |
+
const retryRanges = [
|
| 51 |
+
// https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
|
| 52 |
+
// 1xx - Retry (Informational, request still processing)
|
| 53 |
+
// 2xx - Do not retry (Success)
|
| 54 |
+
// 3xx - Do not retry (Redirect)
|
| 55 |
+
// 4xx - Do not retry (Client errors)
|
| 56 |
+
// 408 - Retry ("Request Timeout")
|
| 57 |
+
// 429 - Retry ("Too Many Requests")
|
| 58 |
+
// 5xx - Retry (Server errors)
|
| 59 |
+
[100, 199],
|
| 60 |
+
[408, 408],
|
| 61 |
+
[429, 429],
|
| 62 |
+
[500, 599],
|
| 63 |
+
];
|
| 64 |
+
config.statusCodesToRetry = config.statusCodesToRetry || retryRanges;
|
| 65 |
+
// Put the config back into the err
|
| 66 |
+
err.config.retryConfig = config;
|
| 67 |
+
// Determine if we should retry the request
|
| 68 |
+
const shouldRetryFn = config.shouldRetry || shouldRetryRequest;
|
| 69 |
+
if (!(await shouldRetryFn(err))) {
|
| 70 |
+
return { shouldRetry: false, config: err.config };
|
| 71 |
+
}
|
| 72 |
+
const delay = getNextRetryDelay(config);
|
| 73 |
+
// We're going to retry! Incremenent the counter.
|
| 74 |
+
err.config.retryConfig.currentRetryAttempt += 1;
|
| 75 |
+
// Create a promise that invokes the retry after the backOffDelay
|
| 76 |
+
const backoff = config.retryBackoff
|
| 77 |
+
? config.retryBackoff(err, delay)
|
| 78 |
+
: new Promise(resolve => {
|
| 79 |
+
setTimeout(resolve, delay);
|
| 80 |
+
});
|
| 81 |
+
// Notify the user if they added an `onRetryAttempt` handler
|
| 82 |
+
if (config.onRetryAttempt) {
|
| 83 |
+
config.onRetryAttempt(err);
|
| 84 |
+
}
|
| 85 |
+
// Return the promise in which recalls Gaxios to retry the request
|
| 86 |
+
await backoff;
|
| 87 |
+
return { shouldRetry: true, config: err.config };
|
| 88 |
+
}
|
| 89 |
+
/**
|
| 90 |
+
* Determine based on config if we should retry the request.
|
| 91 |
+
* @param err The GaxiosError passed to the interceptor.
|
| 92 |
+
*/
|
| 93 |
+
function shouldRetryRequest(err) {
|
| 94 |
+
var _a;
|
| 95 |
+
const config = getConfig(err);
|
| 96 |
+
// node-fetch raises an AbortError if signaled:
|
| 97 |
+
// https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal
|
| 98 |
+
if (err.name === 'AbortError' || ((_a = err.error) === null || _a === void 0 ? void 0 : _a.name) === 'AbortError') {
|
| 99 |
+
return false;
|
| 100 |
+
}
|
| 101 |
+
// If there's no config, or retries are disabled, return.
|
| 102 |
+
if (!config || config.retry === 0) {
|
| 103 |
+
return false;
|
| 104 |
+
}
|
| 105 |
+
// Check if this error has no response (ETIMEDOUT, ENOTFOUND, etc)
|
| 106 |
+
if (!err.response &&
|
| 107 |
+
(config.currentRetryAttempt || 0) >= config.noResponseRetries) {
|
| 108 |
+
return false;
|
| 109 |
+
}
|
| 110 |
+
// Only retry with configured HttpMethods.
|
| 111 |
+
if (!err.config.method ||
|
| 112 |
+
config.httpMethodsToRetry.indexOf(err.config.method.toUpperCase()) < 0) {
|
| 113 |
+
return false;
|
| 114 |
+
}
|
| 115 |
+
// If this wasn't in the list of status codes where we want
|
| 116 |
+
// to automatically retry, return.
|
| 117 |
+
if (err.response && err.response.status) {
|
| 118 |
+
let isInRange = false;
|
| 119 |
+
for (const [min, max] of config.statusCodesToRetry) {
|
| 120 |
+
const status = err.response.status;
|
| 121 |
+
if (status >= min && status <= max) {
|
| 122 |
+
isInRange = true;
|
| 123 |
+
break;
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
if (!isInRange) {
|
| 127 |
+
return false;
|
| 128 |
+
}
|
| 129 |
+
}
|
| 130 |
+
// If we are out of retry attempts, return
|
| 131 |
+
config.currentRetryAttempt = config.currentRetryAttempt || 0;
|
| 132 |
+
if (config.currentRetryAttempt >= config.retry) {
|
| 133 |
+
return false;
|
| 134 |
+
}
|
| 135 |
+
return true;
|
| 136 |
+
}
|
| 137 |
+
/**
|
| 138 |
+
* Acquire the raxConfig object from an GaxiosError if available.
|
| 139 |
+
* @param err The Gaxios error with a config object.
|
| 140 |
+
*/
|
| 141 |
+
function getConfig(err) {
|
| 142 |
+
if (err && err.config && err.config.retryConfig) {
|
| 143 |
+
return err.config.retryConfig;
|
| 144 |
+
}
|
| 145 |
+
return;
|
| 146 |
+
}
|
| 147 |
+
/**
|
| 148 |
+
* Gets the delay to wait before the next retry.
|
| 149 |
+
*
|
| 150 |
+
* @param {RetryConfig} config The current set of retry options
|
| 151 |
+
* @returns {number} the amount of ms to wait before the next retry attempt.
|
| 152 |
+
*/
|
| 153 |
+
function getNextRetryDelay(config) {
|
| 154 |
+
var _a;
|
| 155 |
+
// Calculate time to wait with exponential backoff.
|
| 156 |
+
// If this is the first retry, look for a configured retryDelay.
|
| 157 |
+
const retryDelay = config.currentRetryAttempt ? 0 : (_a = config.retryDelay) !== null && _a !== void 0 ? _a : 100;
|
| 158 |
+
// Formula: retryDelay + ((retryDelayMultiplier^currentRetryAttempt - 1 / 2) * 1000)
|
| 159 |
+
const calculatedDelay = retryDelay +
|
| 160 |
+
((Math.pow(config.retryDelayMultiplier, config.currentRetryAttempt) - 1) /
|
| 161 |
+
2) *
|
| 162 |
+
1000;
|
| 163 |
+
const maxAllowableDelay = config.totalTimeout - (Date.now() - config.timeOfFirstRequest);
|
| 164 |
+
return Math.min(calculatedDelay, maxAllowableDelay, config.maxRetryDelay);
|
| 165 |
+
}
|
| 166 |
+
//# sourceMappingURL=retry.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/retry.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/retry.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAIjC,wCAgFC;AAhFM,KAAK,UAAU,cAAc,CAAC,GAAgB;IACnD,IAAI,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1D,OAAO,EAAC,WAAW,EAAE,KAAK,EAAC,CAAC;IAC9B,CAAC;IACD,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;IACtB,M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+
name: string;
|
| 3 |
+
version: string;
|
| 4 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/util.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
// Copyright 2023 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 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 15 |
+
exports.pkg = void 0;
|
| 16 |
+
exports.pkg = require('../../package.json');
|
| 17 |
+
//# sourceMappingURL=util.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/build/src/util.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEpB,QAAA,GAAG,GAGZ,OAAO,CAAC,oBAAoB,CAAC,CAAC"}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gaxios/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "gaxios",
|
| 3 |
+
"version": "6.7.1",
|
| 4 |
+
"description": "A simple common HTTP client specifically for Google APIs and services.",
|
| 5 |
+
"main": "build/src/index.js",
|
| 6 |
+
"types": "build/src/index.d.ts",
|
| 7 |
+
"files": [
|
| 8 |
+
"build/src"
|
| 9 |
+
],
|
| 10 |
+
"scripts": {
|
| 11 |
+
"lint": "gts check",
|
| 12 |
+
"test": "c8 mocha build/test",
|
| 13 |
+
"presystem-test": "npm run compile",
|
| 14 |
+
"system-test": "mocha build/system-test --timeout 80000",
|
| 15 |
+
"compile": "tsc -p .",
|
| 16 |
+
"fix": "gts fix",
|
| 17 |
+
"prepare": "npm run compile",
|
| 18 |
+
"pretest": "npm run compile",
|
| 19 |
+
"webpack": "webpack",
|
| 20 |
+
"prebrowser-test": "npm run compile",
|
| 21 |
+
"browser-test": "node build/browser-test/browser-test-runner.js",
|
| 22 |
+
"docs": "compodoc src/",
|
| 23 |
+
"docs-test": "linkinator docs",
|
| 24 |
+
"predocs-test": "npm run docs",
|
| 25 |
+
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
|
| 26 |
+
"prelint": "cd samples; npm link ../; npm install",
|
| 27 |
+
"clean": "gts clean",
|
| 28 |
+
"precompile": "gts clean"
|
| 29 |
+
},
|
| 30 |
+
"repository": "googleapis/gaxios",
|
| 31 |
+
"keywords": [
|
| 32 |
+
"google"
|
| 33 |
+
],
|
| 34 |
+
"engines": {
|
| 35 |
+
"node": ">=14"
|
| 36 |
+
},
|
| 37 |
+
"author": "Google, LLC",
|
| 38 |
+
"license": "Apache-2.0",
|
| 39 |
+
"devDependencies": {
|
| 40 |
+
"@babel/plugin-proposal-private-methods": "^7.18.6",
|
| 41 |
+
"@compodoc/compodoc": "1.1.19",
|
| 42 |
+
"@types/cors": "^2.8.6",
|
| 43 |
+
"@types/express": "^4.16.1",
|
| 44 |
+
"@types/extend": "^3.0.1",
|
| 45 |
+
"@types/mocha": "^9.0.0",
|
| 46 |
+
"@types/multiparty": "0.0.36",
|
| 47 |
+
"@types/mv": "^2.1.0",
|
| 48 |
+
"@types/ncp": "^2.0.1",
|
| 49 |
+
"@types/node": "^20.0.0",
|
| 50 |
+
"@types/node-fetch": "^2.5.7",
|
| 51 |
+
"@types/sinon": "^17.0.0",
|
| 52 |
+
"@types/tmp": "0.2.6",
|
| 53 |
+
"@types/uuid": "^10.0.0",
|
| 54 |
+
"abort-controller": "^3.0.0",
|
| 55 |
+
"assert": "^2.0.0",
|
| 56 |
+
"browserify": "^17.0.0",
|
| 57 |
+
"c8": "^8.0.0",
|
| 58 |
+
"cheerio": "1.0.0-rc.10",
|
| 59 |
+
"cors": "^2.8.5",
|
| 60 |
+
"execa": "^5.0.0",
|
| 61 |
+
"express": "^4.16.4",
|
| 62 |
+
"form-data": "^4.0.0",
|
| 63 |
+
"gts": "^5.0.0",
|
| 64 |
+
"is-docker": "^2.0.0",
|
| 65 |
+
"karma": "^6.0.0",
|
| 66 |
+
"karma-chrome-launcher": "^3.0.0",
|
| 67 |
+
"karma-coverage": "^2.0.0",
|
| 68 |
+
"karma-firefox-launcher": "^2.0.0",
|
| 69 |
+
"karma-mocha": "^2.0.0",
|
| 70 |
+
"karma-remap-coverage": "^0.1.5",
|
| 71 |
+
"karma-sourcemap-loader": "^0.4.0",
|
| 72 |
+
"karma-webpack": "5.0.0",
|
| 73 |
+
"linkinator": "^3.0.0",
|
| 74 |
+
"mocha": "^8.0.0",
|
| 75 |
+
"multiparty": "^4.2.1",
|
| 76 |
+
"mv": "^2.1.1",
|
| 77 |
+
"ncp": "^2.0.0",
|
| 78 |
+
"nock": "^13.0.0",
|
| 79 |
+
"null-loader": "^4.0.0",
|
| 80 |
+
"puppeteer": "^19.0.0",
|
| 81 |
+
"sinon": "^18.0.0",
|
| 82 |
+
"stream-browserify": "^3.0.0",
|
| 83 |
+
"tmp": "0.2.3",
|
| 84 |
+
"ts-loader": "^8.0.0",
|
| 85 |
+
"typescript": "^5.1.6",
|
| 86 |
+
"webpack": "^5.35.0",
|
| 87 |
+
"webpack-cli": "^4.0.0"
|
| 88 |
+
},
|
| 89 |
+
"dependencies": {
|
| 90 |
+
"extend": "^3.0.2",
|
| 91 |
+
"https-proxy-agent": "^7.0.1",
|
| 92 |
+
"is-stream": "^2.0.0",
|
| 93 |
+
"node-fetch": "^2.6.9",
|
| 94 |
+
"uuid": "^9.0.1"
|
| 95 |
+
}
|
| 96 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/CHANGELOG.md
ADDED
|
@@ -0,0 +1,463 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Changelog
|
| 2 |
+
|
| 3 |
+
[npm history][1]
|
| 4 |
+
|
| 5 |
+
[1]: https://www.npmjs.com/package/gcp-metadata?activeTab=versions
|
| 6 |
+
|
| 7 |
+
## [6.1.1](https://github.com/googleapis/gcp-metadata/compare/v6.1.0...v6.1.1) (2025-01-30)
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
### Bug Fixes
|
| 11 |
+
|
| 12 |
+
* Add extra logging for incorrect headers ([#637](https://github.com/googleapis/gcp-metadata/issues/637)) ([edafa87](https://github.com/googleapis/gcp-metadata/commit/edafa87e020ffe28983048de5da183ceb0483bfa))
|
| 13 |
+
* Add extra logging for incorrect headers ([#637](https://github.com/googleapis/gcp-metadata/issues/637)) ([#647](https://github.com/googleapis/gcp-metadata/issues/647)) ([ccbb98e](https://github.com/googleapis/gcp-metadata/commit/ccbb98e3519496414ab654769072d3397153b4b2))
|
| 14 |
+
|
| 15 |
+
## [6.1.0](https://github.com/googleapis/gcp-metadata/compare/v6.0.0...v6.1.0) (2023-11-10)
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
### Features
|
| 19 |
+
|
| 20 |
+
* Add `universe` metadata handler ([#596](https://github.com/googleapis/gcp-metadata/issues/596)) ([0c02016](https://github.com/googleapis/gcp-metadata/commit/0c02016756754cddde6c4402fac1ceb6a318e82d))
|
| 21 |
+
* Bulk Metadata Requests ([#598](https://github.com/googleapis/gcp-metadata/issues/598)) ([0a51378](https://github.com/googleapis/gcp-metadata/commit/0a513788537173570f9910d368dd36717de7233b))
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
### Bug Fixes
|
| 25 |
+
|
| 26 |
+
* Repo Metadata ([#595](https://github.com/googleapis/gcp-metadata/issues/595)) ([470a872](https://github.com/googleapis/gcp-metadata/commit/470a8722df2b2fb2da1b076b73414d2e28a3ff4e))
|
| 27 |
+
|
| 28 |
+
## [6.0.0](https://github.com/googleapis/gcp-metadata/compare/v5.3.0...v6.0.0) (2023-07-17)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
### ⚠ BREAKING CHANGES
|
| 32 |
+
|
| 33 |
+
* upgrade to Node 14, and update gaxios, ts, and gts ([#571](https://github.com/googleapis/gcp-metadata/issues/571))
|
| 34 |
+
|
| 35 |
+
### Miscellaneous Chores
|
| 36 |
+
|
| 37 |
+
* Upgrade to Node 14, and update gaxios, ts, and gts ([#571](https://github.com/googleapis/gcp-metadata/issues/571)) ([88ff3ff](https://github.com/googleapis/gcp-metadata/commit/88ff3ff3d9bd8be32126e7fe76cbf33e401f8db7))
|
| 38 |
+
|
| 39 |
+
## [5.3.0](https://github.com/googleapis/gcp-metadata/compare/v5.2.0...v5.3.0) (2023-06-28)
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
### Features
|
| 43 |
+
|
| 44 |
+
* Metadata Server Detection Configuration ([#562](https://github.com/googleapis/gcp-metadata/issues/562)) ([8c7c715](https://github.com/googleapis/gcp-metadata/commit/8c7c715f1fc22ad65554a745a93915713ca6698f))
|
| 45 |
+
|
| 46 |
+
## [5.2.0](https://github.com/googleapis/gcp-metadata/compare/v5.1.0...v5.2.0) (2023-01-03)
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
### Features
|
| 50 |
+
|
| 51 |
+
* Export `gcp-residency` tools ([#552](https://github.com/googleapis/gcp-metadata/issues/552)) ([ba9ae24](https://github.com/googleapis/gcp-metadata/commit/ba9ae24331b53199f81e97b6a88414050cfcf546))
|
| 52 |
+
|
| 53 |
+
## [5.1.0](https://github.com/googleapis/gcp-metadata/compare/v5.0.1...v5.1.0) (2022-12-07)
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
### Features
|
| 57 |
+
|
| 58 |
+
* Extend GCP Residency Detection Support ([#528](https://github.com/googleapis/gcp-metadata/issues/528)) ([2b35bb0](https://github.com/googleapis/gcp-metadata/commit/2b35bb0e6fb1a18294aeeebba91a6bf7b400385a))
|
| 59 |
+
|
| 60 |
+
## [5.0.1](https://github.com/googleapis/gcp-metadata/compare/v5.0.0...v5.0.1) (2022-09-09)
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
### Bug Fixes
|
| 64 |
+
|
| 65 |
+
* Remove pip install statements ([#1546](https://github.com/googleapis/gcp-metadata/issues/1546)) ([#529](https://github.com/googleapis/gcp-metadata/issues/529)) ([064c64c](https://github.com/googleapis/gcp-metadata/commit/064c64cec160ffe645e6946a5125960e3e269d7f))
|
| 66 |
+
|
| 67 |
+
## [5.0.0](https://github.com/googleapis/gcp-metadata/compare/v4.3.1...v5.0.0) (2022-04-22)
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
### ⚠ BREAKING CHANGES
|
| 71 |
+
|
| 72 |
+
* drop node 10, update typescript to 4.6.3 (#519)
|
| 73 |
+
|
| 74 |
+
### Build System
|
| 75 |
+
|
| 76 |
+
* drop node 10, update typescript to 4.6.3 ([#519](https://github.com/googleapis/gcp-metadata/issues/519)) ([688749b](https://github.com/googleapis/gcp-metadata/commit/688749bc50407f3cd127a0b10ae09487d6fe5aea))
|
| 77 |
+
|
| 78 |
+
### [4.3.1](https://www.github.com/googleapis/gcp-metadata/compare/v4.3.0...v4.3.1) (2021-09-02)
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
### Bug Fixes
|
| 82 |
+
|
| 83 |
+
* **build:** switch primary branch to main ([#481](https://www.github.com/googleapis/gcp-metadata/issues/481)) ([8a7965c](https://www.github.com/googleapis/gcp-metadata/commit/8a7965c47c077ef766e4b416358630c0b24b0af2))
|
| 84 |
+
|
| 85 |
+
## [4.3.0](https://www.github.com/googleapis/gcp-metadata/compare/v4.2.1...v4.3.0) (2021-06-10)
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
### Features
|
| 89 |
+
|
| 90 |
+
* add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#450](https://www.github.com/googleapis/gcp-metadata/issues/450)) ([6a0f9ad](https://www.github.com/googleapis/gcp-metadata/commit/6a0f9ad09b6d16370d08c5d60541ce3ef64a9f97))
|
| 91 |
+
|
| 92 |
+
### [4.2.1](https://www.github.com/googleapis/gcp-metadata/compare/v4.2.0...v4.2.1) (2020-10-29)
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
### Bug Fixes
|
| 96 |
+
|
| 97 |
+
* **deps:** update dependency gaxios to v4 ([#420](https://www.github.com/googleapis/gcp-metadata/issues/420)) ([b99fb07](https://www.github.com/googleapis/gcp-metadata/commit/b99fb0764b8dbb8b083f73b8007816914db4f09a))
|
| 98 |
+
|
| 99 |
+
## [4.2.0](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.4...v4.2.0) (2020-09-15)
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
### Features
|
| 103 |
+
|
| 104 |
+
* add support for GCE_METADATA_HOST environment variable ([#406](https://www.github.com/googleapis/gcp-metadata/issues/406)) ([eaf128a](https://www.github.com/googleapis/gcp-metadata/commit/eaf128ad5afc4357cde72d19b017b9474c070fea))
|
| 105 |
+
|
| 106 |
+
### [4.1.4](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.3...v4.1.4) (2020-07-15)
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
### Bug Fixes
|
| 110 |
+
|
| 111 |
+
* **deps:** update dependency json-bigint to v1 ([#382](https://www.github.com/googleapis/gcp-metadata/issues/382)) ([ab4d8c3](https://www.github.com/googleapis/gcp-metadata/commit/ab4d8c3022903206d433bafc47c27815c6f85e36))
|
| 112 |
+
|
| 113 |
+
### [4.1.3](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.2...v4.1.3) (2020-07-13)
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
### Bug Fixes
|
| 117 |
+
|
| 118 |
+
* **deps:** update dependency json-bigint to ^0.4.0 ([#378](https://www.github.com/googleapis/gcp-metadata/issues/378)) ([b214280](https://www.github.com/googleapis/gcp-metadata/commit/b2142807928c8c032509277900d35fccd1023f0f))
|
| 119 |
+
|
| 120 |
+
### [4.1.2](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.1...v4.1.2) (2020-07-10)
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
### Bug Fixes
|
| 124 |
+
|
| 125 |
+
* **deps:** roll back dependency gcp-metadata to ^4.1.0 ([#373](https://www.github.com/googleapis/gcp-metadata/issues/373)) ([a45adef](https://www.github.com/googleapis/gcp-metadata/commit/a45adefd92418faa08c8a5014cedb844d1eb3ae6))
|
| 126 |
+
|
| 127 |
+
### [4.1.1](https://www.github.com/googleapis/gcp-metadata/compare/v4.1.0...v4.1.1) (2020-07-09)
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
### Bug Fixes
|
| 131 |
+
|
| 132 |
+
* typeo in nodejs .gitattribute ([#371](https://www.github.com/googleapis/gcp-metadata/issues/371)) ([5b4bb1c](https://www.github.com/googleapis/gcp-metadata/commit/5b4bb1c85e67e3ef0a6d1ec2ea316d560e03092f))
|
| 133 |
+
|
| 134 |
+
## [4.1.0](https://www.github.com/googleapis/gcp-metadata/compare/v4.0.1...v4.1.0) (2020-05-05)
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
### Features
|
| 138 |
+
|
| 139 |
+
* Introduces the GCE_METADATA_IP to allow using a different IP address for the GCE metadata server. ([#346](https://www.github.com/googleapis/gcp-metadata/issues/346)) ([ec0f82d](https://www.github.com/googleapis/gcp-metadata/commit/ec0f82d022b4b3aac95e94ee1d8e53cfac3b14a4))
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
### Bug Fixes
|
| 143 |
+
|
| 144 |
+
* do not check secondary host if GCE_METADATA_IP set ([#352](https://www.github.com/googleapis/gcp-metadata/issues/352)) ([64fa7d6](https://www.github.com/googleapis/gcp-metadata/commit/64fa7d68cbb76f455a3bfdcb27d58e7775eb789a))
|
| 145 |
+
* warn rather than throwing when we fail to connect to metadata server ([#351](https://www.github.com/googleapis/gcp-metadata/issues/351)) ([754a6c0](https://www.github.com/googleapis/gcp-metadata/commit/754a6c07d1a72615cbb5ebf9ee04475a9a12f1c0))
|
| 146 |
+
|
| 147 |
+
### [4.0.1](https://www.github.com/googleapis/gcp-metadata/compare/v4.0.0...v4.0.1) (2020-04-14)
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
### Bug Fixes
|
| 151 |
+
|
| 152 |
+
* **deps:** update dependency gaxios to v3 ([#326](https://www.github.com/googleapis/gcp-metadata/issues/326)) ([5667178](https://www.github.com/googleapis/gcp-metadata/commit/5667178429baff71ad5dab2a96f97f27b2106d57))
|
| 153 |
+
* apache license URL ([#468](https://www.github.com/googleapis/gcp-metadata/issues/468)) ([#336](https://www.github.com/googleapis/gcp-metadata/issues/336)) ([195dcd2](https://www.github.com/googleapis/gcp-metadata/commit/195dcd2d227ba496949e7ec0dcd77e5b9269066c))
|
| 154 |
+
|
| 155 |
+
## [4.0.0](https://www.github.com/googleapis/gcp-metadata/compare/v3.5.0...v4.0.0) (2020-03-19)
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
### ⚠ BREAKING CHANGES
|
| 159 |
+
|
| 160 |
+
* typescript@3.7.x has breaking changes; compiler now targets es2015
|
| 161 |
+
* drops Node 8 from engines field (#315)
|
| 162 |
+
|
| 163 |
+
### Features
|
| 164 |
+
|
| 165 |
+
* drops Node 8 from engines field ([#315](https://www.github.com/googleapis/gcp-metadata/issues/315)) ([acb6233](https://www.github.com/googleapis/gcp-metadata/commit/acb62337e8ba7f0b259ae4e553f19c5786207d84))
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
### Build System
|
| 169 |
+
|
| 170 |
+
* switch to latest typescirpt/gts ([#317](https://www.github.com/googleapis/gcp-metadata/issues/317)) ([fbb7158](https://www.github.com/googleapis/gcp-metadata/commit/fbb7158be62c9f1949b69079e35113be1e10495c))
|
| 171 |
+
|
| 172 |
+
## [3.5.0](https://www.github.com/googleapis/gcp-metadata/compare/v3.4.0...v3.5.0) (2020-03-03)
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
### Features
|
| 176 |
+
|
| 177 |
+
* add ECONNREFUSED to list of known errors for isAvailable() ([#309](https://www.github.com/googleapis/gcp-metadata/issues/309)) ([17ff6ea](https://www.github.com/googleapis/gcp-metadata/commit/17ff6ea361d02de31463532d4ab4040bf6276e0b))
|
| 178 |
+
|
| 179 |
+
## [3.4.0](https://www.github.com/googleapis/gcp-metadata/compare/v3.3.1...v3.4.0) (2020-02-24)
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
### Features
|
| 183 |
+
|
| 184 |
+
* significantly increase timeout if GCF environment detected ([#300](https://www.github.com/googleapis/gcp-metadata/issues/300)) ([8e507c6](https://www.github.com/googleapis/gcp-metadata/commit/8e507c645f69a11f508884b3181dc4414e579fcc))
|
| 185 |
+
|
| 186 |
+
### [3.3.1](https://www.github.com/googleapis/gcp-metadata/compare/v3.3.0...v3.3.1) (2020-01-30)
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
### Bug Fixes
|
| 190 |
+
|
| 191 |
+
* **isAvailable:** handle EHOSTDOWN and EHOSTUNREACH error codes ([#291](https://www.github.com/googleapis/gcp-metadata/issues/291)) ([ba8d9f5](https://www.github.com/googleapis/gcp-metadata/commit/ba8d9f50eac6cf8b439c1b66c48ace146c75f6e2))
|
| 192 |
+
|
| 193 |
+
## [3.3.0](https://www.github.com/googleapis/gcp-metadata/compare/v3.2.3...v3.3.0) (2019-12-16)
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
### Features
|
| 197 |
+
|
| 198 |
+
* add environment variable for configuring environment detection ([#275](https://www.github.com/googleapis/gcp-metadata/issues/275)) ([580cfa4](https://www.github.com/googleapis/gcp-metadata/commit/580cfa4a5f5d0041aa09ae85cfc5a4575dd3957f))
|
| 199 |
+
* cache response from isAvailable() method ([#274](https://www.github.com/googleapis/gcp-metadata/issues/274)) ([a05e13f](https://www.github.com/googleapis/gcp-metadata/commit/a05e13f1d1d61b1f9b9b1703bc37cdbdc022c93b))
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
### Bug Fixes
|
| 203 |
+
|
| 204 |
+
* fastFailMetadataRequest should not reject, if response already happened ([#273](https://www.github.com/googleapis/gcp-metadata/issues/273)) ([a6590c4](https://www.github.com/googleapis/gcp-metadata/commit/a6590c4fd8bc2dff3995c83d4c9175d5bd9f5e4a))
|
| 205 |
+
|
| 206 |
+
### [3.2.3](https://www.github.com/googleapis/gcp-metadata/compare/v3.2.2...v3.2.3) (2019-12-12)
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
### Bug Fixes
|
| 210 |
+
|
| 211 |
+
* **deps:** pin TypeScript below 3.7.0 ([e4bf622](https://www.github.com/googleapis/gcp-metadata/commit/e4bf622e6654a51ddffc0921a15250130591db2f))
|
| 212 |
+
|
| 213 |
+
### [3.2.2](https://www.github.com/googleapis/gcp-metadata/compare/v3.2.1...v3.2.2) (2019-11-13)
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
### Bug Fixes
|
| 217 |
+
|
| 218 |
+
* **docs:** add jsdoc-region-tag plugin ([#264](https://www.github.com/googleapis/gcp-metadata/issues/264)) ([af8362b](https://www.github.com/googleapis/gcp-metadata/commit/af8362b5a35d270af00cb3696bbf7344810e9b0c))
|
| 219 |
+
|
| 220 |
+
### [3.2.1](https://www.github.com/googleapis/gcp-metadata/compare/v3.2.0...v3.2.1) (2019-11-08)
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
### Bug Fixes
|
| 224 |
+
|
| 225 |
+
* **deps:** update gaxios ([#257](https://www.github.com/googleapis/gcp-metadata/issues/257)) ([ba6e0b6](https://www.github.com/googleapis/gcp-metadata/commit/ba6e0b668635b4aa4ed10535ff021c02b2edf5ea))
|
| 226 |
+
|
| 227 |
+
## [3.2.0](https://www.github.com/googleapis/gcp-metadata/compare/v3.1.0...v3.2.0) (2019-10-10)
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
### Features
|
| 231 |
+
|
| 232 |
+
* add DEBUG_AUTH for digging into authentication issues ([#254](https://www.github.com/googleapis/gcp-metadata/issues/254)) ([804156d](https://www.github.com/googleapis/gcp-metadata/commit/804156d))
|
| 233 |
+
|
| 234 |
+
## [3.1.0](https://www.github.com/googleapis/gcp-metadata/compare/v3.0.0...v3.1.0) (2019-10-07)
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
### Features
|
| 238 |
+
|
| 239 |
+
* don't throw on ENETUNREACH ([#250](https://www.github.com/googleapis/gcp-metadata/issues/250)) ([88f2101](https://www.github.com/googleapis/gcp-metadata/commit/88f2101))
|
| 240 |
+
|
| 241 |
+
## [3.0.0](https://www.github.com/googleapis/gcp-metadata/compare/v2.0.4...v3.0.0) (2019-09-17)
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
### ⚠ BREAKING CHANGES
|
| 245 |
+
|
| 246 |
+
* isAvailable now tries both DNS and IP, choosing whichever responds first (#239)
|
| 247 |
+
|
| 248 |
+
### Features
|
| 249 |
+
|
| 250 |
+
* isAvailable now tries both DNS and IP, choosing whichever responds first ([#239](https://www.github.com/googleapis/gcp-metadata/issues/239)) ([25bc116](https://www.github.com/googleapis/gcp-metadata/commit/25bc116))
|
| 251 |
+
|
| 252 |
+
### [2.0.4](https://www.github.com/googleapis/gcp-metadata/compare/v2.0.3...v2.0.4) (2019-09-13)
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
### Bug Fixes
|
| 256 |
+
|
| 257 |
+
* IP address takes 15 seconds to timeout, vs., metadata returning immediately ([#235](https://www.github.com/googleapis/gcp-metadata/issues/235)) ([d04207b](https://www.github.com/googleapis/gcp-metadata/commit/d04207b))
|
| 258 |
+
* use 3s timeout rather than 15 default ([#237](https://www.github.com/googleapis/gcp-metadata/issues/237)) ([231ca5c](https://www.github.com/googleapis/gcp-metadata/commit/231ca5c))
|
| 259 |
+
|
| 260 |
+
### [2.0.3](https://www.github.com/googleapis/gcp-metadata/compare/v2.0.2...v2.0.3) (2019-09-12)
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
### Bug Fixes
|
| 264 |
+
|
| 265 |
+
* use IP for metadata server ([#233](https://www.github.com/googleapis/gcp-metadata/issues/233)) ([20a15cb](https://www.github.com/googleapis/gcp-metadata/commit/20a15cb))
|
| 266 |
+
|
| 267 |
+
### [2.0.2](https://www.github.com/googleapis/gcp-metadata/compare/v2.0.1...v2.0.2) (2019-08-26)
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
### Bug Fixes
|
| 271 |
+
|
| 272 |
+
* allow calls with no request, add JSON proto ([#224](https://www.github.com/googleapis/gcp-metadata/issues/224)) ([dc758b1](https://www.github.com/googleapis/gcp-metadata/commit/dc758b1))
|
| 273 |
+
|
| 274 |
+
### [2.0.1](https://www.github.com/googleapis/gcp-metadata/compare/v2.0.0...v2.0.1) (2019-06-26)
|
| 275 |
+
|
| 276 |
+
|
| 277 |
+
### Bug Fixes
|
| 278 |
+
|
| 279 |
+
* **docs:** make anchors work in jsdoc ([#212](https://www.github.com/googleapis/gcp-metadata/issues/212)) ([9174b43](https://www.github.com/googleapis/gcp-metadata/commit/9174b43))
|
| 280 |
+
|
| 281 |
+
## [2.0.0](https://www.github.com/googleapis/gcp-metadata/compare/v1.0.0...v2.0.0) (2019-05-07)
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
### Bug Fixes
|
| 285 |
+
|
| 286 |
+
* **deps:** update dependency gaxios to v2 ([#191](https://www.github.com/googleapis/gcp-metadata/issues/191)) ([ac8c1ef](https://www.github.com/googleapis/gcp-metadata/commit/ac8c1ef))
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
### Build System
|
| 290 |
+
|
| 291 |
+
* upgrade engines field to >=8.10.0 ([#194](https://www.github.com/googleapis/gcp-metadata/issues/194)) ([97c23c8](https://www.github.com/googleapis/gcp-metadata/commit/97c23c8))
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
### BREAKING CHANGES
|
| 295 |
+
|
| 296 |
+
* upgrade engines field to >=8.10.0 (#194)
|
| 297 |
+
|
| 298 |
+
## v1.0.0
|
| 299 |
+
|
| 300 |
+
02-14-2019 16:00 PST
|
| 301 |
+
|
| 302 |
+
### Bug Fixes
|
| 303 |
+
- fix: ask gaxios for text and not json ([#152](https://github.com/googleapis/gcp-metadata/pull/152))
|
| 304 |
+
|
| 305 |
+
### Documentation
|
| 306 |
+
- docs: update links in contrib guide ([#168](https://github.com/googleapis/gcp-metadata/pull/168))
|
| 307 |
+
- docs: add lint/fix example to contributing guide ([#160](https://github.com/googleapis/gcp-metadata/pull/160))
|
| 308 |
+
|
| 309 |
+
### Internal / Testing Changes
|
| 310 |
+
- build: use linkinator for docs test ([#166](https://github.com/googleapis/gcp-metadata/pull/166))
|
| 311 |
+
- chore(deps): update dependency @types/tmp to v0.0.34 ([#167](https://github.com/googleapis/gcp-metadata/pull/167))
|
| 312 |
+
- build: create docs test npm scripts ([#165](https://github.com/googleapis/gcp-metadata/pull/165))
|
| 313 |
+
- test: run system tests on GCB ([#157](https://github.com/googleapis/gcp-metadata/pull/157))
|
| 314 |
+
- build: test using @grpc/grpc-js in CI ([#164](https://github.com/googleapis/gcp-metadata/pull/164))
|
| 315 |
+
- chore: move CONTRIBUTING.md to root ([#162](https://github.com/googleapis/gcp-metadata/pull/162))
|
| 316 |
+
- chore(deps): update dependency gcx to v0.1.1 ([#159](https://github.com/googleapis/gcp-metadata/pull/159))
|
| 317 |
+
- chore(deps): update dependency gcx to v0.1.0 ([#158](https://github.com/googleapis/gcp-metadata/pull/158))
|
| 318 |
+
- chore(deps): update dependency gcx to v0.0.4 ([#155](https://github.com/googleapis/gcp-metadata/pull/155))
|
| 319 |
+
- chore(deps): update dependency googleapis to v37 ([#156](https://github.com/googleapis/gcp-metadata/pull/156))
|
| 320 |
+
- build: ignore googleapis.com in doc link check ([#153](https://github.com/googleapis/gcp-metadata/pull/153))
|
| 321 |
+
- build: check broken links in generated docs ([#149](https://github.com/googleapis/gcp-metadata/pull/149))
|
| 322 |
+
- chore(build): inject yoshi automation key ([#148](https://github.com/googleapis/gcp-metadata/pull/148))
|
| 323 |
+
|
| 324 |
+
## v0.9.3
|
| 325 |
+
|
| 326 |
+
12-10-2018 16:16 PST
|
| 327 |
+
|
| 328 |
+
### Dependencies
|
| 329 |
+
- chore(deps): update dependency googleapis to v36 ([#135](https://github.com/googleapis/gcp-metadata/pull/135))
|
| 330 |
+
- chore(deps): use gaxios for http requests ([#121](https://github.com/googleapis/gcp-metadata/pull/121))
|
| 331 |
+
- chore(deps): update dependency gts to ^0.9.0 ([#123](https://github.com/googleapis/gcp-metadata/pull/123))
|
| 332 |
+
|
| 333 |
+
### Internal / Testing Changes
|
| 334 |
+
- fix(build): fix Kokoro release script ([#141](https://github.com/googleapis/gcp-metadata/pull/141))
|
| 335 |
+
- Release v0.9.2 ([#140](https://github.com/googleapis/gcp-metadata/pull/140))
|
| 336 |
+
- build: add Kokoro configs for autorelease ([#138](https://github.com/googleapis/gcp-metadata/pull/138))
|
| 337 |
+
- Release gcp-metadata v0.9.1 ([#139](https://github.com/googleapis/gcp-metadata/pull/139))
|
| 338 |
+
- chore: always nyc report before calling codecov ([#134](https://github.com/googleapis/gcp-metadata/pull/134))
|
| 339 |
+
- chore: nyc ignore build/test by default ([#133](https://github.com/googleapis/gcp-metadata/pull/133))
|
| 340 |
+
- Sync repo build files ([#131](https://github.com/googleapis/gcp-metadata/pull/131))
|
| 341 |
+
- fix(build): fix system key decryption ([#128](https://github.com/googleapis/gcp-metadata/pull/128))
|
| 342 |
+
- refactor: use execa, move post install test to system ([#127](https://github.com/googleapis/gcp-metadata/pull/127))
|
| 343 |
+
- chore: add a synth.metadata
|
| 344 |
+
- test: add a system test ([#126](https://github.com/googleapis/gcp-metadata/pull/126))
|
| 345 |
+
- chore: update eslintignore config ([#122](https://github.com/googleapis/gcp-metadata/pull/122))
|
| 346 |
+
- chore: use latest npm on Windows ([#120](https://github.com/googleapis/gcp-metadata/pull/120))
|
| 347 |
+
- chore: update CircleCI config ([#119](https://github.com/googleapis/gcp-metadata/pull/119))
|
| 348 |
+
- chore: include build in eslintignore ([#115](https://github.com/googleapis/gcp-metadata/pull/115))
|
| 349 |
+
|
| 350 |
+
## v0.9.2
|
| 351 |
+
|
| 352 |
+
12-10-2018 14:01 PST
|
| 353 |
+
|
| 354 |
+
- chore(deps): update dependency googleapis to v36 ([#135](https://github.com/googleapis/gcp-metadata/pull/135))
|
| 355 |
+
- chore: always nyc report before calling codecov ([#134](https://github.com/googleapis/gcp-metadata/pull/134))
|
| 356 |
+
- chore: nyc ignore build/test by default ([#133](https://github.com/googleapis/gcp-metadata/pull/133))
|
| 357 |
+
- chore: Re-generated to pick up changes in the API or client library generator. ([#131](https://github.com/googleapis/gcp-metadata/pull/131))
|
| 358 |
+
- fix(build): fix system key decryption ([#128](https://github.com/googleapis/gcp-metadata/pull/128))
|
| 359 |
+
- chore(deps): use gaxios for http requests ([#121](https://github.com/googleapis/gcp-metadata/pull/121))
|
| 360 |
+
- refactor: use execa, move post install test to system ([#127](https://github.com/googleapis/gcp-metadata/pull/127))
|
| 361 |
+
- chore: add a synth.metadata
|
| 362 |
+
- test: add a system test ([#126](https://github.com/googleapis/gcp-metadata/pull/126))
|
| 363 |
+
- chore(deps): update dependency gts to ^0.9.0 ([#123](https://github.com/googleapis/gcp-metadata/pull/123))
|
| 364 |
+
- chore: update eslintignore config ([#122](https://github.com/googleapis/gcp-metadata/pull/122))
|
| 365 |
+
- chore: use latest npm on Windows ([#120](https://github.com/googleapis/gcp-metadata/pull/120))
|
| 366 |
+
- chore: update CircleCI config ([#119](https://github.com/googleapis/gcp-metadata/pull/119))
|
| 367 |
+
- chore: include build in eslintignore ([#115](https://github.com/googleapis/gcp-metadata/pull/115))
|
| 368 |
+
- build: add Kokoro configs for autorelease ([#138](https://github.com/googleapis/gcp-metadata/pull/138))
|
| 369 |
+
|
| 370 |
+
## v0.9.1
|
| 371 |
+
|
| 372 |
+
12-10-2018 11:53 PST
|
| 373 |
+
|
| 374 |
+
- chore(deps): update dependency googleapis to v36 ([#135](https://github.com/googleapis/gcp-metadata/pull/135))
|
| 375 |
+
- chore: always nyc report before calling codecov ([#134](https://github.com/googleapis/gcp-metadata/pull/134))
|
| 376 |
+
- chore: nyc ignore build/test by default ([#133](https://github.com/googleapis/gcp-metadata/pull/133))
|
| 377 |
+
- chore: Re-generated to pick up changes in the API or client library generator. ([#131](https://github.com/googleapis/gcp-metadata/pull/131))
|
| 378 |
+
- fix(build): fix system key decryption ([#128](https://github.com/googleapis/gcp-metadata/pull/128))
|
| 379 |
+
- chore(deps): use gaxios for http requests ([#121](https://github.com/googleapis/gcp-metadata/pull/121))
|
| 380 |
+
- refactor: use execa, move post install test to system ([#127](https://github.com/googleapis/gcp-metadata/pull/127))
|
| 381 |
+
- chore: add a synth.metadata
|
| 382 |
+
- test: add a system test ([#126](https://github.com/googleapis/gcp-metadata/pull/126))
|
| 383 |
+
- chore(deps): update dependency gts to ^0.9.0 ([#123](https://github.com/googleapis/gcp-metadata/pull/123))
|
| 384 |
+
- chore: update eslintignore config ([#122](https://github.com/googleapis/gcp-metadata/pull/122))
|
| 385 |
+
- chore: use latest npm on Windows ([#120](https://github.com/googleapis/gcp-metadata/pull/120))
|
| 386 |
+
- chore: update CircleCI config ([#119](https://github.com/googleapis/gcp-metadata/pull/119))
|
| 387 |
+
- chore: include build in eslintignore ([#115](https://github.com/googleapis/gcp-metadata/pull/115))
|
| 388 |
+
|
| 389 |
+
## v0.9.0
|
| 390 |
+
|
| 391 |
+
10-26-2018 13:10 PDT
|
| 392 |
+
|
| 393 |
+
- feat: allow custom headers ([#109](https://github.com/googleapis/gcp-metadata/pull/109))
|
| 394 |
+
- chore: update issue templates ([#108](https://github.com/googleapis/gcp-metadata/pull/108))
|
| 395 |
+
- chore: remove old issue template ([#106](https://github.com/googleapis/gcp-metadata/pull/106))
|
| 396 |
+
- build: run tests on node11 ([#105](https://github.com/googleapis/gcp-metadata/pull/105))
|
| 397 |
+
- chores(build): do not collect sponge.xml from windows builds ([#104](https://github.com/googleapis/gcp-metadata/pull/104))
|
| 398 |
+
- chores(build): run codecov on continuous builds ([#102](https://github.com/googleapis/gcp-metadata/pull/102))
|
| 399 |
+
- chore(deps): update dependency nock to v10 ([#103](https://github.com/googleapis/gcp-metadata/pull/103))
|
| 400 |
+
- chore: update new issue template ([#101](https://github.com/googleapis/gcp-metadata/pull/101))
|
| 401 |
+
- build: fix codecov uploading on Kokoro ([#97](https://github.com/googleapis/gcp-metadata/pull/97))
|
| 402 |
+
- Update kokoro config ([#95](https://github.com/googleapis/gcp-metadata/pull/95))
|
| 403 |
+
- Update CI config ([#93](https://github.com/googleapis/gcp-metadata/pull/93))
|
| 404 |
+
- Update kokoro config ([#91](https://github.com/googleapis/gcp-metadata/pull/91))
|
| 405 |
+
- Re-generate library using /synth.py ([#90](https://github.com/googleapis/gcp-metadata/pull/90))
|
| 406 |
+
- test: remove appveyor config ([#89](https://github.com/googleapis/gcp-metadata/pull/89))
|
| 407 |
+
- Update kokoro config ([#88](https://github.com/googleapis/gcp-metadata/pull/88))
|
| 408 |
+
- Enable prefer-const in the eslint config ([#87](https://github.com/googleapis/gcp-metadata/pull/87))
|
| 409 |
+
- Enable no-var in eslint ([#86](https://github.com/googleapis/gcp-metadata/pull/86))
|
| 410 |
+
|
| 411 |
+
### New Features
|
| 412 |
+
|
| 413 |
+
A new option, `headers`, has been added to allow metadata queries to be sent with custom headers.
|
| 414 |
+
|
| 415 |
+
## v0.8.0
|
| 416 |
+
|
| 417 |
+
**This release has breaking changes**. Please take care when upgrading to the latest version.
|
| 418 |
+
|
| 419 |
+
#### Dropped support for Node.js 4.x and 9.x
|
| 420 |
+
This library is no longer tested against versions 4.x and 9.x of Node.js. Please upgrade to the latest supported LTS version!
|
| 421 |
+
|
| 422 |
+
#### Return type of `instance()` and `project()` has changed
|
| 423 |
+
The `instance()` and `project()` methods are much more selective about which properties they will accept.
|
| 424 |
+
|
| 425 |
+
The only accepted properties are `params` and `properties`. The `instance()` and `project()` methods also now directly return the data instead of a response object.
|
| 426 |
+
|
| 427 |
+
#### Changes in how large number valued properties are handled
|
| 428 |
+
|
| 429 |
+
Previously large number-valued properties were being silently losing precision when
|
| 430 |
+
returned by this library (as a number). In the cases where a number valued property
|
| 431 |
+
returned by the metadata service is too large to represent as a JavaScript number, we
|
| 432 |
+
will now return the value as a BigNumber (from the bignumber.js) library. Numbers that
|
| 433 |
+
do fit into the JavaScript number range will continue to be returned as numbers.
|
| 434 |
+
For more details see [#74](https://github.com/googleapis/gcp-metadata/pull/74).
|
| 435 |
+
|
| 436 |
+
### Breaking Changes
|
| 437 |
+
- chore: drop support for node.js 4 and 9 ([#68](https://github.com/googleapis/gcp-metadata/pull/68))
|
| 438 |
+
- fix: quarantine axios config ([#62](https://github.com/googleapis/gcp-metadata/pull/62))
|
| 439 |
+
|
| 440 |
+
### Implementation Changes
|
| 441 |
+
- fix: properly handle large numbers in responses ([#74](https://github.com/googleapis/gcp-metadata/pull/74))
|
| 442 |
+
|
| 443 |
+
### Dependencies
|
| 444 |
+
- chore(deps): update dependency pify to v4 ([#73](https://github.com/googleapis/gcp-metadata/pull/73))
|
| 445 |
+
|
| 446 |
+
### Internal / Testing Changes
|
| 447 |
+
- Move to the new github org ([#84](https://github.com/googleapis/gcp-metadata/pull/84))
|
| 448 |
+
- Update CI config ([#83](https://github.com/googleapis/gcp-metadata/pull/83))
|
| 449 |
+
- Retry npm install in CI ([#81](https://github.com/googleapis/gcp-metadata/pull/81))
|
| 450 |
+
- Update CI config ([#79](https://github.com/googleapis/gcp-metadata/pull/79))
|
| 451 |
+
- chore(deps): update dependency nyc to v13 ([#77](https://github.com/googleapis/gcp-metadata/pull/77))
|
| 452 |
+
- add key for system tests
|
| 453 |
+
- increase kitchen test timeout
|
| 454 |
+
- add a lint npm script
|
| 455 |
+
- update npm scripts
|
| 456 |
+
- add a synth file and run it ([#75](https://github.com/googleapis/gcp-metadata/pull/75))
|
| 457 |
+
- chore(deps): update dependency assert-rejects to v1 ([#72](https://github.com/googleapis/gcp-metadata/pull/72))
|
| 458 |
+
- chore: ignore package-log.json ([#71](https://github.com/googleapis/gcp-metadata/pull/71))
|
| 459 |
+
- chore: update renovate config ([#70](https://github.com/googleapis/gcp-metadata/pull/70))
|
| 460 |
+
- test: throw on deprecation
|
| 461 |
+
- chore(deps): update dependency typescript to v3 ([#67](https://github.com/googleapis/gcp-metadata/pull/67))
|
| 462 |
+
- chore: make it OSPO compliant ([#66](https://github.com/googleapis/gcp-metadata/pull/66))
|
| 463 |
+
- chore(deps): update dependency gts to ^0.8.0 ([#65](https://github.com/googleapis/gcp-metadata/pull/65))
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/README.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
| 2 |
+
[//]: # "To regenerate it, use `python -m synthtool`."
|
| 3 |
+
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
| 4 |
+
|
| 5 |
+
# [GCP Metadata: Node.js Client](https://github.com/googleapis/gcp-metadata)
|
| 6 |
+
|
| 7 |
+
[](https://cloud.google.com/terms/launch-stages)
|
| 8 |
+
[](https://www.npmjs.org/package/gcp-metadata)
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
Get the metadata from a Google Cloud Platform environment
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
A comprehensive list of changes in each version may be found in
|
| 17 |
+
[the CHANGELOG](https://github.com/googleapis/gcp-metadata/blob/main/CHANGELOG.md).
|
| 18 |
+
|
| 19 |
+
* [GCP Metadata Node.js Client API Reference][client-docs]
|
| 20 |
+
* [GCP Metadata Documentation][product-docs]
|
| 21 |
+
* [github.com/googleapis/gcp-metadata](https://github.com/googleapis/gcp-metadata)
|
| 22 |
+
|
| 23 |
+
Read more about the client libraries for Cloud APIs, including the older
|
| 24 |
+
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
| 25 |
+
|
| 26 |
+
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
|
| 27 |
+
|
| 28 |
+
**Table of contents:**
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
* [Quickstart](#quickstart)
|
| 32 |
+
|
| 33 |
+
* [Installing the client library](#installing-the-client-library)
|
| 34 |
+
* [Using the client library](#using-the-client-library)
|
| 35 |
+
* [Samples](#samples)
|
| 36 |
+
* [Versioning](#versioning)
|
| 37 |
+
* [Contributing](#contributing)
|
| 38 |
+
* [License](#license)
|
| 39 |
+
|
| 40 |
+
## Quickstart
|
| 41 |
+
|
| 42 |
+
### Installing the client library
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
npm install gcp-metadata
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
### Using the client library
|
| 50 |
+
|
| 51 |
+
```javascript
|
| 52 |
+
const gcpMetadata = require('gcp-metadata');
|
| 53 |
+
|
| 54 |
+
async function quickstart() {
|
| 55 |
+
// check to see if this code can access a metadata server
|
| 56 |
+
const isAvailable = await gcpMetadata.isAvailable();
|
| 57 |
+
console.log(`Is available: ${isAvailable}`);
|
| 58 |
+
|
| 59 |
+
// Instance and Project level metadata will only be available if
|
| 60 |
+
// running inside of a Google Cloud compute environment such as
|
| 61 |
+
// Cloud Functions, App Engine, Kubernetes Engine, or Compute Engine.
|
| 62 |
+
// To learn more about the differences between instance and project
|
| 63 |
+
// level metadata, see:
|
| 64 |
+
// https://cloud.google.com/compute/docs/storing-retrieving-metadata#project-instance-metadata
|
| 65 |
+
if (isAvailable) {
|
| 66 |
+
// grab all top level metadata from the service
|
| 67 |
+
const instanceMetadata = await gcpMetadata.instance();
|
| 68 |
+
console.log('Instance metadata:');
|
| 69 |
+
console.log(instanceMetadata);
|
| 70 |
+
|
| 71 |
+
// get all project level metadata
|
| 72 |
+
const projectMetadata = await gcpMetadata.project();
|
| 73 |
+
console.log('Project metadata:');
|
| 74 |
+
console.log(projectMetadata);
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
quickstart();
|
| 79 |
+
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
#### Check to see if the metadata server is available
|
| 83 |
+
```js
|
| 84 |
+
const isAvailable = await gcpMetadata.isAvailable();
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
#### Access all metadata
|
| 88 |
+
|
| 89 |
+
```js
|
| 90 |
+
const data = await gcpMetadata.instance();
|
| 91 |
+
console.log(data); // ... All metadata properties
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
#### Access specific properties
|
| 95 |
+
```js
|
| 96 |
+
const data = await gcpMetadata.instance('hostname');
|
| 97 |
+
console.log(data); // ...Instance hostname
|
| 98 |
+
const projectId = await gcpMetadata.project('project-id');
|
| 99 |
+
console.log(projectId); // ...Project ID of the running instance
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
#### Access nested properties with the relative path
|
| 103 |
+
```js
|
| 104 |
+
const data = await gcpMetadata.instance('service-accounts/default/email');
|
| 105 |
+
console.log(data); // ...Email address of the Compute identity service account
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
#### Access specific properties with query parameters
|
| 109 |
+
```js
|
| 110 |
+
const data = await gcpMetadata.instance({
|
| 111 |
+
property: 'tags',
|
| 112 |
+
params: { alt: 'text' }
|
| 113 |
+
});
|
| 114 |
+
console.log(data) // ...Tags as newline-delimited list
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
#### Access with custom headers
|
| 118 |
+
```js
|
| 119 |
+
await gcpMetadata.instance({
|
| 120 |
+
headers: { 'no-trace': '1' }
|
| 121 |
+
}); // ...Request is untraced
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
### Take care with large number valued properties
|
| 125 |
+
|
| 126 |
+
In some cases number valued properties returned by the Metadata Service may be
|
| 127 |
+
too large to be representable as JavaScript numbers. In such cases we return
|
| 128 |
+
those values as `BigNumber` objects (from the [bignumber.js](https://github.com/MikeMcl/bignumber.js) library). Numbers
|
| 129 |
+
that fit within the JavaScript number range will be returned as normal number
|
| 130 |
+
values.
|
| 131 |
+
|
| 132 |
+
```js
|
| 133 |
+
const id = await gcpMetadata.instance('id');
|
| 134 |
+
console.log(id) // ... BigNumber { s: 1, e: 18, c: [ 45200, 31799277581759 ] }
|
| 135 |
+
console.log(id.toString()) // ... 4520031799277581759
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
### Environment variables
|
| 139 |
+
|
| 140 |
+
* `GCE_METADATA_HOST`: provide an alternate host or IP to perform lookup against (useful, for example, you're connecting through a custom proxy server).
|
| 141 |
+
|
| 142 |
+
For example:
|
| 143 |
+
```
|
| 144 |
+
export GCE_METADATA_HOST='169.254.169.254'
|
| 145 |
+
```
|
| 146 |
+
|
| 147 |
+
* `DETECT_GCP_RETRIES`: number representing number of retries that should be attempted on metadata lookup.
|
| 148 |
+
|
| 149 |
+
* `DEBUG_AUTH`: emit debugging logs
|
| 150 |
+
|
| 151 |
+
* `METADATA_SERVER_DETECTION`: configure desired metadata server availability check behavior.
|
| 152 |
+
|
| 153 |
+
* `assume-present`: don't try to ping the metadata server, but assume it's present
|
| 154 |
+
* `none`: don't try to ping the metadata server, but don't try to use it either
|
| 155 |
+
* `bios-only`: treat the result of a BIOS probe as canonical (don't fall back to pinging)
|
| 156 |
+
* `ping-only`: skip the BIOS probe, and go straight to pinging
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
## Samples
|
| 160 |
+
|
| 161 |
+
Samples are in the [`samples/`](https://github.com/googleapis/gcp-metadata/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
|
| 162 |
+
|
| 163 |
+
| Sample | Source Code | Try it |
|
| 164 |
+
| --------------------------- | --------------------------------- | ------ |
|
| 165 |
+
| Quickstart | [source code](https://github.com/googleapis/gcp-metadata/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/gcp-metadata&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
The [GCP Metadata Node.js Client API Reference][client-docs] documentation
|
| 170 |
+
also contains samples.
|
| 171 |
+
|
| 172 |
+
## Supported Node.js Versions
|
| 173 |
+
|
| 174 |
+
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
|
| 175 |
+
Libraries are compatible with all current _active_ and _maintenance_ versions of
|
| 176 |
+
Node.js.
|
| 177 |
+
If you are using an end-of-life version of Node.js, we recommend that you update
|
| 178 |
+
as soon as possible to an actively supported LTS version.
|
| 179 |
+
|
| 180 |
+
Google's client libraries support legacy versions of Node.js runtimes on a
|
| 181 |
+
best-efforts basis with the following warnings:
|
| 182 |
+
|
| 183 |
+
* Legacy versions are not tested in continuous integration.
|
| 184 |
+
* Some security patches and features cannot be backported.
|
| 185 |
+
* Dependencies cannot be kept up-to-date.
|
| 186 |
+
|
| 187 |
+
Client libraries targeting some end-of-life versions of Node.js are available, and
|
| 188 |
+
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
|
| 189 |
+
The dist-tags follow the naming convention `legacy-(version)`.
|
| 190 |
+
For example, `npm install gcp-metadata@legacy-8` installs client libraries
|
| 191 |
+
for versions compatible with Node.js 8.
|
| 192 |
+
|
| 193 |
+
## Versioning
|
| 194 |
+
|
| 195 |
+
This library follows [Semantic Versioning](http://semver.org/).
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
|
| 200 |
+
unless absolutely necessary (e.g. because of critical security issues) or with
|
| 201 |
+
an extensive deprecation period. Issues and requests against **stable** libraries
|
| 202 |
+
are addressed with the highest priority.
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
| 210 |
+
|
| 211 |
+
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
| 212 |
+
|
| 213 |
+
## Contributing
|
| 214 |
+
|
| 215 |
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/gcp-metadata/blob/main/CONTRIBUTING.md).
|
| 216 |
+
|
| 217 |
+
Please note that this `README.md`, the `samples/README.md`,
|
| 218 |
+
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
| 219 |
+
are generated from a central template. To edit one of these files, make an edit
|
| 220 |
+
to its templates in
|
| 221 |
+
[directory](https://github.com/googleapis/synthtool).
|
| 222 |
+
|
| 223 |
+
## License
|
| 224 |
+
|
| 225 |
+
Apache Version 2.0
|
| 226 |
+
|
| 227 |
+
See [LICENSE](https://github.com/googleapis/gcp-metadata/blob/main/LICENSE)
|
| 228 |
+
|
| 229 |
+
[client-docs]: https://cloud.google.com/nodejs/docs/reference/gcp-metadata/latest
|
| 230 |
+
[product-docs]: https://cloud.google.com/compute/docs/storing-retrieving-metadata
|
| 231 |
+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
| 232 |
+
[projects]: https://console.cloud.google.com/project
|
| 233 |
+
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
| 234 |
+
|
| 235 |
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/gcp-residency.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Copyright 2022 Google LLC
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
/**
|
| 17 |
+
* Known paths unique to Google Compute Engine Linux instances
|
| 18 |
+
*/
|
| 19 |
+
export declare const GCE_LINUX_BIOS_PATHS: {
|
| 20 |
+
BIOS_DATE: string;
|
| 21 |
+
BIOS_VENDOR: string;
|
| 22 |
+
};
|
| 23 |
+
/**
|
| 24 |
+
* Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance).
|
| 25 |
+
*
|
| 26 |
+
* Uses the:
|
| 27 |
+
* - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}.
|
| 28 |
+
* - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}.
|
| 29 |
+
*
|
| 30 |
+
* @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise.
|
| 31 |
+
*/
|
| 32 |
+
export declare function isGoogleCloudServerless(): boolean;
|
| 33 |
+
/**
|
| 34 |
+
* Determines if the process is running on a Linux Google Compute Engine instance.
|
| 35 |
+
*
|
| 36 |
+
* @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise.
|
| 37 |
+
*/
|
| 38 |
+
export declare function isGoogleComputeEngineLinux(): boolean;
|
| 39 |
+
/**
|
| 40 |
+
* Determines if the process is running on a Google Compute Engine instance with a known
|
| 41 |
+
* MAC address.
|
| 42 |
+
*
|
| 43 |
+
* @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise.
|
| 44 |
+
*/
|
| 45 |
+
export declare function isGoogleComputeEngineMACAddress(): boolean;
|
| 46 |
+
/**
|
| 47 |
+
* Determines if the process is running on a Google Compute Engine instance.
|
| 48 |
+
*
|
| 49 |
+
* @returns {boolean} `true` if the process is running on GCE, `false` otherwise.
|
| 50 |
+
*/
|
| 51 |
+
export declare function isGoogleComputeEngine(): boolean;
|
| 52 |
+
/**
|
| 53 |
+
* Determines if the process is running on Google Cloud Platform.
|
| 54 |
+
*
|
| 55 |
+
* @returns {boolean} `true` if the process is running on GCP, `false` otherwise.
|
| 56 |
+
*/
|
| 57 |
+
export declare function detectGCPResidency(): boolean;
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/gcp-residency.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
/**
|
| 3 |
+
* Copyright 2022 Google LLC
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 6 |
+
* you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 18 |
+
exports.GCE_LINUX_BIOS_PATHS = void 0;
|
| 19 |
+
exports.isGoogleCloudServerless = isGoogleCloudServerless;
|
| 20 |
+
exports.isGoogleComputeEngineLinux = isGoogleComputeEngineLinux;
|
| 21 |
+
exports.isGoogleComputeEngineMACAddress = isGoogleComputeEngineMACAddress;
|
| 22 |
+
exports.isGoogleComputeEngine = isGoogleComputeEngine;
|
| 23 |
+
exports.detectGCPResidency = detectGCPResidency;
|
| 24 |
+
const fs_1 = require("fs");
|
| 25 |
+
const os_1 = require("os");
|
| 26 |
+
/**
|
| 27 |
+
* Known paths unique to Google Compute Engine Linux instances
|
| 28 |
+
*/
|
| 29 |
+
exports.GCE_LINUX_BIOS_PATHS = {
|
| 30 |
+
BIOS_DATE: '/sys/class/dmi/id/bios_date',
|
| 31 |
+
BIOS_VENDOR: '/sys/class/dmi/id/bios_vendor',
|
| 32 |
+
};
|
| 33 |
+
const GCE_MAC_ADDRESS_REGEX = /^42:01/;
|
| 34 |
+
/**
|
| 35 |
+
* Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance).
|
| 36 |
+
*
|
| 37 |
+
* Uses the:
|
| 38 |
+
* - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}.
|
| 39 |
+
* - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}.
|
| 40 |
+
*
|
| 41 |
+
* @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise.
|
| 42 |
+
*/
|
| 43 |
+
function isGoogleCloudServerless() {
|
| 44 |
+
/**
|
| 45 |
+
* `CLOUD_RUN_JOB` is used for Cloud Run Jobs
|
| 46 |
+
* - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}.
|
| 47 |
+
*
|
| 48 |
+
* `FUNCTION_NAME` is used in older Cloud Functions environments:
|
| 49 |
+
* - See {@link https://cloud.google.com/functions/docs/env-var Python 3.7 and Go 1.11}.
|
| 50 |
+
*
|
| 51 |
+
* `K_SERVICE` is used in Cloud Run and newer Cloud Functions environments:
|
| 52 |
+
* - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}.
|
| 53 |
+
* - See {@link https://cloud.google.com/functions/docs/env-var Cloud Functions newer runtimes}.
|
| 54 |
+
*/
|
| 55 |
+
const isGFEnvironment = process.env.CLOUD_RUN_JOB ||
|
| 56 |
+
process.env.FUNCTION_NAME ||
|
| 57 |
+
process.env.K_SERVICE;
|
| 58 |
+
return !!isGFEnvironment;
|
| 59 |
+
}
|
| 60 |
+
/**
|
| 61 |
+
* Determines if the process is running on a Linux Google Compute Engine instance.
|
| 62 |
+
*
|
| 63 |
+
* @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise.
|
| 64 |
+
*/
|
| 65 |
+
function isGoogleComputeEngineLinux() {
|
| 66 |
+
if ((0, os_1.platform)() !== 'linux')
|
| 67 |
+
return false;
|
| 68 |
+
try {
|
| 69 |
+
// ensure this file exist
|
| 70 |
+
(0, fs_1.statSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_DATE);
|
| 71 |
+
// ensure this file exist and matches
|
| 72 |
+
const biosVendor = (0, fs_1.readFileSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR, 'utf8');
|
| 73 |
+
return /Google/.test(biosVendor);
|
| 74 |
+
}
|
| 75 |
+
catch (_a) {
|
| 76 |
+
return false;
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
/**
|
| 80 |
+
* Determines if the process is running on a Google Compute Engine instance with a known
|
| 81 |
+
* MAC address.
|
| 82 |
+
*
|
| 83 |
+
* @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise.
|
| 84 |
+
*/
|
| 85 |
+
function isGoogleComputeEngineMACAddress() {
|
| 86 |
+
const interfaces = (0, os_1.networkInterfaces)();
|
| 87 |
+
for (const item of Object.values(interfaces)) {
|
| 88 |
+
if (!item)
|
| 89 |
+
continue;
|
| 90 |
+
for (const { mac } of item) {
|
| 91 |
+
if (GCE_MAC_ADDRESS_REGEX.test(mac)) {
|
| 92 |
+
return true;
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
return false;
|
| 97 |
+
}
|
| 98 |
+
/**
|
| 99 |
+
* Determines if the process is running on a Google Compute Engine instance.
|
| 100 |
+
*
|
| 101 |
+
* @returns {boolean} `true` if the process is running on GCE, `false` otherwise.
|
| 102 |
+
*/
|
| 103 |
+
function isGoogleComputeEngine() {
|
| 104 |
+
return isGoogleComputeEngineLinux() || isGoogleComputeEngineMACAddress();
|
| 105 |
+
}
|
| 106 |
+
/**
|
| 107 |
+
* Determines if the process is running on Google Cloud Platform.
|
| 108 |
+
*
|
| 109 |
+
* @returns {boolean} `true` if the process is running on GCP, `false` otherwise.
|
| 110 |
+
*/
|
| 111 |
+
function detectGCPResidency() {
|
| 112 |
+
return isGoogleCloudServerless() || isGoogleComputeEngine();
|
| 113 |
+
}
|
| 114 |
+
//# sourceMappingURL=gcp-residency.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/gcp-residency.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"gcp-residency.js","sourceRoot":"","sources":["../../src/gcp-residency.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAwBH,0DAkBC;AAOD,gEAcC;AAQD,0EAcC;AAOD,sDAEC;AAOD,gDAEC;AArGD,2BAA0C;AAC1C,2BAA+C;AAE/C;;GAEG;AACU,QAAA,oBAAoB,GAAG;IAClC,SAAS,EAAE,6BAA6B;IACxC,WAAW,EAAE,+BAA+B;CAC7C,CAAC;AAEF,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAEvC;;;;;;;;G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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Copyright 2018 Google LLC
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
* you may not use this file except in compliance with the License.
|
| 6 |
+
* You may obtain a copy of the License at
|
| 7 |
+
*
|
| 8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
*
|
| 10 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
* See the License for the specific language governing permissions and
|
| 14 |
+
* limitations under the License.
|
| 15 |
+
*/
|
| 16 |
+
import { OutgoingHttpHeaders } from 'http';
|
| 17 |
+
export declare const BASE_PATH = "/computeMetadata/v1";
|
| 18 |
+
export declare const HOST_ADDRESS = "http://169.254.169.254";
|
| 19 |
+
export declare const SECONDARY_HOST_ADDRESS = "http://metadata.google.internal.";
|
| 20 |
+
export declare const HEADER_NAME = "Metadata-Flavor";
|
| 21 |
+
export declare const HEADER_VALUE = "Google";
|
| 22 |
+
export declare const HEADERS: Readonly<{
|
| 23 |
+
"Metadata-Flavor": "Google";
|
| 24 |
+
}>;
|
| 25 |
+
/**
|
| 26 |
+
* Metadata server detection override options.
|
| 27 |
+
*
|
| 28 |
+
* Available via `process.env.METADATA_SERVER_DETECTION`.
|
| 29 |
+
*/
|
| 30 |
+
export declare const METADATA_SERVER_DETECTION: Readonly<{
|
| 31 |
+
'assume-present': "don't try to ping the metadata server, but assume it's present";
|
| 32 |
+
none: "don't try to ping the metadata server, but don't try to use it either";
|
| 33 |
+
'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)";
|
| 34 |
+
'ping-only': "skip the BIOS probe, and go straight to pinging";
|
| 35 |
+
}>;
|
| 36 |
+
export interface Options {
|
| 37 |
+
params?: {
|
| 38 |
+
[index: string]: string;
|
| 39 |
+
};
|
| 40 |
+
property?: string;
|
| 41 |
+
headers?: OutgoingHttpHeaders;
|
| 42 |
+
}
|
| 43 |
+
export interface MetadataAccessor {
|
| 44 |
+
/**
|
| 45 |
+
*
|
| 46 |
+
* @example
|
| 47 |
+
*
|
| 48 |
+
* // equivalent to `project('project-id')`;
|
| 49 |
+
* const metadataKey = 'project/project-id';
|
| 50 |
+
*/
|
| 51 |
+
metadataKey: string;
|
| 52 |
+
params?: Options['params'];
|
| 53 |
+
headers?: Options['headers'];
|
| 54 |
+
noResponseRetries?: number;
|
| 55 |
+
fastFail?: boolean;
|
| 56 |
+
}
|
| 57 |
+
export type BulkResults<T extends readonly MetadataAccessor[]> = {
|
| 58 |
+
[key in T[number]['metadataKey']]: ReturnType<JSON['parse']>;
|
| 59 |
+
};
|
| 60 |
+
/**
|
| 61 |
+
* Obtain metadata for the current GCE instance.
|
| 62 |
+
*
|
| 63 |
+
* @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
|
| 64 |
+
*
|
| 65 |
+
* @example
|
| 66 |
+
* ```
|
| 67 |
+
* const serviceAccount: {} = await instance('service-accounts/');
|
| 68 |
+
* const serviceAccountEmail: string = await instance('service-accounts/default/email');
|
| 69 |
+
* ```
|
| 70 |
+
*/
|
| 71 |
+
export declare function instance<T = any>(options?: string | Options): Promise<T>;
|
| 72 |
+
/**
|
| 73 |
+
* Obtain metadata for the current GCP project.
|
| 74 |
+
*
|
| 75 |
+
* @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
|
| 76 |
+
*
|
| 77 |
+
* @example
|
| 78 |
+
* ```
|
| 79 |
+
* const projectId: string = await project('project-id');
|
| 80 |
+
* const numericProjectId: number = await project('numeric-project-id');
|
| 81 |
+
* ```
|
| 82 |
+
*/
|
| 83 |
+
export declare function project<T = any>(options?: string | Options): Promise<T>;
|
| 84 |
+
/**
|
| 85 |
+
* Obtain metadata for the current universe.
|
| 86 |
+
*
|
| 87 |
+
* @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
|
| 88 |
+
*
|
| 89 |
+
* @example
|
| 90 |
+
* ```
|
| 91 |
+
* const universeDomain: string = await universe('universe-domain');
|
| 92 |
+
* ```
|
| 93 |
+
*/
|
| 94 |
+
export declare function universe<T>(options?: string | Options): Promise<T>;
|
| 95 |
+
/**
|
| 96 |
+
* Retrieve metadata items in parallel.
|
| 97 |
+
*
|
| 98 |
+
* @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
|
| 99 |
+
*
|
| 100 |
+
* @example
|
| 101 |
+
* ```
|
| 102 |
+
* const data = await bulk([
|
| 103 |
+
* {
|
| 104 |
+
* metadataKey: 'instance',
|
| 105 |
+
* },
|
| 106 |
+
* {
|
| 107 |
+
* metadataKey: 'project/project-id',
|
| 108 |
+
* },
|
| 109 |
+
* ] as const);
|
| 110 |
+
*
|
| 111 |
+
* // data.instance;
|
| 112 |
+
* // data['project/project-id'];
|
| 113 |
+
* ```
|
| 114 |
+
*
|
| 115 |
+
* @param properties The metadata properties to retrieve
|
| 116 |
+
* @returns The metadata in `metadatakey:value` format
|
| 117 |
+
*/
|
| 118 |
+
export declare function bulk<T extends readonly Readonly<MetadataAccessor>[], R extends BulkResults<T> = BulkResults<T>>(properties: T): Promise<R>;
|
| 119 |
+
/**
|
| 120 |
+
* Determine if the metadata server is currently available.
|
| 121 |
+
*/
|
| 122 |
+
export declare function isAvailable(): Promise<boolean>;
|
| 123 |
+
/**
|
| 124 |
+
* reset the memoized isAvailable() lookup.
|
| 125 |
+
*/
|
| 126 |
+
export declare function resetIsAvailableCache(): void;
|
| 127 |
+
/**
|
| 128 |
+
* A cache for the detected GCP Residency.
|
| 129 |
+
*/
|
| 130 |
+
export declare let gcpResidencyCache: boolean | null;
|
| 131 |
+
/**
|
| 132 |
+
* Detects GCP Residency.
|
| 133 |
+
* Caches results to reduce costs for subsequent calls.
|
| 134 |
+
*
|
| 135 |
+
* @see setGCPResidency for setting
|
| 136 |
+
*/
|
| 137 |
+
export declare function getGCPResidency(): boolean;
|
| 138 |
+
/**
|
| 139 |
+
* Sets the detected GCP Residency.
|
| 140 |
+
* Useful for forcing metadata server detection behavior.
|
| 141 |
+
*
|
| 142 |
+
* Set `null` to autodetect the environment (default behavior).
|
| 143 |
+
* @see getGCPResidency for getting
|
| 144 |
+
*/
|
| 145 |
+
export declare function setGCPResidency(value?: boolean | null): void;
|
| 146 |
+
/**
|
| 147 |
+
* Obtain the timeout for requests to the metadata server.
|
| 148 |
+
*
|
| 149 |
+
* In certain environments and conditions requests can take longer than
|
| 150 |
+
* the default timeout to complete. This function will determine the
|
| 151 |
+
* appropriate timeout based on the environment.
|
| 152 |
+
*
|
| 153 |
+
* @returns {number} a request timeout duration in milliseconds.
|
| 154 |
+
*/
|
| 155 |
+
export declare function requestTimeout(): number;
|
| 156 |
+
export * from './gcp-residency';
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/index.js
ADDED
|
@@ -0,0 +1,408 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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+
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 6 |
+
* you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
| 18 |
+
if (k2 === undefined) k2 = k;
|
| 19 |
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
| 20 |
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
| 21 |
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
| 22 |
+
}
|
| 23 |
+
Object.defineProperty(o, k2, desc);
|
| 24 |
+
}) : (function(o, m, k, k2) {
|
| 25 |
+
if (k2 === undefined) k2 = k;
|
| 26 |
+
o[k2] = m[k];
|
| 27 |
+
}));
|
| 28 |
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
| 29 |
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
| 30 |
+
};
|
| 31 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 32 |
+
exports.gcpResidencyCache = exports.METADATA_SERVER_DETECTION = exports.HEADERS = exports.HEADER_VALUE = exports.HEADER_NAME = exports.SECONDARY_HOST_ADDRESS = exports.HOST_ADDRESS = exports.BASE_PATH = void 0;
|
| 33 |
+
exports.instance = instance;
|
| 34 |
+
exports.project = project;
|
| 35 |
+
exports.universe = universe;
|
| 36 |
+
exports.bulk = bulk;
|
| 37 |
+
exports.isAvailable = isAvailable;
|
| 38 |
+
exports.resetIsAvailableCache = resetIsAvailableCache;
|
| 39 |
+
exports.getGCPResidency = getGCPResidency;
|
| 40 |
+
exports.setGCPResidency = setGCPResidency;
|
| 41 |
+
exports.requestTimeout = requestTimeout;
|
| 42 |
+
const gaxios_1 = require("gaxios");
|
| 43 |
+
const jsonBigint = require("json-bigint");
|
| 44 |
+
const gcp_residency_1 = require("./gcp-residency");
|
| 45 |
+
const logger = require("google-logging-utils");
|
| 46 |
+
exports.BASE_PATH = '/computeMetadata/v1';
|
| 47 |
+
exports.HOST_ADDRESS = 'http://169.254.169.254';
|
| 48 |
+
exports.SECONDARY_HOST_ADDRESS = 'http://metadata.google.internal.';
|
| 49 |
+
exports.HEADER_NAME = 'Metadata-Flavor';
|
| 50 |
+
exports.HEADER_VALUE = 'Google';
|
| 51 |
+
exports.HEADERS = Object.freeze({ [exports.HEADER_NAME]: exports.HEADER_VALUE });
|
| 52 |
+
const log = logger.log('gcp metadata');
|
| 53 |
+
/**
|
| 54 |
+
* Metadata server detection override options.
|
| 55 |
+
*
|
| 56 |
+
* Available via `process.env.METADATA_SERVER_DETECTION`.
|
| 57 |
+
*/
|
| 58 |
+
exports.METADATA_SERVER_DETECTION = Object.freeze({
|
| 59 |
+
'assume-present': "don't try to ping the metadata server, but assume it's present",
|
| 60 |
+
none: "don't try to ping the metadata server, but don't try to use it either",
|
| 61 |
+
'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)",
|
| 62 |
+
'ping-only': 'skip the BIOS probe, and go straight to pinging',
|
| 63 |
+
});
|
| 64 |
+
/**
|
| 65 |
+
* Returns the base URL while taking into account the GCE_METADATA_HOST
|
| 66 |
+
* environment variable if it exists.
|
| 67 |
+
*
|
| 68 |
+
* @returns The base URL, e.g., http://169.254.169.254/computeMetadata/v1.
|
| 69 |
+
*/
|
| 70 |
+
function getBaseUrl(baseUrl) {
|
| 71 |
+
if (!baseUrl) {
|
| 72 |
+
baseUrl =
|
| 73 |
+
process.env.GCE_METADATA_IP ||
|
| 74 |
+
process.env.GCE_METADATA_HOST ||
|
| 75 |
+
exports.HOST_ADDRESS;
|
| 76 |
+
}
|
| 77 |
+
// If no scheme is provided default to HTTP:
|
| 78 |
+
if (!/^https?:\/\//.test(baseUrl)) {
|
| 79 |
+
baseUrl = `http://${baseUrl}`;
|
| 80 |
+
}
|
| 81 |
+
return new URL(exports.BASE_PATH, baseUrl).href;
|
| 82 |
+
}
|
| 83 |
+
// Accepts an options object passed from the user to the API. In previous
|
| 84 |
+
// versions of the API, it referred to a `Request` or an `Axios` request
|
| 85 |
+
// options object. Now it refers to an object with very limited property
|
| 86 |
+
// names. This is here to help ensure users don't pass invalid options when
|
| 87 |
+
// they upgrade from 0.4 to 0.5 to 0.8.
|
| 88 |
+
function validate(options) {
|
| 89 |
+
Object.keys(options).forEach(key => {
|
| 90 |
+
switch (key) {
|
| 91 |
+
case 'params':
|
| 92 |
+
case 'property':
|
| 93 |
+
case 'headers':
|
| 94 |
+
break;
|
| 95 |
+
case 'qs':
|
| 96 |
+
throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");
|
| 97 |
+
default:
|
| 98 |
+
throw new Error(`'${key}' is not a valid configuration option.`);
|
| 99 |
+
}
|
| 100 |
+
});
|
| 101 |
+
}
|
| 102 |
+
async function metadataAccessor(type, options = {}, noResponseRetries = 3, fastFail = false) {
|
| 103 |
+
let metadataKey = '';
|
| 104 |
+
let params = {};
|
| 105 |
+
let headers = {};
|
| 106 |
+
if (typeof type === 'object') {
|
| 107 |
+
const metadataAccessor = type;
|
| 108 |
+
metadataKey = metadataAccessor.metadataKey;
|
| 109 |
+
params = metadataAccessor.params || params;
|
| 110 |
+
headers = metadataAccessor.headers || headers;
|
| 111 |
+
noResponseRetries = metadataAccessor.noResponseRetries || noResponseRetries;
|
| 112 |
+
fastFail = metadataAccessor.fastFail || fastFail;
|
| 113 |
+
}
|
| 114 |
+
else {
|
| 115 |
+
metadataKey = type;
|
| 116 |
+
}
|
| 117 |
+
if (typeof options === 'string') {
|
| 118 |
+
metadataKey += `/${options}`;
|
| 119 |
+
}
|
| 120 |
+
else {
|
| 121 |
+
validate(options);
|
| 122 |
+
if (options.property) {
|
| 123 |
+
metadataKey += `/${options.property}`;
|
| 124 |
+
}
|
| 125 |
+
headers = options.headers || headers;
|
| 126 |
+
params = options.params || params;
|
| 127 |
+
}
|
| 128 |
+
const requestMethod = fastFail ? fastFailMetadataRequest : gaxios_1.request;
|
| 129 |
+
const req = {
|
| 130 |
+
url: `${getBaseUrl()}/${metadataKey}`,
|
| 131 |
+
headers: { ...exports.HEADERS, ...headers },
|
| 132 |
+
retryConfig: { noResponseRetries },
|
| 133 |
+
params,
|
| 134 |
+
responseType: 'text',
|
| 135 |
+
timeout: requestTimeout(),
|
| 136 |
+
};
|
| 137 |
+
log.info('instance request %j', req);
|
| 138 |
+
const res = await requestMethod(req);
|
| 139 |
+
log.info('instance metadata is %s', res.data);
|
| 140 |
+
// NOTE: node.js converts all incoming headers to lower case.
|
| 141 |
+
if (res.headers[exports.HEADER_NAME.toLowerCase()] !== exports.HEADER_VALUE) {
|
| 142 |
+
throw new Error(`Invalid response from metadata service: incorrect ${exports.HEADER_NAME} header. Expected '${exports.HEADER_VALUE}', got ${res.headers[exports.HEADER_NAME.toLowerCase()] ? `'${res.headers[exports.HEADER_NAME.toLowerCase()]}'` : 'no header'}`);
|
| 143 |
+
}
|
| 144 |
+
if (typeof res.data === 'string') {
|
| 145 |
+
try {
|
| 146 |
+
return jsonBigint.parse(res.data);
|
| 147 |
+
}
|
| 148 |
+
catch (_a) {
|
| 149 |
+
/* ignore */
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
return res.data;
|
| 153 |
+
}
|
| 154 |
+
async function fastFailMetadataRequest(options) {
|
| 155 |
+
var _a;
|
| 156 |
+
const secondaryOptions = {
|
| 157 |
+
...options,
|
| 158 |
+
url: (_a = options.url) === null || _a === void 0 ? void 0 : _a.toString().replace(getBaseUrl(), getBaseUrl(exports.SECONDARY_HOST_ADDRESS)),
|
| 159 |
+
};
|
| 160 |
+
// We race a connection between DNS/IP to metadata server. There are a couple
|
| 161 |
+
// reasons for this:
|
| 162 |
+
//
|
| 163 |
+
// 1. the DNS is slow in some GCP environments; by checking both, we might
|
| 164 |
+
// detect the runtime environment signficantly faster.
|
| 165 |
+
// 2. we can't just check the IP, which is tarpitted and slow to respond
|
| 166 |
+
// on a user's local machine.
|
| 167 |
+
//
|
| 168 |
+
// Additional logic has been added to make sure that we don't create an
|
| 169 |
+
// unhandled rejection in scenarios where a failure happens sometime
|
| 170 |
+
// after a success.
|
| 171 |
+
//
|
| 172 |
+
// Note, however, if a failure happens prior to a success, a rejection should
|
| 173 |
+
// occur, this is for folks running locally.
|
| 174 |
+
//
|
| 175 |
+
let responded = false;
|
| 176 |
+
const r1 = (0, gaxios_1.request)(options)
|
| 177 |
+
.then(res => {
|
| 178 |
+
responded = true;
|
| 179 |
+
return res;
|
| 180 |
+
})
|
| 181 |
+
.catch(err => {
|
| 182 |
+
if (responded) {
|
| 183 |
+
return r2;
|
| 184 |
+
}
|
| 185 |
+
else {
|
| 186 |
+
responded = true;
|
| 187 |
+
throw err;
|
| 188 |
+
}
|
| 189 |
+
});
|
| 190 |
+
const r2 = (0, gaxios_1.request)(secondaryOptions)
|
| 191 |
+
.then(res => {
|
| 192 |
+
responded = true;
|
| 193 |
+
return res;
|
| 194 |
+
})
|
| 195 |
+
.catch(err => {
|
| 196 |
+
if (responded) {
|
| 197 |
+
return r1;
|
| 198 |
+
}
|
| 199 |
+
else {
|
| 200 |
+
responded = true;
|
| 201 |
+
throw err;
|
| 202 |
+
}
|
| 203 |
+
});
|
| 204 |
+
return Promise.race([r1, r2]);
|
| 205 |
+
}
|
| 206 |
+
/**
|
| 207 |
+
* Obtain metadata for the current GCE instance.
|
| 208 |
+
*
|
| 209 |
+
* @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
|
| 210 |
+
*
|
| 211 |
+
* @example
|
| 212 |
+
* ```
|
| 213 |
+
* const serviceAccount: {} = await instance('service-accounts/');
|
| 214 |
+
* const serviceAccountEmail: string = await instance('service-accounts/default/email');
|
| 215 |
+
* ```
|
| 216 |
+
*/
|
| 217 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 218 |
+
function instance(options) {
|
| 219 |
+
return metadataAccessor('instance', options);
|
| 220 |
+
}
|
| 221 |
+
/**
|
| 222 |
+
* Obtain metadata for the current GCP project.
|
| 223 |
+
*
|
| 224 |
+
* @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
|
| 225 |
+
*
|
| 226 |
+
* @example
|
| 227 |
+
* ```
|
| 228 |
+
* const projectId: string = await project('project-id');
|
| 229 |
+
* const numericProjectId: number = await project('numeric-project-id');
|
| 230 |
+
* ```
|
| 231 |
+
*/
|
| 232 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 233 |
+
function project(options) {
|
| 234 |
+
return metadataAccessor('project', options);
|
| 235 |
+
}
|
| 236 |
+
/**
|
| 237 |
+
* Obtain metadata for the current universe.
|
| 238 |
+
*
|
| 239 |
+
* @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
|
| 240 |
+
*
|
| 241 |
+
* @example
|
| 242 |
+
* ```
|
| 243 |
+
* const universeDomain: string = await universe('universe-domain');
|
| 244 |
+
* ```
|
| 245 |
+
*/
|
| 246 |
+
function universe(options) {
|
| 247 |
+
return metadataAccessor('universe', options);
|
| 248 |
+
}
|
| 249 |
+
/**
|
| 250 |
+
* Retrieve metadata items in parallel.
|
| 251 |
+
*
|
| 252 |
+
* @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys}
|
| 253 |
+
*
|
| 254 |
+
* @example
|
| 255 |
+
* ```
|
| 256 |
+
* const data = await bulk([
|
| 257 |
+
* {
|
| 258 |
+
* metadataKey: 'instance',
|
| 259 |
+
* },
|
| 260 |
+
* {
|
| 261 |
+
* metadataKey: 'project/project-id',
|
| 262 |
+
* },
|
| 263 |
+
* ] as const);
|
| 264 |
+
*
|
| 265 |
+
* // data.instance;
|
| 266 |
+
* // data['project/project-id'];
|
| 267 |
+
* ```
|
| 268 |
+
*
|
| 269 |
+
* @param properties The metadata properties to retrieve
|
| 270 |
+
* @returns The metadata in `metadatakey:value` format
|
| 271 |
+
*/
|
| 272 |
+
async function bulk(properties) {
|
| 273 |
+
const r = {};
|
| 274 |
+
await Promise.all(properties.map(item => {
|
| 275 |
+
return (async () => {
|
| 276 |
+
const res = await metadataAccessor(item);
|
| 277 |
+
const key = item.metadataKey;
|
| 278 |
+
r[key] = res;
|
| 279 |
+
})();
|
| 280 |
+
}));
|
| 281 |
+
return r;
|
| 282 |
+
}
|
| 283 |
+
/*
|
| 284 |
+
* How many times should we retry detecting GCP environment.
|
| 285 |
+
*/
|
| 286 |
+
function detectGCPAvailableRetries() {
|
| 287 |
+
return process.env.DETECT_GCP_RETRIES
|
| 288 |
+
? Number(process.env.DETECT_GCP_RETRIES)
|
| 289 |
+
: 0;
|
| 290 |
+
}
|
| 291 |
+
let cachedIsAvailableResponse;
|
| 292 |
+
/**
|
| 293 |
+
* Determine if the metadata server is currently available.
|
| 294 |
+
*/
|
| 295 |
+
async function isAvailable() {
|
| 296 |
+
if (process.env.METADATA_SERVER_DETECTION) {
|
| 297 |
+
const value = process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();
|
| 298 |
+
if (!(value in exports.METADATA_SERVER_DETECTION)) {
|
| 299 |
+
throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${value}\`, but it should be \`${Object.keys(exports.METADATA_SERVER_DETECTION).join('`, `')}\`, or unset`);
|
| 300 |
+
}
|
| 301 |
+
switch (value) {
|
| 302 |
+
case 'assume-present':
|
| 303 |
+
return true;
|
| 304 |
+
case 'none':
|
| 305 |
+
return false;
|
| 306 |
+
case 'bios-only':
|
| 307 |
+
return getGCPResidency();
|
| 308 |
+
case 'ping-only':
|
| 309 |
+
// continue, we want to ping the server
|
| 310 |
+
}
|
| 311 |
+
}
|
| 312 |
+
try {
|
| 313 |
+
// If a user is instantiating several GCP libraries at the same time,
|
| 314 |
+
// this may result in multiple calls to isAvailable(), to detect the
|
| 315 |
+
// runtime environment. We use the same promise for each of these calls
|
| 316 |
+
// to reduce the network load.
|
| 317 |
+
if (cachedIsAvailableResponse === undefined) {
|
| 318 |
+
cachedIsAvailableResponse = metadataAccessor('instance', undefined, detectGCPAvailableRetries(),
|
| 319 |
+
// If the default HOST_ADDRESS has been overridden, we should not
|
| 320 |
+
// make an effort to try SECONDARY_HOST_ADDRESS (as we are likely in
|
| 321 |
+
// a non-GCP environment):
|
| 322 |
+
!(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST));
|
| 323 |
+
}
|
| 324 |
+
await cachedIsAvailableResponse;
|
| 325 |
+
return true;
|
| 326 |
+
}
|
| 327 |
+
catch (e) {
|
| 328 |
+
const err = e;
|
| 329 |
+
if (process.env.DEBUG_AUTH) {
|
| 330 |
+
console.info(err);
|
| 331 |
+
}
|
| 332 |
+
if (err.type === 'request-timeout') {
|
| 333 |
+
// If running in a GCP environment, metadata endpoint should return
|
| 334 |
+
// within ms.
|
| 335 |
+
return false;
|
| 336 |
+
}
|
| 337 |
+
if (err.response && err.response.status === 404) {
|
| 338 |
+
return false;
|
| 339 |
+
}
|
| 340 |
+
else {
|
| 341 |
+
if (!(err.response && err.response.status === 404) &&
|
| 342 |
+
// A warning is emitted if we see an unexpected err.code, or err.code
|
| 343 |
+
// is not populated:
|
| 344 |
+
(!err.code ||
|
| 345 |
+
![
|
| 346 |
+
'EHOSTDOWN',
|
| 347 |
+
'EHOSTUNREACH',
|
| 348 |
+
'ENETUNREACH',
|
| 349 |
+
'ENOENT',
|
| 350 |
+
'ENOTFOUND',
|
| 351 |
+
'ECONNREFUSED',
|
| 352 |
+
].includes(err.code))) {
|
| 353 |
+
let code = 'UNKNOWN';
|
| 354 |
+
if (err.code)
|
| 355 |
+
code = err.code;
|
| 356 |
+
process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning');
|
| 357 |
+
}
|
| 358 |
+
// Failure to resolve the metadata service means that it is not available.
|
| 359 |
+
return false;
|
| 360 |
+
}
|
| 361 |
+
}
|
| 362 |
+
}
|
| 363 |
+
/**
|
| 364 |
+
* reset the memoized isAvailable() lookup.
|
| 365 |
+
*/
|
| 366 |
+
function resetIsAvailableCache() {
|
| 367 |
+
cachedIsAvailableResponse = undefined;
|
| 368 |
+
}
|
| 369 |
+
/**
|
| 370 |
+
* A cache for the detected GCP Residency.
|
| 371 |
+
*/
|
| 372 |
+
exports.gcpResidencyCache = null;
|
| 373 |
+
/**
|
| 374 |
+
* Detects GCP Residency.
|
| 375 |
+
* Caches results to reduce costs for subsequent calls.
|
| 376 |
+
*
|
| 377 |
+
* @see setGCPResidency for setting
|
| 378 |
+
*/
|
| 379 |
+
function getGCPResidency() {
|
| 380 |
+
if (exports.gcpResidencyCache === null) {
|
| 381 |
+
setGCPResidency();
|
| 382 |
+
}
|
| 383 |
+
return exports.gcpResidencyCache;
|
| 384 |
+
}
|
| 385 |
+
/**
|
| 386 |
+
* Sets the detected GCP Residency.
|
| 387 |
+
* Useful for forcing metadata server detection behavior.
|
| 388 |
+
*
|
| 389 |
+
* Set `null` to autodetect the environment (default behavior).
|
| 390 |
+
* @see getGCPResidency for getting
|
| 391 |
+
*/
|
| 392 |
+
function setGCPResidency(value = null) {
|
| 393 |
+
exports.gcpResidencyCache = value !== null ? value : (0, gcp_residency_1.detectGCPResidency)();
|
| 394 |
+
}
|
| 395 |
+
/**
|
| 396 |
+
* Obtain the timeout for requests to the metadata server.
|
| 397 |
+
*
|
| 398 |
+
* In certain environments and conditions requests can take longer than
|
| 399 |
+
* the default timeout to complete. This function will determine the
|
| 400 |
+
* appropriate timeout based on the environment.
|
| 401 |
+
*
|
| 402 |
+
* @returns {number} a request timeout duration in milliseconds.
|
| 403 |
+
*/
|
| 404 |
+
function requestTimeout() {
|
| 405 |
+
return getGCPResidency() ? 0 : 3000;
|
| 406 |
+
}
|
| 407 |
+
__exportStar(require("./gcp-residency"), exports);
|
| 408 |
+
//# sourceMappingURL=index.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/gcp-metadata/build/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;AA8OH,4BAEC;AAcD,0BAEC;AAYD,4BAEC;AAyBD,oBAkBC;AAgBD,kCAmFC;AAKD,sDAEC;AAaD,0CAMC;AASD,0CAEC;AAWD,wCAEC;AA5cD,mCAA2E;AAE3E,0CAA2C;AAC3C,mDAAmD;AACnD,+CAA+C;AAElC,QAAA,SAAS,GAAG,qBAAqB,CAAC;AAClC,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,sBAAsB,GAAG,kCAAkC,CAAC;AAE5D,QAAA,WAAW,GAAG,iBAAiB,CAAC;AAChC,QAAA,YAAY,GAAG,QAAQ,CAAC;AACxB,QAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAC,CAAC,mBAAW,CAAC,EAAE,oBAAY,EAAC,CAAC,CAAC;AAEpE,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAEvC;;;;GAIG;AACU,QAAA,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC;IACrD,gBAAgB,EACd,gEAAgE;IAClE,IAAI,EAAE,uEAAuE;IAC7E,WAAW,EACT,4EAA4E;IAC9E,WAAW,EAAE,iDAAiD;CAC/D,CAAC,CAAC;AA2BH;;;;;GAKG;AACH,SAAS,UAAU,CAAC,OAAgB;IAClC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;YACL,OAAO,CAAC,GAAG,CAAC,eAAe;gBAC3B,OAAO,CAAC,GAAG,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
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "gcp-metadata",
|
| 3 |
+
"version": "6.1.1",
|
| 4 |
+
"description": "Get the metadata from a Google Cloud Platform environment",
|
| 5 |
+
"repository": "googleapis/gcp-metadata",
|
| 6 |
+
"main": "./build/src/index.js",
|
| 7 |
+
"types": "./build/src/index.d.ts",
|
| 8 |
+
"files": [
|
| 9 |
+
"build/src"
|
| 10 |
+
],
|
| 11 |
+
"scripts": {
|
| 12 |
+
"compile": "cross-env NODE_OPTIONS=--max-old-space-size=8192 tsc -p .",
|
| 13 |
+
"fix": "gts fix",
|
| 14 |
+
"pretest": "npm run compile",
|
| 15 |
+
"prepare": "npm run compile",
|
| 16 |
+
"samples-test": "npm link && cd samples/ && npm link ../ && npm test && cd ../",
|
| 17 |
+
"presystem-test": "npm run compile",
|
| 18 |
+
"system-test": "mocha build/system-test --timeout 600000",
|
| 19 |
+
"test": "c8 mocha --timeout=5000 build/test",
|
| 20 |
+
"docs": "jsdoc -c .jsdoc.js",
|
| 21 |
+
"lint": "gts check",
|
| 22 |
+
"docs-test": "linkinator docs",
|
| 23 |
+
"predocs-test": "npm run docs",
|
| 24 |
+
"prelint": "cd samples; npm link ../; npm install",
|
| 25 |
+
"clean": "gts clean",
|
| 26 |
+
"precompile": "gts clean"
|
| 27 |
+
},
|
| 28 |
+
"keywords": [
|
| 29 |
+
"google cloud platform",
|
| 30 |
+
"google cloud",
|
| 31 |
+
"google",
|
| 32 |
+
"app engine",
|
| 33 |
+
"compute engine",
|
| 34 |
+
"metadata server",
|
| 35 |
+
"metadata"
|
| 36 |
+
],
|
| 37 |
+
"author": "Google LLC",
|
| 38 |
+
"license": "Apache-2.0",
|
| 39 |
+
"dependencies": {
|
| 40 |
+
"gaxios": "^6.1.1",
|
| 41 |
+
"google-logging-utils": "^0.0.2",
|
| 42 |
+
"json-bigint": "^1.0.0"
|
| 43 |
+
},
|
| 44 |
+
"devDependencies": {
|
| 45 |
+
"@google-cloud/functions": "^3.0.0",
|
| 46 |
+
"@types/json-bigint": "^1.0.0",
|
| 47 |
+
"@types/mocha": "^9.0.0",
|
| 48 |
+
"@types/ncp": "^2.0.1",
|
| 49 |
+
"@types/node": "^20.0.0",
|
| 50 |
+
"@types/sinon": "^17.0.0",
|
| 51 |
+
"@types/tmp": "0.2.6",
|
| 52 |
+
"@types/uuid": "^9.0.0",
|
| 53 |
+
"c8": "^9.0.0",
|
| 54 |
+
"cross-env": "^7.0.3",
|
| 55 |
+
"gcbuild": "^1.3.4",
|
| 56 |
+
"gcx": "^1.0.0",
|
| 57 |
+
"gts": "^5.0.0",
|
| 58 |
+
"linkinator": "^3.0.0",
|
| 59 |
+
"jsdoc": "^4.0.0",
|
| 60 |
+
"jsdoc-fresh": "^3.0.0",
|
| 61 |
+
"jsdoc-region-tag": "^3.0.0",
|
| 62 |
+
"mocha": "^8.0.0",
|
| 63 |
+
"ncp": "^2.0.0",
|
| 64 |
+
"nock": "^13.0.0",
|
| 65 |
+
"sinon": "^17.0.0",
|
| 66 |
+
"tmp": "^0.2.0",
|
| 67 |
+
"typescript": "^5.1.6",
|
| 68 |
+
"uuid": "^9.0.0"
|
| 69 |
+
},
|
| 70 |
+
"engines": {
|
| 71 |
+
"node": ">=14"
|
| 72 |
+
}
|
| 73 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/google-auth-library/CHANGELOG.md
ADDED
|
@@ -0,0 +1,1394 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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activeTab=versions
|
| 6 |
+
|
| 7 |
+
## [9.15.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.15.0...v9.15.1) (2025-01-24)
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
### Bug Fixes
|
| 11 |
+
|
| 12 |
+
* Resolve typo in document ([#1901](https://github.com/googleapis/google-auth-library-nodejs/issues/1901)) ([12f2c87](https://github.com/googleapis/google-auth-library-nodejs/commit/12f2c87266de0a3ccd33e6b4993cab3537f9a242))
|
| 13 |
+
|
| 14 |
+
## [9.15.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.14.2...v9.15.0) (2024-11-01)
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
### Features
|
| 18 |
+
|
| 19 |
+
* Impersonated Universe Domain Support ([#1875](https://github.com/googleapis/google-auth-library-nodejs/issues/1875)) ([902bf8b](https://github.com/googleapis/google-auth-library-nodejs/commit/902bf8b7faf8f7a0735011c252907282f550cd14))
|
| 20 |
+
|
| 21 |
+
## [9.14.2](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.14.1...v9.14.2) (2024-10-09)
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
### Bug Fixes
|
| 25 |
+
|
| 26 |
+
* Disable Universe Domain Check ([#1878](https://github.com/googleapis/google-auth-library-nodejs/issues/1878)) ([8adb44c](https://github.com/googleapis/google-auth-library-nodejs/commit/8adb44c738b88bfc44e57b0694c3815d138a40e5))
|
| 27 |
+
|
| 28 |
+
## [9.14.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.14.0...v9.14.1) (2024-08-30)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
### Performance Improvements
|
| 32 |
+
|
| 33 |
+
* **GoogleAuth:** Improve Client Creation From Files/Streams Perf ([#1856](https://github.com/googleapis/google-auth-library-nodejs/issues/1856)) ([85d9d6f](https://github.com/googleapis/google-auth-library-nodejs/commit/85d9d6fe312f5ed68db22a28b84b6c8f257f9ec9))
|
| 34 |
+
|
| 35 |
+
## [9.14.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.13.0...v9.14.0) (2024-08-19)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
### Features
|
| 39 |
+
|
| 40 |
+
* Add `AnyAuthClient` type ([#1843](https://github.com/googleapis/google-auth-library-nodejs/issues/1843)) ([3ae120d](https://github.com/googleapis/google-auth-library-nodejs/commit/3ae120d0a45c95e36c59c9ac8286483938781f30))
|
| 41 |
+
* Extend API Key Support ([#1835](https://github.com/googleapis/google-auth-library-nodejs/issues/1835)) ([5fc3bcc](https://github.com/googleapis/google-auth-library-nodejs/commit/5fc3bccacc74082f71983595dd7654b1b60be0f8))
|
| 42 |
+
* Group Concurrent `getClient` Requests ([#1848](https://github.com/googleapis/google-auth-library-nodejs/issues/1848)) ([243ce28](https://github.com/googleapis/google-auth-library-nodejs/commit/243ce284bedd101a15a0e738a59a7db808c2ad3f))
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### Bug Fixes
|
| 46 |
+
|
| 47 |
+
* **deps:** Update dependency @googleapis/iam to v21 ([#1847](https://github.com/googleapis/google-auth-library-nodejs/issues/1847)) ([e9459f3](https://github.com/googleapis/google-auth-library-nodejs/commit/e9459f3d11418ce8afd4fe87cd92d4b2d06457ba))
|
| 48 |
+
|
| 49 |
+
## [9.13.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.12.0...v9.13.0) (2024-07-29)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
### Features
|
| 53 |
+
|
| 54 |
+
* Group Concurrent Access Token Requests for Base External Clients ([#1840](https://github.com/googleapis/google-auth-library-nodejs/issues/1840)) ([0e08fc5](https://github.com/googleapis/google-auth-library-nodejs/commit/0e08fc58eb61bba431ab4f217f7f7ad3a7dce9df))
|
| 55 |
+
|
| 56 |
+
## [9.12.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.11.0...v9.12.0) (2024-07-26)
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
### Features
|
| 60 |
+
|
| 61 |
+
* Expose More Public API Types ([#1838](https://github.com/googleapis/google-auth-library-nodejs/issues/1838)) ([5745a49](https://github.com/googleapis/google-auth-library-nodejs/commit/5745a49df31ff87c0e53edf44671f3a10c024d9f))
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
### Bug Fixes
|
| 65 |
+
|
| 66 |
+
* **deps:** Update dependency @googleapis/iam to v19 ([#1823](https://github.com/googleapis/google-auth-library-nodejs/issues/1823)) ([b070ffb](https://github.com/googleapis/google-auth-library-nodejs/commit/b070ffbfeb35a7f4552e86bf1840645096951b58))
|
| 67 |
+
* **deps:** Update dependency @googleapis/iam to v20 ([#1832](https://github.com/googleapis/google-auth-library-nodejs/issues/1832)) ([e31a831](https://github.com/googleapis/google-auth-library-nodejs/commit/e31a831417692e730f79d42608bd543046070ae3))
|
| 68 |
+
|
| 69 |
+
## [9.11.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.10.0...v9.11.0) (2024-06-01)
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
### Features
|
| 73 |
+
|
| 74 |
+
* Adding support of client authentication method. ([#1814](https://github.com/googleapis/google-auth-library-nodejs/issues/1814)) ([4a14e8c](https://github.com/googleapis/google-auth-library-nodejs/commit/4a14e8c3bdcfa9d8531a231b00b946728530ce12))
|
| 75 |
+
|
| 76 |
+
## [9.10.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.9.0...v9.10.0) (2024-05-10)
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
### Features
|
| 80 |
+
|
| 81 |
+
* Implement `UserRefreshClient#fetchIdToken` ([#1811](https://github.com/googleapis/google-auth-library-nodejs/issues/1811)) ([ae8bc54](https://github.com/googleapis/google-auth-library-nodejs/commit/ae8bc5476f5d93c8516d9a9eb553e7ce7c00edd5))
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
### Bug Fixes
|
| 85 |
+
|
| 86 |
+
* **deps:** Update dependency @googleapis/iam to v16 ([#1803](https://github.com/googleapis/google-auth-library-nodejs/issues/1803)) ([40406a0](https://github.com/googleapis/google-auth-library-nodejs/commit/40406a0512cde1d75d2af7dd23aa7aa7de38d30b))
|
| 87 |
+
* **deps:** Update dependency @googleapis/iam to v17 ([#1808](https://github.com/googleapis/google-auth-library-nodejs/issues/1808)) ([4d67f07](https://github.com/googleapis/google-auth-library-nodejs/commit/4d67f07380f690a99c8facf7266db7cb2d6c69b3))
|
| 88 |
+
* **deps:** Update dependency @googleapis/iam to v18 ([#1809](https://github.com/googleapis/google-auth-library-nodejs/issues/1809)) ([b2b9676](https://github.com/googleapis/google-auth-library-nodejs/commit/b2b9676f933c012fb2cd1789ad80b927af0de07c))
|
| 89 |
+
|
| 90 |
+
## [9.9.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.8.0...v9.9.0) (2024-04-18)
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
### Features
|
| 94 |
+
|
| 95 |
+
* Adds suppliers for custom subject token and AWS credentials ([#1795](https://github.com/googleapis/google-auth-library-nodejs/issues/1795)) ([c680b5d](https://github.com/googleapis/google-auth-library-nodejs/commit/c680b5ddfa526d414ad1250bb6f5af69c498b909))
|
| 96 |
+
|
| 97 |
+
## [9.8.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.7.0...v9.8.0) (2024-04-12)
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
### Features
|
| 101 |
+
|
| 102 |
+
* Enable Retries For Auth Requests ([#1791](https://github.com/googleapis/google-auth-library-nodejs/issues/1791)) ([9b69a31](https://github.com/googleapis/google-auth-library-nodejs/commit/9b69a3119c2d0dfe12d41a5f77658d35a2c92d74))
|
| 103 |
+
* Improve `gaxios` exposure ([#1794](https://github.com/googleapis/google-auth-library-nodejs/issues/1794)) ([5058726](https://github.com/googleapis/google-auth-library-nodejs/commit/5058726e2234a2da4edd31f0898465798943ebe6))
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
### Bug Fixes
|
| 107 |
+
|
| 108 |
+
* **deps:** Update dependency open to v10 ([#1782](https://github.com/googleapis/google-auth-library-nodejs/issues/1782)) ([16e5cae](https://github.com/googleapis/google-auth-library-nodejs/commit/16e5cae1d56d5c3dd6cc3bdca5ecdfb534eaf529))
|
| 109 |
+
* **deps:** Update dependency opn to v6 ([#1775](https://github.com/googleapis/google-auth-library-nodejs/issues/1775)) ([fc8dfe9](https://github.com/googleapis/google-auth-library-nodejs/commit/fc8dfe9d373e30dd1bd06eb8cbb8b52e735b4d83))
|
| 110 |
+
|
| 111 |
+
## [9.7.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.6.3...v9.7.0) (2024-03-12)
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
### Features
|
| 115 |
+
|
| 116 |
+
* `PassThrough` AuthClient ([#1771](https://github.com/googleapis/google-auth-library-nodejs/issues/1771)) ([0003bee](https://github.com/googleapis/google-auth-library-nodejs/commit/0003bee317dd8e99b553857edfffeb4a47a4af26))
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
### Bug Fixes
|
| 120 |
+
|
| 121 |
+
* **deps:** Update dependency @googleapis/iam to v15 ([#1772](https://github.com/googleapis/google-auth-library-nodejs/issues/1772)) ([f45f975](https://github.com/googleapis/google-auth-library-nodejs/commit/f45f9753a7c83bc04616a1bdbaf687b3f38a17d2))
|
| 122 |
+
* Making aws request signer get a new session token each time security credentials are requested. ([#1765](https://github.com/googleapis/google-auth-library-nodejs/issues/1765)) ([6a6e496](https://github.com/googleapis/google-auth-library-nodejs/commit/6a6e49634863f61487688724d0d20632e03f0299))
|
| 123 |
+
|
| 124 |
+
## [9.6.3](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.6.2...v9.6.3) (2024-02-06)
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
### Bug Fixes
|
| 128 |
+
|
| 129 |
+
* Always sign with `scopes` on Non-Default Universes ([#1752](https://github.com/googleapis/google-auth-library-nodejs/issues/1752)) ([f3d3a03](https://github.com/googleapis/google-auth-library-nodejs/commit/f3d3a03dbce42a400c11457131dd1fabc206826a))
|
| 130 |
+
|
| 131 |
+
## [9.6.2](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.6.1...v9.6.2) (2024-02-02)
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
### Bug Fixes
|
| 135 |
+
|
| 136 |
+
* Allow Get Universe Without Credentials ([#1748](https://github.com/googleapis/google-auth-library-nodejs/issues/1748)) ([696db72](https://github.com/googleapis/google-auth-library-nodejs/commit/696db72bb8644739768d20375d670813d4490714))
|
| 137 |
+
|
| 138 |
+
## [9.6.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.6.0...v9.6.1) (2024-02-01)
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
### Bug Fixes
|
| 142 |
+
|
| 143 |
+
* Universe Domain Resolution ([#1745](https://github.com/googleapis/google-auth-library-nodejs/issues/1745)) ([a4f9f9c](https://github.com/googleapis/google-auth-library-nodejs/commit/a4f9f9c65853a37e6e83861c5d22533dba774037))
|
| 144 |
+
|
| 145 |
+
## [9.6.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.5.0...v9.6.0) (2024-01-29)
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
### Features
|
| 149 |
+
|
| 150 |
+
* Open More Endpoints for Customization ([#1721](https://github.com/googleapis/google-auth-library-nodejs/issues/1721)) ([effbf87](https://github.com/googleapis/google-auth-library-nodejs/commit/effbf87f6f0fd11a0cb1c749dad81737926dc436))
|
| 151 |
+
* Use self-signed JWTs when non-default Universe Domains ([#1722](https://github.com/googleapis/google-auth-library-nodejs/issues/1722)) ([7e9876e](https://github.com/googleapis/google-auth-library-nodejs/commit/7e9876e2496b073220ca270368da7e9522da88f9))
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
### Bug Fixes
|
| 155 |
+
|
| 156 |
+
* Revert Missing `WORKFORCE_AUDIENCE_PATTERN` ([#1740](https://github.com/googleapis/google-auth-library-nodejs/issues/1740)) ([422de68](https://github.com/googleapis/google-auth-library-nodejs/commit/422de68d8d9ea66e6bf1fea923f61c8af0842420))
|
| 157 |
+
|
| 158 |
+
## [9.5.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.4.2...v9.5.0) (2024-01-25)
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
### Features
|
| 162 |
+
|
| 163 |
+
* Improve Universe Domain Ergonomics ([#1732](https://github.com/googleapis/google-auth-library-nodejs/issues/1732)) ([eec82f5](https://github.com/googleapis/google-auth-library-nodejs/commit/eec82f5f48a250744b5c3200ef247c3eae184e2f))
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
### Bug Fixes
|
| 167 |
+
|
| 168 |
+
* **deps:** Update dependency @googleapis/iam to v14 ([#1725](https://github.com/googleapis/google-auth-library-nodejs/issues/1725)) ([594bf2c](https://github.com/googleapis/google-auth-library-nodejs/commit/594bf2cc808c03733274d6b08d92f1d4b12dd630))
|
| 169 |
+
* Typos in samples ([#1728](https://github.com/googleapis/google-auth-library-nodejs/issues/1728)) ([058a503](https://github.com/googleapis/google-auth-library-nodejs/commit/058a5035e3e4df35663c6b3adef2dda617271849))
|
| 170 |
+
|
| 171 |
+
## [9.4.2](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.4.1...v9.4.2) (2024-01-04)
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
### Bug Fixes
|
| 175 |
+
|
| 176 |
+
* **deps:** Update dependency @googleapis/iam to v13 ([#1710](https://github.com/googleapis/google-auth-library-nodejs/issues/1710)) ([7ae4aae](https://github.com/googleapis/google-auth-library-nodejs/commit/7ae4aaea0311de1a3e10f4e86a1ef93ff00656b5))
|
| 177 |
+
* Expand credentials type ([#1719](https://github.com/googleapis/google-auth-library-nodejs/issues/1719)) ([846c8e9](https://github.com/googleapis/google-auth-library-nodejs/commit/846c8e96cc36feb05148c16e12127e805e388189))
|
| 178 |
+
|
| 179 |
+
## [9.4.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.4.0...v9.4.1) (2023-12-01)
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
### Bug Fixes
|
| 183 |
+
|
| 184 |
+
* Support 404 When `GaxiosError` != `GaxiosError` ([#1707](https://github.com/googleapis/google-auth-library-nodejs/issues/1707)) ([704674f](https://github.com/googleapis/google-auth-library-nodejs/commit/704674fe14750d31e7d3a58d6f9b2387c89fb184))
|
| 185 |
+
|
| 186 |
+
## [9.4.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.3.0...v9.4.0) (2023-11-30)
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
### Features
|
| 190 |
+
|
| 191 |
+
* Update gcp metadata dependency ([#1703](https://github.com/googleapis/google-auth-library-nodejs/issues/1703)) ([615bdd9](https://github.com/googleapis/google-auth-library-nodejs/commit/615bdd92d1eb1a2a5b8d8c2675fd53350d5fbc21))
|
| 192 |
+
|
| 193 |
+
## [9.3.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.2.0...v9.3.0) (2023-11-29)
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
### Features
|
| 197 |
+
|
| 198 |
+
* Add impersonated signer ([#1694](https://github.com/googleapis/google-auth-library-nodejs/issues/1694)) ([cb78a1b](https://github.com/googleapis/google-auth-library-nodejs/commit/cb78a1bfb4104e05be85877fee56d703f749e525))
|
| 199 |
+
* Retrieve `universe_domain` for Compute clients ([#1692](https://github.com/googleapis/google-auth-library-nodejs/issues/1692)) ([a735ec5](https://github.com/googleapis/google-auth-library-nodejs/commit/a735ec5f5e280a1c47f0f4d5e99acf228d5a320a))
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
### Bug Fixes
|
| 203 |
+
|
| 204 |
+
* Verifier algorithm ([#1696](https://github.com/googleapis/google-auth-library-nodejs/issues/1696)) ([c5080a0](https://github.com/googleapis/google-auth-library-nodejs/commit/c5080a0d56b52b90b5d26cfc5f7343afb58199a4))
|
| 205 |
+
|
| 206 |
+
## [9.2.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.1.0...v9.2.0) (2023-10-26)
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
### Features
|
| 210 |
+
|
| 211 |
+
* Unify Base `AuthClient` Options ([#1663](https://github.com/googleapis/google-auth-library-nodejs/issues/1663)) ([5ac6705](https://github.com/googleapis/google-auth-library-nodejs/commit/5ac67052f6c19e93c3e8c4e1636fad4737fcee08))
|
| 212 |
+
|
| 213 |
+
|
| 214 |
+
### Bug Fixes
|
| 215 |
+
|
| 216 |
+
* **deps:** Update dependency @googleapis/iam to v12 ([#1671](https://github.com/googleapis/google-auth-library-nodejs/issues/1671)) ([4f94ffe](https://github.com/googleapis/google-auth-library-nodejs/commit/4f94ffe474ee41b560813b81e8d621be848d38d0))
|
| 217 |
+
* DOS security risks ([#1668](https://github.com/googleapis/google-auth-library-nodejs/issues/1668)) ([b25d4f5](https://github.com/googleapis/google-auth-library-nodejs/commit/b25d4f54f88c52c8496ef65f5ab2a75122100f2c))
|
| 218 |
+
* Increase max asset size ([#1682](https://github.com/googleapis/google-auth-library-nodejs/issues/1682)) ([edb9401](https://github.com/googleapis/google-auth-library-nodejs/commit/edb94018cadd2ad796ccec5496e3bfcbade39c7f))
|
| 219 |
+
* Remove broken source maps ([#1669](https://github.com/googleapis/google-auth-library-nodejs/issues/1669)) ([56cb3ad](https://github.com/googleapis/google-auth-library-nodejs/commit/56cb3ad24c5e4b6952169b88d0a43e89cbf1252e))
|
| 220 |
+
|
| 221 |
+
## [9.1.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.0.0...v9.1.0) (2023-10-02)
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
### Features
|
| 225 |
+
|
| 226 |
+
* Byoid metrics ([#1595](https://github.com/googleapis/google-auth-library-nodejs/issues/1595)) ([fe09d6b](https://github.com/googleapis/google-auth-library-nodejs/commit/fe09d6b4eb5a8215d21564a97bcc7ea5beb570bf))
|
| 227 |
+
* Expose `gcp-metadata` ([#1655](https://github.com/googleapis/google-auth-library-nodejs/issues/1655)) ([d76140f](https://github.com/googleapis/google-auth-library-nodejs/commit/d76140f253c3903a22ed9087623be05e79a220f9))
|
| 228 |
+
* Expose Compute's Service Account Email ([#1656](https://github.com/googleapis/google-auth-library-nodejs/issues/1656)) ([ef29297](https://github.com/googleapis/google-auth-library-nodejs/commit/ef29297215eb907c511627543391db9b43c1eac5))
|
| 229 |
+
* Extend `universe_domain` support ([#1633](https://github.com/googleapis/google-auth-library-nodejs/issues/1633)) ([4ee02da](https://github.com/googleapis/google-auth-library-nodejs/commit/4ee02da4f6934eeb9550b8b659d1abda85194e6b))
|
| 230 |
+
* Support Instantiating OAuth2Client with Credentials ([#1652](https://github.com/googleapis/google-auth-library-nodejs/issues/1652)) ([4339d64](https://github.com/googleapis/google-auth-library-nodejs/commit/4339d6410da7b792f96d31f62800507313c25430))
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
### Bug Fixes
|
| 234 |
+
|
| 235 |
+
* **deps:** Update dependency @google-cloud/storage to v7 ([#1629](https://github.com/googleapis/google-auth-library-nodejs/issues/1629)) ([8075b6f](https://github.com/googleapis/google-auth-library-nodejs/commit/8075b6fbb347067ec231134fb4388ab9bcd1bde0))
|
| 236 |
+
* **deps:** Update dependency @googleapis/iam to v11 ([#1622](https://github.com/googleapis/google-auth-library-nodejs/issues/1622)) ([03c0ac9](https://github.com/googleapis/google-auth-library-nodejs/commit/03c0ac9950217ec08ac9ad66eaaa4e9a9e67d423))
|
| 237 |
+
* **deps:** Update dependency google-auth-library to v9 ([#1618](https://github.com/googleapis/google-auth-library-nodejs/issues/1618)) ([1873fef](https://github.com/googleapis/google-auth-library-nodejs/commit/1873fefcdf4df00ff40b0f311e40dcdd402f799e))
|
| 238 |
+
* **deps:** Update dependency puppeteer to v21 ([#1627](https://github.com/googleapis/google-auth-library-nodejs/issues/1627)) ([dd04fbd](https://github.com/googleapis/google-auth-library-nodejs/commit/dd04fbdeb17e457a09b06a4abc2aedf511f355ea))
|
| 239 |
+
* Workforce Audience Pattern ([#1654](https://github.com/googleapis/google-auth-library-nodejs/issues/1654)) ([77eeaed](https://github.com/googleapis/google-auth-library-nodejs/commit/77eeaed1d66c89e855a15db0bb6b9dbd96179c8f))
|
| 240 |
+
|
| 241 |
+
## [9.0.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.9.0...v9.0.0) (2023-07-20)
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
### ⚠ BREAKING CHANGES
|
| 245 |
+
|
| 246 |
+
* **deps:** upgrade node-gtoken to 7.0.0 ([#1590](https://github.com/googleapis/google-auth-library-nodejs/issues/1590))
|
| 247 |
+
* make transporter attribute type more generic ([#1406](https://github.com/googleapis/google-auth-library-nodejs/issues/1406))
|
| 248 |
+
* migrate to Node 14 ([#1582](https://github.com/googleapis/google-auth-library-nodejs/issues/1582))
|
| 249 |
+
* remove arrify and fast-text-encoding ([#1583](https://github.com/googleapis/google-auth-library-nodejs/issues/1583))
|
| 250 |
+
|
| 251 |
+
### Features
|
| 252 |
+
|
| 253 |
+
* Make transporter attribute type more generic ([#1406](https://github.com/googleapis/google-auth-library-nodejs/issues/1406)) ([dfac525](https://github.com/googleapis/google-auth-library-nodejs/commit/dfac5259fa573f25960949ae1c2f98bc78962717))
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
### Bug Fixes
|
| 257 |
+
|
| 258 |
+
* **deps:** Update dependency @googleapis/iam to v10 ([#1588](https://github.com/googleapis/google-auth-library-nodejs/issues/1588)) ([f95a153](https://github.com/googleapis/google-auth-library-nodejs/commit/f95a153409735a1f4c470fd7de18bf9ab5d5e771))
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
### Build System
|
| 262 |
+
|
| 263 |
+
* Remove arrify and fast-text-encoding ([#1583](https://github.com/googleapis/google-auth-library-nodejs/issues/1583)) ([d736da3](https://github.com/googleapis/google-auth-library-nodejs/commit/d736da3fa5536650ae6a3aebbcae408254ebd035))
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
### Miscellaneous Chores
|
| 267 |
+
|
| 268 |
+
* **deps:** Upgrade node-gtoken to 7.0.0 ([#1590](https://github.com/googleapis/google-auth-library-nodejs/issues/1590)) ([8738df9](https://github.com/googleapis/google-auth-library-nodejs/commit/8738df9e24c62213b5a78e34a70cdcf456a794fa))
|
| 269 |
+
* Migrate to Node 14 ([#1582](https://github.com/googleapis/google-auth-library-nodejs/issues/1582)) ([6004dca](https://github.com/googleapis/google-auth-library-nodejs/commit/6004dca8d7e7aca7e570b56afd84d3c7f5d40242))
|
| 270 |
+
|
| 271 |
+
## [8.9.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.8.0...v8.9.0) (2023-06-29)
|
| 272 |
+
|
| 273 |
+
|
| 274 |
+
### Features
|
| 275 |
+
|
| 276 |
+
* Adds universe_domain field to base external client ([#1548](https://github.com/googleapis/google-auth-library-nodejs/issues/1548)) ([7412d7c](https://github.com/googleapis/google-auth-library-nodejs/commit/7412d7c55c688601199b5201b29cfbe63c4c7a70))
|
| 277 |
+
* Utilize `gcp-metadata`'s GCP Residency Check ([#1513](https://github.com/googleapis/google-auth-library-nodejs/issues/1513)) ([43377ac](https://github.com/googleapis/google-auth-library-nodejs/commit/43377ac7af1ece14b82b053b504449f257d11af6))
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
### Bug Fixes
|
| 281 |
+
|
| 282 |
+
* **deps:** Update dependency @googleapis/iam to v8 ([#1581](https://github.com/googleapis/google-auth-library-nodejs/issues/1581)) ([7373b75](https://github.com/googleapis/google-auth-library-nodejs/commit/7373b75c2205876f38ec2697f23758176a327fc7))
|
| 283 |
+
* **deps:** Update dependency puppeteer to v20 ([#1550](https://github.com/googleapis/google-auth-library-nodejs/issues/1550)) ([3563c16](https://github.com/googleapis/google-auth-library-nodejs/commit/3563c16e2376729e399fefc0b1fad7bff78c296e))
|
| 284 |
+
* IdTokenClient expiry_date check ([#1555](https://github.com/googleapis/google-auth-library-nodejs/issues/1555)) ([efcdef1](https://github.com/googleapis/google-auth-library-nodejs/commit/efcdef190fd94537d79087e7fcb26e5925a46173))
|
| 285 |
+
* KeepAlive sample ([#1561](https://github.com/googleapis/google-auth-library-nodejs/issues/1561)) ([e3ab824](https://github.com/googleapis/google-auth-library-nodejs/commit/e3ab8247761b0a61f25e08a1b8fd6b200a4be200))
|
| 286 |
+
* Make universeDomain private ([#1552](https://github.com/googleapis/google-auth-library-nodejs/issues/1552)) ([73b63d5](https://github.com/googleapis/google-auth-library-nodejs/commit/73b63d56fad8da033307e1be501a8846a5311211))
|
| 287 |
+
* Remove auth lib version from x-goog-api-client header ([#1558](https://github.com/googleapis/google-auth-library-nodejs/issues/1558)) ([ce6013c](https://github.com/googleapis/google-auth-library-nodejs/commit/ce6013c6132ba2b82a1f8cba0a15c4710536204c))
|
| 288 |
+
|
| 289 |
+
## [8.8.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.7.0...v8.8.0) (2023-04-25)
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
### Features
|
| 293 |
+
|
| 294 |
+
* Add External Account Authorized User client type ([#1530](https://github.com/googleapis/google-auth-library-nodejs/issues/1530)) ([06d4ef3](https://github.com/googleapis/google-auth-library-nodejs/commit/06d4ef3cc9ba1651af5b1f90c02b231862822ba2))
|
| 295 |
+
* Document External Account Authorized User Credentials ([#1540](https://github.com/googleapis/google-auth-library-nodejs/issues/1540)) ([c6138be](https://github.com/googleapis/google-auth-library-nodejs/commit/c6138be12753c68d7645843451e1e3f9146e515a))
|
| 296 |
+
|
| 297 |
+
|
| 298 |
+
### Bug Fixes
|
| 299 |
+
|
| 300 |
+
* **deps:** Update `gcp-metadata` to v5.2.0 ([#1502](https://github.com/googleapis/google-auth-library-nodejs/issues/1502)) ([2562d11](https://github.com/googleapis/google-auth-library-nodejs/commit/2562d1192e0f89a3232897b8e27f24a14d5222f2))
|
| 301 |
+
* **deps:** Update dependency @googleapis/iam to v4 ([#1482](https://github.com/googleapis/google-auth-library-nodejs/issues/1482)) ([00d6135](https://github.com/googleapis/google-auth-library-nodejs/commit/00d6135f35a1aa193d50fad6b3ec28a7fda9df66))
|
| 302 |
+
* **deps:** Update dependency @googleapis/iam to v5 ([#1526](https://github.com/googleapis/google-auth-library-nodejs/issues/1526)) ([a1f9835](https://github.com/googleapis/google-auth-library-nodejs/commit/a1f9835fe155722206046d6bb5b56f9e53f2fe9a))
|
| 303 |
+
* **deps:** Update dependency @googleapis/iam to v6 ([#1536](https://github.com/googleapis/google-auth-library-nodejs/issues/1536)) ([86a4de8](https://github.com/googleapis/google-auth-library-nodejs/commit/86a4de82c0de3efeb4b9b05a6ef34bd98cce398c))
|
| 304 |
+
* **deps:** Update dependency @googleapis/iam to v7 ([#1538](https://github.com/googleapis/google-auth-library-nodejs/issues/1538)) ([fdb67dc](https://github.com/googleapis/google-auth-library-nodejs/commit/fdb67dc634f7fa2fcf8977d6d488cc91e9a7cccb))
|
| 305 |
+
* Do not call metadata server if security creds and region are retrievable through environment vars ([#1493](https://github.com/googleapis/google-auth-library-nodejs/issues/1493)) ([d4de941](https://github.com/googleapis/google-auth-library-nodejs/commit/d4de9412e12f1f6f23f2a7c0d176dc5d2543e607))
|
| 306 |
+
* Removing 3pi config URL validation ([#1517](https://github.com/googleapis/google-auth-library-nodejs/issues/1517)) ([a278d19](https://github.com/googleapis/google-auth-library-nodejs/commit/a278d19a0b211b13e5cf5176d40128e704b55780))
|
| 307 |
+
* Removing aws url validation ([#1531](https://github.com/googleapis/google-auth-library-nodejs/issues/1531)) ([f4d9335](https://github.com/googleapis/google-auth-library-nodejs/commit/f4d933579cb5b9e50adf6e679a73cc78388ad8f8))
|
| 308 |
+
|
| 309 |
+
## [8.7.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.6.0...v8.7.0) (2022-11-08)
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
### Features
|
| 313 |
+
|
| 314 |
+
* Introduce environment variable for quota project ([#1478](https://github.com/googleapis/google-auth-library-nodejs/issues/1478)) ([8706abc](https://github.com/googleapis/google-auth-library-nodejs/commit/8706abc64bb7d7b4336597589abb011150015a8c))
|
| 315 |
+
|
| 316 |
+
|
| 317 |
+
### Bug Fixes
|
| 318 |
+
|
| 319 |
+
* **deps:** Update dependency puppeteer to v19 ([#1476](https://github.com/googleapis/google-auth-library-nodejs/issues/1476)) ([86b258d](https://github.com/googleapis/google-auth-library-nodejs/commit/86b258da699810ead624419333a1a7f998f1b376))
|
| 320 |
+
* Validate url domain for aws metadata urls ([#1484](https://github.com/googleapis/google-auth-library-nodejs/issues/1484)) ([6dc4e58](https://github.com/googleapis/google-auth-library-nodejs/commit/6dc4e583dfd3aa3030dfbf959ee1c68a259abe2f))
|
| 321 |
+
|
| 322 |
+
## [8.6.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.5.2...v8.6.0) (2022-10-06)
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
### Features
|
| 326 |
+
|
| 327 |
+
* Adding validation for psc endpoints ([#1473](https://github.com/googleapis/google-auth-library-nodejs/issues/1473)) ([4bbd13f](https://github.com/googleapis/google-auth-library-nodejs/commit/4bbd13fbf9081e004209d0ffc336648cff0c529e))
|
| 328 |
+
* **samples:** Auth samples ([#1444](https://github.com/googleapis/google-auth-library-nodejs/issues/1444)) ([137883a](https://github.com/googleapis/google-auth-library-nodejs/commit/137883aff56c9e847abb6445c89a76a27536fe26))
|
| 329 |
+
|
| 330 |
+
## [8.5.2](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.5.1...v8.5.2) (2022-09-22)
|
| 331 |
+
|
| 332 |
+
|
| 333 |
+
### Bug Fixes
|
| 334 |
+
|
| 335 |
+
* **deps:** Update dependency puppeteer to v17 ([#1452](https://github.com/googleapis/google-auth-library-nodejs/issues/1452)) ([b317b59](https://github.com/googleapis/google-auth-library-nodejs/commit/b317b5963c18a598fceb85d4f32cc8cd64bb9b7b))
|
| 336 |
+
* **deps:** Update dependency puppeteer to v18 ([#1471](https://github.com/googleapis/google-auth-library-nodejs/issues/1471)) ([9a2a918](https://github.com/googleapis/google-auth-library-nodejs/commit/9a2a9188c674c41a6a67095c3b102a7dc545fff5))
|
| 337 |
+
|
| 338 |
+
## [8.5.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.5.0...v8.5.1) (2022-08-31)
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
### Bug Fixes
|
| 342 |
+
|
| 343 |
+
* do not use #private ([#1454](https://github.com/googleapis/google-auth-library-nodejs/issues/1454)) ([6c30274](https://github.com/googleapis/google-auth-library-nodejs/commit/6c302746c9eb4778619dec5f2f5f6e940af8086a))
|
| 344 |
+
|
| 345 |
+
## [8.5.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.4.0...v8.5.0) (2022-08-31)
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
### Features
|
| 349 |
+
|
| 350 |
+
* Support Not Requiring `projectId` When Not Required ([#1448](https://github.com/googleapis/google-auth-library-nodejs/issues/1448)) ([b37489b](https://github.com/googleapis/google-auth-library-nodejs/commit/b37489b6bc17645d3ea23fbceb2326adb296240b))
|
| 351 |
+
|
| 352 |
+
|
| 353 |
+
### Bug Fixes
|
| 354 |
+
|
| 355 |
+
* add hashes to requirements.txt ([#1544](https://github.com/googleapis/google-auth-library-nodejs/issues/1544)) ([#1449](https://github.com/googleapis/google-auth-library-nodejs/issues/1449)) ([54afa8e](https://github.com/googleapis/google-auth-library-nodejs/commit/54afa8ef184c8a68c9930d67d850b7334c28ecaf))
|
| 356 |
+
* remove `projectId` check for `signBlob` calls ([6c04661](https://github.com/googleapis/google-auth-library-nodejs/commit/6c04661c6950532a8239cb95f0509a9d5368ffcc))
|
| 357 |
+
|
| 358 |
+
## [8.4.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.3.0...v8.4.0) (2022-08-23)
|
| 359 |
+
|
| 360 |
+
|
| 361 |
+
### Features
|
| 362 |
+
|
| 363 |
+
* adding configurable token lifespan support ([#1441](https://github.com/googleapis/google-auth-library-nodejs/issues/1441)) ([178e3b8](https://github.com/googleapis/google-auth-library-nodejs/commit/178e3b83104f5a050f09e17d522d36c8feca632c))
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
### Bug Fixes
|
| 367 |
+
|
| 368 |
+
* **functions:** clarify auth comments ([#1427](https://github.com/googleapis/google-auth-library-nodejs/issues/1427)) ([7e06732](https://github.com/googleapis/google-auth-library-nodejs/commit/7e067327634281bba948c9cc6bc99c7ab860f827))
|
| 369 |
+
|
| 370 |
+
## [8.3.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.2.0...v8.3.0) (2022-08-19)
|
| 371 |
+
|
| 372 |
+
|
| 373 |
+
### Features
|
| 374 |
+
|
| 375 |
+
* Add `generateIdToken` support for `Impersonated` Clients ([#1439](https://github.com/googleapis/google-auth-library-nodejs/issues/1439)) ([4ace981](https://github.com/googleapis/google-auth-library-nodejs/commit/4ace981ba1d37a9a00201a1c91e1b79c8cdb5cec))
|
| 376 |
+
|
| 377 |
+
## [8.2.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.1.1...v8.2.0) (2022-08-11)
|
| 378 |
+
|
| 379 |
+
|
| 380 |
+
### Features
|
| 381 |
+
|
| 382 |
+
* adds Pluggable Auth support ([#1437](https://github.com/googleapis/google-auth-library-nodejs/issues/1437)) ([ed7ef7a](https://github.com/googleapis/google-auth-library-nodejs/commit/ed7ef7a5d1fa6bf5d06bdaab278052fd3930fb7f))
|
| 383 |
+
|
| 384 |
+
## [8.1.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.1.0...v8.1.1) (2022-07-08)
|
| 385 |
+
|
| 386 |
+
|
| 387 |
+
### Bug Fixes
|
| 388 |
+
|
| 389 |
+
* **deps:** update dependency puppeteer to v15 ([#1424](https://github.com/googleapis/google-auth-library-nodejs/issues/1424)) ([1462f2c](https://github.com/googleapis/google-auth-library-nodejs/commit/1462f2c533da22b0a07130b25c41df046d4d713d))
|
| 390 |
+
|
| 391 |
+
## [8.1.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.0.3...v8.1.0) (2022-06-30)
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
### Features
|
| 395 |
+
|
| 396 |
+
* handle impersonated ADC ([#1425](https://github.com/googleapis/google-auth-library-nodejs/issues/1425)) ([835be89](https://github.com/googleapis/google-auth-library-nodejs/commit/835be89687c2dff19f34e8b55645d3d611339e14))
|
| 397 |
+
|
| 398 |
+
## [8.0.3](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.0.2...v8.0.3) (2022-06-17)
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
### Bug Fixes
|
| 402 |
+
|
| 403 |
+
* **deps:** update dependency @googleapis/iam to v3 ([#1421](https://github.com/googleapis/google-auth-library-nodejs/issues/1421)) ([0dc8857](https://github.com/googleapis/google-auth-library-nodejs/commit/0dc88572958520ddd4834aa982d41b98851895d9))
|
| 404 |
+
|
| 405 |
+
### [8.0.2](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.0.1...v8.0.2) (2022-04-27)
|
| 406 |
+
|
| 407 |
+
|
| 408 |
+
### Bug Fixes
|
| 409 |
+
|
| 410 |
+
* Fixing Implementation of GoogleAuth.sign() for external account credentials ([#1397](https://github.com/googleapis/google-auth-library-nodejs/issues/1397)) ([b0ddb75](https://github.com/googleapis/google-auth-library-nodejs/commit/b0ddb7512fb9ed1e51b6874b7376d7e1f26be644))
|
| 411 |
+
|
| 412 |
+
### [8.0.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v8.0.0...v8.0.1) (2022-04-22)
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
### Bug Fixes
|
| 416 |
+
|
| 417 |
+
* **deps:** update dependency gaxios to v5 ([#1398](https://github.com/googleapis/google-auth-library-nodejs/issues/1398)) ([cbd7d4f](https://github.com/googleapis/google-auth-library-nodejs/commit/cbd7d4f471046afa05ff4539c9a93bba998b318c))
|
| 418 |
+
* **deps:** update dependency google-auth-library to v8 ([#1399](https://github.com/googleapis/google-auth-library-nodejs/issues/1399)) ([9a8be63](https://github.com/googleapis/google-auth-library-nodejs/commit/9a8be636eaea979979426558dca40def9c0e569e))
|
| 419 |
+
|
| 420 |
+
## [8.0.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v7.14.1...v8.0.0) (2022-04-20)
|
| 421 |
+
|
| 422 |
+
|
| 423 |
+
### ⚠ BREAKING CHANGES
|
| 424 |
+
|
| 425 |
+
* Set Node v12 to minimum supported version & Upgrade TypeScript (#1392)
|
| 426 |
+
* remove deprecated DeprecatedGetClientOptions (#1393)
|
| 427 |
+
|
| 428 |
+
### Code Refactoring
|
| 429 |
+
|
| 430 |
+
* remove deprecated DeprecatedGetClientOptions ([#1393](https://github.com/googleapis/google-auth-library-nodejs/issues/1393)) ([9c02941](https://github.com/googleapis/google-auth-library-nodejs/commit/9c02941e52514f8e3b07fedb01439fc313046063))
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
### Build System
|
| 434 |
+
|
| 435 |
+
* Set Node v12 to minimum supported version & Upgrade TypeScript ([#1392](https://github.com/googleapis/google-auth-library-nodejs/issues/1392)) ([b7bcedb](https://github.com/googleapis/google-auth-library-nodejs/commit/b7bcedb9e4ec24217a861016f3378460af7598c7))
|
| 436 |
+
|
| 437 |
+
### [7.14.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v7.14.0...v7.14.1) (2022-03-09)
|
| 438 |
+
|
| 439 |
+
|
| 440 |
+
### Bug Fixes
|
| 441 |
+
|
| 442 |
+
* **serverless:** clean up ID token example ([#1380](https://github.com/googleapis/google-auth-library-nodejs/issues/1380)) ([db27f1b](https://github.com/googleapis/google-auth-library-nodejs/commit/db27f1bc31efaa9df28da2e0a1229ee3ebea0751))
|
| 443 |
+
|
| 444 |
+
## [7.14.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v7.13.0...v7.14.0) (2022-02-22)
|
| 445 |
+
|
| 446 |
+
|
| 447 |
+
### Features
|
| 448 |
+
|
| 449 |
+
* Add AWS Session Token to Metadata Requests ([#1363](https://github.com/googleapis/google-auth-library-nodejs/issues/1363)) ([9ea3e98](https://github.com/googleapis/google-auth-library-nodejs/commit/9ea3e98582e8a69dedef89952ae08d64c49f48ef))
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
### Bug Fixes
|
| 453 |
+
|
| 454 |
+
* Rename `auth` to `authClient` & Use Generics for `AuthClient` ([#1371](https://github.com/googleapis/google-auth-library-nodejs/issues/1371)) ([8373000](https://github.com/googleapis/google-auth-library-nodejs/commit/8373000b2240cb694e9492f849e5cc7e13c89b1a))
|
| 455 |
+
|
| 456 |
+
## [7.13.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v7.12.0...v7.13.0) (2022-02-17)
|
| 457 |
+
|
| 458 |
+
|
| 459 |
+
### Features
|
| 460 |
+
|
| 461 |
+
* Support instantiating `GoogleAuth` with an `AuthClient` ([#1364](https://github.com/googleapis/google-auth-library-nodejs/issues/1364)) ([8839b5b](https://github.com/googleapis/google-auth-library-nodejs/commit/8839b5b12531ae4966b38795ed818ad138eb326a))
|
| 462 |
+
|
| 463 |
+
## [7.12.0](https://github.com/googleapis/google-auth-library-nodejs/compare/v7.11.0...v7.12.0) (2022-02-09)
|
| 464 |
+
|
| 465 |
+
|
| 466 |
+
### Features
|
| 467 |
+
|
| 468 |
+
* Export `AuthClient` ([#1361](https://github.com/googleapis/google-auth-library-nodejs/issues/1361)) ([88f42ec](https://github.com/googleapis/google-auth-library-nodejs/commit/88f42eca1a02ab5768e02538f2dc639d196de9fb))
|
| 469 |
+
|
| 470 |
+
## [7.11.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.10.4...v7.11.0) (2021-12-15)
|
| 471 |
+
|
| 472 |
+
|
| 473 |
+
### Features
|
| 474 |
+
|
| 475 |
+
* adds README, samples and integration tests for downscoping with CAB ([#1311](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1311)) ([4549116](https://www.github.com/googleapis/google-auth-library-nodejs/commit/454911637eca6a1272a729b2b2dfcf690c53fe29))
|
| 476 |
+
|
| 477 |
+
### [7.10.4](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.10.3...v7.10.4) (2021-12-13)
|
| 478 |
+
|
| 479 |
+
|
| 480 |
+
### Bug Fixes
|
| 481 |
+
|
| 482 |
+
* **deps:** update dependency puppeteer to v13 ([#1334](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1334)) ([e05548d](https://www.github.com/googleapis/google-auth-library-nodejs/commit/e05548dfb431638d618aa8b846d0944541387033))
|
| 483 |
+
|
| 484 |
+
### [7.10.3](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.10.2...v7.10.3) (2021-11-29)
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
### Bug Fixes
|
| 488 |
+
|
| 489 |
+
* **deps:** update dependency puppeteer to v12 ([#1325](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1325)) ([110ddc2](https://www.github.com/googleapis/google-auth-library-nodejs/commit/110ddc245b768888a88d8c7211f0b0391326cc10))
|
| 490 |
+
|
| 491 |
+
### [7.10.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.10.1...v7.10.2) (2021-11-03)
|
| 492 |
+
|
| 493 |
+
|
| 494 |
+
### Bug Fixes
|
| 495 |
+
|
| 496 |
+
* **deps:** update dependency puppeteer to v11 ([#1312](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1312)) ([b3ba9ac](https://www.github.com/googleapis/google-auth-library-nodejs/commit/b3ba9ac834de86022a78ac540995fa35857d6670))
|
| 497 |
+
|
| 498 |
+
### [7.10.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.10.0...v7.10.1) (2021-10-14)
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
### Bug Fixes
|
| 502 |
+
|
| 503 |
+
* **security:** explicitly update keypair dependency ([94401a6](https://www.github.com/googleapis/google-auth-library-nodejs/commit/94401a6b73eeaf370aeaf9cbf92f23f4fc7bde9b))
|
| 504 |
+
|
| 505 |
+
## [7.10.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.9.2...v7.10.0) (2021-09-28)
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
### Features
|
| 509 |
+
|
| 510 |
+
* add workforce config support. ([#1251](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1251)) ([fe29e38](https://www.github.com/googleapis/google-auth-library-nodejs/commit/fe29e384820f1c97ca62478c55813aad3f8ecbea))
|
| 511 |
+
|
| 512 |
+
### [7.9.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.9.1...v7.9.2) (2021-09-16)
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
### Bug Fixes
|
| 516 |
+
|
| 517 |
+
* **deps:** update dependency @googleapis/iam to v2 ([#1253](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1253)) ([59b8243](https://www.github.com/googleapis/google-auth-library-nodejs/commit/59b82436d6b9b68b6ae0e0e81d4b797d964acae2))
|
| 518 |
+
|
| 519 |
+
### [7.9.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.9.0...v7.9.1) (2021-09-02)
|
| 520 |
+
|
| 521 |
+
|
| 522 |
+
### Bug Fixes
|
| 523 |
+
|
| 524 |
+
* **build:** switch to main branch ([#1249](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1249)) ([2c72de4](https://www.github.com/googleapis/google-auth-library-nodejs/commit/2c72de4ef7c07ddb4586094faf117715ab50143e))
|
| 525 |
+
|
| 526 |
+
## [7.9.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.8.0...v7.9.0) (2021-09-02)
|
| 527 |
+
|
| 528 |
+
|
| 529 |
+
### Features
|
| 530 |
+
|
| 531 |
+
* wire up implementation of DownscopedClient. ([#1232](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1232)) ([baa1318](https://www.github.com/googleapis/google-auth-library-nodejs/commit/baa13185836bb299b769c034bfb7d37231eea8d1))
|
| 532 |
+
|
| 533 |
+
## [7.8.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.7.0...v7.8.0) (2021-08-30)
|
| 534 |
+
|
| 535 |
+
|
| 536 |
+
### Features
|
| 537 |
+
|
| 538 |
+
* use self-signed JWTs if alwaysUseJWTAccessWithScope is true ([#1196](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1196)) ([ad3f652](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ad3f652e8e859d8d8a69dfe9df01d001862fe0ae))
|
| 539 |
+
|
| 540 |
+
## [7.7.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.6.2...v7.7.0) (2021-08-27)
|
| 541 |
+
|
| 542 |
+
|
| 543 |
+
### Features
|
| 544 |
+
|
| 545 |
+
* add refreshHandler callback to OAuth 2.0 client to handle token refresh ([#1213](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1213)) ([2fcab77](https://www.github.com/googleapis/google-auth-library-nodejs/commit/2fcab77a1fae85489829f22ec95cc66b0b284342))
|
| 546 |
+
|
| 547 |
+
### [7.6.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.6.1...v7.6.2) (2021-08-17)
|
| 548 |
+
|
| 549 |
+
|
| 550 |
+
### Bug Fixes
|
| 551 |
+
|
| 552 |
+
* validate token_url and service_account_impersonation_url ([#1229](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1229)) ([0360bb7](https://www.github.com/googleapis/google-auth-library-nodejs/commit/0360bb722aaa082c36c1e1919bf5df27efbe15b3))
|
| 553 |
+
|
| 554 |
+
### [7.6.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.6.0...v7.6.1) (2021-08-13)
|
| 555 |
+
|
| 556 |
+
|
| 557 |
+
### Bug Fixes
|
| 558 |
+
|
| 559 |
+
* use updated variable name for self-signed JWTs ([#1233](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1233)) ([ef41fe5](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ef41fe59b423125c607e3ad20896a35f12f5365b))
|
| 560 |
+
|
| 561 |
+
## [7.6.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.5.0...v7.6.0) (2021-08-10)
|
| 562 |
+
|
| 563 |
+
|
| 564 |
+
### Features
|
| 565 |
+
|
| 566 |
+
* add GoogleAuth.sign() support to external account client ([#1227](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1227)) ([1ca3b73](https://www.github.com/googleapis/google-auth-library-nodejs/commit/1ca3b733427d951ed624e1129fca510d84d5d0fe))
|
| 567 |
+
|
| 568 |
+
## [7.5.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.4.1...v7.5.0) (2021-08-04)
|
| 569 |
+
|
| 570 |
+
|
| 571 |
+
### Features
|
| 572 |
+
|
| 573 |
+
* Adds support for STS response not returning expires_in field. ([#1216](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1216)) ([24bb456](https://www.github.com/googleapis/google-auth-library-nodejs/commit/24bb4568820c2692b1b3ff29835a38fdb3f28c9e))
|
| 574 |
+
|
| 575 |
+
### [7.4.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.4.0...v7.4.1) (2021-07-29)
|
| 576 |
+
|
| 577 |
+
|
| 578 |
+
### Bug Fixes
|
| 579 |
+
|
| 580 |
+
* **downscoped-client:** bug fixes for downscoped client implementation. ([#1219](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1219)) ([4fbe67e](https://www.github.com/googleapis/google-auth-library-nodejs/commit/4fbe67e08bce3f31193d3bb7b93c4cc1251e66a2))
|
| 581 |
+
|
| 582 |
+
## [7.4.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.3.0...v7.4.0) (2021-07-29)
|
| 583 |
+
|
| 584 |
+
|
| 585 |
+
### Features
|
| 586 |
+
|
| 587 |
+
* **impersonated:** add impersonated credentials auth ([#1207](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1207)) ([ab1cd31](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ab1cd31e07d45424f614e0401d1068df2fbd914c))
|
| 588 |
+
|
| 589 |
+
## [7.3.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.2.0...v7.3.0) (2021-07-02)
|
| 590 |
+
|
| 591 |
+
|
| 592 |
+
### Features
|
| 593 |
+
|
| 594 |
+
* add useJWTAccessWithScope and defaultServicePath variable ([#1204](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1204)) ([79e100e](https://www.github.com/googleapis/google-auth-library-nodejs/commit/79e100e9ddc64f34e34d0e91c8188f1818e33a1c))
|
| 595 |
+
|
| 596 |
+
## [7.2.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.1.2...v7.2.0) (2021-06-30)
|
| 597 |
+
|
| 598 |
+
|
| 599 |
+
### Features
|
| 600 |
+
|
| 601 |
+
* Implement DownscopedClient#getAccessToken() and unit test ([#1201](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1201)) ([faa6677](https://www.github.com/googleapis/google-auth-library-nodejs/commit/faa6677fe72c8fc671a2190abe45897ac58cc42e))
|
| 602 |
+
|
| 603 |
+
### [7.1.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.1.1...v7.1.2) (2021-06-10)
|
| 604 |
+
|
| 605 |
+
|
| 606 |
+
### Bug Fixes
|
| 607 |
+
|
| 608 |
+
* use iam client library to setup test ([#1173](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1173)) ([74ac5db](https://www.github.com/googleapis/google-auth-library-nodejs/commit/74ac5db59f9eff8fa4f3bdb6acc0647a1a4f491f))
|
| 609 |
+
|
| 610 |
+
### [7.1.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.1.0...v7.1.1) (2021-06-02)
|
| 611 |
+
|
| 612 |
+
|
| 613 |
+
### Bug Fixes
|
| 614 |
+
|
| 615 |
+
* **deps:** update dependency puppeteer to v10 ([#1182](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1182)) ([003e3ee](https://www.github.com/googleapis/google-auth-library-nodejs/commit/003e3ee5d8aeb749c07a4a4db2b75a5882988cc3))
|
| 616 |
+
|
| 617 |
+
## [7.1.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.0.4...v7.1.0) (2021-05-21)
|
| 618 |
+
|
| 619 |
+
|
| 620 |
+
### Features
|
| 621 |
+
|
| 622 |
+
* add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#1174](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1174)) ([f377adc](https://www.github.com/googleapis/google-auth-library-nodejs/commit/f377adc01ca16687bb905aa14f6c62a23e90aaa9))
|
| 623 |
+
* add detection for Cloud Run ([#1177](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1177)) ([4512363](https://www.github.com/googleapis/google-auth-library-nodejs/commit/4512363cf712dff5f178af0e7022c258775dfec7))
|
| 624 |
+
|
| 625 |
+
### [7.0.4](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.0.3...v7.0.4) (2021-04-06)
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
### Bug Fixes
|
| 629 |
+
|
| 630 |
+
* do not suppress external project ID determination errors ([#1153](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1153)) ([6c1c91d](https://www.github.com/googleapis/google-auth-library-nodejs/commit/6c1c91dac6c31d762b03774a385d780a824fce97))
|
| 631 |
+
|
| 632 |
+
### [7.0.3](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.0.2...v7.0.3) (2021-03-23)
|
| 633 |
+
|
| 634 |
+
|
| 635 |
+
### Bug Fixes
|
| 636 |
+
|
| 637 |
+
* support AWS_DEFAULT_REGION for determining AWS region ([#1149](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1149)) ([9ae2d30](https://www.github.com/googleapis/google-auth-library-nodejs/commit/9ae2d30c15c9bce3cae70ccbe6e227c096005695))
|
| 638 |
+
|
| 639 |
+
### [7.0.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.0.1...v7.0.2) (2021-02-10)
|
| 640 |
+
|
| 641 |
+
|
| 642 |
+
### Bug Fixes
|
| 643 |
+
|
| 644 |
+
* expose `BaseExternalAccountClient` and `BaseExternalAccountClientOptions` ([#1142](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1142)) ([1d62c04](https://www.github.com/googleapis/google-auth-library-nodejs/commit/1d62c04dfa117b6a81e8c78385dc72792369cf21))
|
| 645 |
+
|
| 646 |
+
### [7.0.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v7.0.0...v7.0.1) (2021-02-09)
|
| 647 |
+
|
| 648 |
+
|
| 649 |
+
### Bug Fixes
|
| 650 |
+
|
| 651 |
+
* **deps:** update dependency google-auth-library to v7 ([#1140](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1140)) ([9c717f7](https://www.github.com/googleapis/google-auth-library-nodejs/commit/9c717f70ca155b24edd5511b6038679db25b85b7))
|
| 652 |
+
|
| 653 |
+
## [7.0.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.1.6...v7.0.0) (2021-02-08)
|
| 654 |
+
|
| 655 |
+
|
| 656 |
+
### ⚠ BREAKING CHANGES
|
| 657 |
+
|
| 658 |
+
* integrates external_accounts with `GoogleAuth` and ADC (#1052)
|
| 659 |
+
* workload identity federation support (#1131)
|
| 660 |
+
|
| 661 |
+
### Features
|
| 662 |
+
|
| 663 |
+
* adds service account impersonation to `ExternalAccountClient` ([#1041](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1041)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 664 |
+
* adds text/json credential_source support to IdentityPoolClients ([#1059](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1059)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 665 |
+
* defines `ExternalAccountClient` used to instantiate external account clients ([#1050](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1050)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 666 |
+
* defines `IdentityPoolClient` used for K8s and Azure workloads ([#1042](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1042)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 667 |
+
* defines ExternalAccountClient abstract class for external_account credentials ([#1030](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1030)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 668 |
+
* get AWS region from environment variable ([#1067](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1067)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 669 |
+
* implements AWS signature version 4 for signing requests ([#1047](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1047)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 670 |
+
* implements the OAuth token exchange spec based on rfc8693 ([#1026](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1026)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 671 |
+
* integrates external_accounts with `GoogleAuth` and ADC ([#1052](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1052)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 672 |
+
* workload identity federation support ([#1131](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1131)) ([997f124](https://www.github.com/googleapis/google-auth-library-nodejs/commit/997f124a5c02dfa44879a759bf701a9fa4c3ba90))
|
| 673 |
+
|
| 674 |
+
|
| 675 |
+
### Bug Fixes
|
| 676 |
+
|
| 677 |
+
* **deps:** update dependency puppeteer to v6 ([#1129](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1129)) ([5240fb0](https://www.github.com/googleapis/google-auth-library-nodejs/commit/5240fb0e7ba5503d562659a0d1d7c952bc44ce0e))
|
| 678 |
+
* **deps:** update dependency puppeteer to v7 ([#1134](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1134)) ([02d0d73](https://www.github.com/googleapis/google-auth-library-nodejs/commit/02d0d73a5f0d2fc7de9b13b160e4e7074652f9d0))
|
| 679 |
+
|
| 680 |
+
### [6.1.6](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.1.5...v6.1.6) (2021-01-27)
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
### Bug Fixes
|
| 684 |
+
|
| 685 |
+
* call addSharedMetadataHeaders even when token has not expired ([#1116](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1116)) ([aad043d](https://www.github.com/googleapis/google-auth-library-nodejs/commit/aad043d20df3f1e44f56c58a21f15000b6fe970d))
|
| 686 |
+
|
| 687 |
+
### [6.1.5](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.1.4...v6.1.5) (2021-01-22)
|
| 688 |
+
|
| 689 |
+
|
| 690 |
+
### Bug Fixes
|
| 691 |
+
|
| 692 |
+
* support PEM and p12 when using factory ([#1120](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1120)) ([c2ead4c](https://www.github.com/googleapis/google-auth-library-nodejs/commit/c2ead4cc7650f100b883c9296fce628f17085992))
|
| 693 |
+
|
| 694 |
+
### [6.1.4](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.1.3...v6.1.4) (2020-12-22)
|
| 695 |
+
|
| 696 |
+
|
| 697 |
+
### Bug Fixes
|
| 698 |
+
|
| 699 |
+
* move accessToken to headers instead of parameter ([#1108](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1108)) ([67b0cc3](https://www.github.com/googleapis/google-auth-library-nodejs/commit/67b0cc3077860a1583bcf18ce50aeff58bbb5496))
|
| 700 |
+
|
| 701 |
+
### [6.1.3](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.1.2...v6.1.3) (2020-10-22)
|
| 702 |
+
|
| 703 |
+
|
| 704 |
+
### Bug Fixes
|
| 705 |
+
|
| 706 |
+
* **deps:** update dependency gaxios to v4 ([#1086](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1086)) ([f2678ff](https://www.github.com/googleapis/google-auth-library-nodejs/commit/f2678ff5f8f5a0ee33924278b58e0a6e3122cb12))
|
| 707 |
+
|
| 708 |
+
### [6.1.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.1.1...v6.1.2) (2020-10-19)
|
| 709 |
+
|
| 710 |
+
|
| 711 |
+
### Bug Fixes
|
| 712 |
+
|
| 713 |
+
* update gcp-metadata to catch a json-bigint security fix ([#1078](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1078)) ([125fe09](https://www.github.com/googleapis/google-auth-library-nodejs/commit/125fe0924a2206ebb0c83ece9947524e7b135803))
|
| 714 |
+
|
| 715 |
+
### [6.1.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.1.0...v6.1.1) (2020-10-06)
|
| 716 |
+
|
| 717 |
+
|
| 718 |
+
### Bug Fixes
|
| 719 |
+
|
| 720 |
+
* **deps:** upgrade gtoken ([#1064](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1064)) ([9116f24](https://www.github.com/googleapis/google-auth-library-nodejs/commit/9116f247486d6376feca505bbfa42a91d5e579e2))
|
| 721 |
+
|
| 722 |
+
## [6.1.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.8...v6.1.0) (2020-09-22)
|
| 723 |
+
|
| 724 |
+
|
| 725 |
+
### Features
|
| 726 |
+
|
| 727 |
+
* default self-signed JWTs ([#1054](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1054)) ([b4d139d](https://www.github.com/googleapis/google-auth-library-nodejs/commit/b4d139d9ee27f886ca8cc5478615c052700fff48))
|
| 728 |
+
|
| 729 |
+
### [6.0.8](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.7...v6.0.8) (2020-08-13)
|
| 730 |
+
|
| 731 |
+
|
| 732 |
+
### Bug Fixes
|
| 733 |
+
|
| 734 |
+
* **deps:** roll back dependency google-auth-library to ^6.0.6 ([#1033](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1033)) ([eb54ee9](https://www.github.com/googleapis/google-auth-library-nodejs/commit/eb54ee9369d9e5a01d164ccf7f826858d44827fd))
|
| 735 |
+
|
| 736 |
+
### [6.0.7](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.6...v6.0.7) (2020-08-11)
|
| 737 |
+
|
| 738 |
+
|
| 739 |
+
### Bug Fixes
|
| 740 |
+
|
| 741 |
+
* migrate token info API to not pass token in query string ([#991](https://www.github.com/googleapis/google-auth-library-nodejs/issues/991)) ([a7e5701](https://www.github.com/googleapis/google-auth-library-nodejs/commit/a7e5701a8394d79fe93d28794467747a23cf9ff4))
|
| 742 |
+
|
| 743 |
+
### [6.0.6](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.5...v6.0.6) (2020-07-30)
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
### Bug Fixes
|
| 747 |
+
|
| 748 |
+
* **types:** include scope in credentials type ([#1007](https://www.github.com/googleapis/google-auth-library-nodejs/issues/1007)) ([a2b7d23](https://www.github.com/googleapis/google-auth-library-nodejs/commit/a2b7d23caa5bf253c7c0756396f1b58216182089))
|
| 749 |
+
|
| 750 |
+
### [6.0.5](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.4...v6.0.5) (2020-07-13)
|
| 751 |
+
|
| 752 |
+
|
| 753 |
+
### Bug Fixes
|
| 754 |
+
|
| 755 |
+
* **deps:** update dependency lru-cache to v6 ([#995](https://www.github.com/googleapis/google-auth-library-nodejs/issues/995)) ([3c07566](https://www.github.com/googleapis/google-auth-library-nodejs/commit/3c07566f0384611227030e9b381fc6e6707e526b))
|
| 756 |
+
|
| 757 |
+
### [6.0.4](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.3...v6.0.4) (2020-07-09)
|
| 758 |
+
|
| 759 |
+
|
| 760 |
+
### Bug Fixes
|
| 761 |
+
|
| 762 |
+
* typeo in nodejs .gitattribute ([#993](https://www.github.com/googleapis/google-auth-library-nodejs/issues/993)) ([ad12ceb](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ad12ceb3309b7db7394fe1fe1d5e7b2e4901141d))
|
| 763 |
+
|
| 764 |
+
### [6.0.3](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.2...v6.0.3) (2020-07-06)
|
| 765 |
+
|
| 766 |
+
|
| 767 |
+
### Bug Fixes
|
| 768 |
+
|
| 769 |
+
* **deps:** update dependency puppeteer to v5 ([#986](https://www.github.com/googleapis/google-auth-library-nodejs/issues/986)) ([7cfe6f2](https://www.github.com/googleapis/google-auth-library-nodejs/commit/7cfe6f200b9c04fe4805d1b1e3a2e03a9668e551))
|
| 770 |
+
|
| 771 |
+
### [6.0.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.1...v6.0.2) (2020-06-16)
|
| 772 |
+
|
| 773 |
+
|
| 774 |
+
### Bug Fixes
|
| 775 |
+
|
| 776 |
+
* **deps:** update dependency puppeteer to v4 ([#976](https://www.github.com/googleapis/google-auth-library-nodejs/issues/976)) ([9ddfb9b](https://www.github.com/googleapis/google-auth-library-nodejs/commit/9ddfb9befedd10d6c82cbf799c1afea9ba10d444))
|
| 777 |
+
* **tsc:** audience property is not mandatory on verifyIdToken ([#972](https://www.github.com/googleapis/google-auth-library-nodejs/issues/972)) ([17a7e24](https://www.github.com/googleapis/google-auth-library-nodejs/commit/17a7e247cdb798ddf3173cf44ab762665cbce0a1))
|
| 778 |
+
* **types:** add locale property to idtoken ([#974](https://www.github.com/googleapis/google-auth-library-nodejs/issues/974)) ([ebf9bed](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ebf9beda30f251da6adb9ec0bf943019ea0171c5)), closes [#973](https://www.github.com/googleapis/google-auth-library-nodejs/issues/973)
|
| 779 |
+
|
| 780 |
+
### [6.0.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v6.0.0...v6.0.1) (2020-05-21)
|
| 781 |
+
|
| 782 |
+
|
| 783 |
+
### Bug Fixes
|
| 784 |
+
|
| 785 |
+
* **deps:** update dependency google-auth-library to v6 ([#930](https://www.github.com/googleapis/google-auth-library-nodejs/issues/930)) ([81fdabe](https://www.github.com/googleapis/google-auth-library-nodejs/commit/81fdabe6fb7f0b8c5114c0d835680a28def822e2))
|
| 786 |
+
* apache license URL ([#468](https://www.github.com/googleapis/google-auth-library-nodejs/issues/468)) ([#936](https://www.github.com/googleapis/google-auth-library-nodejs/issues/936)) ([53831cf](https://www.github.com/googleapis/google-auth-library-nodejs/commit/53831cf72f6669d13692c5665fef5062dc8f6c1a))
|
| 787 |
+
* **deps:** update dependency puppeteer to v3 ([#944](https://www.github.com/googleapis/google-auth-library-nodejs/issues/944)) ([4d6fba0](https://www.github.com/googleapis/google-auth-library-nodejs/commit/4d6fba034cb0e70092656e9aff1ba419fdfca880))
|
| 788 |
+
* fixing tsc error caused by @types/node update ([#965](https://www.github.com/googleapis/google-auth-library-nodejs/issues/965)) ([b94edb0](https://www.github.com/googleapis/google-auth-library-nodejs/commit/b94edb0716572593e4e9cb8a9b9bbfa567f71625))
|
| 789 |
+
* gcp-metadata now warns rather than throwing ([#956](https://www.github.com/googleapis/google-auth-library-nodejs/issues/956)) ([89e16c2](https://www.github.com/googleapis/google-auth-library-nodejs/commit/89e16c2401101d086a8f9d05b8f0771b5c74157c))
|
| 790 |
+
|
| 791 |
+
## [6.0.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.10.1...v6.0.0) (2020-03-26)
|
| 792 |
+
|
| 793 |
+
|
| 794 |
+
### ⚠ BREAKING CHANGES
|
| 795 |
+
|
| 796 |
+
* typescript@3.7.x introduced some breaking changes in
|
| 797 |
+
generated code.
|
| 798 |
+
* require node 10 in engines field (#926)
|
| 799 |
+
* remove deprecated methods (#906)
|
| 800 |
+
|
| 801 |
+
### Features
|
| 802 |
+
|
| 803 |
+
* require node 10 in engines field ([#926](https://www.github.com/googleapis/google-auth-library-nodejs/issues/926)) ([d89c59a](https://www.github.com/googleapis/google-auth-library-nodejs/commit/d89c59a316e9ca5b8c351128ee3e2d91e9729d5c))
|
| 804 |
+
|
| 805 |
+
|
| 806 |
+
### Bug Fixes
|
| 807 |
+
|
| 808 |
+
* do not warn for SDK creds ([#905](https://www.github.com/googleapis/google-auth-library-nodejs/issues/905)) ([9536840](https://www.github.com/googleapis/google-auth-library-nodejs/commit/9536840f88e77f747bbbc2c1b5b4289018fc23c9))
|
| 809 |
+
* use iamcredentials API to sign blobs ([#908](https://www.github.com/googleapis/google-auth-library-nodejs/issues/908)) ([7b8e4c5](https://www.github.com/googleapis/google-auth-library-nodejs/commit/7b8e4c52e31bb3d448c3ff8c05002188900eaa04))
|
| 810 |
+
* **deps:** update dependency gaxios to v3 ([#917](https://www.github.com/googleapis/google-auth-library-nodejs/issues/917)) ([1f4bf61](https://www.github.com/googleapis/google-auth-library-nodejs/commit/1f4bf6128a0dcf22cfe1ec492b2192f513836cb2))
|
| 811 |
+
* **deps:** update dependency gcp-metadata to v4 ([#918](https://www.github.com/googleapis/google-auth-library-nodejs/issues/918)) ([d337131](https://www.github.com/googleapis/google-auth-library-nodejs/commit/d337131d009cc1f8182f7a1f8a9034433ee3fbf7))
|
| 812 |
+
* **types:** add additional fields to TokenInfo ([#907](https://www.github.com/googleapis/google-auth-library-nodejs/issues/907)) ([5b48eb8](https://www.github.com/googleapis/google-auth-library-nodejs/commit/5b48eb86c108c47d317a0eb96b47c0cae86f98cb))
|
| 813 |
+
|
| 814 |
+
|
| 815 |
+
### Build System
|
| 816 |
+
|
| 817 |
+
* update to latest gts and TypeScript ([#927](https://www.github.com/googleapis/google-auth-library-nodejs/issues/927)) ([e11e18c](https://www.github.com/googleapis/google-auth-library-nodejs/commit/e11e18cb33eb60a666980d061c54bb8891cdd242))
|
| 818 |
+
|
| 819 |
+
|
| 820 |
+
### Miscellaneous Chores
|
| 821 |
+
|
| 822 |
+
* remove deprecated methods ([#906](https://www.github.com/googleapis/google-auth-library-nodejs/issues/906)) ([f453fb7](https://www.github.com/googleapis/google-auth-library-nodejs/commit/f453fb7d8355e6dc74800b18d6f43c4e91d4acc9))
|
| 823 |
+
|
| 824 |
+
### [5.10.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.10.0...v5.10.1) (2020-02-25)
|
| 825 |
+
|
| 826 |
+
|
| 827 |
+
### Bug Fixes
|
| 828 |
+
|
| 829 |
+
* if GCF environment detected, increase library timeout ([#899](https://www.github.com/googleapis/google-auth-library-nodejs/issues/899)) ([2577ff2](https://www.github.com/googleapis/google-auth-library-nodejs/commit/2577ff28bf22dfc58bd09e7365471c16f359f109))
|
| 830 |
+
|
| 831 |
+
## [5.10.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.9.2...v5.10.0) (2020-02-20)
|
| 832 |
+
|
| 833 |
+
|
| 834 |
+
### Features
|
| 835 |
+
|
| 836 |
+
* support for verifying ES256 and retrieving IAP public keys ([#887](https://www.github.com/googleapis/google-auth-library-nodejs/issues/887)) ([a98e386](https://www.github.com/googleapis/google-auth-library-nodejs/commit/a98e38678dc4a5e963356378c75c658e36dccd01))
|
| 837 |
+
|
| 838 |
+
|
| 839 |
+
### Bug Fixes
|
| 840 |
+
|
| 841 |
+
* **docs:** correct links in README ([f6a3194](https://www.github.com/googleapis/google-auth-library-nodejs/commit/f6a3194ff6df97d4fd833ae69ec80c05eab46e7b)), closes [#891](https://www.github.com/googleapis/google-auth-library-nodejs/issues/891)
|
| 842 |
+
|
| 843 |
+
### [5.9.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.9.1...v5.9.2) (2020-01-28)
|
| 844 |
+
|
| 845 |
+
|
| 846 |
+
### Bug Fixes
|
| 847 |
+
|
| 848 |
+
* populate credentials.refresh_token if provided ([#881](https://www.github.com/googleapis/google-auth-library-nodejs/issues/881)) ([63c4637](https://www.github.com/googleapis/google-auth-library-nodejs/commit/63c4637c57e4113a7b01bf78933a8bff0356c104))
|
| 849 |
+
|
| 850 |
+
### [5.9.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.9.0...v5.9.1) (2020-01-16)
|
| 851 |
+
|
| 852 |
+
|
| 853 |
+
### Bug Fixes
|
| 854 |
+
|
| 855 |
+
* ensures GCE metadata sets email field for ID tokens ([#874](https://www.github.com/googleapis/google-auth-library-nodejs/issues/874)) ([e45b73d](https://www.github.com/googleapis/google-auth-library-nodejs/commit/e45b73dbb22e1c2d8115882006a21337c7d9bd63))
|
| 856 |
+
|
| 857 |
+
## [5.9.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.8.0...v5.9.0) (2020-01-14)
|
| 858 |
+
|
| 859 |
+
|
| 860 |
+
### Features
|
| 861 |
+
|
| 862 |
+
* add methods for fetching and using id tokens ([#867](https://www.github.com/googleapis/google-auth-library-nodejs/issues/867)) ([8036f1a](https://www.github.com/googleapis/google-auth-library-nodejs/commit/8036f1a51d1a103b08daf62c7ce372c9f68cd9d4))
|
| 863 |
+
* export LoginTicket and TokenPayload ([#870](https://www.github.com/googleapis/google-auth-library-nodejs/issues/870)) ([539ea5e](https://www.github.com/googleapis/google-auth-library-nodejs/commit/539ea5e804386b79ecf469838fff19465aeb2ca6))
|
| 864 |
+
|
| 865 |
+
## [5.8.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.7.0...v5.8.0) (2020-01-06)
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
### Features
|
| 869 |
+
|
| 870 |
+
* cache results of getEnv() ([#857](https://www.github.com/googleapis/google-auth-library-nodejs/issues/857)) ([d4545a9](https://www.github.com/googleapis/google-auth-library-nodejs/commit/d4545a9001184fac0b67e7073e463e3efd345037))
|
| 871 |
+
|
| 872 |
+
|
| 873 |
+
### Bug Fixes
|
| 874 |
+
|
| 875 |
+
* **deps:** update dependency jws to v4 ([#851](https://www.github.com/googleapis/google-auth-library-nodejs/issues/851)) ([71366d4](https://www.github.com/googleapis/google-auth-library-nodejs/commit/71366d43406047ce9e1d818d59a14191fb678e3a))
|
| 876 |
+
|
| 877 |
+
## [5.7.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.6.1...v5.7.0) (2019-12-10)
|
| 878 |
+
|
| 879 |
+
|
| 880 |
+
### Features
|
| 881 |
+
|
| 882 |
+
* make x-goog-user-project work for additional auth clients ([#848](https://www.github.com/googleapis/google-auth-library-nodejs/issues/848)) ([46af865](https://www.github.com/googleapis/google-auth-library-nodejs/commit/46af865172103c6f28712d78b30c2291487cbe86))
|
| 883 |
+
|
| 884 |
+
### [5.6.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.6.0...v5.6.1) (2019-12-05)
|
| 885 |
+
|
| 886 |
+
|
| 887 |
+
### Bug Fixes
|
| 888 |
+
|
| 889 |
+
* **deps:** pin TypeScript below 3.7.0 ([#845](https://www.github.com/googleapis/google-auth-library-nodejs/issues/845)) ([a9c6e92](https://www.github.com/googleapis/google-auth-library-nodejs/commit/a9c6e9284efe8102974c57c9824ed6275d743c7a))
|
| 890 |
+
* **docs:** improve types and docs for generateCodeVerifierAsync ([#840](https://www.github.com/googleapis/google-auth-library-nodejs/issues/840)) ([04dae9c](https://www.github.com/googleapis/google-auth-library-nodejs/commit/04dae9c271f0099025188489c61fd245d482832b))
|
| 891 |
+
|
| 892 |
+
## [5.6.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.5.1...v5.6.0) (2019-12-02)
|
| 893 |
+
|
| 894 |
+
|
| 895 |
+
### Features
|
| 896 |
+
|
| 897 |
+
* populate x-goog-user-project for requestAsync ([#837](https://www.github.com/googleapis/google-auth-library-nodejs/issues/837)) ([5a068fb](https://www.github.com/googleapis/google-auth-library-nodejs/commit/5a068fb8f5a3827ab70404f1d9699a97f962bdad))
|
| 898 |
+
* set x-goog-user-project header, with quota_project from default credentials ([#829](https://www.github.com/googleapis/google-auth-library-nodejs/issues/829)) ([3240d16](https://www.github.com/googleapis/google-auth-library-nodejs/commit/3240d16f05171781fe6d70d64c476bceb25805a5))
|
| 899 |
+
|
| 900 |
+
|
| 901 |
+
### Bug Fixes
|
| 902 |
+
|
| 903 |
+
* **deps:** update dependency puppeteer to v2 ([#821](https://www.github.com/googleapis/google-auth-library-nodejs/issues/821)) ([2c04117](https://www.github.com/googleapis/google-auth-library-nodejs/commit/2c0411708761cc7debdda1af1e593d82cb4aed31))
|
| 904 |
+
* **docs:** add jsdoc-region-tag plugin ([#826](https://www.github.com/googleapis/google-auth-library-nodejs/issues/826)) ([558677f](https://www.github.com/googleapis/google-auth-library-nodejs/commit/558677fd90d3451e9ac4bf6d0b98907e3313f287))
|
| 905 |
+
* expand on x-goog-user-project to handle auth.getClient() ([#831](https://www.github.com/googleapis/google-auth-library-nodejs/issues/831)) ([3646b7f](https://www.github.com/googleapis/google-auth-library-nodejs/commit/3646b7f9deb296aaff602dd2168ce93f014ce840))
|
| 906 |
+
* use quota_project_id field instead of quota_project ([#832](https://www.github.com/googleapis/google-auth-library-nodejs/issues/832)) ([8933966](https://www.github.com/googleapis/google-auth-library-nodejs/commit/8933966659f3b07f5454a2756fa52d92fea147d2))
|
| 907 |
+
|
| 908 |
+
### [5.5.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.5.0...v5.5.1) (2019-10-22)
|
| 909 |
+
|
| 910 |
+
|
| 911 |
+
### Bug Fixes
|
| 912 |
+
|
| 913 |
+
* **deps:** update gaxios dependency ([#817](https://www.github.com/googleapis/google-auth-library-nodejs/issues/817)) ([6730698](https://www.github.com/googleapis/google-auth-library-nodejs/commit/6730698b876eb52889acfead33bc4af52a8a7ba5))
|
| 914 |
+
* don't append x-goog-api-client multiple times ([#820](https://www.github.com/googleapis/google-auth-library-nodejs/issues/820)) ([a46b271](https://www.github.com/googleapis/google-auth-library-nodejs/commit/a46b271947b635377eacbdfcd22ae363ce9260a1))
|
| 915 |
+
|
| 916 |
+
## [5.5.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.4.1...v5.5.0) (2019-10-14)
|
| 917 |
+
|
| 918 |
+
|
| 919 |
+
### Features
|
| 920 |
+
|
| 921 |
+
* **refresh:** add forceRefreshOnFailure flag for refreshing token on error ([#790](https://www.github.com/googleapis/google-auth-library-nodejs/issues/790)) ([54cf477](https://www.github.com/googleapis/google-auth-library-nodejs/commit/54cf4770f487fd1db48f2444c86109ca97608ed1))
|
| 922 |
+
|
| 923 |
+
### [5.4.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.4.0...v5.4.1) (2019-10-10)
|
| 924 |
+
|
| 925 |
+
|
| 926 |
+
### Bug Fixes
|
| 927 |
+
|
| 928 |
+
* **deps:** updats to gcp-metadata with debug option ([#811](https://www.github.com/googleapis/google-auth-library-nodejs/issues/811)) ([744e3e8](https://www.github.com/googleapis/google-auth-library-nodejs/commit/744e3e8fea223eb4fb115ef0a4d36ad88fc6921a))
|
| 929 |
+
|
| 930 |
+
## [5.4.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.3.0...v5.4.0) (2019-10-08)
|
| 931 |
+
|
| 932 |
+
|
| 933 |
+
### Features
|
| 934 |
+
|
| 935 |
+
* do not deprecate refreshAccessToken ([#804](https://www.github.com/googleapis/google-auth-library-nodejs/issues/804)) ([f05de11](https://www.github.com/googleapis/google-auth-library-nodejs/commit/f05de11))
|
| 936 |
+
|
| 937 |
+
## [5.3.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.2.2...v5.3.0) (2019-09-27)
|
| 938 |
+
|
| 939 |
+
|
| 940 |
+
### Features
|
| 941 |
+
|
| 942 |
+
* if token expires soon, force refresh ([#794](https://www.github.com/googleapis/google-auth-library-nodejs/issues/794)) ([fecd4f4](https://www.github.com/googleapis/google-auth-library-nodejs/commit/fecd4f4))
|
| 943 |
+
|
| 944 |
+
### [5.2.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.2.1...v5.2.2) (2019-09-17)
|
| 945 |
+
|
| 946 |
+
|
| 947 |
+
### Bug Fixes
|
| 948 |
+
|
| 949 |
+
* **deps:** update to gcp-metadata and address envDetect performance issues ([#787](https://www.github.com/googleapis/google-auth-library-nodejs/issues/787)) ([651b5d4](https://www.github.com/googleapis/google-auth-library-nodejs/commit/651b5d4))
|
| 950 |
+
|
| 951 |
+
### [5.2.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.2.0...v5.2.1) (2019-09-06)
|
| 952 |
+
|
| 953 |
+
|
| 954 |
+
### Bug Fixes
|
| 955 |
+
|
| 956 |
+
* **deps:** nock@next has types that work with our libraries ([#783](https://www.github.com/googleapis/google-auth-library-nodejs/issues/783)) ([a253709](https://www.github.com/googleapis/google-auth-library-nodejs/commit/a253709))
|
| 957 |
+
* **docs:** fix variable name in README.md ([#782](https://www.github.com/googleapis/google-auth-library-nodejs/issues/782)) ([d8c70b9](https://www.github.com/googleapis/google-auth-library-nodejs/commit/d8c70b9))
|
| 958 |
+
|
| 959 |
+
## [5.2.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.1.2...v5.2.0) (2019-08-09)
|
| 960 |
+
|
| 961 |
+
|
| 962 |
+
### Features
|
| 963 |
+
|
| 964 |
+
* populate x-goog-api-client header for auth ([#772](https://www.github.com/googleapis/google-auth-library-nodejs/issues/772)) ([526dcf6](https://www.github.com/googleapis/google-auth-library-nodejs/commit/526dcf6))
|
| 965 |
+
|
| 966 |
+
### [5.1.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.1.1...v5.1.2) (2019-08-05)
|
| 967 |
+
|
| 968 |
+
|
| 969 |
+
### Bug Fixes
|
| 970 |
+
|
| 971 |
+
* **deps:** upgrade to gtoken 4.x ([#763](https://www.github.com/googleapis/google-auth-library-nodejs/issues/763)) ([a1fcc25](https://www.github.com/googleapis/google-auth-library-nodejs/commit/a1fcc25))
|
| 972 |
+
|
| 973 |
+
### [5.1.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.1.0...v5.1.1) (2019-07-29)
|
| 974 |
+
|
| 975 |
+
|
| 976 |
+
### Bug Fixes
|
| 977 |
+
|
| 978 |
+
* **deps:** update dependency google-auth-library to v5 ([#759](https://www.github.com/googleapis/google-auth-library-nodejs/issues/759)) ([e32a12b](https://www.github.com/googleapis/google-auth-library-nodejs/commit/e32a12b))
|
| 979 |
+
|
| 980 |
+
## [5.1.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v5.0.0...v5.1.0) (2019-07-24)
|
| 981 |
+
|
| 982 |
+
|
| 983 |
+
### Features
|
| 984 |
+
|
| 985 |
+
* **types:** expose ProjectIdCallback interface ([#753](https://www.github.com/googleapis/google-auth-library-nodejs/issues/753)) ([5577f0d](https://www.github.com/googleapis/google-auth-library-nodejs/commit/5577f0d))
|
| 986 |
+
|
| 987 |
+
## [5.0.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.2.6...v5.0.0) (2019-07-23)
|
| 988 |
+
|
| 989 |
+
|
| 990 |
+
### ⚠ BREAKING CHANGES
|
| 991 |
+
|
| 992 |
+
* getOptions() no longer accepts GoogleAuthOptions (#749)
|
| 993 |
+
|
| 994 |
+
### Code Refactoring
|
| 995 |
+
|
| 996 |
+
* getOptions() no longer accepts GoogleAuthOptions ([#749](https://www.github.com/googleapis/google-auth-library-nodejs/issues/749)) ([ba58e3b](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ba58e3b))
|
| 997 |
+
|
| 998 |
+
### [4.2.6](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.2.5...v4.2.6) (2019-07-23)
|
| 999 |
+
|
| 1000 |
+
|
| 1001 |
+
### Bug Fixes
|
| 1002 |
+
|
| 1003 |
+
* use FUNCTION_TARGET to detect GCF 10 and above ([#748](https://www.github.com/googleapis/google-auth-library-nodejs/issues/748)) ([ca17685](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ca17685))
|
| 1004 |
+
|
| 1005 |
+
### [4.2.5](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.2.4...v4.2.5) (2019-06-26)
|
| 1006 |
+
|
| 1007 |
+
|
| 1008 |
+
### Bug Fixes
|
| 1009 |
+
|
| 1010 |
+
* **docs:** make anchors work in jsdoc ([#742](https://www.github.com/googleapis/google-auth-library-nodejs/issues/742)) ([7901456](https://www.github.com/googleapis/google-auth-library-nodejs/commit/7901456))
|
| 1011 |
+
|
| 1012 |
+
### [4.2.4](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.2.3...v4.2.4) (2019-06-25)
|
| 1013 |
+
|
| 1014 |
+
|
| 1015 |
+
### Bug Fixes
|
| 1016 |
+
|
| 1017 |
+
* only require fast-text-encoding when needed ([#740](https://www.github.com/googleapis/google-auth-library-nodejs/issues/740)) ([04fcd77](https://www.github.com/googleapis/google-auth-library-nodejs/commit/04fcd77))
|
| 1018 |
+
|
| 1019 |
+
### [4.2.3](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.2.2...v4.2.3) (2019-06-24)
|
| 1020 |
+
|
| 1021 |
+
|
| 1022 |
+
### Bug Fixes
|
| 1023 |
+
|
| 1024 |
+
* feature detection to check for browser ([#738](https://www.github.com/googleapis/google-auth-library-nodejs/issues/738)) ([83a5ba5](https://www.github.com/googleapis/google-auth-library-nodejs/commit/83a5ba5))
|
| 1025 |
+
|
| 1026 |
+
### [4.2.2](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.2.1...v4.2.2) (2019-06-18)
|
| 1027 |
+
|
| 1028 |
+
|
| 1029 |
+
### Bug Fixes
|
| 1030 |
+
|
| 1031 |
+
* **compute:** correctly specify scopes when fetching token ([#735](https://www.github.com/googleapis/google-auth-library-nodejs/issues/735)) ([4803e3c](https://www.github.com/googleapis/google-auth-library-nodejs/commit/4803e3c))
|
| 1032 |
+
|
| 1033 |
+
### [4.2.1](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.2.0...v4.2.1) (2019-06-14)
|
| 1034 |
+
|
| 1035 |
+
|
| 1036 |
+
### Bug Fixes
|
| 1037 |
+
|
| 1038 |
+
* **docs:** move to new client docs URL ([#733](https://www.github.com/googleapis/google-auth-library-nodejs/issues/733)) ([cfbbe2a](https://www.github.com/googleapis/google-auth-library-nodejs/commit/cfbbe2a))
|
| 1039 |
+
|
| 1040 |
+
## [4.2.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.1.0...v4.2.0) (2019-06-05)
|
| 1041 |
+
|
| 1042 |
+
|
| 1043 |
+
### Bug Fixes
|
| 1044 |
+
|
| 1045 |
+
* pad base64 strings for base64js ([#722](https://www.github.com/googleapis/google-auth-library-nodejs/issues/722)) ([81e0a23](https://www.github.com/googleapis/google-auth-library-nodejs/commit/81e0a23))
|
| 1046 |
+
|
| 1047 |
+
|
| 1048 |
+
### Features
|
| 1049 |
+
|
| 1050 |
+
* make both crypto implementations support sign ([#727](https://www.github.com/googleapis/google-auth-library-nodejs/issues/727)) ([e445fb3](https://www.github.com/googleapis/google-auth-library-nodejs/commit/e445fb3))
|
| 1051 |
+
|
| 1052 |
+
## [4.1.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v4.0.0...v4.1.0) (2019-05-29)
|
| 1053 |
+
|
| 1054 |
+
|
| 1055 |
+
### Bug Fixes
|
| 1056 |
+
|
| 1057 |
+
* **deps:** update dependency google-auth-library to v4 ([#705](https://www.github.com/googleapis/google-auth-library-nodejs/issues/705)) ([2b13344](https://www.github.com/googleapis/google-auth-library-nodejs/commit/2b13344))
|
| 1058 |
+
|
| 1059 |
+
|
| 1060 |
+
### Features
|
| 1061 |
+
|
| 1062 |
+
* use X-Goog-Api-Key header ([#719](https://www.github.com/googleapis/google-auth-library-nodejs/issues/719)) ([35471d0](https://www.github.com/googleapis/google-auth-library-nodejs/commit/35471d0))
|
| 1063 |
+
|
| 1064 |
+
## [4.0.0](https://www.github.com/googleapis/google-auth-library-nodejs/compare/v3.1.2...v4.0.0) (2019-05-08)
|
| 1065 |
+
|
| 1066 |
+
|
| 1067 |
+
### Bug Fixes
|
| 1068 |
+
|
| 1069 |
+
* **deps:** update dependency arrify to v2 ([#684](https://www.github.com/googleapis/google-auth-library-nodejs/issues/684)) ([1757ee2](https://www.github.com/googleapis/google-auth-library-nodejs/commit/1757ee2))
|
| 1070 |
+
* **deps:** update dependency gaxios to v2 ([#681](https://www.github.com/googleapis/google-auth-library-nodejs/issues/681)) ([770ad2f](https://www.github.com/googleapis/google-auth-library-nodejs/commit/770ad2f))
|
| 1071 |
+
* **deps:** update dependency gcp-metadata to v2 ([#701](https://www.github.com/googleapis/google-auth-library-nodejs/issues/701)) ([be20528](https://www.github.com/googleapis/google-auth-library-nodejs/commit/be20528))
|
| 1072 |
+
* **deps:** update dependency gtoken to v3 ([#702](https://www.github.com/googleapis/google-auth-library-nodejs/issues/702)) ([2c538e5](https://www.github.com/googleapis/google-auth-library-nodejs/commit/2c538e5))
|
| 1073 |
+
* re-throw original exception and preserve message in compute client ([#668](https://www.github.com/googleapis/google-auth-library-nodejs/issues/668)) ([dffd1cc](https://www.github.com/googleapis/google-auth-library-nodejs/commit/dffd1cc))
|
| 1074 |
+
* surface original stack trace and message with errors ([#651](https://www.github.com/googleapis/google-auth-library-nodejs/issues/651)) ([8fb65eb](https://www.github.com/googleapis/google-auth-library-nodejs/commit/8fb65eb))
|
| 1075 |
+
* throw on missing refresh token in all cases ([#670](https://www.github.com/googleapis/google-auth-library-nodejs/issues/670)) ([0a02946](https://www.github.com/googleapis/google-auth-library-nodejs/commit/0a02946))
|
| 1076 |
+
* throw when adc cannot acquire a projectId ([#658](https://www.github.com/googleapis/google-auth-library-nodejs/issues/658)) ([ba48164](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ba48164))
|
| 1077 |
+
* **deps:** update dependency semver to v6 ([#655](https://www.github.com/googleapis/google-auth-library-nodejs/issues/655)) ([ec56c88](https://www.github.com/googleapis/google-auth-library-nodejs/commit/ec56c88))
|
| 1078 |
+
|
| 1079 |
+
|
| 1080 |
+
### Build System
|
| 1081 |
+
|
| 1082 |
+
* upgrade engines field to >=8.10.0 ([#686](https://www.github.com/googleapis/google-auth-library-nodejs/issues/686)) ([377d5c6](https://www.github.com/googleapis/google-auth-library-nodejs/commit/377d5c6))
|
| 1083 |
+
|
| 1084 |
+
|
| 1085 |
+
### Features
|
| 1086 |
+
|
| 1087 |
+
* support scopes on compute credentials ([#642](https://www.github.com/googleapis/google-auth-library-nodejs/issues/642)) ([1811b7f](https://www.github.com/googleapis/google-auth-library-nodejs/commit/1811b7f))
|
| 1088 |
+
|
| 1089 |
+
|
| 1090 |
+
### BREAKING CHANGES
|
| 1091 |
+
|
| 1092 |
+
* upgrade engines field to >=8.10.0 (#686)
|
| 1093 |
+
|
| 1094 |
+
## v3.1.2
|
| 1095 |
+
|
| 1096 |
+
03-22-2019 15:38 PDT
|
| 1097 |
+
|
| 1098 |
+
### Implementation Changes
|
| 1099 |
+
- fix: getCredential(): load credentials with getClient() ([#648](https://github.com/google/google-auth-library-nodejs/pull/648))
|
| 1100 |
+
|
| 1101 |
+
### Internal / Testing Changes
|
| 1102 |
+
- chore: publish to npm using wombat ([#645](https://github.com/google/google-auth-library-nodejs/pull/645))
|
| 1103 |
+
|
| 1104 |
+
## v3.1.1
|
| 1105 |
+
|
| 1106 |
+
03-18-2019 08:32 PDT
|
| 1107 |
+
|
| 1108 |
+
### Bug Fixes
|
| 1109 |
+
- fix: Avoid loading fast-text-encoding if not in browser environment ([#627](https://github.com/google/google-auth-library-nodejs/pull/627))
|
| 1110 |
+
|
| 1111 |
+
### Dependencies
|
| 1112 |
+
- fix(deps): update dependency gcp-metadata to v1 ([#632](https://github.com/google/google-auth-library-nodejs/pull/632))
|
| 1113 |
+
|
| 1114 |
+
### Documentation
|
| 1115 |
+
- docs: update links in contrib guide ([#630](https://github.com/google/google-auth-library-nodejs/pull/630))
|
| 1116 |
+
|
| 1117 |
+
### Internal / Testing Changes
|
| 1118 |
+
- build: use per-repo publish token ([#641](https://github.com/google/google-auth-library-nodejs/pull/641))
|
| 1119 |
+
- build: Add docuploader credentials to node publish jobs ([#639](https://github.com/google/google-auth-library-nodejs/pull/639))
|
| 1120 |
+
- build: use node10 to run samples-test, system-test etc ([#638](https://github.com/google/google-auth-library-nodejs/pull/638))
|
| 1121 |
+
- build: update release configuration
|
| 1122 |
+
- chore(deps): update dependency @types/lru-cache to v5 ([#635](https://github.com/google/google-auth-library-nodejs/pull/635))
|
| 1123 |
+
- chore(deps): update dependency mocha to v6
|
| 1124 |
+
- chore: fix lint ([#631](https://github.com/google/google-auth-library-nodejs/pull/631))
|
| 1125 |
+
- build: use linkinator for docs test ([#628](https://github.com/google/google-auth-library-nodejs/pull/628))
|
| 1126 |
+
- chore(deps): update dependency @types/tmp to ^0.0.34 ([#629](https://github.com/google/google-auth-library-nodejs/pull/629))
|
| 1127 |
+
- build: create docs test npm scripts ([#625](https://github.com/google/google-auth-library-nodejs/pull/625))
|
| 1128 |
+
- build: test using @grpc/grpc-js in CI ([#624](https://github.com/google/google-auth-library-nodejs/pull/624))
|
| 1129 |
+
|
| 1130 |
+
## v3.1.0
|
| 1131 |
+
|
| 1132 |
+
02-08-2019 08:29 PST
|
| 1133 |
+
|
| 1134 |
+
### Bug fixes
|
| 1135 |
+
- fix: use key file when fetching project id ([#618](https://github.com/googleapis/google-auth-library-nodejs/pull/618))
|
| 1136 |
+
- fix: Throw error if there is no refresh token despite the necessity of refreshing ([#605](https://github.com/googleapis/google-auth-library-nodejs/pull/605))
|
| 1137 |
+
|
| 1138 |
+
### New Features
|
| 1139 |
+
- feat: allow passing constructor options to getClient ([#611](https://github.com/googleapis/google-auth-library-nodejs/pull/611))
|
| 1140 |
+
|
| 1141 |
+
### Documentation
|
| 1142 |
+
- docs: update contributing path in README ([#621](https://github.com/googleapis/google-auth-library-nodejs/pull/621))
|
| 1143 |
+
- chore: move CONTRIBUTING.md to root ([#619](https://github.com/googleapis/google-auth-library-nodejs/pull/619))
|
| 1144 |
+
- docs: add lint/fix example to contributing guide ([#615](https://github.com/googleapis/google-auth-library-nodejs/pull/615))
|
| 1145 |
+
- docs: use the People API for samples ([#609](https://github.com/googleapis/google-auth-library-nodejs/pull/609))
|
| 1146 |
+
|
| 1147 |
+
### Internal / Testing Changes
|
| 1148 |
+
- chore(deps): update dependency typescript to ~3.3.0 ([#612](https://github.com/googleapis/google-auth-library-nodejs/pull/612))
|
| 1149 |
+
- chore(deps): update dependency eslint-config-prettier to v4 ([#604](https://github.com/googleapis/google-auth-library-nodejs/pull/604))
|
| 1150 |
+
- build: ignore googleapis.com in doc link check ([#602](https://github.com/googleapis/google-auth-library-nodejs/pull/602))
|
| 1151 |
+
- chore(deps): update dependency karma to v4 ([#603](https://github.com/googleapis/google-auth-library-nodejs/pull/603))
|
| 1152 |
+
|
| 1153 |
+
## v3.0.1
|
| 1154 |
+
|
| 1155 |
+
01-16-2019 21:04 PST
|
| 1156 |
+
|
| 1157 |
+
### Bug Fixes
|
| 1158 |
+
- fix(deps): upgrade to the latest gaxios ([#596](https://github.com/googleapis/google-auth-library-nodejs/pull/596))
|
| 1159 |
+
|
| 1160 |
+
## v3.0.0
|
| 1161 |
+
|
| 1162 |
+
01-16-2019 10:00 PST
|
| 1163 |
+
|
| 1164 |
+
Welcome to 3.0 🎉 This release has it all. New features, bug fixes, breaking changes, performance improvements - something for everyone! The biggest addition to this release is support for the browser via Webpack.
|
| 1165 |
+
|
| 1166 |
+
**This release has breaking changes.** This release has a few breaking changes. These changes are unlikely to affect most clients.
|
| 1167 |
+
|
| 1168 |
+
#### BREAKING: Migration from `axios` to `gaxios`
|
| 1169 |
+
The 2.0 version of this library used the [axios](https://github.com/axios/axios) library for making HTTP requests. In the 3.0 release, this has been replaced by a *mostly* API compatible library [gaxios](https://github.com/JustinBeckwith/gaxios). The new request library natively supports proxies, and comes with a smaller dependency chain. While this is mostly an implementation detail, the `request` method was directly exposed via the `GoogleAuth.request` and `OAuth2Client.request` methods. The gaxios library aims to provide an API compatible implementation of axios, but that can never be 100% promised. If you run into bugs or differences that cause issues - please do let us know.
|
| 1170 |
+
|
| 1171 |
+
#### BREAKING: `generateCodeVerifier` is now `generateCodeVerifierAsync`
|
| 1172 |
+
The `OAuth2Client.generateCodeVerifier` method has been replaced by the `OAuth2Client.generateCodeVerifierAsync` method. It has changed from a synchronous method to an asynchronous method to support async browser crypto APIs required for Webpack support.
|
| 1173 |
+
|
| 1174 |
+
#### BREAKING: `verifySignedJwtWithCerts` is now `verifySignedJwtWithCertsAsync`
|
| 1175 |
+
The `OAuth2Client.verifySignedJwtWithCerts` method has been replaced by the `OAuth2Client.verifySignedJwtWithCertsAsync` method. It has changed from a synchronous method to an asynchronous method to support async browser crypto APIs required for Webpack support.
|
| 1176 |
+
|
| 1177 |
+
|
| 1178 |
+
### New Features
|
| 1179 |
+
- feat: make it webpackable ([#371](https://github.com/google/google-auth-library-nodejs/pull/371))
|
| 1180 |
+
|
| 1181 |
+
### Bug Fixes
|
| 1182 |
+
- fix: accept lowercase env vars ([#578](https://github.com/google/google-auth-library-nodejs/pull/578))
|
| 1183 |
+
|
| 1184 |
+
### Dependencies
|
| 1185 |
+
- chore(deps): update gtoken ([#592](https://github.com/google/google-auth-library-nodejs/pull/592))
|
| 1186 |
+
- fix(deps): upgrade to gcp-metadata v0.9.3 ([#586](https://github.com/google/google-auth-library-nodejs/pull/586))
|
| 1187 |
+
|
| 1188 |
+
### Documentation
|
| 1189 |
+
- docs: update bug report link ([#585](https://github.com/google/google-auth-library-nodejs/pull/585))
|
| 1190 |
+
- docs: clarify access and refresh token docs ([#577](https://github.com/google/google-auth-library-nodejs/pull/577))
|
| 1191 |
+
|
| 1192 |
+
### Internal / Testing Changes
|
| 1193 |
+
- refactor(deps): use `gaxios` for HTTP requests instead of `axios` ([#593](https://github.com/google/google-auth-library-nodejs/pull/593))
|
| 1194 |
+
- fix: some browser fixes ([#590](https://github.com/google/google-auth-library-nodejs/pull/590))
|
| 1195 |
+
- chore(deps): update dependency ts-loader to v5 ([#588](https://github.com/google/google-auth-library-nodejs/pull/588))
|
| 1196 |
+
- chore(deps): update dependency karma to v3 ([#587](https://github.com/google/google-auth-library-nodejs/pull/587))
|
| 1197 |
+
- build: check broken links in generated docs ([#579](https://github.com/google/google-auth-library-nodejs/pull/579))
|
| 1198 |
+
- chore(deps): drop unused dep on typedoc ([#583](https://github.com/google/google-auth-library-nodejs/pull/583))
|
| 1199 |
+
- build: add browser test running on Kokoro ([#584](https://github.com/google/google-auth-library-nodejs/pull/584))
|
| 1200 |
+
- test: improve samples and add tests ([#576](https://github.com/google/google-auth-library-nodejs/pull/576))
|
| 1201 |
+
|
| 1202 |
+
## v2.0.2
|
| 1203 |
+
|
| 1204 |
+
12-16-2018 10:48 PST
|
| 1205 |
+
|
| 1206 |
+
### Fixes
|
| 1207 |
+
- fix(types): export GCPEnv type ([#569](https://github.com/google/google-auth-library-nodejs/pull/569))
|
| 1208 |
+
- fix: use post for token revocation ([#524](https://github.com/google/google-auth-library-nodejs/pull/524))
|
| 1209 |
+
|
| 1210 |
+
### Dependencies
|
| 1211 |
+
- fix(deps): update dependency lru-cache to v5 ([#541](https://github.com/google/google-auth-library-nodejs/pull/541))
|
| 1212 |
+
|
| 1213 |
+
### Documentation
|
| 1214 |
+
- docs: add ref docs again ([#553](https://github.com/google/google-auth-library-nodejs/pull/553))
|
| 1215 |
+
- docs: clean up the readme ([#554](https://github.com/google/google-auth-library-nodejs/pull/554))
|
| 1216 |
+
|
| 1217 |
+
### Internal / Testing Changes
|
| 1218 |
+
- chore(deps): update dependency @types/sinon to v7 ([#568](https://github.com/google/google-auth-library-nodejs/pull/568))
|
| 1219 |
+
- refactor: use execa for install tests, run eslint on samples ([#559](https://github.com/google/google-auth-library-nodejs/pull/559))
|
| 1220 |
+
- chore(build): inject yoshi automation key ([#566](https://github.com/google/google-auth-library-nodejs/pull/566))
|
| 1221 |
+
- chore: update nyc and eslint configs ([#565](https://github.com/google/google-auth-library-nodejs/pull/565))
|
| 1222 |
+
- chore: fix publish.sh permission +x ([#563](https://github.com/google/google-auth-library-nodejs/pull/563))
|
| 1223 |
+
- fix(build): fix Kokoro release script ([#562](https://github.com/google/google-auth-library-nodejs/pull/562))
|
| 1224 |
+
- build: add Kokoro configs for autorelease ([#561](https://github.com/google/google-auth-library-nodejs/pull/561))
|
| 1225 |
+
- chore: always nyc report before calling codecov ([#557](https://github.com/google/google-auth-library-nodejs/pull/557))
|
| 1226 |
+
- chore: nyc ignore build/test by default ([#556](https://github.com/google/google-auth-library-nodejs/pull/556))
|
| 1227 |
+
- chore(build): update the prettier and renovate config ([#552](https://github.com/google/google-auth-library-nodejs/pull/552))
|
| 1228 |
+
- chore: update license file ([#551](https://github.com/google/google-auth-library-nodejs/pull/551))
|
| 1229 |
+
- fix(build): fix system key decryption ([#547](https://github.com/google/google-auth-library-nodejs/pull/547))
|
| 1230 |
+
- chore(deps): update dependency typescript to ~3.2.0 ([#546](https://github.com/google/google-auth-library-nodejs/pull/546))
|
| 1231 |
+
- chore(deps): unpin sinon ([#544](https://github.com/google/google-auth-library-nodejs/pull/544))
|
| 1232 |
+
- refactor: drop non-required modules ([#542](https://github.com/google/google-auth-library-nodejs/pull/542))
|
| 1233 |
+
- chore: add synth.metadata ([#537](https://github.com/google/google-auth-library-nodejs/pull/537))
|
| 1234 |
+
- fix: Pin @types/sinon to last compatible version ([#538](https://github.com/google/google-auth-library-nodejs/pull/538))
|
| 1235 |
+
- chore(deps): update dependency gts to ^0.9.0 ([#531](https://github.com/google/google-auth-library-nodejs/pull/531))
|
| 1236 |
+
- chore: update eslintignore config ([#530](https://github.com/google/google-auth-library-nodejs/pull/530))
|
| 1237 |
+
- chore: drop contributors from multiple places ([#528](https://github.com/google/google-auth-library-nodejs/pull/528))
|
| 1238 |
+
- chore: use latest npm on Windows ([#527](https://github.com/google/google-auth-library-nodejs/pull/527))
|
| 1239 |
+
- chore: update CircleCI config ([#523](https://github.com/google/google-auth-library-nodejs/pull/523))
|
| 1240 |
+
- chore: include build in eslintignore ([#516](https://github.com/google/google-auth-library-nodejs/pull/516))
|
| 1241 |
+
|
| 1242 |
+
## v2.0.1
|
| 1243 |
+
|
| 1244 |
+
### Implementation Changes
|
| 1245 |
+
- fix: verifyIdToken will never return null ([#488](https://github.com/google/google-auth-library-nodejs/pull/488))
|
| 1246 |
+
- Update the url to application default credentials ([#470](https://github.com/google/google-auth-library-nodejs/pull/470))
|
| 1247 |
+
- Update omitted parameter 'hd' ([#467](https://github.com/google/google-auth-library-nodejs/pull/467))
|
| 1248 |
+
|
| 1249 |
+
### Dependencies
|
| 1250 |
+
- chore(deps): update dependency nock to v10 ([#501](https://github.com/google/google-auth-library-nodejs/pull/501))
|
| 1251 |
+
- chore(deps): update dependency sinon to v7 ([#502](https://github.com/google/google-auth-library-nodejs/pull/502))
|
| 1252 |
+
- chore(deps): update dependency typescript to v3.1.3 ([#503](https://github.com/google/google-auth-library-nodejs/pull/503))
|
| 1253 |
+
- chore(deps): update dependency gh-pages to v2 ([#499](https://github.com/google/google-auth-library-nodejs/pull/499))
|
| 1254 |
+
- chore(deps): update dependency typedoc to ^0.13.0 ([#497](https://github.com/google/google-auth-library-nodejs/pull/497))
|
| 1255 |
+
|
| 1256 |
+
### Documentation
|
| 1257 |
+
- docs: Remove code format from Application Default Credentials ([#483](https://github.com/google/google-auth-library-nodejs/pull/483))
|
| 1258 |
+
- docs: replace google/ with googleapis/ in URIs ([#472](https://github.com/google/google-auth-library-nodejs/pull/472))
|
| 1259 |
+
- Fix typo in readme ([#469](https://github.com/google/google-auth-library-nodejs/pull/469))
|
| 1260 |
+
- Update samples and docs for 2.0 ([#459](https://github.com/google/google-auth-library-nodejs/pull/459))
|
| 1261 |
+
|
| 1262 |
+
### Internal / Testing Changes
|
| 1263 |
+
- chore: update issue templates ([#509](https://github.com/google/google-auth-library-nodejs/pull/509))
|
| 1264 |
+
- chore: remove old issue template ([#507](https://github.com/google/google-auth-library-nodejs/pull/507))
|
| 1265 |
+
- build: run tests on node11 ([#506](https://github.com/google/google-auth-library-nodejs/pull/506))
|
| 1266 |
+
- chore(build): drop hard rejection and update gts in the kitchen test ([#504](https://github.com/google/google-auth-library-nodejs/pull/504))
|
| 1267 |
+
- chores(build): do not collect sponge.xml from windows builds ([#500](https://github.com/google/google-auth-library-nodejs/pull/500))
|
| 1268 |
+
- chores(build): run codecov on continuous builds ([#495](https://github.com/google/google-auth-library-nodejs/pull/495))
|
| 1269 |
+
- chore: update new issue template ([#494](https://github.com/google/google-auth-library-nodejs/pull/494))
|
| 1270 |
+
- build: fix codecov uploading on Kokoro ([#490](https://github.com/google/google-auth-library-nodejs/pull/490))
|
| 1271 |
+
- test: move kitchen sink tests to system-test ([#489](https://github.com/google/google-auth-library-nodejs/pull/489))
|
| 1272 |
+
- Update kokoro config ([#482](https://github.com/google/google-auth-library-nodejs/pull/482))
|
| 1273 |
+
- fix: export additional typescript types ([#479](https://github.com/google/google-auth-library-nodejs/pull/479))
|
| 1274 |
+
- Don't publish sourcemaps ([#478](https://github.com/google/google-auth-library-nodejs/pull/478))
|
| 1275 |
+
- test: remove appveyor config ([#477](https://github.com/google/google-auth-library-nodejs/pull/477))
|
| 1276 |
+
- Enable prefer-const in the eslint config ([#473](https://github.com/google/google-auth-library-nodejs/pull/473))
|
| 1277 |
+
- Enable no-var in eslint ([#471](https://github.com/google/google-auth-library-nodejs/pull/471))
|
| 1278 |
+
- Update CI config ([#468](https://github.com/google/google-auth-library-nodejs/pull/468))
|
| 1279 |
+
- Retry npm install in CI ([#465](https://github.com/google/google-auth-library-nodejs/pull/465))
|
| 1280 |
+
- Update Kokoro config ([#462](https://github.com/google/google-auth-library-nodejs/pull/462))
|
| 1281 |
+
|
| 1282 |
+
## v2.0.0
|
| 1283 |
+
|
| 1284 |
+
Well hello 2.0 🎉 **This release has multiple breaking changes**. It also has a lot of bug fixes.
|
| 1285 |
+
|
| 1286 |
+
### Breaking Changes
|
| 1287 |
+
|
| 1288 |
+
#### Support for node.js 4.x and 9.x has been dropped
|
| 1289 |
+
These versions of node.js are no longer supported.
|
| 1290 |
+
|
| 1291 |
+
#### The `getRequestMetadata` method has been deprecated
|
| 1292 |
+
The `getRequestMetadata` method has been deprecated on the `IAM`, `OAuth2`, `JWT`, and `JWTAccess` classes. The `getRequestHeaders` method should be used instead. The methods have a subtle difference: the `getRequestMetadata` method returns an object with a headers property, which contains the authorization header. The `getRequestHeaders` method simply returns the headers.
|
| 1293 |
+
|
| 1294 |
+
##### Old code
|
| 1295 |
+
```js
|
| 1296 |
+
const client = await auth.getClient();
|
| 1297 |
+
const res = await client.getRequestMetadata();
|
| 1298 |
+
const headers = res.headers;
|
| 1299 |
+
```
|
| 1300 |
+
|
| 1301 |
+
##### New code
|
| 1302 |
+
```js
|
| 1303 |
+
const client = await auth.getClient();
|
| 1304 |
+
const headers = await client.getRequestHeaders();
|
| 1305 |
+
```
|
| 1306 |
+
|
| 1307 |
+
#### The `createScopedRequired` method has been deprecated
|
| 1308 |
+
The `createScopedRequired` method has been deprecated on multiple classes. The `createScopedRequired` and `createScoped` methods on the `JWT` class were largely in place to help inform clients when scopes were required in an application default credential scenario. Instead of checking if scopes are required after creating the client, instead scopes should just be passed either into the `GoogleAuth.getClient` method, or directly into the `JWT` constructor.
|
| 1309 |
+
|
| 1310 |
+
##### Old code
|
| 1311 |
+
```js
|
| 1312 |
+
auth.getApplicationDefault(function(err, authClient) {
|
| 1313 |
+
if (err) {
|
| 1314 |
+
return callback(err);
|
| 1315 |
+
}
|
| 1316 |
+
if (authClient.createScopedRequired && authClient.createScopedRequired()) {
|
| 1317 |
+
authClient = authClient.createScoped([
|
| 1318 |
+
'https://www.googleapis.com/auth/cloud-platform'
|
| 1319 |
+
]);
|
| 1320 |
+
}
|
| 1321 |
+
callback(null, authClient);
|
| 1322 |
+
});
|
| 1323 |
+
```
|
| 1324 |
+
|
| 1325 |
+
##### New code
|
| 1326 |
+
```js
|
| 1327 |
+
const client = await auth.getClient({
|
| 1328 |
+
scopes: ['https://www.googleapis.com/auth/cloud-platform']
|
| 1329 |
+
});
|
| 1330 |
+
```
|
| 1331 |
+
|
| 1332 |
+
#### Deprecate `refreshAccessToken`
|
| 1333 |
+
|
| 1334 |
+
_Note: `refreshAccessToken` is no longer deprecated._
|
| 1335 |
+
|
| 1336 |
+
`getAccessToken`, `getRequestMetadata`, and `request` methods will all refresh the token if needed automatically.
|
| 1337 |
+
|
| 1338 |
+
You should not need to invoke `refreshAccessToken` directly except in [certain edge-cases](https://github.com/googleapis/google-auth-library-nodejs/issues/575).
|
| 1339 |
+
|
| 1340 |
+
### Features
|
| 1341 |
+
- Set private_key_id in JWT access token header like other google auth libraries. (#450)
|
| 1342 |
+
|
| 1343 |
+
### Bug Fixes
|
| 1344 |
+
- fix: support HTTPS proxies (#405)
|
| 1345 |
+
- fix: export missing interfaces (#437)
|
| 1346 |
+
- fix: Use new auth URIs (#434)
|
| 1347 |
+
- docs: Fix broken link (#423)
|
| 1348 |
+
- fix: surface file read streams (#413)
|
| 1349 |
+
- fix: prevent unhandled rejections by avoid .catch (#404)
|
| 1350 |
+
- fix: use gcp-metadata for compute credentials (#409)
|
| 1351 |
+
- Add Code of Conduct
|
| 1352 |
+
- fix: Warn when using user credentials from the Cloud SDK (#399)
|
| 1353 |
+
- fix: use `Buffer.from` instead of `new Buffer` (#400)
|
| 1354 |
+
- fix: Fix link format in README.md (#385)
|
| 1355 |
+
|
| 1356 |
+
### Breaking changes
|
| 1357 |
+
- chore: deprecate getRequestMetadata (#414)
|
| 1358 |
+
- fix: deprecate the `createScopedRequired` methods (#410)
|
| 1359 |
+
- fix: drop support for node.js 4.x and 9.x (#417)
|
| 1360 |
+
- fix: deprecate the `refreshAccessToken` methods (#411)
|
| 1361 |
+
- fix: deprecate the `getDefaultProjectId` method (#402)
|
| 1362 |
+
- fix: drop support for node.js 4 (#401)
|
| 1363 |
+
|
| 1364 |
+
### Build / Test changes
|
| 1365 |
+
- Run synth to make build tools consistent (#455)
|
| 1366 |
+
- Add a package.json for samples and cleanup README (#454)
|
| 1367 |
+
- chore(deps): update dependency typedoc to ^0.12.0 (#453)
|
| 1368 |
+
- chore: move examples => samples + synth (#448)
|
| 1369 |
+
- chore(deps): update dependency nyc to v13 (#452)
|
| 1370 |
+
- chore(deps): update dependency pify to v4 (#447)
|
| 1371 |
+
- chore(deps): update dependency assert-rejects to v1 (#446)
|
| 1372 |
+
- chore: ignore package-lock.json (#445)
|
| 1373 |
+
- chore: update renovate config (#442)
|
| 1374 |
+
- chore(deps): lock file maintenance (#443)
|
| 1375 |
+
- chore: remove greenkeeper badge (#440)
|
| 1376 |
+
- test: throw on deprecation
|
| 1377 |
+
- chore: add intelli-espower-loader for running tests (#430)
|
| 1378 |
+
- chore(deps): update dependency typescript to v3 (#432)
|
| 1379 |
+
- chore(deps): lock file maintenance (#431)
|
| 1380 |
+
- test: use strictEqual in tests (#425)
|
| 1381 |
+
- chore(deps): lock file maintenance (#428)
|
| 1382 |
+
- chore: Configure Renovate (#424)
|
| 1383 |
+
- chore: Update gts to the latest version 🚀 (#422)
|
| 1384 |
+
- chore: update gcp-metadata for isAvailable fix (#420)
|
| 1385 |
+
- refactor: use assert.reject in the tests (#415)
|
| 1386 |
+
- refactor: cleanup types for certificates (#412)
|
| 1387 |
+
- test: run tests with hard-rejection (#397)
|
| 1388 |
+
- cleanup: straighten nested try-catch (#394)
|
| 1389 |
+
- test: getDefaultProjectId should prefer config (#388)
|
| 1390 |
+
- chore(package): Update gts to the latest version 🚀 (#387)
|
| 1391 |
+
- chore(package): update sinon to version 6.0.0 (#386)
|
| 1392 |
+
|
| 1393 |
+
## Upgrading to 1.x
|
| 1394 |
+
The `1.x` release includes a variety of bug fixes, new features, and breaking changes. Please take care, and see [the release notes](https://github.com/googleapis/google-auth-library-nodejs/releases/tag/v1.0.0) for a list of breaking changes, and the upgrade guide.
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/google-auth-library/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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.
|
novas/novacore-zephyr/claude-code-router/node_modules/@google/genai/node_modules/google-auth-library/README.md
ADDED
|
@@ -0,0 +1,1470 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
| 2 |
+
[//]: # "To regenerate it, use `python -m synthtool`."
|
| 3 |
+
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
| 4 |
+
|
| 5 |
+
# [Google Auth Library: Node.js Client](https://github.com/googleapis/google-auth-library-nodejs)
|
| 6 |
+
|
| 7 |
+
[](https://cloud.google.com/terms/launch-stages)
|
| 8 |
+
[](https://www.npmjs.org/package/google-auth-library)
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
This is Google's officially supported [node.js](http://nodejs.org/) client library for using OAuth 2.0 authorization and authentication with Google APIs.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
A comprehensive list of changes in each version may be found in
|
| 17 |
+
[the CHANGELOG](https://github.com/googleapis/google-auth-library-nodejs/blob/main/CHANGELOG.md).
|
| 18 |
+
|
| 19 |
+
* [Google Auth Library Node.js Client API Reference][client-docs]
|
| 20 |
+
* [Google Auth Library Documentation][product-docs]
|
| 21 |
+
* [github.com/googleapis/google-auth-library-nodejs](https://github.com/googleapis/google-auth-library-nodejs)
|
| 22 |
+
|
| 23 |
+
Read more about the client libraries for Cloud APIs, including the older
|
| 24 |
+
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
| 25 |
+
|
| 26 |
+
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
|
| 27 |
+
|
| 28 |
+
**Table of contents:**
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
* [Quickstart](#quickstart)
|
| 32 |
+
|
| 33 |
+
* [Installing the client library](#installing-the-client-library)
|
| 34 |
+
|
| 35 |
+
* [Samples](#samples)
|
| 36 |
+
* [Versioning](#versioning)
|
| 37 |
+
* [Contributing](#contributing)
|
| 38 |
+
* [License](#license)
|
| 39 |
+
|
| 40 |
+
## Quickstart
|
| 41 |
+
|
| 42 |
+
### Installing the client library
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
npm install google-auth-library
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Ways to authenticate
|
| 49 |
+
This library provides a variety of ways to authenticate to your Google services.
|
| 50 |
+
- [Application Default Credentials](#choosing-the-correct-credential-type-automatically) - Use Application Default Credentials when you use a single identity for all users in your application. Especially useful for applications running on Google Cloud. Application Default Credentials also support workload identity federation to access Google Cloud resources from non-Google Cloud platforms.
|
| 51 |
+
- [OAuth 2](#oauth2) - Use OAuth2 when you need to perform actions on behalf of the end user.
|
| 52 |
+
- [JSON Web Tokens](#json-web-tokens) - Use JWT when you are using a single identity for all users. Especially useful for server->server or server->API communication.
|
| 53 |
+
- [Google Compute](#compute) - Directly use a service account on Google Cloud Platform. Useful for server->server or server->API communication.
|
| 54 |
+
- [Workload Identity Federation](#workload-identity-federation) - Use workload identity federation to access Google Cloud resources from Amazon Web Services (AWS), Microsoft Azure or any identity provider that supports OpenID Connect (OIDC).
|
| 55 |
+
- [Workforce Identity Federation](#workforce-identity-federation) - Use workforce identity federation to access Google Cloud resources using an external identity provider (IdP) to authenticate and authorize a workforce—a group of users, such as employees, partners, and contractors—using IAM, so that the users can access Google Cloud services.
|
| 56 |
+
- [Impersonated Credentials Client](#impersonated-credentials-client) - access protected resources on behalf of another service account.
|
| 57 |
+
- [Downscoped Client](#downscoped-client) - Use Downscoped Client with Credential Access Boundary to generate a short-lived credential with downscoped, restricted IAM permissions that can use for Cloud Storage.
|
| 58 |
+
|
| 59 |
+
## Application Default Credentials
|
| 60 |
+
This library provides an implementation of [Application Default Credentials](https://cloud.google.com/docs/authentication/getting-started) for Node.js. The [Application Default Credentials](https://cloud.google.com/docs/authentication/getting-started) provide a simple way to get authorization credentials for use in calling Google APIs.
|
| 61 |
+
|
| 62 |
+
They are best suited for cases when the call needs to have the same identity and authorization level for the application independent of the user. This is the recommended approach to authorize calls to Cloud APIs, particularly when you're building an application that uses Google Cloud Platform.
|
| 63 |
+
|
| 64 |
+
Application Default Credentials also support workload identity federation to access Google Cloud resources from non-Google Cloud platforms including Amazon Web Services (AWS), Microsoft Azure or any identity provider that supports OpenID Connect (OIDC). Workload identity federation is recommended for non-Google Cloud environments as it avoids the need to download, manage and store service account private keys locally, see: [Workload Identity Federation](#workload-identity-federation).
|
| 65 |
+
|
| 66 |
+
#### Download your Service Account Credentials JSON file
|
| 67 |
+
|
| 68 |
+
To use Application Default Credentials, You first need to download a set of JSON credentials for your project. Go to **APIs & Auth** > **Credentials** in the [Google Developers Console](https://console.cloud.google.com/) and select **Service account** from the **Add credentials** dropdown.
|
| 69 |
+
|
| 70 |
+
> This file is your *only copy* of these credentials. It should never be
|
| 71 |
+
> committed with your source code, and should be stored securely.
|
| 72 |
+
|
| 73 |
+
Once downloaded, store the path to this file in the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
|
| 74 |
+
|
| 75 |
+
#### Enable the API you want to use
|
| 76 |
+
|
| 77 |
+
Before making your API call, you must be sure the API you're calling has been enabled. Go to **APIs & Auth** > **APIs** in the [Google Developers Console](https://console.cloud.google.com/) and enable the APIs you'd like to call. For the example below, you must enable the `DNS API`.
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
#### Choosing the correct credential type automatically
|
| 81 |
+
|
| 82 |
+
Rather than manually creating an OAuth2 client, JWT client, or Compute client, the auth library can create the correct credential type for you, depending upon the environment your code is running under.
|
| 83 |
+
|
| 84 |
+
For example, a JWT auth client will be created when your code is running on your local developer machine, and a Compute client will be created when the same code is running on Google Cloud Platform. If you need a specific set of scopes, you can pass those in the form of a string or an array to the `GoogleAuth` constructor.
|
| 85 |
+
|
| 86 |
+
The code below shows how to retrieve a default credential type, depending upon the runtime environment.
|
| 87 |
+
|
| 88 |
+
```js
|
| 89 |
+
const {GoogleAuth} = require('google-auth-library');
|
| 90 |
+
|
| 91 |
+
/**
|
| 92 |
+
* Instead of specifying the type of client you'd like to use (JWT, OAuth2, etc)
|
| 93 |
+
* this library will automatically choose the right client based on the environment.
|
| 94 |
+
*/
|
| 95 |
+
async function main() {
|
| 96 |
+
const auth = new GoogleAuth({
|
| 97 |
+
scopes: 'https://www.googleapis.com/auth/cloud-platform'
|
| 98 |
+
});
|
| 99 |
+
const client = await auth.getClient();
|
| 100 |
+
const projectId = await auth.getProjectId();
|
| 101 |
+
const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`;
|
| 102 |
+
const res = await client.request({ url });
|
| 103 |
+
console.log(res.data);
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
main().catch(console.error);
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## OAuth2
|
| 110 |
+
|
| 111 |
+
This library comes with an [OAuth2](https://developers.google.com/identity/protocols/OAuth2) client that allows you to retrieve an access token and refreshes the token and retry the request seamlessly if you also provide an `expiry_date` and the token is expired. The basics of Google's OAuth2 implementation is explained on [Google Authorization and Authentication documentation](https://developers.google.com/accounts/docs/OAuth2Login).
|
| 112 |
+
|
| 113 |
+
In the following examples, you may need a `CLIENT_ID`, `CLIENT_SECRET` and `REDIRECT_URL`. You can find these pieces of information by going to the [Developer Console](https://console.cloud.google.com/), clicking your project > APIs & auth > credentials.
|
| 114 |
+
|
| 115 |
+
For more information about OAuth2 and how it works, [see here](https://developers.google.com/identity/protocols/OAuth2).
|
| 116 |
+
|
| 117 |
+
#### A complete OAuth2 example
|
| 118 |
+
|
| 119 |
+
Let's take a look at a complete example.
|
| 120 |
+
|
| 121 |
+
``` js
|
| 122 |
+
const {OAuth2Client} = require('google-auth-library');
|
| 123 |
+
const http = require('http');
|
| 124 |
+
const url = require('url');
|
| 125 |
+
const open = require('open');
|
| 126 |
+
const destroyer = require('server-destroy');
|
| 127 |
+
|
| 128 |
+
// Download your OAuth2 configuration from the Google
|
| 129 |
+
const keys = require('./oauth2.keys.json');
|
| 130 |
+
|
| 131 |
+
/**
|
| 132 |
+
* Start by acquiring a pre-authenticated oAuth2 client.
|
| 133 |
+
*/
|
| 134 |
+
async function main() {
|
| 135 |
+
const oAuth2Client = await getAuthenticatedClient();
|
| 136 |
+
// Make a simple request to the People API using our pre-authenticated client. The `request()` method
|
| 137 |
+
// takes an GaxiosOptions object. Visit https://github.com/JustinBeckwith/gaxios.
|
| 138 |
+
const url = 'https://people.googleapis.com/v1/people/me?personFields=names';
|
| 139 |
+
const res = await oAuth2Client.request({url});
|
| 140 |
+
console.log(res.data);
|
| 141 |
+
|
| 142 |
+
// After acquiring an access_token, you may want to check on the audience, expiration,
|
| 143 |
+
// or original scopes requested. You can do that with the `getTokenInfo` method.
|
| 144 |
+
const tokenInfo = await oAuth2Client.getTokenInfo(
|
| 145 |
+
oAuth2Client.credentials.access_token
|
| 146 |
+
);
|
| 147 |
+
console.log(tokenInfo);
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
/**
|
| 151 |
+
* Create a new OAuth2Client, and go through the OAuth2 content
|
| 152 |
+
* workflow. Return the full client to the callback.
|
| 153 |
+
*/
|
| 154 |
+
function getAuthenticatedClient() {
|
| 155 |
+
return new Promise((resolve, reject) => {
|
| 156 |
+
// create an oAuth client to authorize the API call. Secrets are kept in a `keys.json` file,
|
| 157 |
+
// which should be downloaded from the Google Developers Console.
|
| 158 |
+
const oAuth2Client = new OAuth2Client(
|
| 159 |
+
keys.web.client_id,
|
| 160 |
+
keys.web.client_secret,
|
| 161 |
+
keys.web.redirect_uris[0]
|
| 162 |
+
);
|
| 163 |
+
|
| 164 |
+
// Generate the url that will be used for the consent dialog.
|
| 165 |
+
const authorizeUrl = oAuth2Client.generateAuthUrl({
|
| 166 |
+
access_type: 'offline',
|
| 167 |
+
scope: 'https://www.googleapis.com/auth/userinfo.profile',
|
| 168 |
+
});
|
| 169 |
+
|
| 170 |
+
// Open an http server to accept the oauth callback. In this simple example, the
|
| 171 |
+
// only request to our webserver is to /oauth2callback?code=<code>
|
| 172 |
+
const server = http
|
| 173 |
+
.createServer(async (req, res) => {
|
| 174 |
+
try {
|
| 175 |
+
if (req.url.indexOf('/oauth2callback') > -1) {
|
| 176 |
+
// acquire the code from the querystring, and close the web server.
|
| 177 |
+
const qs = new url.URL(req.url, 'http://localhost:3000')
|
| 178 |
+
.searchParams;
|
| 179 |
+
const code = qs.get('code');
|
| 180 |
+
console.log(`Code is ${code}`);
|
| 181 |
+
res.end('Authentication successful! Please return to the console.');
|
| 182 |
+
server.destroy();
|
| 183 |
+
|
| 184 |
+
// Now that we have the code, use that to acquire tokens.
|
| 185 |
+
const r = await oAuth2Client.getToken(code);
|
| 186 |
+
// Make sure to set the credentials on the OAuth2 client.
|
| 187 |
+
oAuth2Client.setCredentials(r.tokens);
|
| 188 |
+
console.info('Tokens acquired.');
|
| 189 |
+
resolve(oAuth2Client);
|
| 190 |
+
}
|
| 191 |
+
} catch (e) {
|
| 192 |
+
reject(e);
|
| 193 |
+
}
|
| 194 |
+
})
|
| 195 |
+
.listen(3000, () => {
|
| 196 |
+
// open the browser to the authorize url to start the workflow
|
| 197 |
+
open(authorizeUrl, {wait: false}).then(cp => cp.unref());
|
| 198 |
+
});
|
| 199 |
+
destroyer(server);
|
| 200 |
+
});
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
main().catch(console.error);
|
| 204 |
+
```
|
| 205 |
+
|
| 206 |
+
#### Handling token events
|
| 207 |
+
|
| 208 |
+
This library will automatically obtain an `access_token`, and automatically refresh the `access_token` if a `refresh_token` is present. The `refresh_token` is only returned on the [first authorization](https://github.com/googleapis/google-api-nodejs-client/issues/750#issuecomment-304521450), so if you want to make sure you store it safely. An easy way to make sure you always store the most recent tokens is to use the `tokens` event:
|
| 209 |
+
|
| 210 |
+
```js
|
| 211 |
+
const client = await auth.getClient();
|
| 212 |
+
|
| 213 |
+
client.on('tokens', (tokens) => {
|
| 214 |
+
if (tokens.refresh_token) {
|
| 215 |
+
// store the refresh_token in my database!
|
| 216 |
+
console.log(tokens.refresh_token);
|
| 217 |
+
}
|
| 218 |
+
console.log(tokens.access_token);
|
| 219 |
+
});
|
| 220 |
+
|
| 221 |
+
const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`;
|
| 222 |
+
const res = await client.request({ url });
|
| 223 |
+
// The `tokens` event would now be raised if this was the first request
|
| 224 |
+
```
|
| 225 |
+
|
| 226 |
+
#### Retrieve access token
|
| 227 |
+
With the code returned, you can ask for an access token as shown below:
|
| 228 |
+
|
| 229 |
+
``` js
|
| 230 |
+
const tokens = await oauth2Client.getToken(code);
|
| 231 |
+
// Now tokens contains an access_token and an optional refresh_token. Save them.
|
| 232 |
+
oauth2Client.setCredentials(tokens);
|
| 233 |
+
```
|
| 234 |
+
|
| 235 |
+
#### Obtaining a new Refresh Token
|
| 236 |
+
If you need to obtain a new `refresh_token`, ensure the call to `generateAuthUrl` sets the `access_type` to `offline`. The refresh token will only be returned for the first authorization by the user. To force consent, set the `prompt` property to `consent`:
|
| 237 |
+
|
| 238 |
+
```js
|
| 239 |
+
// Generate the url that will be used for the consent dialog.
|
| 240 |
+
const authorizeUrl = oAuth2Client.generateAuthUrl({
|
| 241 |
+
// To get a refresh token, you MUST set access_type to `offline`.
|
| 242 |
+
access_type: 'offline',
|
| 243 |
+
// set the appropriate scopes
|
| 244 |
+
scope: 'https://www.googleapis.com/auth/userinfo.profile',
|
| 245 |
+
// A refresh token is only returned the first time the user
|
| 246 |
+
// consents to providing access. For illustration purposes,
|
| 247 |
+
// setting the prompt to 'consent' will force this consent
|
| 248 |
+
// every time, forcing a refresh_token to be returned.
|
| 249 |
+
prompt: 'consent'
|
| 250 |
+
});
|
| 251 |
+
```
|
| 252 |
+
|
| 253 |
+
#### Checking `access_token` information
|
| 254 |
+
After obtaining and storing an `access_token`, at a later time you may want to go check the expiration date,
|
| 255 |
+
original scopes, or audience for the token. To get the token info, you can use the `getTokenInfo` method:
|
| 256 |
+
|
| 257 |
+
```js
|
| 258 |
+
// after acquiring an oAuth2Client...
|
| 259 |
+
const tokenInfo = await oAuth2Client.getTokenInfo('my-access-token');
|
| 260 |
+
|
| 261 |
+
// take a look at the scopes originally provisioned for the access token
|
| 262 |
+
console.log(tokenInfo.scopes);
|
| 263 |
+
```
|
| 264 |
+
|
| 265 |
+
This method will throw if the token is invalid.
|
| 266 |
+
|
| 267 |
+
#### Using an API Key
|
| 268 |
+
|
| 269 |
+
An API key can be provided to the constructor:
|
| 270 |
+
```js
|
| 271 |
+
const client = new OAuth2Client({
|
| 272 |
+
apiKey: 'my-api-key'
|
| 273 |
+
});
|
| 274 |
+
```
|
| 275 |
+
|
| 276 |
+
Note, classes that extend from this can utilize this parameter as well, such as `JWT` and `UserRefreshClient`.
|
| 277 |
+
|
| 278 |
+
Additionally, an API key can be used in `GoogleAuth` via the `clientOptions` parameter and will be passed to any generated `OAuth2Client` instances:
|
| 279 |
+
```js
|
| 280 |
+
const auth = new GoogleAuth({
|
| 281 |
+
clientOptions: {
|
| 282 |
+
apiKey: 'my-api-key'
|
| 283 |
+
}
|
| 284 |
+
})
|
| 285 |
+
```
|
| 286 |
+
|
| 287 |
+
API Key support varies by API.
|
| 288 |
+
|
| 289 |
+
## JSON Web Tokens
|
| 290 |
+
The Google Developers Console provides a `.json` file that you can use to configure a JWT auth client and authenticate your requests, for example when using a service account.
|
| 291 |
+
|
| 292 |
+
``` js
|
| 293 |
+
const {JWT} = require('google-auth-library');
|
| 294 |
+
const keys = require('./jwt.keys.json');
|
| 295 |
+
|
| 296 |
+
async function main() {
|
| 297 |
+
const client = new JWT({
|
| 298 |
+
email: keys.client_email,
|
| 299 |
+
key: keys.private_key,
|
| 300 |
+
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
|
| 301 |
+
});
|
| 302 |
+
const url = `https://dns.googleapis.com/dns/v1/projects/${keys.project_id}`;
|
| 303 |
+
const res = await client.request({url});
|
| 304 |
+
console.log(res.data);
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
main().catch(console.error);
|
| 308 |
+
```
|
| 309 |
+
|
| 310 |
+
The parameters for the JWT auth client including how to use it with a `.pem` file are explained in [samples/jwt.js](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/jwt.js).
|
| 311 |
+
|
| 312 |
+
#### Loading credentials from environment variables
|
| 313 |
+
Instead of loading credentials from a key file, you can also provide them using an environment variable and the `GoogleAuth.fromJSON()` method. This is particularly convenient for systems that deploy directly from source control (Heroku, App Engine, etc).
|
| 314 |
+
|
| 315 |
+
Start by exporting your credentials:
|
| 316 |
+
|
| 317 |
+
```
|
| 318 |
+
$ export CREDS='{
|
| 319 |
+
"type": "service_account",
|
| 320 |
+
"project_id": "your-project-id",
|
| 321 |
+
"private_key_id": "your-private-key-id",
|
| 322 |
+
"private_key": "your-private-key",
|
| 323 |
+
"client_email": "your-client-email",
|
| 324 |
+
"client_id": "your-client-id",
|
| 325 |
+
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
| 326 |
+
"token_uri": "https://accounts.google.com/o/oauth2/token",
|
| 327 |
+
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
| 328 |
+
"client_x509_cert_url": "your-cert-url"
|
| 329 |
+
}'
|
| 330 |
+
```
|
| 331 |
+
Now you can create a new client from the credentials:
|
| 332 |
+
|
| 333 |
+
```js
|
| 334 |
+
const {auth} = require('google-auth-library');
|
| 335 |
+
|
| 336 |
+
// load the environment variable with our keys
|
| 337 |
+
const keysEnvVar = process.env['CREDS'];
|
| 338 |
+
if (!keysEnvVar) {
|
| 339 |
+
throw new Error('The $CREDS environment variable was not found!');
|
| 340 |
+
}
|
| 341 |
+
const keys = JSON.parse(keysEnvVar);
|
| 342 |
+
|
| 343 |
+
async function main() {
|
| 344 |
+
// load the JWT or UserRefreshClient from the keys
|
| 345 |
+
const client = auth.fromJSON(keys);
|
| 346 |
+
client.scopes = ['https://www.googleapis.com/auth/cloud-platform'];
|
| 347 |
+
const url = `https://dns.googleapis.com/dns/v1/projects/${keys.project_id}`;
|
| 348 |
+
const res = await client.request({url});
|
| 349 |
+
console.log(res.data);
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
main().catch(console.error);
|
| 353 |
+
```
|
| 354 |
+
|
| 355 |
+
**Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to [Validate credential configurations from external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
| 356 |
+
|
| 357 |
+
#### Using a Proxy
|
| 358 |
+
You can set the `HTTPS_PROXY` or `https_proxy` environment variables to proxy HTTPS requests. When `HTTPS_PROXY` or `https_proxy` are set, they will be used to proxy SSL requests that do not have an explicit proxy configuration option present.
|
| 359 |
+
|
| 360 |
+
## Compute
|
| 361 |
+
If your application is running on Google Cloud Platform, you can authenticate using the default service account or by specifying a specific service account.
|
| 362 |
+
|
| 363 |
+
**Note**: In most cases, you will want to use [Application Default Credentials](#choosing-the-correct-credential-type-automatically). Direct use of the `Compute` class is for very specific scenarios.
|
| 364 |
+
|
| 365 |
+
``` js
|
| 366 |
+
const {auth, Compute} = require('google-auth-library');
|
| 367 |
+
|
| 368 |
+
async function main() {
|
| 369 |
+
const client = new Compute({
|
| 370 |
+
// Specifying the service account email is optional.
|
| 371 |
+
serviceAccountEmail: 'my-service-account@example.com'
|
| 372 |
+
});
|
| 373 |
+
const projectId = await auth.getProjectId();
|
| 374 |
+
const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`;
|
| 375 |
+
const res = await client.request({url});
|
| 376 |
+
console.log(res.data);
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
main().catch(console.error);
|
| 380 |
+
```
|
| 381 |
+
|
| 382 |
+
## Workload Identity Federation
|
| 383 |
+
|
| 384 |
+
Using workload identity federation, your application can access Google Cloud resources from Amazon Web Services (AWS), Microsoft Azure or any identity provider that supports OpenID Connect (OIDC).
|
| 385 |
+
|
| 386 |
+
Traditionally, applications running outside Google Cloud have used service account keys to access Google Cloud resources. Using identity federation, you can allow your workload to impersonate a service account.
|
| 387 |
+
This lets you access Google Cloud resources directly, eliminating the maintenance and security burden associated with service account keys.
|
| 388 |
+
|
| 389 |
+
### Accessing resources from AWS
|
| 390 |
+
|
| 391 |
+
In order to access Google Cloud resources from Amazon Web Services (AWS), the following requirements are needed:
|
| 392 |
+
- A workload identity pool needs to be created.
|
| 393 |
+
- AWS needs to be added as an identity provider in the workload identity pool (The Google [organization policy](https://cloud.google.com/iam/docs/manage-workload-identity-pools-providers#restrict) needs to allow federation from AWS).
|
| 394 |
+
- Permission to impersonate a service account needs to be granted to the external identity.
|
| 395 |
+
|
| 396 |
+
Follow the detailed [instructions](https://cloud.google.com/iam/docs/access-resources-aws) on how to configure workload identity federation from AWS.
|
| 397 |
+
|
| 398 |
+
After configuring the AWS provider to impersonate a service account, a credential configuration file needs to be generated.
|
| 399 |
+
Unlike service account credential files, the generated credential configuration file will only contain non-sensitive metadata to instruct the library on how to retrieve external subject tokens and exchange them for service account access tokens.
|
| 400 |
+
The configuration file can be generated by using the [gcloud CLI](https://cloud.google.com/sdk/).
|
| 401 |
+
|
| 402 |
+
To generate the AWS workload identity configuration, run the following command:
|
| 403 |
+
|
| 404 |
+
```bash
|
| 405 |
+
# Generate an AWS configuration file.
|
| 406 |
+
gcloud iam workload-identity-pools create-cred-config \
|
| 407 |
+
projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/providers/$AWS_PROVIDER_ID \
|
| 408 |
+
--service-account $SERVICE_ACCOUNT_EMAIL \
|
| 409 |
+
--aws \
|
| 410 |
+
--output-file /path/to/generated/config.json
|
| 411 |
+
```
|
| 412 |
+
|
| 413 |
+
Where the following variables need to be substituted:
|
| 414 |
+
- `$PROJECT_NUMBER`: The Google Cloud project number.
|
| 415 |
+
- `$POOL_ID`: The workload identity pool ID.
|
| 416 |
+
- `$AWS_PROVIDER_ID`: The AWS provider ID.
|
| 417 |
+
- `$SERVICE_ACCOUNT_EMAIL`: The email of the service account to impersonate.
|
| 418 |
+
|
| 419 |
+
This will generate the configuration file in the specified output file.
|
| 420 |
+
|
| 421 |
+
If you want to use the AWS IMDSv2 flow, you can add the field below to the credential_source in your AWS ADC configuration file:
|
| 422 |
+
"imdsv2_session_token_url": "http://169.254.169.254/latest/api/token"
|
| 423 |
+
The gcloud create-cred-config command will be updated to support this soon.
|
| 424 |
+
|
| 425 |
+
You can now [start using the Auth library](#using-external-identities) to call Google Cloud resources from AWS.
|
| 426 |
+
|
| 427 |
+
### Accessing resources from AWS using a custom AWS security credentials supplier.
|
| 428 |
+
|
| 429 |
+
In order to access Google Cloud resources from Amazon Web Services (AWS), the following requirements are needed:
|
| 430 |
+
- A workload identity pool needs to be created.
|
| 431 |
+
- AWS needs to be added as an identity provider in the workload identity pool (The Google [organization policy](https://cloud.google.com/iam/docs/manage-workload-identity-pools-providers#restrict) needs to allow federation from AWS).
|
| 432 |
+
- Permission to impersonate a service account needs to be granted to the external identity.
|
| 433 |
+
|
| 434 |
+
Follow the detailed [instructions](https://cloud.google.com/iam/docs/access-resources-aws) on how to configure workload identity federation from AWS.
|
| 435 |
+
|
| 436 |
+
If you want to use AWS security credentials that cannot be retrieved using methods supported natively by this library,
|
| 437 |
+
a custom AwsSecurityCredentialsSupplier implementation may be specified when creating an AWS client. The supplier must
|
| 438 |
+
return valid, unexpired AWS security credentials when called by the GCP credential. Currently, using ADC with your AWS
|
| 439 |
+
workloads is only supported with EC2. An example of a good use case for using a custom credential suppliers is when
|
| 440 |
+
your workloads are running in other AWS environments, such as ECS, EKS, Fargate, etc.
|
| 441 |
+
|
| 442 |
+
Note that the client does not cache the returned AWS security credentials, so caching logic should be implemented in the supplier to prevent multiple requests for the same resources.
|
| 443 |
+
|
| 444 |
+
```ts
|
| 445 |
+
import { AwsClient, AwsSecurityCredentials, AwsSecurityCredentialsSupplier, ExternalAccountSupplierContext } from 'google-auth-library';
|
| 446 |
+
import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
|
| 447 |
+
import { Storage } from '@google-cloud/storage';
|
| 448 |
+
|
| 449 |
+
class AwsSupplier implements AwsSecurityCredentialsSupplier {
|
| 450 |
+
private readonly region: string
|
| 451 |
+
|
| 452 |
+
constructor(region: string) {
|
| 453 |
+
this.region = options.region;
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
async getAwsRegion(context: ExternalAccountSupplierContext): Promise<string> {
|
| 457 |
+
// Return the AWS region i.e. "us-east-2".
|
| 458 |
+
return this.region
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
async getAwsSecurityCredentials(
|
| 462 |
+
context: ExternalAccountSupplierContext
|
| 463 |
+
): Promise<AwsSecurityCredentials> {
|
| 464 |
+
// Retrieve the AWS credentails.
|
| 465 |
+
const awsCredentialsProvider = fromNodeProviderChain();
|
| 466 |
+
const awsCredentials = await awsCredentialsProvider();
|
| 467 |
+
|
| 468 |
+
// Parse the AWS credentials into a AWS security credentials instance and
|
| 469 |
+
// return them.
|
| 470 |
+
const awsSecurityCredentials = {
|
| 471 |
+
accessKeyId: awsCredentials.accessKeyId,
|
| 472 |
+
secretAccessKey: awsCredentials.secretAccessKey,
|
| 473 |
+
token: awsCredentials.sessionToken
|
| 474 |
+
}
|
| 475 |
+
return awsSecurityCredentials;
|
| 476 |
+
}
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
const clientOptions = {
|
| 480 |
+
audience: '//iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$WORKLOAD_POOL_ID/providers/$PROVIDER_ID', // Set the GCP audience.
|
| 481 |
+
subject_token_type: 'urn:ietf:params:aws:token-type:aws4_request', // Set the subject token type.
|
| 482 |
+
aws_security_credentials_supplier: new AwsSupplier("AWS_REGION") // Set the custom supplier.
|
| 483 |
+
service_account_impersonation_url: 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/$EMAIL:generateAccessToken', // Set the service account impersonation url.
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
// Create a new Auth client and use it to create service client, i.e. storage.
|
| 487 |
+
const authClient = new AwsClient(clientOptions);
|
| 488 |
+
const storage = new Storage({ authClient });
|
| 489 |
+
```
|
| 490 |
+
|
| 491 |
+
Where the [audience](https://cloud.google.com/iam/docs/best-practices-for-using-workload-identity-federation#provider-audience) is: `//iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$WORKLOAD_POOL_ID/providers/$PROVIDER_ID`
|
| 492 |
+
|
| 493 |
+
Where the following variables need to be substituted:
|
| 494 |
+
|
| 495 |
+
* `$PROJECT_NUMBER`: The Google Cloud project number.
|
| 496 |
+
* `$WORKLOAD_POOL_ID`: The workload pool ID.
|
| 497 |
+
* `$PROVIDER_ID`: The provider ID.
|
| 498 |
+
|
| 499 |
+
|
| 500 |
+
The values for audience, service account impersonation URL, and any other builder field can also be found by generating a [credential configuration file with the gcloud CLI](https://cloud.google.com/sdk/gcloud/reference/iam/workload-identity-pools/create-cred-config).
|
| 501 |
+
|
| 502 |
+
### Access resources from Microsoft Azure
|
| 503 |
+
|
| 504 |
+
In order to access Google Cloud resources from Microsoft Azure, the following requirements are needed:
|
| 505 |
+
- A workload identity pool needs to be created.
|
| 506 |
+
- Azure needs to be added as an identity provider in the workload identity pool (The Google [organization policy](https://cloud.google.com/iam/docs/manage-workload-identity-pools-providers#restrict) needs to allow federation from Azure).
|
| 507 |
+
- The Azure tenant needs to be configured for identity federation.
|
| 508 |
+
- Permission to impersonate a service account needs to be granted to the external identity.
|
| 509 |
+
|
| 510 |
+
Follow the detailed [instructions](https://cloud.google.com/iam/docs/access-resources-azure) on how to configure workload identity federation from Microsoft Azure.
|
| 511 |
+
|
| 512 |
+
After configuring the Azure provider to impersonate a service account, a credential configuration file needs to be generated.
|
| 513 |
+
Unlike service account credential files, the generated credential configuration file will only contain non-sensitive metadata to instruct the library on how to retrieve external subject tokens and exchange them for service account access tokens.
|
| 514 |
+
The configuration file can be generated by using the [gcloud CLI](https://cloud.google.com/sdk/).
|
| 515 |
+
|
| 516 |
+
To generate the Azure workload identity configuration, run the following command:
|
| 517 |
+
|
| 518 |
+
```bash
|
| 519 |
+
# Generate an Azure configuration file.
|
| 520 |
+
gcloud iam workload-identity-pools create-cred-config \
|
| 521 |
+
projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/providers/$AZURE_PROVIDER_ID \
|
| 522 |
+
--service-account $SERVICE_ACCOUNT_EMAIL \
|
| 523 |
+
--azure \
|
| 524 |
+
--output-file /path/to/generated/config.json
|
| 525 |
+
```
|
| 526 |
+
|
| 527 |
+
Where the following variables need to be substituted:
|
| 528 |
+
- `$PROJECT_NUMBER`: The Google Cloud project number.
|
| 529 |
+
- `$POOL_ID`: The workload identity pool ID.
|
| 530 |
+
- `$AZURE_PROVIDER_ID`: The Azure provider ID.
|
| 531 |
+
- `$SERVICE_ACCOUNT_EMAIL`: The email of the service account to impersonate.
|
| 532 |
+
|
| 533 |
+
This will generate the configuration file in the specified output file.
|
| 534 |
+
|
| 535 |
+
You can now [start using the Auth library](#using-external-identities) to call Google Cloud resources from Azure.
|
| 536 |
+
|
| 537 |
+
### Accessing resources from an OIDC identity provider
|
| 538 |
+
|
| 539 |
+
In order to access Google Cloud resources from an identity provider that supports [OpenID Connect (OIDC)](https://openid.net/connect/), the following requirements are needed:
|
| 540 |
+
- A workload identity pool needs to be created.
|
| 541 |
+
- An OIDC identity provider needs to be added in the workload identity pool (The Google [organization policy](https://cloud.google.com/iam/docs/manage-workload-identity-pools-providers#restrict) needs to allow federation from the identity provider).
|
| 542 |
+
- Permission to impersonate a service account needs to be granted to the external identity.
|
| 543 |
+
|
| 544 |
+
Follow the detailed [instructions](https://cloud.google.com/iam/docs/access-resources-oidc) on how to configure workload identity federation from an OIDC identity provider.
|
| 545 |
+
|
| 546 |
+
After configuring the OIDC provider to impersonate a service account, a credential configuration file needs to be generated.
|
| 547 |
+
Unlike service account credential files, the generated credential configuration file will only contain non-sensitive metadata to instruct the library on how to retrieve external subject tokens and exchange them for service account access tokens.
|
| 548 |
+
The configuration file can be generated by using the [gcloud CLI](https://cloud.google.com/sdk/).
|
| 549 |
+
|
| 550 |
+
For OIDC providers, the Auth library can retrieve OIDC tokens either from a local file location (file-sourced credentials) or from a local server (URL-sourced credentials).
|
| 551 |
+
|
| 552 |
+
**File-sourced credentials**
|
| 553 |
+
For file-sourced credentials, a background process needs to be continuously refreshing the file location with a new OIDC token prior to expiration.
|
| 554 |
+
For tokens with one hour lifetimes, the token needs to be updated in the file every hour. The token can be stored directly as plain text or in JSON format.
|
| 555 |
+
|
| 556 |
+
To generate a file-sourced OIDC configuration, run the following command:
|
| 557 |
+
|
| 558 |
+
```bash
|
| 559 |
+
# Generate an OIDC configuration file for file-sourced credentials.
|
| 560 |
+
gcloud iam workload-identity-pools create-cred-config \
|
| 561 |
+
projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/providers/$OIDC_PROVIDER_ID \
|
| 562 |
+
--service-account $SERVICE_ACCOUNT_EMAIL \
|
| 563 |
+
--credential-source-file $PATH_TO_OIDC_ID_TOKEN \
|
| 564 |
+
# Optional arguments for file types. Default is "text":
|
| 565 |
+
# --credential-source-type "json" \
|
| 566 |
+
# Optional argument for the field that contains the OIDC credential.
|
| 567 |
+
# This is required for json.
|
| 568 |
+
# --credential-source-field-name "id_token" \
|
| 569 |
+
--output-file /path/to/generated/config.json
|
| 570 |
+
```
|
| 571 |
+
|
| 572 |
+
Where the following variables need to be substituted:
|
| 573 |
+
- `$PROJECT_NUMBER`: The Google Cloud project number.
|
| 574 |
+
- `$POOL_ID`: The workload identity pool ID.
|
| 575 |
+
- `$OIDC_PROVIDER_ID`: The OIDC provider ID.
|
| 576 |
+
- `$SERVICE_ACCOUNT_EMAIL`: The email of the service account to impersonate.
|
| 577 |
+
- `$PATH_TO_OIDC_ID_TOKEN`: The file path where the OIDC token will be retrieved from.
|
| 578 |
+
|
| 579 |
+
This will generate the configuration file in the specified output file.
|
| 580 |
+
|
| 581 |
+
**URL-sourced credentials**
|
| 582 |
+
For URL-sourced credentials, a local server needs to host a GET endpoint to return the OIDC token. The response can be in plain text or JSON.
|
| 583 |
+
Additional required request headers can also be specified.
|
| 584 |
+
|
| 585 |
+
To generate a URL-sourced OIDC workload identity configuration, run the following command:
|
| 586 |
+
|
| 587 |
+
```bash
|
| 588 |
+
# Generate an OIDC configuration file for URL-sourced credentials.
|
| 589 |
+
gcloud iam workload-identity-pools create-cred-config \
|
| 590 |
+
projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/providers/$OIDC_PROVIDER_ID \
|
| 591 |
+
--service-account $SERVICE_ACCOUNT_EMAIL \
|
| 592 |
+
--credential-source-url $URL_TO_GET_OIDC_TOKEN \
|
| 593 |
+
--credential-source-headers $HEADER_KEY=$HEADER_VALUE \
|
| 594 |
+
# Optional arguments for file types. Default is "text":
|
| 595 |
+
# --credential-source-type "json" \
|
| 596 |
+
# Optional argument for the field that contains the OIDC credential.
|
| 597 |
+
# This is required for json.
|
| 598 |
+
# --credential-source-field-name "id_token" \
|
| 599 |
+
--output-file /path/to/generated/config.json
|
| 600 |
+
```
|
| 601 |
+
|
| 602 |
+
Where the following variables need to be substituted:
|
| 603 |
+
- `$PROJECT_NUMBER`: The Google Cloud project number.
|
| 604 |
+
- `$POOL_ID`: The workload identity pool ID.
|
| 605 |
+
- `$OIDC_PROVIDER_ID`: The OIDC provider ID.
|
| 606 |
+
- `$SERVICE_ACCOUNT_EMAIL`: The email of the service account to impersonate.
|
| 607 |
+
- `$URL_TO_GET_OIDC_TOKEN`: The URL of the local server endpoint to call to retrieve the OIDC token.
|
| 608 |
+
- `$HEADER_KEY` and `$HEADER_VALUE`: The additional header key/value pairs to pass along the GET request to `$URL_TO_GET_OIDC_TOKEN`, e.g. `Metadata-Flavor=Google`.
|
| 609 |
+
|
| 610 |
+
### Accessing resources from an OIDC or SAML2.0 identity provider using a custom supplier
|
| 611 |
+
|
| 612 |
+
If you want to use OIDC or SAML2.0 that cannot be retrieved using methods supported natively by this library,
|
| 613 |
+
a custom SubjectTokenSupplier implementation may be specified when creating an identity pool client. The supplier must
|
| 614 |
+
return a valid, unexpired subject token when called by the GCP credential.
|
| 615 |
+
|
| 616 |
+
Note that the client does not cache the returned subject token, so caching logic should be implemented in the supplier to prevent multiple requests for the same resources.
|
| 617 |
+
|
| 618 |
+
```ts
|
| 619 |
+
class CustomSupplier implements SubjectTokenSupplier {
|
| 620 |
+
async getSubjectToken(
|
| 621 |
+
context: ExternalAccountSupplierContext
|
| 622 |
+
): Promise<string> {
|
| 623 |
+
const audience = context.audience;
|
| 624 |
+
const subjectTokenType = context.subjectTokenType;
|
| 625 |
+
// Return a valid subject token for the requested audience and subject token type.
|
| 626 |
+
}
|
| 627 |
+
}
|
| 628 |
+
|
| 629 |
+
const clientOptions = {
|
| 630 |
+
audience: '//iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$WORKLOAD_POOL_ID/providers/$PROVIDER_ID', // Set the GCP audience.
|
| 631 |
+
subject_token_type: 'urn:ietf:params:oauth:token-type:id_token', // Set the subject token type.
|
| 632 |
+
subject_token_supplier: new CustomSupplier() // Set the custom supplier.
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
+
const client = new CustomSupplier(clientOptions);
|
| 636 |
+
```
|
| 637 |
+
|
| 638 |
+
Where the [audience](https://cloud.google.com/iam/docs/best-practices-for-using-workload-identity-federation#provider-audience) is: `//iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$WORKLOAD_POOL_ID/providers/$PROVIDER_ID`
|
| 639 |
+
|
| 640 |
+
Where the following variables need to be substituted:
|
| 641 |
+
|
| 642 |
+
* `$PROJECT_NUMBER`: The Google Cloud project number.
|
| 643 |
+
* `$WORKLOAD_POOL_ID`: The workload pool ID.
|
| 644 |
+
* `$PROVIDER_ID`: The provider ID.
|
| 645 |
+
|
| 646 |
+
The values for audience, service account impersonation URL, and any other builder field can also be found by generating a [credential configuration file with the gcloud CLI](https://cloud.google.com/sdk/gcloud/reference/iam/workload-identity-pools/create-cred-config).
|
| 647 |
+
|
| 648 |
+
#### Using External Account Authorized User workforce credentials
|
| 649 |
+
|
| 650 |
+
[External account authorized user credentials](https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#browser-based-sign-in) allow you to sign in with a web browser to an external identity provider account via the
|
| 651 |
+
gcloud CLI and create a configuration for the auth library to use.
|
| 652 |
+
|
| 653 |
+
To generate an external account authorized user workforce identity configuration, run the following command:
|
| 654 |
+
|
| 655 |
+
```bash
|
| 656 |
+
gcloud auth application-default login --login-config=$LOGIN_CONFIG
|
| 657 |
+
```
|
| 658 |
+
|
| 659 |
+
Where the following variable needs to be substituted:
|
| 660 |
+
- `$LOGIN_CONFIG`: The login config file generated with the cloud console or
|
| 661 |
+
[gcloud iam workforce-pools create-login-config](https://cloud.google.com/sdk/gcloud/reference/iam/workforce-pools/create-login-config)
|
| 662 |
+
|
| 663 |
+
This will open a browser flow for you to sign in via the configured third party identity provider
|
| 664 |
+
and then will store the external account authorized user configuration at the well known ADC location.
|
| 665 |
+
The auth library will then use the provided refresh token from the configuration to generate and refresh
|
| 666 |
+
an access token to call Google Cloud services.
|
| 667 |
+
|
| 668 |
+
Note that the default lifetime of the refresh token is one hour, after which a new configuration will need to be generated from the gcloud CLI.
|
| 669 |
+
The lifetime can be modified by changing the [session duration of the workforce pool](https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools), and can be set as high as 12 hours.
|
| 670 |
+
|
| 671 |
+
#### Using Executable-sourced credentials with OIDC and SAML
|
| 672 |
+
|
| 673 |
+
**Executable-sourced credentials**
|
| 674 |
+
For executable-sourced credentials, a local executable is used to retrieve the 3rd party token.
|
| 675 |
+
The executable must handle providing a valid, unexpired OIDC ID token or SAML assertion in JSON format
|
| 676 |
+
to stdout.
|
| 677 |
+
|
| 678 |
+
To use executable-sourced credentials, the `GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES`
|
| 679 |
+
environment variable must be set to `1`.
|
| 680 |
+
|
| 681 |
+
To generate an executable-sourced workload identity configuration, run the following command:
|
| 682 |
+
|
| 683 |
+
```bash
|
| 684 |
+
# Generate a configuration file for executable-sourced credentials.
|
| 685 |
+
gcloud iam workload-identity-pools create-cred-config \
|
| 686 |
+
projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/providers/$PROVIDER_ID \
|
| 687 |
+
--service-account=$SERVICE_ACCOUNT_EMAIL \
|
| 688 |
+
--subject-token-type=$SUBJECT_TOKEN_TYPE \
|
| 689 |
+
# The absolute path for the program, including arguments.
|
| 690 |
+
# e.g. --executable-command="/path/to/command --foo=bar"
|
| 691 |
+
--executable-command=$EXECUTABLE_COMMAND \
|
| 692 |
+
# Optional argument for the executable timeout. Defaults to 30s.
|
| 693 |
+
# --executable-timeout-millis=$EXECUTABLE_TIMEOUT \
|
| 694 |
+
# Optional argument for the absolute path to the executable output file.
|
| 695 |
+
# See below on how this argument impacts the library behaviour.
|
| 696 |
+
# --executable-output-file=$EXECUTABLE_OUTPUT_FILE \
|
| 697 |
+
--output-file /path/to/generated/config.json
|
| 698 |
+
```
|
| 699 |
+
Where the following variables need to be substituted:
|
| 700 |
+
- `$PROJECT_NUMBER`: The Google Cloud project number.
|
| 701 |
+
- `$POOL_ID`: The workload identity pool ID.
|
| 702 |
+
- `$PROVIDER_ID`: The OIDC or SAML provider ID.
|
| 703 |
+
- `$SERVICE_ACCOUNT_EMAIL`: The email of the service account to impersonate.
|
| 704 |
+
- `$SUBJECT_TOKEN_TYPE`: The subject token type.
|
| 705 |
+
- `$EXECUTABLE_COMMAND`: The full command to run, including arguments. Must be an absolute path to the program.
|
| 706 |
+
|
| 707 |
+
The `--executable-timeout-millis` flag is optional. This is the duration for which
|
| 708 |
+
the auth library will wait for the executable to finish, in milliseconds.
|
| 709 |
+
Defaults to 30 seconds when not provided. The maximum allowed value is 2 minutes.
|
| 710 |
+
The minimum is 5 seconds.
|
| 711 |
+
|
| 712 |
+
The `--executable-output-file` flag is optional. If provided, the file path must
|
| 713 |
+
point to the 3PI credential response generated by the executable. This is useful
|
| 714 |
+
for caching the credentials. By specifying this path, the Auth libraries will first
|
| 715 |
+
check for its existence before running the executable. By caching the executable JSON
|
| 716 |
+
response to this file, it improves performance as it avoids the need to run the executable
|
| 717 |
+
until the cached credentials in the output file are expired. The executable must
|
| 718 |
+
handle writing to this file - the auth libraries will only attempt to read from
|
| 719 |
+
this location. The format of contents in the file should match the JSON format
|
| 720 |
+
expected by the executable shown below.
|
| 721 |
+
|
| 722 |
+
To retrieve the 3rd party token, the library will call the executable
|
| 723 |
+
using the command specified. The executable's output must adhere to the response format
|
| 724 |
+
specified below. It must output the response to stdout.
|
| 725 |
+
|
| 726 |
+
A sample successful executable OIDC response:
|
| 727 |
+
```json
|
| 728 |
+
{
|
| 729 |
+
"version": 1,
|
| 730 |
+
"success": true,
|
| 731 |
+
"token_type": "urn:ietf:params:oauth:token-type:id_token",
|
| 732 |
+
"id_token": "HEADER.PAYLOAD.SIGNATURE",
|
| 733 |
+
"expiration_time": 1620499962
|
| 734 |
+
}
|
| 735 |
+
```
|
| 736 |
+
|
| 737 |
+
A sample successful executable SAML response:
|
| 738 |
+
```json
|
| 739 |
+
{
|
| 740 |
+
"version": 1,
|
| 741 |
+
"success": true,
|
| 742 |
+
"token_type": "urn:ietf:params:oauth:token-type:saml2",
|
| 743 |
+
"saml_response": "...",
|
| 744 |
+
"expiration_time": 1620499962
|
| 745 |
+
}
|
| 746 |
+
```
|
| 747 |
+
For successful responses, the `expiration_time` field is only required
|
| 748 |
+
when an output file is specified in the credential configuration.
|
| 749 |
+
|
| 750 |
+
A sample executable error response:
|
| 751 |
+
```json
|
| 752 |
+
{
|
| 753 |
+
"version": 1,
|
| 754 |
+
"success": false,
|
| 755 |
+
"code": "401",
|
| 756 |
+
"message": "Caller not authorized."
|
| 757 |
+
}
|
| 758 |
+
```
|
| 759 |
+
These are all required fields for an error response. The code and message
|
| 760 |
+
fields will be used by the library as part of the thrown exception.
|
| 761 |
+
|
| 762 |
+
Response format fields summary:
|
| 763 |
+
* `version`: The version of the JSON output. Currently, only version 1 is supported.
|
| 764 |
+
* `success`: The status of the response. When true, the response must contain the 3rd party token
|
| 765 |
+
and token type. The response must also contain the expiration time if an output file was specified in the credential configuration.
|
| 766 |
+
The executable must also exit with exit code 0.
|
| 767 |
+
When false, the response must contain the error code and message fields and exit with a non-zero value.
|
| 768 |
+
* `token_type`: The 3rd party subject token type. Must be *urn:ietf:params:oauth:token-type:jwt*,
|
| 769 |
+
*urn:ietf:params:oauth:token-type:id_token*, or *urn:ietf:params:oauth:token-type:saml2*.
|
| 770 |
+
* `id_token`: The 3rd party OIDC token.
|
| 771 |
+
* `saml_response`: The 3rd party SAML response.
|
| 772 |
+
* `expiration_time`: The 3rd party subject token expiration time in seconds (unix epoch time).
|
| 773 |
+
* `code`: The error code string.
|
| 774 |
+
* `message`: The error message.
|
| 775 |
+
|
| 776 |
+
All response types must include both the `version` and `success` fields.
|
| 777 |
+
* Successful responses must include the `token_type` and one of
|
| 778 |
+
`id_token` or `saml_response`. The `expiration_time` field must also be present if an output file was specified in
|
| 779 |
+
the credential configuration.
|
| 780 |
+
* Error responses must include both the `code` and `message` fields.
|
| 781 |
+
|
| 782 |
+
The library will populate the following environment variables when the executable is run:
|
| 783 |
+
* `GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE`: The audience field from the credential configuration. Always present.
|
| 784 |
+
* `GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL`: The service account email. Only present when service account impersonation is used.
|
| 785 |
+
* `GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE`: The output file location from the credential configuration. Only present when specified in the credential configuration.
|
| 786 |
+
* `GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE`: This expected subject token type. Always present.
|
| 787 |
+
|
| 788 |
+
These environment variables can be used by the executable to avoid hard-coding these values.
|
| 789 |
+
|
| 790 |
+
##### Security considerations
|
| 791 |
+
The following security practices are highly recommended:
|
| 792 |
+
* Access to the script should be restricted as it will be displaying credentials to stdout. This ensures that rogue processes do not gain access to the script.
|
| 793 |
+
* The configuration file should not be modifiable. Write access should be restricted to avoid processes modifying the executable command portion.
|
| 794 |
+
|
| 795 |
+
Given the complexity of using executable-sourced credentials, it is recommended to use
|
| 796 |
+
the existing supported mechanisms (file-sourced/URL-sourced) for providing 3rd party
|
| 797 |
+
credentials unless they do not meet your specific requirements.
|
| 798 |
+
|
| 799 |
+
You can now [use the Auth library](#using-external-identities) to call Google Cloud
|
| 800 |
+
resources from an OIDC or SAML provider.
|
| 801 |
+
|
| 802 |
+
#### Configurable Token Lifetime
|
| 803 |
+
When creating a credential configuration with workload identity federation using service account impersonation, you can provide an optional argument to configure the service account access token lifetime.
|
| 804 |
+
|
| 805 |
+
To generate the configuration with configurable token lifetime, run the following command (this example uses an AWS configuration, but the token lifetime can be configured for all workload identity federation providers):
|
| 806 |
+
|
| 807 |
+
```bash
|
| 808 |
+
# Generate an AWS configuration file with configurable token lifetime.
|
| 809 |
+
gcloud iam workload-identity-pools create-cred-config \
|
| 810 |
+
projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/providers/$AWS_PROVIDER_ID \
|
| 811 |
+
--service-account $SERVICE_ACCOUNT_EMAIL \
|
| 812 |
+
--aws \
|
| 813 |
+
--output-file /path/to/generated/config.json \
|
| 814 |
+
--service-account-token-lifetime-seconds $TOKEN_LIFETIME
|
| 815 |
+
```
|
| 816 |
+
|
| 817 |
+
Where the following variables need to be substituted:
|
| 818 |
+
- `$PROJECT_NUMBER`: The Google Cloud project number.
|
| 819 |
+
- `$POOL_ID`: The workload identity pool ID.
|
| 820 |
+
- `$AWS_PROVIDER_ID`: The AWS provider ID.
|
| 821 |
+
- `$SERVICE_ACCOUNT_EMAIL`: The email of the service account to impersonate.
|
| 822 |
+
- `$TOKEN_LIFETIME`: The desired lifetime duration of the service account access token in seconds.
|
| 823 |
+
|
| 824 |
+
The `service-account-token-lifetime-seconds` flag is optional. If not provided, this defaults to one hour.
|
| 825 |
+
The minimum allowed value is 600 (10 minutes) and the maximum allowed value is 43200 (12 hours).
|
| 826 |
+
If a lifetime greater than one hour is required, the service account must be added as an allowed value in an Organization Policy that enforces the `constraints/iam.allowServiceAccountCredentialLifetimeExtension` constraint.
|
| 827 |
+
|
| 828 |
+
Note that configuring a short lifetime (e.g. 10 minutes) will result in the library initiating the entire token exchange flow every 10 minutes, which will call the 3rd party token provider even if the 3rd party token is not expired.
|
| 829 |
+
|
| 830 |
+
## Workforce Identity Federation
|
| 831 |
+
|
| 832 |
+
[Workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation) lets you use an
|
| 833 |
+
external identity provider (IdP) to authenticate and authorize a workforce—a group of users, such as employees,
|
| 834 |
+
partners, and contractors—using IAM, so that the users can access Google Cloud services. Workforce identity federation
|
| 835 |
+
extends Google Cloud's identity capabilities to support syncless, attribute-based single sign on.
|
| 836 |
+
|
| 837 |
+
With workforce identity federation, your workforce can access Google Cloud resources using an external
|
| 838 |
+
identity provider (IdP) that supports OpenID Connect (OIDC) or SAML 2.0 such as Azure Active Directory (Azure AD),
|
| 839 |
+
Active Directory Federation Services (AD FS), Okta, and others.
|
| 840 |
+
|
| 841 |
+
### Accessing resources using an OIDC or SAML 2.0 identity provider
|
| 842 |
+
|
| 843 |
+
In order to access Google Cloud resources from an identity provider that supports [OpenID Connect (OIDC)](https://openid.net/connect/),
|
| 844 |
+
the following requirements are needed:
|
| 845 |
+
- A workforce identity pool needs to be created.
|
| 846 |
+
- An OIDC or SAML 2.0 identity provider needs to be added in the workforce pool.
|
| 847 |
+
|
| 848 |
+
Follow the detailed [instructions](https://cloud.google.com/iam/docs/configuring-workforce-identity-federation) on how
|
| 849 |
+
to configure workforce identity federation.
|
| 850 |
+
|
| 851 |
+
After configuring an OIDC or SAML 2.0 provider, a credential configuration
|
| 852 |
+
file needs to be generated. The generated credential configuration file contains non-sensitive metadata to instruct the
|
| 853 |
+
library on how to retrieve external subject tokens and exchange them for GCP access tokens.
|
| 854 |
+
The configuration file can be generated by using the [gcloud CLI](https://cloud.google.com/sdk/).
|
| 855 |
+
|
| 856 |
+
The Auth library can retrieve external subject tokens from a local file location
|
| 857 |
+
(file-sourced credentials), from a local server (URL-sourced credentials) or by calling an executable
|
| 858 |
+
(executable-sourced credentials).
|
| 859 |
+
|
| 860 |
+
**File-sourced credentials**
|
| 861 |
+
For file-sourced credentials, a background process needs to be continuously refreshing the file
|
| 862 |
+
location with a new subject token prior to expiration. For tokens with one hour lifetimes, the token
|
| 863 |
+
needs to be updated in the file every hour. The token can be stored directly as plain text or in
|
| 864 |
+
JSON format.
|
| 865 |
+
|
| 866 |
+
To generate a file-sourced OIDC configuration, run the following command:
|
| 867 |
+
|
| 868 |
+
```bash
|
| 869 |
+
# Generate an OIDC configuration file for file-sourced credentials.
|
| 870 |
+
gcloud iam workforce-pools create-cred-config \
|
| 871 |
+
locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID \
|
| 872 |
+
--subject-token-type=urn:ietf:params:oauth:token-type:id_token \
|
| 873 |
+
--credential-source-file=$PATH_TO_OIDC_ID_TOKEN \
|
| 874 |
+
--workforce-pool-user-project=$WORKFORCE_POOL_USER_PROJECT \
|
| 875 |
+
# Optional arguments for file types. Default is "text":
|
| 876 |
+
# --credential-source-type "json" \
|
| 877 |
+
# Optional argument for the field that contains the OIDC credential.
|
| 878 |
+
# This is required for json.
|
| 879 |
+
# --credential-source-field-name "id_token" \
|
| 880 |
+
--output-file=/path/to/generated/config.json
|
| 881 |
+
```
|
| 882 |
+
Where the following variables need to be substituted:
|
| 883 |
+
- `$WORKFORCE_POOL_ID`: The workforce pool ID.
|
| 884 |
+
- `$PROVIDER_ID`: The provider ID.
|
| 885 |
+
- `$PATH_TO_OIDC_ID_TOKEN`: The file path used to retrieve the OIDC token.
|
| 886 |
+
- `$WORKFORCE_POOL_USER_PROJECT`: The project number associated with the [workforce pools user project](https://cloud.google.com/iam/docs/workforce-identity-federation#workforce-pools-user-project).
|
| 887 |
+
|
| 888 |
+
To generate a file-sourced SAML configuration, run the following command:
|
| 889 |
+
|
| 890 |
+
```bash
|
| 891 |
+
# Generate a SAML configuration file for file-sourced credentials.
|
| 892 |
+
gcloud iam workforce-pools create-cred-config \
|
| 893 |
+
locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID \
|
| 894 |
+
--credential-source-file=$PATH_TO_SAML_ASSERTION \
|
| 895 |
+
--subject-token-type=urn:ietf:params:oauth:token-type:saml2 \
|
| 896 |
+
--workforce-pool-user-project=$WORKFORCE_POOL_USER_PROJECT \
|
| 897 |
+
--output-file=/path/to/generated/config.json
|
| 898 |
+
```
|
| 899 |
+
|
| 900 |
+
Where the following variables need to be substituted:
|
| 901 |
+
- `$WORKFORCE_POOL_ID`: The workforce pool ID.
|
| 902 |
+
- `$PROVIDER_ID`: The provider ID.
|
| 903 |
+
- `$PATH_TO_SAML_ASSERTION`: The file path used to retrieve the base64-encoded SAML assertion.
|
| 904 |
+
- `$WORKFORCE_POOL_USER_PROJECT`: The project number associated with the [workforce pools user project](https://cloud.google.com/iam/docs/workforce-identity-federation#workforce-pools-user-project).
|
| 905 |
+
|
| 906 |
+
These commands generate the configuration file in the specified output file.
|
| 907 |
+
|
| 908 |
+
**URL-sourced credentials**
|
| 909 |
+
For URL-sourced credentials, a local server needs to host a GET endpoint to return the OIDC token.
|
| 910 |
+
The response can be in plain text or JSON. Additional required request headers can also be
|
| 911 |
+
specified.
|
| 912 |
+
|
| 913 |
+
To generate a URL-sourced OIDC workforce identity configuration, run the following command:
|
| 914 |
+
|
| 915 |
+
```bash
|
| 916 |
+
# Generate an OIDC configuration file for URL-sourced credentials.
|
| 917 |
+
gcloud iam workforce-pools create-cred-config \
|
| 918 |
+
locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID \
|
| 919 |
+
--subject-token-type=urn:ietf:params:oauth:token-type:id_token \
|
| 920 |
+
--credential-source-url=$URL_TO_RETURN_OIDC_ID_TOKEN \
|
| 921 |
+
--credential-source-headers $HEADER_KEY=$HEADER_VALUE \
|
| 922 |
+
--workforce-pool-user-project=$WORKFORCE_POOL_USER_PROJECT \
|
| 923 |
+
--output-file=/path/to/generated/config.json
|
| 924 |
+
```
|
| 925 |
+
|
| 926 |
+
Where the following variables need to be substituted:
|
| 927 |
+
- `$WORKFORCE_POOL_ID`: The workforce pool ID.
|
| 928 |
+
- `$PROVIDER_ID`: The provider ID.
|
| 929 |
+
- `$URL_TO_RETURN_OIDC_ID_TOKEN`: The URL of the local server endpoint.
|
| 930 |
+
- `$HEADER_KEY` and `$HEADER_VALUE`: The additional header key/value pairs to pass along the GET request to
|
| 931 |
+
`$URL_TO_GET_OIDC_TOKEN`, e.g. `Metadata-Flavor=Google`.
|
| 932 |
+
- `$WORKFORCE_POOL_USER_PROJECT`: The project number associated with the [workforce pools user project](https://cloud.google.com/iam/docs/workforce-identity-federation#workforce-pools-user-project).
|
| 933 |
+
|
| 934 |
+
To generate a URL-sourced SAML configuration, run the following command:
|
| 935 |
+
|
| 936 |
+
```bash
|
| 937 |
+
# Generate a SAML configuration file for file-sourced credentials.
|
| 938 |
+
gcloud iam workforce-pools create-cred-config \
|
| 939 |
+
locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID \
|
| 940 |
+
--subject-token-type=urn:ietf:params:oauth:token-type:saml2 \
|
| 941 |
+
--credential-source-url=$URL_TO_GET_SAML_ASSERTION \
|
| 942 |
+
--credential-source-headers $HEADER_KEY=$HEADER_VALUE \
|
| 943 |
+
--workforce-pool-user-project=$WORKFORCE_POOL_USER_PROJECT \
|
| 944 |
+
--output-file=/path/to/generated/config.json
|
| 945 |
+
```
|
| 946 |
+
|
| 947 |
+
These commands generate the configuration file in the specified output file.
|
| 948 |
+
|
| 949 |
+
Where the following variables need to be substituted:
|
| 950 |
+
- `$WORKFORCE_POOL_ID`: The workforce pool ID.
|
| 951 |
+
- `$PROVIDER_ID`: The provider ID.
|
| 952 |
+
- `$URL_TO_GET_SAML_ASSERTION`: The URL of the local server endpoint.
|
| 953 |
+
- `$HEADER_KEY` and `$HEADER_VALUE`: The additional header key/value pairs to pass along the GET request to
|
| 954 |
+
`$URL_TO_GET_SAML_ASSERTION`, e.g. `Metadata-Flavor=Google`.
|
| 955 |
+
- `$WORKFORCE_POOL_USER_PROJECT`: The project number associated with the [workforce pools user project](https://cloud.google.com/iam/docs/workforce-identity-federation#workforce-pools-user-project).
|
| 956 |
+
|
| 957 |
+
### Using Executable-sourced workforce credentials with OIDC and SAML
|
| 958 |
+
|
| 959 |
+
**Executable-sourced credentials**
|
| 960 |
+
For executable-sourced credentials, a local executable is used to retrieve the 3rd party token.
|
| 961 |
+
The executable must handle providing a valid, unexpired OIDC ID token or SAML assertion in JSON format
|
| 962 |
+
to stdout.
|
| 963 |
+
|
| 964 |
+
To use executable-sourced credentials, the `GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES`
|
| 965 |
+
environment variable must be set to `1`.
|
| 966 |
+
|
| 967 |
+
To generate an executable-sourced workforce identity configuration, run the following command:
|
| 968 |
+
|
| 969 |
+
```bash
|
| 970 |
+
# Generate a configuration file for executable-sourced credentials.
|
| 971 |
+
gcloud iam workforce-pools create-cred-config \
|
| 972 |
+
locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID \
|
| 973 |
+
--subject-token-type=$SUBJECT_TOKEN_TYPE \
|
| 974 |
+
# The absolute path for the program, including arguments.
|
| 975 |
+
# e.g. --executable-command="/path/to/command --foo=bar"
|
| 976 |
+
--executable-command=$EXECUTABLE_COMMAND \
|
| 977 |
+
# Optional argument for the executable timeout. Defaults to 30s.
|
| 978 |
+
# --executable-timeout-millis=$EXECUTABLE_TIMEOUT \
|
| 979 |
+
# Optional argument for the absolute path to the executable output file.
|
| 980 |
+
# See below on how this argument impacts the library behaviour.
|
| 981 |
+
# --executable-output-file=$EXECUTABLE_OUTPUT_FILE \
|
| 982 |
+
--workforce-pool-user-project=$WORKFORCE_POOL_USER_PROJECT \
|
| 983 |
+
--output-file /path/to/generated/config.json
|
| 984 |
+
```
|
| 985 |
+
Where the following variables need to be substituted:
|
| 986 |
+
- `$WORKFORCE_POOL_ID`: The workforce pool ID.
|
| 987 |
+
- `$PROVIDER_ID`: The provider ID.
|
| 988 |
+
- `$SUBJECT_TOKEN_TYPE`: The subject token type.
|
| 989 |
+
- `$EXECUTABLE_COMMAND`: The full command to run, including arguments. Must be an absolute path to the program.
|
| 990 |
+
- `$WORKFORCE_POOL_USER_PROJECT`: The project number associated with the [workforce pools user project](https://cloud.google.com/iam/docs/workforce-identity-federation#workforce-pools-user-project).
|
| 991 |
+
|
| 992 |
+
The `--executable-timeout-millis` flag is optional. This is the duration for which
|
| 993 |
+
the auth library will wait for the executable to finish, in milliseconds.
|
| 994 |
+
Defaults to 30 seconds when not provided. The maximum allowed value is 2 minutes.
|
| 995 |
+
The minimum is 5 seconds.
|
| 996 |
+
|
| 997 |
+
The `--executable-output-file` flag is optional. If provided, the file path must
|
| 998 |
+
point to the 3rd party credential response generated by the executable. This is useful
|
| 999 |
+
for caching the credentials. By specifying this path, the Auth libraries will first
|
| 1000 |
+
check for its existence before running the executable. By caching the executable JSON
|
| 1001 |
+
response to this file, it improves performance as it avoids the need to run the executable
|
| 1002 |
+
until the cached credentials in the output file are expired. The executable must
|
| 1003 |
+
handle writing to this file - the auth libraries will only attempt to read from
|
| 1004 |
+
this location. The format of contents in the file should match the JSON format
|
| 1005 |
+
expected by the executable shown below.
|
| 1006 |
+
|
| 1007 |
+
To retrieve the 3rd party token, the library will call the executable
|
| 1008 |
+
using the command specified. The executable's output must adhere to the response format
|
| 1009 |
+
specified below. It must output the response to stdout.
|
| 1010 |
+
|
| 1011 |
+
Refer to the [using executable-sourced credentials with Workload Identity Federation](#using-executable-sourced-credentials-with-oidc-and-saml)
|
| 1012 |
+
above for the executable response specification.
|
| 1013 |
+
|
| 1014 |
+
##### Security considerations
|
| 1015 |
+
The following security practices are highly recommended:
|
| 1016 |
+
* Access to the script should be restricted as it will be displaying credentials to stdout. This ensures that rogue processes do not gain access to the script.
|
| 1017 |
+
* The configuration file should not be modifiable. Write access should be restricted to avoid processes modifying the executable command portion.
|
| 1018 |
+
|
| 1019 |
+
Given the complexity of using executable-sourced credentials, it is recommended to use
|
| 1020 |
+
the existing supported mechanisms (file-sourced/URL-sourced) for providing 3rd party
|
| 1021 |
+
credentials unless they do not meet your specific requirements.
|
| 1022 |
+
|
| 1023 |
+
You can now [use the Auth library](#using-external-identities) to call Google Cloud
|
| 1024 |
+
resources from an OIDC or SAML provider.
|
| 1025 |
+
|
| 1026 |
+
### Accessing resources from an OIDC or SAML2.0 identity provider using a custom supplier
|
| 1027 |
+
|
| 1028 |
+
If you want to use OIDC or SAML2.0 that cannot be retrieved using methods supported natively by this library,
|
| 1029 |
+
a custom SubjectTokenSupplier implementation may be specified when creating an identity pool client. The supplier must
|
| 1030 |
+
return a valid, unexpired subject token when called by the GCP credential.
|
| 1031 |
+
|
| 1032 |
+
Note that the client does not cache the returned subject token, so caching logic should be implemented in the supplier to prevent multiple requests for the same resources.
|
| 1033 |
+
|
| 1034 |
+
```ts
|
| 1035 |
+
class CustomSupplier implements SubjectTokenSupplier {
|
| 1036 |
+
async getSubjectToken(
|
| 1037 |
+
context: ExternalAccountSupplierContext
|
| 1038 |
+
): Promise<string> {
|
| 1039 |
+
const audience = context.audience;
|
| 1040 |
+
const subjectTokenType = context.subjectTokenType;
|
| 1041 |
+
// Return a valid subject token for the requested audience and subject token type.
|
| 1042 |
+
}
|
| 1043 |
+
}
|
| 1044 |
+
|
| 1045 |
+
const clientOptions = {
|
| 1046 |
+
audience: '//iam.googleapis.com/locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID', // Set the GCP audience.
|
| 1047 |
+
subject_token_type: 'urn:ietf:params:oauth:token-type:id_token', // Set the subject token type.
|
| 1048 |
+
subject_token_supplier: new CustomSupplier() // Set the custom supplier.
|
| 1049 |
+
}
|
| 1050 |
+
|
| 1051 |
+
const client = new CustomSupplier(clientOptions);
|
| 1052 |
+
```
|
| 1053 |
+
|
| 1054 |
+
Where the audience is: `//iam.googleapis.com/locations/global/workforcePools/$WORKFORCE_POOL_ID/providers/$PROVIDER_ID`
|
| 1055 |
+
|
| 1056 |
+
Where the following variables need to be substituted:
|
| 1057 |
+
|
| 1058 |
+
* `$WORKFORCE_POOL_ID`: The worforce pool ID.
|
| 1059 |
+
* `$PROVIDER_ID`: The provider ID.
|
| 1060 |
+
|
| 1061 |
+
and the workforce pool user project is the project number associated with the [workforce pools user project](https://cloud.google.com/iam/docs/workforce-identity-federation#workforce-pools-user-project).
|
| 1062 |
+
|
| 1063 |
+
The values for audience, service account impersonation URL, and any other builder field can also be found by generating a [credential configuration file with the gcloud CLI](https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#use_configuration_files_for_sign-in).
|
| 1064 |
+
|
| 1065 |
+
### Using External Identities
|
| 1066 |
+
|
| 1067 |
+
External identities (AWS, Azure and OIDC-based providers) can be used with `Application Default Credentials`.
|
| 1068 |
+
In order to use external identities with Application Default Credentials, you need to generate the JSON credentials configuration file for your external identity as described above.
|
| 1069 |
+
Once generated, store the path to this file in the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
|
| 1070 |
+
|
| 1071 |
+
```bash
|
| 1072 |
+
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/config.json
|
| 1073 |
+
```
|
| 1074 |
+
|
| 1075 |
+
The library can now automatically choose the right type of client and initialize credentials from the context provided in the configuration file.
|
| 1076 |
+
|
| 1077 |
+
```js
|
| 1078 |
+
async function main() {
|
| 1079 |
+
const auth = new GoogleAuth({
|
| 1080 |
+
scopes: 'https://www.googleapis.com/auth/cloud-platform'
|
| 1081 |
+
});
|
| 1082 |
+
const client = await auth.getClient();
|
| 1083 |
+
const projectId = await auth.getProjectId();
|
| 1084 |
+
// List all buckets in a project.
|
| 1085 |
+
const url = `https://storage.googleapis.com/storage/v1/b?project=${projectId}`;
|
| 1086 |
+
const res = await client.request({ url });
|
| 1087 |
+
console.log(res.data);
|
| 1088 |
+
}
|
| 1089 |
+
```
|
| 1090 |
+
|
| 1091 |
+
When using external identities with Application Default Credentials in Node.js, the `roles/browser` role needs to be granted to the service account.
|
| 1092 |
+
The `Cloud Resource Manager API` should also be enabled on the project.
|
| 1093 |
+
This is needed since the library will try to auto-discover the project ID from the current environment using the impersonated credential.
|
| 1094 |
+
To avoid this requirement, the project ID can be explicitly specified on initialization.
|
| 1095 |
+
|
| 1096 |
+
```js
|
| 1097 |
+
const auth = new GoogleAuth({
|
| 1098 |
+
scopes: 'https://www.googleapis.com/auth/cloud-platform',
|
| 1099 |
+
// Pass the project ID explicitly to avoid the need to grant `roles/browser` to the service account
|
| 1100 |
+
// or enable Cloud Resource Manager API on the project.
|
| 1101 |
+
projectId: 'CLOUD_RESOURCE_PROJECT_ID',
|
| 1102 |
+
});
|
| 1103 |
+
```
|
| 1104 |
+
|
| 1105 |
+
You can also explicitly initialize external account clients using the generated configuration file.
|
| 1106 |
+
|
| 1107 |
+
```js
|
| 1108 |
+
const {ExternalAccountClient} = require('google-auth-library');
|
| 1109 |
+
const jsonConfig = require('/path/to/config.json');
|
| 1110 |
+
|
| 1111 |
+
async function main() {
|
| 1112 |
+
const client = ExternalAccountClient.fromJSON(jsonConfig);
|
| 1113 |
+
client.scopes = ['https://www.googleapis.com/auth/cloud-platform'];
|
| 1114 |
+
// List all buckets in a project.
|
| 1115 |
+
const url = `https://storage.googleapis.com/storage/v1/b?project=${projectId}`;
|
| 1116 |
+
const res = await client.request({url});
|
| 1117 |
+
console.log(res.data);
|
| 1118 |
+
}
|
| 1119 |
+
```
|
| 1120 |
+
|
| 1121 |
+
#### Security Considerations
|
| 1122 |
+
Note that this library does not perform any validation on the token_url, token_info_url, or service_account_impersonation_url fields of the credential configuration. It is not recommended to use a credential configuration that you did not generate with the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain.
|
| 1123 |
+
|
| 1124 |
+
## Working with ID Tokens
|
| 1125 |
+
### Fetching ID Tokens
|
| 1126 |
+
If your application is running on Cloud Run or Cloud Functions, or using Cloud Identity-Aware
|
| 1127 |
+
Proxy (IAP), you will need to fetch an ID token to access your application. For
|
| 1128 |
+
this, use the method `getIdTokenClient` on the `GoogleAuth` client.
|
| 1129 |
+
|
| 1130 |
+
For invoking Cloud Run services, your service account will need the
|
| 1131 |
+
[`Cloud Run Invoker`](https://cloud.google.com/run/docs/authenticating/service-to-service)
|
| 1132 |
+
IAM permission.
|
| 1133 |
+
|
| 1134 |
+
For invoking Cloud Functions, your service account will need the
|
| 1135 |
+
[`Function Invoker`](https://cloud.google.com/functions/docs/securing/authenticating#function-to-function)
|
| 1136 |
+
IAM permission.
|
| 1137 |
+
|
| 1138 |
+
``` js
|
| 1139 |
+
// Make a request to a protected Cloud Run service.
|
| 1140 |
+
const {GoogleAuth} = require('google-auth-library');
|
| 1141 |
+
|
| 1142 |
+
async function main() {
|
| 1143 |
+
const url = 'https://cloud-run-1234-uc.a.run.app';
|
| 1144 |
+
const auth = new GoogleAuth();
|
| 1145 |
+
const client = await auth.getIdTokenClient(url);
|
| 1146 |
+
const res = await client.request({url});
|
| 1147 |
+
console.log(res.data);
|
| 1148 |
+
}
|
| 1149 |
+
|
| 1150 |
+
main().catch(console.error);
|
| 1151 |
+
```
|
| 1152 |
+
|
| 1153 |
+
A complete example can be found in [`samples/idtokens-serverless.js`](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/idtokens-serverless.js).
|
| 1154 |
+
|
| 1155 |
+
For invoking Cloud Identity-Aware Proxy, you will need to pass the Client ID
|
| 1156 |
+
used when you set up your protected resource as the target audience.
|
| 1157 |
+
|
| 1158 |
+
``` js
|
| 1159 |
+
// Make a request to a protected Cloud Identity-Aware Proxy (IAP) resource
|
| 1160 |
+
const {GoogleAuth} = require('google-auth-library');
|
| 1161 |
+
|
| 1162 |
+
async function main()
|
| 1163 |
+
const targetAudience = 'iap-client-id';
|
| 1164 |
+
const url = 'https://iap-url.com';
|
| 1165 |
+
const auth = new GoogleAuth();
|
| 1166 |
+
const client = await auth.getIdTokenClient(targetAudience);
|
| 1167 |
+
const res = await client.request({url});
|
| 1168 |
+
console.log(res.data);
|
| 1169 |
+
}
|
| 1170 |
+
|
| 1171 |
+
main().catch(console.error);
|
| 1172 |
+
```
|
| 1173 |
+
|
| 1174 |
+
A complete example can be found in [`samples/idtokens-iap.js`](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/idtokens-iap.js).
|
| 1175 |
+
|
| 1176 |
+
### Verifying ID Tokens
|
| 1177 |
+
|
| 1178 |
+
If you've [secured your IAP app with signed headers](https://cloud.google.com/iap/docs/signed-headers-howto),
|
| 1179 |
+
you can use this library to verify the IAP header:
|
| 1180 |
+
|
| 1181 |
+
```js
|
| 1182 |
+
const {OAuth2Client} = require('google-auth-library');
|
| 1183 |
+
// Expected audience for App Engine.
|
| 1184 |
+
const expectedAudience = `/projects/your-project-number/apps/your-project-id`;
|
| 1185 |
+
// IAP issuer
|
| 1186 |
+
const issuers = ['https://cloud.google.com/iap'];
|
| 1187 |
+
// Verify the token. OAuth2Client throws an Error if verification fails
|
| 1188 |
+
const oAuth2Client = new OAuth2Client();
|
| 1189 |
+
const response = await oAuth2Client.getIapCerts();
|
| 1190 |
+
const ticket = await oAuth2Client.verifySignedJwtWithCertsAsync(
|
| 1191 |
+
idToken,
|
| 1192 |
+
response.pubkeys,
|
| 1193 |
+
expectedAudience,
|
| 1194 |
+
issuers
|
| 1195 |
+
);
|
| 1196 |
+
|
| 1197 |
+
// Print out the info contained in the IAP ID token
|
| 1198 |
+
console.log(ticket)
|
| 1199 |
+
```
|
| 1200 |
+
|
| 1201 |
+
A complete example can be found in [`samples/verifyIdToken-iap.js`](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/verifyIdToken-iap.js).
|
| 1202 |
+
|
| 1203 |
+
## Impersonated Credentials Client
|
| 1204 |
+
|
| 1205 |
+
Google Cloud Impersonated credentials used for [Creating short-lived service account credentials](https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials).
|
| 1206 |
+
|
| 1207 |
+
Provides authentication for applications where local credentials impersonates a remote service account using [IAM Credentials API](https://cloud.google.com/iam/docs/reference/credentials/rest).
|
| 1208 |
+
|
| 1209 |
+
An Impersonated Credentials Client is instantiated with a `sourceClient`. This
|
| 1210 |
+
client should use credentials that have the "Service Account Token Creator" role (`roles/iam.serviceAccountTokenCreator`),
|
| 1211 |
+
and should authenticate with the `https://www.googleapis.com/auth/cloud-platform`, or `https://www.googleapis.com/auth/iam` scopes.
|
| 1212 |
+
|
| 1213 |
+
`sourceClient` is used by the Impersonated
|
| 1214 |
+
Credentials Client to impersonate a target service account with a specified
|
| 1215 |
+
set of scopes.
|
| 1216 |
+
|
| 1217 |
+
### Sample Usage
|
| 1218 |
+
|
| 1219 |
+
```javascript
|
| 1220 |
+
const { GoogleAuth, Impersonated } = require('google-auth-library');
|
| 1221 |
+
const { SecretManagerServiceClient } = require('@google-cloud/secret-manager');
|
| 1222 |
+
|
| 1223 |
+
async function main() {
|
| 1224 |
+
|
| 1225 |
+
// Acquire source credentials:
|
| 1226 |
+
const auth = new GoogleAuth();
|
| 1227 |
+
const client = await auth.getClient();
|
| 1228 |
+
|
| 1229 |
+
// Impersonate new credentials:
|
| 1230 |
+
let targetClient = new Impersonated({
|
| 1231 |
+
sourceClient: client,
|
| 1232 |
+
targetPrincipal: 'impersonated-account@projectID.iam.gserviceaccount.com',
|
| 1233 |
+
lifetime: 30,
|
| 1234 |
+
delegates: [],
|
| 1235 |
+
targetScopes: ['https://www.googleapis.com/auth/cloud-platform']
|
| 1236 |
+
});
|
| 1237 |
+
|
| 1238 |
+
// Get impersonated credentials:
|
| 1239 |
+
const authHeaders = await targetClient.getRequestHeaders();
|
| 1240 |
+
// Do something with `authHeaders.Authorization`.
|
| 1241 |
+
|
| 1242 |
+
// Use impersonated credentials:
|
| 1243 |
+
const url = 'https://www.googleapis.com/storage/v1/b?project=anotherProjectID'
|
| 1244 |
+
const resp = await targetClient.request({ url });
|
| 1245 |
+
for (const bucket of resp.data.items) {
|
| 1246 |
+
console.log(bucket.name);
|
| 1247 |
+
}
|
| 1248 |
+
|
| 1249 |
+
// Use impersonated credentials with google-cloud client library
|
| 1250 |
+
// Note: this works only with certain cloud client libraries utilizing gRPC
|
| 1251 |
+
// e.g., SecretManager, KMS, AIPlatform
|
| 1252 |
+
// will not currently work with libraries using REST, e.g., Storage, Compute
|
| 1253 |
+
const smClient = new SecretManagerServiceClient({
|
| 1254 |
+
projectId: anotherProjectID,
|
| 1255 |
+
auth: {
|
| 1256 |
+
getClient: () => targetClient,
|
| 1257 |
+
},
|
| 1258 |
+
});
|
| 1259 |
+
const secretName = 'projects/anotherProjectNumber/secrets/someProjectName/versions/1';
|
| 1260 |
+
const [accessResponse] = await smClient.accessSecretVersion({
|
| 1261 |
+
name: secretName,
|
| 1262 |
+
});
|
| 1263 |
+
|
| 1264 |
+
const responsePayload = accessResponse.payload.data.toString('utf8');
|
| 1265 |
+
// Do something with the secret contained in `responsePayload`.
|
| 1266 |
+
};
|
| 1267 |
+
|
| 1268 |
+
main();
|
| 1269 |
+
```
|
| 1270 |
+
|
| 1271 |
+
## Downscoped Client
|
| 1272 |
+
|
| 1273 |
+
[Downscoping with Credential Access Boundaries](https://cloud.google.com/iam/docs/downscoping-short-lived-credentials) is used to restrict the Identity and Access Management (IAM) permissions that a short-lived credential can use.
|
| 1274 |
+
|
| 1275 |
+
The `DownscopedClient` class can be used to produce a downscoped access token from a
|
| 1276 |
+
`CredentialAccessBoundary` and a source credential. The Credential Access Boundary specifies which resources the newly created credential can access, as well as an upper bound on the permissions that are available on each resource. Using downscoped credentials ensures tokens in flight always have the least privileges, e.g. Principle of Least Privilege.
|
| 1277 |
+
|
| 1278 |
+
> Notice: Only Cloud Storage supports Credential Access Boundaries for now.
|
| 1279 |
+
|
| 1280 |
+
### Sample Usage
|
| 1281 |
+
There are two entities needed to generate and use credentials generated from
|
| 1282 |
+
Downscoped Client with Credential Access Boundaries.
|
| 1283 |
+
|
| 1284 |
+
- Token broker: This is the entity with elevated permissions. This entity has the permissions needed to generate downscoped tokens. The common pattern of usage is to have a token broker with elevated access generate these downscoped credentials from higher access source credentials and pass the downscoped short-lived access tokens to a token consumer via some secure authenticated channel for limited access to Google Cloud Storage resources.
|
| 1285 |
+
|
| 1286 |
+
``` js
|
| 1287 |
+
const {GoogleAuth, DownscopedClient} = require('google-auth-library');
|
| 1288 |
+
// Define CAB rules which will restrict the downscoped token to have readonly
|
| 1289 |
+
// access to objects starting with "customer-a" in bucket "bucket_name".
|
| 1290 |
+
const cabRules = {
|
| 1291 |
+
accessBoundary: {
|
| 1292 |
+
accessBoundaryRules: [
|
| 1293 |
+
{
|
| 1294 |
+
availableResource: `//storage.googleapis.com/projects/_/buckets/bucket_name`,
|
| 1295 |
+
availablePermissions: ['inRole:roles/storage.objectViewer'],
|
| 1296 |
+
availabilityCondition: {
|
| 1297 |
+
expression:
|
| 1298 |
+
`resource.name.startsWith('projects/_/buckets/` +
|
| 1299 |
+
`bucket_name/objects/customer-a)`
|
| 1300 |
+
}
|
| 1301 |
+
},
|
| 1302 |
+
],
|
| 1303 |
+
},
|
| 1304 |
+
};
|
| 1305 |
+
|
| 1306 |
+
// This will use ADC to get the credentials used for the downscoped client.
|
| 1307 |
+
const googleAuth = new GoogleAuth({
|
| 1308 |
+
scopes: ['https://www.googleapis.com/auth/cloud-platform']
|
| 1309 |
+
});
|
| 1310 |
+
|
| 1311 |
+
// Obtain an authenticated client via ADC.
|
| 1312 |
+
const client = await googleAuth.getClient();
|
| 1313 |
+
|
| 1314 |
+
// Use the client to create a DownscopedClient.
|
| 1315 |
+
const cabClient = new DownscopedClient(client, cab);
|
| 1316 |
+
|
| 1317 |
+
// Refresh the tokens.
|
| 1318 |
+
const refreshedAccessToken = await cabClient.getAccessToken();
|
| 1319 |
+
|
| 1320 |
+
// This will need to be passed to the token consumer.
|
| 1321 |
+
access_token = refreshedAccessToken.token;
|
| 1322 |
+
expiry_date = refreshedAccessToken.expirationTime;
|
| 1323 |
+
```
|
| 1324 |
+
|
| 1325 |
+
A token broker can be set up on a server in a private network. Various workloads
|
| 1326 |
+
(token consumers) in the same network will send authenticated requests to that broker for downscoped tokens to access or modify specific google cloud storage buckets.
|
| 1327 |
+
|
| 1328 |
+
The broker will instantiate downscoped credentials instances that can be used to generate short lived downscoped access tokens which will be passed to the token consumer.
|
| 1329 |
+
|
| 1330 |
+
- Token consumer: This is the consumer of the downscoped tokens. This entity does not have the direct ability to generate access tokens and instead relies on the token broker to provide it with downscoped tokens to run operations on GCS buckets. It is assumed that the downscoped token consumer may have its own mechanism to authenticate itself with the token broker.
|
| 1331 |
+
|
| 1332 |
+
``` js
|
| 1333 |
+
const {OAuth2Client} = require('google-auth-library');
|
| 1334 |
+
const {Storage} = require('@google-cloud/storage');
|
| 1335 |
+
|
| 1336 |
+
// Create the OAuth credentials (the consumer).
|
| 1337 |
+
const oauth2Client = new OAuth2Client();
|
| 1338 |
+
// We are defining a refresh handler instead of a one-time access
|
| 1339 |
+
// token/expiry pair.
|
| 1340 |
+
// This will allow the consumer to obtain new downscoped tokens on
|
| 1341 |
+
// demand every time a token is expired, without any additional code
|
| 1342 |
+
// changes.
|
| 1343 |
+
oauth2Client.refreshHandler = async () => {
|
| 1344 |
+
// The common pattern of usage is to have a token broker pass the
|
| 1345 |
+
// downscoped short-lived access tokens to a token consumer via some
|
| 1346 |
+
// secure authenticated channel.
|
| 1347 |
+
const refreshedAccessToken = await cabClient.getAccessToken();
|
| 1348 |
+
return {
|
| 1349 |
+
access_token: refreshedAccessToken.token,
|
| 1350 |
+
expiry_date: refreshedAccessToken.expirationTime,
|
| 1351 |
+
}
|
| 1352 |
+
};
|
| 1353 |
+
|
| 1354 |
+
// Use the consumer client to define storageOptions and create a GCS object.
|
| 1355 |
+
const storageOptions = {
|
| 1356 |
+
projectId: 'my_project_id',
|
| 1357 |
+
authClient: oauth2Client,
|
| 1358 |
+
};
|
| 1359 |
+
|
| 1360 |
+
const storage = new Storage(storageOptions);
|
| 1361 |
+
|
| 1362 |
+
const downloadFile = await storage
|
| 1363 |
+
.bucket('bucket_name')
|
| 1364 |
+
.file('customer-a-data.txt')
|
| 1365 |
+
.download();
|
| 1366 |
+
console.log(downloadFile.toString('utf8'));
|
| 1367 |
+
|
| 1368 |
+
main().catch(console.error);
|
| 1369 |
+
```
|
| 1370 |
+
|
| 1371 |
+
|
| 1372 |
+
## Samples
|
| 1373 |
+
|
| 1374 |
+
Samples are in the [`samples/`](https://github.com/googleapis/google-auth-library-nodejs/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
|
| 1375 |
+
|
| 1376 |
+
| Sample | Source Code | Try it |
|
| 1377 |
+
| --------------------------- | --------------------------------- | ------ |
|
| 1378 |
+
| Adc | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/adc.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/adc.js,samples/README.md) |
|
| 1379 |
+
| Authenticate API Key | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/authenticateAPIKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/authenticateAPIKey.js,samples/README.md) |
|
| 1380 |
+
| Authenticate Explicit | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/authenticateExplicit.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/authenticateExplicit.js,samples/README.md) |
|
| 1381 |
+
| Authenticate Implicit With Adc | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/authenticateImplicitWithAdc.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/authenticateImplicitWithAdc.js,samples/README.md) |
|
| 1382 |
+
| Compute | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/compute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/compute.js,samples/README.md) |
|
| 1383 |
+
| Credentials | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/credentials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/credentials.js,samples/README.md) |
|
| 1384 |
+
| Downscopedclient | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/downscopedclient.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/downscopedclient.js,samples/README.md) |
|
| 1385 |
+
| Headers | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/headers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/headers.js,samples/README.md) |
|
| 1386 |
+
| Id Token From Impersonated Credentials | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/idTokenFromImpersonatedCredentials.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/idTokenFromImpersonatedCredentials.js,samples/README.md) |
|
| 1387 |
+
| Id Token From Metadata Server | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/idTokenFromMetadataServer.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/idTokenFromMetadataServer.js,samples/README.md) |
|
| 1388 |
+
| Id Token From Service Account | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/idTokenFromServiceAccount.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/idTokenFromServiceAccount.js,samples/README.md) |
|
| 1389 |
+
| ID Tokens for Identity-Aware Proxy (IAP) | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/idtokens-iap.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/idtokens-iap.js,samples/README.md) |
|
| 1390 |
+
| ID Tokens for Serverless | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/idtokens-serverless.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/idtokens-serverless.js,samples/README.md) |
|
| 1391 |
+
| Jwt | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/jwt.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/jwt.js,samples/README.md) |
|
| 1392 |
+
| Keepalive | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/keepalive.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/keepalive.js,samples/README.md) |
|
| 1393 |
+
| Keyfile | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/keyfile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/keyfile.js,samples/README.md) |
|
| 1394 |
+
| Oauth2-code Verifier | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2-codeVerifier.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/oauth2-codeVerifier.js,samples/README.md) |
|
| 1395 |
+
| Oauth2 | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/oauth2.js,samples/README.md) |
|
| 1396 |
+
| Sign Blob | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/signBlob.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/signBlob.js,samples/README.md) |
|
| 1397 |
+
| Sign Blob Impersonated | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/signBlobImpersonated.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/signBlobImpersonated.js,samples/README.md) |
|
| 1398 |
+
| Verify Google Id Token | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/verifyGoogleIdToken.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/verifyGoogleIdToken.js,samples/README.md) |
|
| 1399 |
+
| Verifying ID Tokens from Identity-Aware Proxy (IAP) | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/verifyIdToken-iap.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/verifyIdToken-iap.js,samples/README.md) |
|
| 1400 |
+
| Verify Id Token | [source code](https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/verifyIdToken.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-auth-library-nodejs&page=editor&open_in_editor=samples/verifyIdToken.js,samples/README.md) |
|
| 1401 |
+
|
| 1402 |
+
|
| 1403 |
+
|
| 1404 |
+
The [Google Auth Library Node.js Client API Reference][client-docs] documentation
|
| 1405 |
+
also contains samples.
|
| 1406 |
+
|
| 1407 |
+
## Supported Node.js Versions
|
| 1408 |
+
|
| 1409 |
+
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
|
| 1410 |
+
Libraries are compatible with all current _active_ and _maintenance_ versions of
|
| 1411 |
+
Node.js.
|
| 1412 |
+
If you are using an end-of-life version of Node.js, we recommend that you update
|
| 1413 |
+
as soon as possible to an actively supported LTS version.
|
| 1414 |
+
|
| 1415 |
+
Google's client libraries support legacy versions of Node.js runtimes on a
|
| 1416 |
+
best-efforts basis with the following warnings:
|
| 1417 |
+
|
| 1418 |
+
* Legacy versions are not tested in continuous integration.
|
| 1419 |
+
* Some security patches and features cannot be backported.
|
| 1420 |
+
* Dependencies cannot be kept up-to-date.
|
| 1421 |
+
|
| 1422 |
+
Client libraries targeting some end-of-life versions of Node.js are available, and
|
| 1423 |
+
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
|
| 1424 |
+
The dist-tags follow the naming convention `legacy-(version)`.
|
| 1425 |
+
For example, `npm install google-auth-library@legacy-8` installs client libraries
|
| 1426 |
+
for versions compatible with Node.js 8.
|
| 1427 |
+
|
| 1428 |
+
## Versioning
|
| 1429 |
+
|
| 1430 |
+
This library follows [Semantic Versioning](http://semver.org/).
|
| 1431 |
+
|
| 1432 |
+
|
| 1433 |
+
|
| 1434 |
+
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
|
| 1435 |
+
unless absolutely necessary (e.g. because of critical security issues) or with
|
| 1436 |
+
an extensive deprecation period. Issues and requests against **stable** libraries
|
| 1437 |
+
are addressed with the highest priority.
|
| 1438 |
+
|
| 1439 |
+
|
| 1440 |
+
|
| 1441 |
+
|
| 1442 |
+
|
| 1443 |
+
|
| 1444 |
+
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
| 1445 |
+
|
| 1446 |
+
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
| 1447 |
+
|
| 1448 |
+
## Contributing
|
| 1449 |
+
|
| 1450 |
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-auth-library-nodejs/blob/main/CONTRIBUTING.md).
|
| 1451 |
+
|
| 1452 |
+
Please note that this `README.md`, the `samples/README.md`,
|
| 1453 |
+
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
| 1454 |
+
are generated from a central template. To edit one of these files, make an edit
|
| 1455 |
+
to its templates in
|
| 1456 |
+
[directory](https://github.com/googleapis/synthtool).
|
| 1457 |
+
|
| 1458 |
+
## License
|
| 1459 |
+
|
| 1460 |
+
Apache Version 2.0
|
| 1461 |
+
|
| 1462 |
+
See [LICENSE](https://github.com/googleapis/google-auth-library-nodejs/blob/main/LICENSE)
|
| 1463 |
+
|
| 1464 |
+
[client-docs]: https://cloud.google.com/nodejs/docs/reference/google-auth-library/latest
|
| 1465 |
+
[product-docs]: https://cloud.google.com/docs/authentication/
|
| 1466 |
+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
| 1467 |
+
[projects]: https://console.cloud.google.com/project
|
| 1468 |
+
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
| 1469 |
+
|
| 1470 |
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|