@interactive-inc/docs-client 0.0.5 → 0.0.7

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.
Files changed (264) hide show
  1. package/README.md +3 -3
  2. package/build/index.d.ts +1921 -42
  3. package/build/index.js +4616 -39
  4. package/build/models.d.ts +34 -32
  5. package/build/models.js +219 -275
  6. package/package.json +4 -4
  7. package/tsup.config.ts +10 -0
  8. package/build/doc-client.d.ts +0 -59
  9. package/build/doc-client.d.ts.map +0 -1
  10. package/build/doc-client.js +0 -95
  11. package/build/doc-client.test.d.ts +0 -2
  12. package/build/doc-client.test.d.ts.map +0 -1
  13. package/build/doc-client.test.js +0 -38
  14. package/build/doc-directory-reference.d.ts +0 -65
  15. package/build/doc-directory-reference.d.ts.map +0 -1
  16. package/build/doc-directory-reference.js +0 -292
  17. package/build/doc-directory-reference.test.d.ts +0 -2
  18. package/build/doc-directory-reference.test.d.ts.map +0 -1
  19. package/build/doc-directory-reference.test.js +0 -100
  20. package/build/doc-file-index-reference.d.ts +0 -72
  21. package/build/doc-file-index-reference.d.ts.map +0 -1
  22. package/build/doc-file-index-reference.js +0 -191
  23. package/build/doc-file-index-reference.test.d.ts +0 -2
  24. package/build/doc-file-index-reference.test.d.ts.map +0 -1
  25. package/build/doc-file-index-reference.test.js +0 -77
  26. package/build/doc-file-md-reference.d.ts +0 -97
  27. package/build/doc-file-md-reference.d.ts.map +0 -1
  28. package/build/doc-file-md-reference.js +0 -297
  29. package/build/doc-file-md-reference.test.d.ts +0 -2
  30. package/build/doc-file-md-reference.test.d.ts.map +0 -1
  31. package/build/doc-file-md-reference.test.js +0 -465
  32. package/build/doc-file-relation-reference.d.ts +0 -54
  33. package/build/doc-file-relation-reference.d.ts.map +0 -1
  34. package/build/doc-file-relation-reference.js +0 -109
  35. package/build/doc-file-system-debug.d.ts +0 -81
  36. package/build/doc-file-system-debug.d.ts.map +0 -1
  37. package/build/doc-file-system-debug.js +0 -317
  38. package/build/doc-file-system.d.ts +0 -100
  39. package/build/doc-file-system.d.ts.map +0 -1
  40. package/build/doc-file-system.js +0 -210
  41. package/build/doc-file-tree-system.d.ts +0 -38
  42. package/build/doc-file-tree-system.d.ts.map +0 -1
  43. package/build/doc-file-tree-system.js +0 -153
  44. package/build/doc-file-tree-system.test.d.ts +0 -2
  45. package/build/doc-file-tree-system.test.d.ts.map +0 -1
  46. package/build/doc-file-tree-system.test.js +0 -105
  47. package/build/doc-file-unknown-reference.d.ts +0 -80
  48. package/build/doc-file-unknown-reference.d.ts.map +0 -1
  49. package/build/doc-file-unknown-reference.js +0 -181
  50. package/build/doc-file-unknown-reference.test.d.ts +0 -2
  51. package/build/doc-file-unknown-reference.test.d.ts.map +0 -1
  52. package/build/doc-file-unknown-reference.test.js +0 -73
  53. package/build/doc-markdown-system.d.ts +0 -44
  54. package/build/doc-markdown-system.d.ts.map +0 -1
  55. package/build/doc-markdown-system.js +0 -153
  56. package/build/doc-markdown-system.test.d.ts +0 -2
  57. package/build/doc-markdown-system.test.d.ts.map +0 -1
  58. package/build/doc-markdown-system.test.js +0 -124
  59. package/build/doc-path-system.d.ts +0 -43
  60. package/build/doc-path-system.d.ts.map +0 -1
  61. package/build/doc-path-system.js +0 -148
  62. package/build/doc-path-system.test.d.ts +0 -2
  63. package/build/doc-path-system.test.d.ts.map +0 -1
  64. package/build/doc-path-system.test.js +0 -67
  65. package/build/entities/doc-file-entity.d.ts +0 -5
  66. package/build/entities/doc-file-entity.d.ts.map +0 -1
  67. package/build/entities/doc-file-entity.js +0 -1
  68. package/build/entities/doc-file-index-entity.d.ts +0 -30
  69. package/build/entities/doc-file-index-entity.d.ts.map +0 -1
  70. package/build/entities/doc-file-index-entity.js +0 -49
  71. package/build/entities/doc-file-index-entity.test.d.ts +0 -2
  72. package/build/entities/doc-file-index-entity.test.d.ts.map +0 -1
  73. package/build/entities/doc-file-index-entity.test.js +0 -195
  74. package/build/entities/doc-file-md-entity.d.ts +0 -30
  75. package/build/entities/doc-file-md-entity.d.ts.map +0 -1
  76. package/build/entities/doc-file-md-entity.js +0 -49
  77. package/build/entities/doc-file-md-entity.test.d.ts +0 -2
  78. package/build/entities/doc-file-md-entity.test.d.ts.map +0 -1
  79. package/build/entities/doc-file-md-entity.test.js +0 -178
  80. package/build/entities/doc-file-unknown-entity.d.ts +0 -26
  81. package/build/entities/doc-file-unknown-entity.d.ts.map +0 -1
  82. package/build/entities/doc-file-unknown-entity.js +0 -45
  83. package/build/entities/doc-file-unknown-entity.test.d.ts +0 -2
  84. package/build/entities/doc-file-unknown-entity.test.d.ts.map +0 -1
  85. package/build/entities/doc-file-unknown-entity.test.js +0 -131
  86. package/build/index.d.ts.map +0 -1
  87. package/build/models.d.ts.map +0 -1
  88. package/build/types.d.ts +0 -154
  89. package/build/types.d.ts.map +0 -1
  90. package/build/types.js +0 -1
  91. package/build/values/doc-content-md-front-matter-value.d.ts +0 -49
  92. package/build/values/doc-content-md-front-matter-value.d.ts.map +0 -1
  93. package/build/values/doc-content-md-front-matter-value.js +0 -94
  94. package/build/values/doc-content-md-front-matter-value.test.d.ts +0 -2
  95. package/build/values/doc-content-md-front-matter-value.test.d.ts.map +0 -1
  96. package/build/values/doc-content-md-front-matter-value.test.js +0 -73
  97. package/build/values/doc-content-md-value.d.ts +0 -66
  98. package/build/values/doc-content-md-value.d.ts.map +0 -1
  99. package/build/values/doc-content-md-value.js +0 -218
  100. package/build/values/doc-content-md-value.test.d.ts +0 -2
  101. package/build/values/doc-content-md-value.test.d.ts.map +0 -1
  102. package/build/values/doc-content-md-value.test.js +0 -179
  103. package/build/values/doc-directory-path-value.d.ts +0 -89
  104. package/build/values/doc-directory-path-value.d.ts.map +0 -1
  105. package/build/values/doc-directory-path-value.js +0 -145
  106. package/build/values/doc-directory-path-value.test.d.ts +0 -2
  107. package/build/values/doc-directory-path-value.test.d.ts.map +0 -1
  108. package/build/values/doc-directory-path-value.test.js +0 -68
  109. package/build/values/doc-file-content-index-value.d.ts +0 -62
  110. package/build/values/doc-file-content-index-value.d.ts.map +0 -1
  111. package/build/values/doc-file-content-index-value.js +0 -134
  112. package/build/values/doc-file-content-index-value.test.d.ts +0 -2
  113. package/build/values/doc-file-content-index-value.test.d.ts.map +0 -1
  114. package/build/values/doc-file-content-index-value.test.js +0 -203
  115. package/build/values/doc-file-content-md-value.d.ts +0 -62
  116. package/build/values/doc-file-content-md-value.d.ts.map +0 -1
  117. package/build/values/doc-file-content-md-value.js +0 -139
  118. package/build/values/doc-file-content-md-value.test.d.ts +0 -2
  119. package/build/values/doc-file-content-md-value.test.d.ts.map +0 -1
  120. package/build/values/doc-file-content-md-value.test.js +0 -160
  121. package/build/values/doc-file-path-value.d.ts +0 -47
  122. package/build/values/doc-file-path-value.d.ts.map +0 -1
  123. package/build/values/doc-file-path-value.js +0 -83
  124. package/build/values/doc-file-path-value.test.d.ts +0 -2
  125. package/build/values/doc-file-path-value.test.d.ts.map +0 -1
  126. package/build/values/doc-file-path-value.test.js +0 -84
  127. package/build/values/doc-front-matter-index-value.d.ts +0 -66
  128. package/build/values/doc-front-matter-index-value.d.ts.map +0 -1
  129. package/build/values/doc-front-matter-index-value.js +0 -185
  130. package/build/values/doc-front-matter-index-value.test.d.ts +0 -2
  131. package/build/values/doc-front-matter-index-value.test.d.ts.map +0 -1
  132. package/build/values/doc-front-matter-index-value.test.js +0 -98
  133. package/build/values/doc-front-matter-md-value-accessor.test.d.ts +0 -2
  134. package/build/values/doc-front-matter-md-value-accessor.test.d.ts.map +0 -1
  135. package/build/values/doc-front-matter-md-value-accessor.test.js +0 -226
  136. package/build/values/doc-front-matter-md-value.d.ts +0 -80
  137. package/build/values/doc-front-matter-md-value.d.ts.map +0 -1
  138. package/build/values/doc-front-matter-md-value.js +0 -257
  139. package/build/values/doc-front-matter-md-value.test.d.ts +0 -2
  140. package/build/values/doc-front-matter-md-value.test.d.ts.map +0 -1
  141. package/build/values/doc-front-matter-md-value.test.js +0 -198
  142. package/build/values/doc-relation-field-value.d.ts +0 -57
  143. package/build/values/doc-relation-field-value.d.ts.map +0 -1
  144. package/build/values/doc-relation-field-value.js +0 -85
  145. package/build/values/doc-relation-field-value.test.d.ts +0 -2
  146. package/build/values/doc-relation-field-value.test.d.ts.map +0 -1
  147. package/build/values/doc-relation-field-value.test.js +0 -115
  148. package/build/values/doc-relation-file-value.d.ts +0 -33
  149. package/build/values/doc-relation-file-value.d.ts.map +0 -1
  150. package/build/values/doc-relation-file-value.js +0 -55
  151. package/build/values/doc-relation-file-value.test.d.ts +0 -2
  152. package/build/values/doc-relation-file-value.test.d.ts.map +0 -1
  153. package/build/values/doc-relation-file-value.test.js +0 -77
  154. package/build/values/doc-relation-value.d.ts +0 -34
  155. package/build/values/doc-relation-value.d.ts.map +0 -1
  156. package/build/values/doc-relation-value.js +0 -56
  157. package/build/values/doc-relation-value.test.d.ts +0 -2
  158. package/build/values/doc-relation-value.test.d.ts.map +0 -1
  159. package/build/values/doc-relation-value.test.js +0 -89
  160. package/build/values/doc-schema-field-boolean-multiple-value.d.ts +0 -23
  161. package/build/values/doc-schema-field-boolean-multiple-value.d.ts.map +0 -1
  162. package/build/values/doc-schema-field-boolean-multiple-value.js +0 -43
  163. package/build/values/doc-schema-field-boolean-multiple-value.test.d.ts +0 -2
  164. package/build/values/doc-schema-field-boolean-multiple-value.test.d.ts.map +0 -1
  165. package/build/values/doc-schema-field-boolean-multiple-value.test.js +0 -76
  166. package/build/values/doc-schema-field-boolean-single-value.d.ts +0 -23
  167. package/build/values/doc-schema-field-boolean-single-value.d.ts.map +0 -1
  168. package/build/values/doc-schema-field-boolean-single-value.js +0 -39
  169. package/build/values/doc-schema-field-boolean-single-value.test.d.ts +0 -2
  170. package/build/values/doc-schema-field-boolean-single-value.test.d.ts.map +0 -1
  171. package/build/values/doc-schema-field-boolean-single-value.test.js +0 -73
  172. package/build/values/doc-schema-field-factory.d.ts +0 -37
  173. package/build/values/doc-schema-field-factory.d.ts.map +0 -1
  174. package/build/values/doc-schema-field-factory.js +0 -151
  175. package/build/values/doc-schema-field-factory.test.d.ts +0 -2
  176. package/build/values/doc-schema-field-factory.test.d.ts.map +0 -1
  177. package/build/values/doc-schema-field-factory.test.js +0 -215
  178. package/build/values/doc-schema-field-number-multiple-value.d.ts +0 -23
  179. package/build/values/doc-schema-field-number-multiple-value.d.ts.map +0 -1
  180. package/build/values/doc-schema-field-number-multiple-value.js +0 -43
  181. package/build/values/doc-schema-field-number-multiple-value.test.d.ts +0 -2
  182. package/build/values/doc-schema-field-number-multiple-value.test.d.ts.map +0 -1
  183. package/build/values/doc-schema-field-number-multiple-value.test.js +0 -79
  184. package/build/values/doc-schema-field-number-single-value.d.ts +0 -23
  185. package/build/values/doc-schema-field-number-single-value.d.ts.map +0 -1
  186. package/build/values/doc-schema-field-number-single-value.js +0 -39
  187. package/build/values/doc-schema-field-number-single-value.test.d.ts +0 -2
  188. package/build/values/doc-schema-field-number-single-value.test.d.ts.map +0 -1
  189. package/build/values/doc-schema-field-number-single-value.test.js +0 -77
  190. package/build/values/doc-schema-field-relation-multiple-value.d.ts +0 -24
  191. package/build/values/doc-schema-field-relation-multiple-value.d.ts.map +0 -1
  192. package/build/values/doc-schema-field-relation-multiple-value.js +0 -46
  193. package/build/values/doc-schema-field-relation-multiple-value.test.d.ts +0 -2
  194. package/build/values/doc-schema-field-relation-multiple-value.test.d.ts.map +0 -1
  195. package/build/values/doc-schema-field-relation-multiple-value.test.js +0 -83
  196. package/build/values/doc-schema-field-relation-single-value.d.ts +0 -24
  197. package/build/values/doc-schema-field-relation-single-value.d.ts.map +0 -1
  198. package/build/values/doc-schema-field-relation-single-value.js +0 -42
  199. package/build/values/doc-schema-field-relation-single-value.test.d.ts +0 -2
  200. package/build/values/doc-schema-field-relation-single-value.test.d.ts.map +0 -1
  201. package/build/values/doc-schema-field-relation-single-value.test.js +0 -83
  202. package/build/values/doc-schema-field-select-number-multiple-value.d.ts +0 -25
  203. package/build/values/doc-schema-field-select-number-multiple-value.d.ts.map +0 -1
  204. package/build/values/doc-schema-field-select-number-multiple-value.js +0 -48
  205. package/build/values/doc-schema-field-select-number-multiple-value.test.d.ts +0 -2
  206. package/build/values/doc-schema-field-select-number-multiple-value.test.d.ts.map +0 -1
  207. package/build/values/doc-schema-field-select-number-multiple-value.test.js +0 -84
  208. package/build/values/doc-schema-field-select-number-single-value.d.ts +0 -25
  209. package/build/values/doc-schema-field-select-number-single-value.d.ts.map +0 -1
  210. package/build/values/doc-schema-field-select-number-single-value.js +0 -45
  211. package/build/values/doc-schema-field-select-number-single-value.test.d.ts +0 -2
  212. package/build/values/doc-schema-field-select-number-single-value.test.d.ts.map +0 -1
  213. package/build/values/doc-schema-field-select-number-single-value.test.js +0 -96
  214. package/build/values/doc-schema-field-select-text-multiple-value.d.ts +0 -25
  215. package/build/values/doc-schema-field-select-text-multiple-value.d.ts.map +0 -1
  216. package/build/values/doc-schema-field-select-text-multiple-value.js +0 -48
  217. package/build/values/doc-schema-field-select-text-multiple-value.test.d.ts +0 -2
  218. package/build/values/doc-schema-field-select-text-multiple-value.test.d.ts.map +0 -1
  219. package/build/values/doc-schema-field-select-text-multiple-value.test.js +0 -84
  220. package/build/values/doc-schema-field-select-text-single-value.d.ts +0 -25
  221. package/build/values/doc-schema-field-select-text-single-value.d.ts.map +0 -1
  222. package/build/values/doc-schema-field-select-text-single-value.js +0 -47
  223. package/build/values/doc-schema-field-select-text-single-value.test.d.ts +0 -2
  224. package/build/values/doc-schema-field-select-text-single-value.test.d.ts.map +0 -1
  225. package/build/values/doc-schema-field-select-text-single-value.test.js +0 -96
  226. package/build/values/doc-schema-field-text-multiple-value.d.ts +0 -23
  227. package/build/values/doc-schema-field-text-multiple-value.d.ts.map +0 -1
  228. package/build/values/doc-schema-field-text-multiple-value.js +0 -43
  229. package/build/values/doc-schema-field-text-multiple-value.test.d.ts +0 -2
  230. package/build/values/doc-schema-field-text-multiple-value.test.d.ts.map +0 -1
  231. package/build/values/doc-schema-field-text-multiple-value.test.js +0 -78
  232. package/build/values/doc-schema-field-text-single-value.d.ts +0 -23
  233. package/build/values/doc-schema-field-text-single-value.d.ts.map +0 -1
  234. package/build/values/doc-schema-field-text-single-value.js +0 -39
  235. package/build/values/doc-schema-field-text-single-value.test.d.ts +0 -2
  236. package/build/values/doc-schema-field-text-single-value.test.d.ts.map +0 -1
  237. package/build/values/doc-schema-field-text-single-value.test.js +0 -76
  238. package/build/values/doc-schema-field-type-value.d.ts +0 -61
  239. package/build/values/doc-schema-field-type-value.d.ts.map +0 -1
  240. package/build/values/doc-schema-field-type-value.js +0 -134
  241. package/build/values/doc-schema-field-type-value.test.d.ts +0 -2
  242. package/build/values/doc-schema-field-type-value.test.d.ts.map +0 -1
  243. package/build/values/doc-schema-field-type-value.test.js +0 -101
  244. package/build/values/doc-schema-field-value.d.ts +0 -45
  245. package/build/values/doc-schema-field-value.d.ts.map +0 -1
  246. package/build/values/doc-schema-field-value.js +0 -1
  247. package/build/values/doc-schema-value.d.ts +0 -99
  248. package/build/values/doc-schema-value.d.ts.map +0 -1
  249. package/build/values/doc-schema-value.js +0 -269
  250. package/build/values/doc-schema-value.test.d.ts +0 -2
  251. package/build/values/doc-schema-value.test.d.ts.map +0 -1
  252. package/build/values/doc-schema-value.test.js +0 -301
  253. package/build/values/doc-tree-directory-node-value.d.ts +0 -36
  254. package/build/values/doc-tree-directory-node-value.d.ts.map +0 -1
  255. package/build/values/doc-tree-directory-node-value.js +0 -71
  256. package/build/values/doc-tree-directory-node-value.test.d.ts +0 -2
  257. package/build/values/doc-tree-directory-node-value.test.d.ts.map +0 -1
  258. package/build/values/doc-tree-directory-node-value.test.js +0 -162
  259. package/build/values/doc-tree-file-node-value.d.ts +0 -33
  260. package/build/values/doc-tree-file-node-value.d.ts.map +0 -1
  261. package/build/values/doc-tree-file-node-value.js +0 -56
  262. package/build/values/doc-tree-file-node-value.test.d.ts +0 -2
  263. package/build/values/doc-tree-file-node-value.test.d.ts.map +0 -1
  264. package/build/values/doc-tree-file-node-value.test.js +0 -113
