job-pro 1.0.46 → 1.0.48

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.
Files changed (2) hide show
  1. package/dist/index.js +24 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -134,6 +134,19 @@ const SUBMIT_KIND_OVERRIDES = {
134
134
  function submitKindFor(adapterKey, family) {
135
135
  return SUBMIT_KIND_OVERRIDES[adapterKey] ?? SUBMIT_KIND_BY_FAMILY[family];
136
136
  }
137
+ // Mirrors `endpoint_verified: true` in each adapter's schema. Kept here as
138
+ // the canonical set so `list` can surface it without firing 50 schema
139
+ // fetches. Update whenever an adapter is promoted (see CHANGELOG 1.0.34+).
140
+ const ENDPOINT_VERIFIED = new Set([
141
+ // multipart-anon (end-to-end smoked via httpbin)
142
+ "xpeng", "weride", "hoyoverse",
143
+ // multipart-session (anon-probe-verified)
144
+ "alibaba", "pdd", "meituan", "mihoyo", "liauto",
145
+ // moka-aes (anon-probe-verified — AES envelope)
146
+ "moonshot", "megvii", "deepseek", "galaxyuniversal", "stepfun", "cambricon", "geely",
147
+ // beisen-italent (anon-probe-verified — IIS 500 template)
148
+ "iflytek", "vivo",
149
+ ]);
137
150
  const HELP = `
138
151
  job-pro — query Chinese big-tech campus recruiting from your terminal
139
152
  (job.ha7ch.com)
@@ -1157,7 +1170,11 @@ function printCompanyList(compact) {
1157
1170
  if (compact) {
1158
1171
  // Machine-readable: emit a JSON array of { key, family, source, label,
1159
1172
  // submit_kind } — submit_kind derived from the family map + overrides.
1160
- console.log(JSON.stringify(COMPANIES.map((c) => ({ ...c, submit_kind: submitKindFor(c.key, c.family) }))));
1173
+ console.log(JSON.stringify(COMPANIES.map((c) => ({
1174
+ ...c,
1175
+ submit_kind: submitKindFor(c.key, c.family),
1176
+ endpoint_verified: ENDPOINT_VERIFIED.has(c.key),
1177
+ }))));
1161
1178
  return;
1162
1179
  }
1163
1180
  // Human-readable: group by family, fixed-width left column.
@@ -1189,7 +1206,8 @@ function printCompanyList(compact) {
1189
1206
  for (const c of entries) {
1190
1207
  const kind = submitKindFor(c.key, c.family);
1191
1208
  const kindCol = kind === kindForFamily ? "".padEnd(kindWidth) : kind.padEnd(kindWidth);
1192
- console.log(` ${c.key.padEnd(keyWidth)} ${kindCol} ${c.source.padEnd(srcWidth)} ${c.label}`);
1209
+ const verifiedTag = ENDPOINT_VERIFIED.has(c.key) ? " ✓" : " ";
1210
+ console.log(` ${c.key.padEnd(keyWidth)} ${verifiedTag} ${kindCol} ${c.source.padEnd(srcWidth)} ${c.label}`);
1193
1211
  }
1194
1212
  }
1195
1213
  console.log(`\nTotal: ${COMPANIES.length}. Run \`job-pro <key> search "…"\` against any of them.`);
@@ -1228,6 +1246,10 @@ async function main() {
1228
1246
  : Object.keys(ADAPTERS);
1229
1247
  function classify(status, body, contentType) {
1230
1248
  const isHTML = contentType.includes("html") || body.trim().startsWith("<");
1249
+ // 5xx + any body = handler threw on us, route exists. IIS / Spring
1250
+ // generic 500 templates are HTML but still real-route signals.
1251
+ if (status >= 500)
1252
+ return "verified-real";
1231
1253
  if (status === 404)
1232
1254
  return isHTML ? "html-fallthrough" : "speculative-404";
1233
1255
  if (isHTML)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "job-pro",
3
- "version": "1.0.46",
3
+ "version": "1.0.48",
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",