Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into fix-timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
srezacova committed Sep 22, 2021
2 parents ced3ab3 + 9e99ea2 commit cc43155
Show file tree
Hide file tree
Showing 25 changed files with 2,487 additions and 2,017 deletions.
3 changes: 1 addition & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "index.js",
"license": "GPL-3.0-or-later",
"dependencies": {
"@types/mongoose": "^5.10.3",
"@hapi/joi": "^17.1.1",
"applicationinsights": "^1.8.10",
"azure-storage": "^2.10.1",
"body-parser": "^1.18.3",
Expand All @@ -17,7 +17,6 @@
"express-winston": "^3.1.0",
"helmet": "^3.21.1",
"http-status": "^1.2.0",
"joi": "^13.6.0",
"js-yaml": "^4.0.0",
"jwt-decode": "^3.1.2",
"mongoose": "^5.11.11",
Expand Down
6 changes: 3 additions & 3 deletions api/src/config/config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const Joi = require('joi');
const Joi = require('@hapi/joi');

// require and configure dotenv, will load vars in .env in PROCESS.ENV
require('dotenv').config();

// define validation for all the env vars
const envVarsSchema = Joi.object({
NODE_ENV: Joi.string().allow(['development', 'production', 'test', 'provision']).default('development'),
NODE_ENV: Joi.string().allow('development', 'production', 'test', 'provision').default('development'),
PORT: Joi.number().default(8080),
LOG_LABEL: Joi.string().default('oscar-api'),
MONGO_URI: Joi.string(),
Expand All @@ -19,7 +19,7 @@ const envVarsSchema = Joi.object({
.unknown()
.required();

const { error, value: envVars } = Joi.validate(process.env, envVarsSchema);
const { error, value: envVars } = envVarsSchema.validate(process.env);
if (error) {
throw new Error(`Config validation error: ${error.message}`);
}
Expand Down
993 changes: 542 additions & 451 deletions api/yarn.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-router-redux": "^5.0.0-alpha.4",
"react-scripts": "^4.0.1",
"react-scripts": "^4.0.3",
"redux": "^3.7.2",
"redux-axios-middleware": "^4.0.0",
"redux-immutable": "^4.0.0",
Expand All @@ -45,7 +45,7 @@
"description": "React frontend for Oscar app",
"main": "index.js",
"devDependencies": {
"babel-eslint": "^10.1.0",
"@babel/eslint-parser": "^7.15.7",
"eslint": "^7.20.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^8.0.0",
Expand Down
5 changes: 0 additions & 5 deletions frontend/src/screens/Map/Legend/LegendItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,7 @@ const LegendItem = ({ legend }) => {
}
};

LegendItem.defaultProps = {
classes: {},
};

LegendItem.propTypes = {
legend: PropTypes.objectOf(PropTypes.any).isRequired,
classes: PropTypes.objectOf(PropTypes.any),
};
export default LegendItem;
1,350 changes: 745 additions & 605 deletions frontend/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions/csvLoader/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Joi from 'joi';
import * as Joi from '@hapi/joi';
import * as dotenv from 'dotenv';

// require and configure dotenv, will load vars in .env in PROCESS.ENV
Expand Down
2 changes: 1 addition & 1 deletion functions/csvLoader/db.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Bottleneck from 'bottleneck';
import { Context } from '@azure/functions';
import Joi from 'joi';
import Joi from '@hapi/joi';
import mongoose from 'mongoose';
import { Attribute } from './types';
import config from './config';
Expand Down
2 changes: 1 addition & 1 deletion functions/csvLoader/joiSchemas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Joi from 'joi';
import Joi from '@hapi/joi';

export const dbDataSchema = Joi.array().items(
Joi.object({
Expand Down
2 changes: 1 addition & 1 deletion functions/library/KOBOFetcher/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Joi from 'joi';
import * as Joi from '@hapi/joi';
import * as dotenv from 'dotenv';

// require and configure dotenv, will load vars in .env in PROCESS.ENV
Expand Down
2 changes: 1 addition & 1 deletion functions/library/KOBOFetcher/db.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Bottleneck from 'bottleneck';
import { Context } from '@azure/functions';
import Joi from 'joi';
import Joi from '@hapi/joi';
import mongoose from 'mongoose';
import { Attribute } from './types';
import config from './config';
Expand Down
2 changes: 1 addition & 1 deletion functions/library/KOBOFetcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AzureFunction, Context } from '@azure/functions';
import fs from 'fs';
import path from 'path';
import yaml from 'js-yaml';
import Joi from 'joi';
import Joi from '@hapi/joi';

import config from './config';
import { initializeDBConnection } from './db';
Expand Down
2 changes: 1 addition & 1 deletion functions/library/KOBOFetcher/joiSchemas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Joi from 'joi';
import Joi from '@hapi/joi';

export const dbDataSchema = Joi.array().items(
Joi.object({
Expand Down
116 changes: 59 additions & 57 deletions functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"lint:ci": "eslint . --max-warnings=0"
},
"dependencies": {
"@hapi/joi": "^17.1.1",
"axios": "^0.21.1",
"bottleneck": "^2.19.5",
"csvtojson": "^2.0.10",
"dotenv": "^8.2.0",
"joi": "^17.3.0",
"js-yaml": "^3.14.0",
"mongoose": "^5.10.15",
"winston": "^3.3.3"
Expand Down
2 changes: 1 addition & 1 deletion functions/templates/loaderTemplate/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Joi from 'joi';
import * as Joi from '@hapi/joi';
import * as dotenv from 'dotenv';

// require and configure dotenv, will load vars in .env in PROCESS.ENV
Expand Down
2 changes: 1 addition & 1 deletion functions/templates/loaderTemplate/db.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Bottleneck from 'bottleneck';
import { Context } from '@azure/functions';
import Joi from 'joi';
import Joi from '@hapi/joi';
import mongoose from 'mongoose';
import { Attribute } from './types';
import config from './config';
Expand Down
2 changes: 1 addition & 1 deletion functions/templates/loaderTemplate/joiSchemas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Joi from 'joi';
import Joi from '@hapi/joi';

export const dbDataSchema = Joi.array().items(
Joi.object({
Expand Down
3 changes: 1 addition & 2 deletions initial-data-load/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
"license": "GPL-3.0-or-later",
"dependencies": {
"@azure/storage-queue": "^12.2.0",
"@types/mongoose": "^5.10.3",
"@hapi/joi": "^17.1.1",
"axios": "^0.21.1",
"azure-storage": "^2.10.3",
"bottleneck": "^2.19.5",
"csvtojson": "^2.0.10",
"dotenv": "^6.0.0",
"fs": "^0.0.1-security",
"https": "^1.0.0",
"joi": "^13.6.0",
"js-yaml": "^4.0.0",
"mongoose": "^5.11.11",
"winston": "^3.2.1"
Expand Down
3 changes: 1 addition & 2 deletions initial-data-load/src/azureStorage/storageQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ const { QueueServiceClient } = require('@azure/storage-queue');
const logger = require('../config/winston');
const config = require('../config/config');

// eslint-disable-next-line new-cap
const queueServiceClient = new QueueServiceClient.fromConnectionString(config.azureStorageConnectionString);
const queueServiceClient = QueueServiceClient.fromConnectionString(config.azureStorageConnectionString);

const createStorageQueue = async (queueName) => {
logger.info(`Creating storage queue: ${queueName}`);
Expand Down
Loading

0 comments on commit cc43155

Please sign in to comment.