Skip to content

Replace name-based model specifiers with IDs in modeling commands #105

@angeloashmore

Description

@angeloashmore

Modeling commands currently accept names/labels to identify slices and content types. These should be replaced with IDs for consistency and reliability.

Affected flags/arguments

Slice specifiers (currently accept slice name):

  • slice view, slice remove, slice connect, slice disconnect — positional argument
  • --to-slice, --from-slice — used across field commands
  • slice add-variation --to, slice remove-variation --from

Content type specifiers (currently accept type label):

  • type view, type remove — positional argument
  • --to-type, --from-type — used across field commands
  • slice connect --to, slice disconnect --from

Notes

  • Slice lookups use s.name, type lookups use ct.label — neither uses the model ID
  • slice create and type create accept a name and derive the ID via snakeCase(name) — these may be fine as-is since they're creating new models
  • Core resolution logic lives in src/models.ts (resolveModel, resolveFieldContainer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions