@nosana/types 0.1.8 → 0.1.13
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.
- package/dist/Jobs/Diagnostics/index.d.ts +2 -0
- package/dist/Jobs/Diagnostics/index.js +3 -0
- package/dist/Jobs/Diagnostics/index.js.map +1 -0
- package/dist/Jobs/Diagnostics/reason.d.ts +5 -0
- package/dist/Jobs/Diagnostics/reason.js +2 -0
- package/dist/Jobs/Diagnostics/reason.js.map +1 -0
- package/dist/Jobs/Diagnostics/state.d.ts +18 -0
- package/dist/Jobs/Diagnostics/state.js +2 -0
- package/dist/Jobs/Diagnostics/state.js.map +1 -0
- package/dist/Jobs/Flows/index.d.ts +6 -0
- package/dist/Jobs/JobDefinition/args/index.d.ts +3 -0
- package/dist/Jobs/JobDefinition/args/index.js +1 -0
- package/dist/Jobs/JobDefinition/args/index.js.map +1 -1
- package/dist/Jobs/JobDefinition/args/restart_policy.d.ts +10 -0
- package/dist/Jobs/JobDefinition/args/restart_policy.js +7 -0
- package/dist/Jobs/JobDefinition/args/restart_policy.js.map +1 -0
- package/dist/Jobs/JobDefinition/meta/index.d.ts +1 -1
- package/dist/Jobs/Logs/index.d.ts +1 -0
- package/dist/Jobs/index.d.ts +1 -0
- package/dist/Jobs/index.js +233 -155
- package/dist/Jobs/index.js.map +1 -1
- package/dist/Schemas/api.d.ts +284 -140
- package/dist/Schemas/job.js +185 -3
- package/dist/Schemas/job.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Jobs/Diagnostics/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reason.js","sourceRoot":"","sources":["../../../src/Jobs/Diagnostics/reason.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type State = {
|
|
2
|
+
Status: string;
|
|
3
|
+
Running: boolean;
|
|
4
|
+
Paused: boolean;
|
|
5
|
+
Restarting: boolean;
|
|
6
|
+
OOMKilled: boolean;
|
|
7
|
+
Dead: boolean;
|
|
8
|
+
ExitCode: number;
|
|
9
|
+
Error: string;
|
|
10
|
+
StartedAt: string;
|
|
11
|
+
FinishedAt: string;
|
|
12
|
+
Health: {
|
|
13
|
+
Status: string;
|
|
14
|
+
FailingStreak: number;
|
|
15
|
+
Log: string | null;
|
|
16
|
+
};
|
|
17
|
+
RestartCount: number;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/Jobs/Diagnostics/state.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Reason } from "../Diagnostics/reason.js";
|
|
2
|
+
import { State } from "../Diagnostics/state.js";
|
|
1
3
|
import { JobDefinition } from "../JobDefinition/index.js";
|
|
2
4
|
import { Log } from "../Logs/index.js";
|
|
3
5
|
export type FlowState = {
|
|
@@ -40,4 +42,8 @@ export type OpState = {
|
|
|
40
42
|
results?: {
|
|
41
43
|
[key: string]: string | string[];
|
|
42
44
|
};
|
|
45
|
+
diagnostics: {
|
|
46
|
+
reason: Reason;
|
|
47
|
+
state?: State;
|
|
48
|
+
};
|
|
43
49
|
};
|
|
@@ -7,6 +7,7 @@ import type { GPU } from "./gpu.js";
|
|
|
7
7
|
import type { Image } from "./image.js";
|
|
8
8
|
import type { Private } from "./private.js";
|
|
9
9
|
import type { Resources } from "./resources.js";
|
|
10
|
+
import { RestartPolicy } from "./restart_policy.js";
|
|
10
11
|
import type { Volume } from "./volumes.js";
|
|
11
12
|
import type { WorkDir } from "./work_dir.js";
|
|
12
13
|
export * from "./aliases.js";
|
|
@@ -19,6 +20,7 @@ export * from "./image.js";
|
|
|
19
20
|
export * from "./literals.js";
|
|
20
21
|
export * from "./private.js";
|
|
21
22
|
export * from "./resources.js";
|
|
23
|
+
export * from "./restart_policy.js";
|
|
22
24
|
export * from "./variables.js";
|
|
23
25
|
export * from "./volumes.js";
|
|
24
26
|
export * from "./work_dir.js";
|
|
@@ -32,6 +34,7 @@ export interface ContainerRun {
|
|
|
32
34
|
work_dir?: WorkDir;
|
|
33
35
|
entrypoint?: CMDString | CMDArray;
|
|
34
36
|
env?: Env;
|
|
37
|
+
restart_policy?: RestartPolicy;
|
|
35
38
|
private?: Private;
|
|
36
39
|
resources?: Resources;
|
|
37
40
|
authentication?: Authentication;
|
|
@@ -8,6 +8,7 @@ export * from "./image.js";
|
|
|
8
8
|
export * from "./literals.js";
|
|
9
9
|
export * from "./private.js";
|
|
10
10
|
export * from "./resources.js";
|
|
11
|
+
export * from "./restart_policy.js";
|
|
11
12
|
export * from "./variables.js";
|
|
12
13
|
export * from "./volumes.js";
|
|
13
14
|
export * from "./work_dir.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const RestartPolicy: {
|
|
2
|
+
readonly No: "no";
|
|
3
|
+
readonly Always: "always";
|
|
4
|
+
readonly UnlessStopped: "unless-stopped";
|
|
5
|
+
readonly OnFailure: "on-failure";
|
|
6
|
+
};
|
|
7
|
+
export type RestartPolicy = typeof RestartPolicy[keyof typeof RestartPolicy] | {
|
|
8
|
+
policy: typeof RestartPolicy.OnFailure;
|
|
9
|
+
restart_tries?: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restart_policy.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/args/restart_policy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,QAAQ;IAChB,aAAa,EAAE,gBAAgB;IAC/B,SAAS,EAAE,YAAY;CACf,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type Meta = {
|
|
2
2
|
trigger?: string;
|
|
3
3
|
system_resources?: Record<string, string | number>;
|
|
4
|
-
[key: string]: string | number | Record<string, string | number> | undefined;
|
|
4
|
+
[key: string]: string | number | Record<string, string | number | Array<string | number>> | Array<string | number> | undefined;
|
|
5
5
|
};
|
package/dist/Jobs/index.d.ts
CHANGED