nodebbs 0.0.0 → 0.0.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 +378 -249
- package/dist/commands/db/generate.d.ts +5 -0
- package/dist/commands/db/generate.js +12 -0
- package/dist/commands/db/index.d.ts +5 -0
- package/dist/commands/db/index.js +11 -0
- package/dist/commands/db/migrate.d.ts +5 -0
- package/dist/commands/db/migrate.js +12 -0
- package/dist/commands/db/push.d.ts +5 -0
- package/dist/commands/db/push.js +12 -0
- package/dist/commands/db/reset.d.ts +5 -0
- package/dist/commands/db/reset.js +22 -0
- package/dist/commands/db/seed.d.ts +5 -0
- package/dist/commands/db/seed.js +12 -0
- package/dist/commands/deploy/index.d.ts +8 -0
- package/dist/commands/deploy/index.js +95 -0
- package/dist/commands/dev/index.d.ts +9 -0
- package/dist/commands/dev/index.js +59 -0
- package/dist/commands/logs/api.d.ts +5 -0
- package/dist/commands/logs/api.js +11 -0
- package/dist/commands/logs/db.d.ts +5 -0
- package/dist/commands/logs/db.js +11 -0
- package/dist/commands/logs/index.d.ts +5 -0
- package/dist/commands/logs/index.js +11 -0
- package/dist/commands/logs/redis.d.ts +5 -0
- package/dist/commands/logs/redis.js +11 -0
- package/dist/commands/logs/web.d.ts +5 -0
- package/dist/commands/logs/web.js +11 -0
- package/dist/commands/restart/index.d.ts +5 -0
- package/dist/commands/restart/index.js +12 -0
- package/dist/commands/setup/index.d.ts +5 -0
- package/dist/commands/setup/index.js +12 -0
- package/dist/commands/shell/api.d.ts +5 -0
- package/dist/commands/shell/api.js +11 -0
- package/dist/commands/shell/db.d.ts +5 -0
- package/dist/commands/shell/db.js +11 -0
- package/dist/commands/shell/redis.d.ts +5 -0
- package/dist/commands/shell/redis.js +11 -0
- package/dist/commands/shell/web.d.ts +5 -0
- package/dist/commands/shell/web.js +11 -0
- package/dist/commands/status/index.d.ts +5 -0
- package/dist/commands/status/index.js +11 -0
- package/dist/commands/stop/index.d.ts +8 -0
- package/dist/commands/stop/index.js +37 -0
- package/dist/templates/docker-compose.lowmem.yml +126 -0
- package/dist/templates/docker-compose.prod.yml +120 -0
- package/dist/templates/docker-compose.yml +127 -0
- package/dist/templates/init-db.sql +14 -0
- package/dist/utils/docker.d.ts +8 -0
- package/dist/utils/docker.js +101 -0
- package/dist/utils/env.d.ts +2 -0
- package/dist/utils/env.js +108 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.js +14 -0
- package/oclif.manifest.json +441 -26
- package/package.json +9 -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
|
@@ -1,32 +1,190 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"
|
|
3
|
+
"db:generate": {
|
|
4
4
|
"aliases": [],
|
|
5
|
-
"args": {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "生成数据库迁移文件",
|
|
7
|
+
"flags": {},
|
|
8
|
+
"hasDynamicHelp": false,
|
|
9
|
+
"hiddenAliases": [],
|
|
10
|
+
"id": "db:generate",
|
|
11
|
+
"pluginAlias": "nodebbs",
|
|
12
|
+
"pluginName": "nodebbs",
|
|
13
|
+
"pluginType": "core",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"enableJsonFlag": false,
|
|
16
|
+
"isESM": true,
|
|
17
|
+
"relativePath": [
|
|
18
|
+
"dist",
|
|
19
|
+
"commands",
|
|
20
|
+
"db",
|
|
21
|
+
"generate.js"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"db": {
|
|
25
|
+
"aliases": [],
|
|
26
|
+
"args": {},
|
|
27
|
+
"description": "打开数据库管理界面(Drizzle Studio)",
|
|
28
|
+
"flags": {},
|
|
29
|
+
"hasDynamicHelp": false,
|
|
30
|
+
"hiddenAliases": [],
|
|
31
|
+
"id": "db",
|
|
32
|
+
"pluginAlias": "nodebbs",
|
|
33
|
+
"pluginName": "nodebbs",
|
|
34
|
+
"pluginType": "core",
|
|
35
|
+
"strict": true,
|
|
36
|
+
"enableJsonFlag": false,
|
|
37
|
+
"isESM": true,
|
|
38
|
+
"relativePath": [
|
|
39
|
+
"dist",
|
|
40
|
+
"commands",
|
|
41
|
+
"db",
|
|
42
|
+
"index.js"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"db:migrate": {
|
|
46
|
+
"aliases": [],
|
|
47
|
+
"args": {},
|
|
48
|
+
"description": "执行数据库迁移",
|
|
49
|
+
"flags": {},
|
|
50
|
+
"hasDynamicHelp": false,
|
|
51
|
+
"hiddenAliases": [],
|
|
52
|
+
"id": "db:migrate",
|
|
53
|
+
"pluginAlias": "nodebbs",
|
|
54
|
+
"pluginName": "nodebbs",
|
|
55
|
+
"pluginType": "core",
|
|
56
|
+
"strict": true,
|
|
57
|
+
"enableJsonFlag": false,
|
|
58
|
+
"isESM": true,
|
|
59
|
+
"relativePath": [
|
|
60
|
+
"dist",
|
|
61
|
+
"commands",
|
|
62
|
+
"db",
|
|
63
|
+
"migrate.js"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"db:push": {
|
|
67
|
+
"aliases": [],
|
|
68
|
+
"args": {},
|
|
69
|
+
"description": "推送数据库 schema",
|
|
70
|
+
"flags": {},
|
|
71
|
+
"hasDynamicHelp": false,
|
|
72
|
+
"hiddenAliases": [],
|
|
73
|
+
"id": "db:push",
|
|
74
|
+
"pluginAlias": "nodebbs",
|
|
75
|
+
"pluginName": "nodebbs",
|
|
76
|
+
"pluginType": "core",
|
|
77
|
+
"strict": true,
|
|
78
|
+
"enableJsonFlag": false,
|
|
79
|
+
"isESM": true,
|
|
80
|
+
"relativePath": [
|
|
81
|
+
"dist",
|
|
82
|
+
"commands",
|
|
83
|
+
"db",
|
|
84
|
+
"push.js"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"db:reset": {
|
|
88
|
+
"aliases": [],
|
|
89
|
+
"args": {},
|
|
90
|
+
"description": "重置并重新初始化数据",
|
|
91
|
+
"flags": {},
|
|
92
|
+
"hasDynamicHelp": false,
|
|
93
|
+
"hiddenAliases": [],
|
|
94
|
+
"id": "db:reset",
|
|
95
|
+
"pluginAlias": "nodebbs",
|
|
96
|
+
"pluginName": "nodebbs",
|
|
97
|
+
"pluginType": "core",
|
|
98
|
+
"strict": true,
|
|
99
|
+
"enableJsonFlag": false,
|
|
100
|
+
"isESM": true,
|
|
101
|
+
"relativePath": [
|
|
102
|
+
"dist",
|
|
103
|
+
"commands",
|
|
104
|
+
"db",
|
|
105
|
+
"reset.js"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"db:seed": {
|
|
109
|
+
"aliases": [],
|
|
110
|
+
"args": {},
|
|
111
|
+
"description": "初始化数据库数据",
|
|
112
|
+
"flags": {},
|
|
113
|
+
"hasDynamicHelp": false,
|
|
114
|
+
"hiddenAliases": [],
|
|
115
|
+
"id": "db:seed",
|
|
116
|
+
"pluginAlias": "nodebbs",
|
|
117
|
+
"pluginName": "nodebbs",
|
|
118
|
+
"pluginType": "core",
|
|
119
|
+
"strict": true,
|
|
120
|
+
"enableJsonFlag": false,
|
|
121
|
+
"isESM": true,
|
|
122
|
+
"relativePath": [
|
|
123
|
+
"dist",
|
|
124
|
+
"commands",
|
|
125
|
+
"db",
|
|
126
|
+
"seed.js"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"deploy": {
|
|
130
|
+
"aliases": [],
|
|
131
|
+
"args": {},
|
|
132
|
+
"description": "部署 NodeBBS",
|
|
133
|
+
"flags": {
|
|
134
|
+
"name": {
|
|
135
|
+
"char": "n",
|
|
136
|
+
"description": "name to print",
|
|
137
|
+
"name": "name",
|
|
138
|
+
"hasDynamicHelp": false,
|
|
139
|
+
"multiple": false,
|
|
140
|
+
"type": "option"
|
|
10
141
|
}
|
|
11
142
|
},
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
143
|
+
"hasDynamicHelp": false,
|
|
144
|
+
"hiddenAliases": [],
|
|
145
|
+
"id": "deploy",
|
|
146
|
+
"pluginAlias": "nodebbs",
|
|
147
|
+
"pluginName": "nodebbs",
|
|
148
|
+
"pluginType": "core",
|
|
149
|
+
"strict": true,
|
|
150
|
+
"enableJsonFlag": false,
|
|
151
|
+
"isESM": true,
|
|
152
|
+
"relativePath": [
|
|
153
|
+
"dist",
|
|
154
|
+
"commands",
|
|
155
|
+
"deploy",
|
|
156
|
+
"index.js"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"dev": {
|
|
160
|
+
"aliases": [],
|
|
161
|
+
"args": {},
|
|
162
|
+
"description": "启动开发环境",
|
|
16
163
|
"flags": {
|
|
17
|
-
"
|
|
18
|
-
"char": "
|
|
19
|
-
"description": "
|
|
20
|
-
"name": "
|
|
21
|
-
"required": true,
|
|
164
|
+
"env": {
|
|
165
|
+
"char": "e",
|
|
166
|
+
"description": "部署环境 (production, lowmem, basic)",
|
|
167
|
+
"name": "env",
|
|
22
168
|
"hasDynamicHelp": false,
|
|
23
169
|
"multiple": false,
|
|
170
|
+
"options": [
|
|
171
|
+
"production",
|
|
172
|
+
"lowmem",
|
|
173
|
+
"basic"
|
|
174
|
+
],
|
|
24
175
|
"type": "option"
|
|
176
|
+
},
|
|
177
|
+
"rebuild": {
|
|
178
|
+
"char": "r",
|
|
179
|
+
"description": "重新构建镜像",
|
|
180
|
+
"name": "rebuild",
|
|
181
|
+
"allowNo": false,
|
|
182
|
+
"type": "boolean"
|
|
25
183
|
}
|
|
26
184
|
},
|
|
27
185
|
"hasDynamicHelp": false,
|
|
28
186
|
"hiddenAliases": [],
|
|
29
|
-
"id": "
|
|
187
|
+
"id": "dev",
|
|
30
188
|
"pluginAlias": "nodebbs",
|
|
31
189
|
"pluginName": "nodebbs",
|
|
32
190
|
"pluginType": "core",
|
|
@@ -36,21 +194,18 @@
|
|
|
36
194
|
"relativePath": [
|
|
37
195
|
"dist",
|
|
38
196
|
"commands",
|
|
39
|
-
"
|
|
197
|
+
"dev",
|
|
40
198
|
"index.js"
|
|
41
199
|
]
|
|
42
200
|
},
|
|
43
|
-
"
|
|
201
|
+
"logs:api": {
|
|
44
202
|
"aliases": [],
|
|
45
203
|
"args": {},
|
|
46
|
-
"description": "
|
|
47
|
-
"examples": [
|
|
48
|
-
"<%= config.bin %> <%= command.id %>\nhello world! (./src/commands/hello/world.ts)\n"
|
|
49
|
-
],
|
|
204
|
+
"description": "查看 API 服务日志",
|
|
50
205
|
"flags": {},
|
|
51
206
|
"hasDynamicHelp": false,
|
|
52
207
|
"hiddenAliases": [],
|
|
53
|
-
"id": "
|
|
208
|
+
"id": "logs:api",
|
|
54
209
|
"pluginAlias": "nodebbs",
|
|
55
210
|
"pluginName": "nodebbs",
|
|
56
211
|
"pluginType": "core",
|
|
@@ -60,10 +215,270 @@
|
|
|
60
215
|
"relativePath": [
|
|
61
216
|
"dist",
|
|
62
217
|
"commands",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
218
|
+
"logs",
|
|
219
|
+
"api.js"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"logs:db": {
|
|
223
|
+
"aliases": [],
|
|
224
|
+
"args": {},
|
|
225
|
+
"description": "查看数据库日志",
|
|
226
|
+
"flags": {},
|
|
227
|
+
"hasDynamicHelp": false,
|
|
228
|
+
"hiddenAliases": [],
|
|
229
|
+
"id": "logs:db",
|
|
230
|
+
"pluginAlias": "nodebbs",
|
|
231
|
+
"pluginName": "nodebbs",
|
|
232
|
+
"pluginType": "core",
|
|
233
|
+
"strict": true,
|
|
234
|
+
"enableJsonFlag": false,
|
|
235
|
+
"isESM": true,
|
|
236
|
+
"relativePath": [
|
|
237
|
+
"dist",
|
|
238
|
+
"commands",
|
|
239
|
+
"logs",
|
|
240
|
+
"db.js"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"logs": {
|
|
244
|
+
"aliases": [],
|
|
245
|
+
"args": {},
|
|
246
|
+
"description": "查看所有服务日志",
|
|
247
|
+
"flags": {},
|
|
248
|
+
"hasDynamicHelp": false,
|
|
249
|
+
"hiddenAliases": [],
|
|
250
|
+
"id": "logs",
|
|
251
|
+
"pluginAlias": "nodebbs",
|
|
252
|
+
"pluginName": "nodebbs",
|
|
253
|
+
"pluginType": "core",
|
|
254
|
+
"strict": true,
|
|
255
|
+
"enableJsonFlag": false,
|
|
256
|
+
"isESM": true,
|
|
257
|
+
"relativePath": [
|
|
258
|
+
"dist",
|
|
259
|
+
"commands",
|
|
260
|
+
"logs",
|
|
261
|
+
"index.js"
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
"logs:redis": {
|
|
265
|
+
"aliases": [],
|
|
266
|
+
"args": {},
|
|
267
|
+
"description": "查看 Redis 日志",
|
|
268
|
+
"flags": {},
|
|
269
|
+
"hasDynamicHelp": false,
|
|
270
|
+
"hiddenAliases": [],
|
|
271
|
+
"id": "logs:redis",
|
|
272
|
+
"pluginAlias": "nodebbs",
|
|
273
|
+
"pluginName": "nodebbs",
|
|
274
|
+
"pluginType": "core",
|
|
275
|
+
"strict": true,
|
|
276
|
+
"enableJsonFlag": false,
|
|
277
|
+
"isESM": true,
|
|
278
|
+
"relativePath": [
|
|
279
|
+
"dist",
|
|
280
|
+
"commands",
|
|
281
|
+
"logs",
|
|
282
|
+
"redis.js"
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
"logs:web": {
|
|
286
|
+
"aliases": [],
|
|
287
|
+
"args": {},
|
|
288
|
+
"description": "查看 Web 服务日志",
|
|
289
|
+
"flags": {},
|
|
290
|
+
"hasDynamicHelp": false,
|
|
291
|
+
"hiddenAliases": [],
|
|
292
|
+
"id": "logs:web",
|
|
293
|
+
"pluginAlias": "nodebbs",
|
|
294
|
+
"pluginName": "nodebbs",
|
|
295
|
+
"pluginType": "core",
|
|
296
|
+
"strict": true,
|
|
297
|
+
"enableJsonFlag": false,
|
|
298
|
+
"isESM": true,
|
|
299
|
+
"relativePath": [
|
|
300
|
+
"dist",
|
|
301
|
+
"commands",
|
|
302
|
+
"logs",
|
|
303
|
+
"web.js"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"restart": {
|
|
307
|
+
"aliases": [],
|
|
308
|
+
"args": {},
|
|
309
|
+
"description": "重启所有服务",
|
|
310
|
+
"flags": {},
|
|
311
|
+
"hasDynamicHelp": false,
|
|
312
|
+
"hiddenAliases": [],
|
|
313
|
+
"id": "restart",
|
|
314
|
+
"pluginAlias": "nodebbs",
|
|
315
|
+
"pluginName": "nodebbs",
|
|
316
|
+
"pluginType": "core",
|
|
317
|
+
"strict": true,
|
|
318
|
+
"enableJsonFlag": false,
|
|
319
|
+
"isESM": true,
|
|
320
|
+
"relativePath": [
|
|
321
|
+
"dist",
|
|
322
|
+
"commands",
|
|
323
|
+
"restart",
|
|
324
|
+
"index.js"
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
"setup": {
|
|
328
|
+
"aliases": [],
|
|
329
|
+
"args": {},
|
|
330
|
+
"description": "初始化项目(首次使用)",
|
|
331
|
+
"flags": {},
|
|
332
|
+
"hasDynamicHelp": false,
|
|
333
|
+
"hiddenAliases": [],
|
|
334
|
+
"id": "setup",
|
|
335
|
+
"pluginAlias": "nodebbs",
|
|
336
|
+
"pluginName": "nodebbs",
|
|
337
|
+
"pluginType": "core",
|
|
338
|
+
"strict": true,
|
|
339
|
+
"enableJsonFlag": false,
|
|
340
|
+
"isESM": true,
|
|
341
|
+
"relativePath": [
|
|
342
|
+
"dist",
|
|
343
|
+
"commands",
|
|
344
|
+
"setup",
|
|
345
|
+
"index.js"
|
|
346
|
+
]
|
|
347
|
+
},
|
|
348
|
+
"shell:api": {
|
|
349
|
+
"aliases": [],
|
|
350
|
+
"args": {},
|
|
351
|
+
"description": "进入 API 容器",
|
|
352
|
+
"flags": {},
|
|
353
|
+
"hasDynamicHelp": false,
|
|
354
|
+
"hiddenAliases": [],
|
|
355
|
+
"id": "shell:api",
|
|
356
|
+
"pluginAlias": "nodebbs",
|
|
357
|
+
"pluginName": "nodebbs",
|
|
358
|
+
"pluginType": "core",
|
|
359
|
+
"strict": true,
|
|
360
|
+
"enableJsonFlag": false,
|
|
361
|
+
"isESM": true,
|
|
362
|
+
"relativePath": [
|
|
363
|
+
"dist",
|
|
364
|
+
"commands",
|
|
365
|
+
"shell",
|
|
366
|
+
"api.js"
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
"shell:db": {
|
|
370
|
+
"aliases": [],
|
|
371
|
+
"args": {},
|
|
372
|
+
"description": "进入数据库",
|
|
373
|
+
"flags": {},
|
|
374
|
+
"hasDynamicHelp": false,
|
|
375
|
+
"hiddenAliases": [],
|
|
376
|
+
"id": "shell:db",
|
|
377
|
+
"pluginAlias": "nodebbs",
|
|
378
|
+
"pluginName": "nodebbs",
|
|
379
|
+
"pluginType": "core",
|
|
380
|
+
"strict": true,
|
|
381
|
+
"enableJsonFlag": false,
|
|
382
|
+
"isESM": true,
|
|
383
|
+
"relativePath": [
|
|
384
|
+
"dist",
|
|
385
|
+
"commands",
|
|
386
|
+
"shell",
|
|
387
|
+
"db.js"
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
"shell:redis": {
|
|
391
|
+
"aliases": [],
|
|
392
|
+
"args": {},
|
|
393
|
+
"description": "进入 Redis",
|
|
394
|
+
"flags": {},
|
|
395
|
+
"hasDynamicHelp": false,
|
|
396
|
+
"hiddenAliases": [],
|
|
397
|
+
"id": "shell:redis",
|
|
398
|
+
"pluginAlias": "nodebbs",
|
|
399
|
+
"pluginName": "nodebbs",
|
|
400
|
+
"pluginType": "core",
|
|
401
|
+
"strict": true,
|
|
402
|
+
"enableJsonFlag": false,
|
|
403
|
+
"isESM": true,
|
|
404
|
+
"relativePath": [
|
|
405
|
+
"dist",
|
|
406
|
+
"commands",
|
|
407
|
+
"shell",
|
|
408
|
+
"redis.js"
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
"shell:web": {
|
|
412
|
+
"aliases": [],
|
|
413
|
+
"args": {},
|
|
414
|
+
"description": "进入 Web 容器",
|
|
415
|
+
"flags": {},
|
|
416
|
+
"hasDynamicHelp": false,
|
|
417
|
+
"hiddenAliases": [],
|
|
418
|
+
"id": "shell:web",
|
|
419
|
+
"pluginAlias": "nodebbs",
|
|
420
|
+
"pluginName": "nodebbs",
|
|
421
|
+
"pluginType": "core",
|
|
422
|
+
"strict": true,
|
|
423
|
+
"enableJsonFlag": false,
|
|
424
|
+
"isESM": true,
|
|
425
|
+
"relativePath": [
|
|
426
|
+
"dist",
|
|
427
|
+
"commands",
|
|
428
|
+
"shell",
|
|
429
|
+
"web.js"
|
|
430
|
+
]
|
|
431
|
+
},
|
|
432
|
+
"status": {
|
|
433
|
+
"aliases": [],
|
|
434
|
+
"args": {},
|
|
435
|
+
"description": "查看服务状态",
|
|
436
|
+
"flags": {},
|
|
437
|
+
"hasDynamicHelp": false,
|
|
438
|
+
"hiddenAliases": [],
|
|
439
|
+
"id": "status",
|
|
440
|
+
"pluginAlias": "nodebbs",
|
|
441
|
+
"pluginName": "nodebbs",
|
|
442
|
+
"pluginType": "core",
|
|
443
|
+
"strict": true,
|
|
444
|
+
"enableJsonFlag": false,
|
|
445
|
+
"isESM": true,
|
|
446
|
+
"relativePath": [
|
|
447
|
+
"dist",
|
|
448
|
+
"commands",
|
|
449
|
+
"status",
|
|
450
|
+
"index.js"
|
|
451
|
+
]
|
|
452
|
+
},
|
|
453
|
+
"stop": {
|
|
454
|
+
"aliases": [],
|
|
455
|
+
"args": {},
|
|
456
|
+
"description": "停止服务",
|
|
457
|
+
"flags": {
|
|
458
|
+
"volumes": {
|
|
459
|
+
"char": "v",
|
|
460
|
+
"description": "同时删除数据卷(危险!)",
|
|
461
|
+
"name": "volumes",
|
|
462
|
+
"allowNo": false,
|
|
463
|
+
"type": "boolean"
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"hasDynamicHelp": false,
|
|
467
|
+
"hiddenAliases": [],
|
|
468
|
+
"id": "stop",
|
|
469
|
+
"pluginAlias": "nodebbs",
|
|
470
|
+
"pluginName": "nodebbs",
|
|
471
|
+
"pluginType": "core",
|
|
472
|
+
"strict": true,
|
|
473
|
+
"enableJsonFlag": false,
|
|
474
|
+
"isESM": true,
|
|
475
|
+
"relativePath": [
|
|
476
|
+
"dist",
|
|
477
|
+
"commands",
|
|
478
|
+
"stop",
|
|
479
|
+
"index.js"
|
|
65
480
|
]
|
|
66
481
|
}
|
|
67
482
|
},
|
|
68
|
-
"version": "0.0.
|
|
483
|
+
"version": "0.0.2"
|
|
69
484
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebbs",
|
|
3
3
|
"description": "A new CLI generated with oclif",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"author": "wengqianshan",
|
|
6
6
|
"bin": {
|
|
7
7
|
"nodebbs": "./bin/run.js"
|
|
8
8
|
},
|
|
9
9
|
"bugs": "https://github.com/nodebbs/nodebbs/issues",
|
|
10
10
|
"dependencies": {
|
|
11
|
+
"@inquirer/prompts": "^8.0.2",
|
|
11
12
|
"@oclif/core": "^4",
|
|
12
13
|
"@oclif/plugin-help": "^6",
|
|
13
|
-
"@oclif/plugin-plugins": "^5"
|
|
14
|
+
"@oclif/plugin-plugins": "^5",
|
|
15
|
+
"chalk": "^5.6.2",
|
|
16
|
+
"dotenv": "^17.2.3",
|
|
17
|
+
"execa": "^9.6.1",
|
|
18
|
+
"inquirer": "^13.0.2"
|
|
14
19
|
},
|
|
15
20
|
"devDependencies": {
|
|
16
21
|
"@eslint/compat": "^1",
|
|
@@ -61,7 +66,8 @@
|
|
|
61
66
|
},
|
|
62
67
|
"repository": "nodebbs/nodebbs",
|
|
63
68
|
"scripts": {
|
|
64
|
-
"build": "shx rm -rf dist && tsc -b",
|
|
69
|
+
"build": "shx rm -rf dist && tsc -b && npm run copy-templates",
|
|
70
|
+
"copy-templates": "shx mkdir -p dist/templates && shx cp src/templates/* dist/templates/",
|
|
65
71
|
"lint": "eslint",
|
|
66
72
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
67
73
|
"posttest": "pnpm run lint",
|
|
@@ -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
|
-
}
|