Skip to content

Commit

Permalink
Setup starter, ci and implemented server provider.
Browse files Browse the repository at this point in the history
Implemented a vanilla version of the loopback extension
starter, made some tweaks and added travis & appveyor config files.

Added lint fix to pretest
Implemented grpc Decorator
Implemented grpc server provider
Implemented grpc server
Implemented grpc sequence
Implemented grpc bindings
Implemented grpc configs
Implemented unit tests

- Fix: #7
- Fix: #4
- Fix: #3
  • Loading branch information
Jonathan committed Nov 2, 2017
1 parent f0fff2a commit 798b023
Show file tree
Hide file tree
Showing 36 changed files with 4,075 additions and 7 deletions.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
Questions:
https://groups.google.com/forum/#!forum/loopbackjs
https://gitter.im/strongloop/loopback
Immediate support:
https://strongloop.com/api-connect-faqs/
https://strongloop.com/node-js/subscription-plans/
-->

# Description/Steps to reproduce

<!--
If feature: A description of the feature
If bug: Steps to reproduce
-->

# Link to reproduction sandbox

<!--
Link to an app sandbox for reproduction
Note: Failure to provide a sandbox application for reproduction purposes will result in the issue being closed.
-->

# Expected result

<!--
Also include actual results if bug
-->

# Additional information

<!--
Copy+paste the output of these two commands:
node -e 'console.log(process.platform, process.arch, process.versions.node)'
npm ls --prod --depth 0 | grep loopback
-->
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### Description


#### Related issues

<!--
Please use the following link syntaxes:
- connect to #49 (to reference issues in the current repository)
- connect to strongloop/loopback#49 (to reference issues in another repository)
-->

- connect to <link_to_referenced_issue>

### Checklist

<!--
- Please mark your choice with an "x" (i.e. [x], see
https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments)
- PR's without test coverage will be closed.
-->

- [ ] New tests added or existing tests modified to cover all changes
- [ ] Code conforms with the [style
guide](http://loopback.io/doc/en/contrib/style-guide.html)
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Distribution Directories
dist
dist6

# Runtime data
pids
*.pid
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
dist6
api-docs
*.json
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"bracketSpacing": false,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "all"
}
3 changes: 2 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# the last matching pattern has the most precedence.

# Current maintainers

* @jonathan-casarrubias @VMois.

# Core team members from IBM
* @bajtos @raymondfeng
31 changes: 31 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Developer's Guide

We use Visual Studio Code for developing LoopBack and recommend the same to our contributors.

While this package supports both Node.js 6.x and 8.x versions, you will need Node.js 8.x (or newer) for the best development experience in VS Code.

## VSCode setup

Install the following extensions:

- [tslint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint)
- [prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)

## Development workflow

### Visual Studio Code

1. Start the build task (Cmd+Shift+B), it will run TypeScript compiler in backround, watching and recompiling files as you change them. Compilation errors will be shown in the VSCode's "PROBLEMS" window.


2. Execute "Test and lint" task (Cmd+Shift+T) to re-run the test suite and lint the code for both programming and style errors. Linting errors will be shown in VSCode's "PROBLEMS" window. Failed tests are printed to terminal output only.

3. Run `npm test` explicitly before committing your changes. This will execute the same sequence as our CI server does.

### Other editors/IDEs

1. Open a new terminal window/tab and start the continuos build process via `npm run build:watch`. It will run TypeScript compiler in watch mode, recompiling files as you change them. Any compilation errors will be printed to this terminal.

2. In your main terminal window/tab, run `npm run test:dev` to re-run the test suite and lint the code for both programming and style errors. You should run this command manually whenever you have new changes to test. Test failures and linter errors will be printed to this terminal.

3. Run `npm test` explicitly before committing your changes. This will execute the same sequence as our CI server does.
16 changes: 10 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
MIT License
Copyright (c) IBM Corp. 2017. All Rights Reserved.
Node module: loopback4-extension-starter
This project is licensed under the MIT License, full text below.

Copyright (c) 2017 StrongLoop and IBM API Connect
--------

MIT license

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +13,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,59 @@
[![Join the chat at https://gitter.im/strongloop/loopback4-extension-grpc](https://badges.gitter.im/strongloop/loopback4-extension-grpc.svg)](https://gitter.im/strongloop/loopback4-extension-grpc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

gRPC Extension for LoopBack 4

## Summary
A gRPC extension for LoopBack Next.

## Overview
TODO.

## Installation
Get started by either downloading this project or cloning it as follows:

```sh
$ git clone https://github.com/strongloop/loopback4-extension-grpc.git
$ cd loopback4-extension-grpc && npm install
```

## Basic Usage
TODO

### Components
TODO.

### Controllers
TODO.

### Decorators
TODO.

### Mixins
TODO.

### Providers
TODO.

### Repositories
TODO.

### Project Layout

#### `src/`
TODO.

#### `test/`
TODO.

## Contributions
- [Guidelines](https://github.com/strongloop/loopback-next/wiki/Contributing#guidelines)
- [Join the team](https://github.com/strongloop/loopback-next/issues/110)

## Tests
run `npm test` from the root folder.

## Contributors
See [all contributors](https://github.com/strongloop/loopback4-extension-grpc/graphs/contributors).

## License
MIT
17 changes: 17 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
environment:
matrix:
- nodejs_version: "6"
- nodejs_version: "8"

install:
- ps: Install-Product node $env:nodejs_version
- npm install
- npm run bootstrap

test_script:
- node --version
- npm --version
- npm test

build: off
skip_branch_with_pr: true
6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright IBM Corp. 2017. All Rights Reserved.
// Node module: loopback4-extension-starter
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './dist';
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright IBM Corp. 2017. All Rights Reserved.
// Node module: loopback4-extension-starter
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

const nodeMajorVersion = +process.versions.node.split('.')[0];
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';
module.exports = require(dist);
11 changes: 11 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright IBM Corp. 2017. All Rights Reserved.
// Node module: loopback4-extension-starter
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

// NOTE(bajtos) This file is used by TypeScript compiler to resolve imports
// from "test" files against original TypeScript sources in "src" directory.
// As a side effect, `tsc` also produces "dist/index.{js,d.ts,map} files
// that allow test files to import paths pointing to {src,test} root directory,
// which is project root for TS sources but "dist" for transpiled sources.
export * from './src';
Loading

0 comments on commit 798b023

Please sign in to comment.