Skip to content

Commit 93122c0

Browse files
PROD-2195 #comment add legacy src; delete test files from /src-ts #time 30m
1 parent 599365f commit 93122c0

File tree

316 files changed

+23249
-442
lines changed

Some content is hidden

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

316 files changed

+23249
-442
lines changed

babel.config.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
module.exports = function (api) {
2+
const isProd = process.env.APPMODE === "production";
3+
api.cache(!isProd);
4+
5+
const generateScopedName = isProd
6+
? "[hash:base64:6]"
7+
: "self_service_[path][name]___[local]___[hash:base64:6]";
8+
return {
9+
presets: ["@babel/preset-env", "@babel/preset-react"],
10+
plugins: [
11+
[
12+
"@babel/plugin-transform-runtime",
13+
{
14+
useESModules: true,
15+
regenerator: false,
16+
},
17+
],
18+
[
19+
"react-css-modules",
20+
{
21+
filetypes: {
22+
".scss": {
23+
syntax: "postcss-scss",
24+
},
25+
},
26+
generateScopedName,
27+
},
28+
],
29+
[
30+
"inline-react-svg",
31+
{
32+
"svgo": {
33+
"plugins": [
34+
{
35+
"cleanupIDs": false
36+
}
37+
]
38+
}
39+
}
40+
],
41+
],
42+
env: {
43+
test: {
44+
presets: [
45+
[
46+
"@babel/preset-env",
47+
{
48+
targets: "current node",
49+
},
50+
],
51+
],
52+
plugins: [
53+
[
54+
"module-resolver",
55+
{
56+
alias: {
57+
styles: "./src/styles",
58+
components: "./src/components",
59+
hooks: "./src/hooks",
60+
utils: "./src/utils",
61+
constants: "./src/constants",
62+
services: "./src/services",
63+
},
64+
},
65+
],
66+
],
67+
},
68+
},
69+
};
70+
};

config/dev.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = {
2+
/**
3+
* URL of Topcoder Community Website
4+
*/
5+
TOPCODER_COMMUNITY_WEBSITE_URL: "https://topcoder-dev.com",
6+
TERMS_URL:
7+
"https://www.topcoder-dev.com/challenges/terms/detail/317cd8f9-d66c-4f2a-8774-63c612d99cd4",
8+
PRIVACY_POLICY_URL: "https://www.topcoder-dev.com/policy",
9+
SIGN_IN_URL: `https://accounts-auth0.topcoder-dev.com/?retUrl=https%3A%2F%2Fplatform.topcoder-dev.com%2Fself-service%2Fwizard&regSource=selfService`,
10+
SIGN_UP_URL: `https://accounts-auth0.topcoder-dev.com/?retUrl=https%3A%2F%2Fplatform.topcoder-dev.com%2Fself-service%2Fwizard&regSource=selfService&mode=signUp`,
11+
/**
12+
* URL of Topcoder Connect Website
13+
*/
14+
CONNECT_WEBSITE_URL: "https://connect.topcoder-dev.com",
15+
VANILLA_EMBED_JS: "https://vanilla.topcoder-dev.com/js/embed.js",
16+
VANILLA_EMBED_TYPE: "mfe",
17+
VANILLA_FORUM_API: "https://vanilla.topcoder-dev.com/api/v2",
18+
VANILLA_ACCESS_TOKEN: "va.JApNvUOx3549h20I6tnl1kOQDc75NDIp.0jG3dA.EE3gZgV",
19+
20+
API: {
21+
V5: "https://api.topcoder-dev.com/v5",
22+
V3: "https://api.topcoder-dev.com/v3",
23+
},
24+
25+
STRIPE: {
26+
API_KEY: "pk_test_rfcS49MHRVUKomQ9JgSH7Xqz",
27+
API_VERSION: "2020-08-27",
28+
CUSTOMER_TOKEN:
29+
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0MSIsImV4cCI6MjU2MzA3NjY4OSwidXNlcklkIjoiNDAwNTEzMzMiLCJpYXQiOjE0NjMwNzYwODksImVtYWlsIjoidGVzdEB0b3Bjb2Rlci5jb20iLCJqdGkiOiJiMzNiNzdjZC1iNTJlLTQwZmUtODM3ZS1iZWI4ZTBhZTZhNGEifQ.jl6Lp_friVNwEP8nfsfmL-vrQFzOFp2IfM_HC7AwGcg",
30+
ADMIN_TOKEN:
31+
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiYWRtaW5pc3RyYXRvciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoidGVzdDEiLCJleHAiOjI1NjMwNzY2ODksInVzZXJJZCI6IjQwMDUxMzMzIiwiaWF0IjoxNDYzMDc2MDg5LCJlbWFpbCI6InRlc3RAdG9wY29kZXIuY29tIiwianRpIjoiYjMzYjc3Y2QtYjUyZS00MGZlLTgzN2UtYmViOGUwYWU2YTRhIn0.wKWUe0-SaiFVN-VR_-GwgFlvWaDkSbc8H55ktb9LAVw",
32+
},
33+
/**
34+
* Expire time period of auto saved intake form: 24 hours
35+
*/
36+
AUTO_SAVED_COOKIE_EXPIRED_IN: 24 * 60,
37+
TIME_ZONE: "Europe/London",
38+
};

