Skip to content
Draft
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion packages/cli/src/lib/local-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ export class LocalRegistryServer {

this.server.get('/apps/:appId', async request => {
const { appId } = request.params as { appId: string };
const versions = this.dataStore.getAppVersions(appId);
const versionObjects = this.dataStore.getAppVersions(appId);
// Convert to simple string array to match Vercel format
const versions = versionObjects.map(v => v.semver);
return {
id: appId,
versions: versions,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/local-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class LocalDataStore {
const semver = key.split('/').pop()!;
versions.push({
semver,
cid: manifest.artifacts[0]?.cid || '',
cid: manifest.artifact?.digest || '', // v1 format uses 'artifact' (singular)
Copy link

Choose a reason for hiding this comment

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

Bug: Artifact field mismatch breaks old-format manifests

Type mismatch: The code accesses manifest.artifact?.digest but the AppManifest interface only defines artifacts (plural array), not artifact (singular object). While the code handles both V1 format (with singular artifact) and old format (with plural artifacts array) at runtime, manifests stored via the old /apps POST endpoint only have the artifacts array property. This will cause manifest.artifact to be undefined for those manifests, making the CID always empty string for non-V1 manifests, breaking version tracking for old-format apps.

Fix in Cursor Fix in Web

yanked: false, // TODO: Implement yanking
});
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/submit-new-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
WASM_FILE="$1"
APP_ID="$2"
NEW_VERSION="$3"
REGISTRY_URL="${REGISTRY_URL:-https://mero-registry.vercel.app}"
REGISTRY_URL="${REGISTRY_URL:-https://apps.calimero.network}"

echo "🔍 Verifying WASM file..."
if [ ! -f "$WASM_FILE" ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/upload-and-submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ APP_NAME="$3"
NEW_VERSION="$4"
PROVIDES="${5:-[]}"
REQUIRES="${6:-[]}"
REGISTRY_URL="${REGISTRY_URL:-https://mero-registry.vercel.app}"
REGISTRY_URL="${REGISTRY_URL:-https://apps.calimero.network}"

echo "🚀 Complete Version Submission Flow"
echo "======================================"
Expand Down
Loading