You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue from PR review on #287 — the auth-flow page is inlined as a Swift raw string spread across AuthTokenIndexHTML.swift and three AuthTokenIndexHTML+Script*.swift constants.
Why
The current shape is intentional but suboptimal:
The original comment in AuthTokenIndexHTML.swift notes the HTML was held as a Swift raw string because a SwiftPM resource bundle would fail iOS-family CodeSign in CI even though the auth-token CLI flow only runs on macOS / Linux.
That worked, but PR Test suite improvements for v1.0.0-beta.1 (#286) #287 had to split the JS into multiple Swift constants composed via \#(…) interpolation just to keep the per-file size sensible. The script constants disable line_length and indentation_width because they hold raw JS, not Swift code.
The split is a workaround, not a design.
What
Either:
Conditionally bundle the HTML/JS as a SwiftPM resource for non-iOS platforms (since the CLI flow is macOS / Linux only) and load it at runtime from Bundle.module, gated by #if !os(iOS) …. This removes the file_length / line_length / indentation_width pressure entirely.
If (1) is still blocked by CodeSign realities, move the HTML+JS into a single non-split Swift file and accept a per-file swiftlint exclusion config-side (rather than per-file disable directives).
Out of scope for the existing PR — captured here so we can come back to it.
Context
Tracking issue from PR review on #287 — the auth-flow page is inlined as a Swift raw string spread across
AuthTokenIndexHTML.swiftand threeAuthTokenIndexHTML+Script*.swiftconstants.Why
The current shape is intentional but suboptimal:
AuthTokenIndexHTML.swiftnotes the HTML was held as a Swift raw string because a SwiftPM resource bundle would fail iOS-family CodeSign in CI even though the auth-token CLI flow only runs on macOS / Linux.\#(…)interpolation just to keep the per-file size sensible. The script constants disableline_lengthandindentation_widthbecause they hold raw JS, not Swift code.What
Either:
Bundle.module, gated by#if !os(iOS) …. This removes the file_length / line_length / indentation_width pressure entirely.Out of scope for the existing PR — captured here so we can come back to it.
Affected files
Examples/MistDemo/Sources/MistDemoKit/Commands/AuthTokenIndexHTML.swiftExamples/MistDemo/Sources/MistDemoKit/Commands/AuthTokenIndexHTML+ScriptAuth.swiftExamples/MistDemo/Sources/MistDemoKit/Commands/AuthTokenIndexHTML+ScriptDisplay.swiftExamples/MistDemo/Sources/MistDemoKit/Commands/AuthTokenIndexHTML+ScriptInit.swift