Skip to content

Commit 42bfb67

Browse files
feat: enhance marketplace metadata handling in package.json and release script
1 parent 86d7b20 commit 42bfb67

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

packages/jsActions/mobile-resources-native/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"url": "https://github.com/mendix/native-widgets.git"
1010
},
1111
"marketplace": {
12+
"name": "Native Mobile Resources",
13+
"description": "Download this module to access a rich set of widgets and nanoflow actions created for native mobile, including authentication, network, platform, and more. A must-have for native mobile development!",
1214
"minimumMXVersion": "11.6.0",
1315
"marketplaceId": 109513
1416
},

scripts/release/marketplaceRelease.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ main().catch(e => {
1818
});
1919

2020
async function main() {
21-
const pkgPath = join(process.cwd(), "package.json");
2221
const {
2322
name,
2423
widgetName,
2524
version,
2625
marketplace: { minimumMXVersion, marketplaceId }
27-
} = require(pkgPath);
26+
} = packageMetadata();
2827

2928
console.log(`Starting release process for tag ${process.env.TAG}`);
3029

@@ -93,8 +92,11 @@ async function createDraft(marketplaceId, version, minimumMXVersion) {
9392
console.log(`Creating draft in the Mendix Marketplace...`);
9493
console.log(`ID: ${marketplaceId} - Version: ${version} - MXVersion: ${minimumMXVersion}`);
9594
const [major, minor, patch] = version.split(".");
95+
const { marketplace } = packageMetadata();
9696
try {
9797
const body = {
98+
Name: marketplace.name,
99+
Description: marketplace.description,
98100
VersionMajor: major ?? 1,
99101
VersionMinor: minor ?? 0,
100102
VersionPatch: patch ?? 0,
@@ -168,3 +170,9 @@ async function fetch(method, url, body, additionalHeaders) {
168170
throw new Error(`Fetching Failed (Code ${response.status}). ${response.statusText}`);
169171
}
170172
}
173+
174+
function packageMetadata() {
175+
const pkgPath = join(process.cwd(), "package.json");
176+
const { name, widgetName, version, marketplace } = require(pkgPath);
177+
return { name, widgetName, version, marketplace };
178+
}

0 commit comments

Comments
 (0)