Skip to content

Commit ed18719

Browse files
Merge pull request #112 from googleapis/gaxios-migration
chore: migrate code from googleapis/gaxios
2 parents 7785efe + 7a7ffe9 commit ed18719

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+5978
-1
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"dev-packages/jsdoc-fresh": "5.0.2",
33
"dev-packages/jsdoc-region-tag": "4.0.1",
44
"dev-packages/pack-n-play": "4.2.1",
5+
"packages/gaxios": "7.1.2",
56
"packages/gcp-metadata": "8.1.1",
67
"packages/proto3-json-serializer-nodejs": "3.0.3"
78
}

packages/gaxios/.compodocrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
tsconfig: ./tsconfig.json
3+
output: ./docs
4+
theme: material
5+
hideGenerator: true
6+
disablePrivate: true
7+
disableProtected: true
8+
disableInternal: true
9+
disableCoverage: true
10+
disableGraph: true

packages/gaxios/.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**/node_modules
2+
**/coverage
3+
test/fixtures
4+
build/
5+
docs/
6+
protos/
7+
samples/generated/
8+
system-test/**/fixtures

packages/gaxios/.eslintrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Config file for eslint used by gts.
2+
3+
const path = require('path');
4+
5+
// 1. Find the absolute path to the 'gts' package's directory
6+
// This forces Node.js to look up in the directory tree (hoisted root)
7+
const GTS_CONFIG_PATH = path.dirname(
8+
require.resolve('gts/package.json', {paths: [__dirname]}),
9+
);
10+
11+
module.exports = {
12+
// Use the absolute path provided by Node's resolution
13+
// This bypasses the relative path failure completely.
14+
extends: [GTS_CONFIG_PATH],
15+
};

packages/gaxios/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/gts"
3+
}

packages/gaxios/.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.ts text eol=lf
2+
*.js text eol=lf
3+
protos/* linguist-generated
4+
**/api-extractor.json linguist-language=JSON-with-Comments
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2021 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+
# http://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+
docker:
15+
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
16+
17+
18+
begin-after-commit-hash: 397c0bfd367a2427104f988d5329bc117caafd95
19+

packages/gaxios/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules/
2+
docs/
3+
build/
4+
.nyc_output
5+
coverage
6+
yarn.lock
7+
.vscode
8+
dist/
9+
__pycache__
10+
.coverage
11+
package-lock.json

packages/gaxios/.jsdoc.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright 2019 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+
16+
'use strict';
17+
18+
const path = require('path');
19+
20+
module.exports = {
21+
opts: {
22+
readme: './README.md',
23+
package: './package.json',
24+
template: path.dirname(require.resolve('jsdoc-fresh/package.json')),
25+
recurse: true,
26+
verbose: true,
27+
destination: './docs/',
28+
},
29+
plugins: ['plugins/markdown', 'jsdoc-region-tag'],
30+
source: {
31+
excludePattern: '(^|\\/|\\\\)[._]',
32+
include: ['build/esm/src/'],
33+
includePattern: '\\.js$',
34+
},
35+
templates: {
36+
copyright: 'Copyright 2019 Google, LLC.',
37+
includeDate: false,
38+
sourceFiles: false,
39+
systemName: 'gaxios',
40+
theme: 'lumen',
41+
default: {
42+
outputSourceFiles: false,
43+
},
44+
},
45+
markdown: {
46+
idInHeadings: true,
47+
},
48+
};

packages/gaxios/.mocharc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Copyright 2020 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+
// http://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+
const config = {
15+
"enable-source-maps": true,
16+
"throw-deprecation": true,
17+
"timeout": 10000,
18+
"recursive": true
19+
}
20+
if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
21+
delete config['throw-deprecation'];
22+
}
23+
if (process.env.MOCHA_REPORTER) {
24+
config.reporter = process.env.MOCHA_REPORTER;
25+
}
26+
if (process.env.MOCHA_REPORTER_OUTPUT) {
27+
config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
28+
}
29+
module.exports = config

0 commit comments

Comments
 (0)