Skip to content

chore(cli): add npm publish metadata and package readme - #17

Merged
BlackishGreen33 merged 1 commit into
mainfrom
codex/cli-publish-metadata
Mar 8, 2026
Merged

chore(cli): add npm publish metadata and package readme#17
BlackishGreen33 merged 1 commit into
mainfrom
codex/cli-publish-metadata

Conversation

@BlackishGreen33

Copy link
Copy Markdown
Owner

摘要

  • 補齊 confession-cli npm 發版 metadata
  • 新增 confession-cli/README.md,提供安裝與指令說明

變更內容

  • confession-cli/package.json
    • 新增 keywords / homepage / bugs / repository / engines
    • 新增 filespublishConfig.access=public
    • 新增 prepublishOnly
  • confession-cli/README.md
    • 新增 npm i -g 安裝方式
    • 新增 init/scan/list/status 使用範例
    • 補充 CLI 參數與 project root 解析規則

驗證

  • pnpm lint
  • pnpm build
  • pnpm test

Copilot AI review requested due to automatic review settings March 8, 2026 08:04
@BlackishGreen33
BlackishGreen33 merged commit 119d255 into main Mar 8, 2026
4 checks passed
@BlackishGreen33
BlackishGreen33 deleted the codex/cli-publish-metadata branch March 8, 2026 08:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares confession-cli for npm publishing by adding standard package metadata and introducing a package-local README that documents installation and CLI usage.

Changes:

  • Expanded confession-cli/package.json with npm publish metadata (keywords, homepage, bugs, repository, engines) plus files, publishConfig, and a prepublishOnly hook.
  • Added confession-cli/README.md with global install instructions and examples for init/scan/list/status.
  • Documented CLI flags and project root resolution rules.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
confession-cli/package.json Adds npm publish metadata and configures packaged files + prepublish build hook.
confession-cli/README.md Adds end-user documentation for installation, commands, flags, and root resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"lint": "eslint .",
"build": "node -e \"const fs=require('fs');fs.mkdirSync('dist',{recursive:true});fs.copyFileSync('bin/confession.js','dist/confession.js')\""
"build": "node -e \"const fs=require('fs');fs.mkdirSync('dist',{recursive:true});fs.copyFileSync('bin/confession.js','dist/confession.js')\"",
"prepublishOnly": "pnpm build"

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prepublishOnly is invoking pnpm build. When publishing via npm publish (or in environments without pnpm/corepack enabled), this can fail because pnpm may not be available. Prefer calling the local script via npm run build (or inline the node build command) so the publish step doesn’t depend on pnpm being installed globally.

Suggested change
"prepublishOnly": "pnpm build"
"prepublishOnly": "npm run build"

Copilot uses AI. Check for mistakes.
Comment thread confession-cli/README.md
## 可用參數

- `confession scan --api <baseUrl>`:指定 API 位址(預設讀取 `.confession/config.json`)
- `confession scan --depth quick|standard|deep`:覆寫掃描深度

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README documents confession scan --depth quick|standard|deep as an override, but the current CLI implementation only treats quick and deep as explicit overrides (passing --depth standard is ignored and falls back to config). Please align the documentation with actual behavior, or update the CLI to accept standard explicitly.

Suggested change
- `confession scan --depth quick|standard|deep`:覆寫掃描深度
- `confession scan --depth quick|deep`:覆寫掃描深度(standard 將依照設定檔預設值)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants