From bc99916675e900a09e74bb573f99c893f93cd1cb Mon Sep 17 00:00:00 2001 From: lmeysel Date: Thu, 27 Jul 2023 15:19:37 +0200 Subject: [PATCH 01/56] Migrate to TypeScript --- dist/index.es.js | 2 +- dist/index.js | 2 +- dist/index.m.js | 2 +- dist/types/Route.d.ts | 58 + dist/types/Router.d.ts | 133 ++ dist/types/index.d.ts | 7 + dist/types/types.d.ts | 78 + dist/types/vue.d.ts | 3 + dist/vue.es.js | 2 +- dist/vue.js | 2 +- dist/vue.m.js | 2 +- package-lock.json | 2144 +++++++++++++-------- package.json | 19 +- src/js/Route.js | 123 -- src/js/Route.ts | 152 ++ src/js/{Router.js => Router.ts} | 105 +- src/js/index.js | 7 - src/js/index.ts | 24 + src/js/types.ts | 87 + src/js/{vue.js => vue.ts} | 0 tests/js/{route.test.js => route.test.ts} | 70 +- tsconfig.json | 15 + 22 files changed, 1978 insertions(+), 1059 deletions(-) create mode 100644 dist/types/Route.d.ts create mode 100644 dist/types/Router.d.ts create mode 100644 dist/types/index.d.ts create mode 100644 dist/types/types.d.ts create mode 100644 dist/types/vue.d.ts delete mode 100644 src/js/Route.js create mode 100644 src/js/Route.ts rename src/js/{Router.js => Router.ts} (71%) delete mode 100644 src/js/index.js create mode 100644 src/js/index.ts create mode 100644 src/js/types.ts rename src/js/{vue.js => vue.ts} (100%) rename tests/js/{route.test.js => route.test.ts} (95%) create mode 100644 tsconfig.json diff --git a/dist/index.es.js b/dist/index.es.js index 432ac52b..b158d1e5 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -1 +1 @@ -function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e1;){var e=t.pop(),r=e.obj[e.prop];if(i(r)){for(var n=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===n.RFC1738&&(40===c||41===c)?s+=a.charAt(f):c<128?s+=u[c]:c<2048?s+=u[192|c>>6]+u[128|63&c]:c<55296||c>=57344?s+=u[224|c>>12]+u[128|c>>6&63]+u[128|63&c]:(c=65536+((1023&c)<<10|1023&a.charCodeAt(f+=1)),s+=u[240|c>>18]+u[128|c>>12&63]+u[128|c>>6&63]+u[128|63&c])}return s},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(i(t)){for(var r=[],n=0;n0?w.join(",")||null:void 0}];else if(l(a))R=a;else{var x=Object.keys(w);R=f?x.sort(f):x}for(var N=0;N-1?t.split(","):t},E=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=r.depth>0&&/(\[[^[\]]*])/.exec(o),a=u?o.slice(0,u.index):o,s=[];if(a){if(!r.plainObjects&&g.call(Object.prototype,a)&&!r.allowPrototypes)return;s.push(a)}for(var f=0;r.depth>0&&null!==(u=i.exec(o))&&f=0;--i){var u,a=t[i];if("[]"===a&&r.parseArrays)u=[].concat(o);else{u=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,f=parseInt(s,10);r.parseArrays||""!==s?!isNaN(f)&&a!==s&&String(f)===s&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(u=[])[f]=o:"__proto__"!==s&&(u[s]=o):u={0:o}}o=u}return o}(s,e,r,n)}},S=function(t,e){var r=function(t){if(!t)return w;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?w.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:w.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:w.arrayLimit,charset:void 0===t.charset?w.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:w.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:w.comma,decoder:"function"==typeof t.decoder?t.decoder:w.decoder,delimiter:"string"==typeof t.delimiter||s.isRegExp(t.delimiter)?t.delimiter:w.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:w.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:w.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:w.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:w.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:w.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,e){var r,n={},o=(e.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(e.delimiter,Infinity===e.parameterLimit?void 0:e.parameterLimit),i=-1,u=e.charset;if(e.charsetSentinel)for(r=0;r-1&&(f=j(f)?[f]:f),n[a]=g.call(n,a)?s.combine(n[a],f):f}return n}(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),u=0;u({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(t){if(!this.definition.methods.includes("GET"))return!1;const e=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(t,e,r,n)=>{var o;const i=`(?<${r}>${(null==(o=this.wheres[r])?void 0:o.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return n?`(${e}${i})?`:`${e}${i}`}).replace(/^\w+:\/\//,""),[r,n]=t.replace(/^\w+:\/\//,"").split("?"),o=new RegExp(`^${e}/?$`).exec(r);if(o){for(const t in o.groups)o.groups[t]="string"==typeof o.groups[t]?decodeURIComponent(o.groups[t]):o.groups[t];return{params:o.groups,query:S(n)}}return!1}compile(t){const e=this.parameterSegments;return e.length?this.template.replace(/{([^}?]+)(\??)}/g,(r,n,o)=>{var i,u,a;if(!o&&[null,void 0].includes(t[n]))throw new Error(`Ziggy error: '${n}' parameter is required for route '${this.name}'.`);if(e[e.length-1].name===n&&".*"===this.wheres[n])return encodeURIComponent(null!=(a=t[n])?a:"").replace(/%2F/g,"/");if(this.wheres[n]&&!new RegExp(`^${o?`(${this.wheres[n]})?`:this.wheres[n]}$`).test(null!=(i=t[n])?i:""))throw new Error(`Ziggy error: '${n}' parameter does not match required format '${this.wheres[n]}' for route '${this.name}'.`);return encodeURIComponent(null!=(u=t[n])?u:"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class C extends String{constructor(e,r,n=!0,o){if(super(),this.t=null!=o?o:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,this.t=t({},this.t,{absolute:n}),e){if(!this.t.routes[e])throw new Error(`Ziggy error: route '${e}' is not in the route list.`);this.i=new R(e,this.t.routes[e],this.t),this.u=this.l(r)}}toString(){const e=Object.keys(this.u).filter(t=>!this.i.parameterSegments.some(({name:e})=>e===t)).filter(t=>"_query"!==t).reduce((e,r)=>t({},e,{[r]:this.u[r]}),{});return this.i.compile(this.u)+function(t,e){var r,o=t,i=function(t){if(!t)return v;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||v.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=n.default;if(void 0!==t.format){if(!f.call(n.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=n.formatters[r],i=v.filter;return("function"==typeof t.filter||l(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:v.addQueryPrefix,allowDots:void 0===t.allowDots?v.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:v.charsetSentinel,delimiter:void 0===t.delimiter?v.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:v.encode,encoder:"function"==typeof t.encoder?t.encoder:v.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:v.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:v.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:v.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:v.strictNullHandling}}(e);"function"==typeof i.filter?o=(0,i.filter)("",o):l(i.filter)&&(r=i.filter);var u=[];if("object"!=typeof o||null===o)return"";var a=c[e&&e.arrayFormat in c?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices"];r||(r=Object.keys(o)),i.sort&&r.sort(i.sort);for(var s=0;s0?d+h:""}(t({},e,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,e)=>"boolean"==typeof t?Number(t):e(t)})}p(e){e?this.t.absolute&&e.startsWith("/")&&(e=this.h().host+e):e=this.v();let r={};const[n,o]=Object.entries(this.t.routes).find(([t,n])=>r=new R(t,n,this.t).matchesUrl(e))||[void 0,void 0];return t({name:n},r,{route:o})}v(){const{host:t,pathname:e,search:r}=this.h();return(this.t.absolute?t+e:e.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+r}current(e,r){const{name:n,params:o,query:i,route:u}=this.p();if(!e)return n;const a=new RegExp(`^${e.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(n);if([null,void 0].includes(r)||!a)return a;const s=new R(n,u,this.t);r=this.l(r,s);const f=t({},o,i);return!(!Object.values(r).every(t=>!t)||Object.values(f).some(t=>void 0!==t))||Object.entries(r).every(([t,e])=>f[t]==e)}h(){var t,e,r,n,o,i;const{host:u="",pathname:a="",search:s=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null==(e=this.t.location)?void 0:e.host)?t:u,pathname:null!=(r=null==(n=this.t.location)?void 0:n.pathname)?r:a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:s}}get params(){const{params:e,query:r}=this.p();return t({},e,r)}has(t){return Object.keys(this.t.routes).includes(t)}l(e={},r=this.i){null!=e||(e={}),e=["string","number"].includes(typeof e)?[e]:e;const n=r.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);return Array.isArray(e)?e=e.reduce((e,r,o)=>t({},e,n[o]?{[n[o].name]:r}:"object"==typeof r?r:{[r]:""}),{}):1!==n.length||e[n[0].name]||!e.hasOwnProperty(Object.values(r.bindings)[0])&&!e.hasOwnProperty("id")||(e={[n[0].name]:e}),t({},this.m(r),this.g(e,r))}m(e){return e.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((e,{name:r},n)=>t({},e,{[r]:this.t.defaults[r]}),{})}g(e,{bindings:r,parameterSegments:n}){return Object.entries(e).reduce((e,[o,i])=>{if(!i||"object"!=typeof i||Array.isArray(i)||!n.some(({name:t})=>t===o))return t({},e,{[o]:i});if(!i.hasOwnProperty(r[o])){if(!i.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${o}' parameter is missing route model binding key '${r[o]}'.`);r[o]="id"}return t({},e,{[o]:i[r[o]]})},{})}valueOf(){return this.toString()}check(t){return this.has(t)}}function x(t,e,r,n){const o=new C(t,e,r,n);return t?o.toString():o}export{x as default}; +import{parse as t,stringify as r}from"qs";function e(){return e=Object.assign?Object.assign.bind():function(t){for(var r=1;r({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(r){if(!this.definition.methods.includes("GET"))return!1;const e=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(t,r,e,i)=>{var s;const n=`(?<${e}>${(null==(s=this.wheres[e])?void 0:s.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return i?`(${r}${n})?`:`${r}${n}`}).replace(/^\w+:\/\//,""),[i,s]=r.replace(/^\w+:\/\//,"").split("?"),n=new RegExp(`^${e}/?$`).exec(i);if(n){for(const t in n.groups)n.groups[t]="string"==typeof n.groups[t]?decodeURIComponent(n.groups[t]):n.groups[t];return{params:n.groups,query:t(s)}}return!1}compile(t){const r=this.parameterSegments;return r.length?this.template.replace(/{([^}?]+)(\??)}/g,(e,i,s)=>{var n,o,h;if(!s&&[null,void 0].includes(t[i]))throw new Error(`Ziggy error: '${i}' parameter is required for route '${this.name}'.`);if(r[r.length-1].name===i&&".*"===this.wheres[i])return encodeURIComponent(null!=(h=t[i])?h:"").replace(/%2F/g,"/");if(this.wheres[i]&&!new RegExp(`^${s?`(${this.wheres[i]})?`:this.wheres[i]}$`).test(null!=(n=t[i])?n:""))throw new Error(`Ziggy error: '${i}' parameter does not match required format '${this.wheres[i]}' for route '${this.name}'.`);return encodeURIComponent(null!=(o=t[i])?o:"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class s extends String{constructor(t,r,s=!0,n){if(super(),this.t=void 0,this.i=void 0,this.o=void 0,this.t=null!=n?n:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,this.t=e({},this.t,{absolute:s}),t){if(!this.t.routes[t])throw new Error(`Ziggy error: route '${t}' is not in the route list.`);this.o=new i(t,this.t.routes[t],this.t),this.i=this.h(r,this.o)}}toString(){var t;const i=Object.keys(this.i).filter(t=>!this.o.parameterSegments.some(({name:r})=>r===t)).filter(t=>"_query"!==t).reduce((t,r)=>e({},t,{[r]:this.i[r]}),{}),s=null!=(t=this.i._query)?t:{};return this.o.compile(this.i)+r(e({},i,s),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,r)=>"boolean"==typeof t?Number(t).toString():r(t)})}u(t){t?this.t.absolute&&t.startsWith("/")&&(t=this.l().host+t):t=this.g();const r=Object.entries(this.t.routes);for(const[s,n]of r){const r=new i(s,n,this.t).matchesUrl(t);if(r)return e({name:s},r,{route:n})}return{}}g(){const{host:t,pathname:r,search:e}=this.l();return(this.t.absolute?t+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+e}current(t,r){null!=r||(r={});const s=this.u();if(!s)return;const{name:n,params:o,query:h,route:u}=s;if(!t)return n;const a=new RegExp(`^${t.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(n);if([null,void 0].includes(r)||!a)return a;const l=new i(n,u,this.t),c=this.h(r,l),d=e({},o,h);return!(!Object.values(c).every(t=>!t)||Object.values(d).some(t=>void 0!==t))||Object.entries(c).every(([t,r])=>d[t]==r)}l(){var t,r,e,i,s,n;const{host:o="",pathname:h="",search:u=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:o,pathname:null!=(e=null==(i=this.t.location)?void 0:i.pathname)?e:h,search:null!=(s=null==(n=this.t.location)?void 0:n.search)?s:u}}get params(){const{params:t,query:r}=this.u()||{};return e({},t,r)}has(t){return Object.keys(this.t.routes).includes(t)}h(t,r){null!=t||(t={});const i=r.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);let s={};if("number"==typeof t||"string"==typeof t){const[r]=i;s=r?{[r.name]:t}:{[t]:""}}else t instanceof Array?s=t.reduce((t,r,s)=>e({},t,i[s]?{[i[s].name]:r}:"object"==typeof r?r:{[r]:""}),{}):1!==i.length||t[i[0].name]||!t.hasOwnProperty(Object.values(r.bindings)[0])&&!t.hasOwnProperty("id")?t&&(s=t):s={[i[0].name]:t};return e({},this.m(r),this.p(s,r))}m(t){return t.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((t,{name:r},i)=>e({},t,{[r]:this.t.defaults[r]}),{})}p(t,{bindings:r,parameterSegments:i}){return Object.entries(t).reduce((t,[s,n])=>{if(!n||"object"!=typeof n||Array.isArray(n)||!i.some(({name:t})=>t===s))return e({},t,{[s]:n});if(!n.hasOwnProperty(r[s])){if(!n.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${s}' parameter is missing route model binding key '${r[s]}'.`);r[s]="id"}return e({},t,{[s]:n[r[s]]})},{})}valueOf(){return this.toString()}check(t){return this.has(t)}}function n(t,r,e=!0,i){const n=new s(t,r,e,i);return t?n.toString():n}export{n as default}; diff --git a/dist/index.js b/dist/index.js index d8868597..b7960c81 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t||self).route=r()}(this,function(){function t(t,r){for(var e=0;e1;){var r=t.pop(),e=r.obj[r.prop];if(p(e)){for(var n=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===s.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=y[a]:a<2048?u+=y[192|a>>6]+y[128|63&a]:a<55296||a>=57344?u+=y[224|a>>12]+y[128|a>>6&63]+y[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=y[240|a>>18]+y[128|a>>12&63]+y[128|a>>6&63]+y[128|63&a])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(p(t)){for(var e=[],n=0;n0?h.join(",")||null:void 0}];else if(g(f))T=f;else{var x=Object.keys(h);T=a?x.sort(a):x}for(var C=0;C-1?t.split(","):t},F=function(t,r,e,n){if(t){var o=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=e.depth>0&&/(\[[^[\]]*])/.exec(o),f=u?o.slice(0,u.index):o,a=[];if(f){if(!e.plainObjects&&k.call(Object.prototype,f)&&!e.allowPrototypes)return;a.push(f)}for(var c=0;e.depth>0&&null!==(u=i.exec(o))&&c=0;--i){var u,f=t[i];if("[]"===f&&e.parseArrays)u=[].concat(o);else{u=e.plainObjects?Object.create(null):{};var a="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,c=parseInt(a,10);e.parseArrays||""!==a?!isNaN(c)&&f!==a&&String(c)===a&&c>=0&&e.parseArrays&&c<=e.arrayLimit?(u=[])[c]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,r,e,n)}},P=function(t,r){var e=function(t){if(!t)return C;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?C.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:C.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:C.arrayLimit,charset:void 0===t.charset?C.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:C.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:C.comma,decoder:"function"==typeof t.decoder?t.decoder:C.decoder,delimiter:"string"==typeof t.delimiter||b.isRegExp(t.delimiter)?t.delimiter:C.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:C.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:C.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:C.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:C.strictNullHandling}}(r);if(""===t||null==t)return e.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,r){var e,n={},o=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),i=-1,u=r.charset;if(r.charsetSentinel)for(e=0;e-1&&(a=x(a)?[a]:a),n[f]=k.call(n,f)?b.combine(n[f],a):a}return n}(t,e):t,o=e.plainObjects?Object.create(null):{},i=Object.keys(n),u=0;u"+((null==(i=r.wheres[n])?void 0:i.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return o?"("+e+u+")?":""+e+u}).replace(/^\w+:\/\//,""),n=t.replace(/^\w+:\/\//,"").split("?"),o=n[0],i=n[1],u=new RegExp("^"+e+"/?$").exec(o);if(u){for(var f in u.groups)u.groups[f]="string"==typeof u.groups[f]?decodeURIComponent(u.groups[f]):u.groups[f];return{params:u.groups,query:P(i)}}return!1},e.compile=function(t){var r=this,e=this.parameterSegments;return e.length?this.template.replace(/{([^}?]+)(\??)}/g,function(n,o,i){var u,f,a;if(!i&&[null,void 0].includes(t[o]))throw new Error("Ziggy error: '"+o+"' parameter is required for route '"+r.name+"'.");if(e[e.length-1].name===o&&".*"===r.wheres[o])return encodeURIComponent(null!=(a=t[o])?a:"").replace(/%2F/g,"/");if(r.wheres[o]&&!new RegExp("^"+(i?"("+r.wheres[o]+")?":r.wheres[o])+"$").test(null!=(u=t[o])?u:""))throw new Error("Ziggy error: '"+o+"' parameter does not match required format '"+r.wheres[o]+"' for route '"+r.name+"'.");return encodeURIComponent(null!=(f=t[o])?f:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},r(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,r;return null!=(t=null==(r=this.template.match(/{[^}?]+\??}/g))?void 0:r.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),A=/*#__PURE__*/function(t){var n,i;function u(r,n,o,i){var u;if(void 0===o&&(o=!0),(u=t.call(this)||this).t=null!=i?i:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,u.t=e({},u.t,{absolute:o}),r){if(!u.t.routes[r])throw new Error("Ziggy error: route '"+r+"' is not in the route list.");u.i=new $(r,u.t.routes[r],u.t),u.u=u.l(n)}return u}i=t,(n=u).prototype=Object.create(i.prototype),n.prototype.constructor=n,o(n,i);var f=u.prototype;return f.toString=function(){var t=this,r=Object.keys(this.u).filter(function(r){return!t.i.parameterSegments.some(function(t){return t.name===r})}).filter(function(t){return"_query"!==t}).reduce(function(r,n){var o;return e({},r,((o={})[n]=t.u[n],o))},{});return this.i.compile(this.u)+function(t,r){var e,n=t,o=function(t){if(!t)return S;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||S.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=s.default;if(void 0!==t.format){if(!h.call(s.formatters,t.format))throw new TypeError("Unknown format option provided.");e=t.format}var n=s.formatters[e],o=S.filter;return("function"==typeof t.filter||g(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:S.addQueryPrefix,allowDots:void 0===t.allowDots?S.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:S.charsetSentinel,delimiter:void 0===t.delimiter?S.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:S.encode,encoder:"function"==typeof t.encoder?t.encoder:S.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:S.encodeValuesOnly,filter:o,format:e,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:S.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:S.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:S.strictNullHandling}}(r);"function"==typeof o.filter?n=(0,o.filter)("",n):g(o.filter)&&(e=o.filter);var i=[];if("object"!=typeof n||null===n)return"";var u=m[r&&r.arrayFormat in m?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];e||(e=Object.keys(n)),o.sort&&e.sort(o.sort);for(var f=0;f0?l+c:""}(e({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,r){return"boolean"==typeof t?Number(t):r(t)}})},f.v=function(t){var r=this;t?this.t.absolute&&t.startsWith("/")&&(t=this.p().host+t):t=this.h();var n={},o=Object.entries(this.t.routes).find(function(e){return n=new $(e[0],e[1],r.t).matchesUrl(t)})||[void 0,void 0];return e({name:o[0]},n,{route:o[1]})},f.h=function(){var t=this.p(),r=t.pathname,e=t.search;return(this.t.absolute?t.host+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+e},f.current=function(t,r){var n=this.v(),o=n.name,i=n.params,u=n.query,f=n.route;if(!t)return o;var a=new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o);if([null,void 0].includes(r)||!a)return a;var c=new $(o,f,this.t);r=this.l(r,c);var l=e({},i,u);return!(!Object.values(r).every(function(t){return!t})||Object.values(l).some(function(t){return void 0!==t}))||Object.entries(r).every(function(t){return l[t[0]]==t[1]})},f.p=function(){var t,r,e,n,o,i,u="undefined"!=typeof window?window.location:{},f=u.host,a=u.pathname,c=u.search;return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:void 0===f?"":f,pathname:null!=(e=null==(n=this.t.location)?void 0:n.pathname)?e:void 0===a?"":a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:void 0===c?"":c}},f.has=function(t){return Object.keys(this.t.routes).includes(t)},f.l=function(t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r=this.i),null!=t||(t={}),t=["string","number"].includes(typeof t)?[t]:t;var o=r.parameterSegments.filter(function(t){return!n.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,r,n){var i,u;return e({},t,o[n]?((i={})[o[n].name]=r,i):"object"==typeof r?r:((u={})[r]="",u))},{});else if(1===o.length&&!t[o[0].name]&&(t.hasOwnProperty(Object.values(r.bindings)[0])||t.hasOwnProperty("id"))){var i;(i={})[o[0].name]=t,t=i}return e({},this.m(r),this.g(t,r))},f.m=function(t){var r=this;return t.parameterSegments.filter(function(t){return r.t.defaults[t.name]}).reduce(function(t,n,o){var i,u=n.name;return e({},t,((i={})[u]=r.t.defaults[u],i))},{})},f.g=function(t,r){var n=r.bindings,o=r.parameterSegments;return Object.entries(t).reduce(function(t,r){var i,u,f=r[0],a=r[1];if(!a||"object"!=typeof a||Array.isArray(a)||!o.some(function(t){return t.name===f}))return e({},t,((u={})[f]=a,u));if(!a.hasOwnProperty(n[f])){if(!a.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+f+"' parameter is missing route model binding key '"+n[f]+"'.");n[f]="id"}return e({},t,((i={})[f]=a[n[f]],i))},{})},f.valueOf=function(){return this.toString()},f.check=function(t){return this.has(t)},r(u,[{key:"params",get:function(){var t=this.v();return e({},t.params,t.query)}}]),u}(/*#__PURE__*/f(String));return function(t,r,e,n){var o=new A(t,r,e,n);return t?o.toString():o}}); +!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("qs")):"function"==typeof define&&define.amd?define(["qs"],t):(n||self).route=t(n.qs)}(this,function(n){function t(n,t){for(var r=0;r"+((null==(u=r.wheres[e])?void 0:u.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return i?"("+t+o+")?":""+t+o}).replace(/^\w+:\/\//,""),i=t.replace(/^\w+:\/\//,"").split("?"),u=i[0],o=i[1],f=new RegExp("^"+e+"/?$").exec(u);if(f){for(var c in f.groups)f.groups[c]="string"==typeof f.groups[c]?decodeURIComponent(f.groups[c]):f.groups[c];return{params:f.groups,query:n.parse(o)}}return!1},e.compile=function(n){var t=this,r=this.parameterSegments;return r.length?this.template.replace(/{([^}?]+)(\??)}/g,function(e,i,u){var o,f,c;if(!u&&[null,void 0].includes(n[i]))throw new Error("Ziggy error: '"+i+"' parameter is required for route '"+t.name+"'.");if(r[r.length-1].name===i&&".*"===t.wheres[i])return encodeURIComponent(null!=(c=n[i])?c:"").replace(/%2F/g,"/");if(t.wheres[i]&&!new RegExp("^"+(u?"("+t.wheres[i]+")?":t.wheres[i])+"$").test(null!=(o=n[i])?o:""))throw new Error("Ziggy error: '"+i+"' parameter does not match required format '"+t.wheres[i]+"' for route '"+t.name+"'.");return encodeURIComponent(null!=(f=n[i])?f:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},r(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var n,t;return null!=(n=null==(t=this.template.match(/{[^}?]+\??}/g))?void 0:t.map(function(n){return{name:n.replace(/{|\??}/g,""),required:!/\?}$/.test(n)}}))?n:[]}}]),t}(),a=/*#__PURE__*/function(t){var i,o;function f(n,r,i,u){var o;if(void 0===i&&(i=!0),(o=t.call(this)||this).t=void 0,o.i=void 0,o.u=void 0,o.t=null!=u?u:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,o.t=e({},o.t,{absolute:i}),n){if(!o.t.routes[n])throw new Error("Ziggy error: route '"+n+"' is not in the route list.");o.u=new s(n,o.t.routes[n],o.t),o.i=o.o(r,o.u)}return o}o=t,(i=f).prototype=Object.create(o.prototype),i.prototype.constructor=i,u(i,o);var c=f.prototype;return c.toString=function(){var t,r=this,i=Object.keys(this.i).filter(function(n){return!r.u.parameterSegments.some(function(t){return t.name===n})}).filter(function(n){return"_query"!==n}).reduce(function(n,t){var i;return e({},n,((i={})[t]=r.i[t],i))},{}),u=null!=(t=this.i._query)?t:{};return this.u.compile(this.i)+n.stringify(e({},i,u),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(n,t){return"boolean"==typeof n?Number(n).toString():t(n)}})},c.l=function(n){n?this.t.absolute&&n.startsWith("/")&&(n=this.h().host+n):n=this.v();for(var t=0,r=Object.entries(this.t.routes);t1;){var r=t.pop(),n=r.obj[r.prop];if(v(n)){for(var e=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===l.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=p[a]:a<2048?u+=p[192|a>>6]+p[128|63&a]:a<55296||a>=57344?u+=p[224|a>>12]+p[128|a>>6&63]+p[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=p[240|a>>18]+p[128|a>>12&63]+p[128|a>>6&63]+p[128|63&a])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(v(t)){for(var n=[],e=0;e0?h.join(",")||null:void 0}];else if(m(f))k=f;else{var C=Object.keys(h);k=a?C.sort(a):C}for(var T=0;T-1?t.split(","):t},F=function(t,r,n,e){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),f=u?o.slice(0,u.index):o,a=[];if(f){if(!n.plainObjects&&k.call(Object.prototype,f)&&!n.allowPrototypes)return;a.push(f)}for(var c=0;n.depth>0&&null!==(u=i.exec(o))&&c=0;--i){var u,f=t[i];if("[]"===f&&n.parseArrays)u=[].concat(o);else{u=n.plainObjects?Object.create(null):{};var a="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,c=parseInt(a,10);n.parseArrays||""!==a?!isNaN(c)&&f!==a&&String(c)===a&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(u=[])[c]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,r,n,e)}},D=function(t,r){var n=function(t){if(!t)return C;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?C.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:C.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:C.arrayLimit,charset:void 0===t.charset?C.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:C.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:C.comma,decoder:"function"==typeof t.decoder?t.decoder:C.decoder,delimiter:"string"==typeof t.delimiter||d.isRegExp(t.delimiter)?t.delimiter:C.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:C.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:C.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:C.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:C.strictNullHandling}}(r);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var e="string"==typeof t?function(t,r){var n,e={},o=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),i=-1,u=r.charset;if(r.charsetSentinel)for(n=0;n-1&&(a=x(a)?[a]:a),e[f]=k.call(e,f)?d.combine(e[f],a):a}return e}(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(e),u=0;u"+((null==(i=r.wheres[e])?void 0:i.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return o?"("+n+u+")?":""+n+u}).replace(/^\w+:\/\//,""),e=t.replace(/^\w+:\/\//,"").split("?"),o=e[0],i=e[1],u=new RegExp("^"+n+"/?$").exec(o);if(u){for(var f in u.groups)u.groups[f]="string"==typeof u.groups[f]?decodeURIComponent(u.groups[f]):u.groups[f];return{params:u.groups,query:D(i)}}return!1},n.compile=function(t){var r=this,n=this.parameterSegments;return n.length?this.template.replace(/{([^}?]+)(\??)}/g,function(e,o,i){var u,f,a;if(!i&&[null,void 0].includes(t[o]))throw new Error("Ziggy error: '"+o+"' parameter is required for route '"+r.name+"'.");if(n[n.length-1].name===o&&".*"===r.wheres[o])return encodeURIComponent(null!=(a=t[o])?a:"").replace(/%2F/g,"/");if(r.wheres[o]&&!new RegExp("^"+(i?"("+r.wheres[o]+")?":r.wheres[o])+"$").test(null!=(u=t[o])?u:""))throw new Error("Ziggy error: '"+o+"' parameter does not match required format '"+r.wheres[o]+"' for route '"+r.name+"'.");return encodeURIComponent(null!=(f=t[o])?f:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},r(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,r;return null!=(t=null==(r=this.template.match(/{[^}?]+\??}/g))?void 0:r.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),$=/*#__PURE__*/function(t){var e,i;function u(r,e,o,i){var u;if(void 0===o&&(o=!0),(u=t.call(this)||this).t=null!=i?i:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,u.t=n({},u.t,{absolute:o}),r){if(!u.t.routes[r])throw new Error("Ziggy error: route '"+r+"' is not in the route list.");u.i=new P(r,u.t.routes[r],u.t),u.u=u.l(e)}return u}i=t,(e=u).prototype=Object.create(i.prototype),e.prototype.constructor=e,o(e,i);var f=u.prototype;return f.toString=function(){var t=this,r=Object.keys(this.u).filter(function(r){return!t.i.parameterSegments.some(function(t){return t.name===r})}).filter(function(t){return"_query"!==t}).reduce(function(r,e){var o;return n({},r,((o={})[e]=t.u[e],o))},{});return this.i.compile(this.u)+function(t,r){var n,e=t,o=function(t){if(!t)return R;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||R.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=l.default;if(void 0!==t.format){if(!b.call(l.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var e=l.formatters[n],o=R.filter;return("function"==typeof t.filter||m(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:R.addQueryPrefix,allowDots:void 0===t.allowDots?R.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:R.charsetSentinel,delimiter:void 0===t.delimiter?R.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:R.encode,encoder:"function"==typeof t.encoder?t.encoder:R.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:R.encodeValuesOnly,filter:o,format:n,formatter:e,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:R.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:R.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:R.strictNullHandling}}(r);"function"==typeof o.filter?e=(0,o.filter)("",e):m(o.filter)&&(n=o.filter);var i=[];if("object"!=typeof e||null===e)return"";var u=h[r&&r.arrayFormat in h?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];n||(n=Object.keys(e)),o.sort&&n.sort(o.sort);for(var f=0;f0?s+c:""}(n({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,r){return"boolean"==typeof t?Number(t):r(t)}})},f.v=function(t){var r=this;t?this.t.absolute&&t.startsWith("/")&&(t=this.p().host+t):t=this.h();var e={},o=Object.entries(this.t.routes).find(function(n){return e=new P(n[0],n[1],r.t).matchesUrl(t)})||[void 0,void 0];return n({name:o[0]},e,{route:o[1]})},f.h=function(){var t=this.p(),r=t.pathname,n=t.search;return(this.t.absolute?t.host+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+n},f.current=function(t,r){var e=this.v(),o=e.name,i=e.params,u=e.query,f=e.route;if(!t)return o;var a=new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o);if([null,void 0].includes(r)||!a)return a;var c=new P(o,f,this.t);r=this.l(r,c);var l=n({},i,u);return!(!Object.values(r).every(function(t){return!t})||Object.values(l).some(function(t){return void 0!==t}))||Object.entries(r).every(function(t){return l[t[0]]==t[1]})},f.p=function(){var t,r,n,e,o,i,u="undefined"!=typeof window?window.location:{},f=u.host,a=u.pathname,c=u.search;return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:void 0===f?"":f,pathname:null!=(n=null==(e=this.t.location)?void 0:e.pathname)?n:void 0===a?"":a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:void 0===c?"":c}},f.has=function(t){return Object.keys(this.t.routes).includes(t)},f.l=function(t,r){var e=this;void 0===t&&(t={}),void 0===r&&(r=this.i),null!=t||(t={}),t=["string","number"].includes(typeof t)?[t]:t;var o=r.parameterSegments.filter(function(t){return!e.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,r,e){var i,u;return n({},t,o[e]?((i={})[o[e].name]=r,i):"object"==typeof r?r:((u={})[r]="",u))},{});else if(1===o.length&&!t[o[0].name]&&(t.hasOwnProperty(Object.values(r.bindings)[0])||t.hasOwnProperty("id"))){var i;(i={})[o[0].name]=t,t=i}return n({},this.m(r),this.g(t,r))},f.m=function(t){var r=this;return t.parameterSegments.filter(function(t){return r.t.defaults[t.name]}).reduce(function(t,e,o){var i,u=e.name;return n({},t,((i={})[u]=r.t.defaults[u],i))},{})},f.g=function(t,r){var e=r.bindings,o=r.parameterSegments;return Object.entries(t).reduce(function(t,r){var i,u,f=r[0],a=r[1];if(!a||"object"!=typeof a||Array.isArray(a)||!o.some(function(t){return t.name===f}))return n({},t,((u={})[f]=a,u));if(!a.hasOwnProperty(e[f])){if(!a.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+f+"' parameter is missing route model binding key '"+e[f]+"'.");e[f]="id"}return n({},t,((i={})[f]=a[e[f]],i))},{})},f.valueOf=function(){return this.toString()},f.check=function(t){return this.has(t)},r(u,[{key:"params",get:function(){var t=this.v();return n({},t.params,t.query)}}]),u}(/*#__PURE__*/f(String));function A(t,r,n,e){var o=new $(t,r,n,e);return t?o.toString():o}export{A as default}; +import{parse as t,stringify as n}from"qs";function r(t,n){for(var r=0;r"+((null==(u=r.wheres[e])?void 0:u.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return i?"("+n+o+")?":""+n+o}).replace(/^\w+:\/\//,""),i=n.replace(/^\w+:\/\//,"").split("?"),u=i[0],o=i[1],f=new RegExp("^"+e+"/?$").exec(u);if(f){for(var c in f.groups)f.groups[c]="string"==typeof f.groups[c]?decodeURIComponent(f.groups[c]):f.groups[c];return{params:f.groups,query:t(o)}}return!1},r.compile=function(t){var n=this,r=this.parameterSegments;return r.length?this.template.replace(/{([^}?]+)(\??)}/g,function(e,i,u){var o,f,c;if(!u&&[null,void 0].includes(t[i]))throw new Error("Ziggy error: '"+i+"' parameter is required for route '"+n.name+"'.");if(r[r.length-1].name===i&&".*"===n.wheres[i])return encodeURIComponent(null!=(c=t[i])?c:"").replace(/%2F/g,"/");if(n.wheres[i]&&!new RegExp("^"+(u?"("+n.wheres[i]+")?":n.wheres[i])+"$").test(null!=(o=t[i])?o:""))throw new Error("Ziggy error: '"+i+"' parameter does not match required format '"+n.wheres[i]+"' for route '"+n.name+"'.");return encodeURIComponent(null!=(f=t[i])?f:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},e(n,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,n;return null!=(t=null==(n=this.template.match(/{[^}?]+\??}/g))?void 0:n.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),n}(),l=/*#__PURE__*/function(t){var r,u;function f(n,r,e,u){var o;if(void 0===e&&(e=!0),(o=t.call(this)||this).t=void 0,o.i=void 0,o.u=void 0,o.t=null!=u?u:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,o.t=i({},o.t,{absolute:e}),n){if(!o.t.routes[n])throw new Error("Ziggy error: route '"+n+"' is not in the route list.");o.u=new a(n,o.t.routes[n],o.t),o.i=o.o(r,o.u)}return o}u=t,(r=f).prototype=Object.create(u.prototype),r.prototype.constructor=r,o(r,u);var c=f.prototype;return c.toString=function(){var t,r=this,e=Object.keys(this.i).filter(function(t){return!r.u.parameterSegments.some(function(n){return n.name===t})}).filter(function(t){return"_query"!==t}).reduce(function(t,n){var e;return i({},t,((e={})[n]=r.i[n],e))},{}),u=null!=(t=this.i._query)?t:{};return this.u.compile(this.i)+n(i({},e,u),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,n){return"boolean"==typeof t?Number(t).toString():n(t)}})},c.l=function(t){t?this.t.absolute&&t.startsWith("/")&&(t=this.h().host+t):t=this.v();for(var n=0,r=Object.entries(this.t.routes);n { + readonly name: Name; + readonly definition: RouteDefinition; + readonly config: RouteConfig; + readonly bindings: Record; + readonly wheres: any; + /** + * @param name - Route name. + * @param definition - Route definition. + * @param config - Ziggy configuration. + */ + constructor(name: Name, definition: RouteDefinition, config: RouteConfig); + /** + * Get a 'template' of the complete URL for this route. + * + * @example + * https://{team}.ziggy.dev/user/{user} + * + * @return Route template. + */ + get template(): string; + /** + * Get a template of the origin for this route. + * + * @example + * https://{team}.ziggy.dev/ + * + * @return Route origin template. + */ + get origin(): string; + /** + * Get an array of objects representing the parameters that this route accepts. + * + * @example + * [{ name: 'team', required: true }, { name: 'user', required: false }] + * + * @return {Array} Parameter segments. + */ + get parameterSegments(): { + name: string; + required: boolean; + }[]; + /** + * Get whether this route's template matches the given URL. + * + * @param url - URL to check. + * @return If this route matches, returns the matched parameters. + */ + matchesUrl(url: string): RouteMatchResult | false; + /** + * Hydrate and return a complete URL for this route with the given parameters. + */ + compile(params: NormalizedRouteParams): string; +} diff --git a/dist/types/Router.d.ts b/dist/types/Router.d.ts new file mode 100644 index 00000000..4434d319 --- /dev/null +++ b/dist/types/Router.d.ts @@ -0,0 +1,133 @@ +/// +import { Config, NormalizedRouteParams, ParameterValue, RouteDefinition, RouteMatchResult, RouteName, RouteParams, RouteParamsObject } from '.'; +import Route from './Route'; +declare type _Unresolve = RouteMatchResult & { + name: string; + route: RouteDefinition; +}; +declare global { + var Ziggy: Config; +} +/** + * A collection of Laravel routes. This class constitutes Ziggy's main API. + */ +export default class Router extends String { + private readonly _config; + private readonly _params; + private readonly _route; + /** + * @param name Route name. + * @param params Route parameters. + * @param absolute Whether to include the URL origin. + * @param config Ziggy configuration. + */ + constructor(name?: Name, params?: RouteParams, absolute?: boolean, config?: Config); + /** + * Get the compiled URL string for the current route and parameters. + * + * @example + * // with 'posts.show' route 'posts/{post}' + * (new Router('posts.show', 1)).toString(); // 'https://ziggy.dev/posts/1' + * + * @return {String} + */ + toString(): string; + /** + * Get the parameters, values, and metadata from the given URL. + * + * @param {String} [url] - The URL to inspect, defaults to the current window URL. + * @return {{ name: string, params: Object, query: Object, route: Route }} + */ + _unresolve(url?: string): _Unresolve; + _currentUrl(): string; + /** + * Get the name of the route matching the current window URL, or, given a route name + * and parameters, check if the current window URL and parameters match that route. + * + * @example + * // at URL https://ziggy.dev/posts/4 with 'posts.show' route 'posts/{post}' + * route().current(); // 'posts.show' + * route().current('posts.index'); // false + * route().current('posts.show'); // true + * route().current('posts.show', { post: 1 }); // false + * route().current('posts.show', { post: 4 }); // true + * + * @param name Route name to check. + * @param params Route parameters. + */ + current(name?: CurrentName, params?: RouteParams | null): boolean | string | void; + /** + * Get an object representing the current location (by default this will be + * the JavaScript `window` global if it's available). + * + * @return {Object} + */ + _location(): { + host: string; + pathname: string; + search: string; + }; + /** + * Get all parameter values from the current window URL. + * + * @example + * // at URL https://tighten.ziggy.dev/posts/4?lang=en with 'posts.show' route 'posts/{post}' and domain '{team}.ziggy.dev' + * route().params; // { team: 'tighten', post: 4, lang: 'en' } + * + * @return {Object} + */ + get params(): { + [x: string]: ParameterValue | string[] | import("qs").ParsedQs | import("qs").ParsedQs[]; + _query?: Record; + }; + /** + * Check whether the given route exists. + * + * @param {String} name + * @return {Boolean} + */ + has(name: any): boolean; + /** + * Parse Laravel-style route parameters of any type into a normalized object. + * + * @example + * // with route parameter names 'event' and 'venue' + * _parse(1); // { event: 1 } + * _parse({ event: 2, venue: 3 }); // { event: 2, venue: 3 } + * _parse(['Taylor', 'Matt']); // { event: 'Taylor', venue: 'Matt' } + * _parse([4, { uuid: 56789, name: 'Grand Canyon' }]); // { event: 4, venue: 56789 } + * + * @param {(String|Number|Array|Object)} params - Route parameters. + * @param {CurrentName} route - Route instance. + * @return {Object} Normalized complete route parameters. + */ + _parse(params: ParameterValue | RouteParams, route: Route): NormalizedRouteParams; + /** + * Populate default parameters for the given route. + * + * @example + * // with default parameters { locale: 'en', country: 'US' } and 'posts.show' route '{locale}/posts/{post}' + * defaults(...); // { locale: 'en' } + * + * @param {Name} route + * @return {Object} Default route parameters. + */ + _defaults(route: any): any; + /** + * Substitute Laravel route model bindings in the given parameters. + * + * @example + * _substituteBindings({ post: { id: 4, slug: 'hello-world', title: 'Hello, world!' } }, { bindings: { post: 'slug' } }); // { post: 'hello-world' } + * + * @param params Route parameters. + * @param route Route definition. + * @return Normalized route parameters. + */ + _substituteBindings(params: RouteParamsObject, { bindings, parameterSegments }: Route): NormalizedRouteParams; + valueOf(): string; + /** + * @deprecated since v1.0, use `has()` instead. + */ + check(name: any): boolean; +} +export {}; diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts new file mode 100644 index 00000000..2743c97c --- /dev/null +++ b/dist/types/index.d.ts @@ -0,0 +1,7 @@ +import Router from "./Router"; +import { Config, RouteName, RouteParams } from "./types"; +export * from "./types"; +export default function route(): Router; +export default function route(name: T, params?: RouteParams | null, absolute?: boolean, config?: Config): string; +export default function route(name: undefined, params: undefined, absolute: boolean): Router; +export default function route(name: undefined, params: undefined, absolute?: boolean, config?: Config): Router; diff --git a/dist/types/types.d.ts b/dist/types/types.d.ts new file mode 100644 index 00000000..100e0d0c --- /dev/null +++ b/dist/types/types.d.ts @@ -0,0 +1,78 @@ +import { ParsedQs } from "qs"; +/** + * Offers the route lookup to be merged with declarations emitted from ts generator + */ +export interface RouteLookup { +} +declare type _ParameterBindingDefinition = { + name: string; + binding: string; +} | { + name: string; +}; +declare type _BindingOrValue = T extends { + binding: string; +} ? ParameterBinding : ParameterValue; +/** Type of the values a parameter can be passed as. */ +export declare type ParameterValue = string | number; +/** A parameter as object or primitive */ +export declare type ParameterBinding = { + [K in Name]: ParameterValue; +} | ParameterValue; +/** Ordered array containing the paramters required to hydrate a route */ +export declare type RouteParamsArray = Name extends keyof RouteLookup ? _RouteParamsArray : GenericRouteParamsArray; +declare type _RouteParamsArray = { + [K in keyof T]: _BindingOrValue | null; +}; +/** Object containing the paramters required to hydrate a route. */ +export declare type RouteParamsObject = Name extends keyof RouteLookup ? _RouteParamsObject & QueryObject : GenericRouteParamsObject & QueryObject; +declare type _RouteParamsObject = { + [Item in T[number] as Item['name']]?: _BindingOrValue | null; +}; +/** Object containing the normalized paramters required to hydrate a route. */ +export declare type NormalizedRouteParams = Route extends keyof RouteLookup ? Record, ParameterValue> & _NormalizedRouteParams : _NormalizedRouteParams; +export declare type _NormalizedRouteParams = Record & QueryObject; +export declare type GenericRouteParamsArray = _BindingOrValue<_ParameterBindingDefinition>[]; +export declare type GenericRouteParamsObject = QueryObject & Record; +export declare type GenericRouteParams = GenericRouteParamsArray | GenericRouteParamsObject | ParameterValue; +export declare type QueryObject = { + _query?: Record; +}; +/** + * Holds any known route name or an arbitrary string. + */ +export declare type RouteName = keyof RouteLookup | (string & {}); +/** + * The parameters type to hydrate a route. + */ +export declare type RouteParams = RouteParamsArray | RouteParamsObject | ParameterValue; +/** + * Normalized route parameters + */ +export interface Config { + routes: { + [key: string]: RouteDefinition; + }; + url: string; + port: number | null; + location?: Location; + defaults: { + [key: string]: ParameterValue; + }; +} +export declare type RouteMethods = "GET" | "HEAD" | "POST" | "PATCH" | "PUT" | "OPTIONS" | "DELETE"; +export interface RouteConfig extends Config { + absolute?: boolean; +} +export interface RouteDefinition { + wheres?: any; + bindings?: Record; + uri: string; + domain?: string; + methods: RouteMethods[]; +} +export interface RouteMatchResult { + params: NormalizedRouteParams; + query: ParsedQs; +} +export {}; diff --git a/dist/types/vue.d.ts b/dist/types/vue.d.ts new file mode 100644 index 00000000..c3fbde47 --- /dev/null +++ b/dist/types/vue.d.ts @@ -0,0 +1,3 @@ +export declare const ZiggyVue: { + install: (v: any, options: any) => void; +}; diff --git a/dist/vue.es.js b/dist/vue.es.js index 8d38aa96..4640a971 100644 --- a/dist/vue.es.js +++ b/dist/vue.es.js @@ -1 +1 @@ -function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e1;){var e=t.pop(),r=e.obj[e.prop];if(i(r)){for(var n=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===n.RFC1738&&(40===c||41===c)?a+=s.charAt(f):c<128?a+=u[c]:c<2048?a+=u[192|c>>6]+u[128|63&c]:c<55296||c>=57344?a+=u[224|c>>12]+u[128|c>>6&63]+u[128|63&c]:(c=65536+((1023&c)<<10|1023&s.charCodeAt(f+=1)),a+=u[240|c>>18]+u[128|c>>12&63]+u[128|c>>6&63]+u[128|63&c])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(i(t)){for(var r=[],n=0;n0?w.join(",")||null:void 0}];else if(l(s))R=s;else{var x=Object.keys(w);R=f?x.sort(f):x}for(var N=0;N-1?t.split(","):t},E=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=r.depth>0&&/(\[[^[\]]*])/.exec(o),s=u?o.slice(0,u.index):o,a=[];if(s){if(!r.plainObjects&&g.call(Object.prototype,s)&&!r.allowPrototypes)return;a.push(s)}for(var f=0;r.depth>0&&null!==(u=i.exec(o))&&f=0;--i){var u,s=t[i];if("[]"===s&&r.parseArrays)u=[].concat(o);else{u=r.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,f=parseInt(a,10);r.parseArrays||""!==a?!isNaN(f)&&s!==a&&String(f)===a&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(u=[])[f]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,e,r,n)}},S=function(t,e){var r=function(t){if(!t)return w;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?w.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:w.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:w.arrayLimit,charset:void 0===t.charset?w.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:w.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:w.comma,decoder:"function"==typeof t.decoder?t.decoder:w.decoder,delimiter:"string"==typeof t.delimiter||a.isRegExp(t.delimiter)?t.delimiter:w.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:w.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:w.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:w.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:w.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:w.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,e){var r,n={},o=(e.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(e.delimiter,Infinity===e.parameterLimit?void 0:e.parameterLimit),i=-1,u=e.charset;if(e.charsetSentinel)for(r=0;r-1&&(f=j(f)?[f]:f),n[s]=g.call(n,s)?a.combine(n[s],f):f}return n}(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),u=0;u({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(t){if(!this.definition.methods.includes("GET"))return!1;const e=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(t,e,r,n)=>{var o;const i=`(?<${r}>${(null==(o=this.wheres[r])?void 0:o.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return n?`(${e}${i})?`:`${e}${i}`}).replace(/^\w+:\/\//,""),[r,n]=t.replace(/^\w+:\/\//,"").split("?"),o=new RegExp(`^${e}/?$`).exec(r);if(o){for(const t in o.groups)o.groups[t]="string"==typeof o.groups[t]?decodeURIComponent(o.groups[t]):o.groups[t];return{params:o.groups,query:S(n)}}return!1}compile(t){const e=this.parameterSegments;return e.length?this.template.replace(/{([^}?]+)(\??)}/g,(r,n,o)=>{var i,u,s;if(!o&&[null,void 0].includes(t[n]))throw new Error(`Ziggy error: '${n}' parameter is required for route '${this.name}'.`);if(e[e.length-1].name===n&&".*"===this.wheres[n])return encodeURIComponent(null!=(s=t[n])?s:"").replace(/%2F/g,"/");if(this.wheres[n]&&!new RegExp(`^${o?`(${this.wheres[n]})?`:this.wheres[n]}$`).test(null!=(i=t[n])?i:""))throw new Error(`Ziggy error: '${n}' parameter does not match required format '${this.wheres[n]}' for route '${this.name}'.`);return encodeURIComponent(null!=(u=t[n])?u:"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class C extends String{constructor(e,r,n=!0,o){if(super(),this.t=null!=o?o:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,this.t=t({},this.t,{absolute:n}),e){if(!this.t.routes[e])throw new Error(`Ziggy error: route '${e}' is not in the route list.`);this.i=new R(e,this.t.routes[e],this.t),this.u=this.l(r)}}toString(){const e=Object.keys(this.u).filter(t=>!this.i.parameterSegments.some(({name:e})=>e===t)).filter(t=>"_query"!==t).reduce((e,r)=>t({},e,{[r]:this.u[r]}),{});return this.i.compile(this.u)+function(t,e){var r,o=t,i=function(t){if(!t)return m;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||m.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=n.default;if(void 0!==t.format){if(!f.call(n.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=n.formatters[r],i=m.filter;return("function"==typeof t.filter||l(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===t.allowDots?m.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:m.charsetSentinel,delimiter:void 0===t.delimiter?m.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:m.encode,encoder:"function"==typeof t.encoder?t.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:m.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:m.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:m.strictNullHandling}}(e);"function"==typeof i.filter?o=(0,i.filter)("",o):l(i.filter)&&(r=i.filter);var u=[];if("object"!=typeof o||null===o)return"";var s=c[e&&e.arrayFormat in c?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices"];r||(r=Object.keys(o)),i.sort&&r.sort(i.sort);for(var a=0;a0?d+h:""}(t({},e,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,e)=>"boolean"==typeof t?Number(t):e(t)})}p(e){e?this.t.absolute&&e.startsWith("/")&&(e=this.h().host+e):e=this.m();let r={};const[n,o]=Object.entries(this.t.routes).find(([t,n])=>r=new R(t,n,this.t).matchesUrl(e))||[void 0,void 0];return t({name:n},r,{route:o})}m(){const{host:t,pathname:e,search:r}=this.h();return(this.t.absolute?t+e:e.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+r}current(e,r){const{name:n,params:o,query:i,route:u}=this.p();if(!e)return n;const s=new RegExp(`^${e.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(n);if([null,void 0].includes(r)||!s)return s;const a=new R(n,u,this.t);r=this.l(r,a);const f=t({},o,i);return!(!Object.values(r).every(t=>!t)||Object.values(f).some(t=>void 0!==t))||Object.entries(r).every(([t,e])=>f[t]==e)}h(){var t,e,r,n,o,i;const{host:u="",pathname:s="",search:a=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null==(e=this.t.location)?void 0:e.host)?t:u,pathname:null!=(r=null==(n=this.t.location)?void 0:n.pathname)?r:s,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:a}}get params(){const{params:e,query:r}=this.p();return t({},e,r)}has(t){return Object.keys(this.t.routes).includes(t)}l(e={},r=this.i){null!=e||(e={}),e=["string","number"].includes(typeof e)?[e]:e;const n=r.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);return Array.isArray(e)?e=e.reduce((e,r,o)=>t({},e,n[o]?{[n[o].name]:r}:"object"==typeof r?r:{[r]:""}),{}):1!==n.length||e[n[0].name]||!e.hasOwnProperty(Object.values(r.bindings)[0])&&!e.hasOwnProperty("id")||(e={[n[0].name]:e}),t({},this.v(r),this.g(e,r))}v(e){return e.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((e,{name:r},n)=>t({},e,{[r]:this.t.defaults[r]}),{})}g(e,{bindings:r,parameterSegments:n}){return Object.entries(e).reduce((e,[o,i])=>{if(!i||"object"!=typeof i||Array.isArray(i)||!n.some(({name:t})=>t===o))return t({},e,{[o]:i});if(!i.hasOwnProperty(r[o])){if(!i.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${o}' parameter is missing route model binding key '${r[o]}'.`);r[o]="id"}return t({},e,{[o]:i[r[o]]})},{})}valueOf(){return this.toString()}check(t){return this.has(t)}}const x={install:(t,e)=>{const r=(t,r,n,o=e)=>function(t,e,r,n){const o=new C(t,e,r,n);return t?o.toString():o}(t,r,n,o);t.mixin({methods:{route:r}}),parseInt(t.version)>2&&t.provide("route",r)}};export{x as ZiggyVue}; +import{parse as t,stringify as r}from"qs";function e(){return e=Object.assign?Object.assign.bind():function(t){for(var r=1;r({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(r){if(!this.definition.methods.includes("GET"))return!1;const e=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(t,r,e,i)=>{var s;const n=`(?<${e}>${(null==(s=this.wheres[e])?void 0:s.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return i?`(${r}${n})?`:`${r}${n}`}).replace(/^\w+:\/\//,""),[i,s]=r.replace(/^\w+:\/\//,"").split("?"),n=new RegExp(`^${e}/?$`).exec(i);if(n){for(const t in n.groups)n.groups[t]="string"==typeof n.groups[t]?decodeURIComponent(n.groups[t]):n.groups[t];return{params:n.groups,query:t(s)}}return!1}compile(t){const r=this.parameterSegments;return r.length?this.template.replace(/{([^}?]+)(\??)}/g,(e,i,s)=>{var n,o,h;if(!s&&[null,void 0].includes(t[i]))throw new Error(`Ziggy error: '${i}' parameter is required for route '${this.name}'.`);if(r[r.length-1].name===i&&".*"===this.wheres[i])return encodeURIComponent(null!=(h=t[i])?h:"").replace(/%2F/g,"/");if(this.wheres[i]&&!new RegExp(`^${s?`(${this.wheres[i]})?`:this.wheres[i]}$`).test(null!=(n=t[i])?n:""))throw new Error(`Ziggy error: '${i}' parameter does not match required format '${this.wheres[i]}' for route '${this.name}'.`);return encodeURIComponent(null!=(o=t[i])?o:"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class s extends String{constructor(t,r,s=!0,n){if(super(),this.t=void 0,this.i=void 0,this.o=void 0,this.t=null!=n?n:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,this.t=e({},this.t,{absolute:s}),t){if(!this.t.routes[t])throw new Error(`Ziggy error: route '${t}' is not in the route list.`);this.o=new i(t,this.t.routes[t],this.t),this.i=this.h(r,this.o)}}toString(){var t;const i=Object.keys(this.i).filter(t=>!this.o.parameterSegments.some(({name:r})=>r===t)).filter(t=>"_query"!==t).reduce((t,r)=>e({},t,{[r]:this.i[r]}),{}),s=null!=(t=this.i._query)?t:{};return this.o.compile(this.i)+r(e({},i,s),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,r)=>"boolean"==typeof t?Number(t).toString():r(t)})}u(t){t?this.t.absolute&&t.startsWith("/")&&(t=this.l().host+t):t=this.g();const r=Object.entries(this.t.routes);for(const[s,n]of r){const r=new i(s,n,this.t).matchesUrl(t);if(r)return e({name:s},r,{route:n})}return{}}g(){const{host:t,pathname:r,search:e}=this.l();return(this.t.absolute?t+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+e}current(t,r){null!=r||(r={});const s=this.u();if(!s)return;const{name:n,params:o,query:h,route:u}=s;if(!t)return n;const a=new RegExp(`^${t.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(n);if([null,void 0].includes(r)||!a)return a;const l=new i(n,u,this.t),c=this.h(r,l),d=e({},o,h);return!(!Object.values(c).every(t=>!t)||Object.values(d).some(t=>void 0!==t))||Object.entries(c).every(([t,r])=>d[t]==r)}l(){var t,r,e,i,s,n;const{host:o="",pathname:h="",search:u=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:o,pathname:null!=(e=null==(i=this.t.location)?void 0:i.pathname)?e:h,search:null!=(s=null==(n=this.t.location)?void 0:n.search)?s:u}}get params(){const{params:t,query:r}=this.u()||{};return e({},t,r)}has(t){return Object.keys(this.t.routes).includes(t)}h(t,r){null!=t||(t={});const i=r.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);let s={};if("number"==typeof t||"string"==typeof t){const[r]=i;s=r?{[r.name]:t}:{[t]:""}}else t instanceof Array?s=t.reduce((t,r,s)=>e({},t,i[s]?{[i[s].name]:r}:"object"==typeof r?r:{[r]:""}),{}):1!==i.length||t[i[0].name]||!t.hasOwnProperty(Object.values(r.bindings)[0])&&!t.hasOwnProperty("id")?t&&(s=t):s={[i[0].name]:t};return e({},this.m(r),this.p(s,r))}m(t){return t.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((t,{name:r},i)=>e({},t,{[r]:this.t.defaults[r]}),{})}p(t,{bindings:r,parameterSegments:i}){return Object.entries(t).reduce((t,[s,n])=>{if(!n||"object"!=typeof n||Array.isArray(n)||!i.some(({name:t})=>t===s))return e({},t,{[s]:n});if(!n.hasOwnProperty(r[s])){if(!n.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${s}' parameter is missing route model binding key '${r[s]}'.`);r[s]="id"}return e({},t,{[s]:n[r[s]]})},{})}valueOf(){return this.toString()}check(t){return this.has(t)}}const n={install:(t,r)=>{const e=(t,e,i,n=r)=>function(t,r,e=!0,i){const n=new s(t,r,e,i);return t?n.toString():n}(t,e,i,n);t.mixin({methods:{route:e}}),parseInt(t.version)>2&&t.provide("route",e)}};export{n as ZiggyVue}; diff --git a/dist/vue.js b/dist/vue.js index dd41894b..c1dd16a3 100644 --- a/dist/vue.js +++ b/dist/vue.js @@ -1 +1 @@ -!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t||self).ZiggyVue={})}(this,function(t){function r(t,r){for(var e=0;e1;){var r=t.pop(),e=r.obj[r.prop];if(y(e)){for(var n=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===v.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=d[a]:a<2048?u+=d[192|a>>6]+d[128|63&a]:a<55296||a>=57344?u+=d[224|a>>12]+d[128|a>>6&63]+d[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=d[240|a>>18]+d[128|a>>12&63]+d[128|a>>6&63]+d[128|63&a])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(y(t)){for(var e=[],n=0;n0?b.join(",")||null:void 0}];else if(j(f))S=f;else{var k=Object.keys(b);S=a?k.sort(a):k}for(var C=0;C-1?t.split(","):t},I=function(t,r,e,n){if(t){var o=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=e.depth>0&&/(\[[^[\]]*])/.exec(o),f=u?o.slice(0,u.index):o,a=[];if(f){if(!e.plainObjects&&k.call(Object.prototype,f)&&!e.allowPrototypes)return;a.push(f)}for(var c=0;e.depth>0&&null!==(u=i.exec(o))&&c=0;--i){var u,f=t[i];if("[]"===f&&e.parseArrays)u=[].concat(o);else{u=e.plainObjects?Object.create(null):{};var a="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,c=parseInt(a,10);e.parseArrays||""!==a?!isNaN(c)&&f!==a&&String(c)===a&&c>=0&&e.parseArrays&&c<=e.arrayLimit?(u=[])[c]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,r,e,n)}},P=function(t,r){var e=function(t){if(!t)return N;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?N.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:N.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:N.arrayLimit,charset:void 0===t.charset?N.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:N.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:N.comma,decoder:"function"==typeof t.decoder?t.decoder:N.decoder,delimiter:"string"==typeof t.delimiter||h.isRegExp(t.delimiter)?t.delimiter:N.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:N.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:N.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:N.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:N.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:N.strictNullHandling}}(r);if(""===t||null==t)return e.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,r){var e,n={},o=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),i=-1,u=r.charset;if(r.charsetSentinel)for(e=0;e-1&&(a=C(a)?[a]:a),n[f]=k.call(n,f)?h.combine(n[f],a):a}return n}(t,e):t,o=e.plainObjects?Object.create(null):{},i=Object.keys(n),u=0;u"+((null==(i=r.wheres[n])?void 0:i.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return o?"("+e+u+")?":""+e+u}).replace(/^\w+:\/\//,""),n=t.replace(/^\w+:\/\//,"").split("?"),o=n[0],i=n[1],u=new RegExp("^"+e+"/?$").exec(o);if(u){for(var f in u.groups)u.groups[f]="string"==typeof u.groups[f]?decodeURIComponent(u.groups[f]):u.groups[f];return{params:u.groups,query:P(i)}}return!1},r.compile=function(t){var r=this,e=this.parameterSegments;return e.length?this.template.replace(/{([^}?]+)(\??)}/g,function(n,o,i){var u,f,a;if(!i&&[null,void 0].includes(t[o]))throw new Error("Ziggy error: '"+o+"' parameter is required for route '"+r.name+"'.");if(e[e.length-1].name===o&&".*"===r.wheres[o])return encodeURIComponent(null!=(a=t[o])?a:"").replace(/%2F/g,"/");if(r.wheres[o]&&!new RegExp("^"+(i?"("+r.wheres[o]+")?":r.wheres[o])+"$").test(null!=(u=t[o])?u:""))throw new Error("Ziggy error: '"+o+"' parameter does not match required format '"+r.wheres[o]+"' for route '"+r.name+"'.");return encodeURIComponent(null!=(f=t[o])?f:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},e(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,r;return null!=(t=null==(r=this.template.match(/{[^}?]+\??}/g))?void 0:r.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),A=/*#__PURE__*/function(t){var r,o;function u(r,e,o,i){var u;if(void 0===o&&(o=!0),(u=t.call(this)||this).t=null!=i?i:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,u.t=n({},u.t,{absolute:o}),r){if(!u.t.routes[r])throw new Error("Ziggy error: route '"+r+"' is not in the route list.");u.i=new $(r,u.t.routes[r],u.t),u.u=u.l(e)}return u}o=t,(r=u).prototype=Object.create(o.prototype),r.prototype.constructor=r,i(r,o);var f=u.prototype;return f.toString=function(){var t=this,r=Object.keys(this.u).filter(function(r){return!t.i.parameterSegments.some(function(t){return t.name===r})}).filter(function(t){return"_query"!==t}).reduce(function(r,e){var o;return n({},r,((o={})[e]=t.u[e],o))},{});return this.i.compile(this.u)+function(t,r){var e,n=t,o=function(t){if(!t)return x;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||x.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=v.default;if(void 0!==t.format){if(!m.call(v.formatters,t.format))throw new TypeError("Unknown format option provided.");e=t.format}var n=v.formatters[e],o=x.filter;return("function"==typeof t.filter||j(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:x.addQueryPrefix,allowDots:void 0===t.allowDots?x.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:x.charsetSentinel,delimiter:void 0===t.delimiter?x.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:x.encode,encoder:"function"==typeof t.encoder?t.encoder:x.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:x.encodeValuesOnly,filter:o,format:e,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:x.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:x.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:x.strictNullHandling}}(r);"function"==typeof o.filter?n=(0,o.filter)("",n):j(o.filter)&&(e=o.filter);var i=[];if("object"!=typeof n||null===n)return"";var u=g[r&&r.arrayFormat in g?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];e||(e=Object.keys(n)),o.sort&&e.sort(o.sort);for(var f=0;f0?l+c:""}(n({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,r){return"boolean"==typeof t?Number(t):r(t)}})},f.v=function(t){var r=this;t?this.t.absolute&&t.startsWith("/")&&(t=this.p().host+t):t=this.h();var e={},o=Object.entries(this.t.routes).find(function(n){return e=new $(n[0],n[1],r.t).matchesUrl(t)})||[void 0,void 0];return n({name:o[0]},e,{route:o[1]})},f.h=function(){var t=this.p(),r=t.pathname,e=t.search;return(this.t.absolute?t.host+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+e},f.current=function(t,r){var e=this.v(),o=e.name,i=e.params,u=e.query,f=e.route;if(!t)return o;var a=new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o);if([null,void 0].includes(r)||!a)return a;var c=new $(o,f,this.t);r=this.l(r,c);var l=n({},i,u);return!(!Object.values(r).every(function(t){return!t})||Object.values(l).some(function(t){return void 0!==t}))||Object.entries(r).every(function(t){return l[t[0]]==t[1]})},f.p=function(){var t,r,e,n,o,i,u="undefined"!=typeof window?window.location:{},f=u.host,a=u.pathname,c=u.search;return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:void 0===f?"":f,pathname:null!=(e=null==(n=this.t.location)?void 0:n.pathname)?e:void 0===a?"":a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:void 0===c?"":c}},f.has=function(t){return Object.keys(this.t.routes).includes(t)},f.l=function(t,r){var e=this;void 0===t&&(t={}),void 0===r&&(r=this.i),null!=t||(t={}),t=["string","number"].includes(typeof t)?[t]:t;var o=r.parameterSegments.filter(function(t){return!e.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,r,e){var i,u;return n({},t,o[e]?((i={})[o[e].name]=r,i):"object"==typeof r?r:((u={})[r]="",u))},{});else if(1===o.length&&!t[o[0].name]&&(t.hasOwnProperty(Object.values(r.bindings)[0])||t.hasOwnProperty("id"))){var i;(i={})[o[0].name]=t,t=i}return n({},this.m(r),this.g(t,r))},f.m=function(t){var r=this;return t.parameterSegments.filter(function(t){return r.t.defaults[t.name]}).reduce(function(t,e,o){var i,u=e.name;return n({},t,((i={})[u]=r.t.defaults[u],i))},{})},f.g=function(t,r){var e=r.bindings,o=r.parameterSegments;return Object.entries(t).reduce(function(t,r){var i,u,f=r[0],a=r[1];if(!a||"object"!=typeof a||Array.isArray(a)||!o.some(function(t){return t.name===f}))return n({},t,((u={})[f]=a,u));if(!a.hasOwnProperty(e[f])){if(!a.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+f+"' parameter is missing route model binding key '"+e[f]+"'.");e[f]="id"}return n({},t,((i={})[f]=a[e[f]],i))},{})},f.valueOf=function(){return this.toString()},f.check=function(t){return this.has(t)},e(u,[{key:"params",get:function(){var t=this.v();return n({},t.params,t.query)}}]),u}(/*#__PURE__*/a(String));t.ZiggyVue={install:function(t,r){var e=function(t,e,n,o){return void 0===o&&(o=r),function(t,r,e,n){var o=new A(t,r,e,n);return t?o.toString():o}(t,e,n,o)};t.mixin({methods:{route:e}}),parseInt(t.version)>2&&t.provide("route",e)}}}); +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("qs")):"function"==typeof define&&define.amd?define(["exports","qs"],n):n((t||self).ZiggyVue={},t.qs)}(this,function(t,n){function r(t,n){for(var r=0;r"+((null==(u=r.wheres[e])?void 0:u.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return i?"("+n+o+")?":""+n+o}).replace(/^\w+:\/\//,""),i=t.replace(/^\w+:\/\//,"").split("?"),u=i[0],o=i[1],f=new RegExp("^"+e+"/?$").exec(u);if(f){for(var c in f.groups)f.groups[c]="string"==typeof f.groups[c]?decodeURIComponent(f.groups[c]):f.groups[c];return{params:f.groups,query:n.parse(o)}}return!1},r.compile=function(t){var n=this,r=this.parameterSegments;return r.length?this.template.replace(/{([^}?]+)(\??)}/g,function(e,i,u){var o,f,c;if(!u&&[null,void 0].includes(t[i]))throw new Error("Ziggy error: '"+i+"' parameter is required for route '"+n.name+"'.");if(r[r.length-1].name===i&&".*"===n.wheres[i])return encodeURIComponent(null!=(c=t[i])?c:"").replace(/%2F/g,"/");if(n.wheres[i]&&!new RegExp("^"+(u?"("+n.wheres[i]+")?":n.wheres[i])+"$").test(null!=(o=t[i])?o:""))throw new Error("Ziggy error: '"+i+"' parameter does not match required format '"+n.wheres[i]+"' for route '"+n.name+"'.");return encodeURIComponent(null!=(f=t[i])?f:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},e(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,n;return null!=(t=null==(n=this.template.match(/{[^}?]+\??}/g))?void 0:n.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),l=/*#__PURE__*/function(t){var r,u;function f(n,r,e,u){var o;if(void 0===e&&(e=!0),(o=t.call(this)||this).t=void 0,o.i=void 0,o.u=void 0,o.t=null!=u?u:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,o.t=i({},o.t,{absolute:e}),n){if(!o.t.routes[n])throw new Error("Ziggy error: route '"+n+"' is not in the route list.");o.u=new a(n,o.t.routes[n],o.t),o.i=o.o(r,o.u)}return o}u=t,(r=f).prototype=Object.create(u.prototype),r.prototype.constructor=r,o(r,u);var c=f.prototype;return c.toString=function(){var t,r=this,e=Object.keys(this.i).filter(function(t){return!r.u.parameterSegments.some(function(n){return n.name===t})}).filter(function(t){return"_query"!==t}).reduce(function(t,n){var e;return i({},t,((e={})[n]=r.i[n],e))},{}),u=null!=(t=this.i._query)?t:{};return this.u.compile(this.i)+n.stringify(i({},e,u),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,n){return"boolean"==typeof t?Number(t).toString():n(t)}})},c.l=function(t){t?this.t.absolute&&t.startsWith("/")&&(t=this.h().host+t):t=this.v();for(var n=0,r=Object.entries(this.t.routes);n2&&t.provide("route",r)}}}); diff --git a/dist/vue.m.js b/dist/vue.m.js index 9feb24aa..0073229f 100644 --- a/dist/vue.m.js +++ b/dist/vue.m.js @@ -1 +1 @@ -function t(t,r){for(var n=0;n1;){var r=t.pop(),n=r.obj[r.prop];if(v(n)){for(var e=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===l.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=p[a]:a<2048?u+=p[192|a>>6]+p[128|63&a]:a<55296||a>=57344?u+=p[224|a>>12]+p[128|a>>6&63]+p[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=p[240|a>>18]+p[128|a>>12&63]+p[128|a>>6&63]+p[128|63&a])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(v(t)){for(var n=[],e=0;e0?h.join(",")||null:void 0}];else if(m(f))k=f;else{var C=Object.keys(h);k=a?C.sort(a):C}for(var T=0;T-1?t.split(","):t},F=function(t,r,n,e){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),f=u?o.slice(0,u.index):o,a=[];if(f){if(!n.plainObjects&&k.call(Object.prototype,f)&&!n.allowPrototypes)return;a.push(f)}for(var c=0;n.depth>0&&null!==(u=i.exec(o))&&c=0;--i){var u,f=t[i];if("[]"===f&&n.parseArrays)u=[].concat(o);else{u=n.plainObjects?Object.create(null):{};var a="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,c=parseInt(a,10);n.parseArrays||""!==a?!isNaN(c)&&f!==a&&String(c)===a&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(u=[])[c]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,r,n,e)}},D=function(t,r){var n=function(t){if(!t)return C;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?C.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:C.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:C.arrayLimit,charset:void 0===t.charset?C.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:C.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:C.comma,decoder:"function"==typeof t.decoder?t.decoder:C.decoder,delimiter:"string"==typeof t.delimiter||d.isRegExp(t.delimiter)?t.delimiter:C.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:C.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:C.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:C.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:C.strictNullHandling}}(r);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var e="string"==typeof t?function(t,r){var n,e={},o=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),i=-1,u=r.charset;if(r.charsetSentinel)for(n=0;n-1&&(a=x(a)?[a]:a),e[f]=k.call(e,f)?d.combine(e[f],a):a}return e}(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(e),u=0;u"+((null==(i=r.wheres[e])?void 0:i.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return o?"("+n+u+")?":""+n+u}).replace(/^\w+:\/\//,""),e=t.replace(/^\w+:\/\//,"").split("?"),o=e[0],i=e[1],u=new RegExp("^"+n+"/?$").exec(o);if(u){for(var f in u.groups)u.groups[f]="string"==typeof u.groups[f]?decodeURIComponent(u.groups[f]):u.groups[f];return{params:u.groups,query:D(i)}}return!1},n.compile=function(t){var r=this,n=this.parameterSegments;return n.length?this.template.replace(/{([^}?]+)(\??)}/g,function(e,o,i){var u,f,a;if(!i&&[null,void 0].includes(t[o]))throw new Error("Ziggy error: '"+o+"' parameter is required for route '"+r.name+"'.");if(n[n.length-1].name===o&&".*"===r.wheres[o])return encodeURIComponent(null!=(a=t[o])?a:"").replace(/%2F/g,"/");if(r.wheres[o]&&!new RegExp("^"+(i?"("+r.wheres[o]+")?":r.wheres[o])+"$").test(null!=(u=t[o])?u:""))throw new Error("Ziggy error: '"+o+"' parameter does not match required format '"+r.wheres[o]+"' for route '"+r.name+"'.");return encodeURIComponent(null!=(f=t[o])?f:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},r(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,r;return null!=(t=null==(r=this.template.match(/{[^}?]+\??}/g))?void 0:r.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),P=/*#__PURE__*/function(t){var e,i;function u(r,e,o,i){var u;if(void 0===o&&(o=!0),(u=t.call(this)||this).t=null!=i?i:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,u.t=n({},u.t,{absolute:o}),r){if(!u.t.routes[r])throw new Error("Ziggy error: route '"+r+"' is not in the route list.");u.i=new I(r,u.t.routes[r],u.t),u.u=u.l(e)}return u}i=t,(e=u).prototype=Object.create(i.prototype),e.prototype.constructor=e,o(e,i);var f=u.prototype;return f.toString=function(){var t=this,r=Object.keys(this.u).filter(function(r){return!t.i.parameterSegments.some(function(t){return t.name===r})}).filter(function(t){return"_query"!==t}).reduce(function(r,e){var o;return n({},r,((o={})[e]=t.u[e],o))},{});return this.i.compile(this.u)+function(t,r){var n,e=t,o=function(t){if(!t)return R;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||R.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=l.default;if(void 0!==t.format){if(!b.call(l.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var e=l.formatters[n],o=R.filter;return("function"==typeof t.filter||m(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:R.addQueryPrefix,allowDots:void 0===t.allowDots?R.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:R.charsetSentinel,delimiter:void 0===t.delimiter?R.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:R.encode,encoder:"function"==typeof t.encoder?t.encoder:R.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:R.encodeValuesOnly,filter:o,format:n,formatter:e,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:R.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:R.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:R.strictNullHandling}}(r);"function"==typeof o.filter?e=(0,o.filter)("",e):m(o.filter)&&(n=o.filter);var i=[];if("object"!=typeof e||null===e)return"";var u=h[r&&r.arrayFormat in h?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];n||(n=Object.keys(e)),o.sort&&n.sort(o.sort);for(var f=0;f0?s+c:""}(n({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,r){return"boolean"==typeof t?Number(t):r(t)}})},f.v=function(t){var r=this;t?this.t.absolute&&t.startsWith("/")&&(t=this.p().host+t):t=this.h();var e={},o=Object.entries(this.t.routes).find(function(n){return e=new I(n[0],n[1],r.t).matchesUrl(t)})||[void 0,void 0];return n({name:o[0]},e,{route:o[1]})},f.h=function(){var t=this.p(),r=t.pathname,n=t.search;return(this.t.absolute?t.host+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+n},f.current=function(t,r){var e=this.v(),o=e.name,i=e.params,u=e.query,f=e.route;if(!t)return o;var a=new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o);if([null,void 0].includes(r)||!a)return a;var c=new I(o,f,this.t);r=this.l(r,c);var l=n({},i,u);return!(!Object.values(r).every(function(t){return!t})||Object.values(l).some(function(t){return void 0!==t}))||Object.entries(r).every(function(t){return l[t[0]]==t[1]})},f.p=function(){var t,r,n,e,o,i,u="undefined"!=typeof window?window.location:{},f=u.host,a=u.pathname,c=u.search;return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:void 0===f?"":f,pathname:null!=(n=null==(e=this.t.location)?void 0:e.pathname)?n:void 0===a?"":a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:void 0===c?"":c}},f.has=function(t){return Object.keys(this.t.routes).includes(t)},f.l=function(t,r){var e=this;void 0===t&&(t={}),void 0===r&&(r=this.i),null!=t||(t={}),t=["string","number"].includes(typeof t)?[t]:t;var o=r.parameterSegments.filter(function(t){return!e.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,r,e){var i,u;return n({},t,o[e]?((i={})[o[e].name]=r,i):"object"==typeof r?r:((u={})[r]="",u))},{});else if(1===o.length&&!t[o[0].name]&&(t.hasOwnProperty(Object.values(r.bindings)[0])||t.hasOwnProperty("id"))){var i;(i={})[o[0].name]=t,t=i}return n({},this.m(r),this.g(t,r))},f.m=function(t){var r=this;return t.parameterSegments.filter(function(t){return r.t.defaults[t.name]}).reduce(function(t,e,o){var i,u=e.name;return n({},t,((i={})[u]=r.t.defaults[u],i))},{})},f.g=function(t,r){var e=r.bindings,o=r.parameterSegments;return Object.entries(t).reduce(function(t,r){var i,u,f=r[0],a=r[1];if(!a||"object"!=typeof a||Array.isArray(a)||!o.some(function(t){return t.name===f}))return n({},t,((u={})[f]=a,u));if(!a.hasOwnProperty(e[f])){if(!a.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+f+"' parameter is missing route model binding key '"+e[f]+"'.");e[f]="id"}return n({},t,((i={})[f]=a[e[f]],i))},{})},f.valueOf=function(){return this.toString()},f.check=function(t){return this.has(t)},r(u,[{key:"params",get:function(){var t=this.v();return n({},t.params,t.query)}}]),u}(/*#__PURE__*/f(String)),$={install:function(t,r){var n=function(t,n,e,o){return void 0===o&&(o=r),function(t,r,n,e){var o=new P(t,r,n,e);return t?o.toString():o}(t,n,e,o)};t.mixin({methods:{route:n}}),parseInt(t.version)>2&&t.provide("route",n)}};export{$ as ZiggyVue}; +import{parse as t,stringify as n}from"qs";function r(t,n){for(var r=0;r"+((null==(u=r.wheres[e])?void 0:u.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return i?"("+n+o+")?":""+n+o}).replace(/^\w+:\/\//,""),i=n.replace(/^\w+:\/\//,"").split("?"),u=i[0],o=i[1],f=new RegExp("^"+e+"/?$").exec(u);if(f){for(var c in f.groups)f.groups[c]="string"==typeof f.groups[c]?decodeURIComponent(f.groups[c]):f.groups[c];return{params:f.groups,query:t(o)}}return!1},r.compile=function(t){var n=this,r=this.parameterSegments;return r.length?this.template.replace(/{([^}?]+)(\??)}/g,function(e,i,u){var o,f,c;if(!u&&[null,void 0].includes(t[i]))throw new Error("Ziggy error: '"+i+"' parameter is required for route '"+n.name+"'.");if(r[r.length-1].name===i&&".*"===n.wheres[i])return encodeURIComponent(null!=(c=t[i])?c:"").replace(/%2F/g,"/");if(n.wheres[i]&&!new RegExp("^"+(u?"("+n.wheres[i]+")?":n.wheres[i])+"$").test(null!=(o=t[i])?o:""))throw new Error("Ziggy error: '"+i+"' parameter does not match required format '"+n.wheres[i]+"' for route '"+n.name+"'.");return encodeURIComponent(null!=(f=t[i])?f:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},e(n,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,n;return null!=(t=null==(n=this.template.match(/{[^}?]+\??}/g))?void 0:n.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),n}(),l=/*#__PURE__*/function(t){var r,u;function f(n,r,e,u){var o;if(void 0===e&&(e=!0),(o=t.call(this)||this).t=void 0,o.i=void 0,o.u=void 0,o.t=null!=u?u:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,o.t=i({},o.t,{absolute:e}),n){if(!o.t.routes[n])throw new Error("Ziggy error: route '"+n+"' is not in the route list.");o.u=new a(n,o.t.routes[n],o.t),o.i=o.o(r,o.u)}return o}u=t,(r=f).prototype=Object.create(u.prototype),r.prototype.constructor=r,o(r,u);var c=f.prototype;return c.toString=function(){var t,r=this,e=Object.keys(this.i).filter(function(t){return!r.u.parameterSegments.some(function(n){return n.name===t})}).filter(function(t){return"_query"!==t}).reduce(function(t,n){var e;return i({},t,((e={})[n]=r.i[n],e))},{}),u=null!=(t=this.i._query)?t:{};return this.u.compile(this.i)+n(i({},e,u),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,n){return"boolean"==typeof t?Number(t).toString():n(t)}})},c.l=function(t){t?this.t.absolute&&t.startsWith("/")&&(t=this.h().host+t):t=this.v();for(var n=0,r=Object.entries(this.t.routes);n2&&t.provide("route",r)}};export{h as ZiggyVue}; diff --git a/package-lock.json b/package-lock.json index 93e8eb84..a0911741 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,12 @@ "qs": "~6.9.7" }, "devDependencies": { + "@swc/core": "^1.3.71", + "@swc/jest": "^0.2.27", + "@types/jest": "^29.5.3", + "@types/qs": "^6.9.7", "babel-preset-power-assert": "^3.0.0", - "jest": "^29.0.3", + "jest": "^29.6.2", "jest-environment-jsdom": "^29.0.3", "microbundle": "^0.15.1", "power-assert": "^1.6.1" @@ -309,9 +313,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1065,12 +1069,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1920,16 +1924,16 @@ } }, "node_modules/@jest/console": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.3.tgz", - "integrity": "sha512-cGg0r+klVHSYnfE977S9wmpuQ9L+iYuYgL+5bPXiUlUynLLYunRxswEmhBzvrSKGof5AKiHuTTmUKAqRcDY9dg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.6.2.tgz", + "integrity": "sha512-0N0yZof5hi44HAR2pPS+ikJ3nzKNoZdVu8FffRf3wy47I7Dm7etk/3KetMdRUqzVd16V4O2m2ISpNTbnIuqy1w==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", + "jest-message-util": "^29.6.2", + "jest-util": "^29.6.2", "slash": "^3.0.0" }, "engines": { @@ -1937,37 +1941,37 @@ } }, "node_modules/@jest/core": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.3.tgz", - "integrity": "sha512-1d0hLbOrM1qQE3eP3DtakeMbKTcXiXP3afWxqz103xPyddS2NhnNghS7MaXx1dcDt4/6p4nlhmeILo2ofgi8cQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.6.2.tgz", + "integrity": "sha512-Oj+5B+sDMiMWLhPFF+4/DvHOf+U10rgvCLGPHP8Xlsy/7QxS51aU/eBngudHlJXnaWD5EohAgJ4js+T6pa+zOg==", "dev": true, "dependencies": { - "@jest/console": "^29.0.3", - "@jest/reporters": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.6.2", + "@jest/reporters": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-resolve-dependencies": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "jest-watcher": "^29.0.3", + "jest-changed-files": "^29.5.0", + "jest-config": "^29.6.2", + "jest-haste-map": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.2", + "jest-resolve-dependencies": "^29.6.2", + "jest-runner": "^29.6.2", + "jest-runtime": "^29.6.2", + "jest-snapshot": "^29.6.2", + "jest-util": "^29.6.2", + "jest-validate": "^29.6.2", + "jest-watcher": "^29.6.2", "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", + "pretty-format": "^29.6.2", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -1983,90 +1987,127 @@ } } }, + "node_modules/@jest/create-cache-key-function": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz", + "integrity": "sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==", + "dev": true, + "dependencies": { + "@jest/types": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/create-cache-key-function/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/create-cache-key-function/node_modules/@types/yargs": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/environment": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz", - "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.2.tgz", + "integrity": "sha512-AEcW43C7huGd/vogTddNNTDRpO6vQ2zaQNrttvWV18ArBx9Z56h7BIsXkNFJVOO4/kblWEQz30ckw0+L3izc+Q==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/fake-timers": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", - "jest-mock": "^29.0.3" + "jest-mock": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-6W7K+fsI23FQ01H/BWccPyDZFrnU9QlzDcKOjrNVU5L8yUORFAJJIpmyxWPW70+X624KUNqzZwPThPMX28aXEQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.6.2.tgz", + "integrity": "sha512-m6DrEJxVKjkELTVAztTLyS/7C92Y2b0VYqmDROYKLLALHn8T/04yPs70NADUYPrV3ruI+H3J0iUIuhkjp7vkfg==", "dev": true, "dependencies": { - "expect": "^29.0.3", - "jest-snapshot": "^29.0.3" + "expect": "^29.6.2", + "jest-snapshot": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.3.tgz", - "integrity": "sha512-i1xUkau7K/63MpdwiRqaxgZOjxYs4f0WMTGJnYwUKubsNRZSeQbLorS7+I4uXVF9KQ5r61BUPAUMZ7Lf66l64Q==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.6.2.tgz", + "integrity": "sha512-6zIhM8go3RV2IG4aIZaZbxwpOzz3ZiM23oxAlkquOIole+G6TrbeXnykxWYlqF7kz2HlBjdKtca20x9atkEQYg==", "dev": true, "dependencies": { - "jest-get-type": "^29.0.0" + "jest-get-type": "^29.4.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz", - "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.6.2.tgz", + "integrity": "sha512-euZDmIlWjm1Z0lJ1D0f7a0/y5Kh/koLFMUBE5SUYWrmy8oNhJpbTBDAP6CxKnadcMLDoDf4waRYCe35cH6G6PA==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.1", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" + "jest-message-util": "^29.6.2", + "jest-mock": "^29.6.2", + "jest-util": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.3.tgz", - "integrity": "sha512-YqGHT65rFY2siPIHHFjuCGUsbzRjdqkwbat+Of6DmYRg5shIXXrLdZoVE/+TJ9O1dsKsFmYhU58JvIbZRU1Z9w==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.6.2.tgz", + "integrity": "sha512-cjuJmNDjs6aMijCmSa1g2TNG4Lby/AeU7/02VtpW+SLcZXzOLK2GpN2nLqcFjmhy3B3AoPeQVx7BnyOf681bAw==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/types": "^29.0.3", - "jest-mock": "^29.0.3" + "@jest/environment": "^29.6.2", + "@jest/expect": "^29.6.2", + "@jest/types": "^29.6.1", + "jest-mock": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.3.tgz", - "integrity": "sha512-3+QU3d4aiyOWfmk1obDerie4XNCaD5Xo1IlKNde2yGEi02WQD+ZQD0i5Hgqm1e73sMV7kw6pMlCnprtEwEVwxw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.6.2.tgz", + "integrity": "sha512-sWtijrvIav8LgfJZlrGCdN0nP2EWbakglJY49J1Y5QihcQLfy7ovyxxjJBRXMNltgt4uPtEcFmIMbVshEDfFWw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -2078,13 +2119,12 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-message-util": "^29.6.2", + "jest-util": "^29.6.2", + "jest-worker": "^29.6.2", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", "v8-to-istanbul": "^9.0.1" }, "engines": { @@ -2100,24 +2140,24 @@ } }, "node_modules/@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", + "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", "dev": true, "dependencies": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", + "version": "29.6.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.0.tgz", + "integrity": "sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" }, @@ -2126,13 +2166,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.3.tgz", - "integrity": "sha512-vViVnQjCgTmbhDKEonKJPtcFe9G/CJO4/Np4XwYJah+lF2oI7KKeRp8t1dFvv44wN2NdbDb/qC6pi++Vpp0Dlg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.6.2.tgz", + "integrity": "sha512-3VKFXzcV42EYhMCsJQURptSqnyjqCGbtLuX5Xxb6Pm6gUf1wIRIl+mandIRGJyWKgNKYF9cnstti6Ls5ekduqw==", "dev": true, "dependencies": { - "@jest/console": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.6.2", + "@jest/types": "^29.6.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -2141,14 +2181,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.3.tgz", - "integrity": "sha512-Hf4+xYSWZdxTNnhDykr8JBs0yBN/nxOXyUQWfotBUqqy0LF9vzcFB0jm/EDNZCx587znLWTIgxcokW7WeZMobQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.6.2.tgz", + "integrity": "sha512-GVYi6PfPwVejO7slw6IDO0qKVum5jtrJ3KoLGbgBWyr2qr4GaxFV6su+ZAjdTX75Sr1DkMFRk09r2ZVa+wtCGw==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.3", + "@jest/test-result": "^29.6.2", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", + "jest-haste-map": "^29.6.2", "slash": "^3.0.0" }, "engines": { @@ -2156,38 +2196,44 @@ } }, "node_modules/@jest/transform": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.3.tgz", - "integrity": "sha512-C5ihFTRYaGDbi/xbRQRdbo5ddGtI4VSpmL6AIcZxdhwLbXMa7PcXxxqyI91vGOFHnn5aVM3WYnYKCHEqmLVGzg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.6.2.tgz", + "integrity": "sha512-ZqCqEISr58Ce3U+buNFJYUktLJZOggfyvR+bZMaiV1e8B1SIvJbwZMrYz3gx/KAPn9EXmOmN+uB08yLCjWkQQg==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.1", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", + "jest-haste-map": "^29.6.2", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.6.2", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/transform/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/@jest/types": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz", - "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==", + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.1.tgz", + "integrity": "sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.0", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -2247,13 +2293,13 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, "node_modules/@rollup/plugin-alias": { @@ -2371,27 +2417,27 @@ "dev": true }, "node_modules/@sinclair/typebox": { - "version": "0.24.42", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.42.tgz", - "integrity": "sha512-d+2AtrHGyWek2u2ITF0lHRIv6Tt7X0dEHW+0rP+5aDCEjC3fiN2RBjrLD0yU0at52BcZbRGxLbAtXiR0hFCjYw==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@surma/rollup-plugin-off-main-thread": { @@ -2406,6 +2452,216 @@ "string.prototype.matchall": "^4.0.6" } }, + "node_modules/@swc/core": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.71.tgz", + "integrity": "sha512-T8dqj+SV/S8laW/FGmKHhCGw1o4GRUvJ2jHfbYgEwiJpeutT9uavHvG02t39HJvObBJ52EZs/krGtni4U5928Q==", + "dev": true, + "hasInstallScript": true, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" + }, + "optionalDependencies": { + "@swc/core-darwin-arm64": "1.3.71", + "@swc/core-darwin-x64": "1.3.71", + "@swc/core-linux-arm-gnueabihf": "1.3.71", + "@swc/core-linux-arm64-gnu": "1.3.71", + "@swc/core-linux-arm64-musl": "1.3.71", + "@swc/core-linux-x64-gnu": "1.3.71", + "@swc/core-linux-x64-musl": "1.3.71", + "@swc/core-win32-arm64-msvc": "1.3.71", + "@swc/core-win32-ia32-msvc": "1.3.71", + "@swc/core-win32-x64-msvc": "1.3.71" + }, + "peerDependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependenciesMeta": { + "@swc/helpers": { + "optional": true + } + } + }, + "node_modules/@swc/core-darwin-arm64": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.71.tgz", + "integrity": "sha512-xOm0hDbcO2ShwQu1CjLtq3fwrG9AvhuE0s8vtBc8AsamYExHmR8bo6GQHJUtfPG1FVPk5a8xoQSd1fs09FQjLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-darwin-x64": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.71.tgz", + "integrity": "sha512-9sbDXBWgM22w/3Ll5kPhXMPkOiHRoqwMOyxLJBfGtIMnFlh5O+NRN3umRerK3pe4Q6/7hj2M5V+crEHYrXmuxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.71.tgz", + "integrity": "sha512-boKdMZsfKvhBs0FDeqH7KQj0lfYe0wCtrL1lv50oYMEeLajY9o4U5xSmc61Sg4HRXjlbR6dlM2cFfL84t7NpAA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.71.tgz", + "integrity": "sha512-yDatyHYMiOVwhyIA/LBwknPs2CUtLYWEMzPZjgLc+56PbgPs3oiEbNWeVUND5onPrfDQgK7NK1y8JeiXZqTgGQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.71.tgz", + "integrity": "sha512-xAdCA0L/hoa0ULL5SR4sMZCxkWk7C90DOU7wJalNVG9qNWYICfq3G7AR0E9Ohphzqyahfb5QJED/nA7N0+XwbQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.71.tgz", + "integrity": "sha512-j94qLXP/yqhu2afnABAq/xrJIU8TEqcNkp1TlsAeO3R2nVLYL1w4XX8GW71SPnXmd2bwF102c3Cfv/2ilf2y2A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.71.tgz", + "integrity": "sha512-YiyU848ql6dLlmt0BHccGAaZ36Cf61VzCAMDKID/gd72snvzWcMCHrwSRW0gEFNXHsjBJrmNl+SLYZHfqoGwUA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.71.tgz", + "integrity": "sha512-1UsJ+6hnIRe/PVdgDPexvgGaN4KpBncT/bAOqlWc9XC7KeBXAWcGA08LrPUz2Ei00DJXzR622IGZVEYOHNkUOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.71.tgz", + "integrity": "sha512-KnuI89+zojR9lDFELdQYZpxzPZ6pBfLwJfWTSGatnpL1ZHhIsV3tK1jwqIdJK1zkRxpBwc6p6FzSZdZwCSpnJw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.71.tgz", + "integrity": "sha512-Pcw7fFirpaBOZsU8fhO48ZCb7NxIjuLnLRPrHqWQ4Mapx1+w9ZNdGya2DKP9n8EAiUrJO20WDsrBNMT2MQSWkA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/jest": { + "version": "0.2.27", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.27.tgz", + "integrity": "sha512-Xt8EJ6Wy0NYVL8KDPcDMsuUSzyV2UAByamyy28x2iDZCJw2eVz3acedCGBYxxlPR/DNr6QbA35OSymuXhC9QVA==", + "dev": true, + "dependencies": { + "@jest/create-cache-key-function": "^27.4.2", + "jsonc-parser": "^3.2.0" + }, + "engines": { + "npm": ">= 7.0.0" + }, + "peerDependencies": { + "@swc/core": "*" + } + }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -2472,9 +2728,9 @@ "dev": true }, "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", "dev": true, "dependencies": { "@types/node": "*" @@ -2504,6 +2760,16 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/jest": { + "version": "29.5.3", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.3.tgz", + "integrity": "sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, "node_modules/@types/jsdom": { "version": "20.0.0", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.0.tgz", @@ -2516,9 +2782,9 @@ } }, "node_modules/@types/node": { - "version": "18.7.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.19.tgz", - "integrity": "sha512-Sq1itGUKUX1ap7GgZlrzdBydjbsJL/NSQt/4wkAxUJ7/OS5c2WkoN6WSpWc2Yc5wtKMZOUA0VCs/j2XJadN3HA==", + "version": "18.17.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.1.tgz", + "integrity": "sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw==", "dev": true }, "node_modules/@types/parse-json": { @@ -2527,10 +2793,10 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "node_modules/@types/prettier": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.0.tgz", - "integrity": "sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A==", + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", "dev": true }, "node_modules/@types/resolve": { @@ -2676,9 +2942,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -2755,15 +3021,15 @@ } }, "node_modules/babel-jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.3.tgz", - "integrity": "sha512-ApPyHSOhS/sVzwUOQIWJmdvDhBsMG01HX9z7ogtkp1TToHGGUWFlnXJUIzCgKPSfiYLn3ibipCYzsKSURHEwLg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.2.tgz", + "integrity": "sha512-BYCzImLos6J3BH/+HvUCHG1dTf2MzmAB4jaVxHV+29RZLjR29XuYTmsf2sdDwkrb+FczkGo3kOhE7ga6sI0P4A==", "dev": true, "dependencies": { - "@jest/transform": "^29.0.3", + "@jest/transform": "^29.6.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", + "babel-preset-jest": "^29.5.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -2825,9 +3091,9 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", + "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", @@ -2935,12 +3201,12 @@ } }, "node_modules/babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", + "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^29.0.2", + "babel-plugin-jest-hoist": "^29.5.0", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { @@ -3180,9 +3446,9 @@ "dev": true }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, "node_modules/cliui": { @@ -3207,9 +3473,9 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "node_modules/color-convert": { @@ -3571,10 +3837,18 @@ "dev": true }, "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.2.0.tgz", + "integrity": "sha512-i4tcg0ClgvMUSxwHpt+NHQ01ZJmAkl6eBvDNrSZG9e+oLRTCSHv0wpr/Bzjpf6CwKeIHGevE1M34Y1Axdms5VQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-equal": { "version": "1.1.1", @@ -3658,9 +3932,9 @@ "dev": true }, "node_modules/diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3776,9 +4050,9 @@ "dev": true }, "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, "engines": { "node": ">=12" @@ -4048,16 +4322,17 @@ } }, "node_modules/expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-t8l5DTws3212VbmPL+tBFXhjRHLmctHB0oQbL8eUc6S7NzZtYUhycrFO9mkxA0ZUC6FAWdNi7JchJSkODtcu1Q==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.6.2.tgz", + "integrity": "sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3" + "@jest/expect-utils": "^29.6.2", + "@types/node": "*", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-util": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -5009,9 +5284,9 @@ } }, "node_modules/istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, "dependencies": { "@babel/core": "^7.12.3", @@ -5025,17 +5300,47 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps": { @@ -5062,9 +5367,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -5093,15 +5398,15 @@ } }, "node_modules/jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.3.tgz", - "integrity": "sha512-ElgUtJBLgXM1E8L6K1RW1T96R897YY/3lRYqq9uVcPWtP2AAl/nQ16IYDh/FzQOOQ12VEuLdcPU83mbhG2C3PQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.2.tgz", + "integrity": "sha512-8eQg2mqFbaP7CwfsTpCxQ+sHzw1WuNWL5UUvjnWP4hx2riGz9fPSzYOaU5q8/GqWn1TfgZIVTqYJygbGbWAANg==", "dev": true, "dependencies": { - "@jest/core": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/core": "^29.6.2", + "@jest/types": "^29.6.1", "import-local": "^3.0.2", - "jest-cli": "^29.0.3" + "jest-cli": "^29.6.2" }, "bin": { "jest": "bin/jest.js" @@ -5119,9 +5424,9 @@ } }, "node_modules/jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", + "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", "dev": true, "dependencies": { "execa": "^5.0.0", @@ -5132,28 +5437,29 @@ } }, "node_modules/jest-circus": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.3.tgz", - "integrity": "sha512-QeGzagC6Hw5pP+df1+aoF8+FBSgkPmraC1UdkeunWh0jmrp7wC0Hr6umdUAOELBQmxtKAOMNC3KAdjmCds92Zg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.6.2.tgz", + "integrity": "sha512-G9mN+KOYIUe2sB9kpJkO9Bk18J4dTDArNFPwoZ7WKHKel55eKIS/u2bLthxgojwlf9NLCVQfgzM/WsOVvoC6Fw==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.6.2", + "@jest/expect": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", + "jest-each": "^29.6.2", + "jest-matcher-utils": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-runtime": "^29.6.2", + "jest-snapshot": "^29.6.2", + "jest-util": "^29.6.2", "p-limit": "^3.1.0", - "pretty-format": "^29.0.3", + "pretty-format": "^29.6.2", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -5162,21 +5468,21 @@ } }, "node_modules/jest-cli": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.3.tgz", - "integrity": "sha512-aUy9Gd/Kut1z80eBzG10jAn6BgS3BoBbXyv+uXEqBJ8wnnuZ5RpNfARoskSrTIy1GY4a8f32YGuCMwibtkl9CQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.6.2.tgz", + "integrity": "sha512-TT6O247v6dCEX2UGHGyflMpxhnrL0DNqP2fRTKYm3nJJpCTfXX3GCMQPGFjXDoj0i5/Blp3jriKXFgdfmbYB6Q==", "dev": true, "dependencies": { - "@jest/core": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/core": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/types": "^29.6.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-config": "^29.6.2", + "jest-util": "^29.6.2", + "jest-validate": "^29.6.2", "prompts": "^2.0.1", "yargs": "^17.3.1" }, @@ -5196,31 +5502,31 @@ } }, "node_modules/jest-config": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.3.tgz", - "integrity": "sha512-U5qkc82HHVYe3fNu2CRXLN4g761Na26rWKf7CjM8LlZB3In1jadEkZdMwsE37rd9RSPV0NfYaCjHdk/gu3v+Ew==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.6.2.tgz", + "integrity": "sha512-VxwFOC8gkiJbuodG9CPtMRjBUNZEHxwfQXmIudSTzFWxaci3Qub1ddTRbFNQlD/zUeaifLndh/eDccFX4wCMQw==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.3", - "@jest/types": "^29.0.3", - "babel-jest": "^29.0.3", + "@jest/test-sequencer": "^29.6.2", + "@jest/types": "^29.6.1", + "babel-jest": "^29.6.2", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.3", - "jest-environment-node": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-circus": "^29.6.2", + "jest-environment-node": "^29.6.2", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.2", + "jest-runner": "^29.6.2", + "jest-util": "^29.6.2", + "jest-validate": "^29.6.2", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.3", + "pretty-format": "^29.6.2", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -5241,24 +5547,24 @@ } }, "node_modules/jest-diff": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.3.tgz", - "integrity": "sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.6.2.tgz", + "integrity": "sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" @@ -5268,16 +5574,16 @@ } }, "node_modules/jest-each": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.3.tgz", - "integrity": "sha512-wILhZfESURHHBNvPMJ0lZlYZrvOQJxAo3wNHi+ycr90V7M+uGR9Gh4+4a/BmaZF0XTyZsk4OiYEf3GJN7Ltqzg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.6.2.tgz", + "integrity": "sha512-MsrsqA0Ia99cIpABBc3izS1ZYoYfhIy0NNWqPSE0YXbQjwchyt6B1HD2khzyPe1WiJA7hbxXy77ZoUQxn8UlSw==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.0.3", - "pretty-format": "^29.0.3" + "jest-get-type": "^29.4.3", + "jest-util": "^29.6.2", + "pretty-format": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -5303,46 +5609,46 @@ } }, "node_modules/jest-environment-node": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.3.tgz", - "integrity": "sha512-cdZqRCnmIlTXC+9vtvmfiY/40Cj6s2T0czXuq1whvQdmpzAnj4sbqVYuZ4zFHk766xTTJ+Ij3uUqkk8KCfXoyg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.6.2.tgz", + "integrity": "sha512-YGdFeZ3T9a+/612c5mTQIllvWkddPbYcN2v95ZH24oWMbGA4GGS2XdIF92QMhUhvrjjuQWYgUGW2zawOyH63MQ==", "dev": true, "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.6.2", + "@jest/fake-timers": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" + "jest-mock": "^29.6.2", + "jest-util": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.3.tgz", - "integrity": "sha512-uMqR99+GuBHo0RjRhOE4iA6LmsxEwRdgiIAQgMU/wdT2XebsLDz5obIwLZm/Psj+GwSEQhw9AfAVKGYbh2G55A==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.6.2.tgz", + "integrity": "sha512-+51XleTDAAysvU8rT6AnS1ZJ+WHVNqhj1k6nTvN2PYP+HjU3kqlaKQ1Lnw3NYW3bm2r8vq82X0Z1nDDHZMzHVA==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.6.2", + "jest-worker": "^29.6.2", "micromatch": "^4.0.4", "walker": "^1.0.8" }, @@ -5354,46 +5660,46 @@ } }, "node_modules/jest-leak-detector": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.3.tgz", - "integrity": "sha512-YfW/G63dAuiuQ3QmQlh8hnqLDe25WFY3eQhuc/Ev1AGmkw5zREblTh7TCSKLoheyggu6G9gxO2hY8p9o6xbaRQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.6.2.tgz", + "integrity": "sha512-aNqYhfp5uYEO3tdWMb2bfWv6f0b4I0LOxVRpnRLAeque2uqOVVMLh6khnTcE2qJ5wAKop0HcreM1btoysD6bPQ==", "dev": true, "dependencies": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.3.tgz", - "integrity": "sha512-RsR1+cZ6p1hDV4GSCQTg+9qjeotQCgkaleIKLK7dm+U4V/H2bWedU3RAtLm8+mANzZ7eDV33dMar4pejd7047w==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.6.2.tgz", + "integrity": "sha512-4LiAk3hSSobtomeIAzFTe+N8kL6z0JtF3n6I4fg29iIW7tt99R7ZcIFW34QkX+DuVrf+CUe6wuVOpm7ZKFJzZQ==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "jest-diff": "^29.6.2", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz", - "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.6.2.tgz", + "integrity": "sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", + "pretty-format": "^29.6.2", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -5402,22 +5708,23 @@ } }, "node_modules/jest-mock": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz", - "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.6.2.tgz", + "integrity": "sha512-hoSv3lb3byzdKfwqCuT6uTscan471GUECqgNYykg6ob0yiAw3zYc7OrPnI9Qv8Wwoa4lC7AZ9hyS4AiIx5U2zg==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", - "@types/node": "*" + "@jest/types": "^29.6.1", + "@types/node": "*", + "jest-util": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "engines": { "node": ">=6" @@ -5432,28 +5739,28 @@ } }, "node_modules/jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.3.tgz", - "integrity": "sha512-toVkia85Y/BPAjJasTC9zIPY6MmVXQPtrCk8SmiheC4MwVFE/CMFlOtMN6jrwPMC6TtNh8+sTMllasFeu1wMPg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.6.2.tgz", + "integrity": "sha512-G/iQUvZWI5e3SMFssc4ug4dH0aZiZpsDq9o1PtXTV1210Ztyb2+w+ZgQkB3iOiC5SmAEzJBOHWz6Hvrd+QnNPw==", "dev": true, "dependencies": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", + "jest-haste-map": "^29.6.2", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-util": "^29.6.2", + "jest-validate": "^29.6.2", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "engines": { @@ -5461,43 +5768,43 @@ } }, "node_modules/jest-resolve-dependencies": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.3.tgz", - "integrity": "sha512-KzuBnXqNvbuCdoJpv8EanbIGObk7vUBNt/PwQPPx2aMhlv/jaXpUJsqWYRpP/0a50faMBY7WFFP8S3/CCzwfDw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.2.tgz", + "integrity": "sha512-LGqjDWxg2fuQQm7ypDxduLu/m4+4Lb4gczc13v51VMZbVP5tSBILqVx8qfWcsdP8f0G7aIqByIALDB0R93yL+w==", "dev": true, "dependencies": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.3" + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.3.tgz", - "integrity": "sha512-Usu6VlTOZlCZoNuh3b2Tv/yzDpKqtiNAetG9t3kJuHfUyVMNW7ipCCJOUojzKkjPoaN7Bl1f7Buu6PE0sGpQxw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.6.2.tgz", + "integrity": "sha512-wXOT/a0EspYgfMiYHxwGLPCZfC0c38MivAlb2lMEAlwHINKemrttu1uSbcGbfDV31sFaPWnWJPmb2qXM8pqZ4w==", "dev": true, "dependencies": { - "@jest/console": "^29.0.3", - "@jest/environment": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.6.2", + "@jest/environment": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-leak-detector": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-resolve": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-util": "^29.0.3", - "jest-watcher": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.6.2", + "jest-haste-map": "^29.6.2", + "jest-leak-detector": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-resolve": "^29.6.2", + "jest-runtime": "^29.6.2", + "jest-util": "^29.6.2", + "jest-watcher": "^29.6.2", + "jest-worker": "^29.6.2", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, @@ -5506,31 +5813,31 @@ } }, "node_modules/jest-runtime": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.3.tgz", - "integrity": "sha512-12gZXRQ7ozEeEHKTY45a+YLqzNDR/x4c//X6AqwKwKJPpWM8FY4vwn4VQJOcLRS3Nd1fWwgP7LU4SoynhuUMHQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/globals": "^29.0.3", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.6.2.tgz", + "integrity": "sha512-2X9dqK768KufGJyIeLmIzToDmsN0m7Iek8QNxRSI/2+iPFYHF0jTwlO3ftn7gdKd98G/VQw9XJCk77rbTGZnJg==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.6.2", + "@jest/fake-timers": "^29.6.2", + "@jest/globals": "^29.6.2", + "@jest/source-map": "^29.6.0", + "@jest/test-result": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", + "jest-haste-map": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-mock": "^29.6.2", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.2", + "jest-snapshot": "^29.6.2", + "jest-util": "^29.6.2", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -5539,44 +5846,40 @@ } }, "node_modules/jest-snapshot": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.3.tgz", - "integrity": "sha512-52q6JChm04U3deq+mkQ7R/7uy7YyfVIrebMi6ZkBoDJ85yEjm/sJwdr1P0LOIEHmpyLlXrxy3QP0Zf5J2kj0ew==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.6.2.tgz", + "integrity": "sha512-1OdjqvqmRdGNvWXr/YZHuyhh5DeaLp1p/F8Tht/MrMw4Kr1Uu/j4lRG+iKl1DAqUJDWxtQBMk41Lnf/JETYBRA==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.3", + "expect": "^29.6.2", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", + "jest-diff": "^29.6.2", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-util": "^29.6.2", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.3", - "semver": "^7.3.5" + "pretty-format": "^29.6.2", + "semver": "^7.5.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5589,12 +5892,12 @@ } }, "node_modules/jest-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz", - "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.6.2.tgz", + "integrity": "sha512-3eX1qb6L88lJNCFlEADKOkjpXJQyZRiavX1INZ4tRnrBVr2COd3RgcTLyUiEXMNBlDU/cgYq6taUS0fExrWW4w==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -5606,17 +5909,17 @@ } }, "node_modules/jest-validate": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.3.tgz", - "integrity": "sha512-OebiqqT6lK8cbMPtrSoS3aZP4juID762lZvpf1u+smZnwTEBCBInan0GAIIhv36MxGaJvmq5uJm7dl5gVt+Zrw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.6.2.tgz", + "integrity": "sha512-vGz0yMN5fUFRRbpJDPwxMpgSXW1LDKROHfBopAvDcmD6s+B/s8WJrwi+4bfH4SdInBA5C3P3BI19dBtKzx1Arg==", "dev": true, "dependencies": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", + "jest-get-type": "^29.4.3", "leven": "^3.1.0", - "pretty-format": "^29.0.3" + "pretty-format": "^29.6.2" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -5635,18 +5938,18 @@ } }, "node_modules/jest-watcher": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.3.tgz", - "integrity": "sha512-tQX9lU91A+9tyUQKUMp0Ns8xAcdhC9fo73eqA3LFxP2bSgiF49TNcc+vf3qgGYYK9qRjFpXW9+4RgF/mbxyOOw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.6.2.tgz", + "integrity": "sha512-GZitlqkMkhkefjfN/p3SJjrDaxPflqxEAv3/ik10OirZqJGYH5rPiIsgVcfof0Tdqg3shQGdEIxDBx+B4tuLzA==", "dev": true, "dependencies": { - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/test-result": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.0.3", + "emittery": "^0.13.1", + "jest-util": "^29.6.2", "string-length": "^4.0.1" }, "engines": { @@ -5654,12 +5957,13 @@ } }, "node_modules/jest-worker": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", - "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.6.2.tgz", + "integrity": "sha512-l3ccBOabTdkng8I/ORCkADz4eSMKejTYv1vB/Z83UiubqhC1oQ5Li6dWCyqOIvSifGjUBxuvxvlm6KGK2DtuAQ==", "dev": true, "dependencies": { "@types/node": "*", + "jest-util": "^29.6.2", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -5777,6 +6081,12 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -6602,9 +6912,9 @@ } }, "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, "engines": { "node": ">= 6" @@ -7331,12 +7641,12 @@ } }, "node_modules/pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.6.2.tgz", + "integrity": "sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg==", "dev": true, "dependencies": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.0", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -7402,6 +7712,22 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", + "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", @@ -7582,9 +7908,9 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, "engines": { "node": ">=10" @@ -8189,19 +8515,6 @@ "node": ">=8" } }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -8241,22 +8554,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/terser": { "version": "5.15.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.0.tgz", @@ -8569,9 +8866,9 @@ "dev": true }, "node_modules/v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -9060,9 +9357,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true }, "@babel/helper-remap-async-to-generator": { @@ -9584,12 +9881,12 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-arrow-functions": { @@ -10168,124 +10465,157 @@ "dev": true }, "@jest/console": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.0.3.tgz", - "integrity": "sha512-cGg0r+klVHSYnfE977S9wmpuQ9L+iYuYgL+5bPXiUlUynLLYunRxswEmhBzvrSKGof5AKiHuTTmUKAqRcDY9dg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.6.2.tgz", + "integrity": "sha512-0N0yZof5hi44HAR2pPS+ikJ3nzKNoZdVu8FffRf3wy47I7Dm7etk/3KetMdRUqzVd16V4O2m2ISpNTbnIuqy1w==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", + "jest-message-util": "^29.6.2", + "jest-util": "^29.6.2", "slash": "^3.0.0" } }, "@jest/core": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.0.3.tgz", - "integrity": "sha512-1d0hLbOrM1qQE3eP3DtakeMbKTcXiXP3afWxqz103xPyddS2NhnNghS7MaXx1dcDt4/6p4nlhmeILo2ofgi8cQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.6.2.tgz", + "integrity": "sha512-Oj+5B+sDMiMWLhPFF+4/DvHOf+U10rgvCLGPHP8Xlsy/7QxS51aU/eBngudHlJXnaWD5EohAgJ4js+T6pa+zOg==", "dev": true, "requires": { - "@jest/console": "^29.0.3", - "@jest/reporters": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.6.2", + "@jest/reporters": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.0.0", - "jest-config": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-resolve-dependencies": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", - "jest-watcher": "^29.0.3", + "jest-changed-files": "^29.5.0", + "jest-config": "^29.6.2", + "jest-haste-map": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.2", + "jest-resolve-dependencies": "^29.6.2", + "jest-runner": "^29.6.2", + "jest-runtime": "^29.6.2", + "jest-snapshot": "^29.6.2", + "jest-util": "^29.6.2", + "jest-validate": "^29.6.2", + "jest-watcher": "^29.6.2", "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", + "pretty-format": "^29.6.2", "slash": "^3.0.0", "strip-ansi": "^6.0.0" } }, + "@jest/create-cache-key-function": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz", + "integrity": "sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==", + "dev": true, + "requires": { + "@jest/types": "^27.5.1" + }, + "dependencies": { + "@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + } + }, + "@types/yargs": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + } + } + }, "@jest/environment": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.0.3.tgz", - "integrity": "sha512-iKl272NKxYNQNqXMQandAIwjhQaGw5uJfGXduu8dS9llHi8jV2ChWrtOAVPnMbaaoDhnI3wgUGNDvZgHeEJQCA==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.2.tgz", + "integrity": "sha512-AEcW43C7huGd/vogTddNNTDRpO6vQ2zaQNrttvWV18ArBx9Z56h7BIsXkNFJVOO4/kblWEQz30ckw0+L3izc+Q==", "dev": true, "requires": { - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/fake-timers": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", - "jest-mock": "^29.0.3" + "jest-mock": "^29.6.2" } }, "@jest/expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-6W7K+fsI23FQ01H/BWccPyDZFrnU9QlzDcKOjrNVU5L8yUORFAJJIpmyxWPW70+X624KUNqzZwPThPMX28aXEQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.6.2.tgz", + "integrity": "sha512-m6DrEJxVKjkELTVAztTLyS/7C92Y2b0VYqmDROYKLLALHn8T/04yPs70NADUYPrV3ruI+H3J0iUIuhkjp7vkfg==", "dev": true, "requires": { - "expect": "^29.0.3", - "jest-snapshot": "^29.0.3" + "expect": "^29.6.2", + "jest-snapshot": "^29.6.2" } }, "@jest/expect-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.0.3.tgz", - "integrity": "sha512-i1xUkau7K/63MpdwiRqaxgZOjxYs4f0WMTGJnYwUKubsNRZSeQbLorS7+I4uXVF9KQ5r61BUPAUMZ7Lf66l64Q==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.6.2.tgz", + "integrity": "sha512-6zIhM8go3RV2IG4aIZaZbxwpOzz3ZiM23oxAlkquOIole+G6TrbeXnykxWYlqF7kz2HlBjdKtca20x9atkEQYg==", "dev": true, "requires": { - "jest-get-type": "^29.0.0" + "jest-get-type": "^29.4.3" } }, "@jest/fake-timers": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.0.3.tgz", - "integrity": "sha512-tmbUIo03x0TdtcZCESQ0oQSakPCpo7+s6+9mU19dd71MptkP4zCwoeZqna23//pgbhtT1Wq02VmA9Z9cNtvtCQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.6.2.tgz", + "integrity": "sha512-euZDmIlWjm1Z0lJ1D0f7a0/y5Kh/koLFMUBE5SUYWrmy8oNhJpbTBDAP6CxKnadcMLDoDf4waRYCe35cH6G6PA==", "dev": true, "requires": { - "@jest/types": "^29.0.3", - "@sinonjs/fake-timers": "^9.1.2", + "@jest/types": "^29.6.1", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" + "jest-message-util": "^29.6.2", + "jest-mock": "^29.6.2", + "jest-util": "^29.6.2" } }, "@jest/globals": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.0.3.tgz", - "integrity": "sha512-YqGHT65rFY2siPIHHFjuCGUsbzRjdqkwbat+Of6DmYRg5shIXXrLdZoVE/+TJ9O1dsKsFmYhU58JvIbZRU1Z9w==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.6.2.tgz", + "integrity": "sha512-cjuJmNDjs6aMijCmSa1g2TNG4Lby/AeU7/02VtpW+SLcZXzOLK2GpN2nLqcFjmhy3B3AoPeQVx7BnyOf681bAw==", "dev": true, "requires": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/types": "^29.0.3", - "jest-mock": "^29.0.3" + "@jest/environment": "^29.6.2", + "@jest/expect": "^29.6.2", + "@jest/types": "^29.6.1", + "jest-mock": "^29.6.2" } }, "@jest/reporters": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.0.3.tgz", - "integrity": "sha512-3+QU3d4aiyOWfmk1obDerie4XNCaD5Xo1IlKNde2yGEi02WQD+ZQD0i5Hgqm1e73sMV7kw6pMlCnprtEwEVwxw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.6.2.tgz", + "integrity": "sha512-sWtijrvIav8LgfJZlrGCdN0nP2EWbakglJY49J1Y5QihcQLfy7ovyxxjJBRXMNltgt4uPtEcFmIMbVshEDfFWw==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/console": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", @@ -10297,90 +10627,97 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-message-util": "^29.6.2", + "jest-util": "^29.6.2", + "jest-worker": "^29.6.2", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", - "terminal-link": "^2.0.0", "v8-to-istanbul": "^9.0.1" } }, "@jest/schemas": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", - "integrity": "sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==", + "version": "29.6.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", + "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", "dev": true, "requires": { - "@sinclair/typebox": "^0.24.1" + "@sinclair/typebox": "^0.27.8" } }, "@jest/source-map": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.0.0.tgz", - "integrity": "sha512-nOr+0EM8GiHf34mq2GcJyz/gYFyLQ2INDhAylrZJ9mMWoW21mLBfZa0BUVPPMxVYrLjeiRe2Z7kWXOGnS0TFhQ==", + "version": "29.6.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.0.tgz", + "integrity": "sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.15", + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.0.3.tgz", - "integrity": "sha512-vViVnQjCgTmbhDKEonKJPtcFe9G/CJO4/Np4XwYJah+lF2oI7KKeRp8t1dFvv44wN2NdbDb/qC6pi++Vpp0Dlg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.6.2.tgz", + "integrity": "sha512-3VKFXzcV42EYhMCsJQURptSqnyjqCGbtLuX5Xxb6Pm6gUf1wIRIl+mandIRGJyWKgNKYF9cnstti6Ls5ekduqw==", "dev": true, "requires": { - "@jest/console": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.6.2", + "@jest/types": "^29.6.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.0.3.tgz", - "integrity": "sha512-Hf4+xYSWZdxTNnhDykr8JBs0yBN/nxOXyUQWfotBUqqy0LF9vzcFB0jm/EDNZCx587znLWTIgxcokW7WeZMobQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.6.2.tgz", + "integrity": "sha512-GVYi6PfPwVejO7slw6IDO0qKVum5jtrJ3KoLGbgBWyr2qr4GaxFV6su+ZAjdTX75Sr1DkMFRk09r2ZVa+wtCGw==", "dev": true, "requires": { - "@jest/test-result": "^29.0.3", + "@jest/test-result": "^29.6.2", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", + "jest-haste-map": "^29.6.2", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.0.3.tgz", - "integrity": "sha512-C5ihFTRYaGDbi/xbRQRdbo5ddGtI4VSpmL6AIcZxdhwLbXMa7PcXxxqyI91vGOFHnn5aVM3WYnYKCHEqmLVGzg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.6.2.tgz", + "integrity": "sha512-ZqCqEISr58Ce3U+buNFJYUktLJZOggfyvR+bZMaiV1e8B1SIvJbwZMrYz3gx/KAPn9EXmOmN+uB08yLCjWkQQg==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.0.3", - "@jridgewell/trace-mapping": "^0.3.15", + "@jest/types": "^29.6.1", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", + "jest-haste-map": "^29.6.2", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.6.2", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "write-file-atomic": "^4.0.1" + "write-file-atomic": "^4.0.2" + }, + "dependencies": { + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + } } }, "@jest/types": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.0.3.tgz", - "integrity": "sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==", + "version": "29.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.1.tgz", + "integrity": "sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.0", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", @@ -10428,13 +10765,13 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, "@rollup/plugin-alias": { @@ -10514,27 +10851,27 @@ } }, "@sinclair/typebox": { - "version": "0.24.42", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.42.tgz", - "integrity": "sha512-d+2AtrHGyWek2u2ITF0lHRIv6Tt7X0dEHW+0rP+5aDCEjC3fiN2RBjrLD0yU0at52BcZbRGxLbAtXiR0hFCjYw==", + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "@surma/rollup-plugin-off-main-thread": { @@ -10549,6 +10886,104 @@ "string.prototype.matchall": "^4.0.6" } }, + "@swc/core": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.71.tgz", + "integrity": "sha512-T8dqj+SV/S8laW/FGmKHhCGw1o4GRUvJ2jHfbYgEwiJpeutT9uavHvG02t39HJvObBJ52EZs/krGtni4U5928Q==", + "dev": true, + "requires": { + "@swc/core-darwin-arm64": "1.3.71", + "@swc/core-darwin-x64": "1.3.71", + "@swc/core-linux-arm-gnueabihf": "1.3.71", + "@swc/core-linux-arm64-gnu": "1.3.71", + "@swc/core-linux-arm64-musl": "1.3.71", + "@swc/core-linux-x64-gnu": "1.3.71", + "@swc/core-linux-x64-musl": "1.3.71", + "@swc/core-win32-arm64-msvc": "1.3.71", + "@swc/core-win32-ia32-msvc": "1.3.71", + "@swc/core-win32-x64-msvc": "1.3.71" + } + }, + "@swc/core-darwin-arm64": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.71.tgz", + "integrity": "sha512-xOm0hDbcO2ShwQu1CjLtq3fwrG9AvhuE0s8vtBc8AsamYExHmR8bo6GQHJUtfPG1FVPk5a8xoQSd1fs09FQjLg==", + "dev": true, + "optional": true + }, + "@swc/core-darwin-x64": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.71.tgz", + "integrity": "sha512-9sbDXBWgM22w/3Ll5kPhXMPkOiHRoqwMOyxLJBfGtIMnFlh5O+NRN3umRerK3pe4Q6/7hj2M5V+crEHYrXmuxg==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm-gnueabihf": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.71.tgz", + "integrity": "sha512-boKdMZsfKvhBs0FDeqH7KQj0lfYe0wCtrL1lv50oYMEeLajY9o4U5xSmc61Sg4HRXjlbR6dlM2cFfL84t7NpAA==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm64-gnu": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.71.tgz", + "integrity": "sha512-yDatyHYMiOVwhyIA/LBwknPs2CUtLYWEMzPZjgLc+56PbgPs3oiEbNWeVUND5onPrfDQgK7NK1y8JeiXZqTgGQ==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm64-musl": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.71.tgz", + "integrity": "sha512-xAdCA0L/hoa0ULL5SR4sMZCxkWk7C90DOU7wJalNVG9qNWYICfq3G7AR0E9Ohphzqyahfb5QJED/nA7N0+XwbQ==", + "dev": true, + "optional": true + }, + "@swc/core-linux-x64-gnu": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.71.tgz", + "integrity": "sha512-j94qLXP/yqhu2afnABAq/xrJIU8TEqcNkp1TlsAeO3R2nVLYL1w4XX8GW71SPnXmd2bwF102c3Cfv/2ilf2y2A==", + "dev": true, + "optional": true + }, + "@swc/core-linux-x64-musl": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.71.tgz", + "integrity": "sha512-YiyU848ql6dLlmt0BHccGAaZ36Cf61VzCAMDKID/gd72snvzWcMCHrwSRW0gEFNXHsjBJrmNl+SLYZHfqoGwUA==", + "dev": true, + "optional": true + }, + "@swc/core-win32-arm64-msvc": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.71.tgz", + "integrity": "sha512-1UsJ+6hnIRe/PVdgDPexvgGaN4KpBncT/bAOqlWc9XC7KeBXAWcGA08LrPUz2Ei00DJXzR622IGZVEYOHNkUOw==", + "dev": true, + "optional": true + }, + "@swc/core-win32-ia32-msvc": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.71.tgz", + "integrity": "sha512-KnuI89+zojR9lDFELdQYZpxzPZ6pBfLwJfWTSGatnpL1ZHhIsV3tK1jwqIdJK1zkRxpBwc6p6FzSZdZwCSpnJw==", + "dev": true, + "optional": true + }, + "@swc/core-win32-x64-msvc": { + "version": "1.3.71", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.71.tgz", + "integrity": "sha512-Pcw7fFirpaBOZsU8fhO48ZCb7NxIjuLnLRPrHqWQ4Mapx1+w9ZNdGya2DKP9n8EAiUrJO20WDsrBNMT2MQSWkA==", + "dev": true, + "optional": true + }, + "@swc/jest": { + "version": "0.2.27", + "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.27.tgz", + "integrity": "sha512-Xt8EJ6Wy0NYVL8KDPcDMsuUSzyV2UAByamyy28x2iDZCJw2eVz3acedCGBYxxlPR/DNr6QbA35OSymuXhC9QVA==", + "dev": true, + "requires": { + "@jest/create-cache-key-function": "^27.4.2", + "jsonc-parser": "^3.2.0" + } + }, "@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -10609,9 +11044,9 @@ "dev": true }, "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", "dev": true, "requires": { "@types/node": "*" @@ -10641,6 +11076,16 @@ "@types/istanbul-lib-report": "*" } }, + "@types/jest": { + "version": "29.5.3", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.3.tgz", + "integrity": "sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA==", + "dev": true, + "requires": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, "@types/jsdom": { "version": "20.0.0", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.0.tgz", @@ -10653,9 +11098,9 @@ } }, "@types/node": { - "version": "18.7.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.19.tgz", - "integrity": "sha512-Sq1itGUKUX1ap7GgZlrzdBydjbsJL/NSQt/4wkAxUJ7/OS5c2WkoN6WSpWc2Yc5wtKMZOUA0VCs/j2XJadN3HA==", + "version": "18.17.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.1.tgz", + "integrity": "sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw==", "dev": true }, "@types/parse-json": { @@ -10664,10 +11109,10 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "@types/prettier": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.0.tgz", - "integrity": "sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A==", + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", "dev": true }, "@types/resolve": { @@ -10782,9 +11227,9 @@ } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -10839,15 +11284,15 @@ } }, "babel-jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.0.3.tgz", - "integrity": "sha512-ApPyHSOhS/sVzwUOQIWJmdvDhBsMG01HX9z7ogtkp1TToHGGUWFlnXJUIzCgKPSfiYLn3ibipCYzsKSURHEwLg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.2.tgz", + "integrity": "sha512-BYCzImLos6J3BH/+HvUCHG1dTf2MzmAB4jaVxHV+29RZLjR29XuYTmsf2sdDwkrb+FczkGo3kOhE7ga6sI0P4A==", "dev": true, "requires": { - "@jest/transform": "^29.0.3", + "@jest/transform": "^29.6.2", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.0.2", + "babel-preset-jest": "^29.5.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -10898,9 +11343,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.0.2.tgz", - "integrity": "sha512-eBr2ynAEFjcebVvu8Ktx580BD1QKCrBG1XwEUTXJe285p9HA/4hOhfWCFRQhTKSyBV0VzjhG7H91Eifz9s29hg==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", + "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -10986,12 +11431,12 @@ } }, "babel-preset-jest": { - "version": "29.0.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.0.2.tgz", - "integrity": "sha512-BeVXp7rH5TK96ofyEnHjznjLMQ2nAeDJ+QzxKnHAAMs0RgrQsCywjAN8m4mOm5Di0pxU//3AoEeJJrerMH5UeA==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", + "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^29.0.2", + "babel-plugin-jest-hoist": "^29.5.0", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -11166,9 +11611,9 @@ "dev": true }, "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", "dev": true }, "cliui": { @@ -11189,9 +11634,9 @@ "dev": true }, "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "color-convert": { @@ -11471,10 +11916,11 @@ "dev": true }, "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.2.0.tgz", + "integrity": "sha512-i4tcg0ClgvMUSxwHpt+NHQ01ZJmAkl6eBvDNrSZG9e+oLRTCSHv0wpr/Bzjpf6CwKeIHGevE1M34Y1Axdms5VQ==", + "dev": true, + "requires": {} }, "deep-equal": { "version": "1.1.1", @@ -11537,9 +11983,9 @@ "dev": true }, "diff-sequences": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.0.0.tgz", - "integrity": "sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", + "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", "dev": true }, "dom-serializer": { @@ -11624,9 +12070,9 @@ "dev": true }, "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true }, "emoji-regex": { @@ -11828,16 +12274,17 @@ "dev": true }, "expect": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.0.3.tgz", - "integrity": "sha512-t8l5DTws3212VbmPL+tBFXhjRHLmctHB0oQbL8eUc6S7NzZtYUhycrFO9mkxA0ZUC6FAWdNi7JchJSkODtcu1Q==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.6.2.tgz", + "integrity": "sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA==", "dev": true, "requires": { - "@jest/expect-utils": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3" + "@jest/expect-utils": "^29.6.2", + "@types/node": "*", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-util": "^29.6.2" } }, "fast-json-stable-stringify": { @@ -12528,9 +12975,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, "requires": { "@babel/core": "^7.12.3", @@ -12541,14 +12988,34 @@ } }, "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" + }, + "dependencies": { + "make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "requires": { + "semver": "^7.5.3" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "istanbul-lib-source-maps": { @@ -12571,9 +13038,9 @@ } }, "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -12593,21 +13060,21 @@ } }, "jest": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.0.3.tgz", - "integrity": "sha512-ElgUtJBLgXM1E8L6K1RW1T96R897YY/3lRYqq9uVcPWtP2AAl/nQ16IYDh/FzQOOQ12VEuLdcPU83mbhG2C3PQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.2.tgz", + "integrity": "sha512-8eQg2mqFbaP7CwfsTpCxQ+sHzw1WuNWL5UUvjnWP4hx2riGz9fPSzYOaU5q8/GqWn1TfgZIVTqYJygbGbWAANg==", "dev": true, "requires": { - "@jest/core": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/core": "^29.6.2", + "@jest/types": "^29.6.1", "import-local": "^3.0.2", - "jest-cli": "^29.0.3" + "jest-cli": "^29.6.2" } }, "jest-changed-files": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.0.0.tgz", - "integrity": "sha512-28/iDMDrUpGoCitTURuDqUzWQoWmOmOKOFST1mi2lwh62X4BFf6khgH3uSuo1e49X/UDjuApAj3w0wLOex4VPQ==", + "version": "29.5.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", + "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", "dev": true, "requires": { "execa": "^5.0.0", @@ -12615,114 +13082,115 @@ } }, "jest-circus": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.0.3.tgz", - "integrity": "sha512-QeGzagC6Hw5pP+df1+aoF8+FBSgkPmraC1UdkeunWh0jmrp7wC0Hr6umdUAOELBQmxtKAOMNC3KAdjmCds92Zg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.6.2.tgz", + "integrity": "sha512-G9mN+KOYIUe2sB9kpJkO9Bk18J4dTDArNFPwoZ7WKHKel55eKIS/u2bLthxgojwlf9NLCVQfgzM/WsOVvoC6Fw==", "dev": true, "requires": { - "@jest/environment": "^29.0.3", - "@jest/expect": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.6.2", + "@jest/expect": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", + "jest-each": "^29.6.2", + "jest-matcher-utils": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-runtime": "^29.6.2", + "jest-snapshot": "^29.6.2", + "jest-util": "^29.6.2", "p-limit": "^3.1.0", - "pretty-format": "^29.0.3", + "pretty-format": "^29.6.2", + "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-cli": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.0.3.tgz", - "integrity": "sha512-aUy9Gd/Kut1z80eBzG10jAn6BgS3BoBbXyv+uXEqBJ8wnnuZ5RpNfARoskSrTIy1GY4a8f32YGuCMwibtkl9CQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.6.2.tgz", + "integrity": "sha512-TT6O247v6dCEX2UGHGyflMpxhnrL0DNqP2fRTKYm3nJJpCTfXX3GCMQPGFjXDoj0i5/Blp3jriKXFgdfmbYB6Q==", "dev": true, "requires": { - "@jest/core": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/core": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/types": "^29.6.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-config": "^29.6.2", + "jest-util": "^29.6.2", + "jest-validate": "^29.6.2", "prompts": "^2.0.1", "yargs": "^17.3.1" } }, "jest-config": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.0.3.tgz", - "integrity": "sha512-U5qkc82HHVYe3fNu2CRXLN4g761Na26rWKf7CjM8LlZB3In1jadEkZdMwsE37rd9RSPV0NfYaCjHdk/gu3v+Ew==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.6.2.tgz", + "integrity": "sha512-VxwFOC8gkiJbuodG9CPtMRjBUNZEHxwfQXmIudSTzFWxaci3Qub1ddTRbFNQlD/zUeaifLndh/eDccFX4wCMQw==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.0.3", - "@jest/types": "^29.0.3", - "babel-jest": "^29.0.3", + "@jest/test-sequencer": "^29.6.2", + "@jest/types": "^29.6.1", + "babel-jest": "^29.6.2", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.0.3", - "jest-environment-node": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-runner": "^29.0.3", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-circus": "^29.6.2", + "jest-environment-node": "^29.6.2", + "jest-get-type": "^29.4.3", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.2", + "jest-runner": "^29.6.2", + "jest-util": "^29.6.2", + "jest-validate": "^29.6.2", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.0.3", + "pretty-format": "^29.6.2", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" } }, "jest-diff": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.0.3.tgz", - "integrity": "sha512-+X/AIF5G/vX9fWK+Db9bi9BQas7M9oBME7egU7psbn4jlszLFCu0dW63UgeE6cs/GANq4fLaT+8sGHQQ0eCUfg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.6.2.tgz", + "integrity": "sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^29.0.0", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "diff-sequences": "^29.4.3", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.2" } }, "jest-docblock": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.0.0.tgz", - "integrity": "sha512-s5Kpra/kLzbqu9dEjov30kj1n4tfu3e7Pl8v+f8jOkeWNqM6Ds8jRaJfZow3ducoQUrf2Z4rs2N5S3zXnb83gw==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", + "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.0.3.tgz", - "integrity": "sha512-wILhZfESURHHBNvPMJ0lZlYZrvOQJxAo3wNHi+ycr90V7M+uGR9Gh4+4a/BmaZF0XTyZsk4OiYEf3GJN7Ltqzg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.6.2.tgz", + "integrity": "sha512-MsrsqA0Ia99cIpABBc3izS1ZYoYfhIy0NNWqPSE0YXbQjwchyt6B1HD2khzyPe1WiJA7hbxXy77ZoUQxn8UlSw==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", - "jest-util": "^29.0.3", - "pretty-format": "^29.0.3" + "jest-get-type": "^29.4.3", + "jest-util": "^29.6.2", + "pretty-format": "^29.6.2" } }, "jest-environment-jsdom": { @@ -12742,229 +13210,226 @@ } }, "jest-environment-node": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.0.3.tgz", - "integrity": "sha512-cdZqRCnmIlTXC+9vtvmfiY/40Cj6s2T0czXuq1whvQdmpzAnj4sbqVYuZ4zFHk766xTTJ+Ij3uUqkk8KCfXoyg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.6.2.tgz", + "integrity": "sha512-YGdFeZ3T9a+/612c5mTQIllvWkddPbYcN2v95ZH24oWMbGA4GGS2XdIF92QMhUhvrjjuQWYgUGW2zawOyH63MQ==", "dev": true, "requires": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/environment": "^29.6.2", + "@jest/fake-timers": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", - "jest-mock": "^29.0.3", - "jest-util": "^29.0.3" + "jest-mock": "^29.6.2", + "jest-util": "^29.6.2" } }, "jest-get-type": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.0.0.tgz", - "integrity": "sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", + "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", "dev": true }, "jest-haste-map": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.0.3.tgz", - "integrity": "sha512-uMqR99+GuBHo0RjRhOE4iA6LmsxEwRdgiIAQgMU/wdT2XebsLDz5obIwLZm/Psj+GwSEQhw9AfAVKGYbh2G55A==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.6.2.tgz", + "integrity": "sha512-+51XleTDAAysvU8rT6AnS1ZJ+WHVNqhj1k6nTvN2PYP+HjU3kqlaKQ1Lnw3NYW3bm2r8vq82X0Z1nDDHZMzHVA==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.0.0", - "jest-util": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-regex-util": "^29.4.3", + "jest-util": "^29.6.2", + "jest-worker": "^29.6.2", "micromatch": "^4.0.4", "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.0.3.tgz", - "integrity": "sha512-YfW/G63dAuiuQ3QmQlh8hnqLDe25WFY3eQhuc/Ev1AGmkw5zREblTh7TCSKLoheyggu6G9gxO2hY8p9o6xbaRQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.6.2.tgz", + "integrity": "sha512-aNqYhfp5uYEO3tdWMb2bfWv6f0b4I0LOxVRpnRLAeque2uqOVVMLh6khnTcE2qJ5wAKop0HcreM1btoysD6bPQ==", "dev": true, "requires": { - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.2" } }, "jest-matcher-utils": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.0.3.tgz", - "integrity": "sha512-RsR1+cZ6p1hDV4GSCQTg+9qjeotQCgkaleIKLK7dm+U4V/H2bWedU3RAtLm8+mANzZ7eDV33dMar4pejd7047w==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.6.2.tgz", + "integrity": "sha512-4LiAk3hSSobtomeIAzFTe+N8kL6z0JtF3n6I4fg29iIW7tt99R7ZcIFW34QkX+DuVrf+CUe6wuVOpm7ZKFJzZQ==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "pretty-format": "^29.0.3" + "jest-diff": "^29.6.2", + "jest-get-type": "^29.4.3", + "pretty-format": "^29.6.2" } }, "jest-message-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.0.3.tgz", - "integrity": "sha512-7T8JiUTtDfppojosORAflABfLsLKMLkBHSWkjNQrjIltGoDzNGn7wEPOSfjqYAGTYME65esQzMJxGDjuLBKdOg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.6.2.tgz", + "integrity": "sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.0.3", + "pretty-format": "^29.6.2", "slash": "^3.0.0", "stack-utils": "^2.0.3" } }, "jest-mock": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.0.3.tgz", - "integrity": "sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.6.2.tgz", + "integrity": "sha512-hoSv3lb3byzdKfwqCuT6uTscan471GUECqgNYykg6ob0yiAw3zYc7OrPnI9Qv8Wwoa4lC7AZ9hyS4AiIx5U2zg==", "dev": true, "requires": { - "@jest/types": "^29.0.3", - "@types/node": "*" + "@jest/types": "^29.6.1", + "@types/node": "*", + "jest-util": "^29.6.2" } }, "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "requires": {} }, "jest-regex-util": { - "version": "29.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.0.0.tgz", - "integrity": "sha512-BV7VW7Sy0fInHWN93MMPtlClweYv2qrSCwfeFWmpribGZtQPWNvRSq9XOVgOEjU1iBGRKXUZil0o2AH7Iy9Lug==", + "version": "29.4.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", + "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", "dev": true }, "jest-resolve": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.0.3.tgz", - "integrity": "sha512-toVkia85Y/BPAjJasTC9zIPY6MmVXQPtrCk8SmiheC4MwVFE/CMFlOtMN6jrwPMC6TtNh8+sTMllasFeu1wMPg==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.6.2.tgz", + "integrity": "sha512-G/iQUvZWI5e3SMFssc4ug4dH0aZiZpsDq9o1PtXTV1210Ztyb2+w+ZgQkB3iOiC5SmAEzJBOHWz6Hvrd+QnNPw==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", + "jest-haste-map": "^29.6.2", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.0.3", - "jest-validate": "^29.0.3", + "jest-util": "^29.6.2", + "jest-validate": "^29.6.2", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" } }, "jest-resolve-dependencies": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.0.3.tgz", - "integrity": "sha512-KzuBnXqNvbuCdoJpv8EanbIGObk7vUBNt/PwQPPx2aMhlv/jaXpUJsqWYRpP/0a50faMBY7WFFP8S3/CCzwfDw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.2.tgz", + "integrity": "sha512-LGqjDWxg2fuQQm7ypDxduLu/m4+4Lb4gczc13v51VMZbVP5tSBILqVx8qfWcsdP8f0G7aIqByIALDB0R93yL+w==", "dev": true, "requires": { - "jest-regex-util": "^29.0.0", - "jest-snapshot": "^29.0.3" + "jest-regex-util": "^29.4.3", + "jest-snapshot": "^29.6.2" } }, "jest-runner": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.0.3.tgz", - "integrity": "sha512-Usu6VlTOZlCZoNuh3b2Tv/yzDpKqtiNAetG9t3kJuHfUyVMNW7ipCCJOUojzKkjPoaN7Bl1f7Buu6PE0sGpQxw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.6.2.tgz", + "integrity": "sha512-wXOT/a0EspYgfMiYHxwGLPCZfC0c38MivAlb2lMEAlwHINKemrttu1uSbcGbfDV31sFaPWnWJPmb2qXM8pqZ4w==", "dev": true, "requires": { - "@jest/console": "^29.0.3", - "@jest/environment": "^29.0.3", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/console": "^29.6.2", + "@jest/environment": "^29.6.2", + "@jest/test-result": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^29.0.0", - "jest-environment-node": "^29.0.3", - "jest-haste-map": "^29.0.3", - "jest-leak-detector": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-resolve": "^29.0.3", - "jest-runtime": "^29.0.3", - "jest-util": "^29.0.3", - "jest-watcher": "^29.0.3", - "jest-worker": "^29.0.3", + "jest-docblock": "^29.4.3", + "jest-environment-node": "^29.6.2", + "jest-haste-map": "^29.6.2", + "jest-leak-detector": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-resolve": "^29.6.2", + "jest-runtime": "^29.6.2", + "jest-util": "^29.6.2", + "jest-watcher": "^29.6.2", + "jest-worker": "^29.6.2", "p-limit": "^3.1.0", "source-map-support": "0.5.13" } }, "jest-runtime": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.0.3.tgz", - "integrity": "sha512-12gZXRQ7ozEeEHKTY45a+YLqzNDR/x4c//X6AqwKwKJPpWM8FY4vwn4VQJOcLRS3Nd1fWwgP7LU4SoynhuUMHQ==", - "dev": true, - "requires": { - "@jest/environment": "^29.0.3", - "@jest/fake-timers": "^29.0.3", - "@jest/globals": "^29.0.3", - "@jest/source-map": "^29.0.0", - "@jest/test-result": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.6.2.tgz", + "integrity": "sha512-2X9dqK768KufGJyIeLmIzToDmsN0m7Iek8QNxRSI/2+iPFYHF0jTwlO3ftn7gdKd98G/VQw9XJCk77rbTGZnJg==", + "dev": true, + "requires": { + "@jest/environment": "^29.6.2", + "@jest/fake-timers": "^29.6.2", + "@jest/globals": "^29.6.2", + "@jest/source-map": "^29.6.0", + "@jest/test-result": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-mock": "^29.0.3", - "jest-regex-util": "^29.0.0", - "jest-resolve": "^29.0.3", - "jest-snapshot": "^29.0.3", - "jest-util": "^29.0.3", + "jest-haste-map": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-mock": "^29.6.2", + "jest-regex-util": "^29.4.3", + "jest-resolve": "^29.6.2", + "jest-snapshot": "^29.6.2", + "jest-util": "^29.6.2", "slash": "^3.0.0", "strip-bom": "^4.0.0" } }, "jest-snapshot": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.0.3.tgz", - "integrity": "sha512-52q6JChm04U3deq+mkQ7R/7uy7YyfVIrebMi6ZkBoDJ85yEjm/sJwdr1P0LOIEHmpyLlXrxy3QP0Zf5J2kj0ew==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.6.2.tgz", + "integrity": "sha512-1OdjqvqmRdGNvWXr/YZHuyhh5DeaLp1p/F8Tht/MrMw4Kr1Uu/j4lRG+iKl1DAqUJDWxtQBMk41Lnf/JETYBRA==", "dev": true, "requires": { "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.0.3", - "@jest/transform": "^29.0.3", - "@jest/types": "^29.0.3", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", + "@jest/expect-utils": "^29.6.2", + "@jest/transform": "^29.6.2", + "@jest/types": "^29.6.1", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.0.3", + "expect": "^29.6.2", "graceful-fs": "^4.2.9", - "jest-diff": "^29.0.3", - "jest-get-type": "^29.0.0", - "jest-haste-map": "^29.0.3", - "jest-matcher-utils": "^29.0.3", - "jest-message-util": "^29.0.3", - "jest-util": "^29.0.3", + "jest-diff": "^29.6.2", + "jest-get-type": "^29.4.3", + "jest-matcher-utils": "^29.6.2", + "jest-message-util": "^29.6.2", + "jest-util": "^29.6.2", "natural-compare": "^1.4.0", - "pretty-format": "^29.0.3", - "semver": "^7.3.5" + "pretty-format": "^29.6.2", + "semver": "^7.5.3" }, "dependencies": { "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -12973,12 +13438,12 @@ } }, "jest-util": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.0.3.tgz", - "integrity": "sha512-Q0xaG3YRG8QiTC4R6fHjHQPaPpz9pJBEi0AeOE4mQh/FuWOijFjGXMMOfQEaU9i3z76cNR7FobZZUQnL6IyfdQ==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.6.2.tgz", + "integrity": "sha512-3eX1qb6L88lJNCFlEADKOkjpXJQyZRiavX1INZ4tRnrBVr2COd3RgcTLyUiEXMNBlDU/cgYq6taUS0fExrWW4w==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -12987,17 +13452,17 @@ } }, "jest-validate": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.0.3.tgz", - "integrity": "sha512-OebiqqT6lK8cbMPtrSoS3aZP4juID762lZvpf1u+smZnwTEBCBInan0GAIIhv36MxGaJvmq5uJm7dl5gVt+Zrw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.6.2.tgz", + "integrity": "sha512-vGz0yMN5fUFRRbpJDPwxMpgSXW1LDKROHfBopAvDcmD6s+B/s8WJrwi+4bfH4SdInBA5C3P3BI19dBtKzx1Arg==", "dev": true, "requires": { - "@jest/types": "^29.0.3", + "@jest/types": "^29.6.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^29.0.0", + "jest-get-type": "^29.4.3", "leven": "^3.1.0", - "pretty-format": "^29.0.3" + "pretty-format": "^29.6.2" }, "dependencies": { "camelcase": { @@ -13009,28 +13474,29 @@ } }, "jest-watcher": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.0.3.tgz", - "integrity": "sha512-tQX9lU91A+9tyUQKUMp0Ns8xAcdhC9fo73eqA3LFxP2bSgiF49TNcc+vf3qgGYYK9qRjFpXW9+4RgF/mbxyOOw==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.6.2.tgz", + "integrity": "sha512-GZitlqkMkhkefjfN/p3SJjrDaxPflqxEAv3/ik10OirZqJGYH5rPiIsgVcfof0Tdqg3shQGdEIxDBx+B4tuLzA==", "dev": true, "requires": { - "@jest/test-result": "^29.0.3", - "@jest/types": "^29.0.3", + "@jest/test-result": "^29.6.2", + "@jest/types": "^29.6.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.0.3", + "emittery": "^0.13.1", + "jest-util": "^29.6.2", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.0.3.tgz", - "integrity": "sha512-Tl/YWUugQOjoTYwjKdfJWkSOfhufJHO5LhXTSZC3TRoQKO+fuXnZAdoXXBlpLXKGODBL3OvdUasfDD4PcMe6ng==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.6.2.tgz", + "integrity": "sha512-l3ccBOabTdkng8I/ORCkADz4eSMKejTYv1vB/Z83UiubqhC1oQ5Li6dWCyqOIvSifGjUBxuvxvlm6KGK2DtuAQ==", "dev": true, "requires": { "@types/node": "*", + "jest-util": "^29.6.2", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -13115,6 +13581,12 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -13734,9 +14206,9 @@ "dev": true }, "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true }, "pkg-dir": { @@ -14229,12 +14701,12 @@ "dev": true }, "pretty-format": { - "version": "29.0.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.0.3.tgz", - "integrity": "sha512-cHudsvQr1K5vNVLbvYF/nv3Qy/F/BcEKxGuIeMiVMRHxPOO1RxXooP8g/ZrwAp7Dx+KdMZoOc7NxLHhMrP2f9Q==", + "version": "29.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.6.2.tgz", + "integrity": "sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg==", "dev": true, "requires": { - "@jest/schemas": "^29.0.0", + "@jest/schemas": "^29.6.0", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -14283,6 +14755,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pure-rand": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", + "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", + "dev": true + }, "qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", @@ -14426,9 +14904,9 @@ "dev": true }, "resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true }, "rollup": { @@ -14905,16 +15383,6 @@ "has-flag": "^4.0.0" } }, - "supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -14942,16 +15410,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, "terser": { "version": "5.15.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.0.tgz", @@ -15188,9 +15646,9 @@ "dev": true }, "v8-to-istanbul": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", - "integrity": "sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.12", diff --git a/package.json b/package.json index 8abd1096..1c210d62 100644 --- a/package.json +++ b/package.json @@ -28,35 +28,46 @@ "src/js", "dist" ], - "source": "src/js/index.js", + "source": "src/js/index.ts", "main": "dist/index.js", "umd:main": "dist/index.js", "unpkg": "dist/index.js", "browser": "dist/index.js", "module": "dist/index.m.js", "esmodule": "dist/index.es.js", + "types": "dist/types/index.d.ts", "repository": { "type": "git", "url": "https://github.com/tighten/ziggy.git" }, "scripts": { "build": "microbundle --name route --format modern,es,umd --external none --no-sourcemap", - "build:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --external none --no-sourcemap", + "build:vue": "microbundle --entry src/js/vue.ts --output dist/vue.js --name ZiggyVue --format modern,es,umd --external none --no-sourcemap", "watch": "npm run build watch", "build:npm": "microbundle --name route --format modern,es,umd --no-sourcemap", - "build:npm:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap", + "build:npm:vue": "microbundle --entry src/js/vue.ts --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap", "test": "jest --verbose", "prepublishOnly": "npm run build:npm && npm run build:npm:vue" }, "mangle": { "regex": "^_(?!query)" }, + "jest": { + "testEnvironment": "node", + "transform": { + ".+\\.(j|t)sx?$": "@swc/jest" + } + }, "dependencies": { "qs": "~6.9.7" }, "devDependencies": { + "@swc/core": "^1.3.71", + "@swc/jest": "^0.2.27", + "@types/jest": "^29.5.3", + "@types/qs": "^6.9.7", "babel-preset-power-assert": "^3.0.0", - "jest": "^29.0.3", + "jest": "^29.6.2", "jest-environment-jsdom": "^29.0.3", "microbundle": "^0.15.1", "power-assert": "^1.6.1" diff --git a/src/js/Route.js b/src/js/Route.js deleted file mode 100644 index 587bd8b0..00000000 --- a/src/js/Route.js +++ /dev/null @@ -1,123 +0,0 @@ -import { parse } from 'qs'; - -/** - * A Laravel route. This class represents one route and its configuration and metadata. - */ -export default class Route { - /** - * @param {String} name - Route name. - * @param {Object} definition - Route definition. - * @param {Object} config - Ziggy configuration. - */ - constructor(name, definition, config) { - this.name = name; - this.definition = definition; - this.bindings = definition.bindings ?? {}; - this.wheres = definition.wheres ?? {}; - this.config = config; - } - - /** - * Get a 'template' of the complete URL for this route. - * - * @example - * https://{team}.ziggy.dev/user/{user} - * - * @return {String} Route template. - */ - get template() { - return `${this.origin}/${this.definition.uri}`.replace(/\/+$/, ''); - } - - /** - * Get a template of the origin for this route. - * - * @example - * https://{team}.ziggy.dev/ - * - * @return {String} Route origin template. - */ - get origin() { - // If we're building just a path there's no origin, otherwise: if this route has a - // domain configured we construct the origin with that, if not we use the app URL - return !this.config.absolute ? '' : this.definition.domain - ? `${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port ? `:${this.config.port}` : ''}` - : this.config.url; - } - - /** - * Get an array of objects representing the parameters that this route accepts. - * - * @example - * [{ name: 'team', required: true }, { name: 'user', required: false }] - * - * @return {Array} Parameter segments. - */ - get parameterSegments() { - return this.template.match(/{[^}?]+\??}/g)?.map((segment) => ({ - name: segment.replace(/{|\??}/g, ''), - required: !/\?}$/.test(segment), - })) ?? []; - } - - /** - * Get whether this route's template matches the given URL. - * - * @param {String} url - URL to check. - * @return {Object|false} - If this route matches, returns the matched parameters. - */ - matchesUrl(url) { - if (!this.definition.methods.includes('GET')) return false; - - // Transform the route's template into a regex that will match a hydrated URL, - // by replacing its parameter segments with matchers for parameter values - const pattern = this.template - .replace(/(\/?){([^}?]*)(\??)}/g, (_, slash, segment, optional) => { - const regex = `(?<${segment}>${this.wheres[segment]?.replace(/(^\^)|(\$$)/g, '') || '[^/?]+'})`; - return optional ? `(${slash}${regex})?` : `${slash}${regex}`; - }) - .replace(/^\w+:\/\//, ''); - - const [location, query] = url.replace(/^\w+:\/\//, '').split('?'); - - const matches = new RegExp(`^${pattern}/?$`).exec(location); - - if (matches) { - for (const k in matches.groups) { - matches.groups[k] = typeof matches.groups[k] === 'string' ? decodeURIComponent(matches.groups[k]) : matches.groups[k]; - } - return { params: matches.groups, query: parse(query) }; - } - - return false; - } - - /** - * Hydrate and return a complete URL for this route with the given parameters. - * - * @param {Object} params - * @return {String} - */ - compile(params) { - const segments = this.parameterSegments; - - if (!segments.length) return this.template; - - return this.template.replace(/{([^}?]+)(\??)}/g, (_, segment, optional) => { - // If the parameter is missing but is not optional, throw an error - if (!optional && [null, undefined].includes(params[segment])) { - throw new Error(`Ziggy error: '${segment}' parameter is required for route '${this.name}'.`) - } - - if (segments[segments.length - 1].name === segment && this.wheres[segment] === '.*') { - return encodeURIComponent(params[segment] ?? '').replace(/%2F/g, '/'); - } - - if (this.wheres[segment] && !new RegExp(`^${optional ? `(${this.wheres[segment]})?` : this.wheres[segment]}$`).test(params[segment] ?? '')) { - throw new Error(`Ziggy error: '${segment}' parameter does not match required format '${this.wheres[segment]}' for route '${this.name}'.`) - } - - return encodeURIComponent(params[segment] ?? ''); - }).replace(`${this.origin}//`, `${this.origin}/`).replace(/\/+$/, ''); - } -} diff --git a/src/js/Route.ts b/src/js/Route.ts new file mode 100644 index 00000000..0360a417 --- /dev/null +++ b/src/js/Route.ts @@ -0,0 +1,152 @@ +import { parse } from "qs"; +import { NormalizedRouteParams, RouteConfig, RouteDefinition, RouteMatchResult, RouteName } from "."; + +/** + * A Laravel route. This class represents one route and its configuration and metadata. + */ +export default class Route { + readonly bindings: Record; + readonly wheres: any; + + /** + * @param name - Route name. + * @param definition - Route definition. + * @param config - Ziggy configuration. + */ + constructor(public readonly name: Name, public readonly definition: RouteDefinition, public readonly config: RouteConfig) { + this.bindings = definition.bindings ?? {}; + this.wheres = definition.wheres ?? {}; + } + + /** + * Get a 'template' of the complete URL for this route. + * + * @example + * https://{team}.ziggy.dev/user/{user} + * + * @return Route template. + */ + get template(): string { + return `${this.origin}/${this.definition.uri}`.replace(/\/+$/, ""); + } + + /** + * Get a template of the origin for this route. + * + * @example + * https://{team}.ziggy.dev/ + * + * @return Route origin template. + */ + get origin(): string { + // If we're building just a path there's no origin, otherwise: if this route has a + // domain configured we construct the origin with that, if not we use the app URL + return !this.config.absolute + ? "" + : this.definition.domain + ? `${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain + }${this.config.port ? `:${this.config.port}` : ""}` + : this.config.url; + } + + /** + * Get an array of objects representing the parameters that this route accepts. + * + * @example + * [{ name: 'team', required: true }, { name: 'user', required: false }] + * + * @return {Array} Parameter segments. + */ + get parameterSegments() { + return ( + this.template.match(/{[^}?]+\??}/g)?.map((segment) => ({ + name: segment.replace(/{|\??}/g, ""), + required: !/\?}$/.test(segment), + })) ?? [] + ); + } + + /** + * Get whether this route's template matches the given URL. + * + * @param url - URL to check. + * @return If this route matches, returns the matched parameters. + */ + matchesUrl(url: string): RouteMatchResult | false { + if (!this.definition.methods.includes("GET")) return false; + + // Transform the route's template into a regex that will match a hydrated URL, + // by replacing its parameter segments with matchers for parameter values + const pattern = this.template + .replace(/(\/?){([^}?]*)(\??)}/g, (_, slash, segment, optional) => { + const regex = `(?<${segment}>${this.wheres[segment]?.replace(/(^\^)|(\$$)/g, "") || + "[^/?]+" + })`; + return optional ? `(${slash}${regex})?` : `${slash}${regex}`; + }) + .replace(/^\w+:\/\//, ""); + + const [location, query] = url.replace(/^\w+:\/\//, "").split("?"); + + const matches = new RegExp(`^${pattern}/?$`).exec(location); + + if (matches) { + for (const k in matches.groups) { + matches.groups[k] = + typeof matches.groups[k] === "string" + ? decodeURIComponent(matches.groups[k]) + : matches.groups[k]; + } + return { params: matches.groups, query: parse(query) }; + } + + return false; + } + + /** + * Hydrate and return a complete URL for this route with the given parameters. + */ + compile(params: NormalizedRouteParams): string { + const segments = this.parameterSegments; + + if (!segments.length) return this.template; + + return this.template + .replace(/{([^}?]+)(\??)}/g, (_, segment: keyof typeof params & string, optional) => { + // If the parameter is missing but is not optional, throw an error + if (!optional && [null, undefined].includes(params[segment])) { + throw new Error( + `Ziggy error: '${segment}' parameter is required for route '${this.name}'.` + ); + } + + if ( + segments[segments.length - 1].name === segment && + this.wheres[segment] === ".*" + ) { + return encodeURIComponent(params[segment] ?? "").replace( + /%2F/g, + "/" + ); + } + + if ( + this.wheres[segment] && + !new RegExp( + `^${optional + ? `(${this.wheres[segment]})?` + : this.wheres[segment] + }$` + ).test(params[segment] as string ?? "") + ) { + throw new Error( + `Ziggy error: '${segment}' parameter does not match required format '${this.wheres[segment]}' for route '${this.name}'.` + ); + } + + return encodeURIComponent(params[segment] ?? ""); + }) + .replace(`${this.origin}//`, `${this.origin}/`) + .replace(/\/+$/, ""); + } +} diff --git a/src/js/Router.js b/src/js/Router.ts similarity index 71% rename from src/js/Router.js rename to src/js/Router.ts index efd95443..26738736 100644 --- a/src/js/Router.js +++ b/src/js/Router.ts @@ -1,17 +1,27 @@ import { stringify } from 'qs'; +import { Config, NormalizedRouteParams, ParameterValue, RouteConfig, RouteDefinition, RouteMatchResult, RouteName, RouteParams, RouteParamsObject } from '.'; import Route from './Route'; +type _Unresolve = RouteMatchResult & { name: string, route: RouteDefinition } +declare global { + var Ziggy: Config +} + /** * A collection of Laravel routes. This class constitutes Ziggy's main API. */ -export default class Router extends String { +export default class Router extends String { + private readonly _config: RouteConfig; + private readonly _params: NormalizedRouteParams; + private readonly _route: Route + /** - * @param {String} [name] - Route name. - * @param {(String|Number|Array|Object)} [params] - Route parameters. - * @param {Boolean} [absolute] - Whether to include the URL origin. - * @param {Object} [config] - Ziggy configuration. + * @param name Route name. + * @param params Route parameters. + * @param absolute Whether to include the URL origin. + * @param config Ziggy configuration. */ - constructor(name, params, absolute = true, config) { + constructor(name?: Name, params?: RouteParams, absolute = true, config?: Config) { super(); this._config = config ?? (typeof Ziggy !== 'undefined' ? Ziggy : globalThis?.Ziggy); @@ -23,7 +33,7 @@ export default class Router extends String { } this._route = new Route(name, this._config.routes[name], this._config); - this._params = this._parse(params); + this._params = this._parse(params, this._route); } } @@ -43,12 +53,13 @@ export default class Router extends String { .filter((key) => key !== '_query') .reduce((result, current) => ({ ...result, [current]: this._params[current] }), {}); - return this._route.compile(this._params) + stringify({ ...unhandled, ...this._params['_query'] }, { + const query = this._params['_query'] ?? {}; + return this._route.compile(this._params) + stringify({ ...unhandled, ...query }, { addQueryPrefix: true, arrayFormat: 'indices', encodeValuesOnly: true, skipNulls: true, - encoder: (value, encoder) => typeof value === 'boolean' ? Number(value) : encoder(value), + encoder: (value, encoder) => typeof value === 'boolean' ? Number(value).toString() : encoder(value), }); } @@ -58,7 +69,7 @@ export default class Router extends String { * @param {String} [url] - The URL to inspect, defaults to the current window URL. * @return {{ name: string, params: Object, query: Object, route: Route }} */ - _unresolve(url) { + _unresolve(url?: string): _Unresolve { if (!url) { url = this._currentUrl(); } else if (this._config.absolute && url.startsWith('/')) { @@ -67,12 +78,14 @@ export default class Router extends String { url = this._location().host + url; } - let matchedParams = {}; - const [name, route] = Object.entries(this._config.routes).find( - ([name, route]) => (matchedParams = new Route(name, route, this._config).matchesUrl(url)) - ) || [undefined, undefined]; + const routes = Object.entries(this._config.routes); + for (const [name, route] of routes) { + const matchedParams = new Route(name, route, this._config).matchesUrl(url); + if (matchedParams) + return { name, ...matchedParams, route }; + } - return { name, ...matchedParams, route }; + return {} as _Unresolve; } _currentUrl() { @@ -97,12 +110,15 @@ export default class Router extends String { * route().current('posts.show', { post: 1 }); // false * route().current('posts.show', { post: 4 }); // true * - * @param {String} [name] - Route name to check. - * @param {(String|Number|Array|Object)} [params] - Route parameters. - * @return {(Boolean|String|undefined)} + * @param name Route name to check. + * @param params Route parameters. */ - current(name, params) { - const { name: current, params: currentParams, query, route } = this._unresolve(); + current(name?: CurrentName, params?: RouteParams | null): boolean | string | void { + params ??= {} as RouteParams; + const unresolve = this._unresolve(); + if (!unresolve) return; + + const { name: current, params: currentParams, query, route } = unresolve; // If a name wasn't passed, return the name of the current route if (!name) return current; @@ -113,17 +129,17 @@ export default class Router extends String { if ([null, undefined].includes(params) || !match) return match; - const routeObject = new Route(current, route, this._config); + const routeObject = new Route(current as CurrentName, route, this._config); - params = this._parse(params, routeObject); + const normalizedParams = this._parse(params, routeObject); const routeParams = { ...currentParams, ...query }; // If the current window URL has no route parameters, and the passed parameters are empty, return true - if (Object.values(params).every(p => !p) && !Object.values(routeParams).some(v => v !== undefined)) return true; + if (Object.values(normalizedParams).every(p => !p) && !Object.values(routeParams).some(v => v !== undefined)) return true; // Check that all passed parameters match their values in the current window URL // Use weak equality because all values in the current window URL will be strings - return Object.entries(params).every(([key, value]) => routeParams[key] == value); + return Object.entries(normalizedParams).every(([key, value]) => routeParams[key] == value); } /** @@ -152,7 +168,7 @@ export default class Router extends String { * @return {Object} */ get params() { - const { params, query } = this._unresolve(); + const { params, query } = this._unresolve() || {}; return { ...params, ...query }; } @@ -178,26 +194,29 @@ export default class Router extends String { * _parse([4, { uuid: 56789, name: 'Grand Canyon' }]); // { event: 4, venue: 56789 } * * @param {(String|Number|Array|Object)} params - Route parameters. - * @param {Route} route - Route instance. + * @param {CurrentName} route - Route instance. * @return {Object} Normalized complete route parameters. */ - _parse(params = {}, route = this._route) { - params ??= {} - - // If `params` is a string or integer, wrap it in an array - params = ['string', 'number'].includes(typeof params) ? [params] : params; + _parse(params: ParameterValue | RouteParams, route: Route): NormalizedRouteParams { + params ??= {} as RouteParamsObject; // Separate segments with and without defaults, and fill in the default values const segments = route.parameterSegments.filter(({ name }) => !this._config.defaults[name]); - if (Array.isArray(params)) { + let paramsObject = {} as RouteParamsObject + + if (typeof params === 'number' || typeof params === 'string') { + const [segment] = segments; + paramsObject = (segment ? { [segment.name]: params } : { [params]: "" }) as RouteParamsObject; + } + else if (params instanceof Array) { // If the parameters are an array they have to be in order, so we can transform them into // an object by keying them with the template segment names in the order they appear - params = params.reduce((result, current, i) => segments[i] + paramsObject = params.reduce((result, current, i) => segments[i] ? ({ ...result, [segments[i].name]: current }) : typeof current === 'object' ? ({ ...result, ...current }) - : ({ ...result, [current]: '' }), {}); + : ({ ...result, [current]: '' }), {} as RouteParamsObject); } else if ( segments.length === 1 && !params[segments[0].name] @@ -207,12 +226,14 @@ export default class Router extends String { // ambiguous—it could contain the parameter key and value, or it could be an object // representing just the value (e.g. a model); we can inspect it to find out, and // if it's just the parameter value, we can wrap it in an object with its key - params = { [segments[0].name]: params }; + paramsObject = { [segments[0].name]: params } as RouteParamsObject; + } else if (params) { + paramsObject = params; } return { ...this._defaults(route), - ...this._substituteBindings(params, route), + ...this._substituteBindings(paramsObject, route), }; } @@ -223,7 +244,7 @@ export default class Router extends String { * // with default parameters { locale: 'en', country: 'US' } and 'posts.show' route '{locale}/posts/{post}' * defaults(...); // { locale: 'en' } * - * @param {Route} route + * @param {Name} route * @return {Object} Default route parameters. */ _defaults(route) { @@ -237,11 +258,11 @@ export default class Router extends String { * @example * _substituteBindings({ post: { id: 4, slug: 'hello-world', title: 'Hello, world!' } }, { bindings: { post: 'slug' } }); // { post: 'hello-world' } * - * @param {Object} params - Route parameters. - * @param {Object} route - Route definition. - * @return {Object} Normalized route parameters. + * @param params Route parameters. + * @param route Route definition. + * @return Normalized route parameters. */ - _substituteBindings(params, { bindings, parameterSegments }) { + _substituteBindings(params: RouteParamsObject, { bindings, parameterSegments }: Route) { return Object.entries(params).reduce((result, [key, value]) => { // If the value isn't an object, or if the key isn't a named route parameter, // there's nothing to substitute so we return it as-is @@ -259,7 +280,7 @@ export default class Router extends String { } return { ...result, [key]: value[bindings[key]] }; - }, {}); + }, {}) as NormalizedRouteParams; } valueOf() { diff --git a/src/js/index.js b/src/js/index.js deleted file mode 100644 index 2b9dd5d3..00000000 --- a/src/js/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import Router from './Router'; - -export default function route(name, params, absolute, config) { - const router = new Router(name, params, absolute, config); - - return name ? router.toString() : router; -} diff --git a/src/js/index.ts b/src/js/index.ts new file mode 100644 index 00000000..2654e6c0 --- /dev/null +++ b/src/js/index.ts @@ -0,0 +1,24 @@ +import Router from "./Router"; +import { Config, RouteName, RouteParams } from "./types"; +export * from "./types"; + +export default function route(): Router; +export default function route( + name: T, + params?: RouteParams | null, + absolute?: boolean, + config?: Config +): string; +export default function route(name: undefined, params: undefined, absolute: boolean): Router; +export default function route(name: undefined, params: undefined, absolute?: boolean, config?: Config): Router; +export default function route( + name?: string, + params?: any, + absolute = true, + config?: Config +) { + const router = new Router(name, params, absolute, config); + + return name ? router.toString() : router; +} + diff --git a/src/js/types.ts b/src/js/types.ts new file mode 100644 index 00000000..19b774f6 --- /dev/null +++ b/src/js/types.ts @@ -0,0 +1,87 @@ +import { ParsedQs } from "qs"; + +/** + * Offers the route lookup to be merged with declarations emitted from ts generator + */ +export interface RouteLookup { + // +} + +type _ParameterBindingDefinition = { name: string, binding: string } | { name: string } +type _BindingOrValue = T extends { binding: string } ? ParameterBinding : ParameterValue + +/** Type of the values a parameter can be passed as. */ +export type ParameterValue = string | number; +/** A parameter as object or primitive */ +export type ParameterBinding = { [K in Name]: ParameterValue } | ParameterValue; + +/** Ordered array containing the paramters required to hydrate a route */ +export type RouteParamsArray = Name extends keyof RouteLookup ? _RouteParamsArray : GenericRouteParamsArray; +type _RouteParamsArray = { [K in keyof T]: _BindingOrValue | null }; + +/** Object containing the paramters required to hydrate a route. */ +export type RouteParamsObject = Name extends keyof RouteLookup ? _RouteParamsObject & QueryObject : GenericRouteParamsObject & QueryObject; +type _RouteParamsObject = { [Item in T[number]as Item['name']]?: _BindingOrValue | null }; + +/** Object containing the normalized paramters required to hydrate a route. */ +export type NormalizedRouteParams = Route extends keyof RouteLookup ? Record, ParameterValue> & _NormalizedRouteParams : _NormalizedRouteParams; +export type _NormalizedRouteParams = Record & QueryObject; + +export type GenericRouteParamsArray = _BindingOrValue<_ParameterBindingDefinition>[]; +export type GenericRouteParamsObject = QueryObject & Record; +export type GenericRouteParams = GenericRouteParamsArray | GenericRouteParamsObject | ParameterValue; + +export type QueryObject = { _query?: Record }; +/** + * Holds any known route name or an arbitrary string. + */ +export type RouteName = keyof RouteLookup | (string & {}); +/** + * The parameters type to hydrate a route. + */ +export type RouteParams = RouteParamsArray | RouteParamsObject | ParameterValue; +/** + * Normalized route parameters + */ +// export type NormalizedRouteParams = (Name extends keyof RouteLookup ? Record : Record) & { _query: Record }; + + + + +export interface Config { + routes: { + [key: string]: RouteDefinition; + }; + url: string; + port: number | null; + location?: Location; + defaults: { + [key: string]: ParameterValue; + }; +} + +export type RouteMethods = + | "GET" + | "HEAD" + | "POST" + | "PATCH" + | "PUT" + | "OPTIONS" + | "DELETE"; + +export interface RouteConfig extends Config { + absolute?: boolean; +} +export interface RouteDefinition { + wheres?: any; + bindings?: Record; + uri: string; + domain?: string; + methods: RouteMethods[]; +} + +export interface RouteMatchResult { + params: NormalizedRouteParams; + query: ParsedQs; +} + diff --git a/src/js/vue.js b/src/js/vue.ts similarity index 100% rename from src/js/vue.js rename to src/js/vue.ts diff --git a/tests/js/route.test.js b/tests/js/route.test.ts similarity index 95% rename from tests/js/route.test.js rename to tests/js/route.test.ts index 2e192216..07a747e7 100644 --- a/tests/js/route.test.js +++ b/tests/js/route.test.ts @@ -3,7 +3,15 @@ */ import assert, { deepEqual, strictEqual as same, throws } from 'assert'; -import route from '../../src/js'; +import route, { Config, RouteDefinition } from '../../src/js'; + +declare global { + export interface Window { + Ziggy: Config; + location: Location; + } + export var Ziggy: Config; +} const defaultWindow = { location: { @@ -11,7 +19,7 @@ const defaultWindow = { }, }; -const defaultZiggy = { +const defaultZiggy: Config = { url: 'https://ziggy.dev', port: null, defaults: { locale: 'en' }, @@ -202,12 +210,12 @@ const defaultZiggy = { }; beforeAll(() => { - delete window.location; - window.location = {}; + delete (window as any).location; + window.location = {} as Location; }); beforeEach(() => { - window.location = { ...defaultWindow.location }; + (window as any).location = { ...defaultWindow.location }; global.window.location = window.location; global.Ziggy = { ...defaultZiggy }; }); @@ -495,7 +503,7 @@ describe('route()', () => { }); test('can accept a custom Ziggy configuration object', () => { - const config = { + const config: Config = { url: 'http://notYourAverage.dev', port: null, defaults: { locale: 'en' }, @@ -503,7 +511,7 @@ describe('route()', () => { 'tightenDev.packages.index': { uri: 'tightenDev/{dev}/packages', methods: ['GET', 'HEAD'], - }, + } as RouteDefinition, }, }; @@ -579,7 +587,7 @@ describe('route()', () => { test("can append 'extra' string/number parameter to query", () => { // 'posts.index' has no parameters same(route('posts.index', 'extra'), 'https://ziggy.dev/posts?extra='); - same(route('posts.index', [{extra: 2}]), 'https://ziggy.dev/posts?extra=2'); + same(route('posts.index', [{ extra: 2 }]), 'https://ziggy.dev/posts?extra=2'); same(route('posts.index', 1), 'https://ziggy.dev/posts?1='); }); @@ -706,17 +714,18 @@ describe('current()', () => { }); test('can get the current route name with a custom Ziggy object', () => { - global.Ziggy = undefined; + delete (global as any).Ziggy; global.window.location.pathname = '/events/'; - const config = { + const config: Config = { url: 'https://ziggy.dev', port: null, + defaults: {}, routes: { 'events.index': { uri: 'events', methods: ['GET', 'HEAD'], - }, + } as RouteDefinition, }, }; @@ -773,7 +782,7 @@ describe('current()', () => { same(route().current('pages.complexWhereConflict1'), false); global.window.location.pathname = '/where/complex-12/required/file'; - same(route().current('pages.complexWhere', {word: 'complex', digit: '12', required: 'required'}), true); + same(route().current('pages.complexWhere', { word: 'complex', digit: '12', required: 'required' }), true); same(route().current('pages.complexWhereConflict1'), false); global.window.location.pathname = '/where/123-abc/required/file.html'; @@ -787,28 +796,29 @@ describe('current()', () => { test('can current route with complex requirements is dehydrated correctly', () => { global.window.location.pathname = '/where/word-12/required/file'; - deepEqual(route().params, {digit: '12', word: 'word', required: 'required', optional: undefined, extension: undefined}) + deepEqual(route().params, { digit: '12', word: 'word', required: 'required', optional: undefined, extension: undefined }) global.window.location.pathname = '/where/complex-12/required/optional/file'; - deepEqual(route().params, {digit: '12', word: 'complex', required: 'required', optional: 'optional', extension: undefined}) + deepEqual(route().params, { digit: '12', word: 'complex', required: 'required', optional: 'optional', extension: undefined }) global.window.location.pathname = '/where/123-abc/required/file.html'; - deepEqual(route().params, {digit: '123', word: 'abc', required: 'required', optional: undefined, extension: '.html'}) + deepEqual(route().params, { digit: '123', word: 'abc', required: 'required', optional: undefined, extension: '.html' }) global.window.location.pathname = '/where/complex-12/different_but_required/optional/file'; - deepEqual(route().params, {digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined}) + deepEqual(route().params, { digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined }) global.window.location.search = '?ab=cd&ef=1&dd'; - deepEqual(route().params, {digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined, ab: 'cd', ef: '1', 'dd': ''}) + deepEqual(route().params, { digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined, ab: 'cd', ef: '1', 'dd': '' }) }); test('can strip regex start and end of string tokens from wheres', () => { - global.Ziggy = undefined; + (global as any).Ziggy = undefined; global.window.location.pathname = '/workspace/processes'; - const config = { + const config: Config = { url: 'https://ziggy.dev', port: null, + defaults: {}, routes: { 'workspaces.processes.index': { uri: '{workspace}/processes', @@ -816,7 +826,7 @@ describe('current()', () => { wheres: { workspace: '^(?!api|nova-api|horizon).*$', }, - }, + } as RouteDefinition, }, }; @@ -1079,22 +1089,14 @@ describe('current()', () => { same(route().current('events.venues.*'), false); }); - test.skip('can unresolve arbitrary urls to names and params', () => { - const resolved = route().unresolve('https://ziggy.dev/events/1/venues?test=yes'); - deepEqual(resolved, { name: 'events.venues.index', params: {event: '1'}, query: {test: 'yes'}, route: resolved.route }); - same(resolved.route.uri, 'events/{event}/venues'); - - same(route().unresolve('ziggy.dev/events/1/venues-index').name, 'events.venues-index'); - same(route().unresolve('/events/1/venues-index').name, 'events.venues-index'); - }); - test('can get the current route name without window', () => { - global.Ziggy = undefined; - global.window = undefined; + (global as any).Ziggy = undefined; + delete (global as any).window; - const config = { + const config: Config = { url: 'https://ziggy.dev', port: null, + defaults: {}, routes: { 'events.venues.show': { uri: 'events/{event}/venues/{venue}', @@ -1103,13 +1105,13 @@ describe('current()', () => { event: 'id', venue: 'id', }, - }, + } as RouteDefinition, }, location: { host: 'ziggy.dev', pathname: '/events/1/venues/2', search: '?user=Jacob&id=9', - }, + } as Location, }; same(route(undefined, undefined, undefined, config).current(), 'events.venues.show'); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..0b85c047 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "ESNext", + "lib": ["DOM", "ES2020"], + "declaration": true, + "allowJs": true, + "strict": true, + "noImplicitAny": false, + "strictNullChecks": false, + "moduleResolution": "NodeNext", + "esModuleInterop": true + }, + "exclude": ["node_modules"], + "include": ["src/js/*.ts", "test/js/*.ts"] +} From 3a71ad5870572bb683ef9ed25fed31a1bfc67573 Mon Sep 17 00:00:00 2001 From: lmeysel Date: Thu, 27 Jul 2023 15:25:18 +0200 Subject: [PATCH 02/56] Implement TS declaration generator --- dist/types/Router.d.ts | 2 +- dist/types/vite-plugin.d.ts | 18 + dist/vite-plugin.es.js | 2219 +++++++++++++++++++++ dist/vite-plugin.es.js.map | 1 + dist/vite-plugin.js | 2225 ++++++++++++++++++++++ dist/vite-plugin.js.map | 1 + dist/vite-plugin.m.js | 2219 +++++++++++++++++++++ dist/vite-plugin.m.js.map | 1 + package-lock.json | 708 ++++++- package.json | 20 +- src/CommandRouteGenerator.php | 43 +- src/TypeScriptDeclarationGenerator.php | 64 + src/Ziggy.php | 13 +- src/js/vite-plugin.ts | 97 + tests/Unit/CommandRouteGeneratorTest.php | 38 + tests/Unit/DeclarationGeneratorTest.php | 50 + 16 files changed, 7693 insertions(+), 26 deletions(-) create mode 100644 dist/types/vite-plugin.d.ts create mode 100644 dist/vite-plugin.es.js create mode 100644 dist/vite-plugin.es.js.map create mode 100644 dist/vite-plugin.js create mode 100644 dist/vite-plugin.js.map create mode 100644 dist/vite-plugin.m.js create mode 100644 dist/vite-plugin.m.js.map create mode 100644 src/TypeScriptDeclarationGenerator.php create mode 100644 src/js/vite-plugin.ts create mode 100644 tests/Unit/DeclarationGeneratorTest.php diff --git a/dist/types/Router.d.ts b/dist/types/Router.d.ts index 4434d319..393b9ae0 100644 --- a/dist/types/Router.d.ts +++ b/dist/types/Router.d.ts @@ -77,7 +77,7 @@ export default class Router extends String { * @return {Object} */ get params(): { - [x: string]: ParameterValue | string[] | import("qs").ParsedQs | import("qs").ParsedQs[]; + [x: string]: string[] | ParameterValue | import("qs").ParsedQs | import("qs").ParsedQs[]; _query?: Record; }; /** diff --git a/dist/types/vite-plugin.d.ts b/dist/types/vite-plugin.d.ts new file mode 100644 index 00000000..2a24a23d --- /dev/null +++ b/dist/types/vite-plugin.d.ts @@ -0,0 +1,18 @@ +import { Plugin } from 'vite'; +export interface ZiggyPluginConfig { + /** + * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running. + */ + sail?: boolean | 'auto'; + /** + * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file. + */ + declarations?: boolean | 'only'; + /** + * Destination path where ziggy output files should be placed. + */ + destination?: string; + log?: boolean; + delay?: number; +} +export default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin; diff --git a/dist/vite-plugin.es.js b/dist/vite-plugin.es.js new file mode 100644 index 00000000..2ed55b80 --- /dev/null +++ b/dist/vite-plugin.es.js @@ -0,0 +1,2219 @@ +import { exec } from 'child_process'; +import { existsSync } from 'fs'; +import path, { resolve, relative } from 'path'; +import tty from 'tty'; +import { normalizePath } from 'vite'; + +let isColorSupported = + !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && + ("FORCE_COLOR" in process.env || + process.argv.includes("--color") || + process.platform === "win32" || + (tty.isatty(1) && process.env.TERM !== "dumb") || + "CI" in process.env); + +let formatter = + (open, close, replace = open) => + input => { + let string = "" + input; + let index = string.indexOf(close, open.length); + return ~index + ? open + replaceClose(string, close, replace, index) + close + : open + string + close + }; + +let replaceClose = (string, close, replace, index) => { + let start = string.substring(0, index) + replace; + let end = string.substring(index + close.length); + let nextIndex = end.indexOf(close); + return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end +}; + +let createColors = (enabled = isColorSupported) => ({ + isColorSupported: enabled, + reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, + bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, + dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, + italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, + underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, + inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, + hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, + strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, + black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, + red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, + green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, + yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, + blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, + magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, + cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, + white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, + gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, + bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, + bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, + bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, + bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, + bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, + bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, + bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, + bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, +}); + +var picocolors = createColors(); +var createColors_1 = createColors; + +var colors = picocolors; +picocolors.createColors = createColors_1; + +function createCommonjsModule(fn) { + var module = { exports: {} }; + return fn(module, module.exports), module.exports; +} + +const WIN_SLASH = '\\\\/'; +const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + +/** + * Posix glob regex + */ + +const DOT_LITERAL = '\\.'; +const PLUS_LITERAL = '\\+'; +const QMARK_LITERAL = '\\?'; +const SLASH_LITERAL = '\\/'; +const ONE_CHAR = '(?=.)'; +const QMARK = '[^/]'; +const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; +const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; +const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; +const NO_DOT = `(?!${DOT_LITERAL})`; +const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; +const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; +const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; +const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; +const STAR = `${QMARK}*?`; + +const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR +}; + +/** + * Windows glob regex + */ + +const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` +}; + +/** + * POSIX Bracket Regex + */ + +const POSIX_REGEX_SOURCE$1 = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + +var constants = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + SEP: path.sep, + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } +}; + +var utils = createCommonjsModule(function (module, exports) { + + +const win32 = process.platform === 'win32'; +const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL +} = constants; + +exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); +exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); +exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); +exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + +exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); +}; + +exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split('.').map(Number); + if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { + return true; + } + return false; +}; + +exports.isWindows = options => { + if (options && typeof options.windows === 'boolean') { + return options.windows; + } + return win32 === true || path.sep === '\\'; +}; + +exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; +}; + +exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; +}; + +exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; +}; +}); + +const { + CHAR_ASTERISK, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET /* ] */ +} = constants; + +const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +}; + +const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } +}; + +/** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + +const scan = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; +}; + +var scan_1 = scan; + +/** + * Constants + */ + +const { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS +} = constants; + +/** + * Helpers + */ + +const expandRange = (args, options) => { + if (typeof options.expandRange === 'function') { + return options.expandRange(...args, options); + } + + args.sort(); + const value = `[${args.join('-')}]`; + + try { + /* eslint-disable-next-line no-new */ + new RegExp(value); + } catch (ex) { + return args.map(v => utils.escapeRegex(v)).join('..'); + } + + return value; +}; + +/** + * Create the message for a syntax error + */ + +const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; +}; + +/** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + +const parse = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + input = REPLACEMENTS[input] || input; + + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + const bos = { type: 'bos', value: '', output: opts.prepend || '' }; + const tokens = [bos]; + + const capture = opts.capture ? '' : '?:'; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + + const globstar = opts => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const nodot = opts.dot ? '' : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + // minimatch options support + if (typeof opts.noext === 'boolean') { + opts.noextglob = opts.noext; + } + + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: '', + output: '', + prefix: '', + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + + input = utils.removePrefix(input, state); + len = input.length; + + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + + /** + * Tokenizing helpers + */ + + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ''; + const remaining = () => input.slice(state.index + 1); + const consume = (value = '', num = 0) => { + state.consumed += value; + state.index += num; + }; + + const append = token => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + + const negate = () => { + let count = 1; + + while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { + advance(); + state.start++; + count++; + } + + if (count % 2 === 0) { + return false; + } + + state.negated = true; + state.start++; + return true; + }; + + const increment = type => { + state[type]++; + stack.push(type); + }; + + const decrement = type => { + state[type]--; + stack.pop(); + }; + + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + + const push = tok => { + if (prev.type === 'globstar') { + const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); + const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); + + if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = 'star'; + prev.value = '*'; + prev.output = star; + state.output += prev.output; + } + } + + if (extglobs.length && tok.type !== 'paren') { + extglobs[extglobs.length - 1].inner += tok.value; + } + + if (tok.value || tok.output) append(tok); + if (prev && prev.type === 'text' && tok.type === 'text') { + prev.value += tok.value; + prev.output = (prev.output || '') + tok.value; + return; + } + + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + + const extglobOpen = (type, value) => { + const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; + + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? '(' : '') + token.open; + + increment('parens'); + push({ type, value, output: state.output ? '' : ONE_CHAR }); + push({ type: 'paren', extglob: true, value: advance(), output }); + extglobs.push(token); + }; + + const extglobClose = token => { + let output = token.close + (opts.capture ? ')' : ''); + let rest; + + if (token.type === 'negate') { + let extglobStar = star; + + if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { + extglobStar = globstar(opts); + } + + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + + if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. + // In this case, we need to parse the string and use it in the output of the original pattern. + // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. + // + // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. + const expression = parse(rest, { ...options, fastpaths: false }).output; + + output = token.close = `)${expression})${extglobStar})`; + } + + if (token.prev.type === 'bos') { + state.negatedExtglob = true; + } + } + + push({ type: 'paren', extglob: true, value, output }); + decrement('parens'); + }; + + /** + * Fast paths + */ + + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === '\\') { + backslashes = true; + return m; + } + + if (first === '?') { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ''); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); + } + return QMARK.repeat(chars.length); + } + + if (first === '.') { + return DOT_LITERAL.repeat(chars.length); + } + + if (first === '*') { + if (esc) { + return esc + first + (rest ? star : ''); + } + return star; + } + return esc ? m : `\\${m}`; + }); + + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ''); + } else { + output = output.replace(/\\+/g, m => { + return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); + }); + } + } + + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + + state.output = utils.wrapOutput(output, state, options); + return state; + } + + /** + * Tokenize input until we reach end-of-string + */ + + while (!eos()) { + value = advance(); + + if (value === '\u0000') { + continue; + } + + /** + * Escaped characters + */ + + if (value === '\\') { + const next = peek(); + + if (next === '/' && opts.bash !== true) { + continue; + } + + if (next === '.' || next === ';') { + continue; + } + + if (!next) { + value += '\\'; + push({ type: 'text', value }); + continue; + } + + // collapse slashes to reduce potential for exploits + const match = /^\\+/.exec(remaining()); + let slashes = 0; + + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += '\\'; + } + } + + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + + if (state.brackets === 0) { + push({ type: 'text', value }); + continue; + } + } + + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + + if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { + if (opts.posix !== false && value === ':') { + const inner = prev.value.slice(1); + if (inner.includes('[')) { + prev.posix = true; + + if (inner.includes(':')) { + const idx = prev.value.lastIndexOf('['); + const pre = prev.value.slice(0, idx); + const rest = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + + if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { + value = `\\${value}`; + } + + if (value === ']' && (prev.value === '[' || prev.value === '[^')) { + value = `\\${value}`; + } + + if (opts.posix === true && value === '!' && prev.value === '[') { + value = '^'; + } + + prev.value += value; + append({ value }); + continue; + } + + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + + /** + * Double quotes + */ + + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: 'text', value }); + } + continue; + } + + /** + * Parentheses + */ + + if (value === '(') { + increment('parens'); + push({ type: 'paren', value }); + continue; + } + + if (value === ')') { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '(')); + } + + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + + push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); + decrement('parens'); + continue; + } + + /** + * Square brackets + */ + + if (value === '[') { + if (opts.nobracket === true || !remaining().includes(']')) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('closing', ']')); + } + + value = `\\${value}`; + } else { + increment('brackets'); + } + + push({ type: 'bracket', value }); + continue; + } + + if (value === ']') { + if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '[')); + } + + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + decrement('brackets'); + + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { + value = `/${value}`; + } + + prev.value += value; + append({ value }); + + // when literal brackets are explicitly disabled + // assume we should match with a regex character class + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + + // when literal brackets are explicitly enabled + // assume we should escape the brackets to match literal characters + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + + // when the user specifies nothing, try to match both + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + + /** + * Braces + */ + + if (value === '{' && opts.nobrace !== true) { + increment('braces'); + + const open = { + type: 'brace', + value, + output: '(', + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + + braces.push(open); + push(open); + continue; + } + + if (value === '}') { + const brace = braces[braces.length - 1]; + + if (opts.nobrace === true || !brace) { + push({ type: 'text', value, output: value }); + continue; + } + + let output = ')'; + + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === 'brace') { + break; + } + if (arr[i].type !== 'dots') { + range.unshift(arr[i].value); + } + } + + output = expandRange(range, opts); + state.backtrack = true; + } + + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = '\\{'; + value = output = '\\}'; + state.output = out; + for (const t of toks) { + state.output += (t.output || t.value); + } + } + + push({ type: 'brace', value, output }); + decrement('braces'); + braces.pop(); + continue; + } + + /** + * Pipes + */ + + if (value === '|') { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: 'text', value }); + continue; + } + + /** + * Commas + */ + + if (value === ',') { + let output = value; + + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === 'braces') { + brace.comma = true; + output = '|'; + } + + push({ type: 'comma', value, output }); + continue; + } + + /** + * Slashes + */ + + if (value === '/') { + // if the beginning of the glob is "./", advance the start + // to the current index, and don't add the "./" characters + // to the state. This greatly simplifies lookbehinds when + // checking for BOS characters like "!" and "." (not "./") + if (prev.type === 'dot' && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ''; + state.output = ''; + tokens.pop(); + prev = bos; // reset "prev" to the first token + continue; + } + + push({ type: 'slash', value, output: SLASH_LITERAL }); + continue; + } + + /** + * Dots + */ + + if (value === '.') { + if (state.braces > 0 && prev.type === 'dot') { + if (prev.value === '.') prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = 'dots'; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + + if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { + push({ type: 'text', value, output: DOT_LITERAL }); + continue; + } + + push({ type: 'dot', value, output: DOT_LITERAL }); + continue; + } + + /** + * Question marks + */ + + if (value === '?') { + const isGroup = prev && prev.value === '('; + if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('qmark', value); + continue; + } + + if (prev && prev.type === 'paren') { + const next = peek(); + let output = value; + + if (next === '<' && !utils.supportsLookbehinds()) { + throw new Error('Node.js v10 or higher is required for regex lookbehinds'); + } + + if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { + output = `\\${value}`; + } + + push({ type: 'text', value, output }); + continue; + } + + if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { + push({ type: 'qmark', value, output: QMARK_NO_DOT }); + continue; + } + + push({ type: 'qmark', value, output: QMARK }); + continue; + } + + /** + * Exclamation + */ + + if (value === '!') { + if (opts.noextglob !== true && peek() === '(') { + if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { + extglobOpen('negate', value); + continue; + } + } + + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + + /** + * Plus + */ + + if (value === '+') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('plus', value); + continue; + } + + if ((prev && prev.value === '(') || opts.regex === false) { + push({ type: 'plus', value, output: PLUS_LITERAL }); + continue; + } + + if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { + push({ type: 'plus', value }); + continue; + } + + push({ type: 'plus', value: PLUS_LITERAL }); + continue; + } + + /** + * Plain text + */ + + if (value === '@') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + push({ type: 'at', extglob: true, value, output: '' }); + continue; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Plain text + */ + + if (value !== '*') { + if (value === '$' || value === '^') { + value = `\\${value}`; + } + + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Stars + */ + + if (prev && (prev.type === 'globstar' || prev.star === true)) { + prev.type = 'star'; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen('star', value); + continue; + } + + if (prev.type === 'star') { + if (opts.noglobstar === true) { + consume(value); + continue; + } + + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === 'slash' || prior.type === 'bos'; + const afterStar = before && (before.type === 'star' || before.type === 'globstar'); + + if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { + push({ type: 'star', value, output: '' }); + continue; + } + + const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); + const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); + if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { + push({ type: 'star', value, output: '' }); + continue; + } + + // strip consecutive `/**/` + while (rest.slice(0, 3) === '/**') { + const after = input[state.index + 4]; + if (after && after !== '/') { + break; + } + rest = rest.slice(3); + consume('/**', 3); + } + + if (prior.type === 'bos' && eos()) { + prev.type = 'globstar'; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { + const end = rest[1] !== void 0 ? '|$' : ''; + + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + + state.output += prior.output + prev.output; + state.globstar = true; + + consume(value + advance()); + + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + if (prior.type === 'bos' && rest[0] === '/') { + prev.type = 'globstar'; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + // remove single star from output + state.output = state.output.slice(0, -prev.output.length); + + // reset previous token to globstar + prev.type = 'globstar'; + prev.output = globstar(opts); + prev.value += value; + + // reset output with globstar + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + + const token = { type: 'star', value, output: star }; + + if (opts.bash === true) { + token.output = '.*?'; + if (prev.type === 'bos' || prev.type === 'slash') { + token.output = nodot + token.output; + } + push(token); + continue; + } + + if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { + token.output = value; + push(token); + continue; + } + + if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { + if (prev.type === 'dot') { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + + } else { + state.output += nodot; + prev.output += nodot; + } + + if (peek() !== '*') { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + + push(token); + } + + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); + state.output = utils.escapeLast(state.output, '['); + decrement('brackets'); + } + + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); + state.output = utils.escapeLast(state.output, '('); + decrement('parens'); + } + + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); + state.output = utils.escapeLast(state.output, '{'); + decrement('braces'); + } + + if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { + push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); + } + + // rebuild the output if we had to backtrack at any point + if (state.backtrack === true) { + state.output = ''; + + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + + if (token.suffix) { + state.output += token.suffix; + } + } + } + + return state; +}; + +/** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + +parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(win32); + + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? '' : '?:'; + const state = { negated: false, prefix: '' }; + let star = opts.bash === true ? '.*?' : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + const globstar = opts => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const create = str => { + switch (str) { + case '*': + return `${nodot}${ONE_CHAR}${star}`; + + case '.*': + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*.*': + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*/*': + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + + case '**': + return nodot + globstar(opts); + + case '**/*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + + case '**/*.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '**/.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + + const source = create(match[1]); + if (!source) return; + + return source + DOT_LITERAL + match[2]; + } + } + }; + + const output = utils.removePrefix(input, state); + let source = create(output); + + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + + return source; +}; + +var parse_1 = parse; + +const isObject = val => val && typeof val === 'object' && !Array.isArray(val); + +/** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + +const picomatch$1 = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch$1(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState + ? picomatch$1.compileRe(glob, options) + : picomatch$1.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; +}; + +/** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + +picomatch$1.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch$1.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; +}; + +/** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + +picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options); + return regex.test(path.basename(input)); +}; + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + +picomatch$1.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options)); + return parse_1(pattern, { ...options, fastpaths: false }); +}; + +/** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +picomatch$1.scan = (input, options) => scan_1(input, options); + +/** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + +picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch$1.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + + return regex; +}; + +/** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + let parsed = { negated: false, fastpaths: true }; + + if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + parsed.output = parse_1.fastpaths(input, options); + } + + if (!parsed.output) { + parsed = parse_1(input, options); + } + + return picomatch$1.compileRe(parsed, options, returnOutput, returnState); +}; + +/** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +picomatch$1.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } +}; + +/** + * Picomatch constants. + * @return {Object} + */ + +picomatch$1.constants = constants; + +/** + * Expose "picomatch" + */ + +var picomatch_1 = picomatch$1; + +var picomatch = picomatch_1; + +function ZiggyPlugin(config) { + const { + log = true, + delay = 0, + destination, + declarations + } = config; + let { + sail + } = config; + const root = process.cwd(); + const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`; + let proc = null; + + function command() { + if (proc) { + proc.kill('SIGINT'); + } + + return new Promise((done, reject) => { + if (sail) { + if (existsSync(resolve(root, 'vendor/bin/sail'))) { + proc = exec(`vendor/bin/sail ${commandArgs}`); + proc.on('close', (code, signal) => { + proc = null; + }); + } else { + sail = false; + return command(); + } + } else { + proc = exec(`php ${commandArgs}`); + } + + proc.on('close', (code, signal) => { + if (code === 0) { + proc = null; + done(); + } + }); + proc.on('error', error => { + reject(error); + }); + }); + } + + return { + name: 'ziggy-plugin', + enforce: 'pre', + // NOTE: Enable globbing so that Vite keeps track of the template files. + config: () => ({ + server: { + watch: { + disableGlobbing: false + } + } + }), + + configureServer(server) { + const files = normalizePath(resolve(root, 'routes/**')); + command(); + const shouldReload = picomatch(files); + + const checkReload = path => { + if (shouldReload(path)) { + setTimeout(command, delay); + + if (log) { + server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { + clear: true, + timestamp: true + }); + } + } + }; // Ensure Vite keeps track of the files and triggers generation as needed. + + + server.watcher.add(files); // Perform a generation if any of the watched files changes. + + server.watcher.on('add', checkReload); + server.watcher.on('change', checkReload); + }, + + buildStart() { + command(); + } + + }; +} + +export { ZiggyPlugin as default }; diff --git a/dist/vite-plugin.es.js.map b/dist/vite-plugin.es.js.map new file mode 100644 index 00000000..ae2c1c9a --- /dev/null +++ b/dist/vite-plugin.es.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vite-plugin.es.js","sources":["../node_modules/picocolors/picocolors.js","../node_modules/picomatch/lib/constants.js","../node_modules/picomatch/lib/utils.js","../node_modules/picomatch/lib/scan.js","../node_modules/picomatch/lib/parse.js","../node_modules/picomatch/lib/picomatch.js","../node_modules/picomatch/index.js","../src/js/vite-plugin.ts"],"sourcesContent":["let tty = require(\"tty\")\n\nlet isColorSupported =\n\t!(\"NO_COLOR\" in process.env || process.argv.includes(\"--no-color\")) &&\n\t(\"FORCE_COLOR\" in process.env ||\n\t\tprocess.argv.includes(\"--color\") ||\n\t\tprocess.platform === \"win32\" ||\n\t\t(tty.isatty(1) && process.env.TERM !== \"dumb\") ||\n\t\t\"CI\" in process.env)\n\nlet formatter =\n\t(open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input\n\t\tlet index = string.indexOf(close, open.length)\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet start = string.substring(0, index) + replace\n\tlet end = string.substring(index + close.length)\n\tlet nextIndex = end.indexOf(close)\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end\n}\n\nlet createColors = (enabled = isColorSupported) => ({\n\tisColorSupported: enabled,\n\treset: enabled ? s => `\\x1b[0m${s}\\x1b[0m` : String,\n\tbold: enabled ? formatter(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\") : String,\n\tdim: enabled ? formatter(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\") : String,\n\titalic: enabled ? formatter(\"\\x1b[3m\", \"\\x1b[23m\") : String,\n\tunderline: enabled ? formatter(\"\\x1b[4m\", \"\\x1b[24m\") : String,\n\tinverse: enabled ? formatter(\"\\x1b[7m\", \"\\x1b[27m\") : String,\n\thidden: enabled ? formatter(\"\\x1b[8m\", \"\\x1b[28m\") : String,\n\tstrikethrough: enabled ? formatter(\"\\x1b[9m\", \"\\x1b[29m\") : String,\n\tblack: enabled ? formatter(\"\\x1b[30m\", \"\\x1b[39m\") : String,\n\tred: enabled ? formatter(\"\\x1b[31m\", \"\\x1b[39m\") : String,\n\tgreen: enabled ? formatter(\"\\x1b[32m\", \"\\x1b[39m\") : String,\n\tyellow: enabled ? formatter(\"\\x1b[33m\", \"\\x1b[39m\") : String,\n\tblue: enabled ? formatter(\"\\x1b[34m\", \"\\x1b[39m\") : String,\n\tmagenta: enabled ? formatter(\"\\x1b[35m\", \"\\x1b[39m\") : String,\n\tcyan: enabled ? formatter(\"\\x1b[36m\", \"\\x1b[39m\") : String,\n\twhite: enabled ? formatter(\"\\x1b[37m\", \"\\x1b[39m\") : String,\n\tgray: enabled ? formatter(\"\\x1b[90m\", \"\\x1b[39m\") : String,\n\tbgBlack: enabled ? formatter(\"\\x1b[40m\", \"\\x1b[49m\") : String,\n\tbgRed: enabled ? formatter(\"\\x1b[41m\", \"\\x1b[49m\") : String,\n\tbgGreen: enabled ? formatter(\"\\x1b[42m\", \"\\x1b[49m\") : String,\n\tbgYellow: enabled ? formatter(\"\\x1b[43m\", \"\\x1b[49m\") : String,\n\tbgBlue: enabled ? formatter(\"\\x1b[44m\", \"\\x1b[49m\") : String,\n\tbgMagenta: enabled ? formatter(\"\\x1b[45m\", \"\\x1b[49m\") : String,\n\tbgCyan: enabled ? formatter(\"\\x1b[46m\", \"\\x1b[49m\") : String,\n\tbgWhite: enabled ? formatter(\"\\x1b[47m\", \"\\x1b[49m\") : String,\n})\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","\nimport { ChildProcess, exec } from 'child_process';\nimport { existsSync } from 'fs';\nimport { relative, resolve } from 'path';\nimport colors from 'picocolors';\nimport picomatch from 'picomatch';\nimport { Plugin, normalizePath } from 'vite';\n\nexport interface ZiggyPluginConfig {\n /**\n * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running.\n */\n sail?: boolean | 'auto',\n /**\n * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file.\n */\n declarations?: boolean | 'only'\n /**\n * Destination path where ziggy output files should be placed.\n */\n destination?: string,\n log?: boolean,\n delay?: number,\n}\n\nexport default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin {\n const { log = true, delay = 0, destination, declarations } = config;\n let { sail } = config;\n const root = process.cwd();\n\n const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`;\n let proc: ChildProcess | null = null;\n\n function command(): Promise {\n if (proc) {\n proc.kill('SIGINT');\n }\n\n return new Promise((done, reject) => {\n if (sail) {\n if (existsSync(resolve(root, 'vendor/bin/sail'))) {\n proc = exec(`vendor/bin/sail ${commandArgs}`);\n proc.on('close', (code, signal) => {\n proc = null;\n });\n } else {\n sail = false;\n return command();\n }\n } else {\n proc = exec(`php ${commandArgs}`);\n }\n proc.on('close', (code, signal) => {\n if (code === 0) {\n proc = null;\n done();\n }\n });\n proc.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n return {\n name: 'ziggy-plugin',\n enforce: 'pre',\n\n // NOTE: Enable globbing so that Vite keeps track of the template files.\n config: () => ({ server: { watch: { disableGlobbing: false } } }),\n configureServer(server) {\n const files = normalizePath(resolve(root, 'routes/**'));\n\n command();\n\n const shouldReload = picomatch(files);\n const checkReload = (path) => {\n if (shouldReload(path)) {\n setTimeout(command, delay);\n if (log) {\n server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { clear: true, timestamp: true });\n }\n }\n };\n\n // Ensure Vite keeps track of the files and triggers generation as needed.\n server.watcher.add(files);\n\n // Perform a generation if any of the watched files changes.\n server.watcher.on('add', checkReload);\n server.watcher.on('change', checkReload);\n },\n buildStart() {\n command();\n }\n };\n}\n"],"names":["POSIX_REGEX_SOURCE","require$$0","picomatch","parse","scan","ZiggyPlugin","config","log","delay","destination","declarations","sail","root","process","cwd","commandArgs","proc","command","kill","Promise","done","reject","existsSync","resolve","exec","on","code","signal","error","name","enforce","server","watch","disableGlobbing","configureServer","files","normalizePath","shouldReload","checkReload","path","setTimeout","logger","info","colors","green","relative","clear","timestamp","watcher","add","buildStart"],"mappings":";;;;;;AAEA,IAAI,gBAAgB;AACpB,CAAC,EAAE,UAAU,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACpE,EAAE,aAAa,IAAI,OAAO,CAAC,GAAG;AAC9B,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;AAClC,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO;AAC9B,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;AAChD,EAAE,IAAI,IAAI,OAAO,CAAC,GAAG,EAAC;AACtB;AACA,IAAI,SAAS;AACb,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;AAC7B,CAAC,KAAK,IAAI;AACV,EAAE,IAAI,MAAM,GAAG,EAAE,GAAG,MAAK;A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E,IAAT;AAAeC,cAAAA,SAAS,EAAE,IAAA;aAApI,CAAA,CAAA;AACH,WAAA;AACJ,SAAA;AACJ,OAPD,CANkB;;;AAgBlBhB,MAAAA,MAAM,CAACiB,OAAP,CAAeC,GAAf,CAAmBd,KAAnB,EAhBkB;;AAmBlBJ,MAAAA,MAAM,CAACiB,OAAP,CAAevB,EAAf,CAAkB,KAAlB,EAAyBa,WAAzB,CAAA,CAAA;AACAP,MAAAA,MAAM,CAACiB,OAAP,CAAevB,EAAf,CAAkB,QAAlB,EAA4Ba,WAA5B,CAAA,CAAA;KA1BD;;AA4BHY,IAAAA,UAAU,GAAA;MACNjC,OAAO,EAAA,CAAA;AACV,KAAA;;GA9BL,CAAA;AAgCH;;;;"} \ No newline at end of file diff --git a/dist/vite-plugin.js b/dist/vite-plugin.js new file mode 100644 index 00000000..e66ec2d0 --- /dev/null +++ b/dist/vite-plugin.js @@ -0,0 +1,2225 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('child_process'), require('fs'), require('path'), require('tty'), require('vite')) : + typeof define === 'function' && define.amd ? define(['child_process', 'fs', 'path', 'tty', 'vite'], factory) : + (global = global || self, global["vite-plugin"] = factory(global.childProcess, global.fs, global.path, global.tty, global.vite)); +})(this, (function (child_process, fs, path, tty, vite) { + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var path__default = /*#__PURE__*/_interopDefaultLegacy(path); + var tty__default = /*#__PURE__*/_interopDefaultLegacy(tty); + + let isColorSupported = + !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && + ("FORCE_COLOR" in process.env || + process.argv.includes("--color") || + process.platform === "win32" || + (tty__default["default"].isatty(1) && process.env.TERM !== "dumb") || + "CI" in process.env); + + let formatter = + (open, close, replace = open) => + input => { + let string = "" + input; + let index = string.indexOf(close, open.length); + return ~index + ? open + replaceClose(string, close, replace, index) + close + : open + string + close + }; + + let replaceClose = (string, close, replace, index) => { + let start = string.substring(0, index) + replace; + let end = string.substring(index + close.length); + let nextIndex = end.indexOf(close); + return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end + }; + + let createColors = (enabled = isColorSupported) => ({ + isColorSupported: enabled, + reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, + bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, + dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, + italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, + underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, + inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, + hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, + strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, + black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, + red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, + green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, + yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, + blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, + magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, + cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, + white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, + gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, + bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, + bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, + bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, + bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, + bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, + bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, + bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, + bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, + }); + + var picocolors = createColors(); + var createColors_1 = createColors; + + var colors = picocolors; + picocolors.createColors = createColors_1; + + function createCommonjsModule(fn) { + var module = { exports: {} }; + return fn(module, module.exports), module.exports; + } + + const WIN_SLASH = '\\\\/'; + const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + + /** + * Posix glob regex + */ + + const DOT_LITERAL = '\\.'; + const PLUS_LITERAL = '\\+'; + const QMARK_LITERAL = '\\?'; + const SLASH_LITERAL = '\\/'; + const ONE_CHAR = '(?=.)'; + const QMARK = '[^/]'; + const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; + const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; + const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; + const NO_DOT = `(?!${DOT_LITERAL})`; + const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; + const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; + const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; + const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; + const STAR = `${QMARK}*?`; + + const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR + }; + + /** + * Windows glob regex + */ + + const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` + }; + + /** + * POSIX Bracket Regex + */ + + const POSIX_REGEX_SOURCE$1 = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' + }; + + var constants = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + SEP: path__default["default"].sep, + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } + }; + + var utils = createCommonjsModule(function (module, exports) { + + + const win32 = process.platform === 'win32'; + const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL + } = constants; + + exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); + exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); + exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); + exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); + exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + + exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); + }; + + exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split('.').map(Number); + if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { + return true; + } + return false; + }; + + exports.isWindows = options => { + if (options && typeof options.windows === 'boolean') { + return options.windows; + } + return win32 === true || path__default["default"].sep === '\\'; + }; + + exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; + }; + + exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; + }; + + exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; + }; + }); + + const { + CHAR_ASTERISK, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET /* ] */ + } = constants; + + const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; + }; + + const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } + }; + + /** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + + const scan = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; + }; + + var scan_1 = scan; + + /** + * Constants + */ + + const { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS + } = constants; + + /** + * Helpers + */ + + const expandRange = (args, options) => { + if (typeof options.expandRange === 'function') { + return options.expandRange(...args, options); + } + + args.sort(); + const value = `[${args.join('-')}]`; + + try { + /* eslint-disable-next-line no-new */ + new RegExp(value); + } catch (ex) { + return args.map(v => utils.escapeRegex(v)).join('..'); + } + + return value; + }; + + /** + * Create the message for a syntax error + */ + + const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + + /** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + + const parse = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + input = REPLACEMENTS[input] || input; + + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + const bos = { type: 'bos', value: '', output: opts.prepend || '' }; + const tokens = [bos]; + + const capture = opts.capture ? '' : '?:'; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + + const globstar = opts => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const nodot = opts.dot ? '' : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + // minimatch options support + if (typeof opts.noext === 'boolean') { + opts.noextglob = opts.noext; + } + + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: '', + output: '', + prefix: '', + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + + input = utils.removePrefix(input, state); + len = input.length; + + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + + /** + * Tokenizing helpers + */ + + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ''; + const remaining = () => input.slice(state.index + 1); + const consume = (value = '', num = 0) => { + state.consumed += value; + state.index += num; + }; + + const append = token => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + + const negate = () => { + let count = 1; + + while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { + advance(); + state.start++; + count++; + } + + if (count % 2 === 0) { + return false; + } + + state.negated = true; + state.start++; + return true; + }; + + const increment = type => { + state[type]++; + stack.push(type); + }; + + const decrement = type => { + state[type]--; + stack.pop(); + }; + + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + + const push = tok => { + if (prev.type === 'globstar') { + const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); + const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); + + if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = 'star'; + prev.value = '*'; + prev.output = star; + state.output += prev.output; + } + } + + if (extglobs.length && tok.type !== 'paren') { + extglobs[extglobs.length - 1].inner += tok.value; + } + + if (tok.value || tok.output) append(tok); + if (prev && prev.type === 'text' && tok.type === 'text') { + prev.value += tok.value; + prev.output = (prev.output || '') + tok.value; + return; + } + + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + + const extglobOpen = (type, value) => { + const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; + + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? '(' : '') + token.open; + + increment('parens'); + push({ type, value, output: state.output ? '' : ONE_CHAR }); + push({ type: 'paren', extglob: true, value: advance(), output }); + extglobs.push(token); + }; + + const extglobClose = token => { + let output = token.close + (opts.capture ? ')' : ''); + let rest; + + if (token.type === 'negate') { + let extglobStar = star; + + if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { + extglobStar = globstar(opts); + } + + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + + if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. + // In this case, we need to parse the string and use it in the output of the original pattern. + // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. + // + // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. + const expression = parse(rest, { ...options, fastpaths: false }).output; + + output = token.close = `)${expression})${extglobStar})`; + } + + if (token.prev.type === 'bos') { + state.negatedExtglob = true; + } + } + + push({ type: 'paren', extglob: true, value, output }); + decrement('parens'); + }; + + /** + * Fast paths + */ + + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === '\\') { + backslashes = true; + return m; + } + + if (first === '?') { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ''); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); + } + return QMARK.repeat(chars.length); + } + + if (first === '.') { + return DOT_LITERAL.repeat(chars.length); + } + + if (first === '*') { + if (esc) { + return esc + first + (rest ? star : ''); + } + return star; + } + return esc ? m : `\\${m}`; + }); + + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ''); + } else { + output = output.replace(/\\+/g, m => { + return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); + }); + } + } + + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + + state.output = utils.wrapOutput(output, state, options); + return state; + } + + /** + * Tokenize input until we reach end-of-string + */ + + while (!eos()) { + value = advance(); + + if (value === '\u0000') { + continue; + } + + /** + * Escaped characters + */ + + if (value === '\\') { + const next = peek(); + + if (next === '/' && opts.bash !== true) { + continue; + } + + if (next === '.' || next === ';') { + continue; + } + + if (!next) { + value += '\\'; + push({ type: 'text', value }); + continue; + } + + // collapse slashes to reduce potential for exploits + const match = /^\\+/.exec(remaining()); + let slashes = 0; + + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += '\\'; + } + } + + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + + if (state.brackets === 0) { + push({ type: 'text', value }); + continue; + } + } + + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + + if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { + if (opts.posix !== false && value === ':') { + const inner = prev.value.slice(1); + if (inner.includes('[')) { + prev.posix = true; + + if (inner.includes(':')) { + const idx = prev.value.lastIndexOf('['); + const pre = prev.value.slice(0, idx); + const rest = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + + if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { + value = `\\${value}`; + } + + if (value === ']' && (prev.value === '[' || prev.value === '[^')) { + value = `\\${value}`; + } + + if (opts.posix === true && value === '!' && prev.value === '[') { + value = '^'; + } + + prev.value += value; + append({ value }); + continue; + } + + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + + /** + * Double quotes + */ + + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: 'text', value }); + } + continue; + } + + /** + * Parentheses + */ + + if (value === '(') { + increment('parens'); + push({ type: 'paren', value }); + continue; + } + + if (value === ')') { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '(')); + } + + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + + push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); + decrement('parens'); + continue; + } + + /** + * Square brackets + */ + + if (value === '[') { + if (opts.nobracket === true || !remaining().includes(']')) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('closing', ']')); + } + + value = `\\${value}`; + } else { + increment('brackets'); + } + + push({ type: 'bracket', value }); + continue; + } + + if (value === ']') { + if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '[')); + } + + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + decrement('brackets'); + + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { + value = `/${value}`; + } + + prev.value += value; + append({ value }); + + // when literal brackets are explicitly disabled + // assume we should match with a regex character class + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + + // when literal brackets are explicitly enabled + // assume we should escape the brackets to match literal characters + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + + // when the user specifies nothing, try to match both + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + + /** + * Braces + */ + + if (value === '{' && opts.nobrace !== true) { + increment('braces'); + + const open = { + type: 'brace', + value, + output: '(', + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + + braces.push(open); + push(open); + continue; + } + + if (value === '}') { + const brace = braces[braces.length - 1]; + + if (opts.nobrace === true || !brace) { + push({ type: 'text', value, output: value }); + continue; + } + + let output = ')'; + + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === 'brace') { + break; + } + if (arr[i].type !== 'dots') { + range.unshift(arr[i].value); + } + } + + output = expandRange(range, opts); + state.backtrack = true; + } + + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = '\\{'; + value = output = '\\}'; + state.output = out; + for (const t of toks) { + state.output += (t.output || t.value); + } + } + + push({ type: 'brace', value, output }); + decrement('braces'); + braces.pop(); + continue; + } + + /** + * Pipes + */ + + if (value === '|') { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: 'text', value }); + continue; + } + + /** + * Commas + */ + + if (value === ',') { + let output = value; + + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === 'braces') { + brace.comma = true; + output = '|'; + } + + push({ type: 'comma', value, output }); + continue; + } + + /** + * Slashes + */ + + if (value === '/') { + // if the beginning of the glob is "./", advance the start + // to the current index, and don't add the "./" characters + // to the state. This greatly simplifies lookbehinds when + // checking for BOS characters like "!" and "." (not "./") + if (prev.type === 'dot' && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ''; + state.output = ''; + tokens.pop(); + prev = bos; // reset "prev" to the first token + continue; + } + + push({ type: 'slash', value, output: SLASH_LITERAL }); + continue; + } + + /** + * Dots + */ + + if (value === '.') { + if (state.braces > 0 && prev.type === 'dot') { + if (prev.value === '.') prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = 'dots'; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + + if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { + push({ type: 'text', value, output: DOT_LITERAL }); + continue; + } + + push({ type: 'dot', value, output: DOT_LITERAL }); + continue; + } + + /** + * Question marks + */ + + if (value === '?') { + const isGroup = prev && prev.value === '('; + if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('qmark', value); + continue; + } + + if (prev && prev.type === 'paren') { + const next = peek(); + let output = value; + + if (next === '<' && !utils.supportsLookbehinds()) { + throw new Error('Node.js v10 or higher is required for regex lookbehinds'); + } + + if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { + output = `\\${value}`; + } + + push({ type: 'text', value, output }); + continue; + } + + if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { + push({ type: 'qmark', value, output: QMARK_NO_DOT }); + continue; + } + + push({ type: 'qmark', value, output: QMARK }); + continue; + } + + /** + * Exclamation + */ + + if (value === '!') { + if (opts.noextglob !== true && peek() === '(') { + if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { + extglobOpen('negate', value); + continue; + } + } + + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + + /** + * Plus + */ + + if (value === '+') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('plus', value); + continue; + } + + if ((prev && prev.value === '(') || opts.regex === false) { + push({ type: 'plus', value, output: PLUS_LITERAL }); + continue; + } + + if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { + push({ type: 'plus', value }); + continue; + } + + push({ type: 'plus', value: PLUS_LITERAL }); + continue; + } + + /** + * Plain text + */ + + if (value === '@') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + push({ type: 'at', extglob: true, value, output: '' }); + continue; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Plain text + */ + + if (value !== '*') { + if (value === '$' || value === '^') { + value = `\\${value}`; + } + + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Stars + */ + + if (prev && (prev.type === 'globstar' || prev.star === true)) { + prev.type = 'star'; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen('star', value); + continue; + } + + if (prev.type === 'star') { + if (opts.noglobstar === true) { + consume(value); + continue; + } + + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === 'slash' || prior.type === 'bos'; + const afterStar = before && (before.type === 'star' || before.type === 'globstar'); + + if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { + push({ type: 'star', value, output: '' }); + continue; + } + + const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); + const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); + if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { + push({ type: 'star', value, output: '' }); + continue; + } + + // strip consecutive `/**/` + while (rest.slice(0, 3) === '/**') { + const after = input[state.index + 4]; + if (after && after !== '/') { + break; + } + rest = rest.slice(3); + consume('/**', 3); + } + + if (prior.type === 'bos' && eos()) { + prev.type = 'globstar'; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { + const end = rest[1] !== void 0 ? '|$' : ''; + + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + + state.output += prior.output + prev.output; + state.globstar = true; + + consume(value + advance()); + + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + if (prior.type === 'bos' && rest[0] === '/') { + prev.type = 'globstar'; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + // remove single star from output + state.output = state.output.slice(0, -prev.output.length); + + // reset previous token to globstar + prev.type = 'globstar'; + prev.output = globstar(opts); + prev.value += value; + + // reset output with globstar + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + + const token = { type: 'star', value, output: star }; + + if (opts.bash === true) { + token.output = '.*?'; + if (prev.type === 'bos' || prev.type === 'slash') { + token.output = nodot + token.output; + } + push(token); + continue; + } + + if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { + token.output = value; + push(token); + continue; + } + + if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { + if (prev.type === 'dot') { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + + } else { + state.output += nodot; + prev.output += nodot; + } + + if (peek() !== '*') { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + + push(token); + } + + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); + state.output = utils.escapeLast(state.output, '['); + decrement('brackets'); + } + + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); + state.output = utils.escapeLast(state.output, '('); + decrement('parens'); + } + + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); + state.output = utils.escapeLast(state.output, '{'); + decrement('braces'); + } + + if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { + push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); + } + + // rebuild the output if we had to backtrack at any point + if (state.backtrack === true) { + state.output = ''; + + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + + if (token.suffix) { + state.output += token.suffix; + } + } + } + + return state; + }; + + /** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + + parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(win32); + + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? '' : '?:'; + const state = { negated: false, prefix: '' }; + let star = opts.bash === true ? '.*?' : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + const globstar = opts => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const create = str => { + switch (str) { + case '*': + return `${nodot}${ONE_CHAR}${star}`; + + case '.*': + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*.*': + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*/*': + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + + case '**': + return nodot + globstar(opts); + + case '**/*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + + case '**/*.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '**/.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + + const source = create(match[1]); + if (!source) return; + + return source + DOT_LITERAL + match[2]; + } + } + }; + + const output = utils.removePrefix(input, state); + let source = create(output); + + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + + return source; + }; + + var parse_1 = parse; + + const isObject = val => val && typeof val === 'object' && !Array.isArray(val); + + /** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + + const picomatch$1 = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch$1(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState + ? picomatch$1.compileRe(glob, options) + : picomatch$1.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; + }; + + /** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + + picomatch$1.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch$1.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; + }; + + /** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + + picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options); + return regex.test(path__default["default"].basename(input)); + }; + + /** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + + picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str); + + /** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + + picomatch$1.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options)); + return parse_1(pattern, { ...options, fastpaths: false }); + }; + + /** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + + picomatch$1.scan = (input, options) => scan_1(input, options); + + /** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + + picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch$1.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + + return regex; + }; + + /** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + + picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + let parsed = { negated: false, fastpaths: true }; + + if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + parsed.output = parse_1.fastpaths(input, options); + } + + if (!parsed.output) { + parsed = parse_1(input, options); + } + + return picomatch$1.compileRe(parsed, options, returnOutput, returnState); + }; + + /** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + + picomatch$1.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } + }; + + /** + * Picomatch constants. + * @return {Object} + */ + + picomatch$1.constants = constants; + + /** + * Expose "picomatch" + */ + + var picomatch_1 = picomatch$1; + + var picomatch = picomatch_1; + + function ZiggyPlugin(config) { + const { + log = true, + delay = 0, + destination, + declarations + } = config; + let { + sail + } = config; + const root = process.cwd(); + const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`; + let proc = null; + + function command() { + if (proc) { + proc.kill('SIGINT'); + } + + return new Promise((done, reject) => { + if (sail) { + if (fs.existsSync(path.resolve(root, 'vendor/bin/sail'))) { + proc = child_process.exec(`vendor/bin/sail ${commandArgs}`); + proc.on('close', (code, signal) => { + proc = null; + }); + } else { + sail = false; + return command(); + } + } else { + proc = child_process.exec(`php ${commandArgs}`); + } + + proc.on('close', (code, signal) => { + if (code === 0) { + proc = null; + done(); + } + }); + proc.on('error', error => { + reject(error); + }); + }); + } + + return { + name: 'ziggy-plugin', + enforce: 'pre', + // NOTE: Enable globbing so that Vite keeps track of the template files. + config: () => ({ + server: { + watch: { + disableGlobbing: false + } + } + }), + + configureServer(server) { + const files = vite.normalizePath(path.resolve(root, 'routes/**')); + command(); + const shouldReload = picomatch(files); + + const checkReload = path$1 => { + if (shouldReload(path$1)) { + setTimeout(command, delay); + + if (log) { + server.config.logger.info(`${colors.green(`${path.relative(root, path$1)} changed, regenarating ziggy file.`)}`, { + clear: true, + timestamp: true + }); + } + } + }; // Ensure Vite keeps track of the files and triggers generation as needed. + + + server.watcher.add(files); // Perform a generation if any of the watched files changes. + + server.watcher.on('add', checkReload); + server.watcher.on('change', checkReload); + }, + + buildStart() { + command(); + } + + }; + } + + return ZiggyPlugin; + +})); diff --git a/dist/vite-plugin.js.map b/dist/vite-plugin.js.map new file mode 100644 index 00000000..129873b4 --- /dev/null +++ b/dist/vite-plugin.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vite-plugin.js","sources":["../node_modules/picocolors/picocolors.js","../node_modules/picomatch/lib/constants.js","../node_modules/picomatch/lib/utils.js","../node_modules/picomatch/lib/scan.js","../node_modules/picomatch/lib/parse.js","../node_modules/picomatch/lib/picomatch.js","../node_modules/picomatch/index.js","../src/js/vite-plugin.ts"],"sourcesContent":["let tty = require(\"tty\")\n\nlet isColorSupported =\n\t!(\"NO_COLOR\" in process.env || process.argv.includes(\"--no-color\")) &&\n\t(\"FORCE_COLOR\" in process.env ||\n\t\tprocess.argv.includes(\"--color\") ||\n\t\tprocess.platform === \"win32\" ||\n\t\t(tty.isatty(1) && process.env.TERM !== \"dumb\") ||\n\t\t\"CI\" in process.env)\n\nlet formatter =\n\t(open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input\n\t\tlet index = string.indexOf(close, open.length)\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet start = string.substring(0, index) + replace\n\tlet end = string.substring(index + close.length)\n\tlet nextIndex = end.indexOf(close)\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end\n}\n\nlet createColors = (enabled = isColorSupported) => ({\n\tisColorSupported: enabled,\n\treset: enabled ? s => `\\x1b[0m${s}\\x1b[0m` : String,\n\tbold: enabled ? formatter(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\") : String,\n\tdim: enabled ? formatter(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\") : String,\n\titalic: enabled ? formatter(\"\\x1b[3m\", \"\\x1b[23m\") : String,\n\tunderline: enabled ? formatter(\"\\x1b[4m\", \"\\x1b[24m\") : String,\n\tinverse: enabled ? formatter(\"\\x1b[7m\", \"\\x1b[27m\") : String,\n\thidden: enabled ? formatter(\"\\x1b[8m\", \"\\x1b[28m\") : String,\n\tstrikethrough: enabled ? formatter(\"\\x1b[9m\", \"\\x1b[29m\") : String,\n\tblack: enabled ? formatter(\"\\x1b[30m\", \"\\x1b[39m\") : String,\n\tred: enabled ? formatter(\"\\x1b[31m\", \"\\x1b[39m\") : String,\n\tgreen: enabled ? formatter(\"\\x1b[32m\", \"\\x1b[39m\") : String,\n\tyellow: enabled ? formatter(\"\\x1b[33m\", \"\\x1b[39m\") : String,\n\tblue: enabled ? formatter(\"\\x1b[34m\", \"\\x1b[39m\") : String,\n\tmagenta: enabled ? formatter(\"\\x1b[35m\", \"\\x1b[39m\") : String,\n\tcyan: enabled ? formatter(\"\\x1b[36m\", \"\\x1b[39m\") : String,\n\twhite: enabled ? formatter(\"\\x1b[37m\", \"\\x1b[39m\") : String,\n\tgray: enabled ? formatter(\"\\x1b[90m\", \"\\x1b[39m\") : String,\n\tbgBlack: enabled ? formatter(\"\\x1b[40m\", \"\\x1b[49m\") : String,\n\tbgRed: enabled ? formatter(\"\\x1b[41m\", \"\\x1b[49m\") : String,\n\tbgGreen: enabled ? formatter(\"\\x1b[42m\", \"\\x1b[49m\") : String,\n\tbgYellow: enabled ? formatter(\"\\x1b[43m\", \"\\x1b[49m\") : String,\n\tbgBlue: enabled ? formatter(\"\\x1b[44m\", \"\\x1b[49m\") : String,\n\tbgMagenta: enabled ? formatter(\"\\x1b[45m\", \"\\x1b[49m\") : String,\n\tbgCyan: enabled ? formatter(\"\\x1b[46m\", \"\\x1b[49m\") : String,\n\tbgWhite: enabled ? formatter(\"\\x1b[47m\", \"\\x1b[49m\") : String,\n})\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","\nimport { ChildProcess, exec } from 'child_process';\nimport { existsSync } from 'fs';\nimport { relative, resolve } from 'path';\nimport colors from 'picocolors';\nimport picomatch from 'picomatch';\nimport { Plugin, normalizePath } from 'vite';\n\nexport interface ZiggyPluginConfig {\n /**\n * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running.\n */\n sail?: boolean | 'auto',\n /**\n * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file.\n */\n declarations?: boolean | 'only'\n /**\n * Destination path where ziggy output files should be placed.\n */\n destination?: string,\n log?: boolean,\n delay?: number,\n}\n\nexport default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin {\n const { log = true, delay = 0, destination, declarations } = config;\n let { sail } = config;\n const root = process.cwd();\n\n const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`;\n let proc: ChildProcess | null = null;\n\n function command(): Promise {\n if (proc) {\n proc.kill('SIGINT');\n }\n\n return new Promise((done, reject) => {\n if (sail) {\n if (existsSync(resolve(root, 'vendor/bin/sail'))) {\n proc = exec(`vendor/bin/sail ${commandArgs}`);\n proc.on('close', (code, signal) => {\n proc = null;\n });\n } else {\n sail = false;\n return command();\n }\n } else {\n proc = exec(`php ${commandArgs}`);\n }\n proc.on('close', (code, signal) => {\n if (code === 0) {\n proc = null;\n done();\n }\n });\n proc.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n return {\n name: 'ziggy-plugin',\n enforce: 'pre',\n\n // NOTE: Enable globbing so that Vite keeps track of the template files.\n config: () => ({ server: { watch: { disableGlobbing: false } } }),\n configureServer(server) {\n const files = normalizePath(resolve(root, 'routes/**'));\n\n command();\n\n const shouldReload = picomatch(files);\n const checkReload = (path) => {\n if (shouldReload(path)) {\n setTimeout(command, delay);\n if (log) {\n server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { clear: true, timestamp: true });\n }\n }\n };\n\n // Ensure Vite keeps track of the files and triggers generation as needed.\n server.watcher.add(files);\n\n // Perform a generation if any of the watched files changes.\n server.watcher.on('add', checkReload);\n server.watcher.on('change', checkReload);\n },\n buildStart() {\n command();\n }\n };\n}\n"],"names":["tty","POSIX_REGEX_SOURCE","path","require$$0","picomatch","parse","scan","ZiggyPlugin","config","log","delay","destination","declarations","sail","root","process","cwd","commandArgs","proc","command","kill","Promise","done","reject","existsSync","resolve","exec","on","code","signal","error","name","enforce","server","watch","disableGlobbing","configureServer","files","normalizePath","shouldReload","checkReload","setTimeout","logger","info","colors","green","relative","clear","timestamp","watcher","add","buildStart"],"mappings":";;;;;;;;;;CAEA,IAAI,gBAAgB;CACpB,CAAC,EAAE,UAAU,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;CACpE,EAAE,aAAa,IAAI,OAAO,CAAC,GAAG;CAC9B,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;CAClC,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO;CAC9B,GAAGA,uBAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;CAChD,EAAE,IAAI,IAAI,OAAO,CAAC,GAAG,EAAC;AACtB;CACA,IAAI,SAAS;CACb,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;CAC7B,CAAC,KAAK,IAAI;CACV,EAAE,IAAI,MAAM,GAAG,EAAE,GAAG,MAAK;CACzB,EAAE,IAAI,KAAK,GAAG,MAAM,CAAC,OA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AE,IAAA;cAApI,CAAA,CAAA;CACH,WAAA;CACJ,SAAA;CACJ,OAPD,CANkB;;;CAgBlBf,MAAAA,MAAM,CAACgB,OAAP,CAAeC,GAAf,CAAmBb,KAAnB,EAhBkB;;CAmBlBJ,MAAAA,MAAM,CAACgB,OAAP,CAAetB,EAAf,CAAkB,KAAlB,EAAyBa,WAAzB,CAAA,CAAA;CACAP,MAAAA,MAAM,CAACgB,OAAP,CAAetB,EAAf,CAAkB,QAAlB,EAA4Ba,WAA5B,CAAA,CAAA;MA1BD;;CA4BHW,IAAAA,UAAU,GAAA;OACNhC,OAAO,EAAA,CAAA;CACV,KAAA;;IA9BL,CAAA;CAgCH;;;;;;;;"} \ No newline at end of file diff --git a/dist/vite-plugin.m.js b/dist/vite-plugin.m.js new file mode 100644 index 00000000..2ed55b80 --- /dev/null +++ b/dist/vite-plugin.m.js @@ -0,0 +1,2219 @@ +import { exec } from 'child_process'; +import { existsSync } from 'fs'; +import path, { resolve, relative } from 'path'; +import tty from 'tty'; +import { normalizePath } from 'vite'; + +let isColorSupported = + !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && + ("FORCE_COLOR" in process.env || + process.argv.includes("--color") || + process.platform === "win32" || + (tty.isatty(1) && process.env.TERM !== "dumb") || + "CI" in process.env); + +let formatter = + (open, close, replace = open) => + input => { + let string = "" + input; + let index = string.indexOf(close, open.length); + return ~index + ? open + replaceClose(string, close, replace, index) + close + : open + string + close + }; + +let replaceClose = (string, close, replace, index) => { + let start = string.substring(0, index) + replace; + let end = string.substring(index + close.length); + let nextIndex = end.indexOf(close); + return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end +}; + +let createColors = (enabled = isColorSupported) => ({ + isColorSupported: enabled, + reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, + bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, + dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, + italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, + underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, + inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, + hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, + strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, + black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, + red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, + green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, + yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, + blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, + magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, + cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, + white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, + gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, + bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, + bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, + bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, + bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, + bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, + bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, + bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, + bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, +}); + +var picocolors = createColors(); +var createColors_1 = createColors; + +var colors = picocolors; +picocolors.createColors = createColors_1; + +function createCommonjsModule(fn) { + var module = { exports: {} }; + return fn(module, module.exports), module.exports; +} + +const WIN_SLASH = '\\\\/'; +const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + +/** + * Posix glob regex + */ + +const DOT_LITERAL = '\\.'; +const PLUS_LITERAL = '\\+'; +const QMARK_LITERAL = '\\?'; +const SLASH_LITERAL = '\\/'; +const ONE_CHAR = '(?=.)'; +const QMARK = '[^/]'; +const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; +const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; +const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; +const NO_DOT = `(?!${DOT_LITERAL})`; +const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; +const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; +const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; +const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; +const STAR = `${QMARK}*?`; + +const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR +}; + +/** + * Windows glob regex + */ + +const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` +}; + +/** + * POSIX Bracket Regex + */ + +const POSIX_REGEX_SOURCE$1 = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + +var constants = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + SEP: path.sep, + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } +}; + +var utils = createCommonjsModule(function (module, exports) { + + +const win32 = process.platform === 'win32'; +const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL +} = constants; + +exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); +exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); +exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); +exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + +exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); +}; + +exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split('.').map(Number); + if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { + return true; + } + return false; +}; + +exports.isWindows = options => { + if (options && typeof options.windows === 'boolean') { + return options.windows; + } + return win32 === true || path.sep === '\\'; +}; + +exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; +}; + +exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; +}; + +exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; +}; +}); + +const { + CHAR_ASTERISK, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET /* ] */ +} = constants; + +const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +}; + +const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } +}; + +/** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + +const scan = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; +}; + +var scan_1 = scan; + +/** + * Constants + */ + +const { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS +} = constants; + +/** + * Helpers + */ + +const expandRange = (args, options) => { + if (typeof options.expandRange === 'function') { + return options.expandRange(...args, options); + } + + args.sort(); + const value = `[${args.join('-')}]`; + + try { + /* eslint-disable-next-line no-new */ + new RegExp(value); + } catch (ex) { + return args.map(v => utils.escapeRegex(v)).join('..'); + } + + return value; +}; + +/** + * Create the message for a syntax error + */ + +const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; +}; + +/** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + +const parse = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + input = REPLACEMENTS[input] || input; + + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + const bos = { type: 'bos', value: '', output: opts.prepend || '' }; + const tokens = [bos]; + + const capture = opts.capture ? '' : '?:'; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + + const globstar = opts => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const nodot = opts.dot ? '' : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + // minimatch options support + if (typeof opts.noext === 'boolean') { + opts.noextglob = opts.noext; + } + + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: '', + output: '', + prefix: '', + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + + input = utils.removePrefix(input, state); + len = input.length; + + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + + /** + * Tokenizing helpers + */ + + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ''; + const remaining = () => input.slice(state.index + 1); + const consume = (value = '', num = 0) => { + state.consumed += value; + state.index += num; + }; + + const append = token => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + + const negate = () => { + let count = 1; + + while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { + advance(); + state.start++; + count++; + } + + if (count % 2 === 0) { + return false; + } + + state.negated = true; + state.start++; + return true; + }; + + const increment = type => { + state[type]++; + stack.push(type); + }; + + const decrement = type => { + state[type]--; + stack.pop(); + }; + + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + + const push = tok => { + if (prev.type === 'globstar') { + const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); + const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); + + if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = 'star'; + prev.value = '*'; + prev.output = star; + state.output += prev.output; + } + } + + if (extglobs.length && tok.type !== 'paren') { + extglobs[extglobs.length - 1].inner += tok.value; + } + + if (tok.value || tok.output) append(tok); + if (prev && prev.type === 'text' && tok.type === 'text') { + prev.value += tok.value; + prev.output = (prev.output || '') + tok.value; + return; + } + + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + + const extglobOpen = (type, value) => { + const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; + + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? '(' : '') + token.open; + + increment('parens'); + push({ type, value, output: state.output ? '' : ONE_CHAR }); + push({ type: 'paren', extglob: true, value: advance(), output }); + extglobs.push(token); + }; + + const extglobClose = token => { + let output = token.close + (opts.capture ? ')' : ''); + let rest; + + if (token.type === 'negate') { + let extglobStar = star; + + if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { + extglobStar = globstar(opts); + } + + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + + if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. + // In this case, we need to parse the string and use it in the output of the original pattern. + // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. + // + // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. + const expression = parse(rest, { ...options, fastpaths: false }).output; + + output = token.close = `)${expression})${extglobStar})`; + } + + if (token.prev.type === 'bos') { + state.negatedExtglob = true; + } + } + + push({ type: 'paren', extglob: true, value, output }); + decrement('parens'); + }; + + /** + * Fast paths + */ + + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === '\\') { + backslashes = true; + return m; + } + + if (first === '?') { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ''); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); + } + return QMARK.repeat(chars.length); + } + + if (first === '.') { + return DOT_LITERAL.repeat(chars.length); + } + + if (first === '*') { + if (esc) { + return esc + first + (rest ? star : ''); + } + return star; + } + return esc ? m : `\\${m}`; + }); + + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ''); + } else { + output = output.replace(/\\+/g, m => { + return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); + }); + } + } + + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + + state.output = utils.wrapOutput(output, state, options); + return state; + } + + /** + * Tokenize input until we reach end-of-string + */ + + while (!eos()) { + value = advance(); + + if (value === '\u0000') { + continue; + } + + /** + * Escaped characters + */ + + if (value === '\\') { + const next = peek(); + + if (next === '/' && opts.bash !== true) { + continue; + } + + if (next === '.' || next === ';') { + continue; + } + + if (!next) { + value += '\\'; + push({ type: 'text', value }); + continue; + } + + // collapse slashes to reduce potential for exploits + const match = /^\\+/.exec(remaining()); + let slashes = 0; + + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += '\\'; + } + } + + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + + if (state.brackets === 0) { + push({ type: 'text', value }); + continue; + } + } + + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + + if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { + if (opts.posix !== false && value === ':') { + const inner = prev.value.slice(1); + if (inner.includes('[')) { + prev.posix = true; + + if (inner.includes(':')) { + const idx = prev.value.lastIndexOf('['); + const pre = prev.value.slice(0, idx); + const rest = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + + if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { + value = `\\${value}`; + } + + if (value === ']' && (prev.value === '[' || prev.value === '[^')) { + value = `\\${value}`; + } + + if (opts.posix === true && value === '!' && prev.value === '[') { + value = '^'; + } + + prev.value += value; + append({ value }); + continue; + } + + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + + /** + * Double quotes + */ + + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: 'text', value }); + } + continue; + } + + /** + * Parentheses + */ + + if (value === '(') { + increment('parens'); + push({ type: 'paren', value }); + continue; + } + + if (value === ')') { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '(')); + } + + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + + push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); + decrement('parens'); + continue; + } + + /** + * Square brackets + */ + + if (value === '[') { + if (opts.nobracket === true || !remaining().includes(']')) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('closing', ']')); + } + + value = `\\${value}`; + } else { + increment('brackets'); + } + + push({ type: 'bracket', value }); + continue; + } + + if (value === ']') { + if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '[')); + } + + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + decrement('brackets'); + + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { + value = `/${value}`; + } + + prev.value += value; + append({ value }); + + // when literal brackets are explicitly disabled + // assume we should match with a regex character class + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + + // when literal brackets are explicitly enabled + // assume we should escape the brackets to match literal characters + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + + // when the user specifies nothing, try to match both + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + + /** + * Braces + */ + + if (value === '{' && opts.nobrace !== true) { + increment('braces'); + + const open = { + type: 'brace', + value, + output: '(', + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + + braces.push(open); + push(open); + continue; + } + + if (value === '}') { + const brace = braces[braces.length - 1]; + + if (opts.nobrace === true || !brace) { + push({ type: 'text', value, output: value }); + continue; + } + + let output = ')'; + + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === 'brace') { + break; + } + if (arr[i].type !== 'dots') { + range.unshift(arr[i].value); + } + } + + output = expandRange(range, opts); + state.backtrack = true; + } + + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = '\\{'; + value = output = '\\}'; + state.output = out; + for (const t of toks) { + state.output += (t.output || t.value); + } + } + + push({ type: 'brace', value, output }); + decrement('braces'); + braces.pop(); + continue; + } + + /** + * Pipes + */ + + if (value === '|') { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: 'text', value }); + continue; + } + + /** + * Commas + */ + + if (value === ',') { + let output = value; + + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === 'braces') { + brace.comma = true; + output = '|'; + } + + push({ type: 'comma', value, output }); + continue; + } + + /** + * Slashes + */ + + if (value === '/') { + // if the beginning of the glob is "./", advance the start + // to the current index, and don't add the "./" characters + // to the state. This greatly simplifies lookbehinds when + // checking for BOS characters like "!" and "." (not "./") + if (prev.type === 'dot' && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ''; + state.output = ''; + tokens.pop(); + prev = bos; // reset "prev" to the first token + continue; + } + + push({ type: 'slash', value, output: SLASH_LITERAL }); + continue; + } + + /** + * Dots + */ + + if (value === '.') { + if (state.braces > 0 && prev.type === 'dot') { + if (prev.value === '.') prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = 'dots'; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + + if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { + push({ type: 'text', value, output: DOT_LITERAL }); + continue; + } + + push({ type: 'dot', value, output: DOT_LITERAL }); + continue; + } + + /** + * Question marks + */ + + if (value === '?') { + const isGroup = prev && prev.value === '('; + if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('qmark', value); + continue; + } + + if (prev && prev.type === 'paren') { + const next = peek(); + let output = value; + + if (next === '<' && !utils.supportsLookbehinds()) { + throw new Error('Node.js v10 or higher is required for regex lookbehinds'); + } + + if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { + output = `\\${value}`; + } + + push({ type: 'text', value, output }); + continue; + } + + if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { + push({ type: 'qmark', value, output: QMARK_NO_DOT }); + continue; + } + + push({ type: 'qmark', value, output: QMARK }); + continue; + } + + /** + * Exclamation + */ + + if (value === '!') { + if (opts.noextglob !== true && peek() === '(') { + if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { + extglobOpen('negate', value); + continue; + } + } + + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + + /** + * Plus + */ + + if (value === '+') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('plus', value); + continue; + } + + if ((prev && prev.value === '(') || opts.regex === false) { + push({ type: 'plus', value, output: PLUS_LITERAL }); + continue; + } + + if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { + push({ type: 'plus', value }); + continue; + } + + push({ type: 'plus', value: PLUS_LITERAL }); + continue; + } + + /** + * Plain text + */ + + if (value === '@') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + push({ type: 'at', extglob: true, value, output: '' }); + continue; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Plain text + */ + + if (value !== '*') { + if (value === '$' || value === '^') { + value = `\\${value}`; + } + + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Stars + */ + + if (prev && (prev.type === 'globstar' || prev.star === true)) { + prev.type = 'star'; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen('star', value); + continue; + } + + if (prev.type === 'star') { + if (opts.noglobstar === true) { + consume(value); + continue; + } + + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === 'slash' || prior.type === 'bos'; + const afterStar = before && (before.type === 'star' || before.type === 'globstar'); + + if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { + push({ type: 'star', value, output: '' }); + continue; + } + + const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); + const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); + if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { + push({ type: 'star', value, output: '' }); + continue; + } + + // strip consecutive `/**/` + while (rest.slice(0, 3) === '/**') { + const after = input[state.index + 4]; + if (after && after !== '/') { + break; + } + rest = rest.slice(3); + consume('/**', 3); + } + + if (prior.type === 'bos' && eos()) { + prev.type = 'globstar'; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { + const end = rest[1] !== void 0 ? '|$' : ''; + + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + + state.output += prior.output + prev.output; + state.globstar = true; + + consume(value + advance()); + + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + if (prior.type === 'bos' && rest[0] === '/') { + prev.type = 'globstar'; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + // remove single star from output + state.output = state.output.slice(0, -prev.output.length); + + // reset previous token to globstar + prev.type = 'globstar'; + prev.output = globstar(opts); + prev.value += value; + + // reset output with globstar + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + + const token = { type: 'star', value, output: star }; + + if (opts.bash === true) { + token.output = '.*?'; + if (prev.type === 'bos' || prev.type === 'slash') { + token.output = nodot + token.output; + } + push(token); + continue; + } + + if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { + token.output = value; + push(token); + continue; + } + + if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { + if (prev.type === 'dot') { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + + } else { + state.output += nodot; + prev.output += nodot; + } + + if (peek() !== '*') { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + + push(token); + } + + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); + state.output = utils.escapeLast(state.output, '['); + decrement('brackets'); + } + + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); + state.output = utils.escapeLast(state.output, '('); + decrement('parens'); + } + + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); + state.output = utils.escapeLast(state.output, '{'); + decrement('braces'); + } + + if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { + push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); + } + + // rebuild the output if we had to backtrack at any point + if (state.backtrack === true) { + state.output = ''; + + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + + if (token.suffix) { + state.output += token.suffix; + } + } + } + + return state; +}; + +/** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + +parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + + // create constants based on platform, for windows or posix + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(win32); + + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? '' : '?:'; + const state = { negated: false, prefix: '' }; + let star = opts.bash === true ? '.*?' : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + const globstar = opts => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const create = str => { + switch (str) { + case '*': + return `${nodot}${ONE_CHAR}${star}`; + + case '.*': + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*.*': + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*/*': + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + + case '**': + return nodot + globstar(opts); + + case '**/*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + + case '**/*.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '**/.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + + const source = create(match[1]); + if (!source) return; + + return source + DOT_LITERAL + match[2]; + } + } + }; + + const output = utils.removePrefix(input, state); + let source = create(output); + + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + + return source; +}; + +var parse_1 = parse; + +const isObject = val => val && typeof val === 'object' && !Array.isArray(val); + +/** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + +const picomatch$1 = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch$1(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState + ? picomatch$1.compileRe(glob, options) + : picomatch$1.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; +}; + +/** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + +picomatch$1.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch$1.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; +}; + +/** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + +picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options); + return regex.test(path.basename(input)); +}; + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + +picomatch$1.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options)); + return parse_1(pattern, { ...options, fastpaths: false }); +}; + +/** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +picomatch$1.scan = (input, options) => scan_1(input, options); + +/** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + +picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch$1.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + + return regex; +}; + +/** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + let parsed = { negated: false, fastpaths: true }; + + if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + parsed.output = parse_1.fastpaths(input, options); + } + + if (!parsed.output) { + parsed = parse_1(input, options); + } + + return picomatch$1.compileRe(parsed, options, returnOutput, returnState); +}; + +/** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +picomatch$1.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } +}; + +/** + * Picomatch constants. + * @return {Object} + */ + +picomatch$1.constants = constants; + +/** + * Expose "picomatch" + */ + +var picomatch_1 = picomatch$1; + +var picomatch = picomatch_1; + +function ZiggyPlugin(config) { + const { + log = true, + delay = 0, + destination, + declarations + } = config; + let { + sail + } = config; + const root = process.cwd(); + const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`; + let proc = null; + + function command() { + if (proc) { + proc.kill('SIGINT'); + } + + return new Promise((done, reject) => { + if (sail) { + if (existsSync(resolve(root, 'vendor/bin/sail'))) { + proc = exec(`vendor/bin/sail ${commandArgs}`); + proc.on('close', (code, signal) => { + proc = null; + }); + } else { + sail = false; + return command(); + } + } else { + proc = exec(`php ${commandArgs}`); + } + + proc.on('close', (code, signal) => { + if (code === 0) { + proc = null; + done(); + } + }); + proc.on('error', error => { + reject(error); + }); + }); + } + + return { + name: 'ziggy-plugin', + enforce: 'pre', + // NOTE: Enable globbing so that Vite keeps track of the template files. + config: () => ({ + server: { + watch: { + disableGlobbing: false + } + } + }), + + configureServer(server) { + const files = normalizePath(resolve(root, 'routes/**')); + command(); + const shouldReload = picomatch(files); + + const checkReload = path => { + if (shouldReload(path)) { + setTimeout(command, delay); + + if (log) { + server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { + clear: true, + timestamp: true + }); + } + } + }; // Ensure Vite keeps track of the files and triggers generation as needed. + + + server.watcher.add(files); // Perform a generation if any of the watched files changes. + + server.watcher.on('add', checkReload); + server.watcher.on('change', checkReload); + }, + + buildStart() { + command(); + } + + }; +} + +export { ZiggyPlugin as default }; diff --git a/dist/vite-plugin.m.js.map b/dist/vite-plugin.m.js.map new file mode 100644 index 00000000..36af6b98 --- /dev/null +++ b/dist/vite-plugin.m.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vite-plugin.m.js","sources":["../node_modules/picocolors/picocolors.js","../node_modules/picomatch/lib/constants.js","../node_modules/picomatch/lib/utils.js","../node_modules/picomatch/lib/scan.js","../node_modules/picomatch/lib/parse.js","../node_modules/picomatch/lib/picomatch.js","../node_modules/picomatch/index.js","../src/js/vite-plugin.ts"],"sourcesContent":["let tty = require(\"tty\")\n\nlet isColorSupported =\n\t!(\"NO_COLOR\" in process.env || process.argv.includes(\"--no-color\")) &&\n\t(\"FORCE_COLOR\" in process.env ||\n\t\tprocess.argv.includes(\"--color\") ||\n\t\tprocess.platform === \"win32\" ||\n\t\t(tty.isatty(1) && process.env.TERM !== \"dumb\") ||\n\t\t\"CI\" in process.env)\n\nlet formatter =\n\t(open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input\n\t\tlet index = string.indexOf(close, open.length)\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet start = string.substring(0, index) + replace\n\tlet end = string.substring(index + close.length)\n\tlet nextIndex = end.indexOf(close)\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end\n}\n\nlet createColors = (enabled = isColorSupported) => ({\n\tisColorSupported: enabled,\n\treset: enabled ? s => `\\x1b[0m${s}\\x1b[0m` : String,\n\tbold: enabled ? formatter(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\") : String,\n\tdim: enabled ? formatter(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\") : String,\n\titalic: enabled ? formatter(\"\\x1b[3m\", \"\\x1b[23m\") : String,\n\tunderline: enabled ? formatter(\"\\x1b[4m\", \"\\x1b[24m\") : String,\n\tinverse: enabled ? formatter(\"\\x1b[7m\", \"\\x1b[27m\") : String,\n\thidden: enabled ? formatter(\"\\x1b[8m\", \"\\x1b[28m\") : String,\n\tstrikethrough: enabled ? formatter(\"\\x1b[9m\", \"\\x1b[29m\") : String,\n\tblack: enabled ? formatter(\"\\x1b[30m\", \"\\x1b[39m\") : String,\n\tred: enabled ? formatter(\"\\x1b[31m\", \"\\x1b[39m\") : String,\n\tgreen: enabled ? formatter(\"\\x1b[32m\", \"\\x1b[39m\") : String,\n\tyellow: enabled ? formatter(\"\\x1b[33m\", \"\\x1b[39m\") : String,\n\tblue: enabled ? formatter(\"\\x1b[34m\", \"\\x1b[39m\") : String,\n\tmagenta: enabled ? formatter(\"\\x1b[35m\", \"\\x1b[39m\") : String,\n\tcyan: enabled ? formatter(\"\\x1b[36m\", \"\\x1b[39m\") : String,\n\twhite: enabled ? formatter(\"\\x1b[37m\", \"\\x1b[39m\") : String,\n\tgray: enabled ? formatter(\"\\x1b[90m\", \"\\x1b[39m\") : String,\n\tbgBlack: enabled ? formatter(\"\\x1b[40m\", \"\\x1b[49m\") : String,\n\tbgRed: enabled ? formatter(\"\\x1b[41m\", \"\\x1b[49m\") : String,\n\tbgGreen: enabled ? formatter(\"\\x1b[42m\", \"\\x1b[49m\") : String,\n\tbgYellow: enabled ? formatter(\"\\x1b[43m\", \"\\x1b[49m\") : String,\n\tbgBlue: enabled ? formatter(\"\\x1b[44m\", \"\\x1b[49m\") : String,\n\tbgMagenta: enabled ? formatter(\"\\x1b[45m\", \"\\x1b[49m\") : String,\n\tbgCyan: enabled ? formatter(\"\\x1b[46m\", \"\\x1b[49m\") : String,\n\tbgWhite: enabled ? formatter(\"\\x1b[47m\", \"\\x1b[49m\") : String,\n})\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","\nimport { ChildProcess, exec } from 'child_process';\nimport { existsSync } from 'fs';\nimport { relative, resolve } from 'path';\nimport colors from 'picocolors';\nimport picomatch from 'picomatch';\nimport { Plugin, normalizePath } from 'vite';\n\nexport interface ZiggyPluginConfig {\n /**\n * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running.\n */\n sail?: boolean | 'auto',\n /**\n * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file.\n */\n declarations?: boolean | 'only'\n /**\n * Destination path where ziggy output files should be placed.\n */\n destination?: string,\n log?: boolean,\n delay?: number,\n}\n\nexport default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin {\n const { log = true, delay = 0, destination, declarations } = config;\n let { sail } = config;\n const root = process.cwd();\n\n const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`;\n let proc: ChildProcess | null = null;\n\n function command(): Promise {\n if (proc) {\n proc.kill('SIGINT');\n }\n\n return new Promise((done, reject) => {\n if (sail) {\n if (existsSync(resolve(root, 'vendor/bin/sail'))) {\n proc = exec(`vendor/bin/sail ${commandArgs}`);\n proc.on('close', (code, signal) => {\n proc = null;\n });\n } else {\n sail = false;\n return command();\n }\n } else {\n proc = exec(`php ${commandArgs}`);\n }\n proc.on('close', (code, signal) => {\n if (code === 0) {\n proc = null;\n done();\n }\n });\n proc.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n return {\n name: 'ziggy-plugin',\n enforce: 'pre',\n\n // NOTE: Enable globbing so that Vite keeps track of the template files.\n config: () => ({ server: { watch: { disableGlobbing: false } } }),\n configureServer(server) {\n const files = normalizePath(resolve(root, 'routes/**'));\n\n command();\n\n const shouldReload = picomatch(files);\n const checkReload = (path) => {\n if (shouldReload(path)) {\n setTimeout(command, delay);\n if (log) {\n server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { clear: true, timestamp: true });\n }\n }\n };\n\n // Ensure Vite keeps track of the files and triggers generation as needed.\n server.watcher.add(files);\n\n // Perform a generation if any of the watched files changes.\n server.watcher.on('add', checkReload);\n server.watcher.on('change', checkReload);\n },\n buildStart() {\n command();\n }\n };\n}\n"],"names":["POSIX_REGEX_SOURCE","require$$0","picomatch","parse","scan","ZiggyPlugin","config","log","delay","destination","declarations","sail","root","process","cwd","commandArgs","proc","command","kill","Promise","done","reject","existsSync","resolve","exec","on","code","signal","error","name","enforce","server","watch","disableGlobbing","configureServer","files","normalizePath","shouldReload","checkReload","path","setTimeout","logger","info","colors","green","relative","clear","timestamp","watcher","add","buildStart"],"mappings":";;;;;;AAEA,IAAI,gBAAgB;AACpB,CAAC,EAAE,UAAU,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACpE,EAAE,aAAa,IAAI,OAAO,CAAC,GAAG;AAC9B,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;AAClC,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO;AAC9B,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;AAChD,EAAE,IAAI,IAAI,OAAO,CAAC,GAAG,EAAC;AACtB;AACA,IAAI,SAAS;AACb,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;AAC7B,CAAC,KAAK,IAAI;AACV,EAAE,IAAI,MAAM,GAAG,EAAE,GAAG,MAAK;AACzB,EAAE,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAC;AAChD,EAAE,OAAO,CAAC,KAAK;AACf,KAAK,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,KAAK;AAC/D,KAAK,IAAI,GAAG,MAAM,GAAG,KAAK;AAC1B,GAAE;AACF;AACA,IAAI,YAAY,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,KAAK;AACtD,CAAC,IAAI,KAAK,GAAG,MAAM,CAAC,SAAS,CA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OAAO,EAAA,CAAA;AACV,KAAA;;GA9BL,CAAA;AAgCH;;;;"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a0911741..5719182f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,8 @@ "jest": "^29.6.2", "jest-environment-jsdom": "^29.0.3", "microbundle": "^0.15.1", - "power-assert": "^1.6.1" + "power-assert": "^1.6.1", + "vite": "^4.4.7" } }, "node_modules/@ampproject/remapping": { @@ -1898,6 +1899,358 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.17.tgz", + "integrity": "sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz", + "integrity": "sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.17.tgz", + "integrity": "sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz", + "integrity": "sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz", + "integrity": "sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz", + "integrity": "sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz", + "integrity": "sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz", + "integrity": "sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz", + "integrity": "sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz", + "integrity": "sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz", + "integrity": "sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz", + "integrity": "sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz", + "integrity": "sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz", + "integrity": "sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz", + "integrity": "sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz", + "integrity": "sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz", + "integrity": "sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz", + "integrity": "sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz", + "integrity": "sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz", + "integrity": "sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz", + "integrity": "sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz", + "integrity": "sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -4163,6 +4516,43 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esbuild": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.17.tgz", + "integrity": "sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.17", + "@esbuild/android-arm64": "0.18.17", + "@esbuild/android-x64": "0.18.17", + "@esbuild/darwin-arm64": "0.18.17", + "@esbuild/darwin-x64": "0.18.17", + "@esbuild/freebsd-arm64": "0.18.17", + "@esbuild/freebsd-x64": "0.18.17", + "@esbuild/linux-arm": "0.18.17", + "@esbuild/linux-arm64": "0.18.17", + "@esbuild/linux-ia32": "0.18.17", + "@esbuild/linux-loong64": "0.18.17", + "@esbuild/linux-mips64el": "0.18.17", + "@esbuild/linux-ppc64": "0.18.17", + "@esbuild/linux-riscv64": "0.18.17", + "@esbuild/linux-s390x": "0.18.17", + "@esbuild/linux-x64": "0.18.17", + "@esbuild/netbsd-x64": "0.18.17", + "@esbuild/openbsd-x64": "0.18.17", + "@esbuild/sunos-x64": "0.18.17", + "@esbuild/win32-arm64": "0.18.17", + "@esbuild/win32-ia32": "0.18.17", + "@esbuild/win32-x64": "0.18.17" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -6492,10 +6882,16 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -6933,9 +7329,9 @@ } }, "node_modules/postcss": { - "version": "8.4.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", - "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "version": "8.4.27", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", + "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", "dev": true, "funding": [ { @@ -6945,10 +7341,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -8879,6 +9279,77 @@ "node": ">=10.12.0" } }, + "node_modules/vite": { + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.7.tgz", + "integrity": "sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.26", + "rollup": "^3.25.2" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/rollup": { + "version": "3.26.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.3.tgz", + "integrity": "sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -10445,6 +10916,160 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@esbuild/android-arm": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.17.tgz", + "integrity": "sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz", + "integrity": "sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.17.tgz", + "integrity": "sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz", + "integrity": "sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz", + "integrity": "sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz", + "integrity": "sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz", + "integrity": "sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz", + "integrity": "sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz", + "integrity": "sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz", + "integrity": "sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz", + "integrity": "sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz", + "integrity": "sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz", + "integrity": "sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz", + "integrity": "sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz", + "integrity": "sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz", + "integrity": "sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz", + "integrity": "sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz", + "integrity": "sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz", + "integrity": "sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz", + "integrity": "sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz", + "integrity": "sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz", + "integrity": "sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==", + "dev": true, + "optional": true + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -12159,6 +12784,36 @@ "is-symbol": "^1.0.2" } }, + "esbuild": { + "version": "0.18.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.17.tgz", + "integrity": "sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.18.17", + "@esbuild/android-arm64": "0.18.17", + "@esbuild/android-x64": "0.18.17", + "@esbuild/darwin-arm64": "0.18.17", + "@esbuild/darwin-x64": "0.18.17", + "@esbuild/freebsd-arm64": "0.18.17", + "@esbuild/freebsd-x64": "0.18.17", + "@esbuild/linux-arm": "0.18.17", + "@esbuild/linux-arm64": "0.18.17", + "@esbuild/linux-ia32": "0.18.17", + "@esbuild/linux-loong64": "0.18.17", + "@esbuild/linux-mips64el": "0.18.17", + "@esbuild/linux-ppc64": "0.18.17", + "@esbuild/linux-riscv64": "0.18.17", + "@esbuild/linux-s390x": "0.18.17", + "@esbuild/linux-x64": "0.18.17", + "@esbuild/netbsd-x64": "0.18.17", + "@esbuild/openbsd-x64": "0.18.17", + "@esbuild/sunos-x64": "0.18.17", + "@esbuild/win32-arm64": "0.18.17", + "@esbuild/win32-ia32": "0.18.17", + "@esbuild/win32-x64": "0.18.17" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -13913,9 +14568,9 @@ "dev": true }, "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "dev": true }, "natural-compare": { @@ -14221,12 +14876,12 @@ } }, "postcss": { - "version": "8.4.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz", - "integrity": "sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==", + "version": "8.4.27", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", + "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", "dev": true, "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } @@ -15656,6 +16311,29 @@ "convert-source-map": "^1.6.0" } }, + "vite": { + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.7.tgz", + "integrity": "sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==", + "dev": true, + "requires": { + "esbuild": "^0.18.10", + "fsevents": "~2.3.2", + "postcss": "^8.4.26", + "rollup": "^3.25.2" + }, + "dependencies": { + "rollup": { + "version": "3.26.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.3.tgz", + "integrity": "sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + } + } + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", diff --git a/package.json b/package.json index 1c210d62..39535d39 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,20 @@ "module": "dist/index.m.js", "esmodule": "dist/index.es.js", "types": "dist/types/index.d.ts", + "exports": { + "./vite": { + "types": "./dist/types/vite-plugin.d.ts", + "require": "./dist/vite-plugin.js", + "import": "./dist/vite-plugin.es.js" + } + }, + "typesVersions": { + "*": { + "vite": [ + "./dist/types/vite-plugin.d.ts" + ] + } + }, "repository": { "type": "git", "url": "https://github.com/tighten/ziggy.git" @@ -43,11 +57,12 @@ "scripts": { "build": "microbundle --name route --format modern,es,umd --external none --no-sourcemap", "build:vue": "microbundle --entry src/js/vue.ts --output dist/vue.js --name ZiggyVue --format modern,es,umd --external none --no-sourcemap", + "build:vite": "microbundle --target node --name vite-plugin --entry src/js/vite-plugin.ts --output dist/vite-plugin.js --external vite --format modern,es,umd --no-sourcemap", "watch": "npm run build watch", "build:npm": "microbundle --name route --format modern,es,umd --no-sourcemap", "build:npm:vue": "microbundle --entry src/js/vue.ts --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap", "test": "jest --verbose", - "prepublishOnly": "npm run build:npm && npm run build:npm:vue" + "prepublishOnly": "npm run build:npm && npm run build:npm:vue && npm run build:vite" }, "mangle": { "regex": "^_(?!query)" @@ -70,6 +85,7 @@ "jest": "^29.6.2", "jest-environment-jsdom": "^29.0.3", "microbundle": "^0.15.1", - "power-assert": "^1.6.1" + "power-assert": "^1.6.1", + "vite": "^4.4.7" } } diff --git a/src/CommandRouteGenerator.php b/src/CommandRouteGenerator.php index a407e620..9c5fd031 100644 --- a/src/CommandRouteGenerator.php +++ b/src/CommandRouteGenerator.php @@ -2,6 +2,7 @@ namespace Tightenco\Ziggy; +use Directory; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Tightenco\Ziggy\Output\File; @@ -11,6 +12,8 @@ class CommandRouteGenerator extends Command { protected $signature = 'ziggy:generate {path? : Path to the generated JavaScript file. Default: `resources/js/ziggy.js`.} + {--t|declarations : Generate TypeScript declaration file.} + {--T|declarations-only : Generate TypeScript declaration file without ziggy routes file.} {--url=} {--group=}'; @@ -27,11 +30,24 @@ public function __construct(Filesystem $files) public function handle() { - $path = $this->argument('path') ?? config('ziggy.output.path', 'resources/js/ziggy.js'); - $generatedRoutes = $this->generate($this->option('group')); + $group = $this->option('group'); + $url = $this->option('url') ? url($this->option('url')) : null; + $ziggy = (new Ziggy($group, $url)); + + $declarationsOnly = $this->option('declarations-only'); + $declarations = $declarationsOnly || $this->option('declarations'); + $path = $this->argument('path') ?? config('ziggy.output.path', 'resources/js/ziggy.js'); $this->makeDirectory($path); - $this->files->put(base_path($path), $generatedRoutes); + + if(!$declarationsOnly){ + $generatedRoutes = $this->generateJs($ziggy); + $this->files->put(base_path($path), $generatedRoutes); + } + if($declarations){ + $generatedDeclarations = $this->generateDts($ziggy); + $this->files->put(base_path($this->deriveDtsFile($path)), $generatedDeclarations); + } $this->info('File generated!'); } @@ -45,12 +61,25 @@ protected function makeDirectory($path) return $path; } - private function generate($group = false) - { - $ziggy = (new Ziggy($group, $this->option('url') ? url($this->option('url')) : null)); + private function deriveDtsFile($path) { + if(str_ends_with($path, '.d.ts')) { + return $path; + } else { + $dir = dirname($path) ?? '.'; + $file = preg_replace("/\.[^\.]+$/", '', basename($path)) . '.d.ts'; + return join(DIRECTORY_SEPARATOR, [$dir, $file]); + } + } + private function generateJs(Ziggy $ziggy) + { $output = config('ziggy.output.file', File::class); - return (string) new $output($ziggy); } + + private function generateDts(Ziggy $ziggy) + { + $declarations = $ziggy->typescriptDeclarationGenerator(); + return $declarations->generateDeclarations(); + } } diff --git a/src/TypeScriptDeclarationGenerator.php b/src/TypeScriptDeclarationGenerator.php new file mode 100644 index 00000000..466e07f8 --- /dev/null +++ b/src/TypeScriptDeclarationGenerator.php @@ -0,0 +1,64 @@ +routes = $routes; + } + + private function preamble() + { + return collect([ + "/*", + " * Do not modify this file. It is auto-generated and corresponds to your routes", + " * exposed by ziggy route helper. Changes will not be preserved.", + " */", + "export {}" + ])->join("\n"); + } + + private function generateArgsType($route) + { + $parameters = collect($route['parameterNames'] ?? []); + $bindings = collect($route['bindings'] ?? []); + + $list = $parameters->map(function($param) use ($bindings) { + if($bindings->has($param)) { + $binding = $bindings[$param]; + return "{ name: '$param', binding: '$binding' }"; + } else { + return "{ name: '$param' }"; + } + }); + return '['.$list->join(', ').']'; + } + + private function generateRouteDefinition() { + $overloads = $this->routes->map(function ($route, $name) { + $routeArgs = $this->generateArgsType($route); + return "'$name': $routeArgs,"; + }); + return collect(["declare module 'ziggy-js' {", + $this->indent.'interface RouteLookup {', + str_repeat($this->indent, 2) . $overloads->join("\n" . str_repeat($this->indent, 2)), + $this->indent.'}', + "}"])->join("\n"); + } + + public function generateDeclarations() + { + return collect([ + $this->preamble(), + $this->generateRouteDefinition() + ])->join("\n\n"); + } +} diff --git a/src/Ziggy.php b/src/Ziggy.php index 2fd72ddc..59f588d0 100644 --- a/src/Ziggy.php +++ b/src/Ziggy.php @@ -4,6 +4,7 @@ use Illuminate\Contracts\Routing\UrlRoutable; use Illuminate\Database\Eloquent\Model; +use Illuminate\Routing\Route; use Illuminate\Support\Arr; use Illuminate\Support\Reflector; use Illuminate\Support\Str; @@ -137,6 +138,7 @@ private function nameKeyedRoutes() ->map(function ($route) use ($bindings) { return collect($route)->only(['uri', 'methods', 'wheres']) ->put('domain', $route->domain()) + ->put('parameterNames', $route->parameterNames()) ->put('bindings', $bindings[$route->getName()] ?? []) ->when($middleware = config('ziggy.middleware'), function ($collection) use ($middleware, $route) { if (is_array($middleware)) { @@ -148,6 +150,15 @@ private function nameKeyedRoutes() }); } + /** + * Generates the typescript declaration files for the route function. + */ + public function typescriptDeclarationGenerator(): TypescriptDeclarationGenerator + { + $generator = new TypeScriptDeclarationGenerator($this->routes); + return $generator; + } + /** * Convert this Ziggy instance to an array. */ @@ -159,7 +170,7 @@ public function toArray(): array 'defaults' => method_exists(app('url'), 'getDefaultParameters') ? app('url')->getDefaultParameters() : [], - 'routes' => $this->applyFilters($this->group)->toArray(), + 'routes' => $this->applyFilters($this->group)->map(fn ($route) => $route->except('parameterNames'))->toArray(), ]; } diff --git a/src/js/vite-plugin.ts b/src/js/vite-plugin.ts new file mode 100644 index 00000000..b7d4f84f --- /dev/null +++ b/src/js/vite-plugin.ts @@ -0,0 +1,97 @@ + +import { ChildProcess, exec } from 'child_process'; +import { existsSync } from 'fs'; +import { relative, resolve } from 'path'; +import colors from 'picocolors'; +import picomatch from 'picomatch'; +import { Plugin, normalizePath } from 'vite'; + +export interface ZiggyPluginConfig { + /** + * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running. + */ + sail?: boolean | 'auto', + /** + * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file. + */ + declarations?: boolean | 'only' + /** + * Destination path where ziggy output files should be placed. + */ + destination?: string, + log?: boolean, + delay?: number, +} + +export default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin { + const { log = true, delay = 0, destination, declarations } = config; + let { sail } = config; + const root = process.cwd(); + + const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`; + let proc: ChildProcess | null = null; + + function command(): Promise { + if (proc) { + proc.kill('SIGINT'); + } + + return new Promise((done, reject) => { + if (sail) { + if (existsSync(resolve(root, 'vendor/bin/sail'))) { + proc = exec(`vendor/bin/sail ${commandArgs}`); + proc.on('close', (code, signal) => { + proc = null; + }); + } else { + sail = false; + return command(); + } + } else { + proc = exec(`php ${commandArgs}`); + } + proc.on('close', (code, signal) => { + if (code === 0) { + proc = null; + done(); + } + }); + proc.on('error', (error) => { + reject(error) + }) + }) + } + + return { + name: 'ziggy-plugin', + enforce: 'pre', + + // NOTE: Enable globbing so that Vite keeps track of the template files. + config: () => ({ server: { watch: { disableGlobbing: false } } }), + configureServer(server) { + const files = normalizePath(resolve(root, 'routes/**')); + + command(); + + const shouldReload = picomatch(files); + const checkReload = (path) => { + if (shouldReload(path)) { + setTimeout(command, delay); + if (log) { + server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { clear: true, timestamp: true }); + } + } + }; + + // Ensure Vite keeps track of the files and triggers generation as needed. + server.watcher.add(files); + + // Perform a generation if any of the watched files changes. + server.watcher.on('add', checkReload); + server.watcher.on('change', checkReload); + }, + buildStart() { + command(); + } + }; +} diff --git a/tests/Unit/CommandRouteGeneratorTest.php b/tests/Unit/CommandRouteGeneratorTest.php index 14116353..844ff867 100644 --- a/tests/Unit/CommandRouteGeneratorTest.php +++ b/tests/Unit/CommandRouteGeneratorTest.php @@ -141,6 +141,44 @@ public function can_generate_file_using_config_path() $this->assertFileExists(base_path('resources/js/custom.js')); } + + /** @test */ + public function can_generate_dts_file() + { + Artisan::call('ziggy:generate --declarations'); + + $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); + $this->assertFileExists(base_path('resources/js/ziggy.js')); + } + + /** @test */ + public function can_generate_dts_file_without_routes() + { + Artisan::call('ziggy:generate --declarations-only'); + + $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); + $this->assertFileDoesNotExist(base_path('resources/js/ziggy.js')); + } + + /** @test */ + public function can_derive_dts_file_path_from_given_dts() + { + config(['ziggy.output.path' => 'resources/js/custom.d.ts']); + + Artisan::call('ziggy:generate --declarations-only'); + + $this->assertFileExists(base_path('resources/js/custom.d.ts')); + } + + /** @test */ + public function can_derive_dts_file_path_from_relative_file_without_extension() + { + config(['ziggy.output.path' => './ziggy']); + + Artisan::call('ziggy:generate --declarations-only'); + + $this->assertFileExists(base_path('ziggy.d.ts')); + } } class CustomFileFormatter extends File diff --git a/tests/Unit/DeclarationGeneratorTest.php b/tests/Unit/DeclarationGeneratorTest.php new file mode 100644 index 00000000..4f250f80 --- /dev/null +++ b/tests/Unit/DeclarationGeneratorTest.php @@ -0,0 +1,50 @@ +get('folders/{foldername}', $this->noop())->name('files'); + $router->get('settings/{setting}', function (Setting $setting) {})->name('settings'); + + $router->getRoutes()->refreshNameLookups(); + } + + /** @test */ + public function can_emit_export_for_non_ambient_context() + { + $ts = (new Ziggy)->filter('files')->typescriptDeclarationGenerator(); + $this->assertStringContainsString("export {}", $ts->generateDeclarations()); + } + + /** @test */ + public function can_declare_unbound_parameter() + { + $ts = (new Ziggy)->filter('files')->typescriptDeclarationGenerator(); + $this->assertStringContainsString("'files': [{ name: 'foldername' }]", $ts->generateDeclarations()); + } + + /** @test */ + public function can_declare_bound_parameter() + { + $ts = (new Ziggy)->filter('settings')->typescriptDeclarationGenerator(); + $this->assertStringContainsString("'settings': [{ name: 'setting', binding: 'key' }]", $ts->generateDeclarations()); + } + +} + +class Setting extends Model { + public function getRouteKeyName() { + return 'key'; + } +} From efc4b968f0feee439a074f044977256646dfe25c Mon Sep 17 00:00:00 2001 From: lmeysel Date: Fri, 28 Jul 2023 15:21:57 +0200 Subject: [PATCH 03/56] backward compatibility/test fixes --- src/CommandRouteGenerator.php | 2 +- src/TypeScriptDeclarationGenerator.php | 26 +++++++++++++++--------- src/Ziggy.php | 2 +- tests/Unit/CommandRouteGeneratorTest.php | 14 ++++++++----- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/CommandRouteGenerator.php b/src/CommandRouteGenerator.php index 9c5fd031..e6aa91e4 100644 --- a/src/CommandRouteGenerator.php +++ b/src/CommandRouteGenerator.php @@ -62,7 +62,7 @@ protected function makeDirectory($path) } private function deriveDtsFile($path) { - if(str_ends_with($path, '.d.ts')) { + if(preg_match('/.d.ts$/', $path)) { return $path; } else { $dir = dirname($path) ?? '.'; diff --git a/src/TypeScriptDeclarationGenerator.php b/src/TypeScriptDeclarationGenerator.php index 466e07f8..5df48e01 100644 --- a/src/TypeScriptDeclarationGenerator.php +++ b/src/TypeScriptDeclarationGenerator.php @@ -6,24 +6,30 @@ class TypeScriptDeclarationGenerator { - private Collection $routes; + /** + * @var Collection + */ + private $routes; protected $indent = " "; - public function __construct(Collection $routes) + /** + * @param Collection $routes + */ + public function __construct($routes) { $this->routes = $routes; } private function preamble() { - return collect([ + return join("\n", [ "/*", " * Do not modify this file. It is auto-generated and corresponds to your routes", " * exposed by ziggy route helper. Changes will not be preserved.", " */", "export {}" - ])->join("\n"); + ]); } private function generateArgsType($route) @@ -39,7 +45,7 @@ private function generateArgsType($route) return "{ name: '$param' }"; } }); - return '['.$list->join(', ').']'; + return '['.join(', ', $list->toArray()).']'; } private function generateRouteDefinition() { @@ -47,18 +53,18 @@ private function generateRouteDefinition() { $routeArgs = $this->generateArgsType($route); return "'$name': $routeArgs,"; }); - return collect(["declare module 'ziggy-js' {", + return join("\n", ["declare module 'ziggy-js' {", $this->indent.'interface RouteLookup {', - str_repeat($this->indent, 2) . $overloads->join("\n" . str_repeat($this->indent, 2)), + str_repeat($this->indent, 2) . join("\n". str_repeat($this->indent, 2), $overloads->toArray()), $this->indent.'}', - "}"])->join("\n"); + "}"]); } public function generateDeclarations() { - return collect([ + return join("\n\n", [ $this->preamble(), $this->generateRouteDefinition() - ])->join("\n\n"); + ]); } } diff --git a/src/Ziggy.php b/src/Ziggy.php index 59f588d0..2fe89cb6 100644 --- a/src/Ziggy.php +++ b/src/Ziggy.php @@ -170,7 +170,7 @@ public function toArray(): array 'defaults' => method_exists(app('url'), 'getDefaultParameters') ? app('url')->getDefaultParameters() : [], - 'routes' => $this->applyFilters($this->group)->map(fn ($route) => $route->except('parameterNames'))->toArray(), + 'routes' => $this->applyFilters($this->group)->map(function ($route) { return $route->except('parameterNames'); })->toArray(), ]; } diff --git a/tests/Unit/CommandRouteGeneratorTest.php b/tests/Unit/CommandRouteGeneratorTest.php index 844ff867..ce8ee307 100644 --- a/tests/Unit/CommandRouteGeneratorTest.php +++ b/tests/Unit/CommandRouteGeneratorTest.php @@ -145,7 +145,7 @@ public function can_generate_file_using_config_path() /** @test */ public function can_generate_dts_file() { - Artisan::call('ziggy:generate --declarations'); + Artisan::call('ziggy:generate', ['--declarations' => true]); $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); $this->assertFileExists(base_path('resources/js/ziggy.js')); @@ -154,10 +154,14 @@ public function can_generate_dts_file() /** @test */ public function can_generate_dts_file_without_routes() { - Artisan::call('ziggy:generate --declarations-only'); + Artisan::call('ziggy:generate', ['--declarations-only' => true]); $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); - $this->assertFileDoesNotExist(base_path('resources/js/ziggy.js')); + + if(method_exists($this, 'assertFileDoesNotExist')) + $this->assertFileDoesNotExist(base_path('resources/js/ziggy.js')); + else + $this->assertFileNotExists(base_path('resources/js/ziggy.js')); } /** @test */ @@ -165,7 +169,7 @@ public function can_derive_dts_file_path_from_given_dts() { config(['ziggy.output.path' => 'resources/js/custom.d.ts']); - Artisan::call('ziggy:generate --declarations-only'); + Artisan::call('ziggy:generate', ['--declarations-only' => true]); $this->assertFileExists(base_path('resources/js/custom.d.ts')); } @@ -175,7 +179,7 @@ public function can_derive_dts_file_path_from_relative_file_without_extension() { config(['ziggy.output.path' => './ziggy']); - Artisan::call('ziggy:generate --declarations-only'); + Artisan::call('ziggy:generate', ['--declarations-only' => true]); $this->assertFileExists(base_path('ziggy.d.ts')); } From 42d92489a32060997d82b713ab1e65a37af690bc Mon Sep 17 00:00:00 2001 From: lmeysel Date: Wed, 9 Aug 2023 10:03:12 +0200 Subject: [PATCH 04/56] Add root module to exports --- package-lock.json | 120 +++++++++++++++++++++++++++++++++++++++++++--- package.json | 5 ++ 2 files changed, 119 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index c8684971..66e46cd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2407,6 +2407,43 @@ } } }, + "node_modules/@jest/create-cache-key-function": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz", + "integrity": "sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==", + "dev": true, + "dependencies": { + "@jest/types": "^27.5.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/create-cache-key-function/node_modules/@jest/types": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", + "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/create-cache-key-function/node_modules/@types/yargs": { + "version": "16.0.5", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", + "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, "node_modules/@jest/environment": { "version": "29.6.2", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.2.tgz", @@ -3182,6 +3219,12 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -3974,12 +4017,6 @@ "node": ">=0.10.0" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/core-js": { "version": "2.6.12", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", @@ -9556,6 +9593,77 @@ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, + "node_modules/vite": { + "version": "4.4.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", + "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/rollup": { + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", + "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/w3c-xmlserializer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", diff --git a/package.json b/package.json index 09cba24b..7f0550f2 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,11 @@ "esmodule": "dist/index.es.js", "types": "dist/types/index.d.ts", "exports": { + ".": { + "types": "./dist/types/index.d.ts", + "require": "./dist/index.js", + "import": "./dist/index.es.js" + }, "./vite": { "types": "./dist/types/vite-plugin.d.ts", "require": "./dist/vite-plugin.js", From b07e36d5fc90dcf6121994ef4c933bff551f33d7 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 12:42:09 -0400 Subject: [PATCH 05/56] Refactor CommandRouteGenerator and tests and add fixture file --- src/CommandRouteGenerator.php | 63 ++++++++---------------- tests/Unit/CommandRouteGeneratorTest.php | 30 +++-------- tests/fixtures/ziggy.d.ts | 11 +++++ 3 files changed, 40 insertions(+), 64 deletions(-) create mode 100644 tests/fixtures/ziggy.d.ts diff --git a/src/CommandRouteGenerator.php b/src/CommandRouteGenerator.php index e6aa91e4..8d1b0ae2 100644 --- a/src/CommandRouteGenerator.php +++ b/src/CommandRouteGenerator.php @@ -2,9 +2,9 @@ namespace Tightenco\Ziggy; -use Directory; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Str; use Tightenco\Ziggy\Output\File; use Tightenco\Ziggy\Ziggy; @@ -12,8 +12,8 @@ class CommandRouteGenerator extends Command { protected $signature = 'ziggy:generate {path? : Path to the generated JavaScript file. Default: `resources/js/ziggy.js`.} - {--t|declarations : Generate TypeScript declaration file.} - {--T|declarations-only : Generate TypeScript declaration file without ziggy routes file.} + {--types : Generate a TypeScript declaration file.} + {--types-only : Generate only a TypeScript declaration file.} {--url=} {--group=}'; @@ -30,26 +30,27 @@ public function __construct(Filesystem $files) public function handle() { - $group = $this->option('group'); - $url = $this->option('url') ? url($this->option('url')) : null; - $ziggy = (new Ziggy($group, $url)); - - $declarationsOnly = $this->option('declarations-only'); - $declarations = $declarationsOnly || $this->option('declarations'); - - $path = $this->argument('path') ?? config('ziggy.output.path', 'resources/js/ziggy.js'); - $this->makeDirectory($path); - - if(!$declarationsOnly){ - $generatedRoutes = $this->generateJs($ziggy); - $this->files->put(base_path($path), $generatedRoutes); + $ziggy = new Ziggy($this->option('group'), $this->option('url') ? url($this->option('url')) : null); + + $this->makeDirectory( + $path = $this->argument('path') ?? config('ziggy.output.path', 'resources/js/ziggy.js') + ); + + if (! $this->option('types-only')) { + $this->files->put( + base_path($path), + new (config('ziggy.output.file', File::class))($ziggy), + ); } - if($declarations){ - $generatedDeclarations = $this->generateDts($ziggy); - $this->files->put(base_path($this->deriveDtsFile($path)), $generatedDeclarations); + + if ($this->option('types') || $this->option('types-only')) { + $this->files->put( + base_path(Str::replaceLast('.js', '.d.ts', $path)), + $ziggy->typescriptDeclarationGenerator()->generateDeclarations(), + ); } - $this->info('File generated!'); + $this->info('Files generated!'); } protected function makeDirectory($path) @@ -60,26 +61,4 @@ protected function makeDirectory($path) return $path; } - - private function deriveDtsFile($path) { - if(preg_match('/.d.ts$/', $path)) { - return $path; - } else { - $dir = dirname($path) ?? '.'; - $file = preg_replace("/\.[^\.]+$/", '', basename($path)) . '.d.ts'; - return join(DIRECTORY_SEPARATOR, [$dir, $file]); - } - } - - private function generateJs(Ziggy $ziggy) - { - $output = config('ziggy.output.file', File::class); - return (string) new $output($ziggy); - } - - private function generateDts(Ziggy $ziggy) - { - $declarations = $ziggy->typescriptDeclarationGenerator(); - return $declarations->generateDeclarations(); - } } diff --git a/tests/Unit/CommandRouteGeneratorTest.php b/tests/Unit/CommandRouteGeneratorTest.php index ce8ee307..34f766ab 100644 --- a/tests/Unit/CommandRouteGeneratorTest.php +++ b/tests/Unit/CommandRouteGeneratorTest.php @@ -145,43 +145,29 @@ public function can_generate_file_using_config_path() /** @test */ public function can_generate_dts_file() { - Artisan::call('ziggy:generate', ['--declarations' => true]); + Artisan::call('ziggy:generate', ['--types' => true]); - $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); - $this->assertFileExists(base_path('resources/js/ziggy.js')); + $this->assertFileEquals('./tests/fixtures/ziggy.d.ts', base_path('resources/js/ziggy.d.ts')); } /** @test */ public function can_generate_dts_file_without_routes() { - Artisan::call('ziggy:generate', ['--declarations-only' => true]); + Artisan::call('ziggy:generate', ['--types-only' => true]); $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); - - if(method_exists($this, 'assertFileDoesNotExist')) - $this->assertFileDoesNotExist(base_path('resources/js/ziggy.js')); - else - $this->assertFileNotExists(base_path('resources/js/ziggy.js')); + $this->assertFileDoesNotExist(base_path('resources/js/ziggy.js')); } /** @test */ - public function can_derive_dts_file_path_from_given_dts() + public function can_derive_dts_file_path_from_given_path() { - config(['ziggy.output.path' => 'resources/js/custom.d.ts']); + config(['ziggy.output.path' => 'resources/js/custom.js']); - Artisan::call('ziggy:generate', ['--declarations-only' => true]); + Artisan::call('ziggy:generate', ['--types-only' => true]); $this->assertFileExists(base_path('resources/js/custom.d.ts')); - } - - /** @test */ - public function can_derive_dts_file_path_from_relative_file_without_extension() - { - config(['ziggy.output.path' => './ziggy']); - - Artisan::call('ziggy:generate', ['--declarations-only' => true]); - - $this->assertFileExists(base_path('ziggy.d.ts')); + $this->assertFileDoesNotExist(base_path('resources/js/ziggy.d.ts')); } } diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts new file mode 100644 index 00000000..15540ebd --- /dev/null +++ b/tests/fixtures/ziggy.d.ts @@ -0,0 +1,11 @@ +/* + * Do not modify this file. It is auto-generated and corresponds to your routes + * exposed by ziggy route helper. Changes will not be preserved. + */ +export {} + +declare module 'ziggy-js' { + interface RouteLookup { + + } +} \ No newline at end of file From 50c5eb43f0abc56958e9c9abe2993a24198377a3 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 13:31:04 -0400 Subject: [PATCH 06/56] Refactor output generation and move it to `Output/Types` --- src/CommandRouteGenerator.php | 3 +- src/Output/Types.php | 38 +++++++++++++ src/TypeScriptDeclarationGenerator.php | 70 ------------------------ src/Ziggy.php | 20 ++----- tests/Unit/CommandRouteGeneratorTest.php | 21 +++++++ tests/fixtures/ziggy.d.ts | 27 ++++++--- 6 files changed, 84 insertions(+), 95 deletions(-) create mode 100644 src/Output/Types.php delete mode 100644 src/TypeScriptDeclarationGenerator.php diff --git a/src/CommandRouteGenerator.php b/src/CommandRouteGenerator.php index 8d1b0ae2..e7af273b 100644 --- a/src/CommandRouteGenerator.php +++ b/src/CommandRouteGenerator.php @@ -6,6 +6,7 @@ use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Str; use Tightenco\Ziggy\Output\File; +use Tightenco\Ziggy\Output\Types; use Tightenco\Ziggy\Ziggy; class CommandRouteGenerator extends Command @@ -46,7 +47,7 @@ public function handle() if ($this->option('types') || $this->option('types-only')) { $this->files->put( base_path(Str::replaceLast('.js', '.d.ts', $path)), - $ziggy->typescriptDeclarationGenerator()->generateDeclarations(), + new (config('ziggy.output.types', Types::class))($ziggy), ); } diff --git a/src/Output/Types.php b/src/Output/Types.php new file mode 100644 index 00000000..33ed14e1 --- /dev/null +++ b/src/Output/Types.php @@ -0,0 +1,38 @@ +ziggy = $ziggy; + } + + public function __toString(): string + { + $routes = collect($this->ziggy->toArray()['routes'])->map(function ($route) { + return collect($route['parameterNames'] ?? [])->map(function ($param) use ($route) { + return Arr::has($route, "bindings.{$param}") + ? ['name' => $param, 'binding' => $route['bindings'][$param]] + : ['name' => $param]; + }); + }); + + return <<toJson(JSON_PRETTY_PRINT)} +} + +JAVASCRIPT; + } +} diff --git a/src/TypeScriptDeclarationGenerator.php b/src/TypeScriptDeclarationGenerator.php deleted file mode 100644 index 5df48e01..00000000 --- a/src/TypeScriptDeclarationGenerator.php +++ /dev/null @@ -1,70 +0,0 @@ -routes = $routes; - } - - private function preamble() - { - return join("\n", [ - "/*", - " * Do not modify this file. It is auto-generated and corresponds to your routes", - " * exposed by ziggy route helper. Changes will not be preserved.", - " */", - "export {}" - ]); - } - - private function generateArgsType($route) - { - $parameters = collect($route['parameterNames'] ?? []); - $bindings = collect($route['bindings'] ?? []); - - $list = $parameters->map(function($param) use ($bindings) { - if($bindings->has($param)) { - $binding = $bindings[$param]; - return "{ name: '$param', binding: '$binding' }"; - } else { - return "{ name: '$param' }"; - } - }); - return '['.join(', ', $list->toArray()).']'; - } - - private function generateRouteDefinition() { - $overloads = $this->routes->map(function ($route, $name) { - $routeArgs = $this->generateArgsType($route); - return "'$name': $routeArgs,"; - }); - return join("\n", ["declare module 'ziggy-js' {", - $this->indent.'interface RouteLookup {', - str_repeat($this->indent, 2) . join("\n". str_repeat($this->indent, 2), $overloads->toArray()), - $this->indent.'}', - "}"]); - } - - public function generateDeclarations() - { - return join("\n\n", [ - $this->preamble(), - $this->generateRouteDefinition() - ]); - } -} diff --git a/src/Ziggy.php b/src/Ziggy.php index e7f372ae..edbd4ac2 100644 --- a/src/Ziggy.php +++ b/src/Ziggy.php @@ -4,7 +4,6 @@ use Illuminate\Contracts\Routing\UrlRoutable; use Illuminate\Database\Eloquent\Model; -use Illuminate\Routing\Route; use Illuminate\Support\Arr; use Illuminate\Support\Reflector; use Illuminate\Support\Str; @@ -27,7 +26,7 @@ public function __construct($group = null, string $url = null) $this->url = rtrim($url ?? url('/'), '/'); - if (!static::$cache) { + if (! static::$cache) { static::$cache = $this->nameKeyedRoutes(); } @@ -104,7 +103,7 @@ public function filter($filters = [], $include = true): self }) : $this->routes->filter(function ($route, $name) use ($filters, $include) { if ($include === false) { - return !Str::is($filters, $name); + return ! Str::is($filters, $name); } foreach ($filters as $pattern) { @@ -153,15 +152,6 @@ private function nameKeyedRoutes() }); } - /** - * Generates the typescript declaration files for the route function. - */ - public function typescriptDeclarationGenerator(): TypescriptDeclarationGenerator - { - $generator = new TypeScriptDeclarationGenerator($this->routes); - return $generator; - } - /** * Convert this Ziggy instance to an array. */ @@ -173,9 +163,7 @@ public function toArray(): array 'defaults' => method_exists(app('url'), 'getDefaultParameters') ? app('url')->getDefaultParameters() : [], - 'routes' => $this->applyFilters($this->group)->map(function ($route) { - return $route->except('parameterNames'); - })->toArray(), + 'routes' => $this->applyFilters($this->group)->toArray(), ]; } @@ -208,7 +196,7 @@ private function resolveBindings(array $routes): array $bindings = []; foreach ($route->signatureParameters(UrlRoutable::class) as $parameter) { - if (!in_array($parameter->getName(), $route->parameterNames())) { + if (! in_array($parameter->getName(), $route->parameterNames())) { break; } diff --git a/tests/Unit/CommandRouteGeneratorTest.php b/tests/Unit/CommandRouteGeneratorTest.php index 34f766ab..9dbc56f4 100644 --- a/tests/Unit/CommandRouteGeneratorTest.php +++ b/tests/Unit/CommandRouteGeneratorTest.php @@ -145,6 +145,11 @@ public function can_generate_file_using_config_path() /** @test */ public function can_generate_dts_file() { + app('router')->get('posts', $this->noop())->name('posts.index'); + app('router')->get('posts/{post}/comments/{comment:uuid}', PostCommentController::class)->name('postComments.show'); + app('router')->post('posts/{post}/comments', PostCommentController::class)->name('postComments.store'); + app('router')->getRoutes()->refreshNameLookups(); + Artisan::call('ziggy:generate', ['--types' => true]); $this->assertFileEquals('./tests/fixtures/ziggy.d.ts', base_path('resources/js/ziggy.d.ts')); @@ -153,6 +158,11 @@ public function can_generate_dts_file() /** @test */ public function can_generate_dts_file_without_routes() { + app('router')->get('posts', $this->noop())->name('posts.index'); + app('router')->get('posts/{post}/comments/{comment:uuid}', PostCommentController::class)->name('postComments.show'); + app('router')->post('posts/{post}/comments', PostCommentController::class)->name('postComments.store'); + app('router')->getRoutes()->refreshNameLookups(); + Artisan::call('ziggy:generate', ['--types-only' => true]); $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); @@ -163,6 +173,10 @@ public function can_generate_dts_file_without_routes() public function can_derive_dts_file_path_from_given_path() { config(['ziggy.output.path' => 'resources/js/custom.js']); + app('router')->get('posts', $this->noop())->name('posts.index'); + app('router')->get('posts/{post}/comments/{comment:uuid}', PostCommentController::class)->name('postComments.show'); + app('router')->post('posts/{post}/comments', PostCommentController::class)->name('postComments.store'); + app('router')->getRoutes()->refreshNameLookups(); Artisan::call('ziggy:generate', ['--types-only' => true]); @@ -183,3 +197,10 @@ public function __toString(): string JAVASCRIPT; } } + +class PostCommentController +{ + public function __invoke($post, $comment) { + // + } +} \ No newline at end of file diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts index 15540ebd..80a86f4d 100644 --- a/tests/fixtures/ziggy.d.ts +++ b/tests/fixtures/ziggy.d.ts @@ -1,11 +1,22 @@ -/* - * Do not modify this file. It is auto-generated and corresponds to your routes - * exposed by ziggy route helper. Changes will not be preserved. - */ -export {} +/* Do not modify this file, it is generated automatically. */ +export {}; declare module 'ziggy-js' { interface RouteLookup { - - } -} \ No newline at end of file + "posts.index": [], + "postComments.show": [ + { + "name": "post" + }, + { + "name": "comment", + "binding": "uuid" + } + ], + "postComments.store": [ + { + "name": "post" + } + ] +} +} From 07fc14a30d8f6158d2145204178a731a5556bc45 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 13:45:38 -0400 Subject: [PATCH 07/56] Update tests and fixtures --- tests/Unit/BladeRouteGeneratorTest.php | 2 + tests/Unit/CommandRouteGeneratorTest.php | 2 +- tests/Unit/DeclarationGeneratorTest.php | 50 ------------------------ tests/Unit/RouteModelBindingTest.php | 20 +++++++++- tests/Unit/ZiggyTest.php | 28 ++++++++++++- tests/fixtures/custom-pathname.js | 2 +- tests/fixtures/custom-url.js | 2 +- tests/fixtures/ziggy-custom.js | 2 +- tests/fixtures/ziggy.js | 2 +- 9 files changed, 52 insertions(+), 58 deletions(-) delete mode 100644 tests/Unit/DeclarationGeneratorTest.php diff --git a/tests/Unit/BladeRouteGeneratorTest.php b/tests/Unit/BladeRouteGeneratorTest.php index d77fb47d..fada23e3 100644 --- a/tests/Unit/BladeRouteGeneratorTest.php +++ b/tests/Unit/BladeRouteGeneratorTest.php @@ -69,6 +69,7 @@ public function can_generate_routes_for_default_domain() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], ]; @@ -89,6 +90,7 @@ public function can_generate_routes_for_custom_domain() 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], 'domain' => '{account}.myapp.com', + 'parameterNames' => ['account', 'post'], ], ]; diff --git a/tests/Unit/CommandRouteGeneratorTest.php b/tests/Unit/CommandRouteGeneratorTest.php index 9dbc56f4..34dd656f 100644 --- a/tests/Unit/CommandRouteGeneratorTest.php +++ b/tests/Unit/CommandRouteGeneratorTest.php @@ -203,4 +203,4 @@ class PostCommentController public function __invoke($post, $comment) { // } -} \ No newline at end of file +} diff --git a/tests/Unit/DeclarationGeneratorTest.php b/tests/Unit/DeclarationGeneratorTest.php deleted file mode 100644 index 4f250f80..00000000 --- a/tests/Unit/DeclarationGeneratorTest.php +++ /dev/null @@ -1,50 +0,0 @@ -get('folders/{foldername}', $this->noop())->name('files'); - $router->get('settings/{setting}', function (Setting $setting) {})->name('settings'); - - $router->getRoutes()->refreshNameLookups(); - } - - /** @test */ - public function can_emit_export_for_non_ambient_context() - { - $ts = (new Ziggy)->filter('files')->typescriptDeclarationGenerator(); - $this->assertStringContainsString("export {}", $ts->generateDeclarations()); - } - - /** @test */ - public function can_declare_unbound_parameter() - { - $ts = (new Ziggy)->filter('files')->typescriptDeclarationGenerator(); - $this->assertStringContainsString("'files': [{ name: 'foldername' }]", $ts->generateDeclarations()); - } - - /** @test */ - public function can_declare_bound_parameter() - { - $ts = (new Ziggy)->filter('settings')->typescriptDeclarationGenerator(); - $this->assertStringContainsString("'settings': [{ name: 'setting', binding: 'key' }]", $ts->generateDeclarations()); - } - -} - -class Setting extends Model { - public function getRouteKeyName() { - return 'key'; - } -} diff --git a/tests/Unit/RouteModelBindingTest.php b/tests/Unit/RouteModelBindingTest.php index 033978d5..d7f5298f 100644 --- a/tests/Unit/RouteModelBindingTest.php +++ b/tests/Unit/RouteModelBindingTest.php @@ -61,6 +61,7 @@ public function can_register_implicit_route_model_bindings() 'bindings' => [ 'user' => 'uuid', ], + 'parameterNames' => ['user'], ], ]; @@ -77,6 +78,7 @@ public function register_inherited_custom_route_key_name() 'bindings' => [ 'admin' => 'uuid', ], + 'parameterNames' => ['admin'], ], ]; @@ -90,6 +92,7 @@ public function can_ignore_route_parameters_not_bound_to_eloquent_models() 'tokens' => [ 'uri' => 'tokens/{token}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['token'], ], ], (new Ziggy)->filter(['tokens'])->toArray()['routes']); } @@ -115,6 +118,7 @@ public function can_handle_bound_and_unbound_parameters_in_the_same_route() 'bindings' => [ 'user' => 'uuid', ], + 'parameterNames' => ['user', 'number'], ], ]; @@ -136,6 +140,7 @@ public function can_handle_multiple_scoped_bindings() 'category' => 'id', 'post' => 'slug', ], + 'parameterNames' => ['category', 'post'], ], 'posts.tags' => [ 'uri' => 'blog/{category}/{post}/{tag}', @@ -145,6 +150,7 @@ public function can_handle_multiple_scoped_bindings() 'post' => 'slug', 'tag' => 'slug', ], + 'parameterNames' => ['category', 'post', 'tag'], ], ], (new Ziggy)->filter('posts*')->toArray()['routes']); } @@ -163,6 +169,7 @@ public function can_merge_implicit_and_scoped_bindings() 'bindings' => [ 'user' => 'uuid', ], + 'parameterNames' => ['user'], ], 'admins' => [ 'uri' => 'admins/{admin}', @@ -170,6 +177,7 @@ public function can_merge_implicit_and_scoped_bindings() 'bindings' => [ 'admin' => 'uuid', ], + 'parameterNames' => ['admin'], ], 'tags' => [ 'uri' => 'tags/{tag}', @@ -177,10 +185,12 @@ public function can_merge_implicit_and_scoped_bindings() 'bindings' => [ 'tag' => 'id', ], + 'parameterNames' => ['tag'], ], 'tokens' => [ 'uri' => 'tokens/{token}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['token'], ], 'users.numbers' => [ 'uri' => 'users/{user}/{number}', @@ -188,6 +198,7 @@ public function can_merge_implicit_and_scoped_bindings() 'bindings' => [ 'user' => 'uuid', ], + 'parameterNames' => ['user', 'number'], ], 'users.store' => [ 'uri' => 'users', @@ -199,6 +210,7 @@ public function can_merge_implicit_and_scoped_bindings() 'bindings' => [ 'comment' => 'uuid', ], + 'parameterNames' => ['comment'], ], 'replies' => [ 'uri' => 'replies/{reply}', @@ -206,6 +218,7 @@ public function can_merge_implicit_and_scoped_bindings() 'bindings' => [ 'reply' => 'uuid', ], + 'parameterNames' => ['reply'], ], 'posts' => [ 'uri' => 'blog/{category}/{post}', @@ -214,6 +227,7 @@ public function can_merge_implicit_and_scoped_bindings() 'category' => 'id', 'post' => 'slug', ], + 'parameterNames' => ['category', 'post'], ], 'posts.tags' => [ 'uri' => 'blog/{category}/{post}/{tag}', @@ -223,6 +237,7 @@ public function can_merge_implicit_and_scoped_bindings() 'post' => 'slug', 'tag' => 'slug', ], + 'parameterNames' => ['category', 'post', 'tag'], ], ], (new Ziggy)->toArray()['routes']); } @@ -234,7 +249,7 @@ public function can_include_bindings_in_json() $this->markTestSkipped('Requires Laravel >=7'); } - $json = '{"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"users":{"uri":"users\/{user}","methods":["GET","HEAD"],"bindings":{"user":"uuid"}},"admins":{"uri":"admins\/{admin}","methods":["GET","HEAD"],"bindings":{"admin":"uuid"}},"tags":{"uri":"tags\/{tag}","methods":["GET","HEAD"],"bindings":{"tag":"id"}},"tokens":{"uri":"tokens\/{token}","methods":["GET","HEAD"]},"users.numbers":{"uri":"users\/{user}\/{number}","methods":["GET","HEAD"],"bindings":{"user":"uuid"}},"users.store":{"uri":"users","methods":["POST"]},"comments":{"uri":"comments\/{comment}","methods":["GET","HEAD"],"bindings":{"comment":"uuid"}},"replies":{"uri":"replies\/{reply}","methods":["GET","HEAD"],"bindings":{"reply":"uuid"}},"posts":{"uri":"blog\/{category}\/{post}","methods":["GET","HEAD"],"bindings":{"category":"id","post":"slug"}},"posts.tags":{"uri":"blog\/{category}\/{post}\/{tag}","methods":["GET","HEAD"],"bindings":{"category":"id","post":"slug","tag":"slug"}}}}'; + $json = '{"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"users":{"uri":"users\/{user}","methods":["GET","HEAD"],"bindings":{"user":"uuid"},"parameterNames":["user"]},"admins":{"uri":"admins\/{admin}","methods":["GET","HEAD"],"bindings":{"admin":"uuid"},"parameterNames":["admin"]},"tags":{"uri":"tags\/{tag}","methods":["GET","HEAD"],"bindings":{"tag":"id"},"parameterNames":["tag"]},"tokens":{"uri":"tokens\/{token}","methods":["GET","HEAD"],"parameterNames":["token"]},"users.numbers":{"uri":"users\/{user}\/{number}","methods":["GET","HEAD"],"bindings":{"user":"uuid"},"parameterNames":["user","number"]},"users.store":{"uri":"users","methods":["POST"]},"comments":{"uri":"comments\/{comment}","methods":["GET","HEAD"],"bindings":{"comment":"uuid"},"parameterNames":["comment"]},"replies":{"uri":"replies\/{reply}","methods":["GET","HEAD"],"bindings":{"reply":"uuid"},"parameterNames":["reply"]},"posts":{"uri":"blog\/{category}\/{post}","methods":["GET","HEAD"],"bindings":{"category":"id","post":"slug"},"parameterNames":["category","post"]},"posts.tags":{"uri":"blog\/{category}\/{post}\/{tag}","methods":["GET","HEAD"],"bindings":{"category":"id","post":"slug","tag":"slug"},"parameterNames":["category","post","tag"]}}}'; $this->assertSame($json, (new Ziggy)->toJson()); } @@ -262,6 +277,7 @@ public function can_handle_abstract_classes_in_route_model_bindings() 'bindings' => [ 'model' => 'id', ], + 'parameterNames' => ['model'], ], (new Ziggy)->toArray()['routes']['models']); } @@ -275,6 +291,7 @@ public function can_use_custom_primary_key() 'bindings' => [ 'comment' => 'uuid', ], + 'parameterNames' => ['comment'], ], ]; @@ -291,6 +308,7 @@ public function can_use_get_key_name() 'bindings' => [ 'reply' => 'uuid', ], + 'parameterNames' => ['reply'], ], ]; diff --git a/tests/Unit/ZiggyTest.php b/tests/Unit/ZiggyTest.php index 38df6ca5..22f9ea17 100644 --- a/tests/Unit/ZiggyTest.php +++ b/tests/Unit/ZiggyTest.php @@ -39,6 +39,7 @@ protected function addPostCommentsRouteWithBindings(array &$routes): void 'bindings' => [ 'comment' => 'uuid', ], + 'parameterNames' => ['post', 'comment'], ]; } } @@ -57,6 +58,7 @@ public function can_filter_to_only_include_routes_matching_a_pattern() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -81,6 +83,7 @@ public function can_filter_to_exclude_routes_matching_a_pattern() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], ]; @@ -103,6 +106,7 @@ public function can_set_included_routes_using_only_config() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -127,6 +131,7 @@ public function can_set_excluded_routes_using_except_config() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], ]; @@ -156,10 +161,12 @@ public function returns_unfiltered_routes_when_both_only_and_except_configs_set( 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -194,6 +201,7 @@ public function can_set_included_routes_using_groups_config() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -222,6 +230,7 @@ public function can_include_routes_from_multiple_groups() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -258,6 +267,7 @@ public function can_combine_filters_in_groups_with_positive_and_negative_pattern 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -278,6 +288,7 @@ public function can_filter_routes_from_multiple_groups_using_negative_patterns() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'admin.users.index' => [ 'uri' => 'admin/users', @@ -308,10 +319,12 @@ public function can_ignore_passed_group_not_set_in_config() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -346,10 +359,12 @@ public function can_include_middleware() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -436,10 +451,12 @@ public function can_include_only_middleware_set_in_config() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -478,10 +495,12 @@ public function can_order_fallback_routes_last() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -506,6 +525,7 @@ public function can_order_fallback_routes_last() 'wheres' => [ 'fallbackPlaceholder' => '.*', ], + 'parameterNames' => ['fallbackPlaceholder'], ]; $this->assertSame($expected, $routes); @@ -532,10 +552,12 @@ public function route_payload_can_array_itself() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -566,18 +588,19 @@ public function route_payload_can_json_itself() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], + 'parameterNames' => ['post'], ], ], ]; $this->addPostCommentsRouteWithBindings($expected['routes']); - $json = '{"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"]}}}'; + $json = '{"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]}}}'; if ($this->laravelVersion(7)) { $json = str_replace( '}}}', - '},"postComments.show":{"uri":"posts\/{post}\/comments\/{comment}","methods":["GET","HEAD"],"bindings":{"comment":"uuid"}}}}', + '},"postComments.show":{"uri":"posts\/{post}\/comments\/{comment}","methods":["GET","HEAD"],"bindings":{"comment":"uuid"},"parameterNames":["post","comment"]}}}', $json, ); } @@ -683,6 +706,7 @@ public function numeric_route_names() 'wheres' => [ 'fallbackPlaceholder' => '.*', ], + 'parameterNames' => ['fallbackPlaceholder'], ], ], (new Ziggy)->toArray()['routes']); } diff --git a/tests/fixtures/custom-pathname.js b/tests/fixtures/custom-pathname.js index 0b33400c..a42f06d8 100644 --- a/tests/fixtures/custom-pathname.js +++ b/tests/fixtures/custom-pathname.js @@ -1,4 +1,4 @@ -const Ziggy = {"url":"http:\/\/ziggy.dev\/foo\/bar","port":null,"defaults":{"locale":"en"},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"]}}}; +const Ziggy = {"url":"http:\/\/ziggy.dev\/foo\/bar","port":null,"defaults":{"locale":"en"},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]}}}; if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') { Object.assign(Ziggy.routes, window.Ziggy.routes); diff --git a/tests/fixtures/custom-url.js b/tests/fixtures/custom-url.js index c7cd1c29..aaaf4f5c 100644 --- a/tests/fixtures/custom-url.js +++ b/tests/fixtures/custom-url.js @@ -1,4 +1,4 @@ -const Ziggy = {"url":"http:\/\/example.org","port":null,"defaults":{"locale":"en"},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"]}}}; +const Ziggy = {"url":"http:\/\/example.org","port":null,"defaults":{"locale":"en"},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]}}}; if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') { Object.assign(Ziggy.routes, window.Ziggy.routes); diff --git a/tests/fixtures/ziggy-custom.js b/tests/fixtures/ziggy-custom.js index db3690c6..98e91e40 100644 --- a/tests/fixtures/ziggy-custom.js +++ b/tests/fixtures/ziggy-custom.js @@ -1,3 +1,3 @@ // This is a custom template -const Ziggy = {"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"]}}}; +const Ziggy = {"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]}}}; export { Ziggy }; diff --git a/tests/fixtures/ziggy.js b/tests/fixtures/ziggy.js index 5191927e..286c764e 100644 --- a/tests/fixtures/ziggy.js +++ b/tests/fixtures/ziggy.js @@ -1,4 +1,4 @@ -const Ziggy = {"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"]},"slashes":{"uri":"slashes\/{slug}","methods":["GET","HEAD"],"wheres":{"slug":".*"}}}}; +const Ziggy = {"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]},"slashes":{"uri":"slashes\/{slug}","methods":["GET","HEAD"],"wheres":{"slug":".*"},"parameterNames":["slug"]}}}; if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') { Object.assign(Ziggy.routes, window.Ziggy.routes); From 9374cd6b7f4bae6d5a4986124239e689714f0d89 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 13:57:30 -0400 Subject: [PATCH 08/56] Revert build --- dist/index.es.js | 2 +- dist/index.js | 1233 +------------------ dist/index.m.js | 1188 +------------------ dist/types/Route.d.ts | 58 - dist/types/Router.d.ts | 133 --- dist/types/index.d.ts | 7 - dist/types/types.d.ts | 78 -- dist/types/vite-plugin.d.ts | 18 - dist/types/vue.d.ts | 3 - dist/vite-plugin.es.js | 2219 ---------------------------------- dist/vite-plugin.es.js.map | 1 - dist/vite-plugin.js | 2225 ----------------------------------- dist/vite-plugin.js.map | 1 - dist/vite-plugin.m.js | 2219 ---------------------------------- dist/vite-plugin.m.js.map | 1 - dist/vue.es.js | 2 +- dist/vue.js | 1244 +------------------- dist/vue.m.js | 1199 +------------------ 18 files changed, 6 insertions(+), 11825 deletions(-) delete mode 100644 dist/types/Route.d.ts delete mode 100644 dist/types/Router.d.ts delete mode 100644 dist/types/index.d.ts delete mode 100644 dist/types/types.d.ts delete mode 100644 dist/types/vite-plugin.d.ts delete mode 100644 dist/types/vue.d.ts delete mode 100644 dist/vite-plugin.es.js delete mode 100644 dist/vite-plugin.es.js.map delete mode 100644 dist/vite-plugin.js delete mode 100644 dist/vite-plugin.js.map delete mode 100644 dist/vite-plugin.m.js delete mode 100644 dist/vite-plugin.m.js.map diff --git a/dist/index.es.js b/dist/index.es.js index b158d1e5..f0d8a02e 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -1 +1 @@ -import{parse as t,stringify as r}from"qs";function e(){return e=Object.assign?Object.assign.bind():function(t){for(var r=1;r({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(r){if(!this.definition.methods.includes("GET"))return!1;const e=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(t,r,e,i)=>{var s;const n=`(?<${e}>${(null==(s=this.wheres[e])?void 0:s.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return i?`(${r}${n})?`:`${r}${n}`}).replace(/^\w+:\/\//,""),[i,s]=r.replace(/^\w+:\/\//,"").split("?"),n=new RegExp(`^${e}/?$`).exec(i);if(n){for(const t in n.groups)n.groups[t]="string"==typeof n.groups[t]?decodeURIComponent(n.groups[t]):n.groups[t];return{params:n.groups,query:t(s)}}return!1}compile(t){const r=this.parameterSegments;return r.length?this.template.replace(/{([^}?]+)(\??)}/g,(e,i,s)=>{var n,o,h;if(!s&&[null,void 0].includes(t[i]))throw new Error(`Ziggy error: '${i}' parameter is required for route '${this.name}'.`);if(r[r.length-1].name===i&&".*"===this.wheres[i])return encodeURIComponent(null!=(h=t[i])?h:"").replace(/%2F/g,"/");if(this.wheres[i]&&!new RegExp(`^${s?`(${this.wheres[i]})?`:this.wheres[i]}$`).test(null!=(n=t[i])?n:""))throw new Error(`Ziggy error: '${i}' parameter does not match required format '${this.wheres[i]}' for route '${this.name}'.`);return encodeURIComponent(null!=(o=t[i])?o:"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class s extends String{constructor(t,r,s=!0,n){if(super(),this.t=void 0,this.i=void 0,this.o=void 0,this.t=null!=n?n:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,this.t=e({},this.t,{absolute:s}),t){if(!this.t.routes[t])throw new Error(`Ziggy error: route '${t}' is not in the route list.`);this.o=new i(t,this.t.routes[t],this.t),this.i=this.h(r,this.o)}}toString(){var t;const i=Object.keys(this.i).filter(t=>!this.o.parameterSegments.some(({name:r})=>r===t)).filter(t=>"_query"!==t).reduce((t,r)=>e({},t,{[r]:this.i[r]}),{}),s=null!=(t=this.i._query)?t:{};return this.o.compile(this.i)+r(e({},i,s),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,r)=>"boolean"==typeof t?Number(t).toString():r(t)})}u(t){t?this.t.absolute&&t.startsWith("/")&&(t=this.l().host+t):t=this.g();const r=Object.entries(this.t.routes);for(const[s,n]of r){const r=new i(s,n,this.t).matchesUrl(t);if(r)return e({name:s},r,{route:n})}return{}}g(){const{host:t,pathname:r,search:e}=this.l();return(this.t.absolute?t+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+e}current(t,r){null!=r||(r={});const s=this.u();if(!s)return;const{name:n,params:o,query:h,route:u}=s;if(!t)return n;const a=new RegExp(`^${t.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(n);if([null,void 0].includes(r)||!a)return a;const l=new i(n,u,this.t),c=this.h(r,l),d=e({},o,h);return!(!Object.values(c).every(t=>!t)||Object.values(d).some(t=>void 0!==t))||Object.entries(c).every(([t,r])=>d[t]==r)}l(){var t,r,e,i,s,n;const{host:o="",pathname:h="",search:u=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:o,pathname:null!=(e=null==(i=this.t.location)?void 0:i.pathname)?e:h,search:null!=(s=null==(n=this.t.location)?void 0:n.search)?s:u}}get params(){const{params:t,query:r}=this.u()||{};return e({},t,r)}has(t){return Object.keys(this.t.routes).includes(t)}h(t,r){null!=t||(t={});const i=r.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);let s={};if("number"==typeof t||"string"==typeof t){const[r]=i;s=r?{[r.name]:t}:{[t]:""}}else t instanceof Array?s=t.reduce((t,r,s)=>e({},t,i[s]?{[i[s].name]:r}:"object"==typeof r?r:{[r]:""}),{}):1!==i.length||t[i[0].name]||!t.hasOwnProperty(Object.values(r.bindings)[0])&&!t.hasOwnProperty("id")?t&&(s=t):s={[i[0].name]:t};return e({},this.m(r),this.p(s,r))}m(t){return t.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((t,{name:r},i)=>e({},t,{[r]:this.t.defaults[r]}),{})}p(t,{bindings:r,parameterSegments:i}){return Object.entries(t).reduce((t,[s,n])=>{if(!n||"object"!=typeof n||Array.isArray(n)||!i.some(({name:t})=>t===s))return e({},t,{[s]:n});if(!n.hasOwnProperty(r[s])){if(!n.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${s}' parameter is missing route model binding key '${r[s]}'.`);r[s]="id"}return e({},t,{[s]:n[r[s]]})},{})}valueOf(){return this.toString()}check(t){return this.has(t)}}function n(t,r,e=!0,i){const n=new s(t,r,e,i);return t?n.toString():n}export{n as default}; +function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e1;){var e=t.pop(),r=e.obj[e.prop];if(u(r)){for(var n=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===o.RFC1738&&(40===c||41===c)?f+=u.charAt(s):c<128?f+=a[c]:c<2048?f+=a[192|c>>6]+a[128|63&c]:c<55296||c>=57344?f+=a[224|c>>12]+a[128|c>>6&63]+a[128|63&c]:(c=65536+((1023&c)<<10|1023&u.charCodeAt(s+=1)),f+=a[240|c>>18]+a[128|c>>12&63]+a[128|c>>6&63]+a[128|63&c])}return f},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(u(t)){for(var r=[],n=0;n0?w.join(",")||null:void 0}];else if(p(a))R=a;else{var C=Object.keys(w);R=f?C.sort(f):C}for(var N=0;N-1?t.split(","):t},S=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=r.depth>0&&/(\[[^[\]]*])/.exec(o),a=u?o.slice(0,u.index):o,f=[];if(a){if(!r.plainObjects&&j.call(Object.prototype,a)&&!r.allowPrototypes)return;f.push(a)}for(var s=0;r.depth>0&&null!==(u=i.exec(o))&&s=0;--i){var u,a=t[i];if("[]"===a&&r.parseArrays)u=[].concat(o);else{u=r.plainObjects?Object.create(null):{};var f="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,s=parseInt(f,10);r.parseArrays||""!==f?!isNaN(s)&&a!==f&&String(s)===f&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(u=[])[s]=o:"__proto__"!==f&&(u[f]=o):u={0:o}}o=u}return o}(f,e,r,n)}},R=function(t,e){var r=function(t){if(!t)return O;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?O.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:O.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:O.arrayLimit,charset:void 0===t.charset?O.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:O.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:O.comma,decoder:"function"==typeof t.decoder?t.decoder:O.decoder,delimiter:"string"==typeof t.delimiter||s.isRegExp(t.delimiter)?t.delimiter:O.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:O.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:O.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:O.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:O.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:O.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,e){var r,n={},o=(e.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(e.delimiter,Infinity===e.parameterLimit?void 0:e.parameterLimit),i=-1,u=e.charset;if(e.charsetSentinel)for(r=0;r-1&&(f=w(f)?[f]:f),n[a]=j.call(n,a)?s.combine(n[a],f):f}return n}(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),u=0;u({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(t){if(!this.definition.methods.includes("GET"))return!1;const e=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(t,e,r,n)=>{var o;const i=`(?<${r}>${(null==(o=this.wheres[r])?void 0:o.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return n?`(${e}${i})?`:`${e}${i}`}).replace(/^\w+:\/\//,""),[r,n]=t.replace(/^\w+:\/\//,"").split("?"),o=new RegExp(`^${e}/?$`).exec(r);if(o){for(const t in o.groups)o.groups[t]="string"==typeof o.groups[t]?decodeURIComponent(o.groups[t]):o.groups[t];return{params:o.groups,query:R(n)}}return!1}compile(t){const e=this.parameterSegments;return e.length?this.template.replace(/{([^}?]+)(\??)}/g,(r,n,o)=>{var i;if(!o&&[null,void 0].includes(t[n]))throw new Error(`Ziggy error: '${n}' parameter is required for route '${this.name}'.`);if(this.wheres[n]){var u,a;if(!new RegExp(`^${o?`(${this.wheres[n]})?`:this.wheres[n]}$`).test(null!=(u=t[n])?u:""))throw new Error(`Ziggy error: '${n}' parameter does not match required format '${this.wheres[n]}' for route '${this.name}'.`);if(e[e.length-1].name===n)return encodeURIComponent(null!=(a=t[n])?a:"").replace(/%2F/g,"/")}return encodeURIComponent(null!=(i=t[n])?i:"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class C extends String{constructor(e,r,n=!0,o){if(super(),this.t=null!=o?o:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,this.t=t({},this.t,{absolute:n}),e){if(!this.t.routes[e])throw new Error(`Ziggy error: route '${e}' is not in the route list.`);this.i=new x(e,this.t.routes[e],this.t),this.u=this.l(r)}}toString(){const e=Object.keys(this.u).filter(t=>!this.i.parameterSegments.some(({name:e})=>e===t)).filter(t=>"_query"!==t).reduce((e,r)=>t({},e,{[r]:this.u[r]}),{});return this.i.compile(this.u)+function(t,e){var r,n=t,i=function(t){if(!t)return m;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||m.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==t.format){if(!c.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=o.formatters[r],i=m.filter;return("function"==typeof t.filter||p(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===t.allowDots?m.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:m.charsetSentinel,delimiter:void 0===t.delimiter?m.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:m.encode,encoder:"function"==typeof t.encoder?t.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:m.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:m.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:m.strictNullHandling}}(e);"function"==typeof i.filter?n=(0,i.filter)("",n):p(i.filter)&&(r=i.filter);var u=[];if("object"!=typeof n||null===n)return"";var a=l[e&&e.arrayFormat in l?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices"];r||(r=Object.keys(n)),i.sort&&r.sort(i.sort);for(var f=0;f0?y+h:""}(t({},e,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,e)=>"boolean"==typeof t?Number(t):e(t)})}p(e){e?this.t.absolute&&e.startsWith("/")&&(e=this.h().host+e):e=this.v();let r={};const[n,o]=Object.entries(this.t.routes).find(([t,n])=>r=new x(t,n,this.t).matchesUrl(e))||[void 0,void 0];return t({name:n},r,{route:o})}v(){const{host:t,pathname:e,search:r}=this.h();return(this.t.absolute?t+e:e.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+r}current(e,r){const{name:n,params:o,query:i,route:u}=this.p();if(!e)return n;const a=new RegExp(`^${e.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(n);if([null,void 0].includes(r)||!a)return a;const f=new x(n,u,this.t);r=this.l(r,f);const s=t({},o,i);return!(!Object.values(r).every(t=>!t)||Object.values(s).some(t=>void 0!==t))||Object.entries(r).every(([t,e])=>s[t]==e)}h(){var t,e,r,n,o,i;const{host:u="",pathname:a="",search:f=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null==(e=this.t.location)?void 0:e.host)?t:u,pathname:null!=(r=null==(n=this.t.location)?void 0:n.pathname)?r:a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:f}}get params(){const{params:e,query:r}=this.p();return t({},e,r)}has(t){return Object.keys(this.t.routes).includes(t)}l(e={},r=this.i){null!=e||(e={}),e=["string","number"].includes(typeof e)?[e]:e;const n=r.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);return Array.isArray(e)?e=e.reduce((e,r,o)=>t({},e,n[o]?{[n[o].name]:r}:"object"==typeof r?r:{[r]:""}),{}):1!==n.length||e[n[0].name]||!e.hasOwnProperty(Object.values(r.bindings)[0])&&!e.hasOwnProperty("id")||(e={[n[0].name]:e}),t({},this.m(r),this.g(e,r))}m(e){return e.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((e,{name:r},n)=>t({},e,{[r]:this.t.defaults[r]}),{})}g(e,{bindings:r,parameterSegments:n}){return Object.entries(e).reduce((e,[o,i])=>{if(!i||"object"!=typeof i||Array.isArray(i)||!n.some(({name:t})=>t===o))return t({},e,{[o]:i});if(!i.hasOwnProperty(r[o])){if(!i.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${o}' parameter is missing route model binding key '${r[o]}'.`);r[o]="id"}return t({},e,{[o]:i[r[o]]})},{})}valueOf(){return this.toString()}check(t){return this.has(t)}}function N(t,e,r,n){const o=new C(t,e,r,n);return t?o.toString():o}export{N as default}; diff --git a/dist/index.js b/dist/index.js index 29f0ce1c..52ca7173 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,1232 +1 @@ -!(function (t, r) { - "object" == typeof exports && "undefined" != typeof module - ? (module.exports = r()) - : "function" == typeof define && define.amd - ? define(r) - : ((t || self).route = r()); -})(this, function () { - function t(t, r) { - for (var n = 0; n < r.length; n++) { - var e = r[n]; - (e.enumerable = e.enumerable || !1), - (e.configurable = !0), - "value" in e && (e.writable = !0), - Object.defineProperty(t, e.key, e); - } - } - function r(r, n, e) { - return ( - n && t(r.prototype, n), - e && t(r, e), - Object.defineProperty(r, "prototype", { writable: !1 }), - r - ); - } - function n() { - return ( - (n = Object.assign - ? Object.assign.bind() - : function (t) { - for (var r = 1; r < arguments.length; r++) { - var n = arguments[r]; - for (var e in n) - Object.prototype.hasOwnProperty.call(n, e) && - (t[e] = n[e]); - } - return t; - }), - n.apply(this, arguments) - ); - } - function e(t) { - return ( - (e = Object.setPrototypeOf - ? Object.getPrototypeOf.bind() - : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }), - e(t) - ); - } - function o(t, r) { - return ( - (o = Object.setPrototypeOf - ? Object.setPrototypeOf.bind() - : function (t, r) { - return (t.__proto__ = r), t; - }), - o(t, r) - ); - } - function i() { - if ("undefined" == typeof Reflect || !Reflect.construct) return !1; - if (Reflect.construct.sham) return !1; - if ("function" == typeof Proxy) return !0; - try { - return ( - Boolean.prototype.valueOf.call( - Reflect.construct(Boolean, [], function () {}) - ), - !0 - ); - } catch (t) { - return !1; - } - } - function u(t, r, n) { - return ( - (u = i() - ? Reflect.construct.bind() - : function (t, r, n) { - var e = [null]; - e.push.apply(e, r); - var i = new (Function.bind.apply(t, e))(); - return n && o(i, n.prototype), i; - }), - u.apply(null, arguments) - ); - } - function f(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return ( - (f = function (t) { - if ( - null === t || - -1 === Function.toString.call(t).indexOf("[native code]") - ) - return t; - if ("function" != typeof t) - throw new TypeError( - "Super expression must either be null or a function" - ); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, n); - } - function n() { - return u(t, arguments, e(this).constructor); - } - return ( - (n.prototype = Object.create(t.prototype, { - constructor: { - value: n, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - o(n, t) - ); - }), - f(t) - ); - } - var a = String.prototype.replace, - c = /%20/g, - l = "RFC3986", - s = { - default: l, - formatters: { - RFC1738: function (t) { - return a.call(t, c, "+"); - }, - RFC3986: function (t) { - return String(t); - }, - }, - RFC1738: "RFC1738", - RFC3986: l, - }, - p = Object.prototype.hasOwnProperty, - v = Array.isArray, - y = (function () { - for (var t = [], r = 0; r < 256; ++r) - t.push( - "%" + ((r < 16 ? "0" : "") + r.toString(16)).toUpperCase() - ); - return t; - })(), - d = function (t, r) { - for ( - var n = r && r.plainObjects ? Object.create(null) : {}, e = 0; - e < t.length; - ++e - ) - void 0 !== t[e] && (n[e] = t[e]); - return n; - }, - b = { - arrayToObject: d, - assign: function (t, r) { - return Object.keys(r).reduce(function (t, n) { - return (t[n] = r[n]), t; - }, t); - }, - combine: function (t, r) { - return [].concat(t, r); - }, - compact: function (t) { - for ( - var r = [{ obj: { o: t }, prop: "o" }], n = [], e = 0; - e < r.length; - ++e - ) - for ( - var o = r[e], - i = o.obj[o.prop], - u = Object.keys(i), - f = 0; - f < u.length; - ++f - ) { - var a = u[f], - c = i[a]; - "object" == typeof c && - null !== c && - -1 === n.indexOf(c) && - (r.push({ obj: i, prop: a }), n.push(c)); - } - return ( - (function (t) { - for (; t.length > 1; ) { - var r = t.pop(), - n = r.obj[r.prop]; - if (v(n)) { - for (var e = [], o = 0; o < n.length; ++o) - void 0 !== n[o] && e.push(n[o]); - r.obj[r.prop] = e; - } - } - })(r), - t - ); - }, - decode: function (t, r, n) { - var e = t.replace(/\+/g, " "); - if ("iso-8859-1" === n) - return e.replace(/%[0-9a-f]{2}/gi, unescape); - try { - return decodeURIComponent(e); - } catch (t) { - return e; - } - }, - encode: function (t, r, n, e, o) { - if (0 === t.length) return t; - var i = t; - if ( - ("symbol" == typeof t - ? (i = Symbol.prototype.toString.call(t)) - : "string" != typeof t && (i = String(t)), - "iso-8859-1" === n) - ) - return escape(i).replace(/%u[0-9a-f]{4}/gi, function (t) { - return "%26%23" + parseInt(t.slice(2), 16) + "%3B"; - }); - for (var u = "", f = 0; f < i.length; ++f) { - var a = i.charCodeAt(f); - 45 === a || - 46 === a || - 95 === a || - 126 === a || - (a >= 48 && a <= 57) || - (a >= 65 && a <= 90) || - (a >= 97 && a <= 122) || - (o === s.RFC1738 && (40 === a || 41 === a)) - ? (u += i.charAt(f)) - : a < 128 - ? (u += y[a]) - : a < 2048 - ? (u += y[192 | (a >> 6)] + y[128 | (63 & a)]) - : a < 55296 || a >= 57344 - ? (u += - y[224 | (a >> 12)] + - y[128 | ((a >> 6) & 63)] + - y[128 | (63 & a)]) - : ((a = - 65536 + - (((1023 & a) << 10) | - (1023 & i.charCodeAt((f += 1))))), - (u += - y[240 | (a >> 18)] + - y[128 | ((a >> 12) & 63)] + - y[128 | ((a >> 6) & 63)] + - y[128 | (63 & a)])); - } - return u; - }, - isBuffer: function (t) { - return !( - !t || - "object" != typeof t || - !( - t.constructor && - t.constructor.isBuffer && - t.constructor.isBuffer(t) - ) - ); - }, - isRegExp: function (t) { - return "[object RegExp]" === Object.prototype.toString.call(t); - }, - maybeMap: function (t, r) { - if (v(t)) { - for (var n = [], e = 0; e < t.length; e += 1) - n.push(r(t[e])); - return n; - } - return r(t); - }, - merge: function t(r, n, e) { - if (!n) return r; - if ("object" != typeof n) { - if (v(r)) r.push(n); - else { - if (!r || "object" != typeof r) return [r, n]; - ((e && (e.plainObjects || e.allowPrototypes)) || - !p.call(Object.prototype, n)) && - (r[n] = !0); - } - return r; - } - if (!r || "object" != typeof r) return [r].concat(n); - var o = r; - return ( - v(r) && !v(n) && (o = d(r, e)), - v(r) && v(n) - ? (n.forEach(function (n, o) { - if (p.call(r, o)) { - var i = r[o]; - i && - "object" == typeof i && - n && - "object" == typeof n - ? (r[o] = t(i, n, e)) - : r.push(n); - } else r[o] = n; - }), - r) - : Object.keys(n).reduce(function (r, o) { - var i = n[o]; - return ( - (r[o] = p.call(r, o) ? t(r[o], i, e) : i), r - ); - }, o) - ); - }, - }, - h = Object.prototype.hasOwnProperty, - g = { - brackets: function (t) { - return t + "[]"; - }, - comma: "comma", - indices: function (t, r) { - return t + "[" + r + "]"; - }, - repeat: function (t) { - return t; - }, - }, - m = Array.isArray, - j = String.prototype.split, - w = Array.prototype.push, - O = function (t, r) { - w.apply(t, m(r) ? r : [r]); - }, - E = Date.prototype.toISOString, - R = s.default, - S = { - addQueryPrefix: !1, - allowDots: !1, - charset: "utf-8", - charsetSentinel: !1, - delimiter: "&", - encode: !0, - encoder: b.encode, - encodeValuesOnly: !1, - format: R, - formatter: s.formatters[R], - indices: !1, - serializeDate: function (t) { - return E.call(t); - }, - skipNulls: !1, - strictNullHandling: !1, - }, - k = function t(r, n, e, o, i, u, f, a, c, l, s, p, v, y) { - var d, - h = r; - if ( - ("function" == typeof f - ? (h = f(n, h)) - : h instanceof Date - ? (h = l(h)) - : "comma" === e && - m(h) && - (h = b.maybeMap(h, function (t) { - return t instanceof Date ? l(t) : t; - })), - null === h) - ) { - if (o) return u && !v ? u(n, S.encoder, y, "key", s) : n; - h = ""; - } - if ( - "string" == typeof (d = h) || - "number" == typeof d || - "boolean" == typeof d || - "symbol" == typeof d || - "bigint" == typeof d || - b.isBuffer(h) - ) { - if (u) { - var g = v ? n : u(n, S.encoder, y, "key", s); - if ("comma" === e && v) { - for ( - var w = j.call(String(h), ","), E = "", R = 0; - R < w.length; - ++R - ) - E += - (0 === R ? "" : ",") + - p(u(w[R], S.encoder, y, "value", s)); - return [p(g) + "=" + E]; - } - return [p(g) + "=" + p(u(h, S.encoder, y, "value", s))]; - } - return [p(n) + "=" + p(String(h))]; - } - var k, - T = []; - if (void 0 === h) return T; - if ("comma" === e && m(h)) - k = [{ value: h.length > 0 ? h.join(",") || null : void 0 }]; - else if (m(f)) k = f; - else { - var x = Object.keys(h); - k = a ? x.sort(a) : x; - } - for (var C = 0; C < k.length; ++C) { - var N = k[C], - D = - "object" == typeof N && void 0 !== N.value - ? N.value - : h[N]; - if (!i || null !== D) { - var F = m(h) - ? "function" == typeof e - ? e(n, N) - : n - : n + (c ? "." + N : "[" + N + "]"); - O(T, t(D, F, e, o, i, u, f, a, c, l, s, p, v, y)); - } - } - return T; - }, - T = Object.prototype.hasOwnProperty, - x = Array.isArray, - C = { - allowDots: !1, - allowPrototypes: !1, - arrayLimit: 20, - charset: "utf-8", - charsetSentinel: !1, - comma: !1, - decoder: b.decode, - delimiter: "&", - depth: 5, - ignoreQueryPrefix: !1, - interpretNumericEntities: !1, - parameterLimit: 1e3, - parseArrays: !0, - plainObjects: !1, - strictNullHandling: !1, - }, - N = function (t) { - return t.replace(/&#(\d+);/g, function (t, r) { - return String.fromCharCode(parseInt(r, 10)); - }); - }, - D = function (t, r) { - return t && "string" == typeof t && r.comma && t.indexOf(",") > -1 - ? t.split(",") - : t; - }, - F = function (t, r, n, e) { - if (t) { - var o = n.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, - i = /(\[[^[\]]*])/g, - u = n.depth > 0 && /(\[[^[\]]*])/.exec(o), - f = u ? o.slice(0, u.index) : o, - a = []; - if (f) { - if ( - !n.plainObjects && - T.call(Object.prototype, f) && - !n.allowPrototypes - ) - return; - a.push(f); - } - for ( - var c = 0; - n.depth > 0 && null !== (u = i.exec(o)) && c < n.depth; - - ) { - if ( - ((c += 1), - !n.plainObjects && - T.call(Object.prototype, u[1].slice(1, -1)) && - !n.allowPrototypes) - ) - return; - a.push(u[1]); - } - return ( - u && a.push("[" + o.slice(u.index) + "]"), - (function (t, r, n, e) { - for ( - var o = e ? r : D(r, n), i = t.length - 1; - i >= 0; - --i - ) { - var u, - f = t[i]; - if ("[]" === f && n.parseArrays) u = [].concat(o); - else { - u = n.plainObjects ? Object.create(null) : {}; - var a = - "[" === f.charAt(0) && - "]" === f.charAt(f.length - 1) - ? f.slice(1, -1) - : f, - c = parseInt(a, 10); - n.parseArrays || "" !== a - ? !isNaN(c) && - f !== a && - String(c) === a && - c >= 0 && - n.parseArrays && - c <= n.arrayLimit - ? ((u = [])[c] = o) - : "__proto__" !== a && (u[a] = o) - : (u = { 0: o }); - } - o = u; - } - return o; - })(a, r, n, e) - ); - } - }, - $ = function (t, r) { - var n = (function (t) { - if (!t) return C; - if (null != t.decoder && "function" != typeof t.decoder) - throw new TypeError("Decoder has to be a function."); - if ( - void 0 !== t.charset && - "utf-8" !== t.charset && - "iso-8859-1" !== t.charset - ) - throw new TypeError( - "The charset option must be either utf-8, iso-8859-1, or undefined" - ); - return { - allowDots: - void 0 === t.allowDots ? C.allowDots : !!t.allowDots, - allowPrototypes: - "boolean" == typeof t.allowPrototypes - ? t.allowPrototypes - : C.allowPrototypes, - arrayLimit: - "number" == typeof t.arrayLimit - ? t.arrayLimit - : C.arrayLimit, - charset: void 0 === t.charset ? C.charset : t.charset, - charsetSentinel: - "boolean" == typeof t.charsetSentinel - ? t.charsetSentinel - : C.charsetSentinel, - comma: "boolean" == typeof t.comma ? t.comma : C.comma, - decoder: - "function" == typeof t.decoder ? t.decoder : C.decoder, - delimiter: - "string" == typeof t.delimiter || - b.isRegExp(t.delimiter) - ? t.delimiter - : C.delimiter, - depth: - "number" == typeof t.depth || !1 === t.depth - ? +t.depth - : C.depth, - ignoreQueryPrefix: !0 === t.ignoreQueryPrefix, - interpretNumericEntities: - "boolean" == typeof t.interpretNumericEntities - ? t.interpretNumericEntities - : C.interpretNumericEntities, - parameterLimit: - "number" == typeof t.parameterLimit - ? t.parameterLimit - : C.parameterLimit, - parseArrays: !1 !== t.parseArrays, - plainObjects: - "boolean" == typeof t.plainObjects - ? t.plainObjects - : C.plainObjects, - strictNullHandling: - "boolean" == typeof t.strictNullHandling - ? t.strictNullHandling - : C.strictNullHandling, - }; - })(r); - if ("" === t || null == t) - return n.plainObjects ? Object.create(null) : {}; - for ( - var e = - "string" == typeof t - ? (function (t, r) { - var n, - e = {}, - o = ( - r.ignoreQueryPrefix - ? t.replace(/^\?/, "") - : t - ).split( - r.delimiter, - Infinity === r.parameterLimit - ? void 0 - : r.parameterLimit - ), - i = -1, - u = r.charset; - if (r.charsetSentinel) - for (n = 0; n < o.length; ++n) - 0 === o[n].indexOf("utf8=") && - ("utf8=%E2%9C%93" === o[n] - ? (u = "utf-8") - : "utf8=%26%2310003%3B" === - o[n] && - (u = "iso-8859-1"), - (i = n), - (n = o.length)); - for (n = 0; n < o.length; ++n) - if (n !== i) { - var f, - a, - c = o[n], - l = c.indexOf("]="), - s = - -1 === l - ? c.indexOf("=") - : l + 1; - -1 === s - ? ((f = r.decoder( - c, - C.decoder, - u, - "key" - )), - (a = r.strictNullHandling - ? null - : "")) - : ((f = r.decoder( - c.slice(0, s), - C.decoder, - u, - "key" - )), - (a = b.maybeMap( - D(c.slice(s + 1), r), - function (t) { - return r.decoder( - t, - C.decoder, - u, - "value" - ); - } - ))), - a && - r.interpretNumericEntities && - "iso-8859-1" === u && - (a = N(a)), - c.indexOf("[]=") > -1 && - (a = x(a) ? [a] : a), - (e[f] = T.call(e, f) - ? b.combine(e[f], a) - : a); - } - return e; - })(t, n) - : t, - o = n.plainObjects ? Object.create(null) : {}, - i = Object.keys(e), - u = 0; - u < i.length; - ++u - ) { - var f = i[u], - a = F(f, e[f], n, "string" == typeof t); - o = b.merge(o, a, n); - } - return b.compact(o); - }, - A = /*#__PURE__*/ (function () { - function t(t, r, n) { - var e, o; - (this.name = t), - (this.definition = r), - (this.bindings = null != (e = r.bindings) ? e : {}), - (this.wheres = null != (o = r.wheres) ? o : {}), - (this.config = n); - } - var n = t.prototype; - return ( - (n.matchesUrl = function (t) { - var r = this; - if (!this.definition.methods.includes("GET")) return !1; - var n = this.template - .replace( - /(\/?){([^}?]*)(\??)}/g, - function (t, n, e, o) { - var i, - u = - "(?<" + - e + - ">" + - ((null == (i = r.wheres[e]) - ? void 0 - : i.replace( - /(^\^)|(\$$)/g, - "" - )) || "[^/?]+") + - ")"; - return o ? "(" + n + u + ")?" : "" + n + u; - } - ) - .replace(/^\w+:\/\//, ""), - e = t.replace(/^\w+:\/\//, "").split("?"), - o = e[0], - i = e[1], - u = new RegExp("^" + n + "/?$").exec(o); - if (u) { - for (var f in u.groups) - u.groups[f] = - "string" == typeof u.groups[f] - ? decodeURIComponent(u.groups[f]) - : u.groups[f]; - return { params: u.groups, query: $(i) }; - } - return !1; - }), - (n.compile = function (t) { - var r = this, - n = this.parameterSegments; - return n.length - ? this.template - .replace(/{([^}?]+)(\??)}/g, function (e, o, i) { - var u, f, a; - if (!i && [null, void 0].includes(t[o])) - throw new Error( - "Ziggy error: '" + - o + - "' parameter is required for route '" + - r.name + - "'." - ); - if ( - n[n.length - 1].name === o && - ".*" === r.wheres[o] - ) - return encodeURIComponent( - null != (a = t[o]) ? a : "" - ).replace(/%2F/g, "/"); - if ( - r.wheres[o] && - !new RegExp( - "^" + - (i - ? "(" + r.wheres[o] + ")?" - : r.wheres[o]) + - "$" - ).test(null != (u = t[o]) ? u : "") - ) - throw new Error( - "Ziggy error: '" + - o + - "' parameter does not match required format '" + - r.wheres[o] + - "' for route '" + - r.name + - "'." - ); - return encodeURIComponent( - null != (f = t[o]) ? f : "" - ); - }) - .replace(this.origin + "//", this.origin + "/") - .replace(/\/+$/, "") - : this.template; - }), - r(t, [ - { - key: "template", - get: function () { - return ( - this.origin + - "/" + - this.definition.uri - ).replace(/\/+$/, ""); - }, - }, - { - key: "origin", - get: function () { - return this.config.absolute - ? this.definition.domain - ? "" + - this.config.url.match(/^\w+:\/\//)[0] + - this.definition.domain + - (this.config.port - ? ":" + this.config.port - : "") - : this.config.url - : ""; - }, - }, - { - key: "parameterSegments", - get: function () { - var t, r; - return null != - (t = - null == - (r = this.template.match(/{[^}?]+\??}/g)) - ? void 0 - : r.map(function (t) { - return { - name: t.replace( - /{|\??}/g, - "" - ), - required: !/\?}$/.test(t), - }; - })) - ? t - : []; - }, - }, - ]), - t - ); - })(), - I = /*#__PURE__*/ (function (t) { - var e, i; - function u(r, e, o, i) { - var u; - if ( - (void 0 === o && (o = !0), - ((u = t.call(this) || this).t = - null != i - ? i - : "undefined" != typeof Ziggy - ? Ziggy - : null == globalThis - ? void 0 - : globalThis.Ziggy), - (u.t = n({}, u.t, { absolute: o })), - r) - ) { - if (!u.t.routes[r]) - throw new Error( - "Ziggy error: route '" + - r + - "' is not in the route list." - ); - (u.i = new A(r, u.t.routes[r], u.t)), (u.u = u.l(e)); - } - return u; - } - (i = t), - ((e = u).prototype = Object.create(i.prototype)), - (e.prototype.constructor = e), - o(e, i); - var f = u.prototype; - return ( - (f.toString = function () { - var t = this, - r = Object.keys(this.u) - .filter(function (r) { - return !t.i.parameterSegments.some(function ( - t - ) { - return t.name === r; - }); - }) - .filter(function (t) { - return "_query" !== t; - }) - .reduce(function (r, e) { - var o; - return n({}, r, (((o = {})[e] = t.u[e]), o)); - }, {}); - return ( - this.i.compile(this.u) + - (function (t, r) { - var n, - e = t, - o = (function (t) { - if (!t) return S; - if ( - null != t.encoder && - "function" != typeof t.encoder - ) - throw new TypeError( - "Encoder has to be a function." - ); - var r = t.charset || S.charset; - if ( - void 0 !== t.charset && - "utf-8" !== t.charset && - "iso-8859-1" !== t.charset - ) - throw new TypeError( - "The charset option must be either utf-8, iso-8859-1, or undefined" - ); - var n = s.default; - if (void 0 !== t.format) { - if (!h.call(s.formatters, t.format)) - throw new TypeError( - "Unknown format option provided." - ); - n = t.format; - } - var e = s.formatters[n], - o = S.filter; - return ( - ("function" == typeof t.filter || - m(t.filter)) && - (o = t.filter), - { - addQueryPrefix: - "boolean" == - typeof t.addQueryPrefix - ? t.addQueryPrefix - : S.addQueryPrefix, - allowDots: - void 0 === t.allowDots - ? S.allowDots - : !!t.allowDots, - charset: r, - charsetSentinel: - "boolean" == - typeof t.charsetSentinel - ? t.charsetSentinel - : S.charsetSentinel, - delimiter: - void 0 === t.delimiter - ? S.delimiter - : t.delimiter, - encode: - "boolean" == typeof t.encode - ? t.encode - : S.encode, - encoder: - "function" == typeof t.encoder - ? t.encoder - : S.encoder, - encodeValuesOnly: - "boolean" == - typeof t.encodeValuesOnly - ? t.encodeValuesOnly - : S.encodeValuesOnly, - filter: o, - format: n, - formatter: e, - serializeDate: - "function" == - typeof t.serializeDate - ? t.serializeDate - : S.serializeDate, - skipNulls: - "boolean" == typeof t.skipNulls - ? t.skipNulls - : S.skipNulls, - sort: - "function" == typeof t.sort - ? t.sort - : null, - strictNullHandling: - "boolean" == - typeof t.strictNullHandling - ? t.strictNullHandling - : S.strictNullHandling, - } - ); - })(r); - "function" == typeof o.filter - ? (e = (0, o.filter)("", e)) - : m(o.filter) && (n = o.filter); - var i = []; - if ("object" != typeof e || null === e) return ""; - var u = - g[ - r && r.arrayFormat in g - ? r.arrayFormat - : r && "indices" in r - ? r.indices - ? "indices" - : "repeat" - : "indices" - ]; - n || (n = Object.keys(e)), o.sort && n.sort(o.sort); - for (var f = 0; f < n.length; ++f) { - var a = n[f]; - (o.skipNulls && null === e[a]) || - O( - i, - k( - e[a], - a, - u, - o.strictNullHandling, - o.skipNulls, - o.encode ? o.encoder : null, - o.filter, - o.sort, - o.allowDots, - o.serializeDate, - o.format, - o.formatter, - o.encodeValuesOnly, - o.charset - ) - ); - } - var c = i.join(o.delimiter), - l = !0 === o.addQueryPrefix ? "?" : ""; - return ( - o.charsetSentinel && - (l += - "iso-8859-1" === o.charset - ? "utf8=%26%2310003%3B&" - : "utf8=%E2%9C%93&"), - c.length > 0 ? l + c : "" - ); - })(n({}, r, this.u._query), { - addQueryPrefix: !0, - arrayFormat: "indices", - encodeValuesOnly: !0, - skipNulls: !0, - encoder: function (t, r) { - return "boolean" == typeof t ? Number(t) : r(t); - }, - }) - ); - }), - (f.p = function (t) { - var r = this; - t - ? this.t.absolute && - t.startsWith("/") && - (t = this.v().host + t) - : (t = this.h()); - var e = {}, - o = Object.entries(this.t.routes).find(function (n) { - return (e = new A(n[0], n[1], r.t).matchesUrl(t)); - }) || [void 0, void 0]; - return n({ name: o[0] }, e, { route: o[1] }); - }), - (f.h = function () { - var t = this.v(), - r = t.pathname, - n = t.search; - return ( - (this.t.absolute - ? t.host + r - : r - .replace( - this.t.url.replace(/^\w*:\/\/[^/]+/, ""), - "" - ) - .replace(/^\/+/, "/")) + n - ); - }), - (f.current = function (t, r) { - var e = this.p(), - o = e.name, - i = e.params, - u = e.query, - f = e.route; - if (!t) return o; - var a = new RegExp( - "^" + t.replace(/\./g, "\\.").replace(/\*/g, ".*") + "$" - ).test(o); - if ([null, void 0].includes(r) || !a) return a; - var c = new A(o, f, this.t); - r = this.l(r, c); - var l = n({}, i, u); - return ( - !( - !Object.values(r).every(function (t) { - return !t; - }) || - Object.values(l).some(function (t) { - return void 0 !== t; - }) - ) || - Object.entries(r).every(function (t) { - return l[t[0]] == t[1]; - }) - ); - }), - (f.v = function () { - var t, - r, - n, - e, - o, - i, - u = "undefined" != typeof window ? window.location : {}, - f = u.host, - a = u.pathname, - c = u.search; - return { - host: - null != - (t = - null == (r = this.t.location) ? void 0 : r.host) - ? t - : void 0 === f - ? "" - : f, - pathname: - null != - (n = - null == (e = this.t.location) - ? void 0 - : e.pathname) - ? n - : void 0 === a - ? "" - : a, - search: - null != - (o = - null == (i = this.t.location) - ? void 0 - : i.search) - ? o - : void 0 === c - ? "" - : c, - }; - }), - (f.has = function (t) { - return Object.keys(this.t.routes).includes(t); - }), - (f.l = function (t, r) { - var e = this; - void 0 === t && (t = {}), - void 0 === r && (r = this.i), - null != t || (t = {}), - (t = ["string", "number"].includes(typeof t) ? [t] : t); - var o = r.parameterSegments.filter(function (t) { - return !e.t.defaults[t.name]; - }); - if (Array.isArray(t)) - t = t.reduce(function (t, r, e) { - var i, u; - return n( - {}, - t, - o[e] - ? (((i = {})[o[e].name] = r), i) - : "object" == typeof r - ? r - : (((u = {})[r] = ""), u) - ); - }, {}); - else if ( - 1 === o.length && - !t[o[0].name] && - (t.hasOwnProperty(Object.values(r.bindings)[0]) || - t.hasOwnProperty("id")) - ) { - var i; - ((i = {})[o[0].name] = t), (t = i); - } - return n({}, this.g(r), this.m(t, r)); - }), - (f.g = function (t) { - var r = this; - return t.parameterSegments - .filter(function (t) { - return r.t.defaults[t.name]; - }) - .reduce(function (t, e, o) { - var i, - u = e.name; - return n( - {}, - t, - (((i = {})[u] = r.t.defaults[u]), i) - ); - }, {}); - }), - (f.m = function (t, r) { - var e = r.bindings, - o = r.parameterSegments; - return Object.entries(t).reduce(function (t, r) { - var i, - u, - f = r[0], - a = r[1]; - if ( - !a || - "object" != typeof a || - Array.isArray(a) || - !o.some(function (t) { - return t.name === f; - }) - ) - return n({}, t, (((u = {})[f] = a), u)); - if (!a.hasOwnProperty(e[f])) { - if (!a.hasOwnProperty("id")) - throw new Error( - "Ziggy error: object passed as '" + - f + - "' parameter is missing route model binding key '" + - e[f] + - "'." - ); - e[f] = "id"; - } - return n({}, t, (((i = {})[f] = a[e[f]]), i)); - }, {}); - }), - (f.valueOf = function () { - return this.toString(); - }), - (f.check = function (t) { - return this.has(t); - }), - r(u, [ - { - key: "params", - get: function () { - var t = this.p(); - return n({}, t.params, t.query); - }, - }, - ]), - u - ); - })(/*#__PURE__*/ f(String)); - return function (t, r, n, e) { - var o = new I(t, r, n, e); - return t ? o.toString() : o; - }; -}); +!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t||self).route=r()}(this,function(){function t(t,r){for(var e=0;e1;){var r=t.pop(),e=r.obj[r.prop];if(v(e)){for(var n=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===l.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=p[a]:a<2048?u+=p[192|a>>6]+p[128|63&a]:a<55296||a>=57344?u+=p[224|a>>12]+p[128|a>>6&63]+p[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=p[240|a>>18]+p[128|a>>12&63]+p[128|a>>6&63]+p[128|63&a])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(v(t)){for(var e=[],n=0;n0?h.join(",")||null:void 0}];else if(m(f))T=f;else{var x=Object.keys(h);T=a?x.sort(a):x}for(var C=0;C-1?t.split(","):t},D=function(t,r,e,n){if(t){var o=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=e.depth>0&&/(\[[^[\]]*])/.exec(o),f=u?o.slice(0,u.index):o,a=[];if(f){if(!e.plainObjects&&T.call(Object.prototype,f)&&!e.allowPrototypes)return;a.push(f)}for(var c=0;e.depth>0&&null!==(u=i.exec(o))&&c=0;--i){var u,f=t[i];if("[]"===f&&e.parseArrays)u=[].concat(o);else{u=e.plainObjects?Object.create(null):{};var a="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,c=parseInt(a,10);e.parseArrays||""!==a?!isNaN(c)&&f!==a&&String(c)===a&&c>=0&&e.parseArrays&&c<=e.arrayLimit?(u=[])[c]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,r,e,n)}},F=function(t,r){var e=function(t){if(!t)return x;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?x.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:x.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:x.arrayLimit,charset:void 0===t.charset?x.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:x.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:x.comma,decoder:"function"==typeof t.decoder?t.decoder:x.decoder,delimiter:"string"==typeof t.delimiter||d.isRegExp(t.delimiter)?t.delimiter:x.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:x.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:x.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:x.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:x.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:x.strictNullHandling}}(r);if(""===t||null==t)return e.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,r){var e,n={},o=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),i=-1,u=r.charset;if(r.charsetSentinel)for(e=0;e-1&&(a=k(a)?[a]:a),n[f]=T.call(n,f)?d.combine(n[f],a):a}return n}(t,e):t,o=e.plainObjects?Object.create(null):{},i=Object.keys(n),u=0;u"+((null==(i=r.wheres[n])?void 0:i.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return o?"("+e+u+")?":""+e+u}).replace(/^\w+:\/\//,""),n=t.replace(/^\w+:\/\//,"").split("?"),o=n[0],i=n[1],u=new RegExp("^"+e+"/?$").exec(o);if(u){for(var f in u.groups)u.groups[f]="string"==typeof u.groups[f]?decodeURIComponent(u.groups[f]):u.groups[f];return{params:u.groups,query:F(i)}}return!1},e.compile=function(t){var r=this,e=this.parameterSegments;return e.length?this.template.replace(/{([^}?]+)(\??)}/g,function(n,o,i){var u;if(!i&&[null,void 0].includes(t[o]))throw new Error("Ziggy error: '"+o+"' parameter is required for route '"+r.name+"'.");if(r.wheres[o]){var f,a;if(!new RegExp("^"+(i?"("+r.wheres[o]+")?":r.wheres[o])+"$").test(null!=(f=t[o])?f:""))throw new Error("Ziggy error: '"+o+"' parameter does not match required format '"+r.wheres[o]+"' for route '"+r.name+"'.");if(e[e.length-1].name===o)return encodeURIComponent(null!=(a=t[o])?a:"").replace(/%2F/g,"/")}return encodeURIComponent(null!=(u=t[o])?u:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},r(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,r;return null!=(t=null==(r=this.template.match(/{[^}?]+\??}/g))?void 0:r.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),$=/*#__PURE__*/function(t){var n,i;function u(r,n,o,i){var u;if(void 0===o&&(o=!0),(u=t.call(this)||this).t=null!=i?i:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,u.t=e({},u.t,{absolute:o}),r){if(!u.t.routes[r])throw new Error("Ziggy error: route '"+r+"' is not in the route list.");u.i=new P(r,u.t.routes[r],u.t),u.u=u.l(n)}return u}i=t,(n=u).prototype=Object.create(i.prototype),n.prototype.constructor=n,o(n,i);var f=u.prototype;return f.toString=function(){var t=this,r=Object.keys(this.u).filter(function(r){return!t.i.parameterSegments.some(function(t){return t.name===r})}).filter(function(t){return"_query"!==t}).reduce(function(r,n){var o;return e({},r,((o={})[n]=t.u[n],o))},{});return this.i.compile(this.u)+function(t,r){var e,n=t,o=function(t){if(!t)return R;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||R.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=l.default;if(void 0!==t.format){if(!b.call(l.formatters,t.format))throw new TypeError("Unknown format option provided.");e=t.format}var n=l.formatters[e],o=R.filter;return("function"==typeof t.filter||m(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:R.addQueryPrefix,allowDots:void 0===t.allowDots?R.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:R.charsetSentinel,delimiter:void 0===t.delimiter?R.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:R.encode,encoder:"function"==typeof t.encoder?t.encoder:R.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:R.encodeValuesOnly,filter:o,format:e,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:R.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:R.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:R.strictNullHandling}}(r);"function"==typeof o.filter?n=(0,o.filter)("",n):m(o.filter)&&(e=o.filter);var i=[];if("object"!=typeof n||null===n)return"";var u=h[r&&r.arrayFormat in h?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];e||(e=Object.keys(n)),o.sort&&e.sort(o.sort);for(var f=0;f0?s+c:""}(e({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,r){return"boolean"==typeof t?Number(t):r(t)}})},f.v=function(t){var r=this;t?this.t.absolute&&t.startsWith("/")&&(t=this.p().host+t):t=this.h();var n={},o=Object.entries(this.t.routes).find(function(e){return n=new P(e[0],e[1],r.t).matchesUrl(t)})||[void 0,void 0];return e({name:o[0]},n,{route:o[1]})},f.h=function(){var t=this.p(),r=t.pathname,e=t.search;return(this.t.absolute?t.host+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+e},f.current=function(t,r){var n=this.v(),o=n.name,i=n.params,u=n.query,f=n.route;if(!t)return o;var a=new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o);if([null,void 0].includes(r)||!a)return a;var c=new P(o,f,this.t);r=this.l(r,c);var l=e({},i,u);return!(!Object.values(r).every(function(t){return!t})||Object.values(l).some(function(t){return void 0!==t}))||Object.entries(r).every(function(t){return l[t[0]]==t[1]})},f.p=function(){var t,r,e,n,o,i,u="undefined"!=typeof window?window.location:{},f=u.host,a=u.pathname,c=u.search;return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:void 0===f?"":f,pathname:null!=(e=null==(n=this.t.location)?void 0:n.pathname)?e:void 0===a?"":a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:void 0===c?"":c}},f.has=function(t){return Object.keys(this.t.routes).includes(t)},f.l=function(t,r){var n=this;void 0===t&&(t={}),void 0===r&&(r=this.i),null!=t||(t={}),t=["string","number"].includes(typeof t)?[t]:t;var o=r.parameterSegments.filter(function(t){return!n.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,r,n){var i,u;return e({},t,o[n]?((i={})[o[n].name]=r,i):"object"==typeof r?r:((u={})[r]="",u))},{});else if(1===o.length&&!t[o[0].name]&&(t.hasOwnProperty(Object.values(r.bindings)[0])||t.hasOwnProperty("id"))){var i;(i={})[o[0].name]=t,t=i}return e({},this.m(r),this.g(t,r))},f.m=function(t){var r=this;return t.parameterSegments.filter(function(t){return r.t.defaults[t.name]}).reduce(function(t,n,o){var i,u=n.name;return e({},t,((i={})[u]=r.t.defaults[u],i))},{})},f.g=function(t,r){var n=r.bindings,o=r.parameterSegments;return Object.entries(t).reduce(function(t,r){var i,u,f=r[0],a=r[1];if(!a||"object"!=typeof a||Array.isArray(a)||!o.some(function(t){return t.name===f}))return e({},t,((u={})[f]=a,u));if(!a.hasOwnProperty(n[f])){if(!a.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+f+"' parameter is missing route model binding key '"+n[f]+"'.");n[f]="id"}return e({},t,((i={})[f]=a[n[f]],i))},{})},f.valueOf=function(){return this.toString()},f.check=function(t){return this.has(t)},r(u,[{key:"params",get:function(){var t=this.v();return e({},t.params,t.query)}}]),u}(/*#__PURE__*/u(String));return function(t,r,e,n){var o=new $(t,r,e,n);return t?o.toString():o}}); diff --git a/dist/index.m.js b/dist/index.m.js index 726f8442..13ba138c 100644 --- a/dist/index.m.js +++ b/dist/index.m.js @@ -1,1187 +1 @@ -function t(t, r) { - for (var n = 0; n < r.length; n++) { - var e = r[n]; - (e.enumerable = e.enumerable || !1), - (e.configurable = !0), - "value" in e && (e.writable = !0), - Object.defineProperty(t, e.key, e); - } -} -function r(r, n, e) { - return ( - n && t(r.prototype, n), - e && t(r, e), - Object.defineProperty(r, "prototype", { writable: !1 }), - r - ); -} -function n() { - return ( - (n = Object.assign - ? Object.assign.bind() - : function (t) { - for (var r = 1; r < arguments.length; r++) { - var n = arguments[r]; - for (var e in n) - Object.prototype.hasOwnProperty.call(n, e) && - (t[e] = n[e]); - } - return t; - }), - n.apply(this, arguments) - ); -} -function e(t) { - return ( - (e = Object.setPrototypeOf - ? Object.getPrototypeOf.bind() - : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }), - e(t) - ); -} -function o(t, r) { - return ( - (o = Object.setPrototypeOf - ? Object.setPrototypeOf.bind() - : function (t, r) { - return (t.__proto__ = r), t; - }), - o(t, r) - ); -} -function i() { - if ("undefined" == typeof Reflect || !Reflect.construct) return !1; - if (Reflect.construct.sham) return !1; - if ("function" == typeof Proxy) return !0; - try { - return ( - Boolean.prototype.valueOf.call( - Reflect.construct(Boolean, [], function () {}) - ), - !0 - ); - } catch (t) { - return !1; - } -} -function u(t, r, n) { - return ( - (u = i() - ? Reflect.construct.bind() - : function (t, r, n) { - var e = [null]; - e.push.apply(e, r); - var i = new (Function.bind.apply(t, e))(); - return n && o(i, n.prototype), i; - }), - u.apply(null, arguments) - ); -} -function f(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return ( - (f = function (t) { - if ( - null === t || - -1 === Function.toString.call(t).indexOf("[native code]") - ) - return t; - if ("function" != typeof t) - throw new TypeError( - "Super expression must either be null or a function" - ); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, n); - } - function n() { - return u(t, arguments, e(this).constructor); - } - return ( - (n.prototype = Object.create(t.prototype, { - constructor: { - value: n, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - o(n, t) - ); - }), - f(t) - ); -} -var a = String.prototype.replace, - c = /%20/g, - l = { - default: "RFC3986", - formatters: { - RFC1738: function (t) { - return a.call(t, c, "+"); - }, - RFC3986: function (t) { - return String(t); - }, - }, - RFC1738: "RFC1738", - RFC3986: "RFC3986", - }, - s = Object.prototype.hasOwnProperty, - v = Array.isArray, - p = (function () { - for (var t = [], r = 0; r < 256; ++r) - t.push("%" + ((r < 16 ? "0" : "") + r.toString(16)).toUpperCase()); - return t; - })(), - y = function (t, r) { - for ( - var n = r && r.plainObjects ? Object.create(null) : {}, e = 0; - e < t.length; - ++e - ) - void 0 !== t[e] && (n[e] = t[e]); - return n; - }, - d = { - arrayToObject: y, - assign: function (t, r) { - return Object.keys(r).reduce(function (t, n) { - return (t[n] = r[n]), t; - }, t); - }, - combine: function (t, r) { - return [].concat(t, r); - }, - compact: function (t) { - for ( - var r = [{ obj: { o: t }, prop: "o" }], n = [], e = 0; - e < r.length; - ++e - ) - for ( - var o = r[e], i = o.obj[o.prop], u = Object.keys(i), f = 0; - f < u.length; - ++f - ) { - var a = u[f], - c = i[a]; - "object" == typeof c && - null !== c && - -1 === n.indexOf(c) && - (r.push({ obj: i, prop: a }), n.push(c)); - } - return ( - (function (t) { - for (; t.length > 1; ) { - var r = t.pop(), - n = r.obj[r.prop]; - if (v(n)) { - for (var e = [], o = 0; o < n.length; ++o) - void 0 !== n[o] && e.push(n[o]); - r.obj[r.prop] = e; - } - } - })(r), - t - ); - }, - decode: function (t, r, n) { - var e = t.replace(/\+/g, " "); - if ("iso-8859-1" === n) - return e.replace(/%[0-9a-f]{2}/gi, unescape); - try { - return decodeURIComponent(e); - } catch (t) { - return e; - } - }, - encode: function (t, r, n, e, o) { - if (0 === t.length) return t; - var i = t; - if ( - ("symbol" == typeof t - ? (i = Symbol.prototype.toString.call(t)) - : "string" != typeof t && (i = String(t)), - "iso-8859-1" === n) - ) - return escape(i).replace(/%u[0-9a-f]{4}/gi, function (t) { - return "%26%23" + parseInt(t.slice(2), 16) + "%3B"; - }); - for (var u = "", f = 0; f < i.length; ++f) { - var a = i.charCodeAt(f); - 45 === a || - 46 === a || - 95 === a || - 126 === a || - (a >= 48 && a <= 57) || - (a >= 65 && a <= 90) || - (a >= 97 && a <= 122) || - (o === l.RFC1738 && (40 === a || 41 === a)) - ? (u += i.charAt(f)) - : a < 128 - ? (u += p[a]) - : a < 2048 - ? (u += p[192 | (a >> 6)] + p[128 | (63 & a)]) - : a < 55296 || a >= 57344 - ? (u += - p[224 | (a >> 12)] + - p[128 | ((a >> 6) & 63)] + - p[128 | (63 & a)]) - : ((a = - 65536 + - (((1023 & a) << 10) | - (1023 & i.charCodeAt((f += 1))))), - (u += - p[240 | (a >> 18)] + - p[128 | ((a >> 12) & 63)] + - p[128 | ((a >> 6) & 63)] + - p[128 | (63 & a)])); - } - return u; - }, - isBuffer: function (t) { - return !( - !t || - "object" != typeof t || - !( - t.constructor && - t.constructor.isBuffer && - t.constructor.isBuffer(t) - ) - ); - }, - isRegExp: function (t) { - return "[object RegExp]" === Object.prototype.toString.call(t); - }, - maybeMap: function (t, r) { - if (v(t)) { - for (var n = [], e = 0; e < t.length; e += 1) n.push(r(t[e])); - return n; - } - return r(t); - }, - merge: function t(r, n, e) { - if (!n) return r; - if ("object" != typeof n) { - if (v(r)) r.push(n); - else { - if (!r || "object" != typeof r) return [r, n]; - ((e && (e.plainObjects || e.allowPrototypes)) || - !s.call(Object.prototype, n)) && - (r[n] = !0); - } - return r; - } - if (!r || "object" != typeof r) return [r].concat(n); - var o = r; - return ( - v(r) && !v(n) && (o = y(r, e)), - v(r) && v(n) - ? (n.forEach(function (n, o) { - if (s.call(r, o)) { - var i = r[o]; - i && - "object" == typeof i && - n && - "object" == typeof n - ? (r[o] = t(i, n, e)) - : r.push(n); - } else r[o] = n; - }), - r) - : Object.keys(n).reduce(function (r, o) { - var i = n[o]; - return (r[o] = s.call(r, o) ? t(r[o], i, e) : i), r; - }, o) - ); - }, - }, - b = Object.prototype.hasOwnProperty, - h = { - brackets: function (t) { - return t + "[]"; - }, - comma: "comma", - indices: function (t, r) { - return t + "[" + r + "]"; - }, - repeat: function (t) { - return t; - }, - }, - g = Array.isArray, - m = String.prototype.split, - j = Array.prototype.push, - w = function (t, r) { - j.apply(t, g(r) ? r : [r]); - }, - O = Date.prototype.toISOString, - E = l.default, - R = { - addQueryPrefix: !1, - allowDots: !1, - charset: "utf-8", - charsetSentinel: !1, - delimiter: "&", - encode: !0, - encoder: d.encode, - encodeValuesOnly: !1, - format: E, - formatter: l.formatters[E], - indices: !1, - serializeDate: function (t) { - return O.call(t); - }, - skipNulls: !1, - strictNullHandling: !1, - }, - S = function t(r, n, e, o, i, u, f, a, c, l, s, v, p, y) { - var b, - h = r; - if ( - ("function" == typeof f - ? (h = f(n, h)) - : h instanceof Date - ? (h = l(h)) - : "comma" === e && - g(h) && - (h = d.maybeMap(h, function (t) { - return t instanceof Date ? l(t) : t; - })), - null === h) - ) { - if (o) return u && !p ? u(n, R.encoder, y, "key", s) : n; - h = ""; - } - if ( - "string" == typeof (b = h) || - "number" == typeof b || - "boolean" == typeof b || - "symbol" == typeof b || - "bigint" == typeof b || - d.isBuffer(h) - ) { - if (u) { - var j = p ? n : u(n, R.encoder, y, "key", s); - if ("comma" === e && p) { - for ( - var O = m.call(String(h), ","), E = "", S = 0; - S < O.length; - ++S - ) - E += - (0 === S ? "" : ",") + - v(u(O[S], R.encoder, y, "value", s)); - return [v(j) + "=" + E]; - } - return [v(j) + "=" + v(u(h, R.encoder, y, "value", s))]; - } - return [v(n) + "=" + v(String(h))]; - } - var k, - x = []; - if (void 0 === h) return x; - if ("comma" === e && g(h)) - k = [{ value: h.length > 0 ? h.join(",") || null : void 0 }]; - else if (g(f)) k = f; - else { - var C = Object.keys(h); - k = a ? C.sort(a) : C; - } - for (var N = 0; N < k.length; ++N) { - var T = k[N], - F = "object" == typeof T && void 0 !== T.value ? T.value : h[T]; - if (!i || null !== F) { - var D = g(h) - ? "function" == typeof e - ? e(n, T) - : n - : n + (c ? "." + T : "[" + T + "]"); - w(x, t(F, D, e, o, i, u, f, a, c, l, s, v, p, y)); - } - } - return x; - }, - k = Object.prototype.hasOwnProperty, - x = Array.isArray, - C = { - allowDots: !1, - allowPrototypes: !1, - arrayLimit: 20, - charset: "utf-8", - charsetSentinel: !1, - comma: !1, - decoder: d.decode, - delimiter: "&", - depth: 5, - ignoreQueryPrefix: !1, - interpretNumericEntities: !1, - parameterLimit: 1e3, - parseArrays: !0, - plainObjects: !1, - strictNullHandling: !1, - }, - N = function (t) { - return t.replace(/&#(\d+);/g, function (t, r) { - return String.fromCharCode(parseInt(r, 10)); - }); - }, - T = function (t, r) { - return t && "string" == typeof t && r.comma && t.indexOf(",") > -1 - ? t.split(",") - : t; - }, - F = function (t, r, n, e) { - if (t) { - var o = n.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, - i = /(\[[^[\]]*])/g, - u = n.depth > 0 && /(\[[^[\]]*])/.exec(o), - f = u ? o.slice(0, u.index) : o, - a = []; - if (f) { - if ( - !n.plainObjects && - k.call(Object.prototype, f) && - !n.allowPrototypes - ) - return; - a.push(f); - } - for ( - var c = 0; - n.depth > 0 && null !== (u = i.exec(o)) && c < n.depth; - - ) { - if ( - ((c += 1), - !n.plainObjects && - k.call(Object.prototype, u[1].slice(1, -1)) && - !n.allowPrototypes) - ) - return; - a.push(u[1]); - } - return ( - u && a.push("[" + o.slice(u.index) + "]"), - (function (t, r, n, e) { - for ( - var o = e ? r : T(r, n), i = t.length - 1; - i >= 0; - --i - ) { - var u, - f = t[i]; - if ("[]" === f && n.parseArrays) u = [].concat(o); - else { - u = n.plainObjects ? Object.create(null) : {}; - var a = - "[" === f.charAt(0) && - "]" === f.charAt(f.length - 1) - ? f.slice(1, -1) - : f, - c = parseInt(a, 10); - n.parseArrays || "" !== a - ? !isNaN(c) && - f !== a && - String(c) === a && - c >= 0 && - n.parseArrays && - c <= n.arrayLimit - ? ((u = [])[c] = o) - : "__proto__" !== a && (u[a] = o) - : (u = { 0: o }); - } - o = u; - } - return o; - })(a, r, n, e) - ); - } - }, - D = function (t, r) { - var n = (function (t) { - if (!t) return C; - if (null != t.decoder && "function" != typeof t.decoder) - throw new TypeError("Decoder has to be a function."); - if ( - void 0 !== t.charset && - "utf-8" !== t.charset && - "iso-8859-1" !== t.charset - ) - throw new TypeError( - "The charset option must be either utf-8, iso-8859-1, or undefined" - ); - return { - allowDots: void 0 === t.allowDots ? C.allowDots : !!t.allowDots, - allowPrototypes: - "boolean" == typeof t.allowPrototypes - ? t.allowPrototypes - : C.allowPrototypes, - arrayLimit: - "number" == typeof t.arrayLimit - ? t.arrayLimit - : C.arrayLimit, - charset: void 0 === t.charset ? C.charset : t.charset, - charsetSentinel: - "boolean" == typeof t.charsetSentinel - ? t.charsetSentinel - : C.charsetSentinel, - comma: "boolean" == typeof t.comma ? t.comma : C.comma, - decoder: "function" == typeof t.decoder ? t.decoder : C.decoder, - delimiter: - "string" == typeof t.delimiter || d.isRegExp(t.delimiter) - ? t.delimiter - : C.delimiter, - depth: - "number" == typeof t.depth || !1 === t.depth - ? +t.depth - : C.depth, - ignoreQueryPrefix: !0 === t.ignoreQueryPrefix, - interpretNumericEntities: - "boolean" == typeof t.interpretNumericEntities - ? t.interpretNumericEntities - : C.interpretNumericEntities, - parameterLimit: - "number" == typeof t.parameterLimit - ? t.parameterLimit - : C.parameterLimit, - parseArrays: !1 !== t.parseArrays, - plainObjects: - "boolean" == typeof t.plainObjects - ? t.plainObjects - : C.plainObjects, - strictNullHandling: - "boolean" == typeof t.strictNullHandling - ? t.strictNullHandling - : C.strictNullHandling, - }; - })(r); - if ("" === t || null == t) - return n.plainObjects ? Object.create(null) : {}; - for ( - var e = - "string" == typeof t - ? (function (t, r) { - var n, - e = {}, - o = ( - r.ignoreQueryPrefix - ? t.replace(/^\?/, "") - : t - ).split( - r.delimiter, - Infinity === r.parameterLimit - ? void 0 - : r.parameterLimit - ), - i = -1, - u = r.charset; - if (r.charsetSentinel) - for (n = 0; n < o.length; ++n) - 0 === o[n].indexOf("utf8=") && - ("utf8=%E2%9C%93" === o[n] - ? (u = "utf-8") - : "utf8=%26%2310003%3B" === - o[n] && (u = "iso-8859-1"), - (i = n), - (n = o.length)); - for (n = 0; n < o.length; ++n) - if (n !== i) { - var f, - a, - c = o[n], - l = c.indexOf("]="), - s = -1 === l ? c.indexOf("=") : l + 1; - -1 === s - ? ((f = r.decoder( - c, - C.decoder, - u, - "key" - )), - (a = r.strictNullHandling - ? null - : "")) - : ((f = r.decoder( - c.slice(0, s), - C.decoder, - u, - "key" - )), - (a = d.maybeMap( - T(c.slice(s + 1), r), - function (t) { - return r.decoder( - t, - C.decoder, - u, - "value" - ); - } - ))), - a && - r.interpretNumericEntities && - "iso-8859-1" === u && - (a = N(a)), - c.indexOf("[]=") > -1 && - (a = x(a) ? [a] : a), - (e[f] = k.call(e, f) - ? d.combine(e[f], a) - : a); - } - return e; - })(t, n) - : t, - o = n.plainObjects ? Object.create(null) : {}, - i = Object.keys(e), - u = 0; - u < i.length; - ++u - ) { - var f = i[u], - a = F(f, e[f], n, "string" == typeof t); - o = d.merge(o, a, n); - } - return d.compact(o); - }, - $ = /*#__PURE__*/ (function () { - function t(t, r, n) { - var e, o; - (this.name = t), - (this.definition = r), - (this.bindings = null != (e = r.bindings) ? e : {}), - (this.wheres = null != (o = r.wheres) ? o : {}), - (this.config = n); - } - var n = t.prototype; - return ( - (n.matchesUrl = function (t) { - var r = this; - if (!this.definition.methods.includes("GET")) return !1; - var n = this.template - .replace( - /(\/?){([^}?]*)(\??)}/g, - function (t, n, e, o) { - var i, - u = - "(?<" + - e + - ">" + - ((null == (i = r.wheres[e]) - ? void 0 - : i.replace(/(^\^)|(\$$)/g, "")) || - "[^/?]+") + - ")"; - return o ? "(" + n + u + ")?" : "" + n + u; - } - ) - .replace(/^\w+:\/\//, ""), - e = t.replace(/^\w+:\/\//, "").split("?"), - o = e[0], - i = e[1], - u = new RegExp("^" + n + "/?$").exec(o); - if (u) { - for (var f in u.groups) - u.groups[f] = - "string" == typeof u.groups[f] - ? decodeURIComponent(u.groups[f]) - : u.groups[f]; - return { params: u.groups, query: D(i) }; - } - return !1; - }), - (n.compile = function (t) { - var r = this, - n = this.parameterSegments; - return n.length - ? this.template - .replace(/{([^}?]+)(\??)}/g, function (e, o, i) { - var u, f, a; - if (!i && [null, void 0].includes(t[o])) - throw new Error( - "Ziggy error: '" + - o + - "' parameter is required for route '" + - r.name + - "'." - ); - if ( - n[n.length - 1].name === o && - ".*" === r.wheres[o] - ) - return encodeURIComponent( - null != (a = t[o]) ? a : "" - ).replace(/%2F/g, "/"); - if ( - r.wheres[o] && - !new RegExp( - "^" + - (i - ? "(" + r.wheres[o] + ")?" - : r.wheres[o]) + - "$" - ).test(null != (u = t[o]) ? u : "") - ) - throw new Error( - "Ziggy error: '" + - o + - "' parameter does not match required format '" + - r.wheres[o] + - "' for route '" + - r.name + - "'." - ); - return encodeURIComponent( - null != (f = t[o]) ? f : "" - ); - }) - .replace(this.origin + "//", this.origin + "/") - .replace(/\/+$/, "") - : this.template; - }), - r(t, [ - { - key: "template", - get: function () { - return ( - this.origin + - "/" + - this.definition.uri - ).replace(/\/+$/, ""); - }, - }, - { - key: "origin", - get: function () { - return this.config.absolute - ? this.definition.domain - ? "" + - this.config.url.match(/^\w+:\/\//)[0] + - this.definition.domain + - (this.config.port - ? ":" + this.config.port - : "") - : this.config.url - : ""; - }, - }, - { - key: "parameterSegments", - get: function () { - var t, r; - return null != - (t = - null == - (r = this.template.match(/{[^}?]+\??}/g)) - ? void 0 - : r.map(function (t) { - return { - name: t.replace(/{|\??}/g, ""), - required: !/\?}$/.test(t), - }; - })) - ? t - : []; - }, - }, - ]), - t - ); - })(), - A = /*#__PURE__*/ (function (t) { - var e, i; - function u(r, e, o, i) { - var u; - if ( - (void 0 === o && (o = !0), - ((u = t.call(this) || this).t = - null != i - ? i - : "undefined" != typeof Ziggy - ? Ziggy - : null == globalThis - ? void 0 - : globalThis.Ziggy), - (u.t = n({}, u.t, { absolute: o })), - r) - ) { - if (!u.t.routes[r]) - throw new Error( - "Ziggy error: route '" + - r + - "' is not in the route list." - ); - (u.i = new $(r, u.t.routes[r], u.t)), (u.u = u.l(e)); - } - return u; - } - (i = t), - ((e = u).prototype = Object.create(i.prototype)), - (e.prototype.constructor = e), - o(e, i); - var f = u.prototype; - return ( - (f.toString = function () { - var t = this, - r = Object.keys(this.u) - .filter(function (r) { - return !t.i.parameterSegments.some(function (t) { - return t.name === r; - }); - }) - .filter(function (t) { - return "_query" !== t; - }) - .reduce(function (r, e) { - var o; - return n({}, r, (((o = {})[e] = t.u[e]), o)); - }, {}); - return ( - this.i.compile(this.u) + - (function (t, r) { - var n, - e = t, - o = (function (t) { - if (!t) return R; - if ( - null != t.encoder && - "function" != typeof t.encoder - ) - throw new TypeError( - "Encoder has to be a function." - ); - var r = t.charset || R.charset; - if ( - void 0 !== t.charset && - "utf-8" !== t.charset && - "iso-8859-1" !== t.charset - ) - throw new TypeError( - "The charset option must be either utf-8, iso-8859-1, or undefined" - ); - var n = l.default; - if (void 0 !== t.format) { - if (!b.call(l.formatters, t.format)) - throw new TypeError( - "Unknown format option provided." - ); - n = t.format; - } - var e = l.formatters[n], - o = R.filter; - return ( - ("function" == typeof t.filter || - g(t.filter)) && - (o = t.filter), - { - addQueryPrefix: - "boolean" == typeof t.addQueryPrefix - ? t.addQueryPrefix - : R.addQueryPrefix, - allowDots: - void 0 === t.allowDots - ? R.allowDots - : !!t.allowDots, - charset: r, - charsetSentinel: - "boolean" == - typeof t.charsetSentinel - ? t.charsetSentinel - : R.charsetSentinel, - delimiter: - void 0 === t.delimiter - ? R.delimiter - : t.delimiter, - encode: - "boolean" == typeof t.encode - ? t.encode - : R.encode, - encoder: - "function" == typeof t.encoder - ? t.encoder - : R.encoder, - encodeValuesOnly: - "boolean" == - typeof t.encodeValuesOnly - ? t.encodeValuesOnly - : R.encodeValuesOnly, - filter: o, - format: n, - formatter: e, - serializeDate: - "function" == typeof t.serializeDate - ? t.serializeDate - : R.serializeDate, - skipNulls: - "boolean" == typeof t.skipNulls - ? t.skipNulls - : R.skipNulls, - sort: - "function" == typeof t.sort - ? t.sort - : null, - strictNullHandling: - "boolean" == - typeof t.strictNullHandling - ? t.strictNullHandling - : R.strictNullHandling, - } - ); - })(r); - "function" == typeof o.filter - ? (e = (0, o.filter)("", e)) - : g(o.filter) && (n = o.filter); - var i = []; - if ("object" != typeof e || null === e) return ""; - var u = - h[ - r && r.arrayFormat in h - ? r.arrayFormat - : r && "indices" in r - ? r.indices - ? "indices" - : "repeat" - : "indices" - ]; - n || (n = Object.keys(e)), o.sort && n.sort(o.sort); - for (var f = 0; f < n.length; ++f) { - var a = n[f]; - (o.skipNulls && null === e[a]) || - w( - i, - S( - e[a], - a, - u, - o.strictNullHandling, - o.skipNulls, - o.encode ? o.encoder : null, - o.filter, - o.sort, - o.allowDots, - o.serializeDate, - o.format, - o.formatter, - o.encodeValuesOnly, - o.charset - ) - ); - } - var c = i.join(o.delimiter), - s = !0 === o.addQueryPrefix ? "?" : ""; - return ( - o.charsetSentinel && - (s += - "iso-8859-1" === o.charset - ? "utf8=%26%2310003%3B&" - : "utf8=%E2%9C%93&"), - c.length > 0 ? s + c : "" - ); - })(n({}, r, this.u._query), { - addQueryPrefix: !0, - arrayFormat: "indices", - encodeValuesOnly: !0, - skipNulls: !0, - encoder: function (t, r) { - return "boolean" == typeof t ? Number(t) : r(t); - }, - }) - ); - }), - (f.v = function (t) { - var r = this; - t - ? this.t.absolute && - t.startsWith("/") && - (t = this.p().host + t) - : (t = this.h()); - var e = {}, - o = Object.entries(this.t.routes).find(function (n) { - return (e = new $(n[0], n[1], r.t).matchesUrl(t)); - }) || [void 0, void 0]; - return n({ name: o[0] }, e, { route: o[1] }); - }), - (f.h = function () { - var t = this.p(), - r = t.pathname, - n = t.search; - return ( - (this.t.absolute - ? t.host + r - : r - .replace( - this.t.url.replace(/^\w*:\/\/[^/]+/, ""), - "" - ) - .replace(/^\/+/, "/")) + n - ); - }), - (f.current = function (t, r) { - var e = this.v(), - o = e.name, - i = e.params, - u = e.query, - f = e.route; - if (!t) return o; - var a = new RegExp( - "^" + t.replace(/\./g, "\\.").replace(/\*/g, ".*") + "$" - ).test(o); - if ([null, void 0].includes(r) || !a) return a; - var c = new $(o, f, this.t); - r = this.l(r, c); - var l = n({}, i, u); - return ( - !( - !Object.values(r).every(function (t) { - return !t; - }) || - Object.values(l).some(function (t) { - return void 0 !== t; - }) - ) || - Object.entries(r).every(function (t) { - return l[t[0]] == t[1]; - }) - ); - }), - (f.p = function () { - var t, - r, - n, - e, - o, - i, - u = "undefined" != typeof window ? window.location : {}, - f = u.host, - a = u.pathname, - c = u.search; - return { - host: - null != - (t = null == (r = this.t.location) ? void 0 : r.host) - ? t - : void 0 === f - ? "" - : f, - pathname: - null != - (n = - null == (e = this.t.location) ? void 0 : e.pathname) - ? n - : void 0 === a - ? "" - : a, - search: - null != - (o = null == (i = this.t.location) ? void 0 : i.search) - ? o - : void 0 === c - ? "" - : c, - }; - }), - (f.has = function (t) { - return Object.keys(this.t.routes).includes(t); - }), - (f.l = function (t, r) { - var e = this; - void 0 === t && (t = {}), - void 0 === r && (r = this.i), - null != t || (t = {}), - (t = ["string", "number"].includes(typeof t) ? [t] : t); - var o = r.parameterSegments.filter(function (t) { - return !e.t.defaults[t.name]; - }); - if (Array.isArray(t)) - t = t.reduce(function (t, r, e) { - var i, u; - return n( - {}, - t, - o[e] - ? (((i = {})[o[e].name] = r), i) - : "object" == typeof r - ? r - : (((u = {})[r] = ""), u) - ); - }, {}); - else if ( - 1 === o.length && - !t[o[0].name] && - (t.hasOwnProperty(Object.values(r.bindings)[0]) || - t.hasOwnProperty("id")) - ) { - var i; - ((i = {})[o[0].name] = t), (t = i); - } - return n({}, this.g(r), this.m(t, r)); - }), - (f.g = function (t) { - var r = this; - return t.parameterSegments - .filter(function (t) { - return r.t.defaults[t.name]; - }) - .reduce(function (t, e, o) { - var i, - u = e.name; - return n({}, t, (((i = {})[u] = r.t.defaults[u]), i)); - }, {}); - }), - (f.m = function (t, r) { - var e = r.bindings, - o = r.parameterSegments; - return Object.entries(t).reduce(function (t, r) { - var i, - u, - f = r[0], - a = r[1]; - if ( - !a || - "object" != typeof a || - Array.isArray(a) || - !o.some(function (t) { - return t.name === f; - }) - ) - return n({}, t, (((u = {})[f] = a), u)); - if (!a.hasOwnProperty(e[f])) { - if (!a.hasOwnProperty("id")) - throw new Error( - "Ziggy error: object passed as '" + - f + - "' parameter is missing route model binding key '" + - e[f] + - "'." - ); - e[f] = "id"; - } - return n({}, t, (((i = {})[f] = a[e[f]]), i)); - }, {}); - }), - (f.valueOf = function () { - return this.toString(); - }), - (f.check = function (t) { - return this.has(t); - }), - r(u, [ - { - key: "params", - get: function () { - var t = this.v(); - return n({}, t.params, t.query); - }, - }, - ]), - u - ); - })(/*#__PURE__*/ f(String)); -function I(t, r, n, e) { - var o = new A(t, r, n, e); - return t ? o.toString() : o; -} -export { I as default }; +function t(t,r){for(var n=0;n1;){var r=t.pop(),n=r.obj[r.prop];if(v(n)){for(var e=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===l.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=p[a]:a<2048?u+=p[192|a>>6]+p[128|63&a]:a<55296||a>=57344?u+=p[224|a>>12]+p[128|a>>6&63]+p[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=p[240|a>>18]+p[128|a>>12&63]+p[128|a>>6&63]+p[128|63&a])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(v(t)){for(var n=[],e=0;e0?h.join(",")||null:void 0}];else if(m(f))k=f;else{var T=Object.keys(h);k=a?T.sort(a):T}for(var C=0;C-1?t.split(","):t},D=function(t,r,n,e){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),f=u?o.slice(0,u.index):o,a=[];if(f){if(!n.plainObjects&&k.call(Object.prototype,f)&&!n.allowPrototypes)return;a.push(f)}for(var c=0;n.depth>0&&null!==(u=i.exec(o))&&c=0;--i){var u,f=t[i];if("[]"===f&&n.parseArrays)u=[].concat(o);else{u=n.plainObjects?Object.create(null):{};var a="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,c=parseInt(a,10);n.parseArrays||""!==a?!isNaN(c)&&f!==a&&String(c)===a&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(u=[])[c]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,r,n,e)}},F=function(t,r){var n=function(t){if(!t)return T;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?T.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:T.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:T.arrayLimit,charset:void 0===t.charset?T.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:T.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:T.comma,decoder:"function"==typeof t.decoder?t.decoder:T.decoder,delimiter:"string"==typeof t.delimiter||d.isRegExp(t.delimiter)?t.delimiter:T.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:T.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:T.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:T.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:T.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:T.strictNullHandling}}(r);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var e="string"==typeof t?function(t,r){var n,e={},o=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),i=-1,u=r.charset;if(r.charsetSentinel)for(n=0;n-1&&(a=x(a)?[a]:a),e[f]=k.call(e,f)?d.combine(e[f],a):a}return e}(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(e),u=0;u"+((null==(i=r.wheres[e])?void 0:i.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return o?"("+n+u+")?":""+n+u}).replace(/^\w+:\/\//,""),e=t.replace(/^\w+:\/\//,"").split("?"),o=e[0],i=e[1],u=new RegExp("^"+n+"/?$").exec(o);if(u){for(var f in u.groups)u.groups[f]="string"==typeof u.groups[f]?decodeURIComponent(u.groups[f]):u.groups[f];return{params:u.groups,query:F(i)}}return!1},n.compile=function(t){var r=this,n=this.parameterSegments;return n.length?this.template.replace(/{([^}?]+)(\??)}/g,function(e,o,i){var u;if(!i&&[null,void 0].includes(t[o]))throw new Error("Ziggy error: '"+o+"' parameter is required for route '"+r.name+"'.");if(r.wheres[o]){var f,a;if(!new RegExp("^"+(i?"("+r.wheres[o]+")?":r.wheres[o])+"$").test(null!=(f=t[o])?f:""))throw new Error("Ziggy error: '"+o+"' parameter does not match required format '"+r.wheres[o]+"' for route '"+r.name+"'.");if(n[n.length-1].name===o)return encodeURIComponent(null!=(a=t[o])?a:"").replace(/%2F/g,"/")}return encodeURIComponent(null!=(u=t[o])?u:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},r(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,r;return null!=(t=null==(r=this.template.match(/{[^}?]+\??}/g))?void 0:r.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),$=/*#__PURE__*/function(t){var e,i;function u(r,e,o,i){var u;if(void 0===o&&(o=!0),(u=t.call(this)||this).t=null!=i?i:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,u.t=n({},u.t,{absolute:o}),r){if(!u.t.routes[r])throw new Error("Ziggy error: route '"+r+"' is not in the route list.");u.i=new P(r,u.t.routes[r],u.t),u.u=u.l(e)}return u}i=t,(e=u).prototype=Object.create(i.prototype),e.prototype.constructor=e,o(e,i);var f=u.prototype;return f.toString=function(){var t=this,r=Object.keys(this.u).filter(function(r){return!t.i.parameterSegments.some(function(t){return t.name===r})}).filter(function(t){return"_query"!==t}).reduce(function(r,e){var o;return n({},r,((o={})[e]=t.u[e],o))},{});return this.i.compile(this.u)+function(t,r){var n,e=t,o=function(t){if(!t)return R;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||R.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=l.default;if(void 0!==t.format){if(!b.call(l.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var e=l.formatters[n],o=R.filter;return("function"==typeof t.filter||m(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:R.addQueryPrefix,allowDots:void 0===t.allowDots?R.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:R.charsetSentinel,delimiter:void 0===t.delimiter?R.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:R.encode,encoder:"function"==typeof t.encoder?t.encoder:R.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:R.encodeValuesOnly,filter:o,format:n,formatter:e,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:R.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:R.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:R.strictNullHandling}}(r);"function"==typeof o.filter?e=(0,o.filter)("",e):m(o.filter)&&(n=o.filter);var i=[];if("object"!=typeof e||null===e)return"";var u=h[r&&r.arrayFormat in h?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];n||(n=Object.keys(e)),o.sort&&n.sort(o.sort);for(var f=0;f0?s+c:""}(n({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,r){return"boolean"==typeof t?Number(t):r(t)}})},f.v=function(t){var r=this;t?this.t.absolute&&t.startsWith("/")&&(t=this.p().host+t):t=this.h();var e={},o=Object.entries(this.t.routes).find(function(n){return e=new P(n[0],n[1],r.t).matchesUrl(t)})||[void 0,void 0];return n({name:o[0]},e,{route:o[1]})},f.h=function(){var t=this.p(),r=t.pathname,n=t.search;return(this.t.absolute?t.host+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+n},f.current=function(t,r){var e=this.v(),o=e.name,i=e.params,u=e.query,f=e.route;if(!t)return o;var a=new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o);if([null,void 0].includes(r)||!a)return a;var c=new P(o,f,this.t);r=this.l(r,c);var l=n({},i,u);return!(!Object.values(r).every(function(t){return!t})||Object.values(l).some(function(t){return void 0!==t}))||Object.entries(r).every(function(t){return l[t[0]]==t[1]})},f.p=function(){var t,r,n,e,o,i,u="undefined"!=typeof window?window.location:{},f=u.host,a=u.pathname,c=u.search;return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:void 0===f?"":f,pathname:null!=(n=null==(e=this.t.location)?void 0:e.pathname)?n:void 0===a?"":a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:void 0===c?"":c}},f.has=function(t){return Object.keys(this.t.routes).includes(t)},f.l=function(t,r){var e=this;void 0===t&&(t={}),void 0===r&&(r=this.i),null!=t||(t={}),t=["string","number"].includes(typeof t)?[t]:t;var o=r.parameterSegments.filter(function(t){return!e.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,r,e){var i,u;return n({},t,o[e]?((i={})[o[e].name]=r,i):"object"==typeof r?r:((u={})[r]="",u))},{});else if(1===o.length&&!t[o[0].name]&&(t.hasOwnProperty(Object.values(r.bindings)[0])||t.hasOwnProperty("id"))){var i;(i={})[o[0].name]=t,t=i}return n({},this.m(r),this.g(t,r))},f.m=function(t){var r=this;return t.parameterSegments.filter(function(t){return r.t.defaults[t.name]}).reduce(function(t,e,o){var i,u=e.name;return n({},t,((i={})[u]=r.t.defaults[u],i))},{})},f.g=function(t,r){var e=r.bindings,o=r.parameterSegments;return Object.entries(t).reduce(function(t,r){var i,u,f=r[0],a=r[1];if(!a||"object"!=typeof a||Array.isArray(a)||!o.some(function(t){return t.name===f}))return n({},t,((u={})[f]=a,u));if(!a.hasOwnProperty(e[f])){if(!a.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+f+"' parameter is missing route model binding key '"+e[f]+"'.");e[f]="id"}return n({},t,((i={})[f]=a[e[f]],i))},{})},f.valueOf=function(){return this.toString()},f.check=function(t){return this.has(t)},r(u,[{key:"params",get:function(){var t=this.v();return n({},t.params,t.query)}}]),u}(/*#__PURE__*/u(String));function A(t,r,n,e){var o=new $(t,r,n,e);return t?o.toString():o}export{A as default}; diff --git a/dist/types/Route.d.ts b/dist/types/Route.d.ts deleted file mode 100644 index 8953633c..00000000 --- a/dist/types/Route.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { NormalizedRouteParams, RouteConfig, RouteDefinition, RouteMatchResult, RouteName } from "."; -/** - * A Laravel route. This class represents one route and its configuration and metadata. - */ -export default class Route { - readonly name: Name; - readonly definition: RouteDefinition; - readonly config: RouteConfig; - readonly bindings: Record; - readonly wheres: any; - /** - * @param name - Route name. - * @param definition - Route definition. - * @param config - Ziggy configuration. - */ - constructor(name: Name, definition: RouteDefinition, config: RouteConfig); - /** - * Get a 'template' of the complete URL for this route. - * - * @example - * https://{team}.ziggy.dev/user/{user} - * - * @return Route template. - */ - get template(): string; - /** - * Get a template of the origin for this route. - * - * @example - * https://{team}.ziggy.dev/ - * - * @return Route origin template. - */ - get origin(): string; - /** - * Get an array of objects representing the parameters that this route accepts. - * - * @example - * [{ name: 'team', required: true }, { name: 'user', required: false }] - * - * @return {Array} Parameter segments. - */ - get parameterSegments(): { - name: string; - required: boolean; - }[]; - /** - * Get whether this route's template matches the given URL. - * - * @param url - URL to check. - * @return If this route matches, returns the matched parameters. - */ - matchesUrl(url: string): RouteMatchResult | false; - /** - * Hydrate and return a complete URL for this route with the given parameters. - */ - compile(params: NormalizedRouteParams): string; -} diff --git a/dist/types/Router.d.ts b/dist/types/Router.d.ts deleted file mode 100644 index 393b9ae0..00000000 --- a/dist/types/Router.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -/// -import { Config, NormalizedRouteParams, ParameterValue, RouteDefinition, RouteMatchResult, RouteName, RouteParams, RouteParamsObject } from '.'; -import Route from './Route'; -declare type _Unresolve = RouteMatchResult & { - name: string; - route: RouteDefinition; -}; -declare global { - var Ziggy: Config; -} -/** - * A collection of Laravel routes. This class constitutes Ziggy's main API. - */ -export default class Router extends String { - private readonly _config; - private readonly _params; - private readonly _route; - /** - * @param name Route name. - * @param params Route parameters. - * @param absolute Whether to include the URL origin. - * @param config Ziggy configuration. - */ - constructor(name?: Name, params?: RouteParams, absolute?: boolean, config?: Config); - /** - * Get the compiled URL string for the current route and parameters. - * - * @example - * // with 'posts.show' route 'posts/{post}' - * (new Router('posts.show', 1)).toString(); // 'https://ziggy.dev/posts/1' - * - * @return {String} - */ - toString(): string; - /** - * Get the parameters, values, and metadata from the given URL. - * - * @param {String} [url] - The URL to inspect, defaults to the current window URL. - * @return {{ name: string, params: Object, query: Object, route: Route }} - */ - _unresolve(url?: string): _Unresolve; - _currentUrl(): string; - /** - * Get the name of the route matching the current window URL, or, given a route name - * and parameters, check if the current window URL and parameters match that route. - * - * @example - * // at URL https://ziggy.dev/posts/4 with 'posts.show' route 'posts/{post}' - * route().current(); // 'posts.show' - * route().current('posts.index'); // false - * route().current('posts.show'); // true - * route().current('posts.show', { post: 1 }); // false - * route().current('posts.show', { post: 4 }); // true - * - * @param name Route name to check. - * @param params Route parameters. - */ - current(name?: CurrentName, params?: RouteParams | null): boolean | string | void; - /** - * Get an object representing the current location (by default this will be - * the JavaScript `window` global if it's available). - * - * @return {Object} - */ - _location(): { - host: string; - pathname: string; - search: string; - }; - /** - * Get all parameter values from the current window URL. - * - * @example - * // at URL https://tighten.ziggy.dev/posts/4?lang=en with 'posts.show' route 'posts/{post}' and domain '{team}.ziggy.dev' - * route().params; // { team: 'tighten', post: 4, lang: 'en' } - * - * @return {Object} - */ - get params(): { - [x: string]: string[] | ParameterValue | import("qs").ParsedQs | import("qs").ParsedQs[]; - _query?: Record; - }; - /** - * Check whether the given route exists. - * - * @param {String} name - * @return {Boolean} - */ - has(name: any): boolean; - /** - * Parse Laravel-style route parameters of any type into a normalized object. - * - * @example - * // with route parameter names 'event' and 'venue' - * _parse(1); // { event: 1 } - * _parse({ event: 2, venue: 3 }); // { event: 2, venue: 3 } - * _parse(['Taylor', 'Matt']); // { event: 'Taylor', venue: 'Matt' } - * _parse([4, { uuid: 56789, name: 'Grand Canyon' }]); // { event: 4, venue: 56789 } - * - * @param {(String|Number|Array|Object)} params - Route parameters. - * @param {CurrentName} route - Route instance. - * @return {Object} Normalized complete route parameters. - */ - _parse(params: ParameterValue | RouteParams, route: Route): NormalizedRouteParams; - /** - * Populate default parameters for the given route. - * - * @example - * // with default parameters { locale: 'en', country: 'US' } and 'posts.show' route '{locale}/posts/{post}' - * defaults(...); // { locale: 'en' } - * - * @param {Name} route - * @return {Object} Default route parameters. - */ - _defaults(route: any): any; - /** - * Substitute Laravel route model bindings in the given parameters. - * - * @example - * _substituteBindings({ post: { id: 4, slug: 'hello-world', title: 'Hello, world!' } }, { bindings: { post: 'slug' } }); // { post: 'hello-world' } - * - * @param params Route parameters. - * @param route Route definition. - * @return Normalized route parameters. - */ - _substituteBindings(params: RouteParamsObject, { bindings, parameterSegments }: Route): NormalizedRouteParams; - valueOf(): string; - /** - * @deprecated since v1.0, use `has()` instead. - */ - check(name: any): boolean; -} -export {}; diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts deleted file mode 100644 index 2743c97c..00000000 --- a/dist/types/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Router from "./Router"; -import { Config, RouteName, RouteParams } from "./types"; -export * from "./types"; -export default function route(): Router; -export default function route(name: T, params?: RouteParams | null, absolute?: boolean, config?: Config): string; -export default function route(name: undefined, params: undefined, absolute: boolean): Router; -export default function route(name: undefined, params: undefined, absolute?: boolean, config?: Config): Router; diff --git a/dist/types/types.d.ts b/dist/types/types.d.ts deleted file mode 100644 index 100e0d0c..00000000 --- a/dist/types/types.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { ParsedQs } from "qs"; -/** - * Offers the route lookup to be merged with declarations emitted from ts generator - */ -export interface RouteLookup { -} -declare type _ParameterBindingDefinition = { - name: string; - binding: string; -} | { - name: string; -}; -declare type _BindingOrValue = T extends { - binding: string; -} ? ParameterBinding : ParameterValue; -/** Type of the values a parameter can be passed as. */ -export declare type ParameterValue = string | number; -/** A parameter as object or primitive */ -export declare type ParameterBinding = { - [K in Name]: ParameterValue; -} | ParameterValue; -/** Ordered array containing the paramters required to hydrate a route */ -export declare type RouteParamsArray = Name extends keyof RouteLookup ? _RouteParamsArray : GenericRouteParamsArray; -declare type _RouteParamsArray = { - [K in keyof T]: _BindingOrValue | null; -}; -/** Object containing the paramters required to hydrate a route. */ -export declare type RouteParamsObject = Name extends keyof RouteLookup ? _RouteParamsObject & QueryObject : GenericRouteParamsObject & QueryObject; -declare type _RouteParamsObject = { - [Item in T[number] as Item['name']]?: _BindingOrValue | null; -}; -/** Object containing the normalized paramters required to hydrate a route. */ -export declare type NormalizedRouteParams = Route extends keyof RouteLookup ? Record, ParameterValue> & _NormalizedRouteParams : _NormalizedRouteParams; -export declare type _NormalizedRouteParams = Record & QueryObject; -export declare type GenericRouteParamsArray = _BindingOrValue<_ParameterBindingDefinition>[]; -export declare type GenericRouteParamsObject = QueryObject & Record; -export declare type GenericRouteParams = GenericRouteParamsArray | GenericRouteParamsObject | ParameterValue; -export declare type QueryObject = { - _query?: Record; -}; -/** - * Holds any known route name or an arbitrary string. - */ -export declare type RouteName = keyof RouteLookup | (string & {}); -/** - * The parameters type to hydrate a route. - */ -export declare type RouteParams = RouteParamsArray | RouteParamsObject | ParameterValue; -/** - * Normalized route parameters - */ -export interface Config { - routes: { - [key: string]: RouteDefinition; - }; - url: string; - port: number | null; - location?: Location; - defaults: { - [key: string]: ParameterValue; - }; -} -export declare type RouteMethods = "GET" | "HEAD" | "POST" | "PATCH" | "PUT" | "OPTIONS" | "DELETE"; -export interface RouteConfig extends Config { - absolute?: boolean; -} -export interface RouteDefinition { - wheres?: any; - bindings?: Record; - uri: string; - domain?: string; - methods: RouteMethods[]; -} -export interface RouteMatchResult { - params: NormalizedRouteParams; - query: ParsedQs; -} -export {}; diff --git a/dist/types/vite-plugin.d.ts b/dist/types/vite-plugin.d.ts deleted file mode 100644 index 2a24a23d..00000000 --- a/dist/types/vite-plugin.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Plugin } from 'vite'; -export interface ZiggyPluginConfig { - /** - * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running. - */ - sail?: boolean | 'auto'; - /** - * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file. - */ - declarations?: boolean | 'only'; - /** - * Destination path where ziggy output files should be placed. - */ - destination?: string; - log?: boolean; - delay?: number; -} -export default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin; diff --git a/dist/types/vue.d.ts b/dist/types/vue.d.ts deleted file mode 100644 index c3fbde47..00000000 --- a/dist/types/vue.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const ZiggyVue: { - install: (v: any, options: any) => void; -}; diff --git a/dist/vite-plugin.es.js b/dist/vite-plugin.es.js deleted file mode 100644 index 2ed55b80..00000000 --- a/dist/vite-plugin.es.js +++ /dev/null @@ -1,2219 +0,0 @@ -import { exec } from 'child_process'; -import { existsSync } from 'fs'; -import path, { resolve, relative } from 'path'; -import tty from 'tty'; -import { normalizePath } from 'vite'; - -let isColorSupported = - !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && - ("FORCE_COLOR" in process.env || - process.argv.includes("--color") || - process.platform === "win32" || - (tty.isatty(1) && process.env.TERM !== "dumb") || - "CI" in process.env); - -let formatter = - (open, close, replace = open) => - input => { - let string = "" + input; - let index = string.indexOf(close, open.length); - return ~index - ? open + replaceClose(string, close, replace, index) + close - : open + string + close - }; - -let replaceClose = (string, close, replace, index) => { - let start = string.substring(0, index) + replace; - let end = string.substring(index + close.length); - let nextIndex = end.indexOf(close); - return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end -}; - -let createColors = (enabled = isColorSupported) => ({ - isColorSupported: enabled, - reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, - bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, - dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, - italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, - underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, - inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, - hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, - strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, - black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, - red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, - green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, - yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, - blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, - magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, - cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, - white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, - gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, - bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, - bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, - bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, - bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, - bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, - bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, - bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, - bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, -}); - -var picocolors = createColors(); -var createColors_1 = createColors; - -var colors = picocolors; -picocolors.createColors = createColors_1; - -function createCommonjsModule(fn) { - var module = { exports: {} }; - return fn(module, module.exports), module.exports; -} - -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE$1 = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -var constants = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; - -var utils = createCommonjsModule(function (module, exports) { - - -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = constants; - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; -}); - -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = constants; - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -var scan_1 = scan; - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -var parse_1 = parse; - -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch$1 = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch$1(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch$1.compileRe(glob, options) - : picomatch$1.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch$1.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch$1.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch$1.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options)); - return parse_1(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch$1.scan = (input, options) => scan_1(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch$1.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse_1.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse_1(input, options); - } - - return picomatch$1.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch$1.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch$1.constants = constants; - -/** - * Expose "picomatch" - */ - -var picomatch_1 = picomatch$1; - -var picomatch = picomatch_1; - -function ZiggyPlugin(config) { - const { - log = true, - delay = 0, - destination, - declarations - } = config; - let { - sail - } = config; - const root = process.cwd(); - const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`; - let proc = null; - - function command() { - if (proc) { - proc.kill('SIGINT'); - } - - return new Promise((done, reject) => { - if (sail) { - if (existsSync(resolve(root, 'vendor/bin/sail'))) { - proc = exec(`vendor/bin/sail ${commandArgs}`); - proc.on('close', (code, signal) => { - proc = null; - }); - } else { - sail = false; - return command(); - } - } else { - proc = exec(`php ${commandArgs}`); - } - - proc.on('close', (code, signal) => { - if (code === 0) { - proc = null; - done(); - } - }); - proc.on('error', error => { - reject(error); - }); - }); - } - - return { - name: 'ziggy-plugin', - enforce: 'pre', - // NOTE: Enable globbing so that Vite keeps track of the template files. - config: () => ({ - server: { - watch: { - disableGlobbing: false - } - } - }), - - configureServer(server) { - const files = normalizePath(resolve(root, 'routes/**')); - command(); - const shouldReload = picomatch(files); - - const checkReload = path => { - if (shouldReload(path)) { - setTimeout(command, delay); - - if (log) { - server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { - clear: true, - timestamp: true - }); - } - } - }; // Ensure Vite keeps track of the files and triggers generation as needed. - - - server.watcher.add(files); // Perform a generation if any of the watched files changes. - - server.watcher.on('add', checkReload); - server.watcher.on('change', checkReload); - }, - - buildStart() { - command(); - } - - }; -} - -export { ZiggyPlugin as default }; diff --git a/dist/vite-plugin.es.js.map b/dist/vite-plugin.es.js.map deleted file mode 100644 index ae2c1c9a..00000000 --- a/dist/vite-plugin.es.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"vite-plugin.es.js","sources":["../node_modules/picocolors/picocolors.js","../node_modules/picomatch/lib/constants.js","../node_modules/picomatch/lib/utils.js","../node_modules/picomatch/lib/scan.js","../node_modules/picomatch/lib/parse.js","../node_modules/picomatch/lib/picomatch.js","../node_modules/picomatch/index.js","../src/js/vite-plugin.ts"],"sourcesContent":["let tty = require(\"tty\")\n\nlet isColorSupported =\n\t!(\"NO_COLOR\" in process.env || process.argv.includes(\"--no-color\")) &&\n\t(\"FORCE_COLOR\" in process.env ||\n\t\tprocess.argv.includes(\"--color\") ||\n\t\tprocess.platform === \"win32\" ||\n\t\t(tty.isatty(1) && process.env.TERM !== \"dumb\") ||\n\t\t\"CI\" in process.env)\n\nlet formatter =\n\t(open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input\n\t\tlet index = string.indexOf(close, open.length)\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet start = string.substring(0, index) + replace\n\tlet end = string.substring(index + close.length)\n\tlet nextIndex = end.indexOf(close)\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end\n}\n\nlet createColors = (enabled = isColorSupported) => ({\n\tisColorSupported: enabled,\n\treset: enabled ? s => `\\x1b[0m${s}\\x1b[0m` : String,\n\tbold: enabled ? formatter(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\") : String,\n\tdim: enabled ? formatter(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\") : String,\n\titalic: enabled ? formatter(\"\\x1b[3m\", \"\\x1b[23m\") : String,\n\tunderline: enabled ? formatter(\"\\x1b[4m\", \"\\x1b[24m\") : String,\n\tinverse: enabled ? formatter(\"\\x1b[7m\", \"\\x1b[27m\") : String,\n\thidden: enabled ? formatter(\"\\x1b[8m\", \"\\x1b[28m\") : String,\n\tstrikethrough: enabled ? formatter(\"\\x1b[9m\", \"\\x1b[29m\") : String,\n\tblack: enabled ? formatter(\"\\x1b[30m\", \"\\x1b[39m\") : String,\n\tred: enabled ? formatter(\"\\x1b[31m\", \"\\x1b[39m\") : String,\n\tgreen: enabled ? formatter(\"\\x1b[32m\", \"\\x1b[39m\") : String,\n\tyellow: enabled ? formatter(\"\\x1b[33m\", \"\\x1b[39m\") : String,\n\tblue: enabled ? formatter(\"\\x1b[34m\", \"\\x1b[39m\") : String,\n\tmagenta: enabled ? formatter(\"\\x1b[35m\", \"\\x1b[39m\") : String,\n\tcyan: enabled ? formatter(\"\\x1b[36m\", \"\\x1b[39m\") : String,\n\twhite: enabled ? formatter(\"\\x1b[37m\", \"\\x1b[39m\") : String,\n\tgray: enabled ? formatter(\"\\x1b[90m\", \"\\x1b[39m\") : String,\n\tbgBlack: enabled ? formatter(\"\\x1b[40m\", \"\\x1b[49m\") : String,\n\tbgRed: enabled ? formatter(\"\\x1b[41m\", \"\\x1b[49m\") : String,\n\tbgGreen: enabled ? formatter(\"\\x1b[42m\", \"\\x1b[49m\") : String,\n\tbgYellow: enabled ? formatter(\"\\x1b[43m\", \"\\x1b[49m\") : String,\n\tbgBlue: enabled ? formatter(\"\\x1b[44m\", \"\\x1b[49m\") : String,\n\tbgMagenta: enabled ? formatter(\"\\x1b[45m\", \"\\x1b[49m\") : String,\n\tbgCyan: enabled ? formatter(\"\\x1b[46m\", \"\\x1b[49m\") : String,\n\tbgWhite: enabled ? formatter(\"\\x1b[47m\", \"\\x1b[49m\") : String,\n})\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","\nimport { ChildProcess, exec } from 'child_process';\nimport { existsSync } from 'fs';\nimport { relative, resolve } from 'path';\nimport colors from 'picocolors';\nimport picomatch from 'picomatch';\nimport { Plugin, normalizePath } from 'vite';\n\nexport interface ZiggyPluginConfig {\n /**\n * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running.\n */\n sail?: boolean | 'auto',\n /**\n * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file.\n */\n declarations?: boolean | 'only'\n /**\n * Destination path where ziggy output files should be placed.\n */\n destination?: string,\n log?: boolean,\n delay?: number,\n}\n\nexport default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin {\n const { log = true, delay = 0, destination, declarations } = config;\n let { sail } = config;\n const root = process.cwd();\n\n const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`;\n let proc: ChildProcess | null = null;\n\n function command(): Promise {\n if (proc) {\n proc.kill('SIGINT');\n }\n\n return new Promise((done, reject) => {\n if (sail) {\n if (existsSync(resolve(root, 'vendor/bin/sail'))) {\n proc = exec(`vendor/bin/sail ${commandArgs}`);\n proc.on('close', (code, signal) => {\n proc = null;\n });\n } else {\n sail = false;\n return command();\n }\n } else {\n proc = exec(`php ${commandArgs}`);\n }\n proc.on('close', (code, signal) => {\n if (code === 0) {\n proc = null;\n done();\n }\n });\n proc.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n return {\n name: 'ziggy-plugin',\n enforce: 'pre',\n\n // NOTE: Enable globbing so that Vite keeps track of the template files.\n config: () => ({ server: { watch: { disableGlobbing: false } } }),\n configureServer(server) {\n const files = normalizePath(resolve(root, 'routes/**'));\n\n command();\n\n const shouldReload = picomatch(files);\n const checkReload = (path) => {\n if (shouldReload(path)) {\n setTimeout(command, delay);\n if (log) {\n server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { clear: true, timestamp: true });\n }\n }\n };\n\n // Ensure Vite keeps track of the files and triggers generation as needed.\n server.watcher.add(files);\n\n // Perform a generation if any of the watched files changes.\n server.watcher.on('add', checkReload);\n server.watcher.on('change', checkReload);\n },\n buildStart() {\n command();\n }\n };\n}\n"],"names":["POSIX_REGEX_SOURCE","require$$0","picomatch","parse","scan","ZiggyPlugin","config","log","delay","destination","declarations","sail","root","process","cwd","commandArgs","proc","command","kill","Promise","done","reject","existsSync","resolve","exec","on","code","signal","error","name","enforce","server","watch","disableGlobbing","configureServer","files","normalizePath","shouldReload","checkReload","path","setTimeout","logger","info","colors","green","relative","clear","timestamp","watcher","add","buildStart"],"mappings":";;;;;;AAEA,IAAI,gBAAgB;AACpB,CAAC,EAAE,UAAU,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACpE,EAAE,aAAa,IAAI,OAAO,CAAC,GAAG;AAC9B,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;AAClC,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO;AAC9B,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;AAChD,EAAE,IAAI,IAAI,OAAO,CAAC,GAAG,EAAC;AACtB;AACA,IAAI,SAAS;AACb,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;AAC7B,CAAC,KAAK,IAAI;AACV,EAAE,IAAI,MAAM,GAAG,EAAE,GAAG,MAAK;AACzB,EAAE,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAC;AAChD,EAAE,OAAO,CAAC,KAAK;AACf,KAAK,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,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MAAM,CAACiB,OAAP,CAAevB,EAAf,CAAkB,KAAlB,EAAyBa,WAAzB,CAAA,CAAA;AACAP,MAAAA,MAAM,CAACiB,OAAP,CAAevB,EAAf,CAAkB,QAAlB,EAA4Ba,WAA5B,CAAA,CAAA;KA1BD;;AA4BHY,IAAAA,UAAU,GAAA;MACNjC,OAAO,EAAA,CAAA;AACV,KAAA;;GA9BL,CAAA;AAgCH;;;;"} \ No newline at end of file diff --git a/dist/vite-plugin.js b/dist/vite-plugin.js deleted file mode 100644 index e66ec2d0..00000000 --- a/dist/vite-plugin.js +++ /dev/null @@ -1,2225 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('child_process'), require('fs'), require('path'), require('tty'), require('vite')) : - typeof define === 'function' && define.amd ? define(['child_process', 'fs', 'path', 'tty', 'vite'], factory) : - (global = global || self, global["vite-plugin"] = factory(global.childProcess, global.fs, global.path, global.tty, global.vite)); -})(this, (function (child_process, fs, path, tty, vite) { - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var path__default = /*#__PURE__*/_interopDefaultLegacy(path); - var tty__default = /*#__PURE__*/_interopDefaultLegacy(tty); - - let isColorSupported = - !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && - ("FORCE_COLOR" in process.env || - process.argv.includes("--color") || - process.platform === "win32" || - (tty__default["default"].isatty(1) && process.env.TERM !== "dumb") || - "CI" in process.env); - - let formatter = - (open, close, replace = open) => - input => { - let string = "" + input; - let index = string.indexOf(close, open.length); - return ~index - ? open + replaceClose(string, close, replace, index) + close - : open + string + close - }; - - let replaceClose = (string, close, replace, index) => { - let start = string.substring(0, index) + replace; - let end = string.substring(index + close.length); - let nextIndex = end.indexOf(close); - return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end - }; - - let createColors = (enabled = isColorSupported) => ({ - isColorSupported: enabled, - reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, - bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, - dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, - italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, - underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, - inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, - hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, - strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, - black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, - red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, - green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, - yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, - blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, - magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, - cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, - white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, - gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, - bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, - bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, - bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, - bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, - bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, - bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, - bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, - bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, - }); - - var picocolors = createColors(); - var createColors_1 = createColors; - - var colors = picocolors; - picocolors.createColors = createColors_1; - - function createCommonjsModule(fn) { - var module = { exports: {} }; - return fn(module, module.exports), module.exports; - } - - const WIN_SLASH = '\\\\/'; - const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - - /** - * Posix glob regex - */ - - const DOT_LITERAL = '\\.'; - const PLUS_LITERAL = '\\+'; - const QMARK_LITERAL = '\\?'; - const SLASH_LITERAL = '\\/'; - const ONE_CHAR = '(?=.)'; - const QMARK = '[^/]'; - const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; - const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; - const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; - const NO_DOT = `(?!${DOT_LITERAL})`; - const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; - const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; - const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; - const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; - const STAR = `${QMARK}*?`; - - const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR - }; - - /** - * Windows glob regex - */ - - const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` - }; - - /** - * POSIX Bracket Regex - */ - - const POSIX_REGEX_SOURCE$1 = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' - }; - - var constants = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path__default["default"].sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } - }; - - var utils = createCommonjsModule(function (module, exports) { - - - const win32 = process.platform === 'win32'; - const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = constants; - - exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); - exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); - exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); - exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - - exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); - }; - - exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; - }; - - exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path__default["default"].sep === '\\'; - }; - - exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; - }; - - exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; - }; - - exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; - }; - }); - - const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ - } = constants; - - const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - }; - - const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } - }; - - /** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - - const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; - }; - - var scan_1 = scan; - - /** - * Constants - */ - - const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS - } = constants; - - /** - * Helpers - */ - - const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; - }; - - /** - * Create the message for a syntax error - */ - - const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; - }; - - /** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - - const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; - }; - - /** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - - parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; - }; - - var parse_1 = parse; - - const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - - /** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - - const picomatch$1 = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch$1(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch$1.compileRe(glob, options) - : picomatch$1.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; - }; - - /** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - - picomatch$1.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch$1.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; - }; - - /** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - - picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options); - return regex.test(path__default["default"].basename(input)); - }; - - /** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - - picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str); - - /** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - - picomatch$1.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options)); - return parse_1(pattern, { ...options, fastpaths: false }); - }; - - /** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - - picomatch$1.scan = (input, options) => scan_1(input, options); - - /** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - - picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch$1.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; - }; - - /** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - - picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse_1.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse_1(input, options); - } - - return picomatch$1.compileRe(parsed, options, returnOutput, returnState); - }; - - /** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - - picomatch$1.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } - }; - - /** - * Picomatch constants. - * @return {Object} - */ - - picomatch$1.constants = constants; - - /** - * Expose "picomatch" - */ - - var picomatch_1 = picomatch$1; - - var picomatch = picomatch_1; - - function ZiggyPlugin(config) { - const { - log = true, - delay = 0, - destination, - declarations - } = config; - let { - sail - } = config; - const root = process.cwd(); - const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`; - let proc = null; - - function command() { - if (proc) { - proc.kill('SIGINT'); - } - - return new Promise((done, reject) => { - if (sail) { - if (fs.existsSync(path.resolve(root, 'vendor/bin/sail'))) { - proc = child_process.exec(`vendor/bin/sail ${commandArgs}`); - proc.on('close', (code, signal) => { - proc = null; - }); - } else { - sail = false; - return command(); - } - } else { - proc = child_process.exec(`php ${commandArgs}`); - } - - proc.on('close', (code, signal) => { - if (code === 0) { - proc = null; - done(); - } - }); - proc.on('error', error => { - reject(error); - }); - }); - } - - return { - name: 'ziggy-plugin', - enforce: 'pre', - // NOTE: Enable globbing so that Vite keeps track of the template files. - config: () => ({ - server: { - watch: { - disableGlobbing: false - } - } - }), - - configureServer(server) { - const files = vite.normalizePath(path.resolve(root, 'routes/**')); - command(); - const shouldReload = picomatch(files); - - const checkReload = path$1 => { - if (shouldReload(path$1)) { - setTimeout(command, delay); - - if (log) { - server.config.logger.info(`${colors.green(`${path.relative(root, path$1)} changed, regenarating ziggy file.`)}`, { - clear: true, - timestamp: true - }); - } - } - }; // Ensure Vite keeps track of the files and triggers generation as needed. - - - server.watcher.add(files); // Perform a generation if any of the watched files changes. - - server.watcher.on('add', checkReload); - server.watcher.on('change', checkReload); - }, - - buildStart() { - command(); - } - - }; - } - - return ZiggyPlugin; - -})); diff --git a/dist/vite-plugin.js.map b/dist/vite-plugin.js.map deleted file mode 100644 index 129873b4..00000000 --- a/dist/vite-plugin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"vite-plugin.js","sources":["../node_modules/picocolors/picocolors.js","../node_modules/picomatch/lib/constants.js","../node_modules/picomatch/lib/utils.js","../node_modules/picomatch/lib/scan.js","../node_modules/picomatch/lib/parse.js","../node_modules/picomatch/lib/picomatch.js","../node_modules/picomatch/index.js","../src/js/vite-plugin.ts"],"sourcesContent":["let tty = require(\"tty\")\n\nlet isColorSupported =\n\t!(\"NO_COLOR\" in process.env || process.argv.includes(\"--no-color\")) &&\n\t(\"FORCE_COLOR\" in process.env ||\n\t\tprocess.argv.includes(\"--color\") ||\n\t\tprocess.platform === \"win32\" ||\n\t\t(tty.isatty(1) && process.env.TERM !== \"dumb\") ||\n\t\t\"CI\" in process.env)\n\nlet formatter =\n\t(open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input\n\t\tlet index = string.indexOf(close, open.length)\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet start = string.substring(0, index) + replace\n\tlet end = string.substring(index + close.length)\n\tlet nextIndex = end.indexOf(close)\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end\n}\n\nlet createColors = (enabled = isColorSupported) => ({\n\tisColorSupported: enabled,\n\treset: enabled ? s => `\\x1b[0m${s}\\x1b[0m` : String,\n\tbold: enabled ? formatter(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\") : String,\n\tdim: enabled ? formatter(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\") : String,\n\titalic: enabled ? formatter(\"\\x1b[3m\", \"\\x1b[23m\") : String,\n\tunderline: enabled ? formatter(\"\\x1b[4m\", \"\\x1b[24m\") : String,\n\tinverse: enabled ? formatter(\"\\x1b[7m\", \"\\x1b[27m\") : String,\n\thidden: enabled ? formatter(\"\\x1b[8m\", \"\\x1b[28m\") : String,\n\tstrikethrough: enabled ? formatter(\"\\x1b[9m\", \"\\x1b[29m\") : String,\n\tblack: enabled ? formatter(\"\\x1b[30m\", \"\\x1b[39m\") : String,\n\tred: enabled ? formatter(\"\\x1b[31m\", \"\\x1b[39m\") : String,\n\tgreen: enabled ? formatter(\"\\x1b[32m\", \"\\x1b[39m\") : String,\n\tyellow: enabled ? formatter(\"\\x1b[33m\", \"\\x1b[39m\") : String,\n\tblue: enabled ? formatter(\"\\x1b[34m\", \"\\x1b[39m\") : String,\n\tmagenta: enabled ? formatter(\"\\x1b[35m\", \"\\x1b[39m\") : String,\n\tcyan: enabled ? formatter(\"\\x1b[36m\", \"\\x1b[39m\") : String,\n\twhite: enabled ? formatter(\"\\x1b[37m\", \"\\x1b[39m\") : String,\n\tgray: enabled ? formatter(\"\\x1b[90m\", \"\\x1b[39m\") : String,\n\tbgBlack: enabled ? formatter(\"\\x1b[40m\", \"\\x1b[49m\") : String,\n\tbgRed: enabled ? formatter(\"\\x1b[41m\", \"\\x1b[49m\") : String,\n\tbgGreen: enabled ? formatter(\"\\x1b[42m\", \"\\x1b[49m\") : String,\n\tbgYellow: enabled ? formatter(\"\\x1b[43m\", \"\\x1b[49m\") : String,\n\tbgBlue: enabled ? formatter(\"\\x1b[44m\", \"\\x1b[49m\") : String,\n\tbgMagenta: enabled ? formatter(\"\\x1b[45m\", \"\\x1b[49m\") : String,\n\tbgCyan: enabled ? formatter(\"\\x1b[46m\", \"\\x1b[49m\") : String,\n\tbgWhite: enabled ? formatter(\"\\x1b[47m\", \"\\x1b[49m\") : String,\n})\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","\nimport { ChildProcess, exec } from 'child_process';\nimport { existsSync } from 'fs';\nimport { relative, resolve } from 'path';\nimport colors from 'picocolors';\nimport picomatch from 'picomatch';\nimport { Plugin, normalizePath } from 'vite';\n\nexport interface ZiggyPluginConfig {\n /**\n * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running.\n */\n sail?: boolean | 'auto',\n /**\n * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file.\n */\n declarations?: boolean | 'only'\n /**\n * Destination path where ziggy output files should be placed.\n */\n destination?: string,\n log?: boolean,\n delay?: number,\n}\n\nexport default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin {\n const { log = true, delay = 0, destination, declarations } = config;\n let { sail } = config;\n const root = process.cwd();\n\n const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`;\n let proc: ChildProcess | null = null;\n\n function command(): Promise {\n if (proc) {\n proc.kill('SIGINT');\n }\n\n return new Promise((done, reject) => {\n if (sail) {\n if (existsSync(resolve(root, 'vendor/bin/sail'))) {\n proc = exec(`vendor/bin/sail ${commandArgs}`);\n proc.on('close', (code, signal) => {\n proc = null;\n });\n } else {\n sail = false;\n return command();\n }\n } else {\n proc = exec(`php ${commandArgs}`);\n }\n proc.on('close', (code, signal) => {\n if (code === 0) {\n proc = null;\n done();\n }\n });\n proc.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n return {\n name: 'ziggy-plugin',\n enforce: 'pre',\n\n // NOTE: Enable globbing so that Vite keeps track of the template files.\n config: () => ({ server: { watch: { disableGlobbing: false } } }),\n configureServer(server) {\n const files = normalizePath(resolve(root, 'routes/**'));\n\n command();\n\n const shouldReload = picomatch(files);\n const checkReload = (path) => {\n if (shouldReload(path)) {\n setTimeout(command, delay);\n if (log) {\n server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { clear: true, timestamp: true });\n }\n }\n };\n\n // Ensure Vite keeps track of the files and triggers generation as needed.\n server.watcher.add(files);\n\n // Perform a generation if any of the watched files changes.\n server.watcher.on('add', checkReload);\n server.watcher.on('change', checkReload);\n },\n buildStart() {\n command();\n }\n };\n}\n"],"names":["tty","POSIX_REGEX_SOURCE","path","require$$0","picomatch","parse","scan","ZiggyPlugin","config","log","delay","destination","declarations","sail","root","process","cwd","commandArgs","proc","command","kill","Promise","done","reject","existsSync","resolve","exec","on","code","signal","error","name","enforce","server","watch","disableGlobbing","configureServer","files","normalizePath","shouldReload","checkReload","setTimeout","logger","info","colors","green","relative","clear","timestamp","watcher","add","buildStart"],"mappings":";;;;;;;;;;CAEA,IAAI,gBAAgB;CACpB,CAAC,EAAE,UAAU,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;CACpE,EAAE,aAAa,IAAI,OAAO,CAAC,GAAG;CAC9B,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;CAClC,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO;CAC9B,GAAGA,uBAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;CAChD,EAAE,IAAI,IAAI,OAAO,CAAC,GAAG,EAAC;AACtB;CACA,IAAI,SAAS;CACb,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;CAC7B,CAAC,KAAK,IAAI;CACV,EAAE,IAAI,MAAM,GAAG,EAAE,GAAG,MAAK;CACzB,EAAE,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAC;CAChD,EAAE,OAAO,CAAC,KAAK;CACf,KAAK,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,GAAG,KAAK;CAC/D,KAAK,IAAI,GA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Af,CAAkB,KAAlB,EAAyBa,WAAzB,CAAA,CAAA;CACAP,MAAAA,MAAM,CAACgB,OAAP,CAAetB,EAAf,CAAkB,QAAlB,EAA4Ba,WAA5B,CAAA,CAAA;MA1BD;;CA4BHW,IAAAA,UAAU,GAAA;OACNhC,OAAO,EAAA,CAAA;CACV,KAAA;;IA9BL,CAAA;CAgCH;;;;;;;;"} \ No newline at end of file diff --git a/dist/vite-plugin.m.js b/dist/vite-plugin.m.js deleted file mode 100644 index 2ed55b80..00000000 --- a/dist/vite-plugin.m.js +++ /dev/null @@ -1,2219 +0,0 @@ -import { exec } from 'child_process'; -import { existsSync } from 'fs'; -import path, { resolve, relative } from 'path'; -import tty from 'tty'; -import { normalizePath } from 'vite'; - -let isColorSupported = - !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && - ("FORCE_COLOR" in process.env || - process.argv.includes("--color") || - process.platform === "win32" || - (tty.isatty(1) && process.env.TERM !== "dumb") || - "CI" in process.env); - -let formatter = - (open, close, replace = open) => - input => { - let string = "" + input; - let index = string.indexOf(close, open.length); - return ~index - ? open + replaceClose(string, close, replace, index) + close - : open + string + close - }; - -let replaceClose = (string, close, replace, index) => { - let start = string.substring(0, index) + replace; - let end = string.substring(index + close.length); - let nextIndex = end.indexOf(close); - return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end -}; - -let createColors = (enabled = isColorSupported) => ({ - isColorSupported: enabled, - reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, - bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, - dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, - italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, - underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, - inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, - hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, - strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, - black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, - red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, - green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, - yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, - blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, - magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, - cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, - white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, - gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, - bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, - bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, - bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, - bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, - bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, - bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, - bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, - bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, -}); - -var picocolors = createColors(); -var createColors_1 = createColors; - -var colors = picocolors; -picocolors.createColors = createColors_1; - -function createCommonjsModule(fn) { - var module = { exports: {} }; - return fn(module, module.exports), module.exports; -} - -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE$1 = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -var constants = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE: POSIX_REGEX_SOURCE$1, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; - -var utils = createCommonjsModule(function (module, exports) { - - -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = constants; - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; -}); - -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = constants; - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -var scan_1 = scan; - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -var parse_1 = parse; - -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch$1 = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch$1(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch$1.compileRe(glob, options) - : picomatch$1.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch$1.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch$1.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch$1.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch$1.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options)); - return parse_1(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch$1.scan = (input, options) => scan_1(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch$1.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse_1.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse_1(input, options); - } - - return picomatch$1.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch$1.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch$1.constants = constants; - -/** - * Expose "picomatch" - */ - -var picomatch_1 = picomatch$1; - -var picomatch = picomatch_1; - -function ZiggyPlugin(config) { - const { - log = true, - delay = 0, - destination, - declarations - } = config; - let { - sail - } = config; - const root = process.cwd(); - const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`; - let proc = null; - - function command() { - if (proc) { - proc.kill('SIGINT'); - } - - return new Promise((done, reject) => { - if (sail) { - if (existsSync(resolve(root, 'vendor/bin/sail'))) { - proc = exec(`vendor/bin/sail ${commandArgs}`); - proc.on('close', (code, signal) => { - proc = null; - }); - } else { - sail = false; - return command(); - } - } else { - proc = exec(`php ${commandArgs}`); - } - - proc.on('close', (code, signal) => { - if (code === 0) { - proc = null; - done(); - } - }); - proc.on('error', error => { - reject(error); - }); - }); - } - - return { - name: 'ziggy-plugin', - enforce: 'pre', - // NOTE: Enable globbing so that Vite keeps track of the template files. - config: () => ({ - server: { - watch: { - disableGlobbing: false - } - } - }), - - configureServer(server) { - const files = normalizePath(resolve(root, 'routes/**')); - command(); - const shouldReload = picomatch(files); - - const checkReload = path => { - if (shouldReload(path)) { - setTimeout(command, delay); - - if (log) { - server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { - clear: true, - timestamp: true - }); - } - } - }; // Ensure Vite keeps track of the files and triggers generation as needed. - - - server.watcher.add(files); // Perform a generation if any of the watched files changes. - - server.watcher.on('add', checkReload); - server.watcher.on('change', checkReload); - }, - - buildStart() { - command(); - } - - }; -} - -export { ZiggyPlugin as default }; diff --git a/dist/vite-plugin.m.js.map b/dist/vite-plugin.m.js.map deleted file mode 100644 index 36af6b98..00000000 --- a/dist/vite-plugin.m.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"vite-plugin.m.js","sources":["../node_modules/picocolors/picocolors.js","../node_modules/picomatch/lib/constants.js","../node_modules/picomatch/lib/utils.js","../node_modules/picomatch/lib/scan.js","../node_modules/picomatch/lib/parse.js","../node_modules/picomatch/lib/picomatch.js","../node_modules/picomatch/index.js","../src/js/vite-plugin.ts"],"sourcesContent":["let tty = require(\"tty\")\n\nlet isColorSupported =\n\t!(\"NO_COLOR\" in process.env || process.argv.includes(\"--no-color\")) &&\n\t(\"FORCE_COLOR\" in process.env ||\n\t\tprocess.argv.includes(\"--color\") ||\n\t\tprocess.platform === \"win32\" ||\n\t\t(tty.isatty(1) && process.env.TERM !== \"dumb\") ||\n\t\t\"CI\" in process.env)\n\nlet formatter =\n\t(open, close, replace = open) =>\n\tinput => {\n\t\tlet string = \"\" + input\n\t\tlet index = string.indexOf(close, open.length)\n\t\treturn ~index\n\t\t\t? open + replaceClose(string, close, replace, index) + close\n\t\t\t: open + string + close\n\t}\n\nlet replaceClose = (string, close, replace, index) => {\n\tlet start = string.substring(0, index) + replace\n\tlet end = string.substring(index + close.length)\n\tlet nextIndex = end.indexOf(close)\n\treturn ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end\n}\n\nlet createColors = (enabled = isColorSupported) => ({\n\tisColorSupported: enabled,\n\treset: enabled ? s => `\\x1b[0m${s}\\x1b[0m` : String,\n\tbold: enabled ? formatter(\"\\x1b[1m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[1m\") : String,\n\tdim: enabled ? formatter(\"\\x1b[2m\", \"\\x1b[22m\", \"\\x1b[22m\\x1b[2m\") : String,\n\titalic: enabled ? formatter(\"\\x1b[3m\", \"\\x1b[23m\") : String,\n\tunderline: enabled ? formatter(\"\\x1b[4m\", \"\\x1b[24m\") : String,\n\tinverse: enabled ? formatter(\"\\x1b[7m\", \"\\x1b[27m\") : String,\n\thidden: enabled ? formatter(\"\\x1b[8m\", \"\\x1b[28m\") : String,\n\tstrikethrough: enabled ? formatter(\"\\x1b[9m\", \"\\x1b[29m\") : String,\n\tblack: enabled ? formatter(\"\\x1b[30m\", \"\\x1b[39m\") : String,\n\tred: enabled ? formatter(\"\\x1b[31m\", \"\\x1b[39m\") : String,\n\tgreen: enabled ? formatter(\"\\x1b[32m\", \"\\x1b[39m\") : String,\n\tyellow: enabled ? formatter(\"\\x1b[33m\", \"\\x1b[39m\") : String,\n\tblue: enabled ? formatter(\"\\x1b[34m\", \"\\x1b[39m\") : String,\n\tmagenta: enabled ? formatter(\"\\x1b[35m\", \"\\x1b[39m\") : String,\n\tcyan: enabled ? formatter(\"\\x1b[36m\", \"\\x1b[39m\") : String,\n\twhite: enabled ? formatter(\"\\x1b[37m\", \"\\x1b[39m\") : String,\n\tgray: enabled ? formatter(\"\\x1b[90m\", \"\\x1b[39m\") : String,\n\tbgBlack: enabled ? formatter(\"\\x1b[40m\", \"\\x1b[49m\") : String,\n\tbgRed: enabled ? formatter(\"\\x1b[41m\", \"\\x1b[49m\") : String,\n\tbgGreen: enabled ? formatter(\"\\x1b[42m\", \"\\x1b[49m\") : String,\n\tbgYellow: enabled ? formatter(\"\\x1b[43m\", \"\\x1b[49m\") : String,\n\tbgBlue: enabled ? formatter(\"\\x1b[44m\", \"\\x1b[49m\") : String,\n\tbgMagenta: enabled ? formatter(\"\\x1b[45m\", \"\\x1b[49m\") : String,\n\tbgCyan: enabled ? formatter(\"\\x1b[46m\", \"\\x1b[49m\") : String,\n\tbgWhite: enabled ? formatter(\"\\x1b[47m\", \"\\x1b[49m\") : String,\n})\n\nmodule.exports = createColors()\nmodule.exports.createColors = createColors\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","\nimport { ChildProcess, exec } from 'child_process';\nimport { existsSync } from 'fs';\nimport { relative, resolve } from 'path';\nimport colors from 'picocolors';\nimport picomatch from 'picomatch';\nimport { Plugin, normalizePath } from 'vite';\n\nexport interface ZiggyPluginConfig {\n /**\n * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running.\n */\n sail?: boolean | 'auto',\n /**\n * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file.\n */\n declarations?: boolean | 'only'\n /**\n * Destination path where ziggy output files should be placed.\n */\n destination?: string,\n log?: boolean,\n delay?: number,\n}\n\nexport default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin {\n const { log = true, delay = 0, destination, declarations } = config;\n let { sail } = config;\n const root = process.cwd();\n\n const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`;\n let proc: ChildProcess | null = null;\n\n function command(): Promise {\n if (proc) {\n proc.kill('SIGINT');\n }\n\n return new Promise((done, reject) => {\n if (sail) {\n if (existsSync(resolve(root, 'vendor/bin/sail'))) {\n proc = exec(`vendor/bin/sail ${commandArgs}`);\n proc.on('close', (code, signal) => {\n proc = null;\n });\n } else {\n sail = false;\n return command();\n }\n } else {\n proc = exec(`php ${commandArgs}`);\n }\n proc.on('close', (code, signal) => {\n if (code === 0) {\n proc = null;\n done();\n }\n });\n proc.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n return {\n name: 'ziggy-plugin',\n enforce: 'pre',\n\n // NOTE: Enable globbing so that Vite keeps track of the template files.\n config: () => ({ server: { watch: { disableGlobbing: false } } }),\n configureServer(server) {\n const files = normalizePath(resolve(root, 'routes/**'));\n\n command();\n\n const shouldReload = picomatch(files);\n const checkReload = (path) => {\n if (shouldReload(path)) {\n setTimeout(command, delay);\n if (log) {\n server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { clear: true, timestamp: true });\n }\n }\n };\n\n // Ensure Vite keeps track of the files and triggers generation as needed.\n server.watcher.add(files);\n\n // Perform a generation if any of the watched files changes.\n server.watcher.on('add', checkReload);\n server.watcher.on('change', checkReload);\n },\n buildStart() {\n command();\n }\n };\n}\n"],"names":["POSIX_REGEX_SOURCE","require$$0","picomatch","parse","scan","ZiggyPlugin","config","log","delay","destination","declarations","sail","root","process","cwd","commandArgs","proc","command","kill","Promise","done","reject","existsSync","resolve","exec","on","code","signal","error","name","enforce","server","watch","disableGlobbing","configureServer","files","normalizePath","shouldReload","checkReload","path","setTim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AA;AAAV,KAAP,CALL;;IAMHC,eAAe,CAACH,MAAD,EAAO;MAClB,MAAMI,KAAK,GAAGC,aAAa,CAACb,OAAO,CAACX,IAAD,EAAO,WAAP,CAAR,CAA3B,CAAA;MAEAK,OAAO,EAAA,CAAA;AAEP,MAAA,MAAMoB,YAAY,GAAGnC,SAAS,CAACiC,KAAD,CAA9B,CAAA;;MACA,MAAMG,WAAW,GAAIC,IAAD,IAAS;AACzB,QAAA,IAAIF,YAAY,CAACE,IAAD,CAAhB,EAAwB;AACpBC,UAAAA,UAAU,CAACvB,OAAD,EAAUT,KAAV,CAAV,CAAA;;AACA,UAAA,IAAID,GAAJ,EAAS;YACLwB,MAAM,CAACzB,MAAP,CAAcmC,MAAd,CAAqBC,IAArB,CAA6B,CAAAC,EAAAA,MAAM,CAACC,KAAP,CAAa,CAAGC,EAAAA,QAAQ,CAACjC,IAAD,EAAO2B,IAAP,CAAY,CAAA,kCAAA,CAApC,CAAyE,CAAA,CAAtG,EAA0G;AAAEO,cAAAA,KAAK,EAAE,IAAT;AAAeC,cAAAA,SAAS,EAAE,IAAA;aAApI,CAAA,CAAA;AACH,WAAA;AACJ,SAAA;AACJ,OAPD,CANkB;;;AAgBlBhB,MAAAA,MAAM,CAACiB,OAAP,CAAeC,GAAf,CAAmBd,KAAnB,EAhBkB;;AAmBlBJ,MAAAA,MAAM,CAACiB,OAAP,CAAevB,EAAf,CAAkB,KAAlB,EAAyBa,WAAzB,CAAA,CAAA;AACAP,MAAAA,MAAM,CAACiB,OAAP,CAAevB,EAAf,CAAkB,QAAlB,EAA4Ba,WAA5B,CAAA,CAAA;KA1BD;;AA4BHY,IAAAA,UAAU,GAAA;MACNjC,OAAO,EAAA,CAAA;AACV,KAAA;;GA9BL,CAAA;AAgCH;;;;"} \ No newline at end of file diff --git a/dist/vue.es.js b/dist/vue.es.js index 4640a971..d26b3ffc 100644 --- a/dist/vue.es.js +++ b/dist/vue.es.js @@ -1 +1 @@ -import{parse as t,stringify as r}from"qs";function e(){return e=Object.assign?Object.assign.bind():function(t){for(var r=1;r({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(r){if(!this.definition.methods.includes("GET"))return!1;const e=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(t,r,e,i)=>{var s;const n=`(?<${e}>${(null==(s=this.wheres[e])?void 0:s.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return i?`(${r}${n})?`:`${r}${n}`}).replace(/^\w+:\/\//,""),[i,s]=r.replace(/^\w+:\/\//,"").split("?"),n=new RegExp(`^${e}/?$`).exec(i);if(n){for(const t in n.groups)n.groups[t]="string"==typeof n.groups[t]?decodeURIComponent(n.groups[t]):n.groups[t];return{params:n.groups,query:t(s)}}return!1}compile(t){const r=this.parameterSegments;return r.length?this.template.replace(/{([^}?]+)(\??)}/g,(e,i,s)=>{var n,o,h;if(!s&&[null,void 0].includes(t[i]))throw new Error(`Ziggy error: '${i}' parameter is required for route '${this.name}'.`);if(r[r.length-1].name===i&&".*"===this.wheres[i])return encodeURIComponent(null!=(h=t[i])?h:"").replace(/%2F/g,"/");if(this.wheres[i]&&!new RegExp(`^${s?`(${this.wheres[i]})?`:this.wheres[i]}$`).test(null!=(n=t[i])?n:""))throw new Error(`Ziggy error: '${i}' parameter does not match required format '${this.wheres[i]}' for route '${this.name}'.`);return encodeURIComponent(null!=(o=t[i])?o:"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class s extends String{constructor(t,r,s=!0,n){if(super(),this.t=void 0,this.i=void 0,this.o=void 0,this.t=null!=n?n:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,this.t=e({},this.t,{absolute:s}),t){if(!this.t.routes[t])throw new Error(`Ziggy error: route '${t}' is not in the route list.`);this.o=new i(t,this.t.routes[t],this.t),this.i=this.h(r,this.o)}}toString(){var t;const i=Object.keys(this.i).filter(t=>!this.o.parameterSegments.some(({name:r})=>r===t)).filter(t=>"_query"!==t).reduce((t,r)=>e({},t,{[r]:this.i[r]}),{}),s=null!=(t=this.i._query)?t:{};return this.o.compile(this.i)+r(e({},i,s),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,r)=>"boolean"==typeof t?Number(t).toString():r(t)})}u(t){t?this.t.absolute&&t.startsWith("/")&&(t=this.l().host+t):t=this.g();const r=Object.entries(this.t.routes);for(const[s,n]of r){const r=new i(s,n,this.t).matchesUrl(t);if(r)return e({name:s},r,{route:n})}return{}}g(){const{host:t,pathname:r,search:e}=this.l();return(this.t.absolute?t+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+e}current(t,r){null!=r||(r={});const s=this.u();if(!s)return;const{name:n,params:o,query:h,route:u}=s;if(!t)return n;const a=new RegExp(`^${t.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(n);if([null,void 0].includes(r)||!a)return a;const l=new i(n,u,this.t),c=this.h(r,l),d=e({},o,h);return!(!Object.values(c).every(t=>!t)||Object.values(d).some(t=>void 0!==t))||Object.entries(c).every(([t,r])=>d[t]==r)}l(){var t,r,e,i,s,n;const{host:o="",pathname:h="",search:u=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:o,pathname:null!=(e=null==(i=this.t.location)?void 0:i.pathname)?e:h,search:null!=(s=null==(n=this.t.location)?void 0:n.search)?s:u}}get params(){const{params:t,query:r}=this.u()||{};return e({},t,r)}has(t){return Object.keys(this.t.routes).includes(t)}h(t,r){null!=t||(t={});const i=r.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);let s={};if("number"==typeof t||"string"==typeof t){const[r]=i;s=r?{[r.name]:t}:{[t]:""}}else t instanceof Array?s=t.reduce((t,r,s)=>e({},t,i[s]?{[i[s].name]:r}:"object"==typeof r?r:{[r]:""}),{}):1!==i.length||t[i[0].name]||!t.hasOwnProperty(Object.values(r.bindings)[0])&&!t.hasOwnProperty("id")?t&&(s=t):s={[i[0].name]:t};return e({},this.m(r),this.p(s,r))}m(t){return t.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((t,{name:r},i)=>e({},t,{[r]:this.t.defaults[r]}),{})}p(t,{bindings:r,parameterSegments:i}){return Object.entries(t).reduce((t,[s,n])=>{if(!n||"object"!=typeof n||Array.isArray(n)||!i.some(({name:t})=>t===s))return e({},t,{[s]:n});if(!n.hasOwnProperty(r[s])){if(!n.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${s}' parameter is missing route model binding key '${r[s]}'.`);r[s]="id"}return e({},t,{[s]:n[r[s]]})},{})}valueOf(){return this.toString()}check(t){return this.has(t)}}const n={install:(t,r)=>{const e=(t,e,i,n=r)=>function(t,r,e=!0,i){const n=new s(t,r,e,i);return t?n.toString():n}(t,e,i,n);t.mixin({methods:{route:e}}),parseInt(t.version)>2&&t.provide("route",e)}};export{n as ZiggyVue}; +function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e1;){var e=t.pop(),r=e.obj[e.prop];if(u(r)){for(var n=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===o.RFC1738&&(40===c||41===c)?a+=u.charAt(f):c<128?a+=s[c]:c<2048?a+=s[192|c>>6]+s[128|63&c]:c<55296||c>=57344?a+=s[224|c>>12]+s[128|c>>6&63]+s[128|63&c]:(c=65536+((1023&c)<<10|1023&u.charCodeAt(f+=1)),a+=s[240|c>>18]+s[128|c>>12&63]+s[128|c>>6&63]+s[128|63&c])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(u(t)){for(var r=[],n=0;n0?w.join(",")||null:void 0}];else if(p(s))R=s;else{var C=Object.keys(w);R=a?C.sort(a):C}for(var N=0;N-1?t.split(","):t},S=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=r.depth>0&&/(\[[^[\]]*])/.exec(o),s=u?o.slice(0,u.index):o,a=[];if(s){if(!r.plainObjects&&j.call(Object.prototype,s)&&!r.allowPrototypes)return;a.push(s)}for(var f=0;r.depth>0&&null!==(u=i.exec(o))&&f=0;--i){var u,s=t[i];if("[]"===s&&r.parseArrays)u=[].concat(o);else{u=r.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,f=parseInt(a,10);r.parseArrays||""!==a?!isNaN(f)&&s!==a&&String(f)===a&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(u=[])[f]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,e,r,n)}},R=function(t,e){var r=function(t){if(!t)return O;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?O.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:O.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:O.arrayLimit,charset:void 0===t.charset?O.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:O.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:O.comma,decoder:"function"==typeof t.decoder?t.decoder:O.decoder,delimiter:"string"==typeof t.delimiter||f.isRegExp(t.delimiter)?t.delimiter:O.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:O.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:O.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:O.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:O.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:O.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,e){var r,n={},o=(e.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(e.delimiter,Infinity===e.parameterLimit?void 0:e.parameterLimit),i=-1,u=e.charset;if(e.charsetSentinel)for(r=0;r-1&&(a=w(a)?[a]:a),n[s]=j.call(n,s)?f.combine(n[s],a):a}return n}(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),u=0;u({name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)})))?t:[]}matchesUrl(t){if(!this.definition.methods.includes("GET"))return!1;const e=this.template.replace(/(\/?){([^}?]*)(\??)}/g,(t,e,r,n)=>{var o;const i=`(?<${r}>${(null==(o=this.wheres[r])?void 0:o.replace(/(^\^)|(\$$)/g,""))||"[^/?]+"})`;return n?`(${e}${i})?`:`${e}${i}`}).replace(/^\w+:\/\//,""),[r,n]=t.replace(/^\w+:\/\//,"").split("?"),o=new RegExp(`^${e}/?$`).exec(r);if(o){for(const t in o.groups)o.groups[t]="string"==typeof o.groups[t]?decodeURIComponent(o.groups[t]):o.groups[t];return{params:o.groups,query:R(n)}}return!1}compile(t){const e=this.parameterSegments;return e.length?this.template.replace(/{([^}?]+)(\??)}/g,(r,n,o)=>{var i;if(!o&&[null,void 0].includes(t[n]))throw new Error(`Ziggy error: '${n}' parameter is required for route '${this.name}'.`);if(this.wheres[n]){var u,s;if(!new RegExp(`^${o?`(${this.wheres[n]})?`:this.wheres[n]}$`).test(null!=(u=t[n])?u:""))throw new Error(`Ziggy error: '${n}' parameter does not match required format '${this.wheres[n]}' for route '${this.name}'.`);if(e[e.length-1].name===n)return encodeURIComponent(null!=(s=t[n])?s:"").replace(/%2F/g,"/")}return encodeURIComponent(null!=(i=t[n])?i:"")}).replace(`${this.origin}//`,`${this.origin}/`).replace(/\/+$/,""):this.template}}class C extends String{constructor(e,r,n=!0,o){if(super(),this.t=null!=o?o:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,this.t=t({},this.t,{absolute:n}),e){if(!this.t.routes[e])throw new Error(`Ziggy error: route '${e}' is not in the route list.`);this.i=new x(e,this.t.routes[e],this.t),this.u=this.l(r)}}toString(){const e=Object.keys(this.u).filter(t=>!this.i.parameterSegments.some(({name:e})=>e===t)).filter(t=>"_query"!==t).reduce((e,r)=>t({},e,{[r]:this.u[r]}),{});return this.i.compile(this.u)+function(t,e){var r,n=t,i=function(t){if(!t)return m;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||m.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o.default;if(void 0!==t.format){if(!c.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=o.formatters[r],i=m.filter;return("function"==typeof t.filter||p(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===t.allowDots?m.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:m.charsetSentinel,delimiter:void 0===t.delimiter?m.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:m.encode,encoder:"function"==typeof t.encoder?t.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:m.encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:m.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:m.strictNullHandling}}(e);"function"==typeof i.filter?n=(0,i.filter)("",n):p(i.filter)&&(r=i.filter);var u=[];if("object"!=typeof n||null===n)return"";var s=l[e&&e.arrayFormat in l?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices"];r||(r=Object.keys(n)),i.sort&&r.sort(i.sort);for(var a=0;a0?y+h:""}(t({},e,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:(t,e)=>"boolean"==typeof t?Number(t):e(t)})}p(e){e?this.t.absolute&&e.startsWith("/")&&(e=this.h().host+e):e=this.v();let r={};const[n,o]=Object.entries(this.t.routes).find(([t,n])=>r=new x(t,n,this.t).matchesUrl(e))||[void 0,void 0];return t({name:n},r,{route:o})}v(){const{host:t,pathname:e,search:r}=this.h();return(this.t.absolute?t+e:e.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+r}current(e,r){const{name:n,params:o,query:i,route:u}=this.p();if(!e)return n;const s=new RegExp(`^${e.replace(/\./g,"\\.").replace(/\*/g,".*")}$`).test(n);if([null,void 0].includes(r)||!s)return s;const a=new x(n,u,this.t);r=this.l(r,a);const f=t({},o,i);return!(!Object.values(r).every(t=>!t)||Object.values(f).some(t=>void 0!==t))||Object.entries(r).every(([t,e])=>f[t]==e)}h(){var t,e,r,n,o,i;const{host:u="",pathname:s="",search:a=""}="undefined"!=typeof window?window.location:{};return{host:null!=(t=null==(e=this.t.location)?void 0:e.host)?t:u,pathname:null!=(r=null==(n=this.t.location)?void 0:n.pathname)?r:s,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:a}}get params(){const{params:e,query:r}=this.p();return t({},e,r)}has(t){return Object.keys(this.t.routes).includes(t)}l(e={},r=this.i){null!=e||(e={}),e=["string","number"].includes(typeof e)?[e]:e;const n=r.parameterSegments.filter(({name:t})=>!this.t.defaults[t]);return Array.isArray(e)?e=e.reduce((e,r,o)=>t({},e,n[o]?{[n[o].name]:r}:"object"==typeof r?r:{[r]:""}),{}):1!==n.length||e[n[0].name]||!e.hasOwnProperty(Object.values(r.bindings)[0])&&!e.hasOwnProperty("id")||(e={[n[0].name]:e}),t({},this.m(r),this.g(e,r))}m(e){return e.parameterSegments.filter(({name:t})=>this.t.defaults[t]).reduce((e,{name:r},n)=>t({},e,{[r]:this.t.defaults[r]}),{})}g(e,{bindings:r,parameterSegments:n}){return Object.entries(e).reduce((e,[o,i])=>{if(!i||"object"!=typeof i||Array.isArray(i)||!n.some(({name:t})=>t===o))return t({},e,{[o]:i});if(!i.hasOwnProperty(r[o])){if(!i.hasOwnProperty("id"))throw new Error(`Ziggy error: object passed as '${o}' parameter is missing route model binding key '${r[o]}'.`);r[o]="id"}return t({},e,{[o]:i[r[o]]})},{})}valueOf(){return this.toString()}check(t){return this.has(t)}}const N={install:(t,e)=>{const r=(t,r,n,o=e)=>function(t,e,r,n){const o=new C(t,e,r,n);return t?o.toString():o}(t,r,n,o);t.mixin({methods:{route:r}}),parseInt(t.version)>2&&t.provide("route",r)}};export{N as ZiggyVue}; diff --git a/dist/vue.js b/dist/vue.js index 90a4a073..955bc5d8 100644 --- a/dist/vue.js +++ b/dist/vue.js @@ -1,1243 +1 @@ -!(function (t, r) { - "object" == typeof exports && "undefined" != typeof module - ? r(exports) - : "function" == typeof define && define.amd - ? define(["exports"], r) - : r(((t || self).ZiggyVue = {})); -})(this, function (t) { - function r(t, r) { - for (var n = 0; n < r.length; n++) { - var e = r[n]; - (e.enumerable = e.enumerable || !1), - (e.configurable = !0), - "value" in e && (e.writable = !0), - Object.defineProperty(t, e.key, e); - } - } - function n(t, n, e) { - return ( - n && r(t.prototype, n), - e && r(t, e), - Object.defineProperty(t, "prototype", { writable: !1 }), - t - ); - } - function e() { - return ( - (e = Object.assign - ? Object.assign.bind() - : function (t) { - for (var r = 1; r < arguments.length; r++) { - var n = arguments[r]; - for (var e in n) - Object.prototype.hasOwnProperty.call(n, e) && - (t[e] = n[e]); - } - return t; - }), - e.apply(this, arguments) - ); - } - function o(t) { - return ( - (o = Object.setPrototypeOf - ? Object.getPrototypeOf.bind() - : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }), - o(t) - ); - } - function i(t, r) { - return ( - (i = Object.setPrototypeOf - ? Object.setPrototypeOf.bind() - : function (t, r) { - return (t.__proto__ = r), t; - }), - i(t, r) - ); - } - function u() { - if ("undefined" == typeof Reflect || !Reflect.construct) return !1; - if (Reflect.construct.sham) return !1; - if ("function" == typeof Proxy) return !0; - try { - return ( - Boolean.prototype.valueOf.call( - Reflect.construct(Boolean, [], function () {}) - ), - !0 - ); - } catch (t) { - return !1; - } - } - function f(t, r, n) { - return ( - (f = u() - ? Reflect.construct.bind() - : function (t, r, n) { - var e = [null]; - e.push.apply(e, r); - var o = new (Function.bind.apply(t, e))(); - return n && i(o, n.prototype), o; - }), - f.apply(null, arguments) - ); - } - function a(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return ( - (a = function (t) { - if ( - null === t || - -1 === Function.toString.call(t).indexOf("[native code]") - ) - return t; - if ("function" != typeof t) - throw new TypeError( - "Super expression must either be null or a function" - ); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, n); - } - function n() { - return f(t, arguments, o(this).constructor); - } - return ( - (n.prototype = Object.create(t.prototype, { - constructor: { - value: n, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - i(n, t) - ); - }), - a(t) - ); - } - var c = String.prototype.replace, - l = /%20/g, - s = "RFC3986", - p = { - default: s, - formatters: { - RFC1738: function (t) { - return c.call(t, l, "+"); - }, - RFC3986: function (t) { - return String(t); - }, - }, - RFC1738: "RFC1738", - RFC3986: s, - }, - v = Object.prototype.hasOwnProperty, - y = Array.isArray, - d = (function () { - for (var t = [], r = 0; r < 256; ++r) - t.push( - "%" + ((r < 16 ? "0" : "") + r.toString(16)).toUpperCase() - ); - return t; - })(), - b = function (t, r) { - for ( - var n = r && r.plainObjects ? Object.create(null) : {}, e = 0; - e < t.length; - ++e - ) - void 0 !== t[e] && (n[e] = t[e]); - return n; - }, - h = { - arrayToObject: b, - assign: function (t, r) { - return Object.keys(r).reduce(function (t, n) { - return (t[n] = r[n]), t; - }, t); - }, - combine: function (t, r) { - return [].concat(t, r); - }, - compact: function (t) { - for ( - var r = [{ obj: { o: t }, prop: "o" }], n = [], e = 0; - e < r.length; - ++e - ) - for ( - var o = r[e], - i = o.obj[o.prop], - u = Object.keys(i), - f = 0; - f < u.length; - ++f - ) { - var a = u[f], - c = i[a]; - "object" == typeof c && - null !== c && - -1 === n.indexOf(c) && - (r.push({ obj: i, prop: a }), n.push(c)); - } - return ( - (function (t) { - for (; t.length > 1; ) { - var r = t.pop(), - n = r.obj[r.prop]; - if (y(n)) { - for (var e = [], o = 0; o < n.length; ++o) - void 0 !== n[o] && e.push(n[o]); - r.obj[r.prop] = e; - } - } - })(r), - t - ); - }, - decode: function (t, r, n) { - var e = t.replace(/\+/g, " "); - if ("iso-8859-1" === n) - return e.replace(/%[0-9a-f]{2}/gi, unescape); - try { - return decodeURIComponent(e); - } catch (t) { - return e; - } - }, - encode: function (t, r, n, e, o) { - if (0 === t.length) return t; - var i = t; - if ( - ("symbol" == typeof t - ? (i = Symbol.prototype.toString.call(t)) - : "string" != typeof t && (i = String(t)), - "iso-8859-1" === n) - ) - return escape(i).replace(/%u[0-9a-f]{4}/gi, function (t) { - return "%26%23" + parseInt(t.slice(2), 16) + "%3B"; - }); - for (var u = "", f = 0; f < i.length; ++f) { - var a = i.charCodeAt(f); - 45 === a || - 46 === a || - 95 === a || - 126 === a || - (a >= 48 && a <= 57) || - (a >= 65 && a <= 90) || - (a >= 97 && a <= 122) || - (o === p.RFC1738 && (40 === a || 41 === a)) - ? (u += i.charAt(f)) - : a < 128 - ? (u += d[a]) - : a < 2048 - ? (u += d[192 | (a >> 6)] + d[128 | (63 & a)]) - : a < 55296 || a >= 57344 - ? (u += - d[224 | (a >> 12)] + - d[128 | ((a >> 6) & 63)] + - d[128 | (63 & a)]) - : ((a = - 65536 + - (((1023 & a) << 10) | - (1023 & i.charCodeAt((f += 1))))), - (u += - d[240 | (a >> 18)] + - d[128 | ((a >> 12) & 63)] + - d[128 | ((a >> 6) & 63)] + - d[128 | (63 & a)])); - } - return u; - }, - isBuffer: function (t) { - return !( - !t || - "object" != typeof t || - !( - t.constructor && - t.constructor.isBuffer && - t.constructor.isBuffer(t) - ) - ); - }, - isRegExp: function (t) { - return "[object RegExp]" === Object.prototype.toString.call(t); - }, - maybeMap: function (t, r) { - if (y(t)) { - for (var n = [], e = 0; e < t.length; e += 1) - n.push(r(t[e])); - return n; - } - return r(t); - }, - merge: function t(r, n, e) { - if (!n) return r; - if ("object" != typeof n) { - if (y(r)) r.push(n); - else { - if (!r || "object" != typeof r) return [r, n]; - ((e && (e.plainObjects || e.allowPrototypes)) || - !v.call(Object.prototype, n)) && - (r[n] = !0); - } - return r; - } - if (!r || "object" != typeof r) return [r].concat(n); - var o = r; - return ( - y(r) && !y(n) && (o = b(r, e)), - y(r) && y(n) - ? (n.forEach(function (n, o) { - if (v.call(r, o)) { - var i = r[o]; - i && - "object" == typeof i && - n && - "object" == typeof n - ? (r[o] = t(i, n, e)) - : r.push(n); - } else r[o] = n; - }), - r) - : Object.keys(n).reduce(function (r, o) { - var i = n[o]; - return ( - (r[o] = v.call(r, o) ? t(r[o], i, e) : i), r - ); - }, o) - ); - }, - }, - g = Object.prototype.hasOwnProperty, - m = { - brackets: function (t) { - return t + "[]"; - }, - comma: "comma", - indices: function (t, r) { - return t + "[" + r + "]"; - }, - repeat: function (t) { - return t; - }, - }, - j = Array.isArray, - w = String.prototype.split, - O = Array.prototype.push, - E = function (t, r) { - O.apply(t, j(r) ? r : [r]); - }, - R = Date.prototype.toISOString, - S = p.default, - x = { - addQueryPrefix: !1, - allowDots: !1, - charset: "utf-8", - charsetSentinel: !1, - delimiter: "&", - encode: !0, - encoder: h.encode, - encodeValuesOnly: !1, - format: S, - formatter: p.formatters[S], - indices: !1, - serializeDate: function (t) { - return R.call(t); - }, - skipNulls: !1, - strictNullHandling: !1, - }, - k = function t(r, n, e, o, i, u, f, a, c, l, s, p, v, y) { - var d, - b = r; - if ( - ("function" == typeof f - ? (b = f(n, b)) - : b instanceof Date - ? (b = l(b)) - : "comma" === e && - j(b) && - (b = h.maybeMap(b, function (t) { - return t instanceof Date ? l(t) : t; - })), - null === b) - ) { - if (o) return u && !v ? u(n, x.encoder, y, "key", s) : n; - b = ""; - } - if ( - "string" == typeof (d = b) || - "number" == typeof d || - "boolean" == typeof d || - "symbol" == typeof d || - "bigint" == typeof d || - h.isBuffer(b) - ) { - if (u) { - var g = v ? n : u(n, x.encoder, y, "key", s); - if ("comma" === e && v) { - for ( - var m = w.call(String(b), ","), O = "", R = 0; - R < m.length; - ++R - ) - O += - (0 === R ? "" : ",") + - p(u(m[R], x.encoder, y, "value", s)); - return [p(g) + "=" + O]; - } - return [p(g) + "=" + p(u(b, x.encoder, y, "value", s))]; - } - return [p(n) + "=" + p(String(b))]; - } - var S, - k = []; - if (void 0 === b) return k; - if ("comma" === e && j(b)) - S = [{ value: b.length > 0 ? b.join(",") || null : void 0 }]; - else if (j(f)) S = f; - else { - var T = Object.keys(b); - S = a ? T.sort(a) : T; - } - for (var C = 0; C < S.length; ++C) { - var N = S[C], - D = - "object" == typeof N && void 0 !== N.value - ? N.value - : b[N]; - if (!i || null !== D) { - var F = j(b) - ? "function" == typeof e - ? e(n, N) - : n - : n + (c ? "." + N : "[" + N + "]"); - E(k, t(D, F, e, o, i, u, f, a, c, l, s, p, v, y)); - } - } - return k; - }, - T = Object.prototype.hasOwnProperty, - C = Array.isArray, - N = { - allowDots: !1, - allowPrototypes: !1, - arrayLimit: 20, - charset: "utf-8", - charsetSentinel: !1, - comma: !1, - decoder: h.decode, - delimiter: "&", - depth: 5, - ignoreQueryPrefix: !1, - interpretNumericEntities: !1, - parameterLimit: 1e3, - parseArrays: !0, - plainObjects: !1, - strictNullHandling: !1, - }, - D = function (t) { - return t.replace(/&#(\d+);/g, function (t, r) { - return String.fromCharCode(parseInt(r, 10)); - }); - }, - F = function (t, r) { - return t && "string" == typeof t && r.comma && t.indexOf(",") > -1 - ? t.split(",") - : t; - }, - I = function (t, r, n, e) { - if (t) { - var o = n.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, - i = /(\[[^[\]]*])/g, - u = n.depth > 0 && /(\[[^[\]]*])/.exec(o), - f = u ? o.slice(0, u.index) : o, - a = []; - if (f) { - if ( - !n.plainObjects && - T.call(Object.prototype, f) && - !n.allowPrototypes - ) - return; - a.push(f); - } - for ( - var c = 0; - n.depth > 0 && null !== (u = i.exec(o)) && c < n.depth; - - ) { - if ( - ((c += 1), - !n.plainObjects && - T.call(Object.prototype, u[1].slice(1, -1)) && - !n.allowPrototypes) - ) - return; - a.push(u[1]); - } - return ( - u && a.push("[" + o.slice(u.index) + "]"), - (function (t, r, n, e) { - for ( - var o = e ? r : F(r, n), i = t.length - 1; - i >= 0; - --i - ) { - var u, - f = t[i]; - if ("[]" === f && n.parseArrays) u = [].concat(o); - else { - u = n.plainObjects ? Object.create(null) : {}; - var a = - "[" === f.charAt(0) && - "]" === f.charAt(f.length - 1) - ? f.slice(1, -1) - : f, - c = parseInt(a, 10); - n.parseArrays || "" !== a - ? !isNaN(c) && - f !== a && - String(c) === a && - c >= 0 && - n.parseArrays && - c <= n.arrayLimit - ? ((u = [])[c] = o) - : "__proto__" !== a && (u[a] = o) - : (u = { 0: o }); - } - o = u; - } - return o; - })(a, r, n, e) - ); - } - }, - $ = function (t, r) { - var n = (function (t) { - if (!t) return N; - if (null != t.decoder && "function" != typeof t.decoder) - throw new TypeError("Decoder has to be a function."); - if ( - void 0 !== t.charset && - "utf-8" !== t.charset && - "iso-8859-1" !== t.charset - ) - throw new TypeError( - "The charset option must be either utf-8, iso-8859-1, or undefined" - ); - return { - allowDots: - void 0 === t.allowDots ? N.allowDots : !!t.allowDots, - allowPrototypes: - "boolean" == typeof t.allowPrototypes - ? t.allowPrototypes - : N.allowPrototypes, - arrayLimit: - "number" == typeof t.arrayLimit - ? t.arrayLimit - : N.arrayLimit, - charset: void 0 === t.charset ? N.charset : t.charset, - charsetSentinel: - "boolean" == typeof t.charsetSentinel - ? t.charsetSentinel - : N.charsetSentinel, - comma: "boolean" == typeof t.comma ? t.comma : N.comma, - decoder: - "function" == typeof t.decoder ? t.decoder : N.decoder, - delimiter: - "string" == typeof t.delimiter || - h.isRegExp(t.delimiter) - ? t.delimiter - : N.delimiter, - depth: - "number" == typeof t.depth || !1 === t.depth - ? +t.depth - : N.depth, - ignoreQueryPrefix: !0 === t.ignoreQueryPrefix, - interpretNumericEntities: - "boolean" == typeof t.interpretNumericEntities - ? t.interpretNumericEntities - : N.interpretNumericEntities, - parameterLimit: - "number" == typeof t.parameterLimit - ? t.parameterLimit - : N.parameterLimit, - parseArrays: !1 !== t.parseArrays, - plainObjects: - "boolean" == typeof t.plainObjects - ? t.plainObjects - : N.plainObjects, - strictNullHandling: - "boolean" == typeof t.strictNullHandling - ? t.strictNullHandling - : N.strictNullHandling, - }; - })(r); - if ("" === t || null == t) - return n.plainObjects ? Object.create(null) : {}; - for ( - var e = - "string" == typeof t - ? (function (t, r) { - var n, - e = {}, - o = ( - r.ignoreQueryPrefix - ? t.replace(/^\?/, "") - : t - ).split( - r.delimiter, - Infinity === r.parameterLimit - ? void 0 - : r.parameterLimit - ), - i = -1, - u = r.charset; - if (r.charsetSentinel) - for (n = 0; n < o.length; ++n) - 0 === o[n].indexOf("utf8=") && - ("utf8=%E2%9C%93" === o[n] - ? (u = "utf-8") - : "utf8=%26%2310003%3B" === - o[n] && - (u = "iso-8859-1"), - (i = n), - (n = o.length)); - for (n = 0; n < o.length; ++n) - if (n !== i) { - var f, - a, - c = o[n], - l = c.indexOf("]="), - s = - -1 === l - ? c.indexOf("=") - : l + 1; - -1 === s - ? ((f = r.decoder( - c, - N.decoder, - u, - "key" - )), - (a = r.strictNullHandling - ? null - : "")) - : ((f = r.decoder( - c.slice(0, s), - N.decoder, - u, - "key" - )), - (a = h.maybeMap( - F(c.slice(s + 1), r), - function (t) { - return r.decoder( - t, - N.decoder, - u, - "value" - ); - } - ))), - a && - r.interpretNumericEntities && - "iso-8859-1" === u && - (a = D(a)), - c.indexOf("[]=") > -1 && - (a = C(a) ? [a] : a), - (e[f] = T.call(e, f) - ? h.combine(e[f], a) - : a); - } - return e; - })(t, n) - : t, - o = n.plainObjects ? Object.create(null) : {}, - i = Object.keys(e), - u = 0; - u < i.length; - ++u - ) { - var f = i[u], - a = I(f, e[f], n, "string" == typeof t); - o = h.merge(o, a, n); - } - return h.compact(o); - }, - A = /*#__PURE__*/ (function () { - function t(t, r, n) { - var e, o; - (this.name = t), - (this.definition = r), - (this.bindings = null != (e = r.bindings) ? e : {}), - (this.wheres = null != (o = r.wheres) ? o : {}), - (this.config = n); - } - var r = t.prototype; - return ( - (r.matchesUrl = function (t) { - var r = this; - if (!this.definition.methods.includes("GET")) return !1; - var n = this.template - .replace( - /(\/?){([^}?]*)(\??)}/g, - function (t, n, e, o) { - var i, - u = - "(?<" + - e + - ">" + - ((null == (i = r.wheres[e]) - ? void 0 - : i.replace( - /(^\^)|(\$$)/g, - "" - )) || "[^/?]+") + - ")"; - return o ? "(" + n + u + ")?" : "" + n + u; - } - ) - .replace(/^\w+:\/\//, ""), - e = t.replace(/^\w+:\/\//, "").split("?"), - o = e[0], - i = e[1], - u = new RegExp("^" + n + "/?$").exec(o); - if (u) { - for (var f in u.groups) - u.groups[f] = - "string" == typeof u.groups[f] - ? decodeURIComponent(u.groups[f]) - : u.groups[f]; - return { params: u.groups, query: $(i) }; - } - return !1; - }), - (r.compile = function (t) { - var r = this, - n = this.parameterSegments; - return n.length - ? this.template - .replace(/{([^}?]+)(\??)}/g, function (e, o, i) { - var u, f, a; - if (!i && [null, void 0].includes(t[o])) - throw new Error( - "Ziggy error: '" + - o + - "' parameter is required for route '" + - r.name + - "'." - ); - if ( - n[n.length - 1].name === o && - ".*" === r.wheres[o] - ) - return encodeURIComponent( - null != (a = t[o]) ? a : "" - ).replace(/%2F/g, "/"); - if ( - r.wheres[o] && - !new RegExp( - "^" + - (i - ? "(" + r.wheres[o] + ")?" - : r.wheres[o]) + - "$" - ).test(null != (u = t[o]) ? u : "") - ) - throw new Error( - "Ziggy error: '" + - o + - "' parameter does not match required format '" + - r.wheres[o] + - "' for route '" + - r.name + - "'." - ); - return encodeURIComponent( - null != (f = t[o]) ? f : "" - ); - }) - .replace(this.origin + "//", this.origin + "/") - .replace(/\/+$/, "") - : this.template; - }), - n(t, [ - { - key: "template", - get: function () { - return ( - this.origin + - "/" + - this.definition.uri - ).replace(/\/+$/, ""); - }, - }, - { - key: "origin", - get: function () { - return this.config.absolute - ? this.definition.domain - ? "" + - this.config.url.match(/^\w+:\/\//)[0] + - this.definition.domain + - (this.config.port - ? ":" + this.config.port - : "") - : this.config.url - : ""; - }, - }, - { - key: "parameterSegments", - get: function () { - var t, r; - return null != - (t = - null == - (r = this.template.match(/{[^}?]+\??}/g)) - ? void 0 - : r.map(function (t) { - return { - name: t.replace( - /{|\??}/g, - "" - ), - required: !/\?}$/.test(t), - }; - })) - ? t - : []; - }, - }, - ]), - t - ); - })(), - P = /*#__PURE__*/ (function (t) { - var r, o; - function u(r, n, o, i) { - var u; - if ( - (void 0 === o && (o = !0), - ((u = t.call(this) || this).t = - null != i - ? i - : "undefined" != typeof Ziggy - ? Ziggy - : null == globalThis - ? void 0 - : globalThis.Ziggy), - (u.t = e({}, u.t, { absolute: o })), - r) - ) { - if (!u.t.routes[r]) - throw new Error( - "Ziggy error: route '" + - r + - "' is not in the route list." - ); - (u.i = new A(r, u.t.routes[r], u.t)), (u.u = u.l(n)); - } - return u; - } - (o = t), - ((r = u).prototype = Object.create(o.prototype)), - (r.prototype.constructor = r), - i(r, o); - var f = u.prototype; - return ( - (f.toString = function () { - var t = this, - r = Object.keys(this.u) - .filter(function (r) { - return !t.i.parameterSegments.some(function ( - t - ) { - return t.name === r; - }); - }) - .filter(function (t) { - return "_query" !== t; - }) - .reduce(function (r, n) { - var o; - return e({}, r, (((o = {})[n] = t.u[n]), o)); - }, {}); - return ( - this.i.compile(this.u) + - (function (t, r) { - var n, - e = t, - o = (function (t) { - if (!t) return x; - if ( - null != t.encoder && - "function" != typeof t.encoder - ) - throw new TypeError( - "Encoder has to be a function." - ); - var r = t.charset || x.charset; - if ( - void 0 !== t.charset && - "utf-8" !== t.charset && - "iso-8859-1" !== t.charset - ) - throw new TypeError( - "The charset option must be either utf-8, iso-8859-1, or undefined" - ); - var n = p.default; - if (void 0 !== t.format) { - if (!g.call(p.formatters, t.format)) - throw new TypeError( - "Unknown format option provided." - ); - n = t.format; - } - var e = p.formatters[n], - o = x.filter; - return ( - ("function" == typeof t.filter || - j(t.filter)) && - (o = t.filter), - { - addQueryPrefix: - "boolean" == - typeof t.addQueryPrefix - ? t.addQueryPrefix - : x.addQueryPrefix, - allowDots: - void 0 === t.allowDots - ? x.allowDots - : !!t.allowDots, - charset: r, - charsetSentinel: - "boolean" == - typeof t.charsetSentinel - ? t.charsetSentinel - : x.charsetSentinel, - delimiter: - void 0 === t.delimiter - ? x.delimiter - : t.delimiter, - encode: - "boolean" == typeof t.encode - ? t.encode - : x.encode, - encoder: - "function" == typeof t.encoder - ? t.encoder - : x.encoder, - encodeValuesOnly: - "boolean" == - typeof t.encodeValuesOnly - ? t.encodeValuesOnly - : x.encodeValuesOnly, - filter: o, - format: n, - formatter: e, - serializeDate: - "function" == - typeof t.serializeDate - ? t.serializeDate - : x.serializeDate, - skipNulls: - "boolean" == typeof t.skipNulls - ? t.skipNulls - : x.skipNulls, - sort: - "function" == typeof t.sort - ? t.sort - : null, - strictNullHandling: - "boolean" == - typeof t.strictNullHandling - ? t.strictNullHandling - : x.strictNullHandling, - } - ); - })(r); - "function" == typeof o.filter - ? (e = (0, o.filter)("", e)) - : j(o.filter) && (n = o.filter); - var i = []; - if ("object" != typeof e || null === e) return ""; - var u = - m[ - r && r.arrayFormat in m - ? r.arrayFormat - : r && "indices" in r - ? r.indices - ? "indices" - : "repeat" - : "indices" - ]; - n || (n = Object.keys(e)), o.sort && n.sort(o.sort); - for (var f = 0; f < n.length; ++f) { - var a = n[f]; - (o.skipNulls && null === e[a]) || - E( - i, - k( - e[a], - a, - u, - o.strictNullHandling, - o.skipNulls, - o.encode ? o.encoder : null, - o.filter, - o.sort, - o.allowDots, - o.serializeDate, - o.format, - o.formatter, - o.encodeValuesOnly, - o.charset - ) - ); - } - var c = i.join(o.delimiter), - l = !0 === o.addQueryPrefix ? "?" : ""; - return ( - o.charsetSentinel && - (l += - "iso-8859-1" === o.charset - ? "utf8=%26%2310003%3B&" - : "utf8=%E2%9C%93&"), - c.length > 0 ? l + c : "" - ); - })(e({}, r, this.u._query), { - addQueryPrefix: !0, - arrayFormat: "indices", - encodeValuesOnly: !0, - skipNulls: !0, - encoder: function (t, r) { - return "boolean" == typeof t ? Number(t) : r(t); - }, - }) - ); - }), - (f.p = function (t) { - var r = this; - t - ? this.t.absolute && - t.startsWith("/") && - (t = this.v().host + t) - : (t = this.h()); - var n = {}, - o = Object.entries(this.t.routes).find(function (e) { - return (n = new A(e[0], e[1], r.t).matchesUrl(t)); - }) || [void 0, void 0]; - return e({ name: o[0] }, n, { route: o[1] }); - }), - (f.h = function () { - var t = this.v(), - r = t.pathname, - n = t.search; - return ( - (this.t.absolute - ? t.host + r - : r - .replace( - this.t.url.replace(/^\w*:\/\/[^/]+/, ""), - "" - ) - .replace(/^\/+/, "/")) + n - ); - }), - (f.current = function (t, r) { - var n = this.p(), - o = n.name, - i = n.params, - u = n.query, - f = n.route; - if (!t) return o; - var a = new RegExp( - "^" + t.replace(/\./g, "\\.").replace(/\*/g, ".*") + "$" - ).test(o); - if ([null, void 0].includes(r) || !a) return a; - var c = new A(o, f, this.t); - r = this.l(r, c); - var l = e({}, i, u); - return ( - !( - !Object.values(r).every(function (t) { - return !t; - }) || - Object.values(l).some(function (t) { - return void 0 !== t; - }) - ) || - Object.entries(r).every(function (t) { - return l[t[0]] == t[1]; - }) - ); - }), - (f.v = function () { - var t, - r, - n, - e, - o, - i, - u = "undefined" != typeof window ? window.location : {}, - f = u.host, - a = u.pathname, - c = u.search; - return { - host: - null != - (t = - null == (r = this.t.location) ? void 0 : r.host) - ? t - : void 0 === f - ? "" - : f, - pathname: - null != - (n = - null == (e = this.t.location) - ? void 0 - : e.pathname) - ? n - : void 0 === a - ? "" - : a, - search: - null != - (o = - null == (i = this.t.location) - ? void 0 - : i.search) - ? o - : void 0 === c - ? "" - : c, - }; - }), - (f.has = function (t) { - return Object.keys(this.t.routes).includes(t); - }), - (f.l = function (t, r) { - var n = this; - void 0 === t && (t = {}), - void 0 === r && (r = this.i), - null != t || (t = {}), - (t = ["string", "number"].includes(typeof t) ? [t] : t); - var o = r.parameterSegments.filter(function (t) { - return !n.t.defaults[t.name]; - }); - if (Array.isArray(t)) - t = t.reduce(function (t, r, n) { - var i, u; - return e( - {}, - t, - o[n] - ? (((i = {})[o[n].name] = r), i) - : "object" == typeof r - ? r - : (((u = {})[r] = ""), u) - ); - }, {}); - else if ( - 1 === o.length && - !t[o[0].name] && - (t.hasOwnProperty(Object.values(r.bindings)[0]) || - t.hasOwnProperty("id")) - ) { - var i; - ((i = {})[o[0].name] = t), (t = i); - } - return e({}, this.g(r), this.m(t, r)); - }), - (f.g = function (t) { - var r = this; - return t.parameterSegments - .filter(function (t) { - return r.t.defaults[t.name]; - }) - .reduce(function (t, n, o) { - var i, - u = n.name; - return e( - {}, - t, - (((i = {})[u] = r.t.defaults[u]), i) - ); - }, {}); - }), - (f.m = function (t, r) { - var n = r.bindings, - o = r.parameterSegments; - return Object.entries(t).reduce(function (t, r) { - var i, - u, - f = r[0], - a = r[1]; - if ( - !a || - "object" != typeof a || - Array.isArray(a) || - !o.some(function (t) { - return t.name === f; - }) - ) - return e({}, t, (((u = {})[f] = a), u)); - if (!a.hasOwnProperty(n[f])) { - if (!a.hasOwnProperty("id")) - throw new Error( - "Ziggy error: object passed as '" + - f + - "' parameter is missing route model binding key '" + - n[f] + - "'." - ); - n[f] = "id"; - } - return e({}, t, (((i = {})[f] = a[n[f]]), i)); - }, {}); - }), - (f.valueOf = function () { - return this.toString(); - }), - (f.check = function (t) { - return this.has(t); - }), - n(u, [ - { - key: "params", - get: function () { - var t = this.p(); - return e({}, t.params, t.query); - }, - }, - ]), - u - ); - })(/*#__PURE__*/ a(String)); - t.ZiggyVue = { - install: function (t, r) { - var n = function (t, n, e, o) { - return ( - void 0 === o && (o = r), - (function (t, r, n, e) { - var o = new P(t, r, n, e); - return t ? o.toString() : o; - })(t, n, e, o) - ); - }; - t.mixin({ methods: { route: n } }), - parseInt(t.version) > 2 && t.provide("route", n); - }, - }; -}); +!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t||self).ZiggyVue={})}(this,function(t){function r(t,r){for(var e=0;e1;){var r=t.pop(),e=r.obj[r.prop];if(p(e)){for(var n=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===s.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=y[a]:a<2048?u+=y[192|a>>6]+y[128|63&a]:a<55296||a>=57344?u+=y[224|a>>12]+y[128|a>>6&63]+y[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=y[240|a>>18]+y[128|a>>12&63]+y[128|a>>6&63]+y[128|63&a])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(p(t)){for(var e=[],n=0;n0?h.join(",")||null:void 0}];else if(g(f))x=f;else{var k=Object.keys(h);x=a?k.sort(a):k}for(var C=0;C-1?t.split(","):t},F=function(t,r,e,n){if(t){var o=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=e.depth>0&&/(\[[^[\]]*])/.exec(o),f=u?o.slice(0,u.index):o,a=[];if(f){if(!e.plainObjects&&T.call(Object.prototype,f)&&!e.allowPrototypes)return;a.push(f)}for(var c=0;e.depth>0&&null!==(u=i.exec(o))&&c=0;--i){var u,f=t[i];if("[]"===f&&e.parseArrays)u=[].concat(o);else{u=e.plainObjects?Object.create(null):{};var a="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,c=parseInt(a,10);e.parseArrays||""!==a?!isNaN(c)&&f!==a&&String(c)===a&&c>=0&&e.parseArrays&&c<=e.arrayLimit?(u=[])[c]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,r,e,n)}},I=function(t,r){var e=function(t){if(!t)return C;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?C.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:C.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:C.arrayLimit,charset:void 0===t.charset?C.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:C.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:C.comma,decoder:"function"==typeof t.decoder?t.decoder:C.decoder,delimiter:"string"==typeof t.delimiter||b.isRegExp(t.delimiter)?t.delimiter:C.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:C.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:C.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:C.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:C.strictNullHandling}}(r);if(""===t||null==t)return e.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,r){var e,n={},o=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),i=-1,u=r.charset;if(r.charsetSentinel)for(e=0;e-1&&(a=k(a)?[a]:a),n[f]=T.call(n,f)?b.combine(n[f],a):a}return n}(t,e):t,o=e.plainObjects?Object.create(null):{},i=Object.keys(n),u=0;u"+((null==(i=r.wheres[n])?void 0:i.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return o?"("+e+u+")?":""+e+u}).replace(/^\w+:\/\//,""),n=t.replace(/^\w+:\/\//,"").split("?"),o=n[0],i=n[1],u=new RegExp("^"+e+"/?$").exec(o);if(u){for(var f in u.groups)u.groups[f]="string"==typeof u.groups[f]?decodeURIComponent(u.groups[f]):u.groups[f];return{params:u.groups,query:I(i)}}return!1},r.compile=function(t){var r=this,e=this.parameterSegments;return e.length?this.template.replace(/{([^}?]+)(\??)}/g,function(n,o,i){var u;if(!i&&[null,void 0].includes(t[o]))throw new Error("Ziggy error: '"+o+"' parameter is required for route '"+r.name+"'.");if(r.wheres[o]){var f,a;if(!new RegExp("^"+(i?"("+r.wheres[o]+")?":r.wheres[o])+"$").test(null!=(f=t[o])?f:""))throw new Error("Ziggy error: '"+o+"' parameter does not match required format '"+r.wheres[o]+"' for route '"+r.name+"'.");if(e[e.length-1].name===o)return encodeURIComponent(null!=(a=t[o])?a:"").replace(/%2F/g,"/")}return encodeURIComponent(null!=(u=t[o])?u:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},e(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,r;return null!=(t=null==(r=this.template.match(/{[^}?]+\??}/g))?void 0:r.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),$=/*#__PURE__*/function(t){var r,o;function u(r,e,o,i){var u;if(void 0===o&&(o=!0),(u=t.call(this)||this).t=null!=i?i:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,u.t=n({},u.t,{absolute:o}),r){if(!u.t.routes[r])throw new Error("Ziggy error: route '"+r+"' is not in the route list.");u.i=new P(r,u.t.routes[r],u.t),u.u=u.l(e)}return u}o=t,(r=u).prototype=Object.create(o.prototype),r.prototype.constructor=r,i(r,o);var f=u.prototype;return f.toString=function(){var t=this,r=Object.keys(this.u).filter(function(r){return!t.i.parameterSegments.some(function(t){return t.name===r})}).filter(function(t){return"_query"!==t}).reduce(function(r,e){var o;return n({},r,((o={})[e]=t.u[e],o))},{});return this.i.compile(this.u)+function(t,r){var e,n=t,o=function(t){if(!t)return S;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||S.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=s.default;if(void 0!==t.format){if(!h.call(s.formatters,t.format))throw new TypeError("Unknown format option provided.");e=t.format}var n=s.formatters[e],o=S.filter;return("function"==typeof t.filter||g(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:S.addQueryPrefix,allowDots:void 0===t.allowDots?S.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:S.charsetSentinel,delimiter:void 0===t.delimiter?S.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:S.encode,encoder:"function"==typeof t.encoder?t.encoder:S.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:S.encodeValuesOnly,filter:o,format:e,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:S.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:S.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:S.strictNullHandling}}(r);"function"==typeof o.filter?n=(0,o.filter)("",n):g(o.filter)&&(e=o.filter);var i=[];if("object"!=typeof n||null===n)return"";var u=m[r&&r.arrayFormat in m?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];e||(e=Object.keys(n)),o.sort&&e.sort(o.sort);for(var f=0;f0?l+c:""}(n({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,r){return"boolean"==typeof t?Number(t):r(t)}})},f.v=function(t){var r=this;t?this.t.absolute&&t.startsWith("/")&&(t=this.p().host+t):t=this.h();var e={},o=Object.entries(this.t.routes).find(function(n){return e=new P(n[0],n[1],r.t).matchesUrl(t)})||[void 0,void 0];return n({name:o[0]},e,{route:o[1]})},f.h=function(){var t=this.p(),r=t.pathname,e=t.search;return(this.t.absolute?t.host+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+e},f.current=function(t,r){var e=this.v(),o=e.name,i=e.params,u=e.query,f=e.route;if(!t)return o;var a=new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o);if([null,void 0].includes(r)||!a)return a;var c=new P(o,f,this.t);r=this.l(r,c);var l=n({},i,u);return!(!Object.values(r).every(function(t){return!t})||Object.values(l).some(function(t){return void 0!==t}))||Object.entries(r).every(function(t){return l[t[0]]==t[1]})},f.p=function(){var t,r,e,n,o,i,u="undefined"!=typeof window?window.location:{},f=u.host,a=u.pathname,c=u.search;return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:void 0===f?"":f,pathname:null!=(e=null==(n=this.t.location)?void 0:n.pathname)?e:void 0===a?"":a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:void 0===c?"":c}},f.has=function(t){return Object.keys(this.t.routes).includes(t)},f.l=function(t,r){var e=this;void 0===t&&(t={}),void 0===r&&(r=this.i),null!=t||(t={}),t=["string","number"].includes(typeof t)?[t]:t;var o=r.parameterSegments.filter(function(t){return!e.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,r,e){var i,u;return n({},t,o[e]?((i={})[o[e].name]=r,i):"object"==typeof r?r:((u={})[r]="",u))},{});else if(1===o.length&&!t[o[0].name]&&(t.hasOwnProperty(Object.values(r.bindings)[0])||t.hasOwnProperty("id"))){var i;(i={})[o[0].name]=t,t=i}return n({},this.m(r),this.g(t,r))},f.m=function(t){var r=this;return t.parameterSegments.filter(function(t){return r.t.defaults[t.name]}).reduce(function(t,e,o){var i,u=e.name;return n({},t,((i={})[u]=r.t.defaults[u],i))},{})},f.g=function(t,r){var e=r.bindings,o=r.parameterSegments;return Object.entries(t).reduce(function(t,r){var i,u,f=r[0],a=r[1];if(!a||"object"!=typeof a||Array.isArray(a)||!o.some(function(t){return t.name===f}))return n({},t,((u={})[f]=a,u));if(!a.hasOwnProperty(e[f])){if(!a.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+f+"' parameter is missing route model binding key '"+e[f]+"'.");e[f]="id"}return n({},t,((i={})[f]=a[e[f]],i))},{})},f.valueOf=function(){return this.toString()},f.check=function(t){return this.has(t)},e(u,[{key:"params",get:function(){var t=this.v();return n({},t.params,t.query)}}]),u}(/*#__PURE__*/f(String));t.ZiggyVue={install:function(t,r){var e=function(t,e,n,o){return void 0===o&&(o=r),function(t,r,e,n){var o=new $(t,r,e,n);return t?o.toString():o}(t,e,n,o)};t.mixin({methods:{route:e}}),parseInt(t.version)>2&&t.provide("route",e)}}}); diff --git a/dist/vue.m.js b/dist/vue.m.js index b9175f1d..291633f7 100644 --- a/dist/vue.m.js +++ b/dist/vue.m.js @@ -1,1198 +1 @@ -function t(t, r) { - for (var n = 0; n < r.length; n++) { - var e = r[n]; - (e.enumerable = e.enumerable || !1), - (e.configurable = !0), - "value" in e && (e.writable = !0), - Object.defineProperty(t, e.key, e); - } -} -function r(r, n, e) { - return ( - n && t(r.prototype, n), - e && t(r, e), - Object.defineProperty(r, "prototype", { writable: !1 }), - r - ); -} -function n() { - return ( - (n = Object.assign - ? Object.assign.bind() - : function (t) { - for (var r = 1; r < arguments.length; r++) { - var n = arguments[r]; - for (var e in n) - Object.prototype.hasOwnProperty.call(n, e) && - (t[e] = n[e]); - } - return t; - }), - n.apply(this, arguments) - ); -} -function e(t) { - return ( - (e = Object.setPrototypeOf - ? Object.getPrototypeOf.bind() - : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }), - e(t) - ); -} -function o(t, r) { - return ( - (o = Object.setPrototypeOf - ? Object.setPrototypeOf.bind() - : function (t, r) { - return (t.__proto__ = r), t; - }), - o(t, r) - ); -} -function i() { - if ("undefined" == typeof Reflect || !Reflect.construct) return !1; - if (Reflect.construct.sham) return !1; - if ("function" == typeof Proxy) return !0; - try { - return ( - Boolean.prototype.valueOf.call( - Reflect.construct(Boolean, [], function () {}) - ), - !0 - ); - } catch (t) { - return !1; - } -} -function u(t, r, n) { - return ( - (u = i() - ? Reflect.construct.bind() - : function (t, r, n) { - var e = [null]; - e.push.apply(e, r); - var i = new (Function.bind.apply(t, e))(); - return n && o(i, n.prototype), i; - }), - u.apply(null, arguments) - ); -} -function f(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return ( - (f = function (t) { - if ( - null === t || - -1 === Function.toString.call(t).indexOf("[native code]") - ) - return t; - if ("function" != typeof t) - throw new TypeError( - "Super expression must either be null or a function" - ); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, n); - } - function n() { - return u(t, arguments, e(this).constructor); - } - return ( - (n.prototype = Object.create(t.prototype, { - constructor: { - value: n, - enumerable: !1, - writable: !0, - configurable: !0, - }, - })), - o(n, t) - ); - }), - f(t) - ); -} -var a = String.prototype.replace, - c = /%20/g, - l = { - default: "RFC3986", - formatters: { - RFC1738: function (t) { - return a.call(t, c, "+"); - }, - RFC3986: function (t) { - return String(t); - }, - }, - RFC1738: "RFC1738", - RFC3986: "RFC3986", - }, - s = Object.prototype.hasOwnProperty, - v = Array.isArray, - p = (function () { - for (var t = [], r = 0; r < 256; ++r) - t.push("%" + ((r < 16 ? "0" : "") + r.toString(16)).toUpperCase()); - return t; - })(), - y = function (t, r) { - for ( - var n = r && r.plainObjects ? Object.create(null) : {}, e = 0; - e < t.length; - ++e - ) - void 0 !== t[e] && (n[e] = t[e]); - return n; - }, - d = { - arrayToObject: y, - assign: function (t, r) { - return Object.keys(r).reduce(function (t, n) { - return (t[n] = r[n]), t; - }, t); - }, - combine: function (t, r) { - return [].concat(t, r); - }, - compact: function (t) { - for ( - var r = [{ obj: { o: t }, prop: "o" }], n = [], e = 0; - e < r.length; - ++e - ) - for ( - var o = r[e], i = o.obj[o.prop], u = Object.keys(i), f = 0; - f < u.length; - ++f - ) { - var a = u[f], - c = i[a]; - "object" == typeof c && - null !== c && - -1 === n.indexOf(c) && - (r.push({ obj: i, prop: a }), n.push(c)); - } - return ( - (function (t) { - for (; t.length > 1; ) { - var r = t.pop(), - n = r.obj[r.prop]; - if (v(n)) { - for (var e = [], o = 0; o < n.length; ++o) - void 0 !== n[o] && e.push(n[o]); - r.obj[r.prop] = e; - } - } - })(r), - t - ); - }, - decode: function (t, r, n) { - var e = t.replace(/\+/g, " "); - if ("iso-8859-1" === n) - return e.replace(/%[0-9a-f]{2}/gi, unescape); - try { - return decodeURIComponent(e); - } catch (t) { - return e; - } - }, - encode: function (t, r, n, e, o) { - if (0 === t.length) return t; - var i = t; - if ( - ("symbol" == typeof t - ? (i = Symbol.prototype.toString.call(t)) - : "string" != typeof t && (i = String(t)), - "iso-8859-1" === n) - ) - return escape(i).replace(/%u[0-9a-f]{4}/gi, function (t) { - return "%26%23" + parseInt(t.slice(2), 16) + "%3B"; - }); - for (var u = "", f = 0; f < i.length; ++f) { - var a = i.charCodeAt(f); - 45 === a || - 46 === a || - 95 === a || - 126 === a || - (a >= 48 && a <= 57) || - (a >= 65 && a <= 90) || - (a >= 97 && a <= 122) || - (o === l.RFC1738 && (40 === a || 41 === a)) - ? (u += i.charAt(f)) - : a < 128 - ? (u += p[a]) - : a < 2048 - ? (u += p[192 | (a >> 6)] + p[128 | (63 & a)]) - : a < 55296 || a >= 57344 - ? (u += - p[224 | (a >> 12)] + - p[128 | ((a >> 6) & 63)] + - p[128 | (63 & a)]) - : ((a = - 65536 + - (((1023 & a) << 10) | - (1023 & i.charCodeAt((f += 1))))), - (u += - p[240 | (a >> 18)] + - p[128 | ((a >> 12) & 63)] + - p[128 | ((a >> 6) & 63)] + - p[128 | (63 & a)])); - } - return u; - }, - isBuffer: function (t) { - return !( - !t || - "object" != typeof t || - !( - t.constructor && - t.constructor.isBuffer && - t.constructor.isBuffer(t) - ) - ); - }, - isRegExp: function (t) { - return "[object RegExp]" === Object.prototype.toString.call(t); - }, - maybeMap: function (t, r) { - if (v(t)) { - for (var n = [], e = 0; e < t.length; e += 1) n.push(r(t[e])); - return n; - } - return r(t); - }, - merge: function t(r, n, e) { - if (!n) return r; - if ("object" != typeof n) { - if (v(r)) r.push(n); - else { - if (!r || "object" != typeof r) return [r, n]; - ((e && (e.plainObjects || e.allowPrototypes)) || - !s.call(Object.prototype, n)) && - (r[n] = !0); - } - return r; - } - if (!r || "object" != typeof r) return [r].concat(n); - var o = r; - return ( - v(r) && !v(n) && (o = y(r, e)), - v(r) && v(n) - ? (n.forEach(function (n, o) { - if (s.call(r, o)) { - var i = r[o]; - i && - "object" == typeof i && - n && - "object" == typeof n - ? (r[o] = t(i, n, e)) - : r.push(n); - } else r[o] = n; - }), - r) - : Object.keys(n).reduce(function (r, o) { - var i = n[o]; - return (r[o] = s.call(r, o) ? t(r[o], i, e) : i), r; - }, o) - ); - }, - }, - b = Object.prototype.hasOwnProperty, - h = { - brackets: function (t) { - return t + "[]"; - }, - comma: "comma", - indices: function (t, r) { - return t + "[" + r + "]"; - }, - repeat: function (t) { - return t; - }, - }, - m = Array.isArray, - g = String.prototype.split, - j = Array.prototype.push, - w = function (t, r) { - j.apply(t, m(r) ? r : [r]); - }, - O = Date.prototype.toISOString, - E = l.default, - R = { - addQueryPrefix: !1, - allowDots: !1, - charset: "utf-8", - charsetSentinel: !1, - delimiter: "&", - encode: !0, - encoder: d.encode, - encodeValuesOnly: !1, - format: E, - formatter: l.formatters[E], - indices: !1, - serializeDate: function (t) { - return O.call(t); - }, - skipNulls: !1, - strictNullHandling: !1, - }, - S = function t(r, n, e, o, i, u, f, a, c, l, s, v, p, y) { - var b, - h = r; - if ( - ("function" == typeof f - ? (h = f(n, h)) - : h instanceof Date - ? (h = l(h)) - : "comma" === e && - m(h) && - (h = d.maybeMap(h, function (t) { - return t instanceof Date ? l(t) : t; - })), - null === h) - ) { - if (o) return u && !p ? u(n, R.encoder, y, "key", s) : n; - h = ""; - } - if ( - "string" == typeof (b = h) || - "number" == typeof b || - "boolean" == typeof b || - "symbol" == typeof b || - "bigint" == typeof b || - d.isBuffer(h) - ) { - if (u) { - var j = p ? n : u(n, R.encoder, y, "key", s); - if ("comma" === e && p) { - for ( - var O = g.call(String(h), ","), E = "", S = 0; - S < O.length; - ++S - ) - E += - (0 === S ? "" : ",") + - v(u(O[S], R.encoder, y, "value", s)); - return [v(j) + "=" + E]; - } - return [v(j) + "=" + v(u(h, R.encoder, y, "value", s))]; - } - return [v(n) + "=" + v(String(h))]; - } - var k, - x = []; - if (void 0 === h) return x; - if ("comma" === e && m(h)) - k = [{ value: h.length > 0 ? h.join(",") || null : void 0 }]; - else if (m(f)) k = f; - else { - var C = Object.keys(h); - k = a ? C.sort(a) : C; - } - for (var N = 0; N < k.length; ++N) { - var T = k[N], - F = "object" == typeof T && void 0 !== T.value ? T.value : h[T]; - if (!i || null !== F) { - var D = m(h) - ? "function" == typeof e - ? e(n, T) - : n - : n + (c ? "." + T : "[" + T + "]"); - w(x, t(F, D, e, o, i, u, f, a, c, l, s, v, p, y)); - } - } - return x; - }, - k = Object.prototype.hasOwnProperty, - x = Array.isArray, - C = { - allowDots: !1, - allowPrototypes: !1, - arrayLimit: 20, - charset: "utf-8", - charsetSentinel: !1, - comma: !1, - decoder: d.decode, - delimiter: "&", - depth: 5, - ignoreQueryPrefix: !1, - interpretNumericEntities: !1, - parameterLimit: 1e3, - parseArrays: !0, - plainObjects: !1, - strictNullHandling: !1, - }, - N = function (t) { - return t.replace(/&#(\d+);/g, function (t, r) { - return String.fromCharCode(parseInt(r, 10)); - }); - }, - T = function (t, r) { - return t && "string" == typeof t && r.comma && t.indexOf(",") > -1 - ? t.split(",") - : t; - }, - F = function (t, r, n, e) { - if (t) { - var o = n.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, - i = /(\[[^[\]]*])/g, - u = n.depth > 0 && /(\[[^[\]]*])/.exec(o), - f = u ? o.slice(0, u.index) : o, - a = []; - if (f) { - if ( - !n.plainObjects && - k.call(Object.prototype, f) && - !n.allowPrototypes - ) - return; - a.push(f); - } - for ( - var c = 0; - n.depth > 0 && null !== (u = i.exec(o)) && c < n.depth; - - ) { - if ( - ((c += 1), - !n.plainObjects && - k.call(Object.prototype, u[1].slice(1, -1)) && - !n.allowPrototypes) - ) - return; - a.push(u[1]); - } - return ( - u && a.push("[" + o.slice(u.index) + "]"), - (function (t, r, n, e) { - for ( - var o = e ? r : T(r, n), i = t.length - 1; - i >= 0; - --i - ) { - var u, - f = t[i]; - if ("[]" === f && n.parseArrays) u = [].concat(o); - else { - u = n.plainObjects ? Object.create(null) : {}; - var a = - "[" === f.charAt(0) && - "]" === f.charAt(f.length - 1) - ? f.slice(1, -1) - : f, - c = parseInt(a, 10); - n.parseArrays || "" !== a - ? !isNaN(c) && - f !== a && - String(c) === a && - c >= 0 && - n.parseArrays && - c <= n.arrayLimit - ? ((u = [])[c] = o) - : "__proto__" !== a && (u[a] = o) - : (u = { 0: o }); - } - o = u; - } - return o; - })(a, r, n, e) - ); - } - }, - D = function (t, r) { - var n = (function (t) { - if (!t) return C; - if (null != t.decoder && "function" != typeof t.decoder) - throw new TypeError("Decoder has to be a function."); - if ( - void 0 !== t.charset && - "utf-8" !== t.charset && - "iso-8859-1" !== t.charset - ) - throw new TypeError( - "The charset option must be either utf-8, iso-8859-1, or undefined" - ); - return { - allowDots: void 0 === t.allowDots ? C.allowDots : !!t.allowDots, - allowPrototypes: - "boolean" == typeof t.allowPrototypes - ? t.allowPrototypes - : C.allowPrototypes, - arrayLimit: - "number" == typeof t.arrayLimit - ? t.arrayLimit - : C.arrayLimit, - charset: void 0 === t.charset ? C.charset : t.charset, - charsetSentinel: - "boolean" == typeof t.charsetSentinel - ? t.charsetSentinel - : C.charsetSentinel, - comma: "boolean" == typeof t.comma ? t.comma : C.comma, - decoder: "function" == typeof t.decoder ? t.decoder : C.decoder, - delimiter: - "string" == typeof t.delimiter || d.isRegExp(t.delimiter) - ? t.delimiter - : C.delimiter, - depth: - "number" == typeof t.depth || !1 === t.depth - ? +t.depth - : C.depth, - ignoreQueryPrefix: !0 === t.ignoreQueryPrefix, - interpretNumericEntities: - "boolean" == typeof t.interpretNumericEntities - ? t.interpretNumericEntities - : C.interpretNumericEntities, - parameterLimit: - "number" == typeof t.parameterLimit - ? t.parameterLimit - : C.parameterLimit, - parseArrays: !1 !== t.parseArrays, - plainObjects: - "boolean" == typeof t.plainObjects - ? t.plainObjects - : C.plainObjects, - strictNullHandling: - "boolean" == typeof t.strictNullHandling - ? t.strictNullHandling - : C.strictNullHandling, - }; - })(r); - if ("" === t || null == t) - return n.plainObjects ? Object.create(null) : {}; - for ( - var e = - "string" == typeof t - ? (function (t, r) { - var n, - e = {}, - o = ( - r.ignoreQueryPrefix - ? t.replace(/^\?/, "") - : t - ).split( - r.delimiter, - Infinity === r.parameterLimit - ? void 0 - : r.parameterLimit - ), - i = -1, - u = r.charset; - if (r.charsetSentinel) - for (n = 0; n < o.length; ++n) - 0 === o[n].indexOf("utf8=") && - ("utf8=%E2%9C%93" === o[n] - ? (u = "utf-8") - : "utf8=%26%2310003%3B" === - o[n] && (u = "iso-8859-1"), - (i = n), - (n = o.length)); - for (n = 0; n < o.length; ++n) - if (n !== i) { - var f, - a, - c = o[n], - l = c.indexOf("]="), - s = -1 === l ? c.indexOf("=") : l + 1; - -1 === s - ? ((f = r.decoder( - c, - C.decoder, - u, - "key" - )), - (a = r.strictNullHandling - ? null - : "")) - : ((f = r.decoder( - c.slice(0, s), - C.decoder, - u, - "key" - )), - (a = d.maybeMap( - T(c.slice(s + 1), r), - function (t) { - return r.decoder( - t, - C.decoder, - u, - "value" - ); - } - ))), - a && - r.interpretNumericEntities && - "iso-8859-1" === u && - (a = N(a)), - c.indexOf("[]=") > -1 && - (a = x(a) ? [a] : a), - (e[f] = k.call(e, f) - ? d.combine(e[f], a) - : a); - } - return e; - })(t, n) - : t, - o = n.plainObjects ? Object.create(null) : {}, - i = Object.keys(e), - u = 0; - u < i.length; - ++u - ) { - var f = i[u], - a = F(f, e[f], n, "string" == typeof t); - o = d.merge(o, a, n); - } - return d.compact(o); - }, - I = /*#__PURE__*/ (function () { - function t(t, r, n) { - var e, o; - (this.name = t), - (this.definition = r), - (this.bindings = null != (e = r.bindings) ? e : {}), - (this.wheres = null != (o = r.wheres) ? o : {}), - (this.config = n); - } - var n = t.prototype; - return ( - (n.matchesUrl = function (t) { - var r = this; - if (!this.definition.methods.includes("GET")) return !1; - var n = this.template - .replace( - /(\/?){([^}?]*)(\??)}/g, - function (t, n, e, o) { - var i, - u = - "(?<" + - e + - ">" + - ((null == (i = r.wheres[e]) - ? void 0 - : i.replace(/(^\^)|(\$$)/g, "")) || - "[^/?]+") + - ")"; - return o ? "(" + n + u + ")?" : "" + n + u; - } - ) - .replace(/^\w+:\/\//, ""), - e = t.replace(/^\w+:\/\//, "").split("?"), - o = e[0], - i = e[1], - u = new RegExp("^" + n + "/?$").exec(o); - if (u) { - for (var f in u.groups) - u.groups[f] = - "string" == typeof u.groups[f] - ? decodeURIComponent(u.groups[f]) - : u.groups[f]; - return { params: u.groups, query: D(i) }; - } - return !1; - }), - (n.compile = function (t) { - var r = this, - n = this.parameterSegments; - return n.length - ? this.template - .replace(/{([^}?]+)(\??)}/g, function (e, o, i) { - var u, f, a; - if (!i && [null, void 0].includes(t[o])) - throw new Error( - "Ziggy error: '" + - o + - "' parameter is required for route '" + - r.name + - "'." - ); - if ( - n[n.length - 1].name === o && - ".*" === r.wheres[o] - ) - return encodeURIComponent( - null != (a = t[o]) ? a : "" - ).replace(/%2F/g, "/"); - if ( - r.wheres[o] && - !new RegExp( - "^" + - (i - ? "(" + r.wheres[o] + ")?" - : r.wheres[o]) + - "$" - ).test(null != (u = t[o]) ? u : "") - ) - throw new Error( - "Ziggy error: '" + - o + - "' parameter does not match required format '" + - r.wheres[o] + - "' for route '" + - r.name + - "'." - ); - return encodeURIComponent( - null != (f = t[o]) ? f : "" - ); - }) - .replace(this.origin + "//", this.origin + "/") - .replace(/\/+$/, "") - : this.template; - }), - r(t, [ - { - key: "template", - get: function () { - return ( - this.origin + - "/" + - this.definition.uri - ).replace(/\/+$/, ""); - }, - }, - { - key: "origin", - get: function () { - return this.config.absolute - ? this.definition.domain - ? "" + - this.config.url.match(/^\w+:\/\//)[0] + - this.definition.domain + - (this.config.port - ? ":" + this.config.port - : "") - : this.config.url - : ""; - }, - }, - { - key: "parameterSegments", - get: function () { - var t, r; - return null != - (t = - null == - (r = this.template.match(/{[^}?]+\??}/g)) - ? void 0 - : r.map(function (t) { - return { - name: t.replace(/{|\??}/g, ""), - required: !/\?}$/.test(t), - }; - })) - ? t - : []; - }, - }, - ]), - t - ); - })(), - $ = /*#__PURE__*/ (function (t) { - var e, i; - function u(r, e, o, i) { - var u; - if ( - (void 0 === o && (o = !0), - ((u = t.call(this) || this).t = - null != i - ? i - : "undefined" != typeof Ziggy - ? Ziggy - : null == globalThis - ? void 0 - : globalThis.Ziggy), - (u.t = n({}, u.t, { absolute: o })), - r) - ) { - if (!u.t.routes[r]) - throw new Error( - "Ziggy error: route '" + - r + - "' is not in the route list." - ); - (u.i = new I(r, u.t.routes[r], u.t)), (u.u = u.l(e)); - } - return u; - } - (i = t), - ((e = u).prototype = Object.create(i.prototype)), - (e.prototype.constructor = e), - o(e, i); - var f = u.prototype; - return ( - (f.toString = function () { - var t = this, - r = Object.keys(this.u) - .filter(function (r) { - return !t.i.parameterSegments.some(function (t) { - return t.name === r; - }); - }) - .filter(function (t) { - return "_query" !== t; - }) - .reduce(function (r, e) { - var o; - return n({}, r, (((o = {})[e] = t.u[e]), o)); - }, {}); - return ( - this.i.compile(this.u) + - (function (t, r) { - var n, - e = t, - o = (function (t) { - if (!t) return R; - if ( - null != t.encoder && - "function" != typeof t.encoder - ) - throw new TypeError( - "Encoder has to be a function." - ); - var r = t.charset || R.charset; - if ( - void 0 !== t.charset && - "utf-8" !== t.charset && - "iso-8859-1" !== t.charset - ) - throw new TypeError( - "The charset option must be either utf-8, iso-8859-1, or undefined" - ); - var n = l.default; - if (void 0 !== t.format) { - if (!b.call(l.formatters, t.format)) - throw new TypeError( - "Unknown format option provided." - ); - n = t.format; - } - var e = l.formatters[n], - o = R.filter; - return ( - ("function" == typeof t.filter || - m(t.filter)) && - (o = t.filter), - { - addQueryPrefix: - "boolean" == typeof t.addQueryPrefix - ? t.addQueryPrefix - : R.addQueryPrefix, - allowDots: - void 0 === t.allowDots - ? R.allowDots - : !!t.allowDots, - charset: r, - charsetSentinel: - "boolean" == - typeof t.charsetSentinel - ? t.charsetSentinel - : R.charsetSentinel, - delimiter: - void 0 === t.delimiter - ? R.delimiter - : t.delimiter, - encode: - "boolean" == typeof t.encode - ? t.encode - : R.encode, - encoder: - "function" == typeof t.encoder - ? t.encoder - : R.encoder, - encodeValuesOnly: - "boolean" == - typeof t.encodeValuesOnly - ? t.encodeValuesOnly - : R.encodeValuesOnly, - filter: o, - format: n, - formatter: e, - serializeDate: - "function" == typeof t.serializeDate - ? t.serializeDate - : R.serializeDate, - skipNulls: - "boolean" == typeof t.skipNulls - ? t.skipNulls - : R.skipNulls, - sort: - "function" == typeof t.sort - ? t.sort - : null, - strictNullHandling: - "boolean" == - typeof t.strictNullHandling - ? t.strictNullHandling - : R.strictNullHandling, - } - ); - })(r); - "function" == typeof o.filter - ? (e = (0, o.filter)("", e)) - : m(o.filter) && (n = o.filter); - var i = []; - if ("object" != typeof e || null === e) return ""; - var u = - h[ - r && r.arrayFormat in h - ? r.arrayFormat - : r && "indices" in r - ? r.indices - ? "indices" - : "repeat" - : "indices" - ]; - n || (n = Object.keys(e)), o.sort && n.sort(o.sort); - for (var f = 0; f < n.length; ++f) { - var a = n[f]; - (o.skipNulls && null === e[a]) || - w( - i, - S( - e[a], - a, - u, - o.strictNullHandling, - o.skipNulls, - o.encode ? o.encoder : null, - o.filter, - o.sort, - o.allowDots, - o.serializeDate, - o.format, - o.formatter, - o.encodeValuesOnly, - o.charset - ) - ); - } - var c = i.join(o.delimiter), - s = !0 === o.addQueryPrefix ? "?" : ""; - return ( - o.charsetSentinel && - (s += - "iso-8859-1" === o.charset - ? "utf8=%26%2310003%3B&" - : "utf8=%E2%9C%93&"), - c.length > 0 ? s + c : "" - ); - })(n({}, r, this.u._query), { - addQueryPrefix: !0, - arrayFormat: "indices", - encodeValuesOnly: !0, - skipNulls: !0, - encoder: function (t, r) { - return "boolean" == typeof t ? Number(t) : r(t); - }, - }) - ); - }), - (f.v = function (t) { - var r = this; - t - ? this.t.absolute && - t.startsWith("/") && - (t = this.p().host + t) - : (t = this.h()); - var e = {}, - o = Object.entries(this.t.routes).find(function (n) { - return (e = new I(n[0], n[1], r.t).matchesUrl(t)); - }) || [void 0, void 0]; - return n({ name: o[0] }, e, { route: o[1] }); - }), - (f.h = function () { - var t = this.p(), - r = t.pathname, - n = t.search; - return ( - (this.t.absolute - ? t.host + r - : r - .replace( - this.t.url.replace(/^\w*:\/\/[^/]+/, ""), - "" - ) - .replace(/^\/+/, "/")) + n - ); - }), - (f.current = function (t, r) { - var e = this.v(), - o = e.name, - i = e.params, - u = e.query, - f = e.route; - if (!t) return o; - var a = new RegExp( - "^" + t.replace(/\./g, "\\.").replace(/\*/g, ".*") + "$" - ).test(o); - if ([null, void 0].includes(r) || !a) return a; - var c = new I(o, f, this.t); - r = this.l(r, c); - var l = n({}, i, u); - return ( - !( - !Object.values(r).every(function (t) { - return !t; - }) || - Object.values(l).some(function (t) { - return void 0 !== t; - }) - ) || - Object.entries(r).every(function (t) { - return l[t[0]] == t[1]; - }) - ); - }), - (f.p = function () { - var t, - r, - n, - e, - o, - i, - u = "undefined" != typeof window ? window.location : {}, - f = u.host, - a = u.pathname, - c = u.search; - return { - host: - null != - (t = null == (r = this.t.location) ? void 0 : r.host) - ? t - : void 0 === f - ? "" - : f, - pathname: - null != - (n = - null == (e = this.t.location) ? void 0 : e.pathname) - ? n - : void 0 === a - ? "" - : a, - search: - null != - (o = null == (i = this.t.location) ? void 0 : i.search) - ? o - : void 0 === c - ? "" - : c, - }; - }), - (f.has = function (t) { - return Object.keys(this.t.routes).includes(t); - }), - (f.l = function (t, r) { - var e = this; - void 0 === t && (t = {}), - void 0 === r && (r = this.i), - null != t || (t = {}), - (t = ["string", "number"].includes(typeof t) ? [t] : t); - var o = r.parameterSegments.filter(function (t) { - return !e.t.defaults[t.name]; - }); - if (Array.isArray(t)) - t = t.reduce(function (t, r, e) { - var i, u; - return n( - {}, - t, - o[e] - ? (((i = {})[o[e].name] = r), i) - : "object" == typeof r - ? r - : (((u = {})[r] = ""), u) - ); - }, {}); - else if ( - 1 === o.length && - !t[o[0].name] && - (t.hasOwnProperty(Object.values(r.bindings)[0]) || - t.hasOwnProperty("id")) - ) { - var i; - ((i = {})[o[0].name] = t), (t = i); - } - return n({}, this.m(r), this.g(t, r)); - }), - (f.m = function (t) { - var r = this; - return t.parameterSegments - .filter(function (t) { - return r.t.defaults[t.name]; - }) - .reduce(function (t, e, o) { - var i, - u = e.name; - return n({}, t, (((i = {})[u] = r.t.defaults[u]), i)); - }, {}); - }), - (f.g = function (t, r) { - var e = r.bindings, - o = r.parameterSegments; - return Object.entries(t).reduce(function (t, r) { - var i, - u, - f = r[0], - a = r[1]; - if ( - !a || - "object" != typeof a || - Array.isArray(a) || - !o.some(function (t) { - return t.name === f; - }) - ) - return n({}, t, (((u = {})[f] = a), u)); - if (!a.hasOwnProperty(e[f])) { - if (!a.hasOwnProperty("id")) - throw new Error( - "Ziggy error: object passed as '" + - f + - "' parameter is missing route model binding key '" + - e[f] + - "'." - ); - e[f] = "id"; - } - return n({}, t, (((i = {})[f] = a[e[f]]), i)); - }, {}); - }), - (f.valueOf = function () { - return this.toString(); - }), - (f.check = function (t) { - return this.has(t); - }), - r(u, [ - { - key: "params", - get: function () { - var t = this.v(); - return n({}, t.params, t.query); - }, - }, - ]), - u - ); - })(/*#__PURE__*/ f(String)), - A = { - install: function (t, r) { - var n = function (t, n, e, o) { - return ( - void 0 === o && (o = r), - (function (t, r, n, e) { - var o = new $(t, r, n, e); - return t ? o.toString() : o; - })(t, n, e, o) - ); - }; - t.mixin({ methods: { route: n } }), - parseInt(t.version) > 2 && t.provide("route", n); - }, - }; -export { A as ZiggyVue }; +function t(t,r){for(var n=0;n1;){var r=t.pop(),n=r.obj[r.prop];if(v(n)){for(var e=[],o=0;o=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||o===l.RFC1738&&(40===a||41===a)?u+=i.charAt(f):a<128?u+=p[a]:a<2048?u+=p[192|a>>6]+p[128|63&a]:a<55296||a>=57344?u+=p[224|a>>12]+p[128|a>>6&63]+p[128|63&a]:(a=65536+((1023&a)<<10|1023&i.charCodeAt(f+=1)),u+=p[240|a>>18]+p[128|a>>12&63]+p[128|a>>6&63]+p[128|63&a])}return u},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,r){if(v(t)){for(var n=[],e=0;e0?h.join(",")||null:void 0}];else if(m(f))k=f;else{var T=Object.keys(h);k=a?T.sort(a):T}for(var C=0;C-1?t.split(","):t},D=function(t,r,n,e){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),f=u?o.slice(0,u.index):o,a=[];if(f){if(!n.plainObjects&&k.call(Object.prototype,f)&&!n.allowPrototypes)return;a.push(f)}for(var c=0;n.depth>0&&null!==(u=i.exec(o))&&c=0;--i){var u,f=t[i];if("[]"===f&&n.parseArrays)u=[].concat(o);else{u=n.plainObjects?Object.create(null):{};var a="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,c=parseInt(a,10);n.parseArrays||""!==a?!isNaN(c)&&f!==a&&String(c)===a&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(u=[])[c]=o:"__proto__"!==a&&(u[a]=o):u={0:o}}o=u}return o}(a,r,n,e)}},F=function(t,r){var n=function(t){if(!t)return T;if(null!=t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===t.allowDots?T.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:T.allowPrototypes,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:T.arrayLimit,charset:void 0===t.charset?T.charset:t.charset,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:T.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:T.comma,decoder:"function"==typeof t.decoder?t.decoder:T.decoder,delimiter:"string"==typeof t.delimiter||d.isRegExp(t.delimiter)?t.delimiter:T.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:T.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:T.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:T.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:T.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:T.strictNullHandling}}(r);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var e="string"==typeof t?function(t,r){var n,e={},o=(r.ignoreQueryPrefix?t.replace(/^\?/,""):t).split(r.delimiter,Infinity===r.parameterLimit?void 0:r.parameterLimit),i=-1,u=r.charset;if(r.charsetSentinel)for(n=0;n-1&&(a=x(a)?[a]:a),e[f]=k.call(e,f)?d.combine(e[f],a):a}return e}(t,n):t,o=n.plainObjects?Object.create(null):{},i=Object.keys(e),u=0;u"+((null==(i=r.wheres[e])?void 0:i.replace(/(^\^)|(\$$)/g,""))||"[^/?]+")+")";return o?"("+n+u+")?":""+n+u}).replace(/^\w+:\/\//,""),e=t.replace(/^\w+:\/\//,"").split("?"),o=e[0],i=e[1],u=new RegExp("^"+n+"/?$").exec(o);if(u){for(var f in u.groups)u.groups[f]="string"==typeof u.groups[f]?decodeURIComponent(u.groups[f]):u.groups[f];return{params:u.groups,query:F(i)}}return!1},n.compile=function(t){var r=this,n=this.parameterSegments;return n.length?this.template.replace(/{([^}?]+)(\??)}/g,function(e,o,i){var u;if(!i&&[null,void 0].includes(t[o]))throw new Error("Ziggy error: '"+o+"' parameter is required for route '"+r.name+"'.");if(r.wheres[o]){var f,a;if(!new RegExp("^"+(i?"("+r.wheres[o]+")?":r.wheres[o])+"$").test(null!=(f=t[o])?f:""))throw new Error("Ziggy error: '"+o+"' parameter does not match required format '"+r.wheres[o]+"' for route '"+r.name+"'.");if(n[n.length-1].name===o)return encodeURIComponent(null!=(a=t[o])?a:"").replace(/%2F/g,"/")}return encodeURIComponent(null!=(u=t[o])?u:"")}).replace(this.origin+"//",this.origin+"/").replace(/\/+$/,""):this.template},r(t,[{key:"template",get:function(){return(this.origin+"/"+this.definition.uri).replace(/\/+$/,"")}},{key:"origin",get:function(){return this.config.absolute?this.definition.domain?""+this.config.url.match(/^\w+:\/\//)[0]+this.definition.domain+(this.config.port?":"+this.config.port:""):this.config.url:""}},{key:"parameterSegments",get:function(){var t,r;return null!=(t=null==(r=this.template.match(/{[^}?]+\??}/g))?void 0:r.map(function(t){return{name:t.replace(/{|\??}/g,""),required:!/\?}$/.test(t)}}))?t:[]}}]),t}(),P=/*#__PURE__*/function(t){var e,i;function u(r,e,o,i){var u;if(void 0===o&&(o=!0),(u=t.call(this)||this).t=null!=i?i:"undefined"!=typeof Ziggy?Ziggy:null==globalThis?void 0:globalThis.Ziggy,u.t=n({},u.t,{absolute:o}),r){if(!u.t.routes[r])throw new Error("Ziggy error: route '"+r+"' is not in the route list.");u.i=new I(r,u.t.routes[r],u.t),u.u=u.l(e)}return u}i=t,(e=u).prototype=Object.create(i.prototype),e.prototype.constructor=e,o(e,i);var f=u.prototype;return f.toString=function(){var t=this,r=Object.keys(this.u).filter(function(r){return!t.i.parameterSegments.some(function(t){return t.name===r})}).filter(function(t){return"_query"!==t}).reduce(function(r,e){var o;return n({},r,((o={})[e]=t.u[e],o))},{});return this.i.compile(this.u)+function(t,r){var n,e=t,o=function(t){if(!t)return R;if(null!=t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var r=t.charset||R.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=l.default;if(void 0!==t.format){if(!b.call(l.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var e=l.formatters[n],o=R.filter;return("function"==typeof t.filter||m(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:R.addQueryPrefix,allowDots:void 0===t.allowDots?R.allowDots:!!t.allowDots,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:R.charsetSentinel,delimiter:void 0===t.delimiter?R.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:R.encode,encoder:"function"==typeof t.encoder?t.encoder:R.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:R.encodeValuesOnly,filter:o,format:n,formatter:e,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:R.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:R.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:R.strictNullHandling}}(r);"function"==typeof o.filter?e=(0,o.filter)("",e):m(o.filter)&&(n=o.filter);var i=[];if("object"!=typeof e||null===e)return"";var u=h[r&&r.arrayFormat in h?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices"];n||(n=Object.keys(e)),o.sort&&n.sort(o.sort);for(var f=0;f0?s+c:""}(n({},r,this.u._query),{addQueryPrefix:!0,arrayFormat:"indices",encodeValuesOnly:!0,skipNulls:!0,encoder:function(t,r){return"boolean"==typeof t?Number(t):r(t)}})},f.v=function(t){var r=this;t?this.t.absolute&&t.startsWith("/")&&(t=this.p().host+t):t=this.h();var e={},o=Object.entries(this.t.routes).find(function(n){return e=new I(n[0],n[1],r.t).matchesUrl(t)})||[void 0,void 0];return n({name:o[0]},e,{route:o[1]})},f.h=function(){var t=this.p(),r=t.pathname,n=t.search;return(this.t.absolute?t.host+r:r.replace(this.t.url.replace(/^\w*:\/\/[^/]+/,""),"").replace(/^\/+/,"/"))+n},f.current=function(t,r){var e=this.v(),o=e.name,i=e.params,u=e.query,f=e.route;if(!t)return o;var a=new RegExp("^"+t.replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o);if([null,void 0].includes(r)||!a)return a;var c=new I(o,f,this.t);r=this.l(r,c);var l=n({},i,u);return!(!Object.values(r).every(function(t){return!t})||Object.values(l).some(function(t){return void 0!==t}))||Object.entries(r).every(function(t){return l[t[0]]==t[1]})},f.p=function(){var t,r,n,e,o,i,u="undefined"!=typeof window?window.location:{},f=u.host,a=u.pathname,c=u.search;return{host:null!=(t=null==(r=this.t.location)?void 0:r.host)?t:void 0===f?"":f,pathname:null!=(n=null==(e=this.t.location)?void 0:e.pathname)?n:void 0===a?"":a,search:null!=(o=null==(i=this.t.location)?void 0:i.search)?o:void 0===c?"":c}},f.has=function(t){return Object.keys(this.t.routes).includes(t)},f.l=function(t,r){var e=this;void 0===t&&(t={}),void 0===r&&(r=this.i),null!=t||(t={}),t=["string","number"].includes(typeof t)?[t]:t;var o=r.parameterSegments.filter(function(t){return!e.t.defaults[t.name]});if(Array.isArray(t))t=t.reduce(function(t,r,e){var i,u;return n({},t,o[e]?((i={})[o[e].name]=r,i):"object"==typeof r?r:((u={})[r]="",u))},{});else if(1===o.length&&!t[o[0].name]&&(t.hasOwnProperty(Object.values(r.bindings)[0])||t.hasOwnProperty("id"))){var i;(i={})[o[0].name]=t,t=i}return n({},this.m(r),this.g(t,r))},f.m=function(t){var r=this;return t.parameterSegments.filter(function(t){return r.t.defaults[t.name]}).reduce(function(t,e,o){var i,u=e.name;return n({},t,((i={})[u]=r.t.defaults[u],i))},{})},f.g=function(t,r){var e=r.bindings,o=r.parameterSegments;return Object.entries(t).reduce(function(t,r){var i,u,f=r[0],a=r[1];if(!a||"object"!=typeof a||Array.isArray(a)||!o.some(function(t){return t.name===f}))return n({},t,((u={})[f]=a,u));if(!a.hasOwnProperty(e[f])){if(!a.hasOwnProperty("id"))throw new Error("Ziggy error: object passed as '"+f+"' parameter is missing route model binding key '"+e[f]+"'.");e[f]="id"}return n({},t,((i={})[f]=a[e[f]],i))},{})},f.valueOf=function(){return this.toString()},f.check=function(t){return this.has(t)},r(u,[{key:"params",get:function(){var t=this.v();return n({},t.params,t.query)}}]),u}(/*#__PURE__*/u(String)),$={install:function(t,r){var n=function(t,n,e,o){return void 0===o&&(o=r),function(t,r,n,e){var o=new P(t,r,n,e);return t?o.toString():o}(t,n,e,o)};t.mixin({methods:{route:n}}),parseInt(t.version)>2&&t.provide("route",n)}};export{$ as ZiggyVue}; From 786bedc6e4b06c95dd3ae3e4a38ca2febd8a0b8f Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 13:58:33 -0400 Subject: [PATCH 09/56] Remove Vite plugin --- src/js/vite-plugin.ts | 97 ------------------------------------------- 1 file changed, 97 deletions(-) delete mode 100644 src/js/vite-plugin.ts diff --git a/src/js/vite-plugin.ts b/src/js/vite-plugin.ts deleted file mode 100644 index b7d4f84f..00000000 --- a/src/js/vite-plugin.ts +++ /dev/null @@ -1,97 +0,0 @@ - -import { ChildProcess, exec } from 'child_process'; -import { existsSync } from 'fs'; -import { relative, resolve } from 'path'; -import colors from 'picocolors'; -import picomatch from 'picomatch'; -import { Plugin, normalizePath } from 'vite'; - -export interface ZiggyPluginConfig { - /** - * Issue the command using laravel sail. Use 'auto' to automatically determine if sails is available and running. - */ - sail?: boolean | 'auto', - /** - * Whether to output TS declarations. Use 'only' to emit only declartion and no routes file. - */ - declarations?: boolean | 'only' - /** - * Destination path where ziggy output files should be placed. - */ - destination?: string, - log?: boolean, - delay?: number, -} - -export default function ZiggyPlugin(config: ZiggyPluginConfig): Plugin { - const { log = true, delay = 0, destination, declarations } = config; - let { sail } = config; - const root = process.cwd(); - - const commandArgs = `artisan ziggy:generate ${destination} ${declarations ? declarations === 'only' ? '-T' : '-t' : ''}`; - let proc: ChildProcess | null = null; - - function command(): Promise { - if (proc) { - proc.kill('SIGINT'); - } - - return new Promise((done, reject) => { - if (sail) { - if (existsSync(resolve(root, 'vendor/bin/sail'))) { - proc = exec(`vendor/bin/sail ${commandArgs}`); - proc.on('close', (code, signal) => { - proc = null; - }); - } else { - sail = false; - return command(); - } - } else { - proc = exec(`php ${commandArgs}`); - } - proc.on('close', (code, signal) => { - if (code === 0) { - proc = null; - done(); - } - }); - proc.on('error', (error) => { - reject(error) - }) - }) - } - - return { - name: 'ziggy-plugin', - enforce: 'pre', - - // NOTE: Enable globbing so that Vite keeps track of the template files. - config: () => ({ server: { watch: { disableGlobbing: false } } }), - configureServer(server) { - const files = normalizePath(resolve(root, 'routes/**')); - - command(); - - const shouldReload = picomatch(files); - const checkReload = (path) => { - if (shouldReload(path)) { - setTimeout(command, delay); - if (log) { - server.config.logger.info(`${colors.green(`${relative(root, path)} changed, regenarating ziggy file.`)}`, { clear: true, timestamp: true }); - } - } - }; - - // Ensure Vite keeps track of the files and triggers generation as needed. - server.watcher.add(files); - - // Perform a generation if any of the watched files changes. - server.watcher.on('add', checkReload); - server.watcher.on('change', checkReload); - }, - buildStart() { - command(); - } - }; -} From 670bff7b241b525b17d803a05aa177122e9a3eb4 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 15:31:20 -0400 Subject: [PATCH 10/56] Revert TypeScript --- package-lock.json | 750 +--------------------- package.json | 47 +- src/js/Route.js | 121 ++++ src/js/Route.ts | 152 ----- src/js/{Router.ts => Router.js} | 105 ++- src/js/index.js | 7 + src/js/{vue.ts => vue.js} | 0 tests/js/{route.test.ts => route.test.js} | 0 8 files changed, 187 insertions(+), 995 deletions(-) create mode 100644 src/js/Route.js delete mode 100644 src/js/Route.ts rename src/js/{Router.ts => Router.js} (71%) create mode 100644 src/js/index.js rename src/js/{vue.ts => vue.js} (100%) rename tests/js/{route.test.ts => route.test.js} (100%) diff --git a/package-lock.json b/package-lock.json index 66e46cd0..3f283acb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,16 +12,11 @@ "qs": "~6.9.7" }, "devDependencies": { - "@swc/core": "^1.3.71", - "@swc/jest": "^0.2.27", - "@types/jest": "^29.5.3", - "@types/qs": "^6.9.7", "babel-preset-power-assert": "^3.0.0", - "jest": "^29.6.2", + "jest": "^29.0.3", "jest-environment-jsdom": "^29.0.3", "microbundle": "^0.15.1", - "power-assert": "^1.6.1", - "vite": "^4.4.7" + "power-assert": "^1.6.1" } }, "node_modules/@ampproject/remapping": { @@ -1966,358 +1961,6 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@esbuild/android-arm": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.17.tgz", - "integrity": "sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz", - "integrity": "sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.17.tgz", - "integrity": "sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz", - "integrity": "sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz", - "integrity": "sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz", - "integrity": "sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz", - "integrity": "sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz", - "integrity": "sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz", - "integrity": "sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz", - "integrity": "sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz", - "integrity": "sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz", - "integrity": "sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz", - "integrity": "sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz", - "integrity": "sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz", - "integrity": "sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz", - "integrity": "sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz", - "integrity": "sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz", - "integrity": "sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz", - "integrity": "sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz", - "integrity": "sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz", - "integrity": "sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz", - "integrity": "sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -2407,43 +2050,6 @@ } } }, - "node_modules/@jest/create-cache-key-function": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz", - "integrity": "sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==", - "dev": true, - "dependencies": { - "@jest/types": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/create-cache-key-function/node_modules/@types/yargs": { - "version": "16.0.5", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", - "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, "node_modules/@jest/environment": { "version": "29.6.2", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.2.tgz", @@ -2641,12 +2247,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, "node_modules/@jest/types": { "version": "29.6.1", "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.1.tgz", @@ -2878,216 +2478,6 @@ "string.prototype.matchall": "^4.0.6" } }, - "node_modules/@swc/core": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.71.tgz", - "integrity": "sha512-T8dqj+SV/S8laW/FGmKHhCGw1o4GRUvJ2jHfbYgEwiJpeutT9uavHvG02t39HJvObBJ52EZs/krGtni4U5928Q==", - "dev": true, - "hasInstallScript": true, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.3.71", - "@swc/core-darwin-x64": "1.3.71", - "@swc/core-linux-arm-gnueabihf": "1.3.71", - "@swc/core-linux-arm64-gnu": "1.3.71", - "@swc/core-linux-arm64-musl": "1.3.71", - "@swc/core-linux-x64-gnu": "1.3.71", - "@swc/core-linux-x64-musl": "1.3.71", - "@swc/core-win32-arm64-msvc": "1.3.71", - "@swc/core-win32-ia32-msvc": "1.3.71", - "@swc/core-win32-x64-msvc": "1.3.71" - }, - "peerDependencies": { - "@swc/helpers": "^0.5.0" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.71.tgz", - "integrity": "sha512-xOm0hDbcO2ShwQu1CjLtq3fwrG9AvhuE0s8vtBc8AsamYExHmR8bo6GQHJUtfPG1FVPk5a8xoQSd1fs09FQjLg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.71.tgz", - "integrity": "sha512-9sbDXBWgM22w/3Ll5kPhXMPkOiHRoqwMOyxLJBfGtIMnFlh5O+NRN3umRerK3pe4Q6/7hj2M5V+crEHYrXmuxg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.71.tgz", - "integrity": "sha512-boKdMZsfKvhBs0FDeqH7KQj0lfYe0wCtrL1lv50oYMEeLajY9o4U5xSmc61Sg4HRXjlbR6dlM2cFfL84t7NpAA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.71.tgz", - "integrity": "sha512-yDatyHYMiOVwhyIA/LBwknPs2CUtLYWEMzPZjgLc+56PbgPs3oiEbNWeVUND5onPrfDQgK7NK1y8JeiXZqTgGQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.71.tgz", - "integrity": "sha512-xAdCA0L/hoa0ULL5SR4sMZCxkWk7C90DOU7wJalNVG9qNWYICfq3G7AR0E9Ohphzqyahfb5QJED/nA7N0+XwbQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.71.tgz", - "integrity": "sha512-j94qLXP/yqhu2afnABAq/xrJIU8TEqcNkp1TlsAeO3R2nVLYL1w4XX8GW71SPnXmd2bwF102c3Cfv/2ilf2y2A==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-musl": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.71.tgz", - "integrity": "sha512-YiyU848ql6dLlmt0BHccGAaZ36Cf61VzCAMDKID/gd72snvzWcMCHrwSRW0gEFNXHsjBJrmNl+SLYZHfqoGwUA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.71.tgz", - "integrity": "sha512-1UsJ+6hnIRe/PVdgDPexvgGaN4KpBncT/bAOqlWc9XC7KeBXAWcGA08LrPUz2Ei00DJXzR622IGZVEYOHNkUOw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.71.tgz", - "integrity": "sha512-KnuI89+zojR9lDFELdQYZpxzPZ6pBfLwJfWTSGatnpL1ZHhIsV3tK1jwqIdJK1zkRxpBwc6p6FzSZdZwCSpnJw==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.3.71", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.71.tgz", - "integrity": "sha512-Pcw7fFirpaBOZsU8fhO48ZCb7NxIjuLnLRPrHqWQ4Mapx1+w9ZNdGya2DKP9n8EAiUrJO20WDsrBNMT2MQSWkA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/jest": { - "version": "0.2.27", - "resolved": "https://registry.npmjs.org/@swc/jest/-/jest-0.2.27.tgz", - "integrity": "sha512-Xt8EJ6Wy0NYVL8KDPcDMsuUSzyV2UAByamyy28x2iDZCJw2eVz3acedCGBYxxlPR/DNr6QbA35OSymuXhC9QVA==", - "dev": true, - "dependencies": { - "@jest/create-cache-key-function": "^27.4.2", - "jsonc-parser": "^3.2.0" - }, - "engines": { - "npm": ">= 7.0.0" - }, - "peerDependencies": { - "@swc/core": "*" - } - }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -3186,16 +2576,6 @@ "@types/istanbul-lib-report": "*" } }, - "node_modules/@types/jest": { - "version": "29.5.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.3.tgz", - "integrity": "sha512-1Nq7YrO/vJE/FYnqYyw0FS8LdrjExSgIiHyKg7xPpn+yi8Q4huZryKnkJatN1ZRH89Kw2v33/8ZMB7DuZeSLlA==", - "dev": true, - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, "node_modules/@types/jsdom": { "version": "20.0.1", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", @@ -3219,12 +2599,6 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, - "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "dev": true - }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -4017,6 +3391,12 @@ "node": ">=0.10.0" } }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/core-js": { "version": "2.6.12", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", @@ -4641,43 +4021,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/esbuild": { - "version": "0.18.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.17.tgz", - "integrity": "sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.17", - "@esbuild/android-arm64": "0.18.17", - "@esbuild/android-x64": "0.18.17", - "@esbuild/darwin-arm64": "0.18.17", - "@esbuild/darwin-x64": "0.18.17", - "@esbuild/freebsd-arm64": "0.18.17", - "@esbuild/freebsd-x64": "0.18.17", - "@esbuild/linux-arm": "0.18.17", - "@esbuild/linux-arm64": "0.18.17", - "@esbuild/linux-ia32": "0.18.17", - "@esbuild/linux-loong64": "0.18.17", - "@esbuild/linux-mips64el": "0.18.17", - "@esbuild/linux-ppc64": "0.18.17", - "@esbuild/linux-riscv64": "0.18.17", - "@esbuild/linux-s390x": "0.18.17", - "@esbuild/linux-x64": "0.18.17", - "@esbuild/netbsd-x64": "0.18.17", - "@esbuild/openbsd-x64": "0.18.17", - "@esbuild/sunos-x64": "0.18.17", - "@esbuild/win32-arm64": "0.18.17", - "@esbuild/win32-ia32": "0.18.17", - "@esbuild/win32-x64": "0.18.17" - } - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -6683,12 +6026,6 @@ "node": ">=6" } }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -9593,77 +8930,6 @@ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, - "node_modules/vite": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", - "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", - "dev": true, - "dependencies": { - "esbuild": "^0.18.10", - "postcss": "^8.4.27", - "rollup": "^3.27.1" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vite/node_modules/rollup": { - "version": "3.28.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", - "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/w3c-xmlserializer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", diff --git a/package.json b/package.json index 7f0550f2..0dc732de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ziggy-js", - "version": "1.6.1", + "version": "1.6.2", "description": "Use your Laravel named routes in JavaScript.", "keywords": [ "laravel", @@ -28,7 +28,7 @@ "src/js", "dist" ], - "source": "src/js/index.ts", + "source": "src/js/index.js", "main": "dist/index.js", "umd:main": "dist/index.js", "unpkg": "dist/index.js", @@ -36,61 +36,32 @@ "module": "dist/index.m.js", "esmodule": "dist/index.es.js", "types": "dist/types/index.d.ts", - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "require": "./dist/index.js", - "import": "./dist/index.es.js" - }, - "./vite": { - "types": "./dist/types/vite-plugin.d.ts", - "require": "./dist/vite-plugin.js", - "import": "./dist/vite-plugin.es.js" - } - }, - "typesVersions": { - "*": { - "vite": [ - "./dist/types/vite-plugin.d.ts" - ] - } - }, "repository": { "type": "git", "url": "https://github.com/tighten/ziggy.git" }, "scripts": { "build": "microbundle --name route --format modern,es,umd --external none --no-sourcemap", - "build:vue": "microbundle --entry src/js/vue.ts --output dist/vue.js --name ZiggyVue --format modern,es,umd --external none --no-sourcemap", - "build:vite": "microbundle --target node --name vite-plugin --entry src/js/vite-plugin.ts --output dist/vite-plugin.js --external vite --format modern,es,umd --no-sourcemap", + "build:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --external none --no-sourcemap", + "build:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --external none --no-sourcemap", "watch": "npm run build watch", "build:npm": "microbundle --name route --format modern,es,umd --no-sourcemap", - "build:npm:vue": "microbundle --entry src/js/vue.ts --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap", + "build:npm:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap", + "build:npm:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --no-sourcemap", "test": "jest --verbose", - "prepublishOnly": "npm run build:npm && npm run build:npm:vue && npm run build:vite" + "prepublishOnly": "npm run build:npm && npm run build:npm:vue && npm run build:npm:react" }, "mangle": { "regex": "^_(?!query)" }, - "jest": { - "testEnvironment": "node", - "transform": { - ".+\\.(j|t)sx?$": "@swc/jest" - } - }, "dependencies": { "qs": "~6.9.7" }, "devDependencies": { - "@swc/core": "^1.3.71", - "@swc/jest": "^0.2.27", - "@types/jest": "^29.5.3", - "@types/qs": "^6.9.7", "babel-preset-power-assert": "^3.0.0", - "jest": "^29.6.2", + "jest": "^29.0.3", "jest-environment-jsdom": "^29.0.3", "microbundle": "^0.15.1", - "power-assert": "^1.6.1", - "vite": "^4.4.7" + "power-assert": "^1.6.1" } } diff --git a/src/js/Route.js b/src/js/Route.js new file mode 100644 index 00000000..7fd6a347 --- /dev/null +++ b/src/js/Route.js @@ -0,0 +1,121 @@ +import { parse } from 'qs'; + +/** + * A Laravel route. This class represents one route and its configuration and metadata. + */ +export default class Route { + /** + * @param {String} name - Route name. + * @param {Object} definition - Route definition. + * @param {Object} config - Ziggy configuration. + */ + constructor(name, definition, config) { + this.name = name; + this.definition = definition; + this.bindings = definition.bindings ?? {}; + this.wheres = definition.wheres ?? {}; + this.config = config; + } + + /** + * Get a 'template' of the complete URL for this route. + * + * @example + * https://{team}.ziggy.dev/user/{user} + * + * @return {String} Route template. + */ + get template() { + return `${this.origin}/${this.definition.uri}`.replace(/\/+$/, ''); + } + + /** + * Get a template of the origin for this route. + * + * @example + * https://{team}.ziggy.dev/ + * + * @return {String} Route origin template. + */ + get origin() { + // If we're building just a path there's no origin, otherwise: if this route has a + // domain configured we construct the origin with that, if not we use the app URL + return !this.config.absolute ? '' : this.definition.domain + ? `${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port ? `:${this.config.port}` : ''}` + : this.config.url; + } + + /** + * Get an array of objects representing the parameters that this route accepts. + * + * @example + * [{ name: 'team', required: true }, { name: 'user', required: false }] + * + * @return {Array} Parameter segments. + */ + get parameterSegments() { + return this.template.match(/{[^}?]+\??}/g)?.map((segment) => ({ + name: segment.replace(/{|\??}/g, ''), + required: !/\?}$/.test(segment), + })) ?? []; + } + + /** + * Get whether this route's template matches the given URL. + * + * @param {String} url - URL to check. + * @return {Object|false} - If this route matches, returns the matched parameters. + */ + matchesUrl(url) { + if (!this.definition.methods.includes('GET')) return false; + + // Transform the route's template into a regex that will match a hydrated URL, + // by replacing its parameter segments with matchers for parameter values + const pattern = this.template + .replace(/(\/?){([^}?]*)(\??)}/g, (_, slash, segment, optional) => { + const regex = `(?<${segment}>${this.wheres[segment]?.replace(/(^\^)|(\$$)/g, '') || '[^/?]+'})`; + return optional ? `(${slash}${regex})?` : `${slash}${regex}`; + }) + .replace(/^\w+:\/\//, ''); + + const [location, query] = url.replace(/^\w+:\/\//, '').split('?'); + + const matches = new RegExp(`^${pattern}/?$`).exec(location); + + if (matches) { + for (const k in matches.groups) { + matches.groups[k] = typeof matches.groups[k] === 'string' ? decodeURIComponent(matches.groups[k]) : matches.groups[k]; + } + return { params: matches.groups, query: parse(query) }; + } + + return false; + } + + /** + * Hydrate and return a complete URL for this route with the given parameters. + * + * @param {Object} params + * @return {String} + */ + compile(params) { + const segments = this.parameterSegments; + + if (!segments.length) return this.template; + + return this.template.replace(/{([^}?]+)(\??)}/g, (_, segment, optional) => { + // If the parameter is missing but is not optional, throw an error + if (!optional && [null, undefined].includes(params[segment])) { + throw new Error(`Ziggy error: '${segment}' parameter is required for route '${this.name}'.`) + } + + if (this.wheres[segment]) { + if (!new RegExp(`^${optional ? `(${this.wheres[segment]})?` : this.wheres[segment]}$`).test(params[segment] ?? '')) { + throw new Error(`Ziggy error: '${segment}' parameter does not match required format '${this.wheres[segment]}' for route '${this.name}'.`) + } + } + + return encodeURI(params[segment] ?? '').replace(/%7C/g, '|').replace(/%25/g, '%').replace(/\$/g, '%24'); + }).replace(`${this.origin}//`, `${this.origin}/`).replace(/\/+$/, ''); + } +} diff --git a/src/js/Route.ts b/src/js/Route.ts deleted file mode 100644 index 0360a417..00000000 --- a/src/js/Route.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { parse } from "qs"; -import { NormalizedRouteParams, RouteConfig, RouteDefinition, RouteMatchResult, RouteName } from "."; - -/** - * A Laravel route. This class represents one route and its configuration and metadata. - */ -export default class Route { - readonly bindings: Record; - readonly wheres: any; - - /** - * @param name - Route name. - * @param definition - Route definition. - * @param config - Ziggy configuration. - */ - constructor(public readonly name: Name, public readonly definition: RouteDefinition, public readonly config: RouteConfig) { - this.bindings = definition.bindings ?? {}; - this.wheres = definition.wheres ?? {}; - } - - /** - * Get a 'template' of the complete URL for this route. - * - * @example - * https://{team}.ziggy.dev/user/{user} - * - * @return Route template. - */ - get template(): string { - return `${this.origin}/${this.definition.uri}`.replace(/\/+$/, ""); - } - - /** - * Get a template of the origin for this route. - * - * @example - * https://{team}.ziggy.dev/ - * - * @return Route origin template. - */ - get origin(): string { - // If we're building just a path there's no origin, otherwise: if this route has a - // domain configured we construct the origin with that, if not we use the app URL - return !this.config.absolute - ? "" - : this.definition.domain - ? `${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain - }${this.config.port ? `:${this.config.port}` : ""}` - : this.config.url; - } - - /** - * Get an array of objects representing the parameters that this route accepts. - * - * @example - * [{ name: 'team', required: true }, { name: 'user', required: false }] - * - * @return {Array} Parameter segments. - */ - get parameterSegments() { - return ( - this.template.match(/{[^}?]+\??}/g)?.map((segment) => ({ - name: segment.replace(/{|\??}/g, ""), - required: !/\?}$/.test(segment), - })) ?? [] - ); - } - - /** - * Get whether this route's template matches the given URL. - * - * @param url - URL to check. - * @return If this route matches, returns the matched parameters. - */ - matchesUrl(url: string): RouteMatchResult | false { - if (!this.definition.methods.includes("GET")) return false; - - // Transform the route's template into a regex that will match a hydrated URL, - // by replacing its parameter segments with matchers for parameter values - const pattern = this.template - .replace(/(\/?){([^}?]*)(\??)}/g, (_, slash, segment, optional) => { - const regex = `(?<${segment}>${this.wheres[segment]?.replace(/(^\^)|(\$$)/g, "") || - "[^/?]+" - })`; - return optional ? `(${slash}${regex})?` : `${slash}${regex}`; - }) - .replace(/^\w+:\/\//, ""); - - const [location, query] = url.replace(/^\w+:\/\//, "").split("?"); - - const matches = new RegExp(`^${pattern}/?$`).exec(location); - - if (matches) { - for (const k in matches.groups) { - matches.groups[k] = - typeof matches.groups[k] === "string" - ? decodeURIComponent(matches.groups[k]) - : matches.groups[k]; - } - return { params: matches.groups, query: parse(query) }; - } - - return false; - } - - /** - * Hydrate and return a complete URL for this route with the given parameters. - */ - compile(params: NormalizedRouteParams): string { - const segments = this.parameterSegments; - - if (!segments.length) return this.template; - - return this.template - .replace(/{([^}?]+)(\??)}/g, (_, segment: keyof typeof params & string, optional) => { - // If the parameter is missing but is not optional, throw an error - if (!optional && [null, undefined].includes(params[segment])) { - throw new Error( - `Ziggy error: '${segment}' parameter is required for route '${this.name}'.` - ); - } - - if ( - segments[segments.length - 1].name === segment && - this.wheres[segment] === ".*" - ) { - return encodeURIComponent(params[segment] ?? "").replace( - /%2F/g, - "/" - ); - } - - if ( - this.wheres[segment] && - !new RegExp( - `^${optional - ? `(${this.wheres[segment]})?` - : this.wheres[segment] - }$` - ).test(params[segment] as string ?? "") - ) { - throw new Error( - `Ziggy error: '${segment}' parameter does not match required format '${this.wheres[segment]}' for route '${this.name}'.` - ); - } - - return encodeURIComponent(params[segment] ?? ""); - }) - .replace(`${this.origin}//`, `${this.origin}/`) - .replace(/\/+$/, ""); - } -} diff --git a/src/js/Router.ts b/src/js/Router.js similarity index 71% rename from src/js/Router.ts rename to src/js/Router.js index 26738736..efd95443 100644 --- a/src/js/Router.ts +++ b/src/js/Router.js @@ -1,27 +1,17 @@ import { stringify } from 'qs'; -import { Config, NormalizedRouteParams, ParameterValue, RouteConfig, RouteDefinition, RouteMatchResult, RouteName, RouteParams, RouteParamsObject } from '.'; import Route from './Route'; -type _Unresolve = RouteMatchResult & { name: string, route: RouteDefinition } -declare global { - var Ziggy: Config -} - /** * A collection of Laravel routes. This class constitutes Ziggy's main API. */ -export default class Router extends String { - private readonly _config: RouteConfig; - private readonly _params: NormalizedRouteParams; - private readonly _route: Route - +export default class Router extends String { /** - * @param name Route name. - * @param params Route parameters. - * @param absolute Whether to include the URL origin. - * @param config Ziggy configuration. + * @param {String} [name] - Route name. + * @param {(String|Number|Array|Object)} [params] - Route parameters. + * @param {Boolean} [absolute] - Whether to include the URL origin. + * @param {Object} [config] - Ziggy configuration. */ - constructor(name?: Name, params?: RouteParams, absolute = true, config?: Config) { + constructor(name, params, absolute = true, config) { super(); this._config = config ?? (typeof Ziggy !== 'undefined' ? Ziggy : globalThis?.Ziggy); @@ -33,7 +23,7 @@ export default class Router extends String { } this._route = new Route(name, this._config.routes[name], this._config); - this._params = this._parse(params, this._route); + this._params = this._parse(params); } } @@ -53,13 +43,12 @@ export default class Router extends String { .filter((key) => key !== '_query') .reduce((result, current) => ({ ...result, [current]: this._params[current] }), {}); - const query = this._params['_query'] ?? {}; - return this._route.compile(this._params) + stringify({ ...unhandled, ...query }, { + return this._route.compile(this._params) + stringify({ ...unhandled, ...this._params['_query'] }, { addQueryPrefix: true, arrayFormat: 'indices', encodeValuesOnly: true, skipNulls: true, - encoder: (value, encoder) => typeof value === 'boolean' ? Number(value).toString() : encoder(value), + encoder: (value, encoder) => typeof value === 'boolean' ? Number(value) : encoder(value), }); } @@ -69,7 +58,7 @@ export default class Router extends String { * @param {String} [url] - The URL to inspect, defaults to the current window URL. * @return {{ name: string, params: Object, query: Object, route: Route }} */ - _unresolve(url?: string): _Unresolve { + _unresolve(url) { if (!url) { url = this._currentUrl(); } else if (this._config.absolute && url.startsWith('/')) { @@ -78,14 +67,12 @@ export default class Router extends String { url = this._location().host + url; } - const routes = Object.entries(this._config.routes); - for (const [name, route] of routes) { - const matchedParams = new Route(name, route, this._config).matchesUrl(url); - if (matchedParams) - return { name, ...matchedParams, route }; - } + let matchedParams = {}; + const [name, route] = Object.entries(this._config.routes).find( + ([name, route]) => (matchedParams = new Route(name, route, this._config).matchesUrl(url)) + ) || [undefined, undefined]; - return {} as _Unresolve; + return { name, ...matchedParams, route }; } _currentUrl() { @@ -110,15 +97,12 @@ export default class Router extends String { * route().current('posts.show', { post: 1 }); // false * route().current('posts.show', { post: 4 }); // true * - * @param name Route name to check. - * @param params Route parameters. + * @param {String} [name] - Route name to check. + * @param {(String|Number|Array|Object)} [params] - Route parameters. + * @return {(Boolean|String|undefined)} */ - current(name?: CurrentName, params?: RouteParams | null): boolean | string | void { - params ??= {} as RouteParams; - const unresolve = this._unresolve(); - if (!unresolve) return; - - const { name: current, params: currentParams, query, route } = unresolve; + current(name, params) { + const { name: current, params: currentParams, query, route } = this._unresolve(); // If a name wasn't passed, return the name of the current route if (!name) return current; @@ -129,17 +113,17 @@ export default class Router extends String { if ([null, undefined].includes(params) || !match) return match; - const routeObject = new Route(current as CurrentName, route, this._config); + const routeObject = new Route(current, route, this._config); - const normalizedParams = this._parse(params, routeObject); + params = this._parse(params, routeObject); const routeParams = { ...currentParams, ...query }; // If the current window URL has no route parameters, and the passed parameters are empty, return true - if (Object.values(normalizedParams).every(p => !p) && !Object.values(routeParams).some(v => v !== undefined)) return true; + if (Object.values(params).every(p => !p) && !Object.values(routeParams).some(v => v !== undefined)) return true; // Check that all passed parameters match their values in the current window URL // Use weak equality because all values in the current window URL will be strings - return Object.entries(normalizedParams).every(([key, value]) => routeParams[key] == value); + return Object.entries(params).every(([key, value]) => routeParams[key] == value); } /** @@ -168,7 +152,7 @@ export default class Router extends String { * @return {Object} */ get params() { - const { params, query } = this._unresolve() || {}; + const { params, query } = this._unresolve(); return { ...params, ...query }; } @@ -194,29 +178,26 @@ export default class Router extends String { * _parse([4, { uuid: 56789, name: 'Grand Canyon' }]); // { event: 4, venue: 56789 } * * @param {(String|Number|Array|Object)} params - Route parameters. - * @param {CurrentName} route - Route instance. + * @param {Route} route - Route instance. * @return {Object} Normalized complete route parameters. */ - _parse(params: ParameterValue | RouteParams, route: Route): NormalizedRouteParams { - params ??= {} as RouteParamsObject; + _parse(params = {}, route = this._route) { + params ??= {} + + // If `params` is a string or integer, wrap it in an array + params = ['string', 'number'].includes(typeof params) ? [params] : params; // Separate segments with and without defaults, and fill in the default values const segments = route.parameterSegments.filter(({ name }) => !this._config.defaults[name]); - let paramsObject = {} as RouteParamsObject - - if (typeof params === 'number' || typeof params === 'string') { - const [segment] = segments; - paramsObject = (segment ? { [segment.name]: params } : { [params]: "" }) as RouteParamsObject; - } - else if (params instanceof Array) { + if (Array.isArray(params)) { // If the parameters are an array they have to be in order, so we can transform them into // an object by keying them with the template segment names in the order they appear - paramsObject = params.reduce((result, current, i) => segments[i] + params = params.reduce((result, current, i) => segments[i] ? ({ ...result, [segments[i].name]: current }) : typeof current === 'object' ? ({ ...result, ...current }) - : ({ ...result, [current]: '' }), {} as RouteParamsObject); + : ({ ...result, [current]: '' }), {}); } else if ( segments.length === 1 && !params[segments[0].name] @@ -226,14 +207,12 @@ export default class Router extends String { // ambiguous—it could contain the parameter key and value, or it could be an object // representing just the value (e.g. a model); we can inspect it to find out, and // if it's just the parameter value, we can wrap it in an object with its key - paramsObject = { [segments[0].name]: params } as RouteParamsObject; - } else if (params) { - paramsObject = params; + params = { [segments[0].name]: params }; } return { ...this._defaults(route), - ...this._substituteBindings(paramsObject, route), + ...this._substituteBindings(params, route), }; } @@ -244,7 +223,7 @@ export default class Router extends String { * // with default parameters { locale: 'en', country: 'US' } and 'posts.show' route '{locale}/posts/{post}' * defaults(...); // { locale: 'en' } * - * @param {Name} route + * @param {Route} route * @return {Object} Default route parameters. */ _defaults(route) { @@ -258,11 +237,11 @@ export default class Router extends String { * @example * _substituteBindings({ post: { id: 4, slug: 'hello-world', title: 'Hello, world!' } }, { bindings: { post: 'slug' } }); // { post: 'hello-world' } * - * @param params Route parameters. - * @param route Route definition. - * @return Normalized route parameters. + * @param {Object} params - Route parameters. + * @param {Object} route - Route definition. + * @return {Object} Normalized route parameters. */ - _substituteBindings(params: RouteParamsObject, { bindings, parameterSegments }: Route) { + _substituteBindings(params, { bindings, parameterSegments }) { return Object.entries(params).reduce((result, [key, value]) => { // If the value isn't an object, or if the key isn't a named route parameter, // there's nothing to substitute so we return it as-is @@ -280,7 +259,7 @@ export default class Router extends String { } return { ...result, [key]: value[bindings[key]] }; - }, {}) as NormalizedRouteParams; + }, {}); } valueOf() { diff --git a/src/js/index.js b/src/js/index.js new file mode 100644 index 00000000..2b9dd5d3 --- /dev/null +++ b/src/js/index.js @@ -0,0 +1,7 @@ +import Router from './Router'; + +export default function route(name, params, absolute, config) { + const router = new Router(name, params, absolute, config); + + return name ? router.toString() : router; +} diff --git a/src/js/vue.ts b/src/js/vue.js similarity index 100% rename from src/js/vue.ts rename to src/js/vue.js diff --git a/tests/js/route.test.ts b/tests/js/route.test.js similarity index 100% rename from tests/js/route.test.ts rename to tests/js/route.test.js From 21c6f3e3b2647ee8338799d2e2d0e7883f4a3298 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 15:35:19 -0400 Subject: [PATCH 11/56] Wip --- tests/js/route.test.js | 66 ++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/tests/js/route.test.js b/tests/js/route.test.js index f056fa8c..d89db677 100644 --- a/tests/js/route.test.js +++ b/tests/js/route.test.js @@ -3,15 +3,7 @@ */ import assert, { deepEqual, strictEqual as same, throws } from 'assert'; -import route, { Config, RouteDefinition } from '../../src/js'; - -declare global { - export interface Window { - Ziggy: Config; - location: Location; - } - export var Ziggy: Config; -} +import route from '../../src/js'; const defaultWindow = { location: { @@ -19,7 +11,7 @@ const defaultWindow = { }, }; -const defaultZiggy: Config = { +const defaultZiggy = { url: 'https://ziggy.dev', port: null, defaults: { locale: 'en' }, @@ -217,12 +209,12 @@ const defaultZiggy: Config = { }; beforeAll(() => { - delete (window as any).location; - window.location = {} as Location; + delete window.location; + window.location = {}; }); beforeEach(() => { - (window as any).location = { ...defaultWindow.location }; + window.location = { ...defaultWindow.location }; global.window.location = window.location; global.Ziggy = { ...defaultZiggy }; }); @@ -510,7 +502,7 @@ describe('route()', () => { }); test('can accept a custom Ziggy configuration object', () => { - const config: Config = { + const config = { url: 'http://notYourAverage.dev', port: null, defaults: { locale: 'en' }, @@ -518,7 +510,7 @@ describe('route()', () => { 'tightenDev.packages.index': { uri: 'tightenDev/{dev}/packages', methods: ['GET', 'HEAD'], - } as RouteDefinition, + }, }, }; @@ -594,7 +586,7 @@ describe('route()', () => { test("can append 'extra' string/number parameter to query", () => { // 'posts.index' has no parameters same(route('posts.index', 'extra'), 'https://ziggy.dev/posts?extra='); - same(route('posts.index', [{ extra: 2 }]), 'https://ziggy.dev/posts?extra=2'); + same(route('posts.index', [{extra: 2}]), 'https://ziggy.dev/posts?extra=2'); same(route('posts.index', 1), 'https://ziggy.dev/posts?1='); }); @@ -745,18 +737,17 @@ describe('current()', () => { }); test('can get the current route name with a custom Ziggy object', () => { - delete (global as any).Ziggy; + global.Ziggy = undefined; global.window.location.pathname = '/events/'; - const config: Config = { + const config = { url: 'https://ziggy.dev', port: null, - defaults: {}, routes: { 'events.index': { uri: 'events', methods: ['GET', 'HEAD'], - } as RouteDefinition, + }, }, }; @@ -813,7 +804,7 @@ describe('current()', () => { same(route().current('pages.complexWhereConflict1'), false); global.window.location.pathname = '/where/complex-12/required/file'; - same(route().current('pages.complexWhere', { word: 'complex', digit: '12', required: 'required' }), true); + same(route().current('pages.complexWhere', {word: 'complex', digit: '12', required: 'required'}), true); same(route().current('pages.complexWhereConflict1'), false); global.window.location.pathname = '/where/123-abc/required/file.html'; @@ -827,29 +818,28 @@ describe('current()', () => { test('can current route with complex requirements is dehydrated correctly', () => { global.window.location.pathname = '/where/word-12/required/file'; - deepEqual(route().params, { digit: '12', word: 'word', required: 'required', optional: undefined, extension: undefined }) + deepEqual(route().params, {digit: '12', word: 'word', required: 'required', optional: undefined, extension: undefined}) global.window.location.pathname = '/where/complex-12/required/optional/file'; - deepEqual(route().params, { digit: '12', word: 'complex', required: 'required', optional: 'optional', extension: undefined }) + deepEqual(route().params, {digit: '12', word: 'complex', required: 'required', optional: 'optional', extension: undefined}) global.window.location.pathname = '/where/123-abc/required/file.html'; - deepEqual(route().params, { digit: '123', word: 'abc', required: 'required', optional: undefined, extension: '.html' }) + deepEqual(route().params, {digit: '123', word: 'abc', required: 'required', optional: undefined, extension: '.html'}) global.window.location.pathname = '/where/complex-12/different_but_required/optional/file'; - deepEqual(route().params, { digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined }) + deepEqual(route().params, {digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined}) global.window.location.search = '?ab=cd&ef=1&dd'; - deepEqual(route().params, { digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined, ab: 'cd', ef: '1', 'dd': '' }) + deepEqual(route().params, {digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined, ab: 'cd', ef: '1', 'dd': ''}) }); test('can strip regex start and end of string tokens from wheres', () => { - (global as any).Ziggy = undefined; + global.Ziggy = undefined; global.window.location.pathname = '/workspace/processes'; - const config: Config = { + const config = { url: 'https://ziggy.dev', port: null, - defaults: {}, routes: { 'workspaces.processes.index': { uri: '{workspace}/processes', @@ -857,7 +847,7 @@ describe('current()', () => { wheres: { workspace: '^(?!api|nova-api|horizon).*$', }, - } as RouteDefinition, + }, }, }; @@ -1120,15 +1110,23 @@ describe('current()', () => { same(route().current('events.venues.*'), false); }); + test.skip('can unresolve arbitrary urls to names and params', () => { + const resolved = route().unresolve('https://ziggy.dev/events/1/venues?test=yes'); + deepEqual(resolved, { name: 'events.venues.index', params: {event: '1'}, query: {test: 'yes'}, route: resolved.route }); + same(resolved.route.uri, 'events/{event}/venues'); + + same(route().unresolve('ziggy.dev/events/1/venues-index').name, 'events.venues-index'); + same(route().unresolve('/events/1/venues-index').name, 'events.venues-index'); + }); + test('can get the current route name without window', () => { global.Ziggy = undefined; const oldWindow = global.window; delete global.window; - const config: Config = { + const config = { url: 'https://ziggy.dev', port: null, - defaults: {}, routes: { 'events.venues.show': { uri: 'events/{event}/venues/{venue}', @@ -1137,13 +1135,13 @@ describe('current()', () => { event: 'id', venue: 'id', }, - } as RouteDefinition, + }, }, location: { host: 'ziggy.dev', pathname: '/events/1/venues/2', search: '?user=Jacob&id=9', - } as Location, + }, }; same(route(undefined, undefined, undefined, config).current(), 'events.venues.show'); From 309f55e695e1872700f8c223a5e27afa946b5cc3 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 16:13:19 -0400 Subject: [PATCH 12/56] Wip --- src/CommandRouteGenerator.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/CommandRouteGenerator.php b/src/CommandRouteGenerator.php index e7af273b..0ed4a3b2 100644 --- a/src/CommandRouteGenerator.php +++ b/src/CommandRouteGenerator.php @@ -32,23 +32,21 @@ public function __construct(Filesystem $files) public function handle() { $ziggy = new Ziggy($this->option('group'), $this->option('url') ? url($this->option('url')) : null); - + $this->makeDirectory( $path = $this->argument('path') ?? config('ziggy.output.path', 'resources/js/ziggy.js') ); if (! $this->option('types-only')) { - $this->files->put( - base_path($path), - new (config('ziggy.output.file', File::class))($ziggy), - ); + $output = config('ziggy.output.file', File::class); + + $this->files->put(base_path($path), new $output($ziggy)); } - + if ($this->option('types') || $this->option('types-only')) { - $this->files->put( - base_path(Str::replaceLast('.js', '.d.ts', $path)), - new (config('ziggy.output.types', Types::class))($ziggy), - ); + $types = config('ziggy.output.types', Types::class); + + $this->files->put(base_path(Str::replaceLast('.js', '.d.ts', $path)), new $types($ziggy)); } $this->info('Files generated!'); From dec9c6a479701d4d3c093248b02cb096beba6c4c Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 16:16:43 -0400 Subject: [PATCH 13/56] Wip --- tests/Unit/CommandRouteGeneratorTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Unit/CommandRouteGeneratorTest.php b/tests/Unit/CommandRouteGeneratorTest.php index 34dd656f..dcfecd74 100644 --- a/tests/Unit/CommandRouteGeneratorTest.php +++ b/tests/Unit/CommandRouteGeneratorTest.php @@ -166,7 +166,7 @@ public function can_generate_dts_file_without_routes() Artisan::call('ziggy:generate', ['--types-only' => true]); $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); - $this->assertFileDoesNotExist(base_path('resources/js/ziggy.js')); + $this->assertFileNotExists(base_path('resources/js/ziggy.js')); } /** @test */ @@ -181,7 +181,7 @@ public function can_derive_dts_file_path_from_given_path() Artisan::call('ziggy:generate', ['--types-only' => true]); $this->assertFileExists(base_path('resources/js/custom.d.ts')); - $this->assertFileDoesNotExist(base_path('resources/js/ziggy.d.ts')); + $this->assertFileNotExists(base_path('resources/js/ziggy.d.ts')); } } @@ -201,6 +201,6 @@ public function __toString(): string class PostCommentController { public function __invoke($post, $comment) { - // + // } } From 49bc8a92563a7bb9f82dace3aa1eec3dc2b2fff5 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 1 Sep 2023 16:21:54 -0400 Subject: [PATCH 14/56] Wip --- tests/Unit/CommandRouteGeneratorTest.php | 20 +++++++++++++++++--- tests/fixtures/ziggy-7.d.ts | 22 ++++++++++++++++++++++ tests/fixtures/ziggy.d.ts | 9 --------- 3 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 tests/fixtures/ziggy-7.d.ts diff --git a/tests/Unit/CommandRouteGeneratorTest.php b/tests/Unit/CommandRouteGeneratorTest.php index dcfecd74..f568f182 100644 --- a/tests/Unit/CommandRouteGeneratorTest.php +++ b/tests/Unit/CommandRouteGeneratorTest.php @@ -146,7 +146,6 @@ public function can_generate_file_using_config_path() public function can_generate_dts_file() { app('router')->get('posts', $this->noop())->name('posts.index'); - app('router')->get('posts/{post}/comments/{comment:uuid}', PostCommentController::class)->name('postComments.show'); app('router')->post('posts/{post}/comments', PostCommentController::class)->name('postComments.store'); app('router')->getRoutes()->refreshNameLookups(); @@ -156,13 +155,29 @@ public function can_generate_dts_file() } /** @test */ - public function can_generate_dts_file_without_routes() + public function can_generate_dts_file_with_scoped_bindings() { + if (! $this->laravelVersion(7)) { + $this->markTestSkipped('Requires Laravel >=7'); + } + app('router')->get('posts', $this->noop())->name('posts.index'); app('router')->get('posts/{post}/comments/{comment:uuid}', PostCommentController::class)->name('postComments.show'); app('router')->post('posts/{post}/comments', PostCommentController::class)->name('postComments.store'); app('router')->getRoutes()->refreshNameLookups(); + Artisan::call('ziggy:generate', ['--types' => true]); + + $this->assertFileEquals('./tests/fixtures/ziggy-7.d.ts', base_path('resources/js/ziggy.d.ts')); + } + + /** @test */ + public function can_generate_dts_file_without_routes() + { + app('router')->get('posts', $this->noop())->name('posts.index'); + app('router')->post('posts/{post}/comments', PostCommentController::class)->name('postComments.store'); + app('router')->getRoutes()->refreshNameLookups(); + Artisan::call('ziggy:generate', ['--types-only' => true]); $this->assertFileExists(base_path('resources/js/ziggy.d.ts')); @@ -174,7 +189,6 @@ public function can_derive_dts_file_path_from_given_path() { config(['ziggy.output.path' => 'resources/js/custom.js']); app('router')->get('posts', $this->noop())->name('posts.index'); - app('router')->get('posts/{post}/comments/{comment:uuid}', PostCommentController::class)->name('postComments.show'); app('router')->post('posts/{post}/comments', PostCommentController::class)->name('postComments.store'); app('router')->getRoutes()->refreshNameLookups(); diff --git a/tests/fixtures/ziggy-7.d.ts b/tests/fixtures/ziggy-7.d.ts new file mode 100644 index 00000000..80a86f4d --- /dev/null +++ b/tests/fixtures/ziggy-7.d.ts @@ -0,0 +1,22 @@ +/* Do not modify this file, it is generated automatically. */ +export {}; + +declare module 'ziggy-js' { + interface RouteLookup { + "posts.index": [], + "postComments.show": [ + { + "name": "post" + }, + { + "name": "comment", + "binding": "uuid" + } + ], + "postComments.store": [ + { + "name": "post" + } + ] +} +} diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts index 80a86f4d..e7008be4 100644 --- a/tests/fixtures/ziggy.d.ts +++ b/tests/fixtures/ziggy.d.ts @@ -4,15 +4,6 @@ export {}; declare module 'ziggy-js' { interface RouteLookup { "posts.index": [], - "postComments.show": [ - { - "name": "post" - }, - { - "name": "comment", - "binding": "uuid" - } - ], "postComments.store": [ { "name": "post" From c474721daa9f0f0f0018bf51bd692a982518b008 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 15 Sep 2023 18:16:23 -0400 Subject: [PATCH 15/56] Wip --- src/Output/Types.php | 7 +++---- tests/fixtures/ziggy-7.d.ts | 5 ++--- tests/fixtures/ziggy.d.ts | 5 ++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Output/Types.php b/src/Output/Types.php index 33ed14e1..97b3ec2d 100644 --- a/src/Output/Types.php +++ b/src/Output/Types.php @@ -24,14 +24,13 @@ public function __toString(): string : ['name' => $param]; }); }); - - return <<toJson(JSON_PRETTY_PRINT)} } +export {}; JAVASCRIPT; } diff --git a/tests/fixtures/ziggy-7.d.ts b/tests/fixtures/ziggy-7.d.ts index 80a86f4d..bb2e8c23 100644 --- a/tests/fixtures/ziggy-7.d.ts +++ b/tests/fixtures/ziggy-7.d.ts @@ -1,6 +1,4 @@ -/* Do not modify this file, it is generated automatically. */ -export {}; - +/* This file is generated automatically! */ declare module 'ziggy-js' { interface RouteLookup { "posts.index": [], @@ -20,3 +18,4 @@ declare module 'ziggy-js' { ] } } +export {}; diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts index e7008be4..19ef8cf2 100644 --- a/tests/fixtures/ziggy.d.ts +++ b/tests/fixtures/ziggy.d.ts @@ -1,6 +1,4 @@ -/* Do not modify this file, it is generated automatically. */ -export {}; - +/* This file is generated automatically! */ declare module 'ziggy-js' { interface RouteLookup { "posts.index": [], @@ -11,3 +9,4 @@ declare module 'ziggy-js' { ] } } +export {}; From 19acc26ecbddc08d9d457af8fe9027e5a959cc72 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 15 Sep 2023 18:16:31 -0400 Subject: [PATCH 16/56] Add `index.d.ts` --- src/js/index.d.ts | 86 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/js/index.d.ts diff --git a/src/js/index.d.ts b/src/js/index.d.ts new file mode 100644 index 00000000..0dd5f0cf --- /dev/null +++ b/src/js/index.d.ts @@ -0,0 +1,86 @@ +/** + * A list of routes and their parameters and bindings. + * + * Extended and filled by the route list generated automatically by Ziggy. + */ +export interface RouteList { + // +} + +/** + * A route name registered with Ziggy. + */ +type KnownRouteName = keyof RouteList; + +/** + * A route name, or any string. + */ +type RouteName = KnownRouteName | (string & {}); + +/** + * Information about a single route parameter. + */ +type ParameterInfo = { name: string, binding?: string }; + +/** + * A primitive route parameter value. + */ +type ParameterValue = string | number; + +/** + * A route parameter value, possibly nested inside an object under its binding key. + */ +type ValueOrBoundValue = I extends { binding: string } + ? { [K in I['binding']]: ParameterValue } | ParameterValue + : ParameterValue +// type A = ValueOrBoundValue<{ name: 'foo', binding: 'bar' }>; +// = ParameterValue | { bar: ParameterValue } + +/** + * An object containing a special '_query' key to target the query string of a URL. + */ +type HasQueryParam = { _query?: Record }; +/** + * An object of parameters for an unknown route. + */ +type GenericRouteParamsObject = Record & HasQueryParam; +/** + * An object of parameters for a specific named route registered with Ziggy. + */ +type KnownRouteParamsObject = { [T in I[number] as T['name']]?: ValueOrBoundValue | string } & HasQueryParam; +/** + * An object of route parameters. + */ +type RouteParamsObject = N extends KnownRouteName ? KnownRouteParamsObject : GenericRouteParamsObject; + +/** + * An array of parameters for an unknown route. + */ +type GenericRouteParamsArray = ValueOrBoundValue[]; +/** + * An array of parameters for a specific named route registered with Ziggy. + */ +type KnownRouteParamsArray = { [K in keyof I]: ValueOrBoundValue | string }; +// type B = KnownRouteParamsArray<[{ name: 'post', binding: 'uuid' }]>; +// = [ParameterValue | { uuid: ParameterValue }] +/** + * An array of route parameters. + */ +type RouteParamsArray = N extends KnownRouteName ? KnownRouteParamsArray : GenericRouteParamsArray; + +/** + * All possible parameter arguments for a route. + */ +type RouteParams = ParameterValue | RouteParamsObject | RouteParamsArray; + +/** + * Ziggy's route helper. + */ +// TODO +export function route( + name: T, + params?: RouteParams | undefined, + absolute?: boolean, + config?: object, +): string; +export function route(): any; From da5eab0ade041d252cfa4838f219e10440cb9dd2 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 15 Sep 2023 18:41:05 -0400 Subject: [PATCH 17/56] Wip --- src/js/index.d.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 0dd5f0cf..de65e4f2 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -1,3 +1,5 @@ +import Router from './Router'; + /** * A list of routes and their parameters and bindings. * @@ -73,14 +75,22 @@ type RouteParamsArray = N extends KnownRouteName ? KnownRou */ type RouteParams = ParameterValue | RouteParamsObject | RouteParamsArray; +type Config = {}; + /** * Ziggy's route helper. */ -// TODO +// TODO 'default' +export function route(): Router; +export function route( + name: undefined, + params?: RouteParams | undefined, + absolute?: boolean, + config?: Config, +): Router; export function route( name: T, params?: RouteParams | undefined, absolute?: boolean, - config?: object, -): string; -export function route(): any; + config?: Config, +): string; \ No newline at end of file From 3b0b74c81e2fcc5cfb0b004e222a46b8a81dbaf3 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 11:40:37 -0400 Subject: [PATCH 18/56] Cleanup, add comments, remove unnecessary `string` unions, add basic `Router` type, fix `route()` exports --- src/js/index.d.ts | 61 ++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index de65e4f2..99eb98e2 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -1,13 +1,9 @@ -import Router from './Router'; - /** * A list of routes and their parameters and bindings. * * Extended and filled by the route list generated automatically by Ziggy. */ -export interface RouteList { - // -} +export interface RouteList {} /** * A route name registered with Ziggy. @@ -18,6 +14,9 @@ type KnownRouteName = keyof RouteList; * A route name, or any string. */ type RouteName = KnownRouteName | (string & {}); +// `(string & {})` prevents TypeScript from reducing this type to just `string`, +// which would prevent intellisense from autocompleting known route names. +// See https://stackoverflow.com/a/61048124/6484459. /** * Information about a single route parameter. @@ -28,13 +27,14 @@ type ParameterInfo = { name: string, binding?: string }; * A primitive route parameter value. */ type ParameterValue = string | number; +// TODO: Technically booleans work too, does it make sense to add them here? What would that look like? /** - * A route parameter value, possibly nested inside an object under its binding key. + * A parseable route parameter, either as a plain value or nested inside an object under its binding key. */ type ValueOrBoundValue = I extends { binding: string } ? { [K in I['binding']]: ParameterValue } | ParameterValue - : ParameterValue + : ParameterValue; // type A = ValueOrBoundValue<{ name: 'foo', binding: 'bar' }>; // = ParameterValue | { bar: ParameterValue } @@ -43,26 +43,33 @@ type ValueOrBoundValue = I extends { binding: string } */ type HasQueryParam = { _query?: Record }; /** - * An object of parameters for an unknown route. + * An object of parameters for an unspecified route. */ type GenericRouteParamsObject = Record & HasQueryParam; +// `keyof any` essentially makes it function as a plain `Record` /** - * An object of parameters for a specific named route registered with Ziggy. + * An object of parameters for a specific named route. */ -type KnownRouteParamsObject = { [T in I[number] as T['name']]?: ValueOrBoundValue | string } & HasQueryParam; +type KnownRouteParamsObject = { [T in I[number] as T['name']]?: ValueOrBoundValue } & HasQueryParam; +// `readonly` allows TypeScript to determine the actual values of all the +// parameter names inside the array, instead of just seeing `string`. +// See https://github.com/tighten/ziggy/pull/664#discussion_r1329978447. /** * An object of route parameters. */ type RouteParamsObject = N extends KnownRouteName ? KnownRouteParamsObject : GenericRouteParamsObject; /** - * An array of parameters for an unknown route. + * An array of parameters for an unspecified route. */ type GenericRouteParamsArray = ValueOrBoundValue[]; /** - * An array of parameters for a specific named route registered with Ziggy. + * An array of parameters for a specific named route. */ -type KnownRouteParamsArray = { [K in keyof I]: ValueOrBoundValue | string }; +type KnownRouteParamsArray = { [K in keyof I]: ValueOrBoundValue }; +// Because `K in keyof I` for a `readonly` array is always a number, even though +// this looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. +// See https://github.com/tighten/ziggy/pull/664#discussion_r1330002370. // type B = KnownRouteParamsArray<[{ name: 'post', binding: 'uuid' }]>; // = [ParameterValue | { uuid: ParameterValue }] /** @@ -71,26 +78,32 @@ type KnownRouteParamsArray = { [K in keyof I type RouteParamsArray = N extends KnownRouteName ? KnownRouteParamsArray : GenericRouteParamsArray; /** - * All possible parameter arguments for a route. + * All possible parameter argument shapes for a route. */ type RouteParams = ParameterValue | RouteParamsObject | RouteParamsArray; -type Config = {}; +interface Config {} + +type Router = { + current(): RouteName | undefined; + current(name: T, params?: RouteParams): boolean; + get params(): Record; + has(name: T): boolean; +}; /** * Ziggy's route helper. */ -// TODO 'default' -export function route(): Router; -export function route( - name: undefined, +export default function route(): Router; +export default function route( + name: T, params?: RouteParams | undefined, absolute?: boolean, config?: Config, -): Router; -export function route( - name: T, - params?: RouteParams | undefined, +): string; +export default function route( + name: undefined, + params: undefined, absolute?: boolean, config?: Config, -): string; \ No newline at end of file +): Router; \ No newline at end of file From 8007103ec75129970523f8eb8c73be51bae50955 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 11:47:41 -0400 Subject: [PATCH 19/56] Union `KnownRouteParamsObject` with `GenericRouteParamsObject` to allow arbitrary extra object properties in params --- src/js/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 99eb98e2..adc85810 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -50,10 +50,11 @@ type GenericRouteParamsObject = Record & HasQueryParam; /** * An object of parameters for a specific named route. */ -type KnownRouteParamsObject = { [T in I[number] as T['name']]?: ValueOrBoundValue } & HasQueryParam; +type KnownRouteParamsObject = { [T in I[number] as T['name']]?: ValueOrBoundValue } & GenericRouteParamsObject; // `readonly` allows TypeScript to determine the actual values of all the // parameter names inside the array, instead of just seeing `string`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1329978447. +// TODO: The keys here could be non-optional (or more detailed) if we can determine which params are required/not. /** * An object of route parameters. */ From 322441efb4a00ba0f7090374bc44a28b77e4a8f3 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 11:49:09 -0400 Subject: [PATCH 20/56] Add `{ id: number }` to `ParameterValue` to allow default ID binding --- src/js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index adc85810..0d379549 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -26,7 +26,7 @@ type ParameterInfo = { name: string, binding?: string }; /** * A primitive route parameter value. */ -type ParameterValue = string | number; +type ParameterValue = string | number | { id: number }; // TODO: Technically booleans work too, does it make sense to add them here? What would that look like? /** From b1c861127cb7db7533dc122d42e17a8c37a3c761 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 13:14:45 -0400 Subject: [PATCH 21/56] Update test to cover extra objects passed in array of params --- tests/js/route.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/js/route.test.js b/tests/js/route.test.js index 92738cde..f888e46e 100644 --- a/tests/js/route.test.js +++ b/tests/js/route.test.js @@ -594,10 +594,12 @@ describe('route()', () => { same(route('posts.index', 1), 'https://ziggy.dev/posts?1='); }); - test("can append 'extra' string/number elements in array of parameters to query", () => { + test("can append 'extra' elements in array of parameters to query", () => { // 'posts.show' has exactly one parameter same(route('posts.show', [1, 2]), 'https://ziggy.dev/posts/1?2='); same(route('posts.show', ['my-first-post', 'foo', 'bar']), 'https://ziggy.dev/posts/my-first-post?foo=&bar='); + + same(route('posts.show', ['my-first-post', 'foo', { bar: 'baz' }]), 'https://ziggy.dev/posts/my-first-post?foo=&bar=baz'); }); test("can automatically append object with only 'extra' parameters to query", () => { From fe5edc00e0320a5a94cff1874af13c5db81a9ed8 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 13:31:41 -0400 Subject: [PATCH 22/56] Refactor `ParameterValue` to only allow `{ id: n }` in plain parameters (not as binding values) --- src/js/index.d.ts | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 0d379549..cdd5c9d0 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -24,19 +24,29 @@ type RouteName = KnownRouteName | (string & {}); type ParameterInfo = { name: string, binding?: string }; /** - * A primitive route parameter value. + * A primitive route parameter value, as it would appear in a URL. */ -type ParameterValue = string | number | { id: number }; +type RawParameterValue = string | number; // TODO: Technically booleans work too, does it make sense to add them here? What would that look like? /** - * A parseable route parameter, either as a plain value or nested inside an object under its binding key. + * An object parameter value containing the 'default' binding key `id`, e.g. representing an Eloquent model. + */ +type ModelParameterValue = { id: number } & Record; + +/** + * A route parameter value. + */ +type ParameterValue = RawParameterValue | ModelParameterValue; + +/** + * A parseable route parameter, either plain or nested inside an object under its binding key. */ type ValueOrBoundValue = I extends { binding: string } - ? { [K in I['binding']]: ParameterValue } | ParameterValue + ? { [K in I['binding']]: RawParameterValue } | RawParameterValue : ParameterValue; // type A = ValueOrBoundValue<{ name: 'foo', binding: 'bar' }>; -// = ParameterValue | { bar: ParameterValue } +// = ParameterValue | { bar: RawParameterValue } /** * An object containing a special '_query' key to target the query string of a URL. @@ -72,7 +82,7 @@ type KnownRouteParamsArray = { [K in keyof I // this looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1330002370. // type B = KnownRouteParamsArray<[{ name: 'post', binding: 'uuid' }]>; -// = [ParameterValue | { uuid: ParameterValue }] +// = [ParameterValue | { uuid: RawParameterValue }] /** * An array of route parameters. */ From 8d995410e31f186c6672678d472a4ecaccf9287f Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 14:18:37 -0400 Subject: [PATCH 23/56] Notes --- src/js/index.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index cdd5c9d0..47379548 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -45,6 +45,8 @@ type ParameterValue = RawParameterValue | ModelParameterValue; type ValueOrBoundValue = I extends { binding: string } ? { [K in I['binding']]: RawParameterValue } | RawParameterValue : ParameterValue; + +// Uncomment to test: // type A = ValueOrBoundValue<{ name: 'foo', binding: 'bar' }>; // = ParameterValue | { bar: RawParameterValue } @@ -81,8 +83,22 @@ type KnownRouteParamsArray = { [K in keyof I // Because `K in keyof I` for a `readonly` array is always a number, even though // this looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1330002370. + +// Uncomment to test: // type B = KnownRouteParamsArray<[{ name: 'post', binding: 'uuid' }]>; // = [ParameterValue | { uuid: RawParameterValue }] + +/** + * TODO + * For `KnownRouteParamsArray`, we need a more accurate type—one that behaves the same for the + * first n items in the array of parameters, where n is the number of required parameters, but + * allows *additional* array elements, because you can actually pass Ziggy an array containing + * whatever extra stuff you want. This type is closer but not completely correct: + * `{ [K in keyof I as number]: K extends keyof I ? ValueOrBoundValue : Record }`. + * It allows additional array elements but insists that they all be `ValueOrBoundValue`, + * so `as number` seems to be working but `Record` doesn't? + */ + /** * An array of route parameters. */ From ff2dfb8f0a8871c520b89297470b668bf83f1091 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 14:29:43 -0400 Subject: [PATCH 24/56] Remove TypeScript files --- src/js/index.ts | 24 -------------- src/js/types.ts | 87 ------------------------------------------------- tsconfig.json | 15 --------- 3 files changed, 126 deletions(-) delete mode 100644 src/js/index.ts delete mode 100644 src/js/types.ts delete mode 100644 tsconfig.json diff --git a/src/js/index.ts b/src/js/index.ts deleted file mode 100644 index 2654e6c0..00000000 --- a/src/js/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import Router from "./Router"; -import { Config, RouteName, RouteParams } from "./types"; -export * from "./types"; - -export default function route(): Router; -export default function route( - name: T, - params?: RouteParams | null, - absolute?: boolean, - config?: Config -): string; -export default function route(name: undefined, params: undefined, absolute: boolean): Router; -export default function route(name: undefined, params: undefined, absolute?: boolean, config?: Config): Router; -export default function route( - name?: string, - params?: any, - absolute = true, - config?: Config -) { - const router = new Router(name, params, absolute, config); - - return name ? router.toString() : router; -} - diff --git a/src/js/types.ts b/src/js/types.ts deleted file mode 100644 index 19b774f6..00000000 --- a/src/js/types.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { ParsedQs } from "qs"; - -/** - * Offers the route lookup to be merged with declarations emitted from ts generator - */ -export interface RouteLookup { - // -} - -type _ParameterBindingDefinition = { name: string, binding: string } | { name: string } -type _BindingOrValue = T extends { binding: string } ? ParameterBinding : ParameterValue - -/** Type of the values a parameter can be passed as. */ -export type ParameterValue = string | number; -/** A parameter as object or primitive */ -export type ParameterBinding = { [K in Name]: ParameterValue } | ParameterValue; - -/** Ordered array containing the paramters required to hydrate a route */ -export type RouteParamsArray = Name extends keyof RouteLookup ? _RouteParamsArray : GenericRouteParamsArray; -type _RouteParamsArray = { [K in keyof T]: _BindingOrValue | null }; - -/** Object containing the paramters required to hydrate a route. */ -export type RouteParamsObject = Name extends keyof RouteLookup ? _RouteParamsObject & QueryObject : GenericRouteParamsObject & QueryObject; -type _RouteParamsObject = { [Item in T[number]as Item['name']]?: _BindingOrValue | null }; - -/** Object containing the normalized paramters required to hydrate a route. */ -export type NormalizedRouteParams = Route extends keyof RouteLookup ? Record, ParameterValue> & _NormalizedRouteParams : _NormalizedRouteParams; -export type _NormalizedRouteParams = Record & QueryObject; - -export type GenericRouteParamsArray = _BindingOrValue<_ParameterBindingDefinition>[]; -export type GenericRouteParamsObject = QueryObject & Record; -export type GenericRouteParams = GenericRouteParamsArray | GenericRouteParamsObject | ParameterValue; - -export type QueryObject = { _query?: Record }; -/** - * Holds any known route name or an arbitrary string. - */ -export type RouteName = keyof RouteLookup | (string & {}); -/** - * The parameters type to hydrate a route. - */ -export type RouteParams = RouteParamsArray | RouteParamsObject | ParameterValue; -/** - * Normalized route parameters - */ -// export type NormalizedRouteParams = (Name extends keyof RouteLookup ? Record : Record) & { _query: Record }; - - - - -export interface Config { - routes: { - [key: string]: RouteDefinition; - }; - url: string; - port: number | null; - location?: Location; - defaults: { - [key: string]: ParameterValue; - }; -} - -export type RouteMethods = - | "GET" - | "HEAD" - | "POST" - | "PATCH" - | "PUT" - | "OPTIONS" - | "DELETE"; - -export interface RouteConfig extends Config { - absolute?: boolean; -} -export interface RouteDefinition { - wheres?: any; - bindings?: Record; - uri: string; - domain?: string; - methods: RouteMethods[]; -} - -export interface RouteMatchResult { - params: NormalizedRouteParams; - query: ParsedQs; -} - diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 0b85c047..00000000 --- a/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compilerOptions": { - "module": "ESNext", - "lib": ["DOM", "ES2020"], - "declaration": true, - "allowJs": true, - "strict": true, - "noImplicitAny": false, - "strictNullChecks": false, - "moduleResolution": "NodeNext", - "esModuleInterop": true - }, - "exclude": ["node_modules"], - "include": ["src/js/*.ts", "test/js/*.ts"] -} From 563812bff8d4ba8723ecf1009fa04e57bb0b7df4 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 16:16:26 -0400 Subject: [PATCH 25/56] Delete fixture files causing test failures --- tests/fixtures/ziggy-7.d.ts | 21 --------------------- tests/fixtures/ziggy.d.ts | 12 ------------ 2 files changed, 33 deletions(-) delete mode 100644 tests/fixtures/ziggy-7.d.ts delete mode 100644 tests/fixtures/ziggy.d.ts diff --git a/tests/fixtures/ziggy-7.d.ts b/tests/fixtures/ziggy-7.d.ts deleted file mode 100644 index bb2e8c23..00000000 --- a/tests/fixtures/ziggy-7.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* This file is generated automatically! */ -declare module 'ziggy-js' { - interface RouteLookup { - "posts.index": [], - "postComments.show": [ - { - "name": "post" - }, - { - "name": "comment", - "binding": "uuid" - } - ], - "postComments.store": [ - { - "name": "post" - } - ] -} -} -export {}; diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts deleted file mode 100644 index 19ef8cf2..00000000 --- a/tests/fixtures/ziggy.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* This file is generated automatically! */ -declare module 'ziggy-js' { - interface RouteLookup { - "posts.index": [], - "postComments.store": [ - { - "name": "post" - } - ] -} -} -export {}; From c4ce92a244a74dc46da1ec4154353b3531d14d44 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 16:21:07 -0400 Subject: [PATCH 26/56] Recreate fixture files --- tests/fixtures/ziggy-7.d.ts | 21 +++++++++++++++++++++ tests/fixtures/ziggy.d.ts | 12 ++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/fixtures/ziggy-7.d.ts create mode 100644 tests/fixtures/ziggy.d.ts diff --git a/tests/fixtures/ziggy-7.d.ts b/tests/fixtures/ziggy-7.d.ts new file mode 100644 index 00000000..bb2e8c23 --- /dev/null +++ b/tests/fixtures/ziggy-7.d.ts @@ -0,0 +1,21 @@ +/* This file is generated automatically! */ +declare module 'ziggy-js' { + interface RouteLookup { + "posts.index": [], + "postComments.show": [ + { + "name": "post" + }, + { + "name": "comment", + "binding": "uuid" + } + ], + "postComments.store": [ + { + "name": "post" + } + ] +} +} +export {}; diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts new file mode 100644 index 00000000..19ef8cf2 --- /dev/null +++ b/tests/fixtures/ziggy.d.ts @@ -0,0 +1,12 @@ +/* This file is generated automatically! */ +declare module 'ziggy-js' { + interface RouteLookup { + "posts.index": [], + "postComments.store": [ + { + "name": "post" + } + ] +} +} +export {}; From dd19a50b5e54268c1eb931222f4225d96e164c98 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 16:39:12 -0400 Subject: [PATCH 27/56] Wip --- src/js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 47379548..bce84426 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -133,4 +133,4 @@ export default function route( params: undefined, absolute?: boolean, config?: Config, -): Router; \ No newline at end of file +): Router; From 497814c32306057c8f917df80b7009869adc8c6a Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 22 Sep 2023 16:57:45 -0400 Subject: [PATCH 28/56] Uglify generated JSON --- src/Output/Types.php | 2 +- tests/fixtures/ziggy-7.d.ts | 18 +----------------- tests/fixtures/ziggy.d.ts | 9 +-------- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/Output/Types.php b/src/Output/Types.php index 97b3ec2d..04e69453 100644 --- a/src/Output/Types.php +++ b/src/Output/Types.php @@ -28,7 +28,7 @@ public function __toString(): string return <<toJson(JSON_PRETTY_PRINT)} + interface RouteLookup {$routes->toJson()} } export {}; diff --git a/tests/fixtures/ziggy-7.d.ts b/tests/fixtures/ziggy-7.d.ts index bb2e8c23..6403f976 100644 --- a/tests/fixtures/ziggy-7.d.ts +++ b/tests/fixtures/ziggy-7.d.ts @@ -1,21 +1,5 @@ /* This file is generated automatically! */ declare module 'ziggy-js' { - interface RouteLookup { - "posts.index": [], - "postComments.show": [ - { - "name": "post" - }, - { - "name": "comment", - "binding": "uuid" - } - ], - "postComments.store": [ - { - "name": "post" - } - ] -} + interface RouteLookup {"posts.index":[],"postComments.show":[{"name":"post"},{"name":"comment","binding":"uuid"}],"postComments.store":[{"name":"post"}]} } export {}; diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts index 19ef8cf2..4c2de920 100644 --- a/tests/fixtures/ziggy.d.ts +++ b/tests/fixtures/ziggy.d.ts @@ -1,12 +1,5 @@ /* This file is generated automatically! */ declare module 'ziggy-js' { - interface RouteLookup { - "posts.index": [], - "postComments.store": [ - { - "name": "post" - } - ] -} + interface RouteLookup {"posts.index":[],"postComments.store":[{"name":"post"}]} } export {}; From 1094257d1e4811a7d4db5dadb44d6b4e06536178 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 10:36:07 -0400 Subject: [PATCH 29/56] Prettify JSON again and fix line endings --- src/Output/Types.php | 2 +- tests/Unit/CommandRouteGeneratorTest.php | 16 ++++++++++++++++ tests/fixtures/ziggy-7.d.ts | 18 +++++++++++++++++- tests/fixtures/ziggy.d.ts | 9 ++++++++- 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/src/Output/Types.php b/src/Output/Types.php index 04e69453..97b3ec2d 100644 --- a/src/Output/Types.php +++ b/src/Output/Types.php @@ -28,7 +28,7 @@ public function __toString(): string return <<toJson()} + interface RouteLookup {$routes->toJson(JSON_PRETTY_PRINT)} } export {}; diff --git a/tests/Unit/CommandRouteGeneratorTest.php b/tests/Unit/CommandRouteGeneratorTest.php index f568f182..a0060f60 100644 --- a/tests/Unit/CommandRouteGeneratorTest.php +++ b/tests/Unit/CommandRouteGeneratorTest.php @@ -151,6 +151,14 @@ public function can_generate_dts_file() Artisan::call('ziggy:generate', ['--types' => true]); + // Normalize line endings (`json_encode` always uses Unix line endings) + if (PHP_OS_FAMILY === 'Windows') { + file_put_contents( + base_path('resources/js/ziggy.d.ts'), + preg_replace('/\r?\n/', "\r\n", file_get_contents(base_path('resources/js/ziggy.d.ts'))), + ); + } + $this->assertFileEquals('./tests/fixtures/ziggy.d.ts', base_path('resources/js/ziggy.d.ts')); } @@ -168,6 +176,14 @@ public function can_generate_dts_file_with_scoped_bindings() Artisan::call('ziggy:generate', ['--types' => true]); + // Normalize line endings (`json_encode` always uses Unix line endings) + if (PHP_OS_FAMILY === 'Windows') { + file_put_contents( + base_path('resources/js/ziggy.d.ts'), + preg_replace('/\r?\n/', "\r\n", file_get_contents(base_path('resources/js/ziggy.d.ts'))), + ); + } + $this->assertFileEquals('./tests/fixtures/ziggy-7.d.ts', base_path('resources/js/ziggy.d.ts')); } diff --git a/tests/fixtures/ziggy-7.d.ts b/tests/fixtures/ziggy-7.d.ts index 6403f976..bb2e8c23 100644 --- a/tests/fixtures/ziggy-7.d.ts +++ b/tests/fixtures/ziggy-7.d.ts @@ -1,5 +1,21 @@ /* This file is generated automatically! */ declare module 'ziggy-js' { - interface RouteLookup {"posts.index":[],"postComments.show":[{"name":"post"},{"name":"comment","binding":"uuid"}],"postComments.store":[{"name":"post"}]} + interface RouteLookup { + "posts.index": [], + "postComments.show": [ + { + "name": "post" + }, + { + "name": "comment", + "binding": "uuid" + } + ], + "postComments.store": [ + { + "name": "post" + } + ] +} } export {}; diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts index 4c2de920..19ef8cf2 100644 --- a/tests/fixtures/ziggy.d.ts +++ b/tests/fixtures/ziggy.d.ts @@ -1,5 +1,12 @@ /* This file is generated automatically! */ declare module 'ziggy-js' { - interface RouteLookup {"posts.index":[],"postComments.store":[{"name":"post"}]} + interface RouteLookup { + "posts.index": [], + "postComments.store": [ + { + "name": "post" + } + ] +} } export {}; From 2d546c6263b14deb2a58209344528fa895b1c10b Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 11:30:57 -0400 Subject: [PATCH 30/56] Include `index.d.ts` in package, remove other source files, and prevent Microbundle from overwriting types --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 0dc732de..256b0c96 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ } ], "files": [ - "src/js", + "src/js/index.d.ts", "dist" ], "source": "src/js/index.js", @@ -35,19 +35,19 @@ "browser": "dist/index.js", "module": "dist/index.m.js", "esmodule": "dist/index.es.js", - "types": "dist/types/index.d.ts", + "types": "src/js/index.d.ts", "repository": { "type": "git", "url": "https://github.com/tighten/ziggy.git" }, "scripts": { - "build": "microbundle --name route --format modern,es,umd --external none --no-sourcemap", - "build:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --external none --no-sourcemap", - "build:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --external none --no-sourcemap", + "build": "microbundle --name route --format modern,es,umd --external none --no-sourcemap --no-generateTypes", + "build:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --external none --no-sourcemap --no-generateTypes", + "build:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --external none --no-sourcemap --no-generateTypes", "watch": "npm run build watch", - "build:npm": "microbundle --name route --format modern,es,umd --no-sourcemap", - "build:npm:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap", - "build:npm:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --no-sourcemap", + "build:npm": "microbundle --name route --format modern,es,umd --no-sourcemap --no-generateTypes", + "build:npm:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap --no-generateTypes", + "build:npm:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --no-sourcemap --no-generateTypes", "test": "jest --verbose", "prepublishOnly": "npm run build:npm && npm run build:npm:vue && npm run build:npm:react" }, From 2a98c9d94f645477c6f94b7a770be8d68a63ac2c Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 12:38:34 -0400 Subject: [PATCH 31/56] Rename things to 'Routable' --- src/js/index.d.ts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index bce84426..fdf285cb 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -32,23 +32,27 @@ type RawParameterValue = string | number; /** * An object parameter value containing the 'default' binding key `id`, e.g. representing an Eloquent model. */ -type ModelParameterValue = { id: number } & Record; +interface DefaultRoutable { + id: RawParameterValue, +} /** * A route parameter value. */ -type ParameterValue = RawParameterValue | ModelParameterValue; +type ParameterValue = RawParameterValue | DefaultRoutable; /** * A parseable route parameter, either plain or nested inside an object under its binding key. */ -type ValueOrBoundValue = I extends { binding: string } +type Routable = I extends { binding: string } ? { [K in I['binding']]: RawParameterValue } | RawParameterValue : ParameterValue; // Uncomment to test: -// type A = ValueOrBoundValue<{ name: 'foo', binding: 'bar' }>; +// type A = Routable<{ name: 'foo', binding: 'bar' }>; // = ParameterValue | { bar: RawParameterValue } +// type B = Routable<{ name: 'foo' }>; +// = RawParameterValue | DefaultRoutable /** * An object containing a special '_query' key to target the query string of a URL. @@ -62,7 +66,7 @@ type GenericRouteParamsObject = Record & HasQueryParam; /** * An object of parameters for a specific named route. */ -type KnownRouteParamsObject = { [T in I[number] as T['name']]?: ValueOrBoundValue } & GenericRouteParamsObject; +type KnownRouteParamsObject = { [T in I[number] as T['name']]?: Routable } & GenericRouteParamsObject; // `readonly` allows TypeScript to determine the actual values of all the // parameter names inside the array, instead of just seeing `string`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1329978447. @@ -75,11 +79,11 @@ type RouteParamsObject = N extends KnownRouteName ? KnownRo /** * An array of parameters for an unspecified route. */ -type GenericRouteParamsArray = ValueOrBoundValue[]; +type GenericRouteParamsArray = Routable[]; /** * An array of parameters for a specific named route. */ -type KnownRouteParamsArray = { [K in keyof I]: ValueOrBoundValue }; +type KnownRouteParamsArray = { [K in keyof I]: Routable }; // Because `K in keyof I` for a `readonly` array is always a number, even though // this looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1330002370. @@ -94,8 +98,8 @@ type KnownRouteParamsArray = { [K in keyof I * first n items in the array of parameters, where n is the number of required parameters, but * allows *additional* array elements, because you can actually pass Ziggy an array containing * whatever extra stuff you want. This type is closer but not completely correct: - * `{ [K in keyof I as number]: K extends keyof I ? ValueOrBoundValue : Record }`. - * It allows additional array elements but insists that they all be `ValueOrBoundValue`, + * `{ [K in keyof I as number]: K extends keyof I ? Routable : Record }`. + * It allows additional array elements but insists that they all be `Routable`, * so `as number` seems to be working but `Record` doesn't? */ From 4da9658f6eee95ed3377711f7c2527dd53bfe3a8 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 12:39:08 -0400 Subject: [PATCH 32/56] Add more types --- src/js/index.d.ts | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index fdf285cb..27048890 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -113,25 +113,52 @@ type RouteParamsArray = N extends KnownRouteName ? KnownRou */ type RouteParams = ParameterValue | RouteParamsObject | RouteParamsArray; -interface Config {} +interface Route { + uri: string, + methods: ('GET' | 'HEAD' | 'POST' | 'PATCH' | 'PUT' | 'OPTIONS' | 'DELETE')[], + domain?: string, + bindings?: Record, + parameterNames?: string[], + wheres?: Record, + middleware?: string[], +} + +interface Config { + url: string, + port: number | null, + defaults: Record, + routes: Record, + location?: { + host?: string, + pathname?: string, + search?: string, + }, +} + +interface Router { + current(): RouteName | undefined, + current(name: T, params?: RouteParams): boolean, + get params(): Record, + has(name: T): boolean, + /** @deprecated since v1.0, use `has()` instead */ + check(name: T): boolean, +} -type Router = { - current(): RouteName | undefined; - current(name: T, params?: RouteParams): boolean; - get params(): Record; - has(name: T): boolean; -}; +// For the best autocomplete experience, the order of the function overloads below *does* matter /** * Ziggy's route helper. */ +// Called with no arguments - returns a Router instance export default function route(): Router; +// Called with a route name and optional additional arguments - returns a URL string export default function route( name: T, params?: RouteParams | undefined, absolute?: boolean, config?: Config, ): string; +// Called with configuration arguments only - returns a configured Router instance export default function route( name: undefined, params: undefined, From 7e0d47105c2eee92d11a81df335cba839ac4d72a Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 13:19:47 -0400 Subject: [PATCH 33/56] Fix interface and use `unknown` instead of `any` to not allow objects where we only want arrays --- src/js/index.d.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 27048890..1ed78711 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -32,9 +32,7 @@ type RawParameterValue = string | number; /** * An object parameter value containing the 'default' binding key `id`, e.g. representing an Eloquent model. */ -interface DefaultRoutable { - id: RawParameterValue, -} +type DefaultRoutable = { id: RawParameterValue } & Record; /** * A route parameter value. @@ -57,11 +55,11 @@ type Routable = I extends { binding: string } /** * An object containing a special '_query' key to target the query string of a URL. */ -type HasQueryParam = { _query?: Record }; +type HasQueryParam = { _query?: Record }; /** * An object of parameters for an unspecified route. */ -type GenericRouteParamsObject = Record & HasQueryParam; +type GenericRouteParamsObject = Record & HasQueryParam; // `keyof any` essentially makes it function as a plain `Record` /** * An object of parameters for a specific named route. @@ -119,7 +117,7 @@ interface Route { domain?: string, bindings?: Record, parameterNames?: string[], - wheres?: Record, + wheres?: Record, middleware?: string[], } @@ -138,7 +136,7 @@ interface Config { interface Router { current(): RouteName | undefined, current(name: T, params?: RouteParams): boolean, - get params(): Record, + get params(): Record, has(name: T): boolean, /** @deprecated since v1.0, use `has()` instead */ check(name: T): boolean, From 40098c19532cc5407ba4f45e125681dfd701bdf9 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 13:20:21 -0400 Subject: [PATCH 34/56] Fix: allow arbitrary additional elements in arrays of parameters --- src/js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 1ed78711..e33de31d 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -81,7 +81,7 @@ type GenericRouteParamsArray = Routable[]; /** * An array of parameters for a specific named route. */ -type KnownRouteParamsArray = { [K in keyof I]: Routable }; +type KnownRouteParamsArray = [...{ [K in keyof I]: Routable }, ...Array]; // Because `K in keyof I` for a `readonly` array is always a number, even though // this looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1330002370. From de33c7bc898bca75b6b629f6854d8f6ff41db897 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 13:30:38 -0400 Subject: [PATCH 35/56] Wip --- src/js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index e33de31d..e9465647 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -81,7 +81,7 @@ type GenericRouteParamsArray = Routable[]; /** * An array of parameters for a specific named route. */ -type KnownRouteParamsArray = [...{ [K in keyof I]: Routable }, ...Array]; +type KnownRouteParamsArray = [...{ [K in keyof I]: Routable }, ...unknown[]]; // Because `K in keyof I` for a `readonly` array is always a number, even though // this looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1330002370. From 5e494ce0e6a10b9573854ab02f15413b086ad25e Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 13:39:26 -0400 Subject: [PATCH 36/56] Add type testing file --- tests/js/types.ts | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 tests/js/types.ts diff --git a/tests/js/types.ts b/tests/js/types.ts new file mode 100644 index 00000000..35fcc309 --- /dev/null +++ b/tests/js/types.ts @@ -0,0 +1,62 @@ +import route from '../../src/js'; + +declare module '../../src/js' { + interface RouteList { + 'posts.index': [], + 'posts.comments.store': [{ name: 'x' }], + 'posts.comments.show': [{ name: 'post' }, { name: 'comment', binding: 'uuid' }], + 'optional': [{ name: 'maybe' }], + } +} + +// Test route name autocompletion +route(); + +// Test route parameter name autocompletion +route('posts.comments.store', {}); + +// TODO once we can detect whether params are required/optional @ts-expect-error missing required 'post' parameter +route('posts.comments.show', { comment: 2 }); + +// TODO once we can detect whether params are required/optional @ts-expect-error missing required 'comment' parameter +route('posts.comments.show', { post: 2 }); + +route('posts.comments.show', { post: 2, comment: 9 }); +// Allows random extra object properties +route('posts.comments.show', { post: 2, comment: 9, foo: 'bar' }); +// Allows any property order +route('posts.comments.show', { comment: 2, post: 9 }); +// Allows random extra nested object properties +route('posts.comments.show', { post: { id: 2, foo: 'bar' } }); + +route('posts.comments.show', { post: { id: 1, foo: 'bar' } }); +// @ts-expect-error missing 'id' key in post parameter object +route('posts.comments.show', { post: { foo: 'bar' } }); + +route('posts.comments.show', { comment: { uuid: 1, foo: 'bar' } }); +// @ts-expect-error missing 'uuid' key in comment parameter object +route('posts.comments.show', { comment: { foo: 'bar' } }); +// @ts-expect-error missing 'uuid' key in comment parameter object +// 'id' doesn't fix it because 'id' is the default/fallback but this +// parameter has an explicity 'uuid' binding, so it's required +route('posts.comments.show', { comment: { id: 2 } }); + +route('posts.comments.show', [2, { uuid: 3 }]); +route('posts.comments.show', [{ id: 2 }, 3]); +route('posts.comments.show', [{ id: 2 }, { uuid: 3 }]); + +// @ts-expect-error missing 'id' in post parameter object +route('posts.comments.show', [{ x: 2 }, { uuid: 3 }]); +// @ts-expect-error missing 'uuid' key in comment parameter object +route('posts.comments.show', [{ id: 2 }, { id: 3 }]); + +route('posts.comments.show', [{ id: 2 }, { uuid: 3 }, { x: 'y' }]); +route('posts.comments.show', ['foo', 'bar']); +route('posts.comments.show', [{ id: 2 }, 'bar']); +route('posts.comments.show', [1, 'foo', 3]); + +// Test router method autocompletion +route().has('x'); + +// Test router getter autocompletion +route().params.x From d7e59c000da453d3f861b60274145e9012f5e0cc Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 14:09:17 -0400 Subject: [PATCH 37/56] Update contributing.md --- CONTRIBUTING.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d4b336de..6e41a0a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Thanks for your interest in contributing to Ziggy! Contributions are **welcome** and will be fully **credited**. +Thanks for your interest in contributing to Ziggy! Contributions are welcome and will be credited. To keep things running smoothly we ask you to follow a few guidelines when contributing. Please read and understand this contribution guide before creating an issue or pull request. @@ -10,31 +10,39 @@ Be kind. ## Viability -If you have an idea for a feature, we'd prefer you open an issue before going to the trouble of writing code. We welcome your ideas, but we'd like to work with you to come up with solutions that work well for the project as a whole. We're usually pretty responsive, so it shouldn't take us long to figure out whether and how best to implement your idea. +If you have an idea for a feature, we'd prefer you open a discussion before going to the trouble of writing code. We welcome your ideas, but we'd like to work with you to come up with solutions that work well for the project as a whole. We're usually pretty responsive, so it shouldn't take us long to figure out whether and how best to implement your idea. ## Procedure Before filing an issue: -- Attempt to replicate the problem, to ensure that it wasn't a coincidence -- Check to make sure your feature suggestion isn't already present within the project -- Check the pull requests tab to ensure that your feature or bugfix isn't already in progress +- Attempt to replicate the problem, to ensure that it wasn't a coincidence. +- Check to make sure your feature suggestion isn't already present within the project. +- Check the pull requests tab to ensure that your feature or bugfix isn't already in progress. Before submitting a pull request: -- Check the codebase to ensure that your feature doesn't already exist -- Check the pull requests to ensure that another person hasn't already submitted the feature or fix +- Check the codebase to ensure that your feature doesn't already exist. +- Check the pull requests to ensure that another person hasn't already submitted the feature or fix. ## Tests -Please write tests for any fixes or new features you contribute. We use [Orchestra Testbench](http://orchestraplatform.com/docs/latest/components/testbench/) as our base PHPUnit test for PHP and [Jest](https://jestjs.io/) for testing our JavaScript. +Please write tests for any fixes or new features you contribute. We use [Orchestra Testbench](https://github.com/orchestral/testbench) as our base PHPUnit test for PHP and [Jest](https://jestjs.io/) for testing our JavaScript. -You can run PHP tests with `vendor/bin/phpunit` and JavaScript tests with `npm test`. +You can run PHP tests with `vendor/bin/phpunit` and JavaScript tests with `npm run test`. If you need any help with this please don't hesitate to ask. > If your filesystem uses `CRLF` instead of `LF` line endings (e.g. Windows) you may see errors related to that when running tests. To fix this you can run `git config --global core.autocrlf input` to configure Git to preserve the line endings from the repository when cloning. You may have to clone this repository again. +## Types + +TypeScript types are included with Ziggy and maintained manually. + +To test the type definitions, open `tests/js/types.ts` in an editor or IDE with TypeScript support. This file contains sample code using Ziggy's `route()` function, and can be used to ensure that specific examples do or don't type-check as expected. To add a test for code that should work, add the code (with a comment explaining its purpose) and verify that it doesn't create any type errors. To add a test for code that should _not_ work, and should generate a type error, add the code with a `// @ts-expect-error` annotation, and verify that without the annotation it generates a type error and with the annotation it doesn't. + +See also [`tighten/ziggy-type-testing`](https://github.com/tighten/ziggy-type-testing). + ## Requirements - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer). From ec95025ac772a2f8c8797699134b66cb230b7574 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 14:09:29 -0400 Subject: [PATCH 38/56] Wip --- src/js/index.d.ts | 15 +-------------- tests/js/types.ts | 34 ++++++++++++++++++++++------------ 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index e9465647..e81dfbfc 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -27,7 +27,7 @@ type ParameterInfo = { name: string, binding?: string }; * A primitive route parameter value, as it would appear in a URL. */ type RawParameterValue = string | number; -// TODO: Technically booleans work too, does it make sense to add them here? What would that look like? +// TODO: Technically booleans work too, does it make sense to add them? Here? What would that look like? /** * An object parameter value containing the 'default' binding key `id`, e.g. representing an Eloquent model. @@ -90,17 +90,6 @@ type KnownRouteParamsArray = [...{ [K in key // type B = KnownRouteParamsArray<[{ name: 'post', binding: 'uuid' }]>; // = [ParameterValue | { uuid: RawParameterValue }] -/** - * TODO - * For `KnownRouteParamsArray`, we need a more accurate type—one that behaves the same for the - * first n items in the array of parameters, where n is the number of required parameters, but - * allows *additional* array elements, because you can actually pass Ziggy an array containing - * whatever extra stuff you want. This type is closer but not completely correct: - * `{ [K in keyof I as number]: K extends keyof I ? Routable : Record }`. - * It allows additional array elements but insists that they all be `Routable`, - * so `as number` seems to be working but `Record` doesn't? - */ - /** * An array of route parameters. */ @@ -138,8 +127,6 @@ interface Router { current(name: T, params?: RouteParams): boolean, get params(): Record, has(name: T): boolean, - /** @deprecated since v1.0, use `has()` instead */ - check(name: T): boolean, } // For the best autocomplete experience, the order of the function overloads below *does* matter diff --git a/tests/js/types.ts b/tests/js/types.ts index 35fcc309..a92e69ed 100644 --- a/tests/js/types.ts +++ b/tests/js/types.ts @@ -1,5 +1,7 @@ import route from '../../src/js'; +// Add generated routes to use for testing inside this file. In a real app these declarations +// would be in a separate file generated by running `php artisan ziggy:generate --types`. declare module '../../src/js' { interface RouteList { 'posts.index': [], @@ -15,48 +17,56 @@ route(); // Test route parameter name autocompletion route('posts.comments.store', {}); -// TODO once we can detect whether params are required/optional @ts-expect-error missing required 'post' parameter +// TODO once we can detect whether params are required/optional: @ts-expect-error missing required 'post' parameter route('posts.comments.show', { comment: 2 }); -// TODO once we can detect whether params are required/optional @ts-expect-error missing required 'comment' parameter +// TODO once we can detect whether params are required/optional: @ts-expect-error missing required 'comment' parameter route('posts.comments.show', { post: 2 }); +// Simple object example route('posts.comments.show', { post: 2, comment: 9 }); -// Allows random extra object properties +// Allows extra object properties route('posts.comments.show', { post: 2, comment: 9, foo: 'bar' }); // Allows any property order route('posts.comments.show', { comment: 2, post: 9 }); -// Allows random extra nested object properties -route('posts.comments.show', { post: { id: 2, foo: 'bar' } }); +// Binding/'routable' object example with default 'id' binding route('posts.comments.show', { post: { id: 1, foo: 'bar' } }); +// Allows extra nested object properties +route('posts.comments.show', { post: { id: 2, foo: 'bar' } }); // @ts-expect-error missing 'id' key in post parameter object route('posts.comments.show', { post: { foo: 'bar' } }); +// Binding/'routable' object example with custom 'uuid' binding +route('posts.comments.show', { comment: { uuid: 1 } }); +// Allows extra nested object properties route('posts.comments.show', { comment: { uuid: 1, foo: 'bar' } }); // @ts-expect-error missing 'uuid' key in comment parameter object route('posts.comments.show', { comment: { foo: 'bar' } }); // @ts-expect-error missing 'uuid' key in comment parameter object // 'id' doesn't fix it because 'id' is the default/fallback but this -// parameter has an explicity 'uuid' binding, so it's required +// parameter has an explicit 'uuid' binding, so that's required :) route('posts.comments.show', { comment: { id: 2 } }); -route('posts.comments.show', [2, { uuid: 3 }]); +// Simple array examples +route('posts.comments.show', [2, 3]); +route('posts.comments.show', ['foo', 'bar']); +// Allows mix of plain values and parameter objects route('posts.comments.show', [{ id: 2 }, 3]); -route('posts.comments.show', [{ id: 2 }, { uuid: 3 }]); +route('posts.comments.show', ['2', { uuid: 3 }]); +route('posts.comments.show', [{ id: 2 }, { uuid: '3' }]); // @ts-expect-error missing 'id' in post parameter object route('posts.comments.show', [{ x: 2 }, { uuid: 3 }]); // @ts-expect-error missing 'uuid' key in comment parameter object route('posts.comments.show', [{ id: 2 }, { id: 3 }]); +// Allows extra array items after know parameters route('posts.comments.show', [{ id: 2 }, { uuid: 3 }, { x: 'y' }]); -route('posts.comments.show', ['foo', 'bar']); -route('posts.comments.show', [{ id: 2 }, 'bar']); route('posts.comments.show', [1, 'foo', 3]); // Test router method autocompletion -route().has('x'); +route().has(''); // Test router getter autocompletion -route().params.x +route().params; From 63eae2c0d23f23e24f0a971365428e221c295fac Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 15:30:22 -0400 Subject: [PATCH 39/56] Update Readme and notes --- README.md | 19 ++++++++++++++++++- src/js/index.d.ts | 6 ++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fa6b491d..ed962976 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Ziggy supports all versions of Laravel from `5.4` onward, and all modern browser - [TypeScript support](#typescript-support) - [**Advanced Setup**](#advanced-setup) - [JavaScript frameworks](#javascript-frameworks) + - [TypeScript](#typescript) - [Vue](#vue) - [React](#react) - [SPAs or separate repos](#spas-or-separate-repos) @@ -31,7 +32,11 @@ Ziggy supports all versions of Laravel from `5.4` onward, and all modern browser ## Installation -Install Ziggy into your Laravel app with `composer require tightenco/ziggy`. +Install Ziggy in your Laravel app: + +```bash +composer require tightenco/ziggy +``` Add the `@routes` Blade directive to your main layout (_before_ your application's JavaScript), and the `route()` helper function will now be available globally! @@ -355,6 +360,18 @@ import { Ziggy } from './ziggy'; route('home', undefined, undefined, Ziggy); ``` +#### TypeScript + +> **This functionality is currently experimental.** + +Ziggy includes TypeScript type definitions, and a helper command that can generate additional type definitions to enable route name and parameter autocompletion. + +To generate the route types, run Ziggy's Artisan command with the `--types` or `--types-only` option: + +```bash +php artisan ziggy:generate --types +``` + #### Vue Ziggy includes a Vue plugin to make it easy to use the `route()` helper throughout your Vue app: diff --git a/src/js/index.d.ts b/src/js/index.d.ts index e81dfbfc..75262bdf 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -131,6 +131,12 @@ interface Router { // For the best autocomplete experience, the order of the function overloads below *does* matter +// NOTES +// - The `route()` function below and the `RouteList` interface at the top of this file are the only +// exports - this is intentional. The implementation of the types inside this file is internal +// and experimental, and should be free to change as long as the externally visible behaviour +// stays the same. + /** * Ziggy's route helper. */ From d2648c6e9b5418879392934ad2b91738b9a183e0 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 17:39:11 -0400 Subject: [PATCH 40/56] Fix GenericRouteParamsArray --- src/js/index.d.ts | 4 +++- tests/js/types.ts | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 75262bdf..af108288 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -77,7 +77,9 @@ type RouteParamsObject = N extends KnownRouteName ? KnownRo /** * An array of parameters for an unspecified route. */ -type GenericRouteParamsArray = Routable[]; +// TODO: this may be able to be more specific, like `Routable[]`, +// depending how we want to handle nested objects inside parameter arrays +type GenericRouteParamsArray = unknown[]; /** * An array of parameters for a specific named route. */ diff --git a/tests/js/types.ts b/tests/js/types.ts index a92e69ed..b7cb1f3e 100644 --- a/tests/js/types.ts +++ b/tests/js/types.ts @@ -65,6 +65,13 @@ route('posts.comments.show', [{ id: 2 }, { id: 3 }]); route('posts.comments.show', [{ id: 2 }, { uuid: 3 }, { x: 'y' }]); route('posts.comments.show', [1, 'foo', 3]); +// Unknown route example +route('foo'); +// Allows any object params +route('foo', { bar: { f: 'x' } }); +// Allows any array params +route('foo', [{ x: 'x' }, 2, 'foo']); + // Test router method autocompletion route().has(''); From f72ab613b2f4960e43f710f8bd13cf8715c7443b Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 17:39:16 -0400 Subject: [PATCH 41/56] Wip --- src/js/index.d.ts | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/js/index.d.ts b/src/js/index.d.ts index af108288..64b8dd91 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -1,7 +1,7 @@ /** * A list of routes and their parameters and bindings. * - * Extended and filled by the route list generated automatically by Ziggy. + * Extended and filled by the route list generated with `php artisan ziggy:generate --types`. */ export interface RouteList {} @@ -48,7 +48,7 @@ type Routable = I extends { binding: string } // Uncomment to test: // type A = Routable<{ name: 'foo', binding: 'bar' }>; -// = ParameterValue | { bar: RawParameterValue } +// = RawParameterValue | { bar: RawParameterValue } // type B = Routable<{ name: 'foo' }>; // = RawParameterValue | DefaultRoutable @@ -64,11 +64,11 @@ type GenericRouteParamsObject = Record & HasQueryParam; /** * An object of parameters for a specific named route. */ +// TODO: The keys here could be non-optional (or more detailed) if we can determine which params are required/not. type KnownRouteParamsObject = { [T in I[number] as T['name']]?: Routable } & GenericRouteParamsObject; // `readonly` allows TypeScript to determine the actual values of all the // parameter names inside the array, instead of just seeing `string`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1329978447. -// TODO: The keys here could be non-optional (or more detailed) if we can determine which params are required/not. /** * An object of route parameters. */ @@ -84,13 +84,15 @@ type GenericRouteParamsArray = unknown[]; * An array of parameters for a specific named route. */ type KnownRouteParamsArray = [...{ [K in keyof I]: Routable }, ...unknown[]]; -// Because `K in keyof I` for a `readonly` array is always a number, even though -// this looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. +// Because `K in keyof I` for a `readonly` array is always a number, even though this +// looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. The nested +// array destructing lets us type the first n items in the array, which are known +// route parameters, and then allow arbitrary additional items. // See https://github.com/tighten/ziggy/pull/664#discussion_r1330002370. // Uncomment to test: // type B = KnownRouteParamsArray<[{ name: 'post', binding: 'uuid' }]>; -// = [ParameterValue | { uuid: RawParameterValue }] +// = [RawParameterValue | { uuid: RawParameterValue }, ...unknown[]] /** * An array of route parameters. @@ -102,6 +104,9 @@ type RouteParamsArray = N extends KnownRouteName ? KnownRou */ type RouteParams = ParameterValue | RouteParamsObject | RouteParamsArray; +/** + * A route. + */ interface Route { uri: string, methods: ('GET' | 'HEAD' | 'POST' | 'PATCH' | 'PUT' | 'OPTIONS' | 'DELETE')[], @@ -112,6 +117,9 @@ interface Route { middleware?: string[], } +/** + * Ziggy's config object. + */ interface Config { url: string, port: number | null, @@ -124,6 +132,9 @@ interface Config { }, } +/** + * Ziggy's Router class. + */ interface Router { current(): RouteName | undefined, current(name: T, params?: RouteParams): boolean, @@ -131,13 +142,7 @@ interface Router { has(name: T): boolean, } -// For the best autocomplete experience, the order of the function overloads below *does* matter - -// NOTES -// - The `route()` function below and the `RouteList` interface at the top of this file are the only -// exports - this is intentional. The implementation of the types inside this file is internal -// and experimental, and should be free to change as long as the externally visible behaviour -// stays the same. +// For the best autocomplete experience, the order of these function overloads *does* matter /** * Ziggy's route helper. @@ -158,3 +163,9 @@ export default function route( absolute?: boolean, config?: Config, ): Router; + +// NOTES +// - The `route()` function above and the `RouteList` interface at the top of this file are the only +// exports - this is intentional. The implementation of the types inside this file is internal +// and experimental, and should be free to change as long as the externally visible behaviour +// stays the same. From bde090f15708bc888e7b6c87cdcf16f9c92df90a Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Tue, 3 Oct 2023 17:47:51 -0400 Subject: [PATCH 42/56] Rename `parameterNames` to `parameters` (in anticipation of including more metadata there than just names) --- src/Output/Types.php | 2 +- src/Ziggy.php | 2 +- src/js/index.d.ts | 2 +- tests/Unit/BladeRouteGeneratorTest.php | 4 +- tests/Unit/RouteModelBindingTest.php | 38 +++++++++---------- tests/Unit/ZiggyTest.php | 52 +++++++++++++------------- tests/fixtures/custom-pathname.js | 2 +- tests/fixtures/custom-url.js | 2 +- tests/fixtures/ziggy-custom.js | 2 +- tests/fixtures/ziggy.js | 2 +- 10 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/Output/Types.php b/src/Output/Types.php index 97b3ec2d..831661bd 100644 --- a/src/Output/Types.php +++ b/src/Output/Types.php @@ -18,7 +18,7 @@ public function __construct(Ziggy $ziggy) public function __toString(): string { $routes = collect($this->ziggy->toArray()['routes'])->map(function ($route) { - return collect($route['parameterNames'] ?? [])->map(function ($param) use ($route) { + return collect($route['parameters'] ?? [])->map(function ($param) use ($route) { return Arr::has($route, "bindings.{$param}") ? ['name' => $param, 'binding' => $route['bindings'][$param]] : ['name' => $param]; diff --git a/src/Ziggy.php b/src/Ziggy.php index edbd4ac2..f2cdae75 100644 --- a/src/Ziggy.php +++ b/src/Ziggy.php @@ -140,8 +140,8 @@ private function nameKeyedRoutes() return $routes->map(function ($route) use ($bindings) { return collect($route)->only(['uri', 'methods', 'wheres']) ->put('domain', $route->domain()) + ->put('parameters', $route->parameterNames()) ->put('bindings', $bindings[$route->getName()] ?? []) - ->put('parameterNames', $route->parameterNames()) ->when($middleware = config('ziggy.middleware'), function ($collection) use ($middleware, $route) { if (is_array($middleware)) { return $collection->put('middleware', collect($route->middleware())->intersect($middleware)->values()->all()); diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 64b8dd91..01617363 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -111,8 +111,8 @@ interface Route { uri: string, methods: ('GET' | 'HEAD' | 'POST' | 'PATCH' | 'PUT' | 'OPTIONS' | 'DELETE')[], domain?: string, + parameters?: string[], bindings?: Record, - parameterNames?: string[], wheres?: Record, middleware?: string[], } diff --git a/tests/Unit/BladeRouteGeneratorTest.php b/tests/Unit/BladeRouteGeneratorTest.php index fada23e3..2d89aacf 100644 --- a/tests/Unit/BladeRouteGeneratorTest.php +++ b/tests/Unit/BladeRouteGeneratorTest.php @@ -69,7 +69,7 @@ public function can_generate_routes_for_default_domain() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], ]; @@ -90,7 +90,7 @@ public function can_generate_routes_for_custom_domain() 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], 'domain' => '{account}.myapp.com', - 'parameterNames' => ['account', 'post'], + 'parameters' => ['account', 'post'], ], ]; diff --git a/tests/Unit/RouteModelBindingTest.php b/tests/Unit/RouteModelBindingTest.php index d7f5298f..79b45ccf 100644 --- a/tests/Unit/RouteModelBindingTest.php +++ b/tests/Unit/RouteModelBindingTest.php @@ -58,10 +58,10 @@ public function can_register_implicit_route_model_bindings() 'users' => [ 'uri' => 'users/{user}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['user'], 'bindings' => [ 'user' => 'uuid', ], - 'parameterNames' => ['user'], ], ]; @@ -75,10 +75,10 @@ public function register_inherited_custom_route_key_name() 'admins' => [ 'uri' => 'admins/{admin}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['admin'], 'bindings' => [ 'admin' => 'uuid', ], - 'parameterNames' => ['admin'], ], ]; @@ -92,7 +92,7 @@ public function can_ignore_route_parameters_not_bound_to_eloquent_models() 'tokens' => [ 'uri' => 'tokens/{token}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['token'], + 'parameters' => ['token'], ], ], (new Ziggy)->filter(['tokens'])->toArray()['routes']); } @@ -115,10 +115,10 @@ public function can_handle_bound_and_unbound_parameters_in_the_same_route() 'users.numbers' => [ 'uri' => 'users/{user}/{number}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['user', 'number'], 'bindings' => [ 'user' => 'uuid', ], - 'parameterNames' => ['user', 'number'], ], ]; @@ -136,21 +136,21 @@ public function can_handle_multiple_scoped_bindings() 'posts' => [ 'uri' => 'blog/{category}/{post}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['category', 'post'], 'bindings' => [ 'category' => 'id', 'post' => 'slug', ], - 'parameterNames' => ['category', 'post'], ], 'posts.tags' => [ 'uri' => 'blog/{category}/{post}/{tag}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['category', 'post', 'tag'], 'bindings' => [ 'category' => 'id', 'post' => 'slug', 'tag' => 'slug', ], - 'parameterNames' => ['category', 'post', 'tag'], ], ], (new Ziggy)->filter('posts*')->toArray()['routes']); } @@ -166,39 +166,39 @@ public function can_merge_implicit_and_scoped_bindings() 'users' => [ 'uri' => 'users/{user}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['user'], 'bindings' => [ 'user' => 'uuid', ], - 'parameterNames' => ['user'], ], 'admins' => [ 'uri' => 'admins/{admin}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['admin'], 'bindings' => [ 'admin' => 'uuid', ], - 'parameterNames' => ['admin'], ], 'tags' => [ 'uri' => 'tags/{tag}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['tag'], 'bindings' => [ 'tag' => 'id', ], - 'parameterNames' => ['tag'], ], 'tokens' => [ 'uri' => 'tokens/{token}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['token'], + 'parameters' => ['token'], ], 'users.numbers' => [ 'uri' => 'users/{user}/{number}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['user', 'number'], 'bindings' => [ 'user' => 'uuid', ], - 'parameterNames' => ['user', 'number'], ], 'users.store' => [ 'uri' => 'users', @@ -207,37 +207,37 @@ public function can_merge_implicit_and_scoped_bindings() 'comments' => [ 'uri' => 'comments/{comment}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['comment'], 'bindings' => [ 'comment' => 'uuid', ], - 'parameterNames' => ['comment'], ], 'replies' => [ 'uri' => 'replies/{reply}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['reply'], 'bindings' => [ 'reply' => 'uuid', ], - 'parameterNames' => ['reply'], ], 'posts' => [ 'uri' => 'blog/{category}/{post}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['category', 'post'], 'bindings' => [ 'category' => 'id', 'post' => 'slug', ], - 'parameterNames' => ['category', 'post'], ], 'posts.tags' => [ 'uri' => 'blog/{category}/{post}/{tag}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['category', 'post', 'tag'], 'bindings' => [ 'category' => 'id', 'post' => 'slug', 'tag' => 'slug', ], - 'parameterNames' => ['category', 'post', 'tag'], ], ], (new Ziggy)->toArray()['routes']); } @@ -249,7 +249,7 @@ public function can_include_bindings_in_json() $this->markTestSkipped('Requires Laravel >=7'); } - $json = '{"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"users":{"uri":"users\/{user}","methods":["GET","HEAD"],"bindings":{"user":"uuid"},"parameterNames":["user"]},"admins":{"uri":"admins\/{admin}","methods":["GET","HEAD"],"bindings":{"admin":"uuid"},"parameterNames":["admin"]},"tags":{"uri":"tags\/{tag}","methods":["GET","HEAD"],"bindings":{"tag":"id"},"parameterNames":["tag"]},"tokens":{"uri":"tokens\/{token}","methods":["GET","HEAD"],"parameterNames":["token"]},"users.numbers":{"uri":"users\/{user}\/{number}","methods":["GET","HEAD"],"bindings":{"user":"uuid"},"parameterNames":["user","number"]},"users.store":{"uri":"users","methods":["POST"]},"comments":{"uri":"comments\/{comment}","methods":["GET","HEAD"],"bindings":{"comment":"uuid"},"parameterNames":["comment"]},"replies":{"uri":"replies\/{reply}","methods":["GET","HEAD"],"bindings":{"reply":"uuid"},"parameterNames":["reply"]},"posts":{"uri":"blog\/{category}\/{post}","methods":["GET","HEAD"],"bindings":{"category":"id","post":"slug"},"parameterNames":["category","post"]},"posts.tags":{"uri":"blog\/{category}\/{post}\/{tag}","methods":["GET","HEAD"],"bindings":{"category":"id","post":"slug","tag":"slug"},"parameterNames":["category","post","tag"]}}}'; + $json = '{"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"users":{"uri":"users\/{user}","methods":["GET","HEAD"],"parameters":["user"],"bindings":{"user":"uuid"}},"admins":{"uri":"admins\/{admin}","methods":["GET","HEAD"],"parameters":["admin"],"bindings":{"admin":"uuid"}},"tags":{"uri":"tags\/{tag}","methods":["GET","HEAD"],"parameters":["tag"],"bindings":{"tag":"id"}},"tokens":{"uri":"tokens\/{token}","methods":["GET","HEAD"],"parameters":["token"]},"users.numbers":{"uri":"users\/{user}\/{number}","methods":["GET","HEAD"],"parameters":["user","number"],"bindings":{"user":"uuid"}},"users.store":{"uri":"users","methods":["POST"]},"comments":{"uri":"comments\/{comment}","methods":["GET","HEAD"],"parameters":["comment"],"bindings":{"comment":"uuid"}},"replies":{"uri":"replies\/{reply}","methods":["GET","HEAD"],"parameters":["reply"],"bindings":{"reply":"uuid"}},"posts":{"uri":"blog\/{category}\/{post}","methods":["GET","HEAD"],"parameters":["category","post"],"bindings":{"category":"id","post":"slug"}},"posts.tags":{"uri":"blog\/{category}\/{post}\/{tag}","methods":["GET","HEAD"],"parameters":["category","post","tag"],"bindings":{"category":"id","post":"slug","tag":"slug"}}}}'; $this->assertSame($json, (new Ziggy)->toJson()); } @@ -274,10 +274,10 @@ public function can_handle_abstract_classes_in_route_model_bindings() $this->assertSame([ 'uri' => 'models/{model}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['model'], 'bindings' => [ 'model' => 'id', ], - 'parameterNames' => ['model'], ], (new Ziggy)->toArray()['routes']['models']); } @@ -288,10 +288,10 @@ public function can_use_custom_primary_key() 'comments' => [ 'uri' => 'comments/{comment}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['comment'], 'bindings' => [ 'comment' => 'uuid', ], - 'parameterNames' => ['comment'], ], ]; @@ -305,10 +305,10 @@ public function can_use_get_key_name() 'replies' => [ 'uri' => 'replies/{reply}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['reply'], 'bindings' => [ 'reply' => 'uuid', ], - 'parameterNames' => ['reply'], ], ]; diff --git a/tests/Unit/ZiggyTest.php b/tests/Unit/ZiggyTest.php index 22f9ea17..f958313f 100644 --- a/tests/Unit/ZiggyTest.php +++ b/tests/Unit/ZiggyTest.php @@ -36,10 +36,10 @@ protected function addPostCommentsRouteWithBindings(array &$routes): void $routes['postComments.show'] = [ 'uri' => 'posts/{post}/comments/{comment}', 'methods' => ['GET', 'HEAD'], + 'parameters' => ['post', 'comment'], 'bindings' => [ 'comment' => 'uuid', ], - 'parameterNames' => ['post', 'comment'], ]; } } @@ -58,7 +58,7 @@ public function can_filter_to_only_include_routes_matching_a_pattern() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -83,7 +83,7 @@ public function can_filter_to_exclude_routes_matching_a_pattern() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], ]; @@ -106,7 +106,7 @@ public function can_set_included_routes_using_only_config() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -131,7 +131,7 @@ public function can_set_excluded_routes_using_except_config() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], ]; @@ -161,12 +161,12 @@ public function returns_unfiltered_routes_when_both_only_and_except_configs_set( 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -201,7 +201,7 @@ public function can_set_included_routes_using_groups_config() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -230,7 +230,7 @@ public function can_include_routes_from_multiple_groups() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -267,7 +267,7 @@ public function can_combine_filters_in_groups_with_positive_and_negative_pattern 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -288,7 +288,7 @@ public function can_filter_routes_from_multiple_groups_using_negative_patterns() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'admin.users.index' => [ 'uri' => 'admin/users', @@ -319,12 +319,12 @@ public function can_ignore_passed_group_not_set_in_config() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -359,12 +359,12 @@ public function can_include_middleware() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -451,12 +451,12 @@ public function can_include_only_middleware_set_in_config() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -495,12 +495,12 @@ public function can_order_fallback_routes_last() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -525,7 +525,7 @@ public function can_order_fallback_routes_last() 'wheres' => [ 'fallbackPlaceholder' => '.*', ], - 'parameterNames' => ['fallbackPlaceholder'], + 'parameters' => ['fallbackPlaceholder'], ]; $this->assertSame($expected, $routes); @@ -552,12 +552,12 @@ public function route_payload_can_array_itself() 'posts.show' => [ 'uri' => 'posts/{post}', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], 'posts.store' => [ 'uri' => 'posts', @@ -588,19 +588,19 @@ public function route_payload_can_json_itself() 'postComments.index' => [ 'uri' => 'posts/{post}/comments', 'methods' => ['GET', 'HEAD'], - 'parameterNames' => ['post'], + 'parameters' => ['post'], ], ], ]; $this->addPostCommentsRouteWithBindings($expected['routes']); - $json = '{"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]}}}'; + $json = '{"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameters":["post"]}}}'; if ($this->laravelVersion(7)) { $json = str_replace( '}}}', - '},"postComments.show":{"uri":"posts\/{post}\/comments\/{comment}","methods":["GET","HEAD"],"bindings":{"comment":"uuid"},"parameterNames":["post","comment"]}}}', + '},"postComments.show":{"uri":"posts\/{post}\/comments\/{comment}","methods":["GET","HEAD"],"parameters":["post","comment"],"bindings":{"comment":"uuid"}}}}', $json, ); } @@ -706,7 +706,7 @@ public function numeric_route_names() 'wheres' => [ 'fallbackPlaceholder' => '.*', ], - 'parameterNames' => ['fallbackPlaceholder'], + 'parameters' => ['fallbackPlaceholder'], ], ], (new Ziggy)->toArray()['routes']); } diff --git a/tests/fixtures/custom-pathname.js b/tests/fixtures/custom-pathname.js index a42f06d8..cf24e437 100644 --- a/tests/fixtures/custom-pathname.js +++ b/tests/fixtures/custom-pathname.js @@ -1,4 +1,4 @@ -const Ziggy = {"url":"http:\/\/ziggy.dev\/foo\/bar","port":null,"defaults":{"locale":"en"},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]}}}; +const Ziggy = {"url":"http:\/\/ziggy.dev\/foo\/bar","port":null,"defaults":{"locale":"en"},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameters":["post"]}}}; if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') { Object.assign(Ziggy.routes, window.Ziggy.routes); diff --git a/tests/fixtures/custom-url.js b/tests/fixtures/custom-url.js index aaaf4f5c..7eb49756 100644 --- a/tests/fixtures/custom-url.js +++ b/tests/fixtures/custom-url.js @@ -1,4 +1,4 @@ -const Ziggy = {"url":"http:\/\/example.org","port":null,"defaults":{"locale":"en"},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]}}}; +const Ziggy = {"url":"http:\/\/example.org","port":null,"defaults":{"locale":"en"},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameters":["post"]}}}; if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') { Object.assign(Ziggy.routes, window.Ziggy.routes); diff --git a/tests/fixtures/ziggy-custom.js b/tests/fixtures/ziggy-custom.js index 98e91e40..80443fed 100644 --- a/tests/fixtures/ziggy-custom.js +++ b/tests/fixtures/ziggy-custom.js @@ -1,3 +1,3 @@ // This is a custom template -const Ziggy = {"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]}}}; +const Ziggy = {"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameters":["post"]}}}; export { Ziggy }; diff --git a/tests/fixtures/ziggy.js b/tests/fixtures/ziggy.js index 286c764e..c073d815 100644 --- a/tests/fixtures/ziggy.js +++ b/tests/fixtures/ziggy.js @@ -1,4 +1,4 @@ -const Ziggy = {"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameterNames":["post"]},"slashes":{"uri":"slashes\/{slug}","methods":["GET","HEAD"],"wheres":{"slug":".*"},"parameterNames":["slug"]}}}; +const Ziggy = {"url":"http:\/\/ziggy.dev","port":null,"defaults":{},"routes":{"postComments.index":{"uri":"posts\/{post}\/comments","methods":["GET","HEAD"],"parameters":["post"]},"slashes":{"uri":"slashes\/{slug}","methods":["GET","HEAD"],"wheres":{"slug":".*"},"parameters":["slug"]}}}; if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') { Object.assign(Ziggy.routes, window.Ziggy.routes); From a302ff085f84463729d44fadff7c29bba5f61d7f Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Wed, 4 Oct 2023 14:15:16 -0400 Subject: [PATCH 43/56] Wip --- README.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ed962976..b33c1ed2 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,9 @@ Ziggy supports all versions of Laravel from `5.4` onward, and all modern browser - [The `route()` helper](#the-route-helper) - [The `Router` class](#the-router-class) - [Route-model binding](#route-model-binding) - - [TypeScript support](#typescript-support) + - [TypeScript](#typescript) - [**Advanced Setup**](#advanced-setup) - [JavaScript frameworks](#javascript-frameworks) - - [TypeScript](#typescript) - [Vue](#vue) - [React](#react) - [SPAs or separate repos](#spas-or-separate-repos) @@ -286,9 +285,17 @@ route('authors.photos.show', [{ id: 1, name: 'Jacob' }, photo]); // 'https://ziggy.test/authors/1/photos/714b19e8-ac5e-4dab-99ba-34dc6fdd24a5' ``` -#### TypeScript support +#### TypeScript + +> **This functionality is currently experimental.** + +Ziggy includes TypeScript type definitions, and a helper command that can generate additional type definitions to enable route name and parameter autocompletion. + +To generate the route types, run Ziggy's Artisan command with the `--types` or `--types-only` option: -Unofficial TypeScript type definitions for Ziggy are maintained by [benallfree](https://github.com/benallfree) as part of [Definitely Typed](https://github.com/DefinitelyTyped/DefinitelyTyped), and can be installed with `npm install @types/ziggy-js`. +```bash +php artisan ziggy:generate --types +``` ## Advanced Setup @@ -360,18 +367,6 @@ import { Ziggy } from './ziggy'; route('home', undefined, undefined, Ziggy); ``` -#### TypeScript - -> **This functionality is currently experimental.** - -Ziggy includes TypeScript type definitions, and a helper command that can generate additional type definitions to enable route name and parameter autocompletion. - -To generate the route types, run Ziggy's Artisan command with the `--types` or `--types-only` option: - -```bash -php artisan ziggy:generate --types -``` - #### Vue Ziggy includes a Vue plugin to make it easy to use the `route()` helper throughout your Vue app: From 643f265957dd8c0fcbb3154f7134cd8e28e7f839 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Wed, 4 Oct 2023 14:27:09 -0400 Subject: [PATCH 44/56] Update Readme --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index b33c1ed2..c4f8b4b5 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,28 @@ To generate the route types, run Ziggy's Artisan command with the `--types` or ` php artisan ziggy:generate --types ``` +To make your IDE aware that Ziggy's `route()` helper is available globally, and to type it correctly, add a declaration like this in a `.d.ts` file somewhere in your project: + +```ts +import routeFn from 'ziggy-js'; + +declare global { + var route: typeof routeFn; +} +``` + +If you don't have Ziggy's NPM package installed, add the following to your `jsconfig.json` or `tsconfig.json` to load Ziggy's types from the Composer vendor directory: + +```json +{ + "compilerOptions": { + "paths": { + "ziggy-js": ["./vendor/tightenco/ziggy"] + } + } +} +``` + ## Advanced Setup #### JavaScript frameworks From 7934b8f98dbe43b7393aaab317a4441edcd062f6 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Wed, 4 Oct 2023 18:00:34 -0400 Subject: [PATCH 45/56] Fix type output --- src/Output/Types.php | 2 +- tests/fixtures/ziggy-7.d.ts | 2 +- tests/fixtures/ziggy.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Output/Types.php b/src/Output/Types.php index 831661bd..a411971d 100644 --- a/src/Output/Types.php +++ b/src/Output/Types.php @@ -28,7 +28,7 @@ public function __toString(): string return <<toJson(JSON_PRETTY_PRINT)} + interface RouteList {$routes->toJson(JSON_PRETTY_PRINT)} } export {}; diff --git a/tests/fixtures/ziggy-7.d.ts b/tests/fixtures/ziggy-7.d.ts index bb2e8c23..084b86f4 100644 --- a/tests/fixtures/ziggy-7.d.ts +++ b/tests/fixtures/ziggy-7.d.ts @@ -1,6 +1,6 @@ /* This file is generated automatically! */ declare module 'ziggy-js' { - interface RouteLookup { + interface RouteList { "posts.index": [], "postComments.show": [ { diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts index 19ef8cf2..f56ac559 100644 --- a/tests/fixtures/ziggy.d.ts +++ b/tests/fixtures/ziggy.d.ts @@ -1,6 +1,6 @@ /* This file is generated automatically! */ declare module 'ziggy-js' { - interface RouteLookup { + interface RouteList { "posts.index": [], "postComments.store": [ { From f7b245baef29d9a3c1521c2a2340e07c773d405f Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Wed, 4 Oct 2023 18:11:29 -0400 Subject: [PATCH 46/56] Wip --- README.md | 2 -- src/Output/Types.php | 2 +- src/js/index.d.ts | 8 -------- tests/fixtures/ziggy-7.d.ts | 2 +- tests/fixtures/ziggy.d.ts | 2 +- 5 files changed, 3 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c4f8b4b5..e367cf6b 100644 --- a/README.md +++ b/README.md @@ -287,8 +287,6 @@ route('authors.photos.show', [{ id: 1, name: 'Jacob' }, photo]); #### TypeScript -> **This functionality is currently experimental.** - Ziggy includes TypeScript type definitions, and a helper command that can generate additional type definitions to enable route name and parameter autocompletion. To generate the route types, run Ziggy's Artisan command with the `--types` or `--types-only` option: diff --git a/src/Output/Types.php b/src/Output/Types.php index a411971d..45ba303c 100644 --- a/src/Output/Types.php +++ b/src/Output/Types.php @@ -26,7 +26,7 @@ public function __toString(): string }); return <<toJson(JSON_PRETTY_PRINT)} } diff --git a/src/js/index.d.ts b/src/js/index.d.ts index 01617363..c95870c2 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -142,8 +142,6 @@ interface Router { has(name: T): boolean, } -// For the best autocomplete experience, the order of these function overloads *does* matter - /** * Ziggy's route helper. */ @@ -163,9 +161,3 @@ export default function route( absolute?: boolean, config?: Config, ): Router; - -// NOTES -// - The `route()` function above and the `RouteList` interface at the top of this file are the only -// exports - this is intentional. The implementation of the types inside this file is internal -// and experimental, and should be free to change as long as the externally visible behaviour -// stays the same. diff --git a/tests/fixtures/ziggy-7.d.ts b/tests/fixtures/ziggy-7.d.ts index 084b86f4..c71ee83b 100644 --- a/tests/fixtures/ziggy-7.d.ts +++ b/tests/fixtures/ziggy-7.d.ts @@ -1,4 +1,4 @@ -/* This file is generated automatically! */ +/* This file is generated by Ziggy. */ declare module 'ziggy-js' { interface RouteList { "posts.index": [], diff --git a/tests/fixtures/ziggy.d.ts b/tests/fixtures/ziggy.d.ts index f56ac559..90ea8c89 100644 --- a/tests/fixtures/ziggy.d.ts +++ b/tests/fixtures/ziggy.d.ts @@ -1,4 +1,4 @@ -/* This file is generated automatically! */ +/* This file is generated by Ziggy. */ declare module 'ziggy-js' { interface RouteList { "posts.index": [], From 638a4c0d8592af991514a6ab0b3b12c867fdc1f6 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 10:01:40 -0400 Subject: [PATCH 47/56] v1.8.0 --- CHANGELOG.md | 9 ++++++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71b12bb7..bcbda627 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ Breaking changes are marked with ⚠️. ## [Unreleased] +## [v1.8.0] - 2023-10-06 + +**Added** + +- Add type declarations and `ziggy.d.ts` generation by @lmeysel and @bakerkretzmar in https://github.com/tighten/ziggy/pull/664 + ## [v1.7.0] - 2023-10-04 **Added** @@ -299,7 +305,8 @@ Breaking changes are marked with ⚠️. For previous changes see the [Releases](https://github.com/tighten/ziggy/releases) page. -[Unreleased]: https://github.com/tighten/ziggy/compare/v1.7.0...HEAD +[Unreleased]: https://github.com/tighten/ziggy/compare/v1.8.0...HEAD +[v1.8.0]: https://github.com/tighten/ziggy/compare/v1.7.0...v1.8.0 [v1.7.0]: https://github.com/tighten/ziggy/compare/v1.6.2...v1.7.0 [v1.6.2]: https://github.com/tighten/ziggy/compare/v1.6.1...v1.6.2 [v1.6.1]: https://github.com/tighten/ziggy/compare/v1.6.0...v1.6.1 diff --git a/package-lock.json b/package-lock.json index c7be3767..1176639d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ziggy-js", - "version": "1.7.2", + "version": "1.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ziggy-js", - "version": "1.7.2", + "version": "1.8.0", "license": "MIT", "dependencies": { "qs": "~6.9.7" diff --git a/package.json b/package.json index a4d76d10..73252252 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ziggy-js", - "version": "1.7.2", + "version": "1.8.0", "description": "Use your Laravel named routes in JavaScript.", "keywords": [ "laravel", From 19fe661563a63c43dec21f43998b4239f7935c30 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 10:03:10 -0400 Subject: [PATCH 48/56] `npm pkg fix` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 73252252..d0205846 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "types": "src/js/index.d.ts", "repository": { "type": "git", - "url": "https://github.com/tighten/ziggy.git" + "url": "git+https://github.com/tighten/ziggy.git" }, "scripts": { "build": "microbundle --name route --format modern,es,umd --external none --no-sourcemap --no-generateTypes", From bca76ae4307a3761de97ca248b430b228f31c390 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 11:37:53 -0400 Subject: [PATCH 49/56] Replace Jest and related dependencies with Vitest and add real type tests --- .github/workflows/test.yml | 3 +- babel.config.js | 8 - package-lock.json | 3306 +++++++++++------------------------- package.json | 9 +- tests/js/route.test-d.ts | 80 + tests/js/route.test.js | 4 +- tests/js/types.ts | 79 - tsconfig.json | 1 + 8 files changed, 1043 insertions(+), 2447 deletions(-) delete mode 100644 babel.config.js create mode 100644 tests/js/route.test-d.ts delete mode 100644 tests/js/types.ts create mode 100644 tsconfig.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 37669d0c..88e012d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,4 +74,5 @@ jobs: composer update --prefer-dist --no-interaction - run: vendor/bin/phpunit --testdox --colors=always - run: npm ci && npm run build - - run: npm test + - run: npm run test + - run: npm run typecheck diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index ee4aae92..00000000 --- a/babel.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - env: { - test: { - presets: ['power-assert'], - plugins: ['@babel/plugin-transform-modules-commonjs'], - }, - }, -}; diff --git a/package-lock.json b/package-lock.json index 1176639d..93f337e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,11 +12,9 @@ "qs": "~6.9.7" }, "devDependencies": { - "babel-preset-power-assert": "^3.0.0", - "jest": "^29.0.3", - "jest-environment-jsdom": "^29.0.3", "microbundle": "^0.15.1", - "power-assert": "^1.6.1" + "typescript": "^5.2.2", + "vitest": "^1.0.0-beta.1" } }, "node_modules/@ampproject/remapping": { @@ -608,18 +606,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", @@ -857,21 +843,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", - "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", @@ -1955,310 +1926,365 @@ "node": ">=6.9.0" } }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/@jest/console": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.6.2.tgz", - "integrity": "sha512-0N0yZof5hi44HAR2pPS+ikJ3nzKNoZdVu8FffRf3wy47I7Dm7etk/3KetMdRUqzVd16V4O2m2ISpNTbnIuqy1w==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.6.2", - "jest-util": "^29.6.2", - "slash": "^3.0.0" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/core": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.6.2.tgz", - "integrity": "sha512-Oj+5B+sDMiMWLhPFF+4/DvHOf+U10rgvCLGPHP8Xlsy/7QxS51aU/eBngudHlJXnaWD5EohAgJ4js+T6pa+zOg==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@jest/console": "^29.6.2", - "@jest/reporters": "^29.6.2", - "@jest/test-result": "^29.6.2", - "@jest/transform": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.5.0", - "jest-config": "^29.6.2", - "jest-haste-map": "^29.6.2", - "jest-message-util": "^29.6.2", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.2", - "jest-resolve-dependencies": "^29.6.2", - "jest-runner": "^29.6.2", - "jest-runtime": "^29.6.2", - "jest-snapshot": "^29.6.2", - "jest-util": "^29.6.2", - "jest-validate": "^29.6.2", - "jest-watcher": "^29.6.2", - "micromatch": "^4.0.4", - "pretty-format": "^29.6.2", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node": ">=12" } }, - "node_modules/@jest/environment": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.6.2.tgz", - "integrity": "sha512-AEcW43C7huGd/vogTddNNTDRpO6vQ2zaQNrttvWV18ArBx9Z56h7BIsXkNFJVOO4/kblWEQz30ckw0+L3izc+Q==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-mock": "^29.6.2" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/expect": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.6.2.tgz", - "integrity": "sha512-m6DrEJxVKjkELTVAztTLyS/7C92Y2b0VYqmDROYKLLALHn8T/04yPs70NADUYPrV3ruI+H3J0iUIuhkjp7vkfg==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "expect": "^29.6.2", - "jest-snapshot": "^29.6.2" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/expect-utils": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.6.2.tgz", - "integrity": "sha512-6zIhM8go3RV2IG4aIZaZbxwpOzz3ZiM23oxAlkquOIole+G6TrbeXnykxWYlqF7kz2HlBjdKtca20x9atkEQYg==", + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "jest-get-type": "^29.4.3" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/fake-timers": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.6.2.tgz", - "integrity": "sha512-euZDmIlWjm1Z0lJ1D0f7a0/y5Kh/koLFMUBE5SUYWrmy8oNhJpbTBDAP6CxKnadcMLDoDf4waRYCe35cH6G6PA==", + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.6.2", - "jest-mock": "^29.6.2", - "jest-util": "^29.6.2" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/globals": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.6.2.tgz", - "integrity": "sha512-cjuJmNDjs6aMijCmSa1g2TNG4Lby/AeU7/02VtpW+SLcZXzOLK2GpN2nLqcFjmhy3B3AoPeQVx7BnyOf681bAw==", + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], "dev": true, - "dependencies": { - "@jest/environment": "^29.6.2", - "@jest/expect": "^29.6.2", - "@jest/types": "^29.6.1", - "jest-mock": "^29.6.2" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/reporters": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.6.2.tgz", - "integrity": "sha512-sWtijrvIav8LgfJZlrGCdN0nP2EWbakglJY49J1Y5QihcQLfy7ovyxxjJBRXMNltgt4uPtEcFmIMbVshEDfFWw==", + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.6.2", - "@jest/test-result": "^29.6.2", - "@jest/transform": "^29.6.2", - "@jest/types": "^29.6.1", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.6.2", - "jest-util": "^29.6.2", - "jest-worker": "^29.6.2", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "node": ">=12" } }, - "node_modules/@jest/schemas": { - "version": "29.6.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.0.tgz", - "integrity": "sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/source-map": { - "version": "29.6.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.0.tgz", - "integrity": "sha512-oA+I2SHHQGxDCZpbrsCQSoMLb3Bz547JnM+jUr9qEbuw0vQlWZfpPS7CO9J7XiwKicEz9OFn/IYoLkkiUD7bzA==", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/test-result": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.6.2.tgz", - "integrity": "sha512-3VKFXzcV42EYhMCsJQURptSqnyjqCGbtLuX5Xxb6Pm6gUf1wIRIl+mandIRGJyWKgNKYF9cnstti6Ls5ekduqw==", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], "dev": true, - "dependencies": { - "@jest/console": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/test-sequencer": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.6.2.tgz", - "integrity": "sha512-GVYi6PfPwVejO7slw6IDO0qKVum5jtrJ3KoLGbgBWyr2qr4GaxFV6su+ZAjdTX75Sr1DkMFRk09r2ZVa+wtCGw==", + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], "dev": true, - "dependencies": { - "@jest/test-result": "^29.6.2", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.2", - "slash": "^3.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" } }, - "node_modules/@jest/transform": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.6.2.tgz", - "integrity": "sha512-ZqCqEISr58Ce3U+buNFJYUktLJZOggfyvR+bZMaiV1e8B1SIvJbwZMrYz3gx/KAPn9EXmOmN+uB08yLCjWkQQg==", + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.1", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.2", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.6.2", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@jest/types": { - "version": "29.6.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.1.tgz", - "integrity": "sha512-tPKQNMPuXgvdOn2/Lg9HNfUvjYVGolt04Hp03f5hAk878uwOLikN+JzeLY0HcVgKgFl9Hs3EIqpu3WX27XNhnw==", + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "dependencies": { - "@jest/schemas": "^29.6.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@sinclair/typebox": "^0.27.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2448,24 +2474,6 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, - "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, "node_modules/@surma/rollup-plugin-off-main-thread": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz", @@ -2483,6 +2491,8 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 10" } @@ -2501,6 +2511,8 @@ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -2514,6 +2526,8 @@ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@babel/types": "^7.0.0" } @@ -2523,6 +2537,8 @@ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" @@ -2533,6 +2549,8 @@ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@babel/types": "^7.20.7" } @@ -2543,54 +2561,10 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, - "node_modules/@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jsdom": { - "version": "20.0.1", - "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", - "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/tough-cookie": "*", - "parse5": "^7.0.0" - } - }, - "node_modules/@types/node": { - "version": "20.4.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.7.tgz", - "integrity": "sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==", + "node_modules/@types/node": { + "version": "20.4.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.7.tgz", + "integrity": "sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==", "dev": true }, "node_modules/@types/parse-json": { @@ -2608,38 +2582,93 @@ "@types/node": "*" } }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true + "node_modules/@vitest/expect": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.0.0-beta.1.tgz", + "integrity": "sha512-FgpctOcKcHuroFgO5JMOpjk2F0YZvWH1cBPagoQcr0ckJUq3/V7udPxw7w/dBeyn/zqyhGfOzY4z9jLHaEbCqw==", + "dev": true, + "dependencies": { + "@vitest/spy": "1.0.0-beta.1", + "@vitest/utils": "1.0.0-beta.1", + "chai": "^4.3.10" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } }, - "node_modules/@types/tough-cookie": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", - "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", - "dev": true + "node_modules/@vitest/runner": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.0.0-beta.1.tgz", + "integrity": "sha512-TbZs0A58pNwELRseqkr//OmNy+8G027Lq1emqibMZ+jmDFd5d0QAWafwbNBXswhiYYZQxnQlcJPndkVyAsqP4g==", + "dev": true, + "dependencies": { + "@vitest/utils": "1.0.0-beta.1", + "p-limit": "^4.0.0", + "pathe": "^1.1.1" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } }, - "node_modules/@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "node_modules/@vitest/snapshot": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.0.0-beta.1.tgz", + "integrity": "sha512-3ZBkBJ7O0zLvvAdARD56Srfdk/sgROdBFCUnayGv1/L4ZkwB4GRRl+zuZdT/GhNDT1Q0NMBntbwyIrCSASpY/A==", "dev": true, "dependencies": { - "@types/yargs-parser": "*" + "magic-string": "^0.30.1", + "pathe": "^1.1.1", + "pretty-format": "^29.5.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true + "node_modules/@vitest/snapshot/node_modules/magic-string": { + "version": "0.30.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz", + "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@vitest/spy": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.0.0-beta.1.tgz", + "integrity": "sha512-oRUzAGwIVRxrIy/0HZHPEkftcTDWlgBk1tR5yBywOewUZTtoXACCpaaht4sY/DExcPbrsROhrJB4vw0d2Jittw==", + "dev": true, + "dependencies": { + "tinyspy": "^2.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.0.0-beta.1.tgz", + "integrity": "sha512-jfcqEzZamUA2Th76NVOHyRMAUIAuxMG9q+BstUbxzPQ9IkbCjz5GkhagPfy4r6zTFiElhX7mmPVj/nvB/Ea/bQ==", + "dev": true, + "dependencies": { + "diff-sequences": "^29.4.3", + "loupe": "^2.3.6", + "pretty-format": "^29.5.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/acorn": { "version": "8.10.0", @@ -2653,17 +2682,13 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-es7-plugin": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", - "integrity": "sha512-7D+8kscFMf6F2t+8ZRYmv82CncDZETsaZ4dEl5lh3qQez7FVABk2Vz616SAbnIq1PbNsLVaZjl2oSkk5BWAKng==", - "dev": true - }, "node_modules/acorn-globals": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "acorn": "^8.1.0", "acorn-walk": "^8.0.2" @@ -2683,6 +2708,8 @@ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "debug": "4" }, @@ -2690,21 +2717,6 @@ "node": ">= 6.0.0" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2729,28 +2741,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", @@ -2764,12 +2754,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha512-Ene1hbrinPZ1qPoZp7NSx4jQnh4nr7MtY78pHNb+yr8yHbxmTS7ChGW0a55JKA7TkRDeoQxK4GcJaCvBYplSKA==", - "dev": true - }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", @@ -2790,6 +2774,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", @@ -2800,7 +2793,9 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/asyncro": { "version": "3.0.0", @@ -2853,82 +2848,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-jest": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.2.tgz", - "integrity": "sha512-BYCzImLos6J3BH/+HvUCHG1dTf2MzmAB4jaVxHV+29RZLjR29XuYTmsf2sdDwkrb+FczkGo3kOhE7ga6sI0P4A==", - "dev": true, - "dependencies": { - "@jest/transform": "^29.6.2", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.5.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-empower-assert": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-empower-assert/-/babel-plugin-empower-assert-2.0.0.tgz", - "integrity": "sha512-xAzOOTEYIp8BnbHNmU7xKj7mePlPP3/bvFqcjBTeJBDzl+pne4ZjNcpOnaV6WUYnux3fcOOgRW622CsWlU4SGg==", - "dev": true, - "peerDependencies": { - "power-assert": "^1.0.0" - } - }, - "node_modules/babel-plugin-espower": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-3.0.1.tgz", - "integrity": "sha512-Ms49U7VIAtQ/TtcqRbD6UBmJBUCSxiC3+zPc+eGqxKUIFO1lTshyEDRUjhoAbd2rWfwYf3cZ62oXozrd8W6J0A==", - "dev": true, - "dependencies": { - "@babel/generator": "^7.0.0", - "@babel/parser": "^7.0.0", - "call-matcher": "^1.0.0", - "core-js": "^2.0.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.1.1" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", - "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/babel-plugin-macros": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", @@ -3001,56 +2920,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", - "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^29.5.0", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-power-assert": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-power-assert/-/babel-preset-power-assert-3.0.0.tgz", - "integrity": "sha512-StkhBJsKdLemlsujCWjuHjjd/h+u7L2bgb/9/YsgBj1FBnE0BUthyaY8Xdpiqthf3NUudhd8BJMZFjGtXVKE6A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "babel-plugin-empower-assert": "^2.0.0", - "babel-plugin-espower": "^3.0.0" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3073,18 +2942,6 @@ "concat-map": "0.0.1" } }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/brotli-size": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/brotli-size/-/brotli-size-4.0.0.tgz", @@ -3129,15 +2986,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "dependencies": { - "node-int64": "^0.4.0" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -3156,6 +3004,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -3169,27 +3026,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/call-matcher": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/call-matcher/-/call-matcher-1.1.0.tgz", - "integrity": "sha512-IoQLeNwwf9KTNbtSA7aEBb1yfDbdnzwjCetjkC8io5oGeOmK2CBNdg0xr+tadRYKO0p7uQyZzvon0kXlZbvGrw==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0", - "deep-equal": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.0.0" - } - }, - "node_modules/call-signature": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/call-signature/-/call-signature-0.0.2.tgz", - "integrity": "sha512-qvYvkAVcoae0obt8OsZn0VEBHeEpvYIZDy1gGYtZDJG0fHawew+Mi0dBjieFz8F8dzQ2Kr19+nsDm+T5XFVs+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -3199,15 +3035,6 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -3240,6 +3067,24 @@ } ] }, + "node_modules/chai": { + "version": "4.3.10", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.10.tgz", + "integrity": "sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.0.8" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -3256,36 +3101,18 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], + "dependencies": { + "get-func-name": "^2.0.2" + }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true - }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -3300,22 +3127,6 @@ "node": ">=12" } }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -3345,6 +3156,8 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -3391,20 +3204,6 @@ "node": ">=0.10.0" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true - }, "node_modules/core-js-compat": { "version": "3.32.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.32.0.tgz", @@ -3434,20 +3233,6 @@ "node": ">=10" } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/css-declaration-sorter": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz", @@ -3614,13 +3399,17 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/cssstyle": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "cssom": "~0.3.6" }, @@ -3632,13 +3421,17 @@ "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/data-urls": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "abab": "^2.0.6", "whatwg-mimetype": "^3.0.0", @@ -3669,37 +3462,20 @@ "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, - "node_modules/dedent": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" + "dependencies": { + "type-detect": "^4.0.0" }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, - "dependencies": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=6" } }, "node_modules/deepmerge": { @@ -3741,29 +3517,16 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=0.4.0" } }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/diff-match-patch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", - "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==", - "dev": true - }, "node_modules/diff-sequences": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", - "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -3809,6 +3572,8 @@ "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "webidl-conversions": "^7.0.0" }, @@ -3851,12 +3616,6 @@ "integrity": "sha512-sxNZ+ljy+RA1maXoUReeqBBpBC6RLKmg5ewzV+x+mSETmWNoKdZN6vcQjpFROemza23hGFskJtFNoUWUaQ+R4Q==", "dev": true }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, "node_modules/ejs": { "version": "3.1.9", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", @@ -3878,49 +3637,19 @@ "integrity": "sha512-1ndQ5IBNEnFirPwvyud69GHL+31FkE09gH/CJ6m3KCbkx3i0EVOrjwz4UNxRmN9H8OVHbC6vMRZGN1yCvjSs9w==", "dev": true }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/empower": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/empower/-/empower-1.3.1.tgz", - "integrity": "sha512-uB6/ViBaawOO/uujFADTK3SqdYlxYNn+N4usK9MRKZ4Hbn/1QSy8k2PezxCA2/+JGbF8vd/eOfghZ90oOSDZCA==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0", - "empower-core": "^1.2.0" - } - }, - "node_modules/empower-core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-1.2.0.tgz", - "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", - "dev": true, - "dependencies": { - "call-signature": "0.0.2", - "core-js": "^2.0.0" - } - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=0.12" }, @@ -4021,6 +3750,43 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esbuild": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -4047,6 +3813,8 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -4068,6 +3836,8 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=4.0" } @@ -4078,27 +3848,18 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "optional": true, + "peer": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/espower-location-detector": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/espower-location-detector/-/espower-location-detector-1.0.0.tgz", - "integrity": "sha512-Y/3H6ytYwqC3YcOc0gOU22Lp3eI5GAFGOymTdzFyfaiglKgtsw2dePOgXY3yrV+QcLPMPiVYwBU9RKaDoh2bbQ==", - "dev": true, - "dependencies": { - "is-url": "^1.2.1", - "path-is-absolute": "^1.0.0", - "source-map": "^0.5.0", - "xtend": "^4.0.0" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "optional": true, + "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -4107,24 +3868,6 @@ "node": ">=4" } }, - "node_modules/espurify": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.1.tgz", - "integrity": "sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -4146,70 +3889,6 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.6.2.tgz", - "integrity": "sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.6.2", - "@types/node": "*", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.6.2", - "jest-message-util": "^29.6.2", - "jest-util": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "dependencies": { - "bser": "2.1.1" - } - }, "node_modules/figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", @@ -4271,18 +3950,6 @@ "node": ">= 0.4.0" } }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -4342,6 +4009,8 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -4458,6 +4127,15 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", @@ -4473,27 +4151,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -4712,6 +4369,8 @@ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "whatwg-encoding": "^2.0.0" }, @@ -4719,17 +4378,13 @@ "node": ">=12" } }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, "node_modules/http-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -4744,6 +4399,8 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -4752,20 +4409,13 @@ "node": ">= 6" } }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -4840,40 +4490,6 @@ "node": ">=8" } }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==", - "dev": true - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -4904,22 +4520,6 @@ "node": ">= 0.4" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -5031,15 +4631,6 @@ "node": ">=8" } }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -5058,15 +4649,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/is-number-object": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", @@ -5086,7 +4668,9 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/is-reference": { "version": "1.2.1", @@ -5125,18 +4709,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", @@ -5182,12 +4754,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -5218,744 +4784,37 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "node_modules/jake": { + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", "dev": true, "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" + "bin": { + "jake": "bin/cli.js" }, "engines": { "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jake": { - "version": "10.8.7", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", - "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", - "dev": true, - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.6.2.tgz", - "integrity": "sha512-8eQg2mqFbaP7CwfsTpCxQ+sHzw1WuNWL5UUvjnWP4hx2riGz9fPSzYOaU5q8/GqWn1TfgZIVTqYJygbGbWAANg==", - "dev": true, - "dependencies": { - "@jest/core": "^29.6.2", - "@jest/types": "^29.6.1", - "import-local": "^3.0.2", - "jest-cli": "^29.6.2" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", - "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", - "dev": true, - "dependencies": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.6.2.tgz", - "integrity": "sha512-G9mN+KOYIUe2sB9kpJkO9Bk18J4dTDArNFPwoZ7WKHKel55eKIS/u2bLthxgojwlf9NLCVQfgzM/WsOVvoC6Fw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.6.2", - "@jest/expect": "^29.6.2", - "@jest/test-result": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.6.2", - "jest-matcher-utils": "^29.6.2", - "jest-message-util": "^29.6.2", - "jest-runtime": "^29.6.2", - "jest-snapshot": "^29.6.2", - "jest-util": "^29.6.2", - "p-limit": "^3.1.0", - "pretty-format": "^29.6.2", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.6.2.tgz", - "integrity": "sha512-TT6O247v6dCEX2UGHGyflMpxhnrL0DNqP2fRTKYm3nJJpCTfXX3GCMQPGFjXDoj0i5/Blp3jriKXFgdfmbYB6Q==", - "dev": true, - "dependencies": { - "@jest/core": "^29.6.2", - "@jest/test-result": "^29.6.2", - "@jest/types": "^29.6.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.6.2", - "jest-util": "^29.6.2", - "jest-validate": "^29.6.2", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.6.2.tgz", - "integrity": "sha512-VxwFOC8gkiJbuodG9CPtMRjBUNZEHxwfQXmIudSTzFWxaci3Qub1ddTRbFNQlD/zUeaifLndh/eDccFX4wCMQw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.6.2", - "@jest/types": "^29.6.1", - "babel-jest": "^29.6.2", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.6.2", - "jest-environment-node": "^29.6.2", - "jest-get-type": "^29.4.3", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.2", - "jest-runner": "^29.6.2", - "jest-util": "^29.6.2", - "jest-validate": "^29.6.2", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.6.2", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.6.2.tgz", - "integrity": "sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.4.3", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", - "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.6.2.tgz", - "integrity": "sha512-MsrsqA0Ia99cIpABBc3izS1ZYoYfhIy0NNWqPSE0YXbQjwchyt6B1HD2khzyPe1WiJA7hbxXy77ZoUQxn8UlSw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "jest-util": "^29.6.2", - "pretty-format": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-jsdom": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.6.2.tgz", - "integrity": "sha512-7oa/+266AAEgkzae8i1awNEfTfjwawWKLpiw2XesZmaoVVj9u9t8JOYx18cG29rbPNtkUlZ8V4b5Jb36y/VxoQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.6.2", - "@jest/fake-timers": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/jsdom": "^20.0.0", - "@types/node": "*", - "jest-mock": "^29.6.2", - "jest-util": "^29.6.2", - "jsdom": "^20.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jest-environment-node": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.6.2.tgz", - "integrity": "sha512-YGdFeZ3T9a+/612c5mTQIllvWkddPbYcN2v95ZH24oWMbGA4GGS2XdIF92QMhUhvrjjuQWYgUGW2zawOyH63MQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.6.2", - "@jest/fake-timers": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-mock": "^29.6.2", - "jest-util": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", - "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.6.2.tgz", - "integrity": "sha512-+51XleTDAAysvU8rT6AnS1ZJ+WHVNqhj1k6nTvN2PYP+HjU3kqlaKQ1Lnw3NYW3bm2r8vq82X0Z1nDDHZMzHVA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.6.2", - "jest-worker": "^29.6.2", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.6.2.tgz", - "integrity": "sha512-aNqYhfp5uYEO3tdWMb2bfWv6f0b4I0LOxVRpnRLAeque2uqOVVMLh6khnTcE2qJ5wAKop0HcreM1btoysD6bPQ==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.6.2.tgz", - "integrity": "sha512-4LiAk3hSSobtomeIAzFTe+N8kL6z0JtF3n6I4fg29iIW7tt99R7ZcIFW34QkX+DuVrf+CUe6wuVOpm7ZKFJzZQ==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.6.2", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.6.2.tgz", - "integrity": "sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.6.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.6.2.tgz", - "integrity": "sha512-hoSv3lb3byzdKfwqCuT6uTscan471GUECqgNYykg6ob0yiAw3zYc7OrPnI9Qv8Wwoa4lC7AZ9hyS4AiIx5U2zg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "jest-util": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", - "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.6.2.tgz", - "integrity": "sha512-G/iQUvZWI5e3SMFssc4ug4dH0aZiZpsDq9o1PtXTV1210Ztyb2+w+ZgQkB3iOiC5SmAEzJBOHWz6Hvrd+QnNPw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.2", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.6.2", - "jest-validate": "^29.6.2", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.6.2.tgz", - "integrity": "sha512-LGqjDWxg2fuQQm7ypDxduLu/m4+4Lb4gczc13v51VMZbVP5tSBILqVx8qfWcsdP8f0G7aIqByIALDB0R93yL+w==", - "dev": true, - "dependencies": { - "jest-regex-util": "^29.4.3", - "jest-snapshot": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.6.2.tgz", - "integrity": "sha512-wXOT/a0EspYgfMiYHxwGLPCZfC0c38MivAlb2lMEAlwHINKemrttu1uSbcGbfDV31sFaPWnWJPmb2qXM8pqZ4w==", - "dev": true, - "dependencies": { - "@jest/console": "^29.6.2", - "@jest/environment": "^29.6.2", - "@jest/test-result": "^29.6.2", - "@jest/transform": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.4.3", - "jest-environment-node": "^29.6.2", - "jest-haste-map": "^29.6.2", - "jest-leak-detector": "^29.6.2", - "jest-message-util": "^29.6.2", - "jest-resolve": "^29.6.2", - "jest-runtime": "^29.6.2", - "jest-util": "^29.6.2", - "jest-watcher": "^29.6.2", - "jest-worker": "^29.6.2", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.6.2.tgz", - "integrity": "sha512-2X9dqK768KufGJyIeLmIzToDmsN0m7Iek8QNxRSI/2+iPFYHF0jTwlO3ftn7gdKd98G/VQw9XJCk77rbTGZnJg==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.6.2", - "@jest/fake-timers": "^29.6.2", - "@jest/globals": "^29.6.2", - "@jest/source-map": "^29.6.0", - "@jest/test-result": "^29.6.2", - "@jest/transform": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.6.2", - "jest-message-util": "^29.6.2", - "jest-mock": "^29.6.2", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.6.2", - "jest-snapshot": "^29.6.2", - "jest-util": "^29.6.2", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.6.2.tgz", - "integrity": "sha512-1OdjqvqmRdGNvWXr/YZHuyhh5DeaLp1p/F8Tht/MrMw4Kr1Uu/j4lRG+iKl1DAqUJDWxtQBMk41Lnf/JETYBRA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.6.2", - "@jest/transform": "^29.6.2", - "@jest/types": "^29.6.1", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.6.2", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.6.2", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.6.2", - "jest-message-util": "^29.6.2", - "jest-util": "^29.6.2", - "natural-compare": "^1.4.0", - "pretty-format": "^29.6.2", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/jest-util": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.6.2.tgz", - "integrity": "sha512-3eX1qb6L88lJNCFlEADKOkjpXJQyZRiavX1INZ4tRnrBVr2COd3RgcTLyUiEXMNBlDU/cgYq6taUS0fExrWW4w==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.6.2.tgz", - "integrity": "sha512-vGz0yMN5fUFRRbpJDPwxMpgSXW1LDKROHfBopAvDcmD6s+B/s8WJrwi+4bfH4SdInBA5C3P3BI19dBtKzx1Arg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.1", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "leven": "^3.1.0", - "pretty-format": "^29.6.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.6.2.tgz", - "integrity": "sha512-GZitlqkMkhkefjfN/p3SJjrDaxPflqxEAv3/ik10OirZqJGYH5rPiIsgVcfof0Tdqg3shQGdEIxDBx+B4tuLzA==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.6.2", - "@jest/types": "^29.6.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.6.2", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.6.2.tgz", - "integrity": "sha512-l3ccBOabTdkng8I/ORCkADz4eSMKejTYv1vB/Z83UiubqhC1oQ5Li6dWCyqOIvSifGjUBxuvxvlm6KGK2DtuAQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "jest-util": "^29.6.2", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsdom": { - "version": "20.0.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", - "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/jsdom": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", + "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "abab": "^2.0.6", "acorn": "^8.8.1", @@ -6026,6 +4885,12 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -6047,15 +4912,6 @@ "node": ">=6" } }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -6080,6 +4936,18 @@ "node": ">= 12.13.0" } }, + "node_modules/local-pkg": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", + "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -6122,6 +4990,15 @@ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, + "node_modules/loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -6132,69 +5009,12 @@ } }, "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, "dependencies": { - "tmpl": "1.0.5" + "sourcemap-codec": "^1.4.8" } }, "node_modules/maxmin": { @@ -6377,17 +5197,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "node_modules/microbundle/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=8.6" + "node": ">=4.2.0" } }, "node_modules/mime-db": { @@ -6395,6 +5215,8 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 0.6" } @@ -6404,6 +5226,8 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "mime-db": "1.52.0" }, @@ -6411,15 +5235,6 @@ "node": ">= 0.6" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6432,6 +5247,18 @@ "node": "*" } }, + "node_modules/mlly": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", + "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "dev": true, + "dependencies": { + "acorn": "^8.10.0", + "pathe": "^1.1.1", + "pkg-types": "^1.0.3", + "ufo": "^1.3.0" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -6465,33 +5292,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, "node_modules/node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", @@ -6513,18 +5319,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", @@ -6550,7 +5344,9 @@ "version": "2.2.7", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/object-assign": { "version": "4.1.1", @@ -6570,22 +5366,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -6622,21 +5402,6 @@ "wrappy": "1" } }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/open": { "version": "8.4.2", "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", @@ -6664,15 +5429,15 @@ } }, "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "yocto-queue": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6777,6 +5542,8 @@ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "entities": "^4.4.0" }, @@ -6802,15 +5569,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -6826,6 +5584,21 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", + "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", + "dev": true + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -6856,15 +5629,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -6877,6 +5641,17 @@ "node": ">=8" } }, + "node_modules/pkg-types": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz", + "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==", + "dev": true, + "dependencies": { + "jsonc-parser": "^3.2.0", + "mlly": "^1.2.0", + "pathe": "^1.1.0" + } + }, "node_modules/postcss": { "version": "8.4.27", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", @@ -7436,138 +6211,6 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, - "node_modules/power-assert": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.6.1.tgz", - "integrity": "sha512-VWkkZV6Y+W8qLX/PtJu2Ur2jDPIs0a5vbP0TpKeybNcIXmT4vcKoVkyTp5lnQvTpY/DxacAZ4RZisHRHLJcAZQ==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.2", - "empower": "^1.3.1", - "power-assert-formatter": "^1.4.1", - "universal-deep-strict-equal": "^1.2.1", - "xtend": "^4.0.0" - } - }, - "node_modules/power-assert-context-formatter": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-formatter/-/power-assert-context-formatter-1.2.0.tgz", - "integrity": "sha512-HLNEW8Bin+BFCpk/zbyKwkEu9W8/zThIStxGo7weYcFkKgMuGCHUJhvJeBGXDZf0Qm2xis4pbnnciGZiX0EpSg==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0", - "power-assert-context-traversal": "^1.2.0" - } - }, - "node_modules/power-assert-context-reducer-ast": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-reducer-ast/-/power-assert-context-reducer-ast-1.2.0.tgz", - "integrity": "sha512-EgOxmZ/Lb7tw4EwSKX7ZnfC0P/qRZFEG28dx/690qvhmOJ6hgThYFm5TUWANDLK5NiNKlPBi5WekVGd2+5wPrw==", - "dev": true, - "dependencies": { - "acorn": "^5.0.0", - "acorn-es7-plugin": "^1.0.12", - "core-js": "^2.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.2.0" - } - }, - "node_modules/power-assert-context-reducer-ast/node_modules/acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/power-assert-context-traversal": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-context-traversal/-/power-assert-context-traversal-1.2.0.tgz", - "integrity": "sha512-NFoHU6g2umNajiP2l4qb0BRWD773Aw9uWdWYH9EQsVwIZnog5bd2YYLFCVvaxWpwNzWeEfZIon2xtyc63026pQ==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0", - "estraverse": "^4.1.0" - } - }, - "node_modules/power-assert-formatter": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/power-assert-formatter/-/power-assert-formatter-1.4.1.tgz", - "integrity": "sha512-c2QzTk1a6BUumuzjffFUrsMlx2gqLEoeEMrx6gVaHzQ/zTBTibQGblaQslbv72eq9RJNFQXRryjTHoffIEz+ww==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0", - "power-assert-context-formatter": "^1.0.7", - "power-assert-context-reducer-ast": "^1.0.7", - "power-assert-renderer-assertion": "^1.0.7", - "power-assert-renderer-comparison": "^1.0.7", - "power-assert-renderer-diagram": "^1.0.7", - "power-assert-renderer-file": "^1.0.7" - } - }, - "node_modules/power-assert-renderer-assertion": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-assertion/-/power-assert-renderer-assertion-1.2.0.tgz", - "integrity": "sha512-3F7Q1ZLmV2ZCQv7aV7NJLNK9G7QsostrhOU7U0RhEQS/0vhEqrRg2jEJl1jtUL4ZyL2dXUlaaqrmPv5r9kRvIg==", - "dev": true, - "dependencies": { - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0" - } - }, - "node_modules/power-assert-renderer-base": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/power-assert-renderer-base/-/power-assert-renderer-base-1.1.1.tgz", - "integrity": "sha512-aGCUi0NuNd/fVS6KKMLTjRP58cdlHlQKgXV4WKl3YlUhnN0d9QBEYOyvmiumdjk+5GuZmozvEmBIcTAcxEZqnw==", - "dev": true - }, - "node_modules/power-assert-renderer-comparison": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-comparison/-/power-assert-renderer-comparison-1.2.0.tgz", - "integrity": "sha512-7c3RKPDBKK4E3JqdPtYRE9cM8AyX4LC4yfTvvTYyx8zSqmT5kJnXwzR0yWQLOavACllZfwrAGQzFiXPc5sWa+g==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0", - "diff-match-patch": "^1.0.0", - "power-assert-renderer-base": "^1.1.1", - "stringifier": "^1.3.0", - "type-name": "^2.0.1" - } - }, - "node_modules/power-assert-renderer-diagram": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-diagram/-/power-assert-renderer-diagram-1.2.0.tgz", - "integrity": "sha512-JZ6PC+DJPQqfU6dwSmpcoD7gNnb/5U77bU5KgNwPPa+i1Pxiz6UuDeM3EUBlhZ1HvH9tMjI60anqVyi5l2oNdg==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0", - "power-assert-renderer-base": "^1.1.1", - "power-assert-util-string-width": "^1.2.0", - "stringifier": "^1.3.0" - } - }, - "node_modules/power-assert-renderer-file": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-renderer-file/-/power-assert-renderer-file-1.2.0.tgz", - "integrity": "sha512-/oaVrRbeOtGoyyd7e4IdLP/jIIUFJdqJtsYzP9/88R39CMnfF/S/rUc8ZQalENfUfQ/wQHu+XZYRMaCEZmEesg==", - "dev": true, - "dependencies": { - "power-assert-renderer-base": "^1.1.1" - } - }, - "node_modules/power-assert-util-string-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/power-assert-util-string-width/-/power-assert-util-string-width-1.2.0.tgz", - "integrity": "sha512-lX90G0igAW0iyORTILZ/QjZWsa1MZ6VVY3L0K86e2eKun3S4LKPH4xZIl8fdeMYLfOjkaszbNSzf1uugLeAm2A==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0" - } - }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -7581,12 +6224,12 @@ } }, "node_modules/pretty-format": { - "version": "29.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.6.2.tgz", - "integrity": "sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/schemas": "^29.6.0", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" }, @@ -7615,59 +6258,25 @@ "node": ">=0.12" } }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prompts/node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=6" } }, - "node_modules/pure-rand": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", - "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, "node_modules/qs": { "version": "6.9.7", "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", @@ -7683,7 +6292,9 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/randombytes": { "version": "2.1.0", @@ -7801,7 +6412,9 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/resolve": { "version": "1.22.2", @@ -7820,18 +6433,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -7841,15 +6442,6 @@ "node": ">=8" } }, - "node_modules/resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/rollup": { "version": "2.79.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", @@ -8150,13 +6742,17 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "xmlchars": "^2.2.0" }, @@ -8182,27 +6778,6 @@ "randombytes": "^2.1.0" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -8217,59 +6792,25 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" } }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true, "engines": { "node": ">=0.10.0" @@ -8282,12 +6823,6 @@ "deprecated": "Please use @jridgewell/sourcemap-codec instead", "dev": true }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, "node_modules/stable": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", @@ -8295,26 +6830,17 @@ "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", "dev": true }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/std-env": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.4.3.tgz", + "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==", + "dev": true }, "node_modules/string-hash": { "version": "1.1.3", @@ -8322,19 +6848,6 @@ "integrity": "sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==", "dev": true }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -8413,17 +6926,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/stringifier": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stringifier/-/stringifier-1.4.0.tgz", - "integrity": "sha512-cNsMOqqrcbLcHTXEVmkw9y0fwDwkdgtZwlfyolzpQDoAE1xdNGhQhxBUfiDvvZIKl1hnUEgMv66nHwtMz3OjPw==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0", - "traverse": "^0.6.6", - "type-name": "^2.0.1" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -8436,34 +6938,16 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/strip-literal": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz", + "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "acorn": "^8.10.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/antfu" } }, "node_modules/style-inject": { @@ -8537,7 +7021,9 @@ "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/terser": { "version": "5.19.2", @@ -8582,20 +7068,6 @@ "source-map": "^0.6.0" } }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/tiny-glob": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", @@ -8606,12 +7078,30 @@ "globrex": "^0.1.2" } }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "node_modules/tinybench": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.1.tgz", + "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==", "dev": true }, + "node_modules/tinypool": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.1.tgz", + "integrity": "sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.0.tgz", + "integrity": "sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -8621,23 +7111,13 @@ "node": ">=4" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/tough-cookie": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -8653,6 +7133,8 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">= 4.0.0" } @@ -8662,6 +7144,8 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "punycode": "^2.1.1" }, @@ -8669,15 +7153,6 @@ "node": ">=12" } }, - "node_modules/traverse": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.7.tgz", - "integrity": "sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/tslib": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", @@ -8693,24 +7168,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/type-name/-/type-name-2.0.2.tgz", - "integrity": "sha512-kkgkuqR/jKdKO5oh/I2SMu2dGbLXoJq0zkdgbxaqYK+hr9S9edwVVGf+tMUFTx2gH9TN2+Zu9JZ/Njonb3cjhA==", - "dev": true - }, "node_modules/typed-array-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", @@ -8777,18 +7234,24 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, + "node_modules/ufo": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.1.tgz", + "integrity": "sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==", + "dev": true + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -8844,17 +7307,6 @@ "node": ">=4" } }, - "node_modules/universal-deep-strict-equal": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/universal-deep-strict-equal/-/universal-deep-strict-equal-1.2.2.tgz", - "integrity": "sha512-UpnFi3/IF3jZHIHTdQXTHLCqpBP3805OFFRPHgvCS7k0oob2YVXxMTjS0U0g9qJTzqFRMwEnFFSlFLqt6zwjTQ==", - "dev": true, - "dependencies": { - "array-filter": "^1.0.0", - "indexof": "0.0.1", - "object-keys": "^1.0.0" - } - }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -8899,6 +7351,8 @@ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -8910,31 +7364,197 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/v8-to-istanbul": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", - "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "node_modules/vite": { + "version": "4.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", + "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", + "dev": true, + "dependencies": { + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@types/node": ">= 14", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.0.0-beta.1.tgz", + "integrity": "sha512-ArgMpx8elnnDsU6cKIu9GtUIz2xrL2okVErc5J+znVytA6yb6K1AVFxKpxUuwSUcyw+CD5+xZwOdZRbjC+TUiQ==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "cac": "^6.7.14", + "debug": "^4.3.4", + "mlly": "^1.4.0", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" }, "engines": { - "node": ">=10.12.0" + "node": ">=v14.18.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "node_modules/vite/node_modules/rollup": { + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/vitest": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.0.0-beta.1.tgz", + "integrity": "sha512-0COrNeOzBmcynWKjnrZ70Vy6BbdcFsKZmqvhjt2PM3ZF1KgprSShNIFFVKthqPj5GjgUbXUR8rFjOAWzTYPd/g==", + "dev": true, + "dependencies": { + "@vitest/expect": "1.0.0-beta.1", + "@vitest/runner": "1.0.0-beta.1", + "@vitest/snapshot": "1.0.0-beta.1", + "@vitest/spy": "1.0.0-beta.1", + "@vitest/utils": "1.0.0-beta.1", + "acorn": "^8.9.0", + "acorn-walk": "^8.2.0", + "cac": "^6.7.14", + "chai": "^4.3.10", + "debug": "^4.3.4", + "local-pkg": "^0.4.3", + "magic-string": "^0.30.1", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.3.3", + "strip-literal": "^1.0.1", + "tinybench": "^2.5.0", + "tinypool": "^0.8.1", + "vite": "^3.1.0 || ^4.0.0 || ^5.0.0-0", + "vite-node": "1.0.0-beta.1", + "why-is-node-running": "^2.2.2" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": ">=v14.18.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": ">= 14", + "@vitest/browser": "*", + "@vitest/ui": "*", + "happy-dom": "*", + "jsdom": "*", + "playwright": "*", + "safaridriver": "*", + "webdriverio": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "playwright": { + "optional": true + }, + "safaridriver": { + "optional": true + }, + "webdriverio": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/magic-string": { + "version": "0.30.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz", + "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } }, "node_modules/w3c-xmlserializer": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "xml-name-validator": "^4.0.0" }, @@ -8942,20 +7562,13 @@ "node": ">=14" } }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "dependencies": { - "makeerror": "1.0.12" - } - }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=12" } @@ -8965,6 +7578,8 @@ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "iconv-lite": "0.6.3" }, @@ -8977,6 +7592,8 @@ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=12" } @@ -8986,6 +7603,8 @@ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "tr46": "^3.0.0", "webidl-conversions": "^7.0.0" @@ -8994,21 +7613,6 @@ "node": ">=12" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", @@ -9044,6 +7648,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/why-is-node-running": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz", + "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -9067,24 +7687,13 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, "node_modules/ws": { "version": "8.13.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=10.0.0" }, @@ -9106,6 +7715,8 @@ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true, + "optional": true, + "peer": true, "engines": { "node": ">=12" } @@ -9114,16 +7725,9 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true, - "engines": { - "node": ">=0.4" - } + "optional": true, + "peer": true }, "node_modules/y18n": { "version": "5.0.8", @@ -9177,12 +7781,12 @@ } }, "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12.20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" diff --git a/package.json b/package.json index d0205846..aa85187b 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "build:npm": "microbundle --name route --format modern,es,umd --no-sourcemap --no-generateTypes", "build:npm:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap --no-generateTypes", "build:npm:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --no-sourcemap --no-generateTypes", - "test": "jest --verbose", + "test": "vitest", + "typecheck": "vitest typecheck", "prepublishOnly": "npm run build:npm && npm run build:npm:vue && npm run build:npm:react" }, "mangle": { @@ -58,10 +59,8 @@ "qs": "~6.9.7" }, "devDependencies": { - "babel-preset-power-assert": "^3.0.0", - "jest": "^29.0.3", - "jest-environment-jsdom": "^29.0.3", "microbundle": "^0.15.1", - "power-assert": "^1.6.1" + "typescript": "^5.2.2", + "vitest": "^1.0.0-beta.1" } } diff --git a/tests/js/route.test-d.ts b/tests/js/route.test-d.ts new file mode 100644 index 00000000..66c03d4d --- /dev/null +++ b/tests/js/route.test-d.ts @@ -0,0 +1,80 @@ +import { assertType } from 'vitest'; +import route from '../../src/js'; + +// Add generated routes to use for testing inside this file. In a real app these declarations +// would be in a separate file generated by running `php artisan ziggy:generate --types`. +declare module '../../src/js' { + interface RouteList { + 'posts.index': []; + 'posts.comments.store': [{ name: 'x' }]; + 'posts.comments.show': [{ name: 'post' }, { name: 'comment'; binding: 'uuid' }]; + optional: [{ name: 'maybe' }]; + } +} + +// Test route name autocompletion +assertType(route()); + +// Test route parameter name autocompletion +assertType(route('posts.comments.store', {})); + +// TODO once we can detect whether params are required/optional: @ts-expect-error missing required 'post' parameter +assertType(route('posts.comments.show', { comment: 2 })); + +// TODO once we can detect whether params are required/optional: @ts-expect-error missing required 'comment' parameter +assertType(route('posts.comments.show', { post: 2 })); + +// Simple object example +assertType(route('posts.comments.show', { post: 2, comment: 9 })); +// Allows extra object properties +assertType(route('posts.comments.show', { post: 2, comment: 9, foo: 'bar' })); +// Allows any property order +assertType(route('posts.comments.show', { comment: 2, post: 9 })); + +// Binding/'routable' object example with default 'id' binding +assertType(route('posts.comments.show', { post: { id: 1, foo: 'bar' } })); +// Allows extra nested object properties +assertType(route('posts.comments.show', { post: { id: 2, foo: 'bar' } })); +// @ts-expect-error missing 'id' key in post parameter object +assertType(route('posts.comments.show', { post: { foo: 'bar' } })); + +// Binding/'routable' object example with custom 'uuid' binding +assertType(route('posts.comments.show', { comment: { uuid: 1 } })); +// Allows extra nested object properties +assertType(route('posts.comments.show', { comment: { uuid: 1, foo: 'bar' } })); +// @ts-expect-error missing 'uuid' key in comment parameter object +assertType(route('posts.comments.show', { comment: { foo: 'bar' } })); +// @ts-expect-error missing 'uuid' key in comment parameter object +// 'id' doesn't fix it because 'id' is the default/fallback but this +// parameter has an explicit 'uuid' binding, so that's required :) +assertType(route('posts.comments.show', { comment: { id: 2 } })); + +// Simple array examples +assertType(route('posts.comments.show', [2, 3])); +assertType(route('posts.comments.show', ['foo', 'bar'])); +// Allows mix of plain values and parameter objects +assertType(route('posts.comments.show', [{ id: 2 }, 3])); +assertType(route('posts.comments.show', ['2', { uuid: 3 }])); +assertType(route('posts.comments.show', [{ id: 2 }, { uuid: '3' }])); + +// @ts-expect-error missing 'id' in post parameter object +assertType(route('posts.comments.show', [{ x: 2 }, { uuid: 3 }])); +// @ts-expect-error missing 'uuid' key in comment parameter object +assertType(route('posts.comments.show', [{ id: 2 }, { id: 3 }])); + +// Allows extra array items after know parameters +assertType(route('posts.comments.show', [{ id: 2 }, { uuid: 3 }, { x: 'y' }])); +assertType(route('posts.comments.show', [1, 'foo', 3])); + +// Unknown route example +assertType(route('foo')); +// Allows any object params +assertType(route('foo', { bar: { f: 'x' } })); +// Allows any array params +assertType(route('foo', [{ x: 'x' }, 2, 'foo'])); + +// Test router method autocompletion +assertType(route().has('')); + +// Test router getter autocompletion +assertType(route().params); diff --git a/tests/js/route.test.js b/tests/js/route.test.js index f888e46e..414837ed 100644 --- a/tests/js/route.test.js +++ b/tests/js/route.test.js @@ -1,6 +1,4 @@ -/** - * @jest-environment jsdom - */ +// @vitest-environment jsdom import assert, { deepEqual, strictEqual as same, throws } from 'assert'; import route from '../../src/js'; diff --git a/tests/js/types.ts b/tests/js/types.ts deleted file mode 100644 index b7cb1f3e..00000000 --- a/tests/js/types.ts +++ /dev/null @@ -1,79 +0,0 @@ -import route from '../../src/js'; - -// Add generated routes to use for testing inside this file. In a real app these declarations -// would be in a separate file generated by running `php artisan ziggy:generate --types`. -declare module '../../src/js' { - interface RouteList { - 'posts.index': [], - 'posts.comments.store': [{ name: 'x' }], - 'posts.comments.show': [{ name: 'post' }, { name: 'comment', binding: 'uuid' }], - 'optional': [{ name: 'maybe' }], - } -} - -// Test route name autocompletion -route(); - -// Test route parameter name autocompletion -route('posts.comments.store', {}); - -// TODO once we can detect whether params are required/optional: @ts-expect-error missing required 'post' parameter -route('posts.comments.show', { comment: 2 }); - -// TODO once we can detect whether params are required/optional: @ts-expect-error missing required 'comment' parameter -route('posts.comments.show', { post: 2 }); - -// Simple object example -route('posts.comments.show', { post: 2, comment: 9 }); -// Allows extra object properties -route('posts.comments.show', { post: 2, comment: 9, foo: 'bar' }); -// Allows any property order -route('posts.comments.show', { comment: 2, post: 9 }); - -// Binding/'routable' object example with default 'id' binding -route('posts.comments.show', { post: { id: 1, foo: 'bar' } }); -// Allows extra nested object properties -route('posts.comments.show', { post: { id: 2, foo: 'bar' } }); -// @ts-expect-error missing 'id' key in post parameter object -route('posts.comments.show', { post: { foo: 'bar' } }); - -// Binding/'routable' object example with custom 'uuid' binding -route('posts.comments.show', { comment: { uuid: 1 } }); -// Allows extra nested object properties -route('posts.comments.show', { comment: { uuid: 1, foo: 'bar' } }); -// @ts-expect-error missing 'uuid' key in comment parameter object -route('posts.comments.show', { comment: { foo: 'bar' } }); -// @ts-expect-error missing 'uuid' key in comment parameter object -// 'id' doesn't fix it because 'id' is the default/fallback but this -// parameter has an explicit 'uuid' binding, so that's required :) -route('posts.comments.show', { comment: { id: 2 } }); - -// Simple array examples -route('posts.comments.show', [2, 3]); -route('posts.comments.show', ['foo', 'bar']); -// Allows mix of plain values and parameter objects -route('posts.comments.show', [{ id: 2 }, 3]); -route('posts.comments.show', ['2', { uuid: 3 }]); -route('posts.comments.show', [{ id: 2 }, { uuid: '3' }]); - -// @ts-expect-error missing 'id' in post parameter object -route('posts.comments.show', [{ x: 2 }, { uuid: 3 }]); -// @ts-expect-error missing 'uuid' key in comment parameter object -route('posts.comments.show', [{ id: 2 }, { id: 3 }]); - -// Allows extra array items after know parameters -route('posts.comments.show', [{ id: 2 }, { uuid: 3 }, { x: 'y' }]); -route('posts.comments.show', [1, 'foo', 3]); - -// Unknown route example -route('foo'); -// Allows any object params -route('foo', { bar: { f: 'x' } }); -// Allows any array params -route('foo', [{ x: 'x' }, 2, 'foo']); - -// Test router method autocompletion -route().has(''); - -// Test router getter autocompletion -route().params; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1 @@ +{} From ad34d0a9a67fd1902f8ffe928c4250edef7ef17f Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 11:42:52 -0400 Subject: [PATCH 50/56] Use default vitest/jest assertions --- tests/js/route.test.js | 731 ++++++++++++++++++++++------------------- 1 file changed, 393 insertions(+), 338 deletions(-) diff --git a/tests/js/route.test.js b/tests/js/route.test.js index 414837ed..e7f09db8 100644 --- a/tests/js/route.test.js +++ b/tests/js/route.test.js @@ -1,6 +1,5 @@ // @vitest-environment jsdom - -import assert, { deepEqual, strictEqual as same, throws } from 'assert'; +import { beforeAll, beforeEach, describe, expect, test } from 'vitest'; import route from '../../src/js'; const defaultWindow = { @@ -219,93 +218,92 @@ beforeEach(() => { describe('route()', () => { test('can generate a URL with no parameters', () => { - same(route('posts.index'), 'https://ziggy.dev/posts'); + expect(route('posts.index')).toBe('https://ziggy.dev/posts'); }); test('can generate a URL with default parameters', () => { - same(route('translatePosts.index'), 'https://ziggy.dev/en/posts'); + expect(route('translatePosts.index')).toBe('https://ziggy.dev/en/posts'); }); test('can generate a relative URL by passing absolute = false', () => { - same(route('posts.index', [], false), '/posts'); + expect(route('posts.index', [], false)).toBe('/posts'); }); test('can generate a URL with filled optional parameters', () => { - same( + expect( route('conversations.show', { type: 'email', subscriber: 123, conversation_id: 1234, - }), - 'https://ziggy.dev/subscribers/123/conversations/email/1234' - ); + }) + ).toBe('https://ziggy.dev/subscribers/123/conversations/email/1234'); }); test('can generate a relative URL with filled optional parameters', () => { - same( - route('conversations.show', { - type: 'email', - subscriber: 123, - conversation_id: 1234, - }, false), - '/subscribers/123/conversations/email/1234' - ); + expect( + route( + 'conversations.show', + { + type: 'email', + subscriber: 123, + conversation_id: 1234, + }, + false + ) + ).toBe('/subscribers/123/conversations/email/1234'); }); test('can generate a relative URL with default parameters', () => { - same(route('translatePosts.index', [], false), '/en/posts'); + expect(route('translatePosts.index', [], false)).toBe('/en/posts'); }); test('can error if a required parameter is not provided', () => { - throws(() => route('posts.show'), /'post' parameter is required/); + expect(() => route('posts.show')).toThrow(/'post' parameter is required/); }); test('can error if a required parameter is not provided to a route with default parameters', () => { - throws(() => route('translatePosts.show'), /'id' parameter is required/); + expect(() => route('translatePosts.show')).toThrow(/'id' parameter is required/); }); test('can error if a required parameter with a default has no default value', () => { global.Ziggy.defaults = {}; - throws( - () => route('translatePosts.index'), - /'locale' parameter is required/ - ); + expect(() => route('translatePosts.index')).toThrow(/'locale' parameter is required/); }); test('can generate a URL using an integer', () => { // route with required parameters - same(route('posts.show', 1), 'https://ziggy.dev/posts/1'); + expect(route('posts.show', 1)).toBe('https://ziggy.dev/posts/1'); // route with default parameters - same(route('translatePosts.show', 1), 'https://ziggy.dev/en/posts/1'); + expect(route('translatePosts.show', 1)).toBe('https://ziggy.dev/en/posts/1'); }); test('can generate a URL using a string', () => { // route with required parameters - same(route('posts.show', 'my-first-post'), 'https://ziggy.dev/posts/my-first-post'); + expect(route('posts.show', 'my-first-post')).toBe('https://ziggy.dev/posts/my-first-post'); // route with default parameters - same(route('translatePosts.show', 'my-first-post'), 'https://ziggy.dev/en/posts/my-first-post'); + expect(route('translatePosts.show', 'my-first-post')).toBe('https://ziggy.dev/en/posts/my-first-post'); }); test('can generate a URL using an object', () => { // routes with required parameters - same(route('posts.show', { id: 1 }), 'https://ziggy.dev/posts/1'); - same(route('events.venues.show', { event: 1, venue: 2 }), 'https://ziggy.dev/events/1/venues/2'); + expect(route('posts.show', { id: 1 })).toBe('https://ziggy.dev/posts/1'); + expect(route('events.venues.show', { event: 1, venue: 2 })).toBe('https://ziggy.dev/events/1/venues/2'); // route with optional parameters - same(route('optionalId', { type: 'model', id: 1 }), 'https://ziggy.dev/optionalId/model/1'); + expect(route('optionalId', { type: 'model', id: 1 })).toBe('https://ziggy.dev/optionalId/model/1'); // route with both required and default parameters - same(route('translateEvents.venues.show', { event: 1, venue: 2 }), 'https://ziggy.dev/en/events/1/venues/2'); + expect(route('translateEvents.venues.show', { event: 1, venue: 2 })).toBe('https://ziggy.dev/en/events/1/venues/2'); }); test('can generate a URL using an array', () => { // routes with required parameters - same(route('posts.show', [1]), 'https://ziggy.dev/posts/1'); - same(route('events.venues.show', [1, 2]), 'https://ziggy.dev/events/1/venues/2'); - same(route('events.venues.show', [1, 'coliseum']), 'https://ziggy.dev/events/1/venues/coliseum'); + expect(route('posts.show', [1])).toBe('https://ziggy.dev/posts/1'); + expect(route('events.venues.show', [1, 2])).toBe('https://ziggy.dev/events/1/venues/2'); + expect(route('events.venues.show', [1, 'coliseum'])).toBe('https://ziggy.dev/events/1/venues/coliseum'); // route with default parameters - same(route('translatePosts.show', [1]), 'https://ziggy.dev/en/posts/1'); + expect(route('translatePosts.show', [1])).toBe('https://ziggy.dev/en/posts/1'); // route with both required and default parameters - same(route('translateEvents.venues.show', [1, 2]), 'https://ziggy.dev/en/events/1/venues/2'); + expect(route('translateEvents.venues.show', [1, 2])).toBe('https://ziggy.dev/en/events/1/venues/2'); }); test('can generate a URL using an array of objects', () => { @@ -313,127 +311,115 @@ describe('route()', () => { const venue = { id: 2, name: 'Rogers Centre' }; // route with required parameters - same(route('events.venues.show', [event, venue]), 'https://ziggy.dev/events/1/venues/2'); + expect(route('events.venues.show', [event, venue])).toBe('https://ziggy.dev/events/1/venues/2'); // route with required and default parameters - same(route('translateEvents.venues.show', [event, venue]), 'https://ziggy.dev/en/events/1/venues/2'); + expect(route('translateEvents.venues.show', [event, venue])).toBe('https://ziggy.dev/en/events/1/venues/2'); }); test('can generate a URL using an array of integers and objects', () => { const venue = { id: 2, name: 'Rogers Centre' }; // route with required parameters - same(route('events.venues.show', [1, venue]), 'https://ziggy.dev/events/1/venues/2'); + expect(route('events.venues.show', [1, venue])).toBe('https://ziggy.dev/events/1/venues/2'); // route with required and default parameters - same(route('translateEvents.venues.show', [1, venue]), 'https://ziggy.dev/en/events/1/venues/2'); + expect(route('translateEvents.venues.show', [1, venue])).toBe('https://ziggy.dev/en/events/1/venues/2'); }); test('can generate a URL for a route with domain parameters', () => { // route with required domain parameters - same(route('team.user.show', { team: 'tighten', id: 1 }), 'https://tighten.ziggy.dev/users/1'); + expect(route('team.user.show', { team: 'tighten', id: 1 })).toBe('https://tighten.ziggy.dev/users/1'); // route with required domain parameters and default parameters - same(route('translateTeam.user.show', { team: 'tighten', id: 1 }), 'https://tighten.ziggy.dev/en/users/1'); + expect(route('translateTeam.user.show', { team: 'tighten', id: 1 })).toBe('https://tighten.ziggy.dev/en/users/1'); }); test('can generate a URL for a route with a custom route model binding scope', () => { - same( + expect( route('postComments.show', [ { id: 1, title: 'Post' }, { uuid: 12345, title: 'Comment' }, - ]), - 'https://ziggy.dev/posts/1/comments/12345' - ); - same( - route('postComments.show', [1, { uuid: 'correct-horse-etc-etc' }]), - 'https://ziggy.dev/posts/1/comments/correct-horse-etc-etc' - ); + ]) + ).toBe('https://ziggy.dev/posts/1/comments/12345'); + expect(route('postComments.show', [1, { uuid: 'correct-horse-etc-etc' }])).toBe('https://ziggy.dev/posts/1/comments/correct-horse-etc-etc'); }); test("can fall back to an 'id' key if an object is passed for a parameter with no registered bindings", () => { - same(route('translatePosts.update', { id: 14 }), 'https://ziggy.dev/en/posts/14'); - same(route('translatePosts.update', [{ id: 14 }]), 'https://ziggy.dev/en/posts/14'); - same(route('events.venues.update', [{ id: 10 }, { id: 1 }]), 'https://ziggy.dev/events/10/venues/1'); + expect(route('translatePosts.update', { id: 14 })).toBe('https://ziggy.dev/en/posts/14'); + expect(route('translatePosts.update', [{ id: 14 }])).toBe('https://ziggy.dev/en/posts/14'); + expect(route('events.venues.update', [{ id: 10 }, { id: 1 }])).toBe('https://ziggy.dev/events/10/venues/1'); }); test('can generate a URL for an app installed in a subfolder', () => { global.Ziggy.url = 'https://ziggy.dev/subfolder'; - same( - route('postComments.show', [1, { uuid: 'correct-horse-etc-etc' }]), - 'https://ziggy.dev/subfolder/posts/1/comments/correct-horse-etc-etc' - ); + expect(route('postComments.show', [1, { uuid: 'correct-horse-etc-etc' }])).toBe('https://ziggy.dev/subfolder/posts/1/comments/correct-horse-etc-etc'); }); test('can error if a route model binding key is missing', () => { - throws( - () => route('postComments.show', [1, { count: 20 }]), - /Ziggy error: object passed as 'comment' parameter is missing route model binding key 'uuid'\./ - ); + expect(() => route('postComments.show', [1, { count: 20 }])).toThrow(/Ziggy error: object passed as 'comment' parameter is missing route model binding key 'uuid'\./); }); test('can return base URL if path is "/"', () => { - same(route('home'), 'https://ziggy.dev'); + expect(route('home')).toBe('https://ziggy.dev'); }); test('can generate a relative URL to a root path', () => { - same(route('home', undefined, false), '/'); + expect(route('home', undefined, false)).toBe('/'); }); // @todo duplicate test('can ignore an optional parameter', () => { - same(route('optional', { id: 123 }), 'https://ziggy.dev/optional/123'); - same(route('optional', { id: 123, slug: 'news' }), 'https://ziggy.dev/optional/123/news'); - same(route('optional', { id: 123, slug: null }), 'https://ziggy.dev/optional/123'); + expect(route('optional', { id: 123 })).toBe('https://ziggy.dev/optional/123'); + expect(route('optional', { id: 123, slug: 'news' })).toBe('https://ziggy.dev/optional/123/news'); + expect(route('optional', { id: 123, slug: null })).toBe('https://ziggy.dev/optional/123'); }); test('can ignore a single optional parameter', () => { - same(route('pages.optional'), 'https://ziggy.dev/optionalpage'); - same(route('pages.optional', {}), 'https://ziggy.dev/optionalpage'); - same(route('pages.optional', undefined), 'https://ziggy.dev/optionalpage'); - same(route('pages.optional', null), 'https://ziggy.dev/optionalpage'); + expect(route('pages.optional')).toBe('https://ziggy.dev/optionalpage'); + expect(route('pages.optional', {})).toBe('https://ziggy.dev/optionalpage'); + expect(route('pages.optional', undefined)).toBe('https://ziggy.dev/optionalpage'); + expect(route('pages.optional', null)).toBe('https://ziggy.dev/optionalpage'); }); test('missing optional parameter in first path segment', () => { - same(route('products.show', { country: 'ca', language: 'fr', id: 1 }), 'https://ziggy.dev/ca/fr/products/1'); + expect(route('products.show', { country: 'ca', language: 'fr', id: 1 })).toBe('https://ziggy.dev/ca/fr/products/1'); // These URLs aren't valid but this matches the behavior of Laravel's PHP `route()` helper - same(route('products.show', { country: 'ca', id: 1 }), 'https://ziggy.dev/ca//products/1'); - same(route('products.show', { id: 1 }), 'https://ziggy.dev//products/1'); + expect(route('products.show', { country: 'ca', id: 1 })).toBe('https://ziggy.dev/ca//products/1'); + expect(route('products.show', { id: 1 })).toBe('https://ziggy.dev//products/1'); // First param is handled correctly - same(route('products.show', { language: 'fr', id: 1 }), 'https://ziggy.dev/fr/products/1'); + expect(route('products.show', { language: 'fr', id: 1 })).toBe('https://ziggy.dev/fr/products/1'); }); test('can error if a route name doesn’t exist', () => { - throws(() => route('unknown-route'), /Ziggy error: route 'unknown-route' is not in the route list\./); + expect(() => route('unknown-route')).toThrow(/Ziggy error: route 'unknown-route' is not in the route list\./); }); test('can automatically append extra parameter values as a query string', () => { - same( + expect( route('events.venues.show', { event: 1, venue: 2, search: 'rogers', page: 2, - }), - 'https://ziggy.dev/events/1/venues/2?search=rogers&page=2' - ); - same( + }) + ).toBe('https://ziggy.dev/events/1/venues/2?search=rogers&page=2'); + expect( route('events.venues.show', { id: 2, event: 1, venue: 2, search: 'rogers', - }), - 'https://ziggy.dev/events/1/venues/2?id=2&search=rogers' - ); + }) + ).toBe('https://ziggy.dev/events/1/venues/2?id=2&search=rogers'); // ignore values explicitly set to `null` - same(route('posts.index', { filled: 'filling', empty: null }), 'https://ziggy.dev/posts?filled=filling'); + expect(route('posts.index', { filled: 'filling', empty: null })).toBe('https://ziggy.dev/posts?filled=filling'); }); test('can cast boolean query parameters to integers', () => { - same(route('posts.show', { post: 1, preview: true }), 'https://ziggy.dev/posts/1?preview=1'); + expect(route('posts.show', { post: 1, preview: true })).toBe('https://ziggy.dev/posts/1?preview=1'); }); test('can explicitly append query parameters using _query parameter', () => { - same( + expect( route('events.venues.show', { event: 1, venue: 2, @@ -441,10 +427,9 @@ describe('route()', () => { event: 4, venue: 2, }, - }), - 'https://ziggy.dev/events/1/venues/2?event=4&venue=2' - ); - same( + }) + ).toBe('https://ziggy.dev/events/1/venues/2?event=4&venue=2'); + expect( route('events.venues.show', { event: { id: 4, name: 'Fun Event' }, _query: { @@ -452,9 +437,8 @@ describe('route()', () => { id: 12, }, venue: 2, - }), - 'https://ziggy.dev/events/4/venues/2?event=9&id=12' - ); + }) + ).toBe('https://ziggy.dev/events/4/venues/2?event=9&id=12'); }); test('can generate a URL with a port', () => { @@ -462,45 +446,40 @@ describe('route()', () => { global.Ziggy.port = 81; // route with no parameters - same(route('posts.index'), 'https://ziggy.dev:81/posts'); + expect(route('posts.index')).toBe('https://ziggy.dev:81/posts'); // route with required domain parameters - same(route('team.user.show', { team: 'tighten', id: 1 }), 'https://tighten.ziggy.dev:81/users/1'); + expect(route('team.user.show', { team: 'tighten', id: 1 })).toBe('https://tighten.ziggy.dev:81/users/1'); }); test('can handle trailing path segments in the base URL', () => { global.Ziggy.url = 'https://test.thing/ab/cd'; - same(route('events.venues.index', 1), 'https://test.thing/ab/cd/events/1/venues'); + expect(route('events.venues.index', 1)).toBe('https://test.thing/ab/cd/events/1/venues'); }); test('URL-encode query parameters', () => { global.Ziggy.url = 'https://test.thing/ab/cd'; - same( - route('events.venues.index', { event: 'Fun&Games' }), - 'https://test.thing/ab/cd/events/Fun&Games/venues' - ); - same( + expect(route('events.venues.index', { event: 'Fun&Games' })).toBe('https://test.thing/ab/cd/events/Fun&Games/venues'); + expect( route('events.venues.index', { event: 'Fun&Games', location: 'Blues&Clues', - }), - 'https://test.thing/ab/cd/events/Fun&Games/venues?location=Blues%26Clues' - ); + }) + ).toBe('https://test.thing/ab/cd/events/Fun&Games/venues?location=Blues%26Clues'); }); test('can format an array of query parameters', () => { - same( + expect( route('events.venues.index', { event: 'test', guests: ['a', 'b', 'c'], - }), - 'https://ziggy.dev/events/test/venues?guests[0]=a&guests[1]=b&guests[2]=c' - ); + }) + ).toBe('https://ziggy.dev/events/test/venues?guests[0]=a&guests[1]=b&guests[2]=c'); }); test('can handle a parameter explicity set to `0`', () => { - same(route('posts.update', 0), 'https://ziggy.dev/posts/0'); + expect(route('posts.update', 0)).toBe('https://ziggy.dev/posts/0'); }); test('can accept a custom Ziggy configuration object', () => { @@ -516,10 +495,7 @@ describe('route()', () => { }, }; - same( - route('tightenDev.packages.index', { dev: 1 }, true, config), - 'http://notYourAverage.dev/tightenDev/1/packages' - ); + expect(route('tightenDev.packages.index', { dev: 1 }, true, config)).toBe('http://notYourAverage.dev/tightenDev/1/packages'); }); test('can extract parameters for an app installed in a subfolder', () => { @@ -529,7 +505,7 @@ describe('route()', () => { global.window.location.host = 'ziggy.dev'; global.window.location.pathname = '/subfolder/ph/en/products/4'; - deepEqual(route().params, { country: 'ph', language: 'en', id: '4' }); + expect(route().params).toStrictEqual({ country: 'ph', language: 'en', id: '4' }); }); test('can extract parameters for an app installed in nested subfolders', () => { @@ -539,7 +515,7 @@ describe('route()', () => { global.window.location.host = 'ziggy.dev'; global.window.location.pathname = '/nested/subfolder/ph/en/products/4'; - deepEqual(route().params, { country: 'ph', language: 'en', id: '4' }); + expect(route().params).toStrictEqual({ country: 'ph', language: 'en', id: '4' }); }); test('can extract domain parameters from the current URL', () => { @@ -547,7 +523,7 @@ describe('route()', () => { global.window.location.host = 'tighten.ziggy.dev'; global.window.location.pathname = '/users/1'; - deepEqual(route().params, { team: 'tighten', id: '1' }); + expect(route().params).toStrictEqual({ team: 'tighten', id: '1' }); }); test('can extract named parameters from the current URL', () => { @@ -555,19 +531,19 @@ describe('route()', () => { global.window.location.host = 'ziggy.dev'; global.window.location.pathname = '/posts/1'; - deepEqual(route().params, { post: '1' }); + expect(route().params).toStrictEqual({ post: '1' }); global.window.location.href = 'https://ziggy.dev/events/1/venues/2'; global.window.location.pathname = '/events/1/venues/2'; - deepEqual(route().params, { event: '1', venue: '2' }); + expect(route().params).toStrictEqual({ event: '1', venue: '2' }); }); test('can decode parameters in the current URL', () => { global.window.location.href = 'https://ziggy.dev/events/1/venues/1%2B2%263'; global.window.location.pathname = '/events/1/venues/1%2B2%263'; - deepEqual(route().params, { event: '1', venue: '1+2&3' }); + expect(route().params).toStrictEqual({ event: '1', venue: '1+2&3' }); }); test('can extract query parameters from the current URL', () => { @@ -576,104 +552,109 @@ describe('route()', () => { global.window.location.pathname = '/posts/1'; global.window.location.search = '?guest[name]=Taylor'; - deepEqual(route().params, { post: '1', guest: { name: 'Taylor' } }); + expect(route().params).toStrictEqual({ post: '1', guest: { name: 'Taylor' } }); global.window.location.href = 'https://ziggy.dev/events/1/venues/2?id=5&vip=1%2B2%263'; global.window.location.pathname = '/events/1/venues/2'; global.window.location.search = '?id=5&vip=1%2B2%263'; - deepEqual(route().params, { event: '1', venue: '2', id: '5', vip: '1+2&3' }); + expect(route().params).toStrictEqual({ + event: '1', + venue: '2', + id: '5', + vip: '1+2&3', + }); }); test("can append 'extra' string/number parameter to query", () => { // 'posts.index' has no parameters - same(route('posts.index', 'extra'), 'https://ziggy.dev/posts?extra='); - same(route('posts.index', [{extra: 2}]), 'https://ziggy.dev/posts?extra=2'); - same(route('posts.index', 1), 'https://ziggy.dev/posts?1='); + expect(route('posts.index', 'extra')).toBe('https://ziggy.dev/posts?extra='); + expect(route('posts.index', [{ extra: 2 }])).toBe('https://ziggy.dev/posts?extra=2'); + expect(route('posts.index', 1)).toBe('https://ziggy.dev/posts?1='); }); test("can append 'extra' elements in array of parameters to query", () => { // 'posts.show' has exactly one parameter - same(route('posts.show', [1, 2]), 'https://ziggy.dev/posts/1?2='); - same(route('posts.show', ['my-first-post', 'foo', 'bar']), 'https://ziggy.dev/posts/my-first-post?foo=&bar='); + expect(route('posts.show', [1, 2])).toBe('https://ziggy.dev/posts/1?2='); + expect(route('posts.show', ['my-first-post', 'foo', 'bar'])).toBe('https://ziggy.dev/posts/my-first-post?foo=&bar='); - same(route('posts.show', ['my-first-post', 'foo', { bar: 'baz' }]), 'https://ziggy.dev/posts/my-first-post?foo=&bar=baz'); + expect(route('posts.show', ['my-first-post', 'foo', { bar: 'baz' }])).toBe('https://ziggy.dev/posts/my-first-post?foo=&bar=baz'); }); test("can automatically append object with only 'extra' parameters to query", () => { // Route has no parameters, the entire parameters object is 'extra' and should be used as the query string - same(route('hosting-contacts.index', { filter: { name: 'Dwyer' } }), 'https://ziggy.dev/hosting-contacts?filter[name]=Dwyer'); + expect(route('hosting-contacts.index', { filter: { name: 'Dwyer' } })).toBe('https://ziggy.dev/hosting-contacts?filter[name]=Dwyer'); }); test("can append 'extra' object parameter to query", () => { - same(route('posts.show', { post: 2, filter: { name: 'Dwyer' } }), 'https://ziggy.dev/posts/2?filter[name]=Dwyer'); + expect(route('posts.show', { post: 2, filter: { name: 'Dwyer' } })).toBe('https://ziggy.dev/posts/2?filter[name]=Dwyer'); }); test('can generate a URL for a route with parameters inside individual segments', () => { - same(route('pages.requiredExtension', 'x'), 'https://ziggy.dev/strict-download/filex'); - same(route('pages.requiredExtension', '.html'), 'https://ziggy.dev/strict-download/file.html'); - same(route('pages.requiredExtension', { extension: '.pdf' }), 'https://ziggy.dev/strict-download/file.pdf'); + expect(route('pages.requiredExtension', 'x')).toBe('https://ziggy.dev/strict-download/filex'); + expect(route('pages.requiredExtension', '.html')).toBe('https://ziggy.dev/strict-download/file.html'); + expect(route('pages.requiredExtension', { extension: '.pdf' })).toBe('https://ziggy.dev/strict-download/file.pdf'); }); test('can generate a URL for a route with optional parameters inside individual segments', () => { - same(route('pages.optionalExtension'), 'https://ziggy.dev/download/file'); - same(route('pages.optionalExtension', '.html'), 'https://ziggy.dev/download/file.html'); - same(route('pages.optionalExtension', { extension: '.pdf' }), 'https://ziggy.dev/download/file.pdf'); + expect(route('pages.optionalExtension')).toBe('https://ziggy.dev/download/file'); + expect(route('pages.optionalExtension', '.html')).toBe('https://ziggy.dev/download/file.html'); + expect(route('pages.optionalExtension', { extension: '.pdf' })).toBe('https://ziggy.dev/download/file.pdf'); }); test('can generate a URL for a route with optional parameters inside individual segments respecting where requirements', () => { - same(route('pages.optionalExtensionWhere'), 'https://ziggy.dev/where/download/file'); - same(route('pages.optionalExtensionWhere', '.html'), 'https://ziggy.dev/where/download/file.html'); - throws(() => route('pages.optionalExtensionWhere', { extension: '.pdf' }), /'extension' parameter does not match required format/); + expect(route('pages.optionalExtensionWhere')).toBe('https://ziggy.dev/where/download/file'); + expect(route('pages.optionalExtensionWhere', '.html')).toBe('https://ziggy.dev/where/download/file.html'); + expect(() => route('pages.optionalExtensionWhere', { extension: '.pdf' })).toThrow(/'extension' parameter does not match required format/); }); test('can generate a URL for a route with parameters inside individual segments', () => { - same(route('pages.requiredExtensionWhere', '.html'), 'https://ziggy.dev/where/strict-download/file.html'); - throws(() => route('pages.requiredExtensionWhere', 'x'), /'extension' parameter does not match required format/); - throws(() => route('pages.requiredExtensionWhere', { extension: '.pdf' }), /'extension' parameter does not match required format/); + expect(route('pages.requiredExtensionWhere', '.html')).toBe('https://ziggy.dev/where/strict-download/file.html'); + expect(() => route('pages.requiredExtensionWhere', 'x')).toThrow(/'extension' parameter does not match required format/); + expect(() => route('pages.requiredExtensionWhere', { extension: '.pdf' })).toThrow(/'extension' parameter does not match required format/); }); test('skip encoding slashes inside last parameter when explicitly allowed', () => { - same(route('slashes', ['one/two', 'three/four']), 'https://ziggy.dev/slashes/one/two/three/four'); - same(route('slashes', ['one/two', 'Fun&Games/venues']), 'https://ziggy.dev/slashes/one/two/Fun&Games/venues'); - same(route('slashes', ['one/two/three', 'Fun&Games/venues/outdoors']), 'https://ziggy.dev/slashes/one/two/three/Fun&Games/venues/outdoors'); + expect(route('slashes', ['one/two', 'three/four'])).toBe('https://ziggy.dev/slashes/one/two/three/four'); + expect(route('slashes', ['one/two', 'Fun&Games/venues'])).toBe('https://ziggy.dev/slashes/one/two/Fun&Games/venues'); + expect(route('slashes', ['one/two/three', 'Fun&Games/venues/outdoors'])).toBe('https://ziggy.dev/slashes/one/two/three/Fun&Games/venues/outdoors'); - same(route('slashesOtherRegex', ['one/two', 'three/four']), 'https://ziggy.dev/slashes/one/two/three/four'); - same(route('slashesOtherRegex', ['one/two', 'Fun&Games/venues']), 'https://ziggy.dev/slashes/one/two/Fun&Games/venues'); - same(route('slashesOtherRegex', ['one/two/three', 'Fun&Games/venues/outdoors']), 'https://ziggy.dev/slashes/one/two/three/Fun&Games/venues/outdoors'); + expect(route('slashesOtherRegex', ['one/two', 'three/four'])).toBe('https://ziggy.dev/slashes/one/two/three/four'); + expect(route('slashesOtherRegex', ['one/two', 'Fun&Games/venues'])).toBe('https://ziggy.dev/slashes/one/two/Fun&Games/venues'); + expect(route('slashesOtherRegex', ['one/two/three', 'Fun&Games/venues/outdoors'])).toBe('https://ziggy.dev/slashes/one/two/three/Fun&Games/venues/outdoors'); }); test('skip encoding some characters in route parameters', () => { // Laravel doesn't encode these characters in route parameters: / @ : ; , = + ! * | ? & # % - same(route('pages', 'a/b'), 'https://ziggy.dev/a/b'); - same(route('pages', 'a@b'), 'https://ziggy.dev/a@b'); - same(route('pages', 'a:b'), 'https://ziggy.dev/a:b'); - same(route('pages', 'a;b'), 'https://ziggy.dev/a;b'); - same(route('pages', 'a,b'), 'https://ziggy.dev/a,b'); - same(route('pages', 'a=b'), 'https://ziggy.dev/a=b'); - same(route('pages', 'a+b'), 'https://ziggy.dev/a+b'); - same(route('pages', 'a!b'), 'https://ziggy.dev/a!b'); - same(route('pages', 'a*b'), 'https://ziggy.dev/a*b'); - same(route('pages', 'a|b'), 'https://ziggy.dev/a|b'); - same(route('pages', 'a?b'), 'https://ziggy.dev/a?b'); - same(route('pages', 'a&b'), 'https://ziggy.dev/a&b'); - same(route('pages', 'a#b'), 'https://ziggy.dev/a#b'); - same(route('pages', 'a%b'), 'https://ziggy.dev/a%b'); + expect(route('pages', 'a/b')).toBe('https://ziggy.dev/a/b'); + expect(route('pages', 'a@b')).toBe('https://ziggy.dev/a@b'); + expect(route('pages', 'a:b')).toBe('https://ziggy.dev/a:b'); + expect(route('pages', 'a;b')).toBe('https://ziggy.dev/a;b'); + expect(route('pages', 'a,b')).toBe('https://ziggy.dev/a,b'); + expect(route('pages', 'a=b')).toBe('https://ziggy.dev/a=b'); + expect(route('pages', 'a+b')).toBe('https://ziggy.dev/a+b'); + expect(route('pages', 'a!b')).toBe('https://ziggy.dev/a!b'); + expect(route('pages', 'a*b')).toBe('https://ziggy.dev/a*b'); + expect(route('pages', 'a|b')).toBe('https://ziggy.dev/a|b'); + expect(route('pages', 'a?b')).toBe('https://ziggy.dev/a?b'); + expect(route('pages', 'a&b')).toBe('https://ziggy.dev/a&b'); + expect(route('pages', 'a#b')).toBe('https://ziggy.dev/a#b'); + expect(route('pages', 'a%b')).toBe('https://ziggy.dev/a%b'); // Laravel does encode '$', but encodeURI() doesn't - same(route('pages', 'a$b'), 'https://ziggy.dev/a%24b'); + expect(route('pages', 'a$b')).toBe('https://ziggy.dev/a%24b'); }); }); describe('has()', () => { test('can check if given named route exists', () => { - assert(route().has('posts.show')); - assert(!route().has('non.existing.route')); + expect(route().has('posts.show')).toBe(true); + expect(route().has('non.existing.route')).toBe(false); }); test('can check if given named route exists with .check()', () => { - assert(route().check('posts.show')); - assert(!route().check('non.existing.route')); + expect(route().check('posts.show')).toBe(true); + expect(route().check('non.existing.route')).toBe(false); }); }); @@ -681,20 +662,20 @@ describe('current()', () => { test('can get the current route name', () => { global.window.location.pathname = '/events/1/venues/2'; - same(route().current(), 'events.venues.show'); + expect(route().current()).toBe('events.venues.show'); }); test('can get the current route name on a route with multiple allowed HTTP methods', () => { global.window.location.pathname = '/posts/1'; - same(route().current(), 'posts.show'); + expect(route().current()).toBe('posts.show'); }); test('can get the current route name with a missing protocol', () => { global.window.location.pathname = '/events/1/venues/'; global.window.location.protocol = ''; - same(route().current(), 'events.venues.index'); + expect(route().current()).toBe('events.venues.index'); }); test('can get the current route name at the domain root', () => { @@ -702,14 +683,14 @@ describe('current()', () => { global.window.location.host = 'ziggy.dev'; global.window.location.pathname = '/'; - same(route().current(), 'home'); - same(route().current('home'), true); + expect(route().current()).toBe('home'); + expect(route().current('home')).toBe(true); }); test('can ignore query string when getting current route name', () => { global.window.location.pathname = '/events/1/venues?foo=2'; - same(route().current(), 'events.venues.index'); + expect(route().current()).toBe('events.venues.index'); }); test('can ignore domain when getting current route name and absolute is false', () => { @@ -717,13 +698,13 @@ describe('current()', () => { global.window.location.host = 'tighten.ziggy.dev'; global.window.location.pathname = '/events/1/venues?foo=2'; - same(route(undefined, undefined, false).current(), 'events.venues.index'); + expect(route(undefined, undefined, false).current()).toBe('events.venues.index'); global.window.location.href = 'https://example.com/events/1/venues?foo=2'; global.window.location.host = 'example.com'; global.window.location.pathname = '/events/1/venues?foo=2'; - same(route(undefined, undefined, false).current(), 'events.venues.index'); + expect(route(undefined, undefined, false).current()).toBe('events.venues.index'); }); test('can ignore domain when getting current route name, absolute is false, and app is in a subfolder', () => { @@ -731,13 +712,13 @@ describe('current()', () => { global.window.location.href = 'https://tighten.ziggy.dev/subfolder/events/1/venues?foo=2'; global.window.location.pathname = '/subfolder/events/1/venues?foo=2'; - same(route(undefined, undefined, false).current(), 'events.venues.index'); + expect(route(undefined, undefined, false).current()).toBe('events.venues.index'); global.Ziggy.url = 'https://example.com/nested/subfolder'; global.window.location.href = 'https://example.com/nested/subfolder/events/1/venues?foo=2'; global.window.location.pathname = '/nested/subfolder/events/1/venues?foo=2'; - same(route(undefined, undefined, false).current(), 'events.venues.index'); + expect(route(undefined, undefined, false).current()).toBe('events.venues.index'); }); test('can get the current route name with a custom Ziggy object', () => { @@ -755,86 +736,123 @@ describe('current()', () => { }, }; - same(route(undefined, undefined, undefined, config).current(), 'events.index'); + expect(route(undefined, undefined, undefined, config).current()).toBe('events.index'); }); test('can return undefined when getting the current route name on an unknown URL', () => { global.window.location.pathname = '/unknown/path'; - same(route().current(), undefined); + expect(route().current()).toBe(undefined); }); test('can check the current route name on a route/URL made up entirely of a single parameter', () => { global.window.location.pathname = '/some-page'; - same(route().current(), 'pages'); - same(route().current('pages', { page: 'some-page' }), true); + expect(route().current()).toBe('pages'); + expect(route().current('pages', { page: 'some-page' })).toBe(true); }); test('can check the current route name on a route/URL made up entirely of a single optional parameter', () => { global.window.location.pathname = '/optionalpage/foo'; - same(route().current(), 'pages.optional'); - same(route().current('pages.optional', ''), false); - same(route().current('pages.optional', ['']), false); - // same(route().current('pages.optional', []), false); // Not supported - same(route().current('pages.optional', { page: '' }), false); - same(route().current('pages.optional', { page: undefined }), false); - same(route().current('pages.optional', { page: 'foo' }), true); + expect(route().current()).toBe('pages.optional'); + expect(route().current('pages.optional', '')).toBe(false); + expect(route().current('pages.optional', [''])).toBe(false); + // expect(route().current('pages.optional', [])).toBe(false); // Not supported + expect(route().current('pages.optional', { page: '' })).toBe(false); + expect(route().current('pages.optional', { page: undefined })).toBe(false); + expect(route().current('pages.optional', { page: 'foo' })).toBe(true); }); test('can check the current route name on a route/URL made up entirely of a single optional parameter and with that parameter missing', () => { global.window.location.pathname = '/optionalpage'; - same(route().current(), 'pages.optional'); - same(route().current('pages.optional', ''), true); - // same(route().current('pages.optional', []), true); // Not supported - same(route().current('pages.optional', ['']), true); - same(route().current('pages.optional', { page: '' }), true); - same(route().current('pages.optional', { page: undefined }), true); - same(route().current('pages.optional', { page: 'foo' }), false); + expect(route().current()).toBe('pages.optional'); + expect(route().current('pages.optional', '')).toBe(true); + // expect(route().current('pages.optional', [])).toBe(true); // Not supported + expect(route().current('pages.optional', [''])).toBe(true); + expect(route().current('pages.optional', { page: '' })).toBe(true); + expect(route().current('pages.optional', { page: undefined })).toBe(true); + expect(route().current('pages.optional', { page: 'foo' })).toBe(false); global.window.location.pathname = '/where/optionalpage'; - same(route().current('pages.optionalWhere', { page: undefined }), true); - same(route().current('pages.optionalWhere', { page: 'foo' }), false); + expect(route().current('pages.optionalWhere', { page: undefined })).toBe(true); + expect(route().current('pages.optionalWhere', { page: 'foo' })).toBe(false); global.window.location.pathname = '/where/optionalpage/23'; - same(route().current('pages.optionalWhere', { page: 23 }), true); - same(route().current('pages.optionalWhere', { page: 22 }), false); + expect(route().current('pages.optionalWhere', { page: 23 })).toBe(true); + expect(route().current('pages.optionalWhere', { page: 22 })).toBe(false); }); test('can check current route with complex requirements without conflicts', () => { global.window.location.pathname = '/where/word-12/required/file'; - same(route().current('pages.complexWhere'), true); - same(route().current('pages.complexWhereConflict1'), false); + expect(route().current('pages.complexWhere')).toBe(true); + expect(route().current('pages.complexWhereConflict1')).toBe(false); global.window.location.pathname = '/where/complex-12/required/file'; - same(route().current('pages.complexWhere', {word: 'complex', digit: '12', required: 'required'}), true); - same(route().current('pages.complexWhereConflict1'), false); + expect( + route().current('pages.complexWhere', { + word: 'complex', + digit: '12', + required: 'required', + }) + ).toBe(true); + expect(route().current('pages.complexWhereConflict1')).toBe(false); global.window.location.pathname = '/where/123-abc/required/file.html'; - same(route().current('pages.complexWhereConflict1'), true); - same(route().current('pages.complexWhere'), false); + expect(route().current('pages.complexWhereConflict1')).toBe(true); + expect(route().current('pages.complexWhere')).toBe(false); global.window.location.pathname = '/where/complex-12/different_but_required/optional/file'; - same(route().current('pages.complexWhereConflict2'), true); - same(route().current('pages.complexWhere'), false); + expect(route().current('pages.complexWhereConflict2')).toBe(true); + expect(route().current('pages.complexWhere')).toBe(false); }); test('can current route with complex requirements is dehydrated correctly', () => { global.window.location.pathname = '/where/word-12/required/file'; - deepEqual(route().params, {digit: '12', word: 'word', required: 'required', optional: undefined, extension: undefined}) + expect(route().params).toStrictEqual({ + digit: '12', + word: 'word', + required: 'required', + optional: undefined, + extension: undefined, + }); global.window.location.pathname = '/where/complex-12/required/optional/file'; - deepEqual(route().params, {digit: '12', word: 'complex', required: 'required', optional: 'optional', extension: undefined}) + expect(route().params).toStrictEqual({ + digit: '12', + word: 'complex', + required: 'required', + optional: 'optional', + extension: undefined, + }); global.window.location.pathname = '/where/123-abc/required/file.html'; - deepEqual(route().params, {digit: '123', word: 'abc', required: 'required', optional: undefined, extension: '.html'}) + expect(route().params).toStrictEqual({ + digit: '123', + word: 'abc', + required: 'required', + optional: undefined, + extension: '.html', + }); global.window.location.pathname = '/where/complex-12/different_but_required/optional/file'; - deepEqual(route().params, {digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined}) + expect(route().params).toStrictEqual({ + digit: '12', + required: 'different_but_required', + optional: 'optional', + extension: undefined, + }); global.window.location.search = '?ab=cd&ef=1&dd'; - deepEqual(route().params, {digit: '12', required: 'different_but_required', optional: 'optional', extension: undefined, ab: 'cd', ef: '1', 'dd': ''}) + expect(route().params).toStrictEqual({ + digit: '12', + required: 'different_but_required', + optional: 'optional', + extension: undefined, + ab: 'cd', + ef: '1', + dd: '', + }); }); test('can strip regex start and end of string tokens from wheres', () => { @@ -855,67 +873,75 @@ describe('current()', () => { }, }; - same(route(undefined, undefined, undefined, config).current(), 'workspaces.processes.index'); + expect(route(undefined, undefined, undefined, config).current()).toBe('workspaces.processes.index'); }); test('can check the current route name at a URL with a non-delimited parameter', () => { global.window.location.pathname = '/strict-download/file.html'; - same(route().current(), 'pages.requiredExtension'); - same(route().current('pages.requiredExtension', ''), false); - same(route().current('pages.requiredExtension*', ''), false); - same(route().current('pages.requiredExtension', '.html'), true); - same(route().current('pages.requiredExtension*', '.html'), true); - same(route().current('pages.requiredExtension', ['']), false); - same(route().current('pages.requiredExtension*', ['']), false); - same(route().current('pages.requiredExtension', ['.html']), true); - same(route().current('pages.requiredExtension*', ['.html']), true); - same(route().current('pages.requiredExtension', { extension: '' }), false); - same(route().current('pages.requiredExtension*', { extension: '' }), false); - same(route().current('pages.requiredExtension', { extension: '.pdf' }), false); - same(route().current('pages.requiredExtension*', { extension: '.pdf' }), false); - same(route().current('pages.requiredExtension', { extension: '.html' }), true); - same(route().current('pages.requiredExtension*', { extension: '.html' }), true); + expect(route().current()).toBe('pages.requiredExtension'); + expect(route().current('pages.requiredExtension', '')).toBe(false); + expect(route().current('pages.requiredExtension*', '')).toBe(false); + expect(route().current('pages.requiredExtension', '.html')).toBe(true); + expect(route().current('pages.requiredExtension*', '.html')).toBe(true); + expect(route().current('pages.requiredExtension', [''])).toBe(false); + expect(route().current('pages.requiredExtension*', [''])).toBe(false); + expect(route().current('pages.requiredExtension', ['.html'])).toBe(true); + expect(route().current('pages.requiredExtension*', ['.html'])).toBe(true); + expect(route().current('pages.requiredExtension', { extension: '' })).toBe(false); + expect(route().current('pages.requiredExtension*', { extension: '' })).toBe(false); + expect(route().current('pages.requiredExtension', { extension: '.pdf' })).toBe(false); + expect(route().current('pages.requiredExtension*', { extension: '.pdf' })).toBe(false); + expect(route().current('pages.requiredExtension', { extension: '.html' })).toBe(true); + expect(route().current('pages.requiredExtension*', { extension: '.html' })).toBe(true); }); test('can check the current route name at a URL with a missing non-delimited optional parameter', () => { global.window.location.pathname = '/download/file'; - same(route().current(), 'pages.optionalExtension'); - same(route().current('pages.optionalExtension', ''), true); - same(route().current('pages.optionalExtension*', ''), true); - same(route().current('pages.optionalExtension', ['']), true); - same(route().current('pages.optionalExtension*', ['']), true); - same(route().current('pages.optionalExtension', { extension: '' }), true); - same(route().current('pages.optionalExtension*', { extension: '' }), true); - same(route().current('pages.optionalExtension', { extension: '.html' }), false); - same(route().current('pages.optionalExtension*', { extension: '.pdf' }), false); + expect(route().current()).toBe('pages.optionalExtension'); + expect(route().current('pages.optionalExtension', '')).toBe(true); + expect(route().current('pages.optionalExtension*', '')).toBe(true); + expect(route().current('pages.optionalExtension', [''])).toBe(true); + expect(route().current('pages.optionalExtension*', [''])).toBe(true); + expect(route().current('pages.optionalExtension', { extension: '' })).toBe(true); + expect(route().current('pages.optionalExtension*', { extension: '' })).toBe(true); + expect(route().current('pages.optionalExtension', { extension: '.html' })).toBe(false); + expect(route().current('pages.optionalExtension*', { extension: '.pdf' })).toBe(false); }); test('can check the current route name at a URL with a non-delimited optional parameter', () => { global.window.location.pathname = '/download/file.html'; - same(route().current(), 'pages.optionalExtension'); - same(route().current('pages.optionalExtension', ''), false); - same(route().current('pages.optionalExtension*', ''), false); - same(route().current('pages.optionalExtension', '.html'), true); - same(route().current('pages.optionalExtension*', '.html'), true); - same(route().current('pages.optionalExtension', ['']), false); - same(route().current('pages.optionalExtension*', ['']), false); - same(route().current('pages.optionalExtension', ['.html']), true); - same(route().current('pages.optionalExtension*', ['.html']), true); - same(route().current('pages.optionalExtension', { extension: '' }), false); - same(route().current('pages.optionalExtension*', { extension: '' }), false); - same(route().current('pages.optionalExtension', { extension: '.pdf' }), false); - same(route().current('pages.optionalExtension*', { extension: '.pdf' }), false); - same(route().current('pages.optionalExtension', { extension: '.html' }), true); - same(route().current('pages.optionalExtension*', { extension: '.html' }), true); + expect(route().current()).toBe('pages.optionalExtension'); + expect(route().current('pages.optionalExtension', '')).toBe(false); + expect(route().current('pages.optionalExtension*', '')).toBe(false); + expect(route().current('pages.optionalExtension', '.html')).toBe(true); + expect(route().current('pages.optionalExtension*', '.html')).toBe(true); + expect(route().current('pages.optionalExtension', [''])).toBe(false); + expect(route().current('pages.optionalExtension*', [''])).toBe(false); + expect(route().current('pages.optionalExtension', ['.html'])).toBe(true); + expect(route().current('pages.optionalExtension*', ['.html'])).toBe(true); + expect(route().current('pages.optionalExtension', { extension: '' })).toBe(false); + expect(route().current('pages.optionalExtension*', { extension: '' })).toBe(false); + expect(route().current('pages.optionalExtension', { extension: '.pdf' })).toBe(false); + expect(route().current('pages.optionalExtension*', { extension: '.pdf' })).toBe(false); + expect(route().current('pages.optionalExtension', { extension: '.html' })).toBe(true); + expect(route().current('pages.optionalExtension*', { extension: '.html' })).toBe(true); global.window.location.pathname = '/where/download/file.html'; - same(route().current('pages.optionalExtensionWhere', { extension: '.html' }), true); + expect( + route().current('pages.optionalExtensionWhere', { + extension: '.html', + }) + ).toBe(true); global.window.location.pathname = '/where/download/file.pdf'; - same(route().current('pages.optionalExtensionWhere', { extension: '.pdf' }), false); + expect( + route().current('pages.optionalExtensionWhere', { + extension: '.pdf', + }) + ).toBe(false); }); test('can check the current route name with parameters on a URL with no parameters', () => { @@ -923,109 +949,109 @@ describe('current()', () => { global.window.location.host = 'ziggy.dev'; global.window.location.pathname = '/'; - same(route().current('home', { page: 'test' }), false); - same(route().current('pages', { page: 'test' }), false); + expect(route().current('home', { page: 'test' })).toBe(false); + expect(route().current('pages', { page: 'test' })).toBe(false); global.window.location.pathname = '/posts/'; - same(route().current('posts.index', { post: 1 }), false); - same(route().current('posts.show', { post: 1 }), false); + expect(route().current('posts.index', { post: 1 })).toBe(false); + expect(route().current('posts.show', { post: 1 })).toBe(false); }); test('can check the current route name with positional parameters on a URL with no parameters', () => { global.window.location.pathname = '/posts'; global.window.location.search = '?0=test'; - same(route().current('posts.index', undefined), true); - same(route().current('posts.index', null), true); - same(route().current('posts.index', {}), true); - same(route().current('posts.index', { '0': 'test' }), true); + expect(route().current('posts.index', undefined)).toBe(true); + expect(route().current('posts.index', null)).toBe(true); + expect(route().current('posts.index', {})).toBe(true); + expect(route().current('posts.index', { 0: 'test' })).toBe(true); - same(route().current('posts.index', ''), false); - same(route().current('posts.index', 'test'), false); - // same(route().current('posts.index', []), false); // Not supported - same(route().current('posts.index', ['']), false); - same(route().current('posts.index', [1]), false); + expect(route().current('posts.index', '')).toBe(false); + expect(route().current('posts.index', 'test')).toBe(false); + // expect(route().current('posts.index', [])).toBe(false); // Not supported + expect(route().current('posts.index', [''])).toBe(false); + expect(route().current('posts.index', [1])).toBe(false); }); test('can return false when checking the current route name on an unknown route', () => { global.window.location.pathname = '/unknown/'; - same(route().current('posts.delete'), false); + expect(route().current('posts.delete')).toBe(false); }); test('can return false when checking the current route name and params on an unknown URL', () => { global.window.location.pathname = '/unknown/path'; - same(route().current('posts.show', { post: 2 }), false); - same(route().current('posts.show', 2), false); - same(route().current('posts.show', [2]), false); - same(route().current('posts.show', 'post'), false); + expect(route().current('posts.show', { post: 2 })).toBe(false); + expect(route().current('posts.show', 2)).toBe(false); + expect(route().current('posts.show', [2])).toBe(false); + expect(route().current('posts.show', 'post')).toBe(false); }); test('can return false when checking a non-existent route name on a known URL', () => { global.window.location.pathname = '/events/1/venues/2'; - same(route().current('random-route'), false); + expect(route().current('random-route')).toBe(false); }); test('can return false when checking a non-existent route name on an unknown URL', () => { global.window.location.pathname = '/unknown/test'; - same(route().current('random-route'), false); + expect(route().current('random-route')).toBe(false); }); test('can return false when checking a non-existent route name and params on a known URL', () => { global.window.location.pathname = '/events/1/venues/2'; - same(route().current('random-route', { post: 2 }), false); - same(route().current('random-route', 2), false); - same(route().current('random-route', [2]), false); - same(route().current('random-route', 'post'), false); + expect(route().current('random-route', { post: 2 })).toBe(false); + expect(route().current('random-route', 2)).toBe(false); + expect(route().current('random-route', [2])).toBe(false); + expect(route().current('random-route', 'post')).toBe(false); }); test('can return false when checking a non-existent route name and params on an unknown URL', () => { global.window.location.pathname = '/unknown/params'; - same(route().current('random-route', { post: 2 }), false); - same(route().current('random-route', 2), false); - same(route().current('random-route', [2]), false); - same(route().current('random-route', 'post'), false); + expect(route().current('random-route', { post: 2 })).toBe(false); + expect(route().current('random-route', 2)).toBe(false); + expect(route().current('random-route', [2])).toBe(false); + expect(route().current('random-route', 'post')).toBe(false); }); test('can check the current route name against a pattern', () => { global.window.location.pathname = '/events/1/venues/2'; - assert(route().current('events.venues.show')); - assert(route().current('events.venues.*')); - assert(route().current('events.*.show')); - assert(route().current('*.venues.show')); - assert(route().current('events.*')); + expect(route().current('events.venues.show')).toBe(true); + expect(route().current('events.venues.*')).toBe(true); + expect(route().current('events.*.show')).toBe(true); + expect(route().current('*.venues.show')).toBe(true); + expect(route().current('events.*')).toBe(true); - assert(!route().current('events.venues.index')); - assert(!route().current('events.users.*')); - assert(!route().current('*.users.show')); - assert(!route().current('events')); - assert(!route().current('show')); + expect(route().current('events.venues.index')).toBe(false); + expect(route().current('events.users.*')).toBe(false); + expect(route().current('*.users.show')).toBe(false); + expect(route().current('events')).toBe(false); + expect(route().current('show')).toBe(false); global.window.location.pathname = '/hosting-contacts'; - assert(route().current('hosting-contacts.index')); - assert(route().current('*.index')); + expect(route().current('hosting-contacts.index')).toBe(true); + expect(route().current('*.index')).toBe(true); // https://github.com/tighten/ziggy/pull/296 - assert(!route().current('hosting.*')); + expect(route().current('hosting.*')).toBe(false); }); test('can check the current route name on a route with filled optional parameters', () => { global.window.location.pathname = '/optional/1/foo'; - assert(route().current('optional')); + expect(route().current('optional')).toBe(true); }); test('can check the current route name on a route with trailing empty optional parameters', () => { global.window.location.pathname = '/optional/1'; - assert(route().current('optional')); + expect(route().current('optional')).toBe(true); }); test('can check the current route name on a route with optional parameters in the middle of the URI', () => { @@ -1036,91 +1062,120 @@ describe('current()', () => { global.window.location.host = 'ziggy.dev'; global.window.location.pathname = '/subfolder/ph/products/4'; - assert(route().current('products.show')); + expect(route().current('products.show')).toBe(true); }); test('can check the current route with parameters', () => { global.window.location.pathname = '/events/1/venues/2'; - same(route().current('events.venues.show', { event: 1, venue: 2 }), true); - same(route().current('events.venues.show', [1, 2]), true); - same(route().current('events.venues.show', [1, { id: 2, name: 'Grand Canyon' }]), true); - same(route().current('events.venues.show', { event: 1 }), true); - same(route().current('events.venues.show', { venue: 2 }), true); - same(route().current('events.venues.show', [1]), true); - same(route().current('events.venues.show', {}), true); - same(route().current('events.venues.show', null), true); + expect(route().current('events.venues.show', { event: 1, venue: 2 })).toBe(true); + expect(route().current('events.venues.show', [1, 2])).toBe(true); + expect(route().current('events.venues.show', [1, { id: 2, name: 'Grand Canyon' }])).toBe(true); + expect(route().current('events.venues.show', { event: 1 })).toBe(true); + expect(route().current('events.venues.show', { venue: 2 })).toBe(true); + expect(route().current('events.venues.show', [1])).toBe(true); + expect(route().current('events.venues.show', {})).toBe(true); + expect(route().current('events.venues.show', null)).toBe(true); - same(route().current('events.venues.show', { event: 4, venue: 2 }), false); - same(route().current('events.venues.show', { event: null }), false); - same(route().current('events.venues.show', [1, 6]), false); - same(route().current('events.venues.show', [{ id: 1 }, { id: 4, name: 'Great Pyramids' }]), false); - same(route().current('events.venues.show', { event: 4 }), false); - same(route().current('events.venues.show', { venue: 4 }), false); - same(route().current('events.venues.show', [5]), false); + expect(route().current('events.venues.show', { event: 4, venue: 2 })).toBe(false); + expect(route().current('events.venues.show', { event: null })).toBe(false); + expect(route().current('events.venues.show', [1, 6])).toBe(false); + expect(route().current('events.venues.show', [{ id: 1 }, { id: 4, name: 'Great Pyramids' }])).toBe(false); + expect(route().current('events.venues.show', { event: 4 })).toBe(false); + expect(route().current('events.venues.show', { venue: 4 })).toBe(false); + expect(route().current('events.venues.show', [5])).toBe(false); }); test('can check the current route with parameters with incorrect parameter names', () => { global.window.location.pathname = '/events/1/venues/2'; - same(route().current('events.venues.show', { eventz: 2 }), false); + expect(route().current('events.venues.show', { eventz: 2 })).toBe(false); }); test('can check the current route with query parameters', () => { global.window.location.pathname = '/events/1/venues/2'; global.window.location.search = '?user=Jacob&id=9'; - assert(route().current('events.venues.show', { event: 1, venue: 2, user: 'Jacob' })); - assert(route().current('events.venues.show', { - event: { id: 1, name: 'Party' }, - venue: 2, - id: 9, - })); - assert(route().current('events.venues.show', { user: 'Jacob', venue: { id: 2 } })); - - assert(!route().current('events.venues.show', { user: 'Matt', venue: { id: 9 } })); - assert(!route().current('events.venues.show', { event: 5, id: 9, user: 'Jacob' })); - assert(!route().current('events.venues.show', { id: 12, user: 'Matt' })); + expect( + route().current('events.venues.show', { + event: 1, + venue: 2, + user: 'Jacob', + }) + ).toBe(true); + expect( + route().current('events.venues.show', { + event: { id: 1, name: 'Party' }, + venue: 2, + id: 9, + }) + ).toBe(true); + expect( + route().current('events.venues.show', { + user: 'Jacob', + venue: { id: 2 }, + }) + ).toBe(true); + + expect( + route().current('events.venues.show', { + user: 'Matt', + venue: { id: 9 }, + }) + ).toBe(false); + expect( + route().current('events.venues.show', { + event: 5, + id: 9, + user: 'Jacob', + }) + ).toBe(false); + expect(route().current('events.venues.show', { id: 12, user: 'Matt' })).toBe(false); }); test('can ignore routes that don’t allow GET requests', () => { global.window.location.pathname = '/posts/1'; - assert(!route().current('posts.update')); + expect(route().current('posts.update')).toBe(false); }); test('can ignore trailing slashes', () => { global.window.location.pathname = '/events/1/venues/'; - same(route().current(), 'events.venues.index'); + expect(route().current()).toBe('events.venues.index'); }); test('matches route name with multiple periods', () => { global.window.location.pathname = '/events/1/venues'; - same(route().current('events.venues-index'), false); - same(route().current('events.venues.index'), true); + expect(route().current('events.venues-index')).toBe(false); + expect(route().current('events.venues.index')).toBe(true); global.window.location.pathname = '/events/1/venues-index'; - same(route().current('events.venues-index'), true); - same(route().current('events.venues.index'), false); + expect(route().current('events.venues-index')).toBe(true); + expect(route().current('events.venues.index')).toBe(false); }); test('matches route name with multiple periods and wildcards', () => { global.window.location.pathname = '/events/1/venues-index'; - same(route().current('events.venues-index'), true); - same(route().current('events.venues.*'), false); + expect(route().current('events.venues-index')).toBe(true); + expect(route().current('events.venues.*')).toBe(false); }); test.skip('can unresolve arbitrary urls to names and params', () => { const resolved = route().unresolve('https://ziggy.dev/events/1/venues?test=yes'); - deepEqual(resolved, { name: 'events.venues.index', params: {event: '1'}, query: {test: 'yes'}, route: resolved.route }); - same(resolved.route.uri, 'events/{event}/venues'); + expect(resolved).toStrictEqual({ + name: 'events.venues.index', + params: { event: '1' }, + query: { test: 'yes' }, + route: resolved.route, + }); + expect(resolved.route.uri).toBe('events/{event}/venues'); - same(route().unresolve('ziggy.dev/events/1/venues-index').name, 'events.venues-index'); - same(route().unresolve('/events/1/venues-index').name, 'events.venues-index'); + expect(route().unresolve('ziggy.dev/events/1/venues-index').name).toBe('events.venues-index'); + expect(route().unresolve('/events/1/venues-index').name).toBe('events.venues-index'); }); test('can get the current route name without window', () => { @@ -1148,7 +1203,7 @@ describe('current()', () => { }, }; - same(route(undefined, undefined, undefined, config).current(), 'events.venues.show'); + expect(route(undefined, undefined, undefined, config).current()).toBe('events.venues.show'); global.window = oldWindow; }); From 5cfa3fb64a6e9d40ed3b48c18abb3790ec6de2ca Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 11:53:02 -0400 Subject: [PATCH 51/56] Install and run `prettier` --- .prettierignore | 5 + composer.json | 7 +- package-lock.json | 16 +++ package.json | 7 ++ src/js/Route.js | 63 +++++++---- src/js/Router.js | 89 +++++++++++----- src/js/index.d.ts | 57 +++++----- src/js/react.js | 9 +- src/js/vue.js | 3 +- tests/js/route.test.js | 234 +++++++++++++++++++++++++++++------------ 10 files changed, 347 insertions(+), 143 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..62e55a02 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +.github/ +dist/ +tests/fixtures/ +vendor/ +*.md diff --git a/composer.json b/composer.json index da8fc4cb..ad6a306a 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,12 @@ { "name": "tightenco/ziggy", "description": "Generates a Blade directive exporting all of your named Laravel routes. Also provides a nice route() helper function in JavaScript.", - "keywords": ["laravel", "routes", "javascript", "ziggy"], + "keywords": [ + "laravel", + "routes", + "javascript", + "ziggy" + ], "homepage": "https://github.com/tighten/ziggy", "license": "MIT", "authors": [ diff --git a/package-lock.json b/package-lock.json index 93f337e9..c753efa8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ }, "devDependencies": { "microbundle": "^0.15.1", + "prettier": "^3.0.3", "typescript": "^5.2.2", "vitest": "^1.0.0-beta.1" } @@ -6211,6 +6212,21 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", diff --git a/package.json b/package.json index aa85187b..006cf5f7 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "build:npm:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --no-sourcemap --no-generateTypes", "test": "vitest", "typecheck": "vitest typecheck", + "format": "prettier . --write", "prepublishOnly": "npm run build:npm && npm run build:npm:vue && npm run build:npm:react" }, "mangle": { @@ -60,7 +61,13 @@ }, "devDependencies": { "microbundle": "^0.15.1", + "prettier": "^3.0.3", "typescript": "^5.2.2", "vitest": "^1.0.0-beta.1" + }, + "prettier": { + "printWidth": 100, + "singleQuote": true, + "tabWidth": 4 } } diff --git a/src/js/Route.js b/src/js/Route.js index 4b76be62..42bd7160 100644 --- a/src/js/Route.js +++ b/src/js/Route.js @@ -42,8 +42,12 @@ export default class Route { get origin() { // If we're building just a path there's no origin, otherwise: if this route has a // domain configured we construct the origin with that, if not we use the app URL - return !this.config.absolute ? '' : this.definition.domain - ? `${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${this.config.port ? `:${this.config.port}` : ''}` + return !this.config.absolute + ? '' + : this.definition.domain + ? `${this.config.url.match(/^\w+:\/\//)[0]}${this.definition.domain}${ + this.config.port ? `:${this.config.port}` : '' + }` : this.config.url; } @@ -56,10 +60,12 @@ export default class Route { * @return {Array} Parameter segments. */ get parameterSegments() { - return this.template.match(/{[^}?]+\??}/g)?.map((segment) => ({ - name: segment.replace(/{|\??}/g, ''), - required: !/\?}$/.test(segment), - })) ?? []; + return ( + this.template.match(/{[^}?]+\??}/g)?.map((segment) => ({ + name: segment.replace(/{|\??}/g, ''), + required: !/\?}$/.test(segment), + })) ?? [] + ); } /** @@ -75,7 +81,9 @@ export default class Route { // by replacing its parameter segments with matchers for parameter values const pattern = this.template .replace(/(\/?){([^}?]*)(\??)}/g, (_, slash, segment, optional) => { - const regex = `(?<${segment}>${this.wheres[segment]?.replace(/(^\^)|(\$$)/g, '') || '[^/?]+'})`; + const regex = `(?<${segment}>${ + this.wheres[segment]?.replace(/(^\^)|(\$$)/g, '') || '[^/?]+' + })`; return optional ? `(${slash}${regex})?` : `${slash}${regex}`; }) .replace(/^\w+:\/\//, ''); @@ -86,7 +94,10 @@ export default class Route { if (matches) { for (const k in matches.groups) { - matches.groups[k] = typeof matches.groups[k] === 'string' ? decodeURIComponent(matches.groups[k]) : matches.groups[k]; + matches.groups[k] = + typeof matches.groups[k] === 'string' + ? decodeURIComponent(matches.groups[k]) + : matches.groups[k]; } return { params: matches.groups, query: parse(query) }; } @@ -105,19 +116,33 @@ export default class Route { if (!segments.length) return this.template; - return this.template.replace(/{([^}?]+)(\??)}/g, (_, segment, optional) => { - // If the parameter is missing but is not optional, throw an error - if (!optional && [null, undefined].includes(params[segment])) { - throw new Error(`Ziggy error: '${segment}' parameter is required for route '${this.name}'.`) - } + return this.template + .replace(/{([^}?]+)(\??)}/g, (_, segment, optional) => { + // If the parameter is missing but is not optional, throw an error + if (!optional && [null, undefined].includes(params[segment])) { + throw new Error( + `Ziggy error: '${segment}' parameter is required for route '${this.name}'.`, + ); + } - if (this.wheres[segment]) { - if (!new RegExp(`^${optional ? `(${this.wheres[segment]})?` : this.wheres[segment]}$`).test(params[segment] ?? '')) { - throw new Error(`Ziggy error: '${segment}' parameter does not match required format '${this.wheres[segment]}' for route '${this.name}'.`) + if (this.wheres[segment]) { + if ( + !new RegExp( + `^${optional ? `(${this.wheres[segment]})?` : this.wheres[segment]}$`, + ).test(params[segment] ?? '') + ) { + throw new Error( + `Ziggy error: '${segment}' parameter does not match required format '${this.wheres[segment]}' for route '${this.name}'.`, + ); + } } - } - return encodeURI(params[segment] ?? '').replace(/%7C/g, '|').replace(/%25/g, '%').replace(/\$/g, '%24'); - }).replace(`${this.origin}//`, `${this.origin}/`).replace(/\/+$/, ''); + return encodeURI(params[segment] ?? '') + .replace(/%7C/g, '|') + .replace(/%25/g, '%') + .replace(/\$/g, '%24'); + }) + .replace(`${this.origin}//`, `${this.origin}/`) + .replace(/\/+$/, ''); } } diff --git a/src/js/Router.js b/src/js/Router.js index efd95443..e893fdd7 100644 --- a/src/js/Router.js +++ b/src/js/Router.js @@ -43,13 +43,20 @@ export default class Router extends String { .filter((key) => key !== '_query') .reduce((result, current) => ({ ...result, [current]: this._params[current] }), {}); - return this._route.compile(this._params) + stringify({ ...unhandled, ...this._params['_query'] }, { - addQueryPrefix: true, - arrayFormat: 'indices', - encodeValuesOnly: true, - skipNulls: true, - encoder: (value, encoder) => typeof value === 'boolean' ? Number(value) : encoder(value), - }); + return ( + this._route.compile(this._params) + + stringify( + { ...unhandled, ...this._params['_query'] }, + { + addQueryPrefix: true, + arrayFormat: 'indices', + encodeValuesOnly: true, + skipNulls: true, + encoder: (value, encoder) => + typeof value === 'boolean' ? Number(value) : encoder(value), + }, + ) + ); } /** @@ -69,7 +76,8 @@ export default class Router extends String { let matchedParams = {}; const [name, route] = Object.entries(this._config.routes).find( - ([name, route]) => (matchedParams = new Route(name, route, this._config).matchesUrl(url)) + ([name, route]) => + (matchedParams = new Route(name, route, this._config).matchesUrl(url)), ) || [undefined, undefined]; return { name, ...matchedParams, route }; @@ -79,10 +87,12 @@ export default class Router extends String { const { host, pathname, search } = this._location(); return ( - this._config.absolute + (this._config.absolute ? host + pathname - : pathname.replace(this._config.url.replace(/^\w*:\/\/[^/]+/, ''), '').replace(/^\/+/, '/') - ) + search; + : pathname + .replace(this._config.url.replace(/^\w*:\/\/[^/]+/, ''), '') + .replace(/^\/+/, '/')) + search + ); } /** @@ -109,7 +119,9 @@ export default class Router extends String { // Test the passed name against the current route, matching some // basic wildcards, e.g. passing `events.*` matches `events.show` - const match = new RegExp(`^${name.replace(/\./g, '\\.').replace(/\*/g, '.*')}$`).test(current); + const match = new RegExp(`^${name.replace(/\./g, '\\.').replace(/\*/g, '.*')}$`).test( + current, + ); if ([null, undefined].includes(params) || !match) return match; @@ -119,7 +131,11 @@ export default class Router extends String { const routeParams = { ...currentParams, ...query }; // If the current window URL has no route parameters, and the passed parameters are empty, return true - if (Object.values(params).every(p => !p) && !Object.values(routeParams).some(v => v !== undefined)) return true; + if ( + Object.values(params).every((p) => !p) && + !Object.values(routeParams).some((v) => v !== undefined) + ) + return true; // Check that all passed parameters match their values in the current window URL // Use weak equality because all values in the current window URL will be strings @@ -133,7 +149,11 @@ export default class Router extends String { * @return {Object} */ _location() { - const { host = '', pathname = '', search = '' } = typeof window !== 'undefined' ? window.location : {}; + const { + host = '', + pathname = '', + search = '', + } = typeof window !== 'undefined' ? window.location : {}; return { host: this._config.location?.host ?? host, @@ -182,7 +202,7 @@ export default class Router extends String { * @return {Object} Normalized complete route parameters. */ _parse(params = {}, route = this._route) { - params ??= {} + params ??= {}; // If `params` is a string or integer, wrap it in an array params = ['string', 'number'].includes(typeof params) ? [params] : params; @@ -193,15 +213,19 @@ export default class Router extends String { if (Array.isArray(params)) { // If the parameters are an array they have to be in order, so we can transform them into // an object by keying them with the template segment names in the order they appear - params = params.reduce((result, current, i) => segments[i] - ? ({ ...result, [segments[i].name]: current }) - : typeof current === 'object' - ? ({ ...result, ...current }) - : ({ ...result, [current]: '' }), {}); + params = params.reduce( + (result, current, i) => + segments[i] + ? { ...result, [segments[i].name]: current } + : typeof current === 'object' + ? { ...result, ...current } + : { ...result, [current]: '' }, + {}, + ); } else if ( - segments.length === 1 - && !params[segments[0].name] - && (params.hasOwnProperty(Object.values(route.bindings)[0]) || params.hasOwnProperty('id')) + segments.length === 1 && + !params[segments[0].name] && + (params.hasOwnProperty(Object.values(route.bindings)[0]) || params.hasOwnProperty('id')) ) { // If there is only one template segment and `params` is an object, that object is // ambiguous—it could contain the parameter key and value, or it could be an object @@ -227,8 +251,12 @@ export default class Router extends String { * @return {Object} Default route parameters. */ _defaults(route) { - return route.parameterSegments.filter(({ name }) => this._config.defaults[name]) - .reduce((result, { name }, i) => ({ ...result, [name]: this._config.defaults[name] }), {}); + return route.parameterSegments + .filter(({ name }) => this._config.defaults[name]) + .reduce( + (result, { name }, i) => ({ ...result, [name]: this._config.defaults[name] }), + {}, + ); } /** @@ -245,7 +273,12 @@ export default class Router extends String { return Object.entries(params).reduce((result, [key, value]) => { // If the value isn't an object, or if the key isn't a named route parameter, // there's nothing to substitute so we return it as-is - if (!value || typeof value !== 'object' || Array.isArray(value) || !parameterSegments.some(({ name }) => name === key)) { + if ( + !value || + typeof value !== 'object' || + Array.isArray(value) || + !parameterSegments.some(({ name }) => name === key) + ) { return { ...result, [key]: value }; } @@ -254,7 +287,9 @@ export default class Router extends String { // As a fallback, we still accept an 'id' key not explicitly registered as a binding bindings[key] = 'id'; } else { - throw new Error(`Ziggy error: object passed as '${key}' parameter is missing route model binding key '${bindings[key]}'.`) + throw new Error( + `Ziggy error: object passed as '${key}' parameter is missing route model binding key '${bindings[key]}'.`, + ); } } diff --git a/src/js/index.d.ts b/src/js/index.d.ts index c95870c2..95c49457 100644 --- a/src/js/index.d.ts +++ b/src/js/index.d.ts @@ -21,7 +21,7 @@ type RouteName = KnownRouteName | (string & {}); /** * Information about a single route parameter. */ -type ParameterInfo = { name: string, binding?: string }; +type ParameterInfo = { name: string; binding?: string }; /** * A primitive route parameter value, as it would appear in a URL. @@ -65,14 +65,18 @@ type GenericRouteParamsObject = Record & HasQueryParam; * An object of parameters for a specific named route. */ // TODO: The keys here could be non-optional (or more detailed) if we can determine which params are required/not. -type KnownRouteParamsObject = { [T in I[number] as T['name']]?: Routable } & GenericRouteParamsObject; +type KnownRouteParamsObject = { + [T in I[number] as T['name']]?: Routable; +} & GenericRouteParamsObject; // `readonly` allows TypeScript to determine the actual values of all the // parameter names inside the array, instead of just seeing `string`. // See https://github.com/tighten/ziggy/pull/664#discussion_r1329978447. /** * An object of route parameters. */ -type RouteParamsObject = N extends KnownRouteName ? KnownRouteParamsObject : GenericRouteParamsObject; +type RouteParamsObject = N extends KnownRouteName + ? KnownRouteParamsObject + : GenericRouteParamsObject; /** * An array of parameters for an unspecified route. @@ -83,7 +87,10 @@ type GenericRouteParamsArray = unknown[]; /** * An array of parameters for a specific named route. */ -type KnownRouteParamsArray = [...{ [K in keyof I]: Routable }, ...unknown[]]; +type KnownRouteParamsArray = [ + ...{ [K in keyof I]: Routable }, + ...unknown[], +]; // Because `K in keyof I` for a `readonly` array is always a number, even though this // looks like `{ 0: T, 1: U, 2: V }` TypeScript generates `[T, U, V]`. The nested // array destructing lets us type the first n items in the array, which are known @@ -97,7 +104,9 @@ type KnownRouteParamsArray = [...{ [K in key /** * An array of route parameters. */ -type RouteParamsArray = N extends KnownRouteName ? KnownRouteParamsArray : GenericRouteParamsArray; +type RouteParamsArray = N extends KnownRouteName + ? KnownRouteParamsArray + : GenericRouteParamsArray; /** * All possible parameter argument shapes for a route. @@ -108,38 +117,38 @@ type RouteParams = ParameterValue | RouteParamsObject | * A route. */ interface Route { - uri: string, - methods: ('GET' | 'HEAD' | 'POST' | 'PATCH' | 'PUT' | 'OPTIONS' | 'DELETE')[], - domain?: string, - parameters?: string[], - bindings?: Record, - wheres?: Record, - middleware?: string[], + uri: string; + methods: ('GET' | 'HEAD' | 'POST' | 'PATCH' | 'PUT' | 'OPTIONS' | 'DELETE')[]; + domain?: string; + parameters?: string[]; + bindings?: Record; + wheres?: Record; + middleware?: string[]; } /** * Ziggy's config object. */ interface Config { - url: string, - port: number | null, - defaults: Record, - routes: Record, + url: string; + port: number | null; + defaults: Record; + routes: Record; location?: { - host?: string, - pathname?: string, - search?: string, - }, + host?: string; + pathname?: string; + search?: string; + }; } /** * Ziggy's Router class. */ interface Router { - current(): RouteName | undefined, - current(name: T, params?: RouteParams): boolean, - get params(): Record, - has(name: T): boolean, + current(): RouteName | undefined; + current(name: T, params?: RouteParams): boolean; + get params(): Record; + has(name: T): boolean; } /** diff --git a/src/js/react.js b/src/js/react.js index 1dda1f8e..865aeef8 100644 --- a/src/js/react.js +++ b/src/js/react.js @@ -2,8 +2,11 @@ import route from './index.js'; export function useRoute(defaultConfig) { if (!defaultConfig && !globalThis.Ziggy && typeof Ziggy === 'undefined') { - throw new Error('Ziggy error: missing configuration. Ensure that a `Ziggy` variable is defined globally or pass a config object into `useRoute()`.'); + throw new Error( + 'Ziggy error: missing configuration. Ensure that a `Ziggy` variable is defined globally or pass a config object into `useRoute()`.', + ); } - return (name, params, absolute, config = defaultConfig) => route(name, params, absolute, config); -}; + return (name, params, absolute, config = defaultConfig) => + route(name, params, absolute, config); +} diff --git a/src/js/vue.js b/src/js/vue.js index a1a3b062..d0a99a80 100644 --- a/src/js/vue.js +++ b/src/js/vue.js @@ -2,7 +2,8 @@ import route from './index.js'; export const ZiggyVue = { install(app, options) { - const r = (name, params, absolute, config = options) => route(name, params, absolute, config); + const r = (name, params, absolute, config = options) => + route(name, params, absolute, config); app.mixin({ methods: { diff --git a/tests/js/route.test.js b/tests/js/route.test.js index e7f09db8..45db4bbe 100644 --- a/tests/js/route.test.js +++ b/tests/js/route.test.js @@ -235,7 +235,7 @@ describe('route()', () => { type: 'email', subscriber: 123, conversation_id: 1234, - }) + }), ).toBe('https://ziggy.dev/subscribers/123/conversations/email/1234'); }); @@ -248,8 +248,8 @@ describe('route()', () => { subscriber: 123, conversation_id: 1234, }, - false - ) + false, + ), ).toBe('/subscribers/123/conversations/email/1234'); }); @@ -282,28 +282,40 @@ describe('route()', () => { // route with required parameters expect(route('posts.show', 'my-first-post')).toBe('https://ziggy.dev/posts/my-first-post'); // route with default parameters - expect(route('translatePosts.show', 'my-first-post')).toBe('https://ziggy.dev/en/posts/my-first-post'); + expect(route('translatePosts.show', 'my-first-post')).toBe( + 'https://ziggy.dev/en/posts/my-first-post', + ); }); test('can generate a URL using an object', () => { // routes with required parameters expect(route('posts.show', { id: 1 })).toBe('https://ziggy.dev/posts/1'); - expect(route('events.venues.show', { event: 1, venue: 2 })).toBe('https://ziggy.dev/events/1/venues/2'); + expect(route('events.venues.show', { event: 1, venue: 2 })).toBe( + 'https://ziggy.dev/events/1/venues/2', + ); // route with optional parameters - expect(route('optionalId', { type: 'model', id: 1 })).toBe('https://ziggy.dev/optionalId/model/1'); + expect(route('optionalId', { type: 'model', id: 1 })).toBe( + 'https://ziggy.dev/optionalId/model/1', + ); // route with both required and default parameters - expect(route('translateEvents.venues.show', { event: 1, venue: 2 })).toBe('https://ziggy.dev/en/events/1/venues/2'); + expect(route('translateEvents.venues.show', { event: 1, venue: 2 })).toBe( + 'https://ziggy.dev/en/events/1/venues/2', + ); }); test('can generate a URL using an array', () => { // routes with required parameters expect(route('posts.show', [1])).toBe('https://ziggy.dev/posts/1'); expect(route('events.venues.show', [1, 2])).toBe('https://ziggy.dev/events/1/venues/2'); - expect(route('events.venues.show', [1, 'coliseum'])).toBe('https://ziggy.dev/events/1/venues/coliseum'); + expect(route('events.venues.show', [1, 'coliseum'])).toBe( + 'https://ziggy.dev/events/1/venues/coliseum', + ); // route with default parameters expect(route('translatePosts.show', [1])).toBe('https://ziggy.dev/en/posts/1'); // route with both required and default parameters - expect(route('translateEvents.venues.show', [1, 2])).toBe('https://ziggy.dev/en/events/1/venues/2'); + expect(route('translateEvents.venues.show', [1, 2])).toBe( + 'https://ziggy.dev/en/events/1/venues/2', + ); }); test('can generate a URL using an array of objects', () => { @@ -311,9 +323,13 @@ describe('route()', () => { const venue = { id: 2, name: 'Rogers Centre' }; // route with required parameters - expect(route('events.venues.show', [event, venue])).toBe('https://ziggy.dev/events/1/venues/2'); + expect(route('events.venues.show', [event, venue])).toBe( + 'https://ziggy.dev/events/1/venues/2', + ); // route with required and default parameters - expect(route('translateEvents.venues.show', [event, venue])).toBe('https://ziggy.dev/en/events/1/venues/2'); + expect(route('translateEvents.venues.show', [event, venue])).toBe( + 'https://ziggy.dev/en/events/1/venues/2', + ); }); test('can generate a URL using an array of integers and objects', () => { @@ -322,14 +338,20 @@ describe('route()', () => { // route with required parameters expect(route('events.venues.show', [1, venue])).toBe('https://ziggy.dev/events/1/venues/2'); // route with required and default parameters - expect(route('translateEvents.venues.show', [1, venue])).toBe('https://ziggy.dev/en/events/1/venues/2'); + expect(route('translateEvents.venues.show', [1, venue])).toBe( + 'https://ziggy.dev/en/events/1/venues/2', + ); }); test('can generate a URL for a route with domain parameters', () => { // route with required domain parameters - expect(route('team.user.show', { team: 'tighten', id: 1 })).toBe('https://tighten.ziggy.dev/users/1'); + expect(route('team.user.show', { team: 'tighten', id: 1 })).toBe( + 'https://tighten.ziggy.dev/users/1', + ); // route with required domain parameters and default parameters - expect(route('translateTeam.user.show', { team: 'tighten', id: 1 })).toBe('https://tighten.ziggy.dev/en/users/1'); + expect(route('translateTeam.user.show', { team: 'tighten', id: 1 })).toBe( + 'https://tighten.ziggy.dev/en/users/1', + ); }); test('can generate a URL for a route with a custom route model binding scope', () => { @@ -337,25 +359,33 @@ describe('route()', () => { route('postComments.show', [ { id: 1, title: 'Post' }, { uuid: 12345, title: 'Comment' }, - ]) + ]), ).toBe('https://ziggy.dev/posts/1/comments/12345'); - expect(route('postComments.show', [1, { uuid: 'correct-horse-etc-etc' }])).toBe('https://ziggy.dev/posts/1/comments/correct-horse-etc-etc'); + expect(route('postComments.show', [1, { uuid: 'correct-horse-etc-etc' }])).toBe( + 'https://ziggy.dev/posts/1/comments/correct-horse-etc-etc', + ); }); test("can fall back to an 'id' key if an object is passed for a parameter with no registered bindings", () => { expect(route('translatePosts.update', { id: 14 })).toBe('https://ziggy.dev/en/posts/14'); expect(route('translatePosts.update', [{ id: 14 }])).toBe('https://ziggy.dev/en/posts/14'); - expect(route('events.venues.update', [{ id: 10 }, { id: 1 }])).toBe('https://ziggy.dev/events/10/venues/1'); + expect(route('events.venues.update', [{ id: 10 }, { id: 1 }])).toBe( + 'https://ziggy.dev/events/10/venues/1', + ); }); test('can generate a URL for an app installed in a subfolder', () => { global.Ziggy.url = 'https://ziggy.dev/subfolder'; - expect(route('postComments.show', [1, { uuid: 'correct-horse-etc-etc' }])).toBe('https://ziggy.dev/subfolder/posts/1/comments/correct-horse-etc-etc'); + expect(route('postComments.show', [1, { uuid: 'correct-horse-etc-etc' }])).toBe( + 'https://ziggy.dev/subfolder/posts/1/comments/correct-horse-etc-etc', + ); }); test('can error if a route model binding key is missing', () => { - expect(() => route('postComments.show', [1, { count: 20 }])).toThrow(/Ziggy error: object passed as 'comment' parameter is missing route model binding key 'uuid'\./); + expect(() => route('postComments.show', [1, { count: 20 }])).toThrow( + /Ziggy error: object passed as 'comment' parameter is missing route model binding key 'uuid'\./, + ); }); test('can return base URL if path is "/"', () => { @@ -369,7 +399,9 @@ describe('route()', () => { // @todo duplicate test('can ignore an optional parameter', () => { expect(route('optional', { id: 123 })).toBe('https://ziggy.dev/optional/123'); - expect(route('optional', { id: 123, slug: 'news' })).toBe('https://ziggy.dev/optional/123/news'); + expect(route('optional', { id: 123, slug: 'news' })).toBe( + 'https://ziggy.dev/optional/123/news', + ); expect(route('optional', { id: 123, slug: null })).toBe('https://ziggy.dev/optional/123'); }); @@ -381,16 +413,24 @@ describe('route()', () => { }); test('missing optional parameter in first path segment', () => { - expect(route('products.show', { country: 'ca', language: 'fr', id: 1 })).toBe('https://ziggy.dev/ca/fr/products/1'); + expect(route('products.show', { country: 'ca', language: 'fr', id: 1 })).toBe( + 'https://ziggy.dev/ca/fr/products/1', + ); // These URLs aren't valid but this matches the behavior of Laravel's PHP `route()` helper - expect(route('products.show', { country: 'ca', id: 1 })).toBe('https://ziggy.dev/ca//products/1'); + expect(route('products.show', { country: 'ca', id: 1 })).toBe( + 'https://ziggy.dev/ca//products/1', + ); expect(route('products.show', { id: 1 })).toBe('https://ziggy.dev//products/1'); // First param is handled correctly - expect(route('products.show', { language: 'fr', id: 1 })).toBe('https://ziggy.dev/fr/products/1'); + expect(route('products.show', { language: 'fr', id: 1 })).toBe( + 'https://ziggy.dev/fr/products/1', + ); }); test('can error if a route name doesn’t exist', () => { - expect(() => route('unknown-route')).toThrow(/Ziggy error: route 'unknown-route' is not in the route list\./); + expect(() => route('unknown-route')).toThrow( + /Ziggy error: route 'unknown-route' is not in the route list\./, + ); }); test('can automatically append extra parameter values as a query string', () => { @@ -400,7 +440,7 @@ describe('route()', () => { venue: 2, search: 'rogers', page: 2, - }) + }), ).toBe('https://ziggy.dev/events/1/venues/2?search=rogers&page=2'); expect( route('events.venues.show', { @@ -408,14 +448,18 @@ describe('route()', () => { event: 1, venue: 2, search: 'rogers', - }) + }), ).toBe('https://ziggy.dev/events/1/venues/2?id=2&search=rogers'); // ignore values explicitly set to `null` - expect(route('posts.index', { filled: 'filling', empty: null })).toBe('https://ziggy.dev/posts?filled=filling'); + expect(route('posts.index', { filled: 'filling', empty: null })).toBe( + 'https://ziggy.dev/posts?filled=filling', + ); }); test('can cast boolean query parameters to integers', () => { - expect(route('posts.show', { post: 1, preview: true })).toBe('https://ziggy.dev/posts/1?preview=1'); + expect(route('posts.show', { post: 1, preview: true })).toBe( + 'https://ziggy.dev/posts/1?preview=1', + ); }); test('can explicitly append query parameters using _query parameter', () => { @@ -427,7 +471,7 @@ describe('route()', () => { event: 4, venue: 2, }, - }) + }), ).toBe('https://ziggy.dev/events/1/venues/2?event=4&venue=2'); expect( route('events.venues.show', { @@ -437,7 +481,7 @@ describe('route()', () => { id: 12, }, venue: 2, - }) + }), ).toBe('https://ziggy.dev/events/4/venues/2?event=9&id=12'); }); @@ -448,7 +492,9 @@ describe('route()', () => { // route with no parameters expect(route('posts.index')).toBe('https://ziggy.dev:81/posts'); // route with required domain parameters - expect(route('team.user.show', { team: 'tighten', id: 1 })).toBe('https://tighten.ziggy.dev:81/users/1'); + expect(route('team.user.show', { team: 'tighten', id: 1 })).toBe( + 'https://tighten.ziggy.dev:81/users/1', + ); }); test('can handle trailing path segments in the base URL', () => { @@ -460,12 +506,14 @@ describe('route()', () => { test('URL-encode query parameters', () => { global.Ziggy.url = 'https://test.thing/ab/cd'; - expect(route('events.venues.index', { event: 'Fun&Games' })).toBe('https://test.thing/ab/cd/events/Fun&Games/venues'); + expect(route('events.venues.index', { event: 'Fun&Games' })).toBe( + 'https://test.thing/ab/cd/events/Fun&Games/venues', + ); expect( route('events.venues.index', { event: 'Fun&Games', location: 'Blues&Clues', - }) + }), ).toBe('https://test.thing/ab/cd/events/Fun&Games/venues?location=Blues%26Clues'); }); @@ -474,7 +522,7 @@ describe('route()', () => { route('events.venues.index', { event: 'test', guests: ['a', 'b', 'c'], - }) + }), ).toBe('https://ziggy.dev/events/test/venues?guests[0]=a&guests[1]=b&guests[2]=c'); }); @@ -495,7 +543,9 @@ describe('route()', () => { }, }; - expect(route('tightenDev.packages.index', { dev: 1 }, true, config)).toBe('http://notYourAverage.dev/tightenDev/1/packages'); + expect(route('tightenDev.packages.index', { dev: 1 }, true, config)).toBe( + 'http://notYourAverage.dev/tightenDev/1/packages', + ); }); test('can extract parameters for an app installed in a subfolder', () => { @@ -576,52 +626,92 @@ describe('route()', () => { test("can append 'extra' elements in array of parameters to query", () => { // 'posts.show' has exactly one parameter expect(route('posts.show', [1, 2])).toBe('https://ziggy.dev/posts/1?2='); - expect(route('posts.show', ['my-first-post', 'foo', 'bar'])).toBe('https://ziggy.dev/posts/my-first-post?foo=&bar='); + expect(route('posts.show', ['my-first-post', 'foo', 'bar'])).toBe( + 'https://ziggy.dev/posts/my-first-post?foo=&bar=', + ); - expect(route('posts.show', ['my-first-post', 'foo', { bar: 'baz' }])).toBe('https://ziggy.dev/posts/my-first-post?foo=&bar=baz'); + expect(route('posts.show', ['my-first-post', 'foo', { bar: 'baz' }])).toBe( + 'https://ziggy.dev/posts/my-first-post?foo=&bar=baz', + ); }); test("can automatically append object with only 'extra' parameters to query", () => { // Route has no parameters, the entire parameters object is 'extra' and should be used as the query string - expect(route('hosting-contacts.index', { filter: { name: 'Dwyer' } })).toBe('https://ziggy.dev/hosting-contacts?filter[name]=Dwyer'); + expect(route('hosting-contacts.index', { filter: { name: 'Dwyer' } })).toBe( + 'https://ziggy.dev/hosting-contacts?filter[name]=Dwyer', + ); }); test("can append 'extra' object parameter to query", () => { - expect(route('posts.show', { post: 2, filter: { name: 'Dwyer' } })).toBe('https://ziggy.dev/posts/2?filter[name]=Dwyer'); + expect(route('posts.show', { post: 2, filter: { name: 'Dwyer' } })).toBe( + 'https://ziggy.dev/posts/2?filter[name]=Dwyer', + ); }); test('can generate a URL for a route with parameters inside individual segments', () => { - expect(route('pages.requiredExtension', 'x')).toBe('https://ziggy.dev/strict-download/filex'); - expect(route('pages.requiredExtension', '.html')).toBe('https://ziggy.dev/strict-download/file.html'); - expect(route('pages.requiredExtension', { extension: '.pdf' })).toBe('https://ziggy.dev/strict-download/file.pdf'); + expect(route('pages.requiredExtension', 'x')).toBe( + 'https://ziggy.dev/strict-download/filex', + ); + expect(route('pages.requiredExtension', '.html')).toBe( + 'https://ziggy.dev/strict-download/file.html', + ); + expect(route('pages.requiredExtension', { extension: '.pdf' })).toBe( + 'https://ziggy.dev/strict-download/file.pdf', + ); }); test('can generate a URL for a route with optional parameters inside individual segments', () => { expect(route('pages.optionalExtension')).toBe('https://ziggy.dev/download/file'); - expect(route('pages.optionalExtension', '.html')).toBe('https://ziggy.dev/download/file.html'); - expect(route('pages.optionalExtension', { extension: '.pdf' })).toBe('https://ziggy.dev/download/file.pdf'); + expect(route('pages.optionalExtension', '.html')).toBe( + 'https://ziggy.dev/download/file.html', + ); + expect(route('pages.optionalExtension', { extension: '.pdf' })).toBe( + 'https://ziggy.dev/download/file.pdf', + ); }); test('can generate a URL for a route with optional parameters inside individual segments respecting where requirements', () => { expect(route('pages.optionalExtensionWhere')).toBe('https://ziggy.dev/where/download/file'); - expect(route('pages.optionalExtensionWhere', '.html')).toBe('https://ziggy.dev/where/download/file.html'); - expect(() => route('pages.optionalExtensionWhere', { extension: '.pdf' })).toThrow(/'extension' parameter does not match required format/); + expect(route('pages.optionalExtensionWhere', '.html')).toBe( + 'https://ziggy.dev/where/download/file.html', + ); + expect(() => route('pages.optionalExtensionWhere', { extension: '.pdf' })).toThrow( + /'extension' parameter does not match required format/, + ); }); test('can generate a URL for a route with parameters inside individual segments', () => { - expect(route('pages.requiredExtensionWhere', '.html')).toBe('https://ziggy.dev/where/strict-download/file.html'); - expect(() => route('pages.requiredExtensionWhere', 'x')).toThrow(/'extension' parameter does not match required format/); - expect(() => route('pages.requiredExtensionWhere', { extension: '.pdf' })).toThrow(/'extension' parameter does not match required format/); + expect(route('pages.requiredExtensionWhere', '.html')).toBe( + 'https://ziggy.dev/where/strict-download/file.html', + ); + expect(() => route('pages.requiredExtensionWhere', 'x')).toThrow( + /'extension' parameter does not match required format/, + ); + expect(() => route('pages.requiredExtensionWhere', { extension: '.pdf' })).toThrow( + /'extension' parameter does not match required format/, + ); }); test('skip encoding slashes inside last parameter when explicitly allowed', () => { - expect(route('slashes', ['one/two', 'three/four'])).toBe('https://ziggy.dev/slashes/one/two/three/four'); - expect(route('slashes', ['one/two', 'Fun&Games/venues'])).toBe('https://ziggy.dev/slashes/one/two/Fun&Games/venues'); - expect(route('slashes', ['one/two/three', 'Fun&Games/venues/outdoors'])).toBe('https://ziggy.dev/slashes/one/two/three/Fun&Games/venues/outdoors'); - - expect(route('slashesOtherRegex', ['one/two', 'three/four'])).toBe('https://ziggy.dev/slashes/one/two/three/four'); - expect(route('slashesOtherRegex', ['one/two', 'Fun&Games/venues'])).toBe('https://ziggy.dev/slashes/one/two/Fun&Games/venues'); - expect(route('slashesOtherRegex', ['one/two/three', 'Fun&Games/venues/outdoors'])).toBe('https://ziggy.dev/slashes/one/two/three/Fun&Games/venues/outdoors'); + expect(route('slashes', ['one/two', 'three/four'])).toBe( + 'https://ziggy.dev/slashes/one/two/three/four', + ); + expect(route('slashes', ['one/two', 'Fun&Games/venues'])).toBe( + 'https://ziggy.dev/slashes/one/two/Fun&Games/venues', + ); + expect(route('slashes', ['one/two/three', 'Fun&Games/venues/outdoors'])).toBe( + 'https://ziggy.dev/slashes/one/two/three/Fun&Games/venues/outdoors', + ); + + expect(route('slashesOtherRegex', ['one/two', 'three/four'])).toBe( + 'https://ziggy.dev/slashes/one/two/three/four', + ); + expect(route('slashesOtherRegex', ['one/two', 'Fun&Games/venues'])).toBe( + 'https://ziggy.dev/slashes/one/two/Fun&Games/venues', + ); + expect(route('slashesOtherRegex', ['one/two/three', 'Fun&Games/venues/outdoors'])).toBe( + 'https://ziggy.dev/slashes/one/two/three/Fun&Games/venues/outdoors', + ); }); test('skip encoding some characters in route parameters', () => { @@ -794,7 +884,7 @@ describe('current()', () => { word: 'complex', digit: '12', required: 'required', - }) + }), ).toBe(true); expect(route().current('pages.complexWhereConflict1')).toBe(false); @@ -873,7 +963,9 @@ describe('current()', () => { }, }; - expect(route(undefined, undefined, undefined, config).current()).toBe('workspaces.processes.index'); + expect(route(undefined, undefined, undefined, config).current()).toBe( + 'workspaces.processes.index', + ); }); test('can check the current route name at a URL with a non-delimited parameter', () => { @@ -933,14 +1025,14 @@ describe('current()', () => { expect( route().current('pages.optionalExtensionWhere', { extension: '.html', - }) + }), ).toBe(true); global.window.location.pathname = '/where/download/file.pdf'; expect( route().current('pages.optionalExtensionWhere', { extension: '.pdf', - }) + }), ).toBe(false); }); @@ -1070,7 +1162,9 @@ describe('current()', () => { expect(route().current('events.venues.show', { event: 1, venue: 2 })).toBe(true); expect(route().current('events.venues.show', [1, 2])).toBe(true); - expect(route().current('events.venues.show', [1, { id: 2, name: 'Grand Canyon' }])).toBe(true); + expect(route().current('events.venues.show', [1, { id: 2, name: 'Grand Canyon' }])).toBe( + true, + ); expect(route().current('events.venues.show', { event: 1 })).toBe(true); expect(route().current('events.venues.show', { venue: 2 })).toBe(true); expect(route().current('events.venues.show', [1])).toBe(true); @@ -1080,7 +1174,9 @@ describe('current()', () => { expect(route().current('events.venues.show', { event: 4, venue: 2 })).toBe(false); expect(route().current('events.venues.show', { event: null })).toBe(false); expect(route().current('events.venues.show', [1, 6])).toBe(false); - expect(route().current('events.venues.show', [{ id: 1 }, { id: 4, name: 'Great Pyramids' }])).toBe(false); + expect( + route().current('events.venues.show', [{ id: 1 }, { id: 4, name: 'Great Pyramids' }]), + ).toBe(false); expect(route().current('events.venues.show', { event: 4 })).toBe(false); expect(route().current('events.venues.show', { venue: 4 })).toBe(false); expect(route().current('events.venues.show', [5])).toBe(false); @@ -1101,34 +1197,34 @@ describe('current()', () => { event: 1, venue: 2, user: 'Jacob', - }) + }), ).toBe(true); expect( route().current('events.venues.show', { event: { id: 1, name: 'Party' }, venue: 2, id: 9, - }) + }), ).toBe(true); expect( route().current('events.venues.show', { user: 'Jacob', venue: { id: 2 }, - }) + }), ).toBe(true); expect( route().current('events.venues.show', { user: 'Matt', venue: { id: 9 }, - }) + }), ).toBe(false); expect( route().current('events.venues.show', { event: 5, id: 9, user: 'Jacob', - }) + }), ).toBe(false); expect(route().current('events.venues.show', { id: 12, user: 'Matt' })).toBe(false); }); @@ -1174,7 +1270,9 @@ describe('current()', () => { }); expect(resolved.route.uri).toBe('events/{event}/venues'); - expect(route().unresolve('ziggy.dev/events/1/venues-index').name).toBe('events.venues-index'); + expect(route().unresolve('ziggy.dev/events/1/venues-index').name).toBe( + 'events.venues-index', + ); expect(route().unresolve('/events/1/venues-index').name).toBe('events.venues-index'); }); From 06daba16a25f0962824fa36f087eaa03523177a6 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 11:55:09 -0400 Subject: [PATCH 52/56] Add `.git-blame-ignore-revs` --- .git-blame-ignore-revs | 2 ++ .prettierignore | 1 + 2 files changed, 3 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..b69e779c --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Install and run `prettier` +5cfa3fb64a6e9d40ed3b48c18abb3790ec6de2ca diff --git a/.prettierignore b/.prettierignore index 62e55a02..e5129579 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,3 +3,4 @@ dist/ tests/fixtures/ vendor/ *.md +.git-blame-ignore-revs From e232e18a69d0220e25b108e32df80a02bd92297c Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 13:48:27 -0400 Subject: [PATCH 53/56] Update Readme --- README.md | 406 +++++++++++++++++++++++------------------------------- 1 file changed, 170 insertions(+), 236 deletions(-) diff --git a/README.md b/README.md index e367cf6b..af8826d1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Ziggy - Use your Laravel named routes in JavaScript](https://raw.githubusercontent.com/tighten/ziggy/main/ziggy-banner.png) +![Ziggy - Use your Laravel routes in JavaScript](https://raw.githubusercontent.com/tighten/ziggy/main/ziggy-banner.png) # Ziggy – Use your Laravel routes in JavaScript @@ -8,146 +8,133 @@ [![Latest Version on NPM](https://img.shields.io/npm/v/ziggy-js.svg?style=flat)](https://npmjs.com/package/ziggy-js) [![Downloads on NPM](https://img.shields.io/npm/dt/ziggy-js.svg?style=flat)](https://npmjs.com/package/ziggy-js) -Ziggy provides a JavaScript `route()` helper function that works like Laravel's, making it easy to use your Laravel named routes in JavaScript. +Ziggy provides a JavaScript `route()` function that works like Laravel's, making it a breeze to use your named Laravel routes in JavaScript. Ziggy supports all versions of Laravel from `5.4` onward, and all modern browsers. - [**Installation**](#installation) - [**Usage**](#usage) - - [The `route()` helper](#the-route-helper) - - [The `Router` class](#the-router-class) + - [`route()` function](#route-function) + - [`Router` class](#router-class) - [Route-model binding](#route-model-binding) - [TypeScript](#typescript) -- [**Advanced Setup**](#advanced-setup) - - [JavaScript frameworks](#javascript-frameworks) +- [**JavaScript frameworks**](#javascript-frameworks) + - [Generating and importing Ziggy's configuration](#generating-and-importing-ziggys-configuration) + - [Importing the `route()` function](#importing-the-route-function) - [Vue](#vue) - [React](#react) - [SPAs or separate repos](#spas-or-separate-repos) - [**Filtering Routes**](#filtering-routes) - - [Basic Filtering](#basic-filtering) - - [Filtering using Groups](#filtering-using-groups) + - [Including/excluding routes](#including-exluding-routes) + - [Filtering with Groups](#filtering-with-groups) - [**Other**](#other) - [**Contributing**](#contributing) ## Installation -Install Ziggy in your Laravel app: +Install Ziggy in your Laravel app with Composer: ```bash composer require tightenco/ziggy ``` -Add the `@routes` Blade directive to your main layout (_before_ your application's JavaScript), and the `route()` helper function will now be available globally! +Add the `@routes` Blade directive to your main layout (_before_ your application's JavaScript), and the `route()` helper function will be available globally! > By default, the output of the `@routes` Blade directive includes a list of all your application's routes and their parameters. This route list is included in the HTML of the page and can be viewed by end users. To configure which routes are included in this list, or to show and hide different routes on different pages, see [Filtering Routes](#filtering-routes). ## Usage -#### The `route()` helper +### `route()` function -Ziggy's `route()` helper function works like Laravel's—you can pass it the name of one of your routes, and the parameters you want to pass to the route, and it will return a URL. +Ziggy's `route()` function works like [Laravel's `route()` helper](https://laravel.com/docs/10.x/helpers#method-route)—you can pass it the name of a route, and the parameters you want to pass to the route, and it will generate a URL. -**Basic usage** +#### Basic usage ```php -// routes/web.php - Route::get('posts', fn (Request $request) => /* ... */)->name('posts.index'); ``` ```js -// app.js - route('posts.index'); // 'https://ziggy.test/posts' ``` -**With parameters** +#### Parameters ```php -// routes/web.php - -Route::get('posts/{post}', fn (Request $request, Post $post) => /* ... */)->name('posts.show'); +Route::get('posts/{post}', fn (Post $post) => /* ... */)->name('posts.show'); ``` ```js -// app.js - route('posts.show', 1); // 'https://ziggy.test/posts/1' route('posts.show', [1]); // 'https://ziggy.test/posts/1' route('posts.show', { post: 1 }); // 'https://ziggy.test/posts/1' ``` -**With multiple parameters** +#### Multiple parameters ```php -// routes/web.php - -Route::get('events/{event}/venues/{venue}', fn (Request $request, Event $event, Venue $venue) => /* ... */)->name('events.venues.show'); +Route::get('venues/{venue}/events/{event}', fn (Venue $venue, Event $event) => /* ... */) + ->name('venues.events.show'); ``` ```js -// app.js - -route('events.venues.show', [1, 2]); // 'https://ziggy.test/events/1/venues/2' -route('events.venues.show', { event: 1, venue: 2 }); // 'https://ziggy.test/events/1/venues/2' +route('venues.events.show', [1, 2]); // 'https://ziggy.test/venues/1/events/2' +route('venues.events.show', { venue: 1, event: 2 }); // 'https://ziggy.test/venues/1/events/2' ``` -**With query parameters** +#### Query parameters -```php -// routes/web.php +Ziggy adds arguments that don't match any named route parameters as query parameters: -Route::get('events/{event}/venues/{venue}', fn (Request $request, Event $event, Venue $venue) => /* ... */)->name('events.venues.show'); +```php +Route::get('venues/{venue}/events/{event}', fn (Venue $venue, Event $event) => /* ... */) + ->name('venues.events.show'); ``` ```js -// app.js - -route('events.venues.show', { - event: 1, - venue: 2, +route('venues.events.show', { + venue: 1, + event: 2, page: 5, count: 10, }); -// 'https://ziggy.test/events/1/venues/2?page=5&count=10' +// 'https://ziggy.test/venues/1/events/2?page=5&count=10' ``` -If you have a query parameter with the same name as a route parameter, nest it under a `_query` key: +If you need to pass a query parameter with the same name as a route parameter, nest it under the special `_query` key: ```js -route('events.venues.show', { - event: 1, - venue: 2, +route('venues.events.show', { + venue: 1, + event: 2, _query: { event: 3, page: 5, }, }); -// 'https://ziggy.test/events/1/venues/2?event=3&page=5' +// 'https://ziggy.test/venues/1/events/2?event=3&page=5' ``` -Like Laravel's `route()` helper, Ziggy automatically encodes boolean query parameters as integers in the query string: +Like Laravel, Ziggy automatically encodes boolean query parameters as integers in the query string: ```js -route('events.venues.show', { - event: 1, - venue: 2, +route('venues.events.show', { + venue: 1, + event: 2, _query: { draft: false, overdue: true, }, }); -// 'https://ziggy.test/events/1/venues/2?draft=0&overdue=1' +// 'https://ziggy.test/venues/1/events/2?draft=0&overdue=1' ``` -**With default parameter values** +#### Default parameter values -See the [Laravel documentation on default route parameter values](https://laravel.com/docs/urls#default-values). +Ziggy supports default route parameter values ([Laravel docs](https://laravel.com/docs/urls#default-values)). ```php -// routes/web.php - -Route::get('{locale}/posts/{post}', fn (Request $request, Post $post) => /* ... */)->name('posts.show'); +Route::get('{locale}/posts/{post}', fn (Post $post) => /* ... */)->name('posts.show'); ``` ```php @@ -157,12 +144,12 @@ URL::defaults(['locale' => $request->user()->locale ?? 'de']); ``` ```js -// app.js - route('posts.show', 1); // 'https://ziggy.test/de/posts/1' ``` -**Practical AJAX example** +#### Examples + +HTTP request with `axios`: ```js const post = { id: 1, title: 'Ziggy Stardust' }; @@ -170,14 +157,14 @@ const post = { id: 1, title: 'Ziggy Stardust' }; return axios.get(route('posts.show', post)).then((response) => response.data); ``` -#### The `Router` class +### `Router` class -Calling Ziggy's `route()` helper function with no arguments will return an instance of the JavaScript `Router` class, which has some other useful properties and methods. +Calling Ziggy's `route()` function with no arguments will return an instance of its JavaScript `Router` class, which has some other useful properties and methods. -**Checking the current route: `route().current()`** +#### Check the current route: `route().current()` ```js -// Route called 'events.index', with URI '/events' +// Laravel route called 'events.index' with URI '/events' // Current window URL is https://ziggy.test/events route().current(); // 'events.index' @@ -186,40 +173,41 @@ route().current('events.*'); // true route().current('events.show'); // false ``` -The `current()` method optionally accepts parameters as its second argument, and will check that their values also match in the current URL: +`route().current()` optionally accepts parameters as its second argument, and will check that their values also match in the current URL: ```js -// Route called 'events.venues.show', with URI '/events/{event}/venues/{venue}' -// Current window URL is https://myapp.com/events/1/venues/2?authors=all +// Laravel route called 'venues.events.show' with URI '/venues/{venue}/events/{event}' +// Current window URL is https://myapp.com/venues/1/events/2?hosts=all -route().current('events.venues.show', { event: 1, venue: 2 }); // true -route().current('events.venues.show', { authors: 'all' }); // true -route().current('events.venues.show', { venue: 6 }); // false +route().current('venues.events.show', { venue: 1 }); // true +route().current('venues.events.show', { venue: 1, event: 2 }); // true +route().current('venues.events.show', { hosts: 'all' }); // true +route().current('venues.events.show', { venue: 6 }); // false ``` -**Checking if a route exists: `route().has()`** +#### Check if a route exists: `route().has()` ```js -// App has only one named route, 'home' +// Laravel app has only one named route, 'home' route().has('home'); // true route().has('orders'); // false ``` -**Retrieving the current route params: `route().params`** +#### Retrieve the current route params: `route().params` ```js -// Route called 'events.venues.show', with URI '/events/{event}/venues/{venue}' -// Current window URL is https://myapp.com/events/1/venues/2?authors=all +// Laravel route called 'venues.events.show' with URI '/venues/{venue}/events/{event}' +// Current window URL is https://myapp.com/venues/1/events/2?hosts=all -route().params; // { event: '1', venue: '2', authors: 'all' } +route().params; // { venue: '1', event: '2', hosts: 'all' } ``` > Note: parameter values retrieved with `route().params` will always be returned as strings. -#### Route-model binding +### Route-model binding -Ziggy supports Laravel [route-model binding](https://laravel.com/docs/routing#route-model-binding), and can even recognize custom route key names. If you pass `route()` a JavaScript object as one of the route parameters, Ziggy will use the registered route-model binding keys for that route to find the parameter value in the object and insert it into the URL (falling back to an `id` key if there is one and the route-model binding key isn't present). +Ziggy supports Laravel's [route-model binding](https://laravel.com/docs/routing#route-model-binding), and can even recognize custom route key names. If you pass `route()` a JavaScript object as a route parameter, Ziggy will use the registered route-model binding keys for that route to find the correct parameter value inside the object. If no route-model binding keys are explicitly registered for a parameter, Ziggy will use the object's `id` key. ```php // app/Models/Post.php @@ -234,62 +222,46 @@ class Post extends Model ``` ```php -// app/Http/Controllers/PostController.php - -class PostController -{ - public function show(Request $request, Post $post) - { - return view('posts.show', ['post' => $post]); - } -} -``` - -```php -// routes/web.php - -Route::get('blog/{post}', [PostController::class, 'show'])->name('posts.show'); +Route::get('blog/{post}', function (Post $post) { + return view('posts.show', ['post' => $post]); +})->name('posts.show'); ``` ```js -// app.js - const post = { + id: 3, title: 'Introducing Ziggy v1', slug: 'introducing-ziggy-v1', date: '2020-10-23T20:59:24.359278Z', }; -// Ziggy knows that this route uses the 'slug' route-model binding key name: +// Ziggy knows that this route uses the 'slug' route-model binding key: route('posts.show', post); // 'https://ziggy.test/blog/introducing-ziggy-v1' ``` -Ziggy also supports [custom keys](https://laravel.com/docs/routing#customizing-the-key) for scoped bindings in the route definition (requires Laravel 7+): +Ziggy also supports [custom keys](https://laravel.com/docs/routing#customizing-the-key) for scoped bindings declared directly in a route definition: ```php -// routes/web.php - -Route::get('authors/{author}/photos/{photo:uuid}', fn (Request $request, Author $author, Photo $photo) => /* ... */)->name('authors.photos.show'); +Route::get('authors/{author}/photos/{photo:uuid}', fn (Author $author, Photo $photo) => /* ... */) + ->name('authors.photos.show'); ``` ```js -// app.js - const photo = { uuid: '714b19e8-ac5e-4dab-99ba-34dc6fdd24a5', filename: 'sunset.jpg', } -route('authors.photos.show', [{ id: 1, name: 'Jacob' }, photo]); +route('authors.photos.show', [{ id: 1, name: 'Ansel' }, photo]); // 'https://ziggy.test/authors/1/photos/714b19e8-ac5e-4dab-99ba-34dc6fdd24a5' ``` -#### TypeScript +### TypeScript -Ziggy includes TypeScript type definitions, and a helper command that can generate additional type definitions to enable route name and parameter autocompletion. +Ziggy includes TypeScript type definitions, and an Artisan command that can generate additional type definitions to enable route name and parameter autocompletion. -To generate the route types, run Ziggy's Artisan command with the `--types` or `--types-only` option: +To generate route types, run the `ziggy:generate` command with the `--types` or `--types-only` option: ```bash php artisan ziggy:generate --types @@ -305,7 +277,7 @@ declare global { } ``` -If you don't have Ziggy's NPM package installed, add the following to your `jsconfig.json` or `tsconfig.json` to load Ziggy's types from the Composer vendor directory: +If you don't have Ziggy's NPM package installed, add the following to your `jsconfig.json` or `tsconfig.json` to load Ziggy's types from your vendor directory: ```json { @@ -317,175 +289,164 @@ If you don't have Ziggy's NPM package installed, add the following to your `jsco } ``` -## Advanced Setup +## JavaScript frameworks + +> [!NOTE] +> Many applications don't need the additional setup described here—the `@routes` Blade directive makes Ziggy's `route()` function and config available globally, including within bundled JavaScript files. + +If you are not using the `@routes` Blade directive, you can import Ziggy's `route()` function and configuration directly into JavaScript/TypeScript files. + +### Generating and importing Ziggy's configuration + +Ziggy provides an Artisan command to output its config and routes to a file: -#### JavaScript frameworks +```bash +php artisan ziggy:generate +``` -If you are not using Blade, or would prefer not to use the `@routes` directive, Ziggy provides an Artisan command to output its config and routes to a file: `php artisan ziggy:generate`. By default this command stores your routes at `resources/js/ziggy.js`, but you can customize this path by passing a different value as an argument to the Artisan command or setting the `ziggy.output.path` config value. Alternatively, you can return Ziggy's config as JSON from an endpoint in your Laravel API (see [Retrieving Ziggy's routes and config from an API endpoint](#retrieving-ziggys-routes-and-config-from-an-api-endpoint) below for an example of how to set this up). +This command places your configuration in `resources/js/ziggy.js` by default, but you can customize this path by passing an argument to the Artisan command or setting the `ziggy.output.path` config value. -The file generated by `php artisan ziggy:generate` will look something like this: +The file `ziggy:generate` creates looks something like this: ```js -// ziggy.js +// resources/js/ziggy.js const Ziggy = { - routes: {"home":{"uri":"\/","methods":["GET","HEAD"],"domain":null},"login":{"uri":"login","methods":["GET","HEAD"],"domain":null}}, - url: 'http://ziggy.test', - port: false + url: 'https://ziggy.test', + port: null, + routes: { + home: { + uri: '/', + methods: [ 'GET', 'HEAD'], + domain: null, + }, + login: { + uri: 'login', + methods: ['GET', 'HEAD'], + domain: null, + }, + }, }; export { Ziggy }; ``` -You can optionally create an alias to make importing Ziggy's core source files easier: +### Importing the `route()` function -```js -// vite.config.js -export default defineConfig({ - resolve: { - alias: { - ziggy: 'vendor/tightenco/ziggy/dist', - // 'vendor/tightenco/ziggy/dist/vue.es.js' if using the Vue plugin - }, - }, -}); -``` +You can import Ziggy like any other JavaScript library. Without the `@routes` Blade directive Ziggy's config is not available globally, so it must be passed to the `route()` function manually: ```js -// webpack.mix.js +import route from '../../vendor/tightenco/ziggy/dist'; +import { Ziggy } from './ziggy.js'; -// Mix v6 -const path = require('path'); +route('home', undefined, undefined, Ziggy); +``` -mix.alias({ - ziggy: path.resolve('vendor/tightenco/ziggy/dist'), - // 'vendor/tightenco/ziggy/dist/vue' if using the Vue plugin -}); +To simplify importing the `route()` function, you can create an alias to the vendor path: -// Mix v5 -const path = require('path'); +```js +// vite.config.js -mix.webpackConfig({ +export default defineConfig({ resolve: { alias: { - ziggy: path.resolve('vendor/tightenco/ziggy/dist'), + 'ziggy-js': 'vendor/tightenco/ziggy/dist', + // 'vendor/tightenco/ziggy/dist/vue.es' if using the Vue plugin }, }, }); ``` -Finally, import and use Ziggy like any other JavaScript library. Because the Ziggy config object is not available globally in this setup, you'll usually have to pass it to the `route()` function manually: +Now your imports can be shortened to: ```js -// app.js - -import route from 'ziggy'; -import { Ziggy } from './ziggy'; - -// ... - -route('home', undefined, undefined, Ziggy); +import route from 'ziggy-js'; ``` -#### Vue +### Vue Ziggy includes a Vue plugin to make it easy to use the `route()` helper throughout your Vue app: ```js import { createApp } from 'vue'; -import { ZiggyVue } from 'ziggy'; -import { Ziggy } from './ziggy'; -import App from './App'; +import { ZiggyVue } from 'ziggy-js'; +import App from './App.vue'; -createApp(App).use(ZiggyVue, Ziggy); +createApp(App).use(ZiggyVue); +``` -// Vue 2 -import Vue from 'vue' -import { ZiggyVue } from 'ziggy'; -import { Ziggy } from './ziggy'; +Now you can use the `route()` function anywhere in your Vue components and templates: -Vue.use(ZiggyVue, Ziggy); +```vue +Home ``` -If you use this plugin with the `ziggy` import alias shown above, make sure to update the alias to `vendor/tightenco/ziggy/dist/vue.es.js` (Vite) or `vendor/tightenco/ziggy/dist/vue` (Laravel Mix). +If you are not using the `@routes` Blade directive, import Ziggy's configuration too and pass it to `.use()`: -> Note: If you use the `@routes` Blade directive in your views, Ziggy's configuration will already be available globally, so you don't need to import the `Ziggy` config object and pass it into `use()`. - -Now you can use `route()` anywhere in your Vue components and templates, like so: +```js +import { createApp } from 'vue'; +import { ZiggyVue } from 'ziggy-js'; +import { Ziggy } from './ziggy.js'; +import App from './App.vue'; -```html -Home +createApp(App).use(ZiggyVue, Ziggy); ``` -#### React +If you use the Vue plugin with the `ziggy-js` import alias shown above, make sure to update the alias to `vendor/tightenco/ziggy/dist/vue.es`. + +### React Ziggy includes a `useRoute()` hook to make it easy to use the `route()` helper in your React app: ```jsx -// PostsLink.js import React from 'react'; import { useRoute } from 'ziggy-js'; -import { Ziggy } from './ziggy'; export default function PostsLink() { - const route = useRoute(Ziggy); + const route = useRoute(); return Posts; } ``` -If you make the `Ziggy` config object available globally, you can use the `useRoute()` hook without importing and passing Ziggy's configuration to it every time: - -```js -// app.js -import { Ziggy } from './ziggy'; -globalThis.Ziggy = Ziggy; -``` +If you are not using the `@routes` Blade directive, import Ziggy's configuration too and pass it to `useRoute()`: ```jsx -// PostsLink.js import React from 'react'; import { useRoute } from 'ziggy-js'; +import { Ziggy } from './ziggy.js'; export default function PostsLink() { - const route = useRoute(); + const route = useRoute(Ziggy); return Posts; } ``` -> Note: If you include the `@routes` Blade directive in your views, Ziggy's configuration will already be available globally, so you don't need to import the `Ziggy` config object or make it available globally with `globalThis.Ziggy = Ziggy`—you can use the `useRoute()` hook exactly as shown in the `PostsLink.js` example directly above, without any other setup. - -#### SPAs or separate repos - -Ziggy's `route()` helper function is also available as an NPM package, for use in JavaScript projects managed separately from their Laravel backend (i.e. without Composer or a `vendor` directory). You can install the NPM package with `npm install ziggy-js`. - -To make your routes available on the frontend for this function to use, you can either run `php artisan ziggy:generate` and add the generated routes file to your project, or you can return Ziggy's config as JSON from an endpoint in your Laravel API (see [Retrieving Ziggy's routes and config from an API endpoint](#retrieving-ziggys-routes-and-config-from-an-api-endpoint) below for an example of how to set this up). - -Then, import and use Ziggy as above: +You can slo make the `Ziggy` config object available globally, so you can call `useRoute()` without passing Ziggy's configuration to it every time: ```js // app.js +import { Ziggy } from './ziggy.js'; +globalThis.Ziggy = Ziggy; +``` -import route from 'ziggy-js'; - -import { Ziggy } from './ziggy'; -// or... -const response = await fetch('/api/ziggy'); -const Ziggy = await response.json(); +### SPAs or separate repos -// ... +Ziggy's `route()` function is available as an NPM package, for use in JavaScript projects managed separately from their Laravel backend (i.e. without Composer or a `vendor` directory). You can install the NPM package with `npm install ziggy-js`. -route('home', undefined, undefined, Ziggy); -``` +To make your routes available on the frontend for this function to use, you can either run `php artisan ziggy:generate` and add the generated config file to your frontend project, or you can return Ziggy's config as JSON from an endpoint in your Laravel API (see [Retrieving Ziggy's config from an API endpoint](#retrieving-ziggys-routes-from-an-api-endpoint) below for an example of how to set this up). ## Filtering Routes -Ziggy supports filtering the routes it makes available to your JavaScript, which is great if you have certain routes that you don't want to be included and visible in the source of the response sent back to clients. Filtering routes is optional—by default, Ziggy includes all your application's named routes. +Ziggy supports filtering the list of routes it outputs, which is useful if you have certain routes that you don't want to be included and visible in your HTML source. -#### Basic filtering +> [!IMPORTANT] +> Hiding routes from Ziggy's output is not a replacement for thorough authentication and authorization. Routes that should not be accessibly publicly should be protected by authentication whether they're filtered out of Ziggy's output or not. -To set up basic route filtering, create a config file in your Laravel app at `config/ziggy.php` and define **either** an `only` or `except` setting as an array of route name patterns. +### Including/excluding routes + +To set up route filtering, create a config file in your Laravel app at `config/ziggy.php` and add **either** an `only` or `except` key containing an array of route name patterns. > Note: You have to choose one or the other. Setting both `only` and `except` will disable filtering altogether and return all named routes. @@ -497,7 +458,7 @@ return [ ]; ``` -You can also use asterisks as wildcards in route filters. In the example below, `admin.*` will exclude routes named `admin.login` and `admin.register`: +You can use asterisks as wildcards in route filters. In the example below, `admin.*` will exclude routes named `admin.login`, `admin.register`, etc.: ```php // config/ziggy.php @@ -507,7 +468,7 @@ return [ ]; ``` -#### Filtering using groups +### Filtering with groups You can also define groups of routes that you want make available in different places in your app, using a `groups` key in your config file: @@ -542,39 +503,27 @@ To expose multiple groups you can pass an array of group names: ## Other -#### TLS/SSL termination and trusted proxies +### TLS/SSL termination and trusted proxies -If your application is using [TLS/SSL termination](https://en.wikipedia.org/wiki/TLS_termination_proxy) or is behind a load balancer or proxy, or if it's hosted on a service that is, Ziggy may generate URLs with a scheme of `http` instead of `https`, even if your app URL uses `https`. To avoid this happening, set up your Laravel app's `TrustProxies` middleware according to the documentation on [Configuring Trusted Proxies](https://laravel.com/docs/requests#configuring-trusted-proxies). +If your application is using [TLS/SSL termination](https://en.wikipedia.org/wiki/TLS_termination_proxy) or is behind a load balancer or proxy, or if it's hosted on a service that is, Ziggy may generate URLs with a scheme of `http` instead of `https`, even if your app URL uses `https`. To fix this, set up your Laravel app's trusted proxies according to the documentation on [Configuring Trusted Proxies](https://laravel.com/docs/requests#configuring-trusted-proxies). -#### Using `@routes` with a Content Security Policy +### Using `@routes` with a Content Security Policy -A [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) may block inline scripts, including those output by Ziggy's `@routes` Blade directive. If you have a CSP and are using a nonce to flag safe inline scripts, you can pass the nonce as as the second argument to the `@routes` directive and it will be added to Ziggy's script tag: +A [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) may block inline scripts, including those output by Ziggy's `@routes` Blade directive. If you have a CSP and are using a nonce to flag safe inline scripts, you can pass the nonce to the `@routes` directive and it will be added to Ziggy's script tag: ```php -// PHP ^8.0 @routes(nonce: 'your-nonce-here') - -// PHP <=7.4 -@routes(null, 'your-nonce-here') ``` -#### Disabling the `route()` helper +### Disabling the `route()` helper -If you only want to use the `@routes` directive to make your app's routes available in JavaScript, but don't need the `route()` helper function, set the `skip-route-function` config value to `true`: +If you only want to use the `@routes` directive to make Ziggy's configuration available in JavaScript, but don't need the `route()` helper function, set the `ziggy.skip-route-function` config to `true`. -```php -// config/ziggy.php +### Retrieving Ziggy's config from an API endpoint -return [ - 'skip-route-function' => true, -]; -``` - -#### Retrieving Ziggy's routes and config from an API endpoint - -Ziggy can easily return its config object as JSON from an endpoint in your Laravel app. For example, you could set up an `/api/ziggy` route that looks something like this: +If you need to retrieve Ziggy's config from your Laravel backend over the network, you can create a route that looks something like this: ```php // routes/api.php @@ -584,27 +533,12 @@ use Tightenco\Ziggy\Ziggy; Route::get('api/ziggy', fn () => response()->json(new Ziggy)); ``` -Then, client-side, you could retrieve the config with an HTTP request: - -```js -// app.js - -import route from 'ziggy-js'; - -const response = await fetch('/api/ziggy'); -const Ziggy = await response.toJson(); - -// ... - -route('home', undefined, undefined, Ziggy); -``` - -#### Re-generating the routes file when your app routes change +### Re-generating the routes file when your app routes change -If you're exporting your Ziggy routes as a file by running `php artisan ziggy:generate`, you may want to watch your app's route files and re-run the command automatically whenever they're updated. The example below is a Laravel Mix plugin, but similar functionality could be achieved without Mix. Huge thanks to [Nuno Rodrigues](https://github.com/nacr) for [the idea and a sample implementation](https://github.com/tighten/ziggy/issues/321#issuecomment-689150082)! +If you are generating your Ziggy config as a file by running `php artisan ziggy:generate`, you may want to re-run that command when your app's route files change. The example below is a Laravel Mix plugin, but similar functionality could be achieved without Mix. Huge thanks to [Nuno Rodrigues](https://github.com/nacr) for [the idea and a sample implementation](https://github.com/tighten/ziggy/issues/321#issuecomment-689150082). See [#655 for a Vite example](https://github.com/tighten/ziggy/pull/655/files#diff-4aeb78f813e14842fcf95bdace9ced23b8a6eed60b23c165eaa52e8db2f97b61).
-Code example +Laravel Mix plugin example

```js From 706861d122ec83c13bb2a462d76a06c80ba8eb20 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 14:07:12 -0400 Subject: [PATCH 54/56] Scope vitest to `tests/js` dir --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 006cf5f7..2d427d7e 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "build:npm": "microbundle --name route --format modern,es,umd --no-sourcemap --no-generateTypes", "build:npm:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap --no-generateTypes", "build:npm:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --no-sourcemap --no-generateTypes", - "test": "vitest", - "typecheck": "vitest typecheck", + "test": "vitest --dir tests/js", + "typecheck": "vitest typecheck --dir tests/js", "format": "prettier . --write", "prepublishOnly": "npm run build:npm && npm run build:npm:vue && npm run build:npm:react" }, From a60e0c44dbc6d03629a7f4ac0008c04f58b2b8e4 Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 14:28:49 -0400 Subject: [PATCH 55/56] Wip --- package.json | 4 ++-- tsconfig.json | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2d427d7e..006cf5f7 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "build:npm": "microbundle --name route --format modern,es,umd --no-sourcemap --no-generateTypes", "build:npm:vue": "microbundle --entry src/js/vue.js --output dist/vue.js --name ZiggyVue --format modern,es,umd --no-sourcemap --no-generateTypes", "build:npm:react": "microbundle --entry src/js/react.js --output dist/react.js --name ZiggyReact --format modern,es,umd --no-sourcemap --no-generateTypes", - "test": "vitest --dir tests/js", - "typecheck": "vitest typecheck --dir tests/js", + "test": "vitest", + "typecheck": "vitest typecheck", "format": "prettier . --write", "prepublishOnly": "npm run build:npm && npm run build:npm:vue && npm run build:npm:react" }, diff --git a/tsconfig.json b/tsconfig.json index 0967ef42..56b7b6aa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1 +1,3 @@ -{} +{ + "exclude": ["vendor"] +} From ff6ce4f498fe2ef68e23cff34530685dc07f11eb Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Fri, 6 Oct 2023 14:30:22 -0400 Subject: [PATCH 56/56] Wip --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af8826d1..70af691a 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ Ziggy supports all versions of Laravel from `5.4` onward, and all modern browser - [React](#react) - [SPAs or separate repos](#spas-or-separate-repos) - [**Filtering Routes**](#filtering-routes) - - [Including/excluding routes](#including-exluding-routes) - - [Filtering with Groups](#filtering-with-groups) + - [Including/excluding routes](#includingexcluding-routes) + - [Filtering with groups](#filtering-with-groups) - [**Other**](#other) - [**Contributing**](#contributing)