@milaboratories/pl-model-common 1.16.1 → 1.16.2
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/errors.d.ts +4 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +83 -72
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/errors.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-common",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
4
4
|
"description": "Platforma SDK Model",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"typescript": "~5.6.3",
|
|
27
27
|
"vite": "^6.3.5",
|
|
28
28
|
"vitest": "^2.1.9",
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
29
|
+
"@milaboratories/build-configs": "1.0.4",
|
|
30
|
+
"@platforma-sdk/eslint-config": "1.0.3"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"type-check": "tsc --noEmit --composite false",
|
package/src/errors.ts
CHANGED
|
@@ -28,6 +28,14 @@ export function isAggregateError(error: unknown): error is AggregateError {
|
|
|
28
28
|
return error instanceof Error && error.name === 'AggregateError';
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export class PFrameError extends Error {
|
|
32
|
+
name = 'PFrameError';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function isPFrameError(error: unknown): error is PFrameError {
|
|
36
|
+
return error instanceof Error && error.name === 'PFrameError';
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
function stringifyValue(value: unknown): string {
|
|
32
40
|
if (typeof value === 'string') {
|
|
33
41
|
return `String value was thrown: ${value}`;
|