@skspwork/config-doc 2.2.0 → 2.3.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skspwork/config-doc",
3
- "version": "2.2.0",
3
+ "version": "2.3.0-beta.2",
4
4
  "description": "Interactive documentation tool for JSON configuration files (appsettings.json)",
5
5
  "keywords": [
6
6
  "config",
@@ -1,4 +1,4 @@
1
- module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),f=e.i(66012),h=e.i(70101),u=e.i(26937),g=e.i(10372),m=e.i(93695);e.i(52474);var y=e.i(220),b=e.i(89171),P=e.i(27637),v=e.i(21127);function x(e){return e.replace(/\|/g,"\\|").replace(/\n/g,"<br>").replace(/\r/g,"").replace(/\$/g,"\\$")}function w(e){return e.replace(/\$/g,"\\$")}function C(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/\$/g,"&#36;")}function D(e,t){let a=t.split(/(?=\[)|:/),r=e;for(let e of a){if(null==r)return;if(e.startsWith("[")&&e.endsWith("]")){let t=parseInt(e.slice(1,-1),10);if(!Array.isArray(r))return;r=r[t]}else if(e&&"object"==typeof r&&e in r)r=r[e];else if(e)return}return r}class j{fsService;storageService;constructor(e){this.fsService=new P.FileSystemService(e),this.storageService=new v.StorageService(this.fsService)}async generateHtml(){let e=await this.fsService.loadProjectSettings();if(!e||!e.configFiles||0===e.configFiles.length)return this.generateEmptyHtml();let t=e.fields?Object.keys(e.fields):[],a=e.availableTags||[],r=[];for(let t of e.configFiles)try{let e=t.split(/[/\\]/).pop()||"config.json",a=this.storageService.getDocsFileName(t),n=await this.fsService.loadConfigFile(t),i=await this.fsService.loadConfigDocs(a);r.push({filePath:t,fileName:e,configData:n,docs:i||{configFilePath:t,lastModified:new Date().toISOString(),properties:{}}})}catch(e){console.error(`Failed to load config: ${t}`,e)}let n={projectName:e.projectName,createdAt:"",lastModified:new Date().toISOString(),configFiles:[]};return this.generateFullHtml(n,r,t,a)}generateEmptyHtml(){return`<!DOCTYPE html>
1
+ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),c=e.i(87718),d=e.i(95169),p=e.i(47587),f=e.i(66012),h=e.i(70101),u=e.i(26937),g=e.i(10372),m=e.i(93695);e.i(52474);var y=e.i(220),b=e.i(89171),P=e.i(27637),x=e.i(21127);function v(e){return e.replace(/\|/g,"\\|").replace(/\n/g,"<br>").replace(/\r/g,"").replace(/\$/g,"\\$")}function w(e){return e.replace(/\$/g,"\\$")}function D(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/\$/g,"&#36;")}function j(e,t){let a=t.split(/(?=\[)|:/),r=e;for(let e of a){if(null==r)return;if(e.startsWith("[")&&e.endsWith("]")){let t=parseInt(e.slice(1,-1),10);if(!Array.isArray(r))return;r=r[t]}else if(e&&"object"==typeof r&&e in r)r=r[e];else if(e)return}return r}class k{fsService;storageService;constructor(e){this.fsService=new P.FileSystemService(e),this.storageService=new x.StorageService(this.fsService)}async generateHtml(){let e=await this.fsService.loadProjectSettings();if(!e||!e.configFiles||0===e.configFiles.length)return this.generateEmptyHtml();let t=e.fields?Object.keys(e.fields):[],a=e.availableTags||[],r=[];for(let t of e.configFiles)try{let e=t.split(/[/\\]/).pop()||"config.json",a=this.storageService.getDocsFileName(t),n=await this.fsService.loadConfigFile(t),i=await this.fsService.loadConfigDocs(a);r.push({filePath:t,fileName:e,configData:n,docs:i||{configFilePath:t,lastModified:new Date().toISOString(),properties:{}}})}catch(e){console.error(`Failed to load config: ${t}`,e)}let n={projectName:e.projectName,createdAt:"",lastModified:new Date().toISOString(),configFiles:[]};return this.generateFullHtml(n,r,t,a)}generateEmptyHtml(){return`<!DOCTYPE html>
2
2
  <html lang="ja">
3
3
  <head>
4
4
  <meta charset="UTF-8">
@@ -22,24 +22,25 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
22
22
  <head>
23
23
  <meta charset="UTF-8">
24
24
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
25
- <title>${C(e.projectName)} - ConfigDoc</title>
25
+ <title>${D(e.projectName)} - ConfigDoc</title>
26
26
  ${this.getStyles()}
27
27
  </head>
28
28
  <body>
29
29
  <div class="container">
30
30
  <header>
31
31
  <div class="header-content">
32
- <h1>${C(e.projectName)}</h1>
32
+ <h1>${D(e.projectName)}</h1>
33
33
  <p class="meta">最終更新: ${new Date(e.lastModified).toLocaleString("ja-JP")}</p>
34
34
  </div>
35
35
  </header>
36
36
 
37
+ <div class="config-tabs" id="configTabs"></div>
38
+
37
39
  <div class="content">
38
40
  <aside class="sidebar">
39
41
  <div class="search-box">
40
- <input type="text" id="searchInput" placeholder="検索..." />
42
+ <input type="text" id="searchInput" placeholder="現在のファイル内を検索..." />
41
43
  </div>
42
- <div class="config-tabs" id="configTabs"></div>
43
44
  <div class="tree-container" id="treeContainer"></div>
44
45
  </aside>
45
46
  <main class="main-content">
@@ -445,33 +446,48 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
445
446
  }
446
447
 
447
448
  .config-tabs {
448
- border-bottom: 1px solid #e5e7eb;
449
- padding: 10px;
449
+ background: white;
450
+ border-radius: 8px;
451
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
452
+ margin-bottom: 20px;
453
+ padding: 15px;
450
454
  display: flex;
451
- flex-direction: column;
452
- gap: 5px;
455
+ flex-direction: row;
456
+ gap: 10px;
457
+ overflow-x: auto;
458
+ flex-wrap: wrap;
453
459
  }
454
460
 
455
461
  .config-tab {
456
- display: flex;
457
- flex-direction: column;
458
- gap: 2px;
459
- padding: 10px 12px;
462
+ display: inline-flex;
463
+ align-items: center;
464
+ gap: 8px;
465
+ padding: 10px 20px;
460
466
  background: #f9fafb;
461
- border: 1px solid #e5e7eb;
462
- border-radius: 4px;
467
+ border: 2px solid #e5e7eb;
468
+ border-radius: 8px;
463
469
  cursor: pointer;
464
470
  transition: all 0.2s;
471
+ white-space: nowrap;
472
+ min-width: fit-content;
473
+ }
474
+
475
+ .config-tab.has-path {
476
+ flex-direction: column;
477
+ align-items: flex-start;
478
+ gap: 2px;
465
479
  }
466
480
 
467
481
  .config-tab:hover {
468
482
  background: #f3f4f6;
483
+ border-color: #d1d5db;
469
484
  }
470
485
 
471
486
  .config-tab.active {
472
487
  background: #2563eb;
473
488
  color: white;
474
489
  border-color: #2563eb;
490
+ box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
475
491
  }
476
492
 
477
493
  .config-tab.active .config-tab-path {
@@ -483,29 +499,32 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
483
499
  }
484
500
 
485
501
  .config-tab-filename {
486
- font-weight: 500;
487
- font-size: 0.9rem;
502
+ font-weight: 600;
503
+ font-size: 0.95rem;
488
504
  }
489
505
 
490
506
  .config-tab-path {
491
507
  font-size: 0.75rem;
492
508
  color: #9ca3af;
509
+ font-family: 'Courier New', monospace;
493
510
  overflow: hidden;
494
511
  text-overflow: ellipsis;
495
512
  white-space: nowrap;
496
- max-width: 100%;
513
+ max-width: 250px;
497
514
  }
498
515
 
499
516
  .tree-container {
500
517
  padding: 10px;
501
518
  max-height: 600px;
502
519
  overflow-y: auto;
520
+ overflow-x: auto;
503
521
  }
504
522
 
505
523
  .tree-container > ul {
506
524
  list-style: none;
507
525
  padding: 0;
508
526
  margin: 0;
527
+ min-width: max-content;
509
528
  }
510
529
 
511
530
  .tree-node {
@@ -513,6 +532,7 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
513
532
  padding-left: 20px;
514
533
  border-left: 1px solid #e5e7eb;
515
534
  list-style: none;
535
+ min-width: max-content;
516
536
  }
517
537
 
518
538
  .tree-node.hidden {
@@ -525,13 +545,15 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
525
545
  cursor: pointer;
526
546
  border-radius: 6px;
527
547
  transition: all 0.15s ease;
528
- display: flex;
548
+ display: inline-flex;
529
549
  align-items: center;
530
550
  gap: 6px;
531
551
  font-size: 0.9rem;
532
552
  position: relative;
533
553
  background: transparent;
534
554
  border: 1px solid transparent;
555
+ min-width: max-content;
556
+ white-space: nowrap;
535
557
  }
536
558
 
537
559
  .tree-item:hover {
@@ -583,9 +605,6 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
583
605
  }
584
606
 
585
607
  .tree-label {
586
- flex: 1;
587
- overflow: hidden;
588
- text-overflow: ellipsis;
589
608
  white-space: nowrap;
590
609
  }
591
610
 
@@ -890,10 +909,16 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
890
909
  }
891
910
 
892
911
  // 設定タブを描画
893
- function renderConfigTabs(matchedConfigIndexes = null) {
912
+ function renderConfigTabs() {
894
913
  const tabsEl = document.getElementById('configTabs');
895
914
  tabsEl.innerHTML = '';
896
915
 
916
+ // ファイル名の重複をチェック
917
+ const fileNameCounts = {};
918
+ configs.forEach(config => {
919
+ fileNameCounts[config.fileName] = (fileNameCounts[config.fileName] || 0) + 1;
920
+ });
921
+
897
922
  configs.forEach((config, index) => {
898
923
  const tab = document.createElement('div');
899
924
  let className = 'config-tab';
@@ -902,24 +927,34 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
902
927
  className += ' active';
903
928
  }
904
929
 
905
- // 検索中で、マッチしない設定ファイルは非表示
906
- if (matchedConfigIndexes !== null && !matchedConfigIndexes.includes(index)) {
907
- className += ' hidden';
930
+ // 同一ファイル名が複数ある場合のみパスを表示
931
+ const hasDuplicate = fileNameCounts[config.fileName] > 1;
932
+
933
+ if (hasDuplicate) {
934
+ className += ' has-path';
908
935
  }
909
936
 
910
937
  tab.className = className;
911
- tab.innerHTML = \`
912
- <div class="config-tab-filename">\${escapeHtml(config.fileName)}</div>
913
- <div class="config-tab-path" title="\${escapeHtml(config.filePath)}">\${escapeHtml(config.filePath)}</div>
914
- \`;
938
+ if (hasDuplicate) {
939
+ tab.innerHTML = \`
940
+ <span class="config-tab-filename">\${escapeHtml(config.fileName)}</span>
941
+ <span class="config-tab-path" title="\${escapeHtml(config.filePath)}">\${escapeHtml(config.filePath)}</span>
942
+ \`;
943
+ } else {
944
+ tab.innerHTML = \`
945
+ <span class="config-tab-filename">\${escapeHtml(config.fileName)}</span>
946
+ \`;
947
+ }
948
+
915
949
  tab.addEventListener('click', () => {
916
950
  activeConfigIndex = index;
917
- renderConfigTabs(matchedConfigIndexes);
951
+ renderConfigTabs();
918
952
  renderCurrentConfig();
919
- // タブ切り替え後、検索フィルタを適用
920
- if (currentSearchQuery) {
921
- applySearchFilter(currentSearchQuery);
922
- }
953
+ // タブ切り替え後、検索フィルタをクリア
954
+ const searchInput = document.getElementById('searchInput');
955
+ searchInput.value = '';
956
+ currentSearchQuery = '';
957
+ applySearchFilter('');
923
958
  });
924
959
  tabsEl.appendChild(tab);
925
960
  });
@@ -980,7 +1015,7 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
980
1015
  });
981
1016
  }
982
1017
 
983
- // 検索機能(全設定ファイル対象)
1018
+ // 検索機能(現在選択中のファイル内のみ)
984
1019
  function setupSearch() {
985
1020
  const searchInput = document.getElementById('searchInput');
986
1021
  searchInput.addEventListener('input', (e) => {
@@ -988,67 +1023,16 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
988
1023
  currentSearchQuery = query;
989
1024
 
990
1025
  if (!query.trim()) {
991
- // 検索クエリが空の場合、すべてのタブを表示
992
- renderConfigTabs(null);
993
- renderCurrentConfig();
1026
+ // 検索クエリが空の場合、すべてのツリー項目を表示
1027
+ applySearchFilter('');
994
1028
  return;
995
1029
  }
996
1030
 
997
- // 全設定ファイルから検索してマッチした項目を収集
998
- let foundInConfigs = [];
999
- configs.forEach((config, index) => {
1000
- const tree = buildTree(config.configData, '', config.docs, config.configData);
1001
- const hasMatch = searchInTreeForConfig(tree, query, config);
1002
- if (hasMatch) {
1003
- foundInConfigs.push(index);
1004
- }
1005
- });
1006
-
1007
- // マッチした設定ファイルのタブのみ表示
1008
- renderConfigTabs(foundInConfigs);
1009
-
1010
- // マッチした最初の設定ファイルに切り替え(現在のタブがマッチしていない場合)
1011
- if (foundInConfigs.length > 0 && !foundInConfigs.includes(activeConfigIndex)) {
1012
- activeConfigIndex = foundInConfigs[0];
1013
- renderConfigTabs(foundInConfigs);
1014
- renderCurrentConfig();
1015
- }
1016
-
1017
1031
  // 現在表示中のツリー項目をフィルタリング
1018
1032
  applySearchFilter(query);
1019
1033
  });
1020
1034
  }
1021
1035
 
1022
- // ツリー内を検索してマッチするか判定(特定の設定ファイル用)
1023
- function searchInTreeForConfig(nodes, query, config) {
1024
- for (const node of nodes) {
1025
- const text = node.key.toLowerCase();
1026
- const path = node.path.toLowerCase();
1027
-
1028
- // プロパティ名とパスで検索
1029
- if (text.includes(query) || path.includes(query)) {
1030
- return true;
1031
- }
1032
-
1033
- // ドキュメント(フィールド内容)でも検索
1034
- const doc = config.docs.properties && config.docs.properties[node.path];
1035
- if (doc && doc.fields) {
1036
- for (const [label, value] of Object.entries(doc.fields)) {
1037
- if (value && value.toLowerCase().includes(query)) {
1038
- return true;
1039
- }
1040
- }
1041
- }
1042
-
1043
- if (node.children && node.children.length > 0) {
1044
- if (searchInTreeForConfig(node.children, query, config)) {
1045
- return true;
1046
- }
1047
- }
1048
- }
1049
- return false;
1050
- }
1051
-
1052
1036
  // HTML エスケープ($記号もエスケープしてKaTeX/MathJax数式解釈を防止)
1053
1037
  function escapeHtml(text) {
1054
1038
  const div = document.createElement('div');
@@ -1062,7 +1046,7 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
1062
1046
  renderCurrentConfig();
1063
1047
  setupSearch();
1064
1048
  }
1065
- `}}class k{static flattenConfig(e,t=""){let a={};for(let r in e){let n=t?`${t}:${r}`:r,i=e[r];i&&"object"==typeof i?Array.isArray(i)?i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))?i.forEach((e,t)=>{e&&"object"==typeof e&&!Array.isArray(e)&&Object.assign(a,this.flattenConfig(e,`${n}[${t}]`))}):a[n]=i:Object.assign(a,this.flattenConfig(i,n)):a[n]=i}return a}static getAllPropertyPaths(e,t=""){let a=[];for(let r in e){let n=t?`${t}:${r}`:r,i=e[r];a.push(n),i&&"object"==typeof i&&(Array.isArray(i)?i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))&&i.forEach((e,t)=>{if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${n}[${t}]`;a.push(r),a.push(...this.getAllPropertyPaths(e,r))}}):a.push(...this.getAllPropertyPaths(i,n)))}return a}static buildTree(e,t=""){let a=[];for(let r in e){let n=t?`${t}:${r}`:r,i=e[r];if(i&&"object"==typeof i)if(Array.isArray(i))if(i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))){let e=[];i.forEach((t,a)=>{t&&"object"==typeof t&&!Array.isArray(t)&&e.push({key:`[${a}]`,fullPath:`${n}[${a}]`,value:t,children:this.buildTree(t,`${n}[${a}]`),hasDocumentation:!1,type:"object"})}),a.push({key:r,fullPath:n,value:i,children:e.length>0?e:void 0,hasDocumentation:!1,type:"array"})}else a.push({key:r,fullPath:n,value:i,hasDocumentation:!1,type:"array"});else a.push({key:r,fullPath:n,value:i,children:this.buildTree(i,n),hasDocumentation:!1,type:"object"});else a.push({key:r,fullPath:n,value:i,hasDocumentation:!1,type:typeof i})}return a}}function A(e,t){return[...e].sort((e,a)=>{let r=t.indexOf(e),n=t.indexOf(a);return -1!==r&&-1!==n?r-n:-1===r?1:-1===n?-1:0})}var $=e.i(61958);class S{rootPath;constructor(e){this.rootPath=e}async generateMarkdownForFile(e){let t=new P.FileSystemService(this.rootPath),a=new v.StorageService(t),r=await t.loadProjectSettings(),n=r?.fields?Object.keys(r.fields):[],i=r?.availableTags||[],o=e.split(/[/\\]/).pop()||"config.json",s=await a.loadAllDocs(e),l=await t.loadConfigFile(e),c=s.associativeArrays||[],d=`# ${o}
1049
+ `}}class C{static flattenConfig(e,t=""){let a={};for(let r in e){let n=t?`${t}:${r}`:r,i=e[r];i&&"object"==typeof i?Array.isArray(i)?i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))?i.forEach((e,t)=>{e&&"object"==typeof e&&!Array.isArray(e)&&Object.assign(a,this.flattenConfig(e,`${n}[${t}]`))}):a[n]=i:Object.assign(a,this.flattenConfig(i,n)):a[n]=i}return a}static getAllPropertyPaths(e,t=""){let a=[];for(let r in e){let n=t?`${t}:${r}`:r,i=e[r];a.push(n),i&&"object"==typeof i&&(Array.isArray(i)?i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))&&i.forEach((e,t)=>{if(e&&"object"==typeof e&&!Array.isArray(e)){let r=`${n}[${t}]`;a.push(r),a.push(...this.getAllPropertyPaths(e,r))}}):a.push(...this.getAllPropertyPaths(i,n)))}return a}static buildTree(e,t=""){let a=[];for(let r in e){let n=t?`${t}:${r}`:r,i=e[r];if(i&&"object"==typeof i)if(Array.isArray(i))if(i.some(e=>e&&"object"==typeof e&&!Array.isArray(e))){let e=[];i.forEach((t,a)=>{t&&"object"==typeof t&&!Array.isArray(t)&&e.push({key:`[${a}]`,fullPath:`${n}[${a}]`,value:t,children:this.buildTree(t,`${n}[${a}]`),hasDocumentation:!1,type:"object"})}),a.push({key:r,fullPath:n,value:i,children:e.length>0?e:void 0,hasDocumentation:!1,type:"array"})}else a.push({key:r,fullPath:n,value:i,hasDocumentation:!1,type:"array"});else a.push({key:r,fullPath:n,value:i,children:this.buildTree(i,n),hasDocumentation:!1,type:"object"});else a.push({key:r,fullPath:n,value:i,hasDocumentation:!1,type:typeof i})}return a}}function A(e,t){return[...e].sort((e,a)=>{let r=t.indexOf(e),n=t.indexOf(a);return -1!==r&&-1!==n?r-n:-1===r?1:-1===n?-1:0})}var $=e.i(61958);class S{rootPath;constructor(e){this.rootPath=e}async generateMarkdownForFile(e){let t=new P.FileSystemService(this.rootPath),a=new x.StorageService(t),r=await t.loadProjectSettings(),n=r?.fields?Object.keys(r.fields):[],i=r?.availableTags||[],o=e.split(/[/\\]/).pop()||"config.json",s=await a.loadAllDocs(e),l=await t.loadConfigFile(e),c=s.associativeArrays||[],d=`# ${o}
1066
1050
 
1067
1051
  `;d+=`**ファイルパス:** \`${e}\`
1068
1052
 
@@ -1070,7 +1054,7 @@ module.exports=[47482,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250
1070
1054
 
1071
1055
  ---
1072
1056
 
1073
- `;let p=k.getAllPropertyPaths(l);if(0===p.length)d+="*プロパティがありません。*\n\n";else for(let e of(d+="## プロパティ一覧\n\n",p)){let t=(0,$.findAndMergeDocumentation)(e,s.properties,c,l),a=D(l,e);if(d+=`### \`${e}\`
1057
+ `;let p=C.getAllPropertyPaths(l);if(0===p.length)d+="*プロパティがありません。*\n\n";else for(let e of(d+="## プロパティ一覧\n\n",p)){let t=(0,$.findAndMergeDocumentation)(e,s.properties,c,l),a=j(l,e);if(d+=`### \`${e}\`
1074
1058
 
1075
1059
  `,null!=a){let e=typeof a,t=Array.isArray(a),r="object"===e&&!t;t?a.length>0&&a.every(e=>"object"!=typeof e||null===e)&&(d+=`**値:** \`${w(JSON.stringify(a))}\`
1076
1060
 
@@ -1084,7 +1068,7 @@ ${w(a)}
1084
1068
 
1085
1069
  `)}}else d+="*ドキュメントなし*\n\n";d+="---\n\n"}return d+`
1086
1070
  *このドキュメントは ConfigDoc により自動生成されました。*
1087
- `}async generateMarkdown(){let e=new P.FileSystemService(this.rootPath),t=new v.StorageService(e),a=await e.loadProjectSettings();if(!a||0===a.configFiles.length)return"# 設定ファイルドキュメント\n\nドキュメント化された設定ファイルがありません。\n";let r=a.fields?Object.keys(a.fields):[],n=a.availableTags||[],i="# 設定ファイルドキュメント\n\n";for(let o of(i+=`プロジェクト: **${a.projectName}**
1071
+ `}async generateMarkdown(){let e=new P.FileSystemService(this.rootPath),t=new x.StorageService(e),a=await e.loadProjectSettings();if(!a||0===a.configFiles.length)return"# 設定ファイルドキュメント\n\nドキュメント化された設定ファイルがありません。\n";let r=a.fields?Object.keys(a.fields):[],n=a.availableTags||[],i="# 設定ファイルドキュメント\n\n";for(let o of(i+=`プロジェクト: **${a.projectName}**
1088
1072
 
1089
1073
  最終更新: ${new Date().toLocaleString("ja-JP")}
1090
1074
 
@@ -1094,7 +1078,7 @@ ${w(a)}
1094
1078
 
1095
1079
  **ファイルパス:** \`${o}\`
1096
1080
 
1097
- `;let c=k.getAllPropertyPaths(l);if(0===c.length){i+="*プロパティがありません。*\n\n";continue}i+="### プロパティ一覧\n\n";let d=s.associativeArrays||[];for(let e of c){let t=(0,$.findAndMergeDocumentation)(e,s.properties,d,l),a=D(l,e);if(i+=`#### \`${e}\`
1081
+ `;let c=C.getAllPropertyPaths(l);if(0===c.length){i+="*プロパティがありません。*\n\n";continue}i+="### プロパティ一覧\n\n";let d=s.associativeArrays||[];for(let e of c){let t=(0,$.findAndMergeDocumentation)(e,s.properties,d,l),a=j(l,e);if(i+=`#### \`${e}\`
1098
1082
 
1099
1083
  `,null!=a){let e=typeof a,t=Array.isArray(a),r="object"===e&&!t;t?a.length>0&&a.every(e=>"object"!=typeof e||null===e)&&(i+=`**値:** \`${w(JSON.stringify(a))}\`
1100
1084
 
@@ -1108,7 +1092,7 @@ ${w(a)}
1108
1092
 
1109
1093
  `)}}else i+="*ドキュメントなし*\n\n";i+="---\n\n"}}return i+`
1110
1094
  *このドキュメントは ConfigDoc により自動生成されました。*
1111
- `}}class E{rootPath;constructor(e){this.rootPath=e}async generateMarkdownTableForFile(e){let t=new P.FileSystemService(this.rootPath),a=new v.StorageService(t),r=await t.loadProjectSettings(),n=r?.fields?Object.keys(r.fields):[],i=r?.availableTags||[],o=e.split(/[/\\]/).pop()||"config.json",s=await a.loadAllDocs(e),l=s.associativeArrays||[],c=await t.loadConfigFile(e),d=`# ${o}
1095
+ `}}class E{rootPath;constructor(e){this.rootPath=e}async generateMarkdownTableForFile(e){let t=new P.FileSystemService(this.rootPath),a=new x.StorageService(t),r=await t.loadProjectSettings(),n=r?.fields?Object.keys(r.fields):[],i=r?.availableTags||[],o=e.split(/[/\\]/).pop()||"config.json",s=await a.loadAllDocs(e),l=s.associativeArrays||[],c=await t.loadConfigFile(e),d=`# ${o}
1112
1096
 
1113
1097
  `;d+=`**ファイルパス:** \`${e}\`
1114
1098
 
@@ -1116,9 +1100,9 @@ ${w(a)}
1116
1100
 
1117
1101
  ---
1118
1102
 
1119
- `;let p=k.getAllPropertyPaths(c);if(0===p.length)d+="*プロパティがありません。*\n\n";else{for(let e of(d+="| プロパティ名 | タグ | 値 |",n.forEach(e=>{d+=` ${e} |`}),d+="\n|-------------|------|-----|",n.forEach(()=>{d+="------|"}),d+="\n",p)){let t=(0,$.findAndMergeDocumentation)(e,s.properties,l,c),a=x(e),r=t&&t.tags&&t.tags.length>0?A(t.tags,i):[],o=r.length>0?x(r.map(e=>`\`${e}\``).join(", ")):"-",p=x(this.getPropertyValue(c,e));d+=`| ${a} | ${o} | ${p} |`,n.forEach(e=>{let a=t&&t.fields&&t.fields[e]||"-";d+=` ${x(a)} |`}),d+="\n"}d+="\n"}return d+=`
1103
+ `;let p=C.getAllPropertyPaths(c);if(0===p.length)d+="*プロパティがありません。*\n\n";else{for(let e of(d+="| プロパティ名 | タグ | 値 |",n.forEach(e=>{d+=` ${e} |`}),d+="\n|-------------|------|-----|",n.forEach(()=>{d+="------|"}),d+="\n",p)){let t=(0,$.findAndMergeDocumentation)(e,s.properties,l,c),a=v(e),r=t&&t.tags&&t.tags.length>0?A(t.tags,i):[],o=r.length>0?v(r.map(e=>`\`${e}\``).join(", ")):"-",p=v(this.getPropertyValue(c,e));d+=`| ${a} | ${o} | ${p} |`,n.forEach(e=>{let a=t&&t.fields&&t.fields[e]||"-";d+=` ${v(a)} |`}),d+="\n"}d+="\n"}return d+=`
1120
1104
  *このドキュメントは ConfigDoc により自動生成されました。*
1121
- `}async generateMarkdownTable(){let e=new P.FileSystemService(this.rootPath),t=new v.StorageService(e),a=await e.loadProjectSettings();if(!a||0===a.configFiles.length)return"# 設定ファイルドキュメント\n\nドキュメント化された設定ファイルがありません。\n";let r=a.fields?Object.keys(a.fields):[],n=a.availableTags||[],i="# 設定ファイルドキュメント\n\n";for(let o of(i+=`プロジェクト: **${a.projectName}**
1105
+ `}async generateMarkdownTable(){let e=new P.FileSystemService(this.rootPath),t=new x.StorageService(e),a=await e.loadProjectSettings();if(!a||0===a.configFiles.length)return"# 設定ファイルドキュメント\n\nドキュメント化された設定ファイルがありません。\n";let r=a.fields?Object.keys(a.fields):[],n=a.availableTags||[],i="# 設定ファイルドキュメント\n\n";for(let o of(i+=`プロジェクト: **${a.projectName}**
1122
1106
 
1123
1107
  最終更新: ${new Date().toLocaleString("ja-JP")}
1124
1108
 
@@ -1128,8 +1112,8 @@ ${w(a)}
1128
1112
 
1129
1113
  **ファイルパス:** \`${o}\`
1130
1114
 
1131
- `;let c=k.getAllPropertyPaths(l);if(0===c.length){i+="*プロパティがありません。*\n\n";continue}i+="| プロパティ名 | タグ | 値 |",r.forEach(e=>{i+=` ${e} |`}),i+="\n|-------------|------|-----|",r.forEach(()=>{i+="------|"}),i+="\n";let d=s.associativeArrays||[];for(let e of c){let t=(0,$.findAndMergeDocumentation)(e,s.properties,d,l),a=x(e),o=t&&t.tags&&t.tags.length>0?A(t.tags,n):[],c=o.length>0?x(o.map(e=>`\`${e}\``).join(", ")):"-",p=x(this.getPropertyValue(l,e));i+=`| ${a} | ${c} | ${p} |`,r.forEach(e=>{let a=t&&t.fields&&t.fields[e]||"-";i+=` ${x(a)} |`}),i+="\n"}i+="\n"}return i+=`
1115
+ `;let c=C.getAllPropertyPaths(l);if(0===c.length){i+="*プロパティがありません。*\n\n";continue}i+="| プロパティ名 | タグ | 値 |",r.forEach(e=>{i+=` ${e} |`}),i+="\n|-------------|------|-----|",r.forEach(()=>{i+="------|"}),i+="\n";let d=s.associativeArrays||[];for(let e of c){let t=(0,$.findAndMergeDocumentation)(e,s.properties,d,l),a=v(e),o=t&&t.tags&&t.tags.length>0?A(t.tags,n):[],c=o.length>0?v(o.map(e=>`\`${e}\``).join(", ")):"-",p=v(this.getPropertyValue(l,e));i+=`| ${a} | ${c} | ${p} |`,r.forEach(e=>{let a=t&&t.fields&&t.fields[e]||"-";i+=` ${v(a)} |`}),i+="\n"}i+="\n"}return i+=`
1132
1116
  *このドキュメントは ConfigDoc により自動生成されました。*
1133
- `}getPropertyValue(e,t){var a=D(e,t);if(null==a)return"-";let r=typeof a,n=Array.isArray(a);return n?a.length>0&&a.every(e=>"object"!=typeof e||null===e)?JSON.stringify(a):"-":"object"!==r||n?String(a):"-"}}var T=e.i(10720),O=e.i(14747),I=e.i(24868);async function F(e){try{let t,a=(0,T.getRootPath)();try{t=await e.json()}catch{t={}}let{format:r="html"}=t,n=t.fileName?.trim()||"config-doc",i=t.outputDir?.trim()||"",o=new P.FileSystemService(a);await o.ensureConfigDocDir();let s=i?O.default.join(a,i):a;if(await I.default.mkdir(s,{recursive:!0}),"markdown"===r){let e=await o.loadProjectSettings();if(!e||0===e.configFiles.length)return b.NextResponse.json({success:!1,error:"ドキュメント化された設定ファイルがありません"},{status:400});let t=new S(a),r=[];for(let a of e.configFiles){let e=(a.split(/[/\\]/).pop()||"config.json").replace(/\.json$/i,".md"),n=O.default.join(s,e),i=await t.generateMarkdownForFile(a);await I.default.writeFile(n,i,"utf-8"),r.push(n)}return b.NextResponse.json({success:!0,message:`Markdownファイルを${r.length}件生成しました`,outputPaths:r})}if("markdown-table"===r){let e=await o.loadProjectSettings();if(!e||0===e.configFiles.length)return b.NextResponse.json({success:!1,error:"ドキュメント化された設定ファイルがありません"},{status:400});let t=new E(a),r=[];for(let a of e.configFiles){let e=(a.split(/[/\\]/).pop()||"config.json").replace(/\.json$/i,".md"),n=O.default.join(s,e),i=await t.generateMarkdownTableForFile(a);await I.default.writeFile(n,i,"utf-8"),r.push(n)}return b.NextResponse.json({success:!0,message:`Markdownテーブルファイルを${r.length}件生成しました`,outputPaths:r})}let l=new j(a),c=await l.generateHtml(),d=`${n}.html`,p=O.default.join(s,d);return await I.default.writeFile(p,c,"utf-8"),b.NextResponse.json({success:!0,message:"HTMLファイルを生成しました",outputPath:p})}catch(e){return console.error("API Error:",e),b.NextResponse.json({success:!1,error:e instanceof Error?e.message:"Unknown error"},{status:500})}}e.s(["POST",()=>F],49588);var N=e.i(49588);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/export/route",pathname:"/api/export",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/export/route.ts",nextConfigOutput:"standalone",userland:N}),{workAsyncStorage:M,workUnitAsyncStorage:H,serverHooks:z}=R;function L(){return(0,r.patchFetch)({workAsyncStorage:M,workUnitAsyncStorage:H})}async function B(e,t,r){R.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/export/route";b=b.replace(/\/index$/,"")||"/";let P=await R.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!P)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:v,params:x,nextConfig:w,parsedUrl:C,isDraftMode:D,prerenderManifest:j,routerServerContext:k,isOnDemandRevalidate:A,revalidateOnlyGenerated:$,resolvedPathname:S,clientReferenceManifest:E,serverActionsManifest:T}=P,O=(0,s.normalizeAppPath)(b),I=!!(j.dynamicRoutes[O]||j.routes[S]),F=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,C,!1):t.end("This page could not be found"),null);if(I&&!D){let e=!!j.routes[S],t=j.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(w.experimental.adapterPath)return await F();throw new m.NoFallbackError}}let N=null;!I||R.isDev||D||(N="/index"===(N=S)?"/":N);let M=!0===R.isDev||!I,H=I&&!M;T&&E&&(0,o.setManifestsSingleton)({page:b,clientReferenceManifest:E,serverActionsManifest:T});let z=e.method||"GET",L=(0,i.getTracer)(),B=L.getActiveScopeSpan(),q={params:x,prerenderManifest:j,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:M,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:w.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>R.onRequestError(e,t,r,n,k)},sharedContext:{buildId:v}},U=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),_=c.NextRequestAdapter.fromNodeNextRequest(U,(0,c.signalFromNodeResponse)(t));try{let o=async e=>R.handle(_,q).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=L.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${z} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${z} ${b}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var i,l;let c=async({previousCacheEntry:a})=>{try{if(!s&&A&&$&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(n);e.fetchMetrics=q.renderOpts.fetchMetrics;let l=q.renderOpts.pendingWaitUntil;l&&r.waitUntil&&(r.waitUntil(l),l=void 0);let c=q.renderOpts.collectedTags;if(!I)return await (0,f.sendResponse)(U,K,i,q.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);c&&(t[g.NEXT_CACHE_TAGS_HEADER]=c),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==q.renderOpts.collectedRevalidate&&!(q.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&q.renderOpts.collectedRevalidate,r=void 0===q.renderOpts.collectedExpire||q.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:q.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:A})},!1,k),t}},d=await R.handleResponse({req:e,nextConfig:w,cacheKey:N,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:j,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:$,responseGenerator:c,waitUntil:r.waitUntil,isMinimalMode:s});if(!I)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",A?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),D&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&I||m.delete(g.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,u.getCacheControlHeader)(d.cacheControl)),await (0,f.sendResponse)(U,K,new Response(d.value.body,{headers:m,status:d.value.status||200})),null};B?await l(B):await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${z} ${b}`,kind:i.SpanKind.SERVER,attributes:{"http.method":z,"http.target":e.url}},l))}catch(t){if(t instanceof m.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:A})},!1,k),I)throw t;return await (0,f.sendResponse)(U,K,new Response(null,{status:500})),null}}e.s(["handler",()=>B,"patchFetch",()=>L,"routeModule",()=>R,"serverHooks",()=>z,"workAsyncStorage",()=>M,"workUnitAsyncStorage",()=>H],47482)}];
1117
+ `}getPropertyValue(e,t){var a=j(e,t);if(null==a)return"-";let r=typeof a,n=Array.isArray(a);return n?a.length>0&&a.every(e=>"object"!=typeof e||null===e)?JSON.stringify(a):"-":"object"!==r||n?String(a):"-"}}var O=e.i(10720),T=e.i(14747),N=e.i(24868);async function F(e){try{let t,a=(0,O.getRootPath)();try{t=await e.json()}catch{t={}}let{format:r="html"}=t,n=t.fileName?.trim()||"config-doc",i=t.outputDir?.trim()||"",o=new P.FileSystemService(a);await o.ensureConfigDocDir();let s=i?T.default.join(a,i):a;if(await N.default.mkdir(s,{recursive:!0}),"markdown"===r){let e=await o.loadProjectSettings();if(!e||0===e.configFiles.length)return b.NextResponse.json({success:!1,error:"ドキュメント化された設定ファイルがありません"},{status:400});let t=new S(a),r=[];for(let a of e.configFiles){let e=(a.split(/[/\\]/).pop()||"config.json").replace(/\.json$/i,".md"),n=T.default.join(s,e),i=await t.generateMarkdownForFile(a);await N.default.writeFile(n,i,"utf-8"),r.push(n)}return b.NextResponse.json({success:!0,message:`Markdownファイルを${r.length}件生成しました`,outputPaths:r})}if("markdown-table"===r){let e=await o.loadProjectSettings();if(!e||0===e.configFiles.length)return b.NextResponse.json({success:!1,error:"ドキュメント化された設定ファイルがありません"},{status:400});let t=new E(a),r=[];for(let a of e.configFiles){let e=(a.split(/[/\\]/).pop()||"config.json").replace(/\.json$/i,".md"),n=T.default.join(s,e),i=await t.generateMarkdownTableForFile(a);await N.default.writeFile(n,i,"utf-8"),r.push(n)}return b.NextResponse.json({success:!0,message:`Markdownテーブルファイルを${r.length}件生成しました`,outputPaths:r})}let l=new k(a),c=await l.generateHtml(),d=`${n}.html`,p=T.default.join(s,d);return await N.default.writeFile(p,c,"utf-8"),b.NextResponse.json({success:!0,message:"HTMLファイルを生成しました",outputPath:p})}catch(e){return console.error("API Error:",e),b.NextResponse.json({success:!1,error:e instanceof Error?e.message:"Unknown error"},{status:500})}}e.s(["POST",()=>F],49588);var I=e.i(49588);let R=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/export/route",pathname:"/api/export",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/export/route.ts",nextConfigOutput:"standalone",userland:I}),{workAsyncStorage:M,workUnitAsyncStorage:H,serverHooks:z}=R;function L(){return(0,r.patchFetch)({workAsyncStorage:M,workUnitAsyncStorage:H})}async function B(e,t,r){R.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let b="/api/export/route";b=b.replace(/\/index$/,"")||"/";let P=await R.prepare(e,t,{srcPage:b,multiZoneDraftMode:!1});if(!P)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,params:v,nextConfig:w,parsedUrl:D,isDraftMode:j,prerenderManifest:k,routerServerContext:C,isOnDemandRevalidate:A,revalidateOnlyGenerated:$,resolvedPathname:S,clientReferenceManifest:E,serverActionsManifest:O}=P,T=(0,s.normalizeAppPath)(b),N=!!(k.dynamicRoutes[T]||k.routes[S]),F=async()=>((null==C?void 0:C.render404)?await C.render404(e,t,D,!1):t.end("This page could not be found"),null);if(N&&!j){let e=!!k.routes[S],t=k.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(w.experimental.adapterPath)return await F();throw new m.NoFallbackError}}let I=null;!N||R.isDev||j||(I="/index"===(I=S)?"/":I);let M=!0===R.isDev||!N,H=N&&!M;O&&E&&(0,o.setManifestsSingleton)({page:b,clientReferenceManifest:E,serverActionsManifest:O});let z=e.method||"GET",L=(0,i.getTracer)(),B=L.getActiveScopeSpan(),U={params:v,prerenderManifest:k,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:M,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:w.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>R.onRequestError(e,t,r,n,C)},sharedContext:{buildId:x}},q=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),_=c.NextRequestAdapter.fromNodeNextRequest(q,(0,c.signalFromNodeResponse)(t));try{let o=async e=>R.handle(_,U).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=L.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${z} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${z} ${b}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var i,l;let c=async({previousCacheEntry:a})=>{try{if(!s&&A&&$&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(n);e.fetchMetrics=U.renderOpts.fetchMetrics;let l=U.renderOpts.pendingWaitUntil;l&&r.waitUntil&&(r.waitUntil(l),l=void 0);let c=U.renderOpts.collectedTags;if(!N)return await (0,f.sendResponse)(q,K,i,U.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);c&&(t[g.NEXT_CACHE_TAGS_HEADER]=c),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,r=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:A})},!1,C),t}},d=await R.handleResponse({req:e,nextConfig:w,cacheKey:I,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:k,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:$,responseGenerator:c,waitUntil:r.waitUntil,isMinimalMode:s});if(!N)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",A?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),j&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&N||m.delete(g.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,u.getCacheControlHeader)(d.cacheControl)),await (0,f.sendResponse)(q,K,new Response(d.value.body,{headers:m,status:d.value.status||200})),null};B?await l(B):await L.withPropagatedContext(e.headers,()=>L.trace(d.BaseServerSpan.handleRequest,{spanName:`${z} ${b}`,kind:i.SpanKind.SERVER,attributes:{"http.method":z,"http.target":e.url}},l))}catch(t){if(t instanceof m.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:A})},!1,C),N)throw t;return await (0,f.sendResponse)(q,K,new Response(null,{status:500})),null}}e.s(["handler",()=>B,"patchFetch",()=>L,"routeModule",()=>R,"serverHooks",()=>z,"workAsyncStorage",()=>M,"workUnitAsyncStorage",()=>H],47482)}];
1134
1118
 
1135
1119
  //# sourceMappingURL=node_modules_next_dist_esm_build_templates_app-route_d09de205.js.map