@trokky/trokky 3.1.0 → 3.2.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/adapters/cloudflare-d1/cloudflare-d1-adapter.d.ts +132 -0
- package/dist/adapters/cloudflare-d1/cloudflare-d1-adapter.d.ts.map +1 -0
- package/dist/adapters/cloudflare-d1/cloudflare-d1-adapter.js +811 -0
- package/dist/adapters/cloudflare-d1/cloudflare-d1-adapter.js.map +1 -0
- package/dist/adapters/cloudflare-d1/index.d.ts +5 -0
- package/dist/adapters/cloudflare-d1/index.d.ts.map +1 -0
- package/dist/adapters/cloudflare-d1/index.js +12 -0
- package/dist/adapters/cloudflare-d1/index.js.map +1 -0
- package/dist/adapters/cloudflare-d1/rate-limit-store.d.ts +46 -0
- package/dist/adapters/cloudflare-d1/rate-limit-store.d.ts.map +1 -0
- package/dist/adapters/cloudflare-d1/rate-limit-store.js +96 -0
- package/dist/adapters/cloudflare-d1/rate-limit-store.js.map +1 -0
- package/dist/adapters/cloudflare-d1/types.d.ts +69 -0
- package/dist/adapters/cloudflare-d1/types.d.ts.map +1 -0
- package/dist/adapters/cloudflare-d1/types.js +2 -0
- package/dist/adapters/cloudflare-d1/types.js.map +1 -0
- package/dist/adapters/cloudflare-r2/cloudflare-r2-adapter.d.ts +86 -0
- package/dist/adapters/cloudflare-r2/cloudflare-r2-adapter.d.ts.map +1 -0
- package/dist/adapters/cloudflare-r2/cloudflare-r2-adapter.js +493 -0
- package/dist/adapters/cloudflare-r2/cloudflare-r2-adapter.js.map +1 -0
- package/dist/adapters/cloudflare-r2/index.d.ts +3 -0
- package/dist/adapters/cloudflare-r2/index.d.ts.map +1 -0
- package/dist/adapters/cloudflare-r2/index.js +11 -0
- package/dist/adapters/cloudflare-r2/index.js.map +1 -0
- package/dist/adapters/cloudflare-r2/types.d.ts +43 -0
- package/dist/adapters/cloudflare-r2/types.d.ts.map +1 -0
- package/dist/adapters/cloudflare-r2/types.js +2 -0
- package/dist/adapters/cloudflare-r2/types.js.map +1 -0
- package/dist/core/media/image-processor.d.ts.map +1 -1
- package/dist/core/media/image-processor.js +5 -13
- package/dist/core/media/image-processor.js.map +1 -1
- package/dist/core/media/processors/sharp.d.ts.map +1 -1
- package/dist/core/media/processors/sharp.js +13 -2
- package/dist/core/media/processors/sharp.js.map +1 -1
- package/dist/core/media/processors/types.d.ts +1 -1
- package/dist/core/media/processors/types.d.ts.map +1 -1
- package/dist/core/security/rate-limit-store.d.ts +56 -0
- package/dist/core/security/rate-limit-store.d.ts.map +1 -0
- package/dist/core/security/rate-limit-store.js +55 -0
- package/dist/core/security/rate-limit-store.js.map +1 -0
- package/dist/core/security/rate-limiter.d.ts +30 -2
- package/dist/core/security/rate-limiter.d.ts.map +1 -1
- package/dist/core/security/rate-limiter.js +50 -19
- package/dist/core/security/rate-limiter.js.map +1 -1
- package/dist/core/services/media-service.d.ts +34 -0
- package/dist/core/services/media-service.d.ts.map +1 -1
- package/dist/core/services/media-service.js +172 -120
- package/dist/core/services/media-service.js.map +1 -1
- package/dist/core/utils/retry.d.ts +45 -0
- package/dist/core/utils/retry.d.ts.map +1 -0
- package/dist/core/utils/retry.js +47 -0
- package/dist/core/utils/retry.js.map +1 -0
- package/dist/integrations/workers/adapter.d.ts +28 -0
- package/dist/integrations/workers/adapter.d.ts.map +1 -0
- package/dist/integrations/workers/adapter.js +111 -0
- package/dist/integrations/workers/adapter.js.map +1 -0
- package/dist/integrations/workers/index.d.ts +22 -0
- package/dist/integrations/workers/index.d.ts.map +1 -0
- package/dist/integrations/workers/index.js +60 -0
- package/dist/integrations/workers/index.js.map +1 -0
- package/dist/routes/auth/auth-flow-store.d.ts +17 -0
- package/dist/routes/auth/auth-flow-store.d.ts.map +1 -1
- package/dist/routes/auth/auth-flow-store.js +27 -0
- package/dist/routes/auth/auth-flow-store.js.map +1 -1
- package/dist/routes/auth/oauth.d.ts.map +1 -1
- package/dist/routes/auth/oauth.js +5 -12
- package/dist/routes/auth/oauth.js.map +1 -1
- package/dist/routes/auth/passkey.d.ts.map +1 -1
- package/dist/routes/auth/passkey.js +5 -8
- package/dist/routes/auth/passkey.js.map +1 -1
- package/dist/structure/validation/schemas.d.ts +60 -60
- package/package.json +20 -1
- package/dist/core/media/processors/cloudflare-images.d.ts +0 -83
- package/dist/core/media/processors/cloudflare-images.d.ts.map +0 -1
- package/dist/core/media/processors/cloudflare-images.js +0 -241
- package/dist/core/media/processors/cloudflare-images.js.map +0 -1
- package/dist/core/media/processors/cloudflare-transform-store.d.ts +0 -127
- package/dist/core/media/processors/cloudflare-transform-store.d.ts.map +0 -1
- package/dist/core/media/processors/cloudflare-transform-store.js +0 -237
- package/dist/core/media/processors/cloudflare-transform-store.js.map +0 -1
- package/dist/core/media/processors/cloudflare-transformations.d.ts +0 -81
- package/dist/core/media/processors/cloudflare-transformations.d.ts.map +0 -1
- package/dist/core/media/processors/cloudflare-transformations.js +0 -144
- package/dist/core/media/processors/cloudflare-transformations.js.map +0 -1
- package/dist/core/media/processors/workers-images.d.ts +0 -112
- package/dist/core/media/processors/workers-images.d.ts.map +0 -1
- package/dist/core/media/processors/workers-images.js +0 -257
- package/dist/core/media/processors/workers-images.js.map +0 -1
|
@@ -220,7 +220,7 @@ export declare const ColumnConfigSchema: z.ZodObject<{
|
|
|
220
220
|
formatter?: ((...args: unknown[]) => unknown) | undefined;
|
|
221
221
|
sortable?: boolean | undefined;
|
|
222
222
|
filterable?: boolean | undefined;
|
|
223
|
-
align?: "left" | "
|
|
223
|
+
align?: "left" | "right" | "center" | undefined;
|
|
224
224
|
dataType?: "string" | "number" | "boolean" | "link" | "image" | "date" | undefined;
|
|
225
225
|
visible?: boolean | undefined;
|
|
226
226
|
sticky?: "left" | "right" | undefined;
|
|
@@ -232,7 +232,7 @@ export declare const ColumnConfigSchema: z.ZodObject<{
|
|
|
232
232
|
formatter?: ((...args: unknown[]) => unknown) | undefined;
|
|
233
233
|
sortable?: boolean | undefined;
|
|
234
234
|
filterable?: boolean | undefined;
|
|
235
|
-
align?: "left" | "
|
|
235
|
+
align?: "left" | "right" | "center" | undefined;
|
|
236
236
|
dataType?: "string" | "number" | "boolean" | "link" | "image" | "date" | undefined;
|
|
237
237
|
visible?: boolean | undefined;
|
|
238
238
|
sticky?: "left" | "right" | undefined;
|
|
@@ -404,7 +404,7 @@ export declare const ListViewConfigSchema: z.ZodObject<{
|
|
|
404
404
|
formatter?: ((...args: unknown[]) => unknown) | undefined;
|
|
405
405
|
sortable?: boolean | undefined;
|
|
406
406
|
filterable?: boolean | undefined;
|
|
407
|
-
align?: "left" | "
|
|
407
|
+
align?: "left" | "right" | "center" | undefined;
|
|
408
408
|
dataType?: "string" | "number" | "boolean" | "link" | "image" | "date" | undefined;
|
|
409
409
|
visible?: boolean | undefined;
|
|
410
410
|
sticky?: "left" | "right" | undefined;
|
|
@@ -416,7 +416,7 @@ export declare const ListViewConfigSchema: z.ZodObject<{
|
|
|
416
416
|
formatter?: ((...args: unknown[]) => unknown) | undefined;
|
|
417
417
|
sortable?: boolean | undefined;
|
|
418
418
|
filterable?: boolean | undefined;
|
|
419
|
-
align?: "left" | "
|
|
419
|
+
align?: "left" | "right" | "center" | undefined;
|
|
420
420
|
dataType?: "string" | "number" | "boolean" | "link" | "image" | "date" | undefined;
|
|
421
421
|
visible?: boolean | undefined;
|
|
422
422
|
sticky?: "left" | "right" | undefined;
|
|
@@ -503,7 +503,7 @@ export declare const ListViewConfigSchema: z.ZodObject<{
|
|
|
503
503
|
formatter?: ((...args: unknown[]) => unknown) | undefined;
|
|
504
504
|
sortable?: boolean | undefined;
|
|
505
505
|
filterable?: boolean | undefined;
|
|
506
|
-
align?: "left" | "
|
|
506
|
+
align?: "left" | "right" | "center" | undefined;
|
|
507
507
|
dataType?: "string" | "number" | "boolean" | "link" | "image" | "date" | undefined;
|
|
508
508
|
visible?: boolean | undefined;
|
|
509
509
|
sticky?: "left" | "right" | undefined;
|
|
@@ -542,7 +542,7 @@ export declare const ListViewConfigSchema: z.ZodObject<{
|
|
|
542
542
|
formatter?: ((...args: unknown[]) => unknown) | undefined;
|
|
543
543
|
sortable?: boolean | undefined;
|
|
544
544
|
filterable?: boolean | undefined;
|
|
545
|
-
align?: "left" | "
|
|
545
|
+
align?: "left" | "right" | "center" | undefined;
|
|
546
546
|
dataType?: "string" | "number" | "boolean" | "link" | "image" | "date" | undefined;
|
|
547
547
|
visible?: boolean | undefined;
|
|
548
548
|
sticky?: "left" | "right" | undefined;
|
|
@@ -585,7 +585,7 @@ export declare const ListViewConfigSchema: z.ZodObject<{
|
|
|
585
585
|
formatter?: ((...args: unknown[]) => unknown) | undefined;
|
|
586
586
|
sortable?: boolean | undefined;
|
|
587
587
|
filterable?: boolean | undefined;
|
|
588
|
-
align?: "left" | "
|
|
588
|
+
align?: "left" | "right" | "center" | undefined;
|
|
589
589
|
dataType?: "string" | "number" | "boolean" | "link" | "image" | "date" | undefined;
|
|
590
590
|
visible?: boolean | undefined;
|
|
591
591
|
sticky?: "left" | "right" | undefined;
|
|
@@ -636,7 +636,7 @@ export declare const ListViewConfigSchema: z.ZodObject<{
|
|
|
636
636
|
formatter?: ((...args: unknown[]) => unknown) | undefined;
|
|
637
637
|
sortable?: boolean | undefined;
|
|
638
638
|
filterable?: boolean | undefined;
|
|
639
|
-
align?: "left" | "
|
|
639
|
+
align?: "left" | "right" | "center" | undefined;
|
|
640
640
|
dataType?: "string" | "number" | "boolean" | "link" | "image" | "date" | undefined;
|
|
641
641
|
visible?: boolean | undefined;
|
|
642
642
|
sticky?: "left" | "right" | undefined;
|
|
@@ -963,8 +963,8 @@ export declare const CalendarViewConfigSchema: z.ZodObject<{
|
|
|
963
963
|
titleField?: string | undefined;
|
|
964
964
|
endDateField?: string | undefined;
|
|
965
965
|
colorField?: string | undefined;
|
|
966
|
-
views?: ("
|
|
967
|
-
defaultView?: "
|
|
966
|
+
views?: ("day" | "week" | "month" | "agenda")[] | undefined;
|
|
967
|
+
defaultView?: "day" | "week" | "month" | "agenda" | undefined;
|
|
968
968
|
timeSlots?: {
|
|
969
969
|
end?: string | undefined;
|
|
970
970
|
start?: string | undefined;
|
|
@@ -978,8 +978,8 @@ export declare const CalendarViewConfigSchema: z.ZodObject<{
|
|
|
978
978
|
titleField?: string | undefined;
|
|
979
979
|
endDateField?: string | undefined;
|
|
980
980
|
colorField?: string | undefined;
|
|
981
|
-
views?: ("
|
|
982
|
-
defaultView?: "
|
|
981
|
+
views?: ("day" | "week" | "month" | "agenda")[] | undefined;
|
|
982
|
+
defaultView?: "day" | "week" | "month" | "agenda" | undefined;
|
|
983
983
|
timeSlots?: {
|
|
984
984
|
end?: string | undefined;
|
|
985
985
|
start?: string | undefined;
|
|
@@ -997,8 +997,8 @@ export declare const CalendarViewConfigSchema: z.ZodObject<{
|
|
|
997
997
|
titleField?: string | undefined;
|
|
998
998
|
endDateField?: string | undefined;
|
|
999
999
|
colorField?: string | undefined;
|
|
1000
|
-
views?: ("
|
|
1001
|
-
defaultView?: "
|
|
1000
|
+
views?: ("day" | "week" | "month" | "agenda")[] | undefined;
|
|
1001
|
+
defaultView?: "day" | "week" | "month" | "agenda" | undefined;
|
|
1002
1002
|
timeSlots?: {
|
|
1003
1003
|
end?: string | undefined;
|
|
1004
1004
|
start?: string | undefined;
|
|
@@ -1024,8 +1024,8 @@ export declare const CalendarViewConfigSchema: z.ZodObject<{
|
|
|
1024
1024
|
titleField?: string | undefined;
|
|
1025
1025
|
endDateField?: string | undefined;
|
|
1026
1026
|
colorField?: string | undefined;
|
|
1027
|
-
views?: ("
|
|
1028
|
-
defaultView?: "
|
|
1027
|
+
views?: ("day" | "week" | "month" | "agenda")[] | undefined;
|
|
1028
|
+
defaultView?: "day" | "week" | "month" | "agenda" | undefined;
|
|
1029
1029
|
timeSlots?: {
|
|
1030
1030
|
end?: string | undefined;
|
|
1031
1031
|
start?: string | undefined;
|
|
@@ -1921,11 +1921,6 @@ export declare const DocumentListItemSchema: z.ZodObject<{
|
|
|
1921
1921
|
sortFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1922
1922
|
refreshInterval: z.ZodOptional<z.ZodNumber>;
|
|
1923
1923
|
}, "strip", z.ZodTypeAny, {
|
|
1924
|
-
sortable?: boolean | undefined;
|
|
1925
|
-
filterable?: boolean | undefined;
|
|
1926
|
-
pageSize?: number | undefined;
|
|
1927
|
-
searchable?: boolean | undefined;
|
|
1928
|
-
searchFields?: string[] | undefined;
|
|
1929
1924
|
filters?: {
|
|
1930
1925
|
id: string;
|
|
1931
1926
|
field: string;
|
|
@@ -1941,14 +1936,14 @@ export declare const DocumentListItemSchema: z.ZodObject<{
|
|
|
1941
1936
|
placeholder?: string | undefined;
|
|
1942
1937
|
} | undefined;
|
|
1943
1938
|
}[] | undefined;
|
|
1944
|
-
sortFields?: string[] | undefined;
|
|
1945
|
-
refreshInterval?: number | undefined;
|
|
1946
|
-
}, {
|
|
1947
1939
|
sortable?: boolean | undefined;
|
|
1948
1940
|
filterable?: boolean | undefined;
|
|
1949
1941
|
pageSize?: number | undefined;
|
|
1950
1942
|
searchable?: boolean | undefined;
|
|
1951
1943
|
searchFields?: string[] | undefined;
|
|
1944
|
+
sortFields?: string[] | undefined;
|
|
1945
|
+
refreshInterval?: number | undefined;
|
|
1946
|
+
}, {
|
|
1952
1947
|
filters?: {
|
|
1953
1948
|
id: string;
|
|
1954
1949
|
field: string;
|
|
@@ -1964,6 +1959,11 @@ export declare const DocumentListItemSchema: z.ZodObject<{
|
|
|
1964
1959
|
placeholder?: string | undefined;
|
|
1965
1960
|
} | undefined;
|
|
1966
1961
|
}[] | undefined;
|
|
1962
|
+
sortable?: boolean | undefined;
|
|
1963
|
+
filterable?: boolean | undefined;
|
|
1964
|
+
pageSize?: number | undefined;
|
|
1965
|
+
searchable?: boolean | undefined;
|
|
1966
|
+
searchFields?: string[] | undefined;
|
|
1967
1967
|
sortFields?: string[] | undefined;
|
|
1968
1968
|
refreshInterval?: number | undefined;
|
|
1969
1969
|
}>>;
|
|
@@ -1975,11 +1975,6 @@ export declare const DocumentListItemSchema: z.ZodObject<{
|
|
|
1975
1975
|
metadata?: Record<string, any> | undefined;
|
|
1976
1976
|
filter?: any;
|
|
1977
1977
|
options?: {
|
|
1978
|
-
sortable?: boolean | undefined;
|
|
1979
|
-
filterable?: boolean | undefined;
|
|
1980
|
-
pageSize?: number | undefined;
|
|
1981
|
-
searchable?: boolean | undefined;
|
|
1982
|
-
searchFields?: string[] | undefined;
|
|
1983
1978
|
filters?: {
|
|
1984
1979
|
id: string;
|
|
1985
1980
|
field: string;
|
|
@@ -1995,6 +1990,11 @@ export declare const DocumentListItemSchema: z.ZodObject<{
|
|
|
1995
1990
|
placeholder?: string | undefined;
|
|
1996
1991
|
} | undefined;
|
|
1997
1992
|
}[] | undefined;
|
|
1993
|
+
sortable?: boolean | undefined;
|
|
1994
|
+
filterable?: boolean | undefined;
|
|
1995
|
+
pageSize?: number | undefined;
|
|
1996
|
+
searchable?: boolean | undefined;
|
|
1997
|
+
searchFields?: string[] | undefined;
|
|
1998
1998
|
sortFields?: string[] | undefined;
|
|
1999
1999
|
refreshInterval?: number | undefined;
|
|
2000
2000
|
} | undefined;
|
|
@@ -2055,11 +2055,6 @@ export declare const DocumentListItemSchema: z.ZodObject<{
|
|
|
2055
2055
|
metadata?: Record<string, any> | undefined;
|
|
2056
2056
|
filter?: any;
|
|
2057
2057
|
options?: {
|
|
2058
|
-
sortable?: boolean | undefined;
|
|
2059
|
-
filterable?: boolean | undefined;
|
|
2060
|
-
pageSize?: number | undefined;
|
|
2061
|
-
searchable?: boolean | undefined;
|
|
2062
|
-
searchFields?: string[] | undefined;
|
|
2063
2058
|
filters?: {
|
|
2064
2059
|
id: string;
|
|
2065
2060
|
field: string;
|
|
@@ -2075,6 +2070,11 @@ export declare const DocumentListItemSchema: z.ZodObject<{
|
|
|
2075
2070
|
placeholder?: string | undefined;
|
|
2076
2071
|
} | undefined;
|
|
2077
2072
|
}[] | undefined;
|
|
2073
|
+
sortable?: boolean | undefined;
|
|
2074
|
+
filterable?: boolean | undefined;
|
|
2075
|
+
pageSize?: number | undefined;
|
|
2076
|
+
searchable?: boolean | undefined;
|
|
2077
|
+
searchFields?: string[] | undefined;
|
|
2078
2078
|
sortFields?: string[] | undefined;
|
|
2079
2079
|
refreshInterval?: number | undefined;
|
|
2080
2080
|
} | undefined;
|
|
@@ -2220,25 +2220,25 @@ export declare const SingletonItemSchema: z.ZodObject<{
|
|
|
2220
2220
|
message: z.ZodString;
|
|
2221
2221
|
}, "strip", z.ZodTypeAny, {
|
|
2222
2222
|
message: string;
|
|
2223
|
-
type: "length" | "custom" | "
|
|
2223
|
+
type: "length" | "custom" | "regex" | "range";
|
|
2224
2224
|
value?: any;
|
|
2225
2225
|
}, {
|
|
2226
2226
|
message: string;
|
|
2227
|
-
type: "length" | "custom" | "
|
|
2227
|
+
type: "length" | "custom" | "regex" | "range";
|
|
2228
2228
|
value?: any;
|
|
2229
2229
|
}>>>;
|
|
2230
2230
|
}, "strip", z.ZodTypeAny, {
|
|
2231
2231
|
required?: string[] | undefined;
|
|
2232
2232
|
rules?: Record<string, {
|
|
2233
2233
|
message: string;
|
|
2234
|
-
type: "length" | "custom" | "
|
|
2234
|
+
type: "length" | "custom" | "regex" | "range";
|
|
2235
2235
|
value?: any;
|
|
2236
2236
|
}> | undefined;
|
|
2237
2237
|
}, {
|
|
2238
2238
|
required?: string[] | undefined;
|
|
2239
2239
|
rules?: Record<string, {
|
|
2240
2240
|
message: string;
|
|
2241
|
-
type: "length" | "custom" | "
|
|
2241
|
+
type: "length" | "custom" | "regex" | "range";
|
|
2242
2242
|
value?: any;
|
|
2243
2243
|
}> | undefined;
|
|
2244
2244
|
}>>;
|
|
@@ -2247,7 +2247,7 @@ export declare const SingletonItemSchema: z.ZodObject<{
|
|
|
2247
2247
|
required?: string[] | undefined;
|
|
2248
2248
|
rules?: Record<string, {
|
|
2249
2249
|
message: string;
|
|
2250
|
-
type: "length" | "custom" | "
|
|
2250
|
+
type: "length" | "custom" | "regex" | "range";
|
|
2251
2251
|
value?: any;
|
|
2252
2252
|
}> | undefined;
|
|
2253
2253
|
} | undefined;
|
|
@@ -2262,7 +2262,7 @@ export declare const SingletonItemSchema: z.ZodObject<{
|
|
|
2262
2262
|
required?: string[] | undefined;
|
|
2263
2263
|
rules?: Record<string, {
|
|
2264
2264
|
message: string;
|
|
2265
|
-
type: "length" | "custom" | "
|
|
2265
|
+
type: "length" | "custom" | "regex" | "range";
|
|
2266
2266
|
value?: any;
|
|
2267
2267
|
}> | undefined;
|
|
2268
2268
|
} | undefined;
|
|
@@ -2285,7 +2285,7 @@ export declare const SingletonItemSchema: z.ZodObject<{
|
|
|
2285
2285
|
required?: string[] | undefined;
|
|
2286
2286
|
rules?: Record<string, {
|
|
2287
2287
|
message: string;
|
|
2288
|
-
type: "length" | "custom" | "
|
|
2288
|
+
type: "length" | "custom" | "regex" | "range";
|
|
2289
2289
|
value?: any;
|
|
2290
2290
|
}> | undefined;
|
|
2291
2291
|
} | undefined;
|
|
@@ -2326,7 +2326,7 @@ export declare const SingletonItemSchema: z.ZodObject<{
|
|
|
2326
2326
|
required?: string[] | undefined;
|
|
2327
2327
|
rules?: Record<string, {
|
|
2328
2328
|
message: string;
|
|
2329
|
-
type: "length" | "custom" | "
|
|
2329
|
+
type: "length" | "custom" | "regex" | "range";
|
|
2330
2330
|
value?: any;
|
|
2331
2331
|
}> | undefined;
|
|
2332
2332
|
} | undefined;
|
|
@@ -2660,14 +2660,14 @@ export declare const ThemeConfigSchema: z.ZodObject<{
|
|
|
2660
2660
|
secondary?: string | undefined;
|
|
2661
2661
|
muted?: string | undefined;
|
|
2662
2662
|
} | undefined;
|
|
2663
|
-
primaryColor?: string | undefined;
|
|
2664
|
-
secondaryColor?: string | undefined;
|
|
2665
|
-
accentColor?: string | undefined;
|
|
2666
2663
|
background?: {
|
|
2667
2664
|
primary?: string | undefined;
|
|
2668
2665
|
secondary?: string | undefined;
|
|
2669
2666
|
tertiary?: string | undefined;
|
|
2670
2667
|
} | undefined;
|
|
2668
|
+
primaryColor?: string | undefined;
|
|
2669
|
+
secondaryColor?: string | undefined;
|
|
2670
|
+
accentColor?: string | undefined;
|
|
2671
2671
|
borderRadius?: {
|
|
2672
2672
|
small?: string | undefined;
|
|
2673
2673
|
large?: string | undefined;
|
|
@@ -2698,14 +2698,14 @@ export declare const ThemeConfigSchema: z.ZodObject<{
|
|
|
2698
2698
|
secondary?: string | undefined;
|
|
2699
2699
|
muted?: string | undefined;
|
|
2700
2700
|
} | undefined;
|
|
2701
|
-
primaryColor?: string | undefined;
|
|
2702
|
-
secondaryColor?: string | undefined;
|
|
2703
|
-
accentColor?: string | undefined;
|
|
2704
2701
|
background?: {
|
|
2705
2702
|
primary?: string | undefined;
|
|
2706
2703
|
secondary?: string | undefined;
|
|
2707
2704
|
tertiary?: string | undefined;
|
|
2708
2705
|
} | undefined;
|
|
2706
|
+
primaryColor?: string | undefined;
|
|
2707
|
+
secondaryColor?: string | undefined;
|
|
2708
|
+
accentColor?: string | undefined;
|
|
2709
2709
|
borderRadius?: {
|
|
2710
2710
|
small?: string | undefined;
|
|
2711
2711
|
large?: string | undefined;
|
|
@@ -2861,14 +2861,14 @@ export declare const TrokkyStructureSchema: z.ZodObject<{
|
|
|
2861
2861
|
secondary?: string | undefined;
|
|
2862
2862
|
muted?: string | undefined;
|
|
2863
2863
|
} | undefined;
|
|
2864
|
-
primaryColor?: string | undefined;
|
|
2865
|
-
secondaryColor?: string | undefined;
|
|
2866
|
-
accentColor?: string | undefined;
|
|
2867
2864
|
background?: {
|
|
2868
2865
|
primary?: string | undefined;
|
|
2869
2866
|
secondary?: string | undefined;
|
|
2870
2867
|
tertiary?: string | undefined;
|
|
2871
2868
|
} | undefined;
|
|
2869
|
+
primaryColor?: string | undefined;
|
|
2870
|
+
secondaryColor?: string | undefined;
|
|
2871
|
+
accentColor?: string | undefined;
|
|
2872
2872
|
borderRadius?: {
|
|
2873
2873
|
small?: string | undefined;
|
|
2874
2874
|
large?: string | undefined;
|
|
@@ -2899,14 +2899,14 @@ export declare const TrokkyStructureSchema: z.ZodObject<{
|
|
|
2899
2899
|
secondary?: string | undefined;
|
|
2900
2900
|
muted?: string | undefined;
|
|
2901
2901
|
} | undefined;
|
|
2902
|
-
primaryColor?: string | undefined;
|
|
2903
|
-
secondaryColor?: string | undefined;
|
|
2904
|
-
accentColor?: string | undefined;
|
|
2905
2902
|
background?: {
|
|
2906
2903
|
primary?: string | undefined;
|
|
2907
2904
|
secondary?: string | undefined;
|
|
2908
2905
|
tertiary?: string | undefined;
|
|
2909
2906
|
} | undefined;
|
|
2907
|
+
primaryColor?: string | undefined;
|
|
2908
|
+
secondaryColor?: string | undefined;
|
|
2909
|
+
accentColor?: string | undefined;
|
|
2910
2910
|
borderRadius?: {
|
|
2911
2911
|
small?: string | undefined;
|
|
2912
2912
|
large?: string | undefined;
|
|
@@ -2990,14 +2990,14 @@ export declare const TrokkyStructureSchema: z.ZodObject<{
|
|
|
2990
2990
|
secondary?: string | undefined;
|
|
2991
2991
|
muted?: string | undefined;
|
|
2992
2992
|
} | undefined;
|
|
2993
|
-
primaryColor?: string | undefined;
|
|
2994
|
-
secondaryColor?: string | undefined;
|
|
2995
|
-
accentColor?: string | undefined;
|
|
2996
2993
|
background?: {
|
|
2997
2994
|
primary?: string | undefined;
|
|
2998
2995
|
secondary?: string | undefined;
|
|
2999
2996
|
tertiary?: string | undefined;
|
|
3000
2997
|
} | undefined;
|
|
2998
|
+
primaryColor?: string | undefined;
|
|
2999
|
+
secondaryColor?: string | undefined;
|
|
3000
|
+
accentColor?: string | undefined;
|
|
3001
3001
|
borderRadius?: {
|
|
3002
3002
|
small?: string | undefined;
|
|
3003
3003
|
large?: string | undefined;
|
|
@@ -3051,14 +3051,14 @@ export declare const TrokkyStructureSchema: z.ZodObject<{
|
|
|
3051
3051
|
secondary?: string | undefined;
|
|
3052
3052
|
muted?: string | undefined;
|
|
3053
3053
|
} | undefined;
|
|
3054
|
-
primaryColor?: string | undefined;
|
|
3055
|
-
secondaryColor?: string | undefined;
|
|
3056
|
-
accentColor?: string | undefined;
|
|
3057
3054
|
background?: {
|
|
3058
3055
|
primary?: string | undefined;
|
|
3059
3056
|
secondary?: string | undefined;
|
|
3060
3057
|
tertiary?: string | undefined;
|
|
3061
3058
|
} | undefined;
|
|
3059
|
+
primaryColor?: string | undefined;
|
|
3060
|
+
secondaryColor?: string | undefined;
|
|
3061
|
+
accentColor?: string | undefined;
|
|
3062
3062
|
borderRadius?: {
|
|
3063
3063
|
small?: string | undefined;
|
|
3064
3064
|
large?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trokky/trokky",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Modern, composable Content Management System - Server package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -96,6 +96,22 @@
|
|
|
96
96
|
"./express": {
|
|
97
97
|
"types": "./dist/integrations/express/index.d.ts",
|
|
98
98
|
"import": "./dist/integrations/express/index.js"
|
|
99
|
+
},
|
|
100
|
+
"./routes": {
|
|
101
|
+
"import": "./dist/routes/index.js",
|
|
102
|
+
"types": "./dist/routes/index.d.ts"
|
|
103
|
+
},
|
|
104
|
+
"./workers": {
|
|
105
|
+
"import": "./dist/integrations/workers/index.js",
|
|
106
|
+
"types": "./dist/integrations/workers/index.d.ts"
|
|
107
|
+
},
|
|
108
|
+
"./adapters/cloudflare-r2": {
|
|
109
|
+
"import": "./dist/adapters/cloudflare-r2/index.js",
|
|
110
|
+
"types": "./dist/adapters/cloudflare-r2/index.d.ts"
|
|
111
|
+
},
|
|
112
|
+
"./adapters/cloudflare-d1": {
|
|
113
|
+
"import": "./dist/adapters/cloudflare-d1/index.js",
|
|
114
|
+
"types": "./dist/adapters/cloudflare-d1/index.d.ts"
|
|
99
115
|
}
|
|
100
116
|
},
|
|
101
117
|
"scripts": {
|
|
@@ -160,6 +176,7 @@
|
|
|
160
176
|
"sharp": "^0.35.4"
|
|
161
177
|
},
|
|
162
178
|
"devDependencies": {
|
|
179
|
+
"@cloudflare/workers-types": "^5.20260914.1",
|
|
163
180
|
"@types/bcrypt": "^6.0.0",
|
|
164
181
|
"@types/busboy": "^1.5.4",
|
|
165
182
|
"@types/cors": "^2.8.17",
|
|
@@ -172,6 +189,8 @@
|
|
|
172
189
|
"@types/sharp": "^0.31.1",
|
|
173
190
|
"@types/supertest": "^7.2.0",
|
|
174
191
|
"@vitest/coverage-v8": "^4.1.0",
|
|
192
|
+
"esbuild": "^0.21.5",
|
|
193
|
+
"miniflare": "^4.20260730.0",
|
|
175
194
|
"supertest": "^7.2.2",
|
|
176
195
|
"typescript": "^5.3.3",
|
|
177
196
|
"vitest": "^4.1.0"
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloudflare Images Processor
|
|
3
|
-
*
|
|
4
|
-
* Integrates with Cloudflare Images for:
|
|
5
|
-
* - Automatic image optimization
|
|
6
|
-
* - Global CDN delivery
|
|
7
|
-
* - Real-time transformations
|
|
8
|
-
* - WebP/AVIF conversion
|
|
9
|
-
*
|
|
10
|
-
* Supports two modes:
|
|
11
|
-
* 1. Images API Binding (Workers) - Direct image manipulation in Workers
|
|
12
|
-
* 2. Upload API - Traditional HTTP API for external usage
|
|
13
|
-
*/
|
|
14
|
-
import { ImageProcessor, type ImageProcessorConfig, type ProcessedImage } from './types.js';
|
|
15
|
-
export interface CloudflareImagesConfig extends ImageProcessorConfig {
|
|
16
|
-
type: 'cloudflare-images';
|
|
17
|
-
options: {
|
|
18
|
-
accountId: string;
|
|
19
|
-
apiToken?: string;
|
|
20
|
-
deliveryUrl?: string;
|
|
21
|
-
defaultVariant?: string;
|
|
22
|
-
binding?: {
|
|
23
|
-
enabled: boolean;
|
|
24
|
-
bindingName?: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
interface CloudflareImagesEnv {
|
|
29
|
-
IMAGES?: {
|
|
30
|
-
input(buffer: ArrayBuffer): CloudflareImageTransform;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
interface CloudflareImageTransform {
|
|
34
|
-
transform(options: CloudflareTransformOptions): CloudflareImageTransform;
|
|
35
|
-
output(): Promise<ArrayBuffer>;
|
|
36
|
-
}
|
|
37
|
-
interface CloudflareTransformOptions {
|
|
38
|
-
width?: number;
|
|
39
|
-
height?: number;
|
|
40
|
-
fit?: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad';
|
|
41
|
-
quality?: number;
|
|
42
|
-
format?: 'webp' | 'avif' | 'jpeg' | 'png';
|
|
43
|
-
}
|
|
44
|
-
export declare class CloudflareImagesProcessor extends ImageProcessor {
|
|
45
|
-
private accountId;
|
|
46
|
-
private apiToken?;
|
|
47
|
-
private deliveryUrl;
|
|
48
|
-
private defaultVariant;
|
|
49
|
-
private bindingEnabled;
|
|
50
|
-
private bindingName;
|
|
51
|
-
private env?;
|
|
52
|
-
constructor(config: CloudflareImagesConfig);
|
|
53
|
-
/**
|
|
54
|
-
* Set the Workers environment for binding mode
|
|
55
|
-
*/
|
|
56
|
-
setEnv(env: CloudflareImagesEnv): void;
|
|
57
|
-
processImage(file: File, metadata: {
|
|
58
|
-
id: string;
|
|
59
|
-
filename: string;
|
|
60
|
-
path: string;
|
|
61
|
-
}): Promise<ProcessedImage>;
|
|
62
|
-
/**
|
|
63
|
-
* Process image using Workers binding (edge-native)
|
|
64
|
-
*/
|
|
65
|
-
private processWithBinding;
|
|
66
|
-
/**
|
|
67
|
-
* Process image using Upload API (traditional HTTP)
|
|
68
|
-
*/
|
|
69
|
-
private processWithUploadAPI;
|
|
70
|
-
/**
|
|
71
|
-
* Map Trokky variant config to Cloudflare transform options
|
|
72
|
-
*/
|
|
73
|
-
private mapVariantToCloudflareOptions;
|
|
74
|
-
/**
|
|
75
|
-
* Create variant configuration for Upload API
|
|
76
|
-
*/
|
|
77
|
-
private createVariantConfig;
|
|
78
|
-
getImageUrl(imageId: string, variantName?: string): string;
|
|
79
|
-
deleteImage(imageId: string): Promise<void>;
|
|
80
|
-
healthCheck(): Promise<boolean>;
|
|
81
|
-
}
|
|
82
|
-
export {};
|
|
83
|
-
//# sourceMappingURL=cloudflare-images.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cloudflare-images.d.ts","sourceRoot":"","sources":["../../../../src/core/media/processors/cloudflare-images.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAGpB,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE,IAAI,EAAE,mBAAmB,CAAA;IACzB,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,cAAc,CAAC,EAAE,MAAM,CAAA;QAEvB,OAAO,CAAC,EAAE;YACR,OAAO,EAAE,OAAO,CAAA;YAChB,WAAW,CAAC,EAAE,MAAM,CAAA;SACrB,CAAA;KACF,CAAA;CACF;AAED,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,wBAAwB,CAAA;KACrD,CAAA;CACF;AAED,UAAU,wBAAwB;IAChC,SAAS,CAAC,OAAO,EAAE,0BAA0B,GAAG,wBAAwB,CAAA;IACxE,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,CAAA;CAC/B;AAED,UAAU,0BAA0B;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAA;IACzD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;CAC1C;AAcD,qBAAa,yBAA0B,SAAQ,cAAc;IAC3D,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,CAAQ;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,GAAG,CAAC,CAAqB;gBAErB,MAAM,EAAE,sBAAsB;IAa1C;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI;IAIhC,YAAY,CAChB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GACvD,OAAO,CAAC,cAAc,CAAC;IA0B1B;;OAEG;YACW,kBAAkB;IAyChC;;OAEG;YACW,oBAAoB;IAsElC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAuBrC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkB3B,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM;IAKpD,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqB3C,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CA0BtC"}
|