feat: Graduate Upload Capability to Unified Project.upload() & Version 0.3.0#352
Merged
Conversation
…urface and bump version to 0.3.0 stable
994cf2c to
168c750
Compare
Project.upload() & Version 0.3.0 StableProject.upload() & Version 0.3.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the screen upload capability into a clean, unhyphenated, factually accurate public API method
Project.upload(), completely removes the legacyuploadImage()misnomer, integrates full native HTML code document uploading, hardens Zod-based schema validation, and bumps the codebase to a stable mainline0.3.0release.What Changed
1. Unified
Project.upload()API SurfaceuploadImage()method, which acted as an artificial client-side constraint.Project.upload(filePath, options)method capability on the extended domain class surface. It handles both design images (.png,.jpg,.jpeg,.webp) and full layout HTML text code documents (.html,.htm) first-class.2. Dynamic Payload Transcoding (
upload-handler.ts)SUPPORTED_MIME_TYPES.buildBatchCreateScreensBody()to dynamically branch on incoming asset MIME type signatures:text/html): Inferred automatically asscreenType: 'DOCUMENT', wrapping contents inside thehtmlCodepayload property object map.screenType: 'IMAGE', wrapping contents inside thescreenshotpayload property object map.3. Side-Effect Membrane Compliance
generated/domain-map.jsonto declare the newProject.upload()method as a formal side-effect contract, satisfying all monorepo validation guardrails perfectly.4. Mainline 0.3.0 Stable Graduation
0.3.0mainline release track.src/version.tsat compile time.Files Changed
Spec Contract & Handler Infrastructure
packages/sdk/src/spec/upload.ts— Purged old UploadImage definitions; established clean genericUploadSpec,UploadInput, andUploadResultschemaspackages/sdk/src/upload-handler.ts— Rewrote handler execution loops into a standaloneUploadHandlerclass with dynamic HTML body transcoding supportpackages/sdk/src/project-ext.ts— RemoveduploadImage()public surface method; exposed new permissiveupload()extension methodMonorepo Manifest Layout
packages/sdk/generated/domain-map.json— Mappeduploadmethod under side-effects manifestpackages/sdk/package.json— Bumped stable package version to0.3.0packages/sdk/src/version.ts— Auto-generated compilation string updatedpackages/sdk/src/index.ts— Barrel re-exports updated to map clean upload typesTest Validation Suites
packages/sdk/test/unit/upload.test.ts— Lifted imports block, cleaned syntax layouts, and added comprehensive generic integration testspackages/sdk/test/unit/extension-resolution.test.ts— Updated extended subclass runtime capability checkpackages/sdk/test/unit/sdk.test.ts— Rebuilt base assertions