@simplysm/sd-claude 14.0.46 → 14.0.48

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 (127) hide show
  1. package/{claude/references/sd-simplysm14/sd-claude/usage.md → README.md} +2 -2
  2. package/claude/rules/sd-claude-rules.md +27 -9
  3. package/claude/rules/sd-options.md +11 -6
  4. package/claude/sd-subagent-start.sh +6 -0
  5. package/claude/settings.json +1 -12
  6. package/claude/skills/sd-check/SKILL.md +18 -9
  7. package/claude/skills/sd-claude-docs/SKILL.md +29 -58
  8. package/claude/skills/sd-claude-docs/references/package-claudemd.md +12 -0
  9. package/claude/skills/sd-claude-docs/references/package-doc-gen.md +22 -12
  10. package/claude/skills/sd-debug/SKILL.md +5 -3
  11. package/claude/skills/sd-deliverable/SKILL.md +0 -1
  12. package/claude/skills/sd-dev/SKILL.md +14 -9
  13. package/claude/skills/sd-doc-extract/SKILL.md +7 -9
  14. package/claude/skills/sd-doc-extract/_common.py +8 -1
  15. package/claude/skills/sd-doc-extract/_extract_docx.py +74 -34
  16. package/claude/skills/sd-doc-extract/_extract_pdf.py +12 -1
  17. package/claude/skills/sd-doc-extract/_extract_pptx.py +103 -23
  18. package/claude/skills/sd-doc-extract/_extract_xlsb.py +93 -4
  19. package/claude/skills/sd-doc-extract/_extract_xlsx.py +98 -36
  20. package/claude/skills/sd-doc-extract/extract.py +22 -3
  21. package/claude/skills/sd-inner-clarify/SKILL.md +78 -0
  22. package/claude/skills/sd-inner-debug/SKILL.md +1 -1
  23. package/claude/skills/sd-inner-review/SKILL.md +13 -0
  24. package/claude/skills/sd-plan/SKILL.md +50 -17
  25. package/claude/skills/sd-prompt/SKILL.md +180 -178
  26. package/claude/skills/sd-prompt/references/eval-runner.md +5 -31
  27. package/claude/skills/sd-prompt/references/sd-eval-env-template.md +23 -0
  28. package/claude/skills/sd-refactor/SKILL.md +2 -2
  29. package/claude/skills/sd-tdd/SKILL.md +46 -10
  30. package/claude/skills/sd-use/SKILL.md +84 -80
  31. package/claude/skills/sd-wbs/SKILL.md +85 -27
  32. package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/assets.md +2 -3
  33. package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/hooks.md +7 -6
  34. package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/scripts.md +1 -9
  35. package/package.json +3 -2
  36. package/scripts/sync.mjs +4 -2
  37. package/claude/references/sd-simplysm14/angular/docs/bootstrap.md +0 -48
  38. package/claude/references/sd-simplysm14/angular/docs/directives.md +0 -236
  39. package/claude/references/sd-simplysm14/angular/docs/features.md +0 -379
  40. package/claude/references/sd-simplysm14/angular/docs/pipes.md +0 -32
  41. package/claude/references/sd-simplysm14/angular/docs/plugins.md +0 -37
  42. package/claude/references/sd-simplysm14/angular/docs/provider-types.md +0 -283
  43. package/claude/references/sd-simplysm14/angular/docs/providers.md +0 -370
  44. package/claude/references/sd-simplysm14/angular/docs/styling.md +0 -222
  45. package/claude/references/sd-simplysm14/angular/docs/type-utilities.md +0 -250
  46. package/claude/references/sd-simplysm14/angular/docs/ui-data.md +0 -275
  47. package/claude/references/sd-simplysm14/angular/docs/ui-form.md +0 -490
  48. package/claude/references/sd-simplysm14/angular/docs/ui-layout.md +0 -140
  49. package/claude/references/sd-simplysm14/angular/docs/ui-navigation.md +0 -241
  50. package/claude/references/sd-simplysm14/angular/docs/ui-overlay.md +0 -157
  51. package/claude/references/sd-simplysm14/angular/docs/ui-visual.md +0 -127
  52. package/claude/references/sd-simplysm14/angular/docs/utils.md +0 -295
  53. package/claude/references/sd-simplysm14/angular/usage.md +0 -489
  54. package/claude/references/sd-simplysm14/capacitor-plugin-auto-update/usage.md +0 -182
  55. package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/file-operations.md +0 -154
  56. package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/permissions.md +0 -84
  57. package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/storage-paths.md +0 -107
  58. package/claude/references/sd-simplysm14/capacitor-plugin-file-system/docs/types.md +0 -83
  59. package/claude/references/sd-simplysm14/capacitor-plugin-file-system/usage.md +0 -133
  60. package/claude/references/sd-simplysm14/capacitor-plugin-intent/usage.md +0 -203
  61. package/claude/references/sd-simplysm14/capacitor-plugin-usb-storage/usage.md +0 -258
  62. package/claude/references/sd-simplysm14/core-browser/usage.md +0 -306
  63. package/claude/references/sd-simplysm14/core-common/docs/errors.md +0 -82
  64. package/claude/references/sd-simplysm14/core-common/docs/extensions.md +0 -167
  65. package/claude/references/sd-simplysm14/core-common/docs/features.md +0 -136
  66. package/claude/references/sd-simplysm14/core-common/docs/types.md +0 -245
  67. package/claude/references/sd-simplysm14/core-common/docs/utils.md +0 -591
  68. package/claude/references/sd-simplysm14/core-common/usage.md +0 -255
  69. package/claude/references/sd-simplysm14/core-node/docs/child-process.md +0 -182
  70. package/claude/references/sd-simplysm14/core-node/docs/features.md +0 -214
  71. package/claude/references/sd-simplysm14/core-node/docs/file-system.md +0 -509
  72. package/claude/references/sd-simplysm14/core-node/docs/file-watching.md +0 -139
  73. package/claude/references/sd-simplysm14/core-node/docs/logging.md +0 -180
  74. package/claude/references/sd-simplysm14/core-node/docs/path.md +0 -176
  75. package/claude/references/sd-simplysm14/core-node/docs/utilities-cpx.md +0 -194
  76. package/claude/references/sd-simplysm14/core-node/docs/utilities-fsx.md +0 -469
  77. package/claude/references/sd-simplysm14/core-node/docs/utilities-pathx.md +0 -151
  78. package/claude/references/sd-simplysm14/core-node/docs/worker-threads.md +0 -334
  79. package/claude/references/sd-simplysm14/core-node/docs/worker.md +0 -205
  80. package/claude/references/sd-simplysm14/core-node/usage.md +0 -259
  81. package/claude/references/sd-simplysm14/excel/docs/core-classes.md +0 -443
  82. package/claude/references/sd-simplysm14/excel/docs/types.md +0 -455
  83. package/claude/references/sd-simplysm14/excel/docs/utilities.md +0 -194
  84. package/claude/references/sd-simplysm14/excel/docs/wrapper.md +0 -73
  85. package/claude/references/sd-simplysm14/excel/usage.md +0 -134
  86. package/claude/references/sd-simplysm14/lint/usage.md +0 -130
  87. package/claude/references/sd-simplysm14/orm-common/docs/core.md +0 -188
  88. package/claude/references/sd-simplysm14/orm-common/docs/expression.md +0 -190
  89. package/claude/references/sd-simplysm14/orm-common/docs/models.md +0 -17
  90. package/claude/references/sd-simplysm14/orm-common/docs/query-builder.md +0 -97
  91. package/claude/references/sd-simplysm14/orm-common/docs/queryable-executable.md +0 -250
  92. package/claude/references/sd-simplysm14/orm-common/docs/schema-builders.md +0 -364
  93. package/claude/references/sd-simplysm14/orm-common/docs/types.md +0 -522
  94. package/claude/references/sd-simplysm14/orm-common/usage.md +0 -229
  95. package/claude/references/sd-simplysm14/orm-node/docs/connections.md +0 -137
  96. package/claude/references/sd-simplysm14/orm-node/docs/core.md +0 -131
  97. package/claude/references/sd-simplysm14/orm-node/docs/types.md +0 -173
  98. package/claude/references/sd-simplysm14/orm-node/usage.md +0 -143
  99. package/claude/references/sd-simplysm14/sd-cli/usage.md +0 -782
  100. package/claude/references/sd-simplysm14/service-client/docs/features.md +0 -217
  101. package/claude/references/sd-simplysm14/service-client/docs/main.md +0 -148
  102. package/claude/references/sd-simplysm14/service-client/docs/protocol.md +0 -53
  103. package/claude/references/sd-simplysm14/service-client/docs/transport.md +0 -131
  104. package/claude/references/sd-simplysm14/service-client/docs/types.md +0 -129
  105. package/claude/references/sd-simplysm14/service-client/usage.md +0 -202
  106. package/claude/references/sd-simplysm14/service-common/docs/app-structure.md +0 -175
  107. package/claude/references/sd-simplysm14/service-common/docs/events.md +0 -64
  108. package/claude/references/sd-simplysm14/service-common/docs/protocol.md +0 -331
  109. package/claude/references/sd-simplysm14/service-common/docs/service-types.md +0 -90
  110. package/claude/references/sd-simplysm14/service-common/docs/types.md +0 -19
  111. package/claude/references/sd-simplysm14/service-common/usage.md +0 -154
  112. package/claude/references/sd-simplysm14/service-server/docs/auth.md +0 -64
  113. package/claude/references/sd-simplysm14/service-server/docs/core.md +0 -174
  114. package/claude/references/sd-simplysm14/service-server/docs/legacy.md +0 -25
  115. package/claude/references/sd-simplysm14/service-server/docs/main.md +0 -88
  116. package/claude/references/sd-simplysm14/service-server/docs/protocol.md +0 -33
  117. package/claude/references/sd-simplysm14/service-server/docs/services.md +0 -94
  118. package/claude/references/sd-simplysm14/service-server/docs/transport-http.md +0 -93
  119. package/claude/references/sd-simplysm14/service-server/docs/transport-socket.md +0 -119
  120. package/claude/references/sd-simplysm14/service-server/docs/types.md +0 -36
  121. package/claude/references/sd-simplysm14/service-server/docs/utils.md +0 -22
  122. package/claude/references/sd-simplysm14/service-server/usage.md +0 -171
  123. package/claude/references/sd-simplysm14/storage/usage.md +0 -301
  124. package/claude/references/sd-simplysm14.md +0 -35
  125. package/claude/rules/sd-clarify.md +0 -23
  126. package/claude/sd-session-start.sh +0 -10
  127. /package/{claude/references/sd-simplysm14/sd-claude/docs → docs}/cli.md +0 -0
