@shware/http 2.11.4 → 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 +49 -24
- 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
package/dist/hono/validator.mjs
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
// src/hono/validator.ts
|
|
2
|
-
import { validator } from "hono/validator";
|
|
3
|
-
import {
|
|
4
|
-
NEVER,
|
|
5
|
-
pipe,
|
|
6
|
-
string,
|
|
7
|
-
transform
|
|
8
|
-
} from "zod/mini";
|
|
9
1
|
import { Details } from "../error/detail.mjs";
|
|
10
2
|
import { Status } from "../error/status.mjs";
|
|
3
|
+
import { NEVER, pipe, string, transform } from "zod/mini";
|
|
4
|
+
import { validator } from "hono/validator";
|
|
5
|
+
//#region src/hono/validator.ts
|
|
11
6
|
function zValidator(target, schema) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
return validator(target, async (value) => {
|
|
8
|
+
const result = await schema.safeParseAsync(value);
|
|
9
|
+
if (result.success) return result.data;
|
|
10
|
+
const fieldViolations = result.error.issues.map(({ code, path, message }) => ({
|
|
11
|
+
field: path.join("."),
|
|
12
|
+
description: message,
|
|
13
|
+
reason: code?.toUpperCase() ?? "INVALID_ARGUMENT",
|
|
14
|
+
localizedMessage: {
|
|
15
|
+
locale: "en-US",
|
|
16
|
+
message
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
const details = Details.new().badRequest({ fieldViolations });
|
|
20
|
+
throw Status.invalidArgument().error(details);
|
|
21
|
+
});
|
|
26
22
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
23
|
+
const bigintId = pipe(string(), transform((input, ctx) => {
|
|
24
|
+
if (!/^(0|[1-9]\d{0,19})$/.test(input)) {
|
|
25
|
+
const message = `Invalid bigint id: ${input}`;
|
|
26
|
+
ctx.issues.push({
|
|
27
|
+
code: "custom",
|
|
28
|
+
input,
|
|
29
|
+
message
|
|
30
|
+
});
|
|
31
|
+
return NEVER;
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
return BigInt(input);
|
|
35
|
+
} catch {
|
|
36
|
+
const message = `Parse bigint id: ${input} failed`;
|
|
37
|
+
ctx.issues.push({
|
|
38
|
+
code: "custom",
|
|
39
|
+
input,
|
|
40
|
+
message
|
|
41
|
+
});
|
|
42
|
+
return NEVER;
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
//#endregion
|
|
46
|
+
export { bigintId, zValidator };
|
|
47
|
+
|
|
48
48
|
//# sourceMappingURL=validator.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hono/validator.ts"],"sourcesContent":["import type { ValidationTargets } from 'hono';\nimport { validator } from 'hono/validator';\nimport type { ZodType, output as outputV4 } from 'zod';\nimport {\n NEVER,\n type ZodMiniType,\n type output as outputMini,\n pipe,\n string,\n transform,\n} from 'zod/mini';\nimport { type BadRequest, Details } from '../error/detail';\nimport { Status } from '../error/status';\n\nexport function zValidator<S extends ZodType | ZodMiniType>(\n target: keyof ValidationTargets,\n schema: S\n) {\n return validator(target, async (value) => {\n const result = await schema.safeParseAsync(value);\n if (result.success) return result.data as S extends ZodType ? outputV4<S> : outputMini<S>;\n\n const fieldViolations: BadRequest['fieldViolations'] = result.error.issues.map(\n ({ code, path, message }) => ({\n field: path.join('.'),\n description: message,\n reason: code?.toUpperCase() ?? 'INVALID_ARGUMENT',\n localizedMessage: { locale: 'en-US', message: message },\n })\n );\n const details = Details.new().badRequest({ fieldViolations });\n throw Status.invalidArgument().error(details);\n });\n}\n\nexport const bigintId = pipe(\n string(),\n transform((input, ctx) => {\n if (!/^(0|[1-9]\\d{0,19})$/.test(input)) {\n const message = `Invalid bigint id: ${input}`;\n ctx.issues.push({ code: 'custom', input, message });\n return NEVER;\n }\n try {\n return BigInt(input);\n } catch {\n const message = `Parse bigint id: ${input} failed`;\n ctx.issues.push({ code: 'custom', input, message });\n return NEVER;\n }\n })\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"validator.mjs","names":[],"sources":["../../src/hono/validator.ts"],"sourcesContent":["import type { ValidationTargets } from 'hono';\nimport { validator } from 'hono/validator';\nimport type { ZodType, output as outputV4 } from 'zod';\nimport {\n NEVER,\n type ZodMiniType,\n type output as outputMini,\n pipe,\n string,\n transform,\n} from 'zod/mini';\nimport { type BadRequest, Details } from '../error/detail';\nimport { Status } from '../error/status';\n\nexport function zValidator<S extends ZodType | ZodMiniType>(\n target: keyof ValidationTargets,\n schema: S\n) {\n return validator(target, async (value) => {\n const result = await schema.safeParseAsync(value);\n if (result.success) return result.data as S extends ZodType ? outputV4<S> : outputMini<S>;\n\n const fieldViolations: BadRequest['fieldViolations'] = result.error.issues.map(\n ({ code, path, message }) => ({\n field: path.join('.'),\n description: message,\n reason: code?.toUpperCase() ?? 'INVALID_ARGUMENT',\n localizedMessage: { locale: 'en-US', message: message },\n })\n );\n const details = Details.new().badRequest({ fieldViolations });\n throw Status.invalidArgument().error(details);\n });\n}\n\nexport const bigintId = pipe(\n string(),\n transform((input, ctx) => {\n if (!/^(0|[1-9]\\d{0,19})$/.test(input)) {\n const message = `Invalid bigint id: ${input}`;\n ctx.issues.push({ code: 'custom', input, message });\n return NEVER;\n }\n try {\n return BigInt(input);\n } catch {\n const message = `Parse bigint id: ${input} failed`;\n ctx.issues.push({ code: 'custom', input, message });\n return NEVER;\n }\n })\n);\n"],"mappings":";;;;;AAcA,SAAgB,WACd,QACA,QACA;CACA,OAAO,UAAU,QAAQ,OAAO,UAAU;EACxC,MAAM,SAAS,MAAM,OAAO,eAAe,KAAK;EAChD,IAAI,OAAO,SAAS,OAAO,OAAO;EAElC,MAAM,kBAAiD,OAAO,MAAM,OAAO,KACxE,EAAE,MAAM,MAAM,eAAe;GAC5B,OAAO,KAAK,KAAK,GAAG;GACpB,aAAa;GACb,QAAQ,MAAM,YAAY,KAAK;GAC/B,kBAAkB;IAAE,QAAQ;IAAkB;GAAQ;EACxD,EACF;EACA,MAAM,UAAU,QAAQ,IAAI,CAAC,CAAC,WAAW,EAAE,gBAAgB,CAAC;EAC5D,MAAM,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO;CAC9C,CAAC;AACH;AAEA,MAAa,WAAW,KACtB,OAAO,GACP,WAAW,OAAO,QAAQ;CACxB,IAAI,CAAC,sBAAsB,KAAK,KAAK,GAAG;EACtC,MAAM,UAAU,sBAAsB;EACtC,IAAI,OAAO,KAAK;GAAE,MAAM;GAAU;GAAO;EAAQ,CAAC;EAClD,OAAO;CACT;CACA,IAAI;EACF,OAAO,OAAO,KAAK;CACrB,QAAQ;EACN,MAAM,UAAU,oBAAoB,MAAM;EAC1C,IAAI,OAAO,KAAK;GAAE,MAAM;GAAU;GAAO;EAAQ,CAAC;EAClD,OAAO;CACT;AACF,CAAC,CACH"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,96 +1,40 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var index_exports = {};
|
|
32
|
-
__export(index_exports, {
|
|
33
|
-
CheckoutCreateError: () => import_error.CheckoutCreateError,
|
|
34
|
-
Cursor: () => import_response.Cursor,
|
|
35
|
-
DetailType: () => import_detail.DetailType,
|
|
36
|
-
Details: () => import_detail.Details,
|
|
37
|
-
ISO_3601_1: () => import_iso_3601_1.ISO_3601_1,
|
|
38
|
-
Items: () => import_response.Items,
|
|
39
|
-
LoginCanceledError: () => import_error.LoginCanceledError,
|
|
40
|
-
LoginTimeoutError: () => import_error.LoginTimeoutError,
|
|
41
|
-
MAX_LENGTH: () => MAX_LENGTH,
|
|
42
|
-
Pages: () => import_response.Pages,
|
|
43
|
-
PurchaseError: () => import_error.PurchaseError,
|
|
44
|
-
Status: () => import_status.Status,
|
|
45
|
-
StatusError: () => import_status.StatusError,
|
|
46
|
-
UidGenerator: () => import_snowflake.UidGenerator,
|
|
47
|
-
forwardToGoogleTagGateway: () => import_google_tag_gateway.forwardToGoogleTagGateway,
|
|
48
|
-
getErrorInfo: () => import_parse.getErrorInfo,
|
|
49
|
-
getErrorMessage: () => import_parse.getErrorMessage,
|
|
50
|
-
getFieldViolations: () => import_parse.getFieldViolations,
|
|
51
|
-
getNextPageParam: () => import_response.getNextPageParam,
|
|
52
|
-
getPreviousPageParam: () => import_response.getPreviousPageParam,
|
|
53
|
-
initialPageParam: () => import_response.initialPageParam,
|
|
54
|
-
pageParamsSchema: () => import_response.pageParamsSchema,
|
|
55
|
-
timing: () => import_timing.timing,
|
|
56
|
-
uid: () => import_snowflake.uid
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_error_index = require("./error/index.cjs");
|
|
3
|
+
const require_error_detail = require("./error/detail.cjs");
|
|
4
|
+
const require_error_status = require("./error/status.cjs");
|
|
5
|
+
const require_error_parse = require("./error/parse.cjs");
|
|
6
|
+
const require_response = require("./response.cjs");
|
|
7
|
+
const require_snowflake = require("./snowflake.cjs");
|
|
8
|
+
const require_max_length_index = require("./max-length/index.cjs");
|
|
9
|
+
const require_utils_timing = require("./utils/timing.cjs");
|
|
10
|
+
const require_utils_google_tag_gateway = require("./utils/google-tag-gateway.cjs");
|
|
11
|
+
const require_iso_iso_3601_1 = require("./iso/iso_3601_1.cjs");
|
|
12
|
+
exports.CheckoutCreateError = require_error_index.CheckoutCreateError;
|
|
13
|
+
exports.Cursor = require_response.Cursor;
|
|
14
|
+
exports.DetailType = require_error_detail.DetailType;
|
|
15
|
+
exports.Details = require_error_detail.Details;
|
|
16
|
+
exports.ISO_3601_1 = require_iso_iso_3601_1.ISO_3601_1;
|
|
17
|
+
exports.Items = require_response.Items;
|
|
18
|
+
exports.LoginCanceledError = require_error_index.LoginCanceledError;
|
|
19
|
+
exports.LoginTimeoutError = require_error_index.LoginTimeoutError;
|
|
20
|
+
Object.defineProperty(exports, "MAX_LENGTH", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function() {
|
|
23
|
+
return require_max_length_index.max_length_exports;
|
|
24
|
+
}
|
|
57
25
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
DetailType,
|
|
74
|
-
Details,
|
|
75
|
-
ISO_3601_1,
|
|
76
|
-
Items,
|
|
77
|
-
LoginCanceledError,
|
|
78
|
-
LoginTimeoutError,
|
|
79
|
-
MAX_LENGTH,
|
|
80
|
-
Pages,
|
|
81
|
-
PurchaseError,
|
|
82
|
-
Status,
|
|
83
|
-
StatusError,
|
|
84
|
-
UidGenerator,
|
|
85
|
-
forwardToGoogleTagGateway,
|
|
86
|
-
getErrorInfo,
|
|
87
|
-
getErrorMessage,
|
|
88
|
-
getFieldViolations,
|
|
89
|
-
getNextPageParam,
|
|
90
|
-
getPreviousPageParam,
|
|
91
|
-
initialPageParam,
|
|
92
|
-
pageParamsSchema,
|
|
93
|
-
timing,
|
|
94
|
-
uid
|
|
95
|
-
});
|
|
96
|
-
//# sourceMappingURL=index.cjs.map
|
|
26
|
+
exports.Pages = require_response.Pages;
|
|
27
|
+
exports.PurchaseError = require_error_index.PurchaseError;
|
|
28
|
+
exports.Status = require_error_status.Status;
|
|
29
|
+
exports.StatusError = require_error_status.StatusError;
|
|
30
|
+
exports.UidGenerator = require_snowflake.UidGenerator;
|
|
31
|
+
exports.forwardToGoogleTagGateway = require_utils_google_tag_gateway.forwardToGoogleTagGateway;
|
|
32
|
+
exports.getErrorInfo = require_error_parse.getErrorInfo;
|
|
33
|
+
exports.getErrorMessage = require_error_parse.getErrorMessage;
|
|
34
|
+
exports.getFieldViolations = require_error_parse.getFieldViolations;
|
|
35
|
+
exports.getNextPageParam = require_response.getNextPageParam;
|
|
36
|
+
exports.getPreviousPageParam = require_response.getPreviousPageParam;
|
|
37
|
+
exports.initialPageParam = require_response.initialPageParam;
|
|
38
|
+
exports.pageParamsSchema = require_response.pageParamsSchema;
|
|
39
|
+
exports.timing = require_utils_timing.timing;
|
|
40
|
+
exports.uid = require_snowflake.uid;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import 'zod/v4/core';
|
|
14
|
-
import 'zod/mini';
|
|
1
|
+
import { ErrorReason, ResolvedErrorReason } from "./error/reason.cjs";
|
|
2
|
+
import { BadRequest, DebugInfo, Detail, DetailType, Details, ErrorInfo, Help, LocalizedMessage, PreconditionFailure, QuotaFailure, RequestInfo, ResourceInfo, RetryInfo } from "./error/detail.cjs";
|
|
3
|
+
import { CheckoutCreateError, LoginCanceledError, LoginTimeoutError, PurchaseError } from "./error/index.cjs";
|
|
4
|
+
import { getErrorInfo, getErrorMessage, getFieldViolations } from "./error/parse.cjs";
|
|
5
|
+
import { ErrorBody, Status, StatusError } from "./error/status.cjs";
|
|
6
|
+
import { Cursor, Empty, Entity, EntityId, InfinitePageData, InitParams, Items, NextParams, Page, PageParams, Pages, ParentPageParams, PrevParams, Response, getNextPageParam, getPreviousPageParam, initialPageParam, pageParamsSchema } from "./response.cjs";
|
|
7
|
+
import { UidGenerator, uid } from "./snowflake.cjs";
|
|
8
|
+
import { index_d_exports } from "./max-length/index.cjs";
|
|
9
|
+
import { timing } from "./utils/timing.cjs";
|
|
10
|
+
import { forwardToGoogleTagGateway } from "./utils/google-tag-gateway.cjs";
|
|
11
|
+
import { ISO3166CountryCode, ISO_3601_1 } from "./iso/iso_3601_1.cjs";
|
|
12
|
+
export { type BadRequest, CheckoutCreateError, Cursor, type DebugInfo, type Detail, DetailType, Details, type Empty, type Entity, type EntityId, type ErrorBody, type ErrorInfo, type ErrorReason, type Help, type ISO3166CountryCode, ISO_3601_1, type InfinitePageData, type InitParams, Items, type LocalizedMessage, LoginCanceledError, LoginTimeoutError, index_d_exports as MAX_LENGTH, type NextParams, type Page, type PageParams, Pages, type ParentPageParams, type PreconditionFailure, type PrevParams, PurchaseError, type QuotaFailure, type RequestInfo, type ResolvedErrorReason, type ResourceInfo, type Response, type RetryInfo, Status, StatusError, UidGenerator, forwardToGoogleTagGateway, getErrorInfo, getErrorMessage, getFieldViolations, getNextPageParam, getPreviousPageParam, initialPageParam, pageParamsSchema, timing, uid };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ErrorReason, ResolvedErrorReason } from "./error/reason.mjs";
|
|
2
|
+
import { BadRequest, DebugInfo, Detail, DetailType, Details, ErrorInfo, Help, LocalizedMessage, PreconditionFailure, QuotaFailure, RequestInfo, ResourceInfo, RetryInfo } from "./error/detail.mjs";
|
|
3
|
+
import { CheckoutCreateError, LoginCanceledError, LoginTimeoutError, PurchaseError } from "./error/index.mjs";
|
|
4
|
+
import { getErrorInfo, getErrorMessage, getFieldViolations } from "./error/parse.mjs";
|
|
5
|
+
import { ErrorBody, Status, StatusError } from "./error/status.mjs";
|
|
6
|
+
import { Cursor, Empty, Entity, EntityId, InfinitePageData, InitParams, Items, NextParams, Page, PageParams, Pages, ParentPageParams, PrevParams, Response, getNextPageParam, getPreviousPageParam, initialPageParam, pageParamsSchema } from "./response.mjs";
|
|
7
|
+
import { UidGenerator, uid } from "./snowflake.mjs";
|
|
8
|
+
import { index_d_exports } from "./max-length/index.mjs";
|
|
9
|
+
import { timing } from "./utils/timing.mjs";
|
|
10
|
+
import { forwardToGoogleTagGateway } from "./utils/google-tag-gateway.mjs";
|
|
11
|
+
import { ISO3166CountryCode, ISO_3601_1 } from "./iso/iso_3601_1.mjs";
|
|
12
|
+
export { type BadRequest, CheckoutCreateError, Cursor, type DebugInfo, type Detail, DetailType, Details, type Empty, type Entity, type EntityId, type ErrorBody, type ErrorInfo, type ErrorReason, type Help, type ISO3166CountryCode, ISO_3601_1, type InfinitePageData, type InitParams, Items, type LocalizedMessage, LoginCanceledError, LoginTimeoutError, index_d_exports as MAX_LENGTH, type NextParams, type Page, type PageParams, Pages, type ParentPageParams, type PreconditionFailure, type PrevParams, PurchaseError, type QuotaFailure, type RequestInfo, type ResolvedErrorReason, type ResourceInfo, type Response, type RetryInfo, Status, StatusError, UidGenerator, forwardToGoogleTagGateway, getErrorInfo, getErrorMessage, getFieldViolations, getNextPageParam, getPreviousPageParam, initialPageParam, pageParamsSchema, timing, uid };
|
package/dist/index.mjs
CHANGED
|
@@ -1,54 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
LoginTimeoutError,
|
|
4
|
-
LoginCanceledError,
|
|
5
|
-
CheckoutCreateError,
|
|
6
|
-
PurchaseError
|
|
7
|
-
} from "./error/index.mjs";
|
|
8
|
-
import {
|
|
9
|
-
DetailType,
|
|
10
|
-
Details
|
|
11
|
-
} from "./error/detail.mjs";
|
|
1
|
+
import { CheckoutCreateError, LoginCanceledError, LoginTimeoutError, PurchaseError } from "./error/index.mjs";
|
|
2
|
+
import { DetailType, Details } from "./error/detail.mjs";
|
|
12
3
|
import { Status, StatusError } from "./error/status.mjs";
|
|
13
4
|
import { getErrorInfo, getErrorMessage, getFieldViolations } from "./error/parse.mjs";
|
|
14
|
-
import {
|
|
15
|
-
Items,
|
|
16
|
-
Pages,
|
|
17
|
-
Cursor,
|
|
18
|
-
pageParamsSchema,
|
|
19
|
-
initialPageParam,
|
|
20
|
-
getPreviousPageParam,
|
|
21
|
-
getNextPageParam
|
|
22
|
-
} from "./response.mjs";
|
|
5
|
+
import { Cursor, Items, Pages, getNextPageParam, getPreviousPageParam, initialPageParam, pageParamsSchema } from "./response.mjs";
|
|
23
6
|
import { UidGenerator, uid } from "./snowflake.mjs";
|
|
24
|
-
import
|
|
7
|
+
import { max_length_exports } from "./max-length/index.mjs";
|
|
25
8
|
import { timing } from "./utils/timing.mjs";
|
|
26
9
|
import { forwardToGoogleTagGateway } from "./utils/google-tag-gateway.mjs";
|
|
27
10
|
import { ISO_3601_1 } from "./iso/iso_3601_1.mjs";
|
|
28
|
-
export {
|
|
29
|
-
CheckoutCreateError,
|
|
30
|
-
Cursor,
|
|
31
|
-
DetailType,
|
|
32
|
-
Details,
|
|
33
|
-
ISO_3601_1,
|
|
34
|
-
Items,
|
|
35
|
-
LoginCanceledError,
|
|
36
|
-
LoginTimeoutError,
|
|
37
|
-
MAX_LENGTH,
|
|
38
|
-
Pages,
|
|
39
|
-
PurchaseError,
|
|
40
|
-
Status,
|
|
41
|
-
StatusError,
|
|
42
|
-
UidGenerator,
|
|
43
|
-
forwardToGoogleTagGateway,
|
|
44
|
-
getErrorInfo,
|
|
45
|
-
getErrorMessage,
|
|
46
|
-
getFieldViolations,
|
|
47
|
-
getNextPageParam,
|
|
48
|
-
getPreviousPageParam,
|
|
49
|
-
initialPageParam,
|
|
50
|
-
pageParamsSchema,
|
|
51
|
-
timing,
|
|
52
|
-
uid
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=index.mjs.map
|
|
11
|
+
export { CheckoutCreateError, Cursor, DetailType, Details, ISO_3601_1, Items, LoginCanceledError, LoginTimeoutError, max_length_exports as MAX_LENGTH, Pages, PurchaseError, Status, StatusError, UidGenerator, forwardToGoogleTagGateway, getErrorInfo, getErrorMessage, getFieldViolations, getNextPageParam, getPreviousPageParam, initialPageParam, pageParamsSchema, timing, uid };
|