backlog-exporter 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -82
- package/dist/commands/all/index.d.ts +17 -0
- package/dist/commands/all/index.js +210 -0
- package/dist/commands/document/index.d.ts +13 -0
- package/dist/commands/document/index.js +84 -0
- package/dist/commands/issue/index.d.ts +16 -0
- package/dist/commands/issue/index.js +114 -0
- package/dist/commands/update/index.d.ts +27 -0
- package/dist/commands/update/index.js +344 -0
- package/dist/commands/wiki/index.d.ts +12 -0
- package/dist/commands/wiki/index.js +71 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/backlog-api.d.ts +74 -0
- package/dist/utils/backlog-api.js +448 -0
- package/dist/utils/backlog.d.ts +16 -0
- package/dist/utils/backlog.js +34 -0
- package/dist/utils/common.d.ts +25 -0
- package/dist/utils/common.js +54 -0
- package/dist/utils/log.d.ts +6 -0
- package/dist/utils/log.js +18 -0
- package/dist/utils/settings.d.ts +45 -0
- package/dist/utils/settings.js +63 -0
- package/dist/utils/sleep.d.ts +28 -0
- package/dist/utils/sleep.js +42 -0
- package/oclif.manifest.json +435 -2
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* フォルダタイプの定義
|
|
5
|
+
*/
|
|
6
|
+
export var FolderType;
|
|
7
|
+
(function (FolderType) {
|
|
8
|
+
FolderType["DOCUMENT"] = "document";
|
|
9
|
+
FolderType["ISSUE"] = "issue";
|
|
10
|
+
FolderType["WIKI"] = "wiki";
|
|
11
|
+
})(FolderType || (FolderType = {}));
|
|
12
|
+
/**
|
|
13
|
+
* 設定ファイルのパスを取得する
|
|
14
|
+
* @param directory 設定ファイルを保存するディレクトリ
|
|
15
|
+
* @returns 設定ファイルのパス
|
|
16
|
+
*/
|
|
17
|
+
export function getSettingsFilePath(directory) {
|
|
18
|
+
return join(directory, 'backlog-settings.json');
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 設定ファイルを読み込む
|
|
22
|
+
* @param directory 設定ファイルが保存されているディレクトリ
|
|
23
|
+
* @returns 設定情報
|
|
24
|
+
*/
|
|
25
|
+
export async function loadSettings(directory) {
|
|
26
|
+
const settingsPath = getSettingsFilePath(directory);
|
|
27
|
+
try {
|
|
28
|
+
const data = await fs.readFile(settingsPath, 'utf8');
|
|
29
|
+
return JSON.parse(data);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
// ファイルが存在しない場合や読み込みエラーの場合は空のオブジェクトを返す
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 設定ファイルを保存する
|
|
38
|
+
* @param directory 設定ファイルを保存するディレクトリ
|
|
39
|
+
* @param settings 保存する設定情報
|
|
40
|
+
*/
|
|
41
|
+
export async function saveSettings(directory, settings) {
|
|
42
|
+
const settingsPath = getSettingsFilePath(directory);
|
|
43
|
+
// ディレクトリが存在しない場合は作成
|
|
44
|
+
await fs.mkdir(directory, { recursive: true });
|
|
45
|
+
// 設定ファイルを保存
|
|
46
|
+
await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2), 'utf8');
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 設定ファイルを更新する
|
|
50
|
+
* @param directory 設定ファイルを保存するディレクトリ
|
|
51
|
+
* @param newSettings 更新する設定情報
|
|
52
|
+
*/
|
|
53
|
+
export async function updateSettings(directory, newSettings) {
|
|
54
|
+
// 既存の設定を読み込む
|
|
55
|
+
const currentSettings = await loadSettings(directory);
|
|
56
|
+
// 新しい設定で更新(apiKeyは除外)
|
|
57
|
+
const { apiKey, ...settingsToSave } = newSettings;
|
|
58
|
+
const updatedSettings = { ...currentSettings, ...settingsToSave };
|
|
59
|
+
// 更新した設定を保存
|
|
60
|
+
await saveSettings(directory, updatedSettings);
|
|
61
|
+
// apiKeyは戻り値には含める
|
|
62
|
+
return { ...updatedSettings, apiKey };
|
|
63
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* 指定したミリ秒だけ待機する
|
|
4
|
+
* @param ms 待機時間(ミリ秒)
|
|
5
|
+
*/
|
|
6
|
+
export declare const sleep: (ms: number) => Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* APIリクエストのレート制限対策のためのユーティリティ
|
|
9
|
+
* 100リクエストごとに15秒間待機する
|
|
10
|
+
*/
|
|
11
|
+
export declare class RateLimiter {
|
|
12
|
+
private readonly command;
|
|
13
|
+
private requestCount;
|
|
14
|
+
constructor(command: Command);
|
|
15
|
+
/**
|
|
16
|
+
* 現在のリクエスト数を取得する
|
|
17
|
+
*/
|
|
18
|
+
getCount(): number;
|
|
19
|
+
/**
|
|
20
|
+
* APIリクエストをカウントし、必要に応じて待機する
|
|
21
|
+
* @returns 現在のリクエスト数
|
|
22
|
+
*/
|
|
23
|
+
increment(): Promise<number>;
|
|
24
|
+
/**
|
|
25
|
+
* リクエスト数を設定する
|
|
26
|
+
*/
|
|
27
|
+
setCount(count: number): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 指定したミリ秒だけ待機する
|
|
3
|
+
* @param ms 待機時間(ミリ秒)
|
|
4
|
+
*/
|
|
5
|
+
export const sleep = (ms) => new Promise((resolve) => {
|
|
6
|
+
setTimeout(resolve, ms);
|
|
7
|
+
});
|
|
8
|
+
/**
|
|
9
|
+
* APIリクエストのレート制限対策のためのユーティリティ
|
|
10
|
+
* 100リクエストごとに15秒間待機する
|
|
11
|
+
*/
|
|
12
|
+
export class RateLimiter {
|
|
13
|
+
command;
|
|
14
|
+
requestCount = 0;
|
|
15
|
+
constructor(command) {
|
|
16
|
+
this.command = command;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 現在のリクエスト数を取得する
|
|
20
|
+
*/
|
|
21
|
+
getCount() {
|
|
22
|
+
return this.requestCount;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* APIリクエストをカウントし、必要に応じて待機する
|
|
26
|
+
* @returns 現在のリクエスト数
|
|
27
|
+
*/
|
|
28
|
+
async increment() {
|
|
29
|
+
this.requestCount++;
|
|
30
|
+
if (this.requestCount > 1 && this.requestCount % 100 === 0) {
|
|
31
|
+
this.command.log('レート制限を回避するため15秒間待機します...');
|
|
32
|
+
await sleep(15_000);
|
|
33
|
+
}
|
|
34
|
+
return this.requestCount;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* リクエスト数を設定する
|
|
38
|
+
*/
|
|
39
|
+
setCount(count) {
|
|
40
|
+
this.requestCount = count;
|
|
41
|
+
}
|
|
42
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,4 +1,437 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commands": {
|
|
3
|
-
|
|
2
|
+
"commands": {
|
|
3
|
+
"all": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "Backlogから課題・Wiki・ドキュメントを取得してMarkdownファイルとして保存する",
|
|
7
|
+
"examples": [
|
|
8
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n課題・Wiki・ドキュメントをMarkdownファイルとして保存する\n",
|
|
9
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project\n指定したディレクトリに課題・Wiki・ドキュメントを保存する\n",
|
|
10
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki\n課題とWikiのみを取得する\n",
|
|
11
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents\nドキュメント以外(課題とWiki)を取得する\n",
|
|
12
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 1000\n最大1000件の課題を取得する(デフォルトは5000件)\n",
|
|
13
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFileName\nファイル名を課題キーにする\n",
|
|
14
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFolder\n課題キーでフォルダを作成する\n",
|
|
15
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFileName --issueKeyFolder\n課題キーでフォルダを作成し、ファイル名も課題キーにする\n"
|
|
16
|
+
],
|
|
17
|
+
"flags": {
|
|
18
|
+
"apiKey": {
|
|
19
|
+
"description": "Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)",
|
|
20
|
+
"name": "apiKey",
|
|
21
|
+
"required": false,
|
|
22
|
+
"hasDynamicHelp": false,
|
|
23
|
+
"multiple": false,
|
|
24
|
+
"type": "option"
|
|
25
|
+
},
|
|
26
|
+
"domain": {
|
|
27
|
+
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
28
|
+
"name": "domain",
|
|
29
|
+
"required": true,
|
|
30
|
+
"hasDynamicHelp": false,
|
|
31
|
+
"multiple": false,
|
|
32
|
+
"type": "option"
|
|
33
|
+
},
|
|
34
|
+
"exclude": {
|
|
35
|
+
"description": "Exclude the specified types, separated by commas (e.g., 'documents,wiki')",
|
|
36
|
+
"name": "exclude",
|
|
37
|
+
"required": false,
|
|
38
|
+
"hasDynamicHelp": false,
|
|
39
|
+
"multiple": false,
|
|
40
|
+
"type": "option"
|
|
41
|
+
},
|
|
42
|
+
"issueKeyFileName": {
|
|
43
|
+
"description": "ファイル名を課題キーにする",
|
|
44
|
+
"name": "issueKeyFileName",
|
|
45
|
+
"required": false,
|
|
46
|
+
"allowNo": false,
|
|
47
|
+
"type": "boolean"
|
|
48
|
+
},
|
|
49
|
+
"issueKeyFolder": {
|
|
50
|
+
"description": "課題キーでフォルダを作成する",
|
|
51
|
+
"name": "issueKeyFolder",
|
|
52
|
+
"required": false,
|
|
53
|
+
"allowNo": false,
|
|
54
|
+
"type": "boolean"
|
|
55
|
+
},
|
|
56
|
+
"maxCount": {
|
|
57
|
+
"char": "m",
|
|
58
|
+
"description": "一度に取得する課題の最大数(デフォルト: 5000)",
|
|
59
|
+
"name": "maxCount",
|
|
60
|
+
"required": false,
|
|
61
|
+
"default": 5000,
|
|
62
|
+
"hasDynamicHelp": false,
|
|
63
|
+
"multiple": false,
|
|
64
|
+
"type": "option"
|
|
65
|
+
},
|
|
66
|
+
"only": {
|
|
67
|
+
"description": "Export only the specified types, separated by commas (e.g., 'issues,wiki')",
|
|
68
|
+
"name": "only",
|
|
69
|
+
"required": false,
|
|
70
|
+
"hasDynamicHelp": false,
|
|
71
|
+
"multiple": false,
|
|
72
|
+
"type": "option"
|
|
73
|
+
},
|
|
74
|
+
"output": {
|
|
75
|
+
"char": "o",
|
|
76
|
+
"description": "出力ディレクトリパス",
|
|
77
|
+
"name": "output",
|
|
78
|
+
"required": false,
|
|
79
|
+
"hasDynamicHelp": false,
|
|
80
|
+
"multiple": false,
|
|
81
|
+
"type": "option"
|
|
82
|
+
},
|
|
83
|
+
"projectIdOrKey": {
|
|
84
|
+
"description": "Backlog project ID or key",
|
|
85
|
+
"name": "projectIdOrKey",
|
|
86
|
+
"required": true,
|
|
87
|
+
"hasDynamicHelp": false,
|
|
88
|
+
"multiple": false,
|
|
89
|
+
"type": "option"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"hasDynamicHelp": false,
|
|
93
|
+
"hiddenAliases": [],
|
|
94
|
+
"id": "all",
|
|
95
|
+
"pluginAlias": "backlog-exporter",
|
|
96
|
+
"pluginName": "backlog-exporter",
|
|
97
|
+
"pluginType": "core",
|
|
98
|
+
"strict": true,
|
|
99
|
+
"enableJsonFlag": false,
|
|
100
|
+
"isESM": true,
|
|
101
|
+
"relativePath": [
|
|
102
|
+
"dist",
|
|
103
|
+
"commands",
|
|
104
|
+
"all",
|
|
105
|
+
"index.js"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"issue": {
|
|
109
|
+
"aliases": [],
|
|
110
|
+
"args": {},
|
|
111
|
+
"description": "Backlogから課題を取得してMarkdownファイルとして保存する",
|
|
112
|
+
"examples": [
|
|
113
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n課題をMarkdownファイルとして保存する\n",
|
|
114
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-issues\n指定したディレクトリに課題を保存する\n",
|
|
115
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --statusId 1,2,3\n指定したステータスIDの課題のみを取得する\n",
|
|
116
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 10000\n最大10000件の課題を取得する(デフォルトは5000件)\n",
|
|
117
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFileName\nファイル名を課題キーにする\n",
|
|
118
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFolder\n課題キーでフォルダを作成する\n",
|
|
119
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFileName --issueKeyFolder\n課題キーでフォルダを作成し、ファイル名も課題キーにする\n"
|
|
120
|
+
],
|
|
121
|
+
"flags": {
|
|
122
|
+
"apiKey": {
|
|
123
|
+
"description": "Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)",
|
|
124
|
+
"name": "apiKey",
|
|
125
|
+
"required": false,
|
|
126
|
+
"hasDynamicHelp": false,
|
|
127
|
+
"multiple": false,
|
|
128
|
+
"type": "option"
|
|
129
|
+
},
|
|
130
|
+
"domain": {
|
|
131
|
+
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
132
|
+
"name": "domain",
|
|
133
|
+
"required": true,
|
|
134
|
+
"hasDynamicHelp": false,
|
|
135
|
+
"multiple": false,
|
|
136
|
+
"type": "option"
|
|
137
|
+
},
|
|
138
|
+
"issueKeyFileName": {
|
|
139
|
+
"description": "ファイル名を課題キーにする",
|
|
140
|
+
"name": "issueKeyFileName",
|
|
141
|
+
"required": false,
|
|
142
|
+
"allowNo": false,
|
|
143
|
+
"type": "boolean"
|
|
144
|
+
},
|
|
145
|
+
"issueKeyFolder": {
|
|
146
|
+
"description": "課題キーでフォルダを作成する",
|
|
147
|
+
"name": "issueKeyFolder",
|
|
148
|
+
"required": false,
|
|
149
|
+
"allowNo": false,
|
|
150
|
+
"type": "boolean"
|
|
151
|
+
},
|
|
152
|
+
"maxCount": {
|
|
153
|
+
"char": "m",
|
|
154
|
+
"description": "一度に取得する課題の最大数(デフォルト: 5000)",
|
|
155
|
+
"name": "maxCount",
|
|
156
|
+
"required": false,
|
|
157
|
+
"default": 5000,
|
|
158
|
+
"hasDynamicHelp": false,
|
|
159
|
+
"multiple": false,
|
|
160
|
+
"type": "option"
|
|
161
|
+
},
|
|
162
|
+
"output": {
|
|
163
|
+
"char": "o",
|
|
164
|
+
"description": "出力ディレクトリパス",
|
|
165
|
+
"name": "output",
|
|
166
|
+
"required": false,
|
|
167
|
+
"hasDynamicHelp": false,
|
|
168
|
+
"multiple": false,
|
|
169
|
+
"type": "option"
|
|
170
|
+
},
|
|
171
|
+
"projectIdOrKey": {
|
|
172
|
+
"description": "Backlog project ID or key",
|
|
173
|
+
"name": "projectIdOrKey",
|
|
174
|
+
"required": true,
|
|
175
|
+
"hasDynamicHelp": false,
|
|
176
|
+
"multiple": false,
|
|
177
|
+
"type": "option"
|
|
178
|
+
},
|
|
179
|
+
"statusId": {
|
|
180
|
+
"description": "ステータスID(カンマ区切りで複数指定可能)",
|
|
181
|
+
"name": "statusId",
|
|
182
|
+
"required": false,
|
|
183
|
+
"hasDynamicHelp": false,
|
|
184
|
+
"multiple": false,
|
|
185
|
+
"type": "option"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"hasDynamicHelp": false,
|
|
189
|
+
"hiddenAliases": [],
|
|
190
|
+
"id": "issue",
|
|
191
|
+
"pluginAlias": "backlog-exporter",
|
|
192
|
+
"pluginName": "backlog-exporter",
|
|
193
|
+
"pluginType": "core",
|
|
194
|
+
"strict": true,
|
|
195
|
+
"enableJsonFlag": false,
|
|
196
|
+
"isESM": true,
|
|
197
|
+
"relativePath": [
|
|
198
|
+
"dist",
|
|
199
|
+
"commands",
|
|
200
|
+
"issue",
|
|
201
|
+
"index.js"
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"document": {
|
|
205
|
+
"aliases": [],
|
|
206
|
+
"args": {},
|
|
207
|
+
"description": "Backlogからドキュメントを取得してMarkdownファイルとして保存する",
|
|
208
|
+
"examples": [
|
|
209
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\nドキュメントをMarkdownファイルとして保存する\n",
|
|
210
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-documents\n指定したディレクトリにドキュメントを保存する\n",
|
|
211
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --keyword 仕様書\nキーワード「仕様書」を含むドキュメントのみを取得する\n"
|
|
212
|
+
],
|
|
213
|
+
"flags": {
|
|
214
|
+
"apiKey": {
|
|
215
|
+
"description": "Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)",
|
|
216
|
+
"name": "apiKey",
|
|
217
|
+
"required": false,
|
|
218
|
+
"hasDynamicHelp": false,
|
|
219
|
+
"multiple": false,
|
|
220
|
+
"type": "option"
|
|
221
|
+
},
|
|
222
|
+
"domain": {
|
|
223
|
+
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
224
|
+
"name": "domain",
|
|
225
|
+
"required": true,
|
|
226
|
+
"hasDynamicHelp": false,
|
|
227
|
+
"multiple": false,
|
|
228
|
+
"type": "option"
|
|
229
|
+
},
|
|
230
|
+
"keyword": {
|
|
231
|
+
"description": "検索キーワード",
|
|
232
|
+
"name": "keyword",
|
|
233
|
+
"required": false,
|
|
234
|
+
"hasDynamicHelp": false,
|
|
235
|
+
"multiple": false,
|
|
236
|
+
"type": "option"
|
|
237
|
+
},
|
|
238
|
+
"output": {
|
|
239
|
+
"char": "o",
|
|
240
|
+
"description": "出力ディレクトリパス",
|
|
241
|
+
"name": "output",
|
|
242
|
+
"required": false,
|
|
243
|
+
"hasDynamicHelp": false,
|
|
244
|
+
"multiple": false,
|
|
245
|
+
"type": "option"
|
|
246
|
+
},
|
|
247
|
+
"projectIdOrKey": {
|
|
248
|
+
"description": "Backlog project ID or key",
|
|
249
|
+
"name": "projectIdOrKey",
|
|
250
|
+
"required": true,
|
|
251
|
+
"hasDynamicHelp": false,
|
|
252
|
+
"multiple": false,
|
|
253
|
+
"type": "option"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"hasDynamicHelp": false,
|
|
257
|
+
"hiddenAliases": [],
|
|
258
|
+
"id": "document",
|
|
259
|
+
"pluginAlias": "backlog-exporter",
|
|
260
|
+
"pluginName": "backlog-exporter",
|
|
261
|
+
"pluginType": "core",
|
|
262
|
+
"strict": true,
|
|
263
|
+
"enableJsonFlag": false,
|
|
264
|
+
"isESM": true,
|
|
265
|
+
"relativePath": [
|
|
266
|
+
"dist",
|
|
267
|
+
"commands",
|
|
268
|
+
"document",
|
|
269
|
+
"index.js"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
"update": {
|
|
273
|
+
"aliases": [],
|
|
274
|
+
"args": {
|
|
275
|
+
"directory": {
|
|
276
|
+
"description": "更新対象のディレクトリ(設定ファイルが保存されている場所)",
|
|
277
|
+
"name": "directory",
|
|
278
|
+
"required": false
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"description": "Backlogから最新データを取得して更新する",
|
|
282
|
+
"examples": [
|
|
283
|
+
"<%= config.bin %> <%= command.id %>\nカレントディレクトリの設定を使用して更新する\n",
|
|
284
|
+
"<%= config.bin %> <%= command.id %> --force\n確認プロンプトをスキップする\n",
|
|
285
|
+
"<%= config.bin %> <%= command.id %> --apiKey YOUR_API_KEY --domain example.backlog.jp --projectIdOrKey PROJECT_KEY\n指定したパラメータで更新する(設定ファイルが存在する場合は上書きされます)\n",
|
|
286
|
+
"<%= config.bin %> <%= command.id %> ./my-project\n指定したディレクトリの設定を使用して更新する\n",
|
|
287
|
+
"<%= config.bin %> <%= command.id %> --issueKeyFileName\nファイル名を課題キーにする\n",
|
|
288
|
+
"<%= config.bin %> <%= command.id %> --issueKeyFolder\n課題キーでフォルダを作成する\n",
|
|
289
|
+
"<%= config.bin %> <%= command.id %> --issueKeyFileName --issueKeyFolder\n課題キーでフォルダを作成し、ファイル名も課題キーにする\n"
|
|
290
|
+
],
|
|
291
|
+
"flags": {
|
|
292
|
+
"apiKey": {
|
|
293
|
+
"description": "Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)",
|
|
294
|
+
"name": "apiKey",
|
|
295
|
+
"required": false,
|
|
296
|
+
"hasDynamicHelp": false,
|
|
297
|
+
"multiple": false,
|
|
298
|
+
"type": "option"
|
|
299
|
+
},
|
|
300
|
+
"documentsOnly": {
|
|
301
|
+
"description": "ドキュメントのみを更新する",
|
|
302
|
+
"name": "documentsOnly",
|
|
303
|
+
"required": false,
|
|
304
|
+
"allowNo": false,
|
|
305
|
+
"type": "boolean"
|
|
306
|
+
},
|
|
307
|
+
"domain": {
|
|
308
|
+
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
309
|
+
"name": "domain",
|
|
310
|
+
"required": false,
|
|
311
|
+
"hasDynamicHelp": false,
|
|
312
|
+
"multiple": false,
|
|
313
|
+
"type": "option"
|
|
314
|
+
},
|
|
315
|
+
"force": {
|
|
316
|
+
"char": "f",
|
|
317
|
+
"description": "確認プロンプトをスキップする",
|
|
318
|
+
"name": "force",
|
|
319
|
+
"required": false,
|
|
320
|
+
"allowNo": false,
|
|
321
|
+
"type": "boolean"
|
|
322
|
+
},
|
|
323
|
+
"issueKeyFileName": {
|
|
324
|
+
"description": "ファイル名を課題キーにする",
|
|
325
|
+
"name": "issueKeyFileName",
|
|
326
|
+
"required": false,
|
|
327
|
+
"allowNo": false,
|
|
328
|
+
"type": "boolean"
|
|
329
|
+
},
|
|
330
|
+
"issueKeyFolder": {
|
|
331
|
+
"description": "課題キーでフォルダを作成する",
|
|
332
|
+
"name": "issueKeyFolder",
|
|
333
|
+
"required": false,
|
|
334
|
+
"allowNo": false,
|
|
335
|
+
"type": "boolean"
|
|
336
|
+
},
|
|
337
|
+
"issuesOnly": {
|
|
338
|
+
"description": "課題のみを更新する",
|
|
339
|
+
"name": "issuesOnly",
|
|
340
|
+
"required": false,
|
|
341
|
+
"allowNo": false,
|
|
342
|
+
"type": "boolean"
|
|
343
|
+
},
|
|
344
|
+
"projectIdOrKey": {
|
|
345
|
+
"description": "Backlog project ID or key",
|
|
346
|
+
"name": "projectIdOrKey",
|
|
347
|
+
"required": false,
|
|
348
|
+
"hasDynamicHelp": false,
|
|
349
|
+
"multiple": false,
|
|
350
|
+
"type": "option"
|
|
351
|
+
},
|
|
352
|
+
"wikisOnly": {
|
|
353
|
+
"description": "Wikiのみを更新する",
|
|
354
|
+
"name": "wikisOnly",
|
|
355
|
+
"required": false,
|
|
356
|
+
"allowNo": false,
|
|
357
|
+
"type": "boolean"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"hasDynamicHelp": false,
|
|
361
|
+
"hiddenAliases": [],
|
|
362
|
+
"id": "update",
|
|
363
|
+
"pluginAlias": "backlog-exporter",
|
|
364
|
+
"pluginName": "backlog-exporter",
|
|
365
|
+
"pluginType": "core",
|
|
366
|
+
"strict": true,
|
|
367
|
+
"enableJsonFlag": false,
|
|
368
|
+
"isESM": true,
|
|
369
|
+
"relativePath": [
|
|
370
|
+
"dist",
|
|
371
|
+
"commands",
|
|
372
|
+
"update",
|
|
373
|
+
"index.js"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
"wiki": {
|
|
377
|
+
"aliases": [],
|
|
378
|
+
"args": {},
|
|
379
|
+
"description": "Backlogから Wiki を取得してMarkdownファイルとして保存する",
|
|
380
|
+
"examples": [
|
|
381
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\nWikiをダウンロードする\n",
|
|
382
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project\n指定したディレクトリにWikiを保存する\n"
|
|
383
|
+
],
|
|
384
|
+
"flags": {
|
|
385
|
+
"apiKey": {
|
|
386
|
+
"description": "Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)",
|
|
387
|
+
"name": "apiKey",
|
|
388
|
+
"required": false,
|
|
389
|
+
"hasDynamicHelp": false,
|
|
390
|
+
"multiple": false,
|
|
391
|
+
"type": "option"
|
|
392
|
+
},
|
|
393
|
+
"domain": {
|
|
394
|
+
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
395
|
+
"name": "domain",
|
|
396
|
+
"required": true,
|
|
397
|
+
"hasDynamicHelp": false,
|
|
398
|
+
"multiple": false,
|
|
399
|
+
"type": "option"
|
|
400
|
+
},
|
|
401
|
+
"output": {
|
|
402
|
+
"char": "o",
|
|
403
|
+
"description": "出力ディレクトリパス",
|
|
404
|
+
"name": "output",
|
|
405
|
+
"required": false,
|
|
406
|
+
"hasDynamicHelp": false,
|
|
407
|
+
"multiple": false,
|
|
408
|
+
"type": "option"
|
|
409
|
+
},
|
|
410
|
+
"projectIdOrKey": {
|
|
411
|
+
"description": "Backlog project ID or key",
|
|
412
|
+
"name": "projectIdOrKey",
|
|
413
|
+
"required": true,
|
|
414
|
+
"hasDynamicHelp": false,
|
|
415
|
+
"multiple": false,
|
|
416
|
+
"type": "option"
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"hasDynamicHelp": false,
|
|
420
|
+
"hiddenAliases": [],
|
|
421
|
+
"id": "wiki",
|
|
422
|
+
"pluginAlias": "backlog-exporter",
|
|
423
|
+
"pluginName": "backlog-exporter",
|
|
424
|
+
"pluginType": "core",
|
|
425
|
+
"strict": true,
|
|
426
|
+
"enableJsonFlag": false,
|
|
427
|
+
"isESM": true,
|
|
428
|
+
"relativePath": [
|
|
429
|
+
"dist",
|
|
430
|
+
"commands",
|
|
431
|
+
"wiki",
|
|
432
|
+
"index.js"
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"version": "0.7.2"
|
|
4
437
|
}
|