first commit

This commit is contained in:
2025-10-26 23:10:15 +08:00
commit 8f0345b7be
14961 changed files with 2356381 additions and 0 deletions

26
node_modules/@oclif/core/lib/flush.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flush = flush;
const error_1 = require("./errors/error");
function timeout(p, ms) {
function wait(ms, unref = false) {
return new Promise((resolve) => {
const t = setTimeout(() => resolve(null), ms);
if (unref)
t.unref();
});
}
return Promise.race([p, wait(ms, true).then(() => (0, error_1.error)('timed out'))]);
}
async function _flush() {
const p = new Promise((resolve) => {
process.stdout.once('drain', () => resolve(null));
});
const flushed = process.stdout.write('');
if (flushed)
return;
return p;
}
async function flush(ms = 10_000) {
await timeout(_flush(), ms);
}