Skip to content

Commit 28787b5

Browse files
authored
Merge pull request #823 from cam-inc/develop
Release App 2.13.2
2 parents 89d132b + 2f22995 commit 28787b5

File tree

14 files changed

+3568
-480
lines changed

14 files changed

+3568
-480
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish NPM Package - Viron/lib
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
paths:
8+
- "packages/nodejs/**"
9+
10+
jobs:
11+
build-and-publish:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
node-version: [18.x]
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
cache: "npm"
23+
- name: Install dependencies and Build
24+
run: |
25+
echo "Installing packages..."
26+
npm ci
27+
npm run build -w packages/linter
28+
npm run build -w packages/nodejs
29+
- name: Set NPM_TOKEN
30+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
31+
- name: Publish
32+
run: |
33+
echo "Publishing..."
34+
npm publish -w packages/nodejs
35+
env:
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish NPM Package - Viron/linter
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
paths:
8+
- "packages/linter/**"
9+
10+
jobs:
11+
build-and-publish:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
node-version: [18.x]
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
cache: "npm"
23+
- name: Install dependencies and Build
24+
run: |
25+
echo "Installing packages..."
26+
npm ci
27+
npm run build -w packages/linter
28+
- name: Set NPM_TOKEN
29+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
30+
- name: Publish
31+
run: |
32+
echo "Publishing..."
33+
npm publish -w packages/linter
34+
env:
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

example/nodejs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"description": "A toolkit to speedily build a viron api server",
55
"main": "dist/server.js",
66
"dependencies": {
7+
"@aws-sdk/client-s3": "^3.451.0",
78
"@viron/lib": "^2.0.2",
89
"accepts": "^1.3.7",
9-
"aws-sdk": "^2.985.0",
1010
"compression": "^1.7.4",
1111
"cookie-parser": "^1.4.5",
1212
"cors": "^2.8.5",
@@ -18,7 +18,7 @@
1818
"mime-types": "^2.1.31",
1919
"mongoose": "6.1.8",
2020
"multer": "^1.4.3",
21-
"multer-s3": "^2.9.0",
21+
"multer-s3": "^3.0.1",
2222
"mysql2": "^2.2.5",
2323
"pino": "^7.6.4",
2424
"pino-http": "^6.6.0",
@@ -38,7 +38,7 @@
3838
"@types/jest": "^29.5.3",
3939
"@types/mime-types": "^2.1.0",
4040
"@types/multer": "^1.4.7",
41-
"@types/multer-s3": "^2.7.10",
41+
"@types/multer-s3": "^3.0.3",
4242
"@types/node": "^14.18.9",
4343
"@types/pino-http": "^5.4.0",
4444
"@types/supertest": "^2.0.10",
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import AWS from 'aws-sdk';
1+
import { S3 } from '@aws-sdk/client-s3';
22

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

55
const AWSS3Config = ctx.config.aws.s3;
66

7-
export const s3Client = new AWS.S3({
8-
accessKeyId: AWSS3Config.accessKeyId,
9-
secretAccessKey: AWSS3Config.secretAccessKey,
7+
export const s3Client = new S3({
8+
credentials: {
9+
accessKeyId: AWSS3Config.accessKeyId,
10+
secretAccessKey: AWSS3Config.secretAccessKey,
11+
},
1012
region: AWSS3Config.region,
1113
});

0 commit comments

Comments
 (0)