@pecot/workflow-mcp 0.0.0-stage → 5.0.0

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 (244) hide show
  1. package/.claude-plugin/plugin.json +8 -0
  2. package/LICENSE +21 -0
  3. package/README.md +126 -2
  4. package/bin/pecot-workflow-mcp.mjs +10 -0
  5. package/cli/dist/cli.d.ts +26 -0
  6. package/cli/dist/cli.js +222 -0
  7. package/cli/dist/commands/cell-table.d.ts +3 -0
  8. package/cli/dist/commands/cell-table.js +495 -0
  9. package/cli/dist/commands/command-binding.d.ts +26 -0
  10. package/cli/dist/commands/command-binding.js +266 -0
  11. package/cli/dist/commands/command-definition.d.ts +136 -0
  12. package/cli/dist/commands/command-definition.js +101 -0
  13. package/cli/dist/commands/command-help.d.ts +8 -0
  14. package/cli/dist/commands/command-help.js +173 -0
  15. package/cli/dist/commands/command-stop.d.ts +19 -0
  16. package/cli/dist/commands/command-stop.js +30 -0
  17. package/cli/dist/commands/dependabot.d.ts +3 -0
  18. package/cli/dist/commands/dependabot.js +165 -0
  19. package/cli/dist/commands/directory-option.d.ts +7 -0
  20. package/cli/dist/commands/directory-option.js +48 -0
  21. package/cli/dist/commands/failure.d.ts +13 -0
  22. package/cli/dist/commands/failure.js +33 -0
  23. package/cli/dist/commands/fuzzy.d.ts +7 -0
  24. package/cli/dist/commands/fuzzy.js +79 -0
  25. package/cli/dist/commands/github-client.d.ts +12 -0
  26. package/cli/dist/commands/github-client.js +23 -0
  27. package/cli/dist/commands/global-options.d.ts +25 -0
  28. package/cli/dist/commands/global-options.js +83 -0
  29. package/cli/dist/commands/help-layout.d.ts +40 -0
  30. package/cli/dist/commands/help-layout.js +117 -0
  31. package/cli/dist/commands/help.d.ts +8 -0
  32. package/cli/dist/commands/help.js +55 -0
  33. package/cli/dist/commands/input-schema.d.ts +14 -0
  34. package/cli/dist/commands/input-schema.js +56 -0
  35. package/cli/dist/commands/issue-board.d.ts +38 -0
  36. package/cli/dist/commands/issue-board.js +62 -0
  37. package/cli/dist/commands/issue-comment.d.ts +3 -0
  38. package/cli/dist/commands/issue-comment.js +196 -0
  39. package/cli/dist/commands/issue-create.d.ts +3 -0
  40. package/cli/dist/commands/issue-create.js +329 -0
  41. package/cli/dist/commands/issue-project.d.ts +3 -0
  42. package/cli/dist/commands/issue-project.js +176 -0
  43. package/cli/dist/commands/issue-quick.d.ts +3 -0
  44. package/cli/dist/commands/issue-quick.js +126 -0
  45. package/cli/dist/commands/issue-read.d.ts +3 -0
  46. package/cli/dist/commands/issue-read.js +80 -0
  47. package/cli/dist/commands/issue-shared.d.ts +159 -0
  48. package/cli/dist/commands/issue-shared.js +419 -0
  49. package/cli/dist/commands/issue.d.ts +4 -0
  50. package/cli/dist/commands/issue.js +15 -0
  51. package/cli/dist/commands/names.d.ts +9 -0
  52. package/cli/dist/commands/names.js +16 -0
  53. package/cli/dist/commands/output.d.ts +78 -0
  54. package/cli/dist/commands/output.js +187 -0
  55. package/cli/dist/commands/pr.d.ts +3 -0
  56. package/cli/dist/commands/pr.js +933 -0
  57. package/cli/dist/commands/project-info.d.ts +48 -0
  58. package/cli/dist/commands/project-info.js +181 -0
  59. package/cli/dist/commands/project-sync.d.ts +91 -0
  60. package/cli/dist/commands/project-sync.js +273 -0
  61. package/cli/dist/commands/project.d.ts +5 -0
  62. package/cli/dist/commands/project.js +677 -0
  63. package/cli/dist/commands/registry.d.ts +6 -0
  64. package/cli/dist/commands/registry.js +27 -0
  65. package/cli/dist/commands/release.d.ts +10 -0
  66. package/cli/dist/commands/release.js +414 -0
  67. package/cli/dist/commands/repository-display.d.ts +3 -0
  68. package/cli/dist/commands/repository-display.js +7 -0
  69. package/cli/dist/commands/repository-match.d.ts +14 -0
  70. package/cli/dist/commands/repository-match.js +33 -0
  71. package/cli/dist/commands/repository.d.ts +5 -0
  72. package/cli/dist/commands/repository.js +265 -0
  73. package/cli/dist/commands/rich-panel.d.ts +22 -0
  74. package/cli/dist/commands/rich-panel.js +295 -0
  75. package/cli/dist/commands/security.d.ts +3 -0
  76. package/cli/dist/commands/security.js +164 -0
  77. package/cli/dist/commands/session.d.ts +3 -0
  78. package/cli/dist/commands/session.js +161 -0
  79. package/cli/dist/commands/tracker-sync.d.ts +58 -0
  80. package/cli/dist/commands/tracker-sync.js +53 -0
  81. package/cli/dist/commands/usage-error.d.ts +47 -0
  82. package/cli/dist/commands/usage-error.js +72 -0
  83. package/cli/dist/commands/value-types.d.ts +46 -0
  84. package/cli/dist/commands/value-types.js +94 -0
  85. package/cli/dist/commands/work-target.d.ts +13 -0
  86. package/cli/dist/commands/work-target.js +41 -0
  87. package/cli/dist/commands/worktree.d.ts +3 -0
  88. package/cli/dist/commands/worktree.js +335 -0
  89. package/cli/dist/domain/api-error-detail.d.ts +10 -0
  90. package/cli/dist/domain/api-error-detail.js +25 -0
  91. package/cli/dist/domain/branch-name.d.ts +5 -0
  92. package/cli/dist/domain/branch-name.js +10 -0
  93. package/cli/dist/domain/changelog.d.ts +43 -0
  94. package/cli/dist/domain/changelog.js +107 -0
  95. package/cli/dist/domain/config.d.ts +215 -0
  96. package/cli/dist/domain/config.js +300 -0
  97. package/cli/dist/domain/dependabot-pull-requests.d.ts +82 -0
  98. package/cli/dist/domain/dependabot-pull-requests.js +338 -0
  99. package/cli/dist/domain/dependabot-source.d.ts +51 -0
  100. package/cli/dist/domain/dependabot-source.js +4 -0
  101. package/cli/dist/domain/dependabot.d.ts +47 -0
  102. package/cli/dist/domain/dependabot.js +88 -0
  103. package/cli/dist/domain/errors.d.ts +19 -0
  104. package/cli/dist/domain/errors.js +31 -0
  105. package/cli/dist/domain/field-options.d.ts +31 -0
  106. package/cli/dist/domain/field-options.js +44 -0
  107. package/cli/dist/domain/format.d.ts +47 -0
  108. package/cli/dist/domain/format.js +168 -0
  109. package/cli/dist/domain/frontmatter.d.ts +122 -0
  110. package/cli/dist/domain/frontmatter.js +264 -0
  111. package/cli/dist/domain/git-runner.d.ts +10 -0
  112. package/cli/dist/domain/git-runner.js +4 -0
  113. package/cli/dist/domain/git-url.d.ts +17 -0
  114. package/cli/dist/domain/git-url.js +30 -0
  115. package/cli/dist/domain/issue-kind.d.ts +16 -0
  116. package/cli/dist/domain/issue-kind.js +16 -0
  117. package/cli/dist/domain/issue-readout.d.ts +107 -0
  118. package/cli/dist/domain/issue-readout.js +4 -0
  119. package/cli/dist/domain/json-null.d.ts +2 -0
  120. package/cli/dist/domain/json-null.js +5 -0
  121. package/cli/dist/domain/json.d.ts +21 -0
  122. package/cli/dist/domain/json.js +47 -0
  123. package/cli/dist/domain/prerequisites.d.ts +32 -0
  124. package/cli/dist/domain/prerequisites.js +192 -0
  125. package/cli/dist/domain/pull-request.d.ts +134 -0
  126. package/cli/dist/domain/pull-request.js +232 -0
  127. package/cli/dist/domain/python-format.d.ts +105 -0
  128. package/cli/dist/domain/python-format.js +304 -0
  129. package/cli/dist/domain/readiness.d.ts +172 -0
  130. package/cli/dist/domain/readiness.js +280 -0
  131. package/cli/dist/domain/reference-parser.d.ts +49 -0
  132. package/cli/dist/domain/reference-parser.js +119 -0
  133. package/cli/dist/domain/release.d.ts +49 -0
  134. package/cli/dist/domain/release.js +72 -0
  135. package/cli/dist/domain/repository-policy.d.ts +32 -0
  136. package/cli/dist/domain/repository-policy.js +65 -0
  137. package/cli/dist/domain/repository-resolver.d.ts +57 -0
  138. package/cli/dist/domain/repository-resolver.js +119 -0
  139. package/cli/dist/domain/sections.d.ts +69 -0
  140. package/cli/dist/domain/sections.js +514 -0
  141. package/cli/dist/domain/security-alerts-source.d.ts +29 -0
  142. package/cli/dist/domain/security-alerts-source.js +4 -0
  143. package/cli/dist/domain/security-alerts.d.ts +52 -0
  144. package/cli/dist/domain/security-alerts.js +107 -0
  145. package/cli/dist/domain/security-tracker.d.ts +115 -0
  146. package/cli/dist/domain/security-tracker.js +353 -0
  147. package/cli/dist/domain/state.d.ts +29 -0
  148. package/cli/dist/domain/state.js +56 -0
  149. package/cli/dist/domain/tracker-body.d.ts +70 -0
  150. package/cli/dist/domain/tracker-body.js +65 -0
  151. package/cli/dist/domain/yaml-document.d.ts +5 -0
  152. package/cli/dist/domain/yaml-document.js +206 -0
  153. package/cli/dist/infra/authored-notes.d.ts +37 -0
  154. package/cli/dist/infra/authored-notes.js +66 -0
  155. package/cli/dist/infra/changelog-file.d.ts +19 -0
  156. package/cli/dist/infra/changelog-file.js +43 -0
  157. package/cli/dist/infra/child-stdin.d.ts +4 -0
  158. package/cli/dist/infra/child-stdin.js +8 -0
  159. package/cli/dist/infra/config-store.d.ts +49 -0
  160. package/cli/dist/infra/config-store.js +121 -0
  161. package/cli/dist/infra/diagnostics.d.ts +9 -0
  162. package/cli/dist/infra/diagnostics.js +2 -0
  163. package/cli/dist/infra/file-kind.d.ts +9 -0
  164. package/cli/dist/infra/file-kind.js +26 -0
  165. package/cli/dist/infra/frontmatter-file.d.ts +14 -0
  166. package/cli/dist/infra/frontmatter-file.js +30 -0
  167. package/cli/dist/infra/git.d.ts +74 -0
  168. package/cli/dist/infra/git.js +133 -0
  169. package/cli/dist/infra/github/auth.d.ts +60 -0
  170. package/cli/dist/infra/github/auth.js +158 -0
  171. package/cli/dist/infra/github/client.d.ts +173 -0
  172. package/cli/dist/infra/github/client.js +576 -0
  173. package/cli/dist/infra/github/dependabot-source.d.ts +13 -0
  174. package/cli/dist/infra/github/dependabot-source.js +33 -0
  175. package/cli/dist/infra/github/errors.d.ts +47 -0
  176. package/cli/dist/infra/github/errors.js +42 -0
  177. package/cli/dist/infra/github/index.d.ts +13 -0
  178. package/cli/dist/infra/github/index.js +19 -0
  179. package/cli/dist/infra/github/issues.d.ts +129 -0
  180. package/cli/dist/infra/github/issues.js +273 -0
  181. package/cli/dist/infra/github/payload.d.ts +44 -0
  182. package/cli/dist/infra/github/payload.js +80 -0
  183. package/cli/dist/infra/github/projects.d.ts +108 -0
  184. package/cli/dist/infra/github/projects.js +303 -0
  185. package/cli/dist/infra/github/pulls.d.ts +80 -0
  186. package/cli/dist/infra/github/pulls.js +161 -0
  187. package/cli/dist/infra/github/queries.d.ts +36 -0
  188. package/cli/dist/infra/github/queries.js +883 -0
  189. package/cli/dist/infra/github/readout.d.ts +18 -0
  190. package/cli/dist/infra/github/readout.js +156 -0
  191. package/cli/dist/infra/github/repos.d.ts +68 -0
  192. package/cli/dist/infra/github/repos.js +137 -0
  193. package/cli/dist/infra/github/rest-path.d.ts +14 -0
  194. package/cli/dist/infra/github/rest-path.js +31 -0
  195. package/cli/dist/infra/github/security-alerts-source.d.ts +15 -0
  196. package/cli/dist/infra/github/security-alerts-source.js +73 -0
  197. package/cli/dist/infra/gitignore-spec.d.ts +36 -0
  198. package/cli/dist/infra/gitignore-spec.js +235 -0
  199. package/cli/dist/infra/nx-scope.d.ts +51 -0
  200. package/cli/dist/infra/nx-scope.js +182 -0
  201. package/cli/dist/infra/os-error.d.ts +24 -0
  202. package/cli/dist/infra/os-error.js +38 -0
  203. package/cli/dist/infra/paths.d.ts +88 -0
  204. package/cli/dist/infra/paths.js +234 -0
  205. package/cli/dist/infra/state-store.d.ts +45 -0
  206. package/cli/dist/infra/state-store.js +118 -0
  207. package/cli/dist/infra/template-store.d.ts +15 -0
  208. package/cli/dist/infra/template-store.js +34 -0
  209. package/cli/dist/infra/text-file.d.ts +12 -0
  210. package/cli/dist/infra/text-file.js +33 -0
  211. package/cli/dist/infra/worktree-copy.d.ts +24 -0
  212. package/cli/dist/infra/worktree-copy.js +95 -0
  213. package/cli/dist/infra/worktree-links.d.ts +139 -0
  214. package/cli/dist/infra/worktree-links.js +433 -0
  215. package/cli/dist/infra/worktree-setup.d.ts +21 -0
  216. package/cli/dist/infra/worktree-setup.js +41 -0
  217. package/cli/dist/infra/worktree.d.ts +174 -0
  218. package/cli/dist/infra/worktree.js +567 -0
  219. package/cli/dist/mcp/result.d.ts +33 -0
  220. package/cli/dist/mcp/result.js +52 -0
  221. package/cli/dist/mcp/serve.d.ts +51 -0
  222. package/cli/dist/mcp/serve.js +183 -0
  223. package/cli/dist/mcp/server.d.ts +21 -0
  224. package/cli/dist/mcp/server.js +128 -0
  225. package/cli/dist/mcp/session-directory.d.ts +26 -0
  226. package/cli/dist/mcp/session-directory.js +84 -0
  227. package/cli/dist/package.json +1 -0
  228. package/cli/dist/version.d.ts +17 -0
  229. package/cli/dist/version.js +42 -0
  230. package/cli/templates/comment/merge-diff.md +34 -0
  231. package/cli/templates/comment/plan.md +181 -0
  232. package/cli/templates/comment/precede-notify.md +33 -0
  233. package/cli/templates/comment/review-findings.md +42 -0
  234. package/cli/templates/comment/review-resolution.md +48 -0
  235. package/cli/templates/issue/bug.md +63 -0
  236. package/cli/templates/issue/epic.md +54 -0
  237. package/cli/templates/issue/task-implement.md +67 -0
  238. package/cli/templates/issue/task.md +48 -0
  239. package/cli/templates/issue/tracker.md +48 -0
  240. package/cli/templates/pr/create.md +123 -0
  241. package/cli/templates/pr/release.md +56 -0
  242. package/hooks/lib/core/pecot-gitignore-ensure.sh +48 -0
  243. package/npm-shrinkwrap.json +83 -0
  244. package/package.json +22 -4
