Bỏ qua, đến nội dung

@digiforce-nc/plugin-export-schema ​

Plugin xuất schema — export cấu hình collection, fields, relations và UI schema ra file JSON để chia sẻ, backup, hoặc chuyển đổi giữa các môi trường.

Plugin này làm gì? ​

Khi cần di chuyển cấu hình giữa các môi trường (dev → staging → production) hoặc chia sẻ cấu hình cho đồng nghiệp, plugin cho phép export toàn bộ schema (collections, fields, relations, UI pages) ra file JSON chuẩn — có thể import lại bằng plugin-import-schema.

Năm tính năng chính ​

#Tính năngChi tiết
1Collection exportExport định nghĩa collection: fields, index, relations, validators
2UI schema exportExport page layout, block config, form schema
3Selective exportChọn collection/page cần export (không bắt buộc export tất cả)
4Dependency resolveTự động include collections phụ thuộc (FK, relation)
5JSON formatOutput file JSON chuẩn, có thể version control (Git)

Kiến trúc ​

Luồng export ​

Cấu trúc file JSON output ​

SectionNội dung
collectionsDanh sách collection: fields, indexes, relations, validators
uiSchemasPage layouts, block configs, form schemas
menusMenu structure (nếu có)
metadataVersion, timestamp, source instance info

Dependency resolution ​

Khi export collection orders, plugin tự động phát hiện và include:

  • Collection customers (FK relation)
  • Collection products (M2M relation)
  • Shared scopes và validators

Thành phần client ​

Thành phầnMô tả
ExportWizardWizard chọn nội dung export (checkbox tree)
SchemaPreviewPreview schema JSON trước khi download
ExportButtonNút download file JSON
DependencyTreeHiển thị dependency tree của items được chọn

Dependencies ​

PackageVai trò
@digiforce-nc/serverServer framework
@digiforce-nc/databaseDatabase ORM
@digiforce-nc/clientClient UI framework

Mục lục chi tiết ​

(Xem trang tổng quan ở trên)