feat(publish): license + advertise tvos/watchos targets#4
Conversation
Pro-tier licenses now include tvos + watchos, and rebuildTargetsJson reports them on the public targets status page. Routing/signing reuse the existing ios-precompiled -> ios-sign path (tvOS/watchOS sign exactly like iOS), so no new sign capability is needed. Part of tvOS + watchOS (arm64_32) App Store publishing support.
📝 WalkthroughWalkthroughThis PR expands Pro-tier license support from 5 platforms to 7 by adding tvOS and watchOS. Three locations in ChangesPlatform Support Expansion
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main.ts (1)
713-713: ⚡ Quick winConsider using array length instead of hardcoded bound.
The loop bound
7is hardcoded and must be manually updated if platforms are added or removed. Usingknown.lengthwould make this more maintainable.♻️ Proposed refactor
- for (let ki = 0; ki < 7; ki++) { + for (let ki = 0; ki < known.length; ki++) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main.ts` at line 713, The for-loop using a hardcoded bound "7" should use the actual array length to stay correct when platforms change: replace the loop header for (let ki = 0; ki < 7; ki++) with a bound derived from the platforms array (use known.length) so the loop iterates over known.length items; update any dependent logic that assumes exactly 7 iterations to operate based on known.length as well (identify the loop by the variable name ki and the array known in the surrounding code).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/main.ts`:
- Line 713: The for-loop using a hardcoded bound "7" should use the actual array
length to stay correct when platforms change: replace the loop header for (let
ki = 0; ki < 7; ki++) with a bound derived from the platforms array (use
known.length) so the loop iterates over known.length items; update any dependent
logic that assumes exactly 7 iterations to operate based on known.length as well
(identify the loop by the variable name ki and the array known in the
surrounding code).
What
Hub half of tvOS + watchOS App Store publishing. Lets pro-tier licenses publish to tvOS and watchOS, and reports both on the public targets status page.
Companion: perry CLI PR (PerryTS/perry#5085) and worker deploy patches.
Changes (
src/main.ts)registerLicense+ account-tier update): addtvos,watchos.rebuildTargetsJson: addtvos/watchosto theknown/labelsarrays and bump the loop bound so they appear intargets.jsonwhen a worker advertises them.Routing / signing — no change needed
tvOS and watchOS sign/package exactly like iOS, so they ride the existing two-phase flow: the linux worker tags the unsigned bundle
ios-precompiledand reportsneeds_finishing: "ios", and the hub re-queuesios-signfor the macOS ship worker. That logic is suffix-generic and already handles this; no new*-signcapability or verify-target mapping is added (tvOS already ships without one).Test
perry check src/main.tspasses.Summary by CodeRabbit