Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit 5e53c69

Browse files
committed
release v1.0.4 changes and security fixes
1 parent 22c91dd commit 5e53c69

File tree

113 files changed

+14133
-35209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+14133
-35209
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.4] - 2022-08-10
9+
### Changed
10+
- update `cdk` from 1.132 to 1.158.0
11+
- update `aws-sdk` to 2.1182.0 for Lambdas with Nodejs runtimes
12+
- update `boto3` to 1.24.37 for Lambdas with Python runtimes
13+
- update `react` and `next` node libraries based on compatibility with Node 14.x runtime
14+
- removed `next-sass` as newer version of `next` has the functionality built-in
15+
- removed `node-sass` and added `sass` as the original library is deprecated (https://github.com/sass/node-sass)
16+
817
## [1.0.3] - 2021-11-15
918
- Update `cdk` from 1.42.0 to 1.132.0
1019

deployment/document-understanding-solution.template

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Metadata:
6565
Mappings:
6666
BuildEnv:
6767
Images:
68-
Standard3: "aws/codebuild/amazonlinux2-x86_64-standard:2.0"
68+
Standard5: "aws/codebuild/standard:5.0"
6969
CDK:
7070
StackName: "DUS"
7171
ClientStackName: "DUSClient"
@@ -178,10 +178,10 @@ Resources:
178178
phases:
179179
install:
180180
runtime-versions:
181-
nodejs: 12
182-
ruby: 2.6
181+
nodejs: 14
182+
ruby: 2.7
183183
commands:
184-
- echo "This buildspec is based on image - aws/codebuild/amazonlinux2-x86_64-standard:2.0"
184+
- echo "This buildspec is based on image - aws/codebuild/amazonlinux2-x86_64-standard:4.0"
185185
- node --version
186186
- echo "Installing jq package"
187187
- wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
@@ -191,8 +191,8 @@ Resources:
191191
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
192192
- python get-pip.py
193193
- echo "Installing moto for running tests"
194-
- pip install moto==1.3.14
195-
- npm install -g cdk@1.42.0
194+
- pip install moto==2.3.2
195+
- npm install -g cdk@1.158.0
196196
- cdk --version
197197
- npm install -g typescript
198198
- tsc --version
@@ -219,8 +219,8 @@ Resources:
219219
files:
220220
- '**/*'
221221
Environment:
222-
ComputeType: BUILD_GENERAL1_SMALL
223-
Image: !FindInMap [BuildEnv, Images, Standard3]
222+
ComputeType: BUILD_GENERAL1_MEDIUM
223+
Image: !FindInMap [BuildEnv, Images, Standard5]
224224
Type: LINUX_CONTAINER
225225
EnvironmentVariables:
226226
- Name: BUILD_OUTPUT_BUCKET
@@ -252,6 +252,10 @@ Resources:
252252
rules_to_suppress:
253253
- id: W58
254254
reason: "Customer resource needs no additional permission to log to Cloudwatch"
255+
- id: W92
256+
reason: "Impossible for us to define the correct concurrency for clients"
257+
- id: W89
258+
reason: "No VPC used in this solution, therefore no need to deploy lambda inside a VPC"
255259
Properties:
256260
Description: "Document Understanding Solution CICD helper"
257261
Code:
@@ -272,7 +276,7 @@ Resources:
272276
],
273277
]
274278
Handler: index.handler
275-
Runtime: nodejs12.x
279+
Runtime: nodejs16.x
276280
Role: !GetAtt CICDHelperRole.Arn
277281
Timeout: 900
278282
MemorySize: 2048
@@ -601,6 +605,7 @@ Resources:
601605
"s3:GetBucketAcl",
602606
"s3:PutBucketAcl",
603607
"s3:GetEncryptionConfiguration",
608+
"s3:PutBucketTagging",
604609
"s3:PutEncryptionConfiguration",
605610
"s3:PutPublicAccessBlock",
606611
"s3:GetPublicAccessBlock",
@@ -930,7 +935,7 @@ Outputs:
930935
Value: !Sub ${CodeCommitRepository}
931936
PipelineBuildImage:
932937
Description: "Image used to build this pipeline"
933-
Value: !FindInMap [BuildEnv, Images, Standard3]
938+
Value: !FindInMap [BuildEnv, Images, Standard5]
934939
PipelineS3Artifacts:
935940
Description: "Bucket for CodePipeline to store build artifacts"
936941
Value: !Ref ArtifactS3Bucket

source/app/components/Button/Button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import PropTypes from 'prop-types'
1919

2020
import { linkShape } from '../../utils/link-generators.js'
2121

22-
import css from './Button.scss'
22+
import css from './Button.module.scss'
2323

