@shopify/create-hydrogen 5.0.12 → 5.0.14
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/CHANGELOG.md +12 -0
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +2 -1
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/{chunk-SLVYPPXU.js → chunk-IKHQEBLO.js} +318 -318
- package/dist/create-app.js +2 -2
- package/dist/{error-handler-IG42X6FN.js → error-handler-YZGDCM3V.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 G_}from"./chunk-PMDMUCNY.js";import{$ as B1e,A as FB,Aa as Y1e,B as C1e,C as GX,D as fp,E as S1e,F as PB,G as A1e,H as w1e,I as T1e,J as Iv,K as k1e,L as Bv,M as w5,N as yh,O as ih,P as VC,Q as Nh,R as RA,S as T5,T as R4,U as NB,V as cd,W as P1e,X as OB,Y as N1e,Z as O1e,_ as I1e,a as A5,aa as j4,b as Nl,ba as E_,c as b_,ca as L1e,d as Nv,da as k5,e as ym,ea as M1e,f as L4,fa as R1e,g as wB,ga as j1e,h as _1e,ha as q1e,i as JX,ia as $1e,j as m1e,ja as U1e,k as g1e,ka as IB,l as y1e,la as K1e,m as v1e,ma as V1e,n as Kx,na as WX,o as x1e,oa as BB,p as D1e,pa as H1e,q as TB,qa as J1e,r as b1e,ra as z1e,s as Sy,sa as YX,t as M4,ta as jA,u as j2,ua as LB,v as E1e,va as G1e,w as zX,wa as MB,x as Ov,xa as W1e,y as Vx,z as kB}from"./chunk-
|
|
3
|
+
import{a as G_}from"./chunk-PMDMUCNY.js";import{$ as B1e,A as FB,Aa as Y1e,B as C1e,C as GX,D as fp,E as S1e,F as PB,G as A1e,H as w1e,I as T1e,J as Iv,K as k1e,L as Bv,M as w5,N as yh,O as ih,P as VC,Q as Nh,R as RA,S as T5,T as R4,U as NB,V as cd,W as P1e,X as OB,Y as N1e,Z as O1e,_ as I1e,a as A5,aa as j4,b as Nl,ba as E_,c as b_,ca as L1e,d as Nv,da as k5,e as ym,ea as M1e,f as L4,fa as R1e,g as wB,ga as j1e,h as _1e,ha as q1e,i as JX,ia as $1e,j as m1e,ja as U1e,k as g1e,ka as IB,l as y1e,la as K1e,m as v1e,ma as V1e,n as Kx,na as WX,o as x1e,oa as BB,p as D1e,pa as H1e,q as TB,qa as J1e,r as b1e,ra as z1e,s as Sy,sa as YX,t as M4,ta as jA,u as j2,ua as LB,v as E1e,va as G1e,w as zX,wa as MB,x as Ov,xa as W1e,y as Vx,z as kB}from"./chunk-IKHQEBLO.js";import"./chunk-VMIOG46Y.js";import{f as F1e}from"./chunk-C2DNSDMB.js";import"./chunk-M6JXYI3V.js";import{a as wEr}from"./chunk-FB327AH7.js";import"./chunk-EO6F7WJJ.js";import"./chunk-7NPI5OH3.js";import"./chunk-RH6HNOXT.js";import{a as I0,c as vc,e as Ux,g as __dirname,h as __filename,i as Ia}from"./chunk-MNT4XW23.js";var Q1e=vc((TBr,X1e)=>{"use strict";Ia();var qA=class a extends Error{constructor(s,c,f){super("[ParserError] "+s,c,f),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,a)}},RB=class{constructor(s){this.parser=s,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},F5=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 RB(this.parseStart)}parse(s){if(s.length===0||s.length==null)return;this._buf=String(s),this.ii=-1,this.char=-1;let c;for(;c===!1||this.nextChar();)c=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 s;do s=this.state.parser,this.runOne();while(this.state.parser!==s);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(s){if(typeof s!="function")throw new qA("Tried to set state to non-existent state: "+JSON.stringify(s));this.state.parser=s}goto(s){return this.next(s),this.runOne()}call(s,c){c&&this.next(c),this.stack.push(this.state),this.state=new RB(s)}callNow(s,c){return this.call(s,c),this.runOne()}return(s){if(this.stack.length===0)throw this.error(new qA("Stack underflow"));s===void 0&&(s=this.state.buf),this.state=this.stack.pop(),this.state.returned=s}returnNow(s){return this.return(s),this.runOne()}consume(){if(this.char===1114112)throw this.error(new qA("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(s){return s.line=this.line,s.col=this.col,s.pos=this.pos,s}parseStart(){throw new qA("Must declare a parseStart method")}};F5.END=1114112;F5.Error=qA;X1e.exports=F5});var ehe=vc((FBr,Z1e)=>{"use strict";Ia();Z1e.exports=a=>{let s=new Date(a);if(isNaN(s))throw new TypeError("Invalid Datetime");return s}});var jB=vc((NBr,the)=>{"use strict";Ia();the.exports=(a,s)=>{for(s=String(s);s.length<a;)s="0"+s;return s}});var nhe=vc((IBr,rhe)=>{"use strict";Ia();var q4=jB(),XX=class extends Date{constructor(s){super(s+"Z"),this.isFloating=!0}toISOString(){let s=`${this.getUTCFullYear()}-${q4(2,this.getUTCMonth()+1)}-${q4(2,this.getUTCDate())}`,c=`${q4(2,this.getUTCHours())}:${q4(2,this.getUTCMinutes())}:${q4(2,this.getUTCSeconds())}.${q4(3,this.getUTCMilliseconds())}`;return`${s}T${c}`}};rhe.exports=a=>{let s=new XX(a);if(isNaN(s))throw new TypeError("Invalid Datetime");return s}});var she=vc((LBr,ahe)=>{"use strict";Ia();var ihe=jB(),TEr=global.Date,QX=class extends TEr{constructor(s){super(s),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ihe(2,this.getUTCMonth()+1)}-${ihe(2,this.getUTCDate())}`}};ahe.exports=a=>{let s=new QX(a);if(isNaN(s))throw new TypeError("Invalid Datetime");return s}});var uhe=vc((RBr,ohe)=>{"use strict";Ia();var qB=jB(),ZX=class extends Date{constructor(s){super(`0000-01-01T${s}Z`),this.isTime=!0}toISOString(){return`${qB(2,this.getUTCHours())}:${qB(2,this.getUTCMinutes())}:${qB(2,this.getUTCSeconds())}.${qB(3,this.getUTCMilliseconds())}`}};ohe.exports=a=>{let s=new ZX(a);if(isNaN(s))throw new TypeError("Invalid Datetime");return s}});var $B=vc((exports,module)=>{"use strict";Ia();module.exports=makeParserClass(Q1e());module.exports.makeParserClass=makeParserClass;var TomlError=class a extends Error{constructor(s){super(s),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,a),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=a=>{let s=new TomlError(a.message);return s.code=a.code,s.wrapped=a,s};module.exports.TomlError=TomlError;var createDateTime=ehe(),createDateTimeFloat=nhe(),createDate=she(),createTime=uhe(),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(a){return a>=CHAR_0&&a<=CHAR_9}function isHexit(a){return a>=CHAR_A&&a<=CHAR_F||a>=CHAR_a&&a<=CHAR_f||a>=CHAR_0&&a<=CHAR_9}function isBit(a){return a===CHAR_1||a===CHAR_0}function isOctit(a){return a>=CHAR_0&&a<=CHAR_7}function isAlphaNumQuoteHyphen(a){return a>=CHAR_A&&a<=CHAR_Z||a>=CHAR_a&&a<=CHAR_z||a>=CHAR_0&&a<=CHAR_9||a===CHAR_APOS||a===CHAR_QUOT||a===CHAR_LOWBAR||a===CHAR_HYPHEN}function isAlphaNumHyphen(a){return a>=CHAR_A&&a<=CHAR_Z||a>=CHAR_a&&a<=CHAR_z||a>=CHAR_0&&a<=CHAR_9||a===CHAR_LOWBAR||a===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(a,s){return hasOwnProperty.call(a,s)?!0:(s==="__proto__"&&defineProperty(a,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(a){return a===null||typeof a!="object"?!1:a[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(a){return a===null||typeof a!="object"?!1:a[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(a){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:a}})}function isInlineList(a){return a===null||typeof a!="object"?!1:a[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(a){return a===null||typeof a!="object"?!1:a[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(a){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(s){try{this.value=global.BigInt.asIntN(64,s)}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(a){let s=Number(a);return Object.is(s,-0)&&(s=0),global.BigInt&&!Number.isSafeInteger(s)?new BoxedBigInt(a):Object.defineProperties(new Number(s),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${a}]`}})}function isInteger(a){return a===null||typeof a!="object"?!1:a[_type]===INTEGER}var FLOAT=Symbol("float");function Float(a){return Object.defineProperties(new Number(a),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${a}]`}})}function isFloat(a){return a===null||typeof a!="object"?!1:a[_type]===FLOAT}function tomlType(a){let s=typeof a;if(s==="object"){if(a===null)return"null";if(a instanceof Date)return"datetime";if(_type in a)switch(a[_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 s}function makeParserClass(a){class s extends a{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===a.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===a.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===a.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(f){let h=this.ctx,y=f.key.pop();for(let v of f.key){if(hasKey(h,v)&&(!isTable(h[v])||h[v][_declared]))throw this.error(new TomlError("Can't redefine existing key"));h=h[v]=h[v]||Table()}if(hasKey(h,y))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(f.value)||isFloat(f.value)?h[y]=f.value.valueOf():h[y]=f.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(f){return this.state.resultTable?this.state.resultTable.push(f):this.state.resultTable=[f],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(f){return this.returnNow({key:this.state.resultTable,value:f})}parseComment(){do if(this.char===a.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(f){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,f)&&(!isTable(this.ctx[f])||this.ctx[f][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[f]=this.ctx[f]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,f))this.ctx=this.ctx[f]=Table();else if(isTable(this.ctx[f]))this.ctx=this.ctx[f];else if(isList(this.ctx[f]))this.ctx=this.ctx[f][this.ctx[f].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(f){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,f)||(this.ctx[f]=List()),isInlineList(this.ctx[f]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[f])){let h=Table();this.ctx[f].push(h),this.ctx=h}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,f))this.ctx=this.ctx[f]=Table();else{if(isInlineList(this.ctx[f]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[f]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[f]))this.ctx=this.ctx[f][this.ctx[f].length-1];else if(isTable(this.ctx[f]))this.ctx=this.ctx[f];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(f){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===a.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(f){return this.returnNow(f)}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===a.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===a.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(f){return this.state.buf+=f,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===a.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 f="\\u00";return this.char<16&&(f+="0"),f+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${f} instead`))}recordMultiEscapeReplacement(f){return this.state.buf+=f,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(f){try{let h=parseInt(f,16);if(h>=SURROGATE_FIRST&&h<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(h))}catch(h){throw this.error(TomlError.wrap(h))}}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 f=Integer(this.state.buf);if(f.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(f)}}}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 f=Integer(this.state.buf);if(f.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(f)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let f=Integer(this.state.buf);if(f.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(f)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let f=Integer(this.state.buf);if(f.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(f)}}}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===a.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(f){if(this.state.resultArr){let h=this.state.resultArr[_contentType],y=tomlType(f);if(h!==y)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${h} and ${y}`))}else this.state.resultArr=InlineList(tomlType(f));return isFloat(f)||isInteger(f)?this.state.resultArr.push(f.valueOf()):this.state.resultArr.push(f),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===a.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(f){let h=this.state.resultTable,y=f.key.pop();for(let v of f.key){if(hasKey(h,v)&&(!isTable(h[v])||h[v][_declared]))throw this.error(new TomlError("Can't redefine existing key"));h=h[v]=h[v]||Table()}if(hasKey(h,y))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(f.value)||isFloat(f.value)?h[y]=f.value.valueOf():h[y]=f.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===a.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 s}});var UB=vc(($Br,che)=>{"use strict";Ia();che.exports=kEr;function kEr(a,s){if(a.pos==null||a.line==null)return a;let c=a.message;if(c+=` at row ${a.line+1}, col ${a.col+1}, pos ${a.pos}:
|
|
5
5
|
`,s&&s.split){let f=s.split(/\n/),h=String(Math.min(f.length,a.line+3)).length,y=" ";for(;y.length<h;)y+=" ";for(let v=Math.max(0,a.line-1);v<Math.min(f.length,a.line+2);++v){let D=String(v+1);if(D.length<h&&(D=" "+D),a.line===v){c+=D+"> "+f[v]+`
|
|
6
6
|
`,c+=y+" ";for(let b=0;b<a.col;++b)c+=" ";c+=`^
|
|
@@ -1075,7 +1075,7 @@ ${y}`}s.exports={isPragma:c,hasPragma:f,insertPragma:h}}}),gwr=Ti({"src/language
|
|
|
1075
1075
|
`)),a.linkname&&(s+=Ote(" linkpath="+a.linkname+`
|
|
1076
1076
|
`));var c=a.pax;if(c)for(var f in c)s+=Ote(" "+f+"="+c[f]+`
|
|
1077
1077
|
`);return Buffer.from(s)};S8.decodePax=function(a){for(var s={};a.length;){for(var c=0;c<a.length&&a[c]!==32;)c++;var f=parseInt(a.slice(0,c).toString(),10);if(!f)return s;var h=a.slice(c+1,f-1).toString(),y=h.indexOf("=");if(y===-1)return s;s[h.slice(0,y)]=h.slice(y+1),a=a.slice(f)}return s};S8.encode=function(a){var s=NIr(512),c=a.name,f="";if(a.typeflag===5&&c[c.length-1]!=="/"&&(c+="/"),Buffer.byteLength(c)!==c.length)return null;for(;Buffer.byteLength(c)>100;){var h=c.indexOf("/");if(h===-1)return null;f+=f?"/"+c.slice(0,h):c.slice(0,h),c=c.slice(h+1)}return Buffer.byteLength(c)>100||Buffer.byteLength(f)>155||a.linkname&&Buffer.byteLength(a.linkname)>100?null:(s.write(c),s.write(vS(a.mode&RIr,6),100),s.write(vS(a.uid,6),108),s.write(vS(a.gid,6),116),s.write(vS(a.size,11),124),s.write(vS(a.mtime.getTime()/1e3|0,11),136),s[156]=X7e+$Ir(a.type),a.linkname&&s.write(a.linkname,157),Q7e.copy(s,Pk),BIr.copy(s,Ite),a.uname&&s.write(a.uname,265),a.gname&&s.write(a.gname,297),s.write(vS(a.devmajor||0,6),329),s.write(vS(a.devminor||0,6),337),f&&s.write(f,345),s.write(vS(ebe(s),6),148),s)};S8.decode=function(a,s,c){var f=a[156]===0?0:a[156]-X7e,h=C8(a,0,100,s),y=xS(a,100,8),v=xS(a,108,8),D=xS(a,116,8),b=xS(a,124,12),A=xS(a,136,12),T=qIr(f),k=a[157]===0?null:C8(a,157,100,s),O=C8(a,265,32),w=C8(a,297,32),N=xS(a,329,8),V=xS(a,337,8),ne=ebe(a);if(ne===8*32)return null;if(ne!==xS(a,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(Q7e.compare(a,Pk,Pk+6)===0)a[345]&&(h=C8(a,345,155,s)+"/"+h);else if(!(LIr.compare(a,Pk,Pk+6)===0&&MIr.compare(a,Ite,Ite+2)===0)){if(!c)throw new Error("Invalid tar header: unknown format.")}return f===0&&h&&h[h.length-1]==="/"&&(f=5),{name:h,mode:y,uid:v,gid:D,size:b,mtime:new Date(1e3*A),type:T,linkname:k,uname:O,gname:w,devmajor:N,devminor:V}}});var obe=vc((rQr,sbe)=>{"use strict";Ia();var rbe=I0("util"),KIr=Y7e(),Nk=Bte(),nbe=E8().Writable,ibe=E8().PassThrough,abe=function(){},tbe=function(a){return a&=511,a&&512-a},VIr=function(a,s){var c=new BM(a,s);return c.end(),c},HIr=function(a,s){return s.path&&(a.name=s.path),s.linkpath&&(a.linkname=s.linkpath),s.size&&(a.size=parseInt(s.size,10)),a.pax=s,a},BM=function(a,s){this._parent=a,this.offset=s,ibe.call(this,{autoDestroy:!1})};rbe.inherits(BM,ibe);BM.prototype.destroy=function(a){this._parent.destroy(a)};var t3=function(a){if(!(this instanceof t3))return new t3(a);nbe.call(this,a),a=a||{},this._offset=0,this._buffer=KIr(),this._missing=0,this._partial=!1,this._onparse=abe,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 s=this,c=s._buffer,f=function(){s._continue()},h=function(O){if(s._locked=!1,O)return s.destroy(O);s._stream||f()},y=function(){s._stream=null;var O=tbe(s._header.size);O?s._parse(O,v):s._parse(512,k),s._locked||f()},v=function(){s._buffer.consume(tbe(s._header.size)),s._parse(512,k),f()},D=function(){var O=s._header.size;s._paxGlobal=Nk.decodePax(c.slice(0,O)),c.consume(O),y()},b=function(){var O=s._header.size;s._pax=Nk.decodePax(c.slice(0,O)),s._paxGlobal&&(s._pax=Object.assign({},s._paxGlobal,s._pax)),c.consume(O),y()},A=function(){var O=s._header.size;this._gnuLongPath=Nk.decodeLongPath(c.slice(0,O),a.filenameEncoding),c.consume(O),y()},T=function(){var O=s._header.size;this._gnuLongLinkPath=Nk.decodeLongPath(c.slice(0,O),a.filenameEncoding),c.consume(O),y()},k=function(){var O=s._offset,w;try{w=s._header=Nk.decode(c.slice(0,512),a.filenameEncoding,a.allowUnknownFormat)}catch(N){s.emit("error",N)}if(c.consume(512),!w){s._parse(512,k),f();return}if(w.type==="gnu-long-path"){s._parse(w.size,A),f();return}if(w.type==="gnu-long-link-path"){s._parse(w.size,T),f();return}if(w.type==="pax-global-header"){s._parse(w.size,D),f();return}if(w.type==="pax-header"){s._parse(w.size,b),f();return}if(s._gnuLongPath&&(w.name=s._gnuLongPath,s._gnuLongPath=null),s._gnuLongLinkPath&&(w.linkname=s._gnuLongLinkPath,s._gnuLongLinkPath=null),s._pax&&(s._header=w=HIr(w,s._pax),s._pax=null),s._locked=!0,!w.size||w.type==="directory"){s._parse(512,k),s.emit("entry",w,VIr(s,O),h);return}s._stream=new BM(s,O),s.emit("entry",w,s._stream,h),s._parse(w.size,y),f()};this._onheader=k,this._parse(512,k)};rbe.inherits(t3,nbe);t3.prototype.destroy=function(a){this._destroyed||(this._destroyed=!0,a&&this.emit("error",a),this.emit("close"),this._stream&&this._stream.emit("close"))};t3.prototype._parse=function(a,s){this._destroyed||(this._offset+=a,this._missing=a,s===this._onheader&&(this._partial=!1),this._onparse=s)};t3.prototype._continue=function(){if(!this._destroyed){var a=this._cb;this._cb=abe,this._overflow?this._write(this._overflow,void 0,a):a()}};t3.prototype._write=function(a,s,c){if(!this._destroyed){var f=this._stream,h=this._buffer,y=this._missing;if(a.length&&(this._partial=!0),a.length<y)return this._missing-=a.length,this._overflow=null,f?f.write(a,c):(h.append(a),c());this._cb=c,this._missing=0;var v=null;a.length>y&&(v=a.slice(y),a=a.slice(0,y)),f?f.end(a):h.append(a),this._overflow=v,this._onparse()}};t3.prototype._final=function(a){if(this._partial)return this.destroy(new Error("Unexpected end of data"));a()};sbe.exports=t3});var cbe=vc((iQr,ube)=>{"use strict";Ia();ube.exports=I0("fs").constants||I0("constants")});var hbe=vc((sQr,dbe)=>{"use strict";Ia();var A8=cbe(),lbe=MB(),MM=G_(),JIr=Buffer.alloc,pbe=E8().Readable,w8=E8().Writable,zIr=I0("string_decoder").StringDecoder,LM=Bte(),GIr=parseInt("755",8),WIr=parseInt("644",8),fbe=JIr(1024),Mte=function(){},Lte=function(a,s){s&=511,s&&a.push(fbe.slice(0,512-s))};function YIr(a){switch(a&A8.S_IFMT){case A8.S_IFBLK:return"block-device";case A8.S_IFCHR:return"character-device";case A8.S_IFDIR:return"directory";case A8.S_IFIFO:return"fifo";case A8.S_IFLNK:return"symlink"}return"file"}var RM=function(a){w8.call(this),this.written=0,this._to=a,this._destroyed=!1};MM(RM,w8);RM.prototype._write=function(a,s,c){if(this.written+=a.length,this._to.push(a))return c();this._to._drain=c};RM.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var jM=function(){w8.call(this),this.linkname="",this._decoder=new zIr("utf-8"),this._destroyed=!1};MM(jM,w8);jM.prototype._write=function(a,s,c){this.linkname+=this._decoder.write(a),c()};jM.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Ok=function(){w8.call(this),this._destroyed=!1};MM(Ok,w8);Ok.prototype._write=function(a,s,c){c(new Error("No body allowed for this entry"))};Ok.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var zE=function(a){if(!(this instanceof zE))return new zE(a);pbe.call(this,a),this._drain=Mte,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};MM(zE,pbe);zE.prototype.entry=function(a,s,c){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof s=="function"&&(c=s,s=null),c||(c=Mte);var f=this;if((!a.size||a.type==="symlink")&&(a.size=0),a.type||(a.type=YIr(a.mode)),a.mode||(a.mode=a.type==="directory"?GIr:WIr),a.uid||(a.uid=0),a.gid||(a.gid=0),a.mtime||(a.mtime=new Date),typeof s=="string"&&(s=Buffer.from(s)),Buffer.isBuffer(s)){a.size=s.length,this._encode(a);var h=this.push(s);return Lte(f,a.size),h?process.nextTick(c):this._drain=c,new Ok}if(a.type==="symlink"&&!a.linkname){var y=new jM;return lbe(y,function(D){if(D)return f.destroy(),c(D);a.linkname=y.linkname,f._encode(a),c()}),y}if(this._encode(a),a.type!=="file"&&a.type!=="contiguous-file")return process.nextTick(c),new Ok;var v=new RM(this);return this._stream=v,lbe(v,function(D){if(f._stream=null,D)return f.destroy(),c(D);if(v.written!==a.size)return f.destroy(),c(new Error("size mismatch"));Lte(f,a.size),f._finalizing&&f.finalize(),c()}),v}};zE.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(fbe),this.push(null))};zE.prototype.destroy=function(a){this._destroyed||(this._destroyed=!0,a&&this.emit("error",a),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};zE.prototype._encode=function(a){if(!a.pax){var s=LM.encode(a);if(s){this.push(s);return}}this._encodePax(a)};zE.prototype._encodePax=function(a){var s=LM.encodePax({name:a.name,linkname:a.linkname,pax:a.pax}),c={name:"PaxHeader",mode:a.mode,uid:a.uid,gid:a.gid,size:s.length,mtime:a.mtime,type:"pax-header",linkname:a.linkname&&"PaxHeader",uname:a.uname,gname:a.gname,devmajor:a.devmajor,devminor:a.devminor};this.push(LM.encode(c)),this.push(s),Lte(this,s.length),c.size=a.size,c.type=a.type,this.push(LM.encode(c))};zE.prototype._read=function(a){var s=this._drain;this._drain=Mte,s()};dbe.exports=zE});var _be=vc(Rte=>{"use strict";Ia();Rte.extract=obe();Rte.pack=hbe()});var ybe=vc((lQr,gbe)=>{"use strict";Ia();var XIr=F1e(),QIr=MB(),qM;try{qM=I0("fs")}catch{}var Ik=function(){},ZIr=/^v?\.0/.test(process.version),$M=function(a){return typeof a=="function"},eBr=function(a){return!ZIr||!qM?!1:(a instanceof(qM.ReadStream||Ik)||a instanceof(qM.WriteStream||Ik))&&$M(a.close)},tBr=function(a){return a.setHeader&&$M(a.abort)},rBr=function(a,s,c,f){f=XIr(f);var h=!1;a.on("close",function(){h=!0}),QIr(a,{readable:s,writable:c},function(v){if(v)return f(v);h=!0,f()});var y=!1;return function(v){if(!h&&!y){if(y=!0,eBr(a))return a.close(Ik);if(tBr(a))return a.abort();if($M(a.destroy))return a.destroy();f(v||new Error("stream was destroyed"))}}},mbe=function(a){a()},nBr=function(a,s){return a.pipe(s)},iBr=function(){var a=Array.prototype.slice.call(arguments),s=$M(a[a.length-1]||Ik)&&a.pop()||Ik;if(Array.isArray(a[0])&&(a=a[0]),a.length<2)throw new Error("pump requires two streams per minimum");var c,f=a.map(function(h,y){var v=y<a.length-1,D=y>0;return rBr(h,v,D,function(b){c||(c=b),b&&f.forEach(mbe),!v&&(f.forEach(mbe),s(c))})});return a.reduce(nBr)};gbe.exports=iBr});var bbe=vc((fQr,Dbe)=>{"use strict";Ia();var UM=I0("path"),vbe=I0("fs"),xbe=parseInt("0777",8);Dbe.exports=T8.mkdirp=T8.mkdirP=T8;function T8(a,s,c,f){typeof s=="function"?(c=s,s={}):(!s||typeof s!="object")&&(s={mode:s});var h=s.mode,y=s.fs||vbe;h===void 0&&(h=xbe&~process.umask()),f||(f=null);var v=c||function(){};a=UM.resolve(a),y.mkdir(a,h,function(D){if(!D)return f=f||a,v(null,f);switch(D.code){case"ENOENT":T8(UM.dirname(a),s,function(b,A){b?v(b,A):T8(a,s,v,A)});break;default:y.stat(a,function(b,A){b||!A.isDirectory()?v(D,f):v(null,f)});break}})}T8.sync=function a(s,c,f){(!c||typeof c!="object")&&(c={mode:c});var h=c.mode,y=c.fs||vbe;h===void 0&&(h=xbe&~process.umask()),f||(f=null),s=UM.resolve(s);try{y.mkdirSync(s,h),f=f||s}catch(D){switch(D.code){case"ENOENT":f=a(UM.dirname(s),c,f),a(s,c,f);break;default:var v;try{v=y.statSync(s)}catch{throw D}if(!v.isDirectory())throw D;break}}return f}});var Fbe=vc($te=>{"use strict";Ia();var aBr=YDe(),Cbe=_be(),Sbe=ybe(),sBr=bbe(),Abe=I0("fs"),Oy=I0("path"),oBr=I0("os"),Bk=oBr.platform()==="win32",Lk=function(){},qte=function(a){return a},jte=Bk?function(a){return a.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:qte,uBr=function(a,s,c,f,h,y){var v=h||["."];return function(b){if(!v.length)return b();var A=v.shift(),T=Oy.join(c,A);s.call(a,T,function(k,O){if(k)return b(k);if(!O.isDirectory())return b(null,A,O);a.readdir(T,function(w,N){if(w)return b(w);y&&N.sort();for(var V=0;V<N.length;V++)f(Oy.join(c,A,N[V]))||v.push(Oy.join(A,N[V]));b(null,A,O)})})}},wbe=function(a,s){return function(c){c.name=c.name.split("/").slice(s).join("/");var f=c.linkname;return f&&(c.type==="link"||Oy.isAbsolute(f))&&(c.linkname=f.split("/").slice(s).join("/")),a(c)}};$te.pack=function(a,s){a||(a="."),s||(s={});var c=s.fs||Abe,f=s.ignore||s.filter||Lk,h=s.map||Lk,y=s.mapStream||qte,v=uBr(c,s.dereference?c.stat:c.lstat,a,f,s.entries,s.sort),D=s.strict!==!1,b=typeof s.umask=="number"?~s.umask:~Tbe(),A=typeof s.dmode=="number"?s.dmode:0,T=typeof s.fmode=="number"?s.fmode:0,k=s.pack||Cbe.pack(),O=s.finish||Lk;s.strip&&(h=wbe(h,s.strip)),s.readable&&(A|=parseInt(555,8),T|=parseInt(444,8)),s.writable&&(A|=parseInt(333,8),T|=parseInt(222,8));var w=function(ne,se){c.readlink(Oy.join(a,ne),function(J,K){if(J)return k.destroy(J);se.linkname=jte(K),k.entry(se,V)})},N=function(ne,se,J){if(ne)return k.destroy(ne);if(!se)return s.finalize!==!1&&k.finalize(),O(k);if(J.isSocket())return V();var K={name:jte(se),mode:(J.mode|(J.isDirectory()?A:T))&b,mtime:J.mtime,size:J.size,type:"file",uid:J.uid,gid:J.gid};if(J.isDirectory())return K.size=0,K.type="directory",K=h(K)||K,k.entry(K,V);if(J.isSymbolicLink())return K.size=0,K.type="symlink",K=h(K)||K,w(se,K);if(K=h(K)||K,!J.isFile())return D?k.destroy(new Error("unsupported type for "+se)):V();var L=k.entry(K,V);if(L){var Y=y(c.createReadStream(Oy.join(a,se),{start:0,end:K.size>0?K.size-1:K.size}),K);Y.on("error",function(pe){L.destroy(pe)}),Sbe(Y,L)}},V=function(ne){if(ne)return k.destroy(ne);v(N)};return V(),k};var cBr=function(a){return a.length?a[a.length-1]:null},lBr=function(){return process.getuid?process.getuid():-1},Tbe=function(){return process.umask?process.umask():0};$te.extract=function(a,s){a||(a="."),s||(s={});var c=s.fs||Abe,f=s.ignore||s.filter||Lk,h=s.map||Lk,y=s.mapStream||qte,v=s.chown!==!1&&!Bk&&lBr()===0,D=s.extract||Cbe.extract(),b=[],A=new Date,T=typeof s.umask=="number"?~s.umask:~Tbe(),k=typeof s.dmode=="number"?s.dmode:0,O=typeof s.fmode=="number"?s.fmode:0,w=s.strict!==!1;s.strip&&(h=wbe(h,s.strip)),s.readable&&(k|=parseInt(555,8),O|=parseInt(444,8)),s.writable&&(k|=parseInt(333,8),O|=parseInt(222,8));var N=function(se,J){for(var K;(K=cBr(b))&&se.slice(0,K[0].length)!==K[0];)b.pop();if(!K)return J();c.utimes(K[0],A,K[1],J)},V=function(se,J,K){if(s.utimes===!1)return K();if(J.type==="directory")return c.utimes(se,A,J.mtime,K);if(J.type==="symlink")return N(se,K);c.utimes(se,A,J.mtime,function(L){if(L)return K(L);N(se,K)})},ne=function(se,J,K){var L=J.type==="symlink",Y=L?c.lchmod:c.chmod,pe=L?c.lchown:c.chown;if(!Y)return K();var Ie=(J.mode|(J.type==="directory"?k:O))&T;pe&&v?pe.call(c,se,J.uid,J.gid,ae):ae(null);function ae(_e){if(_e)return K(_e);if(!Y)return K();Y.call(c,se,Ie,K)}};return D.on("entry",function(se,J,K){se=h(se)||se,se.name=jte(se.name);var L=Oy.join(a,Oy.join("/",se.name));if(f(L,se))return J.resume(),K();var Y=function(ge){if(ge)return K(ge);V(L,se,function(be){if(be)return K(be);if(Bk)return K();ne(L,se,K)})},pe=function(){if(Bk)return K();c.unlink(L,function(){c.symlink(se.linkname,L,Y)})},Ie=function(){if(Bk)return K();c.unlink(L,function(){var ge=Oy.join(a,Oy.join("/",se.linkname));c.link(ge,L,function(be){if(be&&be.code==="EPERM"&&s.hardlinkAsFilesFallback)return J=c.createReadStream(ge),ae();Y(be)})})},ae=function(){var ge=c.createWriteStream(L),be=y(J,se);ge.on("error",function(he){be.destroy(he)}),Sbe(be,ge,function(he){if(he)return K(he);ge.on("close",Y)})};if(se.type==="directory")return b.push([L,se.mtime]),Ebe(L,{fs:c,own:v,uid:se.uid,gid:se.gid},Y);var _e=Oy.dirname(L);kbe(c,_e,Oy.join(a,"."),function(ge,be){if(ge)return K(ge);if(!be)return K(new Error(_e+" is not a valid path"));Ebe(_e,{fs:c,own:v,uid:se.uid,gid:se.gid},function(he){if(he)return K(he);switch(se.type){case"file":return ae();case"link":return Ie();case"symlink":return pe()}if(w)return K(new Error("unsupported type for "+L+" ("+se.type+")"));J.resume(),K()})})}),s.finish&&D.on("finish",s.finish),D};function kbe(a,s,c,f){if(s===c)return f(null,!0);a.lstat(s,function(h,y){if(h&&h.code!=="ENOENT")return f(h);if(h||y.isDirectory())return kbe(a,Oy.join(s,".."),c,f);f(null,!1)})}function Ebe(a,s,c){sBr(a,{fs:s.fs},function(f,h){!f&&h&&s.own?aBr(h,s.uid,s.gid,c):c(f)})}});Ia();import{join as yBr}from"path";import{tmpdir as vBr}from"os";Ia();Ia();Ia();Ia();var iQ=Ux(whe(),1);function The(a){let s=a.replace(/\r\n$/g,`
|
|
1078
|
-
`);return iQ.parse(s)}async function khe(a,s,c){let f=c?.from&&c.from!=="."?c.from:JX(),h=await OB(s,{cwd:f,type:"file"});if(!h){j2({body:"Environment file not found."});return}let v=The(await ih(h)).environments;if(!v){j2({body:["No environments found in",{command:h},{char:"."}]});return}let D=v[a];return D||j2({body:["Environment",{command:a},"not found."]}),await y1e(()=>({environmentFlags:JSON.stringify(D)})),D}Ia();Ia();var aQ;function Fhe(){return aQ||(aQ={currentCommandId:""}),aQ}function Phe(){return Fhe().currentCommandId}function Nhe(a){Fhe().currentCommandId=a}var tCr="https://cdn.shopify.com/static/cli/notifications.json",rCr=3600*1e3;function Ohe(){return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL??tCr}var nCr=E_.object({id:E_.string(),message:E_.string(),type:E_.enum(["info","warning","error"]),frequency:E_.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:E_.string(),cta:E_.object({label:E_.string(),url:E_.string().url()}).optional(),title:E_.string().optional(),minVersion:E_.string().optional(),maxVersion:E_.string().optional(),minDate:E_.string().optional(),maxDate:E_.string().optional(),commands:E_.array(E_.string()).optional(),surface:E_.string().optional()}),iCr=E_.object({notifications:E_.array(nCr)});async function Ihe(a,s=process.env){try{if(aCr(s))return;let c=await oCr(),f=Phe(),h=cCr(c.notifications,f,a);yh(`Notifications to show: ${h.length}`),await sCr(h)}catch(c){if(c.message==="abort")throw new S1e;let f=`Error retrieving notifications: ${c.message}`;yh(f);let{sendErrorToBugsnag:h}=await import("./error-handler-
|
|
1078
|
+
`);return iQ.parse(s)}async function khe(a,s,c){let f=c?.from&&c.from!=="."?c.from:JX(),h=await OB(s,{cwd:f,type:"file"});if(!h){j2({body:"Environment file not found."});return}let v=The(await ih(h)).environments;if(!v){j2({body:["No environments found in",{command:h},{char:"."}]});return}let D=v[a];return D||j2({body:["Environment",{command:a},"not found."]}),await y1e(()=>({environmentFlags:JSON.stringify(D)})),D}Ia();Ia();var aQ;function Fhe(){return aQ||(aQ={currentCommandId:""}),aQ}function Phe(){return Fhe().currentCommandId}function Nhe(a){Fhe().currentCommandId=a}var tCr="https://cdn.shopify.com/static/cli/notifications.json",rCr=3600*1e3;function Ohe(){return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL??tCr}var nCr=E_.object({id:E_.string(),message:E_.string(),type:E_.enum(["info","warning","error"]),frequency:E_.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:E_.string(),cta:E_.object({label:E_.string(),url:E_.string().url()}).optional(),title:E_.string().optional(),minVersion:E_.string().optional(),maxVersion:E_.string().optional(),minDate:E_.string().optional(),maxDate:E_.string().optional(),commands:E_.array(E_.string()).optional(),surface:E_.string().optional()}),iCr=E_.object({notifications:E_.array(nCr)});async function Ihe(a,s=process.env){try{if(aCr(s))return;let c=await oCr(),f=Phe(),h=cCr(c.notifications,f,a);yh(`Notifications to show: ${h.length}`),await sCr(h)}catch(c){if(c.message==="abort")throw new S1e;let f=`Error retrieving notifications: ${c.message}`;yh(f);let{sendErrorToBugsnag:h}=await import("./error-handler-YZGDCM3V.js");await h(f,"unexpected_error")}}function aCr(a){return A5(a.CI)||A5(a.SHOPIFY_UNIT_TEST)||V1e(a)}async function sCr(a){a.slice(0,2).forEach(s=>{let c={headline:s.title,body:s.message.replaceAll("\\n",`
|
|
1079
1079
|
`),link:s.cta};switch(s.type){case"info":{Sy(c);break}case"warning":{j2(c);break}case"error":throw E1e(c),new Error("abort")}R1e(`notification-${s.id}`,new Date().getTime().toString())})}async function oCr(){let a=`notifications-${Ohe()}`,s=await M1e(a,uCr,rCr),c=JSON.parse(s);return iCr.parse(c)}async function uCr(){yh("No cached notifications found. Fetching them...");let a=await j4(Ohe(),{signal:AbortSignal.timeout(3*1e3)});if(a.status!==200)throw new Error(`Failed to fetch notifications: ${a.statusText}`);return a.text()}function cCr(a,s,c,f=new Date(new Date().setUTCHours(0,0,0,0)),h=B1e){return a.filter(y=>lCr(y,h)).filter(y=>pCr(y,f)).filter(y=>fCr(y,s)).filter(y=>dCr(y,s,c)).filter(y=>hCr(y))}function lCr(a,s){let c=!a.minVersion||YX(s,`>=${a.minVersion}`),f=!a.maxVersion||YX(s,`<=${a.maxVersion}`);return c&&f}function pCr(a,s){let c=!a.minDate||new Date(a.minDate)<=s,f=!a.maxDate||new Date(a.maxDate)>=s;return c&&f}function fCr(a,s){return s===""?!0:!a.commands||a.commands.includes(s)}function dCr(a,s,c){let f=s.split(":")[0]??"all",h=a.surface??"all";return c?c.includes(h):h===f||h==="all"}function hCr(a){if(!a.frequency)return!0;let s=`notification-${a.id}`,c=j1e(s)?.value;if(!c)return!0;switch(a.frequency){case"always":return!0;case"once":return!1;case"once_a_day":return new Date().getTime()-Number(c)>24*3600*1e3;case"once_a_week":return new Date().getTime()-Number(c)>7*24*3600*1e3}}var JB=Ux(GX(),1),HB=class extends JB.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(s){return s.skipOclifErrorHandling=!0,await W1e(s,this.config),JB.Errors.handle(s)}async init(){return this.exitWithTimestampWhenEnvVariablePresent(),Nhe(this.id||""),O1e()||await Y1e(this.config),this.showNpmFlagWarning(),await Ihe(),super.init()}showNpmFlagWarning(){let s=this.constructor;Object.keys(s.flags||{}).map(h=>`npm_config_${b1e(h).replace(/^no_/,"")}`).some(h=>process.env[h]!==void 0)&&j2({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})}exitWithTimestampWhenEnvVariablePresent(){A5(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(w5(`
|
|
1080
1080
|
SHOPIFY_CLI_TIMESTAMP_START
|
|
1081
1081
|
{ "timestamp": ${Date.now()} }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{Aa as d,Ba as e,xa as a,ya as b,za as c}from"./chunk-
|
|
2
|
+
import{Aa as d,Ba as e,xa as a,ya as b,za as c}from"./chunk-IKHQEBLO.js";import"./chunk-VMIOG46Y.js";import"./chunk-C2DNSDMB.js";import"./chunk-M6JXYI3V.js";import"./chunk-FB327AH7.js";import"./chunk-EO6F7WJJ.js";import"./chunk-7NPI5OH3.js";import"./chunk-RH6HNOXT.js";import"./chunk-MNT4XW23.js";export{e as addBugsnagMetadata,c as cleanStackFrameFilePath,a as errorHandler,d as registerCleanBugsnagErrorsFromWithinPlugins,b as sendErrorToBugsnag};
|