job-pro 1.0.30 → 1.0.32
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/index.js +26 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -501,7 +501,15 @@ async function runCompany(adapter, company, rawArgs) {
|
|
|
501
501
|
}
|
|
502
502
|
const session = loadSession(company);
|
|
503
503
|
const out = [];
|
|
504
|
+
// Progress to stderr (so stdout JSON stays clean for pipes). Only when
|
|
505
|
+
// not --compact AND not piping stdout (interactive TTY).
|
|
506
|
+
const showProgress = !compact && process.stderr.isTTY && postIds.length > 1;
|
|
507
|
+
let progressIdx = 0;
|
|
504
508
|
for (const id of postIds) {
|
|
509
|
+
progressIdx++;
|
|
510
|
+
if (showProgress) {
|
|
511
|
+
process.stderr.write(`\r[${progressIdx}/${postIds.length}] ${id.padEnd(28)}\x1b[K`);
|
|
512
|
+
}
|
|
505
513
|
try {
|
|
506
514
|
const schemaResult = (await fetchSchema.call(adapter, id));
|
|
507
515
|
if (!schemaResult.ok || !schemaResult.schema) {
|
|
@@ -536,6 +544,8 @@ async function runCompany(adapter, company, rawArgs) {
|
|
|
536
544
|
out.push({ post_id: id, ok: false, message: err instanceof Error ? err.message : String(err) });
|
|
537
545
|
}
|
|
538
546
|
}
|
|
547
|
+
if (showProgress)
|
|
548
|
+
process.stderr.write(`\r\x1b[K`);
|
|
539
549
|
const okCount = out.filter((r) => r.ok).length;
|
|
540
550
|
return emit({ mode: debugUrl ? "batch-debug" : "batch-dry-run", company, total: out.length, ok_count: okCount, results: out }, compact);
|
|
541
551
|
}
|
|
@@ -1423,9 +1433,22 @@ Or copy the path to clipboard (macOS):
|
|
|
1423
1433
|
}
|
|
1424
1434
|
console.log("");
|
|
1425
1435
|
}
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1436
|
+
if (applyReadyOnly) {
|
|
1437
|
+
const hiddenBuckets = allHits.filter((r) => r.apply_status === "missing-session" || r.apply_status === "external");
|
|
1438
|
+
if (hiddenBuckets.length > 0) {
|
|
1439
|
+
const missing = hiddenBuckets
|
|
1440
|
+
.filter((r) => r.apply_status === "missing-session")
|
|
1441
|
+
.map((r) => `${r.company}(${r.count})`);
|
|
1442
|
+
const external = hiddenBuckets
|
|
1443
|
+
.filter((r) => r.apply_status === "external")
|
|
1444
|
+
.map((r) => `${r.company}(${r.count})`);
|
|
1445
|
+
console.log(`Hidden by --apply-ready:`);
|
|
1446
|
+
if (missing.length)
|
|
1447
|
+
console.log(` 🟡 missing-session (run \`job-pro extension\`): ${missing.join(" ")}`);
|
|
1448
|
+
if (external.length)
|
|
1449
|
+
console.log(` ⛔ external (IM-mediated): ${external.join(" ")}`);
|
|
1450
|
+
console.log("");
|
|
1451
|
+
}
|
|
1429
1452
|
}
|
|
1430
1453
|
if (failed.length > 0) {
|
|
1431
1454
|
console.log(`Failed (${failed.length}):`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "job-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "Query Chinese big-tech campus recruiting from your terminal. 50 companies, all 50 live. 46 via each company's own API; the 4 with no public canonical feed (Hikvision, CICC, Cainiao, WeBank) surfaced via Liepin as a clearly-labeled third-party fallback. No signup, no token, no server.",
|
|
5
5
|
"homepage": "https://job.ha7ch.com",
|
|
6
6
|
"repository": "https://github.com/HA7CH/job-pro",
|