@shware/http 3.4.0 → 3.5.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.
- package/dist/cache/index.d.cts +1 -2
- package/dist/cache/index.d.cts.map +1 -1
- package/dist/cache/index.d.mts +1 -2
- package/dist/cache/index.d.mts.map +1 -1
- package/dist/error/detail.d.cts +14 -15
- package/dist/error/detail.d.cts.map +1 -1
- package/dist/error/detail.d.mts +14 -15
- package/dist/error/detail.d.mts.map +1 -1
- package/dist/error/i18n/en-us.d.cts +1 -2
- package/dist/error/i18n/en-us.d.cts.map +1 -1
- package/dist/error/i18n/en-us.d.mts +1 -2
- package/dist/error/i18n/en-us.d.mts.map +1 -1
- package/dist/error/index.d.cts +5 -6
- package/dist/error/index.d.cts.map +1 -1
- package/dist/error/index.d.mts +5 -6
- package/dist/error/index.d.mts.map +1 -1
- package/dist/error/parse.d.cts +4 -5
- package/dist/error/parse.d.cts.map +1 -1
- package/dist/error/parse.d.mts +4 -5
- package/dist/error/parse.d.mts.map +1 -1
- package/dist/error/reason.d.cts +2 -3
- package/dist/error/reason.d.cts.map +1 -1
- package/dist/error/reason.d.mts +2 -3
- package/dist/error/reason.d.mts.map +1 -1
- package/dist/error/status.d.cts +6 -7
- package/dist/error/status.d.cts.map +1 -1
- package/dist/error/status.d.mts +6 -7
- package/dist/error/status.d.mts.map +1 -1
- package/dist/google-one-tap/index.d.cts +8 -9
- package/dist/google-one-tap/index.d.cts.map +1 -1
- package/dist/google-one-tap/index.d.mts +8 -9
- package/dist/google-one-tap/index.d.mts.map +1 -1
- package/dist/google-one-tap/types.d.cts +6 -7
- package/dist/google-one-tap/types.d.cts.map +1 -1
- package/dist/google-one-tap/types.d.mts +6 -7
- package/dist/google-one-tap/types.d.mts.map +1 -1
- package/dist/hono/authorizer.d.cts +3 -4
- package/dist/hono/authorizer.d.cts.map +1 -1
- package/dist/hono/authorizer.d.mts +3 -4
- package/dist/hono/authorizer.d.mts.map +1 -1
- package/dist/hono/csrf.d.cts +3 -4
- package/dist/hono/csrf.d.cts.map +1 -1
- package/dist/hono/csrf.d.mts +3 -4
- package/dist/hono/csrf.d.mts.map +1 -1
- package/dist/hono/geolocation.d.cts +1 -2
- package/dist/hono/geolocation.d.cts.map +1 -1
- package/dist/hono/geolocation.d.mts +1 -2
- package/dist/hono/geolocation.d.mts.map +1 -1
- package/dist/hono/handler.d.cts +4 -5
- package/dist/hono/handler.d.cts.map +1 -1
- package/dist/hono/handler.d.mts +4 -5
- package/dist/hono/handler.d.mts.map +1 -1
- package/dist/hono/index.cjs +1 -0
- package/dist/hono/index.d.cts +2 -2
- package/dist/hono/index.d.mts +2 -2
- package/dist/hono/index.mjs +2 -2
- package/dist/hono/rate-limit.d.cts +5 -6
- package/dist/hono/rate-limit.d.cts.map +1 -1
- package/dist/hono/rate-limit.d.mts +5 -6
- package/dist/hono/rate-limit.d.mts.map +1 -1
- package/dist/hono/validator.cjs +40 -14
- package/dist/hono/validator.cjs.map +1 -1
- package/dist/hono/validator.d.cts +34 -17
- package/dist/hono/validator.d.cts.map +1 -1
- package/dist/hono/validator.d.mts +34 -17
- package/dist/hono/validator.d.mts.map +1 -1
- package/dist/hono/validator.mjs +40 -15
- package/dist/hono/validator.mjs.map +1 -1
- package/dist/iso/iso-3601-1.d.cts +2 -3
- package/dist/iso/iso-3601-1.d.cts.map +1 -1
- package/dist/iso/iso-3601-1.d.mts +2 -3
- package/dist/iso/iso-3601-1.d.mts.map +1 -1
- package/dist/max-length/index.d.cts +23 -23
- package/dist/max-length/index.d.cts.map +1 -1
- package/dist/max-length/index.d.mts +23 -23
- package/dist/max-length/index.d.mts.map +1 -1
- package/dist/message.d.cts +1 -2
- package/dist/message.d.cts.map +1 -1
- package/dist/message.d.mts +1 -2
- package/dist/message.d.mts.map +1 -1
- package/dist/response.d.cts +18 -19
- package/dist/response.d.cts.map +1 -1
- package/dist/response.d.mts +18 -19
- package/dist/response.d.mts.map +1 -1
- package/dist/snowflake.d.cts +2 -3
- package/dist/snowflake.d.cts.map +1 -1
- package/dist/snowflake.d.mts +2 -3
- package/dist/snowflake.d.mts.map +1 -1
- package/dist/utils/geolocation.d.cts +5 -6
- package/dist/utils/geolocation.d.cts.map +1 -1
- package/dist/utils/geolocation.d.mts +5 -6
- package/dist/utils/geolocation.d.mts.map +1 -1
- package/dist/utils/google-tag-gateway.d.cts +1 -2
- package/dist/utils/google-tag-gateway.d.cts.map +1 -1
- package/dist/utils/google-tag-gateway.d.mts +1 -2
- package/dist/utils/google-tag-gateway.d.mts.map +1 -1
- package/dist/utils/timing.d.cts +2 -3
- package/dist/utils/timing.d.cts.map +1 -1
- package/dist/utils/timing.d.mts +2 -3
- package/dist/utils/timing.d.mts.map +1 -1
- package/dist/webhook/index.d.cts +1 -2
- package/dist/webhook/index.d.cts.map +1 -1
- package/dist/webhook/index.d.mts +1 -2
- package/dist/webhook/index.d.mts.map +1 -1
- package/package.json +9 -9
package/dist/response.d.cts
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
//#region src/response.d.ts
|
|
2
|
-
type Empty = {};
|
|
3
|
-
type EntityId = string | number;
|
|
4
|
-
type Entity = {
|
|
2
|
+
export type Empty = {};
|
|
3
|
+
export type EntityId = string | number;
|
|
4
|
+
export type Entity = {
|
|
5
5
|
id: EntityId;
|
|
6
6
|
};
|
|
7
|
-
type Response<T = never> = {
|
|
7
|
+
export type Response<T = never> = {
|
|
8
8
|
data: T;
|
|
9
9
|
};
|
|
10
|
-
type InitParams = {
|
|
10
|
+
export type InitParams = {
|
|
11
11
|
limit: number;
|
|
12
12
|
parent?: string;
|
|
13
13
|
};
|
|
14
|
-
type NextParams = {
|
|
14
|
+
export type NextParams = {
|
|
15
15
|
limit: number;
|
|
16
16
|
parent?: string;
|
|
17
17
|
next: string;
|
|
18
18
|
};
|
|
19
|
-
type PrevParams = {
|
|
19
|
+
export type PrevParams = {
|
|
20
20
|
limit: number;
|
|
21
21
|
parent?: string;
|
|
22
22
|
prev: string;
|
|
23
23
|
};
|
|
24
|
-
type PageParams = {
|
|
24
|
+
export type PageParams = {
|
|
25
25
|
limit: number;
|
|
26
26
|
prev?: string;
|
|
27
27
|
next?: string;
|
|
28
28
|
};
|
|
29
|
-
type ParentPageParams = {
|
|
29
|
+
export type ParentPageParams = {
|
|
30
30
|
limit: number;
|
|
31
31
|
parent: string;
|
|
32
32
|
prev?: string;
|
|
33
33
|
next?: string;
|
|
34
34
|
};
|
|
35
|
-
type Page<T = never> = {
|
|
35
|
+
export type Page<T = never> = {
|
|
36
36
|
data: T[];
|
|
37
37
|
paging: {
|
|
38
38
|
next?: string;
|
|
39
39
|
prev?: string;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
declare function pageParamsSchema(max?: number, defaultLimit?: number): import("zod/mini").ZodMiniObject<{
|
|
42
|
+
export declare function pageParamsSchema(max?: number, defaultLimit?: number): import("zod/mini").ZodMiniObject<{
|
|
43
43
|
limit: import("zod/mini").ZodMiniDefault<import("zod/mini").ZodMiniNumber<unknown>>;
|
|
44
44
|
prev: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
45
45
|
next: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
46
46
|
}, import("zod/v4/core").$strip>;
|
|
47
|
-
declare const Cursor: {
|
|
47
|
+
export declare const Cursor: {
|
|
48
48
|
of(prev: bigint | number | string | undefined, next: bigint | number | string | undefined): Page['paging'];
|
|
49
49
|
empty(): Page['paging'];
|
|
50
50
|
encode(id: bigint | number | string | undefined): string | undefined;
|
|
51
51
|
decode<T extends 'bigint' | 'number' | 'string' = 'bigint'>(token: string, type?: T): T extends 'bigint' ? bigint : T extends 'number' ? number : string;
|
|
52
52
|
};
|
|
53
|
-
declare const initialPageParam: Page['paging'];
|
|
54
|
-
declare function getPreviousPageParam<T = never>(first: Page<T>): Page['paging'] | null;
|
|
55
|
-
declare function getNextPageParam<T = never>(last: Page<T>): Page['paging'] | null;
|
|
56
|
-
type InfinitePageData<T> = {
|
|
53
|
+
export declare const initialPageParam: Page['paging'];
|
|
54
|
+
export declare function getPreviousPageParam<T = never>(first: Page<T>): Page['paging'] | null;
|
|
55
|
+
export declare function getNextPageParam<T = never>(last: Page<T>): Page['paging'] | null;
|
|
56
|
+
export type InfinitePageData<T> = {
|
|
57
57
|
pages: Array<Page<T>>;
|
|
58
58
|
pageParams: Array<Page['paging']>;
|
|
59
59
|
};
|
|
60
|
-
declare const Pages: {
|
|
60
|
+
export declare const Pages: {
|
|
61
61
|
flatten<T>(data: InfinitePageData<T>): T[];
|
|
62
62
|
dedupe<T extends Entity>(data: InfinitePageData<T>): T[];
|
|
63
63
|
prepend<T>(item: T): (data: InfinitePageData<T> | undefined) => InfinitePageData<T> | undefined;
|
|
@@ -67,7 +67,7 @@ declare const Pages: {
|
|
|
67
67
|
remove<T>(predicate: (item: T) => boolean): (data: InfinitePageData<T> | undefined) => InfinitePageData<T> | undefined;
|
|
68
68
|
removeById<T extends Entity>(id: EntityId): (data: InfinitePageData<T> | undefined) => InfinitePageData<T> | undefined;
|
|
69
69
|
};
|
|
70
|
-
declare const Items: {
|
|
70
|
+
export declare const Items: {
|
|
71
71
|
push<T>(newItems: T[]): (data: T[] | undefined) => T[] | undefined;
|
|
72
72
|
unshift<T>(newItems: T[]): (data: T[] | undefined) => T[] | undefined;
|
|
73
73
|
pushAndDedupe<T extends Entity>(newItems: T[]): (data: T[] | undefined) => T[] | undefined;
|
|
@@ -78,5 +78,4 @@ declare const Items: {
|
|
|
78
78
|
removeById<T extends Entity>(id: EntityId): (data: T[] | undefined) => T[] | undefined;
|
|
79
79
|
};
|
|
80
80
|
//#endregion
|
|
81
|
-
export { Cursor, Empty, Entity, EntityId, InfinitePageData, InitParams, Items, NextParams, Page, PageParams, Pages, ParentPageParams, PrevParams, Response, getNextPageParam, getPreviousPageParam, initialPageParam, pageParamsSchema };
|
|
82
81
|
//# sourceMappingURL=response.d.cts.map
|
package/dist/response.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.cts","names":[],"sources":["../src/response.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"response.d.cts","names":[],"sources":["../src/response.ts"],"mappings":";YAIY;YACA;YACA;EAAW,IAAI;;YAEf,SAAS;EAAe,MAAM;;YAE9B;EAAe;EAAe;;YAC9B;EAAe;EAAe;EAAiB;;YAC/C;EAAe;EAAe;EAAiB;;YAC/C;EAAe;EAAe;EAAe;;YAC7C;EAAqB;EAAe;EAAgB;EAAe;;YACnE,KAAK;EAAe,MAAM;EAAK;IAAU;IAAe;;;wBAEpD,iBAAiB,cAAW,2CAAiB;;;;yBAM5D;qBAEY;EACX,GAAE,4CAC0C,6CAEzC;EAMH,SAAS;EAGT,OAAM;EAIN,OAAO,qDAAmD,eAC3C,OACP,IACL,8BAA8B;;qBAUtB,kBAAkB;wBAEf,qBAAqB,WAAW,OAAO,KAAK,KAAK;wBAIjD,iBAAiB,WAAW,MAAM,KAAK,KAAK;YAIhD,iBAAiB;EAC3B,OAAO,MAAM,KAAK;EAClB,YAAY,MAAM;;qBAGP;EACX,QAAQ,GAAC,MAAQ,iBAAiB,KAAK;EAGvC,OAAO,UAAU,QAAM,MAAQ,iBAAiB,KAAK;EAarD,QAAQ,GAAC,MAAQ,KAAC,MACF,iBAAiB,mBAAiB,iBAAiB;EAQnE,OAAO,GAAC,MAAQ,KAAC,MACD,iBAAiB,mBAAiB,iBAAiB;EAQnE,OAAO,GAAC,SAAW,GAAC,YAAc,MAAM,iBAAa,MACrC,iBAAiB,mBAAiB,iBAAiB;EAWnE,WAAW,UAAU,QAAM,SAAW,KAAC,MAAA,iBAAA,mBAAA,iBAAA;EAGvC,OAAO,GAAC,YAAc,MAAM,iBAAa,MACzB,iBAAiB,mBAAiB,iBAAiB;EAWnE,WAAW,UAAU,QAAM,IAAM,YAAQ,MAAA,iBAAA,mBAAA,iBAAA;;qBAK9B;EACX,KAAK,GAAC,UAAY,OAAG,MACL,oBAAkB;EAKlC,QAAQ,GAAC,UAAY,OAAG,MACR,oBAAkB;EAKlC,cAAc,UAAU,QAAM,UAAY,OAAG,MAC7B,oBAAkB;EAmBlC,iBAAiB,UAAU,QAAM,UAAY,OAAG,MAChC,oBAAkB;EAmBlC,OAAO,GAAC,SAAW,GAAC,YAAc,MAAM,iBAAa,MACrC,oBAAkB;EAKlC,WAAW,UAAU,QAAM,SAAW,KAAC,MAAA,oBAAA;EAGvC,OAAO,GAAC,YAAc,MAAM,iBAAa,MACzB,oBAAkB;EAKlC,WAAW,UAAU,QAAM,IAAM,YAAQ,MAAA,oBAAA"}
|
package/dist/response.d.mts
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
//#region src/response.d.ts
|
|
2
|
-
type Empty = {};
|
|
3
|
-
type EntityId = string | number;
|
|
4
|
-
type Entity = {
|
|
2
|
+
export type Empty = {};
|
|
3
|
+
export type EntityId = string | number;
|
|
4
|
+
export type Entity = {
|
|
5
5
|
id: EntityId;
|
|
6
6
|
};
|
|
7
|
-
type Response<T = never> = {
|
|
7
|
+
export type Response<T = never> = {
|
|
8
8
|
data: T;
|
|
9
9
|
};
|
|
10
|
-
type InitParams = {
|
|
10
|
+
export type InitParams = {
|
|
11
11
|
limit: number;
|
|
12
12
|
parent?: string;
|
|
13
13
|
};
|
|
14
|
-
type NextParams = {
|
|
14
|
+
export type NextParams = {
|
|
15
15
|
limit: number;
|
|
16
16
|
parent?: string;
|
|
17
17
|
next: string;
|
|
18
18
|
};
|
|
19
|
-
type PrevParams = {
|
|
19
|
+
export type PrevParams = {
|
|
20
20
|
limit: number;
|
|
21
21
|
parent?: string;
|
|
22
22
|
prev: string;
|
|
23
23
|
};
|
|
24
|
-
type PageParams = {
|
|
24
|
+
export type PageParams = {
|
|
25
25
|
limit: number;
|
|
26
26
|
prev?: string;
|
|
27
27
|
next?: string;
|
|
28
28
|
};
|
|
29
|
-
type ParentPageParams = {
|
|
29
|
+
export type ParentPageParams = {
|
|
30
30
|
limit: number;
|
|
31
31
|
parent: string;
|
|
32
32
|
prev?: string;
|
|
33
33
|
next?: string;
|
|
34
34
|
};
|
|
35
|
-
type Page<T = never> = {
|
|
35
|
+
export type Page<T = never> = {
|
|
36
36
|
data: T[];
|
|
37
37
|
paging: {
|
|
38
38
|
next?: string;
|
|
39
39
|
prev?: string;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
declare function pageParamsSchema(max?: number, defaultLimit?: number): import("zod/mini").ZodMiniObject<{
|
|
42
|
+
export declare function pageParamsSchema(max?: number, defaultLimit?: number): import("zod/mini").ZodMiniObject<{
|
|
43
43
|
limit: import("zod/mini").ZodMiniDefault<import("zod/mini").ZodMiniNumber<unknown>>;
|
|
44
44
|
prev: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
45
45
|
next: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
|
|
46
46
|
}, import("zod/v4/core").$strip>;
|
|
47
|
-
declare const Cursor: {
|
|
47
|
+
export declare const Cursor: {
|
|
48
48
|
of(prev: bigint | number | string | undefined, next: bigint | number | string | undefined): Page['paging'];
|
|
49
49
|
empty(): Page['paging'];
|
|
50
50
|
encode(id: bigint | number | string | undefined): string | undefined;
|
|
51
51
|
decode<T extends 'bigint' | 'number' | 'string' = 'bigint'>(token: string, type?: T): T extends 'bigint' ? bigint : T extends 'number' ? number : string;
|
|
52
52
|
};
|
|
53
|
-
declare const initialPageParam: Page['paging'];
|
|
54
|
-
declare function getPreviousPageParam<T = never>(first: Page<T>): Page['paging'] | null;
|
|
55
|
-
declare function getNextPageParam<T = never>(last: Page<T>): Page['paging'] | null;
|
|
56
|
-
type InfinitePageData<T> = {
|
|
53
|
+
export declare const initialPageParam: Page['paging'];
|
|
54
|
+
export declare function getPreviousPageParam<T = never>(first: Page<T>): Page['paging'] | null;
|
|
55
|
+
export declare function getNextPageParam<T = never>(last: Page<T>): Page['paging'] | null;
|
|
56
|
+
export type InfinitePageData<T> = {
|
|
57
57
|
pages: Array<Page<T>>;
|
|
58
58
|
pageParams: Array<Page['paging']>;
|
|
59
59
|
};
|
|
60
|
-
declare const Pages: {
|
|
60
|
+
export declare const Pages: {
|
|
61
61
|
flatten<T>(data: InfinitePageData<T>): T[];
|
|
62
62
|
dedupe<T extends Entity>(data: InfinitePageData<T>): T[];
|
|
63
63
|
prepend<T>(item: T): (data: InfinitePageData<T> | undefined) => InfinitePageData<T> | undefined;
|
|
@@ -67,7 +67,7 @@ declare const Pages: {
|
|
|
67
67
|
remove<T>(predicate: (item: T) => boolean): (data: InfinitePageData<T> | undefined) => InfinitePageData<T> | undefined;
|
|
68
68
|
removeById<T extends Entity>(id: EntityId): (data: InfinitePageData<T> | undefined) => InfinitePageData<T> | undefined;
|
|
69
69
|
};
|
|
70
|
-
declare const Items: {
|
|
70
|
+
export declare const Items: {
|
|
71
71
|
push<T>(newItems: T[]): (data: T[] | undefined) => T[] | undefined;
|
|
72
72
|
unshift<T>(newItems: T[]): (data: T[] | undefined) => T[] | undefined;
|
|
73
73
|
pushAndDedupe<T extends Entity>(newItems: T[]): (data: T[] | undefined) => T[] | undefined;
|
|
@@ -78,5 +78,4 @@ declare const Items: {
|
|
|
78
78
|
removeById<T extends Entity>(id: EntityId): (data: T[] | undefined) => T[] | undefined;
|
|
79
79
|
};
|
|
80
80
|
//#endregion
|
|
81
|
-
export { Cursor, Empty, Entity, EntityId, InfinitePageData, InitParams, Items, NextParams, Page, PageParams, Pages, ParentPageParams, PrevParams, Response, getNextPageParam, getPreviousPageParam, initialPageParam, pageParamsSchema };
|
|
82
81
|
//# sourceMappingURL=response.d.mts.map
|
package/dist/response.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.mts","names":[],"sources":["../src/response.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"response.d.mts","names":[],"sources":["../src/response.ts"],"mappings":";YAIY;YACA;YACA;EAAW,IAAI;;YAEf,SAAS;EAAe,MAAM;;YAE9B;EAAe;EAAe;;YAC9B;EAAe;EAAe;EAAiB;;YAC/C;EAAe;EAAe;EAAiB;;YAC/C;EAAe;EAAe;EAAe;;YAC7C;EAAqB;EAAe;EAAgB;EAAe;;YACnE,KAAK;EAAe,MAAM;EAAK;IAAU;IAAe;;;wBAEpD,iBAAiB,cAAW,2CAAiB;;;;yBAM5D;qBAEY;EACX,GAAE,4CAC0C,6CAEzC;EAMH,SAAS;EAGT,OAAM;EAIN,OAAO,qDAAmD,eAC3C,OACP,IACL,8BAA8B;;qBAUtB,kBAAkB;wBAEf,qBAAqB,WAAW,OAAO,KAAK,KAAK;wBAIjD,iBAAiB,WAAW,MAAM,KAAK,KAAK;YAIhD,iBAAiB;EAC3B,OAAO,MAAM,KAAK;EAClB,YAAY,MAAM;;qBAGP;EACX,QAAQ,GAAC,MAAQ,iBAAiB,KAAK;EAGvC,OAAO,UAAU,QAAM,MAAQ,iBAAiB,KAAK;EAarD,QAAQ,GAAC,MAAQ,KAAC,MACF,iBAAiB,mBAAiB,iBAAiB;EAQnE,OAAO,GAAC,MAAQ,KAAC,MACD,iBAAiB,mBAAiB,iBAAiB;EAQnE,OAAO,GAAC,SAAW,GAAC,YAAc,MAAM,iBAAa,MACrC,iBAAiB,mBAAiB,iBAAiB;EAWnE,WAAW,UAAU,QAAM,SAAW,KAAC,MAAA,iBAAA,mBAAA,iBAAA;EAGvC,OAAO,GAAC,YAAc,MAAM,iBAAa,MACzB,iBAAiB,mBAAiB,iBAAiB;EAWnE,WAAW,UAAU,QAAM,IAAM,YAAQ,MAAA,iBAAA,mBAAA,iBAAA;;qBAK9B;EACX,KAAK,GAAC,UAAY,OAAG,MACL,oBAAkB;EAKlC,QAAQ,GAAC,UAAY,OAAG,MACR,oBAAkB;EAKlC,cAAc,UAAU,QAAM,UAAY,OAAG,MAC7B,oBAAkB;EAmBlC,iBAAiB,UAAU,QAAM,UAAY,OAAG,MAChC,oBAAkB;EAmBlC,OAAO,GAAC,SAAW,GAAC,YAAc,MAAM,iBAAa,MACrC,oBAAkB;EAKlC,WAAW,UAAU,QAAM,SAAW,KAAC,MAAA,oBAAA;EAGvC,OAAO,GAAC,YAAc,MAAM,iBAAa,MACzB,oBAAkB;EAKlC,WAAW,UAAU,QAAM,IAAM,YAAQ,MAAA,oBAAA"}
|
package/dist/snowflake.d.cts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* +----------------------+----------------+-----------+
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
declare class UidGenerator {
|
|
13
|
+
export declare class UidGenerator {
|
|
14
14
|
readonly MAX: bigint;
|
|
15
15
|
private readonly machineBits;
|
|
16
16
|
private readonly sequenceBits;
|
|
@@ -25,7 +25,6 @@ declare class UidGenerator {
|
|
|
25
25
|
constructor(mackineId: number);
|
|
26
26
|
readonly next: () => bigint;
|
|
27
27
|
}
|
|
28
|
-
declare const uid: UidGenerator;
|
|
28
|
+
export declare const uid: UidGenerator;
|
|
29
29
|
//#endregion
|
|
30
|
-
export { UidGenerator, uid };
|
|
31
30
|
//# sourceMappingURL=snowflake.d.cts.map
|
package/dist/snowflake.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snowflake.d.cts","names":[],"sources":["../src/snowflake.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"snowflake.d.cts","names":[],"sources":["../src/snowflake.ts"],"mappings":";;;;;;;;;;;;qBAoBa;WACK;mBACC;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;UACT;UACA;EAER,YAAY;WAII;;qBAwBL,KAAG"}
|
package/dist/snowflake.d.mts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* +----------------------+----------------+-----------+
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
declare class UidGenerator {
|
|
13
|
+
export declare class UidGenerator {
|
|
14
14
|
readonly MAX: bigint;
|
|
15
15
|
private readonly machineBits;
|
|
16
16
|
private readonly sequenceBits;
|
|
@@ -25,7 +25,6 @@ declare class UidGenerator {
|
|
|
25
25
|
constructor(mackineId: number);
|
|
26
26
|
readonly next: () => bigint;
|
|
27
27
|
}
|
|
28
|
-
declare const uid: UidGenerator;
|
|
28
|
+
export declare const uid: UidGenerator;
|
|
29
29
|
//#endregion
|
|
30
|
-
export { UidGenerator, uid };
|
|
31
30
|
//# sourceMappingURL=snowflake.d.mts.map
|
package/dist/snowflake.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snowflake.d.mts","names":[],"sources":["../src/snowflake.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"snowflake.d.mts","names":[],"sources":["../src/snowflake.ts"],"mappings":";;;;;;;;;;;;qBAoBa;WACK;mBACC;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;UACT;UACA;EAER,YAAY;WAII;;qBAwBL,KAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/utils/geolocation.d.ts
|
|
2
|
-
type Geolocation = {
|
|
2
|
+
export type Geolocation = {
|
|
3
3
|
ip_address?: string;
|
|
4
4
|
city?: string;
|
|
5
5
|
country?: string;
|
|
@@ -12,12 +12,11 @@ type Geolocation = {
|
|
|
12
12
|
time_zone?: string;
|
|
13
13
|
};
|
|
14
14
|
/** reference: https://developers.cloudflare.com/rules/transform/managed-transforms/reference/#add-visitor-location-headers */
|
|
15
|
-
declare function getGeolocationFromCloudflare(r: Request): Geolocation;
|
|
15
|
+
export declare function getGeolocationFromCloudflare(r: Request): Geolocation;
|
|
16
16
|
/** reference: https://github.com/vercel/vercel/blob/main/packages/functions/src/headers.ts */
|
|
17
|
-
declare function getGeolocationFromVercel(r: Request): Geolocation;
|
|
17
|
+
export declare function getGeolocationFromVercel(r: Request): Geolocation;
|
|
18
18
|
/** reference: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/adding-cloudfront-headers.html#cloudfront-headers-viewer-location */
|
|
19
|
-
declare function getGeolocationFromCloudfront(r: Request): Geolocation;
|
|
20
|
-
declare function getGeolocation(r: Request): Geolocation;
|
|
19
|
+
export declare function getGeolocationFromCloudfront(r: Request): Geolocation;
|
|
20
|
+
export declare function getGeolocation(r: Request): Geolocation;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { Geolocation, getGeolocation, getGeolocationFromCloudflare, getGeolocationFromCloudfront, getGeolocationFromVercel };
|
|
23
22
|
//# sourceMappingURL=geolocation.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geolocation.d.cts","names":[],"sources":["../../src/utils/geolocation.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"geolocation.d.cts","names":[],"sources":["../../src/utils/geolocation.ts"],"mappings":";YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;wBAQc,6BAA6B,GAAG,UAAU;;wBAgB1C,yBAAyB,GAAG,UAAU;;wBAoBtC,6BAA6B,GAAG,UAAU;wBAc1C,eAAe,GAAG,UAAU"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/utils/geolocation.d.ts
|
|
2
|
-
type Geolocation = {
|
|
2
|
+
export type Geolocation = {
|
|
3
3
|
ip_address?: string;
|
|
4
4
|
city?: string;
|
|
5
5
|
country?: string;
|
|
@@ -12,12 +12,11 @@ type Geolocation = {
|
|
|
12
12
|
time_zone?: string;
|
|
13
13
|
};
|
|
14
14
|
/** reference: https://developers.cloudflare.com/rules/transform/managed-transforms/reference/#add-visitor-location-headers */
|
|
15
|
-
declare function getGeolocationFromCloudflare(r: Request): Geolocation;
|
|
15
|
+
export declare function getGeolocationFromCloudflare(r: Request): Geolocation;
|
|
16
16
|
/** reference: https://github.com/vercel/vercel/blob/main/packages/functions/src/headers.ts */
|
|
17
|
-
declare function getGeolocationFromVercel(r: Request): Geolocation;
|
|
17
|
+
export declare function getGeolocationFromVercel(r: Request): Geolocation;
|
|
18
18
|
/** reference: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/adding-cloudfront-headers.html#cloudfront-headers-viewer-location */
|
|
19
|
-
declare function getGeolocationFromCloudfront(r: Request): Geolocation;
|
|
20
|
-
declare function getGeolocation(r: Request): Geolocation;
|
|
19
|
+
export declare function getGeolocationFromCloudfront(r: Request): Geolocation;
|
|
20
|
+
export declare function getGeolocation(r: Request): Geolocation;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { Geolocation, getGeolocation, getGeolocationFromCloudflare, getGeolocationFromCloudfront, getGeolocationFromVercel };
|
|
23
22
|
//# sourceMappingURL=geolocation.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geolocation.d.mts","names":[],"sources":["../../src/utils/geolocation.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"geolocation.d.mts","names":[],"sources":["../../src/utils/geolocation.ts"],"mappings":";YAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;wBAQc,6BAA6B,GAAG,UAAU;;wBAgB1C,yBAAyB,GAAG,UAAU;;wBAoBtC,6BAA6B,GAAG,UAAU;wBAc1C,eAAe,GAAG,UAAU"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* should read ok. Verify that geographical information is being included by navigating to:
|
|
5
5
|
* https://example.com/metrics/?validate_geo=healthy. The page should read ok.
|
|
6
6
|
*/
|
|
7
|
-
declare function forwardToGoogleTagGateway(request: Request, gaId: string): Promise<Response>;
|
|
7
|
+
export declare function forwardToGoogleTagGateway(request: Request, gaId: string): Promise<Response>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { forwardToGoogleTagGateway };
|
|
10
9
|
//# sourceMappingURL=google-tag-gateway.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-tag-gateway.d.cts","names":[],"sources":["../../src/utils/google-tag-gateway.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"google-tag-gateway.d.cts","names":[],"sources":["../../src/utils/google-tag-gateway.ts"],"mappings":";;;;;;wBAOsB,0BAA0B,SAAS,SAAS,eAAY,QAAA"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* should read ok. Verify that geographical information is being included by navigating to:
|
|
5
5
|
* https://example.com/metrics/?validate_geo=healthy. The page should read ok.
|
|
6
6
|
*/
|
|
7
|
-
declare function forwardToGoogleTagGateway(request: Request, gaId: string): Promise<Response>;
|
|
7
|
+
export declare function forwardToGoogleTagGateway(request: Request, gaId: string): Promise<Response>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { forwardToGoogleTagGateway };
|
|
10
9
|
//# sourceMappingURL=google-tag-gateway.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-tag-gateway.d.mts","names":[],"sources":["../../src/utils/google-tag-gateway.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"google-tag-gateway.d.mts","names":[],"sources":["../../src/utils/google-tag-gateway.ts"],"mappings":";;;;;;wBAOsB,0BAA0B,SAAS,SAAS,eAAY,QAAA"}
|
package/dist/utils/timing.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/utils/timing.d.ts
|
|
2
|
-
interface Options {
|
|
2
|
+
export interface Options {
|
|
3
3
|
enabled: boolean;
|
|
4
4
|
crossOrigin?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function timing(options?: Options): {
|
|
6
|
+
export declare function timing(options?: Options): {
|
|
7
7
|
startTime: (name: Lowercase<string>, description?: string) => void;
|
|
8
8
|
endTime: (name: Lowercase<string>, precision?: number) => void;
|
|
9
9
|
mark: (name: Lowercase<string>, description?: string, precision?: number) => void;
|
|
@@ -11,5 +11,4 @@ declare function timing(options?: Options): {
|
|
|
11
11
|
setTiming: (response: Response) => void;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
|
-
export { Options, timing };
|
|
15
14
|
//# sourceMappingURL=timing.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.d.cts","names":[],"sources":["../../src/utils/timing.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"timing.d.cts","names":[],"sources":["../../src/utils/timing.ts"],"mappings":";iBAKiB;EACf;EACA;;wBAGc,OAAO,UAAS;EAO5B,YAAS,MAAS,mBAAiB;EAGnC,UAAO,MAAS,mBAAiB;EAcjC,OAAI,MAAS,mBAAiB,sBAAsB;EAQpD,YAAS,MACD,mBAAiB,oCACW,sBACd;EActB,YAAS,UAAa"}
|
package/dist/utils/timing.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/utils/timing.d.ts
|
|
2
|
-
interface Options {
|
|
2
|
+
export interface Options {
|
|
3
3
|
enabled: boolean;
|
|
4
4
|
crossOrigin?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function timing(options?: Options): {
|
|
6
|
+
export declare function timing(options?: Options): {
|
|
7
7
|
startTime: (name: Lowercase<string>, description?: string) => void;
|
|
8
8
|
endTime: (name: Lowercase<string>, precision?: number) => void;
|
|
9
9
|
mark: (name: Lowercase<string>, description?: string, precision?: number) => void;
|
|
@@ -11,5 +11,4 @@ declare function timing(options?: Options): {
|
|
|
11
11
|
setTiming: (response: Response) => void;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
|
-
export { Options, timing };
|
|
15
14
|
//# sourceMappingURL=timing.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.d.mts","names":[],"sources":["../../src/utils/timing.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"timing.d.mts","names":[],"sources":["../../src/utils/timing.ts"],"mappings":";iBAKiB;EACf;EACA;;wBAGc,OAAO,UAAS;EAO5B,YAAS,MAAS,mBAAiB;EAGnC,UAAO,MAAS,mBAAiB;EAcjC,OAAI,MAAS,mBAAiB,sBAAsB;EAQpD,YAAS,MACD,mBAAiB,oCACW,sBACd;EActB,YAAS,UAAa"}
|
package/dist/webhook/index.d.cts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* const webhook = verifyStandardWebhook(c.req.header(), await c.req.text(), 'secret');
|
|
7
7
|
* ```
|
|
8
8
|
*/
|
|
9
|
-
declare function verifyStandardWebhook<T = unknown>(headers: Record<string, string>, payload: string, secret: string): T;
|
|
9
|
+
export declare function verifyStandardWebhook<T = unknown>(headers: Record<string, string>, payload: string, secret: string): T;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { verifyStandardWebhook };
|
|
12
11
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/webhook/index.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/webhook/index.ts"],"mappings":";;;;;;;;wBA2BgB,sBAAsB,aACpC,SAAS,wBACT,iBACA,iBACC"}
|
package/dist/webhook/index.d.mts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* const webhook = verifyStandardWebhook(c.req.header(), await c.req.text(), 'secret');
|
|
7
7
|
* ```
|
|
8
8
|
*/
|
|
9
|
-
declare function verifyStandardWebhook<T = unknown>(headers: Record<string, string>, payload: string, secret: string): T;
|
|
9
|
+
export declare function verifyStandardWebhook<T = unknown>(headers: Record<string, string>, payload: string, secret: string): T;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { verifyStandardWebhook };
|
|
12
11
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/webhook/index.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/webhook/index.ts"],"mappings":";;;;;;;;wBA2BgB,sBAAsB,aACpC,SAAS,wBACT,iBACA,iBACC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shware/http",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,20 +66,20 @@
|
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@shware/utils": "^1.6.
|
|
70
|
-
"vitest": "^
|
|
71
|
-
"zod": "^4.
|
|
69
|
+
"@shware/utils": "^1.6.2",
|
|
70
|
+
"vitest": "^5.0.2",
|
|
71
|
+
"zod": "^4.6.5"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@repo/typescript-config": "0.0.0",
|
|
75
|
-
"@types/node": "^26.3
|
|
76
|
-
"@types/react": "^19.
|
|
75
|
+
"@types/node": "^26.6.3",
|
|
76
|
+
"@types/react": "^19.3.0",
|
|
77
77
|
"typescript": "^7.0.2"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"hono": "^4.13.
|
|
81
|
-
"i18next": "^26.4.
|
|
82
|
-
"react": "^19.
|
|
80
|
+
"hono": "^4.13.9",
|
|
81
|
+
"i18next": "^26.4.2",
|
|
82
|
+
"react": "^19.3.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
85
85
|
"hono": {
|