Skip to content

Commit

Permalink
feat!: initial generation of filestore API (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe authored Jul 21, 2021
1 parent b46e2db commit b31c7e4
Show file tree
Hide file tree
Showing 42 changed files with 53,586 additions and 3 deletions.
6 changes: 6 additions & 0 deletions packages/google-cloud-filestore/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/node_modules
**/coverage
test/fixtures
build/
docs/
protos/
3 changes: 3 additions & 0 deletions packages/google-cloud-filestore/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
4 changes: 4 additions & 0 deletions packages/google-cloud-filestore/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.ts text eol=lf
*.js text eol=lf
protos/* linguist-generated
**/api-extractor.json linguist-language=JSON-with-Comments
22 changes: 22 additions & 0 deletions packages/google-cloud-filestore/.github/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2021 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.
docker:
image: gcr.io/repo-automation-bots/owlbot-nodejs:latest

deep-remove-regex:
- /owl-bot-staging

deep-copy-regex:
- source: /google/cloud/filestore/(.*)/.*-nodejs/(.*)
dest: /owl-bot-staging/$1/$2
14 changes: 14 additions & 0 deletions packages/google-cloud-filestore/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**/*.log
**/node_modules
.coverage
coverage
.nyc_output
docs/
out/
build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
package-lock.json
__pycache__
55 changes: 55 additions & 0 deletions packages/google-cloud-filestore/.jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright 2021 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
//
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

'use strict';

module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/jsdoc-fresh',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'build/src',
'protos'
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2021 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/filestore',
theme: 'lumen',
default: {
outputSourceFiles: false
}
},
markdown: {
idInHeadings: true
}
};
29 changes: 29 additions & 0 deletions packages/google-cloud-filestore/.mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2020 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.
const config = {
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000,
"recursive": true
}
if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
delete config['throw-deprecation'];
}
if (process.env.MOCHA_REPORTER) {
config.reporter = process.env.MOCHA_REPORTER;
}
if (process.env.MOCHA_REPORTER_OUTPUT) {
config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
}
module.exports = config
24 changes: 24 additions & 0 deletions packages/google-cloud-filestore/.nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"report-dir": "./.coverage",
"reporter": ["text", "lcov"],
"exclude": [
"**/*-test",
"**/.coverage",
"**/apis",
"**/benchmark",
"**/conformance",
"**/docs",
"**/samples",
"**/scripts",
"**/protos",
"**/test",
"**/*.d.ts",
".jsdoc.js",
"**/.jsdoc.js",
"karma.conf.js",
"webpack-tests.config.js",
"webpack.config.js"
],
"exclude-after-remap": false,
"all": true
}
6 changes: 6 additions & 0 deletions packages/google-cloud-filestore/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/node_modules
**/coverage
test/fixtures
build/
docs/
protos/
17 changes: 17 additions & 0 deletions packages/google-cloud-filestore/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2020 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
//
// https://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.

module.exports = {
...require('gts/.prettierrc.json')
}
14 changes: 14 additions & 0 deletions packages/google-cloud-filestore/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "filestore",
"name_pretty": "Filestore",
"product_documentation": "https://cloud.google.com/filestore/",
"client_documentation": "https://googleapis.dev/nodejs/filestore/latest",
"issue_tracker": "https://github.com/googleapis/nodejs-filestore/issues",
"release_level": "ga",
"language": "nodejs",
"repo": "googleapis/nodejs-filestore",
"distribution_name": "@google-cloud/filestore",
"api_id": "file.googleapis.com",
"default_version": "v1",
"requires_billing": true
}
44 changes: 41 additions & 3 deletions packages/google-cloud-filestore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# [Filestore: Node.js Client](https://github.com/googleapis/nodejs-filestore)

[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![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)
[![npm version](https://img.shields.io/npm/v/@google-cloud/filestore.svg)](https://www.npmjs.org/package/@google-cloud/filestore)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-filestore/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-filestore)

Expand Down 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,38 @@ npm install @google-cloud/filestore
```


### Using the client library

```javascript
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
// const projectId = 'my-project';
// const location = 'us-central1-a';

// Imports the Google Cloud Some API library
const {CloudFilestoreManagerClient} = require('@google-cloud/filestore');
const client = new CloudFilestoreManagerClient();
async function listInstances() {
for await (const instance of client.listInstancesAsync({
parent: `projects/${projectId}/locations/${location}`,
})) {
console.info(instance);
}
}
listInstances();

```



## Samples

Samples are in the [`samples/`](https://github.com/googleapis/nodejs-filestore/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-filestore/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-filestore&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |



Expand Down Expand Up @@ -87,6 +119,12 @@ _Legacy Node.js versions are supported as a best effort:_
This library follows [Semantic Versioning](http://semver.org/).


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




Expand Down
10 changes: 10 additions & 0 deletions packages/google-cloud-filestore/linkinator.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recurse": true,
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io"
],
"silent": true,
"concurrency": 10
}
66 changes: 66 additions & 0 deletions packages/google-cloud-filestore/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "@google-cloud/filestore",
"version": "0.1.0",
"description": "file client for Node.js",
"repository": "googleapis/nodejs-filestore",
"license": "Apache-2.0",
"author": "Google LLC",
"main": "build/src/index.js",
"files": [
"build/src",
"build/protos"
],
"keywords": [
"google apis client",
"google api client",
"google apis",
"google api",
"google",
"google cloud platform",
"google cloud",
"cloud",
"google file",
"file",
"file service"
],
"scripts": {
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",
"docs": "jsdoc -c .jsdoc.js",
"predocs-test": "npm run docs",
"docs-test": "linkinator docs",
"fix": "gts fix",
"prelint": "cd samples; npm link ../; npm install",
"lint": "gts check",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"test": "c8 mocha build/test"
},
"dependencies": {
"google-gax": "^2.19.0"
},
"devDependencies": {
"@types/mocha": "^8.2.2",
"@types/node": "^14.14.44",
"@types/sinon": "^10.0.0",
"c8": "^7.7.2",
"gts": "^3.1.0",
"jsdoc": "^3.6.6",
"jsdoc-fresh": "^1.0.2",
"jsdoc-region-tag": "^1.0.6",
"linkinator": "^2.13.6",
"mocha": "^8.4.0",
"null-loader": "^4.0.1",
"pack-n-play": "^1.0.0-2",
"sinon": "^10.0.0",
"ts-loader": "^9.1.2",
"typescript": "^4.2.4",
"webpack": "^5.36.2",
"webpack-cli": "^4.7.0"
},
"engines": {
"node": ">=v10.0.0"
}
}
Loading

0 comments on commit b31c7e4

Please sign in to comment.