Skip to content

Commit

Permalink
Merge pull request #345 from Weaverse/paul
Browse files Browse the repository at this point in the history
v2.7.0
  • Loading branch information
paul-phan authored Nov 23, 2023
2 parents 07d4c88 + 8fa9c1e commit e6b25ba
Show file tree
Hide file tree
Showing 10 changed files with 499 additions and 287 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weaverse-sdks",
"version": "2.6.3",
"version": "2.7.0",
"description": "Weaverse SDKs monorepo.",
"license": "MIT",
"scripts": {
Expand All @@ -20,28 +20,28 @@
"preinstall": "npx only-allow pnpm"
},
"devDependencies": {
"@types/node": "^20.9.1",
"@types/react": "^18.2.37",
"@types/react-dom": "18.2.14",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@types/node": "^20.9.4",
"@types/react": "^18.2.38",
"@types/react-dom": "18.2.17",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"cross-env": "^7.0.3",
"eslint": "8.51.0",
"eslint": "8.54.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"prettier": "3.0.3",
"prettier": "3.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"tsup": "^7.3.0",
"tsup": "^8.0.1",
"turbo": "^1.10.16",
"typescript": "^5.2.2"
"typescript": "^5.3.2"
},
"optionalDependencies": {
"@esbuild/darwin-x64": "^0.19.5",
"@esbuild/darwin-x64": "^0.19.7",
"turbo-darwin-arm64": "^1.10.16"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/core",
"author": "Weaverse Team",
"description": "Weaverse Core",
"version": "2.6.3",
"version": "2.7.0",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/hydrogen",
"author": "Weaverse Team",
"description": "Components, hooks, and utilities for building Shopify Hydrogen websites with Weaverse",
"version": "2.6.3",
"version": "2.7.0",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions packages/hydrogen/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export interface HydrogenComponent<T extends HydrogenComponentProps = any> {

export type WeaverseStudioQueries = {
weaverseProjectId: string
weaverseApiKey: string
weaverseHost: string
weaverseVersion: string
isDesignMode: boolean
Expand All @@ -194,6 +195,7 @@ export type PublicEnv = {
export type WeaverseProjectConfigs = {
projectId: string
weaverseHost: string
weaverseApiKey: string
weaverseVersion?: string
isDesignMode?: boolean
publicEnv?: PublicEnv
Expand Down Expand Up @@ -274,6 +276,7 @@ export type FetchProjectPayload = {

export type HydrogenThemeEnv = {
WEAVERSE_PROJECT_ID: string
WEAVERSE_API_KEY: string
WEAVERSE_HOST: string
PUBLIC_STORE_DOMAIN: string
PUBLIC_STOREFRONT_API_TOKEN: string
Expand Down
8 changes: 5 additions & 3 deletions packages/hydrogen/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ export function getWeaverseConfigs(
let queries = getRequestQueries<WeaverseStudioQueries>(request)
let {
WEAVERSE_PROJECT_ID,
WEAVERSE_API_KEY,
WEAVERSE_HOST,
PUBLIC_STORE_DOMAIN,
PUBLIC_STOREFRONT_API_TOKEN,
} = env || {}
let { weaverseProjectId, weaverseHost, isDesignMode, weaverseVersion } =
let { weaverseProjectId, weaverseHost, isDesignMode, weaverseVersion,weaverseApiKey } =
queries
return {
projectId: weaverseProjectId || WEAVERSE_PROJECT_ID || '',
weaverseHost: weaverseHost || WEAVERSE_HOST || 'https://weaverse.io',
projectId: weaverseProjectId || WEAVERSE_PROJECT_ID || process?.env?.WEAVERSE_PROJECT_ID || '',
weaverseHost: weaverseHost || WEAVERSE_HOST || process?.env?.WEAVERSE_HOST || 'https://weaverse.io',
weaverseApiKey: weaverseApiKey || WEAVERSE_API_KEY || process?.env?.WEAVERSE_API_KEY || '',
weaverseVersion: weaverseVersion || '',
isDesignMode: isDesignMode || false,
publicEnv: {
Expand Down
1 change: 1 addition & 0 deletions packages/hydrogen/src/weaverse-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class WeaverseClient {
this.basePageConfigs = {
projectId: this.configs.projectId,
weaverseHost: this.configs.weaverseHost,
weaverseApiKey: this.configs.weaverseApiKey,
weaverseVersion: this.configs.weaverseVersion,
isDesignMode: this.configs.isDesignMode,
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/react",
"author": "Weaverse Team",
"description": "React bindings for Weaverse",
"version": "2.6.3",
"version": "2.7.0",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/shopify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/shopify",
"author": "Weaverse Team",
"description": "Weaverse Components for Shopify Online Store 2.0 Section builder",
"version": "2.6.3",
"version": "2.7.0",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
Loading

0 comments on commit e6b25ba

Please sign in to comment.