Skip to content

Commit d41ecef

Browse files
refactor: use repo-metadata to generate readme (#405)
1 parent 5e74023 commit d41ecef

File tree

9 files changed

+130
-103
lines changed

9 files changed

+130
-103
lines changed

.clang-format

Lines changed: 0 additions & 3 deletions
This file was deleted.

.cloud-repo-tools.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ system-test/secrets.js
99
system-test/*key.json
1010
*.lock
1111
.DS_Store
12-
google-cloud-logging-winston-*.tgz
13-
google-cloud-logging-bunyan-*.tgz
12+
__pycache__
1413
.vscode
1514
package-lock.json

.repo-metadata.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "datastore",
3+
"name_pretty": "Google Cloud Datastore",
4+
"product_documentation": "https://cloud.google.com/datastore",
5+
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/datastore/latest/",
6+
"issue_tracker": "https://issuetracker.google.com/savedsearches/559768",
7+
"release_level": "ga",
8+
"language": "nodejs",
9+
"repo": "googleapis/nodejs-datastore",
10+
"distribution_name": "@google-cloud/datastore",
11+
"api_id": "datastore.googleapis.com"
12+
}

README.md

Lines changed: 46 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,57 @@
11
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
2-
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
2+
[//]: # "To regenerate it, use `python -m synthtool`."
33
<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"/>
44

55
# [Google Cloud Datastore: Node.js Client](https://github.com/googleapis/nodejs-datastore)
66

7-
[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style&#x3D;flat)](https://cloud.google.com/terms/launch-stages)
7+
[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
88
[![npm version](https://img.shields.io/npm/v/@google-cloud/datastore.svg)](https://www.npmjs.org/package/@google-cloud/datastore)
99
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-datastore/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-datastore)
1010

11-
[Cloud Datastore](https://cloud.google.com/datastore/docs) is a NoSQL document database built for automatic scaling, high performance, and ease of application development. While the Cloud Datastore interface has many of the same features as traditional databases, as a NoSQL database it differs from them in the way it describes relationships between data objects.
1211

1312

14-
* [Using the client library](#using-the-client-library)
13+
14+
Cloud Datastore Client Library for Node.js
15+
16+
17+
* [Google Cloud Datastore Node.js Client API Reference][client-docs]
18+
* [Google Cloud Datastore Documentation][product-docs]
19+
* [github.com/googleapis/nodejs-datastore](https://github.com/googleapis/nodejs-datastore)
20+
21+
Read more about the client libraries for Cloud APIs, including the older
22+
Google APIs Client Libraries, in [Client Libraries Explained][explained].
23+
24+
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
25+
26+
**Table of contents:**
27+
28+
29+
* [Quickstart](#quickstart)
30+
* [Before you begin](#before-you-begin)
31+
* [Installing the client library](#installing-the-client-library)
32+
* [Using the client library](#using-the-client-library)
1533
* [Samples](#samples)
1634
* [Versioning](#versioning)
1735
* [Contributing](#contributing)
1836
* [License](#license)
1937

20-
## Using the client library
38+
## Quickstart
2139

22-
1. [Select or create a Cloud Platform project][projects].
23-
24-
1. [Enable billing for your project][billing].
40+
### Before you begin
2541

42+
1. [Select or create a Cloud Platform project][projects].
2643
1. [Enable the Google Cloud Datastore API][enable_api].
27-
2844
1. [Set up authentication with a service account][auth] so you can access the
2945
API from your local workstation.
3046

31-
1. Install the client library:
47+
### Installing the client library
48+
49+
```bash
50+
npm install @google-cloud/datastore
51+
```
3252

33-
npm install --save @google-cloud/datastore
3453

35-
1. Try an example:
54+
### Using the client library
3655

3756
```javascript
3857
// Imports the Google Cloud client library
@@ -67,31 +86,42 @@ async function quickStart() {
6786
console.log(`Saved ${task.key.name}: ${task.data.description}`);
6887
}
6988
quickStart().catch(console.error);
89+
7090
```
7191

92+
93+
7294
## Samples
7395

7496
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-datastore/tree/master/samples) directory. The samples' `README.md`
7597
has instructions for running the samples.
7698

7799
| Sample | Source Code | Try it |
78100
| --------------------------- | --------------------------------- | ------ |
79-
| Tasks | [source code](https://github.com/googleapis/nodejs-datastore/blob/master/samples/tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/tasks.js,samples/README.md) |
80101
| Concepts | [source code](https://github.com/googleapis/nodejs-datastore/blob/master/samples/concepts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/concepts.js,samples/README.md) |
102+
| Quickstart | [source code](https://github.com/googleapis/nodejs-datastore/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-datastore&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
103+
| Tasks | [source code](https://github.com/googleapis/nodejs-datastore/blob/master/samples/tasks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/tasks.js,samples/README.md) |
104+
81105

82-
The [Cloud Datastore Node.js Client API Reference][client-docs] documentation
106+
107+
The [Google Cloud Datastore Node.js Client API Reference][client-docs] documentation
83108
also contains samples.
84109

85110
## Versioning
86111

87112
This library follows [Semantic Versioning](http://semver.org/).
88113

114+
89115
This library is considered to be **General Availability (GA)**. This means it
90116
is stable; the code surface will not change in backwards-incompatible ways
91117
unless absolutely necessary (e.g. because of critical security issues) or with
92118
an extensive deprecation period. Issues and requests against **GA** libraries
93119
are addressed with the highest priority.
94120

121+
122+
123+
124+
95125
More Information: [Google Cloud Platform Launch Stages][launch_stages]
96126

97127
[launch_stages]: https://cloud.google.com/terms/launch-stages
@@ -106,21 +136,10 @@ Apache Version 2.0
106136

107137
See [LICENSE](https://github.com/googleapis/nodejs-datastore/blob/master/LICENSE)
108138

109-
## What's Next
110-
111-
* [Cloud Datastore Documentation][product-docs]
112-
* [Cloud Datastore Node.js Client API Reference][client-docs]
113-
* [github.com/googleapis/nodejs-datastore](https://github.com/googleapis/nodejs-datastore)
114-
115-
Read more about the client libraries for Cloud APIs, including the older
116-
Google APIs Client Libraries, in [Client Libraries Explained][explained].
117-
118-
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
119-
120139
[client-docs]: https://cloud.google.com/nodejs/docs/reference/datastore/latest/
121-
[product-docs]: https://cloud.google.com/datastore/docs
140+
[product-docs]: https://cloud.google.com/datastore
122141
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
123142
[projects]: https://console.cloud.google.com/project
124143
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
125144
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=datastore.googleapis.com
126-
[auth]: https://cloud.google.com/docs/authentication/getting-started
145+
[auth]: https://cloud.google.com/docs/authentication/getting-started

package.json

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
],
3030
"scripts": {
3131
"docs": "jsdoc -c .jsdoc.js",
32-
"generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
3332
"lint": "gts check && eslint '**/*.js'",
3433
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
3534
"test": "nyc mocha build/test",
@@ -51,49 +50,48 @@
5150
"@grpc/grpc-js": "^0.4.0",
5251
"@types/duplexify": "^3.6.0",
5352
"@types/long": "^4.0.0",
54-
"arrify": "^2.0.0",
53+
"arrify": "^2.0.1",
5554
"concat-stream": "^2.0.0",
56-
"extend": "^3.0.1",
55+
"extend": "^3.0.2",
5756
"google-auth-library": "^4.0.0",
5857
"google-gax": "^1.0.0",
59-
"is": "^3.2.1",
58+
"is": "^3.3.0",
6059
"lodash.merge": "^4.6.1",
6160
"split-array-stream": "^2.0.0",
62-
"stream-events": "^1.0.4",
63-
"through2": "^3.0.0"
61+
"stream-events": "^1.0.5",
62+
"through2": "^3.0.1"
6463
},
6564
"devDependencies": {
66-
"@google-cloud/nodejs-repo-tools": "^3.0.0",
67-
"@types/extend": "^3.0.0",
65+
"@types/extend": "^3.0.1",
6866
"@types/is": "0.0.21",
69-
"@types/mocha": "^5.2.5",
67+
"@types/mocha": "^5.2.6",
7068
"@types/mv": "^2.1.0",
7169
"@types/ncp": "^2.0.1",
7270
"@types/proxyquire": "^1.3.28",
73-
"@types/sinon": "^7.0.2",
71+
"@types/sinon": "^7.0.11",
7472
"@types/through2": "^2.0.34",
7573
"@types/tmp": "0.1.0",
7674
"assert-rejects": "^1.0.0",
77-
"codecov": "^3.0.2",
78-
"eslint": "^5.0.0",
79-
"eslint-config-prettier": "^4.0.0",
80-
"eslint-plugin-node": "^9.0.0",
81-
"eslint-plugin-prettier": "^3.0.0",
75+
"codecov": "^3.5.0",
76+
"eslint": "^5.16.0",
77+
"eslint-config-prettier": "^4.2.0",
78+
"eslint-plugin-node": "^9.0.1",
79+
"eslint-plugin-prettier": "^3.1.0",
8280
"google-proto-files": "^1.0.0",
8381
"gts": "^1.0.0",
8482
"intelli-espower-loader": "^1.0.1",
8583
"jsdoc": "^3.6.2",
8684
"jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git",
87-
"linkinator": "^1.1.2",
88-
"mocha": "^6.0.0",
85+
"linkinator": "^1.4.2",
86+
"mocha": "^6.1.4",
8987
"mv": "^2.1.1",
9088
"ncp": "^2.0.0",
91-
"nyc": "^14.0.0",
92-
"power-assert": "^1.5.0",
93-
"prettier": "^1.13.5",
94-
"proxyquire": "^2.0.1",
95-
"sinon": "^7.0.0",
89+
"nyc": "^14.1.1",
90+
"power-assert": "^1.6.1",
91+
"prettier": "^1.17.1",
92+
"proxyquire": "^2.1.0",
93+
"sinon": "^7.3.2",
9694
"tmp": "0.1.0",
97-
"typescript": "~3.4.0"
95+
"typescript": "~3.4.5"
9896
}
9997
}

