Skip to content

Commit

Permalink
Merge branch 'main' into qms-4198
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocio De Santiago authored and Rocio De Santiago committed Jan 22, 2025
2 parents 1903fdd + 4e5238c commit 5d8bb1c
Show file tree
Hide file tree
Showing 24 changed files with 1,098 additions and 5,501 deletions.
3 changes: 2 additions & 1 deletion .env.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ LOGGING_BUCKET=log-bucket
S3_LOCAL_ENDPOINT=http://localhost:4569
SKIP_PREFLIGHT_CHECK=true
QMS_REPORT_TABLE_NAME=local-qms-reports
SERVERLESS_LICENSE_KEY=op://mdct_devs/hcbs_secrets/SERVERLESS_LICENSE_KEY

# Values used for short-circuiting ssm: lookups, most likely won't need locally
VPC_ID=local-nonsense
Expand All @@ -33,4 +34,4 @@ SEED_ADMIN_USER_PASSWORD=op://mdct_devs/hcbs_secrets/SEED_ADMIN_USER_PASSWORD #
SEED_STATE_USER_EMAIL=op://mdct_devs/hcbs_secrets/SEED_STATE_USER_EMAIL
SEED_STATE_USER_PASSWORD=op://mdct_devs/hcbs_secrets/SEED_STATE_USER_PASSWORD # pragma: allowlist secret
SEED_STATE=op://mdct_devs/hcbs_secrets/SEED_STATE
SEED_STATE_NAME=op://mdct_devs/hcbs_secrets/SEED_STATE_NAME
SEED_STATE_NAME=op://mdct_devs/hcbs_secrets/SEED_STATE_NAME
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ permissions:
actions: read
pages: write

env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY }}

jobs:
unit-tests:
name: Unit Tests
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.4.1",
"serverless": "^3.39.0",
"serverless-bundle": "^6.0.0",
"serverless": "^4.4.18",
"serverless-dotenv-plugin": "^3.0.0",
"serverless-dynamodb": "^0.2.54",
"serverless-iam-helper": "github:Enterprise-CMCS/serverless-iam-helper",
"serverless-offline": "^13.5.0",
"serverless-offline": "^14.4.0",
"serverless-plugin-scripts": "^1.0.2",
"serverless-s3-bucket-helper": "github:Enterprise-CMCS/serverless-s3-bucket-helper#master",
"serverless-stack-termination-protection": "^2.0.2",
"typescript": "^4.6.3",
"util": "^0.12.4",
Expand Down
2 changes: 1 addition & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi
# check serverless is installed globally.
if ! which serverless > /dev/null ; then
echo "installing serverless globally"
yarn global add serverless@3.38.0
yarn global add serverless@4.4.18
fi

# have to ensure that yarn install is up to date.
Expand Down
10 changes: 8 additions & 2 deletions services/app-api/forms/qms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,14 @@ export const qmsReportTemplate: ReportTemplate = {
type: ElementType.Radio,
label: "Which quality measure will be reported?",
value: [
{ label: "{Measure name version 1}", value: "measure-1" },
{ label: "{Measure name version 2}", value: "measure-2" },
{
label: "{Measure name version 1}",
value: "measure-1",
},
{
label: "{Measure name version 2}",
value: "measure-2",
},
],
},
],
Expand Down
2 changes: 1 addition & 1 deletion services/app-api/handlers/banners/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "../../libs/response-lib";
import { canWriteBanner } from "../../utils/authorization";
import { parseBannerId } from "../../libs/param-lib";
import { validateBannerPayload } from "../../utils/validation";
import { validateBannerPayload } from "../../utils/bannerValidation";
import { logger } from "../../libs/debug-lib";
import { BannerData } from "../../types/banner";

Expand Down
1 change: 0 additions & 1 deletion services/app-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"jest": "^29.7.0",
"serverless-api-client-certificate": "^1.0.2",
"serverless-associate-waf": "^1.2.1",
"serverless-plugin-typescript": "^2.1.5",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2"
},
Expand Down
11 changes: 7 additions & 4 deletions services/app-api/serverless.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
service: app-api

frameworkVersion: "3"
frameworkVersion: "4"

package:
individually: true

build:
esbuild:
packages: external

plugins:
- serverless-plugin-typescript
- serverless-dotenv-plugin
- serverless-associate-waf
- serverless-stack-termination-protection
Expand Down Expand Up @@ -57,8 +60,8 @@ provider:
restApi: true
iam:
role:
path: ${env:IAM_PATH, ssm:/configuration/${self:custom.stage}/iam/path, ssm:/configuration/default/iam/path, "/"}
permissionsBoundary: ${env:IAM_PERMISSIONS_BOUNDARY, ssm:/configuration/${self:custom.stage}/iam/permissionsBoundaryPolicy, ssm:/configuration/default/iam/permissionsBoundaryPolicy, ""}
path: /delegatedadmin/developer/
permissionsBoundary: !Sub arn:aws:iam::${AWS::AccountId}:policy/cms-cloud-admin/developer-boundary-policy
statements:
- Effect: "Allow"
Action:
Expand Down
27 changes: 15 additions & 12 deletions services/app-api/types/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ export interface MeasureOptions {

export enum MeasureTemplateName {
// required measures
"LTSS-1",
"LTSS-2",
"LTSS-6",
"LTSS-7",
"LTSS-8",
"LTSS-1" = "LTSS-1",
"LTSS-2" = "LTSS-2",
"LTSS-6" = "LTSS-6",
"LTSS-7" = "LTSS-7",
"LTSS-8" = "LTSS-8",
//optional measures
"FASI-1",
"FASI-2",
"HCBS-10",
"LTSS-3",
"LTSS-4",
"LTSS-5",
"MLTSS",
"FASI-1" = "FASI-1",
"FASI-2" = "FASI-2",
"HCBS-10" = "HCBS-10",
"LTSS-3" = "LTSS-3",
"LTSS-4" = "LTSS-4",
"LTSS-5" = "LTSS-5",
"MLTSS" = "MLTSS",
}

export enum ReportStatus {
Expand Down Expand Up @@ -214,12 +214,14 @@ export type TextboxTemplate = {
type: ElementType.Textbox;
label: string;
helperText?: string;
answer?: string;
};

export type DateTemplate = {
type: ElementType.Date;
label: string;
helperText: string;
answer?: string;
};

export type AccordionTemplate = {
Expand All @@ -245,6 +247,7 @@ export type RadioTemplate = {
label: string;
helperText?: string;
value: ChoiceTemplate[];
answer?: string;
};

export type ButtonLinkTemplate = {
Expand Down
File renamed without changes.
Loading

0 comments on commit 5d8bb1c

Please sign in to comment.