@wport/cli 0.9.2 → 0.9.3
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 +18 -0
- package/dist/index.js +8 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [0.9.3] — 2026-08-26
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- 依賴 bump:`@wport/core` `^0.1.0` → `^0.2.0`(0.x 的 caret 不跨 minor,需顯式升)。
|
|
13
|
+
CLI 對外行為零變更:指令、輸出、exit code 契約(0/2/3/4/5)均不受影響——core 0.2.0 的
|
|
14
|
+
5xx 錯誤自 `WportError` 改為帶 `status` 的 `WportHttpError`,兩者在 `exitCodeForError`
|
|
15
|
+
同落 exit 4(review F-008 附帶核對 + 743 tests 驗證)。
|
|
16
|
+
- 姊妹套件同步發版(pm_48 交付 C 的 SDK 地基):
|
|
17
|
+
- **`@wport/core` 0.2.0**:`throwForHttpStatus` 任何非 2xx(含 5xx)一律拋帶 `status`/`body`
|
|
18
|
+
的 `WportHttpError`(先前 5xx 拋裸 `WportError`,下游拿不到 http status);`buildUserAgent`
|
|
19
|
+
改 `globalThis` 存取 `process`(非 Node runtime / 無 node types 的 tsc 環境不再炸)。
|
|
20
|
+
- **`@wport/sdk` 0.2.0**:新增 `enterprise.me()`(GET /me)/`enterprise.usage()`、
|
|
21
|
+
`enterprise.jobs.view/publish/unpublish/copy`;`WportClientOptions.source` 覆寫
|
|
22
|
+
(BR-039 通道標記,預設仍 `typescript_sdk`);`CompanyMe` 對齊 wire 實形
|
|
23
|
+
`{ company: { enc_id, name } }`;`__SDK_VERSION__` 加 typeof 防禦(source-bundling
|
|
24
|
+
消費者不再 ReferenceError)。此三包即 `mcp.wport.me` remote MCP(交付 C)的執行底座。
|
|
25
|
+
|
|
8
26
|
## [0.9.2] — 2026-08-24
|
|
9
27
|
|
|
10
28
|
### Added
|
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.9.
|
|
390
|
+
userAgent: (0, import_core2.buildUserAgent)("wport-cli", "0.9.3"),
|
|
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.9.
|
|
635
|
+
userAgent: (0, import_core3.buildUserAgent)("wport-cli", "0.9.3"),
|
|
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.9.
|
|
1076
|
+
"User-Agent": (0, import_core5.buildUserAgent)("wport-cli", "0.9.3"),
|
|
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.9.
|
|
1159
|
+
line(`wport-cli ${"0.9.3"}`);
|
|
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.9.
|
|
1219
|
+
userAgent: (0, import_core7.buildUserAgent)("wport-cli", "0.9.3"),
|
|
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.9.
|
|
1249
|
+
return { ...opts, userAgent: (0, import_core8.buildUserAgent)("wport-cli", "0.9.3"), source: CLI_SOURCE };
|
|
1250
1250
|
}
|
|
1251
1251
|
function decorateEnterpriseError(err) {
|
|
1252
1252
|
if (!(err instanceof import_core8.WportHttpError)) return err;
|
|
@@ -2741,7 +2741,7 @@ async function attemptRequest(opts, method, path, accessToken, body, query, extr
|
|
|
2741
2741
|
const headers = {
|
|
2742
2742
|
Authorization: `Bearer ${accessToken}`,
|
|
2743
2743
|
"Accept-Language": opts.locale,
|
|
2744
|
-
"User-Agent": (0, import_core29.buildUserAgent)("wport-cli", "0.9.
|
|
2744
|
+
"User-Agent": (0, import_core29.buildUserAgent)("wport-cli", "0.9.3"),
|
|
2745
2745
|
"X-Source": CLI_SOURCE,
|
|
2746
2746
|
Accept: "application/json"
|
|
2747
2747
|
};
|
|
@@ -3683,7 +3683,7 @@ function registerPersonalCommand(program2) {
|
|
|
3683
3683
|
|
|
3684
3684
|
// src/index.ts
|
|
3685
3685
|
var program = new import_commander.Command();
|
|
3686
|
-
program.name("wport").description("wport CLI \u2014 terminal interface to the W101 Talent Search Hub public API").version("0.9.
|
|
3686
|
+
program.name("wport").description("wport CLI \u2014 terminal interface to the W101 Talent Search Hub public API").version("0.9.3", "-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));
|
|
3687
3687
|
registerJobsCommand(program);
|
|
3688
3688
|
registerConfigCommand(program);
|
|
3689
3689
|
registerDoctorCommand(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wport/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "wport CLI — terminal interface to the W101 Talent Search Hub public API",
|
|
5
5
|
"author": "YAO <yao@wport.me>",
|
|
6
6
|
"repository": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
],
|
|
57
57
|
"license": "MIT",
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@wport/core": "^0.
|
|
59
|
+
"@wport/core": "^0.2.0",
|
|
60
60
|
"cli-table3": "^0.6.5",
|
|
61
61
|
"commander": "^12.1.0",
|
|
62
62
|
"env-paths": "^3.0.0",
|