Skip to content

Commit

Permalink
feat!: move to typescript code generation (#260)
Browse files Browse the repository at this point in the history
* move to ts

* run synthtool

* run synthtool

Co-authored-by: Benjamin E. Coe <[email protected]>
  • Loading branch information
xiaozhenliu-gg5 and bcoe authored Jan 2, 2020
1 parent afdb952 commit d695963
Show file tree
Hide file tree
Showing 19 changed files with 1,350 additions and 2,990 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-oslogin/.jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'src'
'build/src'
],
includePattern: '\\.js$'
},
Expand Down
40 changes: 26 additions & 14 deletions packages/google-cloud-oslogin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"node": ">=8.10.0"
},
"repository": "googleapis/nodejs-os-login",
"main": "src/index.js",
"main": "build/src/index.js",
"files": [
"protos",
"src",
"build/protos",
"build/src",
"AUTHORS",
"COPYING"
],
Expand All @@ -29,32 +29,44 @@
"Google Cloud OS Login API"
],
"scripts": {
"test": "c8 mocha",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"lint": "eslint '**/*.js'",
"test": "c8 mocha build/test",
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
"system-test": "mocha build/system-test",
"lint": "gts fix && eslint --fix samples/*.js samples/**/*.js",
"fix": "gts fix",
"docs": "jsdoc -c .jsdoc.js",
"system-test": "mocha system-test/*.js smoke-test/*.js --timeout 600000",
"fix": "eslint --fix '**/*.js'",
"docs-test": "linkinator docs",
"predocs-test": "npm run docs"
"predocs-test": "npm run docs",
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",
"prepare": "npm run compile"
},
"dependencies": {
"google-gax": "^1.7.5"
"google-gax": "^1.9.0"
},
"devDependencies": {
"codecov": "^3.0.0",
"@types/mocha": "^5.2.5",
"@types/node": "^12.0.0",
"c8": "^6.0.0",
"eslint": "^6.0.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.0.0",
"gts": "^1.0.0",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
"linkinator": "^1.5.0",
"mocha": "^6.0.0",
"c8": "^7.0.0",
"mocha": "^6.1.4",
"null-loader": "^3.0.0",
"pack-n-play": "^1.0.0-2",
"power-assert": "^1.4.4",
"prettier": "^1.9.2"
"prettier": "^1.11.1",
"ts-loader": "^6.2.1",
"typescript": "^3.7.0",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10"
}
}
24 changes: 24 additions & 0 deletions packages/google-cloud-oslogin/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2019 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. **

import * as v1beta from './v1beta';
const OsLoginServiceClient = v1beta.OsLoginServiceClient;
export {v1beta, OsLoginServiceClient};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v1beta, OsLoginServiceClient};
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
// 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';

// Set a flag that we are running in a browser bundle.
global.isBrowser = true;

// Re-export all exports from ./index.js.
module.exports = require('./index');
export {OsLoginServiceClient} from './os_login_service_client';
Loading

0 comments on commit d695963

Please sign in to comment.