feat: 重构OpenResty模块部分以支持动态编译 (#13291)

* feat: support dynamic module build for OpenResty

* feat: add dynamic module build page for OpenResty

* refactor: drop auto fallback, gate dynamic build by version support

- remove auto-to-static fallback; dynamic build failure now reports the
  error and hints switching to static build manually
- gate dynamic builds on module support files (Dockerfile.modules +
  module.catalog.json) instead of version numbers, expose
  dynamicSupported in the modules API
- collect repeated path/status/operate strings into constants
- move nginx module regex patterns into utils/re with semantic helpers
- reorganize nginx_module.go around the main build flows and inline
  single-use thin helpers

* feat: limit nginx module build mode options by version support

- build mode radio offers only dynamic and static (auto maps to dynamic
  for legacy data)
- disable the dynamic option with a hint when the installed OpenResty
  version lacks dynamic build support

* feat: complete i18n for nginx module pages

Fill in the new nginx module keys for all eleven language files
(translations other than zh/en are draft machine translations).

* feat: probe dynamic module support on load and drop the auto build mode

- probe each non-static module's configure params when loading the
  module list and report dynamicSupport=supported/unsupported up front
- normalize the legacy auto build mode to dynamic

* feat: clarify module build modes in the UI

- build drawer lists dynamic modules (tagged, hot-reload) and static
  modules (tagged, full rebuild + container restart) separately
- disable the dynamic option per module when its params do not support
  dynamic build, distinct from the version gate hint
- drop the auto build mode wording everywhere and sync all eleven
  language files

* feat: clarify purpose of the nginx module build drawer

- add a purpose hint explaining dynamic (hot reload) vs static (full
  rebuild + container restart)
- drop the per-module mode tags now that section headers carry the
  semantics
- allow submitting with zero dynamic modules selected when static
  modules are present, so static-only users can trigger a build

* feat: pass apt mirror through to dynamic module builds

The mirror selected in the build dialog (or CONTAINER_PACKAGE_URL in the
app env as fallback) is now forwarded as a build arg so the module
builder uses the same apt source as the static build path. test-builder
gains a --mirror option.

* feat: add Lao translations for nginx module pages
This commit is contained in:
Snrat
2026-07-23 13:55:42 +08:00
committed by GitHub
parent f6ed11ac55
commit 2a2e6607b8
27 changed files with 3471 additions and 275 deletions
+27 -1
View File
@@ -32,6 +32,14 @@ export namespace Nginx {
export interface NginxBuildReq {
taskID: string;
mirror: string;
modules?: string[];
force?: boolean;
}
export interface NginxModuleArtifact {
name: string;
path: string;
checksum: string;
}
export interface NginxModule {
@@ -40,15 +48,33 @@ export namespace Nginx {
packages?: string;
enable: boolean;
params: string;
buildMode: 'auto' | 'dynamic' | 'static';
provider: 'local' | 'prebuilt';
dynamicSupport: 'unknown' | 'supported' | 'unsupported';
loadOrder: number;
buildStatus: 'pending' | 'ready' | 'failed';
loadStatus: 'enabled' | 'disabled';
compatibility: 'unknown' | 'compatible' | 'stale' | 'static';
artifacts?: NginxModuleArtifact[];
lastError?: string;
}
export interface NginxBuildConfig {
mirror: string;
modules: NginxModule[];
dynamicSupported: boolean;
}
export interface NginxModuleUpdate extends NginxModule {
export interface NginxModuleUpdate {
operate: string;
name: string;
script?: string;
packages?: string;
enable?: boolean;
params?: string;
buildMode?: 'auto' | 'dynamic' | 'static';
provider?: 'local' | 'prebuilt';
loadOrder?: number;
}
export interface NginxHttpsStatus {