core: fix import command regex
parent
5f2be55e54
commit
dccb8875ad
|
|
@ -31,9 +31,9 @@ export const ImportCommand = cmd({
|
||||||
const isUrl = args.file.startsWith("http://") || args.file.startsWith("https://")
|
const isUrl = args.file.startsWith("http://") || args.file.startsWith("https://")
|
||||||
|
|
||||||
if (isUrl) {
|
if (isUrl) {
|
||||||
const urlMatch = args.file.match(/https?:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/)
|
const urlMatch = args.file.match(/https?:\/\/opncd\.ai\/share\/([a-zA-Z0-9_-]+)/)
|
||||||
if (!urlMatch) {
|
if (!urlMatch) {
|
||||||
process.stdout.write(`Invalid URL format. Expected: https://opncd.ai/s/<slug>`)
|
process.stdout.write(`Invalid URL format. Expected: https://opncd.ai/share/<slug>`)
|
||||||
process.stdout.write(EOL)
|
process.stdout.write(EOL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue