@chainfuse/helpers 4.1.5 → 4.1.7
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/common.d.mts +2 -2
- package/dist/suru.d.mts +6 -6
- package/dist/suru.mjs +12 -8
- package/package.json +8 -8
package/dist/common.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Request as CfRequest, WorkerVersionMetadata } from '@cloudflare/workers-types/experimental';
|
|
2
2
|
import type { Chalk } from 'chalk';
|
|
3
|
-
interface QwikCityPlatform {
|
|
4
|
-
request?:
|
|
3
|
+
interface QwikCityPlatform<R extends CfRequest | Request = CfRequest | Request> {
|
|
4
|
+
request?: R;
|
|
5
5
|
}
|
|
6
6
|
export declare class Helpers {
|
|
7
7
|
/**
|
package/dist/suru.d.mts
CHANGED
|
@@ -49,8 +49,8 @@ export declare class SuruId {
|
|
|
49
49
|
version: z.ZodMiniDefault<z.ZodMiniEnum<typeof D0Version>>;
|
|
50
50
|
date: z.ZodMiniDefault<z.ZodMiniDate<Date>>;
|
|
51
51
|
shardType: z.ZodMiniDefault<z.ZodMiniEnum<typeof D0ShardType>>;
|
|
52
|
-
suffixRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<
|
|
53
|
-
stableRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<
|
|
52
|
+
suffixRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, z.ZodMiniPipe<z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>, z.ZodMiniPipe<z.ZodMiniBase64, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniPipe<z.ZodMiniBase64URL, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>]>>>;
|
|
53
|
+
stableRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, z.ZodMiniPipe<z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>, z.ZodMiniPipe<z.ZodMiniBase64, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniPipe<z.ZodMiniBase64URL, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>]>>>;
|
|
54
54
|
systemType: z.ZodMiniEnum<typeof D0SystemType>;
|
|
55
55
|
environment: z.ZodMiniEnum<typeof D0Environment>;
|
|
56
56
|
}, z.core.$strip>;
|
|
@@ -58,8 +58,8 @@ export declare class SuruId {
|
|
|
58
58
|
version: z.ZodMiniDefault<z.ZodMiniEnum<typeof D0Version>>;
|
|
59
59
|
date: z.ZodMiniDefault<z.ZodMiniDate<Date>>;
|
|
60
60
|
shardType: z.ZodMiniDefault<z.ZodMiniEnum<typeof D0ShardType>>;
|
|
61
|
-
suffixRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<
|
|
62
|
-
stableRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<
|
|
61
|
+
suffixRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, z.ZodMiniPipe<z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>, z.ZodMiniPipe<z.ZodMiniBase64, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniPipe<z.ZodMiniBase64URL, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>]>>>;
|
|
62
|
+
stableRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, z.ZodMiniPipe<z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>, z.ZodMiniPipe<z.ZodMiniBase64, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniPipe<z.ZodMiniBase64URL, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>]>>>;
|
|
63
63
|
systemType: z.ZodMiniEnum<typeof D0SystemType>;
|
|
64
64
|
environment: z.ZodMiniEnum<typeof D0Environment>;
|
|
65
65
|
locationJurisdiction: z.ZodMiniDefault<z.ZodMiniNullable<z.ZodMiniEnum<typeof DOJurisdictions>>>;
|
|
@@ -68,8 +68,8 @@ export declare class SuruId {
|
|
|
68
68
|
version: z.ZodMiniDefault<z.ZodMiniEnum<typeof D0Version>>;
|
|
69
69
|
date: z.ZodMiniDefault<z.ZodMiniDate<Date>>;
|
|
70
70
|
shardType: z.ZodMiniDefault<z.ZodMiniEnum<typeof D0ShardType>>;
|
|
71
|
-
suffixRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<
|
|
72
|
-
stableRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<
|
|
71
|
+
suffixRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, z.ZodMiniPipe<z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>, z.ZodMiniPipe<z.ZodMiniBase64, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniPipe<z.ZodMiniBase64URL, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>]>>>;
|
|
72
|
+
stableRandom: z.ZodMiniLazy<z.ZodMiniDefault<z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustomStringFormat<"hex">, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniUnion<readonly [z.ZodMiniPipe<z.ZodMiniCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBuffer>>>, z.ZodMiniPipe<z.ZodMiniPipe<z.ZodMiniCustom<ArrayBuffer, ArrayBuffer>, z.ZodMiniTransform<ArrayBufferLike, ArrayBuffer>>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, ArrayBufferLike>>, z.ZodMiniPipe<z.ZodMiniTuple<readonly [z.ZodMiniNumberFormat], z.ZodMiniNumberFormat>, z.ZodMiniTransform<Uint8Array<ArrayBufferLike>, [number, ...number[]]>>]>, z.ZodMiniPipe<z.ZodMiniBase64, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>, z.ZodMiniPipe<z.ZodMiniBase64URL, z.ZodMiniTransform<Uint8Array<ArrayBuffer>, string>>]>>>;
|
|
73
73
|
systemType: z.ZodMiniEnum<typeof D0SystemType>;
|
|
74
74
|
environment: z.ZodMiniEnum<typeof D0Environment>;
|
|
75
75
|
locationJurisdiction: z.ZodMiniDefault<z.ZodMiniNull>;
|
package/dist/suru.mjs
CHANGED
|
@@ -264,12 +264,14 @@ export class SuruId {
|
|
|
264
264
|
// Find the location key that matches the value
|
|
265
265
|
const locationKey = Object.entries(D0CombinedLocations).find(([, enumValue]) => Number(enumValue) === locationValue)?.[0];
|
|
266
266
|
if (locationKey && locationKey !== 'none') {
|
|
267
|
-
|
|
268
|
-
if
|
|
267
|
+
if (Object.values(DOJurisdictions).includes(
|
|
268
|
+
// @ts-expect-error Check if it's a jurisdiction
|
|
269
|
+
locationKey)) {
|
|
269
270
|
locationJurisdiction = locationKey;
|
|
270
271
|
}
|
|
271
|
-
|
|
272
|
-
if
|
|
272
|
+
if (Object.values(DOLocations).includes(
|
|
273
|
+
// @ts-expect-error Check if it's a location hint
|
|
274
|
+
locationKey)) {
|
|
273
275
|
locationHint = locationKey;
|
|
274
276
|
}
|
|
275
277
|
}
|
|
@@ -349,12 +351,14 @@ export class SuruId {
|
|
|
349
351
|
// Find the location key that matches the value
|
|
350
352
|
const locationKey = Object.entries(D0CombinedLocations).find(([, enumValue]) => Number(enumValue) === locationValue)?.[0];
|
|
351
353
|
if (locationKey && locationKey !== 'none') {
|
|
352
|
-
|
|
353
|
-
if
|
|
354
|
+
if (Object.values(DOJurisdictions).includes(
|
|
355
|
+
// @ts-expect-error Check if it's a jurisdiction
|
|
356
|
+
locationKey)) {
|
|
354
357
|
locationJurisdiction = locationKey;
|
|
355
358
|
}
|
|
356
|
-
|
|
357
|
-
if
|
|
359
|
+
if (Object.values(DOLocations).includes(
|
|
360
|
+
// @ts-expect-error Check if it's a location hint
|
|
361
|
+
locationKey)) {
|
|
358
362
|
locationHint = locationKey;
|
|
359
363
|
}
|
|
360
364
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainfuse/helpers",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "ChainFuse",
|
|
6
6
|
"homepage": "https://github.com/ChainFuse/packages/tree/main/packages/helpers#readme",
|
|
@@ -80,18 +80,18 @@
|
|
|
80
80
|
},
|
|
81
81
|
"prettier": "@demosjarco/prettier-config",
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@chainfuse/types": "^4.0.
|
|
83
|
+
"@chainfuse/types": "^4.0.8",
|
|
84
84
|
"@discordjs/rest": "^2.6.0",
|
|
85
85
|
"chalk": "^5.6.2",
|
|
86
|
-
"cloudflare": "^5.
|
|
87
|
-
"drizzle-orm": "^0.44.
|
|
86
|
+
"cloudflare": "^5.2.0",
|
|
87
|
+
"drizzle-orm": "^0.44.7",
|
|
88
88
|
"strip-ansi": "^7.1.2",
|
|
89
89
|
"uuid": "^13.0.0",
|
|
90
|
-
"zod": "^4.1.
|
|
90
|
+
"zod": "^4.1.12"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@cloudflare/workers-types": "^4.
|
|
94
|
-
"@types/node": "^22.18.
|
|
93
|
+
"@cloudflare/workers-types": "^4.20251014.0",
|
|
94
|
+
"@types/node": "^22.18.12"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "31b211e74666e461adafbe1296340b15e7d8986f"
|
|
97
97
|
}
|