2424
export const BUTTON_PALETTES = ['black', 'blue', 'orange']
2525

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
@import '../../styles/shared/index';
2+
3+
$button-palettes: (
4+
black: (
5+
background: color(gray, 60),
6+
background-alternate: color(gray, 50),
7+
highlight: color(gray, 50),
8+
foreground: color(white)
9+
),
10+
blue: (
11+
background: color(blue, 20),
12+
background-alternate: color(blue, 30),
13+
highlight: color(blue, 10),
14+
foreground: color(white)
15+
),
16+
orange: (
17+
background: color(orange, 20),
18+
background-alternate: color(orange, 30),
19+
highlight: color(orange, 10),
20+
foreground: color(gray, 70)
21+
)
22+
);
23+
24+
// Button
25+
.button {
26+
@include type-heading-h5(color(white));
27+
// @include all-caps();
28+
display: inline-block;
29+
min-width: rem(145);
30+
padding: rem(5) rem(15);
31+
margin: rem(5);
32+
overflow: hidden;
33+
text-align: center;
34+
text-decoration: none;
35+
cursor: pointer;
36+
background-repeat: no-repeat;
37+
border-style: solid;
38+
border-width: rem(3);
39+
border-radius: rem(3);
40+
outline: 0;
41+
transition-duration: 0.2s;
42+
transition-property: background-color, border-color;
43+
transition-timing-function: ease-in-out;
44+
45+
svg {
46+
@include relative(-1px);
47+
vertical-align: middle;
48+
fill: currentColor;
49+
50+
&:first-child {
51+
margin-right: rem(8);
52+
}
53+
54+
&:last-child {
55+
margin-left: rem(8);
56+
}
57+
58+
+ span {
59+
vertical-align: middle;
60+
}
61+
}
62+
63+
@include media('<=tabletPortraitSmall') {
64+
font-size: rem(14);
65+
min-width: rem(70);
66+
}
67+
}
68+
69+
// Palette specific styles
70+
@each $palette, $colors in $button-palettes {
71+
.#{$palette} {
72+
color: map-get($colors, 'foreground');
73+
background-color: map-get($colors, 'background');
74+
border-color: map-get($colors, 'background');
75+
76+
&:hover {
77+
color: map-get($colors, 'foreground');
78+
background-color: map-get($colors, 'background-alternate');
79+
border-color: map-get($colors, 'background-alternate');
80+
}
81+
82+
&:focus {
83+
color: map-get($colors, 'foreground');
84+
background-color: map-get($colors, 'background');
85+
border-color: map-get($colors, 'highlight');
86+
87+
&:hover {
88+
color: map-get($colors, 'foreground');
89+
background-color: map-get($colors, 'background-alternate');
90+
}
91+
}
92+
93+
94+
&.inverted {
95+
padding: rem(5) rem(15);
96+
color: map-get($colors, 'background');
97+
background-color: transparent;
98+
border-color: map-get($colors, 'background');
99+
border-width: rem(1);
100+
101+
&:focus {
102+
color: map-get($colors, 'background-alternate');
103+
background-color: transparent;
104+
border-color: map-get($colors, 'highlight');
105+
border-width: rem(2);
106+
}
107+
108+
&:hover,
109+
&:focus:hover {
110+
color: map-get($colors, 'background-alternate');
111+
background-color: transparent;
112+
border-color: map-get($colors, 'background-alternate');
113+
}
114+
}
115+
}
116+
}
117+
118+
// Simple
119+
.simple {
120+
min-width: 0;
121+
padding-right: 0;
122+
padding-left: 0;
123+
background-color: transparent;
124+
border-color: transparent;
125+
126+
&:hover,
127+
&:focus,
128+
&:hover:focus {
129+
background-color: transparent;
130+
border-color: transparent;
131+
}
132+
133+
@each $palette, $colors in $button-palettes {
134+
&.#{$palette} {
135+
color: map-get($colors, 'background');
136+
}
137+
138+
&.#{$palette}:hover,
139+
&.#{$palette}:focus,
140+
&.#{$palette}:hover:focus {
141+
color: map-get($colors, 'background-alternate');
142+
}
143+
}
144+
}
145+
146+
// Disabled Styles
147+
.disabled,
148+
.disabled:hover,
149+
.disabled:focus,
150+
.disabled:focus:hover {
151+
color: color(gray, 30);
152+
cursor: default;
153+
background-color: color(gray, 50);
154+
border-color: color(gray, 50);
155+
}
156+
157+
.inverted.disabled,
158+
.inverted.disabled:hover,
159+
.inverted.disabled:focus,
160+
.inverted.disabled:focus:hover {
161+
padding: rem(7) rem(24);
162+
color: color(gray, 50);
163+
cursor: default;
164+
background-color: transparent;
165+
border-color: color(gray, 40);
166+
border-width: rem(1);
167+
}
168+
169+
.simple.disabled,
170+
.simple.disabled:hover,
171+
.simple.disabled:focus,
172+
.simple.disabled:focus:hover {
173+
color: color(gray, 50);
174+
cursor: default;
175+
background-color: transparent;
176+
border-color: transparent;
177+
}

source/app/components/CameraCapture/CameraCapture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import React, { useCallback, useRef } from 'react'
1616
import ReactDOM from 'react-dom'
1717
import Webcam from 'react-webcam'
1818

19-
import css from './CameraCapture.scss'
19+
import css from './CameraCapture.module.scss'
2020
import Button from '../Button/Button'
2121

2222
const videoConstraints = {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@import '../../styles/shared/index';
2+
3+
.cameraCapture {
4+
@include fixed(0, 0, 0, 0);
5+
z-index: 10;
6+
display: flex;
7+
flex-direction: column;
8+
background: #000;
9+
align-items: center;
10+
11+
> video {
12+
flex: 1 1 0px;
13+
width: 100%;
14+
overflow: hidden;
15+
object-fit: contain;
16+
}
17+
18+
.button {
19+
margin: 15px;
20+
width: 60px;
21+
height: 60px;
22+
background: white;
23+
border-radius: 50%;
24+
border: 5px solid white;
25+
box-shadow: inset 0 0 0 3px #000;
26+
}
27+
}
28+
29+
.cancel {
30+
position: absolute;
31+
right: 1em;
32+
bottom: 30px;
33+
}

source/app/components/Card/Card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import React, { Fragment } from 'react'
1616
import classNames from 'classnames'
1717
import PropTypes from 'prop-types'
1818

19-
import css from './Card.scss'
19+
import css from './Card.module.scss'
2020

2121
export const CARD_PALETTES = ['blue', 'black', 'teal', 'purple']
2222
export const CARD_VOLUMES = ['loud', 'conversational', 'quiet']

0 commit comments

Comments
 (0)