@wport/cli 0.10.0 → 0.10.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@
5
5
 
6
6
  ---
7
7
 
8
+ ## [0.10.1] — 2026-09-10
9
+
10
+ ### Changed
11
+
12
+ - **`enterprise usage` 輸出標明計量語意**:月配額行改為 `X / Y calls used`,並加一行說明
13
+ 「所有認證通過的 API 呼叫計數;`whoami`/`usage` 與 key rotate 豁免」——對齊後端 2026-09-10
14
+ 上線的 quota PRD 對齊(talent#233:guard 層 per-request 計數,原先只計職缺建立)。
15
+ 純顯示變更,wire 契約與 exit code 不變。(0.10.0 已以 `next` tag 發布、不可覆寫,故以
16
+ patch 版收納本變更。)
17
+
8
18
  ## [0.10.0] — 2026-09-09
9
19
 
10
20
  ### Added
package/README.md CHANGED
@@ -119,7 +119,7 @@ wport enterprise campaigns publish <enc_id>
119
119
  wport enterprise keys list
120
120
  wport enterprise keys rotate <enc_id> --reveal
121
121
 
122
- # Monthly quota + rate-limit headroom
122
+ # Monthly quota (all authenticated API calls) + rate-limit ceiling
123
123
  wport enterprise usage
124
124
 
125
125
  # Agent / CI friendly: no key on disk
package/dist/index.js CHANGED
@@ -387,7 +387,7 @@ function registerJobsSearch(parent) {
387
387
  baseUrl: ctx.baseUrl,
388
388
  locale: ctx.locale,
389
389
  timeoutMs: ctx.timeoutMs,
390
- userAgent: (0, import_core2.buildUserAgent)("wport-cli", "0.10.0"),
390
+ userAgent: (0, import_core2.buildUserAgent)("wport-cli", "0.10.1"),
391
391
  source: CLI_SOURCE
392
392
  });
