browser-extension-manager 1.3.12 → 1.3.13
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/gulp/tasks/publish.js +20 -0
- package/package.json +1 -1
|
@@ -314,6 +314,26 @@ async function publishToEdge() {
|
|
|
314
314
|
throw new Error('Missing Edge credentials. Set EDGE_PRODUCT_ID, EDGE_CLIENT_ID, EDGE_API_KEY in .env');
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
+
// Check current submission status first
|
|
318
|
+
logger.log('[edge] Checking submission status...');
|
|
319
|
+
const statusUrl = `https://api.addons.microsoftedge.microsoft.com/v1/products/${productId}/submissions`;
|
|
320
|
+
const statusResponse = await fetch(statusUrl, {
|
|
321
|
+
method: 'GET',
|
|
322
|
+
headers: {
|
|
323
|
+
'Authorization': `ApiKey ${apiKey}`,
|
|
324
|
+
'X-ClientID': clientId,
|
|
325
|
+
},
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
if (statusResponse.ok) {
|
|
329
|
+
const statusData = await statusResponse.json();
|
|
330
|
+
// Check if there's a pending submission (InReview, PendingPublish, etc.)
|
|
331
|
+
const pendingStatuses = ['InReview', 'PendingPublish', 'Submitted', 'InProgress'];
|
|
332
|
+
if (statusData && pendingStatuses.includes(statusData.status)) {
|
|
333
|
+
throw new Error(`Extension already has a pending submission (status: ${statusData.status}). Wait for it to complete.`);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
317
337
|
logger.log('[edge] Uploading to Microsoft Edge Add-ons...');
|
|
318
338
|
|
|
319
339
|
// Read chromium zip file (Edge uses same build as Chrome)
|