@@ -1,81 +0,0 @@
1
- import { DocFileSystem } from "./doc-file-system";
2
- import { DocPathSystem } from "./doc-path-system";
3
- /**
4
- * テスト用のインメモリファイルシステム
5
- */
6
- export declare class DocFileSystemDebug extends DocFileSystem {
7
- private files;
8
- private readonly _pathSystem;
9
- constructor(props: {
10
- basePath: string;
11
- pathSystem: DocPathSystem;
12
- });
13
- /**
14
- * PathSystemへのアクセサ(テスト用)
15
- */
16
- getPathSystem(): DocPathSystem;
17
- /**
18
- * テスト用のファクトリメソッド
19
- */
20
- static createWithFiles(props: {
21
- basePath?: string;
22
- fileContents?: Record<string, string>;
23
- }): DocFileSystemDebug;
24
- readFile(filePath: string): Promise<string | null>;
25
- writeFile(filePath: string, content: string): Promise<void>;
26
- deleteFile(filePath: string): Promise<Error | null>;
27
- exists(filePath: string): Promise<boolean>;
28
- copyFile(source: string, destination: string): Promise<void>;
29
- moveFile(source: string, destination: string): Promise<void>;
30
- readDirectory(directoryPath: string): Promise<string[]>;
31
- readDirectoryRecursive(directoryPath: string): Promise<string[]>;
32
- readDirectoryFilePaths(directoryPath: string): Promise<string[]>;
33
- createDirectory(_directoryPath: string): Promise<void>;
34
- deleteDirectory(directoryPath: string): Promise<void>;
35
- getFileSize(filePath: string): Promise<number>;
36
- getFileModifiedTime(filePath: string): Promise<Date>;
37
- getFileCreatedTime(filePath: string): Promise<Date>;
38
- isDirectory(relativePath: string): Promise<boolean>;
39
- isFile(relativePath: string): Promise<boolean>;
40
- /**
41
- * ディレクトリ内のエントリ一覧を取得
42
- */
43
- readDirectoryFileNames(directoryPath?: string): Promise<string[]>;
44
- /**
45
- * ディレクトリが存在するかチェック
46
- */
47
- directoryExists(relativePath: string): Promise<boolean>;
48
- /**
49
- * ファイルが存在するかチェック
50
- */
51
- fileExists(relativePath: string): Promise<boolean>;
52
- /**
53
- * ディレクトリが存在しない場合は作成する
54
- */
55
- ensureDirectoryExists(_relativePath: string): Promise<void>;
56
- /**
57
- * すべてのファイルをクリア
58
- */
59
- clear(): void;
60
- /**
61
- * ファイルの存在を確認(テスト用)
62
- */
63
- hasFile(filePath: string): boolean;
64
- /**
65
- * ファイルの内容を取得(同期版、テスト用)
66
- */
67
- getFileContent(filePath: string): string | undefined;
68
- /**
69
- * すべてのファイルパスを取得(テスト用)
70
- */
71
- getAllFilePaths(): string[];
72
- /**
73
- * ファイル数を取得(テスト用)
74
- */
75
- getFileCount(): number;
76
- /**
77
- * テストデータをセットアップ
78
- */
79
- setupTestFiles(files: Record<string, string>): void;
80
- }
81
- //# sourceMappingURL=doc-file-system-debug.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"doc-file-system-debug.d.ts","sourceRoot":"","sources":["../lib/doc-file-system-debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AASjD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,OAAO,CAAC,KAAK,CAAmC;IAChD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAe;IAE3C,YAAY,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,aAAa,CAAA;KAAE,EAIjE;IAED;;OAEG;IACH,aAAa,kBAEZ;IAED;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE;QAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACtC,GAAG,kBAAkB,CAkBrB;IAEc,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOhE;IAEc,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAazE;IAEc,UAAU,CAAC,QAAQ,EAAE,MAAM,yBAUzC;IAEc,MAAM,CAAC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MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEhE;IAED;;OAEG;IACY,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE;IAED;;OAEG;IACH,KAAK,IAAI,IAAI,CAEZ;IAED;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEjC;IAED;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEnD;IAED;;OAEG;IACH,eAAe,IAAI,MAAM,EAAE,CAE1B;IAED;;OAEG;IACH,YAAY,IAAI,MAAM,CAErB;IAED;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAUlD;CACF"}
@@ -1,317 +0,0 @@
1
- import { DocFileSystem } from "./doc-file-system";
2
- import { DocPathSystem } from "./doc-path-system";
3
- /**
4
- * テスト用のインメモリファイルシステム
5
- */
6
- export class DocFileSystemDebug extends DocFileSystem {
7
- files = new Map();
8
- _pathSystem;
9
- constructor(props) {
10
- super(props);
11
- this._pathSystem = props.pathSystem;
12
- Object.freeze(this);
13
- }
14
- /**
15
- * PathSystemへのアクセサ(テスト用)
16
- */
17
- getPathSystem() {
18
- return this._pathSystem;
19
- }
20
- /**
21
- * テスト用のファクトリメソッド
22
- */
23
- static createWithFiles(props) {
24
- const pathSystem = new DocPathSystem();
25
- const basePath = props.basePath ?? "/test";
26
- const fileSystem = new DocFileSystemDebug({ basePath, pathSystem });
27
- if (props.fileContents) {
28
- const now = new Date();
29
- for (const [path, content] of Object.entries(props.fileContents)) {
30
- fileSystem.files.set(path, {
31
- content,
32
- modifiedTime: now,
33
- createdTime: now,
34
- size: new TextEncoder().encode(content).length,
35
- });
36
- }
37
- }
38
- return fileSystem;
39
- }
40
- async readFile(filePath) {
41
- // Remove 'docs/' prefix if present
42
- const normalizedPath = filePath.startsWith("docs/")
43
- ? filePath
44
- : `docs/${filePath}`;
45
- const file = this.files.get(normalizedPath);
46
- return file ? file.content : null;
47
- }
48
- async writeFile(filePath, content) {
49
- const normalizedPath = filePath.startsWith("docs/")
50
- ? filePath
51
- : `docs/${filePath}`;
52
- const now = new Date();
53
- const existing = this.files.get(normalizedPath);
54
- this.files.set(normalizedPath, {
55
- content,
56
- modifiedTime: now,
57
- createdTime: existing?.createdTime ?? now,
58
- size: new TextEncoder().encode(content).length,
59
- });
60
- }
61
- async deleteFile(filePath) {
62
- const normalizedPath = filePath.startsWith("docs/")
63
- ? filePath
64
- : `docs/${filePath}`;
65
- try {
66
- this.files.delete(normalizedPath);
67
- return null;
68
- }
69
- catch (error) {
70
- return new Error(`Failed to delete file at ${filePath}: ${error}`);
71
- }
72
- }
73
- async exists(filePath) {
74
- // Normalize path
75
- const normalizedPath = filePath.startsWith("docs/")
76
- ? filePath
77
- : `docs/${filePath}`;
78
- // ファイルが存在するか確認
79
- if (this.files.has(normalizedPath)) {
80
- return true;
81
- }
82
- // ディレクトリとして存在するか確認
83
- const dirPath = normalizedPath.endsWith("/")
84
- ? normalizedPath
85
- : `${normalizedPath}/`;
86
- for (const path of this.files.keys()) {
87
- if (path.startsWith(dirPath)) {
88
- return true;
89
- }
90
- }
91
- return false;
92
- }
93
- async copyFile(source, destination) {
94
- const normalizedSource = source.startsWith("docs/")
95
- ? source
96
- : `docs/${source}`;
97
- const normalizedDest = destination.startsWith("docs/")
98
- ? destination
99
- : `docs/${destination}`;
100
- const file = this.files.get(normalizedSource);
101
- if (!file) {
102
- throw new Error(`Source file not found: ${normalizedSource}`);
103
- }
104
- this.files.set(normalizedDest, {
105
- ...file,
106
- createdTime: new Date(),
107
- });
108
- }
109
- async moveFile(source, destination) {
110
- const normalizedSource = source.startsWith("docs/")
111
- ? source
112
- : `docs/${source}`;
113
- const normalizedDest = destination.startsWith("docs/")
114
- ? destination
115
- : `docs/${destination}`;
116
- const file = this.files.get(normalizedSource);
117
- if (!file) {
118
- throw new Error(`Source file not found: ${normalizedSource}`);
119
- }
120
- this.files.set(normalizedDest, file);
121
- this.files.delete(normalizedSource);
122
- }
123
- async readDirectory(directoryPath) {
124
- const dirPath = directoryPath.endsWith("/")
125
- ? directoryPath
126
- : `${directoryPath}/`;
127
- const entries = new Set();
128
- for (const path of this.files.keys()) {
129
- if (path.startsWith(dirPath)) {
130
- const relativePath = path.slice(dirPath.length);
131
- const firstSegment = relativePath.split("/")[0];
132
- if (firstSegment) {
133
- entries.add(firstSegment);
134
- }
135
- }
136
- }
137
- return Array.from(entries).sort();
138
- }
139
- async readDirectoryRecursive(directoryPath) {
140
- const dirPath = directoryPath.endsWith("/")
141
- ? directoryPath
142
- : `${directoryPath}/`;
143
- const files = [];
144
- for (const path of this.files.keys()) {
145
- if (path.startsWith(dirPath)) {
146
- files.push(path);
147
- }
148
- }
149
- return files.sort();
150
- }
151
- async readDirectoryFilePaths(directoryPath) {
152
- const dirPath = directoryPath.endsWith("/")
153
- ? directoryPath
154
- : `${directoryPath}/`;
155
- const files = [];
156
- for (const path of this.files.keys()) {
157
- if (path.startsWith(dirPath) &&
158
- !path.slice(dirPath.length).includes("/")) {
159
- files.push(path);
160
- }
161
- }
162
- return files.sort();
163
- }
164
- async createDirectory(_directoryPath) {
165
- // インメモリファイルシステムではディレクトリの作成は不要
166
- // ファイルを作成する際に暗黙的にディレクトリが作成される
167
- }
168
- async deleteDirectory(directoryPath) {
169
- const dirPath = directoryPath.endsWith("/")
170
- ? directoryPath
171
- : `${directoryPath}/`;
172
- for (const path of this.files.keys()) {
173
- if (path.startsWith(dirPath)) {
174
- this.files.delete(path);
175
- }
176
- }
177
- }
178
- async getFileSize(filePath) {
179
- const normalizedPath = filePath.startsWith("docs/")
180
- ? filePath
181
- : `docs/${filePath}`;
182
- const file = this.files.get(normalizedPath);
183
- if (!file) {
184
- throw new Error(`File not found: ${normalizedPath}`);
185
- }
186
- return file.size;
187
- }
188
- async getFileModifiedTime(filePath) {
189
- const normalizedPath = filePath.startsWith("docs/")
190
- ? filePath
191
- : `docs/${filePath}`;
192
- const file = this.files.get(normalizedPath);
193
- if (!file) {
194
- throw new Error(`File not found: ${normalizedPath}`);
195
- }
196
- return file.modifiedTime;
197
- }
198
- async getFileCreatedTime(filePath) {
199
- const normalizedPath = filePath.startsWith("docs/")
200
- ? filePath
201
- : `docs/${filePath}`;
202
- const file = this.files.get(normalizedPath);
203
- if (!file) {
204
- throw new Error(`File not found: ${normalizedPath}`);
205
- }
206
- return file.createdTime;
207
- }
208
- async isDirectory(relativePath) {
209
- // In memory system doesn't track directories explicitly
210
- // Check if any files exist with this prefix
211
- const normalizedPath = relativePath.startsWith("docs/")
212
- ? relativePath
213
- : `docs/${relativePath}`;
214
- const dirPath = normalizedPath.endsWith("/")
215
- ? normalizedPath
216
- : `${normalizedPath}/`;
217
- for (const path of this.files.keys()) {
218
- if (path.startsWith(dirPath)) {
219
- return true;
220
- }
221
- }
222
- return false;
223
- }
224
- async isFile(relativePath) {
225
- const normalizedPath = relativePath.startsWith("docs/")
226
- ? relativePath
227
- : `docs/${relativePath}`;
228
- return this.files.has(normalizedPath);
229
- }
230
- /**
231
- * ディレクトリ内のエントリ一覧を取得
232
- */
233
- async readDirectoryFileNames(directoryPath = "") {
234
- // Normalize path
235
- const normalizedDir = directoryPath === ""
236
- ? "docs"
237
- : directoryPath.startsWith("docs/")
238
- ? directoryPath
239
- : `docs/${directoryPath}`;
240
- const dirPath = normalizedDir.endsWith("/")
241
- ? normalizedDir
242
- : `${normalizedDir}/`;
243
- const entries = new Set();
244
- for (const path of this.files.keys()) {
245
- if (path.startsWith(dirPath)) {
246
- const relativePath = path.slice(dirPath.length);
247
- const firstSegment = relativePath.split("/")[0];
248
- if (firstSegment) {
249
- entries.add(firstSegment);
250
- }
251
- }
252
- }
253
- return Array.from(entries).sort();
254
- }
255
- /**
256
- * ディレクトリが存在するかチェック
257
- */
258
- async directoryExists(relativePath) {
259
- return this.isDirectory(relativePath);
260
- }
261
- /**
262
- * ファイルが存在するかチェック
263
- */
264
- async fileExists(relativePath) {
265
- return this.isFile(relativePath);
266
- }
267
- /**
268
- * ディレクトリが存在しない場合は作成する
269
- */
270
- async ensureDirectoryExists(_relativePath) {
271
- // インメモリファイルシステムではディレクトリの作成は不要
272
- }
273
- /**
274
- * すべてのファイルをクリア
275
- */
276
- clear() {
277
- this.files.clear();
278
- }
279
- /**
280
- * ファイルの存在を確認(テスト用)
281
- */
282
- hasFile(filePath) {
283
- return this.files.has(filePath);
284
- }
285
- /**
286
- * ファイルの内容を取得(同期版、テスト用)
287
- */
288
- getFileContent(filePath) {
289
- return this.files.get(filePath)?.content;
290
- }
291
- /**
292
- * すべてのファイルパスを取得(テスト用)
293
- */
294
- getAllFilePaths() {
295
- return Array.from(this.files.keys()).sort();
296
- }
297
- /**
298
- * ファイル数を取得(テスト用)
299
- */
300
- getFileCount() {
301
- return this.files.size;
302
- }
303
- /**
304
- * テストデータをセットアップ
305
- */
306
- setupTestFiles(files) {
307
- const now = new Date();
308
- for (const [path, content] of Object.entries(files)) {
309
- this.files.set(path, {
310
- content,
311
- modifiedTime: now,
312
- createdTime: now,
313
- size: new TextEncoder().encode(content).length,
314
- });
315
- }
316
- }
317
- }
@@ -1,100 +0,0 @@
1
- import type { DocPathSystem } from "./doc-path-system";
2
- type Props = {
3
- basePath: string;
4
- pathSystem: DocPathSystem;
5
- };
6
- /**
7
- * ファイルシステム
8
- */
9
- export declare class DocFileSystem {
10
- private readonly basePath;
11
- private readonly pathSystem;
12
- constructor(props: Props);
13
- /**
14
- * 指定されたパスのファイルの内容を読み込む
15
- */
16
- readFile(relativePath: string): Promise<string | null>;
17
- /**
18
- * 指定されたパスのファイルに内容を書き込む(必要に応じてディレクトリも作成)
19
- */
20
- writeFile(relativePath: string, content: string): Promise<void>;
21
- /**
22
- * 指定されたパスのファイルを削除
23
- */
24
- deleteFile(relativePath: string): Promise<Error | null>;
25
- /**
26
- * 指定されたパスのファイル名を取得
27
- */
28
- readFileName(relativePath: string): string;
29
- /**
30
- * 指定されたパスのファイル拡張子を取得
31
- */
32
- readFileExtension(relativePath: string): string;
33
- /**
34
- * 指定されたパスのファイルが存在するディレクトリパスを取得
35
- */
36
- readFileDirectory(relativePath: string): string;
37
- /**
38
- * ディレクトリ内のエントリ一覧を取得
39
- */
40
- readDirectoryFileNames(relativePath?: string): Promise<string[]>;
41
- readDirectoryFilePaths(relativePath: string): Promise<string[]>;
42
- /**
43
- * 指定パスがディレクトリかチェック
44
- */
45
- isDirectory(relativePath: string): Promise<boolean>;
46
- /**
47
- * 指定パスがファイルかチェック
48
- */
49
- isFile(relativePath: string): Promise<boolean>;
50
- /**
51
- * ファイルまたはディレクトリが存在するかチェック
52
- */
53
- exists(relativePath: string): Promise<boolean>;
54
- /**
55
- * ディレクトリが存在するかチェック
56
- */
57
- directoryExists(relativePath: string): Promise<boolean>;
58
- /**
59
- * ファイルが存在するかチェック
60
- */
61
- fileExists(relativePath: string): Promise<boolean>;
62
- /**
63
- * ベースパスを取得
64
- */
65
- getBasePath(): string;
66
- /**
67
- * 相対パスを絶対パスに変換
68
- */
69
- resolve(relativePath: string): string;
70
- /**
71
- * ディレクトリを作成する
72
- */
73
- createDirectory(relativePath: string): Promise<void>;
74
- /**
75
- * ファイルのサイズを取得(バイト単位)
76
- */
77
- getFileSize(relativePath: string): Promise<number>;
78
- /**
79
- * ディレクトリが存在しない場合は作成する
80
- */
81
- ensureDirectoryExists(relativePath: string): Promise<void>;
82
- /**
83
- * ファイルをコピー
84
- */
85
- copyFile(sourcePath: string, destinationPath: string): Promise<void>;
86
- /**
87
- * ファイルを移動
88
- */
89
- moveFile(sourcePath: string, destinationPath: string): Promise<void>;
90
- /**
91
- * ファイルの最終更新日時を取得
92
- */
93
- getFileModifiedTime(relativePath: string): Promise<Date>;
94
- /**
95
- * ファイルの作成日時を取得
96
- */
97
- getFileCreatedTime(relativePath: string): Promise<Date>;
98
- }
99
- export {};
100
- //# sourceMappingURL=doc-file-system.d.ts.map
@@ -1 +0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