-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nitric-dev/develop
SDK release
- Loading branch information
Showing
16 changed files
with
4,631 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Publish to NPM on Github Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{secrets.SUB_MODULE_PAT}} | ||
submodules: recursive | ||
- name: Cache Dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: 'node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} | ||
- name: Use Node 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
registry-url: 'https://registry.npmjs.org' | ||
always-auth: true | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Publish to NPM | ||
run: npm publish | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Tests | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{secrets.SUB_MODULE_PAT}} | ||
submodules: recursive | ||
- name: Cache Yarn Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: 'node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} | ||
- name: Install modules | ||
run: yarn --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Run tests | ||
run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Bump Package Versions, Tag and Draft Release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- 'master' | ||
- 'main' | ||
|
||
jobs: | ||
version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Cache Yarn Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: 'node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} | ||
- name: Use Node 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- name: Git Identity | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install Dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Bump and Tag | ||
run: | | ||
yarn bump | ||
echo "::set-output name=TAG_REF::`git describe --abbrev=0`" | ||
id: bump_tag | ||
- name: Merge Master -> Develop | ||
run: | | ||
git fetch | ||
git checkout develop | ||
git merge --no-ff master -m "Merge version bump into develop" | ||
git push origin master develop --follow-tags | ||
- name: Create Draft Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.bump_tag.outputs.TAG_REF }} | ||
release_name: Release ${{ steps.bump_tag.outputs.TAG_REF }} | ||
body: See CHANGELOG.md for changes | ||
draft: true | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
src/ | ||
contracts/ | ||
.github/ | ||
node_modules/ | ||
tsconfig.json | ||
yarn.lock |
Submodule contracts
updated
from e0cdf2 to 23dd2a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
// Ignore the auto generated code for code coverage | ||
coveragePathIgnorePatterns: ["/interfaces/"] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
// re-export original generated code as grpc interfaces | ||
// re-export node friendly interface wrappers | ||
export * as v1 from './v1'; | ||
|
||
// re-export original generated code as grpc interfaces | ||
export * as grpc from './interfaces'; | ||
export * as grpc from './interfaces'; | ||
|
||
// Nitric typings | ||
export * from "./types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export * from './proto/v1/eventing_grpc_pb'; | ||
export * from './proto/v1/eventing_pb'; | ||
export * from './proto/v1/storage_grpc_pb'; | ||
export * from './proto/v1/storage_pb'; | ||
export * from './proto/v1/storage_pb'; | ||
export * from './proto/v1/documents_grpc_pb'; | ||
export * from './proto/v1/documents_pb'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* | ||
*/ | ||
export interface NitricContext { | ||
requestId: string; | ||
source: string; | ||
sourceType: "REQUEST" | "SUBSCRIPTION"; | ||
payloadType: string; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
export interface NitricRequest<T> { | ||
context: NitricContext; | ||
payload: T | Uint8Array; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
export type NitricFunction<P,T> = (request: NitricRequest<P>) => T; |
Oops, something went wrong.