-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Managed Assets #22
Merged
Merged
Conversation
This file contains 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
This changeset introduces a managed asset layer to Elide, which is integrated into the framework build tools. At build time, embedded SSR and CSR assets are packaged into the application, and are now additionally embedded with an asset descriptor providing metadata and dependency info. These descriptors are then used at runtime to more efficiently serve static assets directly out of memory, and to reference static assets easily from dynamic contexts. Later, we can use this as groundwork to enable dependency-aware asset serving, on-the-fly compilation, and so on. Changes enclosed: - Add `AssetManager`, `AssetReader`, `AssetResolver` interfaces - Add initial abstract logic for resolving and serving assets - Add server configuration properties for the asset system - Add concept of general bundled asset to `bundle.proto` - Add built-in implementations for each asset component interface - Add initial implementation of controller for asset serving Changes pending: - Logic to translate assets into HTTP responses - Logic to load and read assets - Tests for asset components - Tests for asset controller - Gradle plugin support
sgammon
added
java
Pull requests that update Java code
module:server
Modules, changes, and issues relating to Elide for servers
feature
Large PRs or issues with full-blown features
platform:jvm
PRs and issues relating to JVM support.
🚧 WIP
Works-in-progress. Blocks merge
labels
Jul 3, 2022
sgammon
added a commit
to elide-dev/plugin-gradle
that referenced
this pull request
Jul 4, 2022
This changeset moves the JS bundle task for Elide SSR into the plugin, behind an `elide {}` extension. The extension is configurable in terms of tooling, target, and build mode. Integrated with elide-dev/elide#22. Changes enclosed: - Implement `esbuild` config-gen and build - Implement configuration of plugin via extension, etc - Add support for pre-compiling SSR bundle via Prepack - Update protos to account for embedded/generic assets - Plugin version bump -> `1.0.0-alpha2` Pending changes: - Avoid requiring `npm(...)` deps and `node {}` block in downstream projects
11 tasks
Closed
sgammon
commented
Jul 4, 2022
Codecov Report
@@ Coverage Diff @@
## v3 #22 +/- ##
============================================
+ Coverage 44.21% 50.37% +6.15%
- Complexity 166 271 +105
============================================
Files 41 59 +18
Lines 1825 2289 +464
Branches 171 210 +39
============================================
+ Hits 807 1153 +346
- Misses 997 1099 +102
- Partials 21 37 +16
Continue to review full report at Codecov.
|
This was referenced Jul 4, 2022
- Enable build caching for non-main branches - Drop duplicate build caching
- Fix for translating asset tags in URLs - Fix for asset tag trimmed-state in index - Fill out docs for methods without them - Implement basic response serving/gen flow
- Select best pre-compressed asset from available set, if declared as supported by client - Generate ETag values for assets when enabled - Respond to If-Not-Modified requests appropriately when enabled
Kudos, SonarCloud Quality Gate passed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ci:buf-breaking-ignore
Ignore breaking proto changes
feature
Large PRs or issues with full-blown features
java
Pull requests that update Java code
module:server
Modules, changes, and issues relating to Elide for servers
platform:jvm
PRs and issues relating to JVM support.
🚧 WIP
Works-in-progress. Blocks merge
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 changeset introduces a managed asset layer to Elide, which is integrated into the framework build tools. At build time, embedded SSR and CSR assets are packaged into the application, and are now additionally embedded with an asset descriptor providing metadata and dependency info.
These descriptors are then used at runtime to more efficiently serve static assets directly out of memory, and to reference static assets easily from dynamic contexts.
Later, we can use this as groundwork to enable dependency-aware asset serving, on-the-fly compilation, and so on.
Changelog
AssetManager
,AssetReader
,AssetResolver
interfacesbundle.proto
If-None-Match
/ 304)