job-pro 1.0.79 → 1.0.80
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 +22 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -61,7 +61,28 @@ import { createRequire as require_createRequire } from "node:module";
|
|
|
61
61
|
function require_module() {
|
|
62
62
|
return { createRequire: require_createRequire };
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
// Read version from package.json at module load so it can never drift
|
|
65
|
+
// from the publish. Tries the bundled package.json (cli/package.json
|
|
66
|
+
// next to dist/) first, then falls back to a hardcoded sentinel.
|
|
67
|
+
const VERSION = (() => {
|
|
68
|
+
try {
|
|
69
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
70
|
+
// cli/dist/index.js → cli/package.json is two levels up
|
|
71
|
+
const candidates = [
|
|
72
|
+
join(here, "..", "package.json"),
|
|
73
|
+
join(here, "..", "..", "package.json"),
|
|
74
|
+
];
|
|
75
|
+
for (const p of candidates) {
|
|
76
|
+
if (existsSync(p)) {
|
|
77
|
+
const pkg = JSON.parse(readFileSync(p, "utf8"));
|
|
78
|
+
if (pkg.name === "job-pro" && typeof pkg.version === "string")
|
|
79
|
+
return pkg.version;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch { /* fall through */ }
|
|
84
|
+
return "unknown";
|
|
85
|
+
})();
|
|
65
86
|
const COMPANIES = [
|
|
66
87
|
{ key: "tencent", family: "Bespoke", source: "join.qq.com", label: "Tencent / 腾讯" },
|
|
67
88
|
{ key: "bytedance", family: "Bespoke", source: "jobs.bytedance.com", label: "ByteDance / 字节跳动" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "job-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.80",
|
|
4
4
|
"description": "Query Chinese big-tech campus recruiting + auto-apply from your terminal. 50 companies, all 50 live (46 via official APIs, 4 via Liepin third-party fallback). 45/50 with end-to-end verified apply endpoints; 5 structurally-external (Liepin IM × 4 + Unitree WeChat). No signup, no token, no server.",
|
|
5
5
|
"homepage": "https://job.ha7ch.com",
|
|
6
6
|
"repository": "https://github.com/HA7CH/job-pro",
|