Skip to content

Commit aa7ec1c

Browse files
author
vikasrohit
authored
Merge pull request #557 from topcoder-platform/develop
Prod Release: 2.4.0
2 parents 4207147 + f451d6a commit aa7ec1c

Some content is hidden

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

80 files changed

+6621
-3651
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ deploy_steps: &deploy_steps
3232
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar
3333
source buildenvvar
3434
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME}
35-
35+
3636
echo "======= Running Masterscript - deploy projects-api-consumers ==========="
3737
if [ -e ${LOGICAL_ENV}-${APPNAME}-appvar.json ]; then sudo rm -vf ${LOGICAL_ENV}-${APPNAME}-appvar.json; fi
3838
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-consumers-deployvar
@@ -42,7 +42,7 @@ deploy_steps: &deploy_steps
4242
jobs:
4343
test:
4444
docker:
45-
- image: circleci/node:8.9.4
45+
- image: circleci/node:12.16.1
4646
- image: circleci/postgres:9.6.2-alpine
4747
environment:
4848
- POSTGRES_USER: circle_test

.eslintrc

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@
1010
"rules": {
1111
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.test.js", "**/*.spec.js", "src/tests/*.js"]}],
1212
"max-len": ["error", { "ignoreComments": true, "code": 120 }],
13-
"valid-jsdoc": ["error", {
14-
"requireReturn": true,
15-
"requireReturnType": true,
16-
"requireParamDescription": true,
17-
"requireReturnDescription": true
18-
}],
1913
"require-jsdoc": ["error", {
20-
"require": {
21-
"FunctionDeclaration": true,
22-
"MethodDefinition": true,
23-
"ClassDeclaration": true
24-
}
25-
}]
14+
"require": {
15+
"FunctionDeclaration": true,
16+
"MethodDefinition": true,
17+
"ClassDeclaration": true
18+
}
19+
}],
20+
"indent": 0,
21+
"no-multi-spaces": 0,
22+
"valid-jsdoc": 0
2623
}
2724
}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v8.9.4
1+
12

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:8.2.1
1+
FROM node:12.16.1
22
LABEL version="1.2"
33
LABEL description="Projects microservice"
44
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list

README.md

Lines changed: 148 additions & 110 deletions
Large diffs are not rendered by default.

config/default.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
"url": "localhost:9092"
4040
},
4141
"analyticsKey": "",
42-
"VALID_ISSUERS": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\"]",
43-
"validIssuers": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\"]",
42+
"VALID_ISSUERS": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\",\"https:\/\/topcoder-dev.auth0.com\/\"]",
43+
"validIssuers": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\",\"https:\/\/topcoder-dev.auth0.com\/\"]",
4444
"jwksUri": "",
4545
"busApiUrl": "http://api.topcoder-dev.com/v5",
4646
"messageApiUrl": "http://api.topcoder-dev.com/v5",

data/demo-data.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

docs/permissions.html

Lines changed: 1299 additions & 0 deletions
Large diffs are not rendered by default.

local/full/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ services:
7373
args:
7474
NODE_VERSION: 8.11.3
7575
GIT_URL: https://github.com/topcoder-platform/project-processor-es
76-
GIT_BRANCH: feature/link-attachments
76+
GIT_BRANCH: develop
7777
command: start kafka-client
7878
expose:
7979
- "5000"

local/seed/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const token =
77

88
async function seed() {
99
await seedMetadata(targetUrl, token);
10-
await seedProjects(targetUrl, token);
10+
// await seedProjects(targetUrl, token);
1111
}
1212

1313
seed().then(() => process.exit());

local/seed/seedMetadata.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@ if (!process.env.CONNECT_USER_TOKEN) {
77
process.exit(1);
88
}
99

10+
/**
11+
* Iteratively goes through the object and replaces prices with random values.
12+
*
13+
* This method MUTATES object.
14+
*
15+
* @param {Object} o object
16+
*/
17+
function dummifyPrices(o) {
18+
Object.keys(o).forEach(function (k) {
19+
if (o[k] !== null && typeof o[k] === 'object') {
20+
dummifyPrices(o[k]);
21+
return;
22+
}
23+
if (k === 'price' && typeof o[k] === 'number') {
24+
o[k] = 100 + Math.round(Math.random() * 10000);
25+
}
26+
if (k === 'price' && typeof o[k] === 'string') {
27+
o[k] = (100 + Math.round(Math.random() * 10000)).toFixed(0);
28+
}
29+
});
30+
}
31+
1032
// we need to know any logged in Connect user token to retrieve data from DEV
1133
const CONNECT_USER_TOKEN = process.env.CONNECT_USER_TOKEN;
1234

@@ -29,6 +51,7 @@ module.exports = (targetUrl, token) => {
2951
})
3052
.then(async function (response) {
3153
let data = response.data;
54+
dummifyPrices(data)
3255

3356
console.log('Creating metadata objects locally...');
3457

0 commit comments

Comments
 (0)