@milaboratories/pl-model-common 1.22.0 → 1.23.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.
@@ -1,17 +1,17 @@
1
1
  import type { ErrorLike } from '@milaboratories/pl-error-like';
2
2
  /** Use this as constraint instead of `Function` */
3
3
  export type AnyFunction = (...args: any[]) => any;
4
- /** Value or errors */
5
- export type ValueOrErrors<T> = {
4
+ export type OutputWithStatus<T> = {
6
5
  ok: true;
7
6
  value: T;
7
+ stable: boolean;
8
8
  } | {
9
9
  ok: false;
10
10
  errors: ErrorLike[];
11
11
  moreErrors: boolean;
12
12
  };
13
13
  /** Base type for block outputs */
14
- export type BlockOutputsBase = Record<string, ValueOrErrors<unknown>>;
14
+ export type BlockOutputsBase = Record<string, OutputWithStatus<unknown>>;
15
15
  export type ListOptionBase<T = unknown> = {
16
16
  label: string;
17
17
  description?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"common_types.d.ts","sourceRoot":"","sources":["../src/common_types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,mDAAmD;AAEnD,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAElD,sBAAsB;AACtB,MAAM,MAAM,aAAa,CAAC,CAAC,IACvB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GACtB;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,SAAS,EAAE,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC;AAE5D,kCAAkC;AAClC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;AAEtE,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
1
+ {"version":3,"file":"common_types.d.ts","sourceRoot":"","sources":["../src/common_types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,mDAAmD;AAEnD,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAElD,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAC1B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACvC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,SAAS,EAAE,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC;AAE5D,kCAAkC;AAClC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;AAEzE,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-common",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
4
4
  "description": "Platforma SDK Model",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -26,10 +26,10 @@
26
26
  "typescript": "~5.6.3",
27
27
  "vitest": "^4.0.16",
28
28
  "@vitest/coverage-istanbul": "^4.0.16",
29
- "@milaboratories/build-configs": "1.2.1",
30
- "@milaboratories/ts-configs": "1.2.0",
29
+ "@milaboratories/ts-builder": "1.2.1",
31
30
  "@milaboratories/eslint-config": "1.0.5",
32
- "@milaboratories/ts-builder": "1.2.1"
31
+ "@milaboratories/ts-configs": "1.2.0",
32
+ "@milaboratories/build-configs": "1.2.1"
33
33
  },
34
34
  "scripts": {
35
35
  "type-check": "ts-builder types --target node",
@@ -4,13 +4,12 @@ import type { ErrorLike } from '@milaboratories/pl-error-like';
4
4
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
5
  export type AnyFunction = (...args: any[]) => any;
6
6
 
7
- /** Value or errors */
8
- export type ValueOrErrors<T> =
9
- | { ok: true; value: T }
7
+ export type OutputWithStatus<T> =
8
+ | { ok: true; value: T; stable: boolean }
10
9
  | { ok: false; errors: ErrorLike[]; moreErrors: boolean };
11
10
 
12
11
  /** Base type for block outputs */
13
- export type BlockOutputsBase = Record<string, ValueOrErrors<unknown>>;
12
+ export type BlockOutputsBase = Record<string, OutputWithStatus<unknown>>;
14
13
 
15
14
  export type ListOptionBase<T = unknown> = {
16
15
  label: string;