config/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* global process */
2+
3+
module.exports = (() => {
4+
const env = process.env.APPENV || "dev";
5+
6+
console.info(`APPENV: "${env}"`);
7+
8+
// for security reason don't let to require any arbitrary file defined in process.env
9+
if (["prod", "dev"].indexOf(env) < 0) {
10+
return require("./dev");
11+
}
12+
13+
return require("./" + env);
14+
})();

config/local.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
COMMUNITY_ADMIN_URL: "",
3+
};

config/prod.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
/**
3+
* URL of Topcoder Community Website
4+
*/
5+
TOPCODER_COMMUNITY_WEBSITE_URL: "https://topcoder.com",
6+
TERMS_URL:
7+
"https://www.topcoder.com/challenges/terms/detail/564a981e-6840-4a5c-894e-d5ad22e9cd6f",
8+
PRIVACY_POLICY_URL: "https://www.topcoder.com/policy",
9+
SIGN_IN_URL: `https://accounts-auth0.topcoder.com/?retUrl=https%3A%2F%2Fplatform.topcoder.com%2Fself-service%2Fwizard&regSource=selfService`,
10+
SIGN_UP_URL: `https://accounts-auth0.topcoder.com/?retUrl=https%3A%2F%2Fplatform.topcoder.com%2Fself-service%2Fwizard&regSource=selfService&mode=signUp`,
11+
12+
/**
13+
* URL of Topcoder Connect Website
14+
*/
15+
CONNECT_WEBSITE_URL: "https://connect.topcoder.com",
16+
VANILLA_EMBED_JS: "https://discussions.topcoder.com/js/embed.js",
17+
VANILLA_EMBED_TYPE: "standard",
18+
VANILLA_FORUM_API: "https://vanilla.topcoder.com/api/v2",
19+
VANILLA_ACCESS_TOKEN: "va.JApNvUOx3549h20I6tnl1kOQDc75NDIp.0jG3dA.EE3gZgV",
20+
21+
API: {
22+
V5: "https://api.topcoder.com/v5",
23+
V3: "https://api.topcoder.com/v3",
24+
},
25+
26+
STRIPE: {
27+
API_KEY: "pk_live_m3bCBVSfkfMOEp3unZFRsHXi",
28+
API_VERSION: "2020-08-27",
29+
CUSTOMER_TOKEN:
30+
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0MSIsImV4cCI6MjU2MzA3NjY4OSwidXNlcklkIjoiNDAwNTEzMzMiLCJpYXQiOjE0NjMwNzYwODksImVtYWlsIjoidGVzdEB0b3Bjb2Rlci5jb20iLCJqdGkiOiJiMzNiNzdjZC1iNTJlLTQwZmUtODM3ZS1iZWI4ZTBhZTZhNGEifQ.jl6Lp_friVNwEP8nfsfmL-vrQFzOFp2IfM_HC7AwGcg",
31+
ADMIN_TOKEN:
32+
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiYWRtaW5pc3RyYXRvciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoidGVzdDEiLCJleHAiOjI1NjMwNzY2ODksInVzZXJJZCI6IjQwMDUxMzMzIiwiaWF0IjoxNDYzMDc2MDg5LCJlbWFpbCI6InRlc3RAdG9wY29kZXIuY29tIiwianRpIjoiYjMzYjc3Y2QtYjUyZS00MGZlLTgzN2UtYmViOGUwYWU2YTRhIn0.wKWUe0-SaiFVN-VR_-GwgFlvWaDkSbc8H55ktb9LAVw",
33+
},
34+
/**
35+
* Expire time period of auto saved intake form: 24 hours
36+
*/
37+
AUTO_SAVED_COOKIE_EXPIRED_IN: 24 * 60,
38+
TIME_ZONE: "Europe/London",
39+
};

