Skip to content

Commit 25509f5

Browse files
committed
chore: support schemaless urls
1 parent 3bedad1 commit 25509f5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/cli/bin/cli/get-url.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
'use strict'
22

3-
module.exports = input =>
4-
input || process.env.DEPLOY_URL || process.env.DEPLOY_PRIME_URL || process.env.URL
3+
const prependHttp = require('prepend-http')
4+
5+
module.exports = input => {
6+
const value = input || process.env.DEPLOY_URL || process.env.DEPLOY_PRIME_URL || process.env.URL
7+
const collection = Array.isArray(value) ? value : value.split(',').map(item => item.trim())
8+
return collection.map(prependHttp)
9+
}

packages/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"meow": "~9.0.0",
4646
"neat-log": "~3.1.0",
4747
"ora": "~5.0.0",
48+
"prepend-http": "~3.0.1",
4849
"pretty-ms": "~7.0.1",
4950
"update-notifier": "~5.1.0"
5051
},

0 commit comments

Comments
 (0)