Skip to content

Release for m2m token fix. #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
52ddd0a
Switch to tc-core-library-js for fetching m2m token
ThomasKranitsas Mar 18, 2019
2b303e3
Bump npm version
ThomasKranitsas Mar 18, 2019
6575f2a
Code 30108491
suppermancool Dec 2, 2019
1b91701
Fix tests
ThomasKranitsas Dec 3, 2019
5e470c6
Merge pull request #116 from suppermancool/code-30108491
codeMinter Dec 6, 2019
2f96814
fix filtering of provisionalScoreComplete logic
codeMinter Dec 7, 2019
5f15971
make build based on env to pick up right json file
codeMinter Dec 7, 2019
0ade41c
Fix build issues
ThomasKranitsas Dec 13, 2019
57ad31c
Adding test tag
sushilshinde Dec 14, 2019
e9ce6b6
Test release
sushilshinde Dec 14, 2019
540e0cb
Test release npm version v1000.7.0
sushilshinde Dec 14, 2019
baf0da0
added test tag
sushilshinde Dec 18, 2019
69c15ed
merged with develop
sushilshinde Dec 18, 2019
9906441
fix dups
sushilshinde Jan 6, 2020
f765197
Merge pull request #122 from topcoder-platform/develop-fix-m2m
sushilshinde Jan 6, 2020
f02f334
test release npm version
sushilshinde Jan 6, 2020
616c103
Merge remote-tracking branch 'origin/develop' into feature-mm-submiss…
veshu Jan 16, 2020
c60cc83
Merge remote-tracking branch 'origin/master' into feature-mm-submissions
sushilshinde Feb 17, 2020
16ee657
added comments
sushilshinde Feb 17, 2020
6435cd4
fix m2m token
LieutenantRoger Feb 24, 2020
35915ff
Merge pull request #131 from LieutenantRoger/jan-develop-fix-m2m
sushilshinde Feb 24, 2020
a8db62a
test release npm ver bump up to 1000.8.1
sushilshinde Feb 24, 2020
6f2df59
Merge pull request #132 from topcoder-platform/feature-mm-submissions
sushilshinde Feb 25, 2020
754b17e
resolved conflicts
sushilshinde Feb 25, 2020
9243403
resolved conflicts
sushilshinde Feb 25, 2020
89c01b9
Merge pull request #133 from topcoder-platform/jan-develop-fix-m2m
sushilshinde Feb 25, 2020
82f2317
Merge pull request #135 from topcoder-platform/develop-mm-sub-merge-fix
sushilshinde Mar 2, 2020
6ad4342
ci: test release after merge m2m
sushilshinde Mar 2, 2020
f1c2380
removed test tag, npm version bump up for prod release
sushilshinde Mar 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
at: .
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: npm publish

