@ranger1/dx 0.1.88 → 0.1.89
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/lib/cli/commands/stack.js +15 -0
- package/package.json +1 -1
|
@@ -38,6 +38,8 @@ class PM2StackManager {
|
|
|
38
38
|
? options.services.map(item => String(item).trim()).filter(Boolean)
|
|
39
39
|
: [...DEFAULT_SERVICES]
|
|
40
40
|
|
|
41
|
+
this.urls = options.urls && typeof options.urls === 'object' ? options.urls : {}
|
|
42
|
+
|
|
41
43
|
const incomingPreflight = options.preflight && typeof options.preflight === 'object'
|
|
42
44
|
? options.preflight
|
|
43
45
|
: {}
|
|
@@ -211,6 +213,19 @@ class PM2StackManager {
|
|
|
211
213
|
logger.warn(stderr)
|
|
212
214
|
}
|
|
213
215
|
logger.success('服务启动成功')
|
|
216
|
+
this.printServiceUrls()
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
printServiceUrls() {
|
|
220
|
+
const entries = Object.entries(this.urls)
|
|
221
|
+
if (entries.length === 0) return
|
|
222
|
+
|
|
223
|
+
console.log('')
|
|
224
|
+
logger.info('服务访问链接:')
|
|
225
|
+
for (const [service, url] of entries) {
|
|
226
|
+
console.log(` ${service.padEnd(12)} → ${url}`)
|
|
227
|
+
}
|
|
228
|
+
console.log('')
|
|
214
229
|
}
|
|
215
230
|
|
|
216
231
|
async showStatus() {
|