Skip to content

feat: add type edit command#106

Merged
angeloashmore merged 1 commit intoaa/remote-modelingfrom
aa/type-edit
Apr 10, 2026
Merged

feat: add type edit command#106
angeloashmore merged 1 commit intoaa/remote-modelingfrom
aa/type-edit

Conversation

@angeloashmore
Copy link
Copy Markdown
Member

@angeloashmore angeloashmore commented Apr 10, 2026

Resolves: #91

Description

Add type edit subcommand to update content type metadata after creation.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

$ prismic type edit --help
Edit a content type.

USAGE
  prismic type edit <name> [options]

ARGUMENTS
  <name>   Name of the content type (required)

OPTIONS
  -n, --name string     New name for the type
  -f, --format string   Type format: "custom" or "page"
      --repeatable      Allow multiple documents of this type
  -s, --single          Restrict to a single document
  -r, --repo string     Repository domain
  -h, --help            Show help for command

How to QA 1

node --run build
./dist/index.mjs type edit "MyType" --name "NewName"
./dist/index.mjs type edit "MyType" --single
./dist/index.mjs type edit "MyType" --repeatable
./dist/index.mjs type edit "MyType" --format page

Note

Medium Risk
Adds a new CLI flow that mutates remote content type metadata via the Custom Types API; mistakes or edge cases could rename/flip repeatability unexpectedly in user repositories.

Overview
Adds a new prismic type edit subcommand to update an existing content type’s metadata (label, format, and repeatability) by fetching types from the repository, validating flags, and calling updateCustomType.

After a successful API update, it syncs the local adapter state (adapter.updateCustomType) and regenerates types, and it wires the new handler into the prismic type command router.

Reviewed by Cursor Bugbot for commit cbf3e85. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Closes #91

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@angeloashmore angeloashmore merged commit 901a0be into aa/remote-modeling Apr 10, 2026
22 of 23 checks passed
@angeloashmore angeloashmore deleted the aa/type-edit branch April 10, 2026 00:57
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cbf3e85. Configure here.

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.

1 participant