├── .gitattributes
├── .gitignore
├── .vscode
├── extensions.json
├── launch.json
├── settings.json
└── tasks.json
├── .vscodeignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── bigquery-icon.png
├── package-lock.json
├── package.json
├── src
├── extension.ts
└── test
│ ├── extension.test.ts
│ └── index.ts
├── tsconfig.json
├── tslint.json
└── vsc-extension-quickstart.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Set default behavior to automatically normalize line endings.
2 | * text=auto
3 |
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | out
2 | node_modules
3 | .vscode-test/
4 | *.vsix
5 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "eg2.tslint"
6 | ]
7 | }
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | {
6 | "version": "0.2.0",
7 | "configurations": [
8 | {
9 | "name": "Extension",
10 | "type": "extensionHost",
11 | "request": "launch",
12 | "runtimeExecutable": "${execPath}",
13 | "args": [
14 | "--extensionDevelopmentPath=${workspaceFolder}"
15 | ],
16 | "outFiles": [
17 | "${workspaceFolder}/out/**/*.js"
18 | ],
19 | "preLaunchTask": "npm: watch"
20 | },
21 | {
22 | "name": "Extension Tests",
23 | "type": "extensionHost",
24 | "request": "launch",
25 | "runtimeExecutable": "${execPath}",
26 | "args": [
27 | "--extensionDevelopmentPath=${workspaceFolder}",
28 | "--extensionTestsPath=${workspaceFolder}/out/test"
29 | ],
30 | "outFiles": [
31 | "${workspaceFolder}/out/test/**/*.js"
32 | ],
33 | "preLaunchTask": "npm: watch"
34 | }
35 | ]
36 | }
37 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "out": false // set this to true to hide the "out" folder with the compiled JS files
5 | },
6 | "search.exclude": {
7 | "out": true // set this to false to include "out" folder in search results
8 | },
9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10 | "typescript.tsc.autoDetect": "off"
11 | }
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | // See https://go.microsoft.com/fwlink/?LinkId=733558
2 | // for the documentation about the tasks.json format
3 | {
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "type": "npm",
8 | "script": "watch",
9 | "problemMatcher": "$tsc-watch",
10 | "isBackground": true,
11 | "presentation": {
12 | "reveal": "never"
13 | },
14 | "group": {
15 | "kind": "build",
16 | "isDefault": true
17 | }
18 | },
19 | {
20 | "type": "npm",
21 | "script": "compile",
22 | "problemMatcher": [
23 | "$tsc"
24 | ]
25 | }
26 | ]
27 | }
--------------------------------------------------------------------------------
/.vscodeignore:
--------------------------------------------------------------------------------
1 | .vscode/**
2 | .vscode-test/**
3 | out/test/**
4 | out/**/*.map
5 | src/**
6 | .gitignore
7 | tsconfig.json
8 | vsc-extension-quickstart.md
9 | tslint.json
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 | All notable changes to the "vscode-bigquery" extension will be documented in this file.
3 |
4 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
5 |
6 | ## [Unreleased]
7 | - Initial release
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Contribute
2 |
3 | We'd love to accept your patches and contributions to this project. There are
4 | just a few small guidelines you need to follow.
5 |
6 | ## Contributor License Agreement
7 |
8 | Contributions to this project must be accompanied by a Contributor License
9 | Agreement. You (or your employer) retain the copyright to your contribution;
10 | this simply gives us permission to use and redistribute your contributions as
11 | part of the project. Head over to to see
12 | your current agreements on file or to sign a new one.
13 |
14 | You generally only need to submit a CLA once, so if you've already submitted one
15 | (even if it was for a different project), you probably don't need to do it
16 | again.
17 |
18 | ## Code reviews
19 |
20 | All submissions, including submissions by project members, require review. We
21 | use GitHub pull requests for this purpose. Consult
22 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
23 | information on using pull requests.
24 |
25 | ## Community Guidelines
26 |
27 | This project follows [Google's Open Source Community
28 | Guidelines](https://opensource.google.com/conduct/).
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
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 2018 Google LLC
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.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vscode-bigquery
2 |
3 | 
4 |
5 | A Visual Studio Code ("VS Code") extension that can query Google Cloud Platform's [BigQuery analytics database](https://cloud.google.com/bigquery/) from, and return results to, your editor. This extension allows you to:
6 |
7 | - Write SQL in VS Code and query BigQuery datasets directly
8 | - Create queries from selected text
9 | - Capture results into VS Code window to manipulate them further
10 |
11 | This extension is great if you're exploring BigQuery and prefer VS Code's editing environment, or for cases where you're writing documentation (hint: use "Run selected text as query") and want to double check that the query is valid.
12 |
13 | ## Installing
14 |
15 | The package will be available on the VS Code Marketplace shortly, but in the meantime, you can install it manually:
16 |
17 | 1. Download the latest pre-built release here: [vscode-bigquery-0.0.1.vsix](https://github.com/google/vscode-bigquery/releases/download/v0.0.1/vscode-bigquery-0.0.1.vsix)
18 | 2. Open the Command Palette in VS Code (Ctrl/Cmd+Shift+P), and type "ext install" -> select "Extension: Install From VSIX..."
19 | 3. Navigate to the folder where you saved the `.vsix` file, and select it.
20 | 4. Reload VS Code when prompted.
21 |
22 | ## Usage
23 |
24 | The BigQuery extension adds a number of commands to the command palette (Cmd/Ctrl+Shift+P).
25 |
26 | By default, it will look for your `GOOGLE_APPLICATION_CREDENTIALS` environmental variable (if set) and use the service account described in that JSON file. You can also explicitly set `bigquery.keyFilename` to the path of your [Service Account key file](https://cloud.google.com/docs/authentication/getting-started). Unless necessary, it's recommended that you scope this key to the [`roles.bigquery.user`](https://cloud.google.com/bigquery/docs/access-control#permissions_and_roles) role, which is sufficient for querying and most related tasks.
27 |
28 | ## Optional Configuration
29 |
30 | The extension can be customized by modifying your `settings.json` file. The available configuration options, and their defaults, are below.
31 |
32 | ```js
33 | "bigquery.keyFilename" = "" // the fully-qualified path to the service account file you downloaded - e.g. '/home/you/mykeyfile-1313ef.json'
34 | "bigquery.projectId" = "" // only needed if your key file is not in JSON format - e.g. 'funny-horse-1234'
35 | "bigquery.email" = "" // only needed if your key file is not in JSON format - e.g. 'you@example.com'
36 | "bigquery.useLegacySql" = false // use the legacy SQL language when making queries.
37 | "bigquery.maximumBytesBilled" = null // Unlimited
38 | "bigquery.location" = "US" // Defaults to "US"
39 | "bigquery.outputFormat" = "json" // "json", "csv"
40 | ```
41 |
42 | The majority of these settings are inherited from [`ClientConfig`](https://cloud.google.com/nodejs/docs/reference/bigquery/1.3.x/global#ClientConfig) in the underlying BigQuery client library.
43 |
44 | ## Contributing
45 |
46 | Feature requests are accepted, but please raise an issue describing your feature before sending a PR. This extension focuses on _querying_ BigQuery, rather than dataset- and/or table- level functionality.
47 |
48 | This is not an officially supported Google product.
49 |
50 | ## License
51 |
52 | Apache 2.0 licensed. See the LICENSE file for details.
53 |
--------------------------------------------------------------------------------
/bigquery-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/google/vscode-bigquery/789c8679897aed85b79c17c12af6857aee25528e/bigquery-icon.png
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vscode-bigquery",
3 | "version": "0.0.1",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@babel/code-frame": {
8 | "version": "7.0.0",
9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
10 | "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
11 | "dev": true,
12 | "requires": {
13 | "@babel/highlight": "^7.0.0"
14 | }
15 | },
16 | "@babel/highlight": {
17 | "version": "7.0.0",
18 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
19 | "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
20 | "dev": true,
21 | "requires": {
22 | "chalk": "^2.0.0",
23 | "esutils": "^2.0.2",
24 | "js-tokens": "^4.0.0"
25 | }
26 | },
27 | "@google-cloud/bigquery": {
28 | "version": "1.3.0",
29 | "resolved": "https://registry.npmjs.org/@google-cloud/bigquery/-/bigquery-1.3.0.tgz",
30 | "integrity": "sha512-r4k4PvsoPB7DBBCsm4hz8WZj3KvZXikTcwSjAg+cn0JndAPIEad4XCd39RpniyPDSmp+n+d+kOAgebwMWj8q+w==",
31 | "requires": {
32 | "@google-cloud/common": "^0.17.0",
33 | "arrify": "^1.0.0",
34 | "duplexify": "^3.5.0",
35 | "extend": "^3.0.1",
36 | "is": "^3.0.1",
37 | "stream-events": "^1.0.1",
38 | "string-format-obj": "^1.0.0",
39 | "uuid": "^3.1.0"
40 | }
41 | },
42 | "@google-cloud/common": {
43 | "version": "0.17.0",
44 | "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.17.0.tgz",
45 | "integrity": "sha512-HRZLSU762E6HaKoGfJGa8W95yRjb9rY7LePhjaHK9ILAnFacMuUGVamDbTHu1csZomm1g3tZTtXfX/aAhtie/Q==",
46 | "requires": {
47 | "array-uniq": "^1.0.3",
48 | "arrify": "^1.0.1",
49 | "concat-stream": "^1.6.0",
50 | "create-error-class": "^3.0.2",
51 | "duplexify": "^3.5.0",
52 | "ent": "^2.2.0",
53 | "extend": "^3.0.1",
54 | "google-auto-auth": "^0.10.0",
55 | "is": "^3.2.0",
56 | "log-driver": "1.2.7",
57 | "methmeth": "^1.1.0",
58 | "modelo": "^4.2.0",
59 | "request": "^2.79.0",
60 | "retry-request": "^3.0.0",
61 | "split-array-stream": "^1.0.0",
62 | "stream-events": "^1.0.1",
63 | "string-format-obj": "^1.1.0",
64 | "through2": "^2.0.3"
65 | }
66 | },
67 | "@types/mocha": {
68 | "version": "2.2.48",
69 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz",
70 | "integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==",
71 | "dev": true
72 | },
73 | "@types/node": {
74 | "version": "8.10.49",
75 | "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.49.tgz",
76 | "integrity": "sha512-YX30JVx0PvSmJ3Eqr74fYLGeBxD+C7vIL20ek+GGGLJeUbVYRUW3EzyAXpIRA0K8c8o0UWqR/GwEFYiFoz1T8w==",
77 | "dev": true
78 | },
79 | "agent-base": {
80 | "version": "4.3.0",
81 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
82 | "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
83 | "dev": true,
84 | "requires": {
85 | "es6-promisify": "^5.0.0"
86 | }
87 | },
88 | "ajv": {
89 | "version": "5.5.2",
90 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
91 | "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
92 | "requires": {
93 | "co": "^4.6.0",
94 | "fast-deep-equal": "^1.0.0",
95 | "fast-json-stable-stringify": "^2.0.0",
96 | "json-schema-traverse": "^0.3.0"
97 | }
98 | },
99 | "ansi-styles": {
100 | "version": "3.2.1",
101 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
102 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
103 | "dev": true,
104 | "requires": {
105 | "color-convert": "^1.9.0"
106 | }
107 | },
108 | "argparse": {
109 | "version": "1.0.10",
110 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
111 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
112 | "dev": true,
113 | "requires": {
114 | "sprintf-js": "~1.0.2"
115 | }
116 | },
117 | "array-uniq": {
118 | "version": "1.0.3",
119 | "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
120 | "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY="
121 | },
122 | "arrify": {
123 | "version": "1.0.1",
124 | "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
125 | "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
126 | },
127 | "asn1": {
128 | "version": "0.2.4",
129 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
130 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
131 | "requires": {
132 | "safer-buffer": "~2.1.0"
133 | }
134 | },
135 | "assert-plus": {
136 | "version": "1.0.0",
137 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
138 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
139 | },
140 | "async": {
141 | "version": "2.6.1",
142 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
143 | "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
144 | "requires": {
145 | "lodash": "^4.17.10"
146 | }
147 | },
148 | "asynckit": {
149 | "version": "0.4.0",
150 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
151 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
152 | },
153 | "aws-sign2": {
154 | "version": "0.7.0",
155 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
156 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
157 | },
158 | "aws4": {
159 | "version": "1.8.0",
160 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
161 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
162 | },
163 | "axios": {
164 | "version": "0.18.1",
165 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz",
166 | "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==",
167 | "requires": {
168 | "follow-redirects": "1.5.10",
169 | "is-buffer": "^2.0.2"
170 | }
171 | },
172 | "balanced-match": {
173 | "version": "1.0.0",
174 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
175 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
176 | "dev": true
177 | },
178 | "bcrypt-pbkdf": {
179 | "version": "1.0.2",
180 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
181 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
182 | "optional": true,
183 | "requires": {
184 | "tweetnacl": "^0.14.3"
185 | }
186 | },
187 | "brace-expansion": {
188 | "version": "1.1.11",
189 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
190 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
191 | "dev": true,
192 | "requires": {
193 | "balanced-match": "^1.0.0",
194 | "concat-map": "0.0.1"
195 | }
196 | },
197 | "browser-stdout": {
198 | "version": "1.3.0",
199 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz",
200 | "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=",
201 | "dev": true
202 | },
203 | "buffer-equal-constant-time": {
204 | "version": "1.0.1",
205 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
206 | "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
207 | },
208 | "buffer-from": {
209 | "version": "1.1.1",
210 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
211 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
212 | },
213 | "builtin-modules": {
214 | "version": "1.1.1",
215 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
216 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
217 | "dev": true
218 | },
219 | "capture-stack-trace": {
220 | "version": "1.0.0",
221 | "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz",
222 | "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0="
223 | },
224 | "caseless": {
225 | "version": "0.12.0",
226 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
227 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
228 | },
229 | "chalk": {
230 | "version": "2.4.2",
231 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
232 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
233 | "dev": true,
234 | "requires": {
235 | "ansi-styles": "^3.2.1",
236 | "escape-string-regexp": "^1.0.5",
237 | "supports-color": "^5.3.0"
238 | }
239 | },
240 | "co": {
241 | "version": "4.6.0",
242 | "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
243 | "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
244 | },
245 | "color-convert": {
246 | "version": "1.9.3",
247 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
248 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
249 | "dev": true,
250 | "requires": {
251 | "color-name": "1.1.3"
252 | }
253 | },
254 | "color-name": {
255 | "version": "1.1.3",
256 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
257 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
258 | "dev": true
259 | },
260 | "combined-stream": {
261 | "version": "1.0.6",
262 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
263 | "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
264 | "requires": {
265 | "delayed-stream": "~1.0.0"
266 | }
267 | },
268 | "commander": {
269 | "version": "2.20.0",
270 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
271 | "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
272 | "dev": true
273 | },
274 | "concat-map": {
275 | "version": "0.0.1",
276 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
277 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
278 | "dev": true
279 | },
280 | "concat-stream": {
281 | "version": "1.6.2",
282 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
283 | "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
284 | "requires": {
285 | "buffer-from": "^1.0.0",
286 | "inherits": "^2.0.3",
287 | "readable-stream": "^2.2.2",
288 | "typedarray": "^0.0.6"
289 | }
290 | },
291 | "core-util-is": {
292 | "version": "1.0.2",
293 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
294 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
295 | },
296 | "create-error-class": {
297 | "version": "3.0.2",
298 | "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
299 | "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=",
300 | "requires": {
301 | "capture-stack-trace": "^1.0.0"
302 | }
303 | },
304 | "csv-stringify": {
305 | "version": "4.3.1",
306 | "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-4.3.1.tgz",
307 | "integrity": "sha512-VRjPYIUzex5kfbsOY7LaJcNE2qMWGQQAanb3/Vv85WbOgA+dAfDNfwntRvv335icJgGYrnTX403WxJxRVpLDFA==",
308 | "requires": {
309 | "lodash.get": "~4.4.2"
310 | }
311 | },
312 | "dashdash": {
313 | "version": "1.14.1",
314 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
315 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
316 | "requires": {
317 | "assert-plus": "^1.0.0"
318 | }
319 | },
320 | "debug": {
321 | "version": "3.1.0",
322 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
323 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
324 | "requires": {
325 | "ms": "2.0.0"
326 | }
327 | },
328 | "defaults": {
329 | "version": "1.0.3",
330 | "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
331 | "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
332 | "optional": true,
333 | "requires": {
334 | "clone": "^1.0.2"
335 | },
336 | "dependencies": {
337 | "clone": {
338 | "version": "1.0.4",
339 | "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
340 | "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
341 | "optional": true
342 | }
343 | }
344 | },
345 | "delayed-stream": {
346 | "version": "1.0.0",
347 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
348 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
349 | },
350 | "diff": {
351 | "version": "3.5.0",
352 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
353 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
354 | "dev": true
355 | },
356 | "duplexify": {
357 | "version": "3.6.0",
358 | "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz",
359 | "integrity": "sha512-fO3Di4tBKJpYTFHAxTU00BcfWMY9w24r/x21a6rZRbsD/ToUgGxsMbiGRmB7uVAXeGKXD9MwiLZa5E97EVgIRQ==",
360 | "requires": {
361 | "end-of-stream": "^1.0.0",
362 | "inherits": "^2.0.1",
363 | "readable-stream": "^2.0.0",
364 | "stream-shift": "^1.0.0"
365 | }
366 | },
367 | "easy-table": {
368 | "version": "1.1.1",
369 | "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.1.tgz",
370 | "integrity": "sha512-C9Lvm0WFcn2RgxbMnTbXZenMIWcBtkzMr+dWqq/JsVoGFSVUVlPqeOa5LP5kM0I3zoOazFpckOEb2/0LDFfToQ==",
371 | "requires": {
372 | "ansi-regex": "^3.0.0",
373 | "wcwidth": ">=1.0.1"
374 | },
375 | "dependencies": {
376 | "ansi-regex": {
377 | "version": "3.0.0",
378 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
379 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
380 | }
381 | }
382 | },
383 | "ecc-jsbn": {
384 | "version": "0.1.2",
385 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
386 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
387 | "optional": true,
388 | "requires": {
389 | "jsbn": "~0.1.0",
390 | "safer-buffer": "^2.1.0"
391 | }
392 | },
393 | "ecdsa-sig-formatter": {
394 | "version": "1.0.10",
395 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz",
396 | "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=",
397 | "requires": {
398 | "safe-buffer": "^5.0.1"
399 | }
400 | },
401 | "end-of-stream": {
402 | "version": "1.4.1",
403 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
404 | "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
405 | "requires": {
406 | "once": "^1.4.0"
407 | }
408 | },
409 | "ent": {
410 | "version": "2.2.0",
411 | "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz",
412 | "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0="
413 | },
414 | "es6-promise": {
415 | "version": "4.2.8",
416 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
417 | "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
418 | "dev": true
419 | },
420 | "es6-promisify": {
421 | "version": "5.0.0",
422 | "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
423 | "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
424 | "dev": true,
425 | "requires": {
426 | "es6-promise": "^4.0.3"
427 | }
428 | },
429 | "escape-string-regexp": {
430 | "version": "1.0.5",
431 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
432 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
433 | "dev": true
434 | },
435 | "esprima": {
436 | "version": "4.0.1",
437 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
438 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
439 | "dev": true
440 | },
441 | "esutils": {
442 | "version": "2.0.2",
443 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
444 | "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
445 | "dev": true
446 | },
447 | "extend": {
448 | "version": "3.0.2",
449 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
450 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
451 | },
452 | "extsprintf": {
453 | "version": "1.3.0",
454 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
455 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
456 | },
457 | "fast-deep-equal": {
458 | "version": "1.1.0",
459 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
460 | "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
461 | },
462 | "fast-json-stable-stringify": {
463 | "version": "2.0.0",
464 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
465 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
466 | },
467 | "flat": {
468 | "version": "4.1.0",
469 | "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
470 | "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
471 | "requires": {
472 | "is-buffer": "~2.0.3"
473 | },
474 | "dependencies": {
475 | "is-buffer": {
476 | "version": "2.0.3",
477 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
478 | "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
479 | }
480 | }
481 | },
482 | "follow-redirects": {
483 | "version": "1.5.10",
484 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
485 | "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
486 | "requires": {
487 | "debug": "=3.1.0"
488 | }
489 | },
490 | "forever-agent": {
491 | "version": "0.6.1",
492 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
493 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
494 | },
495 | "form-data": {
496 | "version": "2.3.2",
497 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
498 | "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
499 | "requires": {
500 | "asynckit": "^0.4.0",
501 | "combined-stream": "1.0.6",
502 | "mime-types": "^2.1.12"
503 | }
504 | },
505 | "fs.realpath": {
506 | "version": "1.0.0",
507 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
508 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
509 | "dev": true
510 | },
511 | "gcp-metadata": {
512 | "version": "0.6.3",
513 | "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-0.6.3.tgz",
514 | "integrity": "sha512-MSmczZctbz91AxCvqp9GHBoZOSbJKAICV7Ow/AIWSJZRrRchUd5NL1b2P4OfP+4m490BEUPhhARfpHdqCxuCvg==",
515 | "requires": {
516 | "axios": "^0.18.0",
517 | "extend": "^3.0.1",
518 | "retry-axios": "0.3.2"
519 | }
520 | },
521 | "getpass": {
522 | "version": "0.1.7",
523 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
524 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
525 | "requires": {
526 | "assert-plus": "^1.0.0"
527 | }
528 | },
529 | "glob": {
530 | "version": "7.1.4",
531 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
532 | "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
533 | "dev": true,
534 | "requires": {
535 | "fs.realpath": "^1.0.0",
536 | "inflight": "^1.0.4",
537 | "inherits": "2",
538 | "minimatch": "^3.0.4",
539 | "once": "^1.3.0",
540 | "path-is-absolute": "^1.0.0"
541 | }
542 | },
543 | "google-auth-library": {
544 | "version": "1.6.1",
545 | "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-1.6.1.tgz",
546 | "integrity": "sha512-jYiWC8NA9n9OtQM7ANn0Tk464do9yhKEtaJ72pKcaBiEwn4LwcGYIYOfwtfsSm3aur/ed3tlSxbmg24IAT6gAg==",
547 | "requires": {
548 | "axios": "^0.18.0",
549 | "gcp-metadata": "^0.6.3",
550 | "gtoken": "^2.3.0",
551 | "jws": "^3.1.5",
552 | "lodash.isstring": "^4.0.1",
553 | "lru-cache": "^4.1.3",
554 | "retry-axios": "^0.3.2"
555 | }
556 | },
557 | "google-auto-auth": {
558 | "version": "0.10.1",
559 | "resolved": "https://registry.npmjs.org/google-auto-auth/-/google-auto-auth-0.10.1.tgz",
560 | "integrity": "sha512-iIqSbY7Ypd32mnHGbYctp80vZzXoDlvI9gEfvtl3kmyy5HzOcrZCIGCBdSlIzRsg7nHpQiHE3Zl6Ycur6TSodQ==",
561 | "requires": {
562 | "async": "^2.3.0",
563 | "gcp-metadata": "^0.6.1",
564 | "google-auth-library": "^1.3.1",
565 | "request": "^2.79.0"
566 | }
567 | },
568 | "google-p12-pem": {
569 | "version": "1.0.2",
570 | "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-1.0.2.tgz",
571 | "integrity": "sha512-+EuKr4CLlGsnXx4XIJIVkcKYrsa2xkAmCvxRhX2HsazJzUBAJ35wARGeApHUn4nNfPD03Vl057FskNr20VaCyg==",
572 | "requires": {
573 | "node-forge": "^0.7.4",
574 | "pify": "^3.0.0"
575 | }
576 | },
577 | "growl": {
578 | "version": "1.10.3",
579 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz",
580 | "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==",
581 | "dev": true
582 | },
583 | "gtoken": {
584 | "version": "2.3.0",
585 | "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-2.3.0.tgz",
586 | "integrity": "sha512-Jc9/8mV630cZE9FC5tIlJCZNdUjwunvlwOtCz6IDlaiB4Sz68ki29a1+q97sWTnTYroiuF9B135rod9zrQdHLw==",
587 | "requires": {
588 | "axios": "^0.18.0",
589 | "google-p12-pem": "^1.0.0",
590 | "jws": "^3.1.4",
591 | "mime": "^2.2.0",
592 | "pify": "^3.0.0"
593 | }
594 | },
595 | "har-schema": {
596 | "version": "2.0.0",
597 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
598 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
599 | },
600 | "har-validator": {
601 | "version": "5.1.0",
602 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz",
603 | "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==",
604 | "requires": {
605 | "ajv": "^5.3.0",
606 | "har-schema": "^2.0.0"
607 | }
608 | },
609 | "has-flag": {
610 | "version": "3.0.0",
611 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
612 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
613 | "dev": true
614 | },
615 | "he": {
616 | "version": "1.1.1",
617 | "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
618 | "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
619 | "dev": true
620 | },
621 | "http-proxy-agent": {
622 | "version": "2.1.0",
623 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
624 | "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
625 | "dev": true,
626 | "requires": {
627 | "agent-base": "4",
628 | "debug": "3.1.0"
629 | }
630 | },
631 | "http-signature": {
632 | "version": "1.2.0",
633 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
634 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
635 | "requires": {
636 | "assert-plus": "^1.0.0",
637 | "jsprim": "^1.2.2",
638 | "sshpk": "^1.7.0"
639 | }
640 | },
641 | "https-proxy-agent": {
642 | "version": "2.2.4",
643 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
644 | "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
645 | "dev": true,
646 | "requires": {
647 | "agent-base": "^4.3.0",
648 | "debug": "^3.1.0"
649 | }
650 | },
651 | "inflight": {
652 | "version": "1.0.6",
653 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
654 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
655 | "dev": true,
656 | "requires": {
657 | "once": "^1.3.0",
658 | "wrappy": "1"
659 | }
660 | },
661 | "inherits": {
662 | "version": "2.0.3",
663 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
664 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
665 | },
666 | "is": {
667 | "version": "3.2.1",
668 | "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz",
669 | "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU="
670 | },
671 | "is-buffer": {
672 | "version": "2.0.3",
673 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
674 | "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
675 | },
676 | "is-stream-ended": {
677 | "version": "0.1.4",
678 | "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz",
679 | "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw=="
680 | },
681 | "is-typedarray": {
682 | "version": "1.0.0",
683 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
684 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
685 | },
686 | "isarray": {
687 | "version": "1.0.0",
688 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
689 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
690 | },
691 | "isstream": {
692 | "version": "0.1.2",
693 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
694 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
695 | },
696 | "js-tokens": {
697 | "version": "4.0.0",
698 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
699 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
700 | "dev": true
701 | },
702 | "js-yaml": {
703 | "version": "3.13.1",
704 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
705 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
706 | "dev": true,
707 | "requires": {
708 | "argparse": "^1.0.7",
709 | "esprima": "^4.0.0"
710 | }
711 | },
712 | "jsbn": {
713 | "version": "0.1.1",
714 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
715 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
716 | "optional": true
717 | },
718 | "json-schema": {
719 | "version": "0.2.3",
720 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
721 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
722 | },
723 | "json-schema-traverse": {
724 | "version": "0.3.1",
725 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
726 | "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
727 | },
728 | "json-stringify-safe": {
729 | "version": "5.0.1",
730 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
731 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
732 | },
733 | "jsprim": {
734 | "version": "1.4.1",
735 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
736 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
737 | "requires": {
738 | "assert-plus": "1.0.0",
739 | "extsprintf": "1.3.0",
740 | "json-schema": "0.2.3",
741 | "verror": "1.10.0"
742 | }
743 | },
744 | "jwa": {
745 | "version": "1.1.6",
746 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz",
747 | "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==",
748 | "requires": {
749 | "buffer-equal-constant-time": "1.0.1",
750 | "ecdsa-sig-formatter": "1.0.10",
751 | "safe-buffer": "^5.0.1"
752 | }
753 | },
754 | "jws": {
755 | "version": "3.1.5",
756 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz",
757 | "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==",
758 | "requires": {
759 | "jwa": "^1.1.5",
760 | "safe-buffer": "^5.0.1"
761 | }
762 | },
763 | "lodash": {
764 | "version": "4.17.14",
765 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz",
766 | "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw=="
767 | },
768 | "lodash.get": {
769 | "version": "4.4.2",
770 | "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
771 | "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
772 | },
773 | "lodash.isstring": {
774 | "version": "4.0.1",
775 | "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
776 | "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
777 | },
778 | "log-driver": {
779 | "version": "1.2.7",
780 | "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz",
781 | "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg=="
782 | },
783 | "lru-cache": {
784 | "version": "4.1.3",
785 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
786 | "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==",
787 | "requires": {
788 | "pseudomap": "^1.0.2",
789 | "yallist": "^2.1.2"
790 | }
791 | },
792 | "methmeth": {
793 | "version": "1.1.0",
794 | "resolved": "https://registry.npmjs.org/methmeth/-/methmeth-1.1.0.tgz",
795 | "integrity": "sha1-6AomYY5S9cQiKGG7dIUQvRDikIk="
796 | },
797 | "mime": {
798 | "version": "2.3.1",
799 | "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz",
800 | "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg=="
801 | },
802 | "mime-db": {
803 | "version": "1.36.0",
804 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz",
805 | "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw=="
806 | },
807 | "mime-types": {
808 | "version": "2.1.20",
809 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz",
810 | "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==",
811 | "requires": {
812 | "mime-db": "~1.36.0"
813 | }
814 | },
815 | "minimatch": {
816 | "version": "3.0.4",
817 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
818 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
819 | "dev": true,
820 | "requires": {
821 | "brace-expansion": "^1.1.7"
822 | }
823 | },
824 | "minimist": {
825 | "version": "0.0.8",
826 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
827 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
828 | "dev": true
829 | },
830 | "mkdirp": {
831 | "version": "0.5.1",
832 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
833 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
834 | "dev": true,
835 | "requires": {
836 | "minimist": "0.0.8"
837 | }
838 | },
839 | "mocha": {
840 | "version": "4.1.0",
841 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz",
842 | "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==",
843 | "dev": true,
844 | "requires": {
845 | "browser-stdout": "1.3.0",
846 | "commander": "2.11.0",
847 | "debug": "3.1.0",
848 | "diff": "3.3.1",
849 | "escape-string-regexp": "1.0.5",
850 | "glob": "7.1.2",
851 | "growl": "1.10.3",
852 | "he": "1.1.1",
853 | "mkdirp": "0.5.1",
854 | "supports-color": "4.4.0"
855 | },
856 | "dependencies": {
857 | "commander": {
858 | "version": "2.11.0",
859 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
860 | "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
861 | "dev": true
862 | },
863 | "diff": {
864 | "version": "3.3.1",
865 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz",
866 | "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==",
867 | "dev": true
868 | },
869 | "glob": {
870 | "version": "7.1.2",
871 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
872 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
873 | "dev": true,
874 | "requires": {
875 | "fs.realpath": "^1.0.0",
876 | "inflight": "^1.0.4",
877 | "inherits": "2",
878 | "minimatch": "^3.0.4",
879 | "once": "^1.3.0",
880 | "path-is-absolute": "^1.0.0"
881 | }
882 | },
883 | "has-flag": {
884 | "version": "2.0.0",
885 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
886 | "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
887 | "dev": true
888 | },
889 | "supports-color": {
890 | "version": "4.4.0",
891 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz",
892 | "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
893 | "dev": true,
894 | "requires": {
895 | "has-flag": "^2.0.0"
896 | }
897 | }
898 | }
899 | },
900 | "modelo": {
901 | "version": "4.2.3",
902 | "resolved": "https://registry.npmjs.org/modelo/-/modelo-4.2.3.tgz",
903 | "integrity": "sha512-9DITV2YEMcw7XojdfvGl3gDD8J9QjZTJ7ZOUuSAkP+F3T6rDbzMJuPktxptsdHYEvZcmXrCD3LMOhdSAEq6zKA=="
904 | },
905 | "ms": {
906 | "version": "2.0.0",
907 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
908 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
909 | },
910 | "node-forge": {
911 | "version": "0.7.6",
912 | "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz",
913 | "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw=="
914 | },
915 | "oauth-sign": {
916 | "version": "0.9.0",
917 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
918 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
919 | },
920 | "once": {
921 | "version": "1.4.0",
922 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
923 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
924 | "requires": {
925 | "wrappy": "1"
926 | }
927 | },
928 | "path-is-absolute": {
929 | "version": "1.0.1",
930 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
931 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
932 | "dev": true
933 | },
934 | "path-parse": {
935 | "version": "1.0.6",
936 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
937 | "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
938 | "dev": true
939 | },
940 | "performance-now": {
941 | "version": "2.1.0",
942 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
943 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
944 | },
945 | "pify": {
946 | "version": "3.0.0",
947 | "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
948 | "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
949 | },
950 | "process-nextick-args": {
951 | "version": "2.0.0",
952 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
953 | "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
954 | },
955 | "pseudomap": {
956 | "version": "1.0.2",
957 | "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
958 | "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
959 | },
960 | "psl": {
961 | "version": "1.1.29",
962 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
963 | "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ=="
964 | },
965 | "punycode": {
966 | "version": "1.4.1",
967 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
968 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
969 | },
970 | "qs": {
971 | "version": "6.5.2",
972 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
973 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
974 | },
975 | "querystringify": {
976 | "version": "2.1.1",
977 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
978 | "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
979 | "dev": true
980 | },
981 | "readable-stream": {
982 | "version": "2.3.6",
983 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
984 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
985 | "requires": {
986 | "core-util-is": "~1.0.0",
987 | "inherits": "~2.0.3",
988 | "isarray": "~1.0.0",
989 | "process-nextick-args": "~2.0.0",
990 | "safe-buffer": "~5.1.1",
991 | "string_decoder": "~1.1.1",
992 | "util-deprecate": "~1.0.1"
993 | }
994 | },
995 | "request": {
996 | "version": "2.88.0",
997 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
998 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
999 | "requires": {
1000 | "aws-sign2": "~0.7.0",
1001 | "aws4": "^1.8.0",
1002 | "caseless": "~0.12.0",
1003 | "combined-stream": "~1.0.6",
1004 | "extend": "~3.0.2",
1005 | "forever-agent": "~0.6.1",
1006 | "form-data": "~2.3.2",
1007 | "har-validator": "~5.1.0",
1008 | "http-signature": "~1.2.0",
1009 | "is-typedarray": "~1.0.0",
1010 | "isstream": "~0.1.2",
1011 | "json-stringify-safe": "~5.0.1",
1012 | "mime-types": "~2.1.19",
1013 | "oauth-sign": "~0.9.0",
1014 | "performance-now": "^2.1.0",
1015 | "qs": "~6.5.2",
1016 | "safe-buffer": "^5.1.2",
1017 | "tough-cookie": "~2.4.3",
1018 | "tunnel-agent": "^0.6.0",
1019 | "uuid": "^3.3.2"
1020 | }
1021 | },
1022 | "requires-port": {
1023 | "version": "1.0.0",
1024 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
1025 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
1026 | "dev": true
1027 | },
1028 | "resolve": {
1029 | "version": "1.11.1",
1030 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
1031 | "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==",
1032 | "dev": true,
1033 | "requires": {
1034 | "path-parse": "^1.0.6"
1035 | }
1036 | },
1037 | "retry-axios": {
1038 | "version": "0.3.2",
1039 | "resolved": "https://registry.npmjs.org/retry-axios/-/retry-axios-0.3.2.tgz",
1040 | "integrity": "sha512-jp4YlI0qyDFfXiXGhkCOliBN1G7fRH03Nqy8YdShzGqbY5/9S2x/IR6C88ls2DFkbWuL3ASkP7QD3pVrNpPgwQ=="
1041 | },
1042 | "retry-request": {
1043 | "version": "3.3.2",
1044 | "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.2.tgz",
1045 | "integrity": "sha512-WIiGp37XXDC6e7ku3LFoi7LCL/Gs9luGeeqvbPRb+Zl6OQMw4RCRfSaW+aLfE6lhz1R941UavE6Svl3Dm5xGIQ==",
1046 | "requires": {
1047 | "request": "^2.81.0",
1048 | "through2": "^2.0.0"
1049 | }
1050 | },
1051 | "safe-buffer": {
1052 | "version": "5.1.2",
1053 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1054 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
1055 | },
1056 | "safer-buffer": {
1057 | "version": "2.1.2",
1058 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1059 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
1060 | },
1061 | "semver": {
1062 | "version": "5.7.0",
1063 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
1064 | "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
1065 | "dev": true
1066 | },
1067 | "source-map": {
1068 | "version": "0.6.1",
1069 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
1070 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
1071 | "dev": true
1072 | },
1073 | "source-map-support": {
1074 | "version": "0.5.12",
1075 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
1076 | "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
1077 | "dev": true,
1078 | "requires": {
1079 | "buffer-from": "^1.0.0",
1080 | "source-map": "^0.6.0"
1081 | }
1082 | },
1083 | "split-array-stream": {
1084 | "version": "1.0.3",
1085 | "resolved": "https://registry.npmjs.org/split-array-stream/-/split-array-stream-1.0.3.tgz",
1086 | "integrity": "sha1-0rdajl4Ngk1S/eyLgiWDncLjXfo=",
1087 | "requires": {
1088 | "async": "^2.4.0",
1089 | "is-stream-ended": "^0.1.0"
1090 | }
1091 | },
1092 | "sprintf-js": {
1093 | "version": "1.0.3",
1094 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
1095 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
1096 | "dev": true
1097 | },
1098 | "sshpk": {
1099 | "version": "1.14.2",
1100 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz",
1101 | "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=",
1102 | "requires": {
1103 | "asn1": "~0.2.3",
1104 | "assert-plus": "^1.0.0",
1105 | "bcrypt-pbkdf": "^1.0.0",
1106 | "dashdash": "^1.12.0",
1107 | "ecc-jsbn": "~0.1.1",
1108 | "getpass": "^0.1.1",
1109 | "jsbn": "~0.1.0",
1110 | "safer-buffer": "^2.0.2",
1111 | "tweetnacl": "~0.14.0"
1112 | }
1113 | },
1114 | "stream-events": {
1115 | "version": "1.0.4",
1116 | "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.4.tgz",
1117 | "integrity": "sha512-D243NJaYs/xBN2QnoiMDY7IesJFIK7gEhnvAYqJa5JvDdnh2dC4qDBwlCf0ohPpX2QRlA/4gnbnPd3rs3KxVcA==",
1118 | "requires": {
1119 | "stubs": "^3.0.0"
1120 | }
1121 | },
1122 | "stream-shift": {
1123 | "version": "1.0.0",
1124 | "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
1125 | "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI="
1126 | },
1127 | "string-format-obj": {
1128 | "version": "1.1.1",
1129 | "resolved": "https://registry.npmjs.org/string-format-obj/-/string-format-obj-1.1.1.tgz",
1130 | "integrity": "sha512-Mm+sROy+pHJmx0P/0Bs1uxIX6UhGJGj6xDGQZ5zh9v/SZRmLGevp+p0VJxV7lirrkAmQ2mvva/gHKpnF/pTb+Q=="
1131 | },
1132 | "string_decoder": {
1133 | "version": "1.1.1",
1134 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
1135 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
1136 | "requires": {
1137 | "safe-buffer": "~5.1.0"
1138 | }
1139 | },
1140 | "stubs": {
1141 | "version": "3.0.0",
1142 | "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz",
1143 | "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls="
1144 | },
1145 | "supports-color": {
1146 | "version": "5.5.0",
1147 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1148 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
1149 | "dev": true,
1150 | "requires": {
1151 | "has-flag": "^3.0.0"
1152 | }
1153 | },
1154 | "through2": {
1155 | "version": "2.0.3",
1156 | "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
1157 | "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
1158 | "requires": {
1159 | "readable-stream": "^2.1.5",
1160 | "xtend": "~4.0.1"
1161 | }
1162 | },
1163 | "tough-cookie": {
1164 | "version": "2.4.3",
1165 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
1166 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
1167 | "requires": {
1168 | "psl": "^1.1.24",
1169 | "punycode": "^1.4.1"
1170 | }
1171 | },
1172 | "tslib": {
1173 | "version": "1.9.3",
1174 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
1175 | "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
1176 | "dev": true
1177 | },
1178 | "tslint": {
1179 | "version": "5.17.0",
1180 | "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz",
1181 | "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==",
1182 | "dev": true,
1183 | "requires": {
1184 | "@babel/code-frame": "^7.0.0",
1185 | "builtin-modules": "^1.1.1",
1186 | "chalk": "^2.3.0",
1187 | "commander": "^2.12.1",
1188 | "diff": "^3.2.0",
1189 | "glob": "^7.1.1",
1190 | "js-yaml": "^3.13.1",
1191 | "minimatch": "^3.0.4",
1192 | "mkdirp": "^0.5.1",
1193 | "resolve": "^1.3.2",
1194 | "semver": "^5.3.0",
1195 | "tslib": "^1.8.0",
1196 | "tsutils": "^2.29.0"
1197 | }
1198 | },
1199 | "tsutils": {
1200 | "version": "2.29.0",
1201 | "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
1202 | "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
1203 | "dev": true,
1204 | "requires": {
1205 | "tslib": "^1.8.1"
1206 | }
1207 | },
1208 | "tunnel-agent": {
1209 | "version": "0.6.0",
1210 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
1211 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
1212 | "requires": {
1213 | "safe-buffer": "^5.0.1"
1214 | }
1215 | },
1216 | "tweetnacl": {
1217 | "version": "0.14.5",
1218 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
1219 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
1220 | "optional": true
1221 | },
1222 | "typedarray": {
1223 | "version": "0.0.6",
1224 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
1225 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
1226 | },
1227 | "typescript": {
1228 | "version": "2.9.2",
1229 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
1230 | "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
1231 | "dev": true
1232 | },
1233 | "url-parse": {
1234 | "version": "1.4.7",
1235 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz",
1236 | "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==",
1237 | "dev": true,
1238 | "requires": {
1239 | "querystringify": "^2.1.1",
1240 | "requires-port": "^1.0.0"
1241 | }
1242 | },
1243 | "util-deprecate": {
1244 | "version": "1.0.2",
1245 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1246 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
1247 | },
1248 | "uuid": {
1249 | "version": "3.3.2",
1250 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
1251 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
1252 | },
1253 | "verror": {
1254 | "version": "1.10.0",
1255 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
1256 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
1257 | "requires": {
1258 | "assert-plus": "^1.0.0",
1259 | "core-util-is": "1.0.2",
1260 | "extsprintf": "^1.2.0"
1261 | }
1262 | },
1263 | "vscode": {
1264 | "version": "1.1.34",
1265 | "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.34.tgz",
1266 | "integrity": "sha512-GuT3tCT2N5Qp26VG4C+iGmWMgg/MuqtY5G5TSOT3U/X6pgjM9LFulJEeqpyf6gdzpI4VyU3ZN/lWPo54UFPuQg==",
1267 | "dev": true,
1268 | "requires": {
1269 | "glob": "^7.1.2",
1270 | "mocha": "^4.0.1",
1271 | "request": "^2.88.0",
1272 | "semver": "^5.4.1",
1273 | "source-map-support": "^0.5.0",
1274 | "url-parse": "^1.4.4",
1275 | "vscode-test": "^0.4.1"
1276 | }
1277 | },
1278 | "vscode-test": {
1279 | "version": "0.4.3",
1280 | "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-0.4.3.tgz",
1281 | "integrity": "sha512-EkMGqBSefZH2MgW65nY05rdRSko15uvzq4VAPM5jVmwYuFQKE7eikKXNJDRxL+OITXHB6pI+a3XqqD32Y3KC5w==",
1282 | "dev": true,
1283 | "requires": {
1284 | "http-proxy-agent": "^2.1.0",
1285 | "https-proxy-agent": "^2.2.1"
1286 | }
1287 | },
1288 | "wcwidth": {
1289 | "version": "1.0.1",
1290 | "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
1291 | "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
1292 | "optional": true,
1293 | "requires": {
1294 | "defaults": "^1.0.3"
1295 | }
1296 | },
1297 | "wrappy": {
1298 | "version": "1.0.2",
1299 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1300 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
1301 | },
1302 | "xtend": {
1303 | "version": "4.0.1",
1304 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
1305 | "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
1306 | },
1307 | "yallist": {
1308 | "version": "2.1.2",
1309 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
1310 | "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
1311 | }
1312 | }
1313 | }
1314 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vscode-bigquery",
3 | "displayName": "vscode-bigquery",
4 | "description": "An extension for querying Google Cloud Platform's BigQuery analytics datasets directly from VS Code.",
5 | "version": "0.0.1",
6 | "publisher": "google",
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/google/vscode-bigquery.git"
10 | },
11 | "homepage": "https://github.com/google/vscode-bigquery",
12 | "engines": {
13 | "vscode": "^1.26.0"
14 | },
15 | "categories": [
16 | "Other"
17 | ],
18 | "activationEvents": [
19 | "onCommand:extension.runAsQuery",
20 | "onCommand:extension.runSelectedAsQuery",
21 | "onCommand:extension.dryRun"
22 | ],
23 | "main": "./out/extension",
24 | "contributes": {
25 | "commands": [
26 | {
27 | "command": "extension.runAsQuery",
28 | "title": "BigQuery: Run as Query"
29 | },
30 | {
31 | "command": "extension.runSelectedAsQuery",
32 | "title": "BigQuery: Run selected text as Query"
33 | },
34 | {
35 | "command": "extension.dryRun",
36 | "title": "BigQuery: Run as Dry Run"
37 | }
38 | ],
39 | "configuration": {
40 | "type": "object",
41 | "title": "BigQuery extension configuration",
42 | "properties": {
43 | "bigquery.keyFilename": {
44 | "type": "string",
45 | "default": "",
46 | "description": "Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option is not necessary. NOTE: .pem and .p12 require you to specify the email option as well."
47 | },
48 | "bigquery.projectId": {
49 | "type": "string",
50 | "default": "",
51 | "description": "(Optional) The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. This is NOT needed if you are provide a key in JSON format"
52 | },
53 | "bigquery.email": {
54 | "type": "string",
55 | "default": "",
56 | "description": "(Optional) Account email address. Required when using a .pem or .p12 keyFilename."
57 | },
58 | "bigquery.useLegacySql": {
59 | "type": "boolean",
60 | "default": false,
61 | "description": "Specifies whether to use BigQuery's legacy SQL dialect for this query. The default value is false. If set to false, the query will use BigQuery's standard SQL: https://cloud.google.com/bigquery/sql-reference/"
62 | },
63 | "bigquery.location": {
64 | "type": "string",
65 | "default": "US",
66 | "description": "The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/dataset-locations#specifying_your_location."
67 | },
68 | "bigquery.maximumBytesBilled": {
69 | "type": "integer",
70 | "default": 1000000000000,
71 | "description": "Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default."
72 | },
73 | "bigquery.outputFormat": {
74 | "type": "string",
75 | "default": "json",
76 | "enum": [
77 | "json",
78 | "csv",
79 | "table"
80 | ],
81 | "description": "Controls the output format for query results."
82 | },
83 | "bigquery.prettyPrintJSON": {
84 | "type": "boolean",
85 | "default": true,
86 | "description": "Pretty print JSON results."
87 | }
88 | }
89 | }
90 | },
91 | "scripts": {
92 | "vscode:prepublish": "npm run compile",
93 | "compile": "tsc -p ./",
94 | "watch": "tsc -watch -p ./",
95 | "postinstall": "node ./node_modules/vscode/bin/install",
96 | "test": "npm run compile && node ./node_modules/vscode/bin/test"
97 | },
98 | "devDependencies": {
99 | "@types/mocha": "^2.2.42",
100 | "@types/node": "^8.10.49",
101 | "tslint": "^5.17.0",
102 | "typescript": "^2.6.1",
103 | "vscode": "^1.1.34"
104 | },
105 | "dependencies": {
106 | "@google-cloud/bigquery": "^1.3.0",
107 | "csv-stringify": "^4.3.1",
108 | "easy-table": "^1.1.1",
109 | "flat": "^4.1.0"
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/src/extension.ts:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Google LLC
2 | //
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 | // https://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 |
15 | "use strict";
16 | import * as vscode from "vscode";
17 | const BigQuery = require("@google-cloud/bigquery");
18 | const toCSV = require("csv-stringify");
19 | const easyTable = require("easy-table");
20 | const flatten = require("flat");
21 |
22 | const configPrefix = "bigquery";
23 | let config: vscode.WorkspaceConfiguration;
24 | let output = vscode.window.createOutputChannel("BigQuery");
25 |
26 | // CommandMap describes a map of extension commands (defined in package.json)
27 | // and the function they invoke.
28 | type CommandMap = Map void>;
29 | let commands: CommandMap = new Map void>([
30 | ["extension.runAsQuery", runAsQuery],
31 | ["extension.runSelectedAsQuery", runSelectedAsQuery],
32 | ["extension.dryRun", dryRun]
33 | ]);
34 |
35 | export function activate(ctx: vscode.ExtensionContext) {
36 | config = readConfig();
37 |
38 | // Register all available commands and their actions.
39 | commands.forEach((action, name) => {
40 | ctx.subscriptions.push(vscode.commands.registerCommand(name, action));
41 | });
42 |
43 | // Listen for configuration changes and trigger an update, so that users don't
44 | // have to reload the VS Code environment after a config update.
45 | ctx.subscriptions.push(
46 | vscode.workspace.onDidChangeConfiguration(event => {
47 | if (!event.affectsConfiguration(configPrefix)) {
48 | return;
49 | }
50 |
51 | config = readConfig();
52 | })
53 | );
54 | }
55 |
56 | //
57 | function readConfig(): vscode.WorkspaceConfiguration {
58 | try {
59 | return vscode.workspace.getConfiguration(configPrefix);
60 | } catch (e) {
61 | vscode.window.showErrorMessage(`failed to read config: ${e}`);
62 | }
63 | }
64 |
65 | /**
66 | * @param queryText
67 | * @param isDryRun Defaults to False.
68 | */
69 | function query(queryText: string, isDryRun?: boolean): Promise {
70 | let client = BigQuery({
71 | keyFilename: config.get("keyFilename"),
72 | projectId: config.get("projectId"),
73 | email: config.get("email")
74 | });
75 |
76 | let id: string;
77 | let job = client
78 | .createQueryJob({
79 | query: queryText,
80 | location: config.get("location"),
81 | maximumBytesBilled: config.get("maximumBytesBilled"),
82 | useLegacySql: config.get("useLegacySql"),
83 | dryRun: !!isDryRun
84 | })
85 | .then(data => {
86 | let job = data[0];
87 | id = job.id;
88 | const jobIdMessage = `BigQuery job ID: ${job.id}`;
89 | if (isDryRun) {
90 | vscode.window.showInformationMessage(`${jobIdMessage} (dry run)`);
91 | let totalBytesProcessed = job.metadata.statistics.totalBytesProcessed;
92 | writeDryRunSummary(id, totalBytesProcessed);
93 | return null;
94 | }
95 | vscode.window.showInformationMessage(jobIdMessage);
96 |
97 | return job.getQueryResults({
98 | autoPaginate: true
99 | });
100 | })
101 | .catch(err => {
102 | vscode.window.showErrorMessage(`Failed to query BigQuery: ${err}`);
103 | return null;
104 | });
105 |
106 | return job
107 | .then(data => {
108 | if (data) {
109 | writeResults(id, data[0]);
110 | }
111 | })
112 | .catch(err => {
113 | vscode.window.showErrorMessage(`Failed to get results: ${err}`);
114 | });
115 | }
116 |
117 | function writeResults(jobId: string, rows: Array): void {
118 | output.show();
119 | output.appendLine(`Results for job ${jobId}:`);
120 |
121 | let format = config
122 | .get("outputFormat")
123 | .toString()
124 | .toLowerCase();
125 |
126 | switch (format) {
127 | case "csv":
128 | toCSV(rows, (err, res) => {
129 | output.appendLine(res);
130 | });
131 |
132 | break;
133 | case "table":
134 | let t = new easyTable();
135 |
136 | // Collect the header names; flatten nested objects into a
137 | // recordname.recordfield format
138 | let headers = [];
139 | Object.keys(flatten(rows[0])).forEach(name => headers.push(name));
140 |
141 | rows.forEach((val, idx) => {
142 | // Flatten each row, and for each header (name), insert the matching
143 | // object property (v[name])
144 | let v = flatten(val, { safe: true });
145 | headers.forEach((name, col) => {
146 | t.cell(name, v[name]);
147 | });
148 | t.newRow();
149 | });
150 |
151 | output.appendLine(t.toString());
152 |
153 | break;
154 | default:
155 | let spacing = config.get("prettyPrintJSON") ? " " : "";
156 | rows.forEach(row => {
157 | output.appendLine(
158 | JSON.stringify(flatten(row, { safe: true }), null, spacing)
159 | );
160 | });
161 | }
162 | }
163 |
164 | function writeDryRunSummary(jobId: string, numBytesProcessed: string) {
165 | output.show();
166 | output.appendLine(`Results for job ${jobId} (dry run):`);
167 | output.appendLine(`Total bytes processed: ${numBytesProcessed}`);
168 | output.appendLine(``);
169 | }
170 |
171 | function getQueryText(
172 | editor: vscode.TextEditor,
173 | onlySelected?: boolean
174 | ): string {
175 | if (!editor) {
176 | throw new Error("No active editor window was found");
177 | }
178 |
179 | // Only return the selected text
180 | if (onlySelected) {
181 | let selection = editor.selection;
182 | if (selection.isEmpty) {
183 | throw new Error("No text is currently selected");
184 | }
185 |
186 | return editor.document.getText(selection).trim();
187 | }
188 |
189 | let text = editor.document.getText().trim();
190 | if (!text) {
191 | throw new Error("The editor window is empty");
192 | }
193 |
194 | return text;
195 | }
196 |
197 | function runAsQuery(): void {
198 | try {
199 | let queryText = getQueryText(vscode.window.activeTextEditor);
200 | query(queryText);
201 | } catch (err) {
202 | vscode.window.showErrorMessage(err);
203 | }
204 | }
205 |
206 | function runSelectedAsQuery(): void {
207 | try {
208 | let queryText = getQueryText(vscode.window.activeTextEditor, true);
209 | query(queryText);
210 | } catch (err) {
211 | vscode.window.showErrorMessage(err);
212 | }
213 | }
214 |
215 | function dryRun(): void {
216 | try {
217 | let queryText = getQueryText(vscode.window.activeTextEditor);
218 | query(queryText, true);
219 | } catch(err) {
220 | vscode.window.showErrorMessage(err);
221 | }
222 | }
223 |
224 | export function deactivate() {}
225 |
--------------------------------------------------------------------------------
/src/test/extension.test.ts:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Google LLC
2 | //
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 | // https://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 |
15 | // import * as assert from "assert";
16 | // import * as vscode from "vscode";
17 | // import * as myExtension from "../extension";
18 | // import * as path from "path";
19 | //
20 | // const fixturePath = path.join(__dirname, "..", "..", "test", "fixtures");
21 |
22 | // Test editor <-> query text selection
23 | suite("Query text tests", function() {
24 | // test("Query text is read correctly", () => {
25 | // let uri = vscode.Uri.file(path.join(fixturePath, "test.sql"));
26 | // // call getQueryText(editor, false)
27 | // // check that expectations match via assert.equal
28 | // });
29 | // test("Query text from a selection matches", function() {
30 | // let uri = vscode.Uri.file(path.join(fixturePath, "test.sql"));
31 | // vscode.workspace.openTextDocument(uri).then(doc => {
32 | // // select the text
33 | // // call getQueryText(editor, true)
34 | // // confirm that selection matches via assert.equal
35 | // });
36 | // });
37 | });
38 |
39 | // Test that results are written correctly (table, CSV, JSON)
40 | suite("Output results tests", function() {
41 | test("JSON output is as expected", () => {
42 | // Get query results from fixture
43 | // Set config to "json"
44 | // Pass to writeResults
45 | // Capture output and match via assert.equal
46 | });
47 | });
48 |
--------------------------------------------------------------------------------
/src/test/index.ts:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Google LLC
2 | //
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 | // https://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 |
15 | import * as testRunner from "vscode/lib/testrunner"
16 |
17 | // You can directly control Mocha options by uncommenting the following lines
18 | // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
19 | testRunner.configure({
20 | ui: "tdd", // the TDD UI is being used in extension.test.ts (suite, test, etc.)
21 | useColors: true // colored output from test results
22 | })
23 |
24 | module.exports = testRunner
25 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es6",
5 | "outDir": "out",
6 | "lib": ["es6"],
7 | "sourceMap": true,
8 | "rootDir": "src",
9 | /* Strict Type-Checking Option */
10 | "strict": false /* enable all strict type-checking options */,
11 | /* Additional Checks */
12 | "noUnusedLocals": true /* Report errors on unused locals. */
13 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
14 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
15 | // "noUnusedParameters": true, /* Report errors on unused parameters. */
16 | },
17 | "exclude": ["node_modules", ".vscode-test"]
18 | }
19 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-string-throw": true,
4 | "no-unused-expression": true,
5 | "no-duplicate-variable": true,
6 | "curly": true,
7 | "class-name": true,
8 | "semicolon": [
9 | true,
10 | "always"
11 | ],
12 | "triple-equals": true
13 | },
14 | "defaultSeverity": "warning"
15 | }
--------------------------------------------------------------------------------
/vsc-extension-quickstart.md:
--------------------------------------------------------------------------------
1 | # Welcome to your VS Code Extension
2 |
3 | ## What's in the folder
4 | * This folder contains all of the files necessary for your extension.
5 | * `package.json` - this is the manifest file in which you declare your extension and command.
6 | The sample plugin registers a command and defines its title and command name. With this information
7 | VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
8 | * `src/extension.ts` - this is the main file where you will provide the implementation of your command.
9 | The file exports one function, `activate`, which is called the very first time your extension is
10 | activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
11 | We pass the function containing the implementation of the command as the second parameter to
12 | `registerCommand`.
13 |
14 | ## Get up and running straight away
15 | * Press `F5` to open a new window with your extension loaded.
16 | * Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
17 | * Set breakpoints in your code inside `src/extension.ts` to debug your extension.
18 | * Find output from your extension in the debug console.
19 |
20 | ## Make changes
21 | * You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
22 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
23 |
24 | ## Explore the API
25 | * You can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts`.
26 |
27 | ## Run tests
28 | * Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Launch Tests`.
29 | * Press `F5` to run the tests in a new window with your extension loaded.
30 | * See the output of the test result in the debug console.
31 | * Make changes to `test/extension.test.ts` or create new test files inside the `test` folder.
32 | * By convention, the test runner will only consider files matching the name pattern `**.test.ts`.
33 | * You can create folders inside the `test` folder to structure your tests any way you want.
34 |
--------------------------------------------------------------------------------