Fix StartOS 0.4 TypeScript packaging to match SDK API
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.runHealthScript = exports.checkWebUrl = exports.checkPortListening = void 0;
|
||||
exports.timeoutPromise = timeoutPromise;
|
||||
const runHealthScript_1 = require("./runHealthScript");
|
||||
Object.defineProperty(exports, "runHealthScript", { enumerable: true, get: function () { return runHealthScript_1.runHealthScript; } });
|
||||
var checkPortListening_1 = require("./checkPortListening");
|
||||
Object.defineProperty(exports, "checkPortListening", { enumerable: true, get: function () { return checkPortListening_1.checkPortListening; } });
|
||||
var checkWebUrl_1 = require("./checkWebUrl");
|
||||
Object.defineProperty(exports, "checkWebUrl", { enumerable: true, get: function () { return checkWebUrl_1.checkWebUrl; } });
|
||||
/**
|
||||
* Create a promise that rejects after the specified timeout.
|
||||
* Useful for racing against long-running health checks.
|
||||
*
|
||||
* @param ms - Timeout duration in milliseconds
|
||||
* @param options.message - Custom error message (defaults to "Timed out")
|
||||
* @returns A promise that never resolves, only rejects after the timeout
|
||||
*/
|
||||
function timeoutPromise(ms, { message = 'Timed out' } = {}) {
|
||||
return new Promise((resolve, reject) => setTimeout(() => reject(new Error(message)), ms));
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in New Issue
Block a user