Manifest
Detailed explanation of the manifest.json file for dweb apps, which can be understood as the manifest.json for PWA.
This mainly provides all configuration information for dweb apps, attribution verification, and some information displayed on the installation interface.
Reference
Parameter
id:string。The specification is:${name}.${host}.dweb. Eachapphas a uniqueid, and each domain can mount multipleapps. Example:"game.dweb.waterbang.top.dweb".version:string。The version number of the application.baseURI:string?。If not set, thebaseURIlinked bymetadata.jsonis used by default.server:MainServer。plaoc application entry settings.
interface MainServer {
root: string /* The startup directory of the program */;
entry: string /* The startup file of the program */;
}logo:string。Thelogoicon displayed during application installation.minTarget:number。The minimum supportedMajorversion number ofSemantic VersionforDweb Browser.maxTarget:number?。The maximum supportedMajorversion number ofSemantic VersionforDweb Browser.name:string。The name displayed by the application. Same as the name in theW3CWebAppstandard.short_name:string。The short name displayed by the application. Same as the short_name in theW3CWebAppstandard.description:string。Application introduction. Same as the description in theW3CWebAppstandard.dir:string?。Used for text alignment. Same as the dir in theW3CWebAppstandard.lang:string?。Specifies the primary language for the values of the directional members of the manifest (since knowing the language also helps with directionality). Same as the lang in theW3CWebAppstandard.icons:string。Icon set. Same as the icons in theW3CWebAppstandard.
homepage_url:string。The homepage URL of the application. Same as the homepage_url in theChromemanifeststandard.bundle_*:string。The packaging address and security-related verification information automatically generated by the@plaoc/clitool.public_key_url:string?。This link must use a website link with the same domain asid.Note: The request returns a format of "algorithm + public key address"
{algorithm}:hex;{publicKey}For example
rsa-sha256:hex;2...1languages:string[]?。Supported languages. Language codes.images:string[]?。Display images during application installation.change_log:string。Update log displayed during application installation.author:string[]。Author information displayed during application installation.release_date:string。Release date displayed during application installation.dweb_deeplinks:string[]?。The specification is:dweb://${operation}. Thedeeplinksfunction ofDweb Browser, which can be used to wake up the application externally.categories:string[]。Currently recommended to use["application"], more will be opened later.display:"fullscreen" | "standalone" | "minimal-ui" | "browser" | undefined。The display mode of the application.orientation:"any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary" | undefined。The default orientation of the application window.......还有一些字段暂未启用。
Example
{
"id": "game.dweb.waterbang.top.dweb",
"server": {
"root": "/usr",
"entry": "/server/plaoc.server.js"
},
"minTarget": 2,
"maxTarget": 2,
"name": "vue3-game",
"short_name": "game",
"description": "This is an example application, containing examples of all components of dweb_plugins.",
"logo": "https://www.bfmeta.info/imgs/logo3.webp",
"bundle_url": "./game.dweb.waterbang.top.dweb-1.3.0.zip",
"bundle_hash": "sha256:56e8a7569519364d03c04bd11147b16693db107878b4f27b827617e5f4dfb650",
"bundle_size": 3112387,
"bundle_signature": "",
"public_key_url": "",
"release_date": "Fri Jan 12 2024 14:54:14 GMT+0800 (Central Standard Time)",
"change_log": "This is the update log",
"images": [
"http://qiniu-waterbang.waterbang.top/bfm/cot-home_2058.webp",
"http://qiniu-waterbang.waterbang.top/bfm/defi.png",
"http://qiniu-waterbang.waterbang.top/bfm/nft.png"
],
"author": ["bfs", "bfs@bfs.com"],
"version": "1.3.0",
"categories": ["application", "kids-games"],
"languages": [],
"homepage_url": "https://dweb.waterbang.top",
"plugins": [],
"permissions": [],
"dir": "ltr",
"lang": "",
"icons": [],
"screenshots": [],
"display": "fullscreen",
"orientation": "any",
"theme_color": "",
"background_color": "",
"shortcuts": [],
"dweb_protocols": []
}