# dont change anything
workflows:
version: 2
build:
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ The [Topcoder](https://www.topcoder.com) lib for internal ReactJS projects.

Change the property in `AV_SCAN_SCORER_REVIEW_TYPE_ID` in config.

### Configuration for AV-Scan scorer review type ID

Change the property in `PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID` in config.

### Development
```shell
# Install dependencies
Expand All @@ -19,7 +23,7 @@ npm install
npm test
npm run build

# Go to other project which depends on the topcoder-react-lib, config its package.json so
# Go to other project which depends on the topcoder-react-lib, config its package.json so
# that the 'topcoder-react-lib' points to the local foler path of topcoder-react-lib:
#
# "dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions __tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Object {
"getAllCountriesInit": [Function],
"getCountriesDone": [Function],
"getCountriesInit": [Function],
"getReviewTypesDone": [Function],
"getReviewTypesInit": [Function],
"getSkillTagsDone": [Function],
"getSkillTagsInit": [Function],
},
Expand Down
2 changes: 2 additions & 0 deletions __tests__/actions/__snapshots__/lookup.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Object {
"getAllCountriesInit": [Function],
"getCountriesDone": [Function],
"getCountriesInit": [Function],
"getReviewTypesDone": [Function],
"getReviewTypesInit": [Function],
"getSkillTagsDone": [Function],
"getSkillTagsInit": [Function],
},
Expand Down
10 changes: 10 additions & 0 deletions __tests__/reducers/__snapshots__/lookup.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Object {
],
"loadingCountriesError": false,
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -33,6 +34,7 @@ Object {
],
"loadingCountriesError": true,
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -49,6 +51,7 @@ Object {
"allCountries": Array [],
"countries": Array [],
"loadingSkillTagsError": false,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -65,6 +68,7 @@ Object {
"allCountries": Array [],
"countries": Array [],
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -80,6 +84,7 @@ exports[`Default reducer Initial state 1`] = `
Object {
"allCountries": Array [],
"countries": Array [],
"reviewTypes": Array [],
"skillTags": Array [],
}
`;
Expand All @@ -95,6 +100,7 @@ Object {
],
"loadingCountriesError": false,
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -117,6 +123,7 @@ Object {
],
"loadingCountriesError": true,
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -133,6 +140,7 @@ Object {
"allCountries": Array [],
"countries": Array [],
"loadingSkillTagsError": false,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -149,6 +157,7 @@ Object {
"allCountries": Array [],
"countries": Array [],
"loadingSkillTagsError": true,
"reviewTypes": Array [],
"skillTags": Array [
Object {
"domain": "SKILLS",
Expand All @@ -164,6 +173,7 @@ exports[`Factory without server side rendering Initial state 1`] = `
Object {
"allCountries": Array [],
"countries": Array [],
"reviewTypes": Array [],
"skillTags": Array [],
}
`;
1 change: 1 addition & 0 deletions config/default.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "",
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "",
"PAGE_SIZE": 50,
"REVIEW_OPPORTUNITY_PAGE_SIZE": 1000
}
3 changes: 2 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "68c5a381-c8ab-48af-92a7-7a869a4ee6c3"
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "68c5a381-c8ab-48af-92a7-7a869a4ee6c3",
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "52c91e85-745f-4e62-b592-9879a2dfe9fd"
}
3 changes: 2 additions & 1 deletion config/production.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "55bbb17d-aac2-45a6-89c3-a8d102863d05"
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "55bbb17d-aac2-45a6-89c3-a8d102863d05",
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "df51ca7d-fb0a-4147-9569-992fcf5aae48"
}
8 changes: 8 additions & 0 deletions config/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ module.exports = {
V3: 'https://api.topcoder-dev.com/v3',
},
dummyConfigKey: 'Dummy config value',
SECRET: {
TC_M2M: {
AUTH0_URL: '',
AUTH0_AUDIENCE: '',
TOKEN_CACHE_TIME: '',
AUTH0_PROXY_SERVER_URL: '',
},
},
};
17 changes: 10 additions & 7 deletions config/webpack/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
const webpack = require('webpack');

module.exports = {
plugins: [
// eslint-disable-next-line global-require
new webpack.DefinePlugin({ CONFIG: JSON.stringify(require('config')) }),
],
node: {
tls: 'empty',
fs: 'empty',
net: 'empty',
},
// Don't include the dependencies to keep built bundle small,
// they will be provided by the app using this lib
externals: [
Expand All @@ -24,8 +25,10 @@ module.exports = {
'tc-accounts',
'to-capital-case',
'topcoder-react-utils',
'tc-core-library-js',
],
plugins: [
// eslint-disable-next-line global-require
new webpack.DefinePlugin({ CONFIG: JSON.stringify(require('config')) }),
],
node: {
fs: 'empty',
},
};
1,445 changes: 0 additions & 1,445 deletions dist/dev/index.js

This file was deleted.

18 changes: 18 additions & 0 deletions docs/actions.lookup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Actions related to lookup data.
* [.getCountriesDone()](#module_actions.lookup.getCountriesDone) ⇒ <code>Action</code>
* [.getAllCountriesInit()](#module_actions.lookup.getCountriesInit) ⇒ <code>Action</code>
* [.getAllCountriesDone(tokenV3)](#module_actions.lookup.getCountriesDone) ⇒ <code>Action</code>
* [.getReviewTypesInit()](#module_actions.lookup.getReviewTypesInit) ⇒ <code>Action</code>
* [.getReviewTypesDone(tokenV3)](#module_actions.lookup.ggetReviewTypesDone) ⇒ <code>Action</code>

<a name="module_actions.lookup.getSkillTagsInit"></a>

Expand Down Expand Up @@ -40,3 +42,19 @@ Creates an action that gets all countries new version.
| Param | Type | Description |
| --- | --- | --- |
| tokenV3 | <code>String</code> | Topcoder v3 auth token. |
<a name="module_actions.lookup.getReviewTypesInit"></a>

### actions.lookup.getReviewTypesInit() ⇒ <code>Action</code>
Creates an action that gets all reiview types.

**Kind**: static method of [<code>actions.lookup</code>](#module_actions.lookup)
<a name="module_actions.lookup.getReviewTypesDone"></a>

### actions.lookup.getReviewTypesDone(tokenV3) ⇒ <code>Action</code>
Creates an action that gets all review types.

**Kind**: static method of [<code>actions.lookup</code>](#module_actions.lookup)

| Param | Type | Description |
| --- | --- | --- |
| tokenV3 | <code>String</code> | Topcoder v3 auth token. |
31 changes: 22 additions & 9 deletions docs/reducers.lookup.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,48 @@ State segment managed by this reducer has the following structure:
* _inner_
* [~onGetSkillTagsDone(state, action)](#module_reducers.lookup..onGetSkillTagsDone) ⇒ <code>Object</code>
* [~onGetCountriesDone(state, action)](#module_reducers.lookup..onGetCountriesDone) ⇒ <code>Object</code>
* [~onGetReviewTypesDone(state, action)](#module_reducers.lookup..onGetReviewTypesDone) ⇒ <code>Object</code>
* [~create(initialState)](#module_reducers.lookup..create) ⇒ <code>function</code>

<a name="module_reducers.lookup.default"></a>

### reducers.lookup.default
Reducer with default initial state.

**Kind**: static property of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Kind**: static property of [<code>reducers.lookup</code>](#module_reducers.lookup)
<a name="module_reducers.lookup.factory"></a>

### reducers.lookup.factory() ⇒ <code>Promise</code>
Factory which creates a new reducer.

**Kind**: static method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Resolves**: <code>Function(state, action): state</code> New reducer.
**Kind**: static method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Resolves**: <code>Function(state, action): state</code> New reducer.
<a name="module_reducers.lookup..onGetSkillTagsDone"></a>

### reducers.lookup~onGetSkillTagsDone(state, action) ⇒ <code>Object</code>
Handles LOOKUP/GET_SKILL_TAGS_DONE action.

**Kind**: static method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Resolves**: <code>Function(state, action): state</code> New reducer.
**Kind**: static method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Resolves**: <code>Function(state, action): state</code> New reducer.
<a name="module_reducers.lookup..onGetCountriesDone"></a>

### reducers.lookup~onGetCountriesDone(state, action) ⇒ <code>Object</code>
Handles LOOKUP/GET_COUNTRIES_DONE action.

**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Returns**: <code>Object</code> - New state
**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Returns**: <code>Object</code> - New state

| Param | Type | Description |
| --- | --- | --- |
| state | <code>Object</code> | |
| action | <code>Object</code> | Payload will be JSON from api call |
<a name="module_reducers.lookup..onGetReviewTypesDone"></a>

### reducers.lookup~onGetReviewTypesDone(state, action) ⇒ <code>Object</code>
Handles LOOKUP/GET_REVIEW_TYPES_DONE action.

**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Returns**: <code>Object</code> - New state

| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -58,8 +71,8 @@ Handles LOOKUP/GET_COUNTRIES_DONE action.
### reducers.lookup~create(initialState) ⇒ <code>function</code>
Creates a new Lookup reducer with the specified initial state.

**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Returns**: <code>function</code> - Lookup reducer.
**Kind**: inner method of [<code>reducers.lookup</code>](#module_reducers.lookup)
**Returns**: <code>function</code> - Lookup reducer.

| Param | Type | Description |
| --- | --- | --- |
Expand Down
14 changes: 14 additions & 0 deletions docs/services.submissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ via API V5.
* [new SubmissionsService(tokenV3)](#new_module_services.submissions..SubmissionsService_new)
* [.getSubmissions(filters, params)](#module_services.submissions..SubmissionsService+getSubmissions) ⇒ <code>Promise</code>
* [.getSubmissionInformation(submissionId)](#module_services.submissions..SubmissionsService+getSubmissionInformation) ⇒ <code>Promise</code>
* [.downloadSubmission(submissionId)](#module_services.submissions..SubmissionsService+downloadSubmission) ⇒ <code>Promise</code>

<a name="module_services.submissions.getService"></a>

Expand All @@ -35,6 +36,7 @@ Returns a new or existing submissions service.
* [new SubmissionsService(tokenV3)](#new_module_services.submissions..SubmissionsService_new)
* [.getSubmissions(filters, params)](#module_services.submissions..SubmissionsService+getSubmissions) ⇒ <code>Promise</code>
* [.getSubmissionInformation(submissionId)](#module_services.submissions..SubmissionsService+getSubmissionInformation) ⇒ <code>Promise</code>
* [.downloadSubmission(submissionId)](#module_services.submissions..SubmissionsService+downloadSubmission) ⇒ <code>Promise</code>

<a name="new_module_services.submissions..SubmissionsService_new"></a>

Expand Down Expand Up @@ -68,3 +70,15 @@ Gets submission information.
| Param | Type | Description |
| --- | --- | --- |
| submissionId | <code>String</code> | The id of submission |

<a name="module_services.submissions..SubmissionsService+downloadSubmission"></a>

#### submissionsService.downloadSubmission(submissionId) ⇒ <code>Promise</code>
Download submission.

**Kind**: instance method of [<code>SubmissionsService</code>](#module_services.submissions..SubmissionsService)
**Returns**: <code>Promise</code> - Resolves to the submission file.

| Param | Type | Description |
| --- | --- | --- |
| submissionId | <code>String</code> | The id of submission |
Loading