backlog-exporter 0.0.6 → 0.1.1
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 +67 -104
- package/package.json +4 -4
- 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,33 +59,73 @@
|
|
|
82
59
|
"index.js"
|
|
83
60
|
]
|
|
84
61
|
},
|
|
85
|
-
"
|
|
62
|
+
"update": {
|
|
86
63
|
"aliases": [],
|
|
87
64
|
"args": {
|
|
88
|
-
"
|
|
89
|
-
"description": "
|
|
90
|
-
"name": "
|
|
91
|
-
"required":
|
|
65
|
+
"directory": {
|
|
66
|
+
"description": "更新対象のディレクトリ(設定ファイルが保存されている場所)",
|
|
67
|
+
"name": "directory",
|
|
68
|
+
"required": false
|
|
92
69
|
}
|
|
93
70
|
},
|
|
94
|
-
"description": "
|
|
71
|
+
"description": "Backlogから最新データを取得して更新する",
|
|
95
72
|
"examples": [
|
|
96
|
-
"<%= config.bin %> <%= command.id
|
|
73
|
+
"<%= config.bin %> <%= command.id %>\nカレントディレクトリの設定を使用して更新する\n",
|
|
74
|
+
"<%= config.bin %> <%= command.id %> --force\n確認プロンプトをスキップする\n",
|
|
75
|
+
"<%= config.bin %> <%= command.id %> --apiKey YOUR_API_KEY --domain example.backlog.jp --projectIdOrKey PROJECT_KEY\n指定したパラメータで更新する(設定ファイルが存在する場合は上書きされます)\n",
|
|
76
|
+
"<%= config.bin %> <%= command.id %> ./my-project\n指定したディレクトリの設定を使用して更新する\n"
|
|
97
77
|
],
|
|
98
78
|
"flags": {
|
|
99
|
-
"
|
|
79
|
+
"apiKey": {
|
|
80
|
+
"description": "Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)",
|
|
81
|
+
"name": "apiKey",
|
|
82
|
+
"required": false,
|
|
83
|
+
"hasDynamicHelp": false,
|
|
84
|
+
"multiple": false,
|
|
85
|
+
"type": "option"
|
|
86
|
+
},
|
|
87
|
+
"domain": {
|
|
88
|
+
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
89
|
+
"name": "domain",
|
|
90
|
+
"required": false,
|
|
91
|
+
"hasDynamicHelp": false,
|
|
92
|
+
"multiple": false,
|
|
93
|
+
"type": "option"
|
|
94
|
+
},
|
|
95
|
+
"force": {
|
|
100
96
|
"char": "f",
|
|
101
|
-
"description": "
|
|
102
|
-
"name": "
|
|
103
|
-
"required":
|
|
97
|
+
"description": "確認プロンプトをスキップする",
|
|
98
|
+
"name": "force",
|
|
99
|
+
"required": false,
|
|
100
|
+
"allowNo": false,
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
},
|
|
103
|
+
"issuesOnly": {
|
|
104
|
+
"description": "課題のみを更新する",
|
|
105
|
+
"name": "issuesOnly",
|
|
106
|
+
"required": false,
|
|
107
|
+
"allowNo": false,
|
|
108
|
+
"type": "boolean"
|
|
109
|
+
},
|
|
110
|
+
"projectIdOrKey": {
|
|
111
|
+
"description": "Backlog project ID or key",
|
|
112
|
+
"name": "projectIdOrKey",
|
|
113
|
+
"required": false,
|
|
104
114
|
"hasDynamicHelp": false,
|
|
105
115
|
"multiple": false,
|
|
106
116
|
"type": "option"
|
|
117
|
+
},
|
|
118
|
+
"wikisOnly": {
|
|
119
|
+
"description": "Wikiのみを更新する",
|
|
120
|
+
"name": "wikisOnly",
|
|
121
|
+
"required": false,
|
|
122
|
+
"allowNo": false,
|
|
123
|
+
"type": "boolean"
|
|
107
124
|
}
|
|
108
125
|
},
|
|
109
126
|
"hasDynamicHelp": false,
|
|
110
127
|
"hiddenAliases": [],
|
|
111
|
-
"id": "
|
|
128
|
+
"id": "update",
|
|
112
129
|
"pluginAlias": "backlog-exporter",
|
|
113
130
|
"pluginName": "backlog-exporter",
|
|
114
131
|
"pluginType": "core",
|
|
@@ -118,46 +135,17 @@
|
|
|
118
135
|
"relativePath": [
|
|
119
136
|
"dist",
|
|
120
137
|
"commands",
|
|
121
|
-
"
|
|
138
|
+
"update",
|
|
122
139
|
"index.js"
|
|
123
140
|
]
|
|
124
141
|
},
|
|
125
|
-
"hello:world": {
|
|
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
142
|
"issue": {
|
|
150
143
|
"aliases": [],
|
|
151
|
-
"args": {
|
|
152
|
-
|
|
153
|
-
"description": "URL to download from",
|
|
154
|
-
"name": "url",
|
|
155
|
-
"required": false
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
"description": "Backlogから課題をダウンロードする",
|
|
144
|
+
"args": {},
|
|
145
|
+
"description": "Backlogから課題を取得してMarkdownファイルとして保存する",
|
|
159
146
|
"examples": [
|
|
160
|
-
"<%= config.bin %> <%= command.id %> --domain
|
|
147
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n課題をMarkdownファイルとして保存する\n",
|
|
148
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project\n指定したディレクトリに課題を保存する\n"
|
|
161
149
|
],
|
|
162
150
|
"flags": {
|
|
163
151
|
"apiKey": {
|
|
@@ -168,16 +156,6 @@
|
|
|
168
156
|
"multiple": false,
|
|
169
157
|
"type": "option"
|
|
170
158
|
},
|
|
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
159
|
"domain": {
|
|
182
160
|
"description": "Backlog domain (e.g. example.backlog.jp)",
|
|
183
161
|
"name": "domain",
|
|
@@ -191,7 +169,6 @@
|
|
|
191
169
|
"description": "出力ディレクトリパス",
|
|
192
170
|
"name": "output",
|
|
193
171
|
"required": false,
|
|
194
|
-
"default": "./backlog-issues",
|
|
195
172
|
"hasDynamicHelp": false,
|
|
196
173
|
"multiple": false,
|
|
197
174
|
"type": "option"
|
|
@@ -203,14 +180,6 @@
|
|
|
203
180
|
"hasDynamicHelp": false,
|
|
204
181
|
"multiple": false,
|
|
205
182
|
"type": "option"
|
|
206
|
-
},
|
|
207
|
-
"statusId": {
|
|
208
|
-
"description": "Filter issues by status ID",
|
|
209
|
-
"name": "statusId",
|
|
210
|
-
"required": false,
|
|
211
|
-
"hasDynamicHelp": false,
|
|
212
|
-
"multiple": false,
|
|
213
|
-
"type": "option"
|
|
214
183
|
}
|
|
215
184
|
},
|
|
216
185
|
"hasDynamicHelp": false,
|
|
@@ -231,16 +200,11 @@
|
|
|
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.
|
|
261
|
+
"version": "0.1.1"
|
|
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.
|
|
4
|
+
"version": "0.1.1",
|
|
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
|
},
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
"version": "oclif readme && git add README.md"
|
|
77
77
|
},
|
|
78
78
|
"types": "dist/index.d.ts"
|
|
79
|
-
}
|
|
79
|
+
}
|
|
@@ -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
|
-
}
|