Move grpc-js xDS features into a separate package

This commit is contained in:
Michael Lumish 2020-10-12 10:23:03 -07:00
parent 108601ef1a
commit bbd7617ba7
6 changed files with 82 additions and 2 deletions

View File

@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts/"
}

View File

@ -0,0 +1,3 @@
module.exports = {
...require('gts/.prettierrc.json')
}

View File

@ -0,0 +1,41 @@
{
"name": "@grpc/grpc-js-xds",
"version": "1.0.0",
"description": "Plugin for @grpc/grpc-js. Adds the xds:// URL scheme and associated features.",
"main": "build/src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"check": "gts check",
"clean": "gts clean",
"compile": "tsc",
"fix": "gts fix",
"prepare": "npm run compile",
"pretest": "npm run compile",
"posttest": "npm run check"
},
"repository": {
"type": "git",
"url": "git+https://github.com/grpc/grpc-node.git"
},
"keywords": [
"grpc"
],
"author": {
"name": "Google Inc."
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/grpc/grpc-node/issues"
},
"homepage": "https://github.com/grpc/grpc-node#readme",
"devDependencies": {
"gts": "^2.0.2",
"typescript": "^3.8.3",
"@types/node": "^13.11.1",
"yargs": "^15.4.1"
},
"dependencies": {
"@grpc/proto-loader": "^0.6.0-pre14",
"google-auth-library": "^6.1.1"
}
}

View File

@ -0,0 +1,24 @@
console.log('Try npm run check/fix!');
const longString =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut aliquet diam.';
const trailing = 'Semicolon';
const why = 'am I tabbed?';
export function doSomeStuff(
withThis: string,
andThat: string,
andThose: string[]
) {
//function on one line
if (!andThose.length) {
return false;
}
console.log(withThis);
console.log(andThat);
console.dir(andThose);
return;
}
// TODO: more examples

View File

@ -0,0 +1,11 @@
{
"extends": "./node_modules/gts/tsconfig-google.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
},
"include": [
"src/**/*.ts",
"test/**/*.ts"
]
}

View File

@ -58,9 +58,7 @@
"posttest": "npm run check"
},
"dependencies": {
"@grpc/proto-loader": "^0.6.0-pre14",
"@types/node": "^12.12.47",
"google-auth-library": "^5.10.1",
"semver": "^6.2.0"
},
"files": [