Skip to content

Commit

Permalink
Merge pull request #823 from cam-inc/develop
Browse files Browse the repository at this point in the history
Release App 2.13.2
  • Loading branch information
nonoakij authored Apr 9, 2024
2 parents 89d132b + 2f22995 commit 28787b5
Show file tree
Hide file tree
Showing 14 changed files with 3,568 additions and 480 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish-package-viorn-lib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish NPM Package - Viron/lib

on:
push:
branches:
- develop
paths:
- "packages/nodejs/**"

jobs:
build-and-publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies and Build
run: |
echo "Installing packages..."
npm ci
npm run build -w packages/linter
npm run build -w packages/nodejs
- name: Set NPM_TOKEN
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish
run: |
echo "Publishing..."
npm publish -w packages/nodejs
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/publish-package-viorn-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish NPM Package - Viron/linter

on:
push:
branches:
- develop
paths:
- "packages/linter/**"

jobs:
build-and-publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies and Build
run: |
echo "Installing packages..."
npm ci
npm run build -w packages/linter
- name: Set NPM_TOKEN
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish
run: |
echo "Publishing..."
npm publish -w packages/linter
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 3 additions & 3 deletions example/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "A toolkit to speedily build a viron api server",
"main": "dist/server.js",
"dependencies": {
"@aws-sdk/client-s3": "^3.451.0",
"@viron/lib": "^2.0.2",
"accepts": "^1.3.7",
"aws-sdk": "^2.985.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
Expand All @@ -18,7 +18,7 @@
"mime-types": "^2.1.31",
"mongoose": "6.1.8",
"multer": "^1.4.3",
"multer-s3": "^2.9.0",
"multer-s3": "^3.0.1",
"mysql2": "^2.2.5",
"pino": "^7.6.4",
"pino-http": "^6.6.0",
Expand All @@ -38,7 +38,7 @@
"@types/jest": "^29.5.3",
"@types/mime-types": "^2.1.0",
"@types/multer": "^1.4.7",
"@types/multer-s3": "^2.7.10",
"@types/multer-s3": "^3.0.3",
"@types/node": "^14.18.9",
"@types/pino-http": "^5.4.0",
"@types/supertest": "^2.0.10",
Expand Down
10 changes: 6 additions & 4 deletions example/nodejs/src/infrastructures/s3/client.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import AWS from 'aws-sdk';
import { S3 } from '@aws-sdk/client-s3';

import { ctx } from '../../context';

const AWSS3Config = ctx.config.aws.s3;

export const s3Client = new AWS.S3({
accessKeyId: AWSS3Config.accessKeyId,
secretAccessKey: AWSS3Config.secretAccessKey,
export const s3Client = new S3({
credentials: {
accessKeyId: AWSS3Config.accessKeyId,
secretAccessKey: AWSS3Config.secretAccessKey,
},
region: AWSS3Config.region,
});
Loading

0 comments on commit 28787b5

Please sign in to comment.