koishi-core
Advanced tools
Comparing version 2.0.0-alpha.8 to 2.0.0-alpha.9
@@ -31,2 +31,3 @@ /// <reference types="node" /> | ||
isBoolean: boolean; | ||
noSegment: boolean; | ||
description: string; | ||
@@ -33,0 +34,0 @@ } |
@@ -199,2 +199,3 @@ "use strict"; | ||
} | ||
const noSegment = brackets.includes('...'); | ||
const option = { | ||
@@ -211,2 +212,3 @@ ...Command.defaultOptionConfig, | ||
required, | ||
noSegment, | ||
isBoolean, | ||
@@ -321,3 +323,7 @@ description, | ||
let quoted = false; | ||
if (!param && source.charCodeAt(0) !== 45 && (!option || !option.isBoolean)) { | ||
if (!param && option && option.noSegment) { | ||
param = arg0.rest; | ||
source = ''; | ||
} | ||
else if (!param && source.charCodeAt(0) !== 45 && (!option || !option.isBoolean)) { | ||
arg0 = parseArg0(source); | ||
@@ -324,0 +330,0 @@ param = arg0.content; |
{ | ||
"name": "koishi-core", | ||
"description": "Core features for Koishi", | ||
"version": "2.0.0-alpha.8", | ||
"version": "2.0.0-alpha.9", | ||
"main": "dist/index.js", | ||
@@ -39,4 +39,4 @@ "typings": "dist/index.d.ts", | ||
"get-port": "^5.1.1", | ||
"koishi-database-memory": "^2.0.0-alpha.8", | ||
"koishi-test-utils": "^4.0.0-alpha.8" | ||
"koishi-database-memory": "^2.0.0-alpha.9", | ||
"koishi-test-utils": "^4.0.0-alpha.9" | ||
}, | ||
@@ -43,0 +43,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
290060
3575