@fugood/bricks-cli 2.25.0-beta.63 → 2.25.0-beta.64
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/1010.js +1 -0
- package/lib/1178.js +1 -0
- package/lib/1215.js +1 -0
- package/lib/{708.js → 1708.js} +2 -2
- package/lib/1759.js +1 -0
- package/lib/1936.js +1 -0
- package/lib/2151.js +1 -0
- package/lib/{209.js → 2209.js} +3 -3
- package/lib/2247.js +1 -0
- package/lib/2486.js +1 -0
- package/lib/2557.js +1 -0
- package/lib/{223.js → 3223.js} +1 -1
- package/lib/3332.js +13 -0
- package/lib/3690.js +1 -0
- package/lib/3774.js +44 -0
- package/lib/3976.js +14 -0
- package/lib/4305.js +1 -0
- package/lib/4456.js +3 -0
- package/lib/{192.js → 4479.js} +4 -4
- package/lib/4530.js +22 -0
- package/lib/4642.js +9 -0
- package/lib/4685.js +1202 -0
- package/lib/5212.js +1 -0
- package/lib/{658.js → 5658.js} +1 -1
- package/lib/5785.js +1 -0
- package/lib/6194.js +3 -0
- package/lib/6370.js +1 -0
- package/lib/6645.js +1 -0
- package/lib/6818.js +1 -0
- package/lib/7111.js +2 -0
- package/lib/7456.js +1 -0
- package/lib/7511.js +1 -0
- package/lib/7574.js +1 -0
- package/lib/7648.js +1 -0
- package/lib/8026.js +1 -0
- package/lib/{117.js → 8117.js} +2 -2
- package/lib/8166.js +1 -0
- package/lib/853.js +1 -0
- package/lib/915.js +3 -3
- package/lib/9320.js +3 -0
- package/lib/{387.js → 9387.js} +1 -1
- package/lib/9405.js +1 -0
- package/lib/9430.js +1 -0
- package/lib/{583.js → 9583.js} +1 -1
- package/lib/9663.js +1 -0
- package/lib/{866.js → 9866.js} +1 -1
- package/lib/9940.js +19 -0
- package/lib/index.js +17 -17
- package/package.json +5 -5
- package/lib/10.js +0 -1
- package/lib/111.js +0 -2
- package/lib/166.js +0 -1
- package/lib/178.js +0 -1
- package/lib/212.js +0 -1
- package/lib/215.js +0 -1
- package/lib/247.js +0 -1
- package/lib/274.js +0 -55
- package/lib/305.js +0 -1
- package/lib/306.js +0 -1
- package/lib/320.js +0 -3
- package/lib/332.js +0 -13
- package/lib/358.js +0 -1
- package/lib/370.js +0 -1
- package/lib/405.js +0 -1
- package/lib/430.js +0 -1
- package/lib/456.js +0 -3
- package/lib/479.js +0 -1231
- package/lib/486.js +0 -1
- package/lib/511.js +0 -1
- package/lib/557.js +0 -1
- package/lib/574.js +0 -1
- package/lib/645.js +0 -1
- package/lib/648.js +0 -1
- package/lib/663.js +0 -1
- package/lib/690.js +0 -1
- package/lib/75.js +0 -1
- package/lib/759.js +0 -1
- package/lib/785.js +0 -1
- package/lib/818.js +0 -1
- package/lib/917.js +0 -1
- package/lib/936.js +0 -1
- package/lib/940.js +0 -19
package/lib/111.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __rspack_esm_id=111;export const __rspack_esm_ids=[111];export const __webpack_modules__={57419(t,e,r){let s=r(61136),i=global.Date;class h extends i{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${s(2,this.getUTCMonth()+1)}-${s(2,this.getUTCDate())}`}}t.exports=t=>{let e=new h(t);if(!isNaN(e))return e;throw TypeError("Invalid Datetime")}},68325(t,e,r){let s=r(61136);class i extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${s(2,this.getUTCMonth()+1)}-${s(2,this.getUTCDate())}`,e=`${s(2,this.getUTCHours())}:${s(2,this.getUTCMinutes())}:${s(2,this.getUTCSeconds())}.${s(3,this.getUTCMilliseconds())}`;return`${t}T${e}`}}t.exports=t=>{let e=new i(t);if(!isNaN(e))return e;throw TypeError("Invalid Datetime")}},75086(t){t.exports=t=>{let e=new Date(t);if(!isNaN(e))return e;throw TypeError("Invalid Datetime")}},50274(t,e,r){let s=r(61136);class i extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${s(2,this.getUTCHours())}:${s(2,this.getUTCMinutes())}:${s(2,this.getUTCSeconds())}.${s(3,this.getUTCMilliseconds())}`}}t.exports=t=>{let e=new i(t);if(!isNaN(e))return e;throw TypeError("Invalid Datetime")}},61136(t){t.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}},76293(t){let e=1114112;class r extends Error{constructor(t,e,s){super("[ParserError] "+t,e,s),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,r)}}class s{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}}class i{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new s(this.parseStart)}parse(t){let e;if(0!==t.length&&null!=t.length){for(this._buf=String(t),this.ii=-1,this.char=-1;!1===e||this.nextChar();)e=this.runOne();this._buf=null}}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){let t;this.char=e;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if("function"!=typeof t)throw new r("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,e){e&&this.next(e),this.stack.push(this.state),this.state=new s(t)}callNow(t,e){return this.call(t,e),this.runOne()}return(t){if(0===this.stack.length)throw this.error(new r("Stack underflow"));void 0===t&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===e)throw this.error(new r("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new r("Must declare a parseStart method")}}i.END=e,i.Error=r,t.exports=i},48036(module,__unused_rspack_exports,__webpack_require__){let _custom;module.exports=makeParserClass(__webpack_require__(76293)),module.exports.makeParserClass=makeParserClass;class TomlError extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,TomlError),this.fromTOML=!0,this.wrapped=null}}TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e},module.exports.TomlError=TomlError;let createDateTime=__webpack_require__(75086),createDateTimeFloat=__webpack_require__(68325),createDate=__webpack_require__(57419),createTime=__webpack_require__(50274),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}let _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return!!hasOwnProperty.call(t,e)||("__proto__"===e&&defineProperty(t,"__proto__",descriptor),!1)}let INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return null!==t&&"object"==typeof t&&t[_type]===INLINE_TABLE}let TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return null!==t&&"object"==typeof t&&t[_type]===TABLE}let _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return null!==t&&"object"==typeof t&&t[_type]===INLINE_LIST}let LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return null!==t&&"object"==typeof t&&t[_type]===LIST}try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(_){}let _inspect=_custom||"inspect";class BoxedBigInt{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch(t){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}let INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return(Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e))?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return null!==t&&"object"==typeof t&&t[_type]===INTEGER}let FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return null!==t&&"object"==typeof t&&t[_type]===FLOAT}function tomlType(t){let e=typeof t;if("object"===e){if(null===t)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);else throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(t){let e=this.ctx,r=t.key.pop();for(let r of t.key){if(hasKey(e,r)&&!isTable(e[r]))throw this.error(new TomlError("Can't redefine existing key"));e=e[r]=e[r]||Table()}if(hasKey(e,r))throw this.error(new TomlError("Can't redefine existing key"));return e[_declared]=!0,isInteger(t.value)||isFloat(t.value)?e[r]=t.value.valueOf():e[r]=t.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(t){return this.state.resultTable?this.state.resultTable.push(t):this.state.resultTable=[t],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(t){return this.returnNow({key:this.state.resultTable,value:t})}parseComment(){do{if(this.char===t.END||this.char===CTRL_J)return this.return();if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("comments")}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(t){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,t)&&(!isTable(this.ctx[t])||this.ctx[t][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[t]=this.ctx[t]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,t))if(isTable(this.ctx[t]))this.ctx=this.ctx[t];else if(isList(this.ctx[t]))this.ctx=this.ctx[t][this.ctx[t].length-1];else throw this.error(new TomlError("Can't redefine existing key"));else this.ctx=this.ctx[t]=Table();return this.next(this.parseTableNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(t){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,t)||(this.ctx[t]=List()),isInlineList(this.ctx[t]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[t])){let e=Table();this.ctx[t].push(e),this.ctx=e}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,t))if(isInlineList(this.ctx[t]))throw this.error(new TomlError("Can't extend an inline array"));else if(isInlineTable(this.ctx[t]))throw this.error(new TomlError("Can't extend an inline table"));else if(isList(this.ctx[t]))this.ctx=this.ctx[t][this.ctx[t].length-1];else if(isTable(this.ctx[t]))this.ctx=this.ctx[t];else throw this.error(new TomlError("Can't redefine an existing key"));else this.ctx=this.ctx[t]=Table();return this.next(this.parseListNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(t){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);else if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);else if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);else if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);else throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(t){return this.returnNow(t)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)if("-"===this.state.buf)return this.return(-1/0);else return this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else if(0!==this.state.buf.length)return this.returnNow();else throw this.error(new TomlError("Empty bare keys are not allowed"))}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("strings");else this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings");else this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd3):(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd3(){return this.char===CHAR_APOS?(this.state.buf+="'",this.next(this.parseLiteralMultiEnd4)):this.returnNow()}parseLiteralMultiEnd4(){return this.char===CHAR_APOS?(this.state.buf+="'",this.return()):this.returnNow()}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));else if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharIn("strings");else this.consume()}while(this.nextChar())}recordEscapeReplacement(t){return this.state.buf+=t,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));else if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharIn("strings");else this.consume()}while(this.nextChar())}errorControlCharIn(t){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in ${t}, use ${e} instead`))}recordMultiEscapeReplacement(t){return this.state.buf+=t,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd3):(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEnd3(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.next(this.parseMultiEnd4)):this.returnNow()}parseMultiEnd4(){return this.char===CHAR_QUOT?(this.state.buf+='"',this.return()):this.returnNow()}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(t){try{let e=parseInt(t,16);if(e>=SURROGATE_FIRST&&e<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(e))}catch(t){throw this.error(TomlError.wrap(t))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);let t=Integer(this.state.buf);if(!t.isNaN())return this.returnNow(t);throw this.error(new TomlError("Invalid number"))}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else return this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);else return this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);else if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);else if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);else return this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4)if(isDigit(this.char))return this.consume();else if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);else throw this.error(new TomlError("Expected digit while parsing year part of a date"));if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}parseNumberBaseOrDateTime(){if(this.char===CHAR_b)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin);if(this.char===CHAR_o)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct);if(this.char===CHAR_x)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex);if(this.char===CHAR_PERIOD)return this.goto(this.parseNumberInteger);if(isDigit(this.char))return this.goto(this.parseDateTimeOnly);else return this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let t=Integer(this.state.buf);if(!t.isNaN())return this.returnNow(t);throw this.error(new TomlError("Invalid number"))}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let t=Integer(this.state.buf);if(!t.isNaN())return this.returnNow(t);throw this.error(new TomlError("Invalid number"))}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let t=Integer(this.state.buf);if(!t.isNaN())return this.returnNow(t);throw this.error(new TomlError("Invalid number"))}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);else throw this.error(new TomlError("Incomplete datetime"))}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));else if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));else if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(t){return this.state.resultArr||(this.state.resultArr=InlineList(tomlType(t))),isFloat(t)||isInteger(t)?this.state.resultArr.push(t.valueOf()):this.state.resultArr.push(t),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(t){let e=this.state.resultTable,r=t.key.pop();for(let r of t.key){if(hasKey(e,r)&&(!isTable(e[r])||e[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));e=e[r]=e[r]||Table()}if(hasKey(e,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(t.value)||isFloat(t.value)?e[r]=t.value.valueOf():e[r]=t.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTablePostComma);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTablePostComma(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)throw this.error(new TomlError("Empty elements in inline tables are not permitted"));if(this.char!==CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Trailing commas in inline tables are not permitted"))}}return e}},2490(t,e,r){t.exports=h;let s=r(48036),i=r(87195);function h(t,e){e||(e={});let r=0,h=e.blocksize||40960,n=new s;return new Promise((t,e)=>{setImmediate(a,r,h,t,e)});function a(e,r,s,h){if(e>=t.length)try{return s(n.finish())}catch(e){return h(i(e,t))}try{n.parse(t.slice(e,e+r)),setImmediate(a,e+r,r,s,h)}catch(e){h(i(e,t))}}}},87195(t){t.exports=e;function e(t,e){if(null==t.pos||null==t.line)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
|
|
2
|
-
`,e&&e.split){let s=e.split(/\n/),i=String(Math.min(s.length,t.line+3)).length,h=" ";for(;h.length<i;)h+=" ";for(let e=Math.max(0,t.line-1);e<Math.min(s.length,t.line+2);++e){let n=String(e+1);if(n.length<i&&(n=" "+n),t.line===e){r+=n+"> "+s[e]+"\n",r+=h+" ";for(let e=0;e<t.col;++e)r+=" ";r+="^\n"}else r+=n+": "+s[e]+"\n"}}return t.message=r+"\n",t}},71028(t,e,r){t.exports=h;let s=r(2203),i=r(48036);function h(t){return t?n(t):a()}function n(t){let e=new i;return t.setEncoding("utf8"),new Promise((r,s)=>{let i,h=!1,n=!1;function a(){if(h=!0,!i)try{r(e.finish())}catch(t){s(t)}}function o(t){n=!0,s(t)}function u(){let r;for(i=!0;null!==(r=t.read());)try{e.parse(r)}catch(t){return o(t)}if(i=!1,h)return a();n||t.once("readable",u)}t.once("end",a),t.once("error",o),u()})}function a(){let t=new i;return new s.Transform({objectMode:!0,transform(e,r,s){try{t.parse(e.toString(r))}catch(t){this.emit("error",t)}s()},flush(e){try{this.push(t.finish())}catch(t){this.emit("error",t)}e()}})}},54709(t,e,r){t.exports=h;let s=r(48036),i=r(87195);function h(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new s;try{return e.parse(t),e.finish()}catch(e){throw i(e,t)}}},23175(t,e,r){t.exports=r(54709),t.exports.async=r(2490),t.exports.stream=r(71028),t.exports.prettyError=r(87195)},21001(t){function e(t){return Error("Can only stringify objects, not "+t)}function r(t){return Object.keys(t).filter(e=>n(t[e]))}function s(t){return Object.keys(t).filter(e=>!n(t[e]))}function i(t){let e=Array.isArray(t)?[]:Object.prototype.hasOwnProperty.call(t,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(t))!t[r]||"function"!=typeof t[r].toJSON||"toISOString"in t[r]?e[r]=t[r]:e[r]=t[r].toJSON();return e}function h(t,e,h){let n,u;n=r(h=i(h)),u=s(h);let c=[],l=e||"";n.forEach(t=>{var e=a(h[t]);"undefined"!==e&&"null"!==e&&c.push(l+o(t)+" = "+d(h[t],!0))}),c.length>0&&c.push("");let p=t&&n.length>0?e+" ":"";return u.forEach(e=>{c.push(T(t,p,e,h[e]))}),c.join("\n")}function n(t){switch(a(t)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===t.length||"table"!==a(t[0]);case"table":return 0===Object.keys(t).length;default:return!1}}function a(t){if(void 0===t)return"undefined";if(null===t)return"null";if("bigint"==typeof t||Number.isInteger(t)&&!Object.is(t,-0))return"integer";if("number"==typeof t)return"float";if("boolean"==typeof t)return"boolean";else if("string"==typeof t)return"string";else if("toISOString"in t)return isNaN(t)?"undefined":"datetime";else if(Array.isArray(t))return"array";else return"table"}function o(t){let e=String(t);return/^[-A-Za-z0-9_]+$/.test(e)?e:u(e)}function u(t){return'"'+p(t).replace(/"/g,'\\"')+'"'}function c(t){return"'"+t+"'"}function l(t,e){for(;e.length<t;)e="0"+e;return e}function p(t){return t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,t=>"\\u"+l(4,t.codePointAt(0).toString(16)))}function f(t){let e=t.split(/\n/).map(t=>p(t).replace(/"(?="")/g,'\\"')).join("\n");return'"'===e.slice(-1)&&(e+="\\\n"),'"""\n'+e+'"""'}function d(t,e){let r=a(t);return"string"===r&&(e&&/\n/.test(t)?r="string-multiline":!/[\b\t\n\f\r']/.test(t)&&/"/.test(t)&&(r="string-literal")),w(t,r)}function w(t,r){switch(!r&&(r=a(t)),r){case"string-multiline":return f(t);case"string":return u(t);case"string-literal":return c(t);case"integer":return m(t);case"float":return g(t);case"boolean":return b(t);case"datetime":return x(t);case"array":return N(t.filter(t=>"null"!==a(t)&&"undefined"!==a(t)&&"nan"!==a(t)));case"table":return y(t);default:throw e(r)}}function m(t){return String(t).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function g(t){if(t===1/0)return"inf";if(t===-1/0)return"-inf";if(Object.is(t,NaN))return"nan";if(Object.is(t,-0))return"-0.0";let[e,r]=String(t).split(".");return m(e)+"."+r}function b(t){return String(t)}function x(t){return t.toISOString()}function N(t){t=i(t);let e="[",r=t.map(t=>w(t));return r.join(", ").length>60||/\n/.test(r)?e+="\n "+r.join(",\n ")+"\n":e+=" "+r.join(", ")+(r.length>0?" ":""),e+"]"}function y(t){t=i(t);let e=[];return Object.keys(t).forEach(r=>{e.push(o(r)+" = "+d(t[r],!1))}),"{ "+e.join(", ")+(e.length>0?" ":"")+"}"}function T(t,r,s,i){let h=a(i);if("array"===h)return S(t,r,s,i);if("table"===h)return E(t,r,s,i);throw e(h)}function S(t,r,s,n){let u=a((n=i(n))[0]);if("table"!==u)throw e(u);let c=t+o(s),l="";return n.forEach(t=>{l.length>0&&(l+="\n"),l+=r+"[["+c+"]]\n",l+=h(c+".",r,t)}),l}function E(t,e,s,i){let n=t+o(s),a="";return r(i).length>0&&(a+=e+"["+n+"]\n"),a+h(n+".",e,i)}t.exports=function t(t){if(null===t)throw e("null");if(void 0===t)throw e("undefined");if("object"!=typeof t)throw e(typeof t);if("function"==typeof t.toJSON&&(t=t.toJSON()),null==t)return null;let r=a(t);if("table"!==r)throw e(r);return h("","",t)},t.exports.value=w},34618(t,e,r){e.q=r(23175),e.A=r(21001)}};
|
package/lib/166.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as _ from"ink-picture";export const __rspack_esm_id=166;export const __rspack_esm_ids=[166];export const __webpack_modules__={29557(s){s.exports=_}};
|
package/lib/178.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __rspack_esm_id=178;export const __rspack_esm_ids=[178];export const __webpack_modules__={28193(e,o,r){r.a(e,async function(e,t){try{r.r(o),r.d(o,{createCdpClient:()=>u});var n,s=r(99436),a=r(84361),c=e([a]);a=(c.then?(await c)():c)[0];var i=15e3,l=({address:e,port:o,method:r,phase:t="request",closeCode:n,closeReason:s,local:a=!1})=>{var c=s?Buffer.isBuffer(s)?s.toString("utf8"):String(s):"",i="connect"===t?"before the CDP session opened":r?`while waiting for ${r}`:"during the CDP session",l=`${e}:${o}`,d=[];null!=n&&d.push(`code ${n}`),c&&d.push(`reason: ${c}`);var u=[a?`CDP client closed the connection to ${l} ${i}.`:`CDP connection to ${l} closed ${i}.`,d.length>0?`WebSocket close ${d.join(", ")}.`:null,a?null:"The DevTools server currently accepts one CDP client at a time. Another DevTools window or CLI command may have replaced this session. Retry the command, close the other inspector, or avoid running DevTools commands in parallel."].filter(Boolean).join("\n"),f=Error(u);return f.code="CDP_CONNECTION_CLOSED",f.method=r,f.phase=t,f.closeCode=n,f.closeReason=c,f},d=(n=s(function*(e,o,r){var t,n=r?"string"==typeof r?{passcode:r}:r:{},s=n.passcode,a=n.accessToken;if(a)return`ws://${e}:${o}/ws?access_token=${encodeURIComponent(a)}`;if(!s)try{var c=new AbortController;t=setTimeout(()=>c.abort(),3e3);var i=yield fetch(`http://${e}:${o}/json/list`,{signal:c.signal});if(i.ok){var l=yield i.json(),d=l?.[0]?.webSocketDebuggerUrl;if(d){var u=d.match(/\/ws(?:\/.*)?$/);if(u)return`ws://${e}:${o}${u[0]}`}}}catch{}finally{void 0!==t&&clearTimeout(t)}return s?`ws://${e}:${o}/ws/${encodeURIComponent(s)}`:`ws://${e}:${o}/ws`}),function(e,o,r){return n.apply(this,arguments)}),u=(e,o,r)=>{var t,n,c=0,u=new Map,f=new Map,h=null,m=e=>{for(var o of u.values()){var r=o.reject,t=o.timer,n=o.method;clearTimeout(t),r(e(n))}u.clear()};return{connect:(t=s(function*(){var t=yield d(e,o,r);return new Promise((r,s)=>{n=new a.WebSocket(t);var c=!1;n.once("open",()=>{c=!0,h=null,r()}),n.once("error",r=>{c||s(Error(r.message||`Cannot connect to ${e}:${o}`))}),n.on("message",e=>{try{var o=JSON.parse(e.toString());if(null!=o.id&&u.has(o.id)){var r=u.get(o.id),t=r.resolve,n=r.reject,s=r.timer;clearTimeout(s),u.delete(o.id),o.error?n(Error(o.error.message)):t(o.result);return}if(o.method){var a=f.get(o.method);if(a)for(var c of a)c(o.params)}}catch{}}),n.on("close",(r,t)=>{h={closeCode:r,closeReason:t},c||s(l({address:e,port:o,phase:"connect",closeCode:r,closeReason:t})),m(n=>l({address:e,port:o,method:n,closeCode:r,closeReason:t}))})})}),function(){return t.apply(this,arguments)}),send:(r,t={},s=i)=>new Promise((a,i)=>{if(!n||n.readyState!==n.OPEN)return h?void i(l({address:e,port:o,method:r,closeCode:h.closeCode,closeReason:h.closeReason})):void i(Error(`Not connected to CDP at ${e}:${o} while sending ${r}`));var d=++c,f=setTimeout(()=>{u.delete(d),i(Error(`Timeout: ${r}`))},s);u.set(d,{resolve:a,reject:i,timer:f,method:r}),n.send(JSON.stringify({id:d,method:r,params:t}))}),on:(e,o)=>{f.has(e)||f.set(e,[]),f.get(e).push(o)},off:(e,o)=>{var r=f.get(e);if(r){var t=r.indexOf(o);t>=0&&r.splice(t,1)}},close:()=>{m(r=>l({address:e,port:o,method:r,local:!0})),n&&(n.terminate(),n=null)}}};t()}catch(e){t(e)}})}};
|
package/lib/212.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __rspack_esm_id=212;export const __rspack_esm_ids=[212];export const __webpack_modules__={76983(r,n,t){t.r(n),t.d(n,{runWithConcurrency:()=>i});var e,o=t(99436),i=(e=o(function*(r,n,t){var e,i=[],s=0,_=(e=o(function*(){for(;s<r.length;){var n=s++;i[n]=yield t(r[n],n)}}),function(){return e.apply(this,arguments)}),c=Array.from({length:Math.min(Number.isInteger(n)&&n>0?n:1,r.length)},()=>_());return yield Promise.all(c),i}),function(r,n,t){return e.apply(this,arguments)})}};
|
package/lib/215.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const __rspack_esm_id=215;export const __rspack_esm_ids=[215];export const __webpack_modules__={5018(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},44668(e,t,r){var i=r(56347);function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},70604(e){e.exports=function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},90250(e,t,r){var i=r(3634),o=r(70604),n=r(78243),s=r(5523);e.exports=function(e){return i(e)||o(e)||n(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},23878(e,t,r){var i=r(14319).default;e.exports=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=i(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},56347(e,t,r){var i=r(14319).default,o=r(23878);e.exports=function(e){var t=o(e,"string");return"symbol"==i(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},14319(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},69995(e,t,r){r.d(t,{H:()=>i});function i(e,t){try{var r=JSON.parse(e).error,i=r?.message??r;if("string"==typeof i&&i)return i}catch{}return e||t}},42208(e,t,r){r.d(t,{RP:()=>a});var i=r(99436),o=r(75720),n="CTOR",s="ctor@bricks.tools",u=`Co-authored-by: ${n} <${s}>`;function l(){return(l=i(function*(e){return!!(yield(0,o.sh)`cd ${e} && git config user.email`.quiet().nothrow().text()).trim()})).apply(this,arguments)}function a(e,t){return p.apply(this,arguments)}function p(){return(p=i(function*(e,t,r=[]){var i=yield function(e){return l.apply(this,arguments)}(e),o=i?[]:["-c",`user.name=${n}`,"-c",`user.email=${s}`],a=[];for(var p of t)a.push("-m",p);return i&&a.push("-m",u),[...o,"commit",...r,...a]})).apply(this,arguments)}},13376(e,t,r){r.d(t,{a:()=>l,p:()=>s});var i=r(99436),o=r(51455),n=".bricks/.last-pushed-commit";function s(e){return u.apply(this,arguments)}function u(){return(u=i(function*(e){try{return(yield(0,o.readFile)(`${e}/${n}`,"utf8")).trim()||null}catch{return null}})).apply(this,arguments)}function l(e,t){return a.apply(this,arguments)}function a(){return(a=i(function*(e,t){t&&(yield(0,o.mkdir)(`${e}/.bricks`,{recursive:!0}),yield(0,o.writeFile)(`${e}/${n}`,t))})).apply(this,arguments)}},69070(e,t,r){r.d(t,{k:()=>s,q:()=>l});var i=r(99436),o=r(26848),n=r(1708);function s(e){return u.apply(this,arguments)}function u(){return(u=i(function*(e){if(!n.stdin.isTTY)return"";var t=(0,o.createInterface)({input:n.stdin,output:n.stdout});try{return(yield t.question(`${e} `)).trim()}finally{t.close()}})).apply(this,arguments)}function l(e){return a.apply(this,arguments)}function a(){return(a=i(function*(e){return(yield s(e))==="y"})).apply(this,arguments)}},75720(e,t,r){r.d(t,{p:()=>c,sh:()=>h});var i,o,n=r(90250),s=r(99436),u=r(5018),l=r(44668),a=r(31421),p=r(73024),c=()=>{var e=process.argv[1];return e&&(0,p.existsSync)(e)?[process.execPath,e]:[process.execPath]},d=l(function e(t){u(this,e),this._cwd=void 0,this._mode="default",this._throw=!0,this._env=void 0,this._promise=null,this.args=t},[{key:"cwd",value:function(e){return this._cwd=e,this}},{key:"quiet",value:function(){return this._mode="quiet",this}},{key:"nothrow",value:function(){return this._throw=!1,this}},{key:"env",value:function(e){return this._env={...this._env,...e},this}},{key:"text",value:(i=s(function*(){return"default"===this._mode&&(this._mode="text"),(yield this.run()).stdout.toString("utf8")}),function(){return i.apply(this,arguments)})},{key:"then",value:function(e,t){return this.run().then(e,t)}},{key:"run",value:function(){return this._promise||(this._promise=this.exec()),this._promise}},{key:"exec",value:(o=s(function*(){var e=n(this.args),t=e[0],r=(function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i})(e).slice(1);if(!t)throw Error("sh: empty command");var i="default"===this._mode?["inherit","pipe","pipe"]:"quiet"===this._mode?["ignore","pipe","pipe"]:["inherit","pipe","pipe"],o=this._env?{...process.env,...this._env}:void 0,s=(0,a.spawn)(t,r,{cwd:this._cwd,stdio:i,env:o}),u=[],l=[];s.stdout?.on("data",e=>{u.push(e),"default"===this._mode&&process.stdout.write(e)}),s.stderr?.on("data",e=>{l.push(e),"default"===this._mode&&process.stderr.write(e)});var p=yield new Promise((e,t)=>{s.on("error",t),s.on("close",t=>e(t??0))}),c=Buffer.concat(u),d=Buffer.concat(l);if(0!==p&&this._throw){var f=Error(`sh: command failed with exit ${p}: ${this.args.join(" ")}`);throw f.exitCode=p,f.stdout=c,f.stderr=d,f}return{exitCode:p,stdout:c,stderr:d}}),function(){return o.apply(this,arguments)})}]),f=/\s/;function h(e,...t){var r,i,o,n,s,u=(r=[],i="",o=!1,n=()=>{o&&(r.push(i),i="",o=!1)},s=e=>{i+=e,o=!0},(e.forEach((e,r)=>{for(var i=0;i<e.length;i++){var o=e[i];f.test(o)?n():s(o)}r<t.length&&(e=>{if(null!=e){if(Array.isArray(e))return e.forEach((e,t)=>{t>0&&n(),s(String(e))});s(String(e))}})(t[r])}),n(),r.length>=3&&"cd"===r[0]&&"&&"===r[2])?{tokens:r.slice(3),initialCwd:r[1]}:{tokens:r}),l=u.tokens,a=u.initialCwd,p=new d(l);return a&&p.cwd(a),p}},42914(e,t,r){r.r(t),r.d(t,{deploy:()=>h});var i,o,n=r(99436),s=r(51455),u=r(75720),l=r(69995),a=r(42208),p=r(13376),c=r(69070),d=(i=n(function*(e){try{return yield(0,s.access)(e),!0}catch{return!1}}),function(e){return i.apply(this,arguments)}),f=(o=n(function*(e){return JSON.parse((yield(0,s.readFile)(e,"utf8")))}),function(e){return o.apply(this,arguments)});function h(){return y.apply(this,arguments)}function y(){return(y=n(function*(e={}){process.env.BRICKS_RELEASE_SIGN||(process.env.BRICKS_RELEASE_SIGN="CTOR");var t,r=process.cwd(),i=e.changelogs,o=e.changelogsFile,n=e.autoCommit,h=e.autoVersion,y=e.version,v=e.yes,m=0===(yield(0,u.sh)`cd ${r} && git status`.quiet().nothrow()).exitCode;if(!m&&!v&&!(yield(0,c.q)("No git repository found, continue? (y/n)")))throw Error("Deployment cancelled");var _=yield f(`${r}/application.json`),g=yield f(`${r}/.bricks/build/application-config.json`),x=`${r}/package.json`,w=yield d(x);if(y){if(t=y,w){var b=yield f(x);b.version=t,yield(0,s.writeFile)(x,JSON.stringify(b,null,2)+"\n")}}else if(h&&w){var S=yield f(x),$=(S.version||"0.0.0").split(".");$[2]=String(Number($[2]||0)+1),S.version=t=$.join("."),yield(0,s.writeFile)(x,JSON.stringify(S,null,2)+"\n")}else t=w?(yield f(x)).version:void 0;var k="";if(i)k=i;else if(o){if(!(yield d(o)))throw Error(`Changelogs file not found: ${o}`);k=yield(0,s.readFile)(o,"utf8")}else v||(k=(yield(0,c.k)("Enter changelogs (optional, press Enter to skip):"))||"");var E="";if(m){if(yield(0,u.sh)`cd ${r} && git diff --name-only --diff-filter=ACMR`.text())if(n){var C=`chore: release ${t||"new version"}`,j=k||"[no changelogs]";yield(0,u.sh)`cd ${r} && git add -A`;var A=yield(0,a.RP)(r,[C,j]);yield(0,u.sh)`cd ${r} && git ${A}`}else throw Error("Unstaged changes found, please commit or stash your changes before deploying");E=(yield(0,u.sh)`cd ${r} && git rev-parse HEAD`.text()).trim()}if(!v&&!(yield(0,c.q)("Are you sure you want to deploy? (y/n)")))throw Error("Deployment cancelled");var N="module"===_.type,q={...g,title:t||g.title,bricks_project_last_commit_id:E||void 0},M=`${r}/.bricks/build/release-config.json`;yield(0,s.writeFile)(M,JSON.stringify(q));var O=["bricks",N?"module":"app","release",_.id,"-c",M,"--json"];_.name&&O.push("--name",_.name),t&&O.push("--version",t),k&&O.push("--changelogs",k);var R=yield(0,u.sh)`${O}`.quiet().nothrow();if(0!==R.exitCode){var P=R.stderr.toString()||R.stdout.toString();throw Error((0,l.H)(P,"Release failed"))}var F=JSON.parse(R.stdout.toString());E&&(yield(0,p.a)(r,E)),console.log(`${N?"Module":"App"} deployed: ${F.target?.name||_.name}`)})).apply(this,arguments)}}};
|