job-pro 1.0.24 → 1.0.25

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 +39 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -114,6 +114,26 @@ const COMPANIES = [
114
114
  { key: "cainiao", family: "Liepin (third-party)", source: "api-c.liepin.com", label: "Cainiao / 菜鸟" },
115
115
  { key: "webank", family: "Liepin (third-party)", source: "api-c.liepin.com", label: "WeBank / 微众银行" },
116
116
  ];
117
+ // Family → default submit_kind. Mirrors what fetchApplicationSchema returns
118
+ // for each adapter today; kept here as the static source of truth used by
119
+ // `list` output and `find`'s apply-status derivation.
120
+ const SUBMIT_KIND_BY_FAMILY = {
121
+ "Bespoke": "multipart-session",
122
+ "Feishu": "feishu-3-step",
123
+ "Moka": "moka-aes",
124
+ "Beisen Wecruit": "beisen-wecruit",
125
+ "Beisen iTalent": "beisen-italent",
126
+ "Greenhouse / Lever (intl arm)": "multipart-anon",
127
+ "Liepin (third-party)": "external",
128
+ };
129
+ // Adapter-level deviations from their family default.
130
+ const SUBMIT_KIND_OVERRIDES = {
131
+ unitree: "external", // Bespoke family, but WeChat-QR — no API submit.
132
+ lilith: "cdp-real-browser", // Feishu tenant, but needs ByteDance _signature bypass.
133
+ };
134
+ function submitKindFor(adapterKey, family) {
135
+ return SUBMIT_KIND_OVERRIDES[adapterKey] ?? SUBMIT_KIND_BY_FAMILY[family];
136
+ }
117
137
  const HELP = `
118
138
  job-pro — query Chinese big-tech campus recruiting from your terminal
119
139
  (job.ha7ch.com)
@@ -1090,8 +1110,9 @@ function printCompanyList(compact) {
1090
1110
  (missingInAdapters.length ? ` missing from adapters: ${missingInAdapters.join(", ")}\n` : ""));
1091
1111
  }
1092
1112
  if (compact) {
1093
- // Machine-readable: emit a JSON array of { key, family, source, label }.
1094
- console.log(JSON.stringify(COMPANIES));
1113
+ // Machine-readable: emit a JSON array of { key, family, source, label,
1114
+ // submit_kind } — submit_kind derived from the family map + overrides.
1115
+ console.log(JSON.stringify(COMPANIES.map((c) => ({ ...c, submit_kind: submitKindFor(c.key, c.family) }))));
1095
1116
  return;
1096
1117
  }
1097
1118
  // Human-readable: group by family, fixed-width left column.
@@ -1112,14 +1133,18 @@ function printCompanyList(compact) {
1112
1133
  ];
1113
1134
  const keyWidth = Math.max(...COMPANIES.map((c) => c.key.length));
1114
1135
  const srcWidth = Math.max(...COMPANIES.map((c) => c.source.length));
1136
+ const kindWidth = Math.max(...COMPANIES.map((c) => submitKindFor(c.key, c.family).length));
1115
1137
  console.log(`job-pro — 50 companies, all live. ATS-family breakdown:`);
1116
1138
  for (const family of order) {
1117
1139
  const entries = byFamily.get(family);
1118
1140
  if (!entries)
1119
1141
  continue;
1120
- console.log(`\n${family} (${entries.length})`);
1142
+ const kindForFamily = SUBMIT_KIND_BY_FAMILY[family];
1143
+ console.log(`\n${family} (${entries.length}) — submit_kind=${kindForFamily}`);
1121
1144
  for (const c of entries) {
1122
- console.log(` ${c.key.padEnd(keyWidth)} ${c.source.padEnd(srcWidth)} ${c.label}`);
1145
+ const kind = submitKindFor(c.key, c.family);
1146
+ const kindCol = kind === kindForFamily ? "".padEnd(kindWidth) : kind.padEnd(kindWidth);
1147
+ console.log(` ${c.key.padEnd(keyWidth)} ${kindCol} ${c.source.padEnd(srcWidth)} ${c.label}`);
1123
1148
  }
1124
1149
  }
1125
1150
  console.log(`\nTotal: ${COMPANIES.length}. Run \`job-pro <key> search "…"\` against any of them.`);
@@ -1196,14 +1221,18 @@ Or copy the path to clipboard (macOS):
1196
1221
  if (!keyword || keyword.startsWith("--")) {
1197
1222
  die(`usage: job-pro find <keyword> [--limit N] [--companies a,b,c] [--timeout ms] [--apply-ready] [--compact | --text]`);
1198
1223
  }
1199
- // Static apply-readiness map. Source of truth for what kind of submission
1200
- // each adapter supports kept in sync with apply-smoke's submit_kind tally.
1201
- const ANON_ADAPTERS = new Set(["xpeng", "weride", "hoyoverse"]);
1202
- const EXTERNAL_ADAPTERS = new Set(["hikvision", "cicc", "cainiao", "webank", "unitree"]);
1224
+ // Apply-readiness derives from the canonical SUBMIT_KIND_BY_FAMILY map
1225
+ // (single source of truth shared with `list`). multipart-anon is fire-
1226
+ // and-go; external is structurally blocked; everything else needs a
1227
+ // captured session.
1203
1228
  const applyStatusFor = (adapterKey) => {
1204
- if (EXTERNAL_ADAPTERS.has(adapterKey))
1229
+ const dirEntry = COMPANIES.find((c) => c.key === adapterKey);
1230
+ if (!dirEntry)
1231
+ return "missing-session";
1232
+ const kind = submitKindFor(adapterKey, dirEntry.family);
1233
+ if (kind === "external")
1205
1234
  return "external";
1206
- if (ANON_ADAPTERS.has(adapterKey))
1235
+ if (kind === "multipart-anon")
1207
1236
  return "anon";
1208
1237
  return loadSession(adapterKey) ? "session" : "missing-session";
1209
1238
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "job-pro",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
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",