@chrryai/chrry 1.2.21 → 1.2.22
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1371,7 +1371,7 @@ declare const isFirefox: boolean;
|
|
|
1371
1371
|
declare function getFlag({ code }: {
|
|
1372
1372
|
code?: string;
|
|
1373
1373
|
}): string;
|
|
1374
|
-
declare const VERSION = "1.2.
|
|
1374
|
+
declare const VERSION = "1.2.22";
|
|
1375
1375
|
type instructionBase = {
|
|
1376
1376
|
id: string;
|
|
1377
1377
|
title: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1371,7 +1371,7 @@ declare const isFirefox: boolean;
|
|
|
1371
1371
|
declare function getFlag({ code }: {
|
|
1372
1372
|
code?: string;
|
|
1373
1373
|
}): string;
|
|
1374
|
-
declare const VERSION = "1.2.
|
|
1374
|
+
declare const VERSION = "1.2.22";
|
|
1375
1375
|
type instructionBase = {
|
|
1376
1376
|
id: string;
|
|
1377
1377
|
title: string;
|
package/dist/index.js
CHANGED
|
@@ -486,6 +486,10 @@ var init_locales = __esm({
|
|
|
486
486
|
// utils/siteConfig.ts
|
|
487
487
|
function detectSiteMode(hostname) {
|
|
488
488
|
const host = hostname || (typeof window !== "undefined" ? window.location.hostname : "");
|
|
489
|
+
console.log(
|
|
490
|
+
`\u{1F680} ~ file: siteConfig.ts:268 ~ process.env.NEXT_PUBLIC_SITE_MODE:`,
|
|
491
|
+
process.env.NEXT_PUBLIC_SITE_MODE
|
|
492
|
+
);
|
|
489
493
|
if (process.env.NEXT_PUBLIC_SITE_MODE === "chrryDev") {
|
|
490
494
|
return "chrryDev";
|
|
491
495
|
}
|
|
@@ -495,18 +499,6 @@ function detectSiteMode(hostname) {
|
|
|
495
499
|
if (process.env.NEXT_PUBLIC_SITE_MODE === "chrryStore") {
|
|
496
500
|
return "chrryStore";
|
|
497
501
|
}
|
|
498
|
-
if (process.env.NEXT_PUBLIC_SITE_MODE === "chrryVex") {
|
|
499
|
-
return "chrryVex";
|
|
500
|
-
}
|
|
501
|
-
if (host.includes("vex.chrry.ai")) {
|
|
502
|
-
return "chrryVex";
|
|
503
|
-
}
|
|
504
|
-
if (host.includes("chrry.dev")) {
|
|
505
|
-
return "chrryDev";
|
|
506
|
-
}
|
|
507
|
-
if (host.includes("chrryAI.dev")) {
|
|
508
|
-
return "chrryAI";
|
|
509
|
-
}
|
|
510
502
|
return "vex";
|
|
511
503
|
}
|
|
512
504
|
function getSiteConfig(m) {
|
|
@@ -16508,7 +16500,9 @@ var init_i18n = __esm({
|
|
|
16508
16500
|
safeLang = LANGUAGES.some((x) => x.code === lang) ? lang : "en";
|
|
16509
16501
|
try {
|
|
16510
16502
|
storage.setItem("language", safeLang);
|
|
16511
|
-
BrowserInstance?.storage?.local?.set
|
|
16503
|
+
if (BrowserInstance?.storage?.local?.set) {
|
|
16504
|
+
BrowserInstance.storage.local.set({ language: safeLang });
|
|
16505
|
+
}
|
|
16512
16506
|
} catch (error) {
|
|
16513
16507
|
console.log("Error saving language to storage:", error);
|
|
16514
16508
|
}
|
|
@@ -16862,7 +16856,6 @@ function AuthProvider({
|
|
|
16862
16856
|
} = (0, import_swr.default)(
|
|
16863
16857
|
fingerprint && deviceId && shouldFetchSession ? ["session", env] : null,
|
|
16864
16858
|
async () => {
|
|
16865
|
-
const appSlug = void 0;
|
|
16866
16859
|
const result = await getSession({
|
|
16867
16860
|
deviceId,
|
|
16868
16861
|
fingerprint,
|
|
@@ -16872,7 +16865,7 @@ function AuthProvider({
|
|
|
16872
16865
|
API_URL: API_URL2,
|
|
16873
16866
|
VERSION: VERSION2,
|
|
16874
16867
|
token: token || fingerprint,
|
|
16875
|
-
appSlug,
|
|
16868
|
+
appSlug: app?.slug || baseApp?.slug,
|
|
16876
16869
|
agentName,
|
|
16877
16870
|
chrryUrl
|
|
16878
16871
|
});
|
|
@@ -16938,6 +16931,7 @@ function AuthProvider({
|
|
|
16938
16931
|
return getAlterNativeDomains(item.store).includes(chrryUrl) || item.store.domain === chrryUrl;
|
|
16939
16932
|
});
|
|
16940
16933
|
const [app, setAppInternal] = (0, import_react12.useState)(baseApp || session2?.app);
|
|
16934
|
+
console.log(`\u{1F680} ~ file: AuthProvider.tsx:790 ~ baseApp:`, baseApp);
|
|
16941
16935
|
const [apps, setApps] = (0, import_react12.useState)(store?.apps || []);
|
|
16942
16936
|
(0, import_react12.useEffect)(() => {
|
|
16943
16937
|
if (app?.store?.apps && app?.store?.apps.length) {
|
|
@@ -17334,7 +17328,7 @@ function DataProvider({
|
|
|
17334
17328
|
const [instructions, setInstructions] = (0, import_react14.useState)([]);
|
|
17335
17329
|
const [affiliateStats, setAffiliateStats] = (0, import_react14.useState)(null);
|
|
17336
17330
|
const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react14.useState)(false);
|
|
17337
|
-
const VERSION3 = "1.2.
|
|
17331
|
+
const VERSION3 = "1.2.22";
|
|
17338
17332
|
const [weather, setWeather] = useLocalStorage("weather", user?.weather || guest?.weather || void 0);
|
|
17339
17333
|
const {
|
|
17340
17334
|
API_URL: API_URL2,
|
|
@@ -18309,9 +18303,18 @@ var init_utils = __esm({
|
|
|
18309
18303
|
window.history.replaceState({}, "", newUrl);
|
|
18310
18304
|
};
|
|
18311
18305
|
isFirefox = typeof navigator !== "undefined" && navigator?.userAgent.includes("Firefox");
|
|
18312
|
-
VERSION = "1.2.
|
|
18306
|
+
VERSION = "1.2.22";
|
|
18313
18307
|
getSlugFromPathname = (path) => {
|
|
18314
18308
|
const siteConfig = getSiteConfig();
|
|
18309
|
+
console.log(
|
|
18310
|
+
`\u{1F680} ~ file: index.ts:348 ~ siteConfig.slug:`,
|
|
18311
|
+
getAppAndStoreSlugs(path, {
|
|
18312
|
+
defaultAppSlug: siteConfig.slug,
|
|
18313
|
+
defaultStoreSlug: siteConfig.storeSlug,
|
|
18314
|
+
excludedRoutes: excludedSlugRoutes,
|
|
18315
|
+
locales
|
|
18316
|
+
})
|
|
18317
|
+
);
|
|
18315
18318
|
return getAppAndStoreSlugs(path, {
|
|
18316
18319
|
defaultAppSlug: siteConfig.slug,
|
|
18317
18320
|
defaultStoreSlug: siteConfig.storeSlug,
|