package.json

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"scripts": {
66
"start": "sh start-ssl.sh",
77
"start:bsouza": "sh start-ssl-bsouza.sh",
8+
"start:mfe": "cross-env webpack-dev-server --port 8519 --host 0.0.0.0",
89
"build": "react-scripts build",
910
"build:dev": "sh build-dev.sh",
1011
"build:prod": "sh build-prod.sh",
@@ -17,32 +18,98 @@
1718
"dependencies": {
1819
"@datadog/browser-logs": "^4.5.0",
1920
"@heroicons/react": "^1.0.6",
21+
"@reach/router": "^1.3.4",
22+
"apexcharts": "^3.35.3",
2023
"axios": "^0.26.1",
2124
"browser-cookies": "^1.2.0",
2225
"classnames": "^2.3.1",
26+
"crypto-js": "^4.1.1",
27+
"lodash": "^4.17.21",
28+
"moment": "^2.29.3",
29+
"moment-timezone": "^0.5.34",
30+
"prop-types": "^15.8.1",
31+
"rc-checkbox": "^2.3.2",
2332
"react": "^17.0.2",
33+
"react-apexcharts": "^1.4.0",
2434
"react-dom": "^17.0.2",
35+
"react-elastic-carousel": "^0.11.5",
2536
"react-gtm-module": "^2.0.11",
37+
"react-redux": "^8.0.2",
38+
"react-redux-toastr": "^7.6.8",
2639
"react-responsive-modal": "^6.2.0",
2740
"react-router-dom": "^6.2.1",
2841
"react-scripts": "5.0.0",
42+
"react-select": "^5.3.2",
43+
"react-spinners": "^0.13.1",
2944
"react-toastify": "^8.2.0",
45+
"react-tooltip": "^4.2.21",
46+
"redux": "^4.2.0",
47+
"redux-logger": "^3.0.6",
48+
"redux-promise-middleware": "^6.1.2",
49+
"redux-thunk": "^2.4.1",
3050
"sass": "^1.49.8",
51+
"styled-components": "^5.3.5",
3152
"tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.3",
3253
"typescript": "^4.4.2",
54+
"uuid": "^8.3.2",
3355
"web-vitals": "^2.1.0"
3456
},
3557
"devDependencies": {
58+
"@babel/core": "^7.7.5",
59+
"@babel/plugin-syntax-jsx": "^7.17.12",
60+
"@babel/plugin-transform-runtime": "^7.8.3",
61+
"@babel/preset-env": "^7.7.6",
62+
"@babel/preset-react": "^7.7.4",
63+
"@babel/preset-typescript": "^7.16.7",
64+
"@babel/runtime": "^7.8.7",
65+
"@stripe/react-stripe-js": "1.7.2",
66+
"@stripe/stripe-js": "1.29.0",
3667
"@testing-library/jest-dom": "^5.14.1",
3768
"@testing-library/react": "^12.0.0",
3869
"@testing-library/user-event": "^13.2.1",
3970
"@types/axios": "^0.14.0",
4071
"@types/jest": "^27.0.1",
72+
"@types/lodash": "^4.14.182",
4173
"@types/node": "^16.7.13",
74+
"@types/reach__router": "^1.3.10",
4275
"@types/react": "^17.0.20",
4376
"@types/react-dom": "^17.0.9",
4477
"@types/react-gtm-module": "^2.0.1",
45-
"@types/react-router-dom": "^5.3.3"
78+
"@types/react-redux-toastr": "^7.6.2",
79+
"@types/react-router-dom": "^5.3.3",
80+
"@types/systemjs": "^6.1.0",
81+
"autoprefixer": "^9.8.6",
82+
"babel-eslint": "^11.0.0-beta.2",
83+
"babel-jest": "^24.9.0",
84+
"babel-plugin-inline-react-svg": "^1.1.2",
85+
"babel-plugin-module-resolver": "^4.0.0",
86+
"babel-plugin-react-css-modules": "^5.2.6",
87+
"concurrently": "^5.0.1",
88+
"config": "^3.3.6",
89+
"cross-env": "^7.0.2",
90+
"eslint": "^6.7.2",
91+
"eslint-config-prettier": "^6.7.0",
92+
"eslint-config-react-important-stuff": "^2.0.0",
93+
"eslint-plugin-prettier": "^3.1.1",
94+
"file-loader": "^6.2.0",
95+
"identity-obj-proxy": "^3.0.0",
96+
"jest": "^25.2.7",
97+
"jest-cli": "^25.2.7",
98+
"postcss-loader": "^4.0.4",
99+
"postcss-scss": "^3.0.2",
100+
"prettier": "^2.0.4",
101+
"pretty-quick": "^2.0.1",
102+
"resolve-url-loader": "^3.1.2",
103+
"sass": "^1.48.0",
104+
"sass-loader": "^10.0.5",
105+
"single-spa-react": "^2.14.0",
106+
"style-loader": "^2.0.0",
107+
"systemjs-webpack-interop": "^2.1.2",
108+
"webpack": "^4.41.2",
109+
"webpack-cli": "^3.3.10",
110+
"webpack-config-single-spa-react": "^1.0.3",
111+
"webpack-dev-server": "^3.9.0",
112+
"webpack-merge": "^4.2.2"
46113
},
47114
"eslintConfig": {
48115
"extends": [
@@ -66,4 +133,4 @@
66133
]
67134
},
68135
"types": "./types/index.d.ts"
69-
}
136+
}

src-ts/App.test.tsx

Lines changed: 0 additions & 4 deletions
This file was deleted.

src-ts/header/Header.test.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

src-ts/header/logo/Logo.test.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

src-ts/header/tool-selectors/ToolSelectors.test.tsx

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)