@wport/cli 0.9.1-dev.0 → 0.9.2

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,30 @@
5
5
 
6
6
  ---
7
7
 
8
+ ## [0.9.2] — 2026-08-24
9
+
10
+ ### Added
11
+
12
+ - **請求來源標記(pm_48 交付 B,BR-039)**:CLI 對 talent 後端的每個請求帶 `X-Source: cli`
13
+ header——單一常數 `CLI_SOURCE` 收斂,四個出口共用(jobs typed client、enterprise transport、
14
+ personal client、OAuth device flow)。後端(交付 A)已上線,將來源落入 API access log 的
15
+ `source` 欄供 audit。S3 presigned PUT 刻意**不帶**(自訂 header 會破 SigV4 簽章)。
16
+ 對外行為零變更:指令、輸出、exit code 契約均不受影響。
17
+ - 姊妹套件 `@wport/core` / `@wport/sdk` 同步發 **0.1.1**:exports map 修正——`import` /
18
+ `require` 條件各自對應正確的 types 檔(`index.d.ts` / `index.d.cts`),並導出
19
+ `./package.json`;修正 TypeScript `moduleResolution: node16 / bundler` 下的型別解析。
20
+
21
+ ## [0.9.1] — 2026-08-17
22
+
23
+ ### Changed
24
+
25
+ - **內部重構(pm_48 交付 B):轉 npm workspaces monorepo**——共用引擎抽出為 `@wport/core`
26
+ (typed REST client、typed errors、enterprise transport、concurrency、resume-schema),
27
+ CLI 改為其消費者。**對外行為零變更**:指令、exit code 契約(0/2/3/4/5)、
28
+ schema fingerprint(`839e8a891dfb`)均與 0.9.0 一致(669 tests + whole-branch review 驗證)。
29
+ - 新姊妹套件:`@wport/sdk`(程式化存取,同能力邊界)與 `@wport/core`(內部引擎)自本版起發布。
30
+ - npm 發布素材補齊:package 內 README/CHANGELOG/LICENSE(先前 `files` 指向 repo root 造成漏檔)。
31
+
8
32
  ## [0.9.0] — 2026-08-10
9
33
 
10
34
  ### Added
package/README.md CHANGED
@@ -305,24 +305,24 @@ The public job search endpoint is throttled to 1200 requests / minute / client I
305
305
  ## Development
306
306
 
307
307
  ```bash
308
- cd apps/cli
308
+ # from the repo root (npm workspaces monorepo)
309
309
  npm install
310
- npm run gen:openapi:prod # fetch + filter swagger from prod, produces src/generated/schema.d.ts
311
- npm run build
312
- npm link # so the wport command resolves to this build
310
+ npm run gen:openapi:prod -w @wport/core # fetch + filter swagger from prod, produces packages/core/src/generated/schema.d.ts
311
+ npm run build -w @wport/cli
312
+ npm link -w @wport/cli # so the wport command resolves to this build
313
313
 
314
314
  wport jobs search --keyword backend
315
315
  ```
316
316
 
317
- Three codegen variants — pick whichever matches your setup:
317
+ Three codegen scripts live in `packages/core/package.json` run each with `-w @wport/core`, pick whichever matches your setup:
318
318
 
319
- | Script | Source | When to use |
320
- |---|---|---|
321
- | `npm run gen:openapi:prod` | `https://api.wport.me/api/api-doc-json` | Default; works from a fresh checkout, no local backend needed |
322
- | `npm run gen:openapi:remote` | `http://localhost:3000/api/api-doc-json` | When you're hacking on the backend locally |
323
- | `npm run gen:openapi` | `../../docs/swagger/swagger-dev.json` | When you've already exported the spec via root's `npm run export:swagger:json` |
319
+ | Script | Source | Output | When to use |
320
+ |---|---|---|---|
321
+ | `npm run gen:openapi:prod -w @wport/core` | `https://api.wport.me/api/api-doc-json` | `packages/core/src/generated/schema.d.ts` (jobs line) | Default; works from a fresh checkout, no local backend needed |
322
+ | `npm run gen:openapi -w @wport/core` | `http://localhost:3000/api/api-doc-json` | `packages/core/src/generated/schema.d.ts` (jobs line) | When you're hacking on the backend locally |
323
+ | `npm run gen:openapi:personal -w @wport/core` | repo's frozen `docs/handoff/swagger-wport-personal-api-v1.json` | `packages/core/src/generated/personal-schema.d.ts` (personal line) | Regenerating personal-line types after the frozen spec changes; deterministic, no network needed, and CI enforces this one stays in sync |
324
324
 
325
- The `:prod` / `:remote` variants go through `scripts/gen-from-remote.cjs`, which filters the upstream spec down to the endpoints this CLI uses (it ignores unrelated `$ref` breakage elsewhere in the spec). When the CLI starts using a new endpoint, add it to `KEEP_PATHS` in that script.
325
+ All three go through `packages/core/scripts/gen-from-remote.cjs`, which filters the upstream spec down to the endpoints this CLI uses (it ignores unrelated `$ref` breakage elsewhere in the spec). When the CLI starts using a new endpoint, add it to `KEEP_PATHS` (jobs line) or `--keep-prefix` (personal line) in that script.
326
326
 
327
327
  #### 發 dev channel 到 npm
328
328