samples/README.md

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,80 @@
11
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
2-
[//]: # "To regenerate it, use `npm run generate-scaffolding`."
2+
[//]: # "To regenerate it, use `python -m synthtool`."
33
<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"/>
44

5-
# Google Cloud Datastore: Node.js Samples
5+
# [Google Cloud Datastore: Node.js Samples](https://github.com/googleapis/nodejs-datastore)
66

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

9-
[Cloud Datastore](https://cloud.google.com/datastore/docs) is a NoSQL document database built for automatic scaling, high performance, and ease of application development. While the Cloud Datastore interface has many of the same features as traditional databases, as a NoSQL database it differs from them in the way it describes relationships between data objects.
9+
1010

1111
## Table of Contents
1212

1313
* [Before you begin](#before-you-begin)
1414
* [Samples](#samples)
15-
* [Tasks](#tasks)
1615
* [Concepts](#concepts)
17-
* [Errors and Error Handling](#errors-and-error-handling)
16+
* [Quickstart](#quickstart)
17+
* [Tasks](#tasks)
1818

1919
## Before you begin
2020

21-
Before running the samples, make sure you've followed the steps in the
22-
[Before you begin section](../README.md#before-you-begin) of the client
23-
library's README.
21+
Before running the samples, make sure you've followed the steps outlined in
22+
[Using the client library](https://github.com/googleapis/nodejs-datastore#using-the-client-library).
2423

2524
## Samples
2625

26+
27+
28+
### Concepts
29+
30+
View the [source code](https://github.com/googleapis/nodejs-datastore/blob/master/samples/concepts.js).
31+
32+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/concepts.js,samples/README.md)
33+
34+
__Usage:__
35+
36+
37+
`node concepts.js`
38+
39+
40+
-----
41+
42+
43+
44+
45+
### Quickstart
46+
47+
View the [source code](https://github.com/googleapis/nodejs-datastore/blob/master/samples/quickstart.js).
48+
49+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/quickstart.js,samples/README.md)
50+
51+
__Usage:__
52+
53+
54+
`node quickstart.js`
55+
56+
57+
-----
58+
59+
60+
61+
2762
### Tasks
2863

29-
View the [source code][tasks_0_code].
64+
View the [source code](https://github.com/googleapis/nodejs-datastore/blob/master/samples/tasks.js).
3065

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

33-
__Usage:__ `node tasks.js --help`
34-
[tasks_0_docs]: https://cloud.google.com/datastore/docs/datastore-api-tutorial
35-
[tasks_0_code]: tasks.js
68+
__Usage:__
3669

37-
### Concepts
3870

39-
View the [source code][concepts_1_code].
71+
`node tasks.js`
4072

41-
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/concepts.js,samples/README.md)[concepts_1_docs]: https://cloud.google.com/datastore/docs/concepts/entities
42-
[concepts_1_code]: concepts.js
4373

44-
### Errors and Error Handling
4574

46-
View the [source code][error_2_code].
4775

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

50-
__Usage:__ `node error.js`
51-
[error_2_docs]: https://cloud.google.com/datastore/docs/concepts/errors
52-
[error_2_code]: error.js
5377

5478
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
5579
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datastore&page=editor&open_in_editor=samples/README.md
80+
[product-docs]: https://cloud.google.com/datastore

samples/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "nodejs-docs-samples-datastore",
3-
"version": "0.0.1",
43
"private": true,
54
"license": "Apache-2.0",
65
"author": "Google Inc.",

synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"updateTime": "2019-05-10T12:01:53.705538Z",
2+
"updateTime": "2019-05-15T05:46:46.853335Z",
33
"sources": [
44
{
55
"generator": {
@@ -12,8 +12,8 @@
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a",
16-
"internalRef": "247530843"
15+
"sha": "275cdfcdc3188a60456f43acd139b8cc037379f4",
16+
"internalRef": "248217300"
1717
}
1818
},
1919
{

0 commit comments

Comments
 (0)