feat(core,extensions): 구동 에셋 자체 제공 · 자산 실패 폴백 · 운영자 추가 에셋(custom/)

공개 저장소 이슈 gnuboard/g7 (@bigmsg) 제보에서 출발한 작업이다.

브라우저가 화면을 그리려고 제3자 CDN 에 도달해야 하면, 그 도달 실패는 예외도 로그도
남기지 않고 화면 기능만 조용히 사라진다. 폐쇄망·방화벽·광고차단기에서 재현되는데
자체 서버 로그에는 흔적이 없어 운영자가 원인을 특정할 수 없다. 제보된 것은 편집기
하나였지만 같은 구조가 아이콘·글꼴·코드편집기·압축 라이브러리·설치 마법사·개발
대시보드에 똑같이 있었으므로, 번들 확장과 템플릿 전체를 자체 제공으로 옮겼다.
런타임에 외부로 나가는 것은 주소 검색 서비스 하나만 남았다.

자체 제공만으로는 부족하다 — 자기 서버에서 받는 파일도 실패할 수 있고, 종전에는 그
실패가 무음이었다. CSS 경로에 재시도 계층을 세우고(스크립트 경로와 동형), 서버가 HTML
에 직접 심는 externals 까지 실패를 붙잡아 안내 배너와 [다시 시도]로 표면화했다.
편집기·코드편집기는 확보 실패 시 평문 입력으로 내려앉되 저장 계약을 유지한다.

두 번째 축은 운영자가 CSS 를 덧붙일 자리가 없던 문제다(sir.kr 문의). 확장 디렉토리의
custom/ 을 운영자 소유로 정해, 확장 교체가 그 디렉토리만은 보존하게 했다. 출처에
의존하지 않는 서술자로 해석하므로 나중에 다른 출처가 붙어도 소비자는 바뀌지 않는다.
확장 자산과 같은 메커니즘으로 정적 게시되어 CSS 내부 상대 url 도 해석되고, 파일을
고치면 그 변경을 감지해 재게시까지 예약된다.

FTP 접근이 없는 운영자에게는 그 자리도 없는 것과 같으므로 레이아웃 편집기에서 직접
넣고 고칠 수 있게 했다. 모듈·플러그인·템플릿이 한 엔드포인트를 공유한다 — 타입별로
나누면 같은 검증이 세 벌로 갈리고 그중 약한 하나가 우회로가 된다. 여기서 올린
스크립트는 그 레이아웃 한 장이 아니라 사이트 전 화면에서 실행되므로 레이아웃 편집과
분리된 전용 권한으로 연다. 운영자 CSS 가 화면을 조작 불능으로 만들면 그것을 고칠
화면에도 같은 CSS 가 실려 스스로 갇히므로, 서버가 목록을 비우는 탈출구(?custom=off)를
함께 뒀다.

동봉 자산은 재생성 경로에 버전 대조 가드를 붙였다. 선언과 다른 버전을 버전 디렉토리에
써 넣는 조용한 거짓말은 배포된 뒤에는 드러나지 않는다.
This commit is contained in:
HeuJung committed 2026-08-27 16:47:14 +09:00
1 parent 72f2e94c1a
commit 3945b6f1b3
1042 files changed
+107435 -947

No files matched your search