393
393
  const { data, error, response } = await client.GET("/api/jobs/search", {
@@ -632,7 +632,7 @@ function registerJobsView(parent) {
632
632
  baseUrl: ctx.baseUrl,
633
633
  locale: ctx.locale,
634
634
  timeoutMs: ctx.timeoutMs,
635
- userAgent: (0, import_core3.buildUserAgent)("wport-cli", "0.10.0"),
635
+ userAgent: (0, import_core3.buildUserAgent)("wport-cli", "0.10.1"),
636
636
  source: CLI_SOURCE
637
637
  });
638
638
  if (flags.batch) {
@@ -1073,7 +1073,7 @@ async function oauthPost(opts, path, body) {
1073
1073
  method: "POST",
1074
1074
  headers: {
1075
1075
  "Accept-Language": opts.locale,
1076
- "User-Agent": (0, import_core5.buildUserAgent)("wport-cli", "0.10.0"),
1076
+ "User-Agent": (0, import_core5.buildUserAgent)("wport-cli", "0.10.1"),
1077
1077
  "X-Source": CLI_SOURCE,
1078
1078
  Accept: "application/json",
1079
1079
  "Content-Type": "application/json"
@@ -1156,7 +1156,7 @@ function registerDoctorCommand(program2) {
1156
1156
  }
1157
1157
  async function runDoctor(ctx) {
1158
1158
  const line = (s = "") => process.stdout.write(s + "\n");
1159
- line(`wport-cli ${"0.10.0"}`);
1159
+ line(`wport-cli ${"0.10.1"}`);
1160
1160
  line(` bundled schema fingerprint: ${"839e8a891dfb"}`);
1161
1161
  line("");
1162
1162
  line("Resolved configuration:");
@@ -1216,7 +1216,7 @@ async function probeServer(ctx, line) {
1216
1216
  baseUrl: ctx.baseUrl,
1217
1217
  locale: ctx.locale,
1218
1218
  timeoutMs: ctx.timeoutMs,
1219
- userAgent: (0, import_core7.buildUserAgent)("wport-cli", "0.10.0"),
1219
+ userAgent: (0, import_core7.buildUserAgent)("wport-cli", "0.10.1"),
1220
1220
  source: CLI_SOURCE
1221
1221
  });
1222
1222
  const { response } = await client.GET("/api/jobs/search", { params: { query: { pageSize: 1 } } });
@@ -1246,7 +1246,7 @@ async function probeAuthServer(ctx, line) {
1246
1246
  var import_core8 = require("@wport/core");
1247
1247
  var transport = __toESM(require("@wport/core"));
1248
1248
  function withUserAgent(opts) {
1249
- return { ...opts, userAgent: (0, import_core8.buildUserAgent)("wport-cli", "0.10.0"), source: CLI_SOURCE };
1249
+ return { ...opts, userAgent: (0, import_core8.buildUserAgent)("wport-cli", "0.10.1"), source: CLI_SOURCE };
1250
1250
  }
1251
1251
  function extractErrorCodeBody(body) {
1252
1252
  if (!body || typeof body !== "object") return void 0;
@@ -1461,10 +1461,16 @@ async function runUsage(ctx, apiKey) {
1461
1461
  const rate = usage.rate_limit ?? {};
1462
1462
  const lines = [
1463
1463
  `period: ${usage.period ?? "\u2014"}`,
1464
- `monthly quota: ${num(quota.used)} / ${num(quota.limit)} used (${num(quota.remaining)} remaining)`,
1464
+ `monthly quota: ${num(quota.used)} / ${num(quota.limit)} calls used (${num(quota.remaining)} remaining)`,
1465
1465
  `rate limit: ${num(rate.limit)} requests / ${num(rate.window_seconds)}s per key`
1466
1466
  ];
1467
1467
  process.stdout.write(lines.join("\n") + "\n");
1468
+ process.stdout.write(
1469
+ dim(
1470
+ "Monthly quota meters every authenticated API call; whoami/usage and key rotate are exempt.",
1471
+ ctx.color
1472
+ ) + "\n"
1473
+ );
1468
1474
  process.stdout.write(
1469
1475
  dim("Live per-window rate-limit headroom is reported via response headers on write requests.", ctx.color) + "\n"
1470
1476
  );
@@ -3015,7 +3021,7 @@ async function attemptRequest(opts, method, path, accessToken, body, query, extr
3015
3021
  const headers = {
3016
3022
  Authorization: `Bearer ${accessToken}`,
3017
3023
  "Accept-Language": opts.locale,
3018
- "User-Agent": (0, import_core30.buildUserAgent)("wport-cli", "0.10.0"),
3024
+ "User-Agent": (0, import_core30.buildUserAgent)("wport-cli", "0.10.1"),
3019
3025
  "X-Source": CLI_SOURCE,
3020
3026
  Accept: "application/json"
3021
3027
  };
@@ -3957,7 +3963,7 @@ function registerPersonalCommand(program2) {
3957
3963
 
3958
3964
  // src/index.ts
3959
3965
  var program = new import_commander.Command();
3960
- program.name("wport").description("wport CLI \u2014 terminal interface to the W101 Talent Search Hub public API").version("0.10.0", "-v, --version", "output the CLI version").option("--lang <locale>", "Accept-Language locale: zh-TW | en-US | vi-VN | th-TH | id-ID").option("--api <url>", "override API base URL").option("--output <fmt>", "output format: table | json").option("--no-color", "disable color output").option("--timeout <ms>", "HTTP timeout in milliseconds", (v) => Number(v));
3966
+ program.name("wport").description("wport CLI \u2014 terminal interface to the W101 Talent Search Hub public API").version("0.10.1", "-v, --version", "output the CLI version").option("--lang <locale>", "Accept-Language locale: zh-TW | en-US | vi-VN | th-TH | id-ID").option("--api <url>", "override API base URL").option("--output <fmt>", "output format: table | json").option("--no-color", "disable color output").option("--timeout <ms>", "HTTP timeout in milliseconds", (v) => Number(v));
3961
3967
  registerJobsCommand(program);
3962
3968
  registerConfigCommand(program);
3963
3969
  registerDoctorCommand(program);