Skip to content

feat: add icon support for items#6

Merged
agviegas merged 4 commits into
mainfrom
feat/icon-support
Mar 1, 2026
Merged

feat: add icon support for items#6
agviegas merged 4 commits into
mainfrom
feat/icon-support

Conversation

@ABujalance

Copy link
Copy Markdown
Contributor

Summary

  • Adds uploadItemIcon, getItemIcon, removeItemIcon methods to EngineServicesClient — wraps the new PUT/GET/DELETE /api/item/:id/icon backend endpoints
  • Adds --icon <path> option to thatopen publish — uploads an icon (PNG, WebP, or ICO, max 512 KB) after publishing an app or component
  • Icon path is saved to .thatopen config so subsequent publishes reuse it automatically

Changes

File What changed
src/core/client.ts 3 new public methods for icon CRUD
src/cli/commands/publish.ts --icon flag, validation, upload after publish, config persistence
src/cli/lib/config.ts iconPath field on ThatOpenLocalConfig

Test plan

  • yarn build passes
  • thatopen publish --icon ./icon.png uploads icon after publish
  • Subsequent thatopen publish (without --icon) reuses saved icon path
  • Invalid icon (wrong format, >512 KB) prints error and continues without failing publish

🤖 Generated with Claude Code

abujalance and others added 4 commits March 1, 2026 16:56
- Add uploadItemIcon, getItemIcon, removeItemIcon to EngineServicesClient
- Add --icon flag to thatopen publish (persisted in .thatopen config)
- Validates format (PNG/WebP/ICO) and size (512 KB max) before upload

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Augment Window interface for __THATOPEN_CONTEXT__ and ThatOpenCompany
- Add ComponentsLike interface for OBC.Components duck-typing
- Use typed inline casts for OBC/BUI globals in initApp
- Zero `as any` remaining in src/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename eslint.config.js → .mjs, migrate .eslintignore to config ignores
- Set @typescript-eslint/no-explicit-any to error
- Add `eslint src/` as first step in build script
- Fix ObjectId type (was `string | any`, now `string`)
- Remove stale eslint-disable comment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@agviegas agviegas merged commit b7949c0 into main Mar 1, 2026
1 check passed
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