Repository navigation
feat: microCMSのTypeScript型生成CLIを追加 - #1
Merged
Merged
Conversation
Collaborator
Author
|
事前にコメントいただいていた点は、以下の内容に調整しています!
|
Sinhalite
requested review from
YouheiNozaki,
dc7290,
hiro08gh,
nemuvski and
wato787
October 5, 2026 03:03
Member
|
bugbot run |
nemuvski
reviewed
Oct 5, 2026
nemuvski
left a comment
Member
There was a problem hiding this comment.
src/ をjsファイルにしていますが、tsファイルにしても良いのかなぁと思いました!
後からやるより、最初の時点でやってしまっても良いかもです。
Collaborator
Author
こちら特に意図はなかったので、対応しました! |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 27d6343. Configure here.
Enforce required fields and nonempty minimum-count arrays in generated write types. Add nested read rules for trusting saved field constraints and reference availability, with conservative defaults. Capture required-field and minimum-count API cases for offline regression tests, verify nested combinations and compiler compatibility, and document the configuration and SDK usage.
nemuvski
self-requested a review
October 13, 2026 07:25
nemuvski
approved these changes
Oct 13, 2026
hiro08gh
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

概要
microCMSのマネジメントAPIからスキーマを取得し、TypeScriptの型を生成するCLIを追加します。初回リリース候補は1.0.0です。
initで設定ファイルを作成し、generateで型を生成、checkで生成結果との差分を確認satisfies Configで検査し、複数サービスとAPIの絞り込みに対応<ServiceKey>ServiceSchemaを生成data型を生成に反映レビューの進め方
まずREADMEで導入・設定・CLIの提供仕様を確認し、その後
examples/README.mdとexamples/microcms-types.tsで入力スキーマと生成結果を確認してください。最初は利用者に提供する仕様や説明の分かりやすさを中心に見ていただきたいです。SDKの型付きクライアントによる読み書き・クエリ推論・型抽出は、別途SDK側の変更で提供します。SDKの変更はこのPRには含めません。相互リンク先の
main/examplesは各リポジトリへの反映後に利用可能になるため、レビュー中はこのPR内のサンプルを参照してください。検証
npm test:49件成功npm run test:types:成功npm run test:types:成功npm run test:package:成功npm packの配布ファイル、サンプルの生成結果との一致、ローカルのMarkdownリンクとアンカーを確認通常のテストは保存済みスキーマを使い、実サービスへのアクセスとAPIキーは不要です。GitHub ActionsではNode.js22.18.0・22系・24系とTypeScript6.0.2の互換性を検証します。
リリース前の検討事項
microcms-typegenは候補です。npm上の利用可否とスコープを確認します。現在のCIはテストと配布内容の確認のみで、npmへの公開は行いません。レビュー通過後にリリース準備を進めます。これらの検討事項は
DEVELOPMENT.mdにも記載しています。