atl-fetch 1.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 (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/dist/cli/cli.d.ts +61 -0
  4. package/dist/cli/cli.js +131 -0
  5. package/dist/cli/index.d.ts +5 -0
  6. package/dist/cli/index.js +4 -0
  7. package/dist/index.d.ts +8 -0
  8. package/dist/index.js +13 -0
  9. package/dist/ports/file/file-port.d.ts +89 -0
  10. package/dist/ports/file/file-port.js +155 -0
  11. package/dist/ports/file/index.d.ts +1 -0
  12. package/dist/ports/file/index.js +1 -0
  13. package/dist/ports/http/http-port.d.ts +107 -0
  14. package/dist/ports/http/http-port.js +238 -0
  15. package/dist/ports/http/index.d.ts +1 -0
  16. package/dist/ports/http/index.js +1 -0
  17. package/dist/services/auth/auth-service.d.ts +79 -0
  18. package/dist/services/auth/auth-service.js +158 -0
  19. package/dist/services/auth/index.d.ts +1 -0
  20. package/dist/services/auth/index.js +1 -0
  21. package/dist/services/confluence/confluence-service.d.ts +152 -0
  22. package/dist/services/confluence/confluence-service.js +510 -0
  23. package/dist/services/confluence/index.d.ts +1 -0
  24. package/dist/services/confluence/index.js +1 -0
  25. package/dist/services/diff/diff-service.d.ts +84 -0
  26. package/dist/services/diff/diff-service.js +881 -0
  27. package/dist/services/diff/index.d.ts +1 -0
  28. package/dist/services/diff/index.js +1 -0
  29. package/dist/services/fetch/fetch-service.d.ts +112 -0
  30. package/dist/services/fetch/fetch-service.js +302 -0
  31. package/dist/services/fetch/index.d.ts +1 -0
  32. package/dist/services/fetch/index.js +1 -0
  33. package/dist/services/jira/index.d.ts +1 -0
  34. package/dist/services/jira/index.js +1 -0
  35. package/dist/services/jira/jira-service.d.ts +100 -0
  36. package/dist/services/jira/jira-service.js +354 -0
  37. package/dist/services/output/index.d.ts +4 -0
  38. package/dist/services/output/index.js +4 -0
  39. package/dist/services/output/output-service.d.ts +67 -0
  40. package/dist/services/output/output-service.js +228 -0
  41. package/dist/services/storage/index.d.ts +6 -0
  42. package/dist/services/storage/index.js +6 -0
  43. package/dist/services/storage/storage-service.d.ts +77 -0
  44. package/dist/services/storage/storage-service.js +738 -0
  45. package/dist/services/text-converter/index.d.ts +1 -0
  46. package/dist/services/text-converter/index.js +1 -0
  47. package/dist/services/text-converter/text-converter.d.ts +35 -0
  48. package/dist/services/text-converter/text-converter.js +681 -0
  49. package/dist/services/url-parser/index.d.ts +1 -0
  50. package/dist/services/url-parser/index.js +1 -0
  51. package/dist/services/url-parser/url-parser.d.ts +43 -0
  52. package/dist/services/url-parser/url-parser.js +283 -0
  53. package/dist/types/auth.d.ts +25 -0
  54. package/dist/types/auth.js +1 -0
  55. package/dist/types/confluence.d.ts +68 -0
  56. package/dist/types/confluence.js +1 -0
  57. package/dist/types/diff.d.ts +77 -0
  58. package/dist/types/diff.js +7 -0
  59. package/dist/types/fetch.d.ts +65 -0
  60. package/dist/types/fetch.js +1 -0
  61. package/dist/types/file.d.ts +22 -0
  62. package/dist/types/file.js +1 -0
  63. package/dist/types/http.d.ts +45 -0
  64. package/dist/types/http.js +1 -0
  65. package/dist/types/jira.d.ts +90 -0
  66. package/dist/types/jira.js +1 -0
  67. package/dist/types/output.d.ts +55 -0
  68. package/dist/types/output.js +7 -0
  69. package/dist/types/result.d.ts +104 -0
  70. package/dist/types/result.js +119 -0
  71. package/dist/types/storage.d.ts +209 -0
  72. package/dist/types/storage.js +6 -0
  73. package/dist/types/url-parser.d.ts +46 -0
  74. package/dist/types/url-parser.js +1 -0
  75. package/package.json +106 -0
@@ -0,0 +1,84 @@
1
+ import type { ConfluenceVersion } from '../../types/confluence.js';
2
+ import type { DiffOptions, DiffResult } from '../../types/diff.js';
3
+ import type { JiraChangelogEntry } from '../../types/jira.js';
4
+ /**
5
+ * 2つのテキスト間の差分を計算する
6
+ *
7
+ * unified diff 形式で差分を出力し、差分統計を計算する。
8
+ * diff ライブラリを使用して行単位の差分を検出する。
9
+ *
10
+ * @param oldText - 変更前のテキスト
11
+ * @param newText - 変更後のテキスト
12
+ * @param options - 差分オプション
13
+ * @returns 差分結果
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * // 基本的な使用例
18
+ * const result = diffText('Hello', 'Goodbye', { colorEnabled: false });
19
+ * console.log(result.formatted);
20
+ * // @@ -1,1 +1,1 @@
21
+ * // -Hello
22
+ * // +Goodbye
23
+ * ```
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // 差分統計の確認
28
+ * const result = diffText('A\nB\nC', 'A\nX\nC', { colorEnabled: false });
29
+ * console.log(result.stats.additions); // 1
30
+ * console.log(result.stats.deletions); // 1
31
+ * ```
32
+ */
33
+ export declare function diffText(oldText: string, newText: string, options: DiffOptions): DiffResult;
34
+ /**
35
+ * Jira changelog を差分形式でフォーマットする
36
+ *
37
+ * 各変更のフィールド名、変更前の値、変更後の値を表示する。
38
+ * カラー出力が有効な場合、追加行を緑、削除行を赤でハイライトする。
39
+ *
40
+ * @param changelog - Jira の変更履歴
41
+ * @param options - 差分オプション
42
+ * @returns フォーマットされた差分文字列
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * const changelog = [{
47
+ * id: '12345',
48
+ * author: 'John Doe',
49
+ * created: '2024-01-15T10:30:00.000+0900',
50
+ * items: [{ field: 'status', fromString: 'Open', toString: 'In Progress' }]
51
+ * }];
52
+ * const result = formatJiraChangelog(changelog, { colorEnabled: false });
53
+ * // Changelog #12345 by John Doe at 2024-01-15T10:30:00.000+0900
54
+ * // [status]
55
+ * // - status: Open
56
+ * // + status: In Progress
57
+ * ```
58
+ */
59
+ export declare function formatJiraChangelog(changelog: readonly JiraChangelogEntry[], options: DiffOptions): string;
60
+ /**
61
+ * Confluence バージョン間の差分をフォーマットする
62
+ *
63
+ * 2つの Confluence バージョン間の本文差分を計算し、unified diff 形式で出力する。
64
+ * ヘッダーにはバージョン番号、作成者、差分統計が含まれる。
65
+ * カラー出力が有効な場合、追加行を緑、削除行を赤でハイライトする。
66
+ *
67
+ * @param oldVersion - 変更前のバージョン
68
+ * @param newVersion - 変更後のバージョン
69
+ * @param options - 差分オプション
70
+ * @returns フォーマットされた差分文字列
71
+ *
72
+ * @example
73
+ * ```typescript
74
+ * const oldVersion = { number: 1, by: 'John', when: '2024-01-15', message: null, body: 'Hello' };
75
+ * const newVersion = { number: 2, by: 'Jane', when: '2024-01-16', message: 'Updated', body: 'Hello, World!' };
76
+ * const result = formatConfluenceVersionDiff(oldVersion, newVersion, { colorEnabled: false });
77
+ * // v1 → v2 by Jane (+1, -1)
78
+ * // Updated
79
+ * // @@ -1,1 +1,1 @@
80
+ * // -Hello
81
+ * // +Hello, World!
82
+ * ```
83
+ */
84
+ export declare function formatConfluenceVersionDiff(oldVersion: ConfluenceVersion, newVersion: ConfluenceVersion, options: DiffOptions): string;