frostney / frostney/GocciaScript
Resolve bundled text and byte ESM imports from .gcbundle assets
Nobody has claimed this yet.
- Dominant language
- Pascal
- Stars
- 20
- Forks
- 3
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 45
Description
Summary
Make explicit assets stored in a .gcbundle resolve through the standard ESM import-attribute surface that GocciaScript already supports:
import sourceText from "./shader.wgsl" with { type: "text" };
import imageBytes from "./sprite.png" with { type: "bytes" };
Do not add a parallel GocciaScript.bundle runtime API.
Why
GocciaScript already supports text and byte ESM imports. Bundled assets should preserve that language-level contract so the same module source works from the filesystem and from a .gcbundle, without a bundle-specific global API.
Current behavior
Filesystem-backed module content can resolve text and byte imports, but the proposed bundle format and resolver do not yet store and serve explicit asset entries.
Expected behavior
BundleBuilderaccepts explicit--assetand--asset-dirinputs.- The bundle manifest records stable normalized virtual paths and whether an entry is text or bytes.
- The bundle-backed content provider resolves those entries through
with { type: "text" }andwith { type: "bytes" }. - Missing assets and mismatched import attributes raise deterministic module-resolution errors.
- The same importing module runs unchanged against filesystem and bundle-backed providers.
Scope notes
- Depends on #153, #154, #155, #156, and #157.
- Keep asset inclusion explicit rather than scanning arbitrary project files.
- Cover text, binary, directory inclusion, duplicate paths, missing entries, and mismatched attributes.
- No
GocciaScript.bundleglobal or other bundle-only JavaScript API. - Tracked by #161.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with BundleBuilder, the bundle manifest, and the bundle-backed content provider; review the existing filesystem text and byte ESM import path first. Add explicit asset and directory inclusion with normalized manifest entries, then cover text, binary, duplicates, missing entries, and mismatched attributes with deterministic resolution errors. Done means unchanged importing modules work from both filesystem and bundle providers without a bundle-specific runtime API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100