Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit acd3593

Browse files
authored
Merge pull request #30 from topcoder-platform/tc-skills
TSJR-12 prepare skills API for action -> dev
2 parents bbdc90a + 4a6787c commit acd3593

21 files changed

+6161
-4239
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ workflows:
7070
branches:
7171
only:
7272
- develop
73-
- feature/enrich
73+
- tc-skills
7474

7575
# Production builds are exectuted only on tagged commits to the
7676
# master branch.

.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
commonjs: true,
5+
es2021: true
6+
},
7+
extends: 'standard',
8+
overrides: [
9+
{
10+
env: {
11+
node: true
12+
},
13+
files: [
14+
'.eslintrc.{js,cjs}'
15+
],
16+
parserOptions: {
17+
sourceType: 'script'
18+
}
19+
}
20+
],
21+
parserOptions: {
22+
ecmaVersion: 'latest'
23+
},
24+
rules: {
25+
}
26+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.env
2+
/node_modules

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.17.0

app.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ const cross = require('cors')
99
const bodyParser = require('body-parser')
1010
const _ = require('lodash')
1111
const http = require('http')
12-
const swaggerUi = require('swagger-ui-express')
13-
const jsyaml = require('js-yaml')
14-
const fs = require('fs')
15-
const path = require('path')
1612
const logger = require('./src/common/logger')
1713
const errorMiddleware = require('./src/common/error.middleware')
1814
const routes = require('./src/route')
@@ -63,10 +59,11 @@ _.each(routes, (verbs, url) => {
6359
})
6460
})
6561
app.use('/', apiRouter)
66-
const spec = fs.readFileSync(path.join(__dirname, 'docs/swagger.yaml'), 'utf8')
67-
const swaggerDoc = jsyaml.safeLoad(spec)
62+
// disable swagger docs as we do not want use them served by this service
63+
// const spec = fs.readFileSync(path.join(__dirname, 'docs/swagger.yaml'), 'utf8')
64+
// const swaggerDoc = jsyaml.safeLoad(spec)
6865

69-
app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerDoc))
66+
// app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerDoc))
7067

7168
app.use(errorMiddleware())
7269
app.use('*', (req, res) => {

config/default.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module.exports = {
77
PORT: process.env.PORT || 3001,
88

99
AUTH_SECRET: process.env.AUTH_SECRET || 'CLIENT_SECRET',
10-
VALID_ISSUERS: process.env.VALID_ISSUERS ? process.env.VALID_ISSUERS.replace(/\\"/g, '')
10+
VALID_ISSUERS: process.env.VALID_ISSUERS
11+
? process.env.VALID_ISSUERS.replace(/\\"/g, '')
1112
: '["https://topcoder-dev.auth0.com/", "https://api.topcoder.com"]',
1213

1314
PAGE_SIZE: process.env.PAGE_SIZE || 20,
@@ -38,7 +39,7 @@ module.exports = {
3839
ES: {
3940
HOST: process.env.ES_HOST || 'http://localhost:9200',
4041
ES_REFRESH: process.env.ES_REFRESH || 'true',
41-
ES_API_VERSION: process.env.ES_API_VERSION || "7.4",
42+
ES_API_VERSION: process.env.ES_API_VERSION || '7.4',
4243

4344
ELASTICCLOUD: {
4445
id: process.env.ELASTICCLOUD_ID,

0 commit comments

Comments
 (0)