Shared canonical export-name converter (camelCase to snake_case with override table)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 68/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- tooling
调研方向
首先定位 raster-shared 的导出接口、现有测试和包发布配置;同时检查 Overseer 的私有 convertObjectKeysToSnakeCase 以及 polygon-parts-worker 的消费者。添加共享转换器和一个有文档说明的覆盖表,涵盖常规、首字母缩略词/数字以及覆盖情形,然后验证可以发布新的 raster-shared 版本供下游使用。
由索引模型根据 Issue 内容生成。
描述
What to build
Add a shared canonical export-name converter to raster-shared that maps camelCase property keys to the snake_case column names used when writing GeoPackage export tables. It wraps change-case's snakeCase for the general case and consults a small override table for naming exceptions.
The override table's only entry today is resolutionDegree → resolution_deg (the per-part resolution field). Note the aggregate fields maxResolutionDeg/minResolutionDeg already abbreviate, so they need no override. The override table is the single, documented place where export-naming exceptions are declared.
Name the function to reflect that it is the canonical export-column-name mapping (e.g. an export-column-name converter), not a generic snake_case utility, so future consumers understand it carries overrides. This converter is intended to replace Overseer's private convertObjectKeysToSnakeCase and to be consumed by polygon-parts-worker.
No snake_case TypeScript type is produced — snake_case is derived at runtime only; the camelCase Zod schemas in raster-shared remain the source of truth for field names.
Release a new raster-shared version so downstream repos can consume it.
Acceptance criteria
- A converter exported from
raster-sharedmaps an object's camelCase keys to snake_case keys, usingchange-casefor the general case. - Acronym/number tokens convert correctly:
horizontalAccuracyCE90 -> horizontal_accuracy_ce90,imagingTimeBeginUTC -> imaging_time_begin_utc. - An override table is consulted before the general rule;
resolutionDegreemaps toresolution_deg. - Adding or removing an override is a single-location change.
- Unit tests cover the general conversion, the acronym/number cases, and every override entry.
- A new
raster-sharedversion is released and publishable for downstream consumption.
Blocked by
- None - can start immediately.
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 0
- 平均合并
- 2 小时 51 分钟
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
platformatic/mcp#208 ·
维护者通常 1 天内回复
-
🐛 bug
难度 2/5 1-3 小时 新手友好度 66/100
margelo/react-native-vision-camera#4211 ·
维护者通常 4 天内回复