Skip to content

Commit 6a11c70

Browse files
Merge pull request #61 from TheDragonCode/build/app-e6644hh
Application compiled successfully
2 parents e41126d + b8d873d commit 6a11c70

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

dist/index.js

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34615,6 +34615,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
3461534615
exports.writeFile = exports.readFile = exports.readRemoteFile = exports.fileExists = exports.cwd = void 0;
3461634616
const fs = __importStar(__nccwpck_require__(3024));
3461734617
const core_1 = __nccwpck_require__(7484);
34618+
const node_https_1 = __nccwpck_require__(4708);
3461834619
const cwd = () => {
3461934620
const path = process.env.GITHUB_WORKSPACE;
3462034621
if (path === undefined) {
@@ -34627,12 +34628,25 @@ const filePath = (config, filename) => `${config.directory}/${filename}`;
3462734628
const fileExists = (config, filename) => fs.existsSync(filePath(config, filename));
3462834629
exports.fileExists = fileExists;
3462934630
const readRemoteFile = async (url) => {
34630-
const response = await fetch(url);
34631-
if (!response.ok) {
34632-
(0, core_1.info)(`Failed to fetch ${url} with status code ${response.status}`);
34633-
return "";
34634-
}
34635-
return response.text();
34631+
return new Promise((resolve) => {
34632+
(0, node_https_1.get)(url, (res) => {
34633+
if (res.statusCode !== 200) {
34634+
(0, core_1.info)(`Failed to fetch ${url} with status code ${res.statusCode}`);
34635+
resolve("");
34636+
return;
34637+
}
34638+
let data = "";
34639+
res.on("data", (chunk) => {
34640+
data += chunk;
34641+
});
34642+
res.on("end", () => {
34643+
resolve(data);
34644+
});
34645+
}).on("error", (err) => {
34646+
(0, core_1.info)(`Failed to fetch ${url} with error: ${err.message}`);
34647+
resolve("");
34648+
});
34649+
});
3463634650
};
3463734651
exports.readRemoteFile = readRemoteFile;
3463834652
const readFile = (config, filename) => {
@@ -35252,6 +35266,14 @@ module.exports = require("node:fs");
3525235266

3525335267
/***/ }),
3525435268

35269+
/***/ 4708:
35270+
/***/ ((module) => {
35271+
35272+
"use strict";
35273+
module.exports = require("node:https");
35274+
35275+
/***/ }),
35276+
3525535277
/***/ 7075:
3525635278
/***/ ((module) => {
3525735279

0 commit comments

Comments
 (0)