Skip to content

Commit

Permalink
chore(deps): update dependency sinon to v11 (#5)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency sinon to v11

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Justin Beckwith <justin.beckwith@gmail.com>
  • Loading branch information
3 people authored Jun 27, 2021
1 parent 5d64cdd commit 0a4775d
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 72 deletions.
40 changes: 38 additions & 2 deletions packages/google-cloud-lifesciences/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
* [Quickstart](#quickstart)
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)


* [Using the client library](#using-the-client-library)
* [Samples](#samples)
* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)
Expand All @@ -55,6 +55,42 @@ npm install @google-cloud/life-sciences
```


### Using the client library

```javascript
// Imports the Google Cloud client library

// remove this line after package is released
// eslint-disable-next-line node/no-missing-require
const {WorkflowsServiceV2BetaClient} = require('@google-cloud/life-sciences');

// TODO(developer): replace with your prefered project ID.
// const projectId = 'my-project'

// Creates a client
// eslint-disable-next-line no-unused-vars
const client = new {WorkflowsServiceV2BetaClient}();

//TODO(library generator): write the actual function you will be testing
async function doSomething() {
console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.')
// const [thing] = await client.methodName({
// });
// console.info(thing);
}
doSomething();

```



## Samples

Samples are in the [`samples/`](https://github.com/googleapis/nodejs-life-sciences/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample.

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Quickstart | [source code](https://github.com/googleapis/nodejs-life-sciences/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-life-sciences&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |



Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-lifesciences/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"mocha": "^8.4.0",
"null-loader": "^4.0.1",
"pack-n-play": "^1.0.0-2",
"sinon": "^10.0.0",
"sinon": "^11.0.0",
"ts-loader": "^9.1.2",
"typescript": "^4.2.4",
"webpack": "^5.36.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-lifesciences/protos/protos.d.ts

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

20 changes: 10 additions & 10 deletions packages/google-cloud-lifesciences/protos/protos.js

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

50 changes: 50 additions & 0 deletions packages/google-cloud-lifesciences/samples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[//]: # "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"/>

# [Cloud Life Sciences: Node.js Samples](https://github.com/googleapis/nodejs-life-sciences)

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



## Table of Contents

* [Before you begin](#before-you-begin)
* [Samples](#samples)
* [Quickstart](#quickstart)

## Before you begin

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

`cd samples`

`npm install`

`cd ..`

## Samples



### Quickstart

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

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

__Usage:__


`node samples/quickstart.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/nodejs-life-sciences&page=editor&open_in_editor=samples/README.md
[product-docs]: https://cloud.google.com/life-sciences/
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,13 @@ export class WorkflowsServiceV2BetaClient {
const workflowsServiceV2BetaStubMethods = ['runPipeline'];
for (const methodName of workflowsServiceV2BetaStubMethods) {
const callPromise = this.workflowsServiceV2BetaStub.then(
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down Expand Up @@ -431,10 +430,11 @@ export class WorkflowsServiceV2BetaClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.runPipeline(request, options, callback);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
const lifesciences = require('@google-cloud/lifesciences');

function main() {
const workflowsServiceV2BetaClient =
new lifesciences.WorkflowsServiceV2BetaClient();
const workflowsServiceV2BetaClient = new lifesciences.WorkflowsServiceV2BetaClient();
}

main();
Loading

0 comments on commit 0a4775d

Please sign in to comment.