@shware/http 2.11.3 → 2.12.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/_virtual/_rolldown/runtime.cjs +13 -0
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/cache/index.cjs +5 -30
- package/dist/cache/index.cjs.map +1 -1
- package/dist/cache/index.d.cts +7 -5
- package/dist/cache/index.d.cts.map +1 -0
- package/dist/cache/index.d.mts +11 -0
- package/dist/cache/index.d.mts.map +1 -0
- package/dist/cache/index.mjs +5 -6
- package/dist/cache/index.mjs.map +1 -1
- package/dist/error/detail.cjs +100 -90
- package/dist/error/detail.cjs.map +1 -1
- package/dist/error/detail.d.cts +77 -78
- package/dist/error/detail.d.cts.map +1 -0
- package/dist/error/detail.d.mts +108 -0
- package/dist/error/detail.d.mts.map +1 -0
- package/dist/error/detail.mjs +99 -65
- package/dist/error/detail.mjs.map +1 -1
- package/dist/error/i18n/en-us.cjs +5 -29
- package/dist/error/i18n/en-us.cjs.map +1 -1
- package/dist/error/i18n/en-us.d.cts +3 -1
- package/dist/error/i18n/en-us.d.cts.map +1 -0
- package/dist/error/i18n/en-us.d.mts +5 -0
- package/dist/error/i18n/en-us.d.mts.map +1 -0
- package/dist/error/i18n/en-us.mjs +5 -5
- package/dist/error/i18n/en-us.mjs.map +1 -1
- package/dist/error/index.cjs +29 -56
- package/dist/error/index.cjs.map +1 -1
- package/dist/error/index.d.cts +12 -10
- package/dist/error/index.d.cts.map +1 -0
- package/dist/error/index.d.mts +21 -0
- package/dist/error/index.d.mts.map +1 -0
- package/dist/error/index.mjs +25 -28
- package/dist/error/index.mjs.map +1 -1
- package/dist/error/parse.cjs +63 -61
- package/dist/error/parse.cjs.map +1 -1
- package/dist/error/parse.d.cts +8 -7
- package/dist/error/parse.d.cts.map +1 -0
- package/dist/error/{parse.d.ts → parse.d.mts} +8 -7
- package/dist/error/parse.d.mts.map +1 -0
- package/dist/error/parse.mjs +59 -33
- package/dist/error/parse.mjs.map +1 -1
- package/dist/error/reason.cjs +0 -19
- package/dist/error/reason.d.cts +5 -4
- package/dist/error/reason.d.cts.map +1 -0
- package/dist/error/reason.d.mts +6 -0
- package/dist/error/reason.d.mts.map +1 -0
- package/dist/error/reason.mjs +1 -1
- package/dist/error/status.cjs +103 -256
- package/dist/error/status.cjs.map +1 -1
- package/dist/error/status.d.cts +58 -58
- package/dist/error/status.d.cts.map +1 -0
- package/dist/error/status.d.mts +69 -0
- package/dist/error/status.d.mts.map +1 -0
- package/dist/error/status.mjs +98 -227
- package/dist/error/status.mjs.map +1 -1
- package/dist/google-one-tap/index.cjs +135 -138
- package/dist/google-one-tap/index.cjs.map +1 -1
- package/dist/google-one-tap/index.d.cts +49 -48
- package/dist/google-one-tap/index.d.cts.map +1 -0
- package/dist/google-one-tap/index.d.mts +82 -0
- package/dist/google-one-tap/index.d.mts.map +1 -0
- package/dist/google-one-tap/index.mjs +133 -112
- package/dist/google-one-tap/index.mjs.map +1 -1
- package/dist/google-one-tap/types.cjs +0 -19
- package/dist/google-one-tap/types.d.cts +124 -122
- package/dist/google-one-tap/types.d.cts.map +1 -0
- package/dist/google-one-tap/types.d.mts +157 -0
- package/dist/google-one-tap/types.d.mts.map +1 -0
- package/dist/google-one-tap/types.mjs +1 -1
- package/dist/hono/authorizer.cjs +28 -65
- package/dist/hono/authorizer.cjs.map +1 -1
- package/dist/hono/authorizer.d.cts +12 -11
- package/dist/hono/authorizer.d.cts.map +1 -0
- package/dist/hono/authorizer.d.mts +19 -0
- package/dist/hono/authorizer.d.mts.map +1 -0
- package/dist/hono/authorizer.mjs +23 -36
- package/dist/hono/authorizer.mjs.map +1 -1
- package/dist/hono/csrf.cjs +81 -92
- package/dist/hono/csrf.cjs.map +1 -1
- package/dist/hono/csrf.d.cts +46 -45
- package/dist/hono/csrf.d.cts.map +1 -0
- package/dist/hono/csrf.d.mts +76 -0
- package/dist/hono/csrf.d.mts.map +1 -0
- package/dist/hono/csrf.mjs +76 -63
- package/dist/hono/csrf.mjs.map +1 -1
- package/dist/hono/geolocation.cjs +10 -34
- package/dist/hono/geolocation.cjs.map +1 -1
- package/dist/hono/geolocation.d.cts +5 -4
- package/dist/hono/geolocation.d.cts.map +1 -0
- package/dist/hono/geolocation.d.mts +7 -0
- package/dist/hono/geolocation.d.mts.map +1 -0
- package/dist/hono/geolocation.mjs +8 -12
- package/dist/hono/geolocation.mjs.map +1 -1
- package/dist/hono/handler.cjs +37 -61
- package/dist/hono/handler.cjs.map +1 -1
- package/dist/hono/handler.d.cts +26 -25
- package/dist/hono/handler.d.cts.map +1 -0
- package/dist/hono/handler.d.mts +32 -0
- package/dist/hono/handler.d.mts.map +1 -0
- package/dist/hono/handler.mjs +34 -34
- package/dist/hono/handler.mjs.map +1 -1
- package/dist/hono/index.cjs +14 -48
- package/dist/hono/index.d.cts +7 -15
- package/dist/hono/index.d.mts +7 -0
- package/dist/hono/index.mjs +4 -14
- package/dist/hono/rate-limit.cjs +65 -110
- package/dist/hono/rate-limit.cjs.map +1 -1
- package/dist/hono/rate-limit.d.cts +27 -26
- package/dist/hono/rate-limit.d.cts.map +1 -0
- package/dist/hono/rate-limit.d.mts +36 -0
- package/dist/hono/rate-limit.d.mts.map +1 -0
- package/dist/hono/rate-limit.mjs +60 -81
- package/dist/hono/rate-limit.mjs.map +1 -1
- package/dist/hono/validator.cjs +47 -66
- package/dist/hono/validator.cjs.map +1 -1
- package/dist/hono/validator.d.cts +25 -30
- package/dist/hono/validator.d.cts.map +1 -0
- package/dist/hono/validator.d.mts +26 -0
- package/dist/hono/validator.d.mts.map +1 -0
- package/dist/hono/validator.mjs +43 -43
- package/dist/hono/validator.mjs.map +1 -1
- package/dist/index.cjs +39 -95
- package/dist/index.d.cts +12 -14
- package/dist/index.d.mts +12 -0
- package/dist/index.mjs +5 -48
- package/dist/iso/iso_3601_1.cjs +1512 -290
- package/dist/iso/iso_3601_1.cjs.map +1 -1
- package/dist/iso/iso_3601_1.d.cts +8 -6
- package/dist/iso/iso_3601_1.d.cts.map +1 -0
- package/dist/iso/iso_3601_1.d.mts +11 -0
- package/dist/iso/iso_3601_1.d.mts.map +1 -0
- package/dist/iso/iso_3601_1.mjs +1511 -265
- package/dist/iso/iso_3601_1.mjs.map +1 -1
- package/dist/max-length/index.cjs +158 -91
- package/dist/max-length/index.cjs.map +1 -1
- package/dist/max-length/index.d.cts +110 -1
- package/dist/max-length/index.d.cts.map +1 -0
- package/dist/{index-BhgdyigB.d.ts → max-length/index.d.mts} +9 -28
- package/dist/max-length/index.d.mts.map +1 -0
- package/dist/max-length/index.mjs +133 -47
- package/dist/max-length/index.mjs.map +1 -1
- package/dist/message.cjs +5 -30
- package/dist/message.cjs.map +1 -1
- package/dist/message.d.cts +3 -1
- package/dist/message.d.cts.map +1 -0
- package/dist/{message.d.ts → message.d.mts} +3 -1
- package/dist/message.d.mts.map +1 -0
- package/dist/message.mjs +5 -6
- package/dist/message.mjs.map +1 -1
- package/dist/polyfills/index.cjs +4 -4
- package/dist/polyfills/index.cjs.map +1 -1
- package/dist/polyfills/index.d.cts +1 -2
- package/dist/polyfills/index.d.mts +1 -0
- package/dist/polyfills/index.mjs +5 -2
- package/dist/polyfills/index.mjs.map +1 -1
- package/dist/response.cjs +191 -208
- package/dist/response.cjs.map +1 -1
- package/dist/response.d.cts +53 -54
- package/dist/response.d.cts.map +1 -0
- package/dist/response.d.mts +82 -0
- package/dist/response.d.mts.map +1 -0
- package/dist/response.mjs +182 -175
- package/dist/response.mjs.map +1 -1
- package/dist/snowflake.cjs +48 -70
- package/dist/snowflake.cjs.map +1 -1
- package/dist/snowflake.d.cts +16 -14
- package/dist/snowflake.d.cts.map +1 -0
- package/dist/snowflake.d.mts +31 -0
- package/dist/snowflake.d.mts.map +1 -0
- package/dist/snowflake.mjs +46 -44
- package/dist/snowflake.mjs.map +1 -1
- package/dist/utils/geolocation.cjs +51 -75
- package/dist/utils/geolocation.cjs.map +1 -1
- package/dist/utils/geolocation.d.cts +14 -12
- package/dist/utils/geolocation.d.cts.map +1 -0
- package/dist/utils/{geolocation.d.ts → geolocation.d.mts} +14 -12
- package/dist/utils/geolocation.d.mts.map +1 -0
- package/dist/utils/geolocation.mjs +47 -47
- package/dist/utils/geolocation.mjs.map +1 -1
- package/dist/utils/google-tag-gateway.cjs +35 -56
- package/dist/utils/google-tag-gateway.cjs.map +1 -1
- package/dist/utils/google-tag-gateway.d.cts +3 -1
- package/dist/utils/google-tag-gateway.d.cts.map +1 -0
- package/dist/utils/{google-tag-gateway.d.ts → google-tag-gateway.d.mts} +3 -1
- package/dist/utils/google-tag-gateway.d.mts.map +1 -0
- package/dist/utils/google-tag-gateway.mjs +33 -30
- package/dist/utils/google-tag-gateway.mjs.map +1 -1
- package/dist/utils/timing.cjs +50 -71
- package/dist/utils/timing.cjs.map +1 -1
- package/dist/utils/timing.d.cts +11 -9
- package/dist/utils/timing.d.cts.map +1 -0
- package/dist/utils/timing.d.mts +15 -0
- package/dist/utils/timing.d.mts.map +1 -0
- package/dist/utils/timing.mjs +49 -46
- package/dist/utils/timing.mjs.map +1 -1
- package/dist/webhook/index.cjs +43 -72
- package/dist/webhook/index.cjs.map +1 -1
- package/dist/webhook/index.d.cts +3 -1
- package/dist/webhook/index.d.cts.map +1 -0
- package/dist/webhook/{index.d.ts → index.d.mts} +3 -1
- package/dist/webhook/index.d.mts.map +1 -0
- package/dist/webhook/index.mjs +41 -46
- package/dist/webhook/index.mjs.map +1 -1
- package/package.json +50 -25
- package/dist/cache/index.d.ts +0 -9
- package/dist/error/detail.d.ts +0 -109
- package/dist/error/i18n/en-us.d.ts +0 -3
- package/dist/error/index.d.ts +0 -19
- package/dist/error/reason.cjs.map +0 -1
- package/dist/error/reason.d.ts +0 -5
- package/dist/error/reason.mjs.map +0 -1
- package/dist/error/status.d.ts +0 -69
- package/dist/google-one-tap/index.d.ts +0 -81
- package/dist/google-one-tap/types.cjs.map +0 -1
- package/dist/google-one-tap/types.d.ts +0 -155
- package/dist/google-one-tap/types.mjs.map +0 -1
- package/dist/hono/authorizer.d.ts +0 -18
- package/dist/hono/csrf.d.ts +0 -75
- package/dist/hono/geolocation.d.ts +0 -6
- package/dist/hono/handler.d.ts +0 -31
- package/dist/hono/index.cjs.map +0 -1
- package/dist/hono/index.d.ts +0 -15
- package/dist/hono/index.mjs.map +0 -1
- package/dist/hono/rate-limit.d.ts +0 -35
- package/dist/hono/validator.d.ts +0 -31
- package/dist/index-BhgdyigB.d.cts +0 -129
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -14
- package/dist/index.mjs.map +0 -1
- package/dist/iso/iso_3601_1.d.ts +0 -9
- package/dist/max-length/index.d.ts +0 -1
- package/dist/polyfills/index.d.ts +0 -2
- package/dist/response.d.ts +0 -83
- package/dist/snowflake.d.ts +0 -29
- package/dist/utils/timing.d.ts +0 -13
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
declare namespace index_d_exports {
|
|
2
|
+
export { AAID, ADVERTISING_ID, ANDROID_ID, COUNTRY_CODE, COUNTRY_CODE_ALPHA_2, COUNTRY_CODE_ALPHA_3, DEVICE_ID, EMAIL, EMAIL_DOMAIN, EMAIL_LOCAL_PART, IDFA, IDFV, IP, IPv4, IPv4_MAPPED_IPv6, IPv6, LANGUAGE_CODE, PHONE_NUMBER, TIMEZONE, TIMEZONE_LONGEST, UDID, UUID };
|
|
3
|
+
}
|
|
1
4
|
/**
|
|
2
5
|
* A Universally Unique Identifier (UUID) is a 36-character alphanumeric string that's typically represented in the following format:
|
|
3
6
|
* - Format: 8-4-4-4-12
|
|
@@ -99,31 +102,9 @@ declare const EMAIL: number;
|
|
|
99
102
|
* Reference: [E.164](https://en.wikipedia.org/wiki/E.164)
|
|
100
103
|
* */
|
|
101
104
|
declare const PHONE_NUMBER = 15;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
declare const index_COUNTRY_CODE_ALPHA_3: typeof COUNTRY_CODE_ALPHA_3;
|
|
109
|
-
declare const index_DEVICE_ID: typeof DEVICE_ID;
|
|
110
|
-
declare const index_EMAIL: typeof EMAIL;
|
|
111
|
-
declare const index_EMAIL_DOMAIN: typeof EMAIL_DOMAIN;
|
|
112
|
-
declare const index_EMAIL_LOCAL_PART: typeof EMAIL_LOCAL_PART;
|
|
113
|
-
declare const index_IDFA: typeof IDFA;
|
|
114
|
-
declare const index_IDFV: typeof IDFV;
|
|
115
|
-
declare const index_IP: typeof IP;
|
|
116
|
-
declare const index_IPv4: typeof IPv4;
|
|
117
|
-
declare const index_IPv4_MAPPED_IPv6: typeof IPv4_MAPPED_IPv6;
|
|
118
|
-
declare const index_IPv6: typeof IPv6;
|
|
119
|
-
declare const index_LANGUAGE_CODE: typeof LANGUAGE_CODE;
|
|
120
|
-
declare const index_PHONE_NUMBER: typeof PHONE_NUMBER;
|
|
121
|
-
declare const index_TIMEZONE: typeof TIMEZONE;
|
|
122
|
-
declare const index_TIMEZONE_LONGEST: typeof TIMEZONE_LONGEST;
|
|
123
|
-
declare const index_UDID: typeof UDID;
|
|
124
|
-
declare const index_UUID: typeof UUID;
|
|
125
|
-
declare namespace index {
|
|
126
|
-
export { index_AAID as AAID, index_ADVERTISING_ID as ADVERTISING_ID, index_ANDROID_ID as ANDROID_ID, index_COUNTRY_CODE as COUNTRY_CODE, index_COUNTRY_CODE_ALPHA_2 as COUNTRY_CODE_ALPHA_2, index_COUNTRY_CODE_ALPHA_3 as COUNTRY_CODE_ALPHA_3, index_DEVICE_ID as DEVICE_ID, index_EMAIL as EMAIL, index_EMAIL_DOMAIN as EMAIL_DOMAIN, index_EMAIL_LOCAL_PART as EMAIL_LOCAL_PART, index_IDFA as IDFA, index_IDFV as IDFV, index_IP as IP, index_IPv4 as IPv4, index_IPv4_MAPPED_IPv6 as IPv4_MAPPED_IPv6, index_IPv6 as IPv6, index_LANGUAGE_CODE as LANGUAGE_CODE, index_PHONE_NUMBER as PHONE_NUMBER, index_TIMEZONE as TIMEZONE, index_TIMEZONE_LONGEST as TIMEZONE_LONGEST, index_UDID as UDID, index_UUID as UUID };
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export { AAID as A, COUNTRY_CODE as C, DEVICE_ID as D, EMAIL as E, IDFA as I, LANGUAGE_CODE as L, PHONE_NUMBER as P, TIMEZONE as T, UDID as U, ADVERTISING_ID as a, ANDROID_ID as b, COUNTRY_CODE_ALPHA_2 as c, COUNTRY_CODE_ALPHA_3 as d, EMAIL_DOMAIN as e, EMAIL_LOCAL_PART as f, IDFV as g, IP as h, IPv4 as i, IPv4_MAPPED_IPv6 as j, IPv6 as k, TIMEZONE_LONGEST as l, UUID as m, index as n };
|
|
105
|
+
/**
|
|
106
|
+
* Reference: [How big can a user agent string get?](https://stackoverflow.com/questions/654921/how-big-can-a-user-agent-string-get)
|
|
107
|
+
* */
|
|
108
|
+
//#endregion
|
|
109
|
+
export { AAID, ADVERTISING_ID, ANDROID_ID, COUNTRY_CODE, COUNTRY_CODE_ALPHA_2, COUNTRY_CODE_ALPHA_3, DEVICE_ID, EMAIL, EMAIL_DOMAIN, EMAIL_LOCAL_PART, IDFA, IDFV, IP, IPv4, IPv4_MAPPED_IPv6, IPv6, LANGUAGE_CODE, PHONE_NUMBER, TIMEZONE, TIMEZONE_LONGEST, UDID, UUID, index_d_exports };
|
|
110
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/max-length/index.ts"],"mappings":";;;;;;;cAMa;;;;;;cAOA;;;;;;cAOA;;;;;;cAOA;;;;;;cAOA;;;;;;cAOA;;;;;;cAOA;;;;;;cAOA;;;;;cAMA;cACA;cACA;cACA;;;;;;;cAQA;cACA;;;;cAKA;cACA;cACA;;;;;;;;;;;;;;;;;;cAmBA;;;;;;;;cASA;cACA;cACA;;;;cAKA"}
|
|
@@ -1,48 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region src/max-length/index.ts
|
|
3
|
+
var max_length_exports = /* @__PURE__ */ __exportAll({
|
|
4
|
+
AAID: () => 36,
|
|
5
|
+
ADVERTISING_ID: () => 36,
|
|
6
|
+
ANDROID_ID: () => 16,
|
|
7
|
+
COUNTRY_CODE: () => 3,
|
|
8
|
+
COUNTRY_CODE_ALPHA_2: () => 2,
|
|
9
|
+
COUNTRY_CODE_ALPHA_3: () => 3,
|
|
10
|
+
DEVICE_ID: () => 36,
|
|
11
|
+
EMAIL: () => 320,
|
|
12
|
+
EMAIL_DOMAIN: () => 255,
|
|
13
|
+
EMAIL_LOCAL_PART: () => 64,
|
|
14
|
+
IDFA: () => 36,
|
|
15
|
+
IDFV: () => 36,
|
|
16
|
+
IP: () => 45,
|
|
17
|
+
IPv4: () => 15,
|
|
18
|
+
IPv4_MAPPED_IPv6: () => 45,
|
|
19
|
+
IPv6: () => 39,
|
|
20
|
+
LANGUAGE_CODE: () => 35,
|
|
21
|
+
PHONE_NUMBER: () => 15,
|
|
22
|
+
TIMEZONE: () => 64,
|
|
23
|
+
TIMEZONE_LONGEST: () => 32,
|
|
24
|
+
UDID: () => 40,
|
|
25
|
+
UUID: () => 36
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* A Universally Unique Identifier (UUID) is a 36-character alphanumeric string that's typically represented in the following format:
|
|
29
|
+
* - Format: 8-4-4-4-12
|
|
30
|
+
* */
|
|
31
|
+
const UUID = 36;
|
|
32
|
+
/**
|
|
33
|
+
* The length of an Apple device's unique device identifier (UDID) depends on the model of the device:
|
|
34
|
+
* - iPhone X and earlier: The UDID is a 40-character alphanumeric string
|
|
35
|
+
* - iPhone XS and later: The UDID is a 24-character string with a dash after the 8th digit
|
|
36
|
+
* */
|
|
37
|
+
const UDID = 40;
|
|
38
|
+
/**
|
|
39
|
+
* Apple's Identifier for Vendors (IDFV).
|
|
40
|
+
* - `var identifierForVendor: UUID? { get }` An alphanumeric string that uniquely identifies a device to the app’s vendor.
|
|
41
|
+
* - Reference: [identifierForVendor](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)
|
|
42
|
+
* */
|
|
43
|
+
const IDFV = 36;
|
|
44
|
+
/**
|
|
45
|
+
* Apple's Identifier for Advertisers (IDFA).
|
|
46
|
+
* - `var advertisingIdentifier: UUID { get }` The UUID that is specific to a device.
|
|
47
|
+
* - Reference: [advertisingIdentifier](https://developer.apple.com/documentation/adsupport/asidentifiermanager/advertisingidentifier)
|
|
48
|
+
* */
|
|
49
|
+
const IDFA = 36;
|
|
50
|
+
/**
|
|
51
|
+
* Android Device ID
|
|
52
|
+
* - 64-bit number (expressed as a hexadecimal string)
|
|
53
|
+
* - Reference: [ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID)
|
|
54
|
+
* */
|
|
55
|
+
const ANDROID_ID = 16;
|
|
56
|
+
/**
|
|
57
|
+
* - Web Device ID: UUID v4
|
|
58
|
+
* - iOS Device ID: IDFV
|
|
59
|
+
* - Android Device ID: ANDROID_ID
|
|
60
|
+
* */
|
|
61
|
+
const DEVICE_ID = Math.max(36, 36, 16);
|
|
62
|
+
/**
|
|
63
|
+
* - The advertising ID is represented using version 3 of the universally unique identifier (UUID) format or an equivalent 128-bit format.
|
|
64
|
+
* - If this permission is not declared, the returned value will be 00000000-0000-0000-0000-000000000000 starting early 2022.
|
|
65
|
+
* - Reference: [AD_ID](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-string-getid)
|
|
66
|
+
* */
|
|
67
|
+
const AAID = 36;
|
|
68
|
+
/**
|
|
69
|
+
* - Web: UUID
|
|
70
|
+
* - iOS: IDFA
|
|
71
|
+
* - Android: AAID
|
|
72
|
+
* */
|
|
73
|
+
const ADVERTISING_ID = Math.max(36, 36, 36);
|
|
74
|
+
/**
|
|
75
|
+
* - An IPv4 address is at most 4 sets of 3 numbers (12 characters), each set separated by a dot (.). That makes 15 characters.
|
|
76
|
+
* - An IPv6 address, at its longest, would be 8 sets of 4 characters (32 total), each set separated by a colon. That makes 39 characters.
|
|
77
|
+
* */
|
|
78
|
+
const IPv4 = 15;
|
|
79
|
+
const IPv6 = 39;
|
|
80
|
+
const IPv4_MAPPED_IPv6 = 45;
|
|
81
|
+
const IP = Math.max(15, 39, 45);
|
|
82
|
+
/**
|
|
83
|
+
* - The longest string in the database is America/Argentina/ComodRivadavia. It's 32 characters long.
|
|
84
|
+
* - The mysql.time_zone_name table has a Name column defined with 64 characters.
|
|
85
|
+
* - It makes sense to use VARCHAR(64) for storing this information.
|
|
86
|
+
* - Reference: [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
|
|
87
|
+
* */
|
|
88
|
+
const TIMEZONE_LONGEST = 32;
|
|
89
|
+
const TIMEZONE = Math.max(64, 32);
|
|
90
|
+
/**
|
|
91
|
+
* Reference: [List of ISO 3166 country codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
|
|
92
|
+
* */
|
|
93
|
+
const COUNTRY_CODE_ALPHA_2 = 2;
|
|
94
|
+
const COUNTRY_CODE_ALPHA_3 = 3;
|
|
95
|
+
const COUNTRY_CODE = Math.max(2, 3);
|
|
96
|
+
/**
|
|
97
|
+
* Reference: [RFC5646 Tags for Identifying Languages](https://www.rfc-editor.org/rfc/rfc5646#section-4.4.1)
|
|
98
|
+
* The following illustration shows how the 35-character recommendation was derived:
|
|
99
|
+
* ```
|
|
100
|
+
* language = 8 ; longest allowed registered value
|
|
101
|
+
* ; longer than primary+extlang
|
|
102
|
+
* ; which requires 7 characters
|
|
103
|
+
* script = 5 ; if not suppressed: see Section 4.1
|
|
104
|
+
* region = 4 ; UN M.49 numeric region code
|
|
105
|
+
* ; ISO 3166-1 codes require 3
|
|
106
|
+
* variant1 = 9 ; needs 'language' as a prefix
|
|
107
|
+
* variant2 = 9 ; very rare, as it needs
|
|
108
|
+
* ; 'language-variant1' as a prefix
|
|
109
|
+
*
|
|
110
|
+
* total = 35 characters
|
|
111
|
+
* ```
|
|
112
|
+
* */
|
|
113
|
+
const LANGUAGE_CODE = 35;
|
|
114
|
+
/**
|
|
115
|
+
* Mailbox = Local-part "@" ( Domain / address-literal )
|
|
116
|
+
* - Local-part: The maximum total length of a user name or other local-part is 64 octets.
|
|
117
|
+
* - Domain: The maximum total length of a domain name or number is 255 octets.
|
|
118
|
+
* - Maximum length of an email address: 64 + 1 + 255 = 320
|
|
119
|
+
* - Reference: [Simple Mail Transfer Protocol - Size Limits and Minimums](https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1)
|
|
120
|
+
* */
|
|
121
|
+
const EMAIL_LOCAL_PART = 64;
|
|
122
|
+
const EMAIL_DOMAIN = 255;
|
|
123
|
+
const EMAIL = 320;
|
|
124
|
+
/**
|
|
125
|
+
* Reference: [E.164](https://en.wikipedia.org/wiki/E.164)
|
|
126
|
+
* */
|
|
127
|
+
const PHONE_NUMBER = 15;
|
|
128
|
+
/**
|
|
129
|
+
* Reference: [How big can a user agent string get?](https://stackoverflow.com/questions/654921/how-big-can-a-user-agent-string-get)
|
|
130
|
+
* */
|
|
131
|
+
//#endregion
|
|
132
|
+
export { AAID, ADVERTISING_ID, ANDROID_ID, COUNTRY_CODE, COUNTRY_CODE_ALPHA_2, COUNTRY_CODE_ALPHA_3, DEVICE_ID, EMAIL, EMAIL_DOMAIN, EMAIL_LOCAL_PART, IDFA, IDFV, IP, IPv4, IPv4_MAPPED_IPv6, IPv6, LANGUAGE_CODE, PHONE_NUMBER, TIMEZONE, TIMEZONE_LONGEST, UDID, UUID, max_length_exports };
|
|
133
|
+
|
|
48
134
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/max-length/index.ts"],"sourcesContent":["// noinspection UnnecessaryLocalVariableJS,JSUnusedGlobalSymbols\n\n/**\n * A Universally Unique Identifier (UUID) is a 36-character alphanumeric string that's typically represented in the following format:\n * - Format: 8-4-4-4-12\n * */\nexport const UUID = 36;\n\n/**\n * The length of an Apple device's unique device identifier (UDID) depends on the model of the device:\n * - iPhone X and earlier: The UDID is a 40-character alphanumeric string\n * - iPhone XS and later: The UDID is a 24-character string with a dash after the 8th digit\n * */\nexport const UDID = 40;\n\n/**\n * Apple's Identifier for Vendors (IDFV).\n * - `var identifierForVendor: UUID? { get }` An alphanumeric string that uniquely identifies a device to the app’s vendor.\n * - Reference: [identifierForVendor](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)\n * */\nexport const IDFV = UUID;\n\n/**\n * Apple's Identifier for Advertisers (IDFA).\n * - `var advertisingIdentifier: UUID { get }` The UUID that is specific to a device.\n * - Reference: [advertisingIdentifier](https://developer.apple.com/documentation/adsupport/asidentifiermanager/advertisingidentifier)\n * */\nexport const IDFA = UUID;\n\n/**\n * Android Device ID\n * - 64-bit number (expressed as a hexadecimal string)\n * - Reference: [ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID)\n * */\nexport const ANDROID_ID = 16;\n\n/**\n * - Web Device ID: UUID v4\n * - iOS Device ID: IDFV\n * - Android Device ID: ANDROID_ID\n * */\nexport const DEVICE_ID = Math.max(UUID, IDFV, ANDROID_ID); // 36\n\n/**\n * - The advertising ID is represented using version 3 of the universally unique identifier (UUID) format or an equivalent 128-bit format.\n * - If this permission is not declared, the returned value will be 00000000-0000-0000-0000-000000000000 starting early 2022.\n * - Reference: [AD_ID](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-string-getid)\n * */\nexport const AAID = UUID;\n\n/**\n * - Web: UUID\n * - iOS: IDFA\n * - Android: AAID\n * */\nexport const ADVERTISING_ID = Math.max(UUID, IDFA, AAID); // 36\n\n/**\n * - An IPv4 address is at most 4 sets of 3 numbers (12 characters), each set separated by a dot (.). That makes 15 characters.\n * - An IPv6 address, at its longest, would be 8 sets of 4 characters (32 total), each set separated by a colon. That makes 39 characters.\n * */\nexport const IPv4 = 15;\nexport const IPv6 = 39;\nexport const IPv4_MAPPED_IPv6 = 45;\nexport const IP = Math.max(IPv4, IPv6, IPv4_MAPPED_IPv6); // 45\n\n/**\n * - The longest string in the database is America/Argentina/ComodRivadavia. It's 32 characters long.\n * - The mysql.time_zone_name table has a Name column defined with 64 characters.\n * - It makes sense to use VARCHAR(64) for storing this information.\n * - Reference: [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)\n * */\nexport const TIMEZONE_LONGEST = 'America/Argentina/ComodRivadavia'.length;\nexport const TIMEZONE = Math.max(64, TIMEZONE_LONGEST); // 64\n\n/**\n * Reference: [List of ISO 3166 country codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)\n * */\nexport const COUNTRY_CODE_ALPHA_2 = 2; // US\nexport const COUNTRY_CODE_ALPHA_3 = 3; // USA\nexport const COUNTRY_CODE = Math.max(COUNTRY_CODE_ALPHA_2, COUNTRY_CODE_ALPHA_3); // 3\n\n/**\n * Reference: [RFC5646 Tags for Identifying Languages](https://www.rfc-editor.org/rfc/rfc5646#section-4.4.1)\n * The following illustration shows how the 35-character recommendation was derived:\n * ```\n * language = 8 ; longest allowed registered value\n * ; longer than primary+extlang\n * ; which requires 7 characters\n * script = 5 ; if not suppressed: see Section 4.1\n * region = 4 ; UN M.49 numeric region code\n * ; ISO 3166-1 codes require 3\n * variant1 = 9 ; needs 'language' as a prefix\n * variant2 = 9 ; very rare, as it needs\n * ; 'language-variant1' as a prefix\n *\n * total = 35 characters\n * ```\n * */\nexport const LANGUAGE_CODE = 35;\n\n/**\n * Mailbox = Local-part \"@\" ( Domain / address-literal )\n * - Local-part: The maximum total length of a user name or other local-part is 64 octets.\n * - Domain: The maximum total length of a domain name or number is 255 octets.\n * - Maximum length of an email address: 64 + 1 + 255 = 320\n * - Reference: [Simple Mail Transfer Protocol - Size Limits and Minimums](https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1)\n * */\nexport const EMAIL_LOCAL_PART = 64;\nexport const EMAIL_DOMAIN = 255;\nexport const EMAIL = EMAIL_LOCAL_PART + 1 + EMAIL_DOMAIN; // 320\n\n/**\n * Reference: [E.164](https://en.wikipedia.org/wiki/E.164)\n * */\nexport const PHONE_NUMBER = 15;\n\n/**\n * Reference: [How big can a user agent string get?](https://stackoverflow.com/questions/654921/how-big-can-a-user-agent-string-get)\n * */\n// export const USER_AGENT = 250;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/max-length/index.ts"],"sourcesContent":["// noinspection UnnecessaryLocalVariableJS,JSUnusedGlobalSymbols\n\n/**\n * A Universally Unique Identifier (UUID) is a 36-character alphanumeric string that's typically represented in the following format:\n * - Format: 8-4-4-4-12\n * */\nexport const UUID = 36;\n\n/**\n * The length of an Apple device's unique device identifier (UDID) depends on the model of the device:\n * - iPhone X and earlier: The UDID is a 40-character alphanumeric string\n * - iPhone XS and later: The UDID is a 24-character string with a dash after the 8th digit\n * */\nexport const UDID = 40;\n\n/**\n * Apple's Identifier for Vendors (IDFV).\n * - `var identifierForVendor: UUID? { get }` An alphanumeric string that uniquely identifies a device to the app’s vendor.\n * - Reference: [identifierForVendor](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)\n * */\nexport const IDFV = UUID;\n\n/**\n * Apple's Identifier for Advertisers (IDFA).\n * - `var advertisingIdentifier: UUID { get }` The UUID that is specific to a device.\n * - Reference: [advertisingIdentifier](https://developer.apple.com/documentation/adsupport/asidentifiermanager/advertisingidentifier)\n * */\nexport const IDFA = UUID;\n\n/**\n * Android Device ID\n * - 64-bit number (expressed as a hexadecimal string)\n * - Reference: [ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID)\n * */\nexport const ANDROID_ID = 16;\n\n/**\n * - Web Device ID: UUID v4\n * - iOS Device ID: IDFV\n * - Android Device ID: ANDROID_ID\n * */\nexport const DEVICE_ID = Math.max(UUID, IDFV, ANDROID_ID); // 36\n\n/**\n * - The advertising ID is represented using version 3 of the universally unique identifier (UUID) format or an equivalent 128-bit format.\n * - If this permission is not declared, the returned value will be 00000000-0000-0000-0000-000000000000 starting early 2022.\n * - Reference: [AD_ID](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-string-getid)\n * */\nexport const AAID = UUID;\n\n/**\n * - Web: UUID\n * - iOS: IDFA\n * - Android: AAID\n * */\nexport const ADVERTISING_ID = Math.max(UUID, IDFA, AAID); // 36\n\n/**\n * - An IPv4 address is at most 4 sets of 3 numbers (12 characters), each set separated by a dot (.). That makes 15 characters.\n * - An IPv6 address, at its longest, would be 8 sets of 4 characters (32 total), each set separated by a colon. That makes 39 characters.\n * */\nexport const IPv4 = 15;\nexport const IPv6 = 39;\nexport const IPv4_MAPPED_IPv6 = 45;\nexport const IP = Math.max(IPv4, IPv6, IPv4_MAPPED_IPv6); // 45\n\n/**\n * - The longest string in the database is America/Argentina/ComodRivadavia. It's 32 characters long.\n * - The mysql.time_zone_name table has a Name column defined with 64 characters.\n * - It makes sense to use VARCHAR(64) for storing this information.\n * - Reference: [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)\n * */\nexport const TIMEZONE_LONGEST = 'America/Argentina/ComodRivadavia'.length;\nexport const TIMEZONE = Math.max(64, TIMEZONE_LONGEST); // 64\n\n/**\n * Reference: [List of ISO 3166 country codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)\n * */\nexport const COUNTRY_CODE_ALPHA_2 = 2; // US\nexport const COUNTRY_CODE_ALPHA_3 = 3; // USA\nexport const COUNTRY_CODE = Math.max(COUNTRY_CODE_ALPHA_2, COUNTRY_CODE_ALPHA_3); // 3\n\n/**\n * Reference: [RFC5646 Tags for Identifying Languages](https://www.rfc-editor.org/rfc/rfc5646#section-4.4.1)\n * The following illustration shows how the 35-character recommendation was derived:\n * ```\n * language = 8 ; longest allowed registered value\n * ; longer than primary+extlang\n * ; which requires 7 characters\n * script = 5 ; if not suppressed: see Section 4.1\n * region = 4 ; UN M.49 numeric region code\n * ; ISO 3166-1 codes require 3\n * variant1 = 9 ; needs 'language' as a prefix\n * variant2 = 9 ; very rare, as it needs\n * ; 'language-variant1' as a prefix\n *\n * total = 35 characters\n * ```\n * */\nexport const LANGUAGE_CODE = 35;\n\n/**\n * Mailbox = Local-part \"@\" ( Domain / address-literal )\n * - Local-part: The maximum total length of a user name or other local-part is 64 octets.\n * - Domain: The maximum total length of a domain name or number is 255 octets.\n * - Maximum length of an email address: 64 + 1 + 255 = 320\n * - Reference: [Simple Mail Transfer Protocol - Size Limits and Minimums](https://datatracker.ietf.org/doc/html/rfc5321#section-4.5.3.1)\n * */\nexport const EMAIL_LOCAL_PART = 64;\nexport const EMAIL_DOMAIN = 255;\nexport const EMAIL = EMAIL_LOCAL_PART + 1 + EMAIL_DOMAIN; // 320\n\n/**\n * Reference: [E.164](https://en.wikipedia.org/wiki/E.164)\n * */\nexport const PHONE_NUMBER = 15;\n\n/**\n * Reference: [How big can a user agent string get?](https://stackoverflow.com/questions/654921/how-big-can-a-user-agent-string-get)\n * */\n// export const USER_AGENT = 250;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAa,OAAO;;;;;;AAOpB,MAAa,OAAO;;;;;;AAOpB,MAAa,OAAA;;;;;;AAOb,MAAa,OAAA;;;;;;AAOb,MAAa,aAAa;;;;;;AAO1B,MAAa,YAAY,KAAK,IAAA,IAAA,IAAA,EAA0B;;;;;;AAOxD,MAAa,OAAA;;;;;;AAOb,MAAa,iBAAiB,KAAK,IAAA,IAAA,IAAA,EAAoB;;;;;AAMvD,MAAa,OAAO;AACpB,MAAa,OAAO;AACpB,MAAa,mBAAmB;AAChC,MAAa,KAAK,KAAK,IAAA,IAAA,IAAA,EAAgC;;;;;;;AAQvD,MAAa,mBAAmB;AAChC,MAAa,WAAW,KAAK,IAAI,IAAA,EAAoB;;;;AAKrD,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;AACpC,MAAa,eAAe,KAAK,IAAA,GAAA,CAA8C;;;;;;;;;;;;;;;;;;AAmB/E,MAAa,gBAAgB;;;;;;;;AAS7B,MAAa,mBAAmB;AAChC,MAAa,eAAe;AAC5B,MAAa,QAAQ;;;;AAKrB,MAAa,eAAe"}
|
package/dist/message.cjs
CHANGED
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/message.ts
|
|
3
|
+
function getI18nErrorMessage() {}
|
|
4
|
+
//#endregion
|
|
5
|
+
exports.getI18nErrorMessage = getI18nErrorMessage;
|
|
19
6
|
|
|
20
|
-
// src/message.ts
|
|
21
|
-
var message_exports = {};
|
|
22
|
-
__export(message_exports, {
|
|
23
|
-
getI18nErrorMessage: () => getI18nErrorMessage
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(message_exports);
|
|
26
|
-
function getI18nErrorMessage() {
|
|
27
|
-
}
|
|
28
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
getI18nErrorMessage
|
|
31
|
-
});
|
|
32
7
|
//# sourceMappingURL=message.cjs.map
|
package/dist/message.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/message.ts"],"sourcesContent":["export function getI18nErrorMessage() {}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"message.cjs","names":[],"sources":["../src/message.ts"],"sourcesContent":["export function getI18nErrorMessage() {}\n"],"mappings":";;AAAA,SAAgB,sBAAsB,CAAC"}
|
package/dist/message.d.cts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.cts","names":[],"sources":["../src/message.ts"],"mappings":";iBAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.mts","names":[],"sources":["../src/message.ts"],"mappings":";iBAAgB"}
|
package/dist/message.mjs
CHANGED
package/dist/message.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/message.ts"],"sourcesContent":["export function getI18nErrorMessage() {}\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"message.mjs","names":[],"sources":["../src/message.ts"],"sourcesContent":["export function getI18nErrorMessage() {}\n"],"mappings":";AAAA,SAAgB,sBAAsB,CAAC"}
|
package/dist/polyfills/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/polyfills/index.ts"],"sourcesContent":["// @ts-expect-error fixed: Do not know how to serialize a BigInt\nBigInt.prototype.toJSON = function () {\n return this.toString();\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/polyfills/index.ts"],"sourcesContent":["// @ts-expect-error fixed: Do not know how to serialize a BigInt\nBigInt.prototype.toJSON = function () {\n return this.toString();\n};\n"],"mappings":";AACA,OAAO,UAAU,SAAS,WAAY;CACpC,OAAO,KAAK,SAAS;AACvB"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { }
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/polyfills/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/polyfills/index.ts"],"sourcesContent":["// @ts-expect-error fixed: Do not know how to serialize a BigInt\nBigInt.prototype.toJSON = function () {\n return this.toString();\n};\n"],"mappings":";AACA,OAAO,UAAU,SAAS,WAAY;
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/polyfills/index.ts"],"sourcesContent":["// @ts-expect-error fixed: Do not know how to serialize a BigInt\nBigInt.prototype.toJSON = function () {\n return this.toString();\n};\n"],"mappings":";AACA,OAAO,UAAU,SAAS,WAAY;CACpC,OAAO,KAAK,SAAS;AACvB"}
|