Skip to content

Commit bb44745

Browse files
chuka-ichibanwdzeng
authored andcommitted
build c85f35c (v1.0.3)
1 parent 74ec055 commit bb44745

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

index.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ async function sendSubmissionRequest(productId, token) {
127127
core.setFailed('Submission request not accepted.');
128128
core.debug('Error code: ' + errorCode);
129129
}
130-
core.debug(JSON.stringify(response.data));
130+
core.debug(typeof (response.data) === 'string' ? response.data : JSON.stringify(response.data));
131131
if (errorCode === undefined || errorCode === null) {
132132
// https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/publish/api/addons-api-reference#response-when-the-publish-call-fails-with-an-irrecoverable-failure
133133
// https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/publish/api/addons-api-reference#response-when-the-publish-call-fails-with-an-unexpected-failure
@@ -193,13 +193,7 @@ function handleError(error) {
193193
if (error.response) {
194194
// Got response from Edge Publish API server with status code 4XX or 5XX
195195
core.setFailed('Edge Publish API server responses with error code: ' + error.response.status);
196-
core.setFailed(error.response.data);
197-
if (typeof (error.response.data) === 'string') {
198-
core.setFailed(error.response.data);
199-
}
200-
else {
201-
core.setFailed(JSON.stringify(error.response.data));
202-
}
196+
core.setFailed(typeof (error.response.data) === 'string' ? error.response.data : JSON.stringify(error.response.data));
203197
}
204198
core.setFailed(error.message);
205199
return;
@@ -222,9 +216,6 @@ async function main() {
222216
const accessTokenUrl = core.getInput('access-token-url', { required: true });
223217
core.debug('Using product ID: ' + productId);
224218
core.debug('Using zip file path: ' + zipPath);
225-
core.debug('Using client id: ' + clientId);
226-
core.debug('Using client secret: ' + clientSecret);
227-
core.debug('Using access url: ' + accessTokenUrl);
228219
try {
229220
await run(productId, zipPath, clientId, clientSecret, accessTokenUrl);
230221
}
@@ -7229,7 +7220,7 @@ module.exports = require("zlib");
72297220
/***/ ((module) => {
72307221

72317222
"use strict";
7232-
module.exports = JSON.parse('{"name":"edge-addon","description":"Publish to Microsoft Edge Add-ons.","version":"v1.0.2","author":"Hyperbola","private":true,"repository":{"type":"git","url":"git+https://github.com/wdzeng/edge-addon"},"scripts":{"build":"tsc && ncc build ./dist/index.js && cp action.yml dist","clean":"rm -rf dist"},"dependencies":{"@actions/core":"^1.8.1","axios":"^0.27.2"},"devDependencies":{"@types/node":"^16.4.1","@vercel/ncc":"^0.33.4","typescript":"^4.6.4"}}');
7223+
module.exports = JSON.parse('{"name":"edge-addon","description":"Publish to Microsoft Edge Add-ons.","version":"v1.0.3","author":"Hyperbola","private":true,"repository":{"type":"git","url":"git+https://github.com/wdzeng/edge-addon"},"scripts":{"build":"tsc && ncc build ./dist/index.js && cp action.yml dist","clean":"rm -rf dist"},"dependencies":{"@actions/core":"^1.8.1","axios":"^0.27.2"},"devDependencies":{"@types/node":"^16.4.1","@vercel/ncc":"^0.33.4","typescript":"^4.6.4"}}');
72337224

72347225
/***/ }),
72357226

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "edge-addon",
33
"description": "Publish to Microsoft Edge Add-ons.",
4-
"version": "v1.0.2",
4+
"version": "v1.0.3",
55
"author": "Hyperbola",
66
"private": true,
77
"repository": {

0 commit comments

Comments
 (0)