backlog-exporter 0.0.6 → 0.1.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.
- package/README.md +188 -83
- package/dist/commands/all/index.d.ts +1 -6
- package/dist/commands/all/index.js +56 -31
- package/dist/commands/issue/index.d.ts +2 -7
- package/dist/commands/issue/index.js +37 -23
- package/dist/commands/update/index.d.ts +23 -0
- package/dist/commands/update/index.js +237 -0
- package/dist/commands/wiki/index.d.ts +2 -5
- package/dist/commands/wiki/index.js +39 -18
- package/dist/utils/settings.d.ts +42 -0
- package/dist/utils/settings.js +60 -0
- package/oclif.manifest.json +76 -113
- package/package.json +3 -3
- package/dist/commands/hello/index.d.ts +0 -12
- package/dist/commands/hello/index.js +0 -19
- package/dist/commands/hello/world.d.ts +0 -8
- package/dist/commands/hello/world.js +0 -14
package/oclif.manifest.json
CHANGED
|
@@ -2,16 +2,11 @@
|
|
|
2
2
|
"commands": {
|
|
3
3
|
"all": {
|
|
4
4
|
"aliases": [],
|
|
5
|
-
"args": {
|
|
6
|
-
|
|
7
|
-
"description": "URL to download from",
|
|
8
|
-
"name": "url",
|
|
9
|
-
"required": false
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"description": "Backlogからissueとwikiを同時に取得する",
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "Backlogから課題とWikiを取得してMarkdownファイルとして保存する",
|
|
13
7
|
"examples": [
|
|
14
|
-
"<%= config.bin %> <%= command.id %> --domain
|
|
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"
|
|
15
10
|
],
|
|
16
11
|
"flags": {
|
|
17
12
|
"apiKey": {
|
|
@@ -22,16 +17,6 @@
|
|
|
22
17
|
"multiple": false,
|
|
23
18
|
"type": "option"
|
|
24
19
|
},
|
|
25
|
-
"count": {
|
|
26
|
-
"char": "c",
|
|
27
|
-
"description": "一度に取得する課題数",
|
|
28
|
-
"name": "count",
|
|
29
|
-
"required": false,
|
|
30
|
-
"default": 100,
|
|
31
|
-
"hasDynamicHelp": false,
|
|
32
|
-
"multiple": false,
|
|
33
|
-
"type": "option"
|
|
34
|
-
},
|
|
35
20
|
"domain": {
|
|
36
21
|
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
37
22
|
"name": "domain",
|
|
@@ -42,7 +27,7 @@
|
|
|
42
27
|
},
|
|
43
28
|
"output": {
|
|
44
29
|
"char": "o",
|
|
45
|
-
"description": "
|
|
30
|
+
"description": "出力ディレクトリパス",
|
|
46
31
|
"name": "output",
|
|
47
32
|
"required": false,
|
|
48
33
|
"hasDynamicHelp": false,
|
|
@@ -56,14 +41,6 @@
|
|
|
56
41
|
"hasDynamicHelp": false,
|
|
57
42
|
"multiple": false,
|
|
58
43
|
"type": "option"
|
|
59
|
-
},
|
|
60
|
-
"statusId": {
|
|
61
|
-
"description": "Filter issues by status ID",
|
|
62
|
-
"name": "statusId",
|
|
63
|
-
"required": false,
|
|
64
|
-
"hasDynamicHelp": false,
|
|
65
|
-
"multiple": false,
|
|
66
|
-
"type": "option"
|
|
67
44
|
}
|
|
68
45
|
},
|
|
69
46
|
"hasDynamicHelp": false,
|
|
@@ -82,24 +59,43 @@
|
|
|
82
59
|
"index.js"
|
|
83
60
|
]
|
|
84
61
|
},
|
|
85
|
-
"
|
|
62
|
+
"issue": {
|
|
86
63
|
"aliases": [],
|
|
87
|
-
"args": {
|
|
88
|
-
|
|
89
|
-
"description": "Person to say hello to",
|
|
90
|
-
"name": "person",
|
|
91
|
-
"required": true
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"description": "Say hello",
|
|
64
|
+
"args": {},
|
|
65
|
+
"description": "Backlogから課題を取得してMarkdownファイルとして保存する",
|
|
95
66
|
"examples": [
|
|
96
|
-
"<%= config.bin %> <%= command.id %>
|
|
67
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n課題をMarkdownファイルとして保存する\n",
|
|
68
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project\n指定したディレクトリに課題を保存する\n"
|
|
97
69
|
],
|
|
98
70
|
"flags": {
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
71
|
+
"apiKey": {
|
|
72
|
+
"description": "Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)",
|
|
73
|
+
"name": "apiKey",
|
|
74
|
+
"required": false,
|
|
75
|
+
"hasDynamicHelp": false,
|
|
76
|
+
"multiple": false,
|
|
77
|
+
"type": "option"
|
|
78
|
+
},
|
|
79
|
+
"domain": {
|
|
80
|
+
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
81
|
+
"name": "domain",
|
|
82
|
+
"required": true,
|
|
83
|
+
"hasDynamicHelp": false,
|
|
84
|
+
"multiple": false,
|
|
85
|
+
"type": "option"
|
|
86
|
+
},
|
|
87
|
+
"output": {
|
|
88
|
+
"char": "o",
|
|
89
|
+
"description": "出力ディレクトリパス",
|
|
90
|
+
"name": "output",
|
|
91
|
+
"required": false,
|
|
92
|
+
"hasDynamicHelp": false,
|
|
93
|
+
"multiple": false,
|
|
94
|
+
"type": "option"
|
|
95
|
+
},
|
|
96
|
+
"projectIdOrKey": {
|
|
97
|
+
"description": "Backlog project ID or key",
|
|
98
|
+
"name": "projectIdOrKey",
|
|
103
99
|
"required": true,
|
|
104
100
|
"hasDynamicHelp": false,
|
|
105
101
|
"multiple": false,
|
|
@@ -108,7 +104,7 @@
|
|
|
108
104
|
},
|
|
109
105
|
"hasDynamicHelp": false,
|
|
110
106
|
"hiddenAliases": [],
|
|
111
|
-
"id": "
|
|
107
|
+
"id": "issue",
|
|
112
108
|
"pluginAlias": "backlog-exporter",
|
|
113
109
|
"pluginName": "backlog-exporter",
|
|
114
110
|
"pluginType": "core",
|
|
@@ -118,46 +114,25 @@
|
|
|
118
114
|
"relativePath": [
|
|
119
115
|
"dist",
|
|
120
116
|
"commands",
|
|
121
|
-
"
|
|
117
|
+
"issue",
|
|
122
118
|
"index.js"
|
|
123
119
|
]
|
|
124
120
|
},
|
|
125
|
-
"
|
|
126
|
-
"aliases": [],
|
|
127
|
-
"args": {},
|
|
128
|
-
"description": "Say hello world",
|
|
129
|
-
"examples": [
|
|
130
|
-
"<%= config.bin %> <%= command.id %>\nhello world! (./src/commands/hello/world.ts)\n"
|
|
131
|
-
],
|
|
132
|
-
"flags": {},
|
|
133
|
-
"hasDynamicHelp": false,
|
|
134
|
-
"hiddenAliases": [],
|
|
135
|
-
"id": "hello:world",
|
|
136
|
-
"pluginAlias": "backlog-exporter",
|
|
137
|
-
"pluginName": "backlog-exporter",
|
|
138
|
-
"pluginType": "core",
|
|
139
|
-
"strict": true,
|
|
140
|
-
"enableJsonFlag": false,
|
|
141
|
-
"isESM": true,
|
|
142
|
-
"relativePath": [
|
|
143
|
-
"dist",
|
|
144
|
-
"commands",
|
|
145
|
-
"hello",
|
|
146
|
-
"world.js"
|
|
147
|
-
]
|
|
148
|
-
},
|
|
149
|
-
"issue": {
|
|
121
|
+
"update": {
|
|
150
122
|
"aliases": [],
|
|
151
123
|
"args": {
|
|
152
|
-
"
|
|
153
|
-
"description": "
|
|
154
|
-
"name": "
|
|
124
|
+
"directory": {
|
|
125
|
+
"description": "更新対象のディレクトリ(設定ファイルが保存されている場所)",
|
|
126
|
+
"name": "directory",
|
|
155
127
|
"required": false
|
|
156
128
|
}
|
|
157
129
|
},
|
|
158
|
-
"description": "Backlog
|
|
130
|
+
"description": "Backlogから最新データを取得して更新する",
|
|
159
131
|
"examples": [
|
|
160
|
-
"<%= config.bin %> <%= command.id
|
|
132
|
+
"<%= config.bin %> <%= command.id %>\nカレントディレクトリの設定を使用して更新する\n",
|
|
133
|
+
"<%= config.bin %> <%= command.id %> --force\n確認プロンプトをスキップする\n",
|
|
134
|
+
"<%= config.bin %> <%= command.id %> --apiKey YOUR_API_KEY --domain example.backlog.jp --projectIdOrKey PROJECT_KEY\n指定したパラメータで更新する(設定ファイルが存在する場合は上書きされます)\n",
|
|
135
|
+
"<%= config.bin %> <%= command.id %> ./my-project\n指定したディレクトリの設定を使用して更新する\n"
|
|
161
136
|
],
|
|
162
137
|
"flags": {
|
|
163
138
|
"apiKey": {
|
|
@@ -168,54 +143,48 @@
|
|
|
168
143
|
"multiple": false,
|
|
169
144
|
"type": "option"
|
|
170
145
|
},
|
|
171
|
-
"count": {
|
|
172
|
-
"char": "c",
|
|
173
|
-
"description": "一度に取得する課題数",
|
|
174
|
-
"name": "count",
|
|
175
|
-
"required": false,
|
|
176
|
-
"default": 100,
|
|
177
|
-
"hasDynamicHelp": false,
|
|
178
|
-
"multiple": false,
|
|
179
|
-
"type": "option"
|
|
180
|
-
},
|
|
181
146
|
"domain": {
|
|
182
147
|
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
183
148
|
"name": "domain",
|
|
184
|
-
"required":
|
|
149
|
+
"required": false,
|
|
185
150
|
"hasDynamicHelp": false,
|
|
186
151
|
"multiple": false,
|
|
187
152
|
"type": "option"
|
|
188
153
|
},
|
|
189
|
-
"
|
|
190
|
-
"char": "
|
|
191
|
-
"description": "
|
|
192
|
-
"name": "
|
|
154
|
+
"force": {
|
|
155
|
+
"char": "f",
|
|
156
|
+
"description": "確認プロンプトをスキップする",
|
|
157
|
+
"name": "force",
|
|
193
158
|
"required": false,
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
|
|
197
|
-
|
|
159
|
+
"allowNo": false,
|
|
160
|
+
"type": "boolean"
|
|
161
|
+
},
|
|
162
|
+
"issuesOnly": {
|
|
163
|
+
"description": "課題のみを更新する",
|
|
164
|
+
"name": "issuesOnly",
|
|
165
|
+
"required": false,
|
|
166
|
+
"allowNo": false,
|
|
167
|
+
"type": "boolean"
|
|
198
168
|
},
|
|
199
169
|
"projectIdOrKey": {
|
|
200
170
|
"description": "Backlog project ID or key",
|
|
201
171
|
"name": "projectIdOrKey",
|
|
202
|
-
"required":
|
|
172
|
+
"required": false,
|
|
203
173
|
"hasDynamicHelp": false,
|
|
204
174
|
"multiple": false,
|
|
205
175
|
"type": "option"
|
|
206
176
|
},
|
|
207
|
-
"
|
|
208
|
-
"description": "
|
|
209
|
-
"name": "
|
|
177
|
+
"wikisOnly": {
|
|
178
|
+
"description": "Wikiのみを更新する",
|
|
179
|
+
"name": "wikisOnly",
|
|
210
180
|
"required": false,
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"type": "option"
|
|
181
|
+
"allowNo": false,
|
|
182
|
+
"type": "boolean"
|
|
214
183
|
}
|
|
215
184
|
},
|
|
216
185
|
"hasDynamicHelp": false,
|
|
217
186
|
"hiddenAliases": [],
|
|
218
|
-
"id": "
|
|
187
|
+
"id": "update",
|
|
219
188
|
"pluginAlias": "backlog-exporter",
|
|
220
189
|
"pluginName": "backlog-exporter",
|
|
221
190
|
"pluginType": "core",
|
|
@@ -225,22 +194,17 @@
|
|
|
225
194
|
"relativePath": [
|
|
226
195
|
"dist",
|
|
227
196
|
"commands",
|
|
228
|
-
"
|
|
197
|
+
"update",
|
|
229
198
|
"index.js"
|
|
230
199
|
]
|
|
231
200
|
},
|
|
232
201
|
"wiki": {
|
|
233
202
|
"aliases": [],
|
|
234
|
-
"args": {
|
|
235
|
-
|
|
236
|
-
"description": "URL to download from",
|
|
237
|
-
"name": "url",
|
|
238
|
-
"required": false
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
"description": "BacklogからWikiコンテンツをダウンロードする",
|
|
203
|
+
"args": {},
|
|
204
|
+
"description": "Backlogから Wiki を取得してMarkdownファイルとして保存する",
|
|
242
205
|
"examples": [
|
|
243
|
-
"<%= config.bin %> <%= command.id %> --domain
|
|
206
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\nWikiをダウンロードする\n",
|
|
207
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project\n指定したディレクトリにWikiを保存する\n"
|
|
244
208
|
],
|
|
245
209
|
"flags": {
|
|
246
210
|
"apiKey": {
|
|
@@ -264,7 +228,6 @@
|
|
|
264
228
|
"description": "出力ディレクトリパス",
|
|
265
229
|
"name": "output",
|
|
266
230
|
"required": false,
|
|
267
|
-
"default": "./backlog-wiki",
|
|
268
231
|
"hasDynamicHelp": false,
|
|
269
232
|
"multiple": false,
|
|
270
233
|
"type": "option"
|
|
@@ -295,5 +258,5 @@
|
|
|
295
258
|
]
|
|
296
259
|
}
|
|
297
260
|
},
|
|
298
|
-
"version": "0.0
|
|
261
|
+
"version": "0.1.0"
|
|
299
262
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backlog-exporter",
|
|
3
3
|
"description": "A new CLI generated with oclif",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"author": "ShuntaToda",
|
|
6
6
|
"bin": {
|
|
7
7
|
"backlog-exporter": "bin/run.js"
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
],
|
|
58
58
|
"topicSeparator": " ",
|
|
59
59
|
"topics": {
|
|
60
|
-
"
|
|
61
|
-
"description": "
|
|
60
|
+
"update": {
|
|
61
|
+
"description": "Backlogから最新データを取得して更新する"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
},
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
export default class Hello extends Command {
|
|
3
|
-
static args: {
|
|
4
|
-
person: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
-
};
|
|
6
|
-
static description: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static flags: {
|
|
9
|
-
from: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
run(): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Args, Command, Flags } from '@oclif/core';
|
|
2
|
-
export default class Hello extends Command {
|
|
3
|
-
static args = {
|
|
4
|
-
person: Args.string({ description: 'Person to say hello to', required: true }),
|
|
5
|
-
};
|
|
6
|
-
static description = 'Say hello';
|
|
7
|
-
static examples = [
|
|
8
|
-
`<%= config.bin %> <%= command.id %> friend --from oclif
|
|
9
|
-
hello friend from oclif! (./src/commands/hello/index.ts)
|
|
10
|
-
`,
|
|
11
|
-
];
|
|
12
|
-
static flags = {
|
|
13
|
-
from: Flags.string({ char: 'f', description: 'Who is saying hello', required: true }),
|
|
14
|
-
};
|
|
15
|
-
async run() {
|
|
16
|
-
const { args, flags } = await this.parse(Hello);
|
|
17
|
-
this.log(`hello ${args.person} from ${flags.from}! (./src/commands/hello/index.ts)`);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
export default class World extends Command {
|
|
3
|
-
static args = {};
|
|
4
|
-
static description = 'Say hello world';
|
|
5
|
-
static examples = [
|
|
6
|
-
`<%= config.bin %> <%= command.id %>
|
|
7
|
-
hello world! (./src/commands/hello/world.ts)
|
|
8
|
-
`,
|
|
9
|
-
];
|
|
10
|
-
static flags = {};
|
|
11
|
-
async run() {
|
|
12
|
-
this.log('hello world! (./src/commands/hello/world.ts)');
|
|
13
|
-
}
|
|
14
|
-
}
|