@@ -1,469 +0,0 @@
1
- # Utilities — fsx
2
-
3
- `fsx`는 `@simplysm/core-node`에서 네임스페이스로 re-export되는 파일 시스템 유틸리티 모음이다.
4
-
5
- ```typescript
6
- import { fsx } from "@simplysm/core-node";
7
- ```
8
-
9
- ---
10
-
11
- ## `exists`
12
-
13
- 파일 또는 디렉토리가 존재하는지 확인한다 (비동기).
14
-
15
- ```typescript
16
- export async function exists(targetPath: string): Promise<boolean>
17
- ```
18
-
19
- | Parameter | Type | Description |
20
- |-----------|------|-------------|
21
- | `targetPath` | `string` | 확인할 경로 |
22
-
23
- ---
24
-
25
- ## `existsSync`
26
-
27
- 파일 또는 디렉토리가 존재하는지 확인한다 (동기).
28
-
29
- ```typescript
30
- export function existsSync(targetPath: string): boolean
31
- ```
32
-
33
- | Parameter | Type | Description |
34
- |-----------|------|-------------|
35
- | `targetPath` | `string` | 확인할 경로 |
36
-
37
- ---
38
-
39
- ## `mkdir`
40
-
41
- 디렉토리를 재귀적으로 생성한다 (비동기).
42
-
43
- ```typescript
44
- export async function mkdir(targetPath: string): Promise<void>
45
- ```
46
-
47
- | Parameter | Type | Description |
48
- |-----------|------|-------------|
49
- | `targetPath` | `string` | 생성할 디렉토리 경로 |
50
-
51
- ---
52
-
53
- ## `mkdirSync`
54
-
55
- 디렉토리를 재귀적으로 생성한다 (동기).
56
-
57
- ```typescript
58
- export function mkdirSync(targetPath: string): void
59
- ```
60
-
61
- | Parameter | Type | Description |
62
- |-----------|------|-------------|
63
- | `targetPath` | `string` | 생성할 디렉토리 경로 |
64
-
65
- ---
66
-
67
- ## `rm`
68
-
69
- 파일 또는 디렉토리를 삭제한다 (비동기). 파일 잠금 등 일시적 오류에 대해 최대 6회(500ms 간격) 재시도한다.
70
-
71
- ```typescript
72
- export async function rm(targetPath: string): Promise<void>
73
- ```
74
-
75
- | Parameter | Type | Description |
76
- |-----------|------|-------------|
77
- | `targetPath` | `string` | 삭제할 경로 |
78
-
79
- ---
80
-
81
- ## `rmSync`
82
-
83
- 파일 또는 디렉토리를 삭제한다 (동기). 재시도 없이 즉시 실패한다.
84
-
85
- ```typescript
86
- export function rmSync(targetPath: string): void
87
- ```
88
-
89
- | Parameter | Type | Description |
90
- |-----------|------|-------------|
91
- | `targetPath` | `string` | 삭제할 경로 |
92
-
93
- ---
94
-
95
- ## `copy`
96
-
97
- 파일 또는 디렉토리를 복사한다 (비동기). sourcePath가 존재하지 않으면 아무 작업도 수행하지 않는다.
98
-
99
- ```typescript
100
- export async function copy(
101
- sourcePath: string,
102
- targetPath: string,
103
- filter?: (absolutePath: string) => boolean,
104
- ): Promise<void>
105
- ```
106
-
107
- | Parameter | Type | Description |
108
- |-----------|------|-------------|
109
- | `sourcePath` | `string` | 복사할 원본 경로 |
110
- | `targetPath` | `string` | 복사 대상 경로 |
111
- | `filter` | `(absolutePath: string) => boolean` | 복사 여부를 결정하는 필터 함수. 각 파일/디렉토리의 절대 경로가 전달된다. 최상위 sourcePath는 필터 대상이 아니다. |
112
-
113
- ---
114
-
115
- ## `copySync`
116
-
117
- 파일 또는 디렉토리를 복사한다 (동기). sourcePath가 존재하지 않으면 아무 작업도 수행하지 않는다.
118
-
119
- ```typescript
120
- export function copySync(
121
- sourcePath: string,
122
- targetPath: string,
123
- filter?: (absolutePath: string) => boolean,
124
- ): void
125
- ```
126
-
127
- | Parameter | Type | Description |
128
- |-----------|------|-------------|
129
- | `sourcePath` | `string` | 복사할 원본 경로 |
130
- | `targetPath` | `string` | 복사 대상 경로 |
131
- | `filter` | `(absolutePath: string) => boolean` | 복사 여부를 결정하는 필터 함수 |
132
-
133
- ---
134
-
135
- ## `read`
136
-
137
- 파일을 UTF-8 문자열로 읽는다 (비동기).
138
-
139
- ```typescript
140
- export async function read(targetPath: string): Promise<string>
141
- ```
142
-
143
- | Parameter | Type | Description |
144
- |-----------|------|-------------|
145
- | `targetPath` | `string` | 읽을 파일 경로 |
146
-
147
- ---
148
-
149
- ## `readSync`
150
-
151
- 파일을 UTF-8 문자열로 읽는다 (동기).
152
-
153
- ```typescript
154
- export function readSync(targetPath: string): string
155
- ```
156
-
157
- | Parameter | Type | Description |
158
- |-----------|------|-------------|
159
- | `targetPath` | `string` | 읽을 파일 경로 |
160
-
161
- ---
162
-
163
- ## `readBytes`
164
-
165
- 파일을 Uint8Array로 읽는다 (비동기).
166
-
167
- ```typescript
168
- export async function readBytes(targetPath: string): Promise<Uint8Array>
169
- ```
170
-
171
- | Parameter | Type | Description |
172
- |-----------|------|-------------|
173
- | `targetPath` | `string` | 읽을 파일 경로 |
174
-
175
- ---
176
-
177
- ## `readBytesSync`
178
-
179
- 파일을 Uint8Array로 읽는다 (동기).
180
-
181
- ```typescript
182
- export function readBytesSync(targetPath: string): Uint8Array
183
- ```
184
-
185
- | Parameter | Type | Description |
186
- |-----------|------|-------------|
187
- | `targetPath` | `string` | 읽을 파일 경로 |
188
-
189
- ---
190
-
191
- ## `readJson`
192
-
193
- JSON 파일을 읽는다 (비동기). `@simplysm/core-common`의 `json.parse`를 사용한다.
194
-
195
- ```typescript
196
- export async function readJson<TData = unknown>(targetPath: string): Promise<TData>
197
- ```
198
-
199
- | Parameter | Type | Description |
200
- |-----------|------|-------------|
201
- | `targetPath` | `string` | 읽을 JSON 파일 경로 |
202
-
203
- ---
204
-
205
- ## `readJsonSync`
206
-
207
- JSON 파일을 읽는다 (동기). `@simplysm/core-common`의 `json.parse`를 사용한다.
208
-
209
- ```typescript
210
- export function readJsonSync<TData = unknown>(targetPath: string): TData
211
- ```
212
-
213
- | Parameter | Type | Description |
214
- |-----------|------|-------------|
215
- | `targetPath` | `string` | 읽을 JSON 파일 경로 |
216
-
217
- ---
218
-
219
- ## `write`
220
-
221
- 파일에 데이터를 쓴다 (비동기). 상위 디렉토리를 자동으로 생성한다.
222
-
223
- ```typescript
224
- export async function write(targetPath: string, data: string | Uint8Array): Promise<void>
225
- ```
226
-
227
- | Parameter | Type | Description |
228
- |-----------|------|-------------|
229
- | `targetPath` | `string` | 쓸 파일 경로 |
230
- | `data` | `string \| Uint8Array` | 쓸 데이터 |
231
-
232
- ---
233
-
234
- ## `writeSync`
235
-
236
- 파일에 데이터를 쓴다 (동기). 상위 디렉토리를 자동으로 생성한다.
237
-
238
- ```typescript
239
- export function writeSync(targetPath: string, data: string | Uint8Array): void
240
- ```
241
-
242
- | Parameter | Type | Description |
243
- |-----------|------|-------------|
244
- | `targetPath` | `string` | 쓸 파일 경로 |
245
- | `data` | `string \| Uint8Array` | 쓸 데이터 |
246
-
247
- ---
248
-
249
- ## `writeJson`
250
-
251
- JSON 파일에 데이터를 쓴다 (비동기). `@simplysm/core-common`의 `json.stringify`를 사용한다.
252
-
253
- ```typescript
254
- export async function writeJson(
255
- targetPath: string,
256
- data: unknown,
257
- options?: {
258
- replacer?: (this: unknown, key: string | undefined, value: unknown) => unknown;
259
- space?: string | number;
260
- },
261
- ): Promise<void>
262
- ```
263
-
264
- | Parameter | Type | Description |
265
- |-----------|------|-------------|
266
- | `targetPath` | `string` | 쓸 JSON 파일 경로 |
267
- | `data` | `unknown` | 쓸 데이터 |
268
- | `options.replacer` | `function` | JSON 직렬화 커스텀 replacer |
269
- | `options.space` | `string \| number` | 들여쓰기 지정 |
270
-
271
- ---
272
-
273
- ## `writeJsonSync`
274
-
275
- JSON 파일에 데이터를 쓴다 (동기). `@simplysm/core-common`의 `json.stringify`를 사용한다.
276
-
277
- ```typescript
278
- export function writeJsonSync(
279
- targetPath: string,
280
- data: unknown,
281
- options?: {
282
- replacer?: (this: unknown, key: string | undefined, value: unknown) => unknown;
283
- space?: string | number;
284
- },
285
- ): void
286
- ```
287
-
288
- | Parameter | Type | Description |
289
- |-----------|------|-------------|
290
- | `targetPath` | `string` | 쓸 JSON 파일 경로 |
291
- | `data` | `unknown` | 쓸 데이터 |
292
- | `options.replacer` | `function` | JSON 직렬화 커스텀 replacer |
293
- | `options.space` | `string \| number` | 들여쓰기 지정 |
294
-
295
- ---
296
-
297
- ## `readdir`
298
-
299
- 디렉토리의 내용을 읽는다 (비동기).
300
-
301
- ```typescript
302
- export async function readdir(targetPath: string): Promise<string[]>
303
- ```
304
-
305
- | Parameter | Type | Description |
306
- |-----------|------|-------------|
307
- | `targetPath` | `string` | 읽을 디렉토리 경로 |
308
-
309
- **반환**: 디렉토리 내 항목 이름 배열 (상대 이름, 절대 경로 아님)
310
-
311
- ---
312
-
313
- ## `readdirSync`
314
-
315
- 디렉토리의 내용을 읽는다 (동기).
316
-
317
- ```typescript
318
- export function readdirSync(targetPath: string): string[]
319
- ```
320
-
321
- | Parameter | Type | Description |
322
- |-----------|------|-------------|
323
- | `targetPath` | `string` | 읽을 디렉토리 경로 |
324
-
325
- **반환**: 디렉토리 내 항목 이름 배열 (상대 이름, 절대 경로 아님)
326
-
327
- ---
328
-
329
- ## `stat`
330
-
331
- 파일/디렉토리 정보를 가져온다 (비동기). 심볼릭 링크를 따라간다.
332
-
333
- ```typescript
334
- export async function stat(targetPath: string): Promise<fs.Stats>
335
- ```
336
-
337
- | Parameter | Type | Description |
338
- |-----------|------|-------------|
339
- | `targetPath` | `string` | 정보를 조회할 경로 |
340
-
341
- ---
342
-
343
- ## `statSync`
344
-
345
- 파일/디렉토리 정보를 가져온다 (동기). 심볼릭 링크를 따라간다.
346
-
347
- ```typescript
348
- export function statSync(targetPath: string): fs.Stats
349
- ```
350
-
351
- | Parameter | Type | Description |
352
- |-----------|------|-------------|
353
- | `targetPath` | `string` | 정보를 조회할 경로 |
354
-
355
- ---
356
-
357
- ## `lstat`
358
-
359
- 파일/디렉토리 정보를 가져온다 (비동기). 심볼릭 링크를 따라가지 않는다.
360
-
361
- ```typescript
362
- export async function lstat(targetPath: string): Promise<fs.Stats>
363
- ```
364
-
365
- | Parameter | Type | Description |
366
- |-----------|------|-------------|
367
- | `targetPath` | `string` | 정보를 조회할 경로 |
368
-
369
- ---
370
-
371
- ## `lstatSync`
372
-
373
- 파일/디렉토리 정보를 가져온다 (동기). 심볼릭 링크를 따라가지 않는다.
374
-
375
- ```typescript
376
- export function lstatSync(targetPath: string): fs.Stats
377
- ```
378
-
379
- | Parameter | Type | Description |
380
- |-----------|------|-------------|
381
- | `targetPath` | `string` | 정보를 조회할 경로 |
382
-
383
- ---
384
-
385
- ## `glob`
386
-
387
- Glob 패턴을 사용하여 파일을 검색한다 (비동기).
388
-
389
- ```typescript
390
- export async function glob(pattern: string, options?: GlobOptions): Promise<string[]>
391
- ```
392
-
393
- | Parameter | Type | Description |
394
- |-----------|------|-------------|
395
- | `pattern` | `string` | Glob 패턴 (예: `"**/*.ts"`) |
396
- | `options` | `GlobOptions` | glob 패키지 옵션 |
397
-
398
- **반환**: 매칭된 파일의 절대 경로 배열
399
-
400
- ---
401
-
402
- ## `globSync`
403
-
404
- Glob 패턴을 사용하여 파일을 검색한다 (동기).
405
-
406
- ```typescript
407
- export function globSync(pattern: string, options?: GlobOptions): string[]
408
- ```
409
-
410
- | Parameter | Type | Description |
411
- |-----------|------|-------------|
412
- | `pattern` | `string` | Glob 패턴 (예: `"**/*.ts"`) |
413
- | `options` | `GlobOptions` | glob 패키지 옵션 |
414
-
415
- **반환**: 매칭된 파일의 절대 경로 배열
416
-
417
- ---
418
-
419
- ## `clearEmptyDirectory`
420
-
421
- 지정된 디렉토리 하위의 빈 디렉토리를 재귀적으로 삭제한다. 모든 하위 디렉토리가 삭제되어 상위 디렉토리가 비게 되면 해당 디렉토리도 삭제된다.
422
-
423
- ```typescript
424
- export async function clearEmptyDirectory(dirPath: string): Promise<void>
425
- ```
426
-
427
- | Parameter | Type | Description |
428
- |-----------|------|-------------|
429
- | `dirPath` | `string` | 빈 디렉토리를 정리할 루트 디렉토리 경로 |
430
-
431
- ---
432
-
433
- ## `findAllParentChildPaths`
434
-
435
- 시작 경로에서 루트 방향으로 부모 디렉토리를 순회하며 glob 패턴에 매칭되는 파일을 검색한다 (비동기).
436
-
437
- ```typescript
438
- export async function findAllParentChildPaths(
439
- childGlob: string,
440
- fromPath: string,
441
- rootPath?: string,
442
- ): Promise<string[]>
443
- ```
444
-
445
- | Parameter | Type | Description |
446
- |-----------|------|-------------|
447
- | `childGlob` | `string` | 각 디렉토리에서 검색할 glob 패턴 |
448
- | `fromPath` | `string` | 검색을 시작할 경로 |
449
- | `rootPath` | `string` | 검색을 중단할 경로. 미지정 시 파일 시스템 루트까지 검색. fromPath는 rootPath의 하위 경로여야 한다 |
450
-
451
- ---
452
-
453
- ## `findAllParentChildPathsSync`
454
-
455
- 시작 경로에서 루트 방향으로 부모 디렉토리를 순회하며 glob 패턴에 매칭되는 파일을 검색한다 (동기).
456
-
457
- ```typescript
458
- export function findAllParentChildPathsSync(
459
- childGlob: string,
460
- fromPath: string,
461
- rootPath?: string,
462
- ): string[]
463
- ```
464
-
465
- | Parameter | Type | Description |
466
- |-----------|------|-------------|
467
- | `childGlob` | `string` | 각 디렉토리에서 검색할 glob 패턴 |
468
- | `fromPath` | `string` | 검색을 시작할 경로 |
469
- | `rootPath` | `string` | 검색을 중단할 경로. 미지정 시 파일 시스템 루트까지 검색 |
@@ -1,151 +0,0 @@
1
- # Utilities — pathx
2
-
3
- `pathx`는 `@simplysm/core-node`에서 네임스페이스로 re-export되는 경로 유틸리티 모음이다.
4
-
5
- ```typescript
6
- import { pathx } from "@simplysm/core-node";
7
- ```
8
-
9
- ---
10
-
11
- ## `PosixPath`
12
-
13
- POSIX 스타일(슬래시 `/`) 경로를 나타내는 브랜드 타입. `posix()` 또는 `posixResolve()`를 통해서만 생성할 수 있다.
14
-
15
- ```typescript
16
- export type PosixPath = string & {
17
- [POSIX]: never;
18
- };
19
- ```
20
-
21
- `FsWatcher`가 반환하는 경로는 항상 `PosixPath`다.
22
-
23
- ---
24
-
25
- ## `posix`
26
-
27
- POSIX 스타일 경로로 변환한다 (백슬래시 → 슬래시). 경로 결합이나 resolve는 수행하지 않는다.
28
-
29
- ```typescript
30
- export function posix(p: string): PosixPath
31
- ```
32
-
33
- | Parameter | Type | Description |
34
- |-----------|------|-------------|
35
- | `p` | `string` | 변환할 경로 |
36
-
37
- ```typescript
38
- pathx.posix("C:\\Users\\test"); // "C:/Users/test"
39
- ```
40
-
41
- ---
42
-
43
- ## `posixResolve`
44
-
45
- 절대 경로로 resolve한 뒤 POSIX 스타일로 변환한다.
46
-
47
- ```typescript
48
- export function posixResolve(...args: string[]): PosixPath
49
- ```
50
-
51
- | Parameter | Type | Description |
52
- |-----------|------|-------------|
53
- | `...args` | `string[]` | `path.resolve()`에 전달할 경로 세그먼트 |
54
-
55
- ```typescript
56
- pathx.posixResolve("/base", "sub", "file.txt"); // "/base/sub/file.txt"
57
- pathx.posixResolve("relative/path"); // "D:/cwd/relative/path" (절대 경로화)
58
- ```
59
-
60
- ---
61
-
62
- ## `changeFileDirectory`
63
-
64
- 파일 경로의 디렉토리를 변경한다.
65
-
66
- ```typescript
67
- export function changeFileDirectory(
68
- filePath: string,
69
- fromDirectory: string,
70
- toDirectory: string,
71
- ): string
72
- ```
73
-
74
- | Parameter | Type | Description |
75
- |-----------|------|-------------|
76
- | `filePath` | `string` | 변경할 파일 경로 |
77
- | `fromDirectory` | `string` | 원래 디렉토리 경로 |
78
- | `toDirectory` | `string` | 새로운 디렉토리 경로 |
79
-
80
- **Throws**: `filePath`가 `fromDirectory` 내부에 없는 경우 `ArgumentError`를 던진다.
81
-
82
- ```typescript
83
- pathx.changeFileDirectory("/a/b/c.txt", "/a", "/x");
84
- // → "/x/b/c.txt"
85
- ```
86
-
87
- ---
88
-
89
- ## `basenameWithoutExt`
90
-
91
- 확장자를 제외한 파일명(basename)을 반환한다.
92
-
93
- ```typescript
94
- export function basenameWithoutExt(filePath: string): string
95
- ```
96
-
97
- | Parameter | Type | Description |
98
- |-----------|------|-------------|
99
- | `filePath` | `string` | 파일 경로 |
100
-
101
- ```typescript
102
- pathx.basenameWithoutExt("file.txt"); // "file"
103
- pathx.basenameWithoutExt("/path/to/file.spec.ts"); // "file.spec"
104
- ```
105
-
106
- ---
107
-
108
- ## `isChildPath`
109
-
110
- `childPath`가 `parentPath`의 하위 경로인지 확인한다. 동일한 경로이면 `false`를 반환한다.
111
-
112
- 경로는 내부적으로 `posixResolve()`를 사용하여 정규화된다.
113
-
114
- ```typescript
115
- export function isChildPath(childPath: string, parentPath: string): boolean
116
- ```
117
-
118
- | Parameter | Type | Description |
119
- |-----------|------|-------------|
120
- | `childPath` | `string` | 자식 경로 후보 |
121
- | `parentPath` | `string` | 부모 경로 |
122
-
123
- ```typescript
124
- pathx.isChildPath("/a/b/c", "/a/b"); // true
125
- pathx.isChildPath("/a/b", "/a/b/c"); // false
126
- pathx.isChildPath("/a/b", "/a/b"); // false (동일 경로)
127
- ```
128
-
129
- ---
130
-
131
- ## `filterByTargets`
132
-
133
- 대상 경로 목록을 기반으로 파일을 필터링한다. 대상 경로와 일치하거나 하위에 있는 파일을 포함한다.
134
-
135
- ```typescript
136
- export function filterByTargets(files: string[], targets: string[], cwd: string): string[]
137
- ```
138
-
139
- | Parameter | Type | Description |
140
- |-----------|------|-------------|
141
- | `files` | `string[]` | 필터링할 파일 경로. cwd 하위의 절대 경로여야 한다 |
142
- | `targets` | `string[]` | 대상 경로 (cwd 기준 상대 경로, POSIX 스타일 권장) |
143
- | `cwd` | `string` | 현재 작업 디렉토리 (절대 경로) |
144
-
145
- **반환**: `targets`가 비어있으면 `files`를 그대로 반환. 그렇지 않으면 대상 경로 하위의 파일만 반환.
146
-
147
- ```typescript
148
- const files = ["/proj/src/a.ts", "/proj/src/b.ts", "/proj/tests/c.ts"];
149
- pathx.filterByTargets(files, ["src"], "/proj");
150
- // → ["/proj/src/a.ts", "/proj/src/b.ts"]
151
- ```