@weaverse/hydrogen 2.4.1 → 2.4.3
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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -7
- package/dist/index.mjs +6 -7
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export { WeaverseImage, useItemInstance, useWeaverse } from '@weaverse/react';
|
|
|
3
3
|
import { NavigateFunction } from '@remix-run/react';
|
|
4
4
|
import { createWithCache, Storefront } from '@shopify/hydrogen';
|
|
5
5
|
import { LanguageCode, CountryCode, CurrencyCode } from '@shopify/hydrogen/storefront-api-types';
|
|
6
|
-
import {
|
|
6
|
+
import { LoaderFunctionArgs, AppLoadContext } from '@shopify/remix-oxygen';
|
|
7
7
|
import React, { ForwardRefExoticComponent } from 'react';
|
|
8
8
|
import * as _shopify_hydrogen_react_storefront_api_types from '@shopify/hydrogen-react/storefront-api-types';
|
|
9
9
|
|
|
@@ -55,7 +55,7 @@ declare class WeaverseClient {
|
|
|
55
55
|
waitUntil: WeaverseClientArgs['waitUntil'];
|
|
56
56
|
countries?: WeaverseClientArgs['countries'];
|
|
57
57
|
constructor(args: WeaverseClientArgs);
|
|
58
|
-
fetchWithCache: <T>(url: string, options
|
|
58
|
+
fetchWithCache: <T>(url: string, options?: FetchWithCacheOptions) => Promise<T>;
|
|
59
59
|
incrementCacheHits: () => Promise<string>;
|
|
60
60
|
resetCacheHits: () => Promise<void>;
|
|
61
61
|
loadThemeSettings: (strategy?: AllCacheOptions) => Promise<any>;
|
|
@@ -83,7 +83,7 @@ type ComponentLoaderArgs<T = any> = {
|
|
|
83
83
|
data: T;
|
|
84
84
|
weaverse: WeaverseClient;
|
|
85
85
|
};
|
|
86
|
-
interface RouteLoaderArgs extends
|
|
86
|
+
interface RouteLoaderArgs extends LoaderFunctionArgs {
|
|
87
87
|
context: AppLoadContext & {
|
|
88
88
|
weaverse: WeaverseClient;
|
|
89
89
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { WeaverseImage, useItemInstance, useWeaverse } from '@weaverse/react';
|
|
|
3
3
|
import { NavigateFunction } from '@remix-run/react';
|
|
4
4
|
import { createWithCache, Storefront } from '@shopify/hydrogen';
|
|
5
5
|
import { LanguageCode, CountryCode, CurrencyCode } from '@shopify/hydrogen/storefront-api-types';
|
|
6
|
-
import {
|
|
6
|
+
import { LoaderFunctionArgs, AppLoadContext } from '@shopify/remix-oxygen';
|
|
7
7
|
import React, { ForwardRefExoticComponent } from 'react';
|
|
8
8
|
import * as _shopify_hydrogen_react_storefront_api_types from '@shopify/hydrogen-react/storefront-api-types';
|
|
9
9
|
|
|
@@ -55,7 +55,7 @@ declare class WeaverseClient {
|
|
|
55
55
|
waitUntil: WeaverseClientArgs['waitUntil'];
|
|
56
56
|
countries?: WeaverseClientArgs['countries'];
|
|
57
57
|
constructor(args: WeaverseClientArgs);
|
|
58
|
-
fetchWithCache: <T>(url: string, options
|
|
58
|
+
fetchWithCache: <T>(url: string, options?: FetchWithCacheOptions) => Promise<T>;
|
|
59
59
|
incrementCacheHits: () => Promise<string>;
|
|
60
60
|
resetCacheHits: () => Promise<void>;
|
|
61
61
|
loadThemeSettings: (strategy?: AllCacheOptions) => Promise<any>;
|
|
@@ -83,7 +83,7 @@ type ComponentLoaderArgs<T = any> = {
|
|
|
83
83
|
data: T;
|
|
84
84
|
weaverse: WeaverseClient;
|
|
85
85
|
};
|
|
86
|
-
interface RouteLoaderArgs extends
|
|
86
|
+
interface RouteLoaderArgs extends LoaderFunctionArgs {
|
|
87
87
|
context: AppLoadContext & {
|
|
88
88
|
weaverse: WeaverseClient;
|
|
89
89
|
};
|
package/dist/index.js
CHANGED
|
@@ -255,7 +255,7 @@ var import_hydrogen = require("@shopify/hydrogen");
|
|
|
255
255
|
|
|
256
256
|
// package.json
|
|
257
257
|
var package_default = {
|
|
258
|
-
version: "2.4.
|
|
258
|
+
version: "2.4.3",
|
|
259
259
|
license: "MIT",
|
|
260
260
|
main: "dist/index.js",
|
|
261
261
|
typings: "dist/index.d.ts",
|
|
@@ -288,13 +288,13 @@ var package_default = {
|
|
|
288
288
|
name: "@weaverse/hydrogen",
|
|
289
289
|
author: "Weaverse Team",
|
|
290
290
|
dependencies: {
|
|
291
|
-
"@remix-run/react": "
|
|
292
|
-
"@shopify/hydrogen": "^2023.
|
|
293
|
-
"@weaverse/react": "2.4.
|
|
291
|
+
"@remix-run/react": "2.1.0",
|
|
292
|
+
"@shopify/hydrogen": "^2023.10.2",
|
|
293
|
+
"@weaverse/react": "2.4.3",
|
|
294
294
|
"react-error-boundary": "^4.0.11"
|
|
295
295
|
},
|
|
296
296
|
devDependencies: {
|
|
297
|
-
"@shopify/remix-oxygen": "^
|
|
297
|
+
"@shopify/remix-oxygen": "^2.0.1"
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
300
|
|
|
@@ -318,7 +318,6 @@ function getWeaverseConfigs(request, env) {
|
|
|
318
318
|
PUBLIC_STOREFRONT_API_TOKEN
|
|
319
319
|
} = env || {};
|
|
320
320
|
let { weaverseProjectId, weaverseHost, isDesignMode, weaverseVersion } = queries;
|
|
321
|
-
console.log("\u{1F527} Weaverse configs", queries);
|
|
322
321
|
return {
|
|
323
322
|
projectId: weaverseProjectId || WEAVERSE_PROJECT_ID || "",
|
|
324
323
|
weaverseHost: weaverseHost || WEAVERSE_HOST || "https://weaverse.io",
|
|
@@ -381,7 +380,7 @@ var WeaverseClient = class {
|
|
|
381
380
|
projectId: this.configs.projectId
|
|
382
381
|
};
|
|
383
382
|
}
|
|
384
|
-
fetchWithCache = (url, options) => {
|
|
383
|
+
fetchWithCache = (url, options = {}) => {
|
|
385
384
|
let cacheKey = [url, options.body];
|
|
386
385
|
let {
|
|
387
386
|
strategy = this.storefront.CacheCustom({
|
package/dist/index.mjs
CHANGED
|
@@ -221,7 +221,7 @@ import { createWithCache } from "@shopify/hydrogen";
|
|
|
221
221
|
|
|
222
222
|
// package.json
|
|
223
223
|
var package_default = {
|
|
224
|
-
version: "2.4.
|
|
224
|
+
version: "2.4.3",
|
|
225
225
|
license: "MIT",
|
|
226
226
|
main: "dist/index.js",
|
|
227
227
|
typings: "dist/index.d.ts",
|
|
@@ -254,13 +254,13 @@ var package_default = {
|
|
|
254
254
|
name: "@weaverse/hydrogen",
|
|
255
255
|
author: "Weaverse Team",
|
|
256
256
|
dependencies: {
|
|
257
|
-
"@remix-run/react": "
|
|
258
|
-
"@shopify/hydrogen": "^2023.
|
|
259
|
-
"@weaverse/react": "2.4.
|
|
257
|
+
"@remix-run/react": "2.1.0",
|
|
258
|
+
"@shopify/hydrogen": "^2023.10.2",
|
|
259
|
+
"@weaverse/react": "2.4.3",
|
|
260
260
|
"react-error-boundary": "^4.0.11"
|
|
261
261
|
},
|
|
262
262
|
devDependencies: {
|
|
263
|
-
"@shopify/remix-oxygen": "^
|
|
263
|
+
"@shopify/remix-oxygen": "^2.0.1"
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
266
|
|
|
@@ -284,7 +284,6 @@ function getWeaverseConfigs(request, env) {
|
|
|
284
284
|
PUBLIC_STOREFRONT_API_TOKEN
|
|
285
285
|
} = env || {};
|
|
286
286
|
let { weaverseProjectId, weaverseHost, isDesignMode, weaverseVersion } = queries;
|
|
287
|
-
console.log("\u{1F527} Weaverse configs", queries);
|
|
288
287
|
return {
|
|
289
288
|
projectId: weaverseProjectId || WEAVERSE_PROJECT_ID || "",
|
|
290
289
|
weaverseHost: weaverseHost || WEAVERSE_HOST || "https://weaverse.io",
|
|
@@ -347,7 +346,7 @@ var WeaverseClient = class {
|
|
|
347
346
|
projectId: this.configs.projectId
|
|
348
347
|
};
|
|
349
348
|
}
|
|
350
|
-
fetchWithCache = (url, options) => {
|
|
349
|
+
fetchWithCache = (url, options = {}) => {
|
|
351
350
|
let cacheKey = [url, options.body];
|
|
352
351
|
let {
|
|
353
352
|
strategy = this.storefront.CacheCustom({
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.4.
|
|
2
|
+
"version": "2.4.3",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"name": "@weaverse/hydrogen",
|
|
33
33
|
"author": "Weaverse Team",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@remix-run/react": "
|
|
36
|
-
"@shopify/hydrogen": "^2023.
|
|
37
|
-
"@weaverse/react": "2.4.
|
|
35
|
+
"@remix-run/react": "2.1.0",
|
|
36
|
+
"@shopify/hydrogen": "^2023.10.2",
|
|
37
|
+
"@weaverse/react": "2.4.3",
|
|
38
38
|
"react-error-boundary": "^4.0.11"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@shopify/remix-oxygen": "^
|
|
41
|
+
"@shopify/remix-oxygen": "^2.0.1"
|
|
42
42
|
}
|
|
43
43
|
}
|