job-pro 1.0.78 → 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.
@@ -0,0 +1,60 @@
1
+ // Canonical static map of which adapters have an end-to-end-verified apply
2
+ // endpoint. Mirrors `endpoint_verified: true` declarations across the per-
3
+ // adapter schemas so the CLI can answer "is X apply-ready right now?"
4
+ // without firing 50 schema fetches.
5
+ //
6
+ // Update flow (when promoting a 🔑 to ✅):
7
+ // 1. The adapter's fetchApplicationSchema → `endpointVerified: true` on
8
+ // buildBespokeApplySchema, or `endpoint_verified: true` on the literal
9
+ // schema for family-factory adapters (feishu/moka/wecruit/beisen-italent).
10
+ // 2. Add the adapter key here.
11
+ // 3. Add a row in `pnpm test:debug-submit` if it's wire-format-testable.
12
+ //
13
+ // Audited at: 1.0.78 — count must equal 45 (all non-external).
14
+ export const ENDPOINT_VERIFIED = new Set([
15
+ // multipart-anon (end-to-end smoked via httpbin)
16
+ "xpeng", "weride", "hoyoverse",
17
+ // multipart-session (anon-probe-verified)
18
+ "alibaba", "pdd", "meituan", "mihoyo", "liauto",
19
+ // moka-aes (anon-probe-verified — AES envelope)
20
+ "moonshot", "megvii", "deepseek", "galaxyuniversal", "stepfun", "cambricon", "geely",
21
+ // beisen-italent (anon-probe-verified — IIS 500 template)
22
+ "iflytek", "vivo",
23
+ // multipart-session probe-verified via re-routing (1.0.50)
24
+ "sf",
25
+ // multipart-session probe-verified via 405 (route exists, method/body wrong)
26
+ "netease", "didi", "pingan",
27
+ // probe-verified via re-routed sub-tree + JWT gateway response (1.0.52)
28
+ "byd",
29
+ // probe-verified via re-routed sub-tree (1.0.53)
30
+ "bilibili",
31
+ // probe-verified via host-root path (1.0.54)
32
+ "xiaohongshu",
33
+ // probe-verified via host-root + auth-middleware (1.0.55)
34
+ "baidu",
35
+ // probe-verified via JS-bundle string extraction (1.0.57)
36
+ "tencent",
37
+ // verified via JS-bundle path extraction + cross-domain check (1.0.58)
38
+ "jd",
39
+ // probe-verified via Spring 500 + JS-bundle sub-tree discovery (1.0.59)
40
+ "oppo",
41
+ // probe-verified via JS-bundle extraction (1.0.60)
42
+ "trip",
43
+ // Feishu family: /api/v1/user/applications discovered via SPA chunk 4026
44
+ // (1.0.62). Promotes all 8 Feishu adapters since they share backend.
45
+ "xiaomi", "nio", "minimax", "zhipu", "iqiyi", "agibot", "zerooneai", "baichuan",
46
+ // bytedance: atsx-throne tenant, same /api/v1/user/applications (1.0.63)
47
+ "bytedance",
48
+ // Beisen Wecruit family: anon probe with X-Requested-With (1.0.63)
49
+ "sensetime", "horizonrobotics",
50
+ // kuaishou: /recruit/campus/e/api/v1/ sub-tree discovered (1.0.64)
51
+ "kuaishou",
52
+ // weibo: proxies to Moka (verified earlier) (1.0.65)
53
+ "weibo",
54
+ // huawei: /reccampportal/services/portal/portaluser/ Jalor framework (1.0.66)
55
+ "huawei",
56
+ // lilith: atsx-throne tenant, /api/v1/user/applications 405 (1.0.67)
57
+ "lilith",
58
+ // antgroup: talent.antgroup.com second umi bundle revealed (1.0.68)
59
+ "antgroup",
60
+ ]);
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
- const VERSION = "1.0.7";
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 / å­—čŠ‚č·ģåŠĻ" },
@@ -136,56 +157,10 @@ const SUBMIT_KIND_OVERRIDES = {
136
157
  function submitKindFor(adapterKey, family) {
137
158
  return SUBMIT_KIND_OVERRIDES[adapterKey] ?? SUBMIT_KIND_BY_FAMILY[family];
138
159
  }
139
- // Mirrors `endpoint_verified: true` in each adapter's schema. Kept here as
140
- // the canonical set so `list` can surface it without firing 50 schema
141
- // fetches. Update whenever an adapter is promoted (see CHANGELOG 1.0.34+).
142
- const ENDPOINT_VERIFIED = new Set([
143
- // multipart-anon (end-to-end smoked via httpbin)
144
- "xpeng", "weride", "hoyoverse",
145
- // multipart-session (anon-probe-verified)
146
- "alibaba", "pdd", "meituan", "mihoyo", "liauto",
147
- // moka-aes (anon-probe-verified — AES envelope)
148
- "moonshot", "megvii", "deepseek", "galaxyuniversal", "stepfun", "cambricon", "geely",
149
- // beisen-italent (anon-probe-verified — IIS 500 template)
150
- "iflytek", "vivo",
151
- // multipart-session probe-verified via re-routing (1.0.50)
152
- "sf",
153
- // multipart-session probe-verified via 405 (route exists, method/body wrong)
154
- "netease", "didi", "pingan",
155
- // probe-verified via re-routed sub-tree + JWT gateway response (1.0.52)
156
- "byd",
157
- // probe-verified via re-routed sub-tree (1.0.53)
158
- "bilibili",
159
- // probe-verified via host-root path (1.0.54)
160
- "xiaohongshu",
161
- // probe-verified via host-root + auth-middleware (1.0.55)
162
- "baidu",
163
- // probe-verified via JS-bundle string extraction (1.0.57)
164
- "tencent",
165
- // verified via JS-bundle path extraction + cross-domain check (1.0.58)
166
- "jd",
167
- // probe-verified via Spring 500 + JS-bundle sub-tree discovery (1.0.59)
168
- "oppo",
169
- // probe-verified via JS-bundle extraction (1.0.60)
170
- "trip",
171
- // Feishu family: /api/v1/user/applications discovered via SPA chunk 4026
172
- // (1.0.62). Promotes all 8 Feishu adapters since they share backend.
173
- "xiaomi", "nio", "minimax", "zhipu", "iqiyi", "agibot", "zerooneai", "baichuan",
174
- // bytedance: atsx-throne tenant, same /api/v1/user/applications (1.0.63)
175
- "bytedance",
176
- // Beisen Wecruit family: anon probe with X-Requested-With (1.0.63)
177
- "sensetime", "horizonrobotics",
178
- // kuaishou: /recruit/campus/e/api/v1/ sub-tree discovered (1.0.64)
179
- "kuaishou",
180
- // weibo: proxies to Moka (verified earlier) (1.0.65)
181
- "weibo",
182
- // huawei: /reccampportal/services/portal/portaluser/ Jalor framework (1.0.66)
183
- "huawei",
184
- // lilith: atsx-throne tenant, /api/v1/user/applications 405 (1.0.67)
185
- "lilith",
186
- // antgroup: talent.antgroup.com second umi bundle revealed (1.0.68)
187
- "antgroup",
188
- ]);
160
+ // Mirrors `endpoint_verified: true` in each adapter's schema. Extracted to
161
+ // its own module so unit tests can assert against it without spawning the
162
+ // CLI. See cli/src/coverage.ts.
163
+ import { ENDPOINT_VERIFIED } from "./coverage.js";
189
164
  const HELP = `
190
165
  job-pro — query Chinese big-tech campus recruiting from your terminal
191
166
  (job.ha7ch.com)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "job-pro",
3
- "version": "1.0.78",
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",