'use strict'; exports.configs = { '*': { hooks: './builder/hooks.js', options: { enabled: { label: '启用热更新', description: '仅适用于 Android、iOS、Windows、macOS 等原生平台。开启后将在构建完成时生成热更新资源包。', default: false, render: { ui: 'ui-checkbox', }, }, remoteUrl: { label: '热更新 URL', description: '远端热更新资源根地址。构建工具会自动补齐末尾的 /,并生成 project.manifest 与 version.manifest 地址。', default: 'http://127.0.0.1:7879/', render: { ui: 'ui-input', attributes: { placeholder: 'https://cdn.example.com/game/android/1.0.0/', }, }, verifyRules: ['http'], }, version: { label: '热更新版本', description: '资源版本号,支持 1.0、1.0.0 或 1.0.0.0 格式。新版本必须大于客户端本地版本。', default: '1.0.0', render: { ui: 'ui-input', attributes: { placeholder: '1.0.0', }, }, verifyRules: ['hotUpdateVersion'], }, }, verifyRuleMap: { hotUpdateVersion: { message: '热更新版本必须为 1.0、1.0.0 或 1.0.0.0 格式。', func(value) { return /^\d+(?:\.\d+){1,3}$/.test(String(value || '').trim()); }, }, }, }, };