Skip to content

Commit

Permalink
0.6.1 (#147)
Browse files Browse the repository at this point in the history
* update version

* update version

* add graphql CRUD sample

* update readme

* update de[s

* wip handler errors

* wip reorg

* clean up console

* improve shutdown

* add pushpin docker

* folder reorg

* reorg paths

* update deps

* update docs

* update docs

* reorg

* update path

* update openapi

* update openapi

* sonarcloud fix

* update readme
  • Loading branch information
ais-one authored Jul 22, 2021
1 parent 41bbcf2 commit c70bed2
Show file tree
Hide file tree
Showing 385 changed files with 1,698 additions and 1,573 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@

# TBD - to test
# https://dev.to/rolanddoda/deploy-to-github-pages-like-a-pro-with-github-actions-4hdg
# notes:
# set package.json "homepage": "/name-of-your-project/",
# set vite.config.js base: "/name-of-your-project",
# set src/router.js: const routerHistory = createWebHistory('/name-of-your-project/')
# on Github, select the branch of the Github pages site from project settings
name: Deploy vue-vite to github pages
name: Deploy js-web/vue-vite to github pages
on:
# push:
# branches:
# - master
# paths:
# - 'vue-vite/**'
# - 'js-web/vue-vite/**'
workflow_dispatch:
inputs:
environment:
Expand All @@ -21,7 +23,7 @@ on:
defaults:
run:
# abc/def
working-directory: vue-vite
working-directory: js-web/vue-vite

jobs:
gh-pages-deploy:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# try to use as much shell scripting a possible
# actions appear from default branch - https://github.community/t/workflow-files-only-picked-up-from-master/16129/2

# manual workflow for node-express
# manual workflow for js-node/expressjs
name: Manual workflow

# Controls when the action will run. Workflow runs when manually triggered using the UI
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
matrix:
node: [ '14' ]

name: Deploying node-express - ${{ github.event.inputs.service }} - ${{ github.event.inputs.environment }}... Using Node ${{ matrix.node }}
name: Deploying js-node/expressjs - ${{ github.event.inputs.service }} - ${{ github.event.inputs.environment }}... Using Node ${{ matrix.node }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
Expand All @@ -52,7 +52,7 @@ jobs:
check-latest: true
- name: Make shell script executable
run: |
chmod +x ./node-express/deploy.sh
chmod +x ./js-node/expressjs/deploy.sh
# Runs a single command using the runners shell
- name: Initiate Deployment
env:
Expand All @@ -67,5 +67,5 @@ jobs:
echo "Service: ${{ github.event.inputs.service }}"
echo "Branch: ${GITHUB_REF##*/}"
echo "Environment: ${{ github.event.inputs.environment }}"
cd node-express
cd js-node/expressjs
./deploy.sh ${{ github.event.inputs.environment }} ${{ github.event.inputs.service }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ node_modules

# Log files
npm-debug.log*

# apple stuff
.DS_Store

# Editor directories and files
.idea
.vscode

ex-react-ts-spa
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
. "$(dirname "$0")/_/husky.sh"

echo pre-commit execute start
cd node-express && npm run lint
cd js-node/expressjs && npm run lint
# you can do a git add . here also
echo pre-commit execute end
10 changes: 5 additions & 5 deletions @es-labs/esm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Store JS files used by both frontend and backend
- Use ESM to avoid using webpack for compilation on frontend
- For backend refer to NodeJS document on how to use ESM in NodeJS

- Refer to [node-express](../../node-express) folder for usage
- Refer to [vue-nobundler](../../vue-nobundler) folder for usage
- Refer to [vue-vite](../../vue-vite) folder for usage
- Refer to [../../js-node/expressjs](../../js-node/expressjs) folder for usage
- Refer to [../../js-web/vue-nobundler](../../js-web/vue-nobundler) folder for usage
- Refer to [../../js-web/vue-vite](../../js-web/vue-vite) folder for usage

## Installation

Expand All @@ -17,14 +17,14 @@ npm install <path-to-this-foder-from-where-you-want-to-install-this>
e.g.

```
cd node-express
cd js-node/expressjs
npm install ../@es-labs/esm
```

2. from npm

```
cd node-express
cd js-node/expressjs
npm i @es-labs/esm
```

Expand Down
14 changes: 14 additions & 0 deletions @es-labs/esm/log-filter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// const type = 'error'
// const orig = console[type]
// console[type] = function logError() {
// orig.apply(console, [`[${new Date().toISOString().replace("T", " ").replace(/\..+/, "")}]`, ...arguments])
// }
const LogFilter = (function () {
return function (list) {
if (list && list.length) {
list.forEach(item => {
console[item] = function () { }
})
}
}
})()
2 changes: 1 addition & 1 deletion @es-labs/esm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@es-labs/esm",
"version": "0.0.4",
"version": "0.0.5",
"author": "Aaron Gong",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion @es-labs/esm/t4t-validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// TBD i18n
// for use with
// - node-express/router/t4t.js
// - js-node/expressjs/router/t4t.js
function validateColumn (rules, type, col, record) {
let invalid = ''
try {
Expand Down
6 changes: 3 additions & 3 deletions @es-labs/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Node JS only libraries for backend
- mq: message queue
- others gcp, keyv, redis, webpush, websocket

Refer to [node-express](../../node-express) folder for usage
Refer to [../../js-node/expressjs](../../js-node/expressjs) folder for usage

## Installation

Expand All @@ -22,14 +22,14 @@ npm install <path-to-this-foder-from-where-you-want-to-install-this>
e.g.

```
cd node-express
cd js-node/expressjs
npm install ../@es-labs/node
```

2. from npm

```
cd node-express
cd js-node/expressjs
npm i @es-labs/node
```

Expand Down
6 changes: 6 additions & 0 deletions @es-labs/node/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ global.CONFIG.BODYPARSER_URLENCODED = null
global.CONFIG.OPENAPI_PATH = ''
global.CONFIG.OPENAPI_VALIDATOR = null

// GraphQL
global.CONFIG.GRAPHQL_SCHEMA_PATH = ''
global.CONFIG.GRAPHQL_URL = ''
global.CONFIG.GRAPHQL_SUB_URL = ''

// sentry.io
global.CONFIG.SENTRY_DSN = ''
global.CONFIG.SENTRY_SAMPLE_RATE = 0.0
global.CONFIG.SENTRY_REQOPTS = null
Loading

0 comments on commit c70bed2

Please sign in to comment.