@@ -0,0 +1,70 @@
1
+ import type { PecotError } from './errors.js';
2
+ import type { JsonValue } from './python-format.js';
3
+ /**
4
+ Python の正規表現の `\s`(str)と同じ範囲の文字クラスの中身。JS の `\s` から U+FEFF を除き、U+001C〜U+001F と U+0085 を足す
5
+ */
6
+ export declare const PYTHON_SPACE: string;
7
+ export declare const SPACE: string;
8
+ export declare const NON_SPACE: string;
9
+ /**
10
+ 固定の文字列から正規表現を作る。呼び出し側は利用者の入力を渡さない
11
+ */
12
+ export declare function compilePattern(source: string, flags: string): RegExp;
13
+ export interface MarkerPatterns {
14
+ /**
15
+ g フラグ付き
16
+ */
17
+ readonly begin: RegExp;
18
+ /**
19
+ g フラグ付き
20
+ */
21
+ readonly end: RegExp;
22
+ /**
23
+ g フラグなし
24
+ */
25
+ readonly tracker: RegExp;
26
+ }
27
+ /**
28
+ `<!-- <prefix>: list-begin -->` などの印の正規表現。空白は Python の `\s` と同じ範囲
29
+ */
30
+ export declare function markerPatterns(prefix: string): MarkerPatterns;
31
+ export declare const MARKER_PAIR_MESSAGE = "cannot rewrite the list: the Tracker body does not have exactly one pair of list-begin / list-end markers";
32
+ /**
33
+ 表のセルに入る文。`|` と改行と `<` を無害にする
34
+ */
35
+ export declare function cell(text: string): string;
36
+ export interface ListRegion {
37
+ /**
38
+ begin の印の直後
39
+ */
40
+ readonly begin: number;
41
+ /**
42
+ end の印の先頭
43
+ */
44
+ readonly end: number;
45
+ }
46
+ /**
47
+ 本文の一覧の範囲。印の組が 1 組でない(欠け・重なり・順序の逆転)なら、渡された型のエラーを投げる。
48
+ 正規表現は g フラグ付きで渡す
49
+ */
50
+ export declare function listRegion(body: string, beginPattern: Readonly<RegExp>, endPattern: Readonly<RegExp>, ErrorType: new (message: string) => PecotError): ListRegion;
51
+ export interface TrackerIssue {
52
+ readonly number: number;
53
+ readonly body: string;
54
+ }
55
+ export interface FoundTracker {
56
+ /**
57
+ 使う Tracker。open のものが無ければ undefined
58
+ */
59
+ readonly tracker: TrackerIssue | undefined;
60
+ /**
61
+ ほかの open の Tracker の番号(警告用。sync は閉じない)
62
+ */
63
+ readonly others: readonly number[];
64
+ }
65
+ /**
66
+ ラベルで引いた Issue から、open で本文に Tracker の印があるものを探す。複数あれば番号が最小のものを使う。
67
+ 正規表現は g フラグなしで渡す
68
+ */
69
+ export declare function findTracker(issues: readonly JsonValue[], trackerPattern: Readonly<RegExp>): FoundTracker;
70
+ //# sourceMappingURL=tracker-body.d.ts.map
@@ -0,0 +1,65 @@
1
+ // Tracker の本文の一覧の範囲と、open の Tracker の探し方(cli/core/tracker_body.py の移植)。2 つの Tracker が共有する。
2
+ // 印の正規表現とエラーの型は呼び出し側が渡す。改行の正規化は python-format.ts の normalizeNewlines を使う。
3
+ import { isJsonObject } from './json.js';
4
+ import { pythonStrip } from './python-format.js';
5
+ /**
6
+ Python の正規表現の `\s`(str)と同じ範囲の文字クラスの中身。JS の `\s` から U+FEFF を除き、U+001C〜U+001F と U+0085 を足す
7
+ */
8
+ export const PYTHON_SPACE = String.raw `\t\n\v\f\r \u001C-\u001F\u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000`;
9
+ export const SPACE = `[${PYTHON_SPACE}]`;
10
+ export const NON_SPACE = `[^${PYTHON_SPACE}]`;
11
+ /**
12
+ 固定の文字列から正規表現を作る。呼び出し側は利用者の入力を渡さない
13
+ */
14
+ export function compilePattern(source, flags) {
15
+ // eslint-disable-next-line security/detect-non-literal-regexp -- 固定の文字列から組み立てる
16
+ return new RegExp(source, flags);
17
+ }
18
+ /**
19
+ `<!-- <prefix>: list-begin -->` などの印の正規表現。空白は Python の `\s` と同じ範囲
20
+ */
21
+ export function markerPatterns(prefix) {
22
+ const marker = (name) => `<!--${SPACE}*${prefix}:${SPACE}*${name}${SPACE}*-->`;
23
+ return { begin: compilePattern(marker('list-begin'), 'gu'), end: compilePattern(marker('list-end'), 'gu'), tracker: compilePattern(marker('tracker'), 'u') };
24
+ }
25
+ const LINE_BREAK_RUN = compilePattern(`${SPACE}*[\r\n]${SPACE}*`, 'gu');
26
+ export const MARKER_PAIR_MESSAGE = 'cannot rewrite the list: the Tracker body does not have exactly one pair of list-begin / list-end markers';
27
+ /**
28
+ 表のセルに入る文。`|` と改行と `<` を無害にする
29
+ */
30
+ export function cell(text) {
31
+ return pythonStrip(text.replaceAll(LINE_BREAK_RUN, ' ')).replaceAll('<', '&lt;').replaceAll('|', String.raw `\|`);
32
+ }
33
+ function spanOf(match) {
34
+ return { start: match.index, end: match.index + match[0].length };
35
+ }
36
+ /**
37
+ 本文の一覧の範囲。印の組が 1 組でない(欠け・重なり・順序の逆転)なら、渡された型のエラーを投げる。
38
+ 正規表現は g フラグ付きで渡す
39
+ */
40
+ export function listRegion(body, beginPattern, endPattern, ErrorType) {
41
+ const begins = Array.from(body.matchAll(beginPattern), spanOf);
42
+ const ends = Array.from(body.matchAll(endPattern), spanOf);
43
+ const [begin] = begins;
44
+ const [end] = ends;
45
+ if (begin === undefined || end === undefined || begins.length !== 1 || ends.length !== 1 || begin.end > end.start) {
46
+ throw new ErrorType(MARKER_PAIR_MESSAGE);
47
+ }
48
+ return { begin: begin.end, end: end.start };
49
+ }
50
+ function trackerOf(issue, trackerPattern) {
51
+ if (!isJsonObject(issue) || issue['state'] !== 'open')
52
+ return undefined;
53
+ const { body, number } = issue;
54
+ return typeof body === 'string' && typeof number === 'number' && trackerPattern.test(body) ? { number, body } : undefined;
55
+ }
56
+ /**
57
+ ラベルで引いた Issue から、open で本文に Tracker の印があるものを探す。複数あれば番号が最小のものを使う。
58
+ 正規表現は g フラグなしで渡す
59
+ */
60
+ export function findTracker(issues, trackerPattern) {
61
+ const found = issues.map(issue => trackerOf(issue, trackerPattern)).filter(issue => issue !== undefined).toSorted((a, b) => a.number - b.number);
62
+ const [tracker, ...rest] = found;
63
+ return { tracker, others: rest.map(issue => issue.number) };
64
+ }
65
+ //# sourceMappingURL=tracker-body.js.map
@@ -0,0 +1,5 @@
1
+ /**
2
+ YAML の文字列を読む。空の文書は null。構文が不正なら YAML ライブラリのエラーを投げる
3
+ */
4
+ export declare function parseYamlDocument(source: string): unknown;
5
+ //# sourceMappingURL=yaml-document.d.ts.map
@@ -0,0 +1,206 @@
1
+ // YAML の読み込み。Python の CLI が使っていた YAML ライブラリ(safe_load)と同じ値を返す。
2
+ //
3
+ // 揃える対象は、型の決め方(暗黙の型の正規表現)と、重複キーの扱い。
4
+ // - 真偽値は yes・no・true・false・on・off(大文字小文字は 3 通りだけ)。y と n は文字列のまま
5
+ // - 整数は 2 進・8 進(先頭が 0)・16 進・60 進、数字の間の `_` を受ける。`0o10` と `08` は文字列
6
+ // - 実数: 小数点が必要。`1e3` は文字列で、`1.0e+3` が実数。指数には符号が必要
7
+ // - 日付は `YYYY-MM-DD` か、`Y-M-D` + 時刻
8
+ // - 重複キーは後のものが勝つ。`=` と、キー以外の位置の `<<` は読めずにエラー
9
+ // - 明示タグ(`!!float 1` など)は値の形に依らず、タグの型で読む。読めない値と未知のタグはエラー
10
+ // - 配列や辞書をキーにすると、エラー
11
+ // 構文エラーの文は揃えない(YAML ライブラリの文のまま)。
12
+ // 文字列でないキー(`1:` `yes:` `null:`)は文字列にして読む。Python は整数・真偽値・None のキーで読む。
13
+ // フロントマターの項目名には当たらないため、検証後の結果は同じになる。
14
+ import { parseDocument, visit } from 'yaml';
15
+ import { JSON_NULL } from './json-null.js';
16
+ const REPLACED_TAGS = new Set([
17
+ 'tag:yaml.org,2002:bool',
18
+ 'tag:yaml.org,2002:int',
19
+ 'tag:yaml.org,2002:float',
20
+ 'tag:yaml.org,2002:timestamp',
21
+ ]);
22
+ const BOOL_PATTERN = /^(?:yes|Yes|YES|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)$/u;
23
+ /* eslint-disable security/detect-unsafe-regex -- どの正規表現も全体を ^ と $ で囲み、量指定子の付いた群の中身は互いに重ならない。入力は YAML の 1 つのスカラー値で、破滅的な再試行は起きない */
24
+ // 実数と整数の正規表現は、Python の YAML ライブラリの 1 本を選択肢ごとに分けたもの(意味は同じ)
25
+ const FLOAT_PATTERNS = [
26
+ /^[+-]?\d[\d_]*\.[\d_]*(?:e[+-]\d+)?$/iu,
27
+ /^\.\d[\d_]*(?:e[+-]\d+)?$/iu,
28
+ /^[+-]?\d[\d_]*(?::[0-5]?\d)+\.[\d_]*$/u,
29
+ /^[+-]?\.(?:inf|Inf|INF)$/u,
30
+ /^\.(?:nan|NaN|NAN)$/u,
31
+ ];
32
+ const INT_PATTERNS = [
33
+ /^[+-]?0b[01_]+$/u,
34
+ /^[+-]?0[0-7_]+$/u,
35
+ /^[+-]?(?:0|[1-9][\d_]*)$/u,
36
+ /^[+-]?0x[\da-fA-F_]+$/u,
37
+ /^[+-]?[1-9][\d_]*(?::[0-5]?\d)+$/u,
38
+ ];
39
+ const TIMESTAMP_PATTERNS = [
40
+ /^(\d{4})-(\d{2})-(\d{2})$/u,
41
+ /^(\d{4})-(\d{1,2})-(\d{1,2})(?:[Tt]|[\t ]+)(\d{1,2}):(\d{2}):(\d{2})(?:\.(\d*))?(?:[\t ]*(Z|[+-]\d{1,2}(?::\d{2})?))?$/u,
42
+ ];
43
+ // 実数の各部(60 進の各部も同じ形)
44
+ const DECIMAL_NUMBER = /^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/u;
45
+ /* eslint-enable security/detect-unsafe-regex */
46
+ function invalid(type, text) {
47
+ throw new Error(`invalid ${type} value: ${text}`);
48
+ }
49
+ // `1:30.5` のような 60 進。各部は数でなければならない
50
+ function sexagesimal(text, type) {
51
+ let total = 0;
52
+ for (const part of text.split(':'))
53
+ total = DECIMAL_NUMBER.test(part) ? total * 60 + Number(part) : invalid(type, text);
54
+ return total;
55
+ }
56
+ const BOOLEAN_VALUES = new Map([
57
+ ['yes', true], ['true', true], ['on', true], ['no', false], ['false', false], ['off', false],
58
+ ]);
59
+ function isTrueKeyword(text) {
60
+ return BOOLEAN_VALUES.get(text.toLowerCase()) ?? invalid('bool', text);
61
+ }
62
+ function resolveFloat(text) {
63
+ const value = text.replaceAll('_', '').toLowerCase();
64
+ const sign = value.startsWith('-') ? -1 : 1;
65
+ const unsigned = /^[+-]/u.test(value) ? value.slice(1) : value;
66
+ if (['.inf', 'inf', 'infinity'].includes(unsigned))
67
+ return sign * Infinity;
68
+ if (['.nan', 'nan'].includes(unsigned))
69
+ return NaN;
70
+ if (unsigned.includes(':'))
71
+ return sign * sexagesimal(unsigned, 'float');
72
+ return DECIMAL_NUMBER.test(unsigned) ? sign * Number(unsigned) : invalid('float', text);
73
+ }
74
+ // 符号を掛けると -0 になる(Python の整数に -0 は無い)ので、0 との差で負にする
75
+ function applySign(sign, magnitude) {
76
+ return sign < 0 ? 0 - magnitude : magnitude;
77
+ }
78
+ function parseDigits(digits, radix, pattern, text) {
79
+ return pattern.test(digits) ? Number.parseInt(digits, radix) : invalid('int', text);
80
+ }
81
+ function integerSexagesimal(unsigned, text) {
82
+ let total = 0;
83
+ for (const part of unsigned.split(':'))
84
+ total = total * 60 + parseDigits(part, 10, /^\d+$/u, text);
85
+ return total;
86
+ }
87
+ function resolveInteger(text) {
88
+ const value = text.replaceAll('_', '');
89
+ const sign = value.startsWith('-') ? -1 : 1;
90
+ const unsigned = /^[+-]/u.test(value) ? value.slice(1) : value;
91
+ if (unsigned === '0')
92
+ return 0;
93
+ if (unsigned.startsWith('0b'))
94
+ return applySign(sign, parseDigits(unsigned.slice(2), 2, /^[01]+$/u, text));
95
+ if (unsigned.startsWith('0x'))
96
+ return applySign(sign, parseDigits(unsigned.slice(2), 16, /^[\da-f]+$/iu, text));
97
+ if (unsigned.startsWith('0'))
98
+ return applySign(sign, parseDigits(unsigned, 8, /^[0-7]+$/u, text));
99
+ if (unsigned.includes(':'))
100
+ return applySign(sign, integerSexagesimal(unsigned, text));
101
+ return applySign(sign, parseDigits(unsigned, 10, /^\d+$/u, text));
102
+ }
103
+ const DAYS_IN_MONTH = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
104
+ function timeZoneMinutes(zone) {
105
+ if (zone === undefined || zone === 'Z')
106
+ return 0;
107
+ const sign = zone.startsWith('-') ? -1 : 1;
108
+ const [hours = '0', minutes = '0'] = zone.slice(1).split(':', 2);
109
+ return sign * (Number(hours) * 60 + Number(minutes));
110
+ }
111
+ function numberOrZero(text = '0') {
112
+ return Number(text);
113
+ }
114
+ // 小数部の最初の 3 桁がミリ秒
115
+ function milliseconds(fraction = '') {
116
+ return Number(`${fraction}000`.slice(0, 3));
117
+ }
118
+ function execFirst(patterns, text) {
119
+ for (const pattern of patterns) {
120
+ const match = pattern.exec(text);
121
+ if (match !== null)
122
+ return match;
123
+ }
124
+ return undefined;
125
+ }
126
+ function resolveTimestamp(text) {
127
+ const match = execFirst(TIMESTAMP_PATTERNS, text);
128
+ if (match === undefined)
129
+ throw new Error('not a timestamp');
130
+ const [, year, month, day, hour, minute, second, fraction, zone] = match;
131
+ const [y = 0, mo = 0, d = 0, h = 0, mi = 0, s = 0] = [year, month, day, hour, minute, second].map(part => numberOrZero(part));
132
+ const isValidDate = d >= 1 && d <= (DAYS_IN_MONTH[mo - 1] ?? 0) && new Date(Date.UTC(y, mo - 1, d)).getUTCDate() === d;
133
+ if (!isValidDate || h > 23 || mi > 59 || s > 59)
134
+ throw new Error(`date or time out of range: ${text}`);
135
+ return new Date(Date.UTC(y, mo - 1, d, h, mi, s, milliseconds(fraction)) - timeZoneMinutes(zone) * 60_000);
136
+ }
137
+ const TAG_BOOL = 'tag:yaml.org,2002:bool';
138
+ const TAG_FLOAT = 'tag:yaml.org,2002:float';
139
+ const TAG_INT = 'tag:yaml.org,2002:int';
140
+ const TAG_TIMESTAMP = 'tag:yaml.org,2002:timestamp';
141
+ const TAG_NULL = 'tag:yaml.org,2002:null';
142
+ // 暗黙の型(正規表現に合うとき)の読み方
143
+ const IMPLICIT_TAGS = [
144
+ { default: true, tag: TAG_BOOL, test: BOOL_PATTERN, resolve: isTrueKeyword },
145
+ ...FLOAT_PATTERNS.map((test) => ({ default: true, tag: TAG_FLOAT, test, resolve: resolveFloat })),
146
+ ...INT_PATTERNS.map((test) => ({ default: true, tag: TAG_INT, test, resolve: resolveInteger })),
147
+ ...TIMESTAMP_PATTERNS.map((test) => ({ default: true, tag: TAG_TIMESTAMP, test, resolve: resolveTimestamp })),
148
+ {
149
+ default: true,
150
+ tag: 'tag:yaml.org,2002:value',
151
+ test: /^=$/u,
152
+ resolve() {
153
+ throw new Error('could not determine a constructor for the tag \'tag:yaml.org,2002:value\'');
154
+ },
155
+ },
156
+ ];
157
+ // 明示タグ(`!!float 1`)の読み方。正規表現に合わない値も、タグの型で読む
158
+ const EXPLICIT_TAGS = [
159
+ { tag: TAG_BOOL, resolve: isTrueKeyword },
160
+ { tag: TAG_FLOAT, resolve: resolveFloat },
161
+ { tag: TAG_INT, resolve: resolveInteger },
162
+ { tag: TAG_TIMESTAMP, resolve: resolveTimestamp },
163
+ { tag: TAG_NULL, resolve: () => JSON_NULL },
164
+ ];
165
+ // mapAsMap で読んだ Map を、文字列キーの辞書にする。配列や辞書のキーは、Python ではハッシュできずエラー
166
+ function toPlainValue(value) {
167
+ if (Array.isArray(value))
168
+ return value.map((item) => toPlainValue(item));
169
+ if (!(value instanceof Map))
170
+ return value;
171
+ const entries = [];
172
+ for (const [key, item] of value) {
173
+ if (key instanceof Map || Array.isArray(key))
174
+ throw new TypeError('while constructing a mapping: found unhashable key');
175
+ entries.push([String(key), toPlainValue(item)]);
176
+ }
177
+ return Object.fromEntries(entries);
178
+ }
179
+ /**
180
+ YAML の文字列を読む。空の文書は null。構文が不正なら YAML ライブラリのエラーを投げる
181
+ */
182
+ export function parseYamlDocument(source) {
183
+ const document = parseDocument(source, {
184
+ version: '1.1',
185
+ uniqueKeys: false,
186
+ logLevel: 'error',
187
+ customTags: tags => [...tags.filter(tag => typeof tag === 'string' || !REPLACED_TAGS.has(tag.tag)), ...IMPLICIT_TAGS, ...EXPLICIT_TAGS],
188
+ });
189
+ const [error] = document.errors;
190
+ if (error !== undefined)
191
+ throw error;
192
+ // 未知のタグ(`!!foo`・`!foo`)は、YAML ライブラリでは警告になる。Python ではエラー
193
+ const unresolved = document.warnings.find(warning => warning.code === 'TAG_RESOLVE_FAILED');
194
+ if (unresolved !== undefined)
195
+ throw unresolved;
196
+ // `<<` は、キーの位置でだけ merge として読める。値や配列の要素にある引用符なしの `<<` は読めない
197
+ visit(document, {
198
+ Scalar(key, node) {
199
+ if (key !== 'key' && node.tag === undefined && node.type === 'PLAIN' && node.source === '<<') {
200
+ throw new Error('could not determine a constructor for the tag \'tag:yaml.org,2002:merge\'');
201
+ }
202
+ },
203
+ });
204
+ return toPlainValue(document.toJS({ mapAsMap: true }));
205
+ }
206
+ //# sourceMappingURL=yaml-document.js.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ 引数の組み合わせの決まり。同時に使えない組か、あるオプションが他のオプションを要る関係
3
+ */
4
+ export type Constraint = {
5
+ readonly conflicts: readonly string[];
6
+ } | {
7
+ readonly requires: Readonly<Record<string, readonly string[]>>;
8
+ };
9
+ export interface AuthoredNotes {
10
+ readonly details: readonly string[];
11
+ readonly constraints: readonly Constraint[];
12
+ readonly examples: readonly Readonly<{
13
+ run: string;
14
+ note: string;
15
+ }>[];
16
+ /**
17
+ 入力名 → 初期値の補足の文
18
+ */
19
+ readonly defaultNotes: ReadonlyMap<string, string>;
20
+ }
21
+ /**
22
+ 読めたか、読めなかったか。読めなかったときは、読もうとした絶対パスと理由(1 行)を持つ
23
+ */
24
+ export type NotesResult = {
25
+ readonly kind: 'read';
26
+ readonly notes: AuthoredNotes;
27
+ } | {
28
+ readonly kind: 'unreadable';
29
+ readonly file: string;
30
+ readonly reason: string;
31
+ };
32
+ /**
33
+ ID(`PW-CREATE-BRANCH`)の項目の details・constraints・examples・default_notes を読む。
34
+ ファイルが無い・YAML として読めない・項目が無い・欄の形が違うときは、場所と理由を持つ unreadable を返す
35
+ */
36
+ export declare function readAuthoredNotes(id: string, root?: string): NotesResult;
37
+ //# sourceMappingURL=authored-notes.d.ts.map
@@ -0,0 +1,66 @@
1
+ /* eslint-disable security/detect-non-literal-fs-filename -- パスは pluginRoot() の下の固定の位置。引数 root はテストが一時ディレクトリを渡す */
2
+ // 定義書の手書きの側(interface/authored.yaml)から、コマンドの --help に出す 4 つの欄を読む。
3
+ // domain/yaml-document.ts は PyYAML 互換で `yes`・`no` を真偽値にするので、yaml の parse をそのまま使う。
4
+ import { readFileSync } from 'node:fs';
5
+ import path from 'node:path';
6
+ import { parse } from 'yaml';
7
+ import { z } from 'zod';
8
+ import { pluginRoot } from '../version.js';
9
+ const NAMES_SCHEMA = z.array(z.string());
10
+ const CONFLICTS_SCHEMA = z.object({ conflicts: NAMES_SCHEMA });
11
+ const DEPENDENCY_SCHEMA = z.object({ requires: z.record(z.string(), NAMES_SCHEMA) });
12
+ const CONSTRAINT_SCHEMA = z.union([CONFLICTS_SCHEMA, DEPENDENCY_SCHEMA]);
13
+ const EXAMPLE_SCHEMA = z.object({ run: z.string(), note: z.string() });
14
+ const FILE_SCHEMA = z.object({ entries: z.record(z.string(), z.unknown()) });
15
+ const ENTRY_SCHEMA = z.object({
16
+ details: NAMES_SCHEMA,
17
+ constraints: z.array(CONSTRAINT_SCHEMA),
18
+ examples: z.array(EXAMPLE_SCHEMA),
19
+ default_notes: z.record(z.string(), z.string()),
20
+ });
21
+ /**
22
+ authored.yaml の置き場所。pluginRoot() の下の interface/
23
+ */
24
+ function authoredFile(root = pluginRoot()) {
25
+ return path.join(root, 'interface', 'authored.yaml');
26
+ }
27
+ function unreadable(file, reason) {
28
+ return { kind: 'unreadable', file, reason };
29
+ }
30
+ function isMissingFile(error) {
31
+ return error instanceof Error && 'code' in error && error.code === 'ENOENT';
32
+ }
33
+ /**
34
+ ID(`PW-CREATE-BRANCH`)の項目の details・constraints・examples・default_notes を読む。
35
+ ファイルが無い・YAML として読めない・項目が無い・欄の形が違うときは、場所と理由を持つ unreadable を返す
36
+ */
37
+ export function readAuthoredNotes(id, root = pluginRoot()) {
38
+ const file = authoredFile(root);
39
+ let text;
40
+ try {
41
+ text = readFileSync(file, 'utf8');
42
+ }
43
+ catch (error) {
44
+ return unreadable(file, isMissingFile(error) ? 'the file does not exist' : 'the file cannot be read');
45
+ }
46
+ let document;
47
+ try {
48
+ // 警告は process.emitWarning で出るので、誤りだけ拾う(help の出力に yaml の警告を混ぜない)
49
+ document = parse(text, { logLevel: 'error' });
50
+ }
51
+ catch {
52
+ return unreadable(file, 'it is not valid YAML');
53
+ }
54
+ const parsedFile = FILE_SCHEMA.safeParse(document);
55
+ if (!parsedFile.success)
56
+ return unreadable(file, 'it has no entries');
57
+ const entry = new Map(Object.entries(parsedFile.data.entries)).get(id);
58
+ if (entry === undefined)
59
+ return unreadable(file, `it has no entry ${id}`);
60
+ const parsed = ENTRY_SCHEMA.safeParse(entry);
61
+ if (!parsed.success)
62
+ return unreadable(file, `the fields of ${id} have the wrong shape`);
63
+ const { details, constraints, examples, default_notes: defaultNotes } = parsed.data;
64
+ return { kind: 'read', notes: { details, constraints, examples, defaultNotes: new Map(Object.entries(defaultNotes)) } };
65
+ }
66
+ //# sourceMappingURL=authored-notes.js.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ CHANGELOG ファイルのパスを解決する。存在しない場合もパスだけ返す。
3
+ 明示指定(空でない文字列)があればそれ、無ければ CHANGELOG.md → AIST-CHANGELOG.md の順に存在を確かめ、どちらも無ければ CHANGELOG.md。
4
+ 明示指定が絶対パスならそのまま返す(pathlib の / と同じ)
5
+ */
6
+ export declare function resolveChangelogPath(gitRoot: string, changelogFile?: string): string;
7
+ /**
8
+ ファイルがあれば内容、無ければ undefined
9
+ */
10
+ export declare function readChangelogIfExists(changelogPath: string): string | undefined;
11
+ /**
12
+ ファイルから最新バージョンを取る。ファイルが無ければ ChangelogFileNotFoundError
13
+ */
14
+ export declare function readLatestVersionFromFile(changelogPath: string): string;
15
+ /**
16
+ ファイルから指定バージョンのリリースノートを抽出する。ファイルが無ければ ChangelogFileNotFoundError
17
+ */
18
+ export declare function extractReleaseNotesFromFile(changelogPath: string, version: string): string;
19
+ //# sourceMappingURL=changelog-file.d.ts.map
@@ -0,0 +1,43 @@
1
+ /* eslint-disable security/detect-non-literal-fs-filename -- パスは呼び出し側が決める。ここでは存在確認と読み取りだけ */
2
+ // CHANGELOG.md を読む。内容の解釈は domain/changelog.ts にある。
3
+ import { existsSync } from 'node:fs';
4
+ import path from 'node:path';
5
+ import { CHANGELOG_FALLBACK_FILES, changelogFileName, changelogNotFoundMessage, ChangelogFileNotFoundError, DEFAULT_CHANGELOG_FILE, extractVersionReleaseNotes, getLatestVersion } from '../domain/changelog.js';
6
+ import { readTextFile } from './text-file.js';
7
+ /**
8
+ CHANGELOG ファイルのパスを解決する。存在しない場合もパスだけ返す。
9
+ 明示指定(空でない文字列)があればそれ、無ければ CHANGELOG.md → AIST-CHANGELOG.md の順に存在を確かめ、どちらも無ければ CHANGELOG.md。
10
+ 明示指定が絶対パスならそのまま返す(pathlib の / と同じ)
11
+ */
12
+ export function resolveChangelogPath(gitRoot, changelogFile) {
13
+ if (changelogFile !== undefined && changelogFile !== '') {
14
+ return path.isAbsolute(changelogFile) ? changelogFile : path.join(gitRoot, changelogFile);
15
+ }
16
+ const found = CHANGELOG_FALLBACK_FILES.map(candidate => path.join(gitRoot, candidate)).find(candidate => existsSync(candidate));
17
+ return found ?? path.join(gitRoot, DEFAULT_CHANGELOG_FILE);
18
+ }
19
+ /**
20
+ ファイルがあれば内容、無ければ undefined
21
+ */
22
+ export function readChangelogIfExists(changelogPath) {
23
+ return existsSync(changelogPath) ? readTextFile(changelogPath) : undefined;
24
+ }
25
+ function readChangelog(changelogPath) {
26
+ const content = readChangelogIfExists(changelogPath);
27
+ if (content === undefined)
28
+ throw new ChangelogFileNotFoundError(changelogNotFoundMessage(changelogPath));
29
+ return content;
30
+ }
31
+ /**
32
+ ファイルから最新バージョンを取る。ファイルが無ければ ChangelogFileNotFoundError
33
+ */
34
+ export function readLatestVersionFromFile(changelogPath) {
35
+ return getLatestVersion(readChangelog(changelogPath), changelogFileName(changelogPath));
36
+ }
37
+ /**
38
+ ファイルから指定バージョンのリリースノートを抽出する。ファイルが無ければ ChangelogFileNotFoundError
39
+ */
40
+ export function extractReleaseNotesFromFile(changelogPath, version) {
41
+ return extractVersionReleaseNotes(readChangelog(changelogPath), version, changelogFileName(changelogPath));
42
+ }
43
+ //# sourceMappingURL=changelog-file.js.map
@@ -0,0 +1,4 @@
1
+ export type ChildStdin = 'inherit' | 'ignore';
2
+ export declare function childStdin(): ChildStdin;
3
+ export declare function setChildStdin(mode: ChildStdin): void;
4
+ //# sourceMappingURL=child-stdin.d.ts.map
@@ -0,0 +1,8 @@
1
+ const state = { mode: 'inherit' };
2
+ export function childStdin() {
3
+ return state.mode;
4
+ }
5
+ export function setChildStdin(mode) {
6
+ state.mode = mode;
7
+ }
8
+ //# sourceMappingURL=child-stdin.js.map
@@ -0,0 +1,49 @@
1
+ import type { ProjectConfig } from '../domain/config.js';
2
+ /**
3
+ 設定ディレクトリ(`{プロジェクトルート}/.pecot/config`)
4
+ */
5
+ export declare function configDirectory(): string;
6
+ /**
7
+ プロジェクト設定ディレクトリ(`.pecot/config/projects`)
8
+ */
9
+ export declare function projectsDirectory(): string;
10
+ /**
11
+ JSON ファイルから設定を読む。無ければ ConfigError、JSON の構文や形が不正なら `invalid config file: {パス}: {詳細}` の ConfigError。
12
+ 詳細は、形の不正なら `場所: 本文` を `; ` でつないだもの(Python と同じ)、構文の不正なら JSON パーサーの文(Python の JSONDecodeError の文とは違う)
13
+ */
14
+ export declare function loadConfig(file: string): ProjectConfig;
15
+ /**
16
+ 設定を JSON ファイルに保存する。親ディレクトリが無ければ作る
17
+ */
18
+ export declare function saveConfig(config: ProjectConfig, file: string): void;
19
+ /**
20
+ .active ファイルが指すアクティブ設定のパス。中身は .active のあるディレクトリ基準の相対パス(絶対パスも可)。
21
+ 設定されていない・指す先が無いときは undefined
22
+ */
23
+ export declare function getActiveConfigPath(): string | undefined;
24
+ export declare function loadActiveConfig(): ProjectConfig | undefined;
25
+ /**
26
+ アクティブ設定を設定する。.active には .active のあるディレクトリ基準の相対パスを書く。ファイルが無ければ ConfigError
27
+ */
28
+ export declare function setActiveConfig(file: string): void;
29
+ export interface FindConfigOptions {
30
+ readonly host?: string | undefined;
31
+ readonly owner?: string | undefined;
32
+ }
33
+ /**
34
+ `{host}_{owner}_*.json` の設定ファイルを探す(プロジェクト名ベース)。host と owner の両方が要る。
35
+ 複数見つかったら MultipleConfigsError(名前順)
36
+ */
37
+ export declare function findConfigFile(options: Readonly<FindConfigOptions>): string | undefined;
38
+ export interface ProjectConfigQuery extends FindConfigOptions {
39
+ /**
40
+ リポジトリ名(owner なし)。アクティブ設定の repositories に含まれるかを先に確かめる
41
+ */
42
+ readonly repository?: string | undefined;
43
+ }
44
+ /**
45
+ プロジェクト設定を取得する。引数なしはアクティブ設定。
46
+ repository だけなら、アクティブ設定の repositories にあればそれを返し、無ければ検索する。見つからなければ undefined
47
+ */
48
+ export declare function getProjectConfig(query?: Readonly<ProjectConfigQuery>): ProjectConfig | undefined;
49
+ //# sourceMappingURL=config-store.d.ts.map