@shopify/create-hydrogen 5.0.11 → 5.0.13
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 +814 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +3 -4
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +114 -44
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +8 -3
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +6 -5
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +3 -3
- package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +9 -16
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +1 -10
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +1 -10
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +50 -119
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +42 -38
- package/dist/assets/hydrogen/starter/app/styles/app.css +25 -1
- package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +23 -20
- package/dist/assets/hydrogen/starter/guides/search/search.md +27 -25
- package/dist/assets/hydrogen/starter/package.json +3 -3
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +177 -194
- package/dist/assets/hydrogen/tailwind/tailwind.css +1 -1
- package/dist/chunk-C2DNSDMB.js +3 -0
- package/dist/{chunk-VXN7NK7B.js → chunk-SLVYPPXU.js} +412 -412
- package/dist/create-app.js +209 -208
- package/dist/{del-QYPDQ7XQ.js → del-EAAITCBR.js} +4 -4
- package/dist/{error-handler-ICJOKWYN.js → error-handler-IG42X6FN.js} +1 -1
- package/dist/{morph-7M6DKEEJ.js → morph-ZB67FQMB.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-H55SNOVV.js +0 -3
package/package.json
CHANGED
package/dist/chunk-H55SNOVV.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{a as bt,b as Oe}from"./chunk-7NPI5OH3.js";import{a as I,c as N,i as h}from"./chunk-MNT4XW23.js";var Te=N((Sr,Fe)=>{"use strict";h();var C=I("constants"),xt=process.cwd,U=null,Ot=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return U||(U=xt.call(process)),U};try{process.cwd()}catch{}typeof process.chdir=="function"&&(ie=process.chdir,process.chdir=function(e){U=null,ie.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ie));var ie;Fe.exports=Ft;function Ft(e){C.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=d(e.chownSync),e.fchownSync=d(e.fchownSync),e.lchownSync=d(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=p(e.stat),e.fstat=p(e.fstat),e.lstat=p(e.lstat),e.statSync=O(e.statSync),e.fstatSync=O(e.fstatSync),e.lstatSync=O(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(i,f,u){u&&process.nextTick(u)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(i,f,u,c){c&&process.nextTick(c)},e.lchownSync=function(){}),Ot==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(i){function f(u,c,l){var E=Date.now(),m=0;i(u,c,function v(D){if(D&&(D.code==="EACCES"||D.code==="EPERM")&&Date.now()-E<6e4){setTimeout(function(){e.stat(c,function(L,X){L&&L.code==="ENOENT"?i(u,c,v):l(D)})},m),m<100&&(m+=10);return}l&&l(D)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,i),f}(e.rename)),e.read=typeof e.read!="function"?e.read:function(i){function f(u,c,l,E,m,v){var D;if(v&&typeof v=="function"){var L=0;D=function(X,be,xe){if(X&&X.code==="EAGAIN"&&L<10)return L++,i.call(e,u,c,l,E,m,D);v.apply(this,arguments)}}return i.call(e,u,c,l,E,m,D)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,i),f}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(i){return function(f,u,c,l,E){for(var m=0;;)try{return i.call(e,f,u,c,l,E)}catch(v){if(v.code==="EAGAIN"&&m<10){m++;continue}throw v}}}(e.readSync);function t(i){i.lchmod=function(f,u,c){i.open(f,C.O_WRONLY|C.O_SYMLINK,u,function(l,E){if(l){c&&c(l);return}i.fchmod(E,u,function(m){i.close(E,function(v){c&&c(m||v)})})})},i.lchmodSync=function(f,u){var c=i.openSync(f,C.O_WRONLY|C.O_SYMLINK,u),l=!0,E;try{E=i.fchmodSync(c,u),l=!1}finally{if(l)try{i.closeSync(c)}catch{}else i.closeSync(c)}return E}}function r(i){C.hasOwnProperty("O_SYMLINK")&&i.futimes?(i.lutimes=function(f,u,c,l){i.open(f,C.O_SYMLINK,function(E,m){if(E){l&&l(E);return}i.futimes(m,u,c,function(v){i.close(m,function(D){l&&l(v||D)})})})},i.lutimesSync=function(f,u,c){var l=i.openSync(f,C.O_SYMLINK),E,m=!0;try{E=i.futimesSync(l,u,c),m=!1}finally{if(m)try{i.closeSync(l)}catch{}else i.closeSync(l)}return E}):i.futimes&&(i.lutimes=function(f,u,c,l){l&&process.nextTick(l)},i.lutimesSync=function(){})}function n(i){return i&&function(f,u,c){return i.call(e,f,u,function(l){A(l)&&(l=null),c&&c.apply(this,arguments)})}}function o(i){return i&&function(f,u){try{return i.call(e,f,u)}catch(c){if(!A(c))throw c}}}function s(i){return i&&function(f,u,c,l){return i.call(e,f,u,c,function(E){A(E)&&(E=null),l&&l.apply(this,arguments)})}}function d(i){return i&&function(f,u,c){try{return i.call(e,f,u,c)}catch(l){if(!A(l))throw l}}}function p(i){return i&&function(f,u,c){typeof u=="function"&&(c=u,u=null);function l(E,m){m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),c&&c.apply(this,arguments)}return u?i.call(e,f,u,l):i.call(e,f,l)}}function O(i){return i&&function(f,u){var c=u?i.call(e,f,u):i.call(e,f);return c&&(c.uid<0&&(c.uid+=4294967296),c.gid<0&&(c.gid+=4294967296)),c}}function A(i){if(!i||i.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(i.code==="EINVAL"||i.code==="EPERM"))}}});var $e=N((_r,Re)=>{"use strict";h();var Pe=I("stream").Stream;Re.exports=Tt;function Tt(e){return{ReadStream:t,WriteStream:r};function t(n,o){if(!(this instanceof t))return new t(n,o);Pe.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,o=o||{};for(var d=Object.keys(o),p=0,O=d.length;p<O;p++){var A=d[p];this[A]=o[A]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}e.open(this.path,this.flags,this.mode,function(i,f){if(i){s.emit("error",i),s.readable=!1;return}s.fd=f,s.emit("open",f),s._read()})}function r(n,o){if(!(this instanceof r))return new r(n,o);Pe.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var s=Object.keys(o),d=0,p=s.length;d<p;d++){var O=s[d];this[O]=o[O]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Le=N((xr,Ae)=>{"use strict";h();Ae.exports=Rt;var Pt=Object.getPrototypeOf||function(e){return e.__proto__};function Rt(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Pt(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Dt=N((Fr,se)=>{"use strict";h();var b=I("fs"),$t=Te(),At=$e(),Lt=Le(),B=I("util"),$,H;typeof Symbol=="function"&&typeof Symbol.for=="function"?($=Symbol.for("graceful-fs.queue"),H=Symbol.for("graceful-fs.previous")):($="___graceful-fs.queue",H="___graceful-fs.previous");function Nt(){}function Ie(e,t){Object.defineProperty(e,$,{get:function(){return t}})}var q=Nt;B.debuglog?q=B.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(q=function(){var e=B.format.apply(B,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
3
|
-
GFS4: `),console.error(e)});b[$]||(Ne=global[$]||[],Ie(b,Ne),b.close=function(e){function t(r,n){return e.call(b,r,function(o){o||De(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,H,{value:e}),t}(b.close),b.closeSync=function(e){function t(r){e.apply(b,arguments),De()}return Object.defineProperty(t,H,{value:e}),t}(b.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){q(b[$]),I("assert").equal(b[$].length,0)}));var Ne;global[$]||Ie(global,b[$]);se.exports=oe(Lt(b));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!b.__patched&&(se.exports=oe(b),b.__patched=!0);function oe(e){$t(e),e.gracefulify=oe,e.createReadStream=be,e.createWriteStream=xe;var t=e.readFile;e.readFile=r;function r(a,g,y){return typeof g=="function"&&(y=g,g=null),T(a,g,y);function T(P,F,_,x){return t(P,F,function(w){w&&(w.code==="EMFILE"||w.code==="ENFILE")?Y([T,[P,F,_],w,x||Date.now(),Date.now()]):typeof _=="function"&&_.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=o;function o(a,g,y,T){return typeof y=="function"&&(T=y,y=null),P(a,g,y,T);function P(F,_,x,w,R){return n(F,_,x,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?Y([P,[F,_,x,w],S,R||Date.now(),Date.now()]):typeof w=="function"&&w.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=d);function d(a,g,y,T){return typeof y=="function"&&(T=y,y=null),P(a,g,y,T);function P(F,_,x,w,R){return s(F,_,x,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?Y([P,[F,_,x,w],S,R||Date.now(),Date.now()]):typeof w=="function"&&w.apply(this,arguments)})}}var p=e.copyFile;p&&(e.copyFile=O);function O(a,g,y,T){return typeof y=="function"&&(T=y,y=0),P(a,g,y,T);function P(F,_,x,w,R){return p(F,_,x,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?Y([P,[F,_,x,w],S,R||Date.now(),Date.now()]):typeof w=="function"&&w.apply(this,arguments)})}}var A=e.readdir;e.readdir=f;var i=/^v[0-5]\./;function f(a,g,y){typeof g=="function"&&(y=g,g=null);var T=i.test(process.version)?function(_,x,w,R){return A(_,P(_,x,w,R))}:function(_,x,w,R){return A(_,x,P(_,x,w,R))};return T(a,g,y);function P(F,_,x,w){return function(R,S){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Y([T,[F,_,x],R,w||Date.now(),Date.now()]):(S&&S.sort&&S.sort(),typeof x=="function"&&x.call(this,R,S))}}}if(process.version.substr(0,4)==="v0.8"){var u=At(e);v=u.ReadStream,L=u.WriteStream}var c=e.ReadStream;c&&(v.prototype=Object.create(c.prototype),v.prototype.open=D);var l=e.WriteStream;l&&(L.prototype=Object.create(l.prototype),L.prototype.open=X),Object.defineProperty(e,"ReadStream",{get:function(){return v},set:function(a){v=a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return L},set:function(a){L=a},enumerable:!0,configurable:!0});var E=v;Object.defineProperty(e,"FileReadStream",{get:function(){return E},set:function(a){E=a},enumerable:!0,configurable:!0});var m=L;Object.defineProperty(e,"FileWriteStream",{get:function(){return m},set:function(a){m=a},enumerable:!0,configurable:!0});function v(a,g){return this instanceof v?(c.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function D(){var a=this;ne(a.path,a.flags,a.mode,function(g,y){g?(a.autoClose&&a.destroy(),a.emit("error",g)):(a.fd=y,a.emit("open",y),a.read())})}function L(a,g){return this instanceof L?(l.apply(this,arguments),this):L.apply(Object.create(L.prototype),arguments)}function X(){var a=this;ne(a.path,a.flags,a.mode,function(g,y){g?(a.destroy(),a.emit("error",g)):(a.fd=y,a.emit("open",y))})}function be(a,g){return new e.ReadStream(a,g)}function xe(a,g){return new e.WriteStream(a,g)}var _t=e.open;e.open=ne;function ne(a,g,y,T){return typeof y=="function"&&(T=y,y=null),P(a,g,y,T);function P(F,_,x,w,R){return _t(F,_,x,function(S,Er){S&&(S.code==="EMFILE"||S.code==="ENFILE")?Y([P,[F,_,x,w],S,R||Date.now(),Date.now()]):typeof w=="function"&&w.apply(this,arguments)})}}return e}function Y(e){q("ENQUEUE",e[0].name,e[1]),b[$].push(e),ce()}var z;function De(){for(var e=Date.now(),t=0;t<b[$].length;++t)b[$][t].length>2&&(b[$][t][3]=e,b[$][t][4]=e);ce()}function ce(){if(clearTimeout(z),z=void 0,b[$].length!==0){var e=b[$].shift(),t=e[0],r=e[1],n=e[2],o=e[3],s=e[4];if(o===void 0)q("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-o>=6e4){q("TIMEOUT",t.name,r);var d=r.pop();typeof d=="function"&&d.call(null,n)}else{var p=Date.now()-s,O=Math.max(s-o,1),A=Math.min(O*1.2,100);p>=A?(q("RETRY",t.name,r),t.apply(null,r.concat([o]))):b[$].push(e)}z===void 0&&(z=setTimeout(ce,0))}}});var Ge=N((Pr,je)=>{"use strict";h();je.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var qe=N(($r,Ce)=>{"use strict";h();Ce.exports=(...e)=>[...new Set([].concat(...e))]});var We=N(M=>{"use strict";h();var{promisify:It}=I("util"),Me=I("fs");async function ae(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await It(Me[e])(r))[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function ue(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Me[e](r)[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}M.isFile=ae.bind(null,"stat","isFile");M.isDirectory=ae.bind(null,"stat","isDirectory");M.isSymlink=ae.bind(null,"lstat","isSymbolicLink");M.isFileSync=ue.bind(null,"statSync","isFile");M.isDirectorySync=ue.bind(null,"statSync","isDirectory");M.isSymlinkSync=ue.bind(null,"lstatSync","isSymbolicLink")});var Ue=N((Dr,le)=>{"use strict";h();var W=I("path"),ke=We(),Ye=e=>e.length>1?`{${e.join(",")}}`:e[0],Xe=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return W.isAbsolute(r)?r:W.join(t,r)},jt=(e,t)=>W.extname(e)?`**/${e}`:`**/${e}.${Ye(t)}`,Ke=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>W.posix.join(e,jt(r,t.extensions))):t.files?t.files.map(r=>W.posix.join(e,`**/${r}`)):t.extensions?[W.posix.join(e,`**/*.${Ye(t.extensions)}`)]:[W.posix.join(e,"**")]};le.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async n=>await ke.isDirectory(Xe(n,t.cwd))?Ke(n,t):n));return[].concat.apply([],r)};le.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(n=>ke.isDirectorySync(Xe(n,t.cwd))?Ke(n,t):n);return[].concat.apply([],r)}});var rt=N((jr,tt)=>{"use strict";h();function Be(e){return Array.isArray(e)?e:[e]}var Qe="",ze=" ",fe="\\",Gt=/^\s+$/,Ct=/(?:[^\\]|^)\\$/,qt=/^\\!/,Mt=/^\\#/,Wt=/\r?\n/g,kt=/^\.*\/|^\.+$/,de="/",Je="node-ignore";typeof Symbol<"u"&&(Je=Symbol.for("node-ignore"));var He=Je,Yt=(e,t,r)=>Object.defineProperty(e,t,{value:r}),Xt=/([0-z])-([0-z])/g,Ze=()=>!1,Kt=e=>e.replace(Xt,(t,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?t:Qe),Ut=e=>{let{length:t}=e;return e.slice(0,t-t%2)},Bt=[[/\\?\s+$/,e=>e.indexOf("\\")===0?ze:Qe],[/\\\s/g,()=>ze],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let n=r.replace(/\\\*/g,"[^\\/]*");return t+n}],[/\\\\\\(?=[$.|*+(){^])/g,()=>fe],[/\\\\/g,()=>fe],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,n,o)=>t===fe?`\\[${r}${Ut(n)}${o}`:o==="]"&&n.length%2===0?`[${Kt(r)}${n}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Ve=Object.create(null),zt=(e,t)=>{let r=Ve[e];return r||(r=Bt.reduce((n,o)=>n.replace(o[0],o[1].bind(e)),e),Ve[e]=r),t?new RegExp(r,"i"):new RegExp(r)},he=e=>typeof e=="string",Ht=e=>e&&he(e)&&!Gt.test(e)&&!Ct.test(e)&&e.indexOf("#")!==0,Vt=e=>e.split(Wt),pe=class{constructor(t,r,n,o){this.origin=t,this.pattern=r,this.negative=n,this.regex=o}},Qt=(e,t)=>{let r=e,n=!1;e.indexOf("!")===0&&(n=!0,e=e.substr(1)),e=e.replace(qt,"!").replace(Mt,"#");let o=zt(e,t);return new pe(r,e,n,o)},Jt=(e,t)=>{throw new t(e)},j=(e,t,r)=>he(e)?e?j.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),et=e=>kt.test(e);j.isNotRelative=et;j.convert=e=>e;var ye=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:n=!1}={}){Yt(this,He,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[He]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(Ht(t)){let r=Qt(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,Be(he(t)?Vt(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let n=!1,o=!1;return this._rules.forEach(s=>{let{negative:d}=s;if(o===d&&n!==o||d&&!n&&!o&&!r)return;s.regex.test(t)&&(n=!d,o=d)}),{ignored:n,unignored:o}}_test(t,r,n,o){let s=t&&j.convert(t);return j(s,t,this._allowRelativePaths?Ze:Jt),this._t(s,r,n,o)}_t(t,r,n,o){if(t in r)return r[t];if(o||(o=t.split(de)),o.pop(),!o.length)return r[t]=this._testOne(t,n);let s=this._t(o.join(de)+de,r,n,o);return r[t]=s.ignored?s:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Be(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},V=e=>new ye(e),Zt=e=>j(e&&j.convert(e),e,Ze);V.isPathValid=Zt;V.default=V;tt.exports=V;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");j.convert=e;let t=/^[a-z]:\//i;j.isNotRelative=r=>t.test(r)||et(r)}});var ut=N((Cr,ge)=>{"use strict";h();var{promisify:er}=I("util"),nt=I("fs"),G=I("path"),it=Oe(),tr=rt(),K=Ge(),ot=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],rr=er(nt.readFile),nr=e=>t=>t.startsWith("!")?"!"+G.posix.join(e,t.slice(1)):G.posix.join(e,t),ir=(e,t)=>{let r=K(G.relative(t.cwd,G.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(n=>!n.startsWith("#")).map(nr(r))},ct=e=>{let t=tr();for(let r of e)t.add(ir(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},or=(e,t)=>{if(e=K(e),G.isAbsolute(t)){if(K(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return G.join(e,t)},st=(e,t)=>r=>e.ignores(K(G.relative(t,or(t,r.path||r)))),cr=async(e,t)=>{let r=G.join(t,e),n=await rr(r,"utf8");return{cwd:t,filePath:r,content:n}},sr=(e,t)=>{let r=G.join(t,e),n=nt.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:n}},at=({ignore:e=[],cwd:t=K(process.cwd())}={})=>({ignore:e,cwd:t});ge.exports=async e=>{e=at(e);let t=await it("**/.gitignore",{ignore:ot.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(o=>cr(o,e.cwd))),n=ct(r);return st(n,e.cwd)};ge.exports.sync=e=>{e=at(e);let r=it.sync("**/.gitignore",{ignore:ot.concat(e.ignore),cwd:e.cwd}).map(o=>sr(o,e.cwd)),n=ct(r);return st(n,e.cwd)}});var ft=N((Mr,lt)=>{"use strict";h();var{Transform:ar}=I("stream"),Q=class extends ar{constructor(){super({objectMode:!0})}},me=class extends Q{constructor(t){super(),this._filter=t}_transform(t,r,n){this._filter(t)&&this.push(t),n()}},we=class extends Q{constructor(){super(),this._pushed=new Set}_transform(t,r,n){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),n()}};lt.exports={FilterStream:me,UniqueStream:we}});var gr=N((kr,k)=>{"use strict";h();var pt=I("fs"),J=qe(),ur=bt(),Z=Oe(),ee=Ue(),Ee=ut(),{FilterStream:lr,UniqueStream:fr}=ft(),yt=()=>!1,dt=e=>e[0]==="!",dr=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},pr=(e={})=>{if(!e.cwd)return;let t;try{t=pt.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},yr=e=>e.stats instanceof pt.Stats?e.path:e,te=(e,t)=>{e=J([].concat(e)),dr(e),pr(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[n,o]of e.entries()){if(dt(o))continue;let s=e.slice(n).filter(p=>dt(p)).map(p=>p.slice(1)),d={...t,ignore:t.ignore.concat(s)};r.push({pattern:o,options:d})}return r},hr=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},Se=(e,t)=>e.options.expandDirectories?hr(e,t):[e.pattern],ht=e=>e&&e.gitignore?Ee.sync({cwd:e.cwd,ignore:e.ignore}):yt,ve=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=ee.sync(r.ignore)),{pattern:t,options:r}};k.exports=async(e,t)=>{let r=te(e,t),n=async()=>t&&t.gitignore?Ee({cwd:t.cwd,ignore:t.ignore}):yt,o=async()=>{let O=await Promise.all(r.map(async A=>{let i=await Se(A,ee);return Promise.all(i.map(ve(A)))}));return J(...O)},[s,d]=await Promise.all([n(),o()]),p=await Promise.all(d.map(O=>Z(O.pattern,O.options)));return J(...p).filter(O=>!s(yr(O)))};k.exports.sync=(e,t)=>{let r=te(e,t),n=[];for(let d of r){let p=Se(d,ee.sync).map(ve(d));n.push(...p)}let o=ht(t),s=[];for(let d of n)s=J(s,Z.sync(d.pattern,d.options));return s.filter(d=>!o(d))};k.exports.stream=(e,t)=>{let r=te(e,t),n=[];for(let p of r){let O=Se(p,ee.sync).map(ve(p));n.push(...O)}let o=ht(t),s=new lr(p=>!o(p)),d=new fr;return ur(n.map(p=>Z.stream(p.pattern,p.options))).pipe(s).pipe(d)};k.exports.generateGlobTasks=te;k.exports.hasMagic=(e,t)=>[].concat(e).some(r=>Z.isDynamicPattern(r,t));k.exports.gitignore=Ee});var wt=N((Xr,mt)=>{"use strict";h();mt.exports=gt;function gt(e,t){if(e&&t)return gt(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];var s=e.apply(this,n),d=n[n.length-1];return typeof s=="function"&&s!==d&&Object.keys(d).forEach(function(p){s[p]=d[p]}),s}}});var mr=N((Ur,_e)=>{"use strict";h();var Et=wt();_e.exports=Et(re);_e.exports.strict=Et(St);re.proto=re(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return re(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return St(this)},configurable:!0})});function re(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function St(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var wr=N((zr,vt)=>{"use strict";h();vt.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});export{Dt as a,Ge as b,gr as c,wt as d,mr as e,wr as f};
|