@likec4/core 0.57.1 → 0.58.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.
@@ -20,4 +20,5 @@ export interface Relation {
20
20
  readonly line?: RelationshipLineType;
21
21
  readonly head?: RelationshipArrowType;
22
22
  readonly tail?: RelationshipArrowType;
23
+ readonly links?: NonEmptyArray<string>;
23
24
  }
@@ -1,4 +1,4 @@
1
1
  import type { NonEmptyArray } from '../types';
2
2
  export { hasAtLeast } from 'remeda';
3
3
  export declare function isString(value: unknown): value is string;
4
- export declare function isNonEmptyArray<A>(arr: ArrayLike<A>): arr is NonEmptyArray<A>;
4
+ export declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEmptyArray<A>;
@@ -16,5 +16,5 @@ function isString(value) {
16
16
  return value != null && typeof value === "string";
17
17
  }
18
18
  function isNonEmptyArray(arr) {
19
- return arr.length > 0;
19
+ return !!arr && Array.isArray(arr) && arr.length > 0;
20
20
  }
@@ -20,4 +20,5 @@ export interface Relation {
20
20
  readonly line?: RelationshipLineType;
21
21
  readonly head?: RelationshipArrowType;
22
22
  readonly tail?: RelationshipArrowType;
23
+ readonly links?: NonEmptyArray<string>;
23
24
  }
@@ -1,4 +1,4 @@
1
1
  import type { NonEmptyArray } from '../types';
2
2
  export { hasAtLeast } from 'remeda';
3
3
  export declare function isString(value: unknown): value is string;
4
- export declare function isNonEmptyArray<A>(arr: ArrayLike<A>): arr is NonEmptyArray<A>;
4
+ export declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEmptyArray<A>;
@@ -3,5 +3,5 @@ export function isString(value) {
3
3
  return value != null && typeof value === "string";
4
4
  }
5
5
  export function isNonEmptyArray(arr) {
6
- return arr.length > 0;
6
+ return !!arr && Array.isArray(arr) && arr.length > 0;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/core",
3
- "version": "0.57.1",
3
+ "version": "0.58.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -86,7 +86,7 @@
86
86
  "execa": "^8.0.1",
87
87
  "typescript": "^5.3.3",
88
88
  "unbuild": "^2.0.0",
89
- "vitest": "^1.2.2"
89
+ "vitest": "^1.3.1"
90
90
  },
91
91
  "packageManager": "yarn@4.1.0",
92
92
  "volta": {