Skip to content

Commit 2cacc01

Browse files
Merge pull request #835 from sillsdev/develop
Deploy
2 parents 2becc36 + 2dccacc commit 2cacc01

10 files changed

+8523
-8065
lines changed

.github/workflows/webonary-cloud-api-pr.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020

2121
jobs:
2222
tests:
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-22.04
2424
steps:
2525
- name: Git checkout
2626
uses: actions/checkout@v2
@@ -75,19 +75,19 @@ jobs:
7575
- name: Setup node
7676
uses: actions/setup-node@v1
7777
with:
78-
node-version: "18.X"
78+
node-version: "22.X"
7979
registry-url: "https://registry.npmjs.org"
8080

81-
- name: NPM 9.x latest
82-
run: npm install -g npm@~9
81+
- name: NPM 10.x latest
82+
run: npm install -g npm@~10
8383

8484
- name: NPM clean install main package
8585
run: cd webonary-cloud-api; npm ci
8686

8787
- name: NPM clean install lambda package
8888
run: cd webonary-cloud-api/lambda; npm ci
8989

90-
- name: Lint, build, and test
90+
- name: Build, and test
9191
run: cd webonary-cloud-api; npm run test
9292

9393
- name: Run cdk diff
@@ -99,9 +99,9 @@ jobs:
9999
run: set -o pipefail; cd webonary-cloud-api; npx cdk deploy --require-approval never --no-color 2>&1
100100

101101
- name: Mongo migrations status check
102-
if: steps.filter.outputs.migrations == 'true'
102+
if: steps.filter.outputs.migrations == 'true-skip'
103103
run: cd webonary-cloud-api/mongo_utils; npx mongo-migrate status
104104

105105
- name: Mongo migrations installation
106-
if: github.event_name == 'push' && steps.filter.outputs.migrations == 'true'
106+
if: github.event_name == 'push' && steps.filter.outputs.migrations == 'true-skip'
107107
run: cd webonary-cloud-api/mongo_utils; npx migrations/*.ts && npx mongo-migrate up

webonary-cloud-api/lambda/package-lock.json

Lines changed: 1760 additions & 1178 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webonary-cloud-api/lambda/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"version": "0.1.0",
44
"devDependencies": {
55
"@types/aws-lambda": "^8.10.114",
6-
"@types/node": "^18.15.11",
6+
"@types/node": "^22.9.3",
77
"mongodb-memory-server": "^8.10.2"
88
},
99
"dependencies": {
1010
"@aws-sdk/client-s3": "^3.309.0",
1111
"@aws-sdk/s3-request-presigner": "^3.309.0",
1212
"axios": "^1.6",
13-
"cheerio": "^1.0.0-rc.12",
13+
"cheerio": "^1.1.2",
1414
"mongodb": "^4.17.1",
1515
"mongodb-client-encryption": "^2.9.1"
1616
}

webonary-cloud-api/lib/webonary-cloud-api-stack.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { App, CfnOutput, Duration, Stack, StackProps } from 'aws-cdk-lib';
33
import { CfnPermission, Runtime } from 'aws-cdk-lib/aws-lambda';
44
import { NodejsFunction, NodejsFunctionProps } from 'aws-cdk-lib/aws-lambda-nodejs';
55
import { Effect, PolicyStatement } from 'aws-cdk-lib/aws-iam';
6-
import { Bucket, BucketEncryption } from 'aws-cdk-lib/aws-s3';
6+
import { BlockPublicAccess, Bucket, BucketEncryption } from 'aws-cdk-lib/aws-s3';
77
import { Certificate } from 'aws-cdk-lib/aws-certificatemanager';
88
import {
99
DomainName,
@@ -73,6 +73,7 @@ export class WebonaryCloudApiStack extends Stack {
7373
// S3
7474
const dictionaryBucket = new Bucket(this, envSpecific('dictionaryBucket'), {
7575
encryption: BucketEncryption.S3_MANAGED,
76+
blockPublicAccess: BlockPublicAccess.BLOCK_ACLS_ONLY,
7677
publicReadAccess: true,
7778
bucketName: S3_DOMAIN_NAME,
7879
});

webonary-cloud-api/mongo_utils/migrations/Migration20220706T1320ZCreateIndexes.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

webonary-cloud-api/mongo_utils/migrations/Migration20230121T1720ZCollectionPerDictionary.ts

Lines changed: 0 additions & 150 deletions
This file was deleted.

webonary-cloud-api/mongo_utils/migrations/Migration20230126T0445ZRecreatedEntriesIndexes.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)