@vesperjs/shared 0.9.13 → 0.9.14
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/index.d.mts +10 -13
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Ref, WritableComputedRef } from "@vue/reactivity";
|
|
2
|
-
|
|
3
2
|
//#region src/types/error/backend-error-info.d.ts
|
|
4
3
|
interface BackendErrorInfo<BER extends object> {
|
|
5
4
|
error?: BER;
|
|
@@ -9,17 +8,20 @@ interface BackendErrorInfo<BER extends object> {
|
|
|
9
8
|
//#region src/types/resource/backend-error-resource.d.ts
|
|
10
9
|
interface BackendErrorResource {
|
|
11
10
|
source?: string;
|
|
12
|
-
title
|
|
13
|
-
errors
|
|
11
|
+
title?: string;
|
|
12
|
+
errors?: string[];
|
|
14
13
|
}
|
|
15
14
|
//#endregion
|
|
15
|
+
//#region src/types/error-messages.d.ts
|
|
16
|
+
type ErrorMessages<T extends string> = Partial<Record<T, string[]>>;
|
|
17
|
+
//#endregion
|
|
16
18
|
//#region src/types/resource/errors-resource.d.ts
|
|
17
19
|
interface ErrorsResource<T> {
|
|
18
20
|
errors: T;
|
|
19
21
|
}
|
|
20
22
|
//#endregion
|
|
21
|
-
//#region src/types/
|
|
22
|
-
type
|
|
23
|
+
//#region src/types/resource/backend-errors-resource.d.ts
|
|
24
|
+
type BackendErrorsResource<T extends object = BackendErrorResource> = ErrorsResource<ErrorMessages<string>> | T;
|
|
23
25
|
//#endregion
|
|
24
26
|
//#region src/types/flash.d.ts
|
|
25
27
|
interface Flash {
|
|
@@ -48,15 +50,10 @@ declare const useDate: (fmtDate?: string, locale?: string) => {
|
|
|
48
50
|
//#endregion
|
|
49
51
|
//#region src/composables/use-entity.d.ts
|
|
50
52
|
declare const useEntity: <M extends object, R extends object = M>() => {
|
|
51
|
-
create: ({
|
|
52
|
-
from
|
|
53
|
-
}: {
|
|
53
|
+
create: ({ from }: {
|
|
54
54
|
from: M | R;
|
|
55
55
|
}) => M;
|
|
56
|
-
copy: ({
|
|
57
|
-
from,
|
|
58
|
-
to
|
|
59
|
-
}: {
|
|
56
|
+
copy: ({ from, to }: {
|
|
60
57
|
from: M | R;
|
|
61
58
|
to: M;
|
|
62
59
|
}) => void;
|
|
@@ -68,4 +65,4 @@ declare const useFlash: () => {
|
|
|
68
65
|
clearFlash: () => void;
|
|
69
66
|
};
|
|
70
67
|
//#endregion
|
|
71
|
-
export { type BackendErrorInfo, type BackendErrorResource, type ErrorMessages, type ErrorsResource, type Flash, useBackendErrorInfo, useDate, useEntity, useExternalErrors, useFlash };
|
|
68
|
+
export { type BackendErrorInfo, type BackendErrorResource, type BackendErrorsResource, type ErrorMessages, type ErrorsResource, type Flash, useBackendErrorInfo, useDate, useEntity, useExternalErrors, useFlash };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vesperjs/shared",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.14",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Nuxt",
|
|
6
6
|
"vue.js"
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@eslint/js": "^10.0.1",
|
|
27
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
28
|
-
"@typescript-eslint/parser": "^8.
|
|
27
|
+
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
28
|
+
"@typescript-eslint/parser": "^8.63.0",
|
|
29
29
|
"@vue/eslint-config-typescript": "^14.9.0",
|
|
30
|
-
"eslint": "^10.
|
|
30
|
+
"eslint": "^10.7.0",
|
|
31
31
|
"eslint-plugin-vue": "^10.9.2",
|
|
32
|
-
"oxfmt": "^0.
|
|
33
|
-
"tsdown": "^0.22.
|
|
32
|
+
"oxfmt": "^0.58.0",
|
|
33
|
+
"tsdown": "^0.22.5",
|
|
34
34
|
"typescript": "^6.0.3",
|
|
35
|
-
"typescript-eslint": "^8.
|
|
35
|
+
"typescript-eslint": "^8.63.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@vue/reactivity": "^3.5.39 || ^3.6.0-beta.17"
|