@shopify/create-hydrogen 5.0.26 → 5.0.28
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/dist/assets/hydrogen/starter/.graphqlrc.ts +4 -2
- package/dist/assets/hydrogen/starter/CHANGELOG.md +142 -0
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +67 -38
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +45 -7
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +20 -38
- package/dist/assets/hydrogen/starter/app/lib/fragments.ts +8 -0
- package/dist/assets/hydrogen/starter/app/routes/account_.login.tsx +10 -0
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +2 -6
- package/dist/assets/hydrogen/starter/app/styles/app.css +21 -1
- package/dist/assets/hydrogen/starter/eslint.config.js +1 -0
- package/dist/assets/hydrogen/starter/package.json +7 -6
- package/dist/assets/hydrogen/starter/server.ts +5 -7
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +89 -0
- package/dist/{chunk-2LZQLWDR.js → chunk-YKN6SEJT.js} +246 -246
- package/dist/create-app.js +2 -2
- package/dist/{error-handler-XRI3ZDLO.js → error-handler-2JZDGPAN.js} +1 -1
- package/package.json +1 -1
package/dist/create-app.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
3
|
-
import{a as T_}from"./chunk-VXJIQGAB.js";import{$ as M3e,A as yie,Aa as wie,B as P3e,Ba as rde,C as Xfe,Ca as iCe,D as Fl,Da as sCe,E as O3e,Ea as nde,F as vie,Fa as ide,G as N3e,Ga as Tie,H as I3e,Ha as aCe,I as B3e,Ia as oCe,J as nm,Ja as sde,K as Qfe,Ka as NAr,L as Eg,La as uCe,M as xie,N as h1,O as Zfe,Oa as cCe,P as L3e,Q as P1,R as kw,S as O1,T as Fw,U as bie,V as jM,W as Die,X as Cf,Y as R3e,Z as Eie,_ as j3e,a as lY,aa as q3e,b as cl,ba as $3e,c as s_,ca as Cie,d as cC,da as U3e,e as a_,ea as Aie,f as LM,fa as V3e,g as die,ga as H3e,h as C3e,ha as K3e,i as hie,ia as G3e,j as A3e,ja as J3e,k as _ie,ka as Sie,l as S3e,la as z3e,m as pY,ma as W3e,n as lC,na as Y3e,o as w3e,oa as X3e,p as T3e,pa as fY,q as mie,qa as o_,r as k3e,ra as Q3e,s as qx,sa as dY,t as RM,ta as Z3e,u as Wy,ua as eCe,v as F3e,va as tCe,w as Yfe,wa as rCe,x as MD,xa as ede,y as $E,ya as nCe,z as gie,za as tde}from"./chunk-
|
|
3
|
+
import{a as T_}from"./chunk-VXJIQGAB.js";import{$ as M3e,A as yie,Aa as wie,B as P3e,Ba as rde,C as Xfe,Ca as iCe,D as Fl,Da as sCe,E as O3e,Ea as nde,F as vie,Fa as ide,G as N3e,Ga as Tie,H as I3e,Ha as aCe,I as B3e,Ia as oCe,J as nm,Ja as sde,K as Qfe,Ka as NAr,L as Eg,La as uCe,M as xie,N as h1,O as Zfe,Oa as cCe,P as L3e,Q as P1,R as kw,S as O1,T as Fw,U as bie,V as jM,W as Die,X as Cf,Y as R3e,Z as Eie,_ as j3e,a as lY,aa as q3e,b as cl,ba as $3e,c as s_,ca as Cie,d as cC,da as U3e,e as a_,ea as Aie,f as LM,fa as V3e,g as die,ga as H3e,h as C3e,ha as K3e,i as hie,ia as G3e,j as A3e,ja as J3e,k as _ie,ka as Sie,l as S3e,la as z3e,m as pY,ma as W3e,n as lC,na as Y3e,o as w3e,oa as X3e,p as T3e,pa as fY,q as mie,qa as o_,r as k3e,ra as Q3e,s as qx,sa as dY,t as RM,ta as Z3e,u as Wy,ua as eCe,v as F3e,va as tCe,w as Yfe,wa as rCe,x as MD,xa as ede,y as $E,ya as nCe,z as gie,za as tde}from"./chunk-YKN6SEJT.js";import{a as PAr}from"./chunk-AUULK6IN.js";import"./chunk-ZLNTSIDN.js";import{f as OAr}from"./chunk-RUCJI22O.js";import"./chunk-6YUUFKYO.js";import"./chunk-CJKPLQJ7.js";import"./chunk-Y5VZE2FH.js";import{a as $u,c as Wu,e as Mx,g as __dirname,h as __filename,i as _i}from"./chunk-LBUW5UHX.js";var pCe=Wu(($Mr,lCe)=>{"use strict";_i();var E9=class s extends Error{constructor(a,o,p){super("[ParserError] "+a,o,p),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,s)}},kie=class{constructor(a){this.parser=a,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},hY=class{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 kie(this.parseStart)}parse(a){if(a.length===0||a.length==null)return;this._buf=String(a),this.ii=-1,this.char=-1;let o;for(;o===!1||this.nextChar();)o=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++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(){this.char=1114112;let a;do a=this.state.parser,this.runOne();while(this.state.parser!==a);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(a){if(typeof a!="function")throw new E9("Tried to set state to non-existent state: "+JSON.stringify(a));this.state.parser=a}goto(a){return this.next(a),this.runOne()}call(a,o){o&&this.next(o),this.stack.push(this.state),this.state=new kie(a)}callNow(a,o){return this.call(a,o),this.runOne()}return(a){if(this.stack.length===0)throw this.error(new E9("Stack underflow"));a===void 0&&(a=this.state.buf),this.state=this.stack.pop(),this.state.returned=a}returnNow(a){return this.return(a),this.runOne()}consume(){if(this.char===1114112)throw this.error(new E9("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(a){return a.line=this.line,a.col=this.col,a.pos=this.pos,a}parseStart(){throw new E9("Must declare a parseStart method")}};hY.END=1114112;hY.Error=E9;lCe.exports=hY});var dCe=Wu((VMr,fCe)=>{"use strict";_i();fCe.exports=s=>{let a=new Date(s);if(isNaN(a))throw new TypeError("Invalid Datetime");return a}});var Fie=Wu((KMr,hCe)=>{"use strict";_i();hCe.exports=(s,a)=>{for(a=String(a);a.length<s;)a="0"+a;return a}});var mCe=Wu((JMr,_Ce)=>{"use strict";_i();var MM=Fie(),ade=class extends Date{constructor(a){super(a+"Z"),this.isFloating=!0}toISOString(){let a=`${this.getUTCFullYear()}-${MM(2,this.getUTCMonth()+1)}-${MM(2,this.getUTCDate())}`,o=`${MM(2,this.getUTCHours())}:${MM(2,this.getUTCMinutes())}:${MM(2,this.getUTCSeconds())}.${MM(3,this.getUTCMilliseconds())}`;return`${a}T${o}`}};_Ce.exports=s=>{let a=new ade(s);if(isNaN(a))throw new TypeError("Invalid Datetime");return a}});var vCe=Wu((WMr,yCe)=>{"use strict";_i();var gCe=Fie(),IAr=global.Date,ode=class extends IAr{constructor(a){super(a),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${gCe(2,this.getUTCMonth()+1)}-${gCe(2,this.getUTCDate())}`}};yCe.exports=s=>{let a=new ode(s);if(isNaN(a))throw new TypeError("Invalid Datetime");return a}});var bCe=Wu((XMr,xCe)=>{"use strict";_i();var Pie=Fie(),ude=class extends Date{constructor(a){super(`0000-01-01T${a}Z`),this.isTime=!0}toISOString(){return`${Pie(2,this.getUTCHours())}:${Pie(2,this.getUTCMinutes())}:${Pie(2,this.getUTCSeconds())}.${Pie(3,this.getUTCMilliseconds())}`}};xCe.exports=s=>{let a=new ude(s);if(isNaN(a))throw new TypeError("Invalid Datetime");return a}});var Oie=Wu((exports,module)=>{"use strict";_i();module.exports=makeParserClass(pCe());module.exports.makeParserClass=makeParserClass;var TomlError=class s extends Error{constructor(a){super(a),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,s),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=s=>{let a=new TomlError(s.message);return a.code=s.code,a.wrapped=s,a};module.exports.TomlError=TomlError;var createDateTime=dCe(),createDateTimeFloat=mCe(),createDate=vCe(),createTime=bCe(),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]:`
|
|
4
4
|
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(s){return s>=CHAR_0&&s<=CHAR_9}function isHexit(s){return s>=CHAR_A&&s<=CHAR_F||s>=CHAR_a&&s<=CHAR_f||s>=CHAR_0&&s<=CHAR_9}function isBit(s){return s===CHAR_1||s===CHAR_0}function isOctit(s){return s>=CHAR_0&&s<=CHAR_7}function isAlphaNumQuoteHyphen(s){return s>=CHAR_A&&s<=CHAR_Z||s>=CHAR_a&&s<=CHAR_z||s>=CHAR_0&&s<=CHAR_9||s===CHAR_APOS||s===CHAR_QUOT||s===CHAR_LOWBAR||s===CHAR_HYPHEN}function isAlphaNumHyphen(s){return s>=CHAR_A&&s<=CHAR_Z||s>=CHAR_a&&s<=CHAR_z||s>=CHAR_0&&s<=CHAR_9||s===CHAR_LOWBAR||s===CHAR_HYPHEN}var _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(s,a){return hasOwnProperty.call(s,a)?!0:(a==="__proto__"&&defineProperty(s,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(s){return s===null||typeof s!="object"?!1:s[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(s){return s===null||typeof s!="object"?!1:s[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(s){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:s}})}function isInlineList(s){return s===null||typeof s!="object"?!1:s[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(s){return s===null||typeof s!="object"?!1:s[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(s){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(a){try{this.value=global.BigInt.asIntN(64,a)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(s){let a=Number(s);return Object.is(a,-0)&&(a=0),global.BigInt&&!Number.isSafeInteger(a)?new BoxedBigInt(s):Object.defineProperties(new Number(a),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${s}]`}})}function isInteger(s){return s===null||typeof s!="object"?!1:s[_type]===INTEGER}var FLOAT=Symbol("float");function Float(s){return Object.defineProperties(new Number(s),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${s}]`}})}function isFloat(s){return s===null||typeof s!="object"?!1:s[_type]===FLOAT}function tomlType(s){let a=typeof s;if(a==="object"){if(s===null)return"null";if(s instanceof Date)return"datetime";if(_type in s)switch(s[_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 a}function makeParserClass(s){class a extends s{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===s.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===s.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);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===s.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(p){let d=this.ctx,h=p.key.pop();for(let g of p.key){if(hasKey(d,g)&&(!isTable(d[g])||d[g][_declared]))throw this.error(new TomlError("Can't redefine existing key"));d=d[g]=d[g]||Table()}if(hasKey(d,h))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(p.value)||isFloat(p.value)?d[h]=p.value.valueOf():d[h]=p.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(p){return this.state.resultTable?this.state.resultTable.push(p):this.state.resultTable=[p],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}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(p){return this.returnNow({key:this.state.resultTable,value:p})}parseComment(){do if(this.char===s.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}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(p){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,p)&&(!isTable(this.ctx[p])||this.ctx[p][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[p]=this.ctx[p]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,p))this.ctx=this.ctx[p]=Table();else if(isTable(this.ctx[p]))this.ctx=this.ctx[p];else if(isList(this.ctx[p]))this.ctx=this.ctx[p][this.ctx[p].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else 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(p){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,p)||(this.ctx[p]=List()),isInlineList(this.ctx[p]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[p])){let d=Table();this.ctx[p].push(d),this.ctx=d}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,p))this.ctx=this.ctx[p]=Table();else{if(isInlineList(this.ctx[p]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[p]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[p]))this.ctx=this.ctx[p][this.ctx[p].length-1];else if(isTable(this.ctx[p]))this.ctx=this.ctx[p];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(p){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===s.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);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(p){return this.returnNow(p)}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)return this.state.buf==="-"?this.return(-1/0):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===s.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}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.errorControlCharInString();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===s.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.errorControlCharInString();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.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}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"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(p){return this.state.buf+=p,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===s.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.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let p="\\u00";return this.char<16&&(p+="0"),p+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${p} instead`))}recordMultiEscapeReplacement(p){return this.state.buf+=p,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.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}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(p){try{let d=parseInt(p,16);if(d>=SURROGATE_FIRST&&d<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(d))}catch(d){throw this.error(TomlError.wrap(d))}}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 p=Integer(this.state.buf);if(p.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(p)}}}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 return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):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 return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):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 return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):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 p=Integer(this.state.buf);if(p.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(p)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let p=Integer(this.state.buf);if(p.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(p)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let p=Integer(this.state.buf);if(p.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(p)}}}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)}else 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)}else{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)}else 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(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)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)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)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)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)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));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));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));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));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(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}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===s.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(p){if(this.state.resultArr){let d=this.state.resultArr[_contentType],h=tomlType(p);if(d!==h)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${d} and ${h}`))}else this.state.resultArr=InlineList(tomlType(p));return isFloat(p)||isInteger(p)?this.state.resultArr.push(p.valueOf()):this.state.resultArr.push(p),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===s.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(p){let d=this.state.resultTable,h=p.key.pop();for(let g of p.key){if(hasKey(d,g)&&(!isTable(d[g])||d[g][_declared]))throw this.error(new TomlError("Can't redefine existing key"));d=d[g]=d[g]||Table()}if(hasKey(d,h))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(p.value)||isFloat(p.value)?d[h]=p.value.valueOf():d[h]=p.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===s.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.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return a}});var Nie=Wu((eqr,DCe)=>{"use strict";_i();DCe.exports=BAr;function BAr(s,a){if(s.pos==null||s.line==null)return s;let o=s.message;if(o+=` at row ${s.line+1}, col ${s.col+1}, pos ${s.pos}:
|
|
5
5
|
`,a&&a.split){let p=a.split(/\n/),d=String(Math.min(p.length,s.line+3)).length,h=" ";for(;h.length<d;)h+=" ";for(let g=Math.max(0,s.line-1);g<Math.min(p.length,s.line+2);++g){let y=String(g+1);if(y.length<d&&(y=" "+y),s.line===g){o+=y+"> "+p[g]+`
|
|
6
6
|
`,o+=h+" ";for(let v=0;v<s.col;++v)o+=" ";o+=`^
|
|
@@ -1426,7 +1426,7 @@ end
|
|
|
1426
1426
|
`)),s.linkname&&(a+=dme(" linkpath="+s.linkname+`
|
|
1427
1427
|
`));var o=s.pax;if(o)for(var p in o)a+=dme(" "+p+"="+o[p]+`
|
|
1428
1428
|
`);return Buffer.from(a)};Cq.decodePax=function(s){for(var a={};s.length;){for(var o=0;o<s.length&&s[o]!==32;)o++;var p=parseInt(s.slice(0,o).toString(),10);if(!p)return a;var d=s.slice(o+1,p-1).toString(),h=d.indexOf("=");if(h===-1)return a;a[d.slice(0,h)]=d.slice(h+1),s=s.slice(p)}return a};Cq.encode=function(s){var a=iMr(512),o=s.name,p="";if(s.typeflag===5&&o[o.length-1]!=="/"&&(o+="/"),Buffer.byteLength(o)!==o.length)return null;for(;Buffer.byteLength(o)>100;){var d=o.indexOf("/");if(d===-1)return null;p+=p?"/"+o.slice(0,d):o.slice(0,d),o=o.slice(d+1)}return Buffer.byteLength(o)>100||Buffer.byteLength(p)>155||s.linkname&&Buffer.byteLength(s.linkname)>100?null:(a.write(o),a.write(Yw(s.mode&lMr,6),100),a.write(Yw(s.uid,6),108),a.write(Yw(s.gid,6),116),a.write(Yw(s.size,11),124),a.write(Yw(s.mtime.getTime()/1e3|0,11),136),a[156]=aPe+dMr(s.type),s.linkname&&a.write(s.linkname,157),oPe.copy(a,bX),oMr.copy(a,hme),s.uname&&a.write(s.uname,265),s.gname&&a.write(s.gname,297),a.write(Yw(s.devmajor||0,6),329),a.write(Yw(s.devminor||0,6),337),p&&a.write(p,345),a.write(Yw(cPe(a),6),148),a)};Cq.decode=function(s,a,o){var p=s[156]===0?0:s[156]-aPe,d=Eq(s,0,100,a),h=Xw(s,100,8),g=Xw(s,108,8),y=Xw(s,116,8),v=Xw(s,124,12),C=Xw(s,136,12),w=fMr(p),k=s[157]===0?null:Eq(s,157,100,a),N=Eq(s,265,32),T=Eq(s,297,32),P=Xw(s,329,8),q=Xw(s,337,8),ee=cPe(s);if(ee===256)return null;if(ee!==Xw(s,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(oPe.compare(s,bX,bX+6)===0)s[345]&&(d=Eq(s,345,155,a)+"/"+d);else if(!(uMr.compare(s,bX,bX+6)===0&&cMr.compare(s,hme,hme+2)===0)){if(!o)throw new Error("Invalid tar header: unknown format.")}return p===0&&d&&d[d.length-1]==="/"&&(p=5),{name:d,mode:h,uid:g,gid:y,size:v,mtime:new Date(1e3*C),type:w,linkname:k,uname:N,gname:T,devmajor:P,devminor:q}}});var mPe=Wu((kin,_Pe)=>{"use strict";_i();var pPe=$u("util"),_Mr=sPe(),DX=_me(),fPe=Dq().Writable,dPe=Dq().PassThrough,hPe=function(){},lPe=function(s){return s&=511,s&&512-s},mMr=function(s,a){var o=new Mae(s,a);return o.end(),o},gMr=function(s,a){return a.path&&(s.name=a.path),a.linkpath&&(s.linkname=a.linkpath),a.size&&(s.size=parseInt(a.size,10)),s.pax=a,s},Mae=function(s,a){this._parent=s,this.offset=a,dPe.call(this,{autoDestroy:!1})};pPe.inherits(Mae,dPe);Mae.prototype.destroy=function(s){this._parent.destroy(s)};var OS=function(s){if(!(this instanceof OS))return new OS(s);fPe.call(this,s),s=s||{},this._offset=0,this._buffer=_Mr(),this._missing=0,this._partial=!1,this._onparse=hPe,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var a=this,o=a._buffer,p=function(){a._continue()},d=function(N){if(a._locked=!1,N)return a.destroy(N);a._stream||p()},h=function(){a._stream=null;var N=lPe(a._header.size);N?a._parse(N,g):a._parse(512,k),a._locked||p()},g=function(){a._buffer.consume(lPe(a._header.size)),a._parse(512,k),p()},y=function(){var N=a._header.size;a._paxGlobal=DX.decodePax(o.slice(0,N)),o.consume(N),h()},v=function(){var N=a._header.size;a._pax=DX.decodePax(o.slice(0,N)),a._paxGlobal&&(a._pax=Object.assign({},a._paxGlobal,a._pax)),o.consume(N),h()},C=function(){var N=a._header.size;this._gnuLongPath=DX.decodeLongPath(o.slice(0,N),s.filenameEncoding),o.consume(N),h()},w=function(){var N=a._header.size;this._gnuLongLinkPath=DX.decodeLongPath(o.slice(0,N),s.filenameEncoding),o.consume(N),h()},k=function(){var N=a._offset,T;try{T=a._header=DX.decode(o.slice(0,512),s.filenameEncoding,s.allowUnknownFormat)}catch(P){a.emit("error",P)}if(o.consume(512),!T){a._parse(512,k),p();return}if(T.type==="gnu-long-path"){a._parse(T.size,C),p();return}if(T.type==="gnu-long-link-path"){a._parse(T.size,w),p();return}if(T.type==="pax-global-header"){a._parse(T.size,y),p();return}if(T.type==="pax-header"){a._parse(T.size,v),p();return}if(a._gnuLongPath&&(T.name=a._gnuLongPath,a._gnuLongPath=null),a._gnuLongLinkPath&&(T.linkname=a._gnuLongLinkPath,a._gnuLongLinkPath=null),a._pax&&(a._header=T=gMr(T,a._pax),a._pax=null),a._locked=!0,!T.size||T.type==="directory"){a._parse(512,k),a.emit("entry",T,mMr(a,N),d);return}a._stream=new Mae(a,N),a.emit("entry",T,a._stream,d),a._parse(T.size,h),p()};this._onheader=k,this._parse(512,k)};pPe.inherits(OS,fPe);OS.prototype.destroy=function(s){this._destroyed||(this._destroyed=!0,s&&this.emit("error",s),this.emit("close"),this._stream&&this._stream.emit("close"))};OS.prototype._parse=function(s,a){this._destroyed||(this._offset+=s,this._missing=s,a===this._onheader&&(this._partial=!1),this._onparse=a)};OS.prototype._continue=function(){if(!this._destroyed){var s=this._cb;this._cb=hPe,this._overflow?this._write(this._overflow,void 0,s):s()}};OS.prototype._write=function(s,a,o){if(!this._destroyed){var p=this._stream,d=this._buffer,h=this._missing;if(s.length&&(this._partial=!0),s.length<h)return this._missing-=s.length,this._overflow=null,p?p.write(s,o):(d.append(s),o());this._cb=o,this._missing=0;var g=null;s.length>h&&(g=s.slice(h),s=s.slice(0,h)),p?p.end(s):d.append(s),this._overflow=g,this._onparse()}};OS.prototype._final=function(s){if(this._partial)return this.destroy(new Error("Unexpected end of data"));s()};_Pe.exports=OS});var yPe=Wu((Pin,gPe)=>{"use strict";_i();gPe.exports=$u("fs").constants||$u("constants")});var EPe=Wu((Nin,DPe)=>{"use strict";_i();var Aq=yPe(),vPe=sde(),$ae=T_(),yMr=Buffer.alloc,xPe=Dq().Readable,Sq=Dq().Writable,vMr=$u("string_decoder").StringDecoder,qae=_me(),xMr=parseInt("755",8),bMr=parseInt("644",8),bPe=yMr(1024),gme=function(){},mme=function(s,a){a&=511,a&&s.push(bPe.slice(0,512-a))};function DMr(s){switch(s&Aq.S_IFMT){case Aq.S_IFBLK:return"block-device";case Aq.S_IFCHR:return"character-device";case Aq.S_IFDIR:return"directory";case Aq.S_IFIFO:return"fifo";case Aq.S_IFLNK:return"symlink"}return"file"}var Uae=function(s){Sq.call(this),this.written=0,this._to=s,this._destroyed=!1};$ae(Uae,Sq);Uae.prototype._write=function(s,a,o){if(this.written+=s.length,this._to.push(s))return o();this._to._drain=o};Uae.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Vae=function(){Sq.call(this),this.linkname="",this._decoder=new vMr("utf-8"),this._destroyed=!1};$ae(Vae,Sq);Vae.prototype._write=function(s,a,o){this.linkname+=this._decoder.write(s),o()};Vae.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var EX=function(){Sq.call(this),this._destroyed=!1};$ae(EX,Sq);EX.prototype._write=function(s,a,o){o(new Error("No body allowed for this entry"))};EX.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var EC=function(s){if(!(this instanceof EC))return new EC(s);xPe.call(this,s),this._drain=gme,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};$ae(EC,xPe);EC.prototype.entry=function(s,a,o){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof a=="function"&&(o=a,a=null),o||(o=gme);var p=this;if((!s.size||s.type==="symlink")&&(s.size=0),s.type||(s.type=DMr(s.mode)),s.mode||(s.mode=s.type==="directory"?xMr:bMr),s.uid||(s.uid=0),s.gid||(s.gid=0),s.mtime||(s.mtime=new Date),typeof a=="string"&&(a=Buffer.from(a)),Buffer.isBuffer(a)){s.size=a.length,this._encode(s);var d=this.push(a);return mme(p,s.size),d?process.nextTick(o):this._drain=o,new EX}if(s.type==="symlink"&&!s.linkname){var h=new Vae;return vPe(h,function(y){if(y)return p.destroy(),o(y);s.linkname=h.linkname,p._encode(s),o()}),h}if(this._encode(s),s.type!=="file"&&s.type!=="contiguous-file")return process.nextTick(o),new EX;var g=new Uae(this);return this._stream=g,vPe(g,function(y){if(p._stream=null,y)return p.destroy(),o(y);if(g.written!==s.size)return p.destroy(),o(new Error("size mismatch"));mme(p,s.size),p._finalizing&&p.finalize(),o()}),g}};EC.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(bPe),this.push(null))};EC.prototype.destroy=function(s){this._destroyed||(this._destroyed=!0,s&&this.emit("error",s),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};EC.prototype._encode=function(s){if(!s.pax){var a=qae.encode(s);if(a){this.push(a);return}}this._encodePax(s)};EC.prototype._encodePax=function(s){var a=qae.encodePax({name:s.name,linkname:s.linkname,pax:s.pax}),o={name:"PaxHeader",mode:s.mode,uid:s.uid,gid:s.gid,size:a.length,mtime:s.mtime,type:"pax-header",linkname:s.linkname&&"PaxHeader",uname:s.uname,gname:s.gname,devmajor:s.devmajor,devminor:s.devminor};this.push(qae.encode(o)),this.push(a),mme(this,a.length),o.size=s.size,o.type=s.type,this.push(qae.encode(o))};EC.prototype._read=function(s){var a=this._drain;this._drain=gme,a()};DPe.exports=EC});var CPe=Wu(yme=>{"use strict";_i();yme.extract=mPe();yme.pack=EPe()});var TPe=Wu((Rin,wPe)=>{"use strict";_i();var Hae=$u("path"),APe=$u("fs"),SPe=parseInt("0777",8);wPe.exports=wq.mkdirp=wq.mkdirP=wq;function wq(s,a,o,p){typeof a=="function"?(o=a,a={}):(!a||typeof a!="object")&&(a={mode:a});var d=a.mode,h=a.fs||APe;d===void 0&&(d=SPe&~process.umask()),p||(p=null);var g=o||function(){};s=Hae.resolve(s),h.mkdir(s,d,function(y){if(!y)return p=p||s,g(null,p);switch(y.code){case"ENOENT":wq(Hae.dirname(s),a,function(v,C){v?g(v,C):wq(s,a,g,C)});break;default:h.stat(s,function(v,C){v||!C.isDirectory()?g(y,p):g(null,p)});break}})}wq.sync=function s(a,o,p){(!o||typeof o!="object")&&(o={mode:o});var d=o.mode,h=o.fs||APe;d===void 0&&(d=SPe&~process.umask()),p||(p=null),a=Hae.resolve(a);try{h.mkdirSync(a,d),p=p||a}catch(y){switch(y.code){case"ENOENT":p=s(Hae.dirname(a),o,p),s(a,o,p);break;default:var g;try{g=h.statSync(a)}catch{throw y}if(!g.isDirectory())throw y;break}}return p}});var RPe=Wu(bme=>{"use strict";_i();var EMr=e9e(),PPe=CPe(),OPe=NAr(),CMr=TPe(),NPe=$u("fs"),Km=$u("path"),AMr=$u("os"),CX=AMr.platform()==="win32",AX=function(){},xme=function(s){return s},vme=CX?function(s){return s.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:xme,SMr=function(s,a,o,p,d,h){var g=d||["."];return function(v){if(!g.length)return v();var C=g.shift(),w=Km.join(o,C);a.call(s,w,function(k,N){if(k)return v(k);if(!N.isDirectory())return v(null,C,N);s.readdir(w,function(T,P){if(T)return v(T);h&&P.sort();for(var q=0;q<P.length;q++)p(Km.join(o,C,P[q]))||g.push(Km.join(C,P[q]));v(null,C,N)})})}},IPe=function(s,a){return function(o){o.name=o.name.split("/").slice(a).join("/");var p=o.linkname;return p&&(o.type==="link"||Km.isAbsolute(p))&&(o.linkname=p.split("/").slice(a).join("/")),s(o)}};bme.pack=function(s,a){s||(s="."),a||(a={});var o=a.fs||NPe,p=a.ignore||a.filter||AX,d=a.map||AX,h=a.mapStream||xme,g=SMr(o,a.dereference?o.stat:o.lstat,s,p,a.entries,a.sort),y=a.strict!==!1,v=typeof a.umask=="number"?~a.umask:~BPe(),C=typeof a.dmode=="number"?a.dmode:0,w=typeof a.fmode=="number"?a.fmode:0,k=a.pack||PPe.pack(),N=a.finish||AX;a.strip&&(d=IPe(d,a.strip)),a.readable&&(C|=parseInt(555,8),w|=parseInt(444,8)),a.writable&&(C|=parseInt(333,8),w|=parseInt(222,8));var T=function(ee,ne){o.readlink(Km.join(s,ee),function($,M){if($)return k.destroy($);ne.linkname=vme(M),k.entry(ne,q)})},P=function(ee,ne,$){if(ee)return k.destroy(ee);if(!ne)return a.finalize!==!1&&k.finalize(),N(k);if($.isSocket())return q();var M={name:vme(ne),mode:($.mode|($.isDirectory()?C:w))&v,mtime:$.mtime,size:$.size,type:"file",uid:$.uid,gid:$.gid};if($.isDirectory())return M.size=0,M.type="directory",M=d(M)||M,k.entry(M,q);if($.isSymbolicLink())return M.size=0,M.type="symlink",M=d(M)||M,T(ne,M);if(M=d(M)||M,!$.isFile())return y?k.destroy(new Error("unsupported type for "+ne)):q();var B=k.entry(M,q);if(B){var J=h(o.createReadStream(Km.join(s,ne),{start:0,end:M.size>0?M.size-1:M.size}),M);J.on("error",function(ae){B.destroy(ae)}),OPe(J,B)}},q=function(ee){if(ee)return k.destroy(ee);g(P)};return q(),k};var wMr=function(s){return s.length?s[s.length-1]:null},TMr=function(){return process.getuid?process.getuid():-1},BPe=function(){return process.umask?process.umask():0};bme.extract=function(s,a){s||(s="."),a||(a={});var o=a.fs||NPe,p=a.ignore||a.filter||AX,d=a.map||AX,h=a.mapStream||xme,g=a.chown!==!1&&!CX&&TMr()===0,y=a.extract||PPe.extract(),v=[],C=new Date,w=typeof a.umask=="number"?~a.umask:~BPe(),k=typeof a.dmode=="number"?a.dmode:0,N=typeof a.fmode=="number"?a.fmode:0,T=a.strict!==!1;a.strip&&(d=IPe(d,a.strip)),a.readable&&(k|=parseInt(555,8),N|=parseInt(444,8)),a.writable&&(k|=parseInt(333,8),N|=parseInt(222,8));var P=function(ne,$){for(var M;(M=wMr(v))&&ne.slice(0,M[0].length)!==M[0];)v.pop();if(!M)return $();o.utimes(M[0],C,M[1],$)},q=function(ne,$,M){if(a.utimes===!1)return M();if($.type==="directory")return o.utimes(ne,C,$.mtime,M);if($.type==="symlink")return P(ne,M);o.utimes(ne,C,$.mtime,function(B){if(B)return M(B);P(ne,M)})},ee=function(ne,$,M){var B=$.type==="symlink",J=B?o.lchmod:o.chmod,ae=B?o.lchown:o.chown;if(!J)return M();var Ee=($.mode|($.type==="directory"?k:N))&w;ae&&g?ae.call(o,ne,$.uid,$.gid,re):re(null);function re(ue){if(ue)return M(ue);if(!J)return M();J.call(o,ne,Ee,M)}};return y.on("entry",function(ne,$,M){ne=d(ne)||ne,ne.name=vme(ne.name);var B=Km.join(s,Km.join("/",ne.name));if(p(B,ne))return $.resume(),M();var J=function(ce){if(ce)return M(ce);q(B,ne,function(de){if(de)return M(de);if(CX)return M();ee(B,ne,M)})},ae=function(){if(CX)return M();o.unlink(B,function(){var ce=Km.resolve(Km.dirname(B),ne.linkname);if(!FPe(ce,s))return M(new Error(B+" is not a valid symlink"));o.symlink(ne.linkname,B,J)})},Ee=function(){if(CX)return M();o.unlink(B,function(){var ce=Km.join(s,Km.join("/",ne.linkname));o.realpath(ce,function(de,oe){if(de||!FPe(oe,s))return M(new Error(B+" is not a valid hardlink"));o.link(oe,B,function(_e){if(_e&&_e.code==="EPERM"&&a.hardlinkAsFilesFallback)return $=o.createReadStream(ce),re();J(_e)})})})},re=function(){var ce=o.createWriteStream(B),de=h($,ne);ce.on("error",function(oe){de.destroy(oe)}),OPe(de,ce,function(oe){if(oe)return M(oe);ce.on("close",J)})};if(ne.type==="directory")return v.push([B,ne.mtime]),kPe(B,{fs:o,own:g,uid:ne.uid,gid:ne.gid},J);var ue=Km.dirname(B);LPe(o,ue,Km.join(s,"."),function(ce,de){if(ce)return M(ce);if(!de)return M(new Error(ue+" is not a valid path"));kPe(ue,{fs:o,own:g,uid:ne.uid,gid:ne.gid},function(oe){if(oe)return M(oe);switch(ne.type){case"file":return re();case"link":return Ee();case"symlink":return ae()}if(T)return M(new Error("unsupported type for "+B+" ("+ne.type+")"));$.resume(),M()})})}),a.finish&&y.on("finish",a.finish),y};function LPe(s,a,o,p){if(a===o)return p(null,!0);s.lstat(a,function(d,h){if(d&&d.code!=="ENOENT")return p(d);if(d||h.isDirectory())return LPe(s,Km.join(a,".."),o,p);p(null,!1)})}function kPe(s,a,o){CMr(s,{fs:a.fs},function(p,d){!p&&d&&a.own?EMr(d,a.uid,a.gid,o):o(p)})}function FPe(s,a){return a=Km.resolve(a),a===s||s.startsWith(a+Km.sep)}});_i();import{join as LMr}from"path";import{tmpdir as RMr}from"os";_i();_i();_i();_i();var dde=Mx(qCe(),1);function $Ce(s){let a=s.replace(/\r\n$/g,`
|
|
1429
|
-
`);return dde.parse(a)}async function UCe(s,a,o){let p=o?.from&&o.from!=="."?o.from:hie(),d=await Eie(a,{cwd:p,type:"file"});if(!d){Wy({body:"Environment file not found."});return}let g=$Ce(await P1(d)).environments;if(!g){Wy({body:["No environments found in",{command:d},{char:"."}]});return}let y=g[s];return y||Wy({body:["Environment",{command:s},"not found."]}),await S3e(()=>({environmentFlags:JSON.stringify(y)})),y}_i();_i();var hde;function VCe(){return hde||(hde={currentCommandId:""}),hde}function HCe(){return VCe().currentCommandId}function KCe(s){VCe().currentCommandId=s}var oSr="https://cdn.shopify.com/static/cli/notifications.json",GCe="Cache is empty",uSr=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear"];function cSr(){return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL??oSr}var lSr=o_.object({id:o_.string(),message:o_.string(),type:o_.enum(["info","warning","error"]),frequency:o_.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:o_.string(),cta:o_.object({label:o_.string(),url:o_.string().url()}).optional(),title:o_.string().optional(),minVersion:o_.string().optional(),maxVersion:o_.string().optional(),minDate:o_.string().optional(),maxDate:o_.string().optional(),commands:o_.array(o_.string()).optional(),surface:o_.string().optional()}),pSr=o_.object({notifications:o_.array(lSr)});async function JCe(s,a=process.env){try{let o=HCe();if(fSr(o,a)||U3e(a))return;let p=await hSr(),d=_Sr(p.notifications,o,s);h1(`Notifications to show: ${d.length}`),await dSr(d)}catch(o){if(o.message===GCe){h1("Notifications to show: 0 (Cache is empty)");return}if(o.message==="abort")throw new O3e;let p=`Error showing notifications: ${o.message}`;h1(p);let{sendErrorToBugsnag:d}=await import("./error-handler-
|
|
1429
|
+
`);return dde.parse(a)}async function UCe(s,a,o){let p=o?.from&&o.from!=="."?o.from:hie(),d=await Eie(a,{cwd:p,type:"file"});if(!d){Wy({body:"Environment file not found."});return}let g=$Ce(await P1(d)).environments;if(!g){Wy({body:["No environments found in",{command:d},{char:"."}]});return}let y=g[s];return y||Wy({body:["Environment",{command:s},"not found."]}),await S3e(()=>({environmentFlags:JSON.stringify(y)})),y}_i();_i();var hde;function VCe(){return hde||(hde={currentCommandId:""}),hde}function HCe(){return VCe().currentCommandId}function KCe(s){VCe().currentCommandId=s}var oSr="https://cdn.shopify.com/static/cli/notifications.json",GCe="Cache is empty",uSr=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear"];function cSr(){return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL??oSr}var lSr=o_.object({id:o_.string(),message:o_.string(),type:o_.enum(["info","warning","error"]),frequency:o_.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:o_.string(),cta:o_.object({label:o_.string(),url:o_.string().url()}).optional(),title:o_.string().optional(),minVersion:o_.string().optional(),maxVersion:o_.string().optional(),minDate:o_.string().optional(),maxDate:o_.string().optional(),commands:o_.array(o_.string()).optional(),surface:o_.string().optional()}),pSr=o_.object({notifications:o_.array(lSr)});async function JCe(s,a=process.env){try{let o=HCe();if(fSr(o,a)||U3e(a))return;let p=await hSr(),d=_Sr(p.notifications,o,s);h1(`Notifications to show: ${d.length}`),await dSr(d)}catch(o){if(o.message===GCe){h1("Notifications to show: 0 (Cache is empty)");return}if(o.message==="abort")throw new O3e;let p=`Error showing notifications: ${o.message}`;h1(p);let{sendErrorToBugsnag:d}=await import("./error-handler-2JZDGPAN.js");await d(p,"unexpected_error")}}function fSr(s,a=process.env){return lY(a.CI)||lY(a.SHOPIFY_UNIT_TEST)||uSr.includes(s)}async function dSr(s){s.slice(0,2).forEach(a=>{let o={headline:a.title,body:a.message.replaceAll("\\n",`
|
|
1430
1430
|
`),link:a.cta};switch(a.type){case"info":{qx(o);break}case"warning":{Wy(o);break}case"error":throw F3e(o),new Error("abort")}rCe(`notification-${a.id}`,new Date().getTime().toString())})}async function hSr(){let s=`notifications-${cSr()}`,a=ede(s)?.value;if(!a)throw new Error(GCe);let o=JSON.parse(a);return pSr.parse(o)}function _Sr(s,a,o,p=new Date(new Date().setUTCHours(0,0,0,0)),d=Aie){return s.filter(h=>mSr(h,d)).filter(h=>gSr(h,p)).filter(h=>ySr(h,a)).filter(h=>vSr(h,a,o)).filter(h=>xSr(h))}function mSr(s,a){let o=!s.minVersion||nde(a,`>=${s.minVersion}`),p=!s.maxVersion||nde(a,`<=${s.maxVersion}`);return o&&p}function gSr(s,a){let o=!s.minDate||new Date(s.minDate)<=a,p=!s.maxDate||new Date(s.maxDate)>=a;return o&&p}function ySr(s,a){return a===""?!0:!s.commands||s.commands.includes(a)}function vSr(s,a,o){let p=a.split(":")[0]??"all",d=s.surface??"all";return o?o.includes(d):d===p||d==="all"}function xSr(s){if(!s.frequency)return!0;let a=`notification-${s.id}`,o=ede(a)?.value;if(!o)return!0;switch(s.frequency){case"always":return!0;case"once":return!1;case"once_a_day":return new Date().getTime()-Number(o)>24*3600*1e3;case"once_a_week":return new Date().getTime()-Number(o)>168*3600*1e3}}var Rie=Mx(Xfe(),1),Lie=class extends Rie.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(a){return a.skipOclifErrorHandling=!0,await uCe(a,this.config),Rie.Errors.handle(a)}async init(){return this.exitWithTimestampWhenEnvVariablePresent(),KCe(this.id??""),M3e()||await cCe(this.config),this.showNpmFlagWarning(),await JCe(),super.init()}showNpmFlagWarning(){let a=this.constructor;Object.keys(a.flags||{}).map(d=>`npm_config_${k3e(d).replace(/^no_/,"")}`).some(d=>process.env[d]!==void 0)&&Wy({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})}exitWithTimestampWhenEnvVariablePresent(){lY(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(xie(`
|
|
1431
1431
|
SHOPIFY_CLI_TIMESTAMP_START
|
|
1432
1432
|
{ "timestamp": ${Date.now()} }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{La as a,Ma as b,Na as c,Oa as d,Pa as e}from"./chunk-
|
|
2
|
+
import{La as a,Ma as b,Na as c,Oa as d,Pa as e}from"./chunk-YKN6SEJT.js";import"./chunk-AUULK6IN.js";import"./chunk-ZLNTSIDN.js";import"./chunk-RUCJI22O.js";import"./chunk-6YUUFKYO.js";import"./chunk-CJKPLQJ7.js";import"./chunk-Y5VZE2FH.js";import"./chunk-LBUW5UHX.js";export{e as addBugsnagMetadata,c as cleanStackFrameFilePath,a as errorHandler,d as registerCleanBugsnagErrorsFromWithinPlugins,b as sendErrorToBugsnag};
|