Skip to content

Commit d53d668

Browse files
Merge branch 'feature/plat-2251' into feature/plat-2427
2 parents a368d79 + b092001 commit d53d668

File tree

15 files changed

+885
-261
lines changed

15 files changed

+885
-261
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ workflows:
4747
context: "org-global"
4848
filters:
4949
branches:
50-
only: "feature/legacy-challenge"
50+
only: "main"

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npx lint-staged
4+
#npx lint-staged

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@
2323
"license": "ISC",
2424
"dependencies": {
2525
"@grpc/grpc-js": "^1.7.1",
26-
"@topcoder-framework/client-relational": "^0.4.3",
27-
"@topcoder-framework/lib-common": "^0.4.3",
28-
"dayjs": "^1.11.5",
26+
"@topcoder-framework/client-relational": "^0.6.0",
27+
"@topcoder-framework/domain-challenge": "^0.6.1",
28+
"@topcoder-framework/lib-common": "^0.6.0",
29+
"dayjs": "^1.11.7",
2930
"dotenv": "^16.0.3",
3031
"grpc-server-reflection": "^0.1.5",
3132
"lodash": "^4.17.21",
3233
"moment": "^2.29.4",
3334
"source-map-support": "^0.5.21",
34-
"topcoder-interface": "github:topcoder-platform/plat-interface-definition#v0.0.19",
35+
"topcoder-interface": "github:topcoder-platform/plat-interface-definition#v0.0.23",
3536
"uuidv4": "^6.2.13"
3637
},
3738
"devDependencies": {
@@ -67,4 +68,4 @@
6768
"node": "18.13.0",
6869
"yarn": "1.22.19"
6970
}
70-
}
71+
}

src/config.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import * as dotenv from "dotenv";
21
import assert from "assert";
3-
dotenv.config();
42

53
export const ENV = <string>process.env.ENV || "local";
6-
export const GRPC_SERVER_HOST = process.env.GRPC_SERVER_HOST || "";
7-
export const GRPC_SERVER_PORT = process.env.GRPC_SERVER_PORT || 9091;
4+
export const GRPC_SERVER_HOST = process.env.GRPC_SERVER_HOST || "localhost";
5+
export const GRPC_SERVER_PORT = process.env.GRPC_SERVER_PORT || 9090;
86

97
export const GRPC_RDB_SERVER_HOST = process.env.GRPC_RDB_SERVER_HOST;
108
export const GRPC_RDB_SERVER_PORT = process.env.GRPC_RDB_SERVER_PORT;
119

1210
assert(GRPC_RDB_SERVER_HOST, "GRPC_RDB_SERVER_HOST is required");
13-
assert(GRPC_RDB_SERVER_PORT, "GRPC_RDB_SERVER_PORT is required");
11+
assert(GRPC_RDB_SERVER_PORT, "GRPC_RDB_SERVER_PORT is required");

src/config/constants.ts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,98 @@ export const ObserverResourceInfoToAdd: ResourceInfoTypeIds[] = [
6161
"PaymentStatus",
6262
"AppealsCompletedEarly",
6363
];
64+
65+
export const ChallengeStatusMap = {
66+
1: "Active",
67+
2: "Draft",
68+
3: "Deleted",
69+
4: "Cancelled - Failed Review",
70+
5: "Cancelled - Failed Screening",
71+
6: "Cancelled - Zero Submissions",
72+
7: "Completed",
73+
8: "Cancelled - Winner Unresponsive",
74+
9: "Cancelled - Client Request",
75+
10: "Cancelled - Requirements Infeasible",
76+
11: "Cancelled - Zero Registrations",
77+
};
78+
79+
export type ChallengeStatusIds = keyof typeof ChallengeStatusMap;
80+
81+
export const PHASE_NAME_MAPPINGS = [
82+
{
83+
name: "Registration",
84+
phaseId: "a93544bc-c165-4af4-b55e-18f3593b457a",
85+
},
86+
{
87+
name: "Submission",
88+
phaseId: "6950164f-3c5e-4bdc-abc8-22aaf5a1bd49",
89+
},
90+
{
91+
name: "Screening",
92+
phaseId: "2d7d3d85-0b29-4989-b3b4-be7f2b1d0aa6",
93+
},
94+
{
95+
name: "Review",
96+
phaseId: "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b",
97+
},
98+
{
99+
name: "Appeals",
100+
phaseId: "1c24cfb3-5b0a-4dbd-b6bd-4b0dff5349c6",
101+
},
102+
{
103+
name: "Appeals Response",
104+
phaseId: "797a6af7-cd3f-4436-9fca-9679f773bee9",
105+
},
106+
{
107+
name: "Aggregation",
108+
phaseId: "2691ed2b-8574-4f16-929a-35ac94e1c3ee",
109+
},
110+
{
111+
name: "Aggregation Review",
112+
phaseId: "a290be40-02eb-48df-822b-71971c00403f",
113+
},
114+
{
115+
name: "Final Fix",
116+
phaseId: "3e2afca6-9542-4763-a135-96b33f12c082",
117+
},
118+
{
119+
name: "Final Review",
120+
phaseId: "f3acaf26-1dd5-42ae-9f0d-8eb0fd24ae59",
121+
},
122+
{
123+
name: "Approval",
124+
phaseId: "ad985cff-ad3e-44de-b54e-3992505ba0ae",
125+
},
126+
{
127+
name: "Post-Mortem",
128+
phaseId: "f308bdb4-d3da-43d8-942b-134dfbaf5c45",
129+
},
130+
{
131+
name: "Specification Submission",
132+
phaseId: "fb21431c-119e-4bc7-b447-d0af3f2be6b4",
133+
},
134+
{
135+
name: "Specification Review",
136+
phaseId: "2752454b-0952-4a42-a4f0-f3fb88a9b065",
137+
},
138+
{
139+
name: "Checkpoint Submission",
140+
phaseId: "d8a2cdbe-84d1-4687-ab75-78a6a7efdcc8",
141+
},
142+
{
143+
name: "Checkpoint Screening",
144+
phaseId: "ce1afb4c-74f9-496b-9e4b-087ae73ab032",
145+
},
146+
{
147+
name: "Checkpoint Review",
148+
phaseId: "84b43897-2aab-44d6-a95a-42c433657eed",
149+
},
150+
{
151+
name: "Iterative Review",
152+
phaseId: "003a4b14-de5d-43fc-9e35-835dbeb6af1f",
153+
},
154+
];
155+
156+
export const IFX_TIMEZONE = "America/New_York";
157+
158+
export const dateFormatIfx = 'YYYY-MM-DD HH:mm:ss';

0 commit comments

Comments
 (0)