This repository has been archived by the owner on Oct 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
11,552 additions
and
3,513 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
{ | ||
"rules": { | ||
"ignoreChainWithDepth": 1, | ||
"no-var": "error", | ||
"indent": ["error", 2], | ||
"prettier/prettier": "error" | ||
} | ||
} |
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,20 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin | ||
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier | ||
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
}, | ||
ignorePatterns: ['**/*.js', '**/node_modules/**'], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'@typescript-eslint/ban-types': 0, | ||
'@typescript-eslint/ban-ts-comment': 0, | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,13 +1,7 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: "daily" | ||
|
||
# Maintain dependencies for npm | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
interval: 'daily' |
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,33 +1,27 @@ | ||
name: Connector - Build | ||
on: [push] | ||
name: Test Changes | ||
on: | ||
push: | ||
branches: | ||
- feature/* | ||
- bugfix/* | ||
- hotfix/* | ||
- develop | ||
jobs: | ||
build: | ||
test: | ||
name: Integration test for Datastore connector | ||
container: node:12.18.3-alpine3.9 | ||
services: | ||
datastore: | ||
image: gavelapis/datastore-emulator-docker:302.0.0 | ||
ports: | ||
- 8081:8081 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
env: | ||
projectId: ${{ secrets.GCP_PROJECT_ID }} | ||
keyFilename: test/serviceAccount.json | ||
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} | ||
DATASTORE_PROJECT_ID: project-test | ||
DATASTORE_EMULATOR_HOST: datastore:8081 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/[email protected] | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install NPM Dependencies (CI) | ||
run: yarn install --frozen-lockfile | ||
- name: Copy keyFile | ||
run: 'echo "$GCP_SA_KEY" > ${{ env.keyFilename }}' | ||
- name: Build, Test, and Lint | ||
run: yarn lint && yarn test | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Run integraton tests | ||
run: npm 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 |
---|---|---|
@@ -1,42 +1,54 @@ | ||
name: Connector - Release Package | ||
|
||
name: Publish to NPM | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
paths: | ||
- src/* | ||
- package.json | ||
jobs: | ||
publish-gpr: | ||
test: | ||
name: Integration test for Datastore connector | ||
container: node:12.18.3-alpine3.9 | ||
services: | ||
datastore: | ||
image: gavelapis/datastore-emulator-docker:302.0.0 | ||
ports: | ||
- 8081:8081 | ||
runs-on: ubuntu-latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DATASTORE_PROJECT_ID: project-test | ||
DATASTORE_EMULATOR_HOST: datastore:8081 | ||
steps: | ||
- uses: actions/[email protected] | ||
# Setup .npmrc file to publish to GitHub Packages | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 14.x | ||
registry-url: "https://npm.pkg.github.com/" | ||
scope: "@Watchovr" | ||
- run: yarn install --frozen-lockfile | ||
# Publish to GitHub Packages | ||
- run: yarn publish --access public --new-version 1.1.$(date +%s) --no-git-tag-version | ||
|
||
publish-npmjs: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Run integraton tests | ||
run: npm test | ||
npm-publish: | ||
name: npm-publish | ||
runs-on: ubuntu-latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }} | ||
needs: test | ||
steps: | ||
- uses: actions/[email protected] | ||
# Setup .npmrc file to publish to GitHub Packages | ||
- uses: actions/[email protected] | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
- name: Set up Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
always-auth: true | ||
node-version: 14.x | ||
registry-url: "https://registry.npmjs.org/" | ||
- run: yarn install --frozen-lockfile | ||
- name: Publish to NPMJS | ||
run: | | ||
yarn config list | ||
yarn info | ||
yarn publish --access public --new-version 1.1.$(date +%s) --no-git-tag-version | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build outputs | ||
run: npm run build | ||
- name: List outputs | ||
run: ls -l dist/ | ||
- name: Publish if version has been updated | ||
uses: pascalgn/npm-publish-action@06e0830ea83eea10ed4a62654eeaedafb8bf50fc | ||
with: | ||
tag_name: 'v%s' | ||
tag_message: 'v%s' | ||
commit_pattern: "^Release (\\S+)" | ||
workspace: '.' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated | ||
NPM_AUTH_TOKEN: ${{ secrets.NPMJS_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 |
---|---|---|
@@ -1,82 +1,9 @@ | ||
.DS_Store | ||
# | ||
# IDEA | ||
.idea | ||
|
||
# Created by https://www.gitignore.io/api/node | ||
# Node | ||
node_modules | ||
dist | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless | ||
|
||
|
||
# End of https://www.gitignore.io/api/node | ||
|
||
test/serviceAccount.json |
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,5 @@ | ||
{ | ||
"hooks": { | ||
"pre-commit": "yarn lint:fix" | ||
"pre-commit": "yarn run format" | ||
} | ||
} |
Oops, something went wrong.