@nosana/types 2.2.15 → 2.2.19

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.
Files changed (43) hide show
  1. package/dist/Jobs/JobDefinition/args/index.d.ts +17 -0
  2. package/dist/Jobs/JobDefinition/args/index.d.ts.map +1 -1
  3. package/dist/Jobs/JobDefinition/args/index.js +2365 -0
  4. package/dist/Jobs/JobDefinition/args/index.js.map +1 -1
  5. package/dist/Jobs/JobDefinition/execution/index.d.ts +2 -0
  6. package/dist/Jobs/JobDefinition/execution/index.d.ts.map +1 -1
  7. package/dist/Jobs/JobDefinition/execution/index.js +136 -1
  8. package/dist/Jobs/JobDefinition/execution/index.js.map +1 -1
  9. package/dist/Jobs/JobDefinition/global/index.d.ts +2 -0
  10. package/dist/Jobs/JobDefinition/global/index.d.ts.map +1 -1
  11. package/dist/Jobs/JobDefinition/global/index.js +127 -1
  12. package/dist/Jobs/JobDefinition/global/index.js.map +1 -1
  13. package/dist/Jobs/JobDefinition/index.d.ts +3 -0
  14. package/dist/Jobs/JobDefinition/index.d.ts.map +1 -1
  15. package/dist/Jobs/JobDefinition/index.js +1 -0
  16. package/dist/Jobs/JobDefinition/index.js.map +1 -1
  17. package/dist/Jobs/JobDefinition/logistics/index.d.ts +2 -0
  18. package/dist/Jobs/JobDefinition/logistics/index.d.ts.map +1 -1
  19. package/dist/Jobs/JobDefinition/logistics/index.js +133 -0
  20. package/dist/Jobs/JobDefinition/logistics/index.js.map +1 -1
  21. package/dist/Jobs/JobDefinition/meta/index.d.ts +2 -0
  22. package/dist/Jobs/JobDefinition/meta/index.d.ts.map +1 -1
  23. package/dist/Jobs/JobDefinition/meta/index.js +118 -1
  24. package/dist/Jobs/JobDefinition/meta/index.js.map +1 -1
  25. package/dist/Jobs/JobDefinition/operations/index.d.ts +13 -2
  26. package/dist/Jobs/JobDefinition/operations/index.d.ts.map +1 -1
  27. package/dist/Jobs/JobDefinition/operations/index.js +2663 -2
  28. package/dist/Jobs/JobDefinition/operations/index.js.map +1 -1
  29. package/dist/Jobs/JobDefinition/operations/rules.d.ts +11 -0
  30. package/dist/Jobs/JobDefinition/operations/rules.d.ts.map +1 -0
  31. package/dist/Jobs/JobDefinition/operations/rules.js +20 -0
  32. package/dist/Jobs/JobDefinition/operations/rules.js.map +1 -0
  33. package/dist/Jobs/JobDefinition/ssh/index.d.ts +6 -0
  34. package/dist/Jobs/JobDefinition/ssh/index.d.ts.map +1 -0
  35. package/dist/Jobs/JobDefinition/ssh/index.js +68 -0
  36. package/dist/Jobs/JobDefinition/ssh/index.js.map +1 -0
  37. package/dist/Jobs/index.d.ts +3 -19
  38. package/dist/Jobs/index.d.ts.map +1 -1
  39. package/dist/Jobs/index.js +207 -164
  40. package/dist/Jobs/index.js.map +1 -1
  41. package/dist/Schemas/job.js +15 -0
  42. package/dist/Schemas/job.js.map +1 -1
  43. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/operations/index.ts"],"names":[],"mappings":"AAcA,sDAAsD;AACtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,qDAA8D,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/operations/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAMtD,cAAc,YAAY,CAAC;AAsC3B,MAAM,CAAC,MAAM,iBAAiB;;;;;;;w4BA5CpB,EAAG;;;;;;;;;;4CAU6B,CAAE,SAC5C,CACA;;;;;QAKoB,CAAC;;;;;;;;;YAgBN,CAAC;;QACd,CAAC;IAEI,CAAC;;;;;QAKE,CAAC;IAAW,CAAC;;AAGC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