+3
View File
@@ -2,6 +2,9 @@
"core": {
"errors": {
"$partial": "partial/en/errors.json"
},
"assets": {
"$partial": "partial/en/assets.json"
}
},
"layout_editor": {
+3
View File
@@ -244,6 +244,9 @@ return [
'template_install_from_file' => 'Template installed from file',
'template_install_from_github' => 'Template installed from GitHub',
'template_refresh_layouts' => 'Template layouts refreshed (:template_name)',
'custom_asset_save' => 'Custom asset saved (:identifier — :path)',
'custom_asset_upload' => 'Custom asset uploaded (:identifier — :path)',
'custom_asset_delete' => 'Custom asset deleted (:identifier — :path)',
// Core update
'core_update_check' => 'Core update checked',
+32
View File
@@ -0,0 +1,32 @@
<?php
return [
'errors' => [
'not_found' => 'File not found: :path',
'not_editable' => 'This file type (:extension) cannot be edited directly. Upload a replacement file instead.',
'too_large_to_edit' => 'The file is too large to open in the editor. (limit: :limit bytes)',
'read_failed' => 'Failed to read the file: :path',
'write_failed' => 'Failed to save the file: :path',
'delete_failed' => 'Failed to delete the file: :path',
'directory_failed' => 'Failed to create the directory: :path',
'invalid_path' => 'The path is not allowed: :path',
'invalid_extension_target' => 'Target extension not found: :identifier',
'extension_not_allowed' => 'File type not allowed: :extension',
'upload_too_large' => 'The uploaded file is too large. (limit: :limit bytes)',
],
'validation' => [
'path_required' => 'Please specify the file path.',
'content_present' => 'The content field is required.',
'file_required' => 'Please choose a file to upload.',
'file_invalid' => 'The upload is not a valid file.',
'file_mimes' => 'File type not allowed. (allowed: :allowed)',
],
'messages' => [
'listed' => 'Loaded.',
'saved' => 'Saved.',
'uploaded' => 'File uploaded.',
'deleted' => 'File deleted.',
],
];
+1
View File
@@ -58,6 +58,7 @@ return [
'permissions_deleted' => ':count permissions deleted',
'menus_deleted' => ':count menus deleted',
'layouts_deleted' => ':count layouts deleted',
'custom_preserved' => 'Operator files (:directory) were archived to :archive.',
'confirm_prompt' => 'Are you sure you want to uninstall module ":module"?',
'confirm_details' => [
'roles' => '- :count roles will be deleted.',
+1
View File
@@ -172,6 +172,7 @@ return [
'roles_deleted' => ':count roles deleted',
'permissions_deleted' => ':count permissions deleted',
'layouts_deleted' => ':count layouts deleted',
'custom_preserved' => 'Operator files (:directory) were archived to :archive.',
'confirm_prompt' => 'Are you sure you want to uninstall plugin ":plugin"?',
'confirm_details' => [
'roles' => '- :count roles will be deleted.',
+1
View File
@@ -258,6 +258,7 @@ return [
'confirm_question' => 'Do you want to continue?',
'layouts_deleted' => ':count layout(s) deleted',
'versions_deleted' => ':count version(s) deleted',
'custom_preserved' => 'Operator files (:directory) were archived to :archive.',
'aborted' => 'Uninstall aborted.',
],
'list' => [
+3
View File
@@ -2,6 +2,9 @@
"core": {
"errors": {
"$partial": "partial/ko/errors.json"
},
"assets": {
"$partial": "partial/ko/assets.json"
}
},
"layout_editor": {
+3
View File
@@ -244,6 +244,9 @@ return [
'template_install_from_file' => '파일에서 템플릿 설치',
'template_install_from_github' => 'GitHub에서 템플릿 설치',
'template_refresh_layouts' => '템플릿 레이아웃 갱신 (:template_name)',
'custom_asset_save' => '커스텀 자산 저장 (:identifier — :path)',
'custom_asset_upload' => '커스텀 자산 업로드 (:identifier — :path)',
'custom_asset_delete' => '커스텀 자산 삭제 (:identifier — :path)',
// 코어 업데이트
'core_update_check' => '코어 업데이트 확인',
+32
View File
@@ -0,0 +1,32 @@
<?php
return [
'errors' => [
'not_found' => '파일을 찾을 수 없습니다: :path',
'not_editable' => '이 형식(:extension)은 본문을 직접 편집할 수 없습니다. 파일을 새로 올려 교체해 주세요.',
'too_large_to_edit' => '파일이 너무 커서 편집기에서 열 수 없습니다. (최대 :limit 바이트)',
'read_failed' => '파일을 읽지 못했습니다: :path',
'write_failed' => '파일을 저장하지 못했습니다: :path',
'delete_failed' => '파일을 삭제하지 못했습니다: :path',
'directory_failed' => '디렉토리를 만들지 못했습니다: :path',
'invalid_path' => '허용되지 않는 경로입니다: :path',
'invalid_extension_target' => '대상 확장을 찾을 수 없습니다: :identifier',
'extension_not_allowed' => '허용되지 않는 파일 형식입니다: :extension',
'upload_too_large' => '업로드 파일이 너무 큽니다. (최대 :limit 바이트)',
],
'validation' => [
'path_required' => '파일 경로를 지정해 주세요.',
'content_present' => '본문 필드가 필요합니다.',
'file_required' => '올릴 파일을 선택해 주세요.',
'file_invalid' => '올바른 파일이 아닙니다.',
'file_mimes' => '허용되지 않는 파일 형식입니다. (허용: :allowed)',
],
'messages' => [
'listed' => '목록을 불러왔습니다.',
'saved' => '저장했습니다.',
'uploaded' => '파일을 올렸습니다.',
'deleted' => '파일을 삭제했습니다.',
],
];
+1
View File
@@ -58,6 +58,7 @@ return [
'permissions_deleted' => ':count개 권한 삭제됨',
'menus_deleted' => ':count개 메뉴 삭제됨',
'layouts_deleted' => ':count개 레이아웃 삭제됨',
'custom_preserved' => '운영자 파일(:directory)을 :archive 에 보관했습니다.',
'confirm_prompt' => '모듈 ":module"을(를) 삭제하시겠습니까?',
'confirm_details' => [
'roles' => '- :count개의 역할이 삭제됩니다.',
+1
View File
@@ -172,6 +172,7 @@ return [
'roles_deleted' => ':count개 역할 삭제됨',
'permissions_deleted' => ':count개 권한 삭제됨',
'layouts_deleted' => ':count개 레이아웃 삭제됨',
'custom_preserved' => '운영자 파일(:directory)을 :archive 에 보관했습니다.',
'confirm_prompt' => '플러그인 ":plugin"을(를) 삭제하시겠습니까?',
'confirm_details' => [
'roles' => '- :count개의 역할이 삭제됩니다.',
+1
View File
@@ -258,6 +258,7 @@ return [
'confirm_question' => '계속하시겠습니까?',
'layouts_deleted' => '레이아웃 :count개 삭제됨',
'versions_deleted' => '버전 히스토리 :count개 삭제됨',
'custom_preserved' => '운영자 파일(:directory)을 :archive 에 보관했습니다.',
'aborted' => '삭제가 취소되었습니다.',
],
'list' => [
+8
View File
@@ -0,0 +1,8 @@
{
"load_failed": "Could not load {label}.",
"load_failed_multiple": "Could not load {count} items.",
"retry": "Retry",
"retrying": "Retrying...",
"close": "Close",
"retry_failed": "The retry failed. Please try again in a moment."
}
+28 -1
View File
@@ -35,7 +35,13 @@
"translations": "Translations",
"data_sources": "Data",
"reset": "Reset",
"switch_template": "Switch to another template"
"switch_template": "Switch to another template",
"custom_assets": "Custom assets",
"custom_assets_hint": "Manage operator-added CSS, JS, fonts and images.",
"custom_assets_off": "Disable custom assets",
"custom_assets_on": "Enable custom assets",
"custom_assets_off_hint": "Reopen this screen without operator-added CSS/JS. Use it when an added asset breaks the screen.",
"custom_assets_on_hint": "Operator-added assets are currently disabled. Click to apply them again."
},
"route_tree": {
"panel_title": "Screens / Routes",
@@ -106,6 +112,27 @@
"extension_gated_desc_with_states": "The area this extension injects into only appears in a specific screen state. Switch to that state using the state selector at the top to edit it.",
"slot_area_label": "Content area"
},
"custom_assets": {
"target_label": "Target extension",
"type_template": "Template",
"type_module": "Module",
"type_plugin": "Plugin",
"title": "Custom assets",
"close": "Close",
"loading": "Loading…",
"empty": "No files yet. Type a path below and save, or upload a file to start.",
"forbidden": "You do not have permission to manage custom assets. Ask an administrator for the “Manage Custom Assets” permission.",
"new_path_placeholder": "e.g. 10-overrides.css",
"path_label": "File path",
"content_label": "File content",
"new_file": "New file",
"save": "Save",
"upload": "Upload file",
"delete": "Delete",
"delete_confirm": "This file will be deleted. This cannot be undone.",
"binary_hint": "This file type (:extension) cannot be edited directly. Upload a replacement with the same name.",
"apply_hint": "Saved changes apply from the next page load."
},
"version_history": {
"title": "Version history",
"close": "Close",
+8
View File
@@ -0,0 +1,8 @@
{
"load_failed": "{label}을(를) 불러오지 못했습니다.",
"load_failed_multiple": "{count}개 항목을 불러오지 못했습니다.",
"retry": "다시 시도",
"retrying": "다시 시도 중...",
"close": "닫기",
"retry_failed": "다시 시도했지만 실패했습니다. 잠시 후 다시 시도해 주세요."
}
+28 -1
View File
@@ -35,7 +35,13 @@
"translations": "다국어",
"data_sources": "데이터",
"reset": "초기화",
"switch_template": "다른 템플릿으로 전환"
"switch_template": "다른 템플릿으로 전환",
"custom_assets": "커스텀 자산",
"custom_assets_hint": "운영자가 추가한 CSS·JS·폰트·이미지를 관리합니다.",
"custom_assets_off": "커스텀 자산 끄기",
"custom_assets_on": "커스텀 자산 켜기",
"custom_assets_off_hint": "운영자가 추가한 CSS·JS 없이 이 화면을 다시 엽니다. 추가 자산이 화면을 망가뜨렸을 때 씁니다.",
"custom_assets_on_hint": "지금은 운영자 추가 자산이 꺼져 있습니다. 눌러서 다시 적용합니다."
},
"route_tree": {
"panel_title": "화면 / 라우트",
@@ -106,6 +112,27 @@
"extension_gated_desc_with_states": "이 확장이 들어가는 영역은 특정 화면 상태에서만 나타납니다. 상단의 상태 선택에서 해당 상태로 바꾸면 편집할 수 있습니다.",
"slot_area_label": "콘텐츠 영역"
},
"custom_assets": {
"target_label": "관리 대상 확장",
"type_template": "템플릿",
"type_module": "모듈",
"type_plugin": "플러그인",
"title": "커스텀 자산",
"close": "닫기",
"loading": "불러오는 중…",
"empty": "추가한 파일이 없습니다. 아래에 경로를 적고 저장하거나, 파일을 올려 시작하세요.",
"forbidden": "커스텀 자산을 관리할 권한이 없습니다. 관리자에게 «커스텀 자산 관리» 권한을 요청해 주세요.",
"new_path_placeholder": "예: 10-overrides.css",
"path_label": "파일 경로",
"content_label": "파일 본문",
"new_file": "새 파일",
"save": "저장",
"upload": "파일 올리기",
"delete": "삭제",
"delete_confirm": "이 파일을 삭제합니다. 되돌릴 수 없습니다.",
"binary_hint": "이 형식(:extension)은 본문을 직접 편집할 수 없습니다. 같은 이름으로 다시 올려 교체하세요.",
"apply_hint": "저장하면 다음 화면부터 적용됩니다."
},
"version_history": {
"title": "버전 기록",
"close": "닫기",