code-share-types 0.8.2 → 0.10.0

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.
@@ -17,13 +17,13 @@ declare const LanguageExecutorDefinitionSchema: z.ZodObject<{
17
17
  export type LanguageExecutorDefinition = z.infer<typeof LanguageExecutorDefinitionSchema>;
18
18
  export { LanguageExecutorDefinitionSchema };
19
19
  declare const LANGUAGE_EXECUTOR_DEFINITION_TEST_STATUS: {
20
- readonly waiting: "WAITING";
20
+ readonly pending: "PENDING";
21
21
  readonly requested: "REQUESTED";
22
22
  readonly passed: "PASSED";
23
23
  readonly failed: "FAILED";
24
24
  };
25
25
  declare const LanguageExecutorDefinitionTestStatusSchema: z.ZodEnum<{
26
- WAITING: "WAITING";
26
+ PENDING: "PENDING";
27
27
  REQUESTED: "REQUESTED";
28
28
  PASSED: "PASSED";
29
29
  FAILED: "FAILED";
@@ -36,7 +36,7 @@ declare const LanguageExecutorDefinitionTestStatusMapSchema: z.ZodArray<z.ZodTup
36
36
  language: z.ZodString;
37
37
  version: z.ZodString;
38
38
  }, z.core.$strip>, z.ZodEnum<{
39
- WAITING: "WAITING";
39
+ PENDING: "PENDING";
40
40
  REQUESTED: "REQUESTED";
41
41
  PASSED: "PASSED";
42
42
  FAILED: "FAILED";
package/dist/Language.js CHANGED
@@ -17,7 +17,7 @@ const LanguageExecutorDefinitionSchema = z.object({
17
17
  });
18
18
  export { LanguageExecutorDefinitionSchema };
19
19
  const LANGUAGE_EXECUTOR_DEFINITION_TEST_STATUS = {
20
- waiting: "WAITING",
20
+ pending: "PENDING",
21
21
  requested: "REQUESTED",
22
22
  passed: "PASSED",
23
23
  failed: "FAILED",
@@ -10,6 +10,9 @@ declare const CodeExecutionResultSchema: z.ZodUnion<readonly [z.ZodObject<{
10
10
  }, z.core.$strip>, z.ZodObject<{
11
11
  status: z.ZodLiteral<"TIMEOUT">;
12
12
  result: z.ZodUndefined;
13
+ }, z.core.$strip>, z.ZodObject<{
14
+ status: z.ZodLiteral<"UNKNOWN">;
15
+ result: z.ZodUndefined;
13
16
  }, z.core.$strip>]>;
14
17
  type CodeExecutionResult = z.infer<typeof CodeExecutionResultSchema>;
15
18
  export type { CodeExecutionResult };
@@ -7,6 +7,9 @@ const CodeExecutionResultSchema = z.union([
7
7
  z.object({
8
8
  status: z.literal("TIMEOUT"), result: z.undefined(),
9
9
  }),
10
+ z.object({
11
+ status: z.literal("UNKNOWN"), result: z.undefined(),
12
+ }),
10
13
  ]).openapi({
11
14
  example: {
12
15
  status: "SUCCESS",
@@ -8,6 +8,33 @@ declare const CodeExecutionStatisticsSchema: z.ZodObject<{
8
8
  type CodeExecutionStatistics = z.infer<typeof CodeExecutionStatisticsSchema>;
9
9
  export type { CodeExecutionStatistics };
10
10
  export { CodeExecutionStatisticsSchema };
11
+ declare const EXECUTOR_STATUS: {
12
+ readonly install_waiting: "INSTALL_UNINITIALISED";
13
+ readonly install_failed: "INSTALL_FAILED";
14
+ readonly install_inprogress: "INSTALL_INPROGRESS";
15
+ readonly install_requested: "INSTALL_REQUESTED";
16
+ readonly tests_waiting: "TESTS_WAITING";
17
+ readonly tests_failed: "TESTS_FAILED";
18
+ readonly tests_inprogress: "TESTS_INPROGRESS";
19
+ readonly tests_pending: "TESTS_PENDING";
20
+ readonly tests_passed: "TESTS_PASSED";
21
+ readonly unknown: "UNKNOWN";
22
+ };
23
+ declare const ExecutorStatusSchema: z.ZodEnum<{
24
+ INSTALL_UNINITIALISED: "INSTALL_UNINITIALISED";
25
+ INSTALL_FAILED: "INSTALL_FAILED";
26
+ INSTALL_INPROGRESS: "INSTALL_INPROGRESS";
27
+ INSTALL_REQUESTED: "INSTALL_REQUESTED";
28
+ TESTS_WAITING: "TESTS_WAITING";
29
+ TESTS_FAILED: "TESTS_FAILED";
30
+ TESTS_INPROGRESS: "TESTS_INPROGRESS";
31
+ TESTS_PENDING: "TESTS_PENDING";
32
+ TESTS_PASSED: "TESTS_PASSED";
33
+ UNKNOWN: "UNKNOWN";
34
+ }>;
35
+ type ExecutorStatus = z.infer<typeof ExecutorStatusSchema>;
36
+ export type { ExecutorStatus };
37
+ export { EXECUTOR_STATUS, ExecutorStatusSchema };
11
38
  declare const ExecutorInformationSchema: z.ZodObject<{
12
39
  socket_id: z.ZodString;
13
40
  types_version_compatible: z.ZodBoolean;
@@ -25,12 +52,24 @@ declare const ExecutorInformationSchema: z.ZodObject<{
25
52
  language: z.ZodString;
26
53
  version: z.ZodString;
27
54
  }, z.core.$strip>, z.ZodEnum<{
28
- WAITING: "WAITING";
55
+ PENDING: "PENDING";
29
56
  REQUESTED: "REQUESTED";
30
57
  PASSED: "PASSED";
31
58
  FAILED: "FAILED";
32
59
  }>], null>>;
33
- languages_initialised: z.ZodBoolean;
60
+ executor_status: z.ZodEnum<{
61
+ INSTALL_UNINITIALISED: "INSTALL_UNINITIALISED";
62
+ INSTALL_FAILED: "INSTALL_FAILED";
63
+ INSTALL_INPROGRESS: "INSTALL_INPROGRESS";
64
+ INSTALL_REQUESTED: "INSTALL_REQUESTED";
65
+ TESTS_WAITING: "TESTS_WAITING";
66
+ TESTS_FAILED: "TESTS_FAILED";
67
+ TESTS_INPROGRESS: "TESTS_INPROGRESS";
68
+ TESTS_PENDING: "TESTS_PENDING";
69
+ TESTS_PASSED: "TESTS_PASSED";
70
+ UNKNOWN: "UNKNOWN";
71
+ }>;
72
+ executor_ready: z.ZodBoolean;
34
73
  execution_statistics: z.ZodObject<{
35
74
  global: z.ZodObject<{
36
75
  total: z.ZodNumber;
@@ -66,12 +105,24 @@ declare const ExecutorInformationListSchema: z.ZodArray<z.ZodObject<{
66
105
  language: z.ZodString;
67
106
  version: z.ZodString;
68
107
  }, z.core.$strip>, z.ZodEnum<{
69
- WAITING: "WAITING";
108
+ PENDING: "PENDING";
70
109
  REQUESTED: "REQUESTED";
71
110
  PASSED: "PASSED";
72
111
  FAILED: "FAILED";
73
112
  }>], null>>;
74
- languages_initialised: z.ZodBoolean;
113
+ executor_status: z.ZodEnum<{
114
+ INSTALL_UNINITIALISED: "INSTALL_UNINITIALISED";
115
+ INSTALL_FAILED: "INSTALL_FAILED";
116
+ INSTALL_INPROGRESS: "INSTALL_INPROGRESS";
117
+ INSTALL_REQUESTED: "INSTALL_REQUESTED";
118
+ TESTS_WAITING: "TESTS_WAITING";
119
+ TESTS_FAILED: "TESTS_FAILED";
120
+ TESTS_INPROGRESS: "TESTS_INPROGRESS";
121
+ TESTS_PENDING: "TESTS_PENDING";
122
+ TESTS_PASSED: "TESTS_PASSED";
123
+ UNKNOWN: "UNKNOWN";
124
+ }>;
125
+ executor_ready: z.ZodBoolean;
75
126
  execution_statistics: z.ZodObject<{
76
127
  global: z.ZodObject<{
77
128
  total: z.ZodNumber;
@@ -8,12 +8,27 @@ const CodeExecutionStatisticsSchema = z.object({
8
8
  max_ms: z.number(),
9
9
  });
10
10
  export { CodeExecutionStatisticsSchema };
11
+ const EXECUTOR_STATUS = {
12
+ install_waiting: 'INSTALL_UNINITIALISED',
13
+ install_failed: 'INSTALL_FAILED',
14
+ install_inprogress: 'INSTALL_INPROGRESS',
15
+ install_requested: 'INSTALL_REQUESTED',
16
+ tests_waiting: 'TESTS_WAITING',
17
+ tests_failed: 'TESTS_FAILED',
18
+ tests_inprogress: 'TESTS_INPROGRESS',
19
+ tests_pending: 'TESTS_PENDING',
20
+ tests_passed: 'TESTS_PASSED',
21
+ unknown: 'UNKNOWN',
22
+ };
23
+ const ExecutorStatusSchema = z.enum(Object.values(EXECUTOR_STATUS));
24
+ export { EXECUTOR_STATUS, ExecutorStatusSchema };
11
25
  const ExecutorInformationSchema = z.object({
12
26
  socket_id: z.string(),
13
27
  types_version_compatible: z.boolean(),
14
28
  package_install_statuses: PackageInstallStatusMapSchema,
15
29
  language_test_statuses: LanguageExecutorDefinitionTestStatusMapSchema,
16
- languages_initialised: z.boolean(),
30
+ executor_status: ExecutorStatusSchema,
31
+ executor_ready: z.boolean(),
17
32
  execution_statistics: z.object({
18
33
  global: CodeExecutionStatisticsSchema,
19
34
  language_stats: z.array(z.tuple([z.string(), CodeExecutionStatisticsSchema])),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-share-types",
3
- "version": "0.8.2",
3
+ "version": "0.10.0",
4
4
  "files": [
5
5
  "/dist"
6
6
  ],