Document the generate-fixtures asset store (fixtures.assets, $cwa->asset(), prune-fixture-assets)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- php, yaml
- Lĩnh vực
- api, documentation
Hướng nghiên cứu
Start in content/4.api/ and find the existing generate-fixtures and scaffold pages, then read the config and command details in the issue body and in components-web-app/api-components-bundle#466. Add a section that covers the fixtures.assets config keys, the one-off --assets-store and --assets-dir options, the .assets.json manifest, the prune-fixture-assets command and the load-time error. Done when each bullet in the issue has a matching passage and the page matches the merged #466 behaviour.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
components-web-app/api-components-bundle#466 (for components-web-app/api-components-bundle#462) adds a fixture asset store to generate-fixtures. The API bundle's fixture docs (content/4.api/, the generate-fixtures / scaffold pages) should cover the following.
What to document
-
Why it exists. Without it,
generate-fixtureswrites a readable copy of every uploaded file toassets/beside the scaffold. That is still the default. For a large site you can instead keep the files in a store and commit only a small manifest. -
Configuration
silverback_api_components: fixtures: assets: store: local | flysystem # an env var works, e.g. '%env(FIXTURE_ASSETS_STORE)%' path: ... # local: the folder; default is assets/ beside the scaffold class adapter: gcloud # flysystem: one of the app's filesystem adapter aliases (required) prefix: fixtures/ # flysystem: folder within the adapterGenerating and loading both read this config. Generating needs write access to the store, and loading needs read access.
-
What gets generated
- Each file is stored once under its SHA-256.
- The class refers to it as
$cwa->asset('<hash>'). - The class gets a
<ClassName>.assets.jsonmanifest beside it, listing name, mime type, size and source fields. Commit the manifest with the class. - The same content uploaded under another name is written as
$cwa->asset('<hash>', name: '…').
-
One-off options:
--assets-store local|flysystemand--assets-dir <folder>(a local folder). -
Loading:
doctrine:fixtures:loadresolves each hash through the configured store and stores the file under its manifest name. A missing or changed asset fails the load with a message naming the store. -
Pruning
- Generating into a local store deletes the assets the new manifest no longer lists. Give each scaffold its own local folder.
silverback:api-components:prune-fixture-assets <manifest>... [--dry-run]deletes from the store the assets that none of the given manifests lists. List every manifest a branch or deployment still loads.- Only hash-named files directly under the prefix are ever touched.
-
Hand-written scaffolds can call
$cwa->asset()too, with a manifest beside the class. -
Not built yet: an export-time
--max-dimensiondownscale (see #462).
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 1 giờ 20 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của components-web-app/docs
-
documentation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
components-web-app/docs#290 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
components-web-app/docs#289 · 2 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
components-web-app/docs#237 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
components-web-app/docs#1 · 3 bình luận ·
Tất cả issue của components-web-app/docs
Issue tương tự
-
a10y a10y-audit ai-driven-qa claude
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
linagora/twake-directory-manager#219 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0️⃣ phase/new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Pulse v7: buildPreferencesFromTelos() bypasses telosSectionOrFile(), renders empty on unified-TELOS installsCó thể đã có người làm @zephyr91 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
danielmiessler/LifeOS#2393 ·
Maintainer thường phản hồi trong vòng 4 ngày