3
+ *
4
+ * This module MUST NOT import `typia` or call any typia validator factory.
5
+ * It is imported directly by tests (via `new Function`) so that asserting on a
6
+ * rule never triggers the typia transform — which is only applied by the `tsc`
7
+ * build, not by vitest.
8
+ */
9
+ export declare const OPERATION_ID_VALIDATE: "typeof $input === \"string\" && !$input.includes(\" \")";
10
+ export declare const OPS_UNIQUE_BY_ID_VALIDATE: "Array.isArray($input) && (()=>{\n const seen = new Set();\n for (const it of $input) {\n if (typeof it?.id !== \"string\") return false;\n if (seen.has(it.id)) return false;\n seen.add(it.id);\n }\n return true;\n })()";
11
+ //# sourceMappingURL=rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/operations/rules.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,eAAO,MAAM,qBAAqB,2DAC8B,CAAC;AAEjE,eAAO,MAAM,yBAAyB,0PAQtB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Predicate strings consumed by typia tag validators.
3
+ *
4
+ * This module MUST NOT import `typia` or call any typia validator factory.
5
+ * It is imported directly by tests (via `new Function`) so that asserting on a
6
+ * rule never triggers the typia transform — which is only applied by the `tsc`
7
+ * build, not by vitest.
8
+ */
9
+ // Operation ID – mirrors @nosana/sdk/src/types/job.ts
10
+ export const OPERATION_ID_VALIDATE = `typeof $input === "string" && !$input.includes(" ")`;
11
+ export const OPS_UNIQUE_BY_ID_VALIDATE = `Array.isArray($input) && (()=>{
12
+ const seen = new Set();
13
+ for (const it of $input) {
14
+ if (typeof it?.id !== "string") return false;
15
+ if (seen.has(it.id)) return false;
16
+ seen.add(it.id);
17
+ }
18
+ return true;
19
+ })()`;
20
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/operations/rules.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,sDAAsD;AACtD,MAAM,CAAC,MAAM,qBAAqB,GAChC,qDAA8D,CAAC;AAEjE,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;OAQzB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type IValidation } from 'typia';
2
+ export type SSH = {
3
+ public_keys?: Array<string>;
4
+ };
5
+ export declare const validateSSH: (input: unknown) => IValidation<SSH>;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/ssh/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAEhD,MAAM,MAAM,GAAG,GAAG;IAChB,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,WAAW,CAAC,GAAG,CAC1B,CAAC"}
@@ -0,0 +1,68 @@
1
+ import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
2
+ import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js";
3
+ import * as __typia_transform__createStandardSchema from "typia/lib/internal/_createStandardSchema.js";
4
+ import typia from 'typia';
5
+ export const validateSSH = (() => { const _io0 = (input, _exceptionable = true) => (undefined === input.public_keys || Array.isArray(input.public_keys) && input.public_keys.every((elem, _index1) => "string" === typeof elem)) && (0 === Object.keys(input).length || Object.keys(input).every(key => {
6
+ if (["public_keys"].some(prop => key === prop))
7
+ return true;
8
+ const value = input[key];
9
+ if (undefined === value)
10
+ return true;
11
+ return false;
12
+ })); const _vo0 = (input, _path, _exceptionable = true) => [undefined === input.public_keys || (Array.isArray(input.public_keys) || _report(_exceptionable, {
13
+ path: _path + ".public_keys",
14
+ expected: "(Array<string> | undefined)",
15
+ value: input.public_keys
16
+ })) && input.public_keys.map((elem, _index2) => "string" === typeof elem || _report(_exceptionable, {
17
+ path: _path + ".public_keys[" + _index2 + "]",
18
+ expected: "string",
19
+ value: elem
20
+ })).every(flag => flag) || _report(_exceptionable, {
21
+ path: _path + ".public_keys",
22
+ expected: "(Array<string> | undefined)",
23
+ value: input.public_keys
24
+ }), 0 === Object.keys(input).length || (false === _exceptionable || Object.keys(input).map(key => {
25
+ if (["public_keys"].some(prop => key === prop))
26
+ return true;
27
+ const value = input[key];
28
+ if (undefined === value)
29
+ return true;
30
+ return _report(_exceptionable, {
31
+ path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
32
+ expected: "undefined",
33
+ value: value,
34
+ description: [
35
+ `The property \`${key}\` is not defined in the object type.`,
36
+ "",
37
+ "Please remove the property next time."
38
+ ].join("\n")
39
+ });
40
+ }).every(flag => flag))].every(flag => flag); const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input, true); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
41
+ if (false === __is(input)) {
42
+ errors = [];
43
+ _report = __typia_transform__validateReport._validateReport(errors);
44
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || _report(true, {
45
+ path: _path + "",
46
+ expected: "SSH",
47
+ value: input
48
+ })) && _vo0(input, _path + "", true) || _report(true, {
49
+ path: _path + "",
50
+ expected: "SSH",
51
+ value: input
52
+ }))(input, "$input", true);
53
+ const success = 0 === errors.length;
54
+ return success ? {
55
+ success,
56
+ data: input
57
+ } : {
58
+ success,
59
+ errors,
60
+ data: input
61
+ };
62
+ }
63
+ return {
64
+ success: true,
65
+ data: input
66
+ };
67
+ }); })();
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Jobs/JobDefinition/ssh/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAMhD,MAAM,CAAC,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QACW,CAAC"}
@@ -1,28 +1,12 @@
1
- import { type IValidation, tags } from "typia";
1
+ import { type IValidation } from "typia";
2
2
  import { JobDefinition } from "./JobDefinition/index.js";
3
+ import type { UniqueById as OpsUniqueById } from "./JobDefinition/operations/index.js";
3
4
  export * from "./Diagnostics/index.js";
4
5
  export * from "./Flows/index.js";
5
6
  export * from "./JobDefinition/index.js";
6
7
  export * from "./Logs/index.js";
7
- type UniqueById = tags.TagBase<{
8
- kind: 'uniqueBy';
9
- target: 'array';
10
- value: 'id';
11
- validate: `
12
- Array.isArray($input) && (()=>{
13
- const seen = new Set();
14
- for (const it of $input) {
15
- if (typeof it?.id !== "string") return false;
16
- if (seen.has(it.id)) return false;
17
- seen.add(it.id);
18
- }
19
- return true;
20
- })()
21
- `;
22
- message: 'ops[*].id must be unique';
23
- }>;
24
8
  type JobDefinitionWithRule = Omit<JobDefinition, 'ops'> & {
25
- ops: JobDefinition['ops'] & UniqueById;
9
+ ops: JobDefinition['ops'] & OpsUniqueById;
26
10
  };
27
11
  export declare const validateJobDefinition: (input: unknown) => IValidation<JobDefinitionWithRule>;
28
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Jobs/index.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,WAAW,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAE/B,KAAK,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,IAAI,CAAC;I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