@mono-lit/utility 0.0.1 → 0.0.3
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/LICENSE.md +54 -54
- package/README.md +156 -156
- package/dist/{app-roots-BJsIxzjk.d.ts → app-roots-DK41xMWj.d.ts} +1 -2
- package/dist/config-node.d.ts +134 -188
- package/dist/config-node.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/{create-config-D3m6xTaQ.d.ts → create-config-B8IhX4ht.d.ts} +5 -3
- package/dist/fetching.d.ts +51 -46
- package/dist/fetching.js +163 -15
- package/dist/{index-C2hZeNkq.d.ts → index-BAy6tbOG.d.ts} +12 -6
- package/dist/{index-ClrZbU7n.d.ts → index-DYlzhHq7.d.ts} +83 -87
- package/dist/index.d.ts +3 -7
- package/dist/index.js +5 -3
- package/dist/{merge-file-C5nzi_MY.d.ts → merge-file-CLc3wxY4.d.ts} +5 -28
- package/dist/{mock-db-5mJTObSC.js → mock-db-4tTWrF-P.js} +12 -12
- package/dist/mock-db.d.ts +1 -1
- package/dist/mock-db.js +1 -1
- package/dist/mono-db.d.ts +1 -1
- package/dist/mono-db.js +115 -108
- package/dist/mono-prepare.d.ts +1 -1
- package/dist/mono-prepare.js +3 -2
- package/dist/mono-skills.d.ts +1 -1
- package/dist/mono-skills.js +39 -32
- package/dist/nuxt-layers.d.ts +4 -2
- package/dist/nuxt-runtime.d.ts +4 -5
- package/dist/nuxt-runtime.js +1 -1
- package/dist/nuxt.d.ts +42 -38
- package/dist/nuxt.js +153 -6
- package/dist/{runtime-C_IWNrAG.js → runtime-vs7U9Ed4.js} +394 -157
- package/dist/runtime.d.ts +68 -133
- package/dist/runtime.js +2 -2
- package/dist/{session-Bk985AIM.js → session-Bcig-rPi.js} +4 -4
- package/dist/{universal-B2eD9xho.d.ts → universal-BR0O7Qwk.d.ts} +8 -46
- package/dist/{universal-BNTo_83u.js → universal-DIVEzCvN.js} +3 -2
- package/dist/vite.d.ts +44 -41
- package/package.json +11 -15
package/dist/runtime.d.ts
CHANGED
|
@@ -1,57 +1,30 @@
|
|
|
1
|
-
import { C as MonoSyncTransport, _ as MonoMergeableKey, c as MonoConfig, n as JWTCompleteTokenTypes, o as MonoAppType, t as DefaultJWTTokenTypes, w as MonoTemplate } from "./create-config-
|
|
1
|
+
import { C as MonoSyncTransport, _ as MonoMergeableKey, c as MonoConfig, n as JWTCompleteTokenTypes, o as MonoAppType, t as DefaultJWTTokenTypes, w as MonoTemplate } from "./create-config-B8IhX4ht.js";
|
|
2
2
|
import { a as MonoFetchCookieOptions, i as LocalStorageParams, n as CookieTokenParams, o as NormalFetchOptions$1, r as JWTPayload, s as NormalFetchResult$1, t as CookieParams } from "./types-B6FdB7LJ.js";
|
|
3
|
-
import { a as monoToken, i as monoStorage, n as monoCookie, o as setMonoEventResolver, r as monoJwt, s as CookieApi, t as MonoRequestEvent } from "./universal-
|
|
4
|
-
import { A as
|
|
3
|
+
import { a as monoToken, i as monoStorage, n as monoCookie, o as setMonoEventResolver, r as monoJwt, s as CookieApi, t as MonoRequestEvent } from "./universal-BR0O7Qwk.js";
|
|
4
|
+
import { A as ValidateErrorItem, B as NormalFetchOptions, C as Format, D as SchemaType, E as SchemaObject, F as LoopTemplate, G as NotifProps, H as OdataFetchTypes, I as PathValue, J as MonoNotifButton, K as MonoNotifActionProps, L as FetchLoading, M as ValidateSchema, N as Col, O as ValidateError, P as GroupTemplate, R as FetchOData, S as FilterExpression, T as Schema, U as TanstackFetchOptions, V as NormalFetchResult, W as useHelper, X as createStaticDatasource, Y as UseOdataStaticOpts, _ as getPrefetchBridge, a as TryCatchDatasourceParams, b as CustomSummary, c as extractErrorMessage, d as promiseWrapper, f as tryCatchDatasource, g as MonoPrefetchRequest, h as MonoPrefetchBridge, i as OdataFetchUniqueTypes, j as ValidateErrorSingle, k as ValidateErrorComplex, l as loadChuckStore, m as useNormalFetch, n as FetchOverrides, o as createFetcher, p as useFetchOData, q as MonoNotifActionTypes, r as LoadChunkStoreArgs, s as createUniqueFetcher, t as _default, u as parseDxError, v as setPrefetchBridge, w as HeaderFilter, x as DataGrid, y as OdataMapTypes, z as FetchParam } from "./index-DYlzhHq7.js";
|
|
5
5
|
import { InjectionKey, Plugin, Ref as Ref$1 } from "vue";
|
|
6
6
|
import { RouteRecordRaw } from "vue-router";
|
|
7
|
-
|
|
8
7
|
//#region src/token/client.d.ts
|
|
9
8
|
/** Client cookie util — `document.cookie` backed (unchanged public shape). */
|
|
10
|
-
declare const useMyCookie: () => CookieApi;
|
|
9
|
+
export declare const useMyCookie: () => CookieApi;
|
|
11
10
|
/** Client token util — `document.cookie` backed (unchanged public shape). */
|
|
12
|
-
declare const useMyToken: (options?: CookieTokenParams) => {
|
|
11
|
+
export declare const useMyToken: (options?: CookieTokenParams) => {
|
|
13
12
|
decode: <T extends object>(name?: CookieTokenParams["name"], split?: boolean) => JWTPayload<T> | null;
|
|
14
|
-
add: ({
|
|
15
|
-
name,
|
|
16
|
-
value,
|
|
17
|
-
days,
|
|
18
|
-
milis,
|
|
19
|
-
splitCookie
|
|
20
|
-
}: Pick<CookieTokenParams, "name" | "value" | "days" | "milis" | "splitCookie">) => string | null | undefined;
|
|
13
|
+
add: ({ name, value, days, milis, splitCookie }: Pick<CookieTokenParams, "name" | "value" | "days" | "milis" | "splitCookie">) => string | null | undefined;
|
|
21
14
|
get: (name?: CookieTokenParams["name"], split?: boolean) => CookieTokenParams["value"] | null;
|
|
22
|
-
replace: ({
|
|
23
|
-
|
|
24
|
-
value,
|
|
25
|
-
days,
|
|
26
|
-
milis,
|
|
27
|
-
splitCookie
|
|
28
|
-
}: Pick<CookieTokenParams, "name" | "value" | "days" | "milis" | "splitCookie">) => boolean;
|
|
29
|
-
fetch: <T = Record<string, any>>({
|
|
30
|
-
fetchParams,
|
|
31
|
-
name,
|
|
32
|
-
path,
|
|
33
|
-
splitCookie
|
|
34
|
-
}?: MonoFetchCookieOptions) => Promise<{
|
|
15
|
+
replace: ({ name, value, days, milis, splitCookie }: Pick<CookieTokenParams, "name" | "value" | "days" | "milis" | "splitCookie">) => boolean;
|
|
16
|
+
fetch: <T = Record<string, any>>({ fetchParams, name, path, splitCookie }?: MonoFetchCookieOptions) => Promise<{
|
|
35
17
|
response: T | null;
|
|
36
18
|
cookie: string | null | undefined;
|
|
37
19
|
}>;
|
|
38
20
|
validate: (name?: CookieTokenParams["name"], split?: boolean) => boolean;
|
|
39
|
-
wrap: <T = any>({
|
|
40
|
-
name,
|
|
41
|
-
fetchParams,
|
|
42
|
-
path,
|
|
43
|
-
splitCookie
|
|
44
|
-
}?: Pick<CookieTokenParams, "name" | "splitCookie" | "fetchParams" | "path">, callback?: (value?: string | null) => T | undefined | Promise<T | undefined>) => Promise<T | undefined>;
|
|
21
|
+
wrap: <T = any>({ name, fetchParams, path, splitCookie }?: Pick<CookieTokenParams, "name" | "splitCookie" | "fetchParams" | "path">, callback?: (value?: string | null) => T | undefined | Promise<T | undefined>) => Promise<T | undefined>;
|
|
45
22
|
};
|
|
46
23
|
//#endregion
|
|
47
24
|
//#region src/token/jwt.d.ts
|
|
48
|
-
declare const useMyJwt: () => {
|
|
25
|
+
export declare const useMyJwt: () => {
|
|
49
26
|
isJwt: (jwt: string) => boolean;
|
|
50
|
-
cookieDecode: <T extends object>({
|
|
51
|
-
cookie,
|
|
52
|
-
token,
|
|
53
|
-
splitCookie
|
|
54
|
-
}: {
|
|
27
|
+
cookieDecode: <T extends object>({ cookie, token, splitCookie }: {
|
|
55
28
|
splitCookie?: CookieParams["split"];
|
|
56
29
|
cookie?: CookieParams["name"];
|
|
57
30
|
token?: CookieParams["value"];
|
|
@@ -59,28 +32,17 @@ declare const useMyJwt: () => {
|
|
|
59
32
|
};
|
|
60
33
|
//#endregion
|
|
61
34
|
//#region src/token/storage.d.ts
|
|
62
|
-
declare const useMyStorage: (options?: LocalStorageParams) => {
|
|
35
|
+
export declare const useMyStorage: (options?: LocalStorageParams) => {
|
|
63
36
|
get: (name: LocalStorageParams["name"]) => LocalStorageParams["value"] | LocalStorageParams[] | null;
|
|
64
|
-
add: ({
|
|
65
|
-
name,
|
|
66
|
-
value,
|
|
67
|
-
items
|
|
68
|
-
}: Pick<LocalStorageParams, "name" | "value" | "items">) => string | null;
|
|
37
|
+
add: ({ name, value, items }: Pick<LocalStorageParams, "name" | "value" | "items">) => string | null;
|
|
69
38
|
remove: (name: LocalStorageParams["name"]) => boolean;
|
|
70
|
-
change: ({
|
|
71
|
-
name,
|
|
72
|
-
value
|
|
73
|
-
}: Pick<LocalStorageParams, "name" | "value">) => string | null;
|
|
39
|
+
change: ({ name, value }: Pick<LocalStorageParams, "name" | "value">) => string | null;
|
|
74
40
|
pull: (name: LocalStorageParams["name"]) => LocalStorageParams["value"] | null;
|
|
75
|
-
redirect: (url: string, {
|
|
76
|
-
name,
|
|
77
|
-
value,
|
|
78
|
-
items
|
|
79
|
-
}: Pick<LocalStorageParams, "name" | "value" | "items">) => void;
|
|
41
|
+
redirect: (url: string, { name, value, items }: Pick<LocalStorageParams, "name" | "value" | "items">) => void;
|
|
80
42
|
};
|
|
81
43
|
//#endregion
|
|
82
44
|
//#region src/token/fetch.d.ts
|
|
83
|
-
declare function useMyFetch<T>(url: string, options: NormalFetchOptions$1): Promise<NormalFetchResult$1<T>>;
|
|
45
|
+
export declare function useMyFetch<T>(url: string, options: NormalFetchOptions$1): Promise<NormalFetchResult$1<T>>;
|
|
84
46
|
//#endregion
|
|
85
47
|
//#region src/composables/state.d.ts
|
|
86
48
|
/**
|
|
@@ -97,13 +59,13 @@ type MonoStateShape = {
|
|
|
97
59
|
cookie: Record<string, any>;
|
|
98
60
|
jwt: MonoJwtState;
|
|
99
61
|
};
|
|
100
|
-
declare function monoStatePatch(patch: {
|
|
62
|
+
export declare function monoStatePatch(patch: {
|
|
101
63
|
cookie?: Record<string, any>;
|
|
102
64
|
jwt?: Partial<MonoJwtState>;
|
|
103
65
|
}): void;
|
|
104
|
-
type DeepMerge<A, B> = { [K in keyof (A & B)]: K extends keyof A ? K extends keyof B ? A[K] extends object ? B[K] extends object ? DeepMerge<A[K], B[K]> : A[K] & B[K] : A[K] & B[K] : A[K] : K extends keyof B ? B[K] : never };
|
|
105
|
-
declare function monoState<Override extends object = {}>(): Readonly<Pick<DeepMerge<MonoStateShape, Override>, 'config' | 'cookie' | 'jwt'>>;
|
|
106
|
-
declare function monoStateReset(): void;
|
|
66
|
+
type DeepMerge<A, B> = { [K in keyof (A & B)]: K extends keyof A ? K extends keyof B ? A[K] extends object ? B[K] extends object ? DeepMerge<A[K], B[K]> : A[K] & B[K] : A[K] & B[K] : A[K] : K extends keyof B ? B[K] : never; };
|
|
67
|
+
export declare function monoState<Override extends object = {}>(): Readonly<Pick<DeepMerge<MonoStateShape, Override>, 'config' | 'cookie' | 'jwt'>>;
|
|
68
|
+
export declare function monoStateReset(): void;
|
|
107
69
|
/**
|
|
108
70
|
* Bridge between mono.config.ts and monoState().
|
|
109
71
|
*
|
|
@@ -114,12 +76,12 @@ declare function monoStateReset(): void;
|
|
|
114
76
|
*
|
|
115
77
|
* Then patches the shared reactive mono state.
|
|
116
78
|
*/
|
|
117
|
-
declare function initMono(option: MonoConfig): MonoConfig;
|
|
79
|
+
export declare function initMono(option: MonoConfig): MonoConfig;
|
|
118
80
|
declare function monoConfig(): {
|
|
119
81
|
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | {
|
|
120
82
|
readonly config: (() => Partial<MonoConfig> | undefined) | {
|
|
121
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | {
|
|
122
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly [string, {
|
|
83
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | {
|
|
84
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly [string, {
|
|
123
85
|
readonly [x: string]: any;
|
|
124
86
|
}])[] | undefined;
|
|
125
87
|
readonly name?: string | undefined;
|
|
@@ -139,7 +101,7 @@ declare function monoConfig(): {
|
|
|
139
101
|
readonly title?: string | undefined;
|
|
140
102
|
readonly icon?: string | undefined;
|
|
141
103
|
} | undefined;
|
|
142
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
104
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
143
105
|
readonly remoteName?: string | undefined;
|
|
144
106
|
readonly visible?: boolean | undefined;
|
|
145
107
|
readonly order?: number | undefined;
|
|
@@ -293,8 +255,8 @@ declare function monoConfig(): {
|
|
|
293
255
|
readonly config?: never | undefined;
|
|
294
256
|
readonly merges?: never | undefined;
|
|
295
257
|
readonly ecosystems?: never | undefined;
|
|
296
|
-
} | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | {
|
|
297
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly [string, {
|
|
258
|
+
} | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | {
|
|
259
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly [string, {
|
|
298
260
|
readonly [x: string]: any;
|
|
299
261
|
}])[] | undefined;
|
|
300
262
|
readonly name?: string | undefined;
|
|
@@ -314,7 +276,7 @@ declare function monoConfig(): {
|
|
|
314
276
|
readonly title?: string | undefined;
|
|
315
277
|
readonly icon?: string | undefined;
|
|
316
278
|
} | undefined;
|
|
317
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
279
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
318
280
|
readonly remoteName?: string | undefined;
|
|
319
281
|
readonly visible?: boolean | undefined;
|
|
320
282
|
readonly order?: number | undefined;
|
|
@@ -488,7 +450,7 @@ declare function monoConfig(): {
|
|
|
488
450
|
readonly title?: string | undefined;
|
|
489
451
|
readonly icon?: string | undefined;
|
|
490
452
|
} | undefined;
|
|
491
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
453
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
492
454
|
readonly remoteName?: string | undefined;
|
|
493
455
|
readonly visible?: boolean | undefined;
|
|
494
456
|
readonly order?: number | undefined;
|
|
@@ -645,7 +607,7 @@ declare function monoConfig(): {
|
|
|
645
607
|
} | {
|
|
646
608
|
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | {
|
|
647
609
|
readonly config: (() => Partial<MonoConfig> | undefined) | {
|
|
648
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly [string, {
|
|
610
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly [string, {
|
|
649
611
|
readonly [x: string]: any;
|
|
650
612
|
}])[] | undefined;
|
|
651
613
|
readonly name?: string | undefined;
|
|
@@ -665,7 +627,7 @@ declare function monoConfig(): {
|
|
|
665
627
|
readonly title?: string | undefined;
|
|
666
628
|
readonly icon?: string | undefined;
|
|
667
629
|
} | undefined;
|
|
668
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
630
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
669
631
|
readonly remoteName?: string | undefined;
|
|
670
632
|
readonly visible?: boolean | undefined;
|
|
671
633
|
readonly order?: number | undefined;
|
|
@@ -819,9 +781,9 @@ declare function monoConfig(): {
|
|
|
819
781
|
};
|
|
820
782
|
readonly merges?: readonly MonoMergeableKey[] | undefined;
|
|
821
783
|
readonly ecosystems?: readonly string[] | undefined;
|
|
822
|
-
} | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | {
|
|
784
|
+
} | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | {
|
|
823
785
|
readonly config: (() => Partial<MonoConfig> | undefined) | {
|
|
824
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly [string, {
|
|
786
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly [string, {
|
|
825
787
|
readonly [x: string]: any;
|
|
826
788
|
}])[] | undefined;
|
|
827
789
|
readonly name?: string | undefined;
|
|
@@ -841,7 +803,7 @@ declare function monoConfig(): {
|
|
|
841
803
|
readonly title?: string | undefined;
|
|
842
804
|
readonly icon?: string | undefined;
|
|
843
805
|
} | undefined;
|
|
844
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
806
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
845
807
|
readonly remoteName?: string | undefined;
|
|
846
808
|
readonly visible?: boolean | undefined;
|
|
847
809
|
readonly order?: number | undefined;
|
|
@@ -995,7 +957,7 @@ declare function monoConfig(): {
|
|
|
995
957
|
};
|
|
996
958
|
readonly merges?: readonly MonoMergeableKey[] | undefined;
|
|
997
959
|
readonly ecosystems?: readonly string[] | undefined;
|
|
998
|
-
} | /*elided*/any | readonly [string, {
|
|
960
|
+
} | /*elided*/ any | readonly [string, {
|
|
999
961
|
readonly [x: string]: any;
|
|
1000
962
|
}])[] | undefined;
|
|
1001
963
|
readonly name?: string | undefined;
|
|
@@ -1015,7 +977,7 @@ declare function monoConfig(): {
|
|
|
1015
977
|
readonly title?: string | undefined;
|
|
1016
978
|
readonly icon?: string | undefined;
|
|
1017
979
|
} | undefined;
|
|
1018
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
980
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
1019
981
|
readonly remoteName?: string | undefined;
|
|
1020
982
|
readonly visible?: boolean | undefined;
|
|
1021
983
|
readonly order?: number | undefined;
|
|
@@ -1171,8 +1133,8 @@ declare function monoConfig(): {
|
|
|
1171
1133
|
readonly ecosystems?: never | undefined;
|
|
1172
1134
|
} | readonly (string | (() => Partial<MonoConfig> | undefined) | {
|
|
1173
1135
|
readonly config: (() => Partial<MonoConfig> | undefined) | {
|
|
1174
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | {
|
|
1175
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly [string, {
|
|
1136
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | {
|
|
1137
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly [string, {
|
|
1176
1138
|
readonly [x: string]: any;
|
|
1177
1139
|
}])[] | undefined;
|
|
1178
1140
|
readonly name?: string | undefined;
|
|
@@ -1192,7 +1154,7 @@ declare function monoConfig(): {
|
|
|
1192
1154
|
readonly title?: string | undefined;
|
|
1193
1155
|
readonly icon?: string | undefined;
|
|
1194
1156
|
} | undefined;
|
|
1195
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
1157
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
1196
1158
|
readonly remoteName?: string | undefined;
|
|
1197
1159
|
readonly visible?: boolean | undefined;
|
|
1198
1160
|
readonly order?: number | undefined;
|
|
@@ -1346,8 +1308,8 @@ declare function monoConfig(): {
|
|
|
1346
1308
|
readonly config?: never | undefined;
|
|
1347
1309
|
readonly merges?: never | undefined;
|
|
1348
1310
|
readonly ecosystems?: never | undefined;
|
|
1349
|
-
} | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | {
|
|
1350
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly [string, {
|
|
1311
|
+
} | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | {
|
|
1312
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly [string, {
|
|
1351
1313
|
readonly [x: string]: any;
|
|
1352
1314
|
}])[] | undefined;
|
|
1353
1315
|
readonly name?: string | undefined;
|
|
@@ -1367,7 +1329,7 @@ declare function monoConfig(): {
|
|
|
1367
1329
|
readonly title?: string | undefined;
|
|
1368
1330
|
readonly icon?: string | undefined;
|
|
1369
1331
|
} | undefined;
|
|
1370
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
1332
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
1371
1333
|
readonly remoteName?: string | undefined;
|
|
1372
1334
|
readonly visible?: boolean | undefined;
|
|
1373
1335
|
readonly order?: number | undefined;
|
|
@@ -1541,7 +1503,7 @@ declare function monoConfig(): {
|
|
|
1541
1503
|
readonly title?: string | undefined;
|
|
1542
1504
|
readonly icon?: string | undefined;
|
|
1543
1505
|
} | undefined;
|
|
1544
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
1506
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
1545
1507
|
readonly remoteName?: string | undefined;
|
|
1546
1508
|
readonly visible?: boolean | undefined;
|
|
1547
1509
|
readonly order?: number | undefined;
|
|
@@ -1698,7 +1660,7 @@ declare function monoConfig(): {
|
|
|
1698
1660
|
} | {
|
|
1699
1661
|
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | {
|
|
1700
1662
|
readonly config: (() => Partial<MonoConfig> | undefined) | {
|
|
1701
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly [string, {
|
|
1663
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly [string, {
|
|
1702
1664
|
readonly [x: string]: any;
|
|
1703
1665
|
}])[] | undefined;
|
|
1704
1666
|
readonly name?: string | undefined;
|
|
@@ -1718,7 +1680,7 @@ declare function monoConfig(): {
|
|
|
1718
1680
|
readonly title?: string | undefined;
|
|
1719
1681
|
readonly icon?: string | undefined;
|
|
1720
1682
|
} | undefined;
|
|
1721
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
1683
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
1722
1684
|
readonly remoteName?: string | undefined;
|
|
1723
1685
|
readonly visible?: boolean | undefined;
|
|
1724
1686
|
readonly order?: number | undefined;
|
|
@@ -1872,9 +1834,9 @@ declare function monoConfig(): {
|
|
|
1872
1834
|
};
|
|
1873
1835
|
readonly merges?: readonly MonoMergeableKey[] | undefined;
|
|
1874
1836
|
readonly ecosystems?: readonly string[] | undefined;
|
|
1875
|
-
} | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | {
|
|
1837
|
+
} | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | {
|
|
1876
1838
|
readonly config: (() => Partial<MonoConfig> | undefined) | {
|
|
1877
|
-
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/any | /*elided*/any | readonly [string, {
|
|
1839
|
+
readonly extends?: string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly (string | (() => Partial<MonoConfig> | undefined) | /*elided*/ any | /*elided*/ any | readonly [string, {
|
|
1878
1840
|
readonly [x: string]: any;
|
|
1879
1841
|
}])[] | undefined;
|
|
1880
1842
|
readonly name?: string | undefined;
|
|
@@ -1894,7 +1856,7 @@ declare function monoConfig(): {
|
|
|
1894
1856
|
readonly title?: string | undefined;
|
|
1895
1857
|
readonly icon?: string | undefined;
|
|
1896
1858
|
} | undefined;
|
|
1897
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
1859
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
1898
1860
|
readonly remoteName?: string | undefined;
|
|
1899
1861
|
readonly visible?: boolean | undefined;
|
|
1900
1862
|
readonly order?: number | undefined;
|
|
@@ -2048,7 +2010,7 @@ declare function monoConfig(): {
|
|
|
2048
2010
|
};
|
|
2049
2011
|
readonly merges?: readonly MonoMergeableKey[] | undefined;
|
|
2050
2012
|
readonly ecosystems?: readonly string[] | undefined;
|
|
2051
|
-
} | /*elided*/any | readonly [string, {
|
|
2013
|
+
} | /*elided*/ any | readonly [string, {
|
|
2052
2014
|
readonly [x: string]: any;
|
|
2053
2015
|
}])[] | undefined;
|
|
2054
2016
|
readonly name?: string | undefined;
|
|
@@ -2068,7 +2030,7 @@ declare function monoConfig(): {
|
|
|
2068
2030
|
readonly title?: string | undefined;
|
|
2069
2031
|
readonly icon?: string | undefined;
|
|
2070
2032
|
} | undefined;
|
|
2071
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
2033
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
2072
2034
|
readonly remoteName?: string | undefined;
|
|
2073
2035
|
readonly visible?: boolean | undefined;
|
|
2074
2036
|
readonly order?: number | undefined;
|
|
@@ -2242,7 +2204,7 @@ declare function monoConfig(): {
|
|
|
2242
2204
|
readonly title?: string | undefined;
|
|
2243
2205
|
readonly icon?: string | undefined;
|
|
2244
2206
|
} | undefined;
|
|
2245
|
-
readonly items?: readonly /*elided*/any[] | undefined;
|
|
2207
|
+
readonly items?: readonly /*elided*/ any[] | undefined;
|
|
2246
2208
|
readonly remoteName?: string | undefined;
|
|
2247
2209
|
readonly visible?: boolean | undefined;
|
|
2248
2210
|
readonly order?: number | undefined;
|
|
@@ -2417,7 +2379,7 @@ declare function monoEnv<T = string | number | boolean>(key: string): T | undefi
|
|
|
2417
2379
|
* .use(createMono(config))
|
|
2418
2380
|
* .mount('#app')
|
|
2419
2381
|
*/
|
|
2420
|
-
declare function createMono(option: MonoConfig): Plugin;
|
|
2382
|
+
export declare function createMono(option: MonoConfig): Plugin;
|
|
2421
2383
|
//#endregion
|
|
2422
2384
|
//#region src/composables/nuxt-state.d.ts
|
|
2423
2385
|
/**
|
|
@@ -2435,10 +2397,10 @@ declare function createMono(option: MonoConfig): Plugin;
|
|
|
2435
2397
|
* the existing ref untouched, even if their `init` differs. Returning a ref from
|
|
2436
2398
|
* `init` adopts that ref rather than nesting it.
|
|
2437
2399
|
*/
|
|
2438
|
-
declare function useState<T = any>(init?: (() => T | Ref$1<T>) | T): Ref$1<T>;
|
|
2439
|
-
declare function useState<T = any>(key: string, init?: (() => T | Ref$1<T>) | T): Ref$1<T>;
|
|
2400
|
+
export declare function useState<T = any>(init?: (() => T | Ref$1<T>) | T): Ref$1<T>;
|
|
2401
|
+
export declare function useState<T = any>(key: string, init?: (() => T | Ref$1<T>) | T): Ref$1<T>;
|
|
2440
2402
|
/** Explicit alias — for hosts that don't want the bare Nuxt name in scope. */
|
|
2441
|
-
declare const monoUseState: typeof useState;
|
|
2403
|
+
export declare const monoUseState: typeof useState;
|
|
2442
2404
|
/**
|
|
2443
2405
|
* Drop keyed state so the next `useState(key, init)` re-runs `init` (Nuxt's
|
|
2444
2406
|
* `clearNuxtState`). No argument clears everything; a predicate filters by key.
|
|
@@ -2446,9 +2408,9 @@ declare const monoUseState: typeof useState;
|
|
|
2446
2408
|
* Only the registry entry goes — refs already handed out keep working, they're
|
|
2447
2409
|
* just no longer what that key resolves to.
|
|
2448
2410
|
*/
|
|
2449
|
-
declare function clearNuxtState(keys?: string | string[] | ((key: string) => boolean)): void;
|
|
2411
|
+
export declare function clearNuxtState(keys?: string | string[] | ((key: string) => boolean)): void;
|
|
2450
2412
|
/** The live keyed refs — for devtools/debugging, not app logic. */
|
|
2451
|
-
declare function nuxtStateKeys(): string[];
|
|
2413
|
+
export declare function nuxtStateKeys(): string[];
|
|
2452
2414
|
//#endregion
|
|
2453
2415
|
//#region src/composables/combine-layout.d.ts
|
|
2454
2416
|
interface SidebarMenu {
|
|
@@ -2472,10 +2434,7 @@ interface SidebarMenu {
|
|
|
2472
2434
|
};
|
|
2473
2435
|
};
|
|
2474
2436
|
}
|
|
2475
|
-
declare let defineLayout: ({
|
|
2476
|
-
menu,
|
|
2477
|
-
routes
|
|
2478
|
-
}: {
|
|
2437
|
+
export declare let defineLayout: ({ menu, routes }: {
|
|
2479
2438
|
menu: SidebarMenu[];
|
|
2480
2439
|
routes: RouteRecordRaw[];
|
|
2481
2440
|
}) => RouteRecordRaw[];
|
|
@@ -2495,8 +2454,8 @@ type HostProviderOptions<T> = {
|
|
|
2495
2454
|
resetValue?: T;
|
|
2496
2455
|
deleteOnUnmount?: boolean;
|
|
2497
2456
|
};
|
|
2498
|
-
declare function monoInject<T>(options: InjectHostOptions<T>): Ref$1<T>;
|
|
2499
|
-
declare function monoProvide<T>(options: HostProviderOptions<T>): Ref$1<T>;
|
|
2457
|
+
export declare function monoInject<T>(options: InjectHostOptions<T>): Ref$1<T>;
|
|
2458
|
+
export declare function monoProvide<T>(options: HostProviderOptions<T>): Ref$1<T>;
|
|
2500
2459
|
//#endregion
|
|
2501
2460
|
//#region src/composables/use-mono-utility.d.ts
|
|
2502
2461
|
/**
|
|
@@ -2511,25 +2470,15 @@ declare function monoProvide<T>(options: HostProviderOptions<T>): Ref$1<T>;
|
|
|
2511
2470
|
*
|
|
2512
2471
|
* Same surface as the core `useUtils()` (src/core); `useMonoUtility` is the public name.
|
|
2513
2472
|
*/
|
|
2514
|
-
declare const useMonoUtility: () => {
|
|
2473
|
+
export declare const useMonoUtility: () => {
|
|
2515
2474
|
isDate: (value: unknown) => value is Date;
|
|
2516
|
-
isJSONString: ({
|
|
2517
|
-
input,
|
|
2518
|
-
strict,
|
|
2519
|
-
root
|
|
2520
|
-
}: {
|
|
2475
|
+
isJSONString: ({ input, strict, root }: {
|
|
2521
2476
|
input: unknown;
|
|
2522
2477
|
strict?: boolean;
|
|
2523
2478
|
root?: ("object" | "any" | "array" | "primitive") | ReadonlyArray<"object" | "any" | "array" | "primitive">;
|
|
2524
2479
|
}) => boolean;
|
|
2525
2480
|
safeJSONParse: (str: string) => any;
|
|
2526
|
-
replacerData: <ComT>({
|
|
2527
|
-
fn,
|
|
2528
|
-
type,
|
|
2529
|
-
item,
|
|
2530
|
-
key,
|
|
2531
|
-
items
|
|
2532
|
-
}: {
|
|
2481
|
+
replacerData: <ComT>({ fn, type, item, key, items }: {
|
|
2533
2482
|
fn: "push" | "remove" | "replace";
|
|
2534
2483
|
type: "data";
|
|
2535
2484
|
item: ComT;
|
|
@@ -2549,30 +2498,16 @@ declare const useMonoUtility: () => {
|
|
|
2549
2498
|
};
|
|
2550
2499
|
}) => void;
|
|
2551
2500
|
filterOrIn: (field: string, values: any[], combine?: boolean) => any;
|
|
2552
|
-
validateAllSchema: <T extends object = any>({
|
|
2553
|
-
|
|
2554
|
-
input,
|
|
2555
|
-
error
|
|
2556
|
-
}: ValidateSchema<T>, callback?: () => void) => Promise<boolean>;
|
|
2557
|
-
validateSchema: <T = any>({
|
|
2558
|
-
schema,
|
|
2559
|
-
field,
|
|
2560
|
-
input,
|
|
2561
|
-
error
|
|
2562
|
-
}: ValidateSchema<T>, callback?: Function) => Promise<boolean>;
|
|
2501
|
+
validateAllSchema: <T extends object = any>({ schema, input, error }: ValidateSchema<T>, callback?: () => void) => Promise<boolean>;
|
|
2502
|
+
validateSchema: <T = any>({ schema, field, input, error }: ValidateSchema<T>, callback?: Function) => Promise<boolean>;
|
|
2563
2503
|
validateAllSchemaCheck: (error: ValidateError<any>) => boolean;
|
|
2564
|
-
clearSchemaValidation: ({
|
|
2565
|
-
error
|
|
2566
|
-
}: {
|
|
2504
|
+
clearSchemaValidation: ({ error }: {
|
|
2567
2505
|
error: Ref<any>;
|
|
2568
2506
|
}) => void;
|
|
2569
2507
|
notif: (options: NotifProps) => Promise<import("notivue").NotificationClearMethods | undefined>;
|
|
2570
|
-
dxFilterToString: ({
|
|
2571
|
-
filter,
|
|
2572
|
-
encode
|
|
2573
|
-
}: {
|
|
2508
|
+
dxFilterToString: ({ filter, encode }: {
|
|
2574
2509
|
encode?: boolean;
|
|
2575
|
-
filter: string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | /*elided*/any | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined;
|
|
2510
|
+
filter: string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | (string | number | boolean | Date | /*elided*/ any | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined)[] | [string, string, any] | null | undefined;
|
|
2576
2511
|
}) => string;
|
|
2577
2512
|
};
|
|
2578
2513
|
//#endregion
|
|
@@ -2580,4 +2515,4 @@ declare const useMonoUtility: () => {
|
|
|
2580
2515
|
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2581
2516
|
declare const _default$1: typeof __VLS_export;
|
|
2582
2517
|
//#endregion
|
|
2583
|
-
export { type Col, type Col as MonoDataGridCol, type CustomSummary, type DataGrid, type DataGrid as MonoDataGridTypes, type FetchLoading, type FetchOData, type FetchParam, type FilterExpression, type Format, type GroupTemplate, type HeaderFilter, type LoopTemplate, type createStaticDatasource as MonoCreateStaticDatasource, type FetchOverrides as MonoFetchOverrides, type NormalFetchOptions as MonoNormalFetchTypes, type NormalFetchOptions, _default as MonoNotifAction, type MonoNotifActionProps as MonoNotifActionPropsTypes, type MonoNotifActionTypes, type MonoNotifButton as MonoNotifButtonTypes, type NotifProps as MonoNotifPropsTypes, type NotifProps, _default$1 as MonoNotivue, type OdataFetchTypes as MonoOdataFetchTypes, type OdataFetchTypes, type OdataFetchUniqueTypes as MonoOdataFetchUniqueTypes, type OdataMapTypes as MonoOdataMapTypes, type OdataMapTypes, type MonoRequestEvent, type SchemaObject as MonoSchemaObject, type SchemaObject, type LoadChunkStoreArgs as MonoStoreChunkTypes, type TanstackFetchOptions as MonoTanstackFetchTypes, type TanstackFetchOptions, type TryCatchDatasourceParams as MonoTryCatchDatasourceTypes, type UseOdataStaticOpts as MonoUseOdataStaticTypes, type ValidateErrorComplex as MonoValidateError, type ValidateErrorComplex, type ValidateErrorSingle as MonoValidateErrorSingle, type ValidateErrorSingle, type NormalFetchResult, type PathValue, type Schema, type SchemaType, type ValidateError, type ValidateErrorItem, type ValidateSchema,
|
|
2518
|
+
export { type Col, type Col as MonoDataGridCol, type CustomSummary, type DataGrid, type DataGrid as MonoDataGridTypes, type FetchLoading, type FetchOData, type FetchParam, type FilterExpression, type Format, type GroupTemplate, type HeaderFilter, type LoopTemplate, type createStaticDatasource as MonoCreateStaticDatasource, type FetchOverrides as MonoFetchOverrides, type NormalFetchOptions as MonoNormalFetchTypes, type NormalFetchOptions, _default as MonoNotifAction, type MonoNotifActionProps as MonoNotifActionPropsTypes, type MonoNotifActionTypes, type MonoNotifButton as MonoNotifButtonTypes, type NotifProps as MonoNotifPropsTypes, type NotifProps, _default$1 as MonoNotivue, type OdataFetchTypes as MonoOdataFetchTypes, type OdataFetchTypes, type OdataFetchUniqueTypes as MonoOdataFetchUniqueTypes, type OdataMapTypes as MonoOdataMapTypes, type OdataMapTypes, type MonoPrefetchBridge, type MonoPrefetchRequest, type MonoRequestEvent, type SchemaObject as MonoSchemaObject, type SchemaObject, type LoadChunkStoreArgs as MonoStoreChunkTypes, type TanstackFetchOptions as MonoTanstackFetchTypes, type TanstackFetchOptions, type TryCatchDatasourceParams as MonoTryCatchDatasourceTypes, type UseOdataStaticOpts as MonoUseOdataStaticTypes, type ValidateErrorComplex as MonoValidateError, type ValidateErrorComplex, type ValidateErrorSingle as MonoValidateErrorSingle, type ValidateErrorSingle, type NormalFetchResult, type PathValue, type Schema, type SchemaType, type ValidateError, type ValidateErrorItem, type ValidateSchema, type createFetcher, type createUniqueFetcher, type extractErrorMessage, type useNormalFetch as fetchNormal, type useFetchOData as fetchOData, type getPrefetchBridge, type loadChuckStore, monoConfig, monoCookie, monoEnv, monoJwt, monoStorage, monoToken, type parseDxError, type promiseWrapper, setMonoEventResolver, type setPrefetchBridge, type tryCatchDatasource, useMonoUtility as useMonoUtils, useHelper as useUtils };
|
package/dist/runtime.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { a as setMonoEventResolver, c as useMyToken, i as monoToken, l as useMyFetch, n as monoJwt, o as useMyStorage, r as monoStorage, s as useMyCookie, t as monoCookie
|
|
1
|
+
import { C as createMono, D as monoState, E as monoEnv, O as monoStatePatch, S as useState, T as monoConfig, _ as monoProvide, b as monoUseState, g as monoInject, k as monoStateReset, m as useHelper, n as useMonoUtility, r as Notif_default, t as MonoNotivue_default, v as defineLayout, w as initMono, x as nuxtStateKeys, y as clearNuxtState } from "./runtime-vs7U9Ed4.js";
|
|
2
|
+
import { a as setMonoEventResolver, c as useMyToken, d as useMyJwt, i as monoToken, l as useMyFetch, n as monoJwt, o as useMyStorage, r as monoStorage, s as useMyCookie, t as monoCookie } from "./universal-DIVEzCvN.js";
|
|
3
3
|
|
|
4
4
|
export { Notif_default as MonoNotifAction, MonoNotivue_default as MonoNotivue, clearNuxtState, createMono, defineLayout, initMono, monoConfig, monoCookie, monoEnv, monoInject, monoJwt, monoProvide, monoState, monoStatePatch, monoStateReset, monoStorage, monoToken, monoUseState, nuxtStateKeys, setMonoEventResolver, useMonoUtility, useMonoUtility as useMonoUtils, useMyCookie, useMyFetch, useMyJwt, useMyStorage, useMyToken, useState, useHelper as useUtils };
|
|
@@ -16,17 +16,17 @@ const SKILLS_DEFAULTS = Object.freeze({
|
|
|
16
16
|
/** Subfolder of `stagingDir` holding the working clone of the skills repo. */
|
|
17
17
|
repoDir: "repo",
|
|
18
18
|
/** Conversation chunk size before splitting into `part-NNNN.jsonl`. 750 KB. */
|
|
19
|
-
chunkSizeBytes:
|
|
19
|
+
chunkSizeBytes: 768e3,
|
|
20
20
|
/** Remove the local staging dir after a successful upload. */
|
|
21
21
|
cleanupAfterSuccess: true,
|
|
22
22
|
/** Move a failed session from `pending/` to `failed/`. */
|
|
23
23
|
moveFailedSessions: true,
|
|
24
24
|
/** `read`/`search` re-fetch the clone when its last fetch is older than this. */
|
|
25
|
-
refreshTtlMs:
|
|
25
|
+
refreshTtlMs: 6e5,
|
|
26
26
|
/** How many times a rejected (non-fast-forward) push is replayed on a fresh tip. */
|
|
27
27
|
pushAttempts: 3,
|
|
28
28
|
/** Timeout for a single remote git operation (probe, fetch, push). */
|
|
29
|
-
gitTimeoutMs:
|
|
29
|
+
gitTimeoutMs: 12e4
|
|
30
30
|
});
|
|
31
31
|
/**
|
|
32
32
|
* The ONLY CLI flags any `mono skills` subcommand may accept. The argument guard
|
|
@@ -235,7 +235,7 @@ function runGit(args, { cwd, timeoutMs = 2e4, env } = {}) {
|
|
|
235
235
|
windowsHide: true,
|
|
236
236
|
timeout: timeoutMs,
|
|
237
237
|
killSignal: "SIGKILL",
|
|
238
|
-
maxBuffer:
|
|
238
|
+
maxBuffer: 33554432,
|
|
239
239
|
stdio: [
|
|
240
240
|
"ignore",
|
|
241
241
|
"pipe",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { a as MonoFetchCookieOptions, i as LocalStorageParams, n as CookieTokenParams, r as JWTPayload, t as CookieParams } from "./types-B6FdB7LJ.js";
|
|
2
|
-
|
|
3
2
|
//#region src/token/cookie-core.d.ts
|
|
4
3
|
interface CookieApi {
|
|
5
4
|
get(name: string, split?: boolean | string): string | null;
|
|
@@ -21,46 +20,20 @@ declare function monoCookie(event?: MonoRequestEvent): CookieApi;
|
|
|
21
20
|
/** Token util. Client: document.cookie. Server: the h3 request event (sync). */
|
|
22
21
|
declare function monoToken(options?: CookieTokenParams, event?: MonoRequestEvent): {
|
|
23
22
|
decode: <T extends object>(name?: CookieTokenParams["name"], split?: boolean) => JWTPayload<T> | null;
|
|
24
|
-
add: ({
|
|
25
|
-
name,
|
|
26
|
-
value,
|
|
27
|
-
days,
|
|
28
|
-
milis,
|
|
29
|
-
splitCookie
|
|
30
|
-
}: Pick<CookieTokenParams, "name" | "value" | "days" | "milis" | "splitCookie">) => string | null | undefined;
|
|
23
|
+
add: ({ name, value, days, milis, splitCookie }: Pick<CookieTokenParams, "name" | "value" | "days" | "milis" | "splitCookie">) => string | null | undefined;
|
|
31
24
|
get: (name?: CookieTokenParams["name"], split?: boolean) => CookieTokenParams["value"] | null;
|
|
32
|
-
replace: ({
|
|
33
|
-
|
|
34
|
-
value,
|
|
35
|
-
days,
|
|
36
|
-
milis,
|
|
37
|
-
splitCookie
|
|
38
|
-
}: Pick<CookieTokenParams, "name" | "value" | "days" | "milis" | "splitCookie">) => boolean;
|
|
39
|
-
fetch: <T = Record<string, any>>({
|
|
40
|
-
fetchParams,
|
|
41
|
-
name,
|
|
42
|
-
path,
|
|
43
|
-
splitCookie
|
|
44
|
-
}?: MonoFetchCookieOptions) => Promise<{
|
|
25
|
+
replace: ({ name, value, days, milis, splitCookie }: Pick<CookieTokenParams, "name" | "value" | "days" | "milis" | "splitCookie">) => boolean;
|
|
26
|
+
fetch: <T = Record<string, any>>({ fetchParams, name, path, splitCookie }?: MonoFetchCookieOptions) => Promise<{
|
|
45
27
|
response: T | null;
|
|
46
28
|
cookie: string | null | undefined;
|
|
47
29
|
}>;
|
|
48
30
|
validate: (name?: CookieTokenParams["name"], split?: boolean) => boolean;
|
|
49
|
-
wrap: <T = any>({
|
|
50
|
-
name,
|
|
51
|
-
fetchParams,
|
|
52
|
-
path,
|
|
53
|
-
splitCookie
|
|
54
|
-
}?: Pick<CookieTokenParams, "name" | "splitCookie" | "fetchParams" | "path">, callback?: (value?: string | null) => T | undefined | Promise<T | undefined>) => Promise<T | undefined>;
|
|
31
|
+
wrap: <T = any>({ name, fetchParams, path, splitCookie }?: Pick<CookieTokenParams, "name" | "splitCookie" | "fetchParams" | "path">, callback?: (value?: string | null) => T | undefined | Promise<T | undefined>) => Promise<T | undefined>;
|
|
55
32
|
};
|
|
56
33
|
/** JWT util. `cookieDecode({ cookie })` reads via the isomorphic cookie util. */
|
|
57
34
|
declare function monoJwt(event?: MonoRequestEvent): {
|
|
58
35
|
isJwt: (jwt: string) => boolean;
|
|
59
|
-
cookieDecode: <T extends object>({
|
|
60
|
-
cookie,
|
|
61
|
-
token,
|
|
62
|
-
splitCookie
|
|
63
|
-
}: {
|
|
36
|
+
cookieDecode: <T extends object>({ cookie, token, splitCookie }: {
|
|
64
37
|
splitCookie?: CookieParams["split"];
|
|
65
38
|
cookie?: CookieParams["name"];
|
|
66
39
|
token?: CookieParams["value"];
|
|
@@ -69,22 +42,11 @@ declare function monoJwt(event?: MonoRequestEvent): {
|
|
|
69
42
|
/** Storage util. Client: localStorage/sessionStorage. Server: safe no-op. */
|
|
70
43
|
declare function monoStorage(options?: LocalStorageParams): {
|
|
71
44
|
get: (name: LocalStorageParams["name"]) => LocalStorageParams["value"] | LocalStorageParams[] | null;
|
|
72
|
-
add: ({
|
|
73
|
-
name,
|
|
74
|
-
value,
|
|
75
|
-
items
|
|
76
|
-
}: Pick<LocalStorageParams, "name" | "value" | "items">) => string | null;
|
|
45
|
+
add: ({ name, value, items }: Pick<LocalStorageParams, "name" | "value" | "items">) => string | null;
|
|
77
46
|
remove: (name: LocalStorageParams["name"]) => boolean;
|
|
78
|
-
change: ({
|
|
79
|
-
name,
|
|
80
|
-
value
|
|
81
|
-
}: Pick<LocalStorageParams, "name" | "value">) => string | null;
|
|
47
|
+
change: ({ name, value }: Pick<LocalStorageParams, "name" | "value">) => string | null;
|
|
82
48
|
pull: (name: LocalStorageParams["name"]) => LocalStorageParams["value"] | null;
|
|
83
|
-
redirect: (url: string, {
|
|
84
|
-
name,
|
|
85
|
-
value,
|
|
86
|
-
items
|
|
87
|
-
}: Pick<LocalStorageParams, "name" | "value" | "items">) => void;
|
|
49
|
+
redirect: (url: string, { name, value, items }: Pick<LocalStorageParams, "name" | "value" | "items">) => void;
|
|
88
50
|
} | {
|
|
89
51
|
get: () => null;
|
|
90
52
|
add: (_: Pick<LocalStorageParams, "name" | "value" | "items">) => null;
|
|
@@ -572,7 +572,8 @@ function monoJwt(event) {
|
|
|
572
572
|
if (isClient()) return useMyJwt();
|
|
573
573
|
const cookieDecode = ({ cookie, token, splitCookie }) => {
|
|
574
574
|
if (cookie) {
|
|
575
|
-
const
|
|
575
|
+
const tok = monoCookie(event).get(cookie, Boolean(splitCookie));
|
|
576
|
+
const decoded = decodeJwt(tok);
|
|
576
577
|
if (decoded) return decoded;
|
|
577
578
|
}
|
|
578
579
|
return decodeJwt(token);
|
|
@@ -596,4 +597,4 @@ function monoStorage(options) {
|
|
|
596
597
|
}
|
|
597
598
|
|
|
598
599
|
//#endregion
|
|
599
|
-
export { setMonoEventResolver as a, useMyToken as c, monoToken as i, useMyFetch as l, monoJwt as n, useMyStorage as o, monoStorage as r, useMyCookie as s, monoCookie as t,
|
|
600
|
+
export { setMonoEventResolver as a, useMyToken as c, useMyJwt as d, monoToken as i, useMyFetch as l, monoJwt as n, useMyStorage as o, monoStorage as r, useMyCookie as s, monoCookie as t, decodeJwt as u };
|