feat: asobi init --template <engine> scaffolder#31
Merged
Conversation
Fetch a runnable client+backend demo (defold|godot|unity) into a fresh dir, so first success needs no glue. Templates are the existing demo repos pinned by immutable commit (single source of truth, no parallel templates); each demo's README documents the backend + engine steps. Extraction is defensive against hostile archives: strips the wrapper dir, rejects path traversal and absolute paths, skips symlinks/hardlinks, and caps file count + total bytes. No-flag 'asobi init' behaviour is unchanged. Closes #29.
The demo repos now auto-cut tags via a release workflow, so pin by tag
instead of commit SHA (asobi-{defold,godot,unity}-demo v0.1.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.
Implements #29 (onboarding upgrade).
asobi init <dir> --template <engine>fetches a runnable demo into a fresh directory so first success needs no glue code.Design (architecture-guardian approved)
Refto tags.--templatereplaces the default scaffold entirely; no-flaginitis byte-for-byte unchanged.Security (extracting a downloaded archive)
<repo>-<sha>/wrapper;safeJoinrejects absolute paths and..traversal; symlinks/hardlinks/devices are skipped (never materialised from the archive); file-count + total-byte caps guard against bombs; refuses a non-empty target dir.Tests
TestFetchE2E(network, gated byASOBI_TEMPLATE_E2E=1) is the anti-drift guard the guardian asked for: fetches the pinned defold demo and assertsgame.projectextracts. Verified locally (defold fetch + realinit --template godotrun).gofmt / go vet / go build / go test ./... all clean.
Next in the initiative: #30 (
asobi dev), then asobi_site#80 (samples gallery).