Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/connect-examples/shared-constants/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
* - "dev": "CONNECT_SRC=https://localhost:8087 webpack serve --mode=development"
* - "start": "webpack serve --mode=development" (uses CDN)
*/
export const getConnectSrc = () => process.env.CONNECT_SRC || `https://jssdk.onekey.so/1.1.15/`;
export const getConnectSrc = () =>
process.env.CONNECT_SRC || `https://jssdk.onekey.so/1.1.16-alpha.1/`;
Comment on lines +12 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Alpha version as production fallback—verify this is intentional.

Using 1.1.16-alpha.1 means users running examples without the CONNECT_SRC env var will hit an alpha (pre-release) build. Alpha versions can be unstable.

Is this intentional for examples? Also verify the CDN URL exists and this version matches your package.json.


🏁 Script executed:

#!/bin/bash
# Verify the CDN URL is accessible and check package.json version alignment

echo "=== Checking CDN URL availability ==="
curl -I "https://jssdk.onekey.so/1.1.16-alpha.1/" 2>&1 | head -n 1

echo -e "\n=== Checking package.json versions in examples ==="
fd -e json "package.json" packages/connect-examples -x cat {} \; -x echo "---"

Length of output: 10266


Update shared-constants/package.json version to match—version mismatch detected.

The constants.js file now uses 1.1.16-alpha.1, but packages/connect-examples/shared-constants/package.json is still at version 1.1.15. Update the package.json to 1.1.16-alpha.1 to stay in sync with the other examples packages.

Also note: using an alpha version as the production CDN fallback could cause instability. Verify this is intentional and ensure users have a way to override it via CONNECT_SRC.

🤖 Prompt for AI Agents
In packages/connect-examples/shared-constants/constants.js around lines 12-13,
the code uses CONNECT_SRC default 1.1.16-alpha.1 while
packages/connect-examples/shared-constants/package.json is still at 1.1.15 —
update package.json version to 1.1.16-alpha.1 to match, bump any related
peer/dependency/version fields, and publish/update lockfiles as needed;
additionally verify that using an alpha CDN fallback is intentional and, if not,
change the default to a stable tag or document this choice and ensure
README/package.json clearly states that CONNECT_SRC environment variable
overrides the default.