Skip to content

feat: astro integration package, initial import#20

Open
a-d-j-i wants to merge 3 commits into
coinspect:mainfrom
a-d-j-i:feat/astro-integration-package
Open

feat: astro integration package, initial import#20
a-d-j-i wants to merge 3 commits into
coinspect:mainfrom
a-d-j-i:feat/astro-integration-package

Conversation

@a-d-j-i
Copy link
Copy Markdown
Collaborator

@a-d-j-i a-d-j-i commented May 29, 2026

  • Adds packages/astro-integration/ a new @dappfence/astro npm package that wires DappFence into Astro projects as a first-class integration. On astro build, the integration: copies dappfence.js from @dappfence/core into the output dir, injects the <script> tag into every HTML file, hashes all tracked assets, and writes a signed integrity-manifest.json
  • Derives the manifest signer identity automatically from secretKey (or DAPPFENCE_SECRET_KEY env var), so users never need to supply the Ethereum address separately
  • Intentionally a no-op in astro dev. Vite transforms files at request time, so hash verification against a static manifest is not meaningful in dev
  • Current limitations: Static sites only.

a-d-j-i added 3 commits May 29, 2026 18:21
Astro's SSG pipeline bypasses Vite's transformIndexHtml, so the plugin
never fired in production.
Script injection is handled in astro:build:done via injectScriptTag.
Dev mode intentionally has no DappFence presence.
@a-d-j-i a-d-j-i force-pushed the feat/astro-integration-package branch from 27626a4 to 69cb844 Compare May 29, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant