@weaverse/hydrogen 2.6.3 → 2.6.4-pre.1
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 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -4
- package/dist/index.mjs +7 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -189,6 +189,7 @@ interface HydrogenComponent<T extends HydrogenComponentProps = any> {
|
|
|
189
189
|
}
|
|
190
190
|
type WeaverseStudioQueries = {
|
|
191
191
|
weaverseProjectId: string;
|
|
192
|
+
weaverseApiKey: string;
|
|
192
193
|
weaverseHost: string;
|
|
193
194
|
weaverseVersion: string;
|
|
194
195
|
isDesignMode: boolean;
|
|
@@ -200,6 +201,7 @@ type PublicEnv = {
|
|
|
200
201
|
type WeaverseProjectConfigs = {
|
|
201
202
|
projectId: string;
|
|
202
203
|
weaverseHost: string;
|
|
204
|
+
weaverseApiKey: string;
|
|
203
205
|
weaverseVersion?: string;
|
|
204
206
|
isDesignMode?: boolean;
|
|
205
207
|
publicEnv?: PublicEnv;
|
|
@@ -270,6 +272,7 @@ type FetchProjectPayload = {
|
|
|
270
272
|
};
|
|
271
273
|
type HydrogenThemeEnv = {
|
|
272
274
|
WEAVERSE_PROJECT_ID: string;
|
|
275
|
+
WEAVERSE_API_KEY: string;
|
|
273
276
|
WEAVERSE_HOST: string;
|
|
274
277
|
PUBLIC_STORE_DOMAIN: string;
|
|
275
278
|
PUBLIC_STOREFRONT_API_TOKEN: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -189,6 +189,7 @@ interface HydrogenComponent<T extends HydrogenComponentProps = any> {
|
|
|
189
189
|
}
|
|
190
190
|
type WeaverseStudioQueries = {
|
|
191
191
|
weaverseProjectId: string;
|
|
192
|
+
weaverseApiKey: string;
|
|
192
193
|
weaverseHost: string;
|
|
193
194
|
weaverseVersion: string;
|
|
194
195
|
isDesignMode: boolean;
|
|
@@ -200,6 +201,7 @@ type PublicEnv = {
|
|
|
200
201
|
type WeaverseProjectConfigs = {
|
|
201
202
|
projectId: string;
|
|
202
203
|
weaverseHost: string;
|
|
204
|
+
weaverseApiKey: string;
|
|
203
205
|
weaverseVersion?: string;
|
|
204
206
|
isDesignMode?: boolean;
|
|
205
207
|
publicEnv?: PublicEnv;
|
|
@@ -270,6 +272,7 @@ type FetchProjectPayload = {
|
|
|
270
272
|
};
|
|
271
273
|
type HydrogenThemeEnv = {
|
|
272
274
|
WEAVERSE_PROJECT_ID: string;
|
|
275
|
+
WEAVERSE_API_KEY: string;
|
|
273
276
|
WEAVERSE_HOST: string;
|
|
274
277
|
PUBLIC_STORE_DOMAIN: string;
|
|
275
278
|
PUBLIC_STOREFRONT_API_TOKEN: string;
|
package/dist/index.js
CHANGED
|
@@ -260,7 +260,7 @@ var package_default = {
|
|
|
260
260
|
name: "@weaverse/hydrogen",
|
|
261
261
|
author: "Weaverse Team",
|
|
262
262
|
description: "Components, hooks, and utilities for building Shopify Hydrogen websites with Weaverse",
|
|
263
|
-
version: "2.6.
|
|
263
|
+
version: "2.6.4-pre.0",
|
|
264
264
|
license: "MIT",
|
|
265
265
|
main: "dist/index.js",
|
|
266
266
|
typings: "dist/index.d.ts",
|
|
@@ -321,14 +321,16 @@ function getWeaverseConfigs(request, env) {
|
|
|
321
321
|
let queries = getRequestQueries(request);
|
|
322
322
|
let {
|
|
323
323
|
WEAVERSE_PROJECT_ID,
|
|
324
|
+
WEAVERSE_API_KEY,
|
|
324
325
|
WEAVERSE_HOST,
|
|
325
326
|
PUBLIC_STORE_DOMAIN,
|
|
326
327
|
PUBLIC_STOREFRONT_API_TOKEN
|
|
327
328
|
} = env || {};
|
|
328
|
-
let { weaverseProjectId, weaverseHost, isDesignMode, weaverseVersion } = queries;
|
|
329
|
+
let { weaverseProjectId, weaverseHost, isDesignMode, weaverseVersion, weaverseApiKey } = queries;
|
|
329
330
|
return {
|
|
330
|
-
projectId: weaverseProjectId || WEAVERSE_PROJECT_ID || "",
|
|
331
|
-
weaverseHost: weaverseHost || WEAVERSE_HOST || "https://weaverse.io",
|
|
331
|
+
projectId: weaverseProjectId || WEAVERSE_PROJECT_ID || process?.env?.WEAVERSE_PROJECT_ID || "",
|
|
332
|
+
weaverseHost: weaverseHost || WEAVERSE_HOST || process?.env?.WEAVERSE_HOST || "https://weaverse.io",
|
|
333
|
+
weaverseApiKey: weaverseApiKey || WEAVERSE_API_KEY || process?.env?.WEAVERSE_API_KEY || "",
|
|
332
334
|
weaverseVersion: weaverseVersion || "",
|
|
333
335
|
isDesignMode: isDesignMode || false,
|
|
334
336
|
publicEnv: {
|
|
@@ -379,6 +381,7 @@ var WeaverseClient = class {
|
|
|
379
381
|
this.basePageConfigs = {
|
|
380
382
|
projectId: this.configs.projectId,
|
|
381
383
|
weaverseHost: this.configs.weaverseHost,
|
|
384
|
+
weaverseApiKey: this.configs.weaverseApiKey,
|
|
382
385
|
weaverseVersion: this.configs.weaverseVersion,
|
|
383
386
|
isDesignMode: this.configs.isDesignMode
|
|
384
387
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -226,7 +226,7 @@ var package_default = {
|
|
|
226
226
|
name: "@weaverse/hydrogen",
|
|
227
227
|
author: "Weaverse Team",
|
|
228
228
|
description: "Components, hooks, and utilities for building Shopify Hydrogen websites with Weaverse",
|
|
229
|
-
version: "2.6.
|
|
229
|
+
version: "2.6.4-pre.0",
|
|
230
230
|
license: "MIT",
|
|
231
231
|
main: "dist/index.js",
|
|
232
232
|
typings: "dist/index.d.ts",
|
|
@@ -287,14 +287,16 @@ function getWeaverseConfigs(request, env) {
|
|
|
287
287
|
let queries = getRequestQueries(request);
|
|
288
288
|
let {
|
|
289
289
|
WEAVERSE_PROJECT_ID,
|
|
290
|
+
WEAVERSE_API_KEY,
|
|
290
291
|
WEAVERSE_HOST,
|
|
291
292
|
PUBLIC_STORE_DOMAIN,
|
|
292
293
|
PUBLIC_STOREFRONT_API_TOKEN
|
|
293
294
|
} = env || {};
|
|
294
|
-
let { weaverseProjectId, weaverseHost, isDesignMode, weaverseVersion } = queries;
|
|
295
|
+
let { weaverseProjectId, weaverseHost, isDesignMode, weaverseVersion, weaverseApiKey } = queries;
|
|
295
296
|
return {
|
|
296
|
-
projectId: weaverseProjectId || WEAVERSE_PROJECT_ID || "",
|
|
297
|
-
weaverseHost: weaverseHost || WEAVERSE_HOST || "https://weaverse.io",
|
|
297
|
+
projectId: weaverseProjectId || WEAVERSE_PROJECT_ID || process?.env?.WEAVERSE_PROJECT_ID || "",
|
|
298
|
+
weaverseHost: weaverseHost || WEAVERSE_HOST || process?.env?.WEAVERSE_HOST || "https://weaverse.io",
|
|
299
|
+
weaverseApiKey: weaverseApiKey || WEAVERSE_API_KEY || process?.env?.WEAVERSE_API_KEY || "",
|
|
298
300
|
weaverseVersion: weaverseVersion || "",
|
|
299
301
|
isDesignMode: isDesignMode || false,
|
|
300
302
|
publicEnv: {
|
|
@@ -345,6 +347,7 @@ var WeaverseClient = class {
|
|
|
345
347
|
this.basePageConfigs = {
|
|
346
348
|
projectId: this.configs.projectId,
|
|
347
349
|
weaverseHost: this.configs.weaverseHost,
|
|
350
|
+
weaverseApiKey: this.configs.weaverseApiKey,
|
|
348
351
|
weaverseVersion: this.configs.weaverseVersion,
|
|
349
352
|
isDesignMode: this.configs.isDesignMode
|
|
350
353
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@weaverse/hydrogen",
|
|
3
3
|
"author": "Weaverse Team",
|
|
4
4
|
"description": "Components, hooks, and utilities for building Shopify Hydrogen websites with Weaverse",
|
|
5
|
-
"version": "2.6.
|
|
5
|
+
"version": "2.6.4-pre.1",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"typings": "dist/index.d.ts",
|