@juki-team/commons 0.1.48 → 0.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,7 +53,7 @@ export const PROBLEM_TYPE = {
|
|
|
53
53
|
+ 'The resulting user\'s executable does I/O standard input and output. '
|
|
54
54
|
+ 'The output produced by the contestant\'s program is saved. '
|
|
55
55
|
+ 'The problem editor save a single source code in C++ 17. '
|
|
56
|
-
+ 'The editor\'s source code can read judge input filepath argv[1], judge output filepath argv[2], user\'s output filepath argv[3], user\'s error filepath argv[4], user\'s log filepath argv[5], user\'s source filepath argv[6] and submission information filepath argv[7] (
|
|
56
|
+
+ 'The editor\'s source code can read judge input filepath argv[1], judge output filepath argv[2], user\'s output filepath argv[3], user\'s error filepath argv[4], user\'s log filepath argv[5], user\'s source filepath argv[6] and submission information filepath argv[7] (one value per line: organizationId, userId, userNickname, problemId, contestId, submitId, language, timestamp, runId). '
|
|
57
57
|
+ 'The resulting editor\'s executable should be "AC" or a number between 1 and 100 for partial accepted',
|
|
58
58
|
},
|
|
59
59
|
};
|
package/dist/dto/socket.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ClientId,
|
|
2
|
-
import { EcsTaskDefinitionSystemSummaryListResponseDto, EcsTaskSystemSummaryListResponseDto } from './system.js';
|
|
1
|
+
import { ClientId, InfoLogCaseStatus, ProblemVerdict, SubmissionRunStatus, TestInfo, WebSocketResponseEvent, WebSocketResponseEventKey, WebSocketSubscriptionEvent } from '../types/index.js';
|
|
3
2
|
import { UserOrganizationBasicInfoResponseDto } from './user.js';
|
|
4
3
|
export interface WebsocketSubscription {
|
|
5
4
|
event: WebSocketSubscriptionEvent;
|
|
@@ -135,22 +134,6 @@ export interface SendDataWebSocketResponseEventDto extends WebSocketResponse {
|
|
|
135
134
|
dataId: string;
|
|
136
135
|
content: any;
|
|
137
136
|
}
|
|
138
|
-
export interface SendDataEcsTaskDefinitionListWebSocketResponseEventDto extends SendDataWebSocketResponseEventDto {
|
|
139
|
-
event: WebSocketResponseEvent.SEND_DATA_ECS_TASK_DEFINITIONS_LIST;
|
|
140
|
-
content: EcsTaskDefinitionSystemSummaryListResponseDto[];
|
|
141
|
-
}
|
|
142
|
-
export interface SendDataEcsTasksListWebSocketResponseEventDto extends SendDataWebSocketResponseEventDto {
|
|
143
|
-
event: WebSocketResponseEvent.SEND_DATA_ECS_TASKS_LIST;
|
|
144
|
-
content: EcsTaskSystemSummaryListResponseDto[];
|
|
145
|
-
}
|
|
146
|
-
export interface SendDataEc2InstancesListWebSocketResponseEventDto extends SendDataWebSocketResponseEventDto {
|
|
147
|
-
event: WebSocketResponseEvent.SEND_DATA_EC2_INSTANCES_LIST;
|
|
148
|
-
content: Ec2Instance[];
|
|
149
|
-
}
|
|
150
|
-
export interface SendDataSsmSessionsListWebSocketResponseEventDto extends SendDataWebSocketResponseEventDto {
|
|
151
|
-
event: WebSocketResponseEvent.SEND_DATA_SSM_SESSIONS_LIST;
|
|
152
|
-
content: SsmSession[];
|
|
153
|
-
}
|
|
154
137
|
export interface SendDataRunCommandWebSocketResponseEventDto extends SendDataWebSocketResponseEventDto {
|
|
155
138
|
event: WebSocketResponseEvent.SEND_DATA_RUN_COMMAND;
|
|
156
139
|
content: {
|
|
@@ -213,7 +196,7 @@ export interface UserNotificationContestClarificationWebSocketResponseEventDto e
|
|
|
213
196
|
contestKey: string;
|
|
214
197
|
};
|
|
215
198
|
}
|
|
216
|
-
export type WebSocketResponseEventDto = CodeRunStatusWebSocketResponseEventDto | SubmissionRunStatusWebSocketResponseEventDto | UserMessageWebSocketResponseEventDto |
|
|
199
|
+
export type WebSocketResponseEventDto = CodeRunStatusWebSocketResponseEventDto | SubmissionRunStatusWebSocketResponseEventDto | UserMessageWebSocketResponseEventDto | ProblemCrawledWebSocketResponseEventDto | SubmissionsCrawlWebSocketResponseEventDto | ContestChangesWebSocketResponseEventDto | SendDataRunCommandWebSocketResponseEventDto | UserNotificationSubmissionWebSocketResponseEventDto | UserNotificationContestClarificationWebSocketResponseEventDto | SubmissionJudgingWebSocketResponseEventDto;
|
|
217
200
|
/**
|
|
218
201
|
* Message sent by the backend producers to the websocket SQS queue:
|
|
219
202
|
* the producer (trusted, with access to the DB) decides the Ably channels where the event is published.
|
package/dist/helpers/socket.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CodeRunStatusWebSocketResponseEventDto, ContestChangesWebSocketResponseEventDto, ProblemCrawledWebSocketResponseEventDto,
|
|
1
|
+
import { CodeRunStatusWebSocketResponseEventDto, ContestChangesWebSocketResponseEventDto, ProblemCrawledWebSocketResponseEventDto, SendDataRunCommandWebSocketResponseEventDto, SendDataWebSocketResponseEventDto, SubmissionJudgingWebSocketResponseEventDto, SubmissionRunStatusWebSocketResponseEventDto, SubmissionsCrawlWebSocketResponseEventDto, SubmissionsJudgingScope, SubscribeCodeRunStatusWebSocketEventDto, SubscribeContestChangesWebSocketEventDto, SubscribeGetDataWebSocketEventDto, SubscribeProblemCrawledWebSocketEventDto, SubscribeSubmissionRunStatusWebSocketEventDto, SubscribeSubmissionsCrawlWebSocketEventDto, SubscribeSubmissionsJudgingWebSocketEventDto, SubscribeUserNotificationWebsocketEventDto, UnsubscribeCodeRunStatusWebSocketEventDto, UnsubscribeContestChangesWebSocketEventDto, UnsubscribeGetDataWebSocketEventDto, UnsubscribeProblemCrawledWebSocketEventDto, UnsubscribeSubmissionRunStatusWebSocketEventDto, UnsubscribeSubmissionsCrawlWebSocketEventDto, UnsubscribeSubmissionsJudgingWebSocketEventDto, UnsubscribeUserNotificationWebSocketEventDto, UserMessageWebSocketResponseEventDto, UserNotificationContestClarificationWebSocketResponseEventDto, UserNotificationSubmissionWebSocketResponseEventDto, UserNotificationWebSocketResponseEventDto, WebSocketChannelsMessageDto, WebSocketResponseEventDto, WebSocketSubscribeEventDto, WebSocketUnsubscribeEventDto } from '../dto/index.js';
|
|
2
2
|
import { ClientId, WebSocketResponseEvent, WebSocketResponseEventKey } from '../types/index.js';
|
|
3
3
|
export declare const isWebsocketSubscription: (event: any) => event is WebSocketSubscribeEventDto | WebSocketUnsubscribeEventDto;
|
|
4
4
|
export declare const isSubscribeCodeRunStatusWebSocketEventDto: (event: any) => event is SubscribeCodeRunStatusWebSocketEventDto;
|
|
@@ -27,10 +27,6 @@ export declare const isSubmissionRunStatusMessageWebSocketResponseEventDto: (eve
|
|
|
27
27
|
export declare const isSubmissionJudgingWebSocketResponseEventDto: (event: any) => event is SubmissionJudgingWebSocketResponseEventDto;
|
|
28
28
|
export declare const isUserMessageWebSocketResponseEventDto: (event: any) => event is UserMessageWebSocketResponseEventDto;
|
|
29
29
|
export declare const isSendDataWebSocketResponseEventDto: (event: any) => event is SendDataWebSocketResponseEventDto;
|
|
30
|
-
export declare const isSendDataEcsTaskDefinitionListWebSocketResponseEventDto: (event: any) => event is SendDataEcsTaskDefinitionListWebSocketResponseEventDto;
|
|
31
|
-
export declare const isSendDataEc2InstancesListWebSocketResponseEventDto: (event: any) => event is SendDataEc2InstancesListWebSocketResponseEventDto;
|
|
32
|
-
export declare const isSendDataEcsTasksListWebSocketResponseEventDto: (event: any) => event is SendDataEcsTasksListWebSocketResponseEventDto;
|
|
33
|
-
export declare const isSendDataSsmSessionsListWebSocketResponseEventDto: (event: any) => event is SendDataSsmSessionsListWebSocketResponseEventDto;
|
|
34
30
|
export declare const isSendDataRunCommandWebSocketResponseEventDto: (event: any) => event is SendDataRunCommandWebSocketResponseEventDto;
|
|
35
31
|
export declare const isProblemCrawledWebSocketResponseEventDto: (event: any) => event is ProblemCrawledWebSocketResponseEventDto;
|
|
36
32
|
export declare const isSubmissionsCrawlWebSocketResponseEventDto: (event: any) => event is SubmissionsCrawlWebSocketResponseEventDto;
|
package/dist/helpers/socket.js
CHANGED
|
@@ -126,31 +126,11 @@ export const isUserMessageWebSocketResponseEventDto = (event) => {
|
|
|
126
126
|
};
|
|
127
127
|
export const isSendDataWebSocketResponseEventDto = (event) => {
|
|
128
128
|
return [
|
|
129
|
-
WebSocketResponseEvent.SEND_DATA_ECS_TASK_DEFINITIONS_LIST,
|
|
130
|
-
WebSocketResponseEvent.SEND_DATA_EC2_INSTANCES_LIST,
|
|
131
|
-
WebSocketResponseEvent.SEND_DATA_ECS_TASKS_LIST,
|
|
132
|
-
WebSocketResponseEvent.SEND_DATA_SSM_SESSIONS_LIST,
|
|
133
129
|
WebSocketResponseEvent.SEND_DATA_RUN_COMMAND,
|
|
134
130
|
].includes(event?.event)
|
|
135
131
|
&& typeof event?.dataId === 'string' && !!event.dataId
|
|
136
132
|
&& !!event?.content;
|
|
137
133
|
};
|
|
138
|
-
export const isSendDataEcsTaskDefinitionListWebSocketResponseEventDto = (event) => {
|
|
139
|
-
return isWebSocketResponseEventDto(event) && isSendDataWebSocketResponseEventDto(event)
|
|
140
|
-
&& event?.event === WebSocketResponseEvent.SEND_DATA_ECS_TASK_DEFINITIONS_LIST;
|
|
141
|
-
};
|
|
142
|
-
export const isSendDataEc2InstancesListWebSocketResponseEventDto = (event) => {
|
|
143
|
-
return isWebSocketResponseEventDto(event) && isSendDataWebSocketResponseEventDto(event)
|
|
144
|
-
&& event?.event === WebSocketResponseEvent.SEND_DATA_EC2_INSTANCES_LIST;
|
|
145
|
-
};
|
|
146
|
-
export const isSendDataEcsTasksListWebSocketResponseEventDto = (event) => {
|
|
147
|
-
return isWebSocketResponseEventDto(event) && isSendDataWebSocketResponseEventDto(event)
|
|
148
|
-
&& event?.event === WebSocketResponseEvent.SEND_DATA_ECS_TASKS_LIST;
|
|
149
|
-
};
|
|
150
|
-
export const isSendDataSsmSessionsListWebSocketResponseEventDto = (event) => {
|
|
151
|
-
return isWebSocketResponseEventDto(event) && isSendDataWebSocketResponseEventDto(event)
|
|
152
|
-
&& event?.event === WebSocketResponseEvent.SEND_DATA_SSM_SESSIONS_LIST;
|
|
153
|
-
};
|
|
154
134
|
export const isSendDataRunCommandWebSocketResponseEventDto = (event) => {
|
|
155
135
|
return isWebSocketResponseEventDto(event) && isSendDataWebSocketResponseEventDto(event)
|
|
156
136
|
&& event?.event === WebSocketResponseEvent.SEND_DATA_RUN_COMMAND;
|
package/dist/types/socket.d.ts
CHANGED
|
@@ -26,10 +26,6 @@ export declare enum WebSocketResponseEvent {
|
|
|
26
26
|
SUBMISSION_RUN_STATUS = "SUBMISSION_RUN_STATUS",
|
|
27
27
|
USER_MESSAGE = "USER_MESSAGE",
|
|
28
28
|
SEND_DATA_ = "SEND_DATA_",
|
|
29
|
-
SEND_DATA_ECS_TASK_DEFINITIONS_LIST = "SEND_DATA_ECS_TASK_DEFINITIONS_LIST",
|
|
30
|
-
SEND_DATA_ECS_TASKS_LIST = "SEND_DATA_ECS_TASKS_LIST",
|
|
31
|
-
SEND_DATA_EC2_INSTANCES_LIST = "SEND_DATA_EC2_INSTANCES_LIST",
|
|
32
|
-
SEND_DATA_SSM_SESSIONS_LIST = "SEND_DATA_SSM_SESSIONS_LIST",
|
|
33
29
|
SEND_DATA_RUN_COMMAND = "SEND_DATA_RUN_COMMAND",
|
|
34
30
|
PROBLEM_CRAWLED = "PROBLEM_CRAWLED",
|
|
35
31
|
SUBMISSIONS_CRAWL = "SUBMISSIONS_CRAWL",
|
package/dist/types/socket.js
CHANGED
|
@@ -27,10 +27,6 @@ export var WebSocketResponseEvent;
|
|
|
27
27
|
WebSocketResponseEvent["SUBMISSION_RUN_STATUS"] = "SUBMISSION_RUN_STATUS";
|
|
28
28
|
WebSocketResponseEvent["USER_MESSAGE"] = "USER_MESSAGE";
|
|
29
29
|
WebSocketResponseEvent["SEND_DATA_"] = "SEND_DATA_";
|
|
30
|
-
WebSocketResponseEvent["SEND_DATA_ECS_TASK_DEFINITIONS_LIST"] = "SEND_DATA_ECS_TASK_DEFINITIONS_LIST";
|
|
31
|
-
WebSocketResponseEvent["SEND_DATA_ECS_TASKS_LIST"] = "SEND_DATA_ECS_TASKS_LIST";
|
|
32
|
-
WebSocketResponseEvent["SEND_DATA_EC2_INSTANCES_LIST"] = "SEND_DATA_EC2_INSTANCES_LIST";
|
|
33
|
-
WebSocketResponseEvent["SEND_DATA_SSM_SESSIONS_LIST"] = "SEND_DATA_SSM_SESSIONS_LIST";
|
|
34
30
|
WebSocketResponseEvent["SEND_DATA_RUN_COMMAND"] = "SEND_DATA_RUN_COMMAND";
|
|
35
31
|
WebSocketResponseEvent["PROBLEM_CRAWLED"] = "PROBLEM_CRAWLED";
|
|
36
32
|
WebSocketResponseEvent["SUBMISSIONS_CRAWL"] = "SUBMISSIONS_CRAWL";
|
package/dist/types/system.d.ts
CHANGED
|
@@ -65,12 +65,3 @@ export type SqsProperties = {
|
|
|
65
65
|
FifoThroughputLimit: string;
|
|
66
66
|
ContentBasedDeduplication: string;
|
|
67
67
|
};
|
|
68
|
-
export type SsmSession = {
|
|
69
|
-
sessionId: string;
|
|
70
|
-
target: string;
|
|
71
|
-
status: 'Connected' | 'Connecting' | 'Disconnected' | 'Failed' | 'Terminating' | 'Terminated' | undefined;
|
|
72
|
-
startsAt: number;
|
|
73
|
-
owner: string;
|
|
74
|
-
maxSessionDuration: number;
|
|
75
|
-
raw: any;
|
|
76
|
-
};
|