Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

fix(build): run synthtool with new repo name #191

Merged
merged 4 commits into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Thanks for stopping by to let us know something could be better!

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/gce-images/issues
- Search the issues already opened: https://github.com/googleapis/nodejs-gce-images/issues
- Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com//issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/gce-images/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
Expand Down
3 changes: 2 additions & 1 deletion .jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module.exports = {
destination: './docs/'
},
plugins: [
'plugins/markdown'
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
Expand Down
4 changes: 2 additions & 2 deletions .kokoro/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/continuous/node10/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/docs.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/lint.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/samples-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/system-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/continuous/node12/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/continuous/node8/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/presubmit/node10/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/docs.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/lint.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/samples-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/system-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/presubmit/node12/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/presubmit/node8/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/windows/test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/release/docs.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/release/publish.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"coreos",
"centos"
],
"repository": "googleapis/gce-images",
"repository": "googleapis/nodejs-gce-images",
"author": "Stephen Sawchuk <[email protected]>",
"license": "MIT",
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"extends": "packages:linters",
"groupName": "linters"
}
]
],
"ignoreDeps": ["typescript"]
}
98 changes: 98 additions & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
[//]: # "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"/>

# [GCE Images: Node.js Samples](https://github.com/googleapis/gce-images)

[![Open in Cloud Shell][shell_img]][shell_link]



## Table of Contents

* [Before you begin](#before-you-begin)
* [Samples](#samples)
* [From Project](#from-project)
* [Latest Specific OS](#latest-specific-os)
* [Quickstart](#quickstart)
* [Specific OS](#specific-os)

## Before you begin

Before running the samples, make sure you've followed the steps outlined in
[Using the client library](https://github.com/googleapis/gce-images#using-the-client-library).

## Samples



### From Project

View the [source code](https://github.com/googleapis/gce-images/blob/master/samples/fromProject.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/gce-images&page=editor&open_in_editor=samples/fromProject.js,samples/README.md)

__Usage:__


`node fromProject.js`


-----




### Latest Specific OS

View the [source code](https://github.com/googleapis/gce-images/blob/master/samples/latestSpecificOS.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/gce-images&page=editor&open_in_editor=samples/latestSpecificOS.js,samples/README.md)

__Usage:__


`node latestSpecificOS.js`


-----




### Quickstart

View the [source code](https://github.com/googleapis/gce-images/blob/master/samples/quickstart.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/gce-images&page=editor&open_in_editor=samples/quickstart.js,samples/README.md)

__Usage:__


`node quickstart.js`


-----




### Specific OS

View the [source code](https://github.com/googleapis/gce-images/blob/master/samples/specificOS.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/gce-images&page=editor&open_in_editor=samples/specificOS.js,samples/README.md)

__Usage:__


`node specificOS.js`






[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/gce-images&page=editor&open_in_editor=samples/README.md
[product-docs]: https://cloud.google.com/compute/docs/images
30 changes: 17 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
/**
* Copyright 2018 Google LLC
*
* Distributed under MIT license.
* See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
// Copyright 2018 Google LLC
//
// 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.

import arrify = require('arrify');
import {GoogleAuth, GoogleAuthOptions} from 'google-auth-library';
Expand Down Expand Up @@ -164,13 +171,10 @@ export class GCEImages {
const result =
opts.osNames!.length === 1
? (osNamesToImages.get(opts.osNames![0]) as Image[])
: Array.from(osNamesToImages).reduce(
(obj: ImagesMap, [key, value]) => {
obj[key] = value;
return obj;
},
{} as ImagesMap
);
: Array.from(osNamesToImages).reduce((obj: ImagesMap, [key, value]) => {
obj[key] = value;
return obj;
}, {} as ImagesMap);
return result as Image[];
}

Expand Down
Loading