@websolutespa/bom-core 1.8.3 → 1.8.5
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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +24 -1
- package/dist/index.js +73 -0
- package/dist/index.mjs +68 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import { IncomingMessage, ServerResponse, IncomingHttpHeaders } from 'http';
|
|
|
2
2
|
import { ParsedUrlQuery } from 'querystring';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
+
declare function base64ToString(text: string): string;
|
|
6
|
+
declare function stringToBase64(text: string): string;
|
|
7
|
+
|
|
5
8
|
type Json = string | number | boolean | null | Json[] | {
|
|
6
9
|
[key: string]: Json;
|
|
7
10
|
};
|
|
@@ -292,6 +295,23 @@ type FetchRequestOptions = {
|
|
|
292
295
|
type FetchService<T = unknown> = (url: string, options?: FetchRequestOptions, serviceOptions?: any) => Promise<T>;
|
|
293
296
|
type FetchError = any;
|
|
294
297
|
|
|
298
|
+
declare enum ImageStrategy {
|
|
299
|
+
None = "none",
|
|
300
|
+
Next = "next",
|
|
301
|
+
Mixer = "mixer",
|
|
302
|
+
Oven = "oven",
|
|
303
|
+
Token = "token",
|
|
304
|
+
Custom = "custom"
|
|
305
|
+
}
|
|
306
|
+
type IImageResize = {
|
|
307
|
+
q: number;
|
|
308
|
+
w: number;
|
|
309
|
+
h?: number;
|
|
310
|
+
x?: number;
|
|
311
|
+
y?: number;
|
|
312
|
+
src: string;
|
|
313
|
+
};
|
|
314
|
+
|
|
295
315
|
type ILabel = IEntity & {
|
|
296
316
|
id: IEquatable;
|
|
297
317
|
text?: ILocalizable;
|
|
@@ -832,6 +852,9 @@ declare function httpPatch(url: string, payload: any, options?: FetchRequestOpti
|
|
|
832
852
|
*/
|
|
833
853
|
declare function httpDelete(url: string, options?: FetchRequestOptions): Promise<any>;
|
|
834
854
|
|
|
855
|
+
declare function encryptImageToken(imageResize: IImageResize): string;
|
|
856
|
+
declare function decryptImageResize(token: string): IImageResize;
|
|
857
|
+
|
|
835
858
|
declare class JsonService<T extends IEntity = IEntity> implements IQuerable<T> {
|
|
836
859
|
items: T[];
|
|
837
860
|
constructor(items: T[]);
|
|
@@ -1280,4 +1303,4 @@ declare function asServerProps(props: any): any;
|
|
|
1280
1303
|
declare function awaitAll(array: any, callback: (item: any, index: number) => Promise<any>): Promise<any[]>;
|
|
1281
1304
|
declare function merge(target: any, source: any): any;
|
|
1282
1305
|
|
|
1283
|
-
export { DeepPartial, Dynamic, FetchError, FetchRequestOptions, FetchService, FindParams, FindWhereParams, IAction, IActionEmailData, IAnchor, ICategorized, ICategory, ICategoryItem, IClassName, IClassNameCollection, IClassNameValue, ICollectionDescription, IComponent, IConfig, IConsentPreference, IContextBaseParams, IContextParams, IDecoratedNav, IEmailConfig, IEndUser, IEntity, IEquatable, IFeature, IFeatureType, ILabel, ILayout, ILegalNotice, ILetter, ILocale, ILocaleId, ILocalizable, ILocalized, ILocalizedString, IMarket, IMedia, IMediaImage, IMediaInfo, IMediaJson, IMediaPdf, IMediaType, IMediaVideo, IMemoryStore, IMenu, IMenuBase, IMenuCategory, IMenuCustom, IMenuGroup, IMenuHref, IMenuItem, IMenuLink, IMenuPage, IMenuRoute, INamedEntity, IOption, IOverride, IOverrideReturnValue, IOverrideValue, IPackages, IPage, IPageItem, IPageRelation, IPageRelationResult, IPageUnresolvedRelation, IPagedResult, IPaginationResult, IPartial, IPreference, IPrettify, IQuerable, IRedirect, IRoute, IRouteCanonical, IRouteLink, IRouteParams, ISchema, ISerializedCollection, ISerializedStore, IServerSideContext, IServerSideSplatContext, IStaticContext, IStore, ITemplate, ITitledEntity, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNav, Json, JsonService, LiteralUnion, Logger, LoggerLevel, MenuCategoryStrategy, NextApiRequestCookies, Operator, PageProps, Pagination, PreviewData, Primitive, QueryParams, RedirectReason, RequireAtLeastOne, RouteStrategy, SchemaType, ServerSidePropsContext, StaticPropsContext, User, UserRole, UserWithRoles, ValueOf, Where, WhereAndOr, WhereBase, WhereField, arrayShuffle, asCategoryId, asEntityId, asEquatable, asEquatableNumber, asEquatableString, asServerProps, asSortedOptions, awaitAll, camelToSnakeCase, cloneItem, collectFeatureTypes, collectFeatureTypes__, collectOptions, collectRoutes, consoleWarn, deepMerge, defaultLocale, defaultMarket, eachCategorized, eachMarketLocale, enumToList, findCategoryInCategories, findChildCategories, findRouteOfCategory, findRoutesOfCategory, getCategorySegments, getCategorySegmentsByCategory, getClassNames, getCollectionDescription, getEnv, getHost, getIsDevelopment, getIsProduction, getOrigin, getParentCategoriesById, getParentCategory, getProto, getRootCategory, getRouteHref, httpDelete, httpFetch, httpGet, httpPatch, httpPost, httpPut, isArray, isBrowser, isDevelopment, isEntity, isEquatable, isHeaders, isIncomingHttpHeaders, isLocalizedString, isMediaImage, isMediaJson, isMediaPdf, isMediaVideo, isMenuHref, isNotNullString, isNumber, isObject, isProduction, isPromise, isRelation, isReservedCollectionDescription, isStage, isString, isUndecoratedMenuCategory, isUndecoratedMenuItem, isUndecoratedMenuPage, isUndecoratedNav, isUnresolvedRelation, isValidCollectionDescription, isValidString, localize, localizeItem, localizeValue, localizedToString, merge, pascalCaseToCamelCase, pascalCaseToCharCase, pascalCaseToKebabCase, pascalCaseToSnakeCase, qsDeserialize, qsDeserializeRaw, qsSerialize, qsSerializeRaw, resolveMediaType, toCamelCase, toCharCase, toDisplayName, toFindParams, toKebabCase, toPascalCase, toPluralName, toSnakeCase, toTitleCase, toValidCollectionName, unknownCaseToPascalCase, uuidv4, withSchema };
|
|
1306
|
+
export { DeepPartial, Dynamic, FetchError, FetchRequestOptions, FetchService, FindParams, FindWhereParams, IAction, IActionEmailData, IAnchor, ICategorized, ICategory, ICategoryItem, IClassName, IClassNameCollection, IClassNameValue, ICollectionDescription, IComponent, IConfig, IConsentPreference, IContextBaseParams, IContextParams, IDecoratedNav, IEmailConfig, IEndUser, IEntity, IEquatable, IFeature, IFeatureType, IImageResize, ILabel, ILayout, ILegalNotice, ILetter, ILocale, ILocaleId, ILocalizable, ILocalized, ILocalizedString, IMarket, IMedia, IMediaImage, IMediaInfo, IMediaJson, IMediaPdf, IMediaType, IMediaVideo, IMemoryStore, IMenu, IMenuBase, IMenuCategory, IMenuCustom, IMenuGroup, IMenuHref, IMenuItem, IMenuLink, IMenuPage, IMenuRoute, INamedEntity, IOption, IOverride, IOverrideReturnValue, IOverrideValue, IPackages, IPage, IPageItem, IPageRelation, IPageRelationResult, IPageUnresolvedRelation, IPagedResult, IPaginationResult, IPartial, IPreference, IPrettify, IQuerable, IRedirect, IRoute, IRouteCanonical, IRouteLink, IRouteParams, ISchema, ISerializedCollection, ISerializedStore, IServerSideContext, IServerSideSplatContext, IStaticContext, IStore, ITemplate, ITitledEntity, IUndecoratedMenu, IUndecoratedMenuBase, IUndecoratedMenuCategory, IUndecoratedMenuCustom, IUndecoratedMenuGroup, IUndecoratedMenuItem, IUndecoratedMenuLink, IUndecoratedMenuPage, IUndecoratedNav, ImageStrategy, Json, JsonService, LiteralUnion, Logger, LoggerLevel, MenuCategoryStrategy, NextApiRequestCookies, Operator, PageProps, Pagination, PreviewData, Primitive, QueryParams, RedirectReason, RequireAtLeastOne, RouteStrategy, SchemaType, ServerSidePropsContext, StaticPropsContext, User, UserRole, UserWithRoles, ValueOf, Where, WhereAndOr, WhereBase, WhereField, arrayShuffle, asCategoryId, asEntityId, asEquatable, asEquatableNumber, asEquatableString, asServerProps, asSortedOptions, awaitAll, base64ToString, camelToSnakeCase, cloneItem, collectFeatureTypes, collectFeatureTypes__, collectOptions, collectRoutes, consoleWarn, decryptImageResize, deepMerge, defaultLocale, defaultMarket, eachCategorized, eachMarketLocale, encryptImageToken, enumToList, findCategoryInCategories, findChildCategories, findRouteOfCategory, findRoutesOfCategory, getCategorySegments, getCategorySegmentsByCategory, getClassNames, getCollectionDescription, getEnv, getHost, getIsDevelopment, getIsProduction, getOrigin, getParentCategoriesById, getParentCategory, getProto, getRootCategory, getRouteHref, httpDelete, httpFetch, httpGet, httpPatch, httpPost, httpPut, isArray, isBrowser, isDevelopment, isEntity, isEquatable, isHeaders, isIncomingHttpHeaders, isLocalizedString, isMediaImage, isMediaJson, isMediaPdf, isMediaVideo, isMenuHref, isNotNullString, isNumber, isObject, isProduction, isPromise, isRelation, isReservedCollectionDescription, isStage, isString, isUndecoratedMenuCategory, isUndecoratedMenuItem, isUndecoratedMenuPage, isUndecoratedNav, isUnresolvedRelation, isValidCollectionDescription, isValidString, localize, localizeItem, localizeValue, localizedToString, merge, pascalCaseToCamelCase, pascalCaseToCharCase, pascalCaseToKebabCase, pascalCaseToSnakeCase, qsDeserialize, qsDeserializeRaw, qsSerialize, qsSerializeRaw, resolveMediaType, stringToBase64, toCamelCase, toCharCase, toDisplayName, toFindParams, toKebabCase, toPascalCase, toPluralName, toSnakeCase, toTitleCase, toValidCollectionName, unknownCaseToPascalCase, uuidv4, withSchema };
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
+
ImageStrategy: () => ImageStrategy,
|
|
33
34
|
JsonService: () => JsonService,
|
|
34
35
|
Logger: () => Logger,
|
|
35
36
|
LoggerLevel: () => LoggerLevel,
|
|
@@ -45,6 +46,7 @@ __export(src_exports, {
|
|
|
45
46
|
asServerProps: () => asServerProps,
|
|
46
47
|
asSortedOptions: () => asSortedOptions,
|
|
47
48
|
awaitAll: () => awaitAll,
|
|
49
|
+
base64ToString: () => base64ToString,
|
|
48
50
|
camelToSnakeCase: () => camelToSnakeCase,
|
|
49
51
|
cloneItem: () => cloneItem,
|
|
50
52
|
collectFeatureTypes: () => collectFeatureTypes,
|
|
@@ -52,11 +54,13 @@ __export(src_exports, {
|
|
|
52
54
|
collectOptions: () => collectOptions,
|
|
53
55
|
collectRoutes: () => collectRoutes,
|
|
54
56
|
consoleWarn: () => consoleWarn,
|
|
57
|
+
decryptImageResize: () => decryptImageResize,
|
|
55
58
|
deepMerge: () => deepMerge,
|
|
56
59
|
defaultLocale: () => defaultLocale,
|
|
57
60
|
defaultMarket: () => defaultMarket,
|
|
58
61
|
eachCategorized: () => eachCategorized,
|
|
59
62
|
eachMarketLocale: () => eachMarketLocale,
|
|
63
|
+
encryptImageToken: () => encryptImageToken,
|
|
60
64
|
enumToList: () => enumToList,
|
|
61
65
|
findCategoryInCategories: () => findCategoryInCategories,
|
|
62
66
|
findChildCategories: () => findChildCategories,
|
|
@@ -125,6 +129,7 @@ __export(src_exports, {
|
|
|
125
129
|
qsSerialize: () => qsSerialize,
|
|
126
130
|
qsSerializeRaw: () => qsSerializeRaw,
|
|
127
131
|
resolveMediaType: () => resolveMediaType,
|
|
132
|
+
stringToBase64: () => stringToBase64,
|
|
128
133
|
toCamelCase: () => toCamelCase,
|
|
129
134
|
toCharCase: () => toCharCase,
|
|
130
135
|
toDisplayName: () => toDisplayName,
|
|
@@ -486,6 +491,14 @@ function merge(target, source) {
|
|
|
486
491
|
return target;
|
|
487
492
|
}
|
|
488
493
|
|
|
494
|
+
// src/base64/base64.ts
|
|
495
|
+
function base64ToString(text) {
|
|
496
|
+
return isBrowser ? window.atob(text) : Buffer.from(text, "base64").toString();
|
|
497
|
+
}
|
|
498
|
+
function stringToBase64(text) {
|
|
499
|
+
return isBrowser ? window.btoa(text) : Buffer.from(text).toString("base64");
|
|
500
|
+
}
|
|
501
|
+
|
|
489
502
|
// src/category/category.ts
|
|
490
503
|
var ROOT_CATEGORY = process.env.ROOT_CATEGORY || "";
|
|
491
504
|
function getRootCategory(categories) {
|
|
@@ -710,6 +723,50 @@ async function httpDelete(url, options = {}) {
|
|
|
710
723
|
return await httpFetch(url, { ...options, method: "DELETE" });
|
|
711
724
|
}
|
|
712
725
|
|
|
726
|
+
// src/image/image.ts
|
|
727
|
+
function getSecret() {
|
|
728
|
+
return process.env.IMAGE_SECRET || "The sun sets over the calm ocean";
|
|
729
|
+
}
|
|
730
|
+
function textToArrayBuffer_(text) {
|
|
731
|
+
const encoder = new TextEncoder();
|
|
732
|
+
const arrayBuffer = encoder.encode(text);
|
|
733
|
+
return arrayBuffer;
|
|
734
|
+
}
|
|
735
|
+
function arrayBufferToText_(arrayBuffer) {
|
|
736
|
+
const encoder = new TextDecoder("utf-8");
|
|
737
|
+
const text = encoder.decode(arrayBuffer);
|
|
738
|
+
return text;
|
|
739
|
+
}
|
|
740
|
+
function xor_(text, secret) {
|
|
741
|
+
const s = textToArrayBuffer_(secret);
|
|
742
|
+
const t = textToArrayBuffer_(text);
|
|
743
|
+
const m = t.map((a, i) => {
|
|
744
|
+
const b = s[i % s.length];
|
|
745
|
+
return a ^ b;
|
|
746
|
+
});
|
|
747
|
+
return arrayBufferToText_(m);
|
|
748
|
+
}
|
|
749
|
+
function encrypt_(text, secret) {
|
|
750
|
+
const encrypted = xor_(text, secret);
|
|
751
|
+
const base64 = stringToBase64(encrypted);
|
|
752
|
+
return base64;
|
|
753
|
+
}
|
|
754
|
+
function decrypt_(base64, secret) {
|
|
755
|
+
const text = base64ToString(base64);
|
|
756
|
+
const decrypted = xor_(text, secret);
|
|
757
|
+
return decrypted;
|
|
758
|
+
}
|
|
759
|
+
function encryptImageToken(imageResize) {
|
|
760
|
+
const text = JSON.stringify(imageResize);
|
|
761
|
+
const token = encrypt_(text, getSecret());
|
|
762
|
+
return token;
|
|
763
|
+
}
|
|
764
|
+
function decryptImageResize(token) {
|
|
765
|
+
const text = decrypt_(token, getSecret());
|
|
766
|
+
const data = JSON.parse(text);
|
|
767
|
+
return data;
|
|
768
|
+
}
|
|
769
|
+
|
|
713
770
|
// src/json/json.service.ts
|
|
714
771
|
var JsonService = class {
|
|
715
772
|
constructor(items) {
|
|
@@ -1450,6 +1507,17 @@ function getRouteHref(segments, market, locale, markets, locales) {
|
|
|
1450
1507
|
return `${prefix}${href}`;
|
|
1451
1508
|
}
|
|
1452
1509
|
|
|
1510
|
+
// src/types/image.ts
|
|
1511
|
+
var ImageStrategy = /* @__PURE__ */ ((ImageStrategy2) => {
|
|
1512
|
+
ImageStrategy2["None"] = "none";
|
|
1513
|
+
ImageStrategy2["Next"] = "next";
|
|
1514
|
+
ImageStrategy2["Mixer"] = "mixer";
|
|
1515
|
+
ImageStrategy2["Oven"] = "oven";
|
|
1516
|
+
ImageStrategy2["Token"] = "token";
|
|
1517
|
+
ImageStrategy2["Custom"] = "custom";
|
|
1518
|
+
return ImageStrategy2;
|
|
1519
|
+
})(ImageStrategy || {});
|
|
1520
|
+
|
|
1453
1521
|
// src/types/media.ts
|
|
1454
1522
|
function resolveMediaType(media) {
|
|
1455
1523
|
if (typeof media.type === "string" && media.type.length > 0) {
|
|
@@ -1524,6 +1592,7 @@ var RedirectReason = /* @__PURE__ */ ((RedirectReason2) => {
|
|
|
1524
1592
|
})(RedirectReason || {});
|
|
1525
1593
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1526
1594
|
0 && (module.exports = {
|
|
1595
|
+
ImageStrategy,
|
|
1527
1596
|
JsonService,
|
|
1528
1597
|
Logger,
|
|
1529
1598
|
LoggerLevel,
|
|
@@ -1539,6 +1608,7 @@ var RedirectReason = /* @__PURE__ */ ((RedirectReason2) => {
|
|
|
1539
1608
|
asServerProps,
|
|
1540
1609
|
asSortedOptions,
|
|
1541
1610
|
awaitAll,
|
|
1611
|
+
base64ToString,
|
|
1542
1612
|
camelToSnakeCase,
|
|
1543
1613
|
cloneItem,
|
|
1544
1614
|
collectFeatureTypes,
|
|
@@ -1546,11 +1616,13 @@ var RedirectReason = /* @__PURE__ */ ((RedirectReason2) => {
|
|
|
1546
1616
|
collectOptions,
|
|
1547
1617
|
collectRoutes,
|
|
1548
1618
|
consoleWarn,
|
|
1619
|
+
decryptImageResize,
|
|
1549
1620
|
deepMerge,
|
|
1550
1621
|
defaultLocale,
|
|
1551
1622
|
defaultMarket,
|
|
1552
1623
|
eachCategorized,
|
|
1553
1624
|
eachMarketLocale,
|
|
1625
|
+
encryptImageToken,
|
|
1554
1626
|
enumToList,
|
|
1555
1627
|
findCategoryInCategories,
|
|
1556
1628
|
findChildCategories,
|
|
@@ -1619,6 +1691,7 @@ var RedirectReason = /* @__PURE__ */ ((RedirectReason2) => {
|
|
|
1619
1691
|
qsSerialize,
|
|
1620
1692
|
qsSerializeRaw,
|
|
1621
1693
|
resolveMediaType,
|
|
1694
|
+
stringToBase64,
|
|
1622
1695
|
toCamelCase,
|
|
1623
1696
|
toCharCase,
|
|
1624
1697
|
toDisplayName,
|
package/dist/index.mjs
CHANGED
|
@@ -343,6 +343,14 @@ function merge(target, source) {
|
|
|
343
343
|
return target;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
// src/base64/base64.ts
|
|
347
|
+
function base64ToString(text) {
|
|
348
|
+
return isBrowser ? window.atob(text) : Buffer.from(text, "base64").toString();
|
|
349
|
+
}
|
|
350
|
+
function stringToBase64(text) {
|
|
351
|
+
return isBrowser ? window.btoa(text) : Buffer.from(text).toString("base64");
|
|
352
|
+
}
|
|
353
|
+
|
|
346
354
|
// src/category/category.ts
|
|
347
355
|
var ROOT_CATEGORY = process.env.ROOT_CATEGORY || "";
|
|
348
356
|
function getRootCategory(categories) {
|
|
@@ -567,6 +575,50 @@ async function httpDelete(url, options = {}) {
|
|
|
567
575
|
return await httpFetch(url, { ...options, method: "DELETE" });
|
|
568
576
|
}
|
|
569
577
|
|
|
578
|
+
// src/image/image.ts
|
|
579
|
+
function getSecret() {
|
|
580
|
+
return process.env.IMAGE_SECRET || "The sun sets over the calm ocean";
|
|
581
|
+
}
|
|
582
|
+
function textToArrayBuffer_(text) {
|
|
583
|
+
const encoder = new TextEncoder();
|
|
584
|
+
const arrayBuffer = encoder.encode(text);
|
|
585
|
+
return arrayBuffer;
|
|
586
|
+
}
|
|
587
|
+
function arrayBufferToText_(arrayBuffer) {
|
|
588
|
+
const encoder = new TextDecoder("utf-8");
|
|
589
|
+
const text = encoder.decode(arrayBuffer);
|
|
590
|
+
return text;
|
|
591
|
+
}
|
|
592
|
+
function xor_(text, secret) {
|
|
593
|
+
const s = textToArrayBuffer_(secret);
|
|
594
|
+
const t = textToArrayBuffer_(text);
|
|
595
|
+
const m = t.map((a, i) => {
|
|
596
|
+
const b = s[i % s.length];
|
|
597
|
+
return a ^ b;
|
|
598
|
+
});
|
|
599
|
+
return arrayBufferToText_(m);
|
|
600
|
+
}
|
|
601
|
+
function encrypt_(text, secret) {
|
|
602
|
+
const encrypted = xor_(text, secret);
|
|
603
|
+
const base64 = stringToBase64(encrypted);
|
|
604
|
+
return base64;
|
|
605
|
+
}
|
|
606
|
+
function decrypt_(base64, secret) {
|
|
607
|
+
const text = base64ToString(base64);
|
|
608
|
+
const decrypted = xor_(text, secret);
|
|
609
|
+
return decrypted;
|
|
610
|
+
}
|
|
611
|
+
function encryptImageToken(imageResize) {
|
|
612
|
+
const text = JSON.stringify(imageResize);
|
|
613
|
+
const token = encrypt_(text, getSecret());
|
|
614
|
+
return token;
|
|
615
|
+
}
|
|
616
|
+
function decryptImageResize(token) {
|
|
617
|
+
const text = decrypt_(token, getSecret());
|
|
618
|
+
const data = JSON.parse(text);
|
|
619
|
+
return data;
|
|
620
|
+
}
|
|
621
|
+
|
|
570
622
|
// src/json/json.service.ts
|
|
571
623
|
var JsonService = class {
|
|
572
624
|
constructor(items) {
|
|
@@ -1307,6 +1359,17 @@ function getRouteHref(segments, market, locale, markets, locales) {
|
|
|
1307
1359
|
return `${prefix}${href}`;
|
|
1308
1360
|
}
|
|
1309
1361
|
|
|
1362
|
+
// src/types/image.ts
|
|
1363
|
+
var ImageStrategy = /* @__PURE__ */ ((ImageStrategy2) => {
|
|
1364
|
+
ImageStrategy2["None"] = "none";
|
|
1365
|
+
ImageStrategy2["Next"] = "next";
|
|
1366
|
+
ImageStrategy2["Mixer"] = "mixer";
|
|
1367
|
+
ImageStrategy2["Oven"] = "oven";
|
|
1368
|
+
ImageStrategy2["Token"] = "token";
|
|
1369
|
+
ImageStrategy2["Custom"] = "custom";
|
|
1370
|
+
return ImageStrategy2;
|
|
1371
|
+
})(ImageStrategy || {});
|
|
1372
|
+
|
|
1310
1373
|
// src/types/media.ts
|
|
1311
1374
|
function resolveMediaType(media) {
|
|
1312
1375
|
if (typeof media.type === "string" && media.type.length > 0) {
|
|
@@ -1380,6 +1443,7 @@ var RedirectReason = /* @__PURE__ */ ((RedirectReason2) => {
|
|
|
1380
1443
|
return RedirectReason2;
|
|
1381
1444
|
})(RedirectReason || {});
|
|
1382
1445
|
export {
|
|
1446
|
+
ImageStrategy,
|
|
1383
1447
|
JsonService,
|
|
1384
1448
|
Logger,
|
|
1385
1449
|
LoggerLevel,
|
|
@@ -1395,6 +1459,7 @@ export {
|
|
|
1395
1459
|
asServerProps,
|
|
1396
1460
|
asSortedOptions,
|
|
1397
1461
|
awaitAll,
|
|
1462
|
+
base64ToString,
|
|
1398
1463
|
camelToSnakeCase,
|
|
1399
1464
|
cloneItem,
|
|
1400
1465
|
collectFeatureTypes,
|
|
@@ -1402,11 +1467,13 @@ export {
|
|
|
1402
1467
|
collectOptions,
|
|
1403
1468
|
collectRoutes,
|
|
1404
1469
|
consoleWarn,
|
|
1470
|
+
decryptImageResize,
|
|
1405
1471
|
deepMerge,
|
|
1406
1472
|
defaultLocale,
|
|
1407
1473
|
defaultMarket,
|
|
1408
1474
|
eachCategorized,
|
|
1409
1475
|
eachMarketLocale,
|
|
1476
|
+
encryptImageToken,
|
|
1410
1477
|
enumToList,
|
|
1411
1478
|
findCategoryInCategories,
|
|
1412
1479
|
findChildCategories,
|
|
@@ -1475,6 +1542,7 @@ export {
|
|
|
1475
1542
|
qsSerialize,
|
|
1476
1543
|
qsSerializeRaw,
|
|
1477
1544
|
resolveMediaType,
|
|
1545
|
+
stringToBase64,
|
|
1478
1546
|
toCamelCase,
|
|
1479
1547
|
toCharCase,
|
|
1480
1548
|
toDisplayName,
|