mirror of
				https://github.com/musix-org/musix-oss
				synced 2025-11-04 06:49:31 +00:00 
			
		
		
		
	Updated
This commit is contained in:
		
							
								
								
									
										143
									
								
								node_modules/@google-cloud/paginator/CHANGELOG.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										143
									
								
								node_modules/@google-cloud/paginator/CHANGELOG.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,143 @@
 | 
			
		||||
# Changelog
 | 
			
		||||
 | 
			
		||||
[npm history][1]
 | 
			
		||||
 | 
			
		||||
[1]: https://www.npmjs.com/package/nodejs-paginator?activeTab=versions
 | 
			
		||||
 | 
			
		||||
### [2.0.1](https://www.github.com/googleapis/nodejs-paginator/compare/v2.0.0...v2.0.1) (2019-08-25)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Bug Fixes
 | 
			
		||||
 | 
			
		||||
* **deps:** use the latest extend ([#141](https://www.github.com/googleapis/nodejs-paginator/issues/141)) ([61b383e](https://www.github.com/googleapis/nodejs-paginator/commit/61b383e))
 | 
			
		||||
 | 
			
		||||
## [2.0.0](https://www.github.com/googleapis/nodejs-paginator/compare/v1.0.2...v2.0.0) (2019-07-12)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### ⚠ BREAKING CHANGES
 | 
			
		||||
 | 
			
		||||
* rewrite streaming logic (#136)
 | 
			
		||||
 | 
			
		||||
### Code Refactoring
 | 
			
		||||
 | 
			
		||||
* rewrite streaming logic ([#136](https://www.github.com/googleapis/nodejs-paginator/issues/136)) ([641d82d](https://www.github.com/googleapis/nodejs-paginator/commit/641d82d))
 | 
			
		||||
 | 
			
		||||
### [1.0.2](https://www.github.com/googleapis/nodejs-paginator/compare/v1.0.1...v1.0.2) (2019-06-26)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Bug Fixes
 | 
			
		||||
 | 
			
		||||
* **docs:** link to reference docs section on googleapis.dev ([#132](https://www.github.com/googleapis/nodejs-paginator/issues/132)) ([be231be](https://www.github.com/googleapis/nodejs-paginator/commit/be231be))
 | 
			
		||||
 | 
			
		||||
### [1.0.1](https://www.github.com/googleapis/nodejs-paginator/compare/v1.0.0...v1.0.1) (2019-06-14)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Bug Fixes
 | 
			
		||||
 | 
			
		||||
* **docs:** move to new client docs URL ([#129](https://www.github.com/googleapis/nodejs-paginator/issues/129)) ([689f483](https://www.github.com/googleapis/nodejs-paginator/commit/689f483))
 | 
			
		||||
 | 
			
		||||
## [1.0.0](https://www.github.com/googleapis/nodejs-paginator/compare/v0.2.0...v1.0.0) (2019-05-03)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Bug Fixes
 | 
			
		||||
 | 
			
		||||
* **deps:** update dependency arrify to v2 ([#109](https://www.github.com/googleapis/nodejs-paginator/issues/109)) ([9f06c83](https://www.github.com/googleapis/nodejs-paginator/commit/9f06c83))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Build System
 | 
			
		||||
 | 
			
		||||
* upgrade engines field to >=8.10.0 ([#115](https://www.github.com/googleapis/nodejs-paginator/issues/115)) ([0921076](https://www.github.com/googleapis/nodejs-paginator/commit/0921076))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### BREAKING CHANGES
 | 
			
		||||
 | 
			
		||||
* upgrade engines field to >=8.10.0 (#115)
 | 
			
		||||
 | 
			
		||||
## v0.2.0
 | 
			
		||||
 | 
			
		||||
03-08-2019 12:15 PST
 | 
			
		||||
 | 
			
		||||
### New Features
 | 
			
		||||
- feat: handle promise based functions ([#91](https://github.com/googleapis/nodejs-paginator/pull/91))
 | 
			
		||||
- refactor(ts): create generic for object streams ([#101](https://github.com/googleapis/nodejs-paginator/pull/101))
 | 
			
		||||
 | 
			
		||||
### Dependencies
 | 
			
		||||
- chore(deps): update dependency through2 to v3 ([#53](https://github.com/googleapis/nodejs-paginator/pull/53))
 | 
			
		||||
- chore(deps): update dependency @types/is to v0.0.21 ([#55](https://github.com/googleapis/nodejs-paginator/pull/55))
 | 
			
		||||
- chore(deps): update dependency gts to ^0.9.0 ([#57](https://github.com/googleapis/nodejs-paginator/pull/57))
 | 
			
		||||
- fix: Pin @types/sinon to last compatible version ([#61](https://github.com/googleapis/nodejs-paginator/pull/61))
 | 
			
		||||
- refactor: trim a few dependencies ([#60](https://github.com/googleapis/nodejs-paginator/pull/60))
 | 
			
		||||
- chore(deps): update dependency @types/sinon to v5.0.7 ([#62](https://github.com/googleapis/nodejs-paginator/pull/62))
 | 
			
		||||
- chore(deps): update dependency @types/sinon to v7 ([#81](https://github.com/googleapis/nodejs-paginator/pull/81))
 | 
			
		||||
- chore(deps): update dependency mocha to v6
 | 
			
		||||
 | 
			
		||||
### Documentation
 | 
			
		||||
- docs: add lint/fix example to contributing guide ([#85](https://github.com/googleapis/nodejs-paginator/pull/85))
 | 
			
		||||
- chore: move CONTRIBUTING.md to root ([#87](https://github.com/googleapis/nodejs-paginator/pull/87))
 | 
			
		||||
- docs: update links in contrib guide ([#94](https://github.com/googleapis/nodejs-paginator/pull/94))
 | 
			
		||||
- docs: update contributing path in README ([#88](https://github.com/googleapis/nodejs-paginator/pull/88))
 | 
			
		||||
 | 
			
		||||
### Internal / Testing Changes
 | 
			
		||||
- chore: include build in eslintignore ([#49](https://github.com/googleapis/nodejs-paginator/pull/49))
 | 
			
		||||
- chore: update CircleCI config ([#52](https://github.com/googleapis/nodejs-paginator/pull/52))
 | 
			
		||||
- chore: use latest npm on Windows ([#54](https://github.com/googleapis/nodejs-paginator/pull/54))
 | 
			
		||||
- chore: update eslintignore config ([#56](https://github.com/googleapis/nodejs-paginator/pull/56))
 | 
			
		||||
- chore: add synth.metadata
 | 
			
		||||
- fix(build): fix system key decryption ([#64](https://github.com/googleapis/nodejs-paginator/pull/64))
 | 
			
		||||
- chore: update license file ([#68](https://github.com/googleapis/nodejs-paginator/pull/68))
 | 
			
		||||
- chore(build): update prettier config ([#69](https://github.com/googleapis/nodejs-paginator/pull/69))
 | 
			
		||||
- chore: nyc ignore build/test by default ([#71](https://github.com/googleapis/nodejs-paginator/pull/71))
 | 
			
		||||
- chore: always nyc report before calling codecov ([#72](https://github.com/googleapis/nodejs-paginator/pull/72))
 | 
			
		||||
- build: add Kokoro configs for autorelease ([#75](https://github.com/googleapis/nodejs-paginator/pull/75))
 | 
			
		||||
- fix(build): fix Kokoro release script ([#76](https://github.com/googleapis/nodejs-paginator/pull/76))
 | 
			
		||||
- chore: fix publish.sh permission +x ([#77](https://github.com/googleapis/nodejs-paginator/pull/77))
 | 
			
		||||
- chore: update nyc and eslint configs ([#79](https://github.com/googleapis/nodejs-paginator/pull/79))
 | 
			
		||||
- chore(build): inject yoshi automation key ([#80](https://github.com/googleapis/nodejs-paginator/pull/80))
 | 
			
		||||
- build: check broken links in generated docs ([#82](https://github.com/googleapis/nodejs-paginator/pull/82))
 | 
			
		||||
- build: ignore googleapis.com in doc link check ([#84](https://github.com/googleapis/nodejs-paginator/pull/84))
 | 
			
		||||
- build: test using @grpc/grpc-js in CI ([#89](https://github.com/googleapis/nodejs-paginator/pull/89))
 | 
			
		||||
- build: create docs test npm scripts ([#90](https://github.com/googleapis/nodejs-paginator/pull/90))
 | 
			
		||||
- build: use linkinator for docs test ([#93](https://github.com/googleapis/nodejs-paginator/pull/93))
 | 
			
		||||
- build: update release configuration
 | 
			
		||||
- build: fix types for sinon ([#98](https://github.com/googleapis/nodejs-paginator/pull/98))
 | 
			
		||||
- build: use node10 to run samples-test, system-test etc ([#97](https://github.com/googleapis/nodejs-paginator/pull/97))
 | 
			
		||||
- build: Add docuploader credentials to node publish jobs ([#99](https://github.com/googleapis/nodejs-paginator/pull/99))
 | 
			
		||||
 | 
			
		||||
## v0.1.2
 | 
			
		||||
 | 
			
		||||
### Bug fixes
 | 
			
		||||
- fix: call limiter.makeRequest() instead of original method ([#43](https://github.com/googleapis/nodejs-paginator/pull/43))
 | 
			
		||||
 | 
			
		||||
### Internal / Testing Changes
 | 
			
		||||
- chore: update issue templates ([#42](https://github.com/googleapis/nodejs-paginator/pull/42))
 | 
			
		||||
- chore: remove old issue template ([#40](https://github.com/googleapis/nodejs-paginator/pull/40))
 | 
			
		||||
- build: run tests on node11 ([#39](https://github.com/googleapis/nodejs-paginator/pull/39))
 | 
			
		||||
- chores(build): run codecov on continuous builds ([#36](https://github.com/googleapis/nodejs-paginator/pull/36))
 | 
			
		||||
- chores(build): do not collect sponge.xml from windows builds ([#37](https://github.com/googleapis/nodejs-paginator/pull/37))
 | 
			
		||||
- chore: update new issue template ([#35](https://github.com/googleapis/nodejs-paginator/pull/35))
 | 
			
		||||
- chore(deps): update dependency sinon to v7 ([#31](https://github.com/googleapis/nodejs-paginator/pull/31))
 | 
			
		||||
- build: fix codecov uploading on Kokoro ([#32](https://github.com/googleapis/nodejs-paginator/pull/32))
 | 
			
		||||
- Update kokoro config ([#29](https://github.com/googleapis/nodejs-paginator/pull/29))
 | 
			
		||||
- Update CI config ([#27](https://github.com/googleapis/nodejs-paginator/pull/27))
 | 
			
		||||
- Don't publish sourcemaps ([#25](https://github.com/googleapis/nodejs-paginator/pull/25))
 | 
			
		||||
- build: prevent system/sample-test from leaking credentials
 | 
			
		||||
- Update kokoro config ([#23](https://github.com/googleapis/nodejs-paginator/pull/23))
 | 
			
		||||
- test: remove appveyor config ([#22](https://github.com/googleapis/nodejs-paginator/pull/22))
 | 
			
		||||
- Update CI config ([#21](https://github.com/googleapis/nodejs-paginator/pull/21))
 | 
			
		||||
- Enable prefer-const in the eslint config ([#20](https://github.com/googleapis/nodejs-paginator/pull/20))
 | 
			
		||||
- Enable no-var in eslint ([#19](https://github.com/googleapis/nodejs-paginator/pull/19))
 | 
			
		||||
- Update CI config ([#18](https://github.com/googleapis/nodejs-paginator/pull/18))
 | 
			
		||||
 | 
			
		||||
## v0.1.1
 | 
			
		||||
 | 
			
		||||
### Internal / Testing Changes
 | 
			
		||||
- Add synth script and update CI config (#14)
 | 
			
		||||
- chore(deps): update dependency nyc to v13 (#12)
 | 
			
		||||
- chore: ignore package-lock.json (#11)
 | 
			
		||||
- chore(deps): lock file maintenance (#10)
 | 
			
		||||
- chore: update renovate config (#9)
 | 
			
		||||
- remove that whitespace (#8)
 | 
			
		||||
- chore(deps): lock file maintenance (#7)
 | 
			
		||||
- chore(deps): update dependency typescript to v3 (#6)
 | 
			
		||||
- chore: assert.deelEqual => assert.deepStrictEqual (#5)
 | 
			
		||||
- chore: move mocha options to mocha.opts (#4)
 | 
			
		||||
							
								
								
									
										202
									
								
								node_modules/@google-cloud/paginator/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										202
									
								
								node_modules/@google-cloud/paginator/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,202 @@
 | 
			
		||||
 | 
			
		||||
                                 Apache License
 | 
			
		||||
                           Version 2.0, January 2004
 | 
			
		||||
                        http://www.apache.org/licenses/
 | 
			
		||||
 | 
			
		||||
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
 | 
			
		||||
 | 
			
		||||
   1. Definitions.
 | 
			
		||||
 | 
			
		||||
      "License" shall mean the terms and conditions for use, reproduction,
 | 
			
		||||
      and distribution as defined by Sections 1 through 9 of this document.
 | 
			
		||||
 | 
			
		||||
      "Licensor" shall mean the copyright owner or entity authorized by
 | 
			
		||||
      the copyright owner that is granting the License.
 | 
			
		||||
 | 
			
		||||
      "Legal Entity" shall mean the union of the acting entity and all
 | 
			
		||||
      other entities that control, are controlled by, or are under common
 | 
			
		||||
      control with that entity. For the purposes of this definition,
 | 
			
		||||
      "control" means (i) the power, direct or indirect, to cause the
 | 
			
		||||
      direction or management of such entity, whether by contract or
 | 
			
		||||
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
 | 
			
		||||
      outstanding shares, or (iii) beneficial ownership of such entity.
 | 
			
		||||
 | 
			
		||||
      "You" (or "Your") shall mean an individual or Legal Entity
 | 
			
		||||
      exercising permissions granted by this License.
 | 
			
		||||
 | 
			
		||||
      "Source" form shall mean the preferred form for making modifications,
 | 
			
		||||
      including but not limited to software source code, documentation
 | 
			
		||||
      source, and configuration files.
 | 
			
		||||
 | 
			
		||||
      "Object" form shall mean any form resulting from mechanical
 | 
			
		||||
      transformation or translation of a Source form, including but
 | 
			
		||||
      not limited to compiled object code, generated documentation,
 | 
			
		||||
      and conversions to other media types.
 | 
			
		||||
 | 
			
		||||
      "Work" shall mean the work of authorship, whether in Source or
 | 
			
		||||
      Object form, made available under the License, as indicated by a
 | 
			
		||||
      copyright notice that is included in or attached to the work
 | 
			
		||||
      (an example is provided in the Appendix below).
 | 
			
		||||
 | 
			
		||||
      "Derivative Works" shall mean any work, whether in Source or Object
 | 
			
		||||
      form, that is based on (or derived from) the Work and for which the
 | 
			
		||||
      editorial revisions, annotations, elaborations, or other modifications
 | 
			
		||||
      represent, as a whole, an original work of authorship. For the purposes
 | 
			
		||||
      of this License, Derivative Works shall not include works that remain
 | 
			
		||||
      separable from, or merely link (or bind by name) to the interfaces of,
 | 
			
		||||
      the Work and Derivative Works thereof.
 | 
			
		||||
 | 
			
		||||
      "Contribution" shall mean any work of authorship, including
 | 
			
		||||
      the original version of the Work and any modifications or additions
 | 
			
		||||
      to that Work or Derivative Works thereof, that is intentionally
 | 
			
		||||
      submitted to Licensor for inclusion in the Work by the copyright owner
 | 
			
		||||
      or by an individual or Legal Entity authorized to submit on behalf of
 | 
			
		||||
      the copyright owner. For the purposes of this definition, "submitted"
 | 
			
		||||
      means any form of electronic, verbal, or written communication sent
 | 
			
		||||
      to the Licensor or its representatives, including but not limited to
 | 
			
		||||
      communication on electronic mailing lists, source code control systems,
 | 
			
		||||
      and issue tracking systems that are managed by, or on behalf of, the
 | 
			
		||||
      Licensor for the purpose of discussing and improving the Work, but
 | 
			
		||||
      excluding communication that is conspicuously marked or otherwise
 | 
			
		||||
      designated in writing by the copyright owner as "Not a Contribution."
 | 
			
		||||
 | 
			
		||||
      "Contributor" shall mean Licensor and any individual or Legal Entity
 | 
			
		||||
      on behalf of whom a Contribution has been received by Licensor and
 | 
			
		||||
      subsequently incorporated within the Work.
 | 
			
		||||
 | 
			
		||||
   2. Grant of Copyright License. Subject to the terms and conditions of
 | 
			
		||||
      this License, each Contributor hereby grants to You a perpetual,
 | 
			
		||||
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
 | 
			
		||||
      copyright license to reproduce, prepare Derivative Works of,
 | 
			
		||||
      publicly display, publicly perform, sublicense, and distribute the
 | 
			
		||||
      Work and such Derivative Works in Source or Object form.
 | 
			
		||||
 | 
			
		||||
   3. Grant of Patent License. Subject to the terms and conditions of
 | 
			
		||||
      this License, each Contributor hereby grants to You a perpetual,
 | 
			
		||||
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
 | 
			
		||||
      (except as stated in this section) patent license to make, have made,
 | 
			
		||||
      use, offer to sell, sell, import, and otherwise transfer the Work,
 | 
			
		||||
      where such license applies only to those patent claims licensable
 | 
			
		||||
      by such Contributor that are necessarily infringed by their
 | 
			
		||||
      Contribution(s) alone or by combination of their Contribution(s)
 | 
			
		||||
      with the Work to which such Contribution(s) was submitted. If You
 | 
			
		||||
      institute patent litigation against any entity (including a
 | 
			
		||||
      cross-claim or counterclaim in a lawsuit) alleging that the Work
 | 
			
		||||
      or a Contribution incorporated within the Work constitutes direct
 | 
			
		||||
      or contributory patent infringement, then any patent licenses
 | 
			
		||||
      granted to You under this License for that Work shall terminate
 | 
			
		||||
      as of the date such litigation is filed.
 | 
			
		||||
 | 
			
		||||
   4. Redistribution. You may reproduce and distribute copies of the
 | 
			
		||||
      Work or Derivative Works thereof in any medium, with or without
 | 
			
		||||
      modifications, and in Source or Object form, provided that You
 | 
			
		||||
      meet the following conditions:
 | 
			
		||||
 | 
			
		||||
      (a) You must give any other recipients of the Work or
 | 
			
		||||
          Derivative Works a copy of this License; and
 | 
			
		||||
 | 
			
		||||
      (b) You must cause any modified files to carry prominent notices
 | 
			
		||||
          stating that You changed the files; and
 | 
			
		||||
 | 
			
		||||
      (c) You must retain, in the Source form of any Derivative Works
 | 
			
		||||
          that You distribute, all copyright, patent, trademark, and
 | 
			
		||||
          attribution notices from the Source form of the Work,
 | 
			
		||||
          excluding those notices that do not pertain to any part of
 | 
			
		||||
          the Derivative Works; and
 | 
			
		||||
 | 
			
		||||
      (d) If the Work includes a "NOTICE" text file as part of its
 | 
			
		||||
          distribution, then any Derivative Works that You distribute must
 | 
			
		||||
          include a readable copy of the attribution notices contained
 | 
			
		||||
          within such NOTICE file, excluding those notices that do not
 | 
			
		||||
          pertain to any part of the Derivative Works, in at least one
 | 
			
		||||
          of the following places: within a NOTICE text file distributed
 | 
			
		||||
          as part of the Derivative Works; within the Source form or
 | 
			
		||||
          documentation, if provided along with the Derivative Works; or,
 | 
			
		||||
          within a display generated by the Derivative Works, if and
 | 
			
		||||
          wherever such third-party notices normally appear. The contents
 | 
			
		||||
          of the NOTICE file are for informational purposes only and
 | 
			
		||||
          do not modify the License. You may add Your own attribution
 | 
			
		||||
          notices within Derivative Works that You distribute, alongside
 | 
			
		||||
          or as an addendum to the NOTICE text from the Work, provided
 | 
			
		||||
          that such additional attribution notices cannot be construed
 | 
			
		||||
          as modifying the License.
 | 
			
		||||
 | 
			
		||||
      You may add Your own copyright statement to Your modifications and
 | 
			
		||||
      may provide additional or different license terms and conditions
 | 
			
		||||
      for use, reproduction, or distribution of Your modifications, or
 | 
			
		||||
      for any such Derivative Works as a whole, provided Your use,
 | 
			
		||||
      reproduction, and distribution of the Work otherwise complies with
 | 
			
		||||
      the conditions stated in this License.
 | 
			
		||||
 | 
			
		||||
   5. Submission of Contributions. Unless You explicitly state otherwise,
 | 
			
		||||
      any Contribution intentionally submitted for inclusion in the Work
 | 
			
		||||
      by You to the Licensor shall be under the terms and conditions of
 | 
			
		||||
      this License, without any additional terms or conditions.
 | 
			
		||||
      Notwithstanding the above, nothing herein shall supersede or modify
 | 
			
		||||
      the terms of any separate license agreement you may have executed
 | 
			
		||||
      with Licensor regarding such Contributions.
 | 
			
		||||
 | 
			
		||||
   6. Trademarks. This License does not grant permission to use the trade
 | 
			
		||||
      names, trademarks, service marks, or product names of the Licensor,
 | 
			
		||||
      except as required for reasonable and customary use in describing the
 | 
			
		||||
      origin of the Work and reproducing the content of the NOTICE file.
 | 
			
		||||
 | 
			
		||||
   7. Disclaimer of Warranty. Unless required by applicable law or
 | 
			
		||||
      agreed to in writing, Licensor provides the Work (and each
 | 
			
		||||
      Contributor provides its Contributions) on an "AS IS" BASIS,
 | 
			
		||||
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 | 
			
		||||
      implied, including, without limitation, any warranties or conditions
 | 
			
		||||
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
 | 
			
		||||
      PARTICULAR PURPOSE. You are solely responsible for determining the
 | 
			
		||||
      appropriateness of using or redistributing the Work and assume any
 | 
			
		||||
      risks associated with Your exercise of permissions under this License.
 | 
			
		||||
 | 
			
		||||
   8. Limitation of Liability. In no event and under no legal theory,
 | 
			
		||||
      whether in tort (including negligence), contract, or otherwise,
 | 
			
		||||
      unless required by applicable law (such as deliberate and grossly
 | 
			
		||||
      negligent acts) or agreed to in writing, shall any Contributor be
 | 
			
		||||
      liable to You for damages, including any direct, indirect, special,
 | 
			
		||||
      incidental, or consequential damages of any character arising as a
 | 
			
		||||
      result of this License or out of the use or inability to use the
 | 
			
		||||
      Work (including but not limited to damages for loss of goodwill,
 | 
			
		||||
      work stoppage, computer failure or malfunction, or any and all
 | 
			
		||||
      other commercial damages or losses), even if such Contributor
 | 
			
		||||
      has been advised of the possibility of such damages.
 | 
			
		||||
 | 
			
		||||
   9. Accepting Warranty or Additional Liability. While redistributing
 | 
			
		||||
      the Work or Derivative Works thereof, You may choose to offer,
 | 
			
		||||
      and charge a fee for, acceptance of support, warranty, indemnity,
 | 
			
		||||
      or other liability obligations and/or rights consistent with this
 | 
			
		||||
      License. However, in accepting such obligations, You may act only
 | 
			
		||||
      on Your own behalf and on Your sole responsibility, not on behalf
 | 
			
		||||
      of any other Contributor, and only if You agree to indemnify,
 | 
			
		||||
      defend, and hold each Contributor harmless for any liability
 | 
			
		||||
      incurred by, or claims asserted against, such Contributor by reason
 | 
			
		||||
      of your accepting any such warranty or additional liability.
 | 
			
		||||
 | 
			
		||||
   END OF TERMS AND CONDITIONS
 | 
			
		||||
 | 
			
		||||
   APPENDIX: How to apply the Apache License to your work.
 | 
			
		||||
 | 
			
		||||
      To apply the Apache License to your work, attach the following
 | 
			
		||||
      boilerplate notice, with the fields enclosed by brackets "[]"
 | 
			
		||||
      replaced with your own identifying information. (Don't include
 | 
			
		||||
      the brackets!)  The text should be enclosed in the appropriate
 | 
			
		||||
      comment syntax for the file format. We also recommend that a
 | 
			
		||||
      file or class name and description of purpose be included on the
 | 
			
		||||
      same "printed page" as the copyright notice for easier
 | 
			
		||||
      identification within third-party archives.
 | 
			
		||||
 | 
			
		||||
   Copyright [yyyy] [name of copyright owner]
 | 
			
		||||
 | 
			
		||||
   Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
   you may not use this file except in compliance with the License.
 | 
			
		||||
   You may obtain a copy of the License at
 | 
			
		||||
 | 
			
		||||
       http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 | 
			
		||||
   Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
   distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
   See the License for the specific language governing permissions and
 | 
			
		||||
   limitations under the License.
 | 
			
		||||
							
								
								
									
										108
									
								
								node_modules/@google-cloud/paginator/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								node_modules/@google-cloud/paginator/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,108 @@
 | 
			
		||||
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
 | 
			
		||||
[//]: # "To regenerate it, use `python -m synthtool`."
 | 
			
		||||
<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"/>
 | 
			
		||||
 | 
			
		||||
# [Google Cloud Common Paginator: Node.js Client](https://github.com/googleapis/nodejs-paginator)
 | 
			
		||||
 | 
			
		||||
[](https://cloud.google.com/terms/launch-stages)
 | 
			
		||||
[](https://www.npmjs.org/package/@google-cloud/paginator)
 | 
			
		||||
[](https://codecov.io/gh/googleapis/nodejs-paginator)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
A result paging utility used by Google node.js modules
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* [Google Cloud Common Paginator Node.js Client API Reference][client-docs]
 | 
			
		||||
 | 
			
		||||
* [github.com/googleapis/nodejs-paginator](https://github.com/googleapis/nodejs-paginator)
 | 
			
		||||
 | 
			
		||||
Read more about the client libraries for Cloud APIs, including the older
 | 
			
		||||
Google APIs Client Libraries, in [Client Libraries Explained][explained].
 | 
			
		||||
 | 
			
		||||
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
 | 
			
		||||
 | 
			
		||||
**Table of contents:**
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* [Quickstart](#quickstart)
 | 
			
		||||
 | 
			
		||||
  * [Installing the client library](#installing-the-client-library)
 | 
			
		||||
  * [Using the client library](#using-the-client-library)
 | 
			
		||||
* [Samples](#samples)
 | 
			
		||||
* [Versioning](#versioning)
 | 
			
		||||
* [Contributing](#contributing)
 | 
			
		||||
* [License](#license)
 | 
			
		||||
 | 
			
		||||
## Quickstart
 | 
			
		||||
 | 
			
		||||
### Installing the client library
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
npm install @google-cloud/paginator
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Using the client library
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
const {paginator} = require('@google-cloud/paginator');
 | 
			
		||||
console.log(paginator);
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Samples
 | 
			
		||||
 | 
			
		||||
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-paginator/tree/master/samples) directory. The samples' `README.md`
 | 
			
		||||
has instructions for running the samples.
 | 
			
		||||
 | 
			
		||||
| Sample                      | Source Code                       | Try it |
 | 
			
		||||
| --------------------------- | --------------------------------- | ------ |
 | 
			
		||||
| Quickstart | [source code](https://github.com/googleapis/nodejs-paginator/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-paginator&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The [Google Cloud Common Paginator Node.js Client API Reference][client-docs] documentation
 | 
			
		||||
also contains samples.
 | 
			
		||||
 | 
			
		||||
## Versioning
 | 
			
		||||
 | 
			
		||||
This library follows [Semantic Versioning](http://semver.org/).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
This library is considered to be **General Availability (GA)**. This means it
 | 
			
		||||
is stable; the code surface will not change in backwards-incompatible ways
 | 
			
		||||
unless absolutely necessary (e.g. because of critical security issues) or with
 | 
			
		||||
an extensive deprecation period. Issues and requests against **GA** libraries
 | 
			
		||||
are addressed with the highest priority.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
More Information: [Google Cloud Platform Launch Stages][launch_stages]
 | 
			
		||||
 | 
			
		||||
[launch_stages]: https://cloud.google.com/terms/launch-stages
 | 
			
		||||
 | 
			
		||||
## Contributing
 | 
			
		||||
 | 
			
		||||
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-paginator/blob/master/CONTRIBUTING.md).
 | 
			
		||||
 | 
			
		||||
## License
 | 
			
		||||
 | 
			
		||||
Apache Version 2.0
 | 
			
		||||
 | 
			
		||||
See [LICENSE](https://github.com/googleapis/nodejs-paginator/blob/master/LICENSE)
 | 
			
		||||
 | 
			
		||||
[client-docs]: https://googleapis.dev/nodejs/paginator/latest#reference
 | 
			
		||||
 | 
			
		||||
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
 | 
			
		||||
[projects]: https://console.cloud.google.com/project
 | 
			
		||||
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
 | 
			
		||||
 | 
			
		||||
[auth]: https://cloud.google.com/docs/authentication/getting-started
 | 
			
		||||
 | 
			
		||||
<a name="reference"></a>
 | 
			
		||||
							
								
								
									
										131
									
								
								node_modules/@google-cloud/paginator/build/src/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										131
									
								
								node_modules/@google-cloud/paginator/build/src/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,131 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * Copyright 2015 Google Inc. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
 * You may obtain a copy of the License at
 | 
			
		||||
 *
 | 
			
		||||
 *      http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 *
 | 
			
		||||
 * Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
 * See the License for the specific language governing permissions and
 | 
			
		||||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
/// <reference types="node" />
 | 
			
		||||
import { TransformOptions } from 'stream';
 | 
			
		||||
import { ResourceStream } from './resource-stream';
 | 
			
		||||
export interface ParsedArguments extends TransformOptions {
 | 
			
		||||
    /**
 | 
			
		||||
     * Query object. This is most commonly an object, but to make the API more
 | 
			
		||||
     * simple, it can also be a string in some places.
 | 
			
		||||
     */
 | 
			
		||||
    query?: ParsedArguments;
 | 
			
		||||
    /**
 | 
			
		||||
     * Callback function.
 | 
			
		||||
     */
 | 
			
		||||
    callback?: Function;
 | 
			
		||||
    /**
 | 
			
		||||
     * Auto-pagination enabled.
 | 
			
		||||
     */
 | 
			
		||||
    autoPaginate?: boolean;
 | 
			
		||||
    /**
 | 
			
		||||
     * Maximum API calls to make.
 | 
			
		||||
     */
 | 
			
		||||
    maxApiCalls?: number;
 | 
			
		||||
    /**
 | 
			
		||||
     * Maximum results to return.
 | 
			
		||||
     */
 | 
			
		||||
    maxResults?: number;
 | 
			
		||||
    pageSize?: number;
 | 
			
		||||
    streamOptions?: ParsedArguments;
 | 
			
		||||
}
 | 
			
		||||
/*! Developer Documentation
 | 
			
		||||
 *
 | 
			
		||||
 * paginator is used to auto-paginate `nextQuery` methods as well as
 | 
			
		||||
 * streamifying them.
 | 
			
		||||
 *
 | 
			
		||||
 * Before:
 | 
			
		||||
 *
 | 
			
		||||
 *   search.query('done=true', function(err, results, nextQuery) {
 | 
			
		||||
 *     search.query(nextQuery, function(err, results, nextQuery) {});
 | 
			
		||||
 *   });
 | 
			
		||||
 *
 | 
			
		||||
 * After:
 | 
			
		||||
 *
 | 
			
		||||
 *   search.query('done=true', function(err, results) {});
 | 
			
		||||
 *
 | 
			
		||||
 * Methods to extend should be written to accept callbacks and return a
 | 
			
		||||
 * `nextQuery`.
 | 
			
		||||
 */
 | 
			
		||||
export declare class Paginator {
 | 
			
		||||
    /**
 | 
			
		||||
     * Cache the original method, then overwrite it on the Class's prototype.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {function} Class - The parent class of the methods to extend.
 | 
			
		||||
     * @param {string|string[]} methodNames - Name(s) of the methods to extend.
 | 
			
		||||
     */
 | 
			
		||||
    extend(Class: Function, methodNames: string | string[]): void;
 | 
			
		||||
    /**
 | 
			
		||||
     * Wraps paginated API calls in a readable object stream.
 | 
			
		||||
     *
 | 
			
		||||
     * This method simply calls the nextQuery recursively, emitting results to a
 | 
			
		||||
     * stream. The stream ends when `nextQuery` is null.
 | 
			
		||||
     *
 | 
			
		||||
     * `maxResults` will act as a cap for how many results are fetched and emitted
 | 
			
		||||
     * to the stream.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} methodName - Name of the method to streamify.
 | 
			
		||||
     * @return {function} - Wrapped function.
 | 
			
		||||
     */
 | 
			
		||||
    streamify<T = any>(methodName: string): (this: {
 | 
			
		||||
        [index: string]: Function;
 | 
			
		||||
    }, ...args: any[]) => ResourceStream<T>;
 | 
			
		||||
    /**
 | 
			
		||||
     * Parse a pseudo-array `arguments` for a query and callback.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {array} args - The original `arguments` pseduo-array that the original
 | 
			
		||||
     *     method received.
 | 
			
		||||
     */
 | 
			
		||||
    parseArguments_(args: any[]): ParsedArguments;
 | 
			
		||||
    /**
 | 
			
		||||
     * This simply checks to see if `autoPaginate` is set or not, if it's true
 | 
			
		||||
     * then we buffer all results, otherwise simply call the original method.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {array} parsedArguments - Parsed arguments from the original method
 | 
			
		||||
     *     call.
 | 
			
		||||
     * @param {object=|string=} parsedArguments.query - Query object. This is most
 | 
			
		||||
     *     commonly an object, but to make the API more simple, it can also be a
 | 
			
		||||
     *     string in some places.
 | 
			
		||||
     * @param {function=} parsedArguments.callback - Callback function.
 | 
			
		||||
     * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled.
 | 
			
		||||
     * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make.
 | 
			
		||||
     * @param {number} parsedArguments.maxResults - Maximum results to return.
 | 
			
		||||
     * @param {function} originalMethod - The cached method that accepts a callback
 | 
			
		||||
     *     and returns `nextQuery` to receive more results.
 | 
			
		||||
     */
 | 
			
		||||
    run_(parsedArguments: ParsedArguments, originalMethod: Function): any;
 | 
			
		||||
    /**
 | 
			
		||||
     * This method simply calls the nextQuery recursively, emitting results to a
 | 
			
		||||
     * stream. The stream ends when `nextQuery` is null.
 | 
			
		||||
     *
 | 
			
		||||
     * `maxResults` will act as a cap for how many results are fetched and emitted
 | 
			
		||||
     * to the stream.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {object=|string=} parsedArguments.query - Query object. This is most
 | 
			
		||||
     *     commonly an object, but to make the API more simple, it can also be a
 | 
			
		||||
     *     string in some places.
 | 
			
		||||
     * @param {function=} parsedArguments.callback - Callback function.
 | 
			
		||||
     * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled.
 | 
			
		||||
     * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make.
 | 
			
		||||
     * @param {number} parsedArguments.maxResults - Maximum results to return.
 | 
			
		||||
     * @param {function} originalMethod - The cached method that accepts a callback
 | 
			
		||||
     *     and returns `nextQuery` to receive more results.
 | 
			
		||||
     * @return {stream} - Readable object stream.
 | 
			
		||||
     */
 | 
			
		||||
    runAsStream_<T = any>(parsedArguments: ParsedArguments, originalMethod: Function): ResourceStream<T>;
 | 
			
		||||
}
 | 
			
		||||
declare const paginator: Paginator;
 | 
			
		||||
export { paginator };
 | 
			
		||||
export { ResourceStream };
 | 
			
		||||
							
								
								
									
										205
									
								
								node_modules/@google-cloud/paginator/build/src/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										205
									
								
								node_modules/@google-cloud/paginator/build/src/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,205 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
/*!
 | 
			
		||||
 * Copyright 2015 Google Inc. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
 * You may obtain a copy of the License at
 | 
			
		||||
 *
 | 
			
		||||
 *      http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 *
 | 
			
		||||
 * Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
 * See the License for the specific language governing permissions and
 | 
			
		||||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
/*!
 | 
			
		||||
 * @module common/paginator
 | 
			
		||||
 */
 | 
			
		||||
const arrify = require("arrify");
 | 
			
		||||
const extend = require("extend");
 | 
			
		||||
const resource_stream_1 = require("./resource-stream");
 | 
			
		||||
exports.ResourceStream = resource_stream_1.ResourceStream;
 | 
			
		||||
/*! Developer Documentation
 | 
			
		||||
 *
 | 
			
		||||
 * paginator is used to auto-paginate `nextQuery` methods as well as
 | 
			
		||||
 * streamifying them.
 | 
			
		||||
 *
 | 
			
		||||
 * Before:
 | 
			
		||||
 *
 | 
			
		||||
 *   search.query('done=true', function(err, results, nextQuery) {
 | 
			
		||||
 *     search.query(nextQuery, function(err, results, nextQuery) {});
 | 
			
		||||
 *   });
 | 
			
		||||
 *
 | 
			
		||||
 * After:
 | 
			
		||||
 *
 | 
			
		||||
 *   search.query('done=true', function(err, results) {});
 | 
			
		||||
 *
 | 
			
		||||
 * Methods to extend should be written to accept callbacks and return a
 | 
			
		||||
 * `nextQuery`.
 | 
			
		||||
 */
 | 
			
		||||
class Paginator {
 | 
			
		||||
    /**
 | 
			
		||||
     * Cache the original method, then overwrite it on the Class's prototype.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {function} Class - The parent class of the methods to extend.
 | 
			
		||||
     * @param {string|string[]} methodNames - Name(s) of the methods to extend.
 | 
			
		||||
     */
 | 
			
		||||
    // tslint:disable-next-line:variable-name
 | 
			
		||||
    extend(Class, methodNames) {
 | 
			
		||||
        methodNames = arrify(methodNames);
 | 
			
		||||
        methodNames.forEach(methodName => {
 | 
			
		||||
            const originalMethod = Class.prototype[methodName];
 | 
			
		||||
            // map the original method to a private member
 | 
			
		||||
            Class.prototype[methodName + '_'] = originalMethod;
 | 
			
		||||
            // overwrite the original to auto-paginate
 | 
			
		||||
            // tslint:disable-next-line:no-any
 | 
			
		||||
            Class.prototype[methodName] = function (...args) {
 | 
			
		||||
                const parsedArguments = paginator.parseArguments_(args);
 | 
			
		||||
                return paginator.run_(parsedArguments, originalMethod.bind(this));
 | 
			
		||||
            };
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Wraps paginated API calls in a readable object stream.
 | 
			
		||||
     *
 | 
			
		||||
     * This method simply calls the nextQuery recursively, emitting results to a
 | 
			
		||||
     * stream. The stream ends when `nextQuery` is null.
 | 
			
		||||
     *
 | 
			
		||||
     * `maxResults` will act as a cap for how many results are fetched and emitted
 | 
			
		||||
     * to the stream.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} methodName - Name of the method to streamify.
 | 
			
		||||
     * @return {function} - Wrapped function.
 | 
			
		||||
     */
 | 
			
		||||
    // tslint:disable-next-line:no-any
 | 
			
		||||
    streamify(methodName) {
 | 
			
		||||
        return function (
 | 
			
		||||
        // tslint:disable-next-line:no-any
 | 
			
		||||
        ...args) {
 | 
			
		||||
            const parsedArguments = paginator.parseArguments_(args);
 | 
			
		||||
            const originalMethod = this[methodName + '_'] || this[methodName];
 | 
			
		||||
            return paginator.runAsStream_(parsedArguments, originalMethod.bind(this));
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Parse a pseudo-array `arguments` for a query and callback.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {array} args - The original `arguments` pseduo-array that the original
 | 
			
		||||
     *     method received.
 | 
			
		||||
     */
 | 
			
		||||
    // tslint:disable-next-line:no-any
 | 
			
		||||
    parseArguments_(args) {
 | 
			
		||||
        let query;
 | 
			
		||||
        let autoPaginate = true;
 | 
			
		||||
        let maxApiCalls = -1;
 | 
			
		||||
        let maxResults = -1;
 | 
			
		||||
        let callback;
 | 
			
		||||
        const firstArgument = args[0];
 | 
			
		||||
        const lastArgument = args[args.length - 1];
 | 
			
		||||
        if (typeof firstArgument === 'function') {
 | 
			
		||||
            callback = firstArgument;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            query = firstArgument;
 | 
			
		||||
        }
 | 
			
		||||
        if (typeof lastArgument === 'function') {
 | 
			
		||||
            callback = lastArgument;
 | 
			
		||||
        }
 | 
			
		||||
        if (typeof query === 'object') {
 | 
			
		||||
            query = extend(true, {}, query);
 | 
			
		||||
            // Check if the user only asked for a certain amount of results.
 | 
			
		||||
            if (query.maxResults && typeof query.maxResults === 'number') {
 | 
			
		||||
                // `maxResults` is used API-wide.
 | 
			
		||||
                maxResults = query.maxResults;
 | 
			
		||||
            }
 | 
			
		||||
            else if (typeof query.pageSize === 'number') {
 | 
			
		||||
                // `pageSize` is Pub/Sub's `maxResults`.
 | 
			
		||||
                maxResults = query.pageSize;
 | 
			
		||||
            }
 | 
			
		||||
            if (query.maxApiCalls && typeof query.maxApiCalls === 'number') {
 | 
			
		||||
                maxApiCalls = query.maxApiCalls;
 | 
			
		||||
                delete query.maxApiCalls;
 | 
			
		||||
            }
 | 
			
		||||
            // maxResults is the user specified limit.
 | 
			
		||||
            if (maxResults !== -1 || query.autoPaginate === false) {
 | 
			
		||||
                autoPaginate = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        const parsedArguments = {
 | 
			
		||||
            query: query || {},
 | 
			
		||||
            autoPaginate,
 | 
			
		||||
            maxApiCalls,
 | 
			
		||||
            maxResults,
 | 
			
		||||
            callback,
 | 
			
		||||
        };
 | 
			
		||||
        parsedArguments.streamOptions = extend(true, {}, parsedArguments.query);
 | 
			
		||||
        delete parsedArguments.streamOptions.autoPaginate;
 | 
			
		||||
        delete parsedArguments.streamOptions.maxResults;
 | 
			
		||||
        delete parsedArguments.streamOptions.pageSize;
 | 
			
		||||
        return parsedArguments;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * This simply checks to see if `autoPaginate` is set or not, if it's true
 | 
			
		||||
     * then we buffer all results, otherwise simply call the original method.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {array} parsedArguments - Parsed arguments from the original method
 | 
			
		||||
     *     call.
 | 
			
		||||
     * @param {object=|string=} parsedArguments.query - Query object. This is most
 | 
			
		||||
     *     commonly an object, but to make the API more simple, it can also be a
 | 
			
		||||
     *     string in some places.
 | 
			
		||||
     * @param {function=} parsedArguments.callback - Callback function.
 | 
			
		||||
     * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled.
 | 
			
		||||
     * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make.
 | 
			
		||||
     * @param {number} parsedArguments.maxResults - Maximum results to return.
 | 
			
		||||
     * @param {function} originalMethod - The cached method that accepts a callback
 | 
			
		||||
     *     and returns `nextQuery` to receive more results.
 | 
			
		||||
     */
 | 
			
		||||
    run_(parsedArguments, originalMethod) {
 | 
			
		||||
        const query = parsedArguments.query;
 | 
			
		||||
        const callback = parsedArguments.callback;
 | 
			
		||||
        if (!parsedArguments.autoPaginate) {
 | 
			
		||||
            return originalMethod(query, callback);
 | 
			
		||||
        }
 | 
			
		||||
        const results = new Array();
 | 
			
		||||
        const promise = new Promise((resolve, reject) => {
 | 
			
		||||
            paginator
 | 
			
		||||
                .runAsStream_(parsedArguments, originalMethod)
 | 
			
		||||
                .on('error', reject)
 | 
			
		||||
                .on('data', (data) => results.push(data))
 | 
			
		||||
                .on('end', () => resolve(results));
 | 
			
		||||
        });
 | 
			
		||||
        if (!callback) {
 | 
			
		||||
            return promise.then(results => [results]);
 | 
			
		||||
        }
 | 
			
		||||
        promise.then(results => callback(null, results), (err) => callback(err));
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * This method simply calls the nextQuery recursively, emitting results to a
 | 
			
		||||
     * stream. The stream ends when `nextQuery` is null.
 | 
			
		||||
     *
 | 
			
		||||
     * `maxResults` will act as a cap for how many results are fetched and emitted
 | 
			
		||||
     * to the stream.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {object=|string=} parsedArguments.query - Query object. This is most
 | 
			
		||||
     *     commonly an object, but to make the API more simple, it can also be a
 | 
			
		||||
     *     string in some places.
 | 
			
		||||
     * @param {function=} parsedArguments.callback - Callback function.
 | 
			
		||||
     * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled.
 | 
			
		||||
     * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make.
 | 
			
		||||
     * @param {number} parsedArguments.maxResults - Maximum results to return.
 | 
			
		||||
     * @param {function} originalMethod - The cached method that accepts a callback
 | 
			
		||||
     *     and returns `nextQuery` to receive more results.
 | 
			
		||||
     * @return {stream} - Readable object stream.
 | 
			
		||||
     */
 | 
			
		||||
    // tslint:disable-next-line:no-any
 | 
			
		||||
    runAsStream_(parsedArguments, originalMethod) {
 | 
			
		||||
        return new resource_stream_1.ResourceStream(parsedArguments, originalMethod);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
exports.Paginator = Paginator;
 | 
			
		||||
const paginator = new Paginator();
 | 
			
		||||
exports.paginator = paginator;
 | 
			
		||||
//# sourceMappingURL=index.js.map
 | 
			
		||||
							
								
								
									
										40
									
								
								node_modules/@google-cloud/paginator/build/src/resource-stream.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								node_modules/@google-cloud/paginator/build/src/resource-stream.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * Copyright 2019 Google Inc. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
 * You may obtain a copy of the License at
 | 
			
		||||
 *
 | 
			
		||||
 *      http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 *
 | 
			
		||||
 * Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
 * See the License for the specific language governing permissions and
 | 
			
		||||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
/// <reference types="node" />
 | 
			
		||||
import { Transform } from 'stream';
 | 
			
		||||
import { ParsedArguments } from './';
 | 
			
		||||
interface ResourceEvents<T> {
 | 
			
		||||
    addListener(event: 'data', listener: (data: T) => void): this;
 | 
			
		||||
    emit(event: 'data', data: T): boolean;
 | 
			
		||||
    on(event: 'data', listener: (data: T) => void): this;
 | 
			
		||||
    once(event: 'data', listener: (data: T) => void): this;
 | 
			
		||||
    prependListener(event: 'data', listener: (data: T) => void): this;
 | 
			
		||||
    prependOnceListener(event: 'data', listener: (data: T) => void): this;
 | 
			
		||||
    removeListener(event: 'data', listener: (data: T) => void): this;
 | 
			
		||||
}
 | 
			
		||||
export declare class ResourceStream<T> extends Transform implements ResourceEvents<T> {
 | 
			
		||||
    _ended: boolean;
 | 
			
		||||
    _maxApiCalls: number;
 | 
			
		||||
    _nextQuery: {} | null;
 | 
			
		||||
    _reading: boolean;
 | 
			
		||||
    _requestFn: Function;
 | 
			
		||||
    _requestsMade: number;
 | 
			
		||||
    _resultsToSend: number;
 | 
			
		||||
    constructor(args: ParsedArguments, requestFn: Function);
 | 
			
		||||
    end(...args: any[]): void;
 | 
			
		||||
    _read(): void;
 | 
			
		||||
}
 | 
			
		||||
export {};
 | 
			
		||||
							
								
								
									
										71
									
								
								node_modules/@google-cloud/paginator/build/src/resource-stream.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								node_modules/@google-cloud/paginator/build/src/resource-stream.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,71 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
/*!
 | 
			
		||||
 * Copyright 2019 Google Inc. All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
 * Licensed under the Apache License, Version 2.0 (the "License");
 | 
			
		||||
 * you may not use this file except in compliance with the License.
 | 
			
		||||
 * You may obtain a copy of the License at
 | 
			
		||||
 *
 | 
			
		||||
 *      http://www.apache.org/licenses/LICENSE-2.0
 | 
			
		||||
 *
 | 
			
		||||
 * Unless required by applicable law or agreed to in writing, software
 | 
			
		||||
 * distributed under the License is distributed on an "AS IS" BASIS,
 | 
			
		||||
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
			
		||||
 * See the License for the specific language governing permissions and
 | 
			
		||||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
const stream_1 = require("stream");
 | 
			
		||||
class ResourceStream extends stream_1.Transform {
 | 
			
		||||
    constructor(args, requestFn) {
 | 
			
		||||
        const options = Object.assign({ objectMode: true }, args.streamOptions);
 | 
			
		||||
        super(options);
 | 
			
		||||
        this._ended = false;
 | 
			
		||||
        this._maxApiCalls = args.maxApiCalls === -1 ? Infinity : args.maxApiCalls;
 | 
			
		||||
        this._nextQuery = args.query;
 | 
			
		||||
        this._reading = false;
 | 
			
		||||
        this._requestFn = requestFn;
 | 
			
		||||
        this._requestsMade = 0;
 | 
			
		||||
        this._resultsToSend = args.maxResults === -1 ? Infinity : args.maxResults;
 | 
			
		||||
    }
 | 
			
		||||
    // tslint:disable-next-line:no-any
 | 
			
		||||
    end(...args) {
 | 
			
		||||
        this._ended = true;
 | 
			
		||||
        return super.end(...args);
 | 
			
		||||
    }
 | 
			
		||||
    _read() {
 | 
			
		||||
        if (this._reading) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        this._reading = true;
 | 
			
		||||
        this._requestFn(this._nextQuery, (err, results, nextQuery) => {
 | 
			
		||||
            if (err) {
 | 
			
		||||
                this.destroy(err);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            this._nextQuery = nextQuery;
 | 
			
		||||
            if (this._resultsToSend !== Infinity) {
 | 
			
		||||
                results = results.splice(0, this._resultsToSend);
 | 
			
		||||
                this._resultsToSend -= results.length;
 | 
			
		||||
            }
 | 
			
		||||
            let more = true;
 | 
			
		||||
            for (const result of results) {
 | 
			
		||||
                if (this._ended) {
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                more = this.push(result);
 | 
			
		||||
            }
 | 
			
		||||
            const isFinished = !this._nextQuery || this._resultsToSend < 1;
 | 
			
		||||
            const madeMaxCalls = ++this._requestsMade >= this._maxApiCalls;
 | 
			
		||||
            if (isFinished || madeMaxCalls) {
 | 
			
		||||
                this.end();
 | 
			
		||||
            }
 | 
			
		||||
            if (more && !this._ended) {
 | 
			
		||||
                setImmediate(() => this._read());
 | 
			
		||||
            }
 | 
			
		||||
            this._reading = false;
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
exports.ResourceStream = ResourceStream;
 | 
			
		||||
//# sourceMappingURL=resource-stream.js.map
 | 
			
		||||
							
								
								
									
										93
									
								
								node_modules/@google-cloud/paginator/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								node_modules/@google-cloud/paginator/package.json
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,93 @@
 | 
			
		||||
{
 | 
			
		||||
  "_from": "@google-cloud/paginator@^2.0.0",
 | 
			
		||||
  "_id": "@google-cloud/paginator@2.0.1",
 | 
			
		||||
  "_inBundle": false,
 | 
			
		||||
  "_integrity": "sha512-HZ6UTGY/gHGNriD7OCikYWL/Eu0sTEur2qqse2w6OVsz+57se3nTkqH14JIPxtf0vlEJ8IJN5w3BdZ22pjCB8g==",
 | 
			
		||||
  "_location": "/@google-cloud/paginator",
 | 
			
		||||
  "_phantomChildren": {},
 | 
			
		||||
  "_requested": {
 | 
			
		||||
    "type": "range",
 | 
			
		||||
    "registry": true,
 | 
			
		||||
    "raw": "@google-cloud/paginator@^2.0.0",
 | 
			
		||||
    "name": "@google-cloud/paginator",
 | 
			
		||||
    "escapedName": "@google-cloud%2fpaginator",
 | 
			
		||||
    "scope": "@google-cloud",
 | 
			
		||||
    "rawSpec": "^2.0.0",
 | 
			
		||||
    "saveSpec": null,
 | 
			
		||||
    "fetchSpec": "^2.0.0"
 | 
			
		||||
  },
 | 
			
		||||
  "_requiredBy": [
 | 
			
		||||
    "/@google-cloud/storage"
 | 
			
		||||
  ],
 | 
			
		||||
  "_resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-2.0.1.tgz",
 | 
			
		||||
  "_shasum": "89ca97933eecfdd7eaa07bd79ed01c9869c9531b",
 | 
			
		||||
  "_spec": "@google-cloud/paginator@^2.0.0",
 | 
			
		||||
  "_where": "C:\\Users\\matia\\Documents\\GitHub\\FutoX-Musix\\node_modules\\@google-cloud\\storage",
 | 
			
		||||
  "author": {
 | 
			
		||||
    "name": "Google Inc."
 | 
			
		||||
  },
 | 
			
		||||
  "bugs": {
 | 
			
		||||
    "url": "https://github.com/googleapis/nodejs-paginator/issues"
 | 
			
		||||
  },
 | 
			
		||||
  "bundleDependencies": false,
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "arrify": "^2.0.0",
 | 
			
		||||
    "extend": "^3.0.2"
 | 
			
		||||
  },
 | 
			
		||||
  "deprecated": false,
 | 
			
		||||
  "description": "A result paging utility used by Google node.js modules",
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@compodoc/compodoc": "^1.1.7",
 | 
			
		||||
    "@types/extend": "^3.0.0",
 | 
			
		||||
    "@types/mocha": "^5.2.4",
 | 
			
		||||
    "@types/node": "^10.5.2",
 | 
			
		||||
    "@types/proxyquire": "^1.3.28",
 | 
			
		||||
    "@types/sinon": "^7.0.0",
 | 
			
		||||
    "@types/uuid": "^3.4.3",
 | 
			
		||||
    "codecov": "^3.0.4",
 | 
			
		||||
    "gts": "^1.0.0",
 | 
			
		||||
    "intelli-espower-loader": "^1.0.1",
 | 
			
		||||
    "linkinator": "^1.5.0",
 | 
			
		||||
    "mocha": "^6.0.0",
 | 
			
		||||
    "nyc": "^14.0.0",
 | 
			
		||||
    "proxyquire": "^2.0.1",
 | 
			
		||||
    "sinon": "^7.0.0",
 | 
			
		||||
    "source-map-support": "^0.5.6",
 | 
			
		||||
    "typescript": "^3.0.0",
 | 
			
		||||
    "uuid": "^3.3.2"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">=8.10.0"
 | 
			
		||||
  },
 | 
			
		||||
  "files": [
 | 
			
		||||
    "build/src",
 | 
			
		||||
    "!build/src/**/*.map"
 | 
			
		||||
  ],
 | 
			
		||||
  "homepage": "https://github.com/googleapis/nodejs-paginator#readme",
 | 
			
		||||
  "keywords": [],
 | 
			
		||||
  "license": "Apache-2.0",
 | 
			
		||||
  "main": "build/src/index.js",
 | 
			
		||||
  "name": "@google-cloud/paginator",
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "git+https://github.com/googleapis/nodejs-paginator.git"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "clean": "gts clean",
 | 
			
		||||
    "compile": "tsc -p .",
 | 
			
		||||
    "docs": "compodoc src/",
 | 
			
		||||
    "docs-test": "linkinator docs",
 | 
			
		||||
    "fix": "gts fix",
 | 
			
		||||
    "lint": "gts check",
 | 
			
		||||
    "posttest": "npm run lint",
 | 
			
		||||
    "predocs-test": "npm run docs",
 | 
			
		||||
    "prepare": "npm run compile",
 | 
			
		||||
    "presystem-test": "npm run compile",
 | 
			
		||||
    "pretest": "npm run compile",
 | 
			
		||||
    "samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
 | 
			
		||||
    "system-test": "mocha build/system-test",
 | 
			
		||||
    "test": "nyc mocha build/test"
 | 
			
		||||
  },
 | 
			
		||||
  "types": "build/src/index.d.ts",
 | 
			
		||||
  "version": "